@ionic/core 8.8.4-dev.11776178970.14763043 → 8.8.4-dev.11776186452.1cc0af05
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-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-range.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-C-_EGKki.js → p-B0orUoaV.js} +1 -1
- package/components/p-BObmvbuR.js +4 -0
- package/components/p-C8Dne7pI.js +4 -0
- package/components/p-Cm7hjN9B.js +4 -0
- package/components/p-DQY5lHUa.js +4 -0
- package/components/p-D_uMZULz.js +4 -0
- package/components/{p-CoarhFWH.js → p-ZRp3l6Dk.js} +1 -1
- package/components/{p-C2cZvGcF.js → p-qhBzWoOF.js} +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +23 -8
- package/dist/cjs/ion-alert.cjs.entry.js +42 -24
- 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 +2 -2
- package/dist/cjs/ion-range.cjs.entry.js +1 -1
- package/dist/cjs/ion-select-modal.cjs.entry.js +59 -26
- package/dist/cjs/ion-select_3.cjs.entry.js +190 -47
- 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/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/select-option-render-qQf4xz8P.js +67 -0
- package/dist/collection/components/action-sheet/action-sheet.ionic.css +834 -0
- package/dist/collection/components/action-sheet/action-sheet.ios.css +84 -0
- package/dist/collection/components/action-sheet/action-sheet.js +21 -6
- package/dist/collection/components/action-sheet/action-sheet.md.css +84 -0
- package/dist/collection/components/alert/alert.ionic.css +1165 -0
- package/dist/collection/components/alert/alert.ios.css +83 -0
- package/dist/collection/components/alert/alert.js +40 -22
- package/dist/collection/components/alert/alert.md.css +83 -0
- package/dist/collection/components/range/range.ionic.css +6 -9
- package/dist/collection/components/select/select.ionic.css +31 -0
- package/dist/collection/components/select/select.ios.css +31 -0
- package/dist/collection/components/select/select.js +125 -14
- package/dist/collection/components/select/select.md.css +31 -0
- package/dist/collection/components/select-modal/select-modal.ionic.css +24 -0
- package/dist/collection/components/select-modal/select-modal.ios.css +77 -0
- package/dist/collection/components/select-modal/select-modal.js +56 -23
- package/dist/collection/components/select-modal/select-modal.md.css +80 -1
- package/dist/collection/components/select-option/select-option.js +21 -2
- package/dist/collection/components/select-popover/select-popover.ionic.css +489 -0
- package/dist/collection/components/select-popover/select-popover.ios.css +77 -0
- package/dist/collection/components/select-popover/select-popover.js +59 -26
- package/dist/collection/components/select-popover/select-popover.md.css +77 -0
- 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/collection/utils/select-option-render.js +62 -0
- package/dist/docs.json +135 -1
- package/dist/esm/ion-action-sheet.entry.js +23 -8
- package/dist/esm/ion-alert.entry.js +42 -24
- 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 +2 -2
- package/dist/esm/ion-range.entry.js +1 -1
- package/dist/esm/ion-select-modal.entry.js +59 -26
- package/dist/esm/ion-select_3.entry.js +191 -48
- 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/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/select-option-render-BQUT9Aqa.js +65 -0
- package/dist/html.html-data.json +4 -0
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-003b40fc.entry.js +4 -0
- package/dist/ionic/{p-3bf01c2c.entry.js → p-26595044.entry.js} +1 -1
- package/dist/ionic/p-27edb91a.entry.js +4 -0
- package/dist/ionic/p-35aa95dc.entry.js +4 -0
- package/dist/ionic/{p-e9d6ce67.entry.js → p-37f895a8.entry.js} +1 -1
- package/dist/ionic/p-38897781.entry.js +4 -0
- package/dist/ionic/p-575061c0.entry.js +4 -0
- package/dist/ionic/{p-2bf931ae.entry.js → p-69033ad6.entry.js} +1 -1
- package/dist/ionic/{p-cdfbe4cc.entry.js → p-71f28573.entry.js} +1 -1
- package/dist/ionic/{p-9b9b1450.entry.js → p-96ec9a10.entry.js} +1 -1
- package/dist/ionic/{p-49799a34.entry.js → p-9e71982e.entry.js} +1 -1
- package/dist/ionic/p-Dr3N4o63.js +4 -0
- package/dist/ionic/{p-bc5713f7.entry.js → p-a1c8ba8c.entry.js} +1 -1
- package/dist/ionic/{p-91e242e4.entry.js → p-a94016be.entry.js} +1 -1
- package/dist/ionic/{p-6c8c37c2.entry.js → p-aa8c1e64.entry.js} +1 -1
- package/dist/ionic/p-c3335fe0.entry.js +4 -0
- package/dist/ionic/{p-2193e875.entry.js → p-d2fe6791.entry.js} +1 -1
- package/dist/types/components/select/select-interface.d.ts +21 -0
- package/dist/types/components/select/select.d.ts +7 -0
- package/dist/types/components/select-option/select-option.d.ts +4 -0
- package/dist/types/components.d.ts +9 -0
- package/dist/types/utils/select-option-render.d.ts +26 -0
- package/hydrate/index.js +396 -132
- package/hydrate/index.mjs +396 -132
- package/package.json +1 -1
- package/components/p-BGHaEUgp.js +0 -4
- package/components/p-BR9Yxas9.js +0 -4
- package/components/p-Ch9P0ikq.js +0 -4
- package/components/p-iwGbwewM.js +0 -4
- package/dist/ionic/p-227744b8.entry.js +0 -4
- package/dist/ionic/p-4b0f5ffd.entry.js +0 -4
- package/dist/ionic/p-64341e32.entry.js +0 -4
- package/dist/ionic/p-6be2b2d3.entry.js +0 -4
- package/dist/ionic/p-9acd3fd3.entry.js +0 -4
- package/dist/ionic/p-a283aa4d.entry.js +0 -4
|
@@ -1,3 +1,58 @@
|
|
|
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
|
+
*/
|
|
1
56
|
/**
|
|
2
57
|
* Convert a pixels given value into rem
|
|
3
58
|
*
|
|
@@ -294,6 +349,34 @@ textarea.alert-input {
|
|
|
294
349
|
resize: none;
|
|
295
350
|
}
|
|
296
351
|
|
|
352
|
+
.alert-radio-label,
|
|
353
|
+
.alert-checkbox-label {
|
|
354
|
+
display: flex;
|
|
355
|
+
align-items: center;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.select-option-content {
|
|
359
|
+
flex: 1;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.select-option-description {
|
|
363
|
+
display: block;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.alert-radio-label,
|
|
367
|
+
.alert-checkbox-label {
|
|
368
|
+
gap: 12px;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.select-option-description {
|
|
372
|
+
padding-left: 0;
|
|
373
|
+
padding-right: 0;
|
|
374
|
+
padding-top: 5px;
|
|
375
|
+
padding-bottom: 0;
|
|
376
|
+
color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
|
|
377
|
+
font-size: 0.75rem;
|
|
378
|
+
}
|
|
379
|
+
|
|
297
380
|
/**
|
|
298
381
|
* Convert a pixels given value into rem
|
|
299
382
|
*
|
|
@@ -9,6 +9,7 @@ import { createLockController } from "../../utils/lock-controller";
|
|
|
9
9
|
import { printIonWarning } from "../../utils/logging/index";
|
|
10
10
|
import { createDelegateController, createTriggerController, BACKDROP, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
|
|
11
11
|
import { sanitizeDOMString } from "../../utils/sanitization/index";
|
|
12
|
+
import { renderOptionLabel } from "../../utils/select-option-render";
|
|
12
13
|
import { getClassMap } from "../../utils/theme";
|
|
13
14
|
import { config } from "../../global/config";
|
|
14
15
|
import { getIonMode, getIonTheme } from "../../global/ionic-global";
|
|
@@ -172,22 +173,7 @@ export class Alert {
|
|
|
172
173
|
this.inputType = inputTypes.values().next().value;
|
|
173
174
|
this.processedInputs = inputs.map((i, index) => {
|
|
174
175
|
var _a;
|
|
175
|
-
return ({
|
|
176
|
-
type: i.type || 'text',
|
|
177
|
-
name: i.name || `${index}`,
|
|
178
|
-
placeholder: i.placeholder || '',
|
|
179
|
-
value: i.value,
|
|
180
|
-
label: i.label,
|
|
181
|
-
checked: !!i.checked,
|
|
182
|
-
disabled: !!i.disabled,
|
|
183
|
-
id: i.id || `alert-input-${this.overlayIndex}-${index}`,
|
|
184
|
-
handler: i.handler,
|
|
185
|
-
min: i.min,
|
|
186
|
-
max: i.max,
|
|
187
|
-
cssClass: (_a = i.cssClass) !== null && _a !== void 0 ? _a : '',
|
|
188
|
-
attributes: i.attributes || {},
|
|
189
|
-
tabindex: i.type === 'radio' && i !== focusable ? -1 : 0,
|
|
190
|
-
});
|
|
176
|
+
return Object.assign(Object.assign({}, i), { type: i.type || 'text', name: i.name || `${index}`, placeholder: i.placeholder || '', checked: !!i.checked, disabled: !!i.disabled, id: i.id || `alert-input-${this.overlayIndex}-${index}`, cssClass: (_a = i.cssClass) !== null && _a !== void 0 ? _a : '', attributes: i.attributes || {}, tabindex: i.type === 'radio' && i !== focusable ? -1 : 0 });
|
|
191
177
|
});
|
|
192
178
|
}
|
|
193
179
|
connectedCallback() {
|
|
@@ -375,14 +361,46 @@ export class Alert {
|
|
|
375
361
|
if (inputs.length === 0) {
|
|
376
362
|
return null;
|
|
377
363
|
}
|
|
378
|
-
return (h("div", { class: "alert-checkbox-group" }, inputs.map((i) =>
|
|
364
|
+
return (h("div", { class: "alert-checkbox-group" }, inputs.map((i) => {
|
|
365
|
+
/**
|
|
366
|
+
* Cast to `SelectAlertInput` to access rich content
|
|
367
|
+
* fields (`startContent`, `endContent`, `description`)
|
|
368
|
+
* that are passed through from `ion-select` but not
|
|
369
|
+
* part of the public `AlertInput` interface.
|
|
370
|
+
*/
|
|
371
|
+
const richInput = i;
|
|
372
|
+
const optionLabelOptions = {
|
|
373
|
+
id: richInput.id,
|
|
374
|
+
label: richInput.label,
|
|
375
|
+
startContent: richInput.startContent,
|
|
376
|
+
endContent: richInput.endContent,
|
|
377
|
+
description: richInput.description,
|
|
378
|
+
};
|
|
379
|
+
return (h("button", { type: "button", onClick: () => this.cbClick(i), "aria-checked": `${i.checked}`, id: i.id, disabled: i.disabled, tabIndex: i.tabindex, role: "checkbox", class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-tappable': true, 'alert-checkbox': true, 'alert-checkbox-button': true, 'ion-focusable': true, 'alert-checkbox-button-disabled': i.disabled || false }) }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-checkbox-icon" }, h("div", { class: "alert-checkbox-inner" })), renderOptionLabel(optionLabelOptions, 'alert-checkbox-label')), theme === 'md' && h("ion-ripple-effect", null)));
|
|
380
|
+
})));
|
|
379
381
|
}
|
|
380
382
|
renderRadio() {
|
|
381
383
|
const inputs = this.processedInputs;
|
|
382
384
|
if (inputs.length === 0) {
|
|
383
385
|
return null;
|
|
384
386
|
}
|
|
385
|
-
return (h("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) =>
|
|
387
|
+
return (h("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) => {
|
|
388
|
+
/**
|
|
389
|
+
* Cast to `SelectAlertInput` to access rich content
|
|
390
|
+
* fields (`startContent`, `endContent`, `description`)
|
|
391
|
+
* that are passed through from `ion-select` but not
|
|
392
|
+
* part of the public `AlertInput` interface.
|
|
393
|
+
*/
|
|
394
|
+
const richInput = i;
|
|
395
|
+
const optionLabelOptions = {
|
|
396
|
+
id: richInput.id,
|
|
397
|
+
label: richInput.label,
|
|
398
|
+
startContent: richInput.startContent,
|
|
399
|
+
endContent: richInput.endContent,
|
|
400
|
+
description: richInput.description,
|
|
401
|
+
};
|
|
402
|
+
return (h("button", { type: "button", onClick: () => this.rbClick(i), "aria-checked": `${i.checked}`, disabled: i.disabled, id: i.id, tabIndex: i.tabindex, class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-radio-button': true, 'alert-tappable': true, 'alert-radio': true, 'ion-focusable': true, 'alert-radio-button-disabled': i.disabled || false }), role: "radio" }, h("div", { class: "alert-button-inner" }, h("div", { class: "alert-radio-icon" }, h("div", { class: "alert-radio-inner" })), renderOptionLabel(optionLabelOptions, 'alert-radio-label'))));
|
|
403
|
+
})));
|
|
386
404
|
}
|
|
387
405
|
renderInput() {
|
|
388
406
|
const inputs = this.processedInputs;
|
|
@@ -441,9 +459,9 @@ export class Alert {
|
|
|
441
459
|
* If neither are defined, do not set aria-labelledby.
|
|
442
460
|
*/
|
|
443
461
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
444
|
-
return (h(Host, { key: '
|
|
462
|
+
return (h(Host, { key: '643939c4af9c1a68b60eea5724f8662f13bb3f72', tabindex: "-1", style: {
|
|
445
463
|
zIndex: `${20000 + overlayIndex}`,
|
|
446
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [theme]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '
|
|
464
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [theme]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '4780caec3fe71a8d5f2112b8b8726d5a7de91192', tappable: this.backdropDismiss }), h("div", { key: 'cc401fcade02bfc557820d31554d5e054da79b28', tabindex: "0", "aria-hidden": "true" }), h("div", Object.assign({ key: '234caa09b6e0d224bdce0de0659dcdbd668cad91', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), h("div", { key: 'c8c72cd019eace73b622f2510e533c281267c48a', class: "alert-head" }, header && (h("h2", { key: '0d95f68560dbb67721476d184df0d8654a07959c', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '6444463a2aeef3f076b0bfdfeba4387ced177826', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: 'a92d7b54567152b57a8ccab6840e851c8fe5a47b', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: '3ba2cdf15219f03123f6dd884eb7a4da38549c08', tabindex: "0", "aria-hidden": "true" })));
|
|
447
465
|
}
|
|
448
466
|
static get is() { return "ion-alert"; }
|
|
449
467
|
static get encapsulation() { return "scoped"; }
|
|
@@ -451,14 +469,14 @@ export class Alert {
|
|
|
451
469
|
return {
|
|
452
470
|
"ios": ["alert.ios.scss"],
|
|
453
471
|
"md": ["alert.md.scss"],
|
|
454
|
-
"ionic": ["alert.
|
|
472
|
+
"ionic": ["alert.ionic.scss"]
|
|
455
473
|
};
|
|
456
474
|
}
|
|
457
475
|
static get styleUrls() {
|
|
458
476
|
return {
|
|
459
477
|
"ios": ["alert.ios.css"],
|
|
460
478
|
"md": ["alert.md.css"],
|
|
461
|
-
"ionic": ["alert.
|
|
479
|
+
"ionic": ["alert.ionic.css"]
|
|
462
480
|
};
|
|
463
481
|
}
|
|
464
482
|
static get properties() {
|
|
@@ -1,3 +1,58 @@
|
|
|
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
|
+
*/
|
|
1
56
|
/**
|
|
2
57
|
* Convert a pixels given value into rem
|
|
3
58
|
*
|
|
@@ -294,6 +349,34 @@ textarea.alert-input {
|
|
|
294
349
|
resize: none;
|
|
295
350
|
}
|
|
296
351
|
|
|
352
|
+
.alert-radio-label,
|
|
353
|
+
.alert-checkbox-label {
|
|
354
|
+
display: flex;
|
|
355
|
+
align-items: center;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.select-option-content {
|
|
359
|
+
flex: 1;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.select-option-description {
|
|
363
|
+
display: block;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.alert-radio-label,
|
|
367
|
+
.alert-checkbox-label {
|
|
368
|
+
gap: 12px;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.select-option-description {
|
|
372
|
+
padding-left: 0;
|
|
373
|
+
padding-right: 0;
|
|
374
|
+
padding-top: 5px;
|
|
375
|
+
padding-bottom: 0;
|
|
376
|
+
color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
|
|
377
|
+
font-size: 0.75rem;
|
|
378
|
+
}
|
|
379
|
+
|
|
297
380
|
/**
|
|
298
381
|
* Convert a pixels given value into rem
|
|
299
382
|
*
|
|
@@ -364,10 +364,6 @@
|
|
|
364
364
|
z-index: var(--token-z-index-100, 100);
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
-
:host(.ticks) {
|
|
368
|
-
--bar-border-radius: globals.$ion-border-radius-0;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
367
|
:host(.range-item-start-adjustment) {
|
|
372
368
|
-webkit-padding-start: var(--token-space-600, var(--token-scale-600, 24px));
|
|
373
369
|
padding-inline-start: var(--token-space-600, var(--token-scale-600, 24px));
|
|
@@ -440,6 +436,7 @@
|
|
|
440
436
|
background: var(--bar-background-active);
|
|
441
437
|
}
|
|
442
438
|
.range-bar.range-bar-active.has-ticks {
|
|
439
|
+
border-radius: 0;
|
|
443
440
|
-webkit-margin-start: calc(-1 * var(--token-scale-100, 4px) * 0.5);
|
|
444
441
|
margin-inline-start: calc(-1 * var(--token-scale-100, 4px) * 0.5);
|
|
445
442
|
-webkit-margin-end: calc(-1 * var(--token-scale-100, 4px) * 0.5);
|
|
@@ -449,12 +446,12 @@
|
|
|
449
446
|
.range-tick {
|
|
450
447
|
-webkit-margin-start: calc(var(--token-scale-100, 4px) * -0.5);
|
|
451
448
|
margin-inline-start: calc(var(--token-scale-100, 4px) * -0.5);
|
|
452
|
-
border-radius: var(--token-border-radius-
|
|
449
|
+
border-radius: var(--token-border-radius-0, var(--token-scale-0, 0px));
|
|
453
450
|
position: absolute;
|
|
454
|
-
top: calc(var(--height) * 0.5 - var(--token-scale-
|
|
455
|
-
width: var(--token-scale-
|
|
456
|
-
height: var(--token-scale-
|
|
457
|
-
background: var(--
|
|
451
|
+
top: calc(var(--height) * 0.5 - var(--token-scale-300, 12px) * 0.5);
|
|
452
|
+
width: var(--token-scale-100, 4px);
|
|
453
|
+
height: var(--token-scale-300, 12px);
|
|
454
|
+
background: var(--token-primitives-neutral-100, #f3f3f3);
|
|
458
455
|
pointer-events: none;
|
|
459
456
|
}
|
|
460
457
|
|
|
@@ -81,6 +81,13 @@
|
|
|
81
81
|
* @prop --border-width: Width of the select border
|
|
82
82
|
*
|
|
83
83
|
* @prop --ripple-color: The color of the ripple effect on MD mode.
|
|
84
|
+
*
|
|
85
|
+
* @prop --select-text-media-width: The width of media (icons/images) in the select text.
|
|
86
|
+
* @prop --select-text-media-height: The height of media (icons/images) in the select text.
|
|
87
|
+
* @prop --select-text-media-border-width: The border width of media (icons/images) in the select text.
|
|
88
|
+
* @prop --select-text-media-border-color: The border color of media (icons/images) in the select text.
|
|
89
|
+
* @prop --select-text-media-border-radius: The border radius of media (icons/images) in the select text.
|
|
90
|
+
* @prop --select-text-media-border-style: The border style of media (icons/images) in the select text.
|
|
84
91
|
*/
|
|
85
92
|
--padding-top: 0px;
|
|
86
93
|
--padding-end: 0px;
|
|
@@ -92,6 +99,8 @@
|
|
|
92
99
|
--highlight-color-focused: ion-color(primary, base);
|
|
93
100
|
--highlight-color-valid: ion-color(success, base);
|
|
94
101
|
--highlight-color-invalid: ion-color(danger, base);
|
|
102
|
+
--select-text-media-height: 1.5em;
|
|
103
|
+
--select-text-media-width: 1.5em;
|
|
95
104
|
/**
|
|
96
105
|
* This is a private API that is used to switch
|
|
97
106
|
* out the highlight color based on the state
|
|
@@ -196,6 +205,19 @@ button {
|
|
|
196
205
|
overflow: hidden;
|
|
197
206
|
}
|
|
198
207
|
|
|
208
|
+
.select-text img,
|
|
209
|
+
.select-text ion-img,
|
|
210
|
+
.select-text ion-icon,
|
|
211
|
+
.select-text ion-thumbnail,
|
|
212
|
+
.select-text ion-avatar {
|
|
213
|
+
border-radius: var(--select-text-media-border-radius);
|
|
214
|
+
width: var(--select-text-media-width);
|
|
215
|
+
height: var(--select-text-media-height);
|
|
216
|
+
border-width: var(--select-text-media-border-width);
|
|
217
|
+
border-style: var(--select-text-media-border-style);
|
|
218
|
+
border-color: var(--select-text-media-border-color);
|
|
219
|
+
}
|
|
220
|
+
|
|
199
221
|
.select-wrapper {
|
|
200
222
|
display: flex;
|
|
201
223
|
position: relative;
|
|
@@ -567,6 +589,15 @@ button {
|
|
|
567
589
|
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242424));
|
|
568
590
|
}
|
|
569
591
|
|
|
592
|
+
/**
|
|
593
|
+
* If the select text contains rich content, we want to add some
|
|
594
|
+
* spacing between the items without changing the display to prevent
|
|
595
|
+
* losing the ellipsis behavior.
|
|
596
|
+
*/
|
|
597
|
+
.select-text > * {
|
|
598
|
+
margin-inline-start: var(--token-space-200, var(--token-scale-200, 8px));
|
|
599
|
+
}
|
|
600
|
+
|
|
570
601
|
.label-text-wrapper {
|
|
571
602
|
font-size: var(--token-font-size-300, 0.75rem);
|
|
572
603
|
font-weight: var(--token-font-weight-medium, 500);
|
|
@@ -103,6 +103,13 @@
|
|
|
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.
|
|
106
113
|
*/
|
|
107
114
|
--padding-top: 0px;
|
|
108
115
|
--padding-end: 0px;
|
|
@@ -114,6 +121,8 @@
|
|
|
114
121
|
--highlight-color-focused: var(--ion-color-primary, #0054e9);
|
|
115
122
|
--highlight-color-valid: var(--ion-color-success, #2dd55b);
|
|
116
123
|
--highlight-color-invalid: var(--ion-color-danger, #c5000f);
|
|
124
|
+
--select-text-media-height: 1.5em;
|
|
125
|
+
--select-text-media-width: 1.5em;
|
|
117
126
|
/**
|
|
118
127
|
* This is a private API that is used to switch
|
|
119
128
|
* out the highlight color based on the state
|
|
@@ -218,6 +227,19 @@ button {
|
|
|
218
227
|
overflow: hidden;
|
|
219
228
|
}
|
|
220
229
|
|
|
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
|
+
|
|
221
243
|
.select-wrapper {
|
|
222
244
|
display: flex;
|
|
223
245
|
position: relative;
|
|
@@ -619,6 +641,15 @@ button {
|
|
|
619
641
|
min-width: 16px;
|
|
620
642
|
}
|
|
621
643
|
|
|
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
|
+
|
|
622
653
|
.label-text-wrapper {
|
|
623
654
|
/**
|
|
624
655
|
* Label text should not extend
|