@ionic/core 8.0.2-dev.11714411675.10f48160 → 8.0.2-dev.11714416680.1b4b6d28

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.
@@ -523,7 +523,8 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
523
523
  * Check below the next line ensures that we did not
524
524
  * swipe and abort (i.e. we swiped but we are still on the current month).
525
525
  */
526
- const month = calendarBodyRef.scrollLeft <= 2 ? startMonth : endMonth;
526
+ const condition = isRTL(this.el) ? calendarBodyRef.scrollLeft >= -2 : calendarBodyRef.scrollLeft <= 2;
527
+ const month = condition ? startMonth : endMonth;
527
528
  /**
528
529
  * The edge of the month must be lined up with
529
530
  * the edge of the calendar body in order for
@@ -1760,7 +1761,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
1760
1761
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1761
1762
  const hasWheelVariant = hasDatePresentation && preferWheel;
1762
1763
  renderHiddenInput(true, el, name, formatValue(value), disabled);
1763
- return (h(Host, { key: '0b8c97bfb84dff5f8ef8097bba44f6c4ad119f76', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1764
+ return (h(Host, { key: '11508a20af9da98e21eb92d2b882bb7cf8370da6', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1764
1765
  [mode]: true,
1765
1766
  ['datetime-readonly']: readonly,
1766
1767
  ['datetime-disabled']: disabled,
@@ -1770,7 +1771,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
1770
1771
  [`datetime-size-${size}`]: true,
1771
1772
  [`datetime-prefer-wheel`]: hasWheelVariant,
1772
1773
  [`datetime-grid`]: isGridStyle,
1773
- })) }, h("div", { key: '36e389a8c49944b5bbc0429f6b86d9c28a5b860a', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1774
+ })) }, h("div", { key: 'e35a98de33fa67c8b20c1d40620c1c75dee07512', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1774
1775
  }
1775
1776
  get el() { return this; }
1776
1777
  static get watchers() { return {
@@ -44,9 +44,6 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
44
44
  }
45
45
  }
46
46
  };
47
- this.onSlottedItemsChange = () => {
48
- this.valueChanged(this.value);
49
- };
50
47
  this.getSegmentButton = (selector) => {
51
48
  var _a, _b;
52
49
  const buttons = this.getButtons().filter((button) => !button.disabled);
@@ -114,6 +111,13 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
114
111
  }
115
112
  async componentDidLoad() {
116
113
  this.setCheckedClasses();
114
+ /**
115
+ * If the value changes before watchers
116
+ * are setup, then the ionSelect watch callback
117
+ * will not fire. As a result, we manually
118
+ * fire this event when Select is loaded.
119
+ */
120
+ this.ionSelect.emit({ value: this.value });
117
121
  /**
118
122
  * We need to wait for the buttons to all be rendered
119
123
  * before we can scroll.
@@ -424,14 +428,14 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
424
428
  }
425
429
  render() {
426
430
  const mode = getIonMode(this);
427
- return (h(Host, { key: '6c1761b9c7cfcbf4561014bb897b536c0cc8d469', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
431
+ return (h(Host, { key: '107be9ad856d855db449d24cd75f9fb82746e9aa', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
428
432
  [mode]: true,
429
433
  'in-toolbar': hostContext('ion-toolbar', this.el),
430
434
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
431
435
  'segment-activated': this.activated,
432
436
  'segment-disabled': this.disabled,
433
437
  'segment-scrollable': this.scrollable,
434
- }) }, h("slot", { key: '56941b6e1d8f813a90dc82b5f78ad0a720f8201f', onSlotchange: this.onSlottedItemsChange })));
438
+ }) }, h("slot", { key: 'bdb223b18a62af921084301f01a728c421379646' })));
435
439
  }
436
440
  get el() { return this; }
437
441
  static get watchers() { return {
@@ -525,7 +525,8 @@ const Datetime = class {
525
525
  * Check below the next line ensures that we did not
526
526
  * swipe and abort (i.e. we swiped but we are still on the current month).
527
527
  */
528
- const month = calendarBodyRef.scrollLeft <= 2 ? startMonth : endMonth;
528
+ const condition = dir.isRTL(this.el) ? calendarBodyRef.scrollLeft >= -2 : calendarBodyRef.scrollLeft <= 2;
529
+ const month = condition ? startMonth : endMonth;
529
530
  /**
530
531
  * The edge of the month must be lined up with
531
532
  * the edge of the calendar body in order for
@@ -1762,7 +1763,7 @@ const Datetime = class {
1762
1763
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1763
1764
  const hasWheelVariant = hasDatePresentation && preferWheel;
1764
1765
  helpers.renderHiddenInput(true, el, name, data.formatValue(value), disabled);
1765
- return (index$1.h(index$1.Host, { key: '0b8c97bfb84dff5f8ef8097bba44f6c4ad119f76', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, theme.createColorClasses(color, {
1766
+ return (index$1.h(index$1.Host, { key: '11508a20af9da98e21eb92d2b882bb7cf8370da6', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, theme.createColorClasses(color, {
1766
1767
  [mode]: true,
1767
1768
  ['datetime-readonly']: readonly,
1768
1769
  ['datetime-disabled']: disabled,
@@ -1772,7 +1773,7 @@ const Datetime = class {
1772
1773
  [`datetime-size-${size}`]: true,
1773
1774
  [`datetime-prefer-wheel`]: hasWheelVariant,
1774
1775
  [`datetime-grid`]: isGridStyle,
1775
- })) }, index$1.h("div", { key: '36e389a8c49944b5bbc0429f6b86d9c28a5b860a', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1776
+ })) }, index$1.h("div", { key: 'e35a98de33fa67c8b20c1d40620c1c75dee07512', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1776
1777
  }
1777
1778
  get el() { return index$1.getElement(this); }
1778
1779
  static get watchers() { return {
@@ -46,9 +46,6 @@ const Segment = class {
46
46
  }
47
47
  }
48
48
  };
49
- this.onSlottedItemsChange = () => {
50
- this.valueChanged(this.value);
51
- };
52
49
  this.getSegmentButton = (selector) => {
53
50
  var _a, _b;
54
51
  const buttons = this.getButtons().filter((button) => !button.disabled);
@@ -116,6 +113,13 @@ const Segment = class {
116
113
  }
117
114
  async componentDidLoad() {
118
115
  this.setCheckedClasses();
116
+ /**
117
+ * If the value changes before watchers
118
+ * are setup, then the ionSelect watch callback
119
+ * will not fire. As a result, we manually
120
+ * fire this event when Select is loaded.
121
+ */
122
+ this.ionSelect.emit({ value: this.value });
119
123
  /**
120
124
  * We need to wait for the buttons to all be rendered
121
125
  * before we can scroll.
@@ -426,14 +430,14 @@ const Segment = class {
426
430
  }
427
431
  render() {
428
432
  const mode = ionicGlobal.getIonMode(this);
429
- return (index.h(index.Host, { key: '6c1761b9c7cfcbf4561014bb897b536c0cc8d469', role: "tablist", onClick: this.onClick, class: theme.createColorClasses(this.color, {
433
+ return (index.h(index.Host, { key: '107be9ad856d855db449d24cd75f9fb82746e9aa', role: "tablist", onClick: this.onClick, class: theme.createColorClasses(this.color, {
430
434
  [mode]: true,
431
435
  'in-toolbar': theme.hostContext('ion-toolbar', this.el),
432
436
  'in-toolbar-color': theme.hostContext('ion-toolbar[color]', this.el),
433
437
  'segment-activated': this.activated,
434
438
  'segment-disabled': this.disabled,
435
439
  'segment-scrollable': this.scrollable,
436
- }) }, index.h("slot", { key: '56941b6e1d8f813a90dc82b5f78ad0a720f8201f', onSlotchange: this.onSlottedItemsChange })));
440
+ }) }, index.h("slot", { key: 'bdb223b18a62af921084301f01a728c421379646' })));
437
441
  }
438
442
  get el() { return index.getElement(this); }
439
443
  static get watchers() { return {
@@ -319,7 +319,8 @@ export class Datetime {
319
319
  * Check below the next line ensures that we did not
320
320
  * swipe and abort (i.e. we swiped but we are still on the current month).
321
321
  */
322
- const month = calendarBodyRef.scrollLeft <= 2 ? startMonth : endMonth;
322
+ const condition = isRTL(this.el) ? calendarBodyRef.scrollLeft >= -2 : calendarBodyRef.scrollLeft <= 2;
323
+ const month = condition ? startMonth : endMonth;
323
324
  /**
324
325
  * The edge of the month must be lined up with
325
326
  * the edge of the calendar body in order for
@@ -1556,7 +1557,7 @@ export class Datetime {
1556
1557
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1557
1558
  const hasWheelVariant = hasDatePresentation && preferWheel;
1558
1559
  renderHiddenInput(true, el, name, formatValue(value), disabled);
1559
- return (h(Host, { key: '0b8c97bfb84dff5f8ef8097bba44f6c4ad119f76', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1560
+ return (h(Host, { key: '11508a20af9da98e21eb92d2b882bb7cf8370da6', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1560
1561
  [mode]: true,
1561
1562
  ['datetime-readonly']: readonly,
1562
1563
  ['datetime-disabled']: disabled,
@@ -1566,7 +1567,7 @@ export class Datetime {
1566
1567
  [`datetime-size-${size}`]: true,
1567
1568
  [`datetime-prefer-wheel`]: hasWheelVariant,
1568
1569
  [`datetime-grid`]: isGridStyle,
1569
- })) }, h("div", { key: '36e389a8c49944b5bbc0429f6b86d9c28a5b860a', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1570
+ })) }, h("div", { key: 'e35a98de33fa67c8b20c1d40620c1c75dee07512', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1570
1571
  }
1571
1572
  static get is() { return "ion-datetime"; }
1572
1573
  static get encapsulation() { return "shadow"; }
@@ -34,9 +34,6 @@ export class Segment {
34
34
  }
35
35
  }
36
36
  };
37
- this.onSlottedItemsChange = () => {
38
- this.valueChanged(this.value);
39
- };
40
37
  this.getSegmentButton = (selector) => {
41
38
  var _a, _b;
42
39
  const buttons = this.getButtons().filter((button) => !button.disabled);
@@ -104,6 +101,13 @@ export class Segment {
104
101
  }
105
102
  async componentDidLoad() {
106
103
  this.setCheckedClasses();
104
+ /**
105
+ * If the value changes before watchers
106
+ * are setup, then the ionSelect watch callback
107
+ * will not fire. As a result, we manually
108
+ * fire this event when Select is loaded.
109
+ */
110
+ this.ionSelect.emit({ value: this.value });
107
111
  /**
108
112
  * We need to wait for the buttons to all be rendered
109
113
  * before we can scroll.
@@ -416,14 +420,14 @@ export class Segment {
416
420
  }
417
421
  render() {
418
422
  const mode = getIonMode(this);
419
- return (h(Host, { key: '6c1761b9c7cfcbf4561014bb897b536c0cc8d469', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
423
+ return (h(Host, { key: '107be9ad856d855db449d24cd75f9fb82746e9aa', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
420
424
  [mode]: true,
421
425
  'in-toolbar': hostContext('ion-toolbar', this.el),
422
426
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
423
427
  'segment-activated': this.activated,
424
428
  'segment-disabled': this.disabled,
425
429
  'segment-scrollable': this.scrollable,
426
- }) }, h("slot", { key: '56941b6e1d8f813a90dc82b5f78ad0a720f8201f', onSlotchange: this.onSlottedItemsChange })));
430
+ }) }, h("slot", { key: 'bdb223b18a62af921084301f01a728c421379646' })));
427
431
  }
428
432
  static get is() { return "ion-segment"; }
429
433
  static get encapsulation() { return "shadow"; }
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-04-29T17:30:10",
2
+ "timestamp": "2024-04-29T18:53:27",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.17.1",
@@ -521,7 +521,8 @@ const Datetime = class {
521
521
  * Check below the next line ensures that we did not
522
522
  * swipe and abort (i.e. we swiped but we are still on the current month).
523
523
  */
524
- const month = calendarBodyRef.scrollLeft <= 2 ? startMonth : endMonth;
524
+ const condition = isRTL(this.el) ? calendarBodyRef.scrollLeft >= -2 : calendarBodyRef.scrollLeft <= 2;
525
+ const month = condition ? startMonth : endMonth;
525
526
  /**
526
527
  * The edge of the month must be lined up with
527
528
  * the edge of the calendar body in order for
@@ -1758,7 +1759,7 @@ const Datetime = class {
1758
1759
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1759
1760
  const hasWheelVariant = hasDatePresentation && preferWheel;
1760
1761
  renderHiddenInput(true, el, name, formatValue(value), disabled);
1761
- return (h(Host, { key: '0b8c97bfb84dff5f8ef8097bba44f6c4ad119f76', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1762
+ return (h(Host, { key: '11508a20af9da98e21eb92d2b882bb7cf8370da6', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1762
1763
  [mode]: true,
1763
1764
  ['datetime-readonly']: readonly,
1764
1765
  ['datetime-disabled']: disabled,
@@ -1768,7 +1769,7 @@ const Datetime = class {
1768
1769
  [`datetime-size-${size}`]: true,
1769
1770
  [`datetime-prefer-wheel`]: hasWheelVariant,
1770
1771
  [`datetime-grid`]: isGridStyle,
1771
- })) }, h("div", { key: '36e389a8c49944b5bbc0429f6b86d9c28a5b860a', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1772
+ })) }, h("div", { key: 'e35a98de33fa67c8b20c1d40620c1c75dee07512', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
1772
1773
  }
1773
1774
  get el() { return getElement(this); }
1774
1775
  static get watchers() { return {
@@ -42,9 +42,6 @@ const Segment = class {
42
42
  }
43
43
  }
44
44
  };
45
- this.onSlottedItemsChange = () => {
46
- this.valueChanged(this.value);
47
- };
48
45
  this.getSegmentButton = (selector) => {
49
46
  var _a, _b;
50
47
  const buttons = this.getButtons().filter((button) => !button.disabled);
@@ -112,6 +109,13 @@ const Segment = class {
112
109
  }
113
110
  async componentDidLoad() {
114
111
  this.setCheckedClasses();
112
+ /**
113
+ * If the value changes before watchers
114
+ * are setup, then the ionSelect watch callback
115
+ * will not fire. As a result, we manually
116
+ * fire this event when Select is loaded.
117
+ */
118
+ this.ionSelect.emit({ value: this.value });
115
119
  /**
116
120
  * We need to wait for the buttons to all be rendered
117
121
  * before we can scroll.
@@ -422,14 +426,14 @@ const Segment = class {
422
426
  }
423
427
  render() {
424
428
  const mode = getIonMode(this);
425
- return (h(Host, { key: '6c1761b9c7cfcbf4561014bb897b536c0cc8d469', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
429
+ return (h(Host, { key: '107be9ad856d855db449d24cd75f9fb82746e9aa', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
426
430
  [mode]: true,
427
431
  'in-toolbar': hostContext('ion-toolbar', this.el),
428
432
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
429
433
  'segment-activated': this.activated,
430
434
  'segment-disabled': this.disabled,
431
435
  'segment-scrollable': this.scrollable,
432
- }) }, h("slot", { key: '56941b6e1d8f813a90dc82b5f78ad0a720f8201f', onSlotchange: this.onSlottedItemsChange })));
436
+ }) }, h("slot", { key: 'bdb223b18a62af921084301f01a728c421379646' })));
433
437
  }
434
438
  get el() { return getElement(this); }
435
439
  static get watchers() { return {