@ionic/core 8.4.1-dev.11730807985.1b046f37 → 8.4.1-dev.11730889290.1eacfaf8
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-range.js +7 -7
- package/components/ion-segment-view.js +6 -2
- package/dist/cjs/ion-range.cjs.entry.js +7 -7
- package/dist/cjs/ion-segment-view.cjs.entry.js +6 -2
- package/dist/collection/components/range/range.ionic.css +550 -0
- package/dist/collection/components/range/range.ios.css +122 -91
- package/dist/collection/components/range/range.js +5 -5
- package/dist/collection/components/range/range.md.css +122 -91
- package/dist/collection/components/segment-view/segment-view.js +6 -4
- package/dist/docs.json +1 -1
- package/dist/esm/ion-range.entry.js +7 -7
- package/dist/esm/ion-segment-view.entry.js +6 -2
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-segment-view.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-27258d5a.entry.js +4 -0
- package/dist/ionic/p-53dfa2e3.entry.js +4 -0
- package/dist/ionic/p-9ac1a506.system.js +1 -1
- package/dist/ionic/{p-10961893.system.entry.js → p-a685da08.system.entry.js} +1 -1
- package/dist/ionic/p-e18f9479.system.entry.js +4 -0
- package/hydrate/index.js +13 -9
- package/hydrate/index.mjs +13 -9
- package/package.json +1 -1
- package/dist/ionic/p-4683bb1b.entry.js +0 -4
- package/dist/ionic/p-88290bd9.system.entry.js +0 -4
- package/dist/ionic/p-ab21d58c.entry.js +0 -4
|
@@ -1,42 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert a pixels given value into rem
|
|
3
|
-
*
|
|
4
|
-
* @param pixels - Value in pixels to be converted (i.e. px)
|
|
5
|
-
* @param context (optional) - Baseline value
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Convert a font size to a dynamic font size.
|
|
9
|
-
* Fonts that participate in Dynamic Type should use
|
|
10
|
-
* dynamic font sizes.
|
|
11
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
12
|
-
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
13
|
-
* convert to a unit other than $baselineUnit.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Convert a font size to a dynamic font size but impose
|
|
17
|
-
* a maximum font size.
|
|
18
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
19
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
20
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
21
|
-
* convert to a unit other than $baselineUnit.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Convert a font size to a dynamic font size but impose
|
|
25
|
-
* a minimum font size.
|
|
26
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
27
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
28
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
29
|
-
* convert to a unit other than $baselineUnit.
|
|
30
|
-
*/
|
|
31
|
-
/**
|
|
32
|
-
* Convert a font size to a dynamic font size but impose
|
|
33
|
-
* maximum and minimum font sizes.
|
|
34
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
35
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
36
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
37
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
38
|
-
* convert to a unit other than $baselineUnit.
|
|
39
|
-
*/
|
|
40
1
|
/**
|
|
41
2
|
* A heuristic that applies CSS to tablet
|
|
42
3
|
* viewports.
|
|
@@ -73,14 +34,11 @@
|
|
|
73
34
|
* @prop --pin-background: Background of the range pin (only available in MD mode)
|
|
74
35
|
* @prop --pin-color: Color of the range pin (only available in MD mode)
|
|
75
36
|
*/
|
|
76
|
-
--knob-handle-size: calc(var(--knob-size) * 2);
|
|
77
37
|
display: flex;
|
|
78
38
|
position: relative;
|
|
79
39
|
flex: 3;
|
|
80
40
|
align-items: center;
|
|
81
|
-
font-family: var(--ion-font-family, inherit);
|
|
82
41
|
user-select: none;
|
|
83
|
-
z-index: 2;
|
|
84
42
|
}
|
|
85
43
|
|
|
86
44
|
:host(.range-disabled) {
|
|
@@ -91,10 +49,6 @@
|
|
|
91
49
|
flex: initial;
|
|
92
50
|
}
|
|
93
51
|
|
|
94
|
-
::slotted(ion-icon[slot]) {
|
|
95
|
-
font-size: 24px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
52
|
.range-slider {
|
|
99
53
|
position: relative;
|
|
100
54
|
flex: 1;
|
|
@@ -111,8 +65,8 @@
|
|
|
111
65
|
|
|
112
66
|
.range-pin {
|
|
113
67
|
position: absolute;
|
|
114
|
-
background:
|
|
115
|
-
color:
|
|
68
|
+
background: current-color(base);
|
|
69
|
+
color: current-color(contrast);
|
|
116
70
|
text-align: center;
|
|
117
71
|
box-sizing: border-box;
|
|
118
72
|
}
|
|
@@ -261,7 +215,6 @@
|
|
|
261
215
|
* only the label would show and users
|
|
262
216
|
* would not be able to see the range.
|
|
263
217
|
*/
|
|
264
|
-
max-width: 200px;
|
|
265
218
|
text-overflow: ellipsis;
|
|
266
219
|
white-space: nowrap;
|
|
267
220
|
overflow: hidden;
|
|
@@ -290,6 +243,121 @@
|
|
|
290
243
|
flex-direction: row;
|
|
291
244
|
}
|
|
292
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Label is on the right of the range in LTR and
|
|
248
|
+
* on the left in RTL.
|
|
249
|
+
*/
|
|
250
|
+
:host(.range-label-placement-end) .range-wrapper {
|
|
251
|
+
flex-direction: row-reverse;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Label is on the left of the range in LTR and
|
|
256
|
+
* on the right in RTL. Label also has a fixed width.
|
|
257
|
+
*/
|
|
258
|
+
:host(.range-label-placement-fixed) .label-text-wrapper {
|
|
259
|
+
flex: 0 0 100px;
|
|
260
|
+
width: 100px;
|
|
261
|
+
min-width: 100px;
|
|
262
|
+
max-width: 200px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Label is on top of the range.
|
|
267
|
+
*/
|
|
268
|
+
:host(.range-label-placement-stacked) .range-wrapper {
|
|
269
|
+
flex-direction: column;
|
|
270
|
+
align-items: stretch;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
:host(.range-label-placement-stacked) .label-text-wrapper {
|
|
274
|
+
transform-origin: left top;
|
|
275
|
+
}
|
|
276
|
+
:host-context([dir=rtl]):host(.range-label-placement-stacked) .label-text-wrapper, :host-context([dir=rtl]).range-label-placement-stacked .label-text-wrapper {
|
|
277
|
+
transform-origin: right top;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@supports selector(:dir(rtl)) {
|
|
281
|
+
:host(.range-label-placement-stacked:dir(rtl)) .label-text-wrapper {
|
|
282
|
+
transform-origin: right top;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Convert a pixels given value into rem
|
|
288
|
+
*
|
|
289
|
+
* @param pixels - Value in pixels to be converted (i.e. px)
|
|
290
|
+
* @param context (optional) - Baseline value
|
|
291
|
+
*/
|
|
292
|
+
/**
|
|
293
|
+
* Convert a font size to a dynamic font size.
|
|
294
|
+
* Fonts that participate in Dynamic Type should use
|
|
295
|
+
* dynamic font sizes.
|
|
296
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
297
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
298
|
+
* convert to a unit other than $baselineUnit.
|
|
299
|
+
*/
|
|
300
|
+
/**
|
|
301
|
+
* Convert a font size to a dynamic font size but impose
|
|
302
|
+
* a maximum font size.
|
|
303
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
304
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
305
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
306
|
+
* convert to a unit other than $baselineUnit.
|
|
307
|
+
*/
|
|
308
|
+
/**
|
|
309
|
+
* Convert a font size to a dynamic font size but impose
|
|
310
|
+
* a minimum font size.
|
|
311
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
312
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
313
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
314
|
+
* convert to a unit other than $baselineUnit.
|
|
315
|
+
*/
|
|
316
|
+
/**
|
|
317
|
+
* Convert a font size to a dynamic font size but impose
|
|
318
|
+
* maximum and minimum font sizes.
|
|
319
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
320
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
321
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
322
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
323
|
+
* convert to a unit other than $baselineUnit.
|
|
324
|
+
*/
|
|
325
|
+
/**
|
|
326
|
+
* A heuristic that applies CSS to tablet
|
|
327
|
+
* viewports.
|
|
328
|
+
*
|
|
329
|
+
* Usage:
|
|
330
|
+
* @include tablet-viewport() {
|
|
331
|
+
* :host {
|
|
332
|
+
* background-color: green;
|
|
333
|
+
* }
|
|
334
|
+
* }
|
|
335
|
+
*/
|
|
336
|
+
/**
|
|
337
|
+
* A heuristic that applies CSS to mobile
|
|
338
|
+
* viewports (i.e. phones, not tablets).
|
|
339
|
+
*
|
|
340
|
+
* Usage:
|
|
341
|
+
* @include mobile-viewport() {
|
|
342
|
+
* :host {
|
|
343
|
+
* background-color: blue;
|
|
344
|
+
* }
|
|
345
|
+
* }
|
|
346
|
+
*/
|
|
347
|
+
:host {
|
|
348
|
+
--knob-handle-size: calc(var(--knob-size) * 2);
|
|
349
|
+
font-family: var(--ion-font-family, inherit);
|
|
350
|
+
z-index: 2;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
::slotted(ion-icon[slot]) {
|
|
354
|
+
font-size: 24px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
::slotted([slot=label]) {
|
|
358
|
+
max-width: 200px;
|
|
359
|
+
}
|
|
360
|
+
|
|
293
361
|
:host(.range-label-placement-start) .label-text-wrapper {
|
|
294
362
|
/**
|
|
295
363
|
* The margin between the label and
|
|
@@ -304,20 +372,12 @@
|
|
|
304
372
|
margin-bottom: 0;
|
|
305
373
|
}
|
|
306
374
|
|
|
307
|
-
/**
|
|
308
|
-
* Label is on the right of the range in LTR and
|
|
309
|
-
* on the left in RTL.
|
|
310
|
-
*/
|
|
311
|
-
:host(.range-label-placement-end) .range-wrapper {
|
|
312
|
-
flex-direction: row-reverse;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* The margin between the label and
|
|
317
|
-
* the range should be on the start
|
|
318
|
-
* when the label sits at the end.
|
|
319
|
-
*/
|
|
320
375
|
:host(.range-label-placement-end) .label-text-wrapper {
|
|
376
|
+
/**
|
|
377
|
+
* The margin between the label and
|
|
378
|
+
* the range should be on the start
|
|
379
|
+
* when the label sits at the end.
|
|
380
|
+
*/
|
|
321
381
|
-webkit-margin-start: 16px;
|
|
322
382
|
margin-inline-start: 16px;
|
|
323
383
|
-webkit-margin-end: 0;
|
|
@@ -340,27 +400,7 @@
|
|
|
340
400
|
margin-bottom: 0;
|
|
341
401
|
}
|
|
342
402
|
|
|
343
|
-
/**
|
|
344
|
-
* Label is on the left of the range in LTR and
|
|
345
|
-
* on the right in RTL. Label also has a fixed width.
|
|
346
|
-
*/
|
|
347
|
-
:host(.range-label-placement-fixed) .label-text-wrapper {
|
|
348
|
-
flex: 0 0 100px;
|
|
349
|
-
width: 100px;
|
|
350
|
-
min-width: 100px;
|
|
351
|
-
max-width: 200px;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Label is on top of the range.
|
|
356
|
-
*/
|
|
357
|
-
:host(.range-label-placement-stacked) .range-wrapper {
|
|
358
|
-
flex-direction: column;
|
|
359
|
-
align-items: stretch;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
403
|
:host(.range-label-placement-stacked) .label-text-wrapper {
|
|
363
|
-
transform-origin: left top;
|
|
364
404
|
transform: scale(0.75);
|
|
365
405
|
/**
|
|
366
406
|
* The margin between the label and
|
|
@@ -376,15 +416,6 @@
|
|
|
376
416
|
*/
|
|
377
417
|
max-width: calc(100% / 0.75);
|
|
378
418
|
}
|
|
379
|
-
:host-context([dir=rtl]):host(.range-label-placement-stacked) .label-text-wrapper, :host-context([dir=rtl]).range-label-placement-stacked .label-text-wrapper {
|
|
380
|
-
transform-origin: right top;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
@supports selector(:dir(rtl)) {
|
|
384
|
-
:host(.range-label-placement-stacked:dir(rtl)) .label-text-wrapper {
|
|
385
|
-
transform-origin: right top;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
419
|
|
|
389
420
|
:host(.in-item.range-label-placement-stacked) .label-text-wrapper {
|
|
390
421
|
margin-top: 10px;
|
|
@@ -565,7 +565,7 @@ export class Range {
|
|
|
565
565
|
const needsEndAdjustment = inItem && !hasEndContent;
|
|
566
566
|
const theme = getIonTheme(this);
|
|
567
567
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
568
|
-
return (h(Host, { key: '
|
|
568
|
+
return (h(Host, { key: 'b0c385f75bcfdfd1e0300688385acfe37e1473f1', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses(this.color, {
|
|
569
569
|
[theme]: true,
|
|
570
570
|
'in-item': inItem,
|
|
571
571
|
'range-disabled': disabled,
|
|
@@ -574,10 +574,10 @@ export class Range {
|
|
|
574
574
|
[`range-label-placement-${labelPlacement}`]: true,
|
|
575
575
|
'range-item-start-adjustment': needsStartAdjustment,
|
|
576
576
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
577
|
-
}) }, h("label", { key: '
|
|
577
|
+
}) }, h("label", { key: '0807b9fbc23a522494a3a97e72963994a4e51dd2', class: "range-wrapper", id: "range-label" }, h("div", { key: 'da8dcd26be7cfd7e873333e77a93ae918a2d4c80', class: {
|
|
578
578
|
'label-text-wrapper': true,
|
|
579
579
|
'label-text-wrapper-hidden': !hasLabel,
|
|
580
|
-
}, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '
|
|
580
|
+
}, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '9f6eb9d2008d9a7058e1101d6fdfa1544284984b', class: "native-wrapper" }, h("slot", { key: '59da842f09322a5f0eaf8e721249ea0e57a334d3', name: "start" }), this.renderRangeSlider(), h("slot", { key: '208a729e13c0ab6daeda6b25bdeda341518e6d4b', name: "end" })))));
|
|
581
581
|
}
|
|
582
582
|
static get is() { return "ion-range"; }
|
|
583
583
|
static get encapsulation() { return "shadow"; }
|
|
@@ -585,14 +585,14 @@ export class Range {
|
|
|
585
585
|
return {
|
|
586
586
|
"ios": ["range.ios.scss"],
|
|
587
587
|
"md": ["range.md.scss"],
|
|
588
|
-
"ionic": ["range.
|
|
588
|
+
"ionic": ["range.ionic.scss"]
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
591
|
static get styleUrls() {
|
|
592
592
|
return {
|
|
593
593
|
"ios": ["range.ios.css"],
|
|
594
594
|
"md": ["range.md.css"],
|
|
595
|
-
"ionic": ["range.
|
|
595
|
+
"ionic": ["range.ionic.css"]
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
598
|
static get properties() {
|
|
@@ -1,42 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert a pixels given value into rem
|
|
3
|
-
*
|
|
4
|
-
* @param pixels - Value in pixels to be converted (i.e. px)
|
|
5
|
-
* @param context (optional) - Baseline value
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Convert a font size to a dynamic font size.
|
|
9
|
-
* Fonts that participate in Dynamic Type should use
|
|
10
|
-
* dynamic font sizes.
|
|
11
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
12
|
-
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
13
|
-
* convert to a unit other than $baselineUnit.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Convert a font size to a dynamic font size but impose
|
|
17
|
-
* a maximum font size.
|
|
18
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
19
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
20
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
21
|
-
* convert to a unit other than $baselineUnit.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Convert a font size to a dynamic font size but impose
|
|
25
|
-
* a minimum font size.
|
|
26
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
27
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
28
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
29
|
-
* convert to a unit other than $baselineUnit.
|
|
30
|
-
*/
|
|
31
|
-
/**
|
|
32
|
-
* Convert a font size to a dynamic font size but impose
|
|
33
|
-
* maximum and minimum font sizes.
|
|
34
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
35
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
36
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
37
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
38
|
-
* convert to a unit other than $baselineUnit.
|
|
39
|
-
*/
|
|
40
1
|
/**
|
|
41
2
|
* A heuristic that applies CSS to tablet
|
|
42
3
|
* viewports.
|
|
@@ -73,14 +34,11 @@
|
|
|
73
34
|
* @prop --pin-background: Background of the range pin (only available in MD mode)
|
|
74
35
|
* @prop --pin-color: Color of the range pin (only available in MD mode)
|
|
75
36
|
*/
|
|
76
|
-
--knob-handle-size: calc(var(--knob-size) * 2);
|
|
77
37
|
display: flex;
|
|
78
38
|
position: relative;
|
|
79
39
|
flex: 3;
|
|
80
40
|
align-items: center;
|
|
81
|
-
font-family: var(--ion-font-family, inherit);
|
|
82
41
|
user-select: none;
|
|
83
|
-
z-index: 2;
|
|
84
42
|
}
|
|
85
43
|
|
|
86
44
|
:host(.range-disabled) {
|
|
@@ -91,10 +49,6 @@
|
|
|
91
49
|
flex: initial;
|
|
92
50
|
}
|
|
93
51
|
|
|
94
|
-
::slotted(ion-icon[slot]) {
|
|
95
|
-
font-size: 24px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
52
|
.range-slider {
|
|
99
53
|
position: relative;
|
|
100
54
|
flex: 1;
|
|
@@ -111,8 +65,8 @@
|
|
|
111
65
|
|
|
112
66
|
.range-pin {
|
|
113
67
|
position: absolute;
|
|
114
|
-
background:
|
|
115
|
-
color:
|
|
68
|
+
background: current-color(base);
|
|
69
|
+
color: current-color(contrast);
|
|
116
70
|
text-align: center;
|
|
117
71
|
box-sizing: border-box;
|
|
118
72
|
}
|
|
@@ -261,7 +215,6 @@
|
|
|
261
215
|
* only the label would show and users
|
|
262
216
|
* would not be able to see the range.
|
|
263
217
|
*/
|
|
264
|
-
max-width: 200px;
|
|
265
218
|
text-overflow: ellipsis;
|
|
266
219
|
white-space: nowrap;
|
|
267
220
|
overflow: hidden;
|
|
@@ -290,6 +243,121 @@
|
|
|
290
243
|
flex-direction: row;
|
|
291
244
|
}
|
|
292
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Label is on the right of the range in LTR and
|
|
248
|
+
* on the left in RTL.
|
|
249
|
+
*/
|
|
250
|
+
:host(.range-label-placement-end) .range-wrapper {
|
|
251
|
+
flex-direction: row-reverse;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Label is on the left of the range in LTR and
|
|
256
|
+
* on the right in RTL. Label also has a fixed width.
|
|
257
|
+
*/
|
|
258
|
+
:host(.range-label-placement-fixed) .label-text-wrapper {
|
|
259
|
+
flex: 0 0 100px;
|
|
260
|
+
width: 100px;
|
|
261
|
+
min-width: 100px;
|
|
262
|
+
max-width: 200px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Label is on top of the range.
|
|
267
|
+
*/
|
|
268
|
+
:host(.range-label-placement-stacked) .range-wrapper {
|
|
269
|
+
flex-direction: column;
|
|
270
|
+
align-items: stretch;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
:host(.range-label-placement-stacked) .label-text-wrapper {
|
|
274
|
+
transform-origin: left top;
|
|
275
|
+
}
|
|
276
|
+
:host-context([dir=rtl]):host(.range-label-placement-stacked) .label-text-wrapper, :host-context([dir=rtl]).range-label-placement-stacked .label-text-wrapper {
|
|
277
|
+
transform-origin: right top;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@supports selector(:dir(rtl)) {
|
|
281
|
+
:host(.range-label-placement-stacked:dir(rtl)) .label-text-wrapper {
|
|
282
|
+
transform-origin: right top;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Convert a pixels given value into rem
|
|
288
|
+
*
|
|
289
|
+
* @param pixels - Value in pixels to be converted (i.e. px)
|
|
290
|
+
* @param context (optional) - Baseline value
|
|
291
|
+
*/
|
|
292
|
+
/**
|
|
293
|
+
* Convert a font size to a dynamic font size.
|
|
294
|
+
* Fonts that participate in Dynamic Type should use
|
|
295
|
+
* dynamic font sizes.
|
|
296
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
297
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
298
|
+
* convert to a unit other than $baselineUnit.
|
|
299
|
+
*/
|
|
300
|
+
/**
|
|
301
|
+
* Convert a font size to a dynamic font size but impose
|
|
302
|
+
* a maximum font size.
|
|
303
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
304
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
305
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
306
|
+
* convert to a unit other than $baselineUnit.
|
|
307
|
+
*/
|
|
308
|
+
/**
|
|
309
|
+
* Convert a font size to a dynamic font size but impose
|
|
310
|
+
* a minimum font size.
|
|
311
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
312
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
313
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
314
|
+
* convert to a unit other than $baselineUnit.
|
|
315
|
+
*/
|
|
316
|
+
/**
|
|
317
|
+
* Convert a font size to a dynamic font size but impose
|
|
318
|
+
* maximum and minimum font sizes.
|
|
319
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
320
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
321
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
322
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
323
|
+
* convert to a unit other than $baselineUnit.
|
|
324
|
+
*/
|
|
325
|
+
/**
|
|
326
|
+
* A heuristic that applies CSS to tablet
|
|
327
|
+
* viewports.
|
|
328
|
+
*
|
|
329
|
+
* Usage:
|
|
330
|
+
* @include tablet-viewport() {
|
|
331
|
+
* :host {
|
|
332
|
+
* background-color: green;
|
|
333
|
+
* }
|
|
334
|
+
* }
|
|
335
|
+
*/
|
|
336
|
+
/**
|
|
337
|
+
* A heuristic that applies CSS to mobile
|
|
338
|
+
* viewports (i.e. phones, not tablets).
|
|
339
|
+
*
|
|
340
|
+
* Usage:
|
|
341
|
+
* @include mobile-viewport() {
|
|
342
|
+
* :host {
|
|
343
|
+
* background-color: blue;
|
|
344
|
+
* }
|
|
345
|
+
* }
|
|
346
|
+
*/
|
|
347
|
+
:host {
|
|
348
|
+
--knob-handle-size: calc(var(--knob-size) * 2);
|
|
349
|
+
font-family: var(--ion-font-family, inherit);
|
|
350
|
+
z-index: 2;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
::slotted(ion-icon[slot]) {
|
|
354
|
+
font-size: 24px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
::slotted([slot=label]) {
|
|
358
|
+
max-width: 200px;
|
|
359
|
+
}
|
|
360
|
+
|
|
293
361
|
:host(.range-label-placement-start) .label-text-wrapper {
|
|
294
362
|
/**
|
|
295
363
|
* The margin between the label and
|
|
@@ -304,20 +372,12 @@
|
|
|
304
372
|
margin-bottom: 0;
|
|
305
373
|
}
|
|
306
374
|
|
|
307
|
-
/**
|
|
308
|
-
* Label is on the right of the range in LTR and
|
|
309
|
-
* on the left in RTL.
|
|
310
|
-
*/
|
|
311
|
-
:host(.range-label-placement-end) .range-wrapper {
|
|
312
|
-
flex-direction: row-reverse;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* The margin between the label and
|
|
317
|
-
* the range should be on the start
|
|
318
|
-
* when the label sits at the end.
|
|
319
|
-
*/
|
|
320
375
|
:host(.range-label-placement-end) .label-text-wrapper {
|
|
376
|
+
/**
|
|
377
|
+
* The margin between the label and
|
|
378
|
+
* the range should be on the start
|
|
379
|
+
* when the label sits at the end.
|
|
380
|
+
*/
|
|
321
381
|
-webkit-margin-start: 16px;
|
|
322
382
|
margin-inline-start: 16px;
|
|
323
383
|
-webkit-margin-end: 0;
|
|
@@ -340,27 +400,7 @@
|
|
|
340
400
|
margin-bottom: 0;
|
|
341
401
|
}
|
|
342
402
|
|
|
343
|
-
/**
|
|
344
|
-
* Label is on the left of the range in LTR and
|
|
345
|
-
* on the right in RTL. Label also has a fixed width.
|
|
346
|
-
*/
|
|
347
|
-
:host(.range-label-placement-fixed) .label-text-wrapper {
|
|
348
|
-
flex: 0 0 100px;
|
|
349
|
-
width: 100px;
|
|
350
|
-
min-width: 100px;
|
|
351
|
-
max-width: 200px;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Label is on top of the range.
|
|
356
|
-
*/
|
|
357
|
-
:host(.range-label-placement-stacked) .range-wrapper {
|
|
358
|
-
flex-direction: column;
|
|
359
|
-
align-items: stretch;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
403
|
:host(.range-label-placement-stacked) .label-text-wrapper {
|
|
363
|
-
transform-origin: left top;
|
|
364
404
|
transform: scale(0.75);
|
|
365
405
|
/**
|
|
366
406
|
* The margin between the label and
|
|
@@ -376,15 +416,6 @@
|
|
|
376
416
|
*/
|
|
377
417
|
max-width: calc(100% / 0.75);
|
|
378
418
|
}
|
|
379
|
-
:host-context([dir=rtl]):host(.range-label-placement-stacked) .label-text-wrapper, :host-context([dir=rtl]).range-label-placement-stacked .label-text-wrapper {
|
|
380
|
-
transform-origin: right top;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
@supports selector(:dir(rtl)) {
|
|
384
|
-
:host(.range-label-placement-stacked:dir(rtl)) .label-text-wrapper {
|
|
385
|
-
transform-origin: right top;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
419
|
|
|
389
420
|
:host(.in-item.range-label-placement-stacked) .label-text-wrapper {
|
|
390
421
|
margin-top: 10px;
|
|
@@ -94,23 +94,25 @@ export class SegmentView {
|
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
96
|
const { disabled, isManualScroll } = this;
|
|
97
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: 'a0b77ea1b2805b87da550d576aa9b0a36ada5d9f', class: {
|
|
98
98
|
'segment-view-disabled': disabled,
|
|
99
99
|
'segment-view-scroll-disabled': isManualScroll === false,
|
|
100
|
-
} }, h("slot", { key: '
|
|
100
|
+
} }, h("slot", { key: '0170106f9448d8d05d929ca0dc05add670db96b4' })));
|
|
101
101
|
}
|
|
102
102
|
static get is() { return "ion-segment-view"; }
|
|
103
103
|
static get encapsulation() { return "shadow"; }
|
|
104
104
|
static get originalStyleUrls() {
|
|
105
105
|
return {
|
|
106
106
|
"ios": ["segment-view.ios.scss"],
|
|
107
|
-
"md": ["segment-view.md.scss"]
|
|
107
|
+
"md": ["segment-view.md.scss"],
|
|
108
|
+
"ionic": ["segment-view.md.scss"]
|
|
108
109
|
};
|
|
109
110
|
}
|
|
110
111
|
static get styleUrls() {
|
|
111
112
|
return {
|
|
112
113
|
"ios": ["segment-view.ios.css"],
|
|
113
|
-
"md": ["segment-view.md.css"]
|
|
114
|
+
"md": ["segment-view.md.css"],
|
|
115
|
+
"ionic": ["segment-view.md.css"]
|
|
114
116
|
};
|
|
115
117
|
}
|
|
116
118
|
static get properties() {
|
package/dist/docs.json
CHANGED