@ionic/core 8.8.4-dev.11776186452.1cc0af05 → 8.8.4-dev.11776246162.138c2737
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/index.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-picker-legacy.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-option.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-skeleton-text.js +1 -1
- package/components/ion-spinner.js +1 -1
- package/components/ion-split-pane.js +1 -1
- package/components/ion-tab-bar.js +1 -1
- package/components/ion-tab-button.js +1 -1
- package/components/ion-tab.js +1 -1
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +1 -1
- package/components/ion-textarea.js +1 -1
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/ion-toggle.js +1 -1
- package/components/ion-toolbar.js +1 -1
- package/components/p-B36-MWK0.js +4 -0
- package/components/p-BDPU2685.js +4 -0
- package/components/p-BrNzoF1U.js +4 -0
- package/components/{p-B0orUoaV.js → p-C-_EGKki.js} +1 -1
- package/components/{p-qhBzWoOF.js → p-C2cZvGcF.js} +1 -1
- package/components/p-CEUppJkx.js +4 -0
- package/components/p-CSexRbnt.js +4 -0
- package/components/{p-ZRp3l6Dk.js → p-CoarhFWH.js} +1 -1
- package/components/p-DNdBtsfu.js +4 -0
- package/components/p-Njik5v4C.js +4 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +34 -25
- package/dist/cjs/ion-alert.cjs.entry.js +51 -44
- 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-datetime_3.cjs.entry.js +28 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +29 -4
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +176 -79
- package/dist/cjs/ion-popover.cjs.entry.js +90 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +27 -60
- package/dist/cjs/ion-select_3.cjs.entry.js +48 -191
- 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 +32 -4
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-Dhoy6v_5.js → overlays-BbhewSIQ.js} +4 -4
- package/dist/collection/components/action-sheet/action-sheet.ios.css +0 -84
- package/dist/collection/components/action-sheet/action-sheet.js +8 -22
- package/dist/collection/components/action-sheet/action-sheet.md.css +0 -84
- package/dist/collection/components/action-sheet/animations/ionic.enter.js +27 -0
- package/dist/collection/components/action-sheet/animations/ionic.leave.js +21 -0
- package/dist/collection/components/alert/alert.ios.css +0 -83
- package/dist/collection/components/alert/alert.js +24 -41
- package/dist/collection/components/alert/alert.md.css +0 -83
- package/dist/collection/components/alert/animations/ionic.enter.js +28 -0
- package/dist/collection/components/alert/animations/ionic.leave.js +19 -0
- package/dist/collection/components/loading/animations/ionic.enter.js +28 -0
- package/dist/collection/components/loading/animations/ionic.leave.js +22 -0
- package/dist/collection/components/loading/loading.js +4 -3
- package/dist/collection/components/modal/animations/ionic.enter.js +40 -0
- package/dist/collection/components/modal/animations/ionic.leave.js +28 -0
- package/dist/collection/components/modal/gestures/sheet.js +71 -9
- package/dist/collection/components/modal/modal.ionic.css +1 -1
- package/dist/collection/components/modal/modal.js +6 -5
- package/dist/collection/components/picker-legacy/animations/ionic.enter.js +27 -0
- package/dist/collection/components/picker-legacy/animations/ionic.leave.js +23 -0
- package/dist/collection/components/picker-legacy/picker.js +4 -3
- package/dist/collection/components/popover/animations/ionic.enter.js +91 -0
- package/dist/collection/components/popover/animations/ionic.leave.js +29 -0
- package/dist/collection/components/popover/popover.js +4 -3
- package/dist/collection/components/select/select.ionic.css +0 -31
- package/dist/collection/components/select/select.ios.css +0 -31
- package/dist/collection/components/select/select.js +14 -125
- package/dist/collection/components/select/select.md.css +0 -31
- package/dist/collection/components/select-modal/select-modal.ionic.css +0 -24
- package/dist/collection/components/select-modal/select-modal.ios.css +0 -77
- package/dist/collection/components/select-modal/select-modal.js +23 -56
- package/dist/collection/components/select-modal/select-modal.md.css +1 -80
- package/dist/collection/components/select-option/select-option.js +2 -21
- package/dist/collection/components/select-popover/select-popover.ios.css +0 -77
- package/dist/collection/components/select-popover/select-popover.js +26 -59
- package/dist/collection/components/select-popover/select-popover.md.css +0 -77
- 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/animations/ionic.enter.js +33 -0
- package/dist/collection/components/toast/animations/ionic.leave.js +16 -0
- package/dist/collection/components/toast/toast.js +4 -3
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/collection/utils/overlays.js +5 -5
- package/dist/docs.json +1 -135
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +34 -25
- package/dist/esm/ion-alert.entry.js +51 -44
- package/dist/esm/ion-app_8.entry.js +4 -4
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-datetime_3.entry.js +28 -4
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +29 -4
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +177 -80
- package/dist/esm/ion-popover.entry.js +90 -4
- package/dist/esm/ion-select-modal.entry.js +27 -60
- package/dist/esm/ion-select_3.entry.js +49 -192
- 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 +32 -4
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-CvFHfO3y.js → overlays-VA-4NWjf.js} +5 -5
- package/dist/html.html-data.json +0 -4
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-07b129d5.entry.js +4 -0
- package/dist/ionic/p-0cb50208.entry.js +4 -0
- package/dist/ionic/{p-db4f4eaf.entry.js → p-1efe83c8.entry.js} +1 -1
- package/dist/ionic/{p-d2fe6791.entry.js → p-2193e875.entry.js} +1 -1
- package/dist/ionic/{p-69033ad6.entry.js → p-2bf931ae.entry.js} +1 -1
- package/dist/ionic/{p-26595044.entry.js → p-3bf01c2c.entry.js} +1 -1
- package/dist/ionic/p-3d4c8528.entry.js +4 -0
- package/dist/ionic/{p-9e71982e.entry.js → p-49799a34.entry.js} +1 -1
- package/dist/ionic/p-64341e32.entry.js +4 -0
- package/dist/ionic/p-6992d9d6.entry.js +4 -0
- package/dist/ionic/{p-aa8c1e64.entry.js → p-6c8c37c2.entry.js} +1 -1
- package/dist/ionic/{p-a94016be.entry.js → p-91e242e4.entry.js} +1 -1
- package/dist/ionic/{p-96ec9a10.entry.js → p-9b9b1450.entry.js} +1 -1
- package/dist/ionic/p-9dd4276b.entry.js +4 -0
- package/dist/ionic/p-BExfzy0B.js +4 -0
- package/dist/ionic/p-a3d794ba.entry.js +4 -0
- package/dist/ionic/p-ba9f8cbb.entry.js +4 -0
- package/dist/ionic/{p-2095969c.entry.js → p-bae3ebe5.entry.js} +1 -1
- package/dist/ionic/{p-a1c8ba8c.entry.js → p-bc5713f7.entry.js} +1 -1
- package/dist/ionic/{p-71f28573.entry.js → p-cdfbe4cc.entry.js} +1 -1
- package/dist/ionic/p-fa701753.entry.js +4 -0
- package/dist/types/components/action-sheet/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/action-sheet/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/alert/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/alert/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/loading/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/loading/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/modal/animations/ionic.enter.d.ts +6 -0
- package/dist/types/components/modal/animations/ionic.leave.d.ts +6 -0
- package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
- package/dist/types/components/picker-legacy/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/picker-legacy/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/popover/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/popover/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/select/select-interface.d.ts +0 -21
- package/dist/types/components/select/select.d.ts +0 -7
- package/dist/types/components/select-option/select-option.d.ts +0 -4
- package/dist/types/components/toast/animations/ionic.enter.d.ts +6 -0
- package/dist/types/components/toast/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components.d.ts +0 -9
- package/dist/types/utils/overlays.d.ts +1 -1
- package/hydrate/index.js +534 -489
- package/hydrate/index.mjs +534 -489
- package/package.json +1 -1
- package/components/p-B6czg-mf.js +0 -4
- package/components/p-BObmvbuR.js +0 -4
- package/components/p-C8Dne7pI.js +0 -4
- package/components/p-Cm7hjN9B.js +0 -4
- package/components/p-DQY5lHUa.js +0 -4
- package/components/p-D_uMZULz.js +0 -4
- package/components/p-GytrfCp8.js +0 -4
- package/components/p-ZeIAjDcZ.js +0 -4
- package/dist/cjs/select-option-render-qQf4xz8P.js +0 -67
- package/dist/collection/components/action-sheet/action-sheet.ionic.css +0 -834
- package/dist/collection/components/alert/alert.ionic.css +0 -1165
- package/dist/collection/components/select-popover/select-popover.ionic.css +0 -489
- package/dist/collection/utils/select-option-render.js +0 -62
- package/dist/esm/select-option-render-BQUT9Aqa.js +0 -65
- package/dist/ionic/p-003b40fc.entry.js +0 -4
- package/dist/ionic/p-35aa95dc.entry.js +0 -4
- package/dist/ionic/p-37f895a8.entry.js +0 -4
- package/dist/ionic/p-3884bfa4.entry.js +0 -4
- package/dist/ionic/p-38897781.entry.js +0 -4
- package/dist/ionic/p-575061c0.entry.js +0 -4
- package/dist/ionic/p-6bffc700.entry.js +0 -4
- package/dist/ionic/p-BYtS2rae.js +0 -4
- package/dist/ionic/p-Dr3N4o63.js +0 -4
- package/dist/ionic/p-c3335fe0.entry.js +0 -4
- package/dist/ionic/p-ef0c281a.entry.js +0 -4
- package/dist/types/utils/select-option-render.d.ts +0 -26
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import caretDownRegular from "@phosphor-icons/core/assets/regular/caret-down.svg";
|
|
5
5
|
import { Build, Host, h, forceUpdate } from "@stencil/core";
|
|
6
|
-
import { ENABLE_HTML_CONTENT_DEFAULT } from "../../utils/config";
|
|
7
6
|
import { compareOptions, createNotchController, isOptionSelected, checkInvalidState } from "../../utils/forms/index";
|
|
8
7
|
import { focusVisibleElement, renderHiddenInput, inheritAttributes } from "../../utils/helpers";
|
|
9
8
|
import { printIonWarning } from "../../utils/logging/index";
|
|
10
9
|
import { actionSheetController, alertController, popoverController, modalController } from "../../utils/overlays";
|
|
11
10
|
import { isRTL } from "../../utils/rtl/index";
|
|
12
|
-
import { sanitizeDOMString } from "../../utils/sanitization/index";
|
|
13
11
|
import { createColorClasses, hostContext } from "../../utils/theme";
|
|
14
12
|
import { watchForOptions } from "../../utils/watch-options";
|
|
15
13
|
import { caretDownSharp, chevronExpand } from "ionicons/icons";
|
|
@@ -42,7 +40,6 @@ export class Select {
|
|
|
42
40
|
this.helperTextId = `${this.inputId}-helper-text`;
|
|
43
41
|
this.errorTextId = `${this.inputId}-error-text`;
|
|
44
42
|
this.inheritedAttributes = {};
|
|
45
|
-
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
46
43
|
this.isExpanded = false;
|
|
47
44
|
/**
|
|
48
45
|
* The `hasFocus` state ensures the focus class is
|
|
@@ -405,14 +402,9 @@ export class Select {
|
|
|
405
402
|
.join(' ');
|
|
406
403
|
const optClass = `${OPTION_CLASS} ${copyClasses}`;
|
|
407
404
|
const isSelected = isOptionSelected(selectValue, value, this.compareWith);
|
|
408
|
-
const text = this.customHTMLEnabled ? getOptionContent(option) : option.textContent;
|
|
409
|
-
const startContent = this.customHTMLEnabled
|
|
410
|
-
? getOptionContent(option, 'start')
|
|
411
|
-
: undefined;
|
|
412
|
-
const endContent = this.customHTMLEnabled ? getOptionContent(option, 'end') : undefined;
|
|
413
405
|
return {
|
|
414
406
|
role: isSelected ? 'selected' : '',
|
|
415
|
-
text:
|
|
407
|
+
text: option.textContent,
|
|
416
408
|
cssClass: optClass,
|
|
417
409
|
handler: () => {
|
|
418
410
|
this.setValue(value);
|
|
@@ -421,9 +413,6 @@ export class Select {
|
|
|
421
413
|
'aria-checked': isSelected ? 'true' : 'false',
|
|
422
414
|
role: 'radio',
|
|
423
415
|
},
|
|
424
|
-
startContent: startContent !== null && startContent !== void 0 ? startContent : undefined,
|
|
425
|
-
endContent: endContent !== null && endContent !== void 0 ? endContent : undefined,
|
|
426
|
-
description: option.description,
|
|
427
416
|
};
|
|
428
417
|
});
|
|
429
418
|
// Add "cancel" button
|
|
@@ -444,21 +433,13 @@ export class Select {
|
|
|
444
433
|
.filter((cls) => cls !== 'hydrated')
|
|
445
434
|
.join(' ');
|
|
446
435
|
const optClass = `${OPTION_CLASS} ${copyClasses}`;
|
|
447
|
-
const label = this.customHTMLEnabled ? getOptionContent(option) : option.textContent;
|
|
448
|
-
const startContent = this.customHTMLEnabled
|
|
449
|
-
? getOptionContent(option, 'start')
|
|
450
|
-
: undefined;
|
|
451
|
-
const endContent = this.customHTMLEnabled ? getOptionContent(option, 'end') : undefined;
|
|
452
436
|
return {
|
|
453
437
|
type: inputType,
|
|
454
438
|
cssClass: optClass,
|
|
455
|
-
label:
|
|
439
|
+
label: option.textContent || '',
|
|
456
440
|
value,
|
|
457
441
|
checked: isOptionSelected(selectValue, value, this.compareWith),
|
|
458
442
|
disabled: option.disabled,
|
|
459
|
-
startContent: startContent !== null && startContent !== void 0 ? startContent : undefined,
|
|
460
|
-
endContent: endContent !== null && endContent !== void 0 ? endContent : undefined,
|
|
461
|
-
description: option.description,
|
|
462
443
|
};
|
|
463
444
|
});
|
|
464
445
|
return alertInputs;
|
|
@@ -471,13 +452,8 @@ export class Select {
|
|
|
471
452
|
.filter((cls) => cls !== 'hydrated')
|
|
472
453
|
.join(' ');
|
|
473
454
|
const optClass = `${OPTION_CLASS} ${copyClasses}`;
|
|
474
|
-
const text = this.customHTMLEnabled ? getOptionContent(option) : option.textContent;
|
|
475
|
-
const startContent = this.customHTMLEnabled
|
|
476
|
-
? getOptionContent(option, 'start')
|
|
477
|
-
: undefined;
|
|
478
|
-
const endContent = this.customHTMLEnabled ? getOptionContent(option, 'end') : undefined;
|
|
479
455
|
return {
|
|
480
|
-
text:
|
|
456
|
+
text: option.textContent || '',
|
|
481
457
|
cssClass: optClass,
|
|
482
458
|
value,
|
|
483
459
|
checked: isOptionSelected(selectValue, value, this.compareWith),
|
|
@@ -488,9 +464,6 @@ export class Select {
|
|
|
488
464
|
this.close();
|
|
489
465
|
}
|
|
490
466
|
},
|
|
491
|
-
startContent: startContent !== null && startContent !== void 0 ? startContent : undefined,
|
|
492
|
-
endContent: endContent !== null && endContent !== void 0 ? endContent : undefined,
|
|
493
|
-
description: option.description,
|
|
494
467
|
};
|
|
495
468
|
});
|
|
496
469
|
return popoverOptions;
|
|
@@ -658,18 +631,12 @@ export class Select {
|
|
|
658
631
|
}
|
|
659
632
|
return;
|
|
660
633
|
}
|
|
661
|
-
|
|
662
|
-
* Returns the text to display in the select based on the selected value.
|
|
663
|
-
*
|
|
664
|
-
* @param useHTML If `true`, the returned text will include any custom HTML content from the selected option. If `false`, the returned text will be plain text without any HTML. Defaults to `false`.
|
|
665
|
-
* @returns The text to display in the select, either with or without HTML based on the `useHTML` parameter.
|
|
666
|
-
*/
|
|
667
|
-
getText(useHTML = false) {
|
|
634
|
+
getText() {
|
|
668
635
|
const selectedText = this.selectedText;
|
|
669
636
|
if (selectedText != null && selectedText !== '') {
|
|
670
637
|
return selectedText;
|
|
671
638
|
}
|
|
672
|
-
return generateText(this.childOpts, this.value, this.compareWith
|
|
639
|
+
return generateText(this.childOpts, this.value, this.compareWith);
|
|
673
640
|
}
|
|
674
641
|
setFocus() {
|
|
675
642
|
if (this.focusEl) {
|
|
@@ -758,7 +725,7 @@ export class Select {
|
|
|
758
725
|
*/
|
|
759
726
|
renderSelectText() {
|
|
760
727
|
const { placeholder } = this;
|
|
761
|
-
const displayValue = this.getText(
|
|
728
|
+
const displayValue = this.getText();
|
|
762
729
|
let addPlaceholderClass = false;
|
|
763
730
|
let selectText = displayValue;
|
|
764
731
|
if (selectText === '' && placeholder !== undefined) {
|
|
@@ -770,9 +737,6 @@ export class Select {
|
|
|
770
737
|
'select-placeholder': addPlaceholderClass,
|
|
771
738
|
};
|
|
772
739
|
const textPart = addPlaceholderClass ? 'placeholder' : 'text';
|
|
773
|
-
if (this.customHTMLEnabled) {
|
|
774
|
-
return h("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart, innerHTML: selectText });
|
|
775
|
-
}
|
|
776
740
|
return (h("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart }, selectText));
|
|
777
741
|
}
|
|
778
742
|
/**
|
|
@@ -790,7 +754,6 @@ export class Select {
|
|
|
790
754
|
get ariaLabel() {
|
|
791
755
|
var _a;
|
|
792
756
|
const { placeholder, inheritedAttributes } = this;
|
|
793
|
-
// Get the plain text from the selected text
|
|
794
757
|
const displayValue = this.getText();
|
|
795
758
|
// The aria label should be preferred over visible text if both are specified
|
|
796
759
|
const definedLabel = (_a = inheritedAttributes['aria-label']) !== null && _a !== void 0 ? _a : this.labelText;
|
|
@@ -945,7 +908,7 @@ export class Select {
|
|
|
945
908
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
946
909
|
*/
|
|
947
910
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
948
|
-
return (h(Host, { key: '
|
|
911
|
+
return (h(Host, { key: '663520f7e688836f89101008efd49f38cc5e4aed', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
949
912
|
[theme]: true,
|
|
950
913
|
'in-item': inItem,
|
|
951
914
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -964,7 +927,7 @@ export class Select {
|
|
|
964
927
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
965
928
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
966
929
|
[`select-size-${size}`]: size !== undefined,
|
|
967
|
-
}) }, h("label", { key: '
|
|
930
|
+
}) }, h("label", { key: '17c2602b8e33017cbb898a332f9960482ac72c84', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), h("div", { key: '00b4887a9f5c6137b2c817e69e77498b3502051d', class: "select-wrapper-inner", part: "inner" },
|
|
968
931
|
/**
|
|
969
932
|
* For the ionic theme, we render the outline container here
|
|
970
933
|
* instead of higher up, so it can be positioned relative to
|
|
@@ -974,7 +937,7 @@ export class Select {
|
|
|
974
937
|
* <label> element, ensuring that clicking the label text
|
|
975
938
|
* focuses the select.
|
|
976
939
|
*/
|
|
977
|
-
theme === 'ionic' && fill === 'outline' && h("div", { key: '
|
|
940
|
+
theme === 'ionic' && fill === 'outline' && h("div", { key: 'd4916d84ec0d92888139b84be64cd766150e1d83', class: "select-outline" }), h("slot", { key: 'ad9ca19118b0a4cad5995f1010bf8dc9b6c1d4d3', name: "start" }), h("div", { key: '7f36c316973409d237a135ee191bb0f39174e47c', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '0a23c1be8afefa31cf7161dd7470decf30603ce0', name: "end" }), shouldRenderInnerIcon && this.renderSelectIcon()), shouldRenderOuterIcon && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '0c455c157c0fb6f43f3f030758f5c583f13fceda', class: "select-highlight" })), this.renderBottomContent()));
|
|
978
941
|
}
|
|
979
942
|
static get is() { return "ion-select"; }
|
|
980
943
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1655,99 +1618,25 @@ const parseValue = (value) => {
|
|
|
1655
1618
|
}
|
|
1656
1619
|
return value.toString();
|
|
1657
1620
|
};
|
|
1658
|
-
const generateText = (opts, value, compareWith
|
|
1621
|
+
const generateText = (opts, value, compareWith) => {
|
|
1659
1622
|
if (value === undefined) {
|
|
1660
1623
|
return '';
|
|
1661
1624
|
}
|
|
1662
1625
|
if (Array.isArray(value)) {
|
|
1663
1626
|
return value
|
|
1664
|
-
.map((v) => textForValue(opts, v, compareWith
|
|
1627
|
+
.map((v) => textForValue(opts, v, compareWith))
|
|
1665
1628
|
.filter((opt) => opt !== null)
|
|
1666
1629
|
.join(', ');
|
|
1667
1630
|
}
|
|
1668
1631
|
else {
|
|
1669
|
-
return textForValue(opts, value, compareWith
|
|
1632
|
+
return textForValue(opts, value, compareWith) || '';
|
|
1670
1633
|
}
|
|
1671
1634
|
};
|
|
1672
|
-
const textForValue = (opts, value, compareWith
|
|
1635
|
+
const textForValue = (opts, value, compareWith) => {
|
|
1673
1636
|
const selectOpt = opts.find((opt) => {
|
|
1674
1637
|
return compareOptions(value, getOptionValue(opt), compareWith);
|
|
1675
1638
|
});
|
|
1676
|
-
|
|
1677
|
-
if (!selectOpt)
|
|
1678
|
-
return null;
|
|
1679
|
-
return customHTMLEnabled && useHTML
|
|
1680
|
-
? getOptionContent(selectOpt, undefined, true)
|
|
1681
|
-
: selectOpt.textContent;
|
|
1682
|
-
};
|
|
1683
|
-
/**
|
|
1684
|
-
* Trims whitespace from all text nodes within a DOM tree.
|
|
1685
|
-
* This prevents invisible layout shifts and unwanted gaps between
|
|
1686
|
-
* elements when HTML content is injected via innerHTML or cloneNode,
|
|
1687
|
-
* as browsers preserve whitespace (tabs, newlines, spaces) from
|
|
1688
|
-
* the original source markup.
|
|
1689
|
-
*
|
|
1690
|
-
* @param node The root node to start trimming text nodes from.
|
|
1691
|
-
*/
|
|
1692
|
-
const trimTextNodes = (node) => {
|
|
1693
|
-
node.childNodes.forEach((child) => {
|
|
1694
|
-
var _a;
|
|
1695
|
-
if (child.nodeType === Node.TEXT_NODE) {
|
|
1696
|
-
child.textContent = ((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
1697
|
-
}
|
|
1698
|
-
else if (child.nodeType === Node.ELEMENT_NODE) {
|
|
1699
|
-
trimTextNodes(child);
|
|
1700
|
-
}
|
|
1701
|
-
});
|
|
1702
|
-
};
|
|
1703
|
-
/**
|
|
1704
|
-
* Extracts and clones content from an `ion-select-option` element
|
|
1705
|
-
* for rendering within overlay interfaces or the select text when `customHTMLEnabled` is `true`.
|
|
1706
|
-
*
|
|
1707
|
-
* @param option - The `ion-select-option` element to extract content from.
|
|
1708
|
-
* @param slotName - Optional slot name to extract. If omitted, extracts the default slot content.
|
|
1709
|
-
* @param useHTML - If `true`, the returned string will include any custom HTML content. If `false`, the returned string will be plain text without any HTML.
|
|
1710
|
-
* @returns When `useHTML` is `true`, a sanitized HTML string. When `false`, a
|
|
1711
|
-
* div element containing cloned child nodes. Returns `null` if no matching
|
|
1712
|
-
* content is found.
|
|
1713
|
-
*/
|
|
1714
|
-
const getOptionContent = (option, slotName, useHTML = false) => {
|
|
1715
|
-
let nodes;
|
|
1716
|
-
if (slotName) {
|
|
1717
|
-
// Named slot: get elements with matching slot attribute
|
|
1718
|
-
nodes = Array.from(option.children).filter((el) => el.getAttribute('slot') === slotName);
|
|
1719
|
-
}
|
|
1720
|
-
else {
|
|
1721
|
-
// Default slot: get nodes without a slot attribute
|
|
1722
|
-
nodes = Array.from(option.childNodes).filter((node) => {
|
|
1723
|
-
var _a;
|
|
1724
|
-
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
1725
|
-
return !node.hasAttribute('slot');
|
|
1726
|
-
}
|
|
1727
|
-
// Exclude whitespace-only text nodes to prevent empty container returns
|
|
1728
|
-
return ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim().length) !== 0;
|
|
1729
|
-
});
|
|
1730
|
-
}
|
|
1731
|
-
if (nodes.length === 0) {
|
|
1732
|
-
return null;
|
|
1733
|
-
}
|
|
1734
|
-
// Clone each node into a temporary container
|
|
1735
|
-
const container = document.createElement('div');
|
|
1736
|
-
nodes.forEach((n) => {
|
|
1737
|
-
var _a;
|
|
1738
|
-
const clone = n.cloneNode(true);
|
|
1739
|
-
if (clone.nodeType === Node.TEXT_NODE) {
|
|
1740
|
-
clone.textContent = ((_a = clone.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
1741
|
-
}
|
|
1742
|
-
else {
|
|
1743
|
-
trimTextNodes(clone);
|
|
1744
|
-
}
|
|
1745
|
-
container.appendChild(clone);
|
|
1746
|
-
});
|
|
1747
|
-
if (useHTML) {
|
|
1748
|
-
return sanitizeDOMString(container.innerHTML.trim()) || null;
|
|
1749
|
-
}
|
|
1750
|
-
return container;
|
|
1639
|
+
return selectOpt ? selectOpt.textContent : null;
|
|
1751
1640
|
};
|
|
1752
1641
|
let selectIds = 0;
|
|
1753
1642
|
const OPTION_CLASS = 'select-interface-option';
|
|
@@ -103,13 +103,6 @@
|
|
|
103
103
|
* @prop --border-width: Width of the select border
|
|
104
104
|
*
|
|
105
105
|
* @prop --ripple-color: The color of the ripple effect on MD mode.
|
|
106
|
-
*
|
|
107
|
-
* @prop --select-text-media-width: The width of media (icons/images) in the select text.
|
|
108
|
-
* @prop --select-text-media-height: The height of media (icons/images) in the select text.
|
|
109
|
-
* @prop --select-text-media-border-width: The border width of media (icons/images) in the select text.
|
|
110
|
-
* @prop --select-text-media-border-color: The border color of media (icons/images) in the select text.
|
|
111
|
-
* @prop --select-text-media-border-radius: The border radius of media (icons/images) in the select text.
|
|
112
|
-
* @prop --select-text-media-border-style: The border style of media (icons/images) in the select text.
|
|
113
106
|
*/
|
|
114
107
|
--padding-top: 0px;
|
|
115
108
|
--padding-end: 0px;
|
|
@@ -121,8 +114,6 @@
|
|
|
121
114
|
--highlight-color-focused: var(--ion-color-primary, #0054e9);
|
|
122
115
|
--highlight-color-valid: var(--ion-color-success, #2dd55b);
|
|
123
116
|
--highlight-color-invalid: var(--ion-color-danger, #c5000f);
|
|
124
|
-
--select-text-media-height: 1.5em;
|
|
125
|
-
--select-text-media-width: 1.5em;
|
|
126
117
|
/**
|
|
127
118
|
* This is a private API that is used to switch
|
|
128
119
|
* out the highlight color based on the state
|
|
@@ -227,19 +218,6 @@ button {
|
|
|
227
218
|
overflow: hidden;
|
|
228
219
|
}
|
|
229
220
|
|
|
230
|
-
.select-text img,
|
|
231
|
-
.select-text ion-img,
|
|
232
|
-
.select-text ion-icon,
|
|
233
|
-
.select-text ion-thumbnail,
|
|
234
|
-
.select-text ion-avatar {
|
|
235
|
-
border-radius: var(--select-text-media-border-radius);
|
|
236
|
-
width: var(--select-text-media-width);
|
|
237
|
-
height: var(--select-text-media-height);
|
|
238
|
-
border-width: var(--select-text-media-border-width);
|
|
239
|
-
border-style: var(--select-text-media-border-style);
|
|
240
|
-
border-color: var(--select-text-media-border-color);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
221
|
.select-wrapper {
|
|
244
222
|
display: flex;
|
|
245
223
|
position: relative;
|
|
@@ -641,15 +619,6 @@ button {
|
|
|
641
619
|
min-width: 16px;
|
|
642
620
|
}
|
|
643
621
|
|
|
644
|
-
/**
|
|
645
|
-
* If the select text contains rich content, we want to add some
|
|
646
|
-
* spacing between the items without changing the display to prevent
|
|
647
|
-
* losing the ellipsis behavior.
|
|
648
|
-
*/
|
|
649
|
-
.select-text > * {
|
|
650
|
-
margin-inline-start: 8px;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
622
|
.label-text-wrapper {
|
|
654
623
|
/**
|
|
655
624
|
* Label text should not extend
|
|
@@ -63,15 +63,6 @@
|
|
|
63
63
|
height: 100%;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.select-option-label {
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.select-option-description {
|
|
72
|
-
display: block;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
66
|
:host(.in-modal-default) ion-content::part(scroll) {
|
|
76
67
|
--padding-bottom: var(--token-space-400, var(--token-scale-400, 16px));
|
|
77
68
|
}
|
|
@@ -136,19 +127,4 @@ ion-content {
|
|
|
136
127
|
}
|
|
137
128
|
ion-content:has(.radio-checked) .ion-focused:not(.item-radio-checked) {
|
|
138
129
|
--background-focused-opacity: 1;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.select-option-label {
|
|
142
|
-
gap: var(--token-space-300, var(--token-scale-300, 12px));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.select-option-description {
|
|
146
|
-
font-size: var(--token-font-size-350, 0.875rem);
|
|
147
|
-
font-weight: var(--token-font-weight-regular, 400);
|
|
148
|
-
letter-spacing: var(--token-font-letter-spacing-0, 0%);
|
|
149
|
-
line-height: var(--token-font-line-height-600, var(--token-scale-600, 24px));
|
|
150
|
-
text-decoration: none;
|
|
151
|
-
text-transform: none;
|
|
152
|
-
color: var(--token-text-subtle, var(--token-primitives-neutral-1000, #3b3b3b));
|
|
153
|
-
font-size: var(--token-font-size-350, 0.875rem);
|
|
154
130
|
}
|
|
@@ -1,84 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A heuristic that applies CSS to tablet
|
|
3
|
-
* viewports.
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
* @include tablet-viewport() {
|
|
7
|
-
* :host {
|
|
8
|
-
* background-color: green;
|
|
9
|
-
* }
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* A heuristic that applies CSS to mobile
|
|
14
|
-
* viewports (i.e. phones, not tablets).
|
|
15
|
-
*
|
|
16
|
-
* Usage:
|
|
17
|
-
* @include mobile-viewport() {
|
|
18
|
-
* :host {
|
|
19
|
-
* background-color: blue;
|
|
20
|
-
* }
|
|
21
|
-
* }
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Convert a font size to a dynamic font size.
|
|
25
|
-
* Fonts that participate in Dynamic Type should use
|
|
26
|
-
* dynamic font sizes.
|
|
27
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
28
|
-
* @param unit (optional) - The unit to convert 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
|
-
* a maximum font size.
|
|
34
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
35
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
36
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
37
|
-
* convert to a unit other than $baselineUnit.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Convert a font size to a dynamic font size but impose
|
|
41
|
-
* a minimum font size.
|
|
42
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
43
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
44
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
45
|
-
* convert to a unit other than $baselineUnit.
|
|
46
|
-
*/
|
|
47
|
-
/**
|
|
48
|
-
* Convert a font size to a dynamic font size but impose
|
|
49
|
-
* maximum and minimum font sizes.
|
|
50
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
51
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
52
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
53
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
54
|
-
* convert to a unit other than $baselineUnit.
|
|
55
|
-
*/
|
|
56
1
|
:host {
|
|
57
2
|
height: 100%;
|
|
58
3
|
}
|
|
59
4
|
|
|
60
|
-
.select-option-label {
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.select-option-description {
|
|
66
|
-
display: block;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.select-option-label {
|
|
70
|
-
gap: 12px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.select-option-description {
|
|
74
|
-
padding-left: 0;
|
|
75
|
-
padding-right: 0;
|
|
76
|
-
padding-top: 5px;
|
|
77
|
-
padding-bottom: 0;
|
|
78
|
-
color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
|
|
79
|
-
font-size: 0.75rem;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
5
|
/**
|
|
83
6
|
* Convert a pixels given value into rem
|
|
84
7
|
*
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import { getIonMode } from "../../global/ionic-global";
|
|
5
5
|
import { Host, forceUpdate, h } from "@stencil/core";
|
|
6
6
|
import { safeCall } from "../../utils/overlays";
|
|
7
|
-
import { renderOptionLabel } from "../../utils/select-option-render";
|
|
8
7
|
import { getClassMap, hostContext } from "../../utils/theme";
|
|
9
8
|
export class SelectModal {
|
|
10
9
|
constructor() {
|
|
@@ -61,65 +60,33 @@ export class SelectModal {
|
|
|
61
60
|
}
|
|
62
61
|
renderRadioOptions() {
|
|
63
62
|
const checked = this.options.filter((o) => o.checked).map((o) => o.value)[0];
|
|
64
|
-
return (h("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
description: richOption.description,
|
|
78
|
-
};
|
|
79
|
-
return (h("ion-item", { lines: "none", class: Object.assign({
|
|
80
|
-
// TODO FW-4784
|
|
81
|
-
'item-radio-checked': option.value === checked
|
|
82
|
-
}, getClassMap(option.cssClass)) }, h("ion-radio", { value: option.value, disabled: option.disabled, justify: "start", labelPlacement: "end", onClick: () => this.closeModal(), onKeyUp: (ev) => {
|
|
83
|
-
if (ev.key === ' ') {
|
|
84
|
-
/**
|
|
85
|
-
* Selecting a radio option with keyboard navigation,
|
|
86
|
-
* either through the Enter or Space keys, should
|
|
87
|
-
* dismiss the modal.
|
|
88
|
-
*/
|
|
89
|
-
this.closeModal();
|
|
90
|
-
}
|
|
91
|
-
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
92
|
-
})));
|
|
63
|
+
return (h("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option) => (h("ion-item", { lines: "none", class: Object.assign({
|
|
64
|
+
// TODO FW-4784
|
|
65
|
+
'item-radio-checked': option.value === checked
|
|
66
|
+
}, getClassMap(option.cssClass)) }, h("ion-radio", { value: option.value, disabled: option.disabled, justify: "start", labelPlacement: "end", onClick: () => this.closeModal(), onKeyUp: (ev) => {
|
|
67
|
+
if (ev.key === ' ') {
|
|
68
|
+
/**
|
|
69
|
+
* Selecting a radio option with keyboard navigation,
|
|
70
|
+
* either through the Enter or Space keys, should
|
|
71
|
+
* dismiss the modal.
|
|
72
|
+
*/
|
|
73
|
+
this.closeModal();
|
|
74
|
+
}
|
|
75
|
+
} }, option.text))))));
|
|
93
76
|
}
|
|
94
77
|
renderCheckboxOptions() {
|
|
95
|
-
return this.options.map((option
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
id: `modal-option-${index}`,
|
|
105
|
-
label: richOption.text,
|
|
106
|
-
startContent: richOption.startContent,
|
|
107
|
-
endContent: richOption.endContent,
|
|
108
|
-
description: richOption.description,
|
|
109
|
-
};
|
|
110
|
-
return (h("ion-item", { class: Object.assign({
|
|
111
|
-
// TODO FW-4784
|
|
112
|
-
'item-checkbox-checked': option.checked
|
|
113
|
-
}, getClassMap(option.cssClass)) }, h("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
|
|
114
|
-
this.setChecked(ev);
|
|
115
|
-
this.callOptionHandler(ev);
|
|
116
|
-
// TODO FW-4784
|
|
117
|
-
forceUpdate(this);
|
|
118
|
-
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
119
|
-
});
|
|
78
|
+
return this.options.map((option) => (h("ion-item", { class: Object.assign({
|
|
79
|
+
// TODO FW-4784
|
|
80
|
+
'item-checkbox-checked': option.checked
|
|
81
|
+
}, getClassMap(option.cssClass)) }, h("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
|
|
82
|
+
this.setChecked(ev);
|
|
83
|
+
this.callOptionHandler(ev);
|
|
84
|
+
// TODO FW-4784
|
|
85
|
+
forceUpdate(this);
|
|
86
|
+
} }, option.text))));
|
|
120
87
|
}
|
|
121
88
|
render() {
|
|
122
|
-
return (h(Host, { key: '
|
|
89
|
+
return (h(Host, { key: 'c0218aa9ebcbe9d70a6cc1ed8d005ca656e163d3', class: Object.assign({ [getIonMode(this)]: true }, this.getModalContextClasses()) }, h("ion-header", { key: '4698d7442befa17e449655b2f9439001298991a0' }, h("ion-toolbar", { key: 'd0f1d3418f8fdbfdf12fef752f6be4939e70eb79' }, this.header !== undefined && h("ion-title", { key: '2916c22b3a42635e503fa0a0c916b32909999761' }, this.header), h("ion-buttons", { key: 'e93827fc49edd8ac04100e7df8a2a5144d257c19', slot: "end" }, h("ion-button", { key: '0b46828d67d5b4864f40fcbf082ae24797099fb9', onClick: () => this.closeModal() }, this.cancelText)))), h("ion-content", { key: '8460ad9ce425ad0b25b603d0cd42c58b68ca63ee' }, h("ion-list", { key: 'c48ea90af6f36a44102a8852267bd7f6f82f9598' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
|
|
123
90
|
}
|
|
124
91
|
static get is() { return "ion-select-modal"; }
|
|
125
92
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1,85 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A heuristic that applies CSS to tablet
|
|
3
|
-
* viewports.
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
* @include tablet-viewport() {
|
|
7
|
-
* :host {
|
|
8
|
-
* background-color: green;
|
|
9
|
-
* }
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* A heuristic that applies CSS to mobile
|
|
14
|
-
* viewports (i.e. phones, not tablets).
|
|
15
|
-
*
|
|
16
|
-
* Usage:
|
|
17
|
-
* @include mobile-viewport() {
|
|
18
|
-
* :host {
|
|
19
|
-
* background-color: blue;
|
|
20
|
-
* }
|
|
21
|
-
* }
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Convert a font size to a dynamic font size.
|
|
25
|
-
* Fonts that participate in Dynamic Type should use
|
|
26
|
-
* dynamic font sizes.
|
|
27
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
28
|
-
* @param unit (optional) - The unit to convert 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
|
-
* a maximum font size.
|
|
34
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
35
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
36
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
37
|
-
* convert to a unit other than $baselineUnit.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Convert a font size to a dynamic font size but impose
|
|
41
|
-
* a minimum font size.
|
|
42
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
43
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
44
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
45
|
-
* convert to a unit other than $baselineUnit.
|
|
46
|
-
*/
|
|
47
|
-
/**
|
|
48
|
-
* Convert a font size to a dynamic font size but impose
|
|
49
|
-
* maximum and minimum font sizes.
|
|
50
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
51
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
52
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
53
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
54
|
-
* convert to a unit other than $baselineUnit.
|
|
55
|
-
*/
|
|
56
1
|
:host {
|
|
57
2
|
height: 100%;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.select-option-label {
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.select-option-description {
|
|
66
|
-
display: block;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.select-option-label {
|
|
70
|
-
gap: 12px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.select-option-description {
|
|
74
|
-
padding-left: 0;
|
|
75
|
-
padding-right: 0;
|
|
76
|
-
padding-top: 5px;
|
|
77
|
-
padding-bottom: 0;
|
|
78
|
-
color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
|
|
79
|
-
font-size: 0.75rem;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
3
|
+
} /**
|
|
83
4
|
* A heuristic that applies CSS to tablet
|
|
84
5
|
* viewports.
|
|
85
6
|
*
|