@esri/calcite-components 1.0.0-next.355 → 1.0.0-next.356

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 (110) hide show
  1. package/dist/calcite/assets/calcite-icon/rightAlign16.json +1 -0
  2. package/dist/calcite/assets/calcite-icon/rightAlign24.json +1 -0
  3. package/dist/calcite/assets/calcite-icon/rightAlign32.json +1 -0
  4. package/dist/calcite/calcite.esm.js +1 -1
  5. package/dist/calcite/calcite.js +1 -1
  6. package/dist/calcite/{p-5044316a.system.entry.js → p-0ac72794.system.entry.js} +1 -1
  7. package/dist/calcite/{p-1d59e70a.system.entry.js → p-0b187e6a.system.entry.js} +1 -1
  8. package/dist/calcite/p-0d9a5d78.entry.js +5 -0
  9. package/dist/calcite/p-12c57970.js +5 -0
  10. package/dist/calcite/{p-2787571e.system.entry.js → p-2c3bbbb4.system.entry.js} +2 -2
  11. package/dist/calcite/{p-b57ddca8.entry.js → p-3366ef60.entry.js} +1 -1
  12. package/dist/calcite/p-3c34f20d.system.js +5 -0
  13. package/dist/calcite/{p-be8c7dbb.system.entry.js → p-3f51ac4b.system.entry.js} +1 -1
  14. package/dist/calcite/{p-52966b4c.js → p-4f9b0b0f.js} +1 -1
  15. package/dist/calcite/{p-d6e20af1.system.entry.js → p-4fee156d.system.entry.js} +1 -1
  16. package/dist/calcite/{p-c25f34d6.entry.js → p-55e6b0b2.entry.js} +1 -1
  17. package/dist/calcite/{p-7f68da96.entry.js → p-5d9fe852.entry.js} +1 -1
  18. package/dist/calcite/p-6173cf08.system.js +5 -0
  19. package/dist/calcite/{p-23a085a3.system.entry.js → p-748c198c.system.entry.js} +1 -1
  20. package/dist/calcite/{p-3e308abf.system.entry.js → p-7a2142c2.system.entry.js} +1 -1
  21. package/dist/calcite/p-83d41684.entry.js +5 -0
  22. package/dist/calcite/{p-cf9debce.entry.js → p-92ad7d95.entry.js} +1 -1
  23. package/dist/calcite/{p-18d9a261.system.js → p-99d32fc3.system.js} +1 -1
  24. package/dist/calcite/{p-da3b96f9.entry.js → p-d00fbd1e.entry.js} +1 -1
  25. package/dist/calcite/{p-834ec82a.system.js → p-d4bafc77.system.js} +1 -1
  26. package/dist/calcite/{p-a918eec6.entry.js → p-d8653ba3.entry.js} +1 -1
  27. package/dist/calcite/p-dd9f2e61.js +5 -0
  28. package/dist/calcite/{p-15bc7ccd.system.entry.js → p-e8270c76.system.entry.js} +1 -1
  29. package/dist/calcite/p-f3d02833.js +5 -0
  30. package/dist/calcite/p-fcde21ce.system.js +5 -0
  31. package/dist/cjs/calcite-combobox_3.cjs.entry.js +1 -1
  32. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +3 -3
  33. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +1 -1
  34. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +4 -4
  35. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +4 -4
  36. package/dist/cjs/calcite-input.cjs.entry.js +10 -2
  37. package/dist/cjs/calcite-popover_2.cjs.entry.js +1 -1
  38. package/dist/cjs/calcite-tooltip_2.cjs.entry.js +1 -1
  39. package/dist/cjs/calcite.cjs.js +1 -1
  40. package/dist/cjs/loader.cjs.js +1 -1
  41. package/dist/cjs/locale-b9b153dd.js +127 -0
  42. package/dist/cjs/number-e813e801.js +84 -0
  43. package/dist/cjs/{popper-ccef76e3.js → popper-adfdc032.js} +28 -9
  44. package/dist/cjs/{resources-d3c42dc4.js → resources-c524c005.js} +1 -1
  45. package/dist/collection/collection-manifest.json +1 -1
  46. package/dist/collection/components/calcite-icon/assets/calcite-icon/rightAlign16.json +1 -0
  47. package/dist/collection/components/calcite-icon/assets/calcite-icon/rightAlign24.json +1 -0
  48. package/dist/collection/components/calcite-icon/assets/calcite-icon/rightAlign32.json +1 -0
  49. package/dist/collection/components/calcite-input/calcite-input.js +8 -0
  50. package/dist/collection/components/calcite-input-time-picker/calcite-input-time-picker.js +2 -2
  51. package/dist/collection/components/calcite-time-picker/calcite-time-picker.js +4 -4
  52. package/dist/collection/utils/locale.js +42 -38
  53. package/dist/collection/utils/number.js +41 -23
  54. package/dist/components/calcite-input-time-picker.js +1 -1
  55. package/dist/components/calcite-input2.js +8 -0
  56. package/dist/components/calcite-time-picker2.js +3 -3
  57. package/dist/components/locale.js +42 -38
  58. package/dist/components/number.js +42 -24
  59. package/dist/components/popper.js +28 -9
  60. package/dist/custom-elements/index.js +121 -72
  61. package/dist/esm/calcite-combobox_3.entry.js +1 -1
  62. package/dist/esm/calcite-date-picker_4.entry.js +3 -3
  63. package/dist/esm/calcite-dropdown_3.entry.js +1 -1
  64. package/dist/esm/calcite-input-date-picker.entry.js +4 -4
  65. package/dist/esm/calcite-input-time-picker_2.entry.js +4 -4
  66. package/dist/esm/calcite-input.entry.js +10 -2
  67. package/dist/esm/calcite-popover_2.entry.js +1 -1
  68. package/dist/esm/calcite-tooltip_2.entry.js +1 -1
  69. package/dist/esm/calcite.js +1 -1
  70. package/dist/esm/loader.js +1 -1
  71. package/dist/esm/locale-1b48f64f.js +122 -0
  72. package/dist/esm/number-8779395f.js +76 -0
  73. package/dist/esm/{popper-405efdae.js → popper-1814b3c1.js} +28 -9
  74. package/dist/esm/{resources-421133b2.js → resources-74c807b4.js} +1 -1
  75. package/dist/esm-es5/calcite-combobox_3.entry.js +1 -1
  76. package/dist/esm-es5/calcite-date-picker_4.entry.js +2 -2
  77. package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
  78. package/dist/esm-es5/calcite-input-date-picker.entry.js +1 -1
  79. package/dist/esm-es5/calcite-input-time-picker_2.entry.js +1 -1
  80. package/dist/esm-es5/calcite-input.entry.js +1 -1
  81. package/dist/esm-es5/calcite-popover_2.entry.js +2 -2
  82. package/dist/esm-es5/calcite-tooltip_2.entry.js +1 -1
  83. package/dist/esm-es5/locale-1b48f64f.js +5 -0
  84. package/dist/esm-es5/number-8779395f.js +5 -0
  85. package/dist/esm-es5/popper-1814b3c1.js +5 -0
  86. package/dist/esm-es5/{resources-421133b2.js → resources-74c807b4.js} +1 -1
  87. package/dist/extras/docs-json.json +5 -5
  88. package/dist/types/components/calcite-input-time-picker/calcite-input-time-picker.d.ts +1 -1
  89. package/dist/types/components/calcite-pick-list/shared-list-render.d.ts +2 -2
  90. package/dist/types/components/calcite-time-picker/calcite-time-picker.d.ts +2 -2
  91. package/dist/types/components.d.ts +6 -6
  92. package/dist/types/stencil-public-runtime.d.ts +6 -4
  93. package/dist/types/utils/number.d.ts +2 -1
  94. package/hydrate/index.js +122 -73
  95. package/package.json +14 -14
  96. package/dist/calcite/p-0140ba79.entry.js +0 -5
  97. package/dist/calcite/p-11b9e4bb.system.js +0 -5
  98. package/dist/calcite/p-18c4af8f.system.js +0 -5
  99. package/dist/calcite/p-22523fc5.entry.js +0 -5
  100. package/dist/calcite/p-6d0d9bba.js +0 -5
  101. package/dist/calcite/p-8396a2d2.js +0 -5
  102. package/dist/calcite/p-91300144.js +0 -5
  103. package/dist/calcite/p-fc998713.system.js +0 -5
  104. package/dist/cjs/locale-ccfa66f6.js +0 -123
  105. package/dist/cjs/number-f57fd111.js +0 -65
  106. package/dist/esm/locale-86b789f9.js +0 -118
  107. package/dist/esm/number-eb92427e.js +0 -58
  108. package/dist/esm-es5/locale-86b789f9.js +0 -5
  109. package/dist/esm-es5/number-eb92427e.js +0 -5
  110. package/dist/esm-es5/popper-405efdae.js +0 -5
@@ -7805,13 +7805,21 @@ function mapToStyles(_ref2) {
7805
7805
  adaptive = _ref2.adaptive,
7806
7806
  roundOffsets = _ref2.roundOffsets,
7807
7807
  isFixed = _ref2.isFixed;
7808
+ var _offsets$x = offsets.x,
7809
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
7810
+ _offsets$y = offsets.y,
7811
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
7808
7812
 
7809
- var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
7810
- _ref3$x = _ref3.x,
7811
- x = _ref3$x === void 0 ? 0 : _ref3$x,
7812
- _ref3$y = _ref3.y,
7813
- y = _ref3$y === void 0 ? 0 : _ref3$y;
7813
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
7814
+ x: x,
7815
+ y: y
7816
+ }) : {
7817
+ x: x,
7818
+ y: y
7819
+ };
7814
7820
 
7821
+ x = _ref3.x;
7822
+ y = _ref3.y;
7815
7823
  var hasX = offsets.hasOwnProperty('x');
7816
7824
  var hasY = offsets.hasOwnProperty('y');
7817
7825
  var sideX = left;
@@ -7856,6 +7864,17 @@ function mapToStyles(_ref2) {
7856
7864
  position: position
7857
7865
  }, adaptive && unsetSides);
7858
7866
 
7867
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
7868
+ x: x,
7869
+ y: y
7870
+ }) : {
7871
+ x: x,
7872
+ y: y
7873
+ };
7874
+
7875
+ x = _ref4.x;
7876
+ y = _ref4.y;
7877
+
7859
7878
  if (gpuAcceleration) {
7860
7879
  var _Object$assign;
7861
7880
 
@@ -7865,9 +7884,9 @@ function mapToStyles(_ref2) {
7865
7884
  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
7866
7885
  }
7867
7886
 
7868
- function computeStyles(_ref4) {
7869
- var state = _ref4.state,
7870
- options = _ref4.options;
7887
+ function computeStyles(_ref5) {
7888
+ var state = _ref5.state,
7889
+ options = _ref5.options;
7871
7890
  var _options$gpuAccelerat = options.gpuAcceleration,
7872
7891
  gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
7873
7892
  _options$adaptive = options.adaptive,
@@ -8156,7 +8175,7 @@ function getClippingParents(element) {
8156
8175
 
8157
8176
 
8158
8177
  return clippingParents.filter(function (clippingParent) {
8159
- return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle$1(clippingParent).position !== 'static' : true);
8178
+ return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
8160
8179
  });
8161
8180
  } // Gets the maximum area that the element is visible in due to any number of
8162
8181
  // clipping parents
@@ -10055,21 +10074,23 @@ function parseNumberString(numberString) {
10055
10074
  if (!numberString || !stringContainsNumbers(numberString)) {
10056
10075
  return "";
10057
10076
  }
10058
- let containsDecimal = false;
10059
- const result = numberString
10060
- .split("")
10061
- .filter((value, i) => {
10062
- if (value.match(/\./g) && !containsDecimal) {
10063
- containsDecimal = true;
10064
- return true;
10065
- }
10066
- if (value.match(/\-/g) && i === 0) {
10067
- return true;
10068
- }
10069
- return numberKeys.includes(value);
10070
- })
10071
- .reduce((string, part) => string + part);
10072
- return isValidNumber(result) ? Number(result).toString() : null;
10077
+ return sanitizeExponentialNumberString(numberString, (nonExpoNumString) => {
10078
+ let containsDecimal = false;
10079
+ const result = nonExpoNumString
10080
+ .split("")
10081
+ .filter((value, i) => {
10082
+ if (value.match(/\./g) && !containsDecimal) {
10083
+ containsDecimal = true;
10084
+ return true;
10085
+ }
10086
+ if (value.match(/\-/g) && i === 0) {
10087
+ return true;
10088
+ }
10089
+ return numberKeys.includes(value);
10090
+ })
10091
+ .reduce((string, part) => string + part);
10092
+ return isValidNumber(result) ? Number(result).toString() : null;
10093
+ });
10073
10094
  }
10074
10095
  function sanitizeDecimalString(decimalString) {
10075
10096
  const decimalAtEndOfStringButNotStart = /(?!^\.)\.$/;
@@ -10083,14 +10104,30 @@ function sanitizeLeadingZeroString(zeroString) {
10083
10104
  const allLeadingZerosOptionallyNegative = /^([-0])0+(?=\d)/;
10084
10105
  return zeroString.replace(allLeadingZerosOptionallyNegative, "$1");
10085
10106
  }
10086
- function sanitizeNumberString(value) {
10087
- const sanitizedValue = sanitizeNegativeString(sanitizeDecimalString(sanitizeLeadingZeroString(value)));
10088
- const isNegativeDecimalOnlyZeros = /^-\b0\b\.?0*$/;
10089
- return isValidNumber(sanitizedValue)
10090
- ? isNegativeDecimalOnlyZeros.test(sanitizedValue)
10091
- ? sanitizedValue
10092
- : Number(sanitizedValue).toString()
10093
- : value;
10107
+ function sanitizeNumberString(numberString) {
10108
+ return sanitizeExponentialNumberString(numberString, (nonExpoNumString) => {
10109
+ const sanitizedValue = sanitizeNegativeString(sanitizeDecimalString(sanitizeLeadingZeroString(nonExpoNumString)));
10110
+ const isNegativeDecimalOnlyZeros = /^-\b0\b\.?0*$/;
10111
+ return isValidNumber(sanitizedValue)
10112
+ ? isNegativeDecimalOnlyZeros.test(sanitizedValue)
10113
+ ? sanitizedValue
10114
+ : Number(sanitizedValue).toString()
10115
+ : nonExpoNumString;
10116
+ });
10117
+ }
10118
+ function sanitizeExponentialNumberString(numberString, func) {
10119
+ if (!numberString) {
10120
+ return numberString;
10121
+ }
10122
+ const firstE = numberString.toLowerCase().indexOf("e") + 1;
10123
+ return numberString
10124
+ .replace(/[eE]*$/g, "")
10125
+ .substring(0, firstE)
10126
+ .concat(numberString.slice(firstE).replace(/[eE]/g, ""))
10127
+ .split(/[eE]/)
10128
+ .map((section, i) => (i === 1 ? func(section.replace(/\./g, "")) : func(section)))
10129
+ .join("e")
10130
+ .replace(/^e/, "1e");
10094
10131
  }
10095
10132
  function stringContainsNumbers(string) {
10096
10133
  return numberKeys.some((number) => string.includes(number));
@@ -10153,23 +10190,25 @@ function createLocaleNumberFormatter(locale) {
10153
10190
  });
10154
10191
  }
10155
10192
  function delocalizeNumberString(numberString, locale) {
10156
- if (numberString) {
10157
- const groupSeparator = getGroupSeparator(locale);
10158
- const decimalSeparator = getDecimalSeparator(locale);
10159
- const splitNumberString = numberString.split("");
10160
- const decimalIndex = splitNumberString.lastIndexOf(decimalSeparator);
10161
- const delocalizedNumberString = splitNumberString
10162
- .map((value, index) => {
10163
- if (value === groupSeparator || (value === decimalSeparator && index !== decimalIndex)) {
10164
- return "";
10165
- }
10166
- return value;
10167
- })
10168
- .reduce((string, part) => string + part)
10169
- .replace(decimalSeparator, ".");
10170
- return isNaN(Number(delocalizedNumberString)) ? numberString : delocalizedNumberString;
10171
- }
10172
- return numberString;
10193
+ return sanitizeExponentialNumberString(numberString, (nonExpoNumString) => {
10194
+ if (nonExpoNumString) {
10195
+ const groupSeparator = getGroupSeparator(locale);
10196
+ const decimalSeparator = getDecimalSeparator(locale);
10197
+ const splitNumberString = nonExpoNumString.split("");
10198
+ const decimalIndex = splitNumberString.lastIndexOf(decimalSeparator);
10199
+ const delocalizedNumberString = splitNumberString
10200
+ .map((value, index) => {
10201
+ if (value === groupSeparator || (value === decimalSeparator && index !== decimalIndex)) {
10202
+ return "";
10203
+ }
10204
+ return value;
10205
+ })
10206
+ .reduce((string, part) => string + part)
10207
+ .replace(decimalSeparator, ".");
10208
+ return isNaN(Number(delocalizedNumberString)) ? nonExpoNumString : delocalizedNumberString;
10209
+ }
10210
+ return nonExpoNumString;
10211
+ });
10173
10212
  }
10174
10213
  function getGroupSeparator(locale) {
10175
10214
  const formatter = createLocaleNumberFormatter(locale);
@@ -10184,27 +10223,29 @@ function getDecimalSeparator(locale) {
10184
10223
  return value.trim().length === 0 ? " " : value;
10185
10224
  }
10186
10225
  function localizeNumberString(numberString, locale, displayGroupSeparator = false) {
10187
- if (numberString) {
10188
- const number = Number(sanitizeDecimalString(numberString));
10189
- if (!isNaN(number)) {
10190
- const formatter = createLocaleNumberFormatter(locale);
10191
- const parts = formatter.formatToParts(number);
10192
- const localizedNumberString = parts
10193
- .map(({ type, value }) => {
10194
- switch (type) {
10195
- case "group":
10196
- return displayGroupSeparator ? getGroupSeparator(locale) : "";
10197
- case "decimal":
10198
- return getDecimalSeparator(locale);
10199
- default:
10200
- return value;
10201
- }
10202
- })
10203
- .reduce((string, part) => string + part);
10204
- return localizedNumberString;
10226
+ return sanitizeExponentialNumberString(numberString, (nonExpoNumString) => {
10227
+ if (nonExpoNumString) {
10228
+ const number = Number(sanitizeDecimalString(nonExpoNumString));
10229
+ if (!isNaN(number)) {
10230
+ const formatter = createLocaleNumberFormatter(locale);
10231
+ const parts = formatter.formatToParts(number);
10232
+ const localizedNumberString = parts
10233
+ .map(({ type, value }) => {
10234
+ switch (type) {
10235
+ case "group":
10236
+ return displayGroupSeparator ? getGroupSeparator(locale) : "";
10237
+ case "decimal":
10238
+ return getDecimalSeparator(locale);
10239
+ default:
10240
+ return value;
10241
+ }
10242
+ })
10243
+ .reduce((string, part) => string + part);
10244
+ return localizedNumberString;
10245
+ }
10246
+ return nonExpoNumString;
10205
10247
  }
10206
- }
10207
- return numberString;
10248
+ });
10208
10249
  }
10209
10250
 
10210
10251
  /**
@@ -12983,6 +13024,14 @@ let CalciteInput$1 = class extends HTMLElement$1 {
12983
13024
  return;
12984
13025
  }
12985
13026
  }
13027
+ if (/[eE]/.test(event.key)) {
13028
+ if (!this.value && !this.childNumberEl.value) {
13029
+ return;
13030
+ }
13031
+ if (this.value && !/[eE]/.test(this.childNumberEl.value)) {
13032
+ return;
13033
+ }
13034
+ }
12986
13035
  event.preventDefault();
12987
13036
  };
12988
13037
  this.nudgeNumberValue = (direction, nativeEvent) => {
@@ -13942,7 +13991,7 @@ let CalciteInputTimePicker$1 = class extends HTMLElement$1 {
13942
13991
  this.scale = "m";
13943
13992
  /** number (seconds) that specifies the granularity that the value must adhere to */
13944
13993
  this.step = 60;
13945
- /** The selected time (always 24-hour format)*/
13994
+ /** The selected time in UTC (always 24-hour format) */
13946
13995
  this.value = null;
13947
13996
  /** whether the value of the input was changed as a result of user typing or not */
13948
13997
  this.internalValueChange = false;
@@ -23168,9 +23217,9 @@ let CalciteTimePicker$1 = class extends HTMLElement$1 {
23168
23217
  this.locale = document.documentElement.lang || navigator.language || "en";
23169
23218
  /** The scale (size) of the time picker */
23170
23219
  this.scale = "m";
23171
- /** number that specifies the granularity that the value must adhere to */
23220
+ /** number (seconds) that specifies the granularity that the value must adhere to */
23172
23221
  this.step = 60;
23173
- /** The selected time in UTC */
23222
+ /** The selected time in UTC (always 24-hour format) */
23174
23223
  this.value = null;
23175
23224
  this.showSecond = this.step < 60;
23176
23225
  this.decrementHour = () => {
@@ -5,7 +5,7 @@
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9de00868.js';
6
6
  import { a as isSymbol, S as Symbol, d as debounce } from './debounce-79648d42.js';
7
7
  import { i as isArray, f as forIn } from './forIn-48d8fb84.js';
8
- import { u as updatePopper, c as createPopper, C as CSS$2 } from './popper-405efdae.js';
8
+ import { u as updatePopper, c as createPopper, C as CSS$2 } from './popper-1814b3c1.js';
9
9
  import { g as guid } from './guid-196bd5ea.js';
10
10
  import { n as nodeListToArray, d as getElementProp } from './dom-e55f9eaf.js';
11
11
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-240ef148.js';
@@ -3,11 +3,11 @@
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, F as Fragment } from './index-9de00868.js';
6
- import { T as TEXT, c as getDaysDiff, d as dateToISO, a as dateFromISO, b as dateFromRange, g as getLocaleData, H as HEADING_LEVEL, s as sameDate, i as inRange, l as localizeNumber, e as getOrder, n as nextMonth, f as prevMonth, h as parseNumber } from './resources-421133b2.js';
6
+ import { T as TEXT, c as getDaysDiff, d as dateToISO, a as dateFromISO, b as dateFromRange, g as getLocaleData, H as HEADING_LEVEL, s as sameDate, i as inRange, l as localizeNumber, e as getOrder, n as nextMonth, f as prevMonth, h as parseNumber } from './resources-74c807b4.js';
7
7
  import { a as getElementDir, C as CSS_UTILITY } from './dom-e55f9eaf.js';
8
8
  import { C as CalciteHeading } from './CalciteHeading-1d6cd311.js';
9
- import './locale-86b789f9.js';
10
- import './number-eb92427e.js';
9
+ import './locale-1b48f64f.js';
10
+ import './number-8779395f.js';
11
11
  import './guid-196bd5ea.js';
12
12
 
13
13
  const calciteDatePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:inline-block;width:100%;overflow:visible;border-radius:0px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);background-color:var(--calcite-ui-foreground-1);vertical-align:top}:host([scale=s]){max-width:216px}:host([scale=m]){max-width:286px}:host([scale=l]){max-width:398px}";
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9de00868.js';
6
6
  import { f as focusElement, d as getElementProp } from './dom-e55f9eaf.js';
7
- import { C as CSS$2, u as updatePopper, c as createPopper } from './popper-405efdae.js';
7
+ import { C as CSS$2, u as updatePopper, c as createPopper } from './popper-1814b3c1.js';
8
8
  import { c as createObserver } from './observers-8f0bc419.js';
9
9
  import './guid-196bd5ea.js';
10
10
 
@@ -3,12 +3,12 @@
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9de00868.js';
6
- import { T as TEXT, d as dateToISO, a as dateFromISO, b as dateFromRange, g as getLocaleData, s as sameDate, p as parseDateString, i as inRange } from './resources-421133b2.js';
6
+ import { T as TEXT, d as dateToISO, a as dateFromISO, b as dateFromRange, g as getLocaleData, s as sameDate, p as parseDateString, i as inRange } from './resources-74c807b4.js';
7
7
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-240ef148.js';
8
8
  import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form-147bc6d7.js';
9
- import { u as updatePopper, C as CSS, c as createPopper } from './popper-405efdae.js';
10
- import './locale-86b789f9.js';
11
- import './number-eb92427e.js';
9
+ import { u as updatePopper, C as CSS, c as createPopper } from './popper-1814b3c1.js';
10
+ import './locale-1b48f64f.js';
11
+ import './number-8779395f.js';
12
12
  import './dom-e55f9eaf.js';
13
13
  import './guid-196bd5ea.js';
14
14
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9de00868.js';
6
6
  import { g as guid } from './guid-196bd5ea.js';
7
- import { i as isValidNumber, n as numberKeys, b as isActivationKey } from './number-eb92427e.js';
7
+ import { i as isValidNumber, n as numberKeys, c as isActivationKey } from './number-8779395f.js';
8
8
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-240ef148.js';
9
9
  import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form-147bc6d7.js';
10
10
  import './dom-e55f9eaf.js';
@@ -202,7 +202,7 @@ let CalciteInputTimePicker = class {
202
202
  this.scale = "m";
203
203
  /** number (seconds) that specifies the granularity that the value must adhere to */
204
204
  this.step = 60;
205
- /** The selected time (always 24-hour format)*/
205
+ /** The selected time in UTC (always 24-hour format) */
206
206
  this.value = null;
207
207
  /** whether the value of the input was changed as a result of user typing or not */
208
208
  this.internalValueChange = false;
@@ -484,9 +484,9 @@ let CalciteTimePicker = class {
484
484
  this.locale = document.documentElement.lang || navigator.language || "en";
485
485
  /** The scale (size) of the time picker */
486
486
  this.scale = "m";
487
- /** number that specifies the granularity that the value must adhere to */
487
+ /** number (seconds) that specifies the granularity that the value must adhere to */
488
488
  this.step = 60;
489
- /** The selected time in UTC */
489
+ /** The selected time in UTC (always 24-hour format) */
490
490
  this.value = null;
491
491
  this.showSecond = this.step < 60;
492
492
  this.decrementHour = () => {
@@ -6,8 +6,8 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
6
6
  import { T as TEXT, s as setRequestedIcon, d as getElementProp, a as getElementDir, C as CSS_UTILITY } from './dom-e55f9eaf.js';
7
7
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-240ef148.js';
8
8
  import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form-147bc6d7.js';
9
- import { d as delocalizeNumberString, g as getDecimalSeparator, l as localizeNumberString } from './locale-86b789f9.js';
10
- import { i as isValidNumber, p as parseNumberString, s as sanitizeNumberString, n as numberKeys } from './number-eb92427e.js';
9
+ import { d as delocalizeNumberString, g as getDecimalSeparator, l as localizeNumberString } from './locale-1b48f64f.js';
10
+ import { i as isValidNumber, p as parseNumberString, s as sanitizeNumberString, n as numberKeys } from './number-8779395f.js';
11
11
  import { d as decimalPlaces } from './math-456207f5.js';
12
12
  import './guid-196bd5ea.js';
13
13
 
@@ -221,6 +221,14 @@ let CalciteInput = class {
221
221
  return;
222
222
  }
223
223
  }
224
+ if (/[eE]/.test(event.key)) {
225
+ if (!this.value && !this.childNumberEl.value) {
226
+ return;
227
+ }
228
+ if (this.value && !/[eE]/.test(this.childNumberEl.value)) {
229
+ return;
230
+ }
231
+ }
224
232
  event.preventDefault();
225
233
  };
226
234
  this.nudgeNumberValue = (direction, nativeEvent) => {
@@ -3,7 +3,7 @@
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-9de00868.js';
6
- import { d as defaultOffsetDistance, u as updatePopper, c as createPopper, C as CSS$1 } from './popper-405efdae.js';
6
+ import { d as defaultOffsetDistance, u as updatePopper, c as createPopper, C as CSS$1 } from './popper-1814b3c1.js';
7
7
  import { g as guid } from './guid-196bd5ea.js';
8
8
  import { q as queryElementRoots, h as queryElementsRoots } from './dom-e55f9eaf.js';
9
9
  import { C as CalciteHeading } from './CalciteHeading-1d6cd311.js';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, g as getElement } from './index-9de00868.js';
6
6
  import { g as guid } from './guid-196bd5ea.js';
7
- import { d as defaultOffsetDistance, u as updatePopper, c as createPopper, C as CSS$1 } from './popper-405efdae.js';
7
+ import { d as defaultOffsetDistance, u as updatePopper, c as createPopper, C as CSS$1 } from './popper-1814b3c1.js';
8
8
  import { q as queryElementRoots } from './dom-e55f9eaf.js';
9
9
 
10
10
  const CSS = {
@@ -5,7 +5,7 @@
5
5
  import { d as doc, N as NAMESPACE, p as promiseResolve, b as bootstrapLazy } from './index-9de00868.js';
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v2.12.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v2.12.1 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchBrowser = () => {
11
11
  // @ts-ignore
@@ -5,7 +5,7 @@
5
5
  import { p as promiseResolve, b as bootstrapLazy } from './index-9de00868.js';
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.12.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.12.1 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchEsm = () => {
11
11
  return promiseResolve();
@@ -0,0 +1,122 @@
1
+ /*!
2
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
+ */
5
+ import { a as sanitizeExponentialNumberString, b as sanitizeDecimalString } from './number-8779395f.js';
6
+
7
+ const locales = [
8
+ "ar",
9
+ "bs",
10
+ "ca",
11
+ "cs",
12
+ "da",
13
+ "de",
14
+ "de-CH",
15
+ "el",
16
+ "en",
17
+ "en-AU",
18
+ "en-CA",
19
+ "en-GB",
20
+ "es",
21
+ "es-MX",
22
+ "et",
23
+ "fi",
24
+ "fr",
25
+ "fr-CH",
26
+ "he",
27
+ "hi",
28
+ "hr",
29
+ "hu",
30
+ "id",
31
+ "it",
32
+ "it-CH",
33
+ "ja",
34
+ "ko",
35
+ "lt",
36
+ "lv",
37
+ "mk",
38
+ "nb",
39
+ "nl",
40
+ "pl",
41
+ "pt",
42
+ "pt-PT",
43
+ "ro",
44
+ "ru",
45
+ "sk",
46
+ "sl",
47
+ "sr",
48
+ "sv",
49
+ "th",
50
+ "tr",
51
+ "uk",
52
+ "vi",
53
+ "zh-CN",
54
+ "zh-HK",
55
+ "zh-TW"
56
+ ];
57
+ function createLocaleNumberFormatter(locale) {
58
+ return new Intl.NumberFormat(locale, {
59
+ minimumFractionDigits: 0,
60
+ maximumFractionDigits: 20
61
+ });
62
+ }
63
+ function delocalizeNumberString(numberString, locale) {
64
+ return sanitizeExponentialNumberString(numberString, (nonExpoNumString) => {
65
+ if (nonExpoNumString) {
66
+ const groupSeparator = getGroupSeparator(locale);
67
+ const decimalSeparator = getDecimalSeparator(locale);
68
+ const splitNumberString = nonExpoNumString.split("");
69
+ const decimalIndex = splitNumberString.lastIndexOf(decimalSeparator);
70
+ const delocalizedNumberString = splitNumberString
71
+ .map((value, index) => {
72
+ if (value === groupSeparator || (value === decimalSeparator && index !== decimalIndex)) {
73
+ return "";
74
+ }
75
+ return value;
76
+ })
77
+ .reduce((string, part) => string + part)
78
+ .replace(decimalSeparator, ".");
79
+ return isNaN(Number(delocalizedNumberString)) ? nonExpoNumString : delocalizedNumberString;
80
+ }
81
+ return nonExpoNumString;
82
+ });
83
+ }
84
+ function getGroupSeparator(locale) {
85
+ const formatter = createLocaleNumberFormatter(locale);
86
+ const parts = formatter.formatToParts(1234567.8);
87
+ const value = parts.find((part) => part.type === "group").value;
88
+ return value.trim().length === 0 ? " " : value;
89
+ }
90
+ function getDecimalSeparator(locale) {
91
+ const formatter = createLocaleNumberFormatter(locale);
92
+ const parts = formatter.formatToParts(1234567.8);
93
+ const value = parts.find((part) => part.type === "decimal").value;
94
+ return value.trim().length === 0 ? " " : value;
95
+ }
96
+ function localizeNumberString(numberString, locale, displayGroupSeparator = false) {
97
+ return sanitizeExponentialNumberString(numberString, (nonExpoNumString) => {
98
+ if (nonExpoNumString) {
99
+ const number = Number(sanitizeDecimalString(nonExpoNumString));
100
+ if (!isNaN(number)) {
101
+ const formatter = createLocaleNumberFormatter(locale);
102
+ const parts = formatter.formatToParts(number);
103
+ const localizedNumberString = parts
104
+ .map(({ type, value }) => {
105
+ switch (type) {
106
+ case "group":
107
+ return displayGroupSeparator ? getGroupSeparator(locale) : "";
108
+ case "decimal":
109
+ return getDecimalSeparator(locale);
110
+ default:
111
+ return value;
112
+ }
113
+ })
114
+ .reduce((string, part) => string + part);
115
+ return localizedNumberString;
116
+ }
117
+ return nonExpoNumString;
118
+ }
119
+ });
120
+ }
121
+
122
+ export { locales as a, delocalizeNumberString as d, getDecimalSeparator as g, localizeNumberString as l };
@@ -0,0 +1,76 @@
1
+ /*!
2
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
+ */
5
+ function isActivationKey(key) {
6
+ return key === "Enter" || key === " ";
7
+ }
8
+ const numberKeys = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
9
+
10
+ function isValidNumber(numberString) {
11
+ return !(!numberString || isNaN(Number(numberString)));
12
+ }
13
+ function parseNumberString(numberString) {
14
+ if (!numberString || !stringContainsNumbers(numberString)) {
15
+ return "";
16
+ }
17
+ return sanitizeExponentialNumberString(numberString, (nonExpoNumString) => {
18
+ let containsDecimal = false;
19
+ const result = nonExpoNumString
20
+ .split("")
21
+ .filter((value, i) => {
22
+ if (value.match(/\./g) && !containsDecimal) {
23
+ containsDecimal = true;
24
+ return true;
25
+ }
26
+ if (value.match(/\-/g) && i === 0) {
27
+ return true;
28
+ }
29
+ return numberKeys.includes(value);
30
+ })
31
+ .reduce((string, part) => string + part);
32
+ return isValidNumber(result) ? Number(result).toString() : null;
33
+ });
34
+ }
35
+ function sanitizeDecimalString(decimalString) {
36
+ const decimalAtEndOfStringButNotStart = /(?!^\.)\.$/;
37
+ return decimalString.replace(decimalAtEndOfStringButNotStart, "");
38
+ }
39
+ function sanitizeNegativeString(negativeString) {
40
+ const allHyphensExceptTheStart = /(?!^-)-/g;
41
+ return negativeString.replace(allHyphensExceptTheStart, "");
42
+ }
43
+ function sanitizeLeadingZeroString(zeroString) {
44
+ const allLeadingZerosOptionallyNegative = /^([-0])0+(?=\d)/;
45
+ return zeroString.replace(allLeadingZerosOptionallyNegative, "$1");
46
+ }
47
+ function sanitizeNumberString(numberString) {
48
+ return sanitizeExponentialNumberString(numberString, (nonExpoNumString) => {
49
+ const sanitizedValue = sanitizeNegativeString(sanitizeDecimalString(sanitizeLeadingZeroString(nonExpoNumString)));
50
+ const isNegativeDecimalOnlyZeros = /^-\b0\b\.?0*$/;
51
+ return isValidNumber(sanitizedValue)
52
+ ? isNegativeDecimalOnlyZeros.test(sanitizedValue)
53
+ ? sanitizedValue
54
+ : Number(sanitizedValue).toString()
55
+ : nonExpoNumString;
56
+ });
57
+ }
58
+ function sanitizeExponentialNumberString(numberString, func) {
59
+ if (!numberString) {
60
+ return numberString;
61
+ }
62
+ const firstE = numberString.toLowerCase().indexOf("e") + 1;
63
+ return numberString
64
+ .replace(/[eE]*$/g, "")
65
+ .substring(0, firstE)
66
+ .concat(numberString.slice(firstE).replace(/[eE]/g, ""))
67
+ .split(/[eE]/)
68
+ .map((section, i) => (i === 1 ? func(section.replace(/\./g, "")) : func(section)))
69
+ .join("e")
70
+ .replace(/^e/, "1e");
71
+ }
72
+ function stringContainsNumbers(string) {
73
+ return numberKeys.some((number) => string.includes(number));
74
+ }
75
+
76
+ export { sanitizeExponentialNumberString as a, sanitizeDecimalString as b, isActivationKey as c, isValidNumber as i, numberKeys as n, parseNumberString as p, sanitizeNumberString as s };