@ionic/core 8.7.13-dev.11765550444.1d97de23 → 8.7.13-dev.11765552290.11441928

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.
@@ -1085,52 +1085,64 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
1085
1085
  * visible if used inside of a modal or a popover otherwise the scrollable
1086
1086
  * areas will not have the correct values snapped into place.
1087
1087
  *
1088
- * We use ResizeObserver to detect when the element transitions
1088
+ * FW-6931: We use ResizeObserver to detect when the element transitions
1089
1089
  * between having dimensions (visible) and zero dimensions (hidden). This
1090
1090
  * is more reliable than IntersectionObserver for detecting visibility
1091
1091
  * changes, especially when the element is inside a modal or popover.
1092
1092
  */
1093
- this.resizeObserver = new ResizeObserver((entries) => {
1094
- const entry = entries[0];
1095
- const { width, height } = entry.contentRect;
1096
- const isVisible = width > 0 && height > 0;
1097
- const isReady = el.classList.contains('datetime-ready');
1098
- if (isVisible && !isReady) {
1099
- this.initializeListeners();
1100
- /**
1101
- * TODO FW-2793: Datetime needs a frame to ensure that it
1102
- * can properly scroll contents into view. As a result
1103
- * we hide the scrollable content until after that frame
1104
- * so users do not see the content quickly shifting. The downside
1105
- * is that the content will pop into view a frame after. Maybe there
1106
- * is a better way to handle this?
1107
- */
1108
- writeTask(() => {
1109
- el.classList.add('datetime-ready');
1110
- });
1111
- }
1112
- else if (!isVisible && isReady) {
1113
- /**
1114
- * Clean up listeners when hidden so we can properly
1115
- * reinitialize scroll positions on re-presentation.
1116
- */
1117
- this.destroyInteractionListeners();
1118
- /**
1119
- * Close month/year picker when hidden, otherwise
1120
- * it will be open when re-presented with a 0-height
1121
- * scroll area, showing the wrong month.
1122
- */
1123
- this.showMonthAndYear = false;
1124
- writeTask(() => {
1125
- el.classList.remove('datetime-ready');
1126
- });
1127
- }
1128
- });
1129
- /**
1130
- * Use raf to avoid a race condition between the component loading and
1131
- * its display animation starting (such as when shown in a modal).
1132
- */
1133
- raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
1093
+ if (typeof ResizeObserver !== 'undefined') {
1094
+ this.resizeObserver = new ResizeObserver((entries) => {
1095
+ const entry = entries[0];
1096
+ const { width, height } = entry.contentRect;
1097
+ const isVisible = width > 0 && height > 0;
1098
+ const isReady = el.classList.contains('datetime-ready');
1099
+ if (isVisible && !isReady) {
1100
+ this.initializeListeners();
1101
+ /**
1102
+ * TODO FW-2793: Datetime needs a frame to ensure that it
1103
+ * can properly scroll contents into view. As a result
1104
+ * we hide the scrollable content until after that frame
1105
+ * so users do not see the content quickly shifting. The downside
1106
+ * is that the content will pop into view a frame after. Maybe there
1107
+ * is a better way to handle this?
1108
+ */
1109
+ writeTask(() => {
1110
+ el.classList.add('datetime-ready');
1111
+ });
1112
+ }
1113
+ else if (!isVisible && isReady) {
1114
+ /**
1115
+ * Clean up listeners when hidden so we can properly
1116
+ * reinitialize scroll positions on re-presentation.
1117
+ */
1118
+ this.destroyInteractionListeners();
1119
+ /**
1120
+ * Close month/year picker when hidden, otherwise
1121
+ * it will be open when re-presented with a 0-height
1122
+ * scroll area, showing the wrong month.
1123
+ */
1124
+ this.showMonthAndYear = false;
1125
+ writeTask(() => {
1126
+ el.classList.remove('datetime-ready');
1127
+ });
1128
+ }
1129
+ });
1130
+ /**
1131
+ * Use raf to avoid a race condition between the component loading and
1132
+ * its display animation starting (such as when shown in a modal).
1133
+ */
1134
+ raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
1135
+ }
1136
+ else {
1137
+ /**
1138
+ * Fallback for test environments where ResizeObserver is not available.
1139
+ * Just mark as ready without initializing scroll/keyboard listeners
1140
+ * since those also require browser APIs not available in Jest.
1141
+ */
1142
+ writeTask(() => {
1143
+ el.classList.add('datetime-ready');
1144
+ });
1145
+ }
1134
1146
  /**
1135
1147
  * Datetime uses Ionic components that emit
1136
1148
  * ionFocus and ionBlur. These events are
@@ -1859,7 +1871,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
1859
1871
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1860
1872
  const hasWheelVariant = hasDatePresentation && preferWheel;
1861
1873
  renderHiddenInput(true, el, name, formatValue(value), disabled);
1862
- return (h(Host, { key: 'f4d2e6577c288bdbd814760ab70cccfd91815f06', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1874
+ return (h(Host, { key: '187a5b5cf1413449a9db33f8c5b0fd3b7fded302', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1863
1875
  [mode]: true,
1864
1876
  ['datetime-readonly']: readonly,
1865
1877
  ['datetime-disabled']: disabled,
@@ -1081,52 +1081,64 @@ const Datetime = class {
1081
1081
  * visible if used inside of a modal or a popover otherwise the scrollable
1082
1082
  * areas will not have the correct values snapped into place.
1083
1083
  *
1084
- * We use ResizeObserver to detect when the element transitions
1084
+ * FW-6931: We use ResizeObserver to detect when the element transitions
1085
1085
  * between having dimensions (visible) and zero dimensions (hidden). This
1086
1086
  * is more reliable than IntersectionObserver for detecting visibility
1087
1087
  * changes, especially when the element is inside a modal or popover.
1088
1088
  */
1089
- this.resizeObserver = new ResizeObserver((entries) => {
1090
- const entry = entries[0];
1091
- const { width, height } = entry.contentRect;
1092
- const isVisible = width > 0 && height > 0;
1093
- const isReady = el.classList.contains('datetime-ready');
1094
- if (isVisible && !isReady) {
1095
- this.initializeListeners();
1096
- /**
1097
- * TODO FW-2793: Datetime needs a frame to ensure that it
1098
- * can properly scroll contents into view. As a result
1099
- * we hide the scrollable content until after that frame
1100
- * so users do not see the content quickly shifting. The downside
1101
- * is that the content will pop into view a frame after. Maybe there
1102
- * is a better way to handle this?
1103
- */
1104
- index.writeTask(() => {
1105
- el.classList.add('datetime-ready');
1106
- });
1107
- }
1108
- else if (!isVisible && isReady) {
1109
- /**
1110
- * Clean up listeners when hidden so we can properly
1111
- * reinitialize scroll positions on re-presentation.
1112
- */
1113
- this.destroyInteractionListeners();
1114
- /**
1115
- * Close month/year picker when hidden, otherwise
1116
- * it will be open when re-presented with a 0-height
1117
- * scroll area, showing the wrong month.
1118
- */
1119
- this.showMonthAndYear = false;
1120
- index.writeTask(() => {
1121
- el.classList.remove('datetime-ready');
1122
- });
1123
- }
1124
- });
1125
- /**
1126
- * Use raf to avoid a race condition between the component loading and
1127
- * its display animation starting (such as when shown in a modal).
1128
- */
1129
- helpers.raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
1089
+ if (typeof ResizeObserver !== 'undefined') {
1090
+ this.resizeObserver = new ResizeObserver((entries) => {
1091
+ const entry = entries[0];
1092
+ const { width, height } = entry.contentRect;
1093
+ const isVisible = width > 0 && height > 0;
1094
+ const isReady = el.classList.contains('datetime-ready');
1095
+ if (isVisible && !isReady) {
1096
+ this.initializeListeners();
1097
+ /**
1098
+ * TODO FW-2793: Datetime needs a frame to ensure that it
1099
+ * can properly scroll contents into view. As a result
1100
+ * we hide the scrollable content until after that frame
1101
+ * so users do not see the content quickly shifting. The downside
1102
+ * is that the content will pop into view a frame after. Maybe there
1103
+ * is a better way to handle this?
1104
+ */
1105
+ index.writeTask(() => {
1106
+ el.classList.add('datetime-ready');
1107
+ });
1108
+ }
1109
+ else if (!isVisible && isReady) {
1110
+ /**
1111
+ * Clean up listeners when hidden so we can properly
1112
+ * reinitialize scroll positions on re-presentation.
1113
+ */
1114
+ this.destroyInteractionListeners();
1115
+ /**
1116
+ * Close month/year picker when hidden, otherwise
1117
+ * it will be open when re-presented with a 0-height
1118
+ * scroll area, showing the wrong month.
1119
+ */
1120
+ this.showMonthAndYear = false;
1121
+ index.writeTask(() => {
1122
+ el.classList.remove('datetime-ready');
1123
+ });
1124
+ }
1125
+ });
1126
+ /**
1127
+ * Use raf to avoid a race condition between the component loading and
1128
+ * its display animation starting (such as when shown in a modal).
1129
+ */
1130
+ helpers.raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
1131
+ }
1132
+ else {
1133
+ /**
1134
+ * Fallback for test environments where ResizeObserver is not available.
1135
+ * Just mark as ready without initializing scroll/keyboard listeners
1136
+ * since those also require browser APIs not available in Jest.
1137
+ */
1138
+ index.writeTask(() => {
1139
+ el.classList.add('datetime-ready');
1140
+ });
1141
+ }
1130
1142
  /**
1131
1143
  * Datetime uses Ionic components that emit
1132
1144
  * ionFocus and ionBlur. These events are
@@ -1855,7 +1867,7 @@ const Datetime = class {
1855
1867
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1856
1868
  const hasWheelVariant = hasDatePresentation && preferWheel;
1857
1869
  helpers.renderHiddenInput(true, el, name, data.formatValue(value), disabled);
1858
- return (index.h(index.Host, { key: 'f4d2e6577c288bdbd814760ab70cccfd91815f06', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, theme.createColorClasses(color, {
1870
+ return (index.h(index.Host, { key: '187a5b5cf1413449a9db33f8c5b0fd3b7fded302', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, theme.createColorClasses(color, {
1859
1871
  [mode]: true,
1860
1872
  ['datetime-readonly']: readonly,
1861
1873
  ['datetime-disabled']: disabled,
@@ -880,52 +880,64 @@ export class Datetime {
880
880
  * visible if used inside of a modal or a popover otherwise the scrollable
881
881
  * areas will not have the correct values snapped into place.
882
882
  *
883
- * We use ResizeObserver to detect when the element transitions
883
+ * FW-6931: We use ResizeObserver to detect when the element transitions
884
884
  * between having dimensions (visible) and zero dimensions (hidden). This
885
885
  * is more reliable than IntersectionObserver for detecting visibility
886
886
  * changes, especially when the element is inside a modal or popover.
887
887
  */
888
- this.resizeObserver = new ResizeObserver((entries) => {
889
- const entry = entries[0];
890
- const { width, height } = entry.contentRect;
891
- const isVisible = width > 0 && height > 0;
892
- const isReady = el.classList.contains('datetime-ready');
893
- if (isVisible && !isReady) {
894
- this.initializeListeners();
895
- /**
896
- * TODO FW-2793: Datetime needs a frame to ensure that it
897
- * can properly scroll contents into view. As a result
898
- * we hide the scrollable content until after that frame
899
- * so users do not see the content quickly shifting. The downside
900
- * is that the content will pop into view a frame after. Maybe there
901
- * is a better way to handle this?
902
- */
903
- writeTask(() => {
904
- el.classList.add('datetime-ready');
905
- });
906
- }
907
- else if (!isVisible && isReady) {
908
- /**
909
- * Clean up listeners when hidden so we can properly
910
- * reinitialize scroll positions on re-presentation.
911
- */
912
- this.destroyInteractionListeners();
913
- /**
914
- * Close month/year picker when hidden, otherwise
915
- * it will be open when re-presented with a 0-height
916
- * scroll area, showing the wrong month.
917
- */
918
- this.showMonthAndYear = false;
919
- writeTask(() => {
920
- el.classList.remove('datetime-ready');
921
- });
922
- }
923
- });
924
- /**
925
- * Use raf to avoid a race condition between the component loading and
926
- * its display animation starting (such as when shown in a modal).
927
- */
928
- raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
888
+ if (typeof ResizeObserver !== 'undefined') {
889
+ this.resizeObserver = new ResizeObserver((entries) => {
890
+ const entry = entries[0];
891
+ const { width, height } = entry.contentRect;
892
+ const isVisible = width > 0 && height > 0;
893
+ const isReady = el.classList.contains('datetime-ready');
894
+ if (isVisible && !isReady) {
895
+ this.initializeListeners();
896
+ /**
897
+ * TODO FW-2793: Datetime needs a frame to ensure that it
898
+ * can properly scroll contents into view. As a result
899
+ * we hide the scrollable content until after that frame
900
+ * so users do not see the content quickly shifting. The downside
901
+ * is that the content will pop into view a frame after. Maybe there
902
+ * is a better way to handle this?
903
+ */
904
+ writeTask(() => {
905
+ el.classList.add('datetime-ready');
906
+ });
907
+ }
908
+ else if (!isVisible && isReady) {
909
+ /**
910
+ * Clean up listeners when hidden so we can properly
911
+ * reinitialize scroll positions on re-presentation.
912
+ */
913
+ this.destroyInteractionListeners();
914
+ /**
915
+ * Close month/year picker when hidden, otherwise
916
+ * it will be open when re-presented with a 0-height
917
+ * scroll area, showing the wrong month.
918
+ */
919
+ this.showMonthAndYear = false;
920
+ writeTask(() => {
921
+ el.classList.remove('datetime-ready');
922
+ });
923
+ }
924
+ });
925
+ /**
926
+ * Use raf to avoid a race condition between the component loading and
927
+ * its display animation starting (such as when shown in a modal).
928
+ */
929
+ raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
930
+ }
931
+ else {
932
+ /**
933
+ * Fallback for test environments where ResizeObserver is not available.
934
+ * Just mark as ready without initializing scroll/keyboard listeners
935
+ * since those also require browser APIs not available in Jest.
936
+ */
937
+ writeTask(() => {
938
+ el.classList.add('datetime-ready');
939
+ });
940
+ }
929
941
  /**
930
942
  * Datetime uses Ionic components that emit
931
943
  * ionFocus and ionBlur. These events are
@@ -1654,7 +1666,7 @@ export class Datetime {
1654
1666
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1655
1667
  const hasWheelVariant = hasDatePresentation && preferWheel;
1656
1668
  renderHiddenInput(true, el, name, formatValue(value), disabled);
1657
- return (h(Host, { key: 'f4d2e6577c288bdbd814760ab70cccfd91815f06', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1669
+ return (h(Host, { key: '187a5b5cf1413449a9db33f8c5b0fd3b7fded302', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1658
1670
  [mode]: true,
1659
1671
  ['datetime-readonly']: readonly,
1660
1672
  ['datetime-disabled']: disabled,
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-12-12T14:42:28",
2
+ "timestamp": "2025-12-12T15:13:24",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.38.0",
@@ -1079,52 +1079,64 @@ const Datetime = class {
1079
1079
  * visible if used inside of a modal or a popover otherwise the scrollable
1080
1080
  * areas will not have the correct values snapped into place.
1081
1081
  *
1082
- * We use ResizeObserver to detect when the element transitions
1082
+ * FW-6931: We use ResizeObserver to detect when the element transitions
1083
1083
  * between having dimensions (visible) and zero dimensions (hidden). This
1084
1084
  * is more reliable than IntersectionObserver for detecting visibility
1085
1085
  * changes, especially when the element is inside a modal or popover.
1086
1086
  */
1087
- this.resizeObserver = new ResizeObserver((entries) => {
1088
- const entry = entries[0];
1089
- const { width, height } = entry.contentRect;
1090
- const isVisible = width > 0 && height > 0;
1091
- const isReady = el.classList.contains('datetime-ready');
1092
- if (isVisible && !isReady) {
1093
- this.initializeListeners();
1094
- /**
1095
- * TODO FW-2793: Datetime needs a frame to ensure that it
1096
- * can properly scroll contents into view. As a result
1097
- * we hide the scrollable content until after that frame
1098
- * so users do not see the content quickly shifting. The downside
1099
- * is that the content will pop into view a frame after. Maybe there
1100
- * is a better way to handle this?
1101
- */
1102
- writeTask(() => {
1103
- el.classList.add('datetime-ready');
1104
- });
1105
- }
1106
- else if (!isVisible && isReady) {
1107
- /**
1108
- * Clean up listeners when hidden so we can properly
1109
- * reinitialize scroll positions on re-presentation.
1110
- */
1111
- this.destroyInteractionListeners();
1112
- /**
1113
- * Close month/year picker when hidden, otherwise
1114
- * it will be open when re-presented with a 0-height
1115
- * scroll area, showing the wrong month.
1116
- */
1117
- this.showMonthAndYear = false;
1118
- writeTask(() => {
1119
- el.classList.remove('datetime-ready');
1120
- });
1121
- }
1122
- });
1123
- /**
1124
- * Use raf to avoid a race condition between the component loading and
1125
- * its display animation starting (such as when shown in a modal).
1126
- */
1127
- raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
1087
+ if (typeof ResizeObserver !== 'undefined') {
1088
+ this.resizeObserver = new ResizeObserver((entries) => {
1089
+ const entry = entries[0];
1090
+ const { width, height } = entry.contentRect;
1091
+ const isVisible = width > 0 && height > 0;
1092
+ const isReady = el.classList.contains('datetime-ready');
1093
+ if (isVisible && !isReady) {
1094
+ this.initializeListeners();
1095
+ /**
1096
+ * TODO FW-2793: Datetime needs a frame to ensure that it
1097
+ * can properly scroll contents into view. As a result
1098
+ * we hide the scrollable content until after that frame
1099
+ * so users do not see the content quickly shifting. The downside
1100
+ * is that the content will pop into view a frame after. Maybe there
1101
+ * is a better way to handle this?
1102
+ */
1103
+ writeTask(() => {
1104
+ el.classList.add('datetime-ready');
1105
+ });
1106
+ }
1107
+ else if (!isVisible && isReady) {
1108
+ /**
1109
+ * Clean up listeners when hidden so we can properly
1110
+ * reinitialize scroll positions on re-presentation.
1111
+ */
1112
+ this.destroyInteractionListeners();
1113
+ /**
1114
+ * Close month/year picker when hidden, otherwise
1115
+ * it will be open when re-presented with a 0-height
1116
+ * scroll area, showing the wrong month.
1117
+ */
1118
+ this.showMonthAndYear = false;
1119
+ writeTask(() => {
1120
+ el.classList.remove('datetime-ready');
1121
+ });
1122
+ }
1123
+ });
1124
+ /**
1125
+ * Use raf to avoid a race condition between the component loading and
1126
+ * its display animation starting (such as when shown in a modal).
1127
+ */
1128
+ raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
1129
+ }
1130
+ else {
1131
+ /**
1132
+ * Fallback for test environments where ResizeObserver is not available.
1133
+ * Just mark as ready without initializing scroll/keyboard listeners
1134
+ * since those also require browser APIs not available in Jest.
1135
+ */
1136
+ writeTask(() => {
1137
+ el.classList.add('datetime-ready');
1138
+ });
1139
+ }
1128
1140
  /**
1129
1141
  * Datetime uses Ionic components that emit
1130
1142
  * ionFocus and ionBlur. These events are
@@ -1853,7 +1865,7 @@ const Datetime = class {
1853
1865
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
1854
1866
  const hasWheelVariant = hasDatePresentation && preferWheel;
1855
1867
  renderHiddenInput(true, el, name, formatValue(value), disabled);
1856
- return (h(Host, { key: 'f4d2e6577c288bdbd814760ab70cccfd91815f06', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1868
+ return (h(Host, { key: '187a5b5cf1413449a9db33f8c5b0fd3b7fded302', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
1857
1869
  [mode]: true,
1858
1870
  ['datetime-readonly']: readonly,
1859
1871
  ['datetime-disabled']: disabled,