@ionic/core 9.0.3-dev.11788456135.1ab1d6cd → 9.0.3-dev.11790016799.1e269b7a
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-accordion.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-back-button.js +1 -1
- package/components/ion-breadcrumb.js +1 -1
- package/components/ion-checkbox.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-fab-button.js +1 -1
- package/components/ion-input-password-toggle.js +1 -1
- package/components/ion-input.js +1 -1
- package/components/ion-item.js +1 -1
- package/components/ion-menu-button.js +1 -1
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-reorder.js +1 -1
- package/components/ion-searchbar.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-textarea.js +1 -1
- package/components/ion-toggle.js +1 -1
- package/components/{p-Cc3oC60a.js → p-0rXxxCTt.js} +1 -1
- package/components/p-B9ibhQu1.js +4 -0
- package/components/p-BzxHcuQH.js +4 -0
- package/components/p-C6wm_AQQ.js +4 -0
- package/components/p-CaxVJjmc.js +4 -0
- package/components/{p-Cm78Kk79.js → p-D2X-Hime.js} +1 -1
- package/css/ionic/bundle.ionic.css.map +1 -1
- package/css/ionic/core.ionic.css.map +1 -1
- package/css/ionic/global.bundle.ionic.css.map +1 -1
- package/css/ionic/ionic-swiper.ionic.css.map +1 -1
- package/css/ionic/link.ionic.css.map +1 -1
- package/css/ionic/typography.ionic.css.map +1 -1
- package/dist/cjs/ion-accordion_2.cjs.entry.js +9 -14
- package/dist/cjs/ion-alert.cjs.entry.js +4 -4
- package/dist/cjs/ion-back-button.cjs.entry.js +11 -13
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +16 -29
- package/dist/cjs/ion-checkbox.cjs.entry.js +23 -15
- package/dist/cjs/ion-datetime.cjs.entry.js +14 -50
- package/dist/cjs/ion-fab_3.cjs.entry.js +9 -14
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +17 -29
- package/dist/cjs/ion-input.cjs.entry.js +12 -28
- package/dist/cjs/ion-item_8.cjs.entry.js +10 -15
- package/dist/cjs/ion-menu_3.cjs.entry.js +9 -12
- package/dist/cjs/ion-refresher_2.cjs.entry.js +10 -5
- package/dist/cjs/ion-reorder_2.cjs.entry.js +5 -13
- package/dist/cjs/ion-searchbar.cjs.entry.js +8 -37
- package/dist/cjs/ion-select-modal.cjs.entry.js +11 -10
- package/dist/cjs/ion-select_3.cjs.entry.js +13 -37
- package/dist/cjs/ion-textarea.cjs.entry.js +13 -21
- package/dist/cjs/ion-toggle.cjs.entry.js +12 -28
- package/dist/collection/components/accordion/accordion.js +9 -14
- package/dist/collection/components/alert/alert.ionic.css +7 -9
- package/dist/collection/components/alert/alert.js +3 -3
- package/dist/collection/components/back-button/back-button.js +11 -13
- package/dist/collection/components/breadcrumb/breadcrumb.js +16 -28
- package/dist/collection/components/checkbox/checkbox.ionic.css +35 -42
- package/dist/collection/components/checkbox/checkbox.ios.css +33 -29
- package/dist/collection/components/checkbox/checkbox.js +23 -13
- package/dist/collection/components/checkbox/checkbox.md.css +33 -29
- package/dist/collection/components/datetime/datetime.ios.css +5 -10
- package/dist/collection/components/datetime/datetime.js +12 -48
- package/dist/collection/components/datetime/datetime.md.css +5 -10
- package/dist/collection/components/fab-button/fab-button.js +9 -14
- package/dist/collection/components/input/input.ionic.css +102 -79
- package/dist/collection/components/input/input.js +11 -27
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +18 -28
- package/dist/collection/components/item/item.js +10 -15
- package/dist/collection/components/menu-button/menu-button.js +9 -12
- package/dist/collection/components/refresher-content/refresher-content.js +10 -4
- package/dist/collection/components/reorder/reorder.js +5 -13
- package/dist/collection/components/searchbar/searchbar.js +8 -35
- package/dist/collection/components/select/select.ionic.css +187 -76
- package/dist/collection/components/select/select.js +14 -39
- package/dist/collection/components/select-modal/select-modal.js +12 -10
- package/dist/collection/components/textarea/textarea.ionic.css +133 -85
- package/dist/collection/components/textarea/textarea.ios.css +0 -4
- package/dist/collection/components/textarea/textarea.js +13 -18
- package/dist/collection/components/textarea/textarea.md.css +0 -4
- package/dist/collection/components/toggle/toggle.js +12 -26
- package/dist/collection/utils/test/playwright/field-geometry.js +34 -0
- package/dist/collection/utils/test/playwright/index.js +1 -0
- package/dist/docs.json +60 -25
- package/dist/esm/{index-BqQ15K9a.js → index-BkJpfpXI.js} +1 -1
- package/dist/esm/ion-accordion_2.entry.js +10 -15
- package/dist/esm/ion-alert.entry.js +4 -4
- package/dist/esm/ion-back-button.entry.js +12 -14
- package/dist/esm/ion-breadcrumb_2.entry.js +17 -30
- package/dist/esm/ion-checkbox.entry.js +24 -16
- package/dist/esm/ion-datetime.entry.js +15 -51
- package/dist/esm/ion-fab_3.entry.js +10 -15
- package/dist/esm/ion-input-password-toggle.entry.js +19 -31
- package/dist/esm/ion-input.entry.js +13 -29
- package/dist/esm/ion-item_8.entry.js +11 -16
- package/dist/esm/ion-menu_3.entry.js +10 -13
- package/dist/esm/ion-refresher_2.entry.js +11 -6
- package/dist/esm/ion-reorder_2.entry.js +6 -14
- package/dist/esm/ion-searchbar.entry.js +9 -38
- package/dist/esm/ion-select-modal.entry.js +13 -12
- package/dist/esm/ion-select_3.entry.js +14 -38
- package/dist/esm/ion-textarea.entry.js +13 -21
- package/dist/esm/ion-toggle.entry.js +13 -29
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-016f2ee0.entry.js +4 -0
- package/dist/ionic/p-07b95001.entry.js +4 -0
- package/dist/ionic/p-14dfe86e.entry.js +4 -0
- package/dist/ionic/p-167af5d6.entry.js +4 -0
- package/dist/ionic/p-18285aab.entry.js +4 -0
- package/dist/ionic/{p-2e3acd77.entry.js → p-1e0f0eb9.entry.js} +1 -1
- package/dist/ionic/p-368935f5.entry.js +4 -0
- package/dist/ionic/p-38da0794.entry.js +4 -0
- package/dist/ionic/p-80f71456.entry.js +4 -0
- package/dist/ionic/p-83aa4043.entry.js +4 -0
- package/dist/ionic/p-944ce631.entry.js +4 -0
- package/dist/ionic/{p-BqQ15K9a.js → p-BkJpfpXI.js} +1 -1
- package/dist/ionic/p-aecef1d7.entry.js +4 -0
- package/dist/ionic/p-bb83b861.entry.js +4 -0
- package/dist/ionic/p-c1c90068.entry.js +4 -0
- package/dist/ionic/p-ccc7487b.entry.js +4 -0
- package/dist/ionic/p-cfd5dc50.entry.js +4 -0
- package/dist/ionic/p-d5c9bf12.entry.js +4 -0
- package/dist/ionic/p-f252ab8a.entry.js +4 -0
- package/dist/types/components/accordion/accordion.d.ts +7 -1
- package/dist/types/components/back-button/back-button.d.ts +8 -2
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +12 -2
- package/dist/types/components/checkbox/checkbox.d.ts +12 -1
- package/dist/types/components/datetime/datetime.d.ts +4 -4
- package/dist/types/components/fab-button/fab-button.d.ts +7 -1
- package/dist/types/components/input/input.d.ts +7 -10
- package/dist/types/components/input-password-toggle/input-password-toggle.d.ts +14 -2
- package/dist/types/components/item/item.d.ts +7 -1
- package/dist/types/components/menu-button/menu-button.d.ts +6 -1
- package/dist/types/components/refresher-content/refresher-content.d.ts +6 -0
- package/dist/types/components/reorder/reorder.d.ts +1 -1
- package/dist/types/components/select/select.d.ts +7 -12
- package/dist/types/components/select-modal/select-modal.d.ts +6 -1
- package/dist/types/components/textarea/textarea.d.ts +8 -8
- package/dist/types/components/toggle/toggle.d.ts +5 -2
- package/dist/types/utils/config.d.ts +22 -2
- package/dist/types/utils/test/playwright/field-geometry.d.ts +13 -0
- package/dist/types/utils/test/playwright/index.d.ts +1 -0
- package/hydrate/index.js +213 -375
- package/hydrate/index.mjs +213 -375
- package/package.json +1 -2
- package/components/p-B1AK6oR-.js +0 -4
- package/components/p-BDqjX7Z_.js +0 -4
- package/components/p-BYSs-jZz.js +0 -4
- package/components/p-CPdOdJa7.js +0 -4
- package/components/p-D1t981Ih.js +0 -4
- package/components/p-Dhi5xtNS.js +0 -4
- package/components/p-DzaPYdjZ.js +0 -4
- package/components/p-e73ca-aN.js +0 -4
- package/components/p-fIOYmaqA.js +0 -4
- package/dist/cjs/caret-down-vtVgfXIs.js +0 -8
- package/dist/cjs/caret-left-CxZXLRv5.js +0 -8
- package/dist/cjs/caret-right-CRCgv98E.js +0 -8
- package/dist/cjs/list-a-7GSA6K.js +0 -8
- package/dist/cjs/x-BTF99yFH.js +0 -8
- package/dist/esm/caret-down-D1t981Ih.js +0 -6
- package/dist/esm/caret-left-fIOYmaqA.js +0 -6
- package/dist/esm/caret-right-BYSs-jZz.js +0 -6
- package/dist/esm/list-Dhi5xtNS.js +0 -6
- package/dist/esm/x-BDqjX7Z_.js +0 -6
- package/dist/ionic/p-04d96dad.entry.js +0 -4
- package/dist/ionic/p-0a924e6a.entry.js +0 -4
- package/dist/ionic/p-2da21af7.entry.js +0 -4
- package/dist/ionic/p-2fc1521f.entry.js +0 -4
- package/dist/ionic/p-73309d35.entry.js +0 -4
- package/dist/ionic/p-74ab5f49.entry.js +0 -4
- package/dist/ionic/p-83d13d56.entry.js +0 -4
- package/dist/ionic/p-8dcd18cf.entry.js +0 -4
- package/dist/ionic/p-9ca59419.entry.js +0 -4
- package/dist/ionic/p-BDqjX7Z_.js +0 -4
- package/dist/ionic/p-BYSs-jZz.js +0 -4
- package/dist/ionic/p-D1t981Ih.js +0 -4
- package/dist/ionic/p-Dhi5xtNS.js +0 -4
- package/dist/ionic/p-b10dc124.entry.js +0 -4
- package/dist/ionic/p-b7ce4a50.entry.js +0 -4
- package/dist/ionic/p-c7035f3f.entry.js +0 -4
- package/dist/ionic/p-c91fc9d4.entry.js +0 -4
- package/dist/ionic/p-cd4791d5.entry.js +0 -4
- package/dist/ionic/p-e9480e7f.entry.js +0 -4
- package/dist/ionic/p-e9fdff49.entry.js +0 -4
- package/dist/ionic/p-f82b13a6.entry.js +0 -4
- package/dist/ionic/p-fIOYmaqA.js +0 -4
|
@@ -146,6 +146,7 @@
|
|
|
146
146
|
/**
|
|
147
147
|
* @prop --size: Size of the checkbox icon
|
|
148
148
|
*
|
|
149
|
+
* @prop --checkbox-background: Background of the checkbox icon
|
|
149
150
|
* @prop --checkbox-background-checked: Background of the checkbox icon when checked
|
|
150
151
|
*
|
|
151
152
|
* @prop --border-color: Border color of the checkbox icon
|
|
@@ -157,7 +158,7 @@
|
|
|
157
158
|
* @prop --transition: Transition of the checkbox icon
|
|
158
159
|
*
|
|
159
160
|
* @prop --checkmark-color: Color of the checkbox checkmark when checked
|
|
160
|
-
* @prop --checkmark-width: Stroke width of the checkbox checkmark
|
|
161
|
+
* @prop --checkmark-width: Stroke width of the checkbox checkmark. Only applies when no icon is set in the config.
|
|
161
162
|
*/
|
|
162
163
|
display: inline-block;
|
|
163
164
|
position: relative;
|
|
@@ -220,16 +221,39 @@ input {
|
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
.native-wrapper {
|
|
224
|
+
border-radius: var(--border-radius);
|
|
223
225
|
display: flex;
|
|
226
|
+
position: relative;
|
|
227
|
+
flex-shrink: 0;
|
|
224
228
|
align-items: center;
|
|
229
|
+
width: var(--size);
|
|
230
|
+
height: var(--size);
|
|
231
|
+
transition: var(--transition);
|
|
232
|
+
border-width: var(--border-width);
|
|
233
|
+
border-style: var(--border-style);
|
|
234
|
+
border-color: var(--border-color);
|
|
235
|
+
background: var(--checkbox-background);
|
|
236
|
+
box-sizing: border-box;
|
|
225
237
|
}
|
|
226
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Apply the color to the ion-icon container so that the default
|
|
241
|
+
* checkmark icon and any configured icon apply color consistently.
|
|
242
|
+
*/
|
|
227
243
|
.checkbox-icon {
|
|
228
|
-
|
|
244
|
+
color: var(--checkmark-color);
|
|
245
|
+
opacity: 0;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.checkbox-icon svg {
|
|
249
|
+
width: 100%;
|
|
250
|
+
height: 100%;
|
|
229
251
|
}
|
|
230
252
|
|
|
231
253
|
.checkbox-icon path {
|
|
232
|
-
|
|
254
|
+
fill: none;
|
|
255
|
+
stroke: currentColor;
|
|
256
|
+
stroke-width: var(--checkmark-width);
|
|
233
257
|
}
|
|
234
258
|
|
|
235
259
|
.checkbox-bottom {
|
|
@@ -349,14 +373,14 @@ input {
|
|
|
349
373
|
display: block;
|
|
350
374
|
}
|
|
351
375
|
|
|
352
|
-
:host(.checkbox-checked) .
|
|
353
|
-
:host(.checkbox-indeterminate) .
|
|
376
|
+
:host(.checkbox-checked) .native-wrapper,
|
|
377
|
+
:host(.checkbox-indeterminate) .native-wrapper {
|
|
354
378
|
border-color: var(--border-color-checked);
|
|
355
379
|
background: var(--checkbox-background-checked);
|
|
356
380
|
}
|
|
357
381
|
|
|
358
|
-
:host(.checkbox-checked) .checkbox-icon
|
|
359
|
-
:host(.checkbox-indeterminate) .checkbox-icon
|
|
382
|
+
:host(.checkbox-checked) .checkbox-icon,
|
|
383
|
+
:host(.checkbox-indeterminate) .checkbox-icon {
|
|
360
384
|
opacity: 1;
|
|
361
385
|
}
|
|
362
386
|
|
|
@@ -365,9 +389,6 @@ input {
|
|
|
365
389
|
}
|
|
366
390
|
|
|
367
391
|
:host {
|
|
368
|
-
/**
|
|
369
|
-
* @prop --checkbox-background: Background of the checkbox icon
|
|
370
|
-
*/
|
|
371
392
|
--checkbox-background-checked: var(--ion-color-primary, #0054e9);
|
|
372
393
|
--border-color-checked: var(--ion-color-primary, #0054e9);
|
|
373
394
|
--checkmark-color: var(--ion-color-primary-contrast, #fff);
|
|
@@ -381,10 +402,6 @@ input {
|
|
|
381
402
|
--checkmark-color: var(--ion-color-contrast);
|
|
382
403
|
}
|
|
383
404
|
|
|
384
|
-
.native-wrapper {
|
|
385
|
-
position: relative;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
405
|
:host(.ion-focused) .native-wrapper::after {
|
|
389
406
|
border-radius: 50%;
|
|
390
407
|
display: block;
|
|
@@ -415,21 +432,8 @@ input {
|
|
|
415
432
|
}
|
|
416
433
|
|
|
417
434
|
.checkbox-icon {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
height: var(--size);
|
|
421
|
-
transition: var(--transition);
|
|
422
|
-
border-width: var(--border-width);
|
|
423
|
-
border-style: var(--border-style);
|
|
424
|
-
border-color: var(--border-color);
|
|
425
|
-
background: var(--checkbox-background);
|
|
426
|
-
box-sizing: border-box;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.checkbox-icon path {
|
|
430
|
-
fill: none;
|
|
431
|
-
stroke: var(--checkmark-color);
|
|
432
|
-
stroke-width: var(--checkmark-width);
|
|
435
|
+
width: 100%;
|
|
436
|
+
height: 100%;
|
|
433
437
|
}
|
|
434
438
|
|
|
435
439
|
.checkbox-bottom {
|
|
@@ -5,6 +5,7 @@ import { Build, Host, forceUpdate, h } from "@stencil/core";
|
|
|
5
5
|
import { checkInvalidState, createItemMultipleInputsObserver } from "../../utils/forms/index";
|
|
6
6
|
import { inheritAriaAttributes, renderHiddenInput } from "../../utils/helpers";
|
|
7
7
|
import { createColorClasses, hostContext } from "../../utils/theme";
|
|
8
|
+
import { config } from "../../global/config";
|
|
8
9
|
import { getIonTheme } from "../../global/ionic-global";
|
|
9
10
|
/**
|
|
10
11
|
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
|
@@ -14,7 +15,8 @@ import { getIonTheme } from "../../global/ionic-global";
|
|
|
14
15
|
*
|
|
15
16
|
* @part container - The container for the checkbox mark.
|
|
16
17
|
* @part label - The label text describing the checkbox.
|
|
17
|
-
* @part
|
|
18
|
+
* @part icon - The icon that displays the checked or indeterminate mark.
|
|
19
|
+
* @part mark - The mark used to indicate the checked or indeterminate state. Only applies when no icon is set in the config.
|
|
18
20
|
* @part supporting-text - Supporting text displayed beneath the checkbox label.
|
|
19
21
|
* @part helper-text - Supporting text displayed beneath the checkbox label when the checkbox is valid.
|
|
20
22
|
* @part error-text - Supporting text displayed beneath the checkbox label when the checkbox is invalid and touched.
|
|
@@ -189,6 +191,20 @@ export class Checkbox {
|
|
|
189
191
|
async setFocus() {
|
|
190
192
|
this.el.focus();
|
|
191
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Get the icon to use for the checked icon.
|
|
196
|
+
* Use the icon set in the config.
|
|
197
|
+
*/
|
|
198
|
+
get checkboxCheckedIcon() {
|
|
199
|
+
return config.get('checkboxCheckedIcon');
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get the icon to use for the indeterminate icon.
|
|
203
|
+
* Use the icon set in the config.
|
|
204
|
+
*/
|
|
205
|
+
get checkboxIndeterminateIcon() {
|
|
206
|
+
return config.get('checkboxIndeterminateIcon');
|
|
207
|
+
}
|
|
192
208
|
getHintTextId() {
|
|
193
209
|
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
194
210
|
if (isInvalid && errorText) {
|
|
@@ -216,15 +232,16 @@ export class Checkbox {
|
|
|
216
232
|
return (h("div", { class: "checkbox-bottom" }, h("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null), h("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text", role: "alert" }, isInvalid ? errorText : null)));
|
|
217
233
|
}
|
|
218
234
|
render() {
|
|
219
|
-
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, required, shape, size, } = this;
|
|
235
|
+
const { color, checkboxCheckedIcon, checkboxIndeterminateIcon, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, required, shape, size, } = this;
|
|
220
236
|
const theme = getIonTheme(this);
|
|
237
|
+
const markIcon = indeterminate ? checkboxIndeterminateIcon : checkboxCheckedIcon;
|
|
221
238
|
const path = getSVGPath(theme, indeterminate);
|
|
222
239
|
const inItem = hostContext('ion-item', el);
|
|
223
240
|
const inMultipleInputsItem = hostContext('ion-item.item-multiple-inputs', el);
|
|
224
241
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
225
242
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
226
243
|
// support in Safari for accessibility.
|
|
227
|
-
return (h(Host, { key: '
|
|
244
|
+
return (h(Host, { key: 'f7e1aa9fd8d2050334c976f0c9cc9ed6c798ae5f', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-labelledby": this.hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
|
|
228
245
|
[theme]: true,
|
|
229
246
|
'in-item': inItem,
|
|
230
247
|
'checkbox-checked': checked,
|
|
@@ -239,23 +256,16 @@ export class Checkbox {
|
|
|
239
256
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
240
257
|
[`checkbox-size-${size}`]: size !== undefined,
|
|
241
258
|
[`checkbox-shape-${shape}`]: true,
|
|
242
|
-
}) }, h("label", { key: '
|
|
259
|
+
}) }, h("label", { key: 'eff61c7348c1f71f67e463134e105bf4d51faa67', class: "checkbox-wrapper", htmlFor: inputId }, h("input", { key: 'd0518f83bbd5ff3d7617233b65b0bd39a4c03cfe', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required, ...inheritedAttributes }), h("div", { key: 'f518f660f5c2b9d22492a85c1fede5bb496d47e8', class: {
|
|
243
260
|
'label-text-wrapper': true,
|
|
244
261
|
'label-text-wrapper-hidden': !this.hasLabelContent,
|
|
245
|
-
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
262
|
+
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: 'abe67b013d1927716ab117909591ff9e1592a18c' }), this.renderHintText()), h("div", { key: 'b72d4125c89a2246ed68664f25a8dd633db173b9', class: "native-wrapper", part: "container" }, h("ion-icon", { key: markIcon ? 'config-icon' : 'theme-mark', class: "checkbox-icon", icon: markIcon, part: "icon", "aria-hidden": "true" }, !markIcon && h("svg", { key: 'b28bce725997e1a9bc345651c366c96c7257cbcd', viewBox: "0 0 24 24" }, path))))));
|
|
246
263
|
}
|
|
247
264
|
getSVGPath(theme, indeterminate) {
|
|
248
265
|
let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
249
|
-
if (theme === 'md') {
|
|
266
|
+
if (theme === 'md' || theme === 'ionic') {
|
|
250
267
|
path = indeterminate ? (h("path", { d: "M2 12H22", part: "mark" })) : (h("path", { d: "M1.73,12.91 8.1,19.28 22.79,4.59", part: "mark" }));
|
|
251
268
|
}
|
|
252
|
-
else if (theme === 'ionic') {
|
|
253
|
-
path = indeterminate ? (
|
|
254
|
-
// Phosphor Icon - minus bold
|
|
255
|
-
h("path", { d: "M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z" })) : (
|
|
256
|
-
// Phosphor Icon - check bold
|
|
257
|
-
h("path", { d: "M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z" }));
|
|
258
|
-
}
|
|
259
269
|
return path;
|
|
260
270
|
}
|
|
261
271
|
static get is() { return "ion-checkbox"; }
|
|
@@ -146,6 +146,7 @@
|
|
|
146
146
|
/**
|
|
147
147
|
* @prop --size: Size of the checkbox icon
|
|
148
148
|
*
|
|
149
|
+
* @prop --checkbox-background: Background of the checkbox icon
|
|
149
150
|
* @prop --checkbox-background-checked: Background of the checkbox icon when checked
|
|
150
151
|
*
|
|
151
152
|
* @prop --border-color: Border color of the checkbox icon
|
|
@@ -157,7 +158,7 @@
|
|
|
157
158
|
* @prop --transition: Transition of the checkbox icon
|
|
158
159
|
*
|
|
159
160
|
* @prop --checkmark-color: Color of the checkbox checkmark when checked
|
|
160
|
-
* @prop --checkmark-width: Stroke width of the checkbox checkmark
|
|
161
|
+
* @prop --checkmark-width: Stroke width of the checkbox checkmark. Only applies when no icon is set in the config.
|
|
161
162
|
*/
|
|
162
163
|
display: inline-block;
|
|
163
164
|
position: relative;
|
|
@@ -220,16 +221,39 @@ input {
|
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
.native-wrapper {
|
|
224
|
+
border-radius: var(--border-radius);
|
|
223
225
|
display: flex;
|
|
226
|
+
position: relative;
|
|
227
|
+
flex-shrink: 0;
|
|
224
228
|
align-items: center;
|
|
229
|
+
width: var(--size);
|
|
230
|
+
height: var(--size);
|
|
231
|
+
transition: var(--transition);
|
|
232
|
+
border-width: var(--border-width);
|
|
233
|
+
border-style: var(--border-style);
|
|
234
|
+
border-color: var(--border-color);
|
|
235
|
+
background: var(--checkbox-background);
|
|
236
|
+
box-sizing: border-box;
|
|
225
237
|
}
|
|
226
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Apply the color to the ion-icon container so that the default
|
|
241
|
+
* checkmark icon and any configured icon apply color consistently.
|
|
242
|
+
*/
|
|
227
243
|
.checkbox-icon {
|
|
228
|
-
|
|
244
|
+
color: var(--checkmark-color);
|
|
245
|
+
opacity: 0;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.checkbox-icon svg {
|
|
249
|
+
width: 100%;
|
|
250
|
+
height: 100%;
|
|
229
251
|
}
|
|
230
252
|
|
|
231
253
|
.checkbox-icon path {
|
|
232
|
-
|
|
254
|
+
fill: none;
|
|
255
|
+
stroke: currentColor;
|
|
256
|
+
stroke-width: var(--checkmark-width);
|
|
233
257
|
}
|
|
234
258
|
|
|
235
259
|
.checkbox-bottom {
|
|
@@ -349,14 +373,14 @@ input {
|
|
|
349
373
|
display: block;
|
|
350
374
|
}
|
|
351
375
|
|
|
352
|
-
:host(.checkbox-checked) .
|
|
353
|
-
:host(.checkbox-indeterminate) .
|
|
376
|
+
:host(.checkbox-checked) .native-wrapper,
|
|
377
|
+
:host(.checkbox-indeterminate) .native-wrapper {
|
|
354
378
|
border-color: var(--border-color-checked);
|
|
355
379
|
background: var(--checkbox-background-checked);
|
|
356
380
|
}
|
|
357
381
|
|
|
358
|
-
:host(.checkbox-checked) .checkbox-icon
|
|
359
|
-
:host(.checkbox-indeterminate) .checkbox-icon
|
|
382
|
+
:host(.checkbox-checked) .checkbox-icon,
|
|
383
|
+
:host(.checkbox-indeterminate) .checkbox-icon {
|
|
360
384
|
opacity: 1;
|
|
361
385
|
}
|
|
362
386
|
|
|
@@ -365,9 +389,6 @@ input {
|
|
|
365
389
|
}
|
|
366
390
|
|
|
367
391
|
:host {
|
|
368
|
-
/**
|
|
369
|
-
* @prop --checkbox-background: Background of the checkbox icon
|
|
370
|
-
*/
|
|
371
392
|
--checkbox-background-checked: var(--ion-color-primary, #0054e9);
|
|
372
393
|
--border-color-checked: var(--ion-color-primary, #0054e9);
|
|
373
394
|
--checkmark-color: var(--ion-color-primary-contrast, #fff);
|
|
@@ -381,10 +402,6 @@ input {
|
|
|
381
402
|
--checkmark-color: var(--ion-color-contrast);
|
|
382
403
|
}
|
|
383
404
|
|
|
384
|
-
.native-wrapper {
|
|
385
|
-
position: relative;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
405
|
:host(.ion-focused) .native-wrapper::after {
|
|
389
406
|
border-radius: 50%;
|
|
390
407
|
display: block;
|
|
@@ -415,21 +432,8 @@ input {
|
|
|
415
432
|
}
|
|
416
433
|
|
|
417
434
|
.checkbox-icon {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
height: var(--size);
|
|
421
|
-
transition: var(--transition);
|
|
422
|
-
border-width: var(--border-width);
|
|
423
|
-
border-style: var(--border-style);
|
|
424
|
-
border-color: var(--border-color);
|
|
425
|
-
background: var(--checkbox-background);
|
|
426
|
-
box-sizing: border-box;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.checkbox-icon path {
|
|
430
|
-
fill: none;
|
|
431
|
-
stroke: var(--checkmark-color);
|
|
432
|
-
stroke-width: var(--checkmark-width);
|
|
435
|
+
width: 100%;
|
|
436
|
+
height: 100%;
|
|
433
437
|
}
|
|
434
438
|
|
|
435
439
|
.checkbox-bottom {
|
|
@@ -509,16 +509,11 @@
|
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
.calendar-day:not(.calendar-day-adjacent-day):focus {
|
|
512
|
-
background: ion-color
|
|
513
|
-
box-shadow: 0px 0px 0px 4px ion-color
|
|
512
|
+
background: rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);
|
|
513
|
+
box-shadow: 0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus {
|
|
517
|
-
background: current-color(base, 0.2);
|
|
518
|
-
box-shadow: 0px 0px 0px 4px current-color(base, 0.2);
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
.calendar-day:focus {
|
|
522
517
|
background: rgba(var(--ion-color-base-rgb), 0.2);
|
|
523
518
|
box-shadow: 0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);
|
|
524
519
|
}
|
|
@@ -563,7 +558,7 @@
|
|
|
563
558
|
}
|
|
564
559
|
|
|
565
560
|
:host .time-body-active {
|
|
566
|
-
color: ion-color
|
|
561
|
+
color: var(--ion-color-primary, #0054e9);
|
|
567
562
|
}
|
|
568
563
|
|
|
569
564
|
:host(.ion-color) .time-body-active {
|
|
@@ -571,7 +566,7 @@
|
|
|
571
566
|
}
|
|
572
567
|
|
|
573
568
|
:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle {
|
|
574
|
-
color: ion-color
|
|
569
|
+
color: var(--ion-color-primary, #0054e9);
|
|
575
570
|
}
|
|
576
571
|
|
|
577
572
|
:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle {
|
|
@@ -579,7 +574,7 @@
|
|
|
579
574
|
}
|
|
580
575
|
|
|
581
576
|
:host .datetime-action-buttons ion-button {
|
|
582
|
-
--color: ion-color
|
|
577
|
+
--color: var(--ion-color-primary, #0054e9);
|
|
583
578
|
}
|
|
584
579
|
|
|
585
580
|
.calendar-month-year-toggle::after {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import caretLeftRegular from "@phosphor-icons/core/assets/regular/caret-left.svg";
|
|
5
|
-
import caretRightRegular from "@phosphor-icons/core/assets/regular/caret-right.svg";
|
|
6
4
|
import { Host, h, writeTask } from "@stencil/core";
|
|
7
5
|
import { startFocusVisible } from "../../utils/focus-visible";
|
|
8
6
|
import { getElementRoot, raf, renderHiddenInput } from "../../utils/helpers";
|
|
@@ -1818,74 +1816,40 @@ export class Datetime {
|
|
|
1818
1816
|
}
|
|
1819
1817
|
/**
|
|
1820
1818
|
* Get the icon to use for the next icon.
|
|
1821
|
-
*
|
|
1819
|
+
* Use the icon set in the config.
|
|
1822
1820
|
* If no icon is set in the config, use the default icon.
|
|
1823
1821
|
*/
|
|
1824
1822
|
get datetimeNextIcon() {
|
|
1825
|
-
|
|
1826
|
-
const theme = getIonTheme(this);
|
|
1827
|
-
const defaultIcons = {
|
|
1828
|
-
ios: chevronForward,
|
|
1829
|
-
ionic: caretRightRegular,
|
|
1830
|
-
md: chevronForward,
|
|
1831
|
-
};
|
|
1832
|
-
// Get the default icon based on the theme, falling back to 'md' icon if necessary
|
|
1833
|
-
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
|
|
1834
|
-
// Return the configured datetime next icon or the default icon
|
|
1835
|
-
return config.get('datetimeNextIcon', defaultIcon);
|
|
1823
|
+
return config.get('datetimeNextIcon', chevronForward);
|
|
1836
1824
|
}
|
|
1837
1825
|
/**
|
|
1838
1826
|
* Get the icon to use for the previous icon.
|
|
1839
|
-
*
|
|
1827
|
+
* Use the icon set in the config.
|
|
1840
1828
|
* If no icon is set in the config, use the default icon.
|
|
1841
1829
|
*/
|
|
1842
1830
|
get datetimePreviousIcon() {
|
|
1843
|
-
|
|
1844
|
-
const theme = getIonTheme(this);
|
|
1845
|
-
const defaultIcons = {
|
|
1846
|
-
ios: chevronBack,
|
|
1847
|
-
ionic: caretLeftRegular,
|
|
1848
|
-
md: chevronBack,
|
|
1849
|
-
};
|
|
1850
|
-
// Get the default icon based on the theme, falling back to 'md' icon if necessary
|
|
1851
|
-
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
|
|
1852
|
-
// Return the configured datetime previous icon or the default icon
|
|
1853
|
-
return config.get('datetimePreviousIcon', defaultIcon);
|
|
1831
|
+
return config.get('datetimePreviousIcon', chevronBack);
|
|
1854
1832
|
}
|
|
1855
1833
|
/**
|
|
1856
1834
|
* Get the icon to use for the show month and year icon.
|
|
1857
|
-
*
|
|
1835
|
+
* Use the icon set in the config.
|
|
1858
1836
|
* If no icon is set in the config, use the default icon.
|
|
1859
1837
|
*/
|
|
1860
1838
|
get datetimeCollapsedIcon() {
|
|
1861
|
-
// Determine the theme and map to default
|
|
1839
|
+
// Determine the theme and map to the default icon
|
|
1862
1840
|
const theme = getIonTheme(this);
|
|
1863
|
-
const
|
|
1864
|
-
ios: chevronForward,
|
|
1865
|
-
ionic: undefined,
|
|
1866
|
-
md: caretDownSharp,
|
|
1867
|
-
};
|
|
1868
|
-
// Get the default icon based on the theme, falling back to 'md' icon if necessary
|
|
1869
|
-
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
|
|
1870
|
-
// Return the configured datetime show month and year icon or the default icon
|
|
1841
|
+
const defaultIcon = theme === 'ios' ? chevronForward : caretDownSharp;
|
|
1871
1842
|
return config.get('datetimeCollapsedIcon', defaultIcon);
|
|
1872
1843
|
}
|
|
1873
1844
|
/**
|
|
1874
1845
|
* Get the icon to use for the hide month and year icon.
|
|
1875
|
-
*
|
|
1846
|
+
* Use the icon set in the config.
|
|
1876
1847
|
* If no icon is set in the config, use the default icon.
|
|
1877
1848
|
*/
|
|
1878
1849
|
get datetimeExpandedIcon() {
|
|
1879
|
-
// Determine the theme and map to default
|
|
1850
|
+
// Determine the theme and map to the default icon
|
|
1880
1851
|
const theme = getIonTheme(this);
|
|
1881
|
-
const
|
|
1882
|
-
ios: chevronDown,
|
|
1883
|
-
ionic: undefined,
|
|
1884
|
-
md: caretUpSharp,
|
|
1885
|
-
};
|
|
1886
|
-
// Get the default icon based on the theme, falling back to 'md' icon if necessary
|
|
1887
|
-
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
|
|
1888
|
-
// Return the configured datetime hide month and year icon or the default icon
|
|
1852
|
+
const defaultIcon = theme === 'ios' ? chevronDown : caretUpSharp;
|
|
1889
1853
|
return config.get('datetimeExpandedIcon', defaultIcon);
|
|
1890
1854
|
}
|
|
1891
1855
|
render() {
|
|
@@ -1897,7 +1861,7 @@ export class Datetime {
|
|
|
1897
1861
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1898
1862
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1899
1863
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1900
|
-
return (h(Host, { key: '
|
|
1864
|
+
return (h(Host, { key: '0c30b5453796094b4ef46ebf4f5bf0879db55ec9', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: {
|
|
1901
1865
|
...createColorClasses(color, {
|
|
1902
1866
|
[theme]: true,
|
|
1903
1867
|
['datetime-readonly']: readonly,
|
|
@@ -1909,7 +1873,7 @@ export class Datetime {
|
|
|
1909
1873
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1910
1874
|
[`datetime-grid`]: isGridStyle,
|
|
1911
1875
|
}),
|
|
1912
|
-
} }, h("div", { key: '
|
|
1876
|
+
} }, h("div", { key: '4daf05c55cb51b877970fc72bb0ad490b740d54c', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(theme)));
|
|
1913
1877
|
}
|
|
1914
1878
|
static get is() { return "ion-datetime"; }
|
|
1915
1879
|
static get encapsulation() { return "shadow"; }
|
|
@@ -509,16 +509,11 @@
|
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
.calendar-day:not(.calendar-day-adjacent-day):focus {
|
|
512
|
-
background: ion-color
|
|
513
|
-
box-shadow: 0px 0px 0px 4px ion-color
|
|
512
|
+
background: rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);
|
|
513
|
+
box-shadow: 0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus {
|
|
517
|
-
background: current-color(base, 0.2);
|
|
518
|
-
box-shadow: 0px 0px 0px 4px current-color(base, 0.2);
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
.calendar-day:focus {
|
|
522
517
|
background: rgba(var(--ion-color-base-rgb), 0.2);
|
|
523
518
|
box-shadow: 0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);
|
|
524
519
|
}
|
|
@@ -563,7 +558,7 @@
|
|
|
563
558
|
}
|
|
564
559
|
|
|
565
560
|
:host .time-body-active {
|
|
566
|
-
color: ion-color
|
|
561
|
+
color: var(--ion-color-primary, #0054e9);
|
|
567
562
|
}
|
|
568
563
|
|
|
569
564
|
:host(.ion-color) .time-body-active {
|
|
@@ -571,7 +566,7 @@
|
|
|
571
566
|
}
|
|
572
567
|
|
|
573
568
|
:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle {
|
|
574
|
-
color: ion-color
|
|
569
|
+
color: var(--ion-color-primary, #0054e9);
|
|
575
570
|
}
|
|
576
571
|
|
|
577
572
|
:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle {
|
|
@@ -579,7 +574,7 @@
|
|
|
579
574
|
}
|
|
580
575
|
|
|
581
576
|
:host .datetime-action-buttons ion-button {
|
|
582
|
-
--color: ion-color
|
|
577
|
+
--color: var(--ion-color-primary, #0054e9);
|
|
583
578
|
}
|
|
584
579
|
|
|
585
580
|
.calendar-month-year-toggle::after {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import xRegular from "@phosphor-icons/core/assets/regular/x.svg";
|
|
5
4
|
import { Host, h } from "@stencil/core";
|
|
6
5
|
import { inheritAriaAttributes, hasShadowDom } from "../../utils/helpers";
|
|
7
6
|
import { printIonWarning } from "../../utils/logging/index";
|
|
@@ -133,22 +132,18 @@ export class FabButton {
|
|
|
133
132
|
componentWillLoad() {
|
|
134
133
|
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
135
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Get the icon to use for the close icon.
|
|
137
|
+
* If an icon is set on the component, use that.
|
|
138
|
+
* Otherwise, use the icon set in the config.
|
|
139
|
+
* If no icon is set in the config, use the default icon.
|
|
140
|
+
*/
|
|
136
141
|
get fabButtonCloseIcon() {
|
|
137
142
|
// Return the icon if it is explicitly set
|
|
138
143
|
if (this.closeIcon != null) {
|
|
139
144
|
return this.closeIcon;
|
|
140
145
|
}
|
|
141
|
-
|
|
142
|
-
const theme = getIonTheme(this);
|
|
143
|
-
const defaultIcons = {
|
|
144
|
-
ios: close,
|
|
145
|
-
ionic: xRegular,
|
|
146
|
-
md: close,
|
|
147
|
-
};
|
|
148
|
-
// Get the default icon based on the theme, falling back to 'md' icon if necessary
|
|
149
|
-
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
|
|
150
|
-
// Return the configured fab button close icon or the default icon
|
|
151
|
-
return config.get('fabButtonCloseIcon', defaultIcon);
|
|
146
|
+
return config.get('fabButtonCloseIcon', close);
|
|
152
147
|
}
|
|
153
148
|
render() {
|
|
154
149
|
const { el, disabled, fabButtonCloseIcon, color, href, activated, show, translucent, size, inheritedAttributes, type, } = this;
|
|
@@ -170,7 +165,7 @@ export class FabButton {
|
|
|
170
165
|
if (type !== 'button') {
|
|
171
166
|
this.renderHiddenButton();
|
|
172
167
|
}
|
|
173
|
-
return (h(Host, { key: '
|
|
168
|
+
return (h(Host, { key: 'fc2e7284b76590aa65e45b8251f7c7776e11f0dc', onClick: this.onClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses(color, {
|
|
174
169
|
[theme]: true,
|
|
175
170
|
'fab-button-in-list': inList,
|
|
176
171
|
'fab-button-translucent-in-list': inList && translucent,
|
|
@@ -181,7 +176,7 @@ export class FabButton {
|
|
|
181
176
|
'ion-activatable': true,
|
|
182
177
|
'ion-focusable': true,
|
|
183
178
|
[`fab-button-${size}`]: size !== undefined,
|
|
184
|
-
}) }, h(TagType, { key: '
|
|
179
|
+
}) }, h(TagType, { key: '21598ba114ac64d8f98bc0f16934678166def17e', ...attrs, class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur, onClick: (ev) => type === 'button' && openURL(href, ev, this.routerDirection, this.routerAnimation), ...inheritedAttributes }, h("ion-icon", { key: '673609441ffe18d6e8f4b2dc2de37eda7efdda75', "aria-hidden": "true", icon: fabButtonCloseIcon, part: "close-icon", class: "close-icon", lazy: false }), h("span", { key: '13b3dac62a91549431d227676bbe8a0a0fc93665', class: "button-inner" }, h("slot", { key: 'aefbe96ef9790dd85002432d7bb5a70f17e52a15' })), theme === 'md' && h("ion-ripple-effect", { key: '6888c7374b87c08a9a04009549026ae7365f4b92' }))));
|
|
185
180
|
}
|
|
186
181
|
static get is() { return "ion-fab-button"; }
|
|
187
182
|
static get encapsulation() { return "shadow"; }
|