@ionic/core 7.7.3-dev.11707927732.13defc00 → 7.7.3-dev.11709159644.114cd8b1

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.
Files changed (69) hide show
  1. package/components/data.js +23 -38
  2. package/components/ion-content.js +3 -4
  3. package/components/ion-datetime-button.js +11 -10
  4. package/components/ion-datetime.js +69 -7
  5. package/components/ion-searchbar.js +34 -5
  6. package/dist/cjs/{data-a5109f09.js → data-4487a815.js} +22 -39
  7. package/dist/cjs/ion-app_8.cjs.entry.js +3 -4
  8. package/dist/cjs/ion-datetime-button.cjs.entry.js +11 -10
  9. package/dist/cjs/ion-datetime_3.cjs.entry.js +66 -7
  10. package/dist/cjs/ion-searchbar.cjs.entry.js +28 -4
  11. package/dist/cjs/ionic.cjs.js +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/components/content/content.js +3 -4
  14. package/dist/collection/components/datetime/datetime.js +50 -7
  15. package/dist/collection/components/datetime/test/basic/datetime.e2e.js +77 -0
  16. package/dist/collection/components/datetime/test/format.spec.js +65 -15
  17. package/dist/collection/components/datetime/utils/format.js +24 -37
  18. package/dist/collection/components/datetime/utils/validate.js +45 -0
  19. package/dist/collection/components/datetime-button/datetime-button.js +11 -10
  20. package/dist/collection/components/datetime-button/test/basic/datetime-button.e2e.js +65 -0
  21. package/dist/collection/components/searchbar/searchbar.js +84 -5
  22. package/dist/collection/components/searchbar/test/searchbar.spec.js +20 -2
  23. package/dist/docs.json +113 -1
  24. package/dist/esm/{data-0f3ab200.js → data-bb424ba8.js} +23 -38
  25. package/dist/esm/ion-app_8.entry.js +3 -4
  26. package/dist/esm/ion-datetime-button.entry.js +11 -10
  27. package/dist/esm/ion-datetime_3.entry.js +66 -7
  28. package/dist/esm/ion-searchbar.entry.js +29 -5
  29. package/dist/esm/ionic.js +1 -1
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/esm-es5/data-bb424ba8.js +4 -0
  32. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  33. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  34. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  35. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  36. package/dist/esm-es5/ionic.js +1 -1
  37. package/dist/esm-es5/loader.js +1 -1
  38. package/dist/html.html-data.json +12 -0
  39. package/dist/ionic/ionic.esm.js +1 -1
  40. package/dist/ionic/p-0b34d3a7.system.js +1 -1
  41. package/dist/ionic/p-2d95cfc5.entry.js +4 -0
  42. package/dist/ionic/p-31450f73.entry.js +4 -0
  43. package/dist/ionic/p-3789920e.js +4 -0
  44. package/dist/ionic/p-8a1b0abb.system.js +4 -0
  45. package/dist/ionic/p-9f207856.entry.js +4 -0
  46. package/dist/ionic/p-b18b2148.system.entry.js +4 -0
  47. package/dist/ionic/p-d8ee0efe.system.entry.js +4 -0
  48. package/dist/ionic/p-dbd70d97.system.entry.js +4 -0
  49. package/dist/ionic/p-e942b677.entry.js +4 -0
  50. package/dist/ionic/p-e9b9a128.system.entry.js +4 -0
  51. package/dist/types/components/datetime/datetime-interface.d.ts +10 -0
  52. package/dist/types/components/datetime/datetime.d.ts +9 -1
  53. package/dist/types/components/datetime/utils/format.d.ts +7 -13
  54. package/dist/types/components/datetime/utils/validate.d.ts +8 -0
  55. package/dist/types/components/searchbar/searchbar.d.ts +38 -0
  56. package/dist/types/components.d.ts +34 -2
  57. package/hydrate/index.js +130 -60
  58. package/package.json +1 -1
  59. package/dist/esm-es5/data-0f3ab200.js +0 -4
  60. package/dist/ionic/p-0e23c289.system.entry.js +0 -4
  61. package/dist/ionic/p-206c34f8.system.entry.js +0 -4
  62. package/dist/ionic/p-2327064c.entry.js +0 -4
  63. package/dist/ionic/p-23c73017.entry.js +0 -4
  64. package/dist/ionic/p-68ba8e77.system.entry.js +0 -4
  65. package/dist/ionic/p-7330c044.system.js +0 -4
  66. package/dist/ionic/p-8821fd17.entry.js +0 -4
  67. package/dist/ionic/p-a6e465f5.entry.js +0 -4
  68. package/dist/ionic/p-e81bf09e.system.entry.js +0 -4
  69. package/dist/ionic/p-f7dce541.js +0 -4
package/hydrate/index.js CHANGED
@@ -14917,9 +14917,8 @@ class Content {
14917
14917
  const forceOverscroll = this.shouldForceOverscroll();
14918
14918
  const transitionShadow = mode === 'ios';
14919
14919
  const TagType = isMainContent ? 'main' : 'div';
14920
- console.log('content render');
14921
14920
  this.resize();
14922
- return (hAsync(Host, { key: '633a697a4212fd7f291052bc5e2907c12992dc0c', class: createColorClasses$1(this.color, {
14921
+ return (hAsync(Host, { key: '65d85e1f7f85876a76eec79addc4bd9f697a5d84', class: createColorClasses$1(this.color, {
14923
14922
  [mode]: true,
14924
14923
  'content-sizing': hostContext('ion-popover', this.el),
14925
14924
  overscroll: forceOverscroll,
@@ -14927,12 +14926,12 @@ class Content {
14927
14926
  }), style: {
14928
14927
  '--offset-top': `${this.cTop}px`,
14929
14928
  '--offset-bottom': `${this.cBottom}px`,
14930
- } }, hAsync("div", { key: 'dddbbeb79797bbcab9d75915c843d0be12e1bb59', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), hAsync(TagType, { key: '18f37ebafb0c136ceaf55714c135a2324691d9a9', class: {
14929
+ } }, hAsync("div", { key: 'e2ac474a62cbc864772c497469100436f41289ff', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), hAsync(TagType, { key: '567a4bc2bcb13adfd987b088f95ac4b20b789f2c', class: {
14931
14930
  'inner-scroll': true,
14932
14931
  'scroll-x': scrollX,
14933
14932
  'scroll-y': scrollY,
14934
14933
  overscroll: (scrollX || scrollY) && forceOverscroll,
14935
- }, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '3893e1142367938e35c6ff67095b6074a2b5dad1' })), transitionShadow ? (hAsync("div", { class: "transition-effect" }, hAsync("div", { class: "transition-cover" }), hAsync("div", { class: "transition-shadow" }))) : null, hAsync("slot", { key: '2fb9cdb61bae969d23ee8b190ab26e403a46481d', name: "fixed" })));
14934
+ }, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '13909f87dd9f49bf1664ad95038499da376b9480' })), transitionShadow ? (hAsync("div", { class: "transition-effect" }, hAsync("div", { class: "transition-cover" }), hAsync("div", { class: "transition-shadow" }))) : null, hAsync("slot", { key: '05b56c139e203cfd1e3dd08054e99328e97e9243', name: "fixed" })));
14936
14935
  }
14937
14936
  get el() { return getElement(this); }
14938
14937
  static get style() { return IonContentStyle0; }
@@ -15914,7 +15913,25 @@ const getFormattedDayPeriod = (dayPeriod) => {
15914
15913
  }
15915
15914
  return dayPeriod.toUpperCase();
15916
15915
  };
15917
- const getLocalizedTime = (locale, refParts, hourCycle) => {
15916
+ /**
15917
+ * Including time zone options may lead to the rendered text showing a
15918
+ * different time from what was selected in the Datetime, which could cause
15919
+ * confusion.
15920
+ */
15921
+ const stripTimeZone = (formatOptions) => {
15922
+ return Object.assign(Object.assign({}, formatOptions), {
15923
+ /**
15924
+ * Setting the time zone to UTC ensures that the value shown is always the
15925
+ * same as what was selected and safeguards against older Safari bugs with
15926
+ * Intl.DateTimeFormat.
15927
+ */
15928
+ timeZone: 'UTC',
15929
+ /**
15930
+ * We do not want to display the time zone name
15931
+ */
15932
+ timeZoneName: undefined });
15933
+ };
15934
+ const getLocalizedTime = (locale, refParts, hourCycle, formatOptions = { hour: 'numeric', minute: 'numeric' }) => {
15918
15935
  const timeParts = {
15919
15936
  hour: refParts.hour,
15920
15937
  minute: refParts.minute,
@@ -15922,28 +15939,12 @@ const getLocalizedTime = (locale, refParts, hourCycle) => {
15922
15939
  if (timeParts.hour === undefined || timeParts.minute === undefined) {
15923
15940
  return 'Invalid Time';
15924
15941
  }
15925
- return new Intl.DateTimeFormat(locale, {
15926
- hour: 'numeric',
15927
- minute: 'numeric',
15928
- /**
15929
- * Setting the timeZone to UTC prevents
15930
- * new Intl.DatetimeFormat from subtracting
15931
- * the user's current timezone offset
15932
- * when formatting the time.
15933
- */
15934
- timeZone: 'UTC',
15942
+ return new Intl.DateTimeFormat(locale, Object.assign(Object.assign({}, stripTimeZone(formatOptions)), {
15935
15943
  /**
15936
15944
  * We use hourCycle here instead of hour12 due to:
15937
15945
  * https://bugs.chromium.org/p/chromium/issues/detail?id=1347316&q=hour12&can=2
15938
15946
  */
15939
- hourCycle,
15940
- /**
15941
- * Setting Z at the end indicates that this
15942
- * date string is in the UTC time zone. This
15943
- * prevents new Date from adding the time zone
15944
- * offset when getting the ISO string.
15945
- */
15946
- }).format(new Date(convertDataToISO(Object.assign({
15947
+ hourCycle })).format(new Date(convertDataToISO(Object.assign({
15947
15948
  /**
15948
15949
  * JS uses a simplified ISO 8601 format which allows for
15949
15950
  * date-only formats and date-time formats, but not
@@ -16029,14 +16030,6 @@ const generateDayAriaLabel = (locale, today, refParts) => {
16029
16030
  */
16030
16031
  return today ? `Today, ${labelString}` : labelString;
16031
16032
  };
16032
- /**
16033
- * Gets the day of the week, month, and day
16034
- * Used for the header in MD mode.
16035
- */
16036
- const getMonthAndDay = (locale, refParts) => {
16037
- const date = getNormalizedDate(refParts);
16038
- return new Intl.DateTimeFormat(locale, { weekday: 'short', month: 'short', day: 'numeric', timeZone: 'UTC' }).format(date);
16039
- };
16040
16033
  /**
16041
16034
  * Given a locale and a date object,
16042
16035
  * return a formatted string that includes
@@ -16047,15 +16040,6 @@ const getMonthAndYear = (locale, refParts) => {
16047
16040
  const date = getNormalizedDate(refParts);
16048
16041
  return new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric', timeZone: 'UTC' }).format(date);
16049
16042
  };
16050
- /**
16051
- * Given a locale and a date object,
16052
- * return a formatted string that includes
16053
- * the short month, numeric day, and full year.
16054
- * Example: Apr 22, 2021
16055
- */
16056
- const getMonthDayAndYear = (locale, refParts) => {
16057
- return getLocalizedDateTime(locale, refParts, { month: 'short', day: 'numeric', year: 'numeric' });
16058
- };
16059
16043
  /**
16060
16044
  * Given a locale and a date object,
16061
16045
  * return a formatted string that includes
@@ -16105,7 +16089,7 @@ const getNormalizedDate = (refParts) => {
16105
16089
  */
16106
16090
  const getLocalizedDateTime = (locale, refParts, options) => {
16107
16091
  const date = getNormalizedDate(refParts);
16108
- return getDateTimeFormat(locale, options).format(date);
16092
+ return getDateTimeFormat(locale, stripTimeZone(options)).format(date);
16109
16093
  };
16110
16094
  /**
16111
16095
  * Given a locale, DatetimeParts, and options
@@ -16871,6 +16855,48 @@ const getHighlightStyles = (highlightedDates, dateIsoString, el) => {
16871
16855
  return undefined;
16872
16856
  };
16873
16857
 
16858
+ /**
16859
+ * If a time zone is provided in the format options, the rendered text could
16860
+ * differ from what was selected in the Datetime, which could cause
16861
+ * confusion.
16862
+ */
16863
+ const warnIfTimeZoneProvided = (el, formatOptions) => {
16864
+ var _a, _b, _c, _d;
16865
+ if (((_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _a === void 0 ? void 0 : _a.timeZone) ||
16866
+ ((_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _b === void 0 ? void 0 : _b.timeZoneName) ||
16867
+ ((_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _c === void 0 ? void 0 : _c.timeZone) ||
16868
+ ((_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _d === void 0 ? void 0 : _d.timeZoneName)) {
16869
+ printIonWarning('Datetime: "timeZone" and "timeZoneName" are not supported in "formatOptions".', el);
16870
+ }
16871
+ };
16872
+ const checkForPresentationFormatMismatch = (el, presentation, formatOptions) => {
16873
+ // formatOptions is not required
16874
+ if (!formatOptions)
16875
+ return;
16876
+ // If formatOptions is provided, the date and/or time objects are required, depending on the presentation
16877
+ switch (presentation) {
16878
+ case 'date':
16879
+ case 'month-year':
16880
+ case 'month':
16881
+ case 'year':
16882
+ if (formatOptions.date === undefined) {
16883
+ printIonWarning(`Datetime: The '${presentation}' presentation requires a date object in formatOptions.`, el);
16884
+ }
16885
+ break;
16886
+ case 'time':
16887
+ if (formatOptions.time === undefined) {
16888
+ printIonWarning(`Datetime: The 'time' presentation requires a time object in formatOptions.`, el);
16889
+ }
16890
+ break;
16891
+ case 'date-time':
16892
+ case 'time-date':
16893
+ if (formatOptions.date === undefined && formatOptions.time === undefined) {
16894
+ printIonWarning(`Datetime: The '${presentation}' presentation requires either a date or time object (or both) in formatOptions.`, el);
16895
+ }
16896
+ break;
16897
+ }
16898
+ };
16899
+
16874
16900
  const datetimeIosCss = "/*!@:host*/.sc-ion-datetime-ios-h{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}/*!@ion-picker-column-internal*/ion-picker-column-internal.sc-ion-datetime-ios{min-width:26px}/*!@:host(.datetime-size-fixed)*/.datetime-size-fixed.sc-ion-datetime-ios-h{width:auto;height:auto}/*!@:host(.datetime-size-fixed:not(.datetime-prefer-wheel))*/.datetime-size-fixed.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel){max-width:350px}/*!@:host(.datetime-size-fixed.datetime-prefer-wheel)*/.datetime-size-fixed.datetime-prefer-wheel.sc-ion-datetime-ios-h{min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}/*!@:host(.datetime-size-cover)*/.datetime-size-cover.sc-ion-datetime-ios-h{width:100%}/*!@:host .calendar-body,\n:host .datetime-year*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{opacity:0}/*!@:host(:not(.datetime-ready)) .datetime-year*/.sc-ion-datetime-ios-h:not(.datetime-ready) .datetime-year.sc-ion-datetime-ios{position:absolute;pointer-events:none}/*!@:host(.datetime-ready) .calendar-body*/.datetime-ready.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios{opacity:1}/*!@:host(.datetime-ready) .datetime-year*/.datetime-ready.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{display:none;opacity:1}/*!@:host .wheel-order-year-first .day-column*/.sc-ion-datetime-ios-h .wheel-order-year-first.sc-ion-datetime-ios .day-column.sc-ion-datetime-ios{-ms-flex-order:3;order:3;text-align:end}/*!@:host .wheel-order-year-first .month-column*/.sc-ion-datetime-ios-h .wheel-order-year-first.sc-ion-datetime-ios .month-column.sc-ion-datetime-ios{-ms-flex-order:2;order:2;text-align:end}/*!@:host .wheel-order-year-first .year-column*/.sc-ion-datetime-ios-h .wheel-order-year-first.sc-ion-datetime-ios .year-column.sc-ion-datetime-ios{-ms-flex-order:1;order:1;text-align:start}/*!@:host .datetime-calendar,\n:host .datetime-year*/.sc-ion-datetime-ios-h .datetime-calendar.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}/*!@:host(.show-month-and-year) .datetime-year*/.show-month-and-year.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{display:-ms-flexbox;display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-ios-h .calendar-next-prev.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{position:absolute;visibility:hidden;pointer-events:none}/*!@@supports (inset-inline-start: 0)*/@supports .sc-ion-datetime-ios (inset-inline-start.sc-ion-datetime-ios: 0).sc-ion-datetime-ios{.sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h.show-month-and-year .datetime-time{inset-inline-start:-99999px}}/*!@@supports not (inset-inline-start: 0)*/@supports .sc-ion-datetime-ios not.sc-ion-datetime-ios (inset-inline-start.sc-ion-datetime-ios: 0).sc-ion-datetime-ios{.sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h.show-month-and-year .datetime-time{left:-99999px}.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .calendar-next-prev,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .calendar-next-prev,.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .calendar-days-of-week,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .calendar-days-of-week,.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .calendar-body,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .calendar-body,.sc-ion-datetime-ios-h[dir=rtl].sc-ion-datetime-ios-h.show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-ios-h.sc-ion-datetime-ios-h.show-month-and-year .datetime-time,.sc-ion-datetime-ios-h[dir=rtl].show-month-and-year .datetime-time,[dir=rtl] .sc-ion-datetime-ios-h.show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}@supports selector(:dir(rtl)){.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .calendar-next-prev,.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .calendar-days-of-week,.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .calendar-body,.sc-ion-datetime-ios-h.show-month-and-year:dir(rtl) .datetime-time{left:unset;right:unset;right:-99999px}}}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){/*!@:host(.show-month-and-year) .calendar-next-prev,\n :host(.show-month-and-year) .calendar-days-of-week,\n :host(.show-month-and-year) .calendar-body,\n :host(.show-month-and-year) .datetime-time*/.show-month-and-year.sc-ion-datetime-ios-h .calendar-next-prev.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.show-month-and-year.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{display:none}}/*!@:host(.month-year-picker-open) .datetime-footer*/.month-year-picker-open.sc-ion-datetime-ios-h .datetime-footer.sc-ion-datetime-ios{display:none}/*!@:host(.datetime-disabled)*/.datetime-disabled.sc-ion-datetime-ios-h{pointer-events:none}/*!@:host(.datetime-disabled) .calendar-days-of-week,\n:host(.datetime-disabled) .datetime-time*/.datetime-disabled.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios,.datetime-disabled.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{opacity:0.4}/*!@:host(.datetime-readonly)*/.datetime-readonly.sc-ion-datetime-ios-h{pointer-events:none}/*!@:host(.datetime-readonly) .calendar-action-buttons,\n:host(.datetime-readonly) .calendar-body,\n:host(.datetime-readonly) .datetime-year*/.datetime-readonly.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios,.datetime-readonly.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios,.datetime-readonly.sc-ion-datetime-ios-h .datetime-year.sc-ion-datetime-ios{pointer-events:initial}/*!@:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),\n:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]*/.datetime-readonly.sc-ion-datetime-ios-h .calendar-day[disabled].sc-ion-datetime-ios:not(.calendar-day-constrained),.datetime-readonly.sc-ion-datetime-ios-h .datetime-action-buttons.sc-ion-datetime-ios ion-button[disabled].sc-ion-datetime-ios{opacity:1}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios .datetime-title.sc-ion-datetime-ios{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}/*!@:host .datetime-action-buttons.has-clear-button*/.sc-ion-datetime-ios-h .datetime-action-buttons.has-clear-button.sc-ion-datetime-ios{width:100%}/*!@:host .datetime-action-buttons ion-buttons*/.sc-ion-datetime-ios-h .datetime-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@.datetime-action-buttons .datetime-action-buttons-container*/.datetime-action-buttons.sc-ion-datetime-ios .datetime-action-buttons-container.sc-ion-datetime-ios{display:-ms-flexbox;display:flex}/*!@:host .calendar-action-buttons*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host .calendar-action-buttons ion-item,\n:host .calendar-action-buttons ion-button*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-button.sc-ion-datetime-ios{--background:translucent}/*!@:host .calendar-action-buttons ion-item ion-label*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios ion-label.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:auto}/*!@:host .calendar-action-buttons ion-item ion-icon*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios ion-icon.sc-ion-datetime-ios{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-ios .day-of-week.sc-ion-datetime-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}/*!@:host .calendar-body*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}/*!@:host .calendar-body .calendar-month*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}/*!@:host .calendar-body .calendar-month-disabled*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month-disabled.sc-ion-datetime-ios{scroll-snap-align:none}/*!@:host .calendar-body::-webkit-scrollbar*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios::-webkit-scrollbar{display:none}/*!@:host .calendar-body .calendar-month-grid*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month-grid.sc-ion-datetime-ios{display:grid;grid-template-columns:repeat(7, 1fr)}/*!@:host .calendar-day-wrapper*/.sc-ion-datetime-ios-h .calendar-day-wrapper.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-ios{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}/*!@:host .calendar-day[disabled]*/.sc-ion-datetime-ios-h .calendar-day[disabled].sc-ion-datetime-ios{pointer-events:none;opacity:0.4}/*!@.calendar-day:focus*/.calendar-day.sc-ion-datetime-ios:focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}/*!@:host .datetime-time*/.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}/*!@:host(.datetime-presentation-time) .datetime-time*/.datetime-presentation-time.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}/*!@:host ion-popover*/.sc-ion-datetime-ios-h ion-popover.sc-ion-datetime-ios{--height:200px}/*!@:host .time-header*/.sc-ion-datetime-ios-h .time-header.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}/*!@:host .time-body*/.sc-ion-datetime-ios-h .time-body.sc-ion-datetime-ios{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}/*!@:host .time-body-active*/.sc-ion-datetime-ios-h .time-body-active.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@:host(.in-item)*/.in-item.sc-ion-datetime-ios-h{position:static}/*!@:host(.show-month-and-year) .calendar-action-buttons ion-item*/.show-month-and-year.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios{--color:var(--ion-color-base)}/*!@:host*/.sc-ion-datetime-ios-h{--background:var(--ion-color-light, #ffffff);--background-rgb:var(--ion-color-light-rgb);--title-color:var(--ion-color-step-600, #666666)}/*!@:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),\n:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),\n:host(.datetime-presentation-date:not(.datetime-prefer-wheel))*/.datetime-presentation-date-time.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel),.datetime-presentation-time-date.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel),.datetime-presentation-date.sc-ion-datetime-ios-h:not(.datetime-prefer-wheel){min-height:350px}/*!@:host .datetime-header*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, #cccccc);font-size:min(0.875rem, 22.4px)}/*!@:host .datetime-header .datetime-title*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios .datetime-title.sc-ion-datetime-ios{color:var(--title-color)}/*!@:host .datetime-header .datetime-selected-date*/.sc-ion-datetime-ios-h .datetime-header.sc-ion-datetime-ios .datetime-selected-date.sc-ion-datetime-ios{margin-top:10px}/*!@:host .calendar-action-buttons ion-item*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios{--padding-start:16px;--background-hover:transparent;--background-activated:transparent;font-size:min(1rem, 25.6px);font-weight:600}/*!@:host .calendar-action-buttons ion-item ion-icon,\n:host .calendar-action-buttons ion-buttons ion-button*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-item.sc-ion-datetime-ios ion-icon.sc-ion-datetime-ios,.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios ion-button.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@:host .calendar-action-buttons ion-buttons*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}/*!@:host .calendar-action-buttons ion-buttons ion-button*/.sc-ion-datetime-ios-h .calendar-action-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios ion-button.sc-ion-datetime-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}/*!@:host .calendar-days-of-week*/.sc-ion-datetime-ios-h .calendar-days-of-week.sc-ion-datetime-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, #b3b3b3);font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-ios .day-of-week.sc-ion-datetime-ios{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-ios{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){/*!@.calendar-days-of-week .day-of-week*/.calendar-days-of-week.sc-ion-datetime-ios .day-of-week.sc-ion-datetime-ios{width:auto;height:auto;overflow:initial}/*!@.calendar-day*/.calendar-day.sc-ion-datetime-ios{border-radius:32px}}/*!@:host .calendar-body .calendar-month .calendar-month-grid*/.sc-ion-datetime-ios-h .calendar-body.sc-ion-datetime-ios .calendar-month.sc-ion-datetime-ios .calendar-month-grid.sc-ion-datetime-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}/*!@:host .calendar-day-wrapper*/.sc-ion-datetime-ios-h .calendar-day-wrapper.sc-ion-datetime-ios{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}/*!@:host .calendar-day*/.sc-ion-datetime-ios-h .calendar-day.sc-ion-datetime-ios{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}/*!@.calendar-day.calendar-day-active*/.calendar-day.calendar-day-active.sc-ion-datetime-ios{background:rgba(var(--ion-color-base-rgb), 0.2)}/*!@:host .calendar-day.calendar-day-today*/.sc-ion-datetime-ios-h .calendar-day.calendar-day-today.sc-ion-datetime-ios{color:var(--ion-color-base)}/*!@:host .calendar-day.calendar-day-active*/.sc-ion-datetime-ios-h .calendar-day.calendar-day-active.sc-ion-datetime-ios{color:var(--ion-color-base);font-weight:600}/*!@:host .calendar-day.calendar-day-today.calendar-day-active*/.sc-ion-datetime-ios-h .calendar-day.calendar-day-today.calendar-day-active.sc-ion-datetime-ios{background:var(--ion-color-base);color:var(--ion-color-contrast)}/*!@:host .datetime-time*/.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}/*!@:host .datetime-time .time-header*/.sc-ion-datetime-ios-h .datetime-time.sc-ion-datetime-ios .time-header.sc-ion-datetime-ios{font-weight:600}/*!@:host .datetime-buttons*/.sc-ion-datetime-ios-h .datetime-buttons.sc-ion-datetime-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, #cccccc)}/*!@:host .datetime-buttons ::slotted(ion-buttons),\n:host .datetime-buttons ion-buttons*/.sc-ion-datetime-ios-h .datetime-buttons .sc-ion-datetime-ios-s>ion-buttons,.sc-ion-datetime-ios-h .datetime-buttons.sc-ion-datetime-ios ion-buttons.sc-ion-datetime-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}/*!@:host .datetime-action-buttons*/.sc-ion-datetime-ios-h .datetime-action-buttons.sc-ion-datetime-ios{width:100%}";
16875
16901
  var IonDatetimeIosStyle0 = datetimeIosCss;
16876
16902
 
@@ -17519,6 +17545,7 @@ class Datetime {
17519
17545
  this.color = 'primary';
17520
17546
  this.name = this.inputId;
17521
17547
  this.disabled = false;
17548
+ this.formatOptions = undefined;
17522
17549
  this.readonly = false;
17523
17550
  this.isDateEnabled = undefined;
17524
17551
  this.min = undefined;
@@ -17546,6 +17573,11 @@ class Datetime {
17546
17573
  this.size = 'fixed';
17547
17574
  this.preferWheel = false;
17548
17575
  }
17576
+ formatOptionsChanged() {
17577
+ const { el, formatOptions, presentation } = this;
17578
+ checkForPresentationFormatMismatch(el, presentation, formatOptions);
17579
+ warnIfTimeZoneProvided(el, formatOptions);
17580
+ }
17549
17581
  disabledChanged() {
17550
17582
  this.emitStyle();
17551
17583
  }
@@ -17555,6 +17587,10 @@ class Datetime {
17555
17587
  maxChanged() {
17556
17588
  this.processMaxParts();
17557
17589
  }
17590
+ presentationChanged() {
17591
+ const { el, formatOptions, presentation } = this;
17592
+ checkForPresentationFormatMismatch(el, presentation, formatOptions);
17593
+ }
17558
17594
  get isGridStyle() {
17559
17595
  const { presentation, preferWheel } = this;
17560
17596
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
@@ -17790,7 +17826,7 @@ class Datetime {
17790
17826
  });
17791
17827
  }
17792
17828
  componentWillLoad() {
17793
- const { el, highlightedDates, multiple, presentation, preferWheel } = this;
17829
+ const { el, formatOptions, highlightedDates, multiple, presentation, preferWheel } = this;
17794
17830
  if (multiple) {
17795
17831
  if (presentation !== 'date') {
17796
17832
  printIonWarning('Multiple date selection is only supported for presentation="date".', el);
@@ -17807,6 +17843,10 @@ class Datetime {
17807
17843
  printIonWarning('The highlightedDates property is not supported with preferWheel="true".', el);
17808
17844
  }
17809
17845
  }
17846
+ if (formatOptions) {
17847
+ checkForPresentationFormatMismatch(el, presentation, formatOptions);
17848
+ warnIfTimeZoneProvided(el, formatOptions);
17849
+ }
17810
17850
  const hourValues = (this.parsedHourValues = convertToArrayOfNumbers(this.hourValues));
17811
17851
  const minuteValues = (this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues));
17812
17852
  const monthValues = (this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues));
@@ -18314,7 +18354,7 @@ class Datetime {
18314
18354
  return hAsync("slot", { name: "time-label" }, "Time");
18315
18355
  }
18316
18356
  renderTimeOverlay() {
18317
- const { disabled, hourCycle, isTimePopoverOpen, locale } = this;
18357
+ const { disabled, hourCycle, isTimePopoverOpen, locale, formatOptions } = this;
18318
18358
  const computedHourCycle = getHourCycle(locale, hourCycle);
18319
18359
  const activePart = this.getActivePartsWithFallback();
18320
18360
  return [
@@ -18334,7 +18374,7 @@ class Datetime {
18334
18374
  await popoverRef.onWillDismiss();
18335
18375
  this.isTimePopoverOpen = false;
18336
18376
  }
18337
- } }, getLocalizedTime(locale, activePart, computedHourCycle)),
18377
+ } }, getLocalizedTime(locale, activePart, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time)),
18338
18378
  hAsync("ion-popover", { alignment: "center", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {
18339
18379
  /**
18340
18380
  * Intersection Observers do not consistently fire between Blink and Webkit
@@ -18357,7 +18397,8 @@ class Datetime {
18357
18397
  ];
18358
18398
  }
18359
18399
  getHeaderSelectedDateText() {
18360
- const { activeParts, multiple, titleSelectedDatesFormatter } = this;
18400
+ var _a;
18401
+ const { activeParts, formatOptions, multiple, titleSelectedDatesFormatter } = this;
18361
18402
  const isArray = Array.isArray(activeParts);
18362
18403
  let headerText;
18363
18404
  if (multiple && isArray && activeParts.length !== 1) {
@@ -18373,7 +18414,7 @@ class Datetime {
18373
18414
  }
18374
18415
  else {
18375
18416
  // for exactly 1 day selected (multiple set or not), show a formatted version of that
18376
- headerText = getMonthAndDay(this.locale, this.getActivePartsWithFallback());
18417
+ headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { weekday: 'short', month: 'short', day: 'numeric' });
18377
18418
  }
18378
18419
  return headerText;
18379
18420
  }
@@ -18462,7 +18503,7 @@ class Datetime {
18462
18503
  const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
18463
18504
  const hasWheelVariant = hasDatePresentation && preferWheel;
18464
18505
  renderHiddenInput(true, el, name, formatValue(value), disabled);
18465
- return (hAsync(Host, { key: 'b00545b7bbba3ccf35d53c1eec4f1614fb830c11', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses$1(color, {
18506
+ return (hAsync(Host, { key: 'b12b07aebad0a686f93f70dbe29bd039b4c4104f', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses$1(color, {
18466
18507
  [mode]: true,
18467
18508
  ['datetime-readonly']: readonly,
18468
18509
  ['datetime-disabled']: disabled,
@@ -18476,9 +18517,11 @@ class Datetime {
18476
18517
  }
18477
18518
  get el() { return getElement(this); }
18478
18519
  static get watchers() { return {
18520
+ "formatOptions": ["formatOptionsChanged"],
18479
18521
  "disabled": ["disabledChanged"],
18480
18522
  "min": ["minChanged"],
18481
18523
  "max": ["maxChanged"],
18524
+ "presentation": ["presentationChanged"],
18482
18525
  "yearValues": ["yearValuesChanged"],
18483
18526
  "monthValues": ["monthValuesChanged"],
18484
18527
  "dayValues": ["dayValuesChanged"],
@@ -18497,6 +18540,7 @@ class Datetime {
18497
18540
  "color": [1],
18498
18541
  "name": [1],
18499
18542
  "disabled": [4],
18543
+ "formatOptions": [16],
18500
18544
  "readonly": [4],
18501
18545
  "isDateEnabled": [16],
18502
18546
  "min": [1025],
@@ -18579,11 +18623,12 @@ class DatetimeButton {
18579
18623
  * to the locale specified on ion-datetime.
18580
18624
  */
18581
18625
  this.setDateTimeText = () => {
18626
+ var _a, _b, _c, _d, _e;
18582
18627
  const { datetimeEl, datetimePresentation } = this;
18583
18628
  if (!datetimeEl) {
18584
18629
  return;
18585
18630
  }
18586
- const { value, locale, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;
18631
+ const { value, locale, formatOptions, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;
18587
18632
  const parsedValues = this.getParsedDateValues(value);
18588
18633
  /**
18589
18634
  * Both ion-datetime and ion-datetime-button default
@@ -18606,8 +18651,8 @@ class DatetimeButton {
18606
18651
  switch (datetimePresentation) {
18607
18652
  case 'date-time':
18608
18653
  case 'time-date':
18609
- const dateText = getMonthDayAndYear(locale, firstParsedDatetime);
18610
- const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle);
18654
+ const dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { month: 'short', day: 'numeric', year: 'numeric' });
18655
+ const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time);
18611
18656
  if (preferWheel) {
18612
18657
  this.dateText = `${dateText} ${timeText}`;
18613
18658
  }
@@ -18630,20 +18675,20 @@ class DatetimeButton {
18630
18675
  this.dateText = headerText;
18631
18676
  }
18632
18677
  else {
18633
- this.dateText = getMonthDayAndYear(locale, firstParsedDatetime);
18678
+ this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _b !== void 0 ? _b : { month: 'short', day: 'numeric', year: 'numeric' });
18634
18679
  }
18635
18680
  break;
18636
18681
  case 'time':
18637
- this.timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle);
18682
+ this.timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time);
18638
18683
  break;
18639
18684
  case 'month-year':
18640
- this.dateText = getMonthAndYear(locale, firstParsedDatetime);
18685
+ this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _c !== void 0 ? _c : { month: 'long', year: 'numeric' });
18641
18686
  break;
18642
18687
  case 'month':
18643
- this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, { month: 'long' });
18688
+ this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) !== null && _d !== void 0 ? _d : { month: 'long' });
18644
18689
  break;
18645
18690
  case 'year':
18646
- this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, { year: 'numeric' });
18691
+ this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_e = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) !== null && _e !== void 0 ? _e : { year: 'numeric' });
18647
18692
  break;
18648
18693
  }
18649
18694
  };
@@ -18872,7 +18917,7 @@ class DatetimeButton {
18872
18917
  render() {
18873
18918
  const { color, dateText, timeText, selectedButton, datetimeActive, disabled } = this;
18874
18919
  const mode = getIonMode$1(this);
18875
- return (hAsync(Host, { key: '36fe34d4225940611d74bdef5b954d54749d2dca', class: createColorClasses$1(color, {
18920
+ return (hAsync(Host, { key: '861a08f4a239de771875aee9b505e06ac7064b32', class: createColorClasses$1(color, {
18876
18921
  [mode]: true,
18877
18922
  [`${selectedButton}-active`]: datetimeActive,
18878
18923
  ['datetime-button-disabled']: disabled,
@@ -33357,6 +33402,7 @@ class Searchbar {
33357
33402
  this.isCancelVisible = false;
33358
33403
  this.shouldAlignLeft = true;
33359
33404
  this.inputId = `ion-searchbar-${searchbarIds++}`;
33405
+ this.inheritedAttributes = {};
33360
33406
  /**
33361
33407
  * Clears the input field and triggers the control change.
33362
33408
  */
@@ -33457,6 +33503,7 @@ class Searchbar {
33457
33503
  this.noAnimate = true;
33458
33504
  this.color = undefined;
33459
33505
  this.animated = false;
33506
+ this.autocapitalize = undefined;
33460
33507
  this.autocomplete = 'off';
33461
33508
  this.autocorrect = 'off';
33462
33509
  this.cancelButtonIcon = config.get('backButtonIcon', arrowBackSharp);
@@ -33466,6 +33513,8 @@ class Searchbar {
33466
33513
  this.disabled = false;
33467
33514
  this.inputmode = undefined;
33468
33515
  this.enterkeyhint = undefined;
33516
+ this.maxlength = undefined;
33517
+ this.minlength = undefined;
33469
33518
  this.name = this.inputId;
33470
33519
  this.placeholder = 'Search';
33471
33520
  this.searchIcon = undefined;
@@ -33475,6 +33524,19 @@ class Searchbar {
33475
33524
  this.type = 'search';
33476
33525
  this.value = '';
33477
33526
  }
33527
+ /**
33528
+ * lang and dir are globally enumerated attributes.
33529
+ * As a result, creating these as properties
33530
+ * can have unintended side effects. Instead, we
33531
+ * listen for attribute changes and inherit them
33532
+ * to the inner `<input>` element.
33533
+ */
33534
+ onLangChanged(newValue) {
33535
+ this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { lang: newValue });
33536
+ }
33537
+ onDirChanged(newValue) {
33538
+ this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { dir: newValue });
33539
+ }
33478
33540
  debounceChanged() {
33479
33541
  const { ionInput, debounce, originalIonInput } = this;
33480
33542
  /**
@@ -33498,6 +33560,9 @@ class Searchbar {
33498
33560
  connectedCallback() {
33499
33561
  this.emitStyle();
33500
33562
  }
33563
+ componentWillLoad() {
33564
+ this.inheritedAttributes = Object.assign({}, inheritAttributes$1(this.el, ['lang', 'dir']));
33565
+ }
33501
33566
  componentDidLoad() {
33502
33567
  this.originalIonInput = this.ionInput;
33503
33568
  this.positionElements();
@@ -33696,8 +33761,8 @@ class Searchbar {
33696
33761
  const clearIcon = this.clearIcon || (mode === 'ios' ? closeCircle : closeSharp);
33697
33762
  const searchIcon = this.searchIcon || (mode === 'ios' ? searchOutline : searchSharp);
33698
33763
  const shouldShowCancelButton = this.shouldShowCancelButton();
33699
- const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '1de9b9bc6bad708bafcf4d31fa82838355120486', "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, hAsync("div", { key: 'e5178016e17104a80732edbae73c0dfc264bfe52', "aria-hidden": "true" }, mode === 'md' ? (hAsync("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
33700
- return (hAsync(Host, { key: '2c88a7b6ec7f33ada7dae560881210d7a8800f76', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses$1(this.color, {
33764
+ const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '1a68689b5c14cde6e071c4095457146b9ac2e7ab', "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, hAsync("div", { key: '25ae47914baa4b7e0281efb2b296d1799a56c764', "aria-hidden": "true" }, mode === 'md' ? (hAsync("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
33765
+ return (hAsync(Host, { key: '2cf545c40874bc4a19b6af022f5ec41b3a913495', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses$1(this.color, {
33701
33766
  [mode]: true,
33702
33767
  'searchbar-animated': animated,
33703
33768
  'searchbar-disabled': this.disabled,
@@ -33707,17 +33772,19 @@ class Searchbar {
33707
33772
  'searchbar-has-focus': this.focused,
33708
33773
  'searchbar-should-show-clear': this.shouldShowClearButton(),
33709
33774
  'searchbar-should-show-cancel': this.shouldShowCancelButton(),
33710
- }) }, hAsync("div", { key: '8e914264a99453748a2bf370943e4047a0a587fb', class: "searchbar-input-container" }, hAsync("input", { key: 'd772f3e8d42301e50fbd6c9deb332fbdf3c435ac', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }), mode === 'md' && cancelButton, hAsync("ion-icon", { key: '8d9b461c2c34729b1bb562c227868cf817a353bc', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), hAsync("button", { key: 'bcc39be721f4b825af31aae4dfb3058722d889a8', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
33775
+ }) }, hAsync("div", { key: '9cf49297278839bbe6e2ef9936de337daa53c08d', class: "searchbar-input-container" }, hAsync("input", Object.assign({ key: 'bae5db413a302e116012251746d599030f7158ce', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, minLength: this.minlength, maxLength: this.maxlength, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, hAsync("ion-icon", { key: '67c593ca842551d9e99e8239115cc7b43261b542', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), hAsync("button", { key: '6901c3f6c74cce2d3b7e46fbff85ee6e6399bdb1', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
33711
33776
  /**
33712
33777
  * This prevents mobile browsers from
33713
33778
  * blurring the input when the clear
33714
33779
  * button is activated.
33715
33780
  */
33716
33781
  ev.preventDefault();
33717
- }, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: '9a6478e1f1482aa6e62c88bd96cd19cacbfb8d60', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
33782
+ }, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: 'abd45fb79ee807cf8352aa7bf5b0342f2d686227', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
33718
33783
  }
33719
33784
  get el() { return getElement(this); }
33720
33785
  static get watchers() { return {
33786
+ "lang": ["onLangChanged"],
33787
+ "dir": ["onDirChanged"],
33721
33788
  "debounce": ["debounceChanged"],
33722
33789
  "value": ["valueChanged"],
33723
33790
  "showCancelButton": ["showCancelButtonChanged"]
@@ -33732,6 +33799,7 @@ class Searchbar {
33732
33799
  "$members$": {
33733
33800
  "color": [513],
33734
33801
  "animated": [4],
33802
+ "autocapitalize": [1],
33735
33803
  "autocomplete": [1],
33736
33804
  "autocorrect": [1],
33737
33805
  "cancelButtonIcon": [1, "cancel-button-icon"],
@@ -33741,6 +33809,8 @@ class Searchbar {
33741
33809
  "disabled": [4],
33742
33810
  "inputmode": [1],
33743
33811
  "enterkeyhint": [1],
33812
+ "maxlength": [2],
33813
+ "minlength": [2],
33744
33814
  "name": [1],
33745
33815
  "placeholder": [1],
33746
33816
  "searchIcon": [1, "search-icon"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "7.7.3-dev.11707927732.13defc00",
3
+ "version": "7.7.3-dev.11709159644.114cd8b1",
4
4
  "description": "Base components for Ionic",
5
5
  "keywords": [
6
6
  "ionic",
@@ -1,4 +0,0 @@
1
- import{__spreadArray}from"tslib";
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */import{p as printIonWarning}from"./index-9b0d46f4.js";var isSameDay=function(e,r){return e.month===r.month&&e.day===r.day&&e.year===r.year};var isBefore=function(e,r){return!!(e.year<r.year||e.year===r.year&&e.month<r.month||e.year===r.year&&e.month===r.month&&e.day!==null&&e.day<r.day)};var isAfter=function(e,r){return!!(e.year>r.year||e.year===r.year&&e.month>r.month||e.year===r.year&&e.month===r.month&&e.day!==null&&e.day>r.day)};var warnIfValueOutOfBounds=function(e,r,n){var a=Array.isArray(e)?e:[e];for(var t=0,i=a;t<i.length;t++){var u=i[t];if(r!==undefined&&isBefore(u,r)||n!==undefined&&isAfter(u,n)){printIonWarning("The value provided to ion-datetime is out of bounds.\n\n"+"Min: ".concat(JSON.stringify(r),"\n")+"Max: ".concat(JSON.stringify(n),"\n")+"Value: ".concat(JSON.stringify(e)));break}}};var isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0};var getHourCycle=function(e,r){if(r!==undefined){return r}var n=new Intl.DateTimeFormat(e,{hour:"numeric"});var a=n.resolvedOptions();if(a.hourCycle!==undefined){return a.hourCycle}var t=new Date("5/18/2021 00:00");var i=n.formatToParts(t);var u=i.find((function(e){return e.type==="hour"}));if(!u){throw new Error("Hour value not found from DateTimeFormat")}switch(u.value){case"0":return"h11";case"12":return"h12";case"00":return"h23";case"24":return"h24";default:throw new Error('Invalid hour cycle "'.concat(r,'"'))}};var is24Hour=function(e){return e==="h23"||e==="h24"};var getNumDaysInMonth=function(e,r){return e===4||e===6||e===9||e===11?30:e===2?isLeapYear(r)?29:28:31};var isMonthFirstLocale=function(e,r){if(r===void 0){r={month:"numeric",year:"numeric"}}var n=new Intl.DateTimeFormat(e,r).formatToParts(new Date);return n[0].type==="month"};var isLocaleDayPeriodRTL=function(e){var r=new Intl.DateTimeFormat(e,{hour:"numeric"}).formatToParts(new Date);return r[0].type==="dayPeriod"};var ISO_8601_REGEXP=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/;var TIME_REGEXP=/^((\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/;var convertToArrayOfNumbers=function(e){if(e===undefined){return}var r=e;if(typeof e==="string"){r=e.replace(/\[|\]|\s/g,"").split(",")}var n;if(Array.isArray(r)){n=r.map((function(e){return parseInt(e,10)})).filter(isFinite)}else{n=[r]}return n};var getPartsFromCalendarDay=function(e){return{month:parseInt(e.getAttribute("data-month"),10),day:parseInt(e.getAttribute("data-day"),10),year:parseInt(e.getAttribute("data-year"),10),dayOfWeek:parseInt(e.getAttribute("data-day-of-week"),10)}};function parseDate(e){if(Array.isArray(e)){var r=[];for(var n=0,a=e;n<a.length;n++){var t=a[n];var i=parseDate(t);if(!i){return undefined}r.push(i)}return r}var u=null;if(e!=null&&e!==""){u=TIME_REGEXP.exec(e);if(u){u.unshift(undefined,undefined);u[2]=u[3]=undefined}else{u=ISO_8601_REGEXP.exec(e)}}if(u===null){printIonWarning("Unable to parse date string: ".concat(e,". Please provide a valid ISO 8601 datetime string."));return undefined}for(var o=1;o<8;o++){u[o]=u[o]!==undefined?parseInt(u[o],10):undefined}return{year:u[1],month:u[2],day:u[3],hour:u[4],minute:u[5],ampm:u[4]<12?"am":"pm"}}var clampDate=function(e,r,n){if(r&&isBefore(e,r)){return r}else if(n&&isAfter(e,n)){return n}return e};var parseAmPm=function(e){return e>=12?"pm":"am"};var parseMaxParts=function(e,r){var n=parseDate(e);if(n===undefined){return}var a=n.month,t=n.day,i=n.year,u=n.hour,o=n.minute;var d=i!==null&&i!==void 0?i:r.year;var f=a!==null&&a!==void 0?a:12;return{month:f,day:t!==null&&t!==void 0?t:getNumDaysInMonth(f,d),year:d,hour:u!==null&&u!==void 0?u:23,minute:o!==null&&o!==void 0?o:59}};var parseMinParts=function(e,r){var n=parseDate(e);if(n===undefined){return}var a=n.month,t=n.day,i=n.year,u=n.hour,o=n.minute;return{month:a!==null&&a!==void 0?a:1,day:t!==null&&t!==void 0?t:1,year:i!==null&&i!==void 0?i:r.year,hour:u!==null&&u!==void 0?u:0,minute:o!==null&&o!==void 0?o:0}};var twoDigit=function(e){return("0"+(e!==undefined?Math.abs(e):"0")).slice(-2)};var fourDigit=function(e){return("000"+(e!==undefined?Math.abs(e):"0")).slice(-4)};function convertDataToISO(e){if(Array.isArray(e)){return e.map((function(e){return convertDataToISO(e)}))}var r="";if(e.year!==undefined){r=fourDigit(e.year);if(e.month!==undefined){r+="-"+twoDigit(e.month);if(e.day!==undefined){r+="-"+twoDigit(e.day);if(e.hour!==undefined){r+="T".concat(twoDigit(e.hour),":").concat(twoDigit(e.minute),":00")}}}}else if(e.hour!==undefined){r=twoDigit(e.hour)+":"+twoDigit(e.minute)}return r}var convert12HourTo24Hour=function(e,r){if(r===undefined){return e}if(r==="am"){if(e===12){return 0}return e}if(e===12){return 12}return e+12};var getStartOfWeek=function(e){var r=e.dayOfWeek;if(r===null||r===undefined){throw new Error("No day of week provided")}return subtractDays(e,r)};var getEndOfWeek=function(e){var r=e.dayOfWeek;if(r===null||r===undefined){throw new Error("No day of week provided")}return addDays(e,6-r)};var getNextDay=function(e){return addDays(e,1)};var getPreviousDay=function(e){return subtractDays(e,1)};var getPreviousWeek=function(e){return subtractDays(e,7)};var getNextWeek=function(e){return addDays(e,7)};var subtractDays=function(e,r){var n=e.month,a=e.day,t=e.year;if(a===null){throw new Error("No day provided")}var i={month:n,day:a,year:t};i.day=a-r;if(i.day<1){i.month-=1}if(i.month<1){i.month=12;i.year-=1}if(i.day<1){var u=getNumDaysInMonth(i.month,i.year);i.day=u+i.day}return i};var addDays=function(e,r){var n=e.month,a=e.day,t=e.year;if(a===null){throw new Error("No day provided")}var i={month:n,day:a,year:t};var u=getNumDaysInMonth(n,t);i.day=a+r;if(i.day>u){i.day-=u;i.month+=1}if(i.month>12){i.month=1;i.year+=1}return i};var getPreviousMonth=function(e){var r=e.month===1?12:e.month-1;var n=e.month===1?e.year-1:e.year;var a=getNumDaysInMonth(r,n);var t=a<e.day?a:e.day;return{month:r,year:n,day:t}};var getNextMonth=function(e){var r=e.month===12?1:e.month+1;var n=e.month===12?e.year+1:e.year;var a=getNumDaysInMonth(r,n);var t=a<e.day?a:e.day;return{month:r,year:n,day:t}};var changeYear=function(e,r){var n=e.month;var a=e.year+r;var t=getNumDaysInMonth(n,a);var i=t<e.day?t:e.day;return{month:n,year:a,day:i}};var getPreviousYear=function(e){return changeYear(e,-1)};var getNextYear=function(e){return changeYear(e,1)};var getInternalHourValue=function(e,r,n){if(r){return e}return convert12HourTo24Hour(e,n)};var calculateHourFromAMPM=function(e,r){var n=e.ampm,a=e.hour;var t=a;if(n==="am"&&r==="pm"){t=convert12HourTo24Hour(t,"pm")}else if(n==="pm"&&r==="am"){t=Math.abs(t-12)}return t};var validateParts=function(e,r,n){var a=e.month,t=e.day,i=e.year;var u=clampDate(Object.assign({},e),r,n);var o=getNumDaysInMonth(a,i);if(t!==null&&o<t){u.day=o}if(r!==undefined&&isSameDay(u,r)){if(u.hour!==undefined&&r.hour!==undefined){if(u.hour<r.hour){u.hour=r.hour;u.minute=r.minute}else if(u.hour===r.hour&&u.minute!==undefined&&r.minute!==undefined&&u.minute<r.minute){u.minute=r.minute}}}if(n!==undefined&&isSameDay(e,n)){if(u.hour!==undefined&&n.hour!==undefined){if(u.hour>n.hour){u.hour=n.hour;u.minute=n.minute}else if(u.hour===n.hour&&u.minute!==undefined&&n.minute!==undefined&&u.minute>n.minute){u.minute=n.minute}}}return u};var getClosestValidDate=function(e){var r=e.refParts,n=e.monthValues,a=e.dayValues,t=e.yearValues,i=e.hourValues,u=e.minuteValues,o=e.minParts,d=e.maxParts;var f=r.hour,v=r.minute,s=r.day,l=r.month,c=r.year;var m=Object.assign(Object.assign({},r),{dayOfWeek:undefined});if(t!==undefined){var y=t.filter((function(e){if(o!==undefined&&e<o.year){return false}if(d!==undefined&&e>d.year){return false}return true}));m.year=findClosestValue(c,y)}if(n!==undefined){var g=n.filter((function(e){if(o!==undefined&&m.year===o.year&&e<o.month){return false}if(d!==undefined&&m.year===d.year&&e>d.month){return false}return true}));m.month=findClosestValue(l,g)}if(s!==null&&a!==undefined){var D=a.filter((function(e){if(o!==undefined&&isBefore(Object.assign(Object.assign({},m),{day:e}),o)){return false}if(d!==undefined&&isAfter(Object.assign(Object.assign({},m),{day:e}),d)){return false}return true}));m.day=findClosestValue(s,D)}if(f!==undefined&&i!==undefined){var h=i.filter((function(e){if((o===null||o===void 0?void 0:o.hour)!==undefined&&isSameDay(m,o)&&e<o.hour){return false}if((d===null||d===void 0?void 0:d.hour)!==undefined&&isSameDay(m,d)&&e>d.hour){return false}return true}));m.hour=findClosestValue(f,h);m.ampm=parseAmPm(m.hour)}if(v!==undefined&&u!==undefined){var T=u.filter((function(e){if((o===null||o===void 0?void 0:o.minute)!==undefined&&isSameDay(m,o)&&m.hour===o.hour&&e<o.minute){return false}if((d===null||d===void 0?void 0:d.minute)!==undefined&&isSameDay(m,d)&&m.hour===d.hour&&e>d.minute){return false}return true}));m.minute=findClosestValue(v,T)}return m};var findClosestValue=function(e,r){var n=r[0];var a=Math.abs(n-e);for(var t=1;t<r.length;t++){var i=r[t];var u=Math.abs(i-e);if(u<a){n=i;a=u}}return n};var getFormattedDayPeriod=function(e){if(e===undefined){return""}return e.toUpperCase()};var getLocalizedTime=function(e,r,n){var a={hour:r.hour,minute:r.minute};if(a.hour===undefined||a.minute===undefined){return"Invalid Time"}return new Intl.DateTimeFormat(e,{hour:"numeric",minute:"numeric",timeZone:"UTC",hourCycle:n}).format(new Date(convertDataToISO(Object.assign({year:2023,day:1,month:1},a))+"Z"))};var addTimePadding=function(e){var r=e.toString();if(r.length>1){return r}return"0".concat(r)};var getFormattedHour=function(e,r){if(e===0){switch(r){case"h11":return"0";case"h12":return"12";case"h23":return"00";case"h24":return"24";default:throw new Error('Invalid hour cycle "'.concat(r,'"'))}}var n=is24Hour(r);if(n){return addTimePadding(e)}return e.toString()};var generateDayAriaLabel=function(e,r,n){if(n.day===null){return null}var a=getNormalizedDate(n);var t=new Intl.DateTimeFormat(e,{weekday:"long",month:"long",day:"numeric",timeZone:"UTC"}).format(a);return r?"Today, ".concat(t):t};var getMonthAndDay=function(e,r){var n=getNormalizedDate(r);return new Intl.DateTimeFormat(e,{weekday:"short",month:"short",day:"numeric",timeZone:"UTC"}).format(n)};var getMonthAndYear=function(e,r){var n=getNormalizedDate(r);return new Intl.DateTimeFormat(e,{month:"long",year:"numeric",timeZone:"UTC"}).format(n)};var getMonthDayAndYear=function(e,r){return getLocalizedDateTime(e,r,{month:"short",day:"numeric",year:"numeric"})};var getDay=function(e,r){return getLocalizedDateTimeParts(e,r,{day:"numeric"}).find((function(e){return e.type==="day"})).value};var getYear=function(e,r){return getLocalizedDateTime(e,r,{year:"numeric"})};var getNormalizedDate=function(e){var r,n,a;var t=e.hour!==undefined&&e.minute!==undefined?" ".concat(e.hour,":").concat(e.minute):"";return new Date("".concat((r=e.month)!==null&&r!==void 0?r:1,"/").concat((n=e.day)!==null&&n!==void 0?n:1,"/").concat((a=e.year)!==null&&a!==void 0?a:2023).concat(t," GMT+0000"))};var getLocalizedDateTime=function(e,r,n){var a=getNormalizedDate(r);return getDateTimeFormat(e,n).format(a)};var getLocalizedDateTimeParts=function(e,r,n){var a=getNormalizedDate(r);return getDateTimeFormat(e,n).formatToParts(a)};var getDateTimeFormat=function(e,r){return new Intl.DateTimeFormat(e,Object.assign(Object.assign({},r),{timeZone:"UTC"}))};var getTodayLabel=function(e){if("RelativeTimeFormat"in Intl){var r=new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"day");return r.charAt(0).toUpperCase()+r.slice(1)}else{return"Today"}};var removeDateTzOffset=function(e){var r=e.getTimezoneOffset();e.setMinutes(e.getMinutes()-r);return e};var DATE_AM=removeDateTzOffset(new Date("2022T01:00"));var DATE_PM=removeDateTzOffset(new Date("2022T13:00"));var getLocalizedDayPeriod=function(e,r){var n=r==="am"?DATE_AM:DATE_PM;var a=new Intl.DateTimeFormat(e,{hour:"numeric",timeZone:"UTC"}).formatToParts(n).find((function(e){return e.type==="dayPeriod"}));if(a){return a.value}return getFormattedDayPeriod(r)};var formatValue=function(e){return Array.isArray(e)?e.join(","):e};var getToday=function(){return removeDateTzOffset(new Date).toISOString()};var minutes=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59];var hour11=[0,1,2,3,4,5,6,7,8,9,10,11];var hour12=[0,1,2,3,4,5,6,7,8,9,10,11];var hour23=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23];var hour24=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,0];var getDaysOfWeek=function(e,r,n){if(n===void 0){n=0}var a=r==="ios"?"short":"narrow";var t=new Intl.DateTimeFormat(e,{weekday:a});var i=new Date("11/01/2020");var u=[];for(var o=n;o<n+7;o++){var d=new Date(i);d.setDate(d.getDate()+o);u.push(t.format(d))}return u};var getDaysOfMonth=function(e,r,n){var a=getNumDaysInMonth(e,r);var t=new Date("".concat(e,"/1/").concat(r)).getDay();var i=t>=n?t-(n+1):6-(n-t);var u=[];for(var o=1;o<=a;o++){u.push({day:o,dayOfWeek:(i+o)%7})}for(var o=0;o<=i;o++){u=__spreadArray([{day:null,dayOfWeek:null}],u,true)}return u};var getHourData=function(e){switch(e){case"h11":return hour11;case"h12":return hour12;case"h23":return hour23;case"h24":return hour24;default:throw new Error('Invalid hour cycle "'.concat(e,'"'))}};var generateTime=function(e,r,n,a,t,i,u){if(n===void 0){n="h12"}var o=getHourCycle(e,n);var d=is24Hour(o);var f=getHourData(o);var v=minutes;var s=true;var l=true;if(i){f=f.filter((function(e){return i.includes(e)}))}if(u){v=v.filter((function(e){return u.includes(e)}))}if(a){if(isSameDay(r,a)){if(a.hour!==undefined){f=f.filter((function(e){var n=r.ampm==="pm"?(e+12)%24:e;return(d?e:n)>=a.hour}));s=a.hour<13}if(a.minute!==undefined){var c=false;if(a.hour!==undefined&&r.hour!==undefined){if(r.hour>a.hour){c=true}}v=v.filter((function(e){if(c){return true}return e>=a.minute}))}}else if(isBefore(r,a)){f=[];v=[];s=l=false}}if(t){if(isSameDay(r,t)){if(t.hour!==undefined){f=f.filter((function(e){var n=r.ampm==="pm"?(e+12)%24:e;return(d?e:n)<=t.hour}));l=t.hour>=12}if(t.minute!==undefined&&r.hour===t.hour){v=v.filter((function(e){return e<=t.minute}))}}else if(isAfter(r,t)){f=[];v=[];s=l=false}}return{hours:f,minutes:v,am:s,pm:l}};var generateMonths=function(e,r){var n={month:e.month,year:e.year,day:e.day};if(r!==undefined&&(e.month!==r.month||e.year!==r.year)){var a={month:r.month,year:r.year,day:r.day};var t=isBefore(a,n);return t?[a,n,getNextMonth(e)]:[getPreviousMonth(e),n,a]}return[getPreviousMonth(e),n,getNextMonth(e)]};var getMonthColumnData=function(e,r,n,a,t,i){if(i===void 0){i={month:"long"}}var u=r.year;var o=[];if(t!==undefined){var d=t;if((a===null||a===void 0?void 0:a.month)!==undefined){d=d.filter((function(e){return e<=a.month}))}if((n===null||n===void 0?void 0:n.month)!==undefined){d=d.filter((function(e){return e>=n.month}))}d.forEach((function(r){var n=new Date("".concat(r,"/1/").concat(u," GMT+0000"));var a=new Intl.DateTimeFormat(e,Object.assign(Object.assign({},i),{timeZone:"UTC"})).format(n);o.push({text:a,value:r})}))}else{var f=a&&a.year===u?a.month:12;var v=n&&n.year===u?n.month:1;for(var s=v;s<=f;s++){var l=new Date("".concat(s,"/1/").concat(u," GMT+0000"));var c=new Intl.DateTimeFormat(e,Object.assign(Object.assign({},i),{timeZone:"UTC"})).format(l);o.push({text:c,value:s})}}return o};var getDayColumnData=function(e,r,n,a,t,i){if(i===void 0){i={day:"numeric"}}var u=r.month,o=r.year;var d=[];var f=getNumDaysInMonth(u,o);var v=(a===null||a===void 0?void 0:a.day)!==null&&(a===null||a===void 0?void 0:a.day)!==undefined&&a.year===o&&a.month===u?a.day:f;var s=(n===null||n===void 0?void 0:n.day)!==null&&(n===null||n===void 0?void 0:n.day)!==undefined&&n.year===o&&n.month===u?n.day:1;if(t!==undefined){var l=t;l=l.filter((function(e){return e>=s&&e<=v}));l.forEach((function(r){var n=new Date("".concat(u,"/").concat(r,"/").concat(o," GMT+0000"));var a=new Intl.DateTimeFormat(e,Object.assign(Object.assign({},i),{timeZone:"UTC"})).format(n);d.push({text:a,value:r})}))}else{for(var c=s;c<=v;c++){var m=new Date("".concat(u,"/").concat(c,"/").concat(o," GMT+0000"));var y=new Intl.DateTimeFormat(e,Object.assign(Object.assign({},i),{timeZone:"UTC"})).format(m);d.push({text:y,value:c})}}return d};var getYearColumnData=function(e,r,n,a,t){var i,u;var o=[];if(t!==undefined){o=t;if((a===null||a===void 0?void 0:a.year)!==undefined){o=o.filter((function(e){return e<=a.year}))}if((n===null||n===void 0?void 0:n.year)!==undefined){o=o.filter((function(e){return e>=n.year}))}}else{var d=r.year;var f=(i=a===null||a===void 0?void 0:a.year)!==null&&i!==void 0?i:d;var v=(u=n===null||n===void 0?void 0:n.year)!==null&&u!==void 0?u:d-100;for(var s=v;s<=f;s++){o.push(s)}}return o.map((function(n){return{text:getYear(e,{year:n,month:r.month,day:r.day}),value:n}}))};var getAllMonthsInRange=function(e,r){if(e.month===r.month&&e.year===r.year){return[e]}return __spreadArray([e],getAllMonthsInRange(getNextMonth(e),r),true)};var getCombinedDateColumnData=function(e,r,n,a,t,i){var u=[];var o=[];var d=getAllMonthsInRange(n,a);if(i){d=d.filter((function(e){var r=e.month;return i.includes(r)}))}d.forEach((function(i){var d={month:i.month,day:null,year:i.year};var f=getDayColumnData(e,d,n,a,t,{month:"short",day:"numeric",weekday:"short"});var v=[];var s=[];f.forEach((function(n){var a=isSameDay(Object.assign(Object.assign({},d),{day:n.value}),r);s.push({text:a?getTodayLabel(e):n.text,value:"".concat(d.year,"-").concat(d.month,"-").concat(n.value)});v.push({month:d.month,year:d.year,day:n.value})}));o=__spreadArray(__spreadArray([],o,true),v,true);u=__spreadArray(__spreadArray([],u,true),s,true)}));return{parts:o,items:u}};var getTimeColumnsData=function(e,r,n,a,t,i,u){var o=getHourCycle(e,n);var d=is24Hour(o);var f=generateTime(e,r,o,a,t,i,u),v=f.hours,s=f.minutes,l=f.am,c=f.pm;var m=v.map((function(e){return{text:getFormattedHour(e,o),value:getInternalHourValue(e,d,r.ampm)}}));var y=s.map((function(e){return{text:addTimePadding(e),value:e}}));var g=[];if(l&&!d){g.push({text:getLocalizedDayPeriod(e,"am"),value:"am"})}if(c&&!d){g.push({text:getLocalizedDayPeriod(e,"pm"),value:"pm"})}return{minutesData:y,hoursData:m,dayPeriodData:g}};export{getNumDaysInMonth as A,getCombinedDateColumnData as B,getMonthColumnData as C,getDayColumnData as D,getYearColumnData as E,isMonthFirstLocale as F,getTimeColumnsData as G,isLocaleDayPeriodRTL as H,getDaysOfWeek as I,getMonthAndYear as J,getDaysOfMonth as K,getHourCycle as L,getLocalizedTime as M,getMonthAndDay as N,formatValue as O,clampDate as P,parseAmPm as Q,calculateHourFromAMPM as R,getLocalizedDateTime as S,getMonthDayAndYear as T,getDay as a,isAfter as b,isSameDay as c,getPreviousMonth as d,getNextMonth as e,getPartsFromCalendarDay as f,generateDayAriaLabel as g,getNextYear as h,isBefore as i,getPreviousYear as j,getEndOfWeek as k,getStartOfWeek as l,getPreviousDay as m,getNextDay as n,getPreviousWeek as o,getNextWeek as p,parseMinParts as q,parseMaxParts as r,parseDate as s,convertToArrayOfNumbers as t,convertDataToISO as u,validateParts as v,warnIfValueOutOfBounds as w,getToday as x,getClosestValidDate as y,generateMonths as z};