@spectrum-web-components/number-field 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/number-field",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -58,14 +58,14 @@
58
58
  "lit-html"
59
59
  ],
60
60
  "dependencies": {
61
- "@internationalized/number": "^3.1.0",
62
- "@spectrum-web-components/base": "^1.0.0",
63
- "@spectrum-web-components/icon": "^1.0.0",
64
- "@spectrum-web-components/icons-ui": "^1.0.0",
65
- "@spectrum-web-components/infield-button": "^1.0.0",
66
- "@spectrum-web-components/reactive-controllers": "^1.0.0",
67
- "@spectrum-web-components/shared": "^1.0.0",
68
- "@spectrum-web-components/textfield": "^1.0.0"
61
+ "@internationalized/number": "^3.6.0",
62
+ "@spectrum-web-components/base": "^1.0.2",
63
+ "@spectrum-web-components/icon": "^1.0.2",
64
+ "@spectrum-web-components/icons-ui": "^1.0.2",
65
+ "@spectrum-web-components/infield-button": "^1.0.2",
66
+ "@spectrum-web-components/reactive-controllers": "^1.0.2",
67
+ "@spectrum-web-components/shared": "^1.0.2",
68
+ "@spectrum-web-components/textfield": "^1.0.2"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@formatjs/intl-numberformat": "^8.3.5",
@@ -76,6 +76,5 @@
76
76
  "sideEffects": [
77
77
  "./sp-*.js",
78
78
  "./**/*.dev.js"
79
- ],
80
- "gitHead": "5cf5d34645bf9494ebd20f64c42d1619523d2d84"
79
+ ]
81
80
  }
@@ -363,6 +363,13 @@ export class NumberField extends TextfieldBase {
363
363
  handleInput(event) {
364
364
  var _a;
365
365
  if (this.isComposing) {
366
+ if (event.data) {
367
+ const partialValue = this.convertValueToNumber(event.data);
368
+ if (Number.isNaN(partialValue)) {
369
+ this.inputElement.value = this.indeterminate ? indeterminatePlaceholder : this._trackingValue;
370
+ this.isComposing = false;
371
+ }
372
+ }
366
373
  event.stopPropagation();
367
374
  return;
368
375
  }
@@ -394,6 +401,7 @@ export class NumberField extends TextfieldBase {
394
401
  return;
395
402
  } else {
396
403
  this.inputElement.value = this.indeterminate ? indeterminatePlaceholder : this._trackingValue;
404
+ event.stopPropagation();
397
405
  }
398
406
  const currentLength = value.length;
399
407
  const previousLength = this._trackingValue.length;
@@ -558,7 +566,7 @@ export class NumberField extends TextfieldBase {
558
566
  inline="end"
559
567
  block="start"
560
568
  class="button step-up"
561
- aria-describedby=${this.helpTextId}
569
+ aria-hidden="true"
562
570
  label=${"Increase " + this.appliedLabel}
563
571
  size=${this.size}
564
572
  tabindex="-1"
@@ -572,7 +580,7 @@ export class NumberField extends TextfieldBase {
572
580
  inline="end"
573
581
  block="end"
574
582
  class="button step-down"
575
- aria-describedby=${this.helpTextId}
583
+ aria-hidden="true"
576
584
  label=${"Decrease " + this.appliedLabel}
577
585
  size=${this.size}
578
586
  tabindex="-1"
@@ -590,13 +598,11 @@ export class NumberField extends TextfieldBase {
590
598
  if (changes.has("formatOptions") || changes.has("resolvedLanguage")) {
591
599
  this.clearNumberFormatterCache();
592
600
  }
593
- if (changes.has("value") || changes.has("max") || changes.has("min")) {
601
+ if (changes.has("value") || changes.has("max") || changes.has("min") || changes.has("step")) {
594
602
  const value = this.numberParser.parse(
595
603
  this.formattedValue.replace(this._forcedUnit, "")
596
604
  );
597
605
  this.value = value;
598
- }
599
- if (changes.has("step")) {
600
606
  this.clearValueFormatterCache();
601
607
  }
602
608
  super.update(changes);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["NumberField.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { NumberFormatter, NumberParser } from '@internationalized/number';\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { streamingListener } from '@spectrum-web-components/base/src/streaming-listener.js';\nimport {\n LanguageResolutionController,\n languageResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.js';\n\nimport chevronStyles from '@spectrum-web-components/icon/src/spectrum-icon-chevron.css.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-chevron100.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-chevron200.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-chevron50.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-chevron75.js';\nimport '@spectrum-web-components/infield-button/sp-infield-button.js';\nimport {\n isAndroid,\n isIOS,\n isIPhone,\n} from '@spectrum-web-components/shared/src/platform.js';\nimport { TextfieldBase } from '@spectrum-web-components/textfield';\nimport chevronIconOverrides from '@spectrum-web-components/icon/src/icon-chevron-overrides.css.js';\nimport styles from './number-field.css.js';\n\nexport const FRAMES_PER_CHANGE = 5;\n// Debounce duration for inserting a `change` event after a batch of `wheel` originating `input` events.\nexport const CHANGE_DEBOUNCE_MS = 100;\nexport const indeterminatePlaceholder = '-';\nexport const remapMultiByteCharacters: Record<string, string> = {\n '\uFF11': '1',\n '\uFF12': '2',\n '\uFF13': '3',\n '\uFF14': '4',\n '\uFF15': '5',\n '\uFF16': '6',\n '\uFF17': '7',\n '\uFF18': '8',\n '\uFF19': '9',\n '\uFF10': '0',\n '\u3001': ',',\n '\uFF0C': ',',\n '\u3002': '.',\n '\uFF0E': '.',\n '\uFF05': '%',\n '\uFF0B': '+',\n \u30FC: '-',\n \u4E00: '1',\n \u4E8C: '2',\n \u4E09: '3',\n \u56DB: '4',\n \u4E94: '5',\n \u516D: '6',\n \u4E03: '7',\n \u516B: '8',\n \u4E5D: '9',\n \u96F6: '0',\n};\nconst chevronIcon: Record<string, (dir: 'Down' | 'Up') => TemplateResult> = {\n s: (dir) => html`\n <sp-icon-chevron50\n class=\"stepper-icon spectrum-UIIcon-Chevron${dir}50\"\n ></sp-icon-chevron50>\n `,\n m: (dir) => html`\n <sp-icon-chevron75\n class=\"stepper-icon spectrum-UIIcon-Chevron${dir}75\"\n ></sp-icon-chevron75>\n `,\n l: (dir) => html`\n <sp-icon-chevron100\n class=\"stepper-icon spectrum-UIIcon-Chevron${dir}100\"\n ></sp-icon-chevron100>\n `,\n xl: (dir) => html`\n <sp-icon-chevron200\n class=\"stepper-icon spectrum-UIIcon-Chevron${dir}200\"\n ></sp-icon-chevron200>\n `,\n};\n\n/**\n * @element sp-number-field\n * @slot help-text - default or non-negative help text to associate to your form element\n * @slot negative-help-text - negative help text to associate to your form element when `invalid`\n */\nexport class NumberField extends TextfieldBase {\n public static override get styles(): CSSResultArray {\n return [...super.styles, styles, chevronStyles, chevronIconOverrides];\n }\n\n @query('.buttons')\n private buttons!: HTMLDivElement;\n\n @property({ type: Boolean, reflect: true })\n public override focused = false;\n\n _forcedUnit = '';\n\n /**\n * An `&lt;sp-number-field&gt;` element will process its numeric value with\n * `new Intl.NumberFormat(this.resolvedLanguage, this.formatOptions).format(this.valueAsNumber)`\n * in order to prepare it for visual delivery in the input. In order to customize this\n * processing supply your own `Intl.NumberFormatOptions` object here.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat\n */\n @property({ type: Object, attribute: 'format-options' })\n public formatOptions: Intl.NumberFormatOptions = {};\n\n /**\n * Whether the stepper UI is hidden or not.\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-stepper' })\n public hideStepper = false;\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'keyboard-focused' })\n public keyboardFocused = false;\n\n @property({ type: Number })\n public max?: number;\n\n @property({ type: Number })\n public min?: number;\n\n /**\n * The distance by which to alter the value of the element when taking a \"step\".\n *\n * When `this.formatOptions.style === 'percentage'` the default step will be\n * set to 0.01 unless otherwise supplied to the element.\n */\n @property({ type: Number })\n public step?: number;\n\n public managedInput = false;\n\n @property({ type: Number, reflect: true, attribute: 'step-modifier' })\n public stepModifier = 10;\n\n @property({ type: Number })\n public override set value(rawValue: number) {\n const value = this.validateInput(rawValue);\n if (value === this.value) {\n return;\n }\n this.lastCommitedValue = value;\n const oldValue = this._value;\n this._value = value;\n this.requestUpdate('value', oldValue);\n }\n\n public override get value(): number {\n return this._value;\n }\n\n private get inputValue(): string {\n return this.indeterminate\n ? this.formattedValue\n : this.inputElement.value;\n }\n\n public override _value = NaN;\n private _trackingValue = '';\n private lastCommitedValue?: number;\n\n private setValue(newValue: number = this.value): void {\n // Capture previous value for accurate IME change detection\n const previousValue = this.lastCommitedValue;\n\n this.value = newValue;\n\n if (\n typeof previousValue === 'undefined' ||\n previousValue === this.value\n ) {\n // Do not announce when the value is unchanged.\n return;\n }\n\n this.lastCommitedValue = this.value;\n\n this.dispatchEvent(\n new Event('change', { bubbles: true, composed: true })\n );\n }\n\n /**\n * Retreive the value of the element parsed to a Number.\n */\n public get valueAsString(): string {\n return this._value.toString();\n }\n\n public set valueAsString(value: string) {\n this.value = this.numberParser.parse(value);\n }\n\n public get formattedValue(): string {\n if (isNaN(this.value)) return '';\n return (\n this.numberFormatter.format(this.value) +\n (this.focused ? '' : this._forcedUnit)\n );\n }\n\n private decimalsChars = new Set(['.', ',']);\n private valueBeforeFocus: string = '';\n private isIntentDecimal: boolean = false;\n\n private convertValueToNumber(inputValue: string): number {\n // Normalize full-width characters to their ASCII equivalents\n let normalizedValue = inputValue\n .split('')\n .map((char) => remapMultiByteCharacters[char] || char)\n .join('');\n\n const separators = this.valueBeforeFocus\n .split('')\n .filter((char) => this.decimalsChars.has(char));\n const uniqueSeparators = new Set(separators);\n\n if (\n isIOS() &&\n this.inputElement.inputMode === 'decimal' &&\n normalizedValue !== this.valueBeforeFocus\n ) {\n const parts = this.numberFormatter.formatToParts(1000.1);\n\n const replacementDecimal = parts.find(\n (part) => part.type === 'decimal'\n )!.value;\n\n for (const separator of uniqueSeparators) {\n const isDecimalSeparator = separator === replacementDecimal;\n if (!isDecimalSeparator && !this.isIntentDecimal) {\n normalizedValue = normalizedValue.replace(\n new RegExp(separator, 'g'),\n ''\n );\n }\n }\n\n let hasReplacedDecimal = false;\n const valueChars = normalizedValue.split('');\n for (let index = valueChars.length - 1; index >= 0; index--) {\n const char = valueChars[index];\n if (this.decimalsChars.has(char)) {\n if (!hasReplacedDecimal) {\n valueChars[index] = replacementDecimal;\n hasReplacedDecimal = true;\n } else valueChars[index] = '';\n }\n }\n normalizedValue = valueChars.join('');\n }\n return this.numberParser.parse(normalizedValue);\n }\n private get _step(): number {\n if (typeof this.step !== 'undefined') {\n return this.step;\n }\n if (this.formatOptions?.style === 'percent') {\n return 0.01;\n }\n return 1;\n }\n\n private nextChange!: number;\n private changeCount = 0;\n private findChange!: (event: PointerEvent) => void;\n private change!: (event: PointerEvent) => void;\n private safty!: number;\n private languageResolver = new LanguageResolutionController(this);\n\n private handlePointerdown(event: PointerEvent): void {\n if (event.button !== 0) {\n event.preventDefault();\n return;\n }\n this.managedInput = true;\n this.buttons.setPointerCapture(event.pointerId);\n const stepUpRect = this.buttons.children[0].getBoundingClientRect();\n const stepDownRect = this.buttons.children[1].getBoundingClientRect();\n this.findChange = (event: PointerEvent) => {\n if (\n event.clientX >= stepUpRect.x &&\n event.clientY >= stepUpRect.y &&\n event.clientX <= stepUpRect.x + stepUpRect.width &&\n event.clientY <= stepUpRect.y + stepUpRect.height\n ) {\n this.change = (event: PointerEvent) =>\n this.increment(event.shiftKey ? this.stepModifier : 1);\n } else if (\n event.clientX >= stepDownRect.x &&\n event.clientY >= stepDownRect.y &&\n event.clientX <= stepDownRect.x + stepDownRect.width &&\n event.clientY <= stepDownRect.y + stepDownRect.height\n ) {\n this.change = (event: PointerEvent) =>\n this.decrement(event.shiftKey ? this.stepModifier : 1);\n }\n };\n this.findChange(event);\n this.startChange(event);\n }\n\n private startChange(event: PointerEvent): void {\n this.changeCount = 0;\n this.doChange(event);\n this.safty = setTimeout(() => {\n this.doNextChange(event);\n }, 400) as unknown as number;\n }\n\n private doChange(event: PointerEvent): void {\n this.change(event);\n }\n\n private handlePointermove(event: PointerEvent): void {\n this.findChange(event);\n }\n\n private handlePointerup(event: PointerEvent): void {\n this.buttons.releasePointerCapture(event.pointerId);\n cancelAnimationFrame(this.nextChange);\n clearTimeout(this.safty);\n this.managedInput = false;\n this.setValue();\n }\n\n private doNextChange(event: PointerEvent): number {\n this.changeCount += 1;\n if (this.changeCount % FRAMES_PER_CHANGE === 0) {\n this.doChange(event);\n }\n return requestAnimationFrame(() => {\n this.nextChange = this.doNextChange(event);\n });\n }\n\n private stepBy(count: number): void {\n if (this.disabled || this.readonly) {\n return;\n }\n const min = typeof this.min !== 'undefined' ? this.min : 0;\n let value = this.value;\n value += count * this._step;\n if (isNaN(this.value)) {\n value = min;\n }\n value = this.valueWithLimits(value);\n\n this.requestUpdate();\n this._value = this.validateInput(value);\n this.inputElement.value = this.numberFormatter.format(value);\n\n this.inputElement.dispatchEvent(\n new Event('input', { bubbles: true, composed: true })\n );\n this.indeterminate = false;\n this.focus();\n }\n\n private increment(factor = 1): void {\n this.stepBy(1 * factor);\n }\n\n private decrement(factor = 1): void {\n this.stepBy(-1 * factor);\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n if (this.isComposing) return;\n switch (event.code) {\n case 'ArrowUp':\n event.preventDefault();\n this.increment(event.shiftKey ? this.stepModifier : 1);\n this.setValue();\n break;\n case 'ArrowDown':\n event.preventDefault();\n this.decrement(event.shiftKey ? this.stepModifier : 1);\n this.setValue();\n break;\n }\n }\n\n private queuedChangeEvent!: number;\n\n protected onScroll(event: WheelEvent): void {\n event.preventDefault();\n this.managedInput = true;\n const direction = event.shiftKey\n ? event.deltaX / Math.abs(event.deltaX)\n : event.deltaY / Math.abs(event.deltaY);\n if (direction !== 0 && !isNaN(direction)) {\n this.stepBy(direction * (event.shiftKey ? this.stepModifier : 1));\n clearTimeout(this.queuedChangeEvent);\n this.queuedChangeEvent = setTimeout(() => {\n this.setValue();\n }, CHANGE_DEBOUNCE_MS) as unknown as number;\n }\n this.managedInput = false;\n }\n\n protected override onFocus(): void {\n super.onFocus();\n this._trackingValue = this.inputValue;\n this.keyboardFocused = !this.readonly && true;\n this.addEventListener('wheel', this.onScroll, { passive: false });\n this.valueBeforeFocus = this.inputElement.value;\n }\n\n protected override onBlur(_event: FocusEvent): void {\n super.onBlur(_event);\n this.keyboardFocused = !this.readonly && false;\n this.removeEventListener('wheel', this.onScroll);\n this.isIntentDecimal = false;\n }\n\n private handleFocusin(): void {\n this.focused = !this.readonly && true;\n this.keyboardFocused = !this.readonly && true;\n }\n\n private handleFocusout(): void {\n this.focused = !this.readonly && false;\n this.keyboardFocused = !this.readonly && false;\n }\n\n private wasIndeterminate = false;\n private indeterminateValue?: number;\n\n protected override handleChange(): void {\n const value = this.convertValueToNumber(this.inputValue);\n if (this.wasIndeterminate) {\n this.wasIndeterminate = false;\n this.indeterminateValue = undefined;\n if (isNaN(value)) {\n this.indeterminate = true;\n return;\n }\n }\n this.setValue(value);\n this.inputElement.value = this.formattedValue;\n }\n\n protected handleCompositionStart(): void {\n this.isComposing = true;\n }\n\n protected handleCompositionEnd(): void {\n this.isComposing = false;\n requestAnimationFrame(() => {\n this.inputElement.dispatchEvent(\n new Event('input', {\n composed: true,\n bubbles: true,\n })\n );\n });\n }\n\n private hasRecentlyReceivedPointerDown = false;\n\n protected override handleInputElementPointerdown(): void {\n this.hasRecentlyReceivedPointerDown = true;\n this.updateComplete.then(() => {\n requestAnimationFrame(() => {\n this.hasRecentlyReceivedPointerDown = false;\n });\n });\n }\n\n protected override handleInput(event: InputEvent): void {\n if (this.isComposing) {\n event.stopPropagation();\n return;\n }\n if (this.indeterminate) {\n this.wasIndeterminate = true;\n this.indeterminateValue = this.value;\n this.inputElement.value = this.inputElement.value.replace(\n indeterminatePlaceholder,\n ''\n );\n }\n if (event.data && this.decimalsChars.has(event.data))\n this.isIntentDecimal = true;\n\n const { value: originalValue, selectionStart } = this.inputElement;\n const value = originalValue\n .split('')\n .map((char) => remapMultiByteCharacters[char] || char)\n .join('');\n\n if (this.numberParser.isValidPartialNumber(value)) {\n // Use starting value as this.value is the `input` value.\n this.lastCommitedValue = this.lastCommitedValue ?? this.value;\n const valueAsNumber = this.convertValueToNumber(value);\n if (!value && this.indeterminateValue) {\n this.indeterminate = true;\n this._value = this.indeterminateValue;\n } else {\n this.indeterminate = false;\n this._value = this.validateInput(valueAsNumber);\n }\n this._trackingValue = value;\n this.inputElement.value = value;\n this.inputElement.setSelectionRange(selectionStart, selectionStart);\n return;\n } else {\n this.inputElement.value = this.indeterminate\n ? indeterminatePlaceholder\n : this._trackingValue;\n }\n const currentLength = value.length;\n const previousLength = this._trackingValue.length;\n const nextSelectStart =\n (selectionStart || currentLength) -\n (currentLength - previousLength);\n this.inputElement.setSelectionRange(nextSelectStart, nextSelectStart);\n }\n\n private valueWithLimits(nextValue: number): number {\n let value = nextValue;\n if (typeof this.min !== 'undefined') {\n value = Math.max(this.min, value);\n }\n if (typeof this.max !== 'undefined') {\n value = Math.min(this.max, value);\n }\n return value;\n }\n\n private validateInput(value: number): number {\n value = this.valueWithLimits(value);\n const signMultiplier = value < 0 ? -1 : 1; // 'signMultiplier' adjusts 'value' for 'validateInput' and reverts it before returning.\n value *= signMultiplier;\n\n // Step shouldn't validate when 0...\n if (this.step) {\n const min = typeof this.min !== 'undefined' ? this.min : 0;\n const moduloStep = parseFloat(\n this.valueFormatter.format((value - min) % this.step)\n );\n const fallsOnStep = moduloStep === 0;\n if (!fallsOnStep) {\n const overUnder = Math.round(moduloStep / this.step);\n if (overUnder === 1) {\n value += this.step - moduloStep;\n } else {\n value -= moduloStep;\n }\n }\n if (typeof this.max !== 'undefined') {\n while (value > this.max) {\n value -= this.step;\n }\n }\n value = parseFloat(this.valueFormatter.format(value));\n }\n value *= signMultiplier;\n return value;\n }\n\n protected override get displayValue(): string {\n const indeterminateValue = this.focused ? '' : indeterminatePlaceholder;\n return this.indeterminate ? indeterminateValue : this.formattedValue;\n }\n\n protected clearNumberFormatterCache(): void {\n this._numberFormatter = undefined;\n this._numberParser = undefined;\n }\n\n protected get numberFormatter(): NumberFormatter {\n if (!this._numberFormatter || !this._numberFormatterFocused) {\n const {\n style,\n unit,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n unitDisplay,\n ...formatOptionsNoUnit\n } = this.formatOptions;\n if (style !== 'unit') {\n (formatOptionsNoUnit as Intl.NumberFormatOptions).style = style;\n }\n this._numberFormatterFocused = new NumberFormatter(\n this.languageResolver.language,\n formatOptionsNoUnit\n );\n try {\n this._numberFormatter = new NumberFormatter(\n this.languageResolver.language,\n this.formatOptions\n );\n this._forcedUnit = '';\n this._numberFormatter.format(1);\n } catch (error) {\n if (style === 'unit') {\n this._forcedUnit = unit as string;\n }\n this._numberFormatter = this._numberFormatterFocused;\n }\n }\n return this.focused\n ? this._numberFormatterFocused\n : this._numberFormatter;\n }\n\n protected clearValueFormatterCache(): void {\n this._valueFormatter = undefined;\n }\n protected get valueFormatter(): NumberFormatter {\n if (!this._valueFormatter) {\n const digitsAfterDecimal = this.step\n ? this.step != Math.floor(this.step)\n ? this.step.toString().split('.')[1].length\n : 0\n : 0;\n this._valueFormatter = new NumberFormatter('en', {\n useGrouping: false,\n maximumFractionDigits: digitsAfterDecimal,\n });\n }\n\n return this._valueFormatter;\n }\n private _numberFormatter?: NumberFormatter;\n private _numberFormatterFocused?: NumberFormatter;\n private _valueFormatter?: NumberFormatter;\n protected get numberParser(): NumberParser {\n if (!this._numberParser || !this._numberParserFocused) {\n const {\n style,\n unit,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n unitDisplay,\n ...formatOptionsNoUnit\n } = this.formatOptions;\n if (style !== 'unit') {\n (formatOptionsNoUnit as Intl.NumberFormatOptions).style = style;\n }\n this._numberParserFocused = new NumberParser(\n this.languageResolver.language,\n formatOptionsNoUnit\n );\n try {\n this._numberParser = new NumberParser(\n this.languageResolver.language,\n this.formatOptions\n );\n this._forcedUnit = '';\n this._numberParser.parse('0');\n } catch (error) {\n if (style === 'unit') {\n this._forcedUnit = unit as string;\n }\n this._numberParser = this._numberParserFocused;\n }\n }\n return this.focused ? this._numberParserFocused : this._numberParser;\n }\n\n applyFocusElementLabel = (value?: string): void => {\n this.appliedLabel = value;\n };\n\n private _numberParser?: NumberParser;\n private _numberParserFocused?: NumberParser;\n\n protected override renderField(): TemplateResult {\n this.autocomplete = 'off';\n return html`\n ${super.renderField()}\n ${this.hideStepper\n ? nothing\n : html`\n <span\n class=\"buttons\"\n @focusin=${this.handleFocusin}\n @focusout=${this.handleFocusout}\n ${streamingListener({\n start: ['pointerdown', this.handlePointerdown],\n streamInside: [\n [\n 'pointermove',\n 'pointerenter',\n 'pointerleave',\n 'pointerover',\n 'pointerout',\n ],\n this.handlePointermove,\n ],\n end: [\n [\n 'pointerup',\n 'pointercancel',\n 'pointerleave',\n ],\n this.handlePointerup,\n ],\n })}\n >\n <sp-infield-button\n inline=\"end\"\n block=\"start\"\n class=\"button step-up\"\n aria-describedby=${this.helpTextId}\n label=${'Increase ' + this.appliedLabel}\n size=${this.size}\n tabindex=\"-1\"\n ?focused=${this.focused}\n ?disabled=${this.disabled ||\n this.readonly ||\n (typeof this.max !== 'undefined' &&\n this.value === this.max)}\n ?quiet=${this.quiet}\n >\n ${chevronIcon[this.size]('Up')}\n </sp-infield-button>\n <sp-infield-button\n inline=\"end\"\n block=\"end\"\n class=\"button step-down\"\n aria-describedby=${this.helpTextId}\n label=${'Decrease ' + this.appliedLabel}\n size=${this.size}\n tabindex=\"-1\"\n ?focused=${this.focused}\n ?disabled=${this.disabled ||\n this.readonly ||\n (typeof this.min !== 'undefined' &&\n this.value === this.min)}\n ?quiet=${this.quiet}\n >\n ${chevronIcon[this.size]('Down')}\n </sp-infield-button>\n </span>\n `}\n `;\n }\n\n protected override update(changes: PropertyValues): void {\n if (changes.has('formatOptions') || changes.has('resolvedLanguage')) {\n this.clearNumberFormatterCache();\n }\n if (changes.has('value') || changes.has('max') || changes.has('min')) {\n const value = this.numberParser.parse(\n this.formattedValue.replace(this._forcedUnit, '')\n );\n this.value = value;\n }\n if (changes.has('step')) {\n this.clearValueFormatterCache();\n }\n super.update(changes);\n }\n\n public override willUpdate(changes: PropertyValues): void {\n this.multiline = false;\n if (changes.has(languageResolverUpdatedSymbol)) {\n this.clearNumberFormatterCache();\n }\n }\n\n private isComposing = false;\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.addEventListener('keydown', this.handleKeydown);\n this.addEventListener('compositionstart', this.handleCompositionStart);\n this.addEventListener('compositionend', this.handleCompositionEnd);\n }\n\n protected override updated(changes: PropertyValues<this>): void {\n if (!this.inputElement || !this.isConnected) {\n // Prevent race conditions if inputElement is removed from DOM while a queued update is still running.\n return;\n }\n\n if (changes.has('min') || changes.has('formatOptions')) {\n const hasOnlyPositives =\n typeof this.min !== 'undefined' && this.min >= 0;\n\n const { maximumFractionDigits } =\n this.numberFormatter.resolvedOptions();\n const hasDecimals =\n maximumFractionDigits && maximumFractionDigits > 0;\n\n let inputMode = 'numeric';\n /* c8 ignore next 5 */\n // iPhone doesn't have a minus sign in either numeric or decimal.\n if (isIPhone() && !hasOnlyPositives) inputMode = 'text';\n else if (isIOS() && hasDecimals) inputMode = 'decimal';\n // Android numeric has both a decimal point and minus key. Decimal does not have a minus key.\n else if (isAndroid() && hasDecimals && hasOnlyPositives)\n inputMode = 'decimal';\n\n this.inputElement.inputMode = inputMode;\n }\n if (\n changes.has('focused') &&\n this.focused &&\n !this.hasRecentlyReceivedPointerDown &&\n !!this.formatOptions.unit\n ) {\n // Normalize keyboard focus entry between unit and non-unit bearing Number Fields\n this.setSelectionRange(0, this.displayValue.length);\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;AAYA,SAAS,iBAAiB,oBAAoB;AAC9C;AAAA,EAEI;AAAA,EACA;AAAA,OAGG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,yBAAyB;AAClC;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAEP,OAAO,mBAAmB;AAC1B,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,SAAS,qBAAqB;AAC9B,OAAO,0BAA0B;AACjC,OAAO,YAAY;AAEZ,aAAM,oBAAoB;AAE1B,aAAM,qBAAqB;AAC3B,aAAM,2BAA2B;AACjC,aAAM,2BAAmD;AAAA,EAC5D,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AACP;AACA,MAAM,cAAsE;AAAA,EACxE,GAAG,CAAC,QAAQ;AAAA;AAAA,yDAEyC,GAAG;AAAA;AAAA;AAAA,EAGxD,GAAG,CAAC,QAAQ;AAAA;AAAA,yDAEyC,GAAG;AAAA;AAAA;AAAA,EAGx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A,QACI,QAAQ,IAAI,SAAS,KACrB,KAAK,WACL,CAAC,KAAK,kCACN,CAAC,CAAC,KAAK,cAAc,MACvB;AAEE,WAAK,kBAAkB,GAAG,KAAK,aAAa,MAAM;AAAA,IACtD;AAAA,EACJ;AACJ;AAntBY;AAAA,EADP,MAAM,UAAU;AAAA,GALR,YAMD;AAGQ;AAAA,EADf,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GARjC,YASO;AAaT;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,WAAW,iBAAiB,CAAC;AAAA,GArB9C,YAsBF;AAMA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GA3B5D,YA4BF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GA9BjC,YA+BF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,mBAAmB,CAAC;AAAA,GAjChE,YAkCF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GApCjB,YAqCF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAvCjB,YAwCF;AASA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAhDjB,YAiDF;AAKA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,gBAAgB,CAAC;AAAA,GArD5D,YAsDF;AAGa;AAAA,EADnB,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAxDjB,YAyDW;",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { NumberFormatter, NumberParser } from '@internationalized/number';\nimport {\n CSSResultArray,\n html,\n nothing,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { streamingListener } from '@spectrum-web-components/base/src/streaming-listener.js';\nimport {\n LanguageResolutionController,\n languageResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.js';\n\nimport chevronStyles from '@spectrum-web-components/icon/src/spectrum-icon-chevron.css.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-chevron100.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-chevron200.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-chevron50.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-chevron75.js';\nimport '@spectrum-web-components/infield-button/sp-infield-button.js';\nimport {\n isAndroid,\n isIOS,\n isIPhone,\n} from '@spectrum-web-components/shared/src/platform.js';\nimport { TextfieldBase } from '@spectrum-web-components/textfield';\nimport chevronIconOverrides from '@spectrum-web-components/icon/src/icon-chevron-overrides.css.js';\nimport styles from './number-field.css.js';\n\nexport const FRAMES_PER_CHANGE = 5;\n// Debounce duration for inserting a `change` event after a batch of `wheel` originating `input` events.\nexport const CHANGE_DEBOUNCE_MS = 100;\nexport const indeterminatePlaceholder = '-';\nexport const remapMultiByteCharacters: Record<string, string> = {\n '\uFF11': '1',\n '\uFF12': '2',\n '\uFF13': '3',\n '\uFF14': '4',\n '\uFF15': '5',\n '\uFF16': '6',\n '\uFF17': '7',\n '\uFF18': '8',\n '\uFF19': '9',\n '\uFF10': '0',\n '\u3001': ',',\n '\uFF0C': ',',\n '\u3002': '.',\n '\uFF0E': '.',\n '\uFF05': '%',\n '\uFF0B': '+',\n \u30FC: '-',\n \u4E00: '1',\n \u4E8C: '2',\n \u4E09: '3',\n \u56DB: '4',\n \u4E94: '5',\n \u516D: '6',\n \u4E03: '7',\n \u516B: '8',\n \u4E5D: '9',\n \u96F6: '0',\n};\nconst chevronIcon: Record<string, (dir: 'Down' | 'Up') => TemplateResult> = {\n s: (dir) => html`\n <sp-icon-chevron50\n class=\"stepper-icon spectrum-UIIcon-Chevron${dir}50\"\n ></sp-icon-chevron50>\n `,\n m: (dir) => html`\n <sp-icon-chevron75\n class=\"stepper-icon spectrum-UIIcon-Chevron${dir}75\"\n ></sp-icon-chevron75>\n `,\n l: (dir) => html`\n <sp-icon-chevron100\n class=\"stepper-icon spectrum-UIIcon-Chevron${dir}100\"\n ></sp-icon-chevron100>\n `,\n xl: (dir) => html`\n <sp-icon-chevron200\n class=\"stepper-icon spectrum-UIIcon-Chevron${dir}200\"\n ></sp-icon-chevron200>\n `,\n};\n\n/**\n * @element sp-number-field\n * @slot help-text - default or non-negative help text to associate to your form element\n * @slot negative-help-text - negative help text to associate to your form element when `invalid`\n */\nexport class NumberField extends TextfieldBase {\n public static override get styles(): CSSResultArray {\n return [...super.styles, styles, chevronStyles, chevronIconOverrides];\n }\n\n @query('.buttons')\n private buttons!: HTMLDivElement;\n\n @property({ type: Boolean, reflect: true })\n public override focused = false;\n\n _forcedUnit = '';\n\n /**\n * An `&lt;sp-number-field&gt;` element will process its numeric value with\n * `new Intl.NumberFormat(this.resolvedLanguage, this.formatOptions).format(this.valueAsNumber)`\n * in order to prepare it for visual delivery in the input. In order to customize this\n * processing supply your own `Intl.NumberFormatOptions` object here.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat\n */\n @property({ type: Object, attribute: 'format-options' })\n public formatOptions: Intl.NumberFormatOptions = {};\n\n /**\n * Whether the stepper UI is hidden or not.\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-stepper' })\n public hideStepper = false;\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'keyboard-focused' })\n public keyboardFocused = false;\n\n @property({ type: Number })\n public max?: number;\n\n @property({ type: Number })\n public min?: number;\n\n /**\n * The distance by which to alter the value of the element when taking a \"step\".\n *\n * When `this.formatOptions.style === 'percentage'` the default step will be\n * set to 0.01 unless otherwise supplied to the element.\n */\n @property({ type: Number })\n public step?: number;\n\n public managedInput = false;\n\n @property({ type: Number, reflect: true, attribute: 'step-modifier' })\n public stepModifier = 10;\n\n @property({ type: Number })\n public override set value(rawValue: number) {\n const value = this.validateInput(rawValue);\n if (value === this.value) {\n return;\n }\n this.lastCommitedValue = value;\n const oldValue = this._value;\n this._value = value;\n this.requestUpdate('value', oldValue);\n }\n\n public override get value(): number {\n return this._value;\n }\n\n private get inputValue(): string {\n return this.indeterminate\n ? this.formattedValue\n : this.inputElement.value;\n }\n\n public override _value = NaN;\n private _trackingValue = '';\n private lastCommitedValue?: number;\n\n private setValue(newValue: number = this.value): void {\n // Capture previous value for accurate IME change detection\n const previousValue = this.lastCommitedValue;\n\n this.value = newValue;\n\n if (\n typeof previousValue === 'undefined' ||\n previousValue === this.value\n ) {\n // Do not announce when the value is unchanged.\n return;\n }\n\n this.lastCommitedValue = this.value;\n\n this.dispatchEvent(\n new Event('change', { bubbles: true, composed: true })\n );\n }\n\n /**\n * Retreive the value of the element parsed to a Number.\n */\n public get valueAsString(): string {\n return this._value.toString();\n }\n\n public set valueAsString(value: string) {\n this.value = this.numberParser.parse(value);\n }\n\n public get formattedValue(): string {\n if (isNaN(this.value)) return '';\n return (\n this.numberFormatter.format(this.value) +\n (this.focused ? '' : this._forcedUnit)\n );\n }\n\n private decimalsChars = new Set(['.', ',']);\n private valueBeforeFocus: string = '';\n private isIntentDecimal: boolean = false;\n\n private convertValueToNumber(inputValue: string): number {\n // Normalize full-width characters to their ASCII equivalents\n let normalizedValue = inputValue\n .split('')\n .map((char) => remapMultiByteCharacters[char] || char)\n .join('');\n\n const separators = this.valueBeforeFocus\n .split('')\n .filter((char) => this.decimalsChars.has(char));\n const uniqueSeparators = new Set(separators);\n\n if (\n isIOS() &&\n this.inputElement.inputMode === 'decimal' &&\n normalizedValue !== this.valueBeforeFocus\n ) {\n const parts = this.numberFormatter.formatToParts(1000.1);\n\n const replacementDecimal = parts.find(\n (part) => part.type === 'decimal'\n )!.value;\n\n for (const separator of uniqueSeparators) {\n const isDecimalSeparator = separator === replacementDecimal;\n if (!isDecimalSeparator && !this.isIntentDecimal) {\n normalizedValue = normalizedValue.replace(\n new RegExp(separator, 'g'),\n ''\n );\n }\n }\n\n let hasReplacedDecimal = false;\n const valueChars = normalizedValue.split('');\n for (let index = valueChars.length - 1; index >= 0; index--) {\n const char = valueChars[index];\n if (this.decimalsChars.has(char)) {\n if (!hasReplacedDecimal) {\n valueChars[index] = replacementDecimal;\n hasReplacedDecimal = true;\n } else valueChars[index] = '';\n }\n }\n normalizedValue = valueChars.join('');\n }\n return this.numberParser.parse(normalizedValue);\n }\n private get _step(): number {\n if (typeof this.step !== 'undefined') {\n return this.step;\n }\n if (this.formatOptions?.style === 'percent') {\n return 0.01;\n }\n return 1;\n }\n\n private nextChange!: number;\n private changeCount = 0;\n private findChange!: (event: PointerEvent) => void;\n private change!: (event: PointerEvent) => void;\n private safty!: number;\n private languageResolver = new LanguageResolutionController(this);\n\n private handlePointerdown(event: PointerEvent): void {\n if (event.button !== 0) {\n event.preventDefault();\n return;\n }\n this.managedInput = true;\n this.buttons.setPointerCapture(event.pointerId);\n const stepUpRect = this.buttons.children[0].getBoundingClientRect();\n const stepDownRect = this.buttons.children[1].getBoundingClientRect();\n this.findChange = (event: PointerEvent) => {\n if (\n event.clientX >= stepUpRect.x &&\n event.clientY >= stepUpRect.y &&\n event.clientX <= stepUpRect.x + stepUpRect.width &&\n event.clientY <= stepUpRect.y + stepUpRect.height\n ) {\n this.change = (event: PointerEvent) =>\n this.increment(event.shiftKey ? this.stepModifier : 1);\n } else if (\n event.clientX >= stepDownRect.x &&\n event.clientY >= stepDownRect.y &&\n event.clientX <= stepDownRect.x + stepDownRect.width &&\n event.clientY <= stepDownRect.y + stepDownRect.height\n ) {\n this.change = (event: PointerEvent) =>\n this.decrement(event.shiftKey ? this.stepModifier : 1);\n }\n };\n this.findChange(event);\n this.startChange(event);\n }\n\n private startChange(event: PointerEvent): void {\n this.changeCount = 0;\n this.doChange(event);\n this.safty = setTimeout(() => {\n this.doNextChange(event);\n }, 400) as unknown as number;\n }\n\n private doChange(event: PointerEvent): void {\n this.change(event);\n }\n\n private handlePointermove(event: PointerEvent): void {\n this.findChange(event);\n }\n\n private handlePointerup(event: PointerEvent): void {\n this.buttons.releasePointerCapture(event.pointerId);\n cancelAnimationFrame(this.nextChange);\n clearTimeout(this.safty);\n this.managedInput = false;\n this.setValue();\n }\n\n private doNextChange(event: PointerEvent): number {\n this.changeCount += 1;\n if (this.changeCount % FRAMES_PER_CHANGE === 0) {\n this.doChange(event);\n }\n return requestAnimationFrame(() => {\n this.nextChange = this.doNextChange(event);\n });\n }\n\n private stepBy(count: number): void {\n if (this.disabled || this.readonly) {\n return;\n }\n const min = typeof this.min !== 'undefined' ? this.min : 0;\n let value = this.value;\n value += count * this._step;\n if (isNaN(this.value)) {\n value = min;\n }\n value = this.valueWithLimits(value);\n\n this.requestUpdate();\n this._value = this.validateInput(value);\n this.inputElement.value = this.numberFormatter.format(value);\n\n this.inputElement.dispatchEvent(\n new Event('input', { bubbles: true, composed: true })\n );\n this.indeterminate = false;\n this.focus();\n }\n\n private increment(factor = 1): void {\n this.stepBy(1 * factor);\n }\n\n private decrement(factor = 1): void {\n this.stepBy(-1 * factor);\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n if (this.isComposing) return;\n switch (event.code) {\n case 'ArrowUp':\n event.preventDefault();\n this.increment(event.shiftKey ? this.stepModifier : 1);\n this.setValue();\n break;\n case 'ArrowDown':\n event.preventDefault();\n this.decrement(event.shiftKey ? this.stepModifier : 1);\n this.setValue();\n break;\n }\n }\n\n private queuedChangeEvent!: number;\n\n protected onScroll(event: WheelEvent): void {\n event.preventDefault();\n this.managedInput = true;\n const direction = event.shiftKey\n ? event.deltaX / Math.abs(event.deltaX)\n : event.deltaY / Math.abs(event.deltaY);\n if (direction !== 0 && !isNaN(direction)) {\n this.stepBy(direction * (event.shiftKey ? this.stepModifier : 1));\n clearTimeout(this.queuedChangeEvent);\n this.queuedChangeEvent = setTimeout(() => {\n this.setValue();\n }, CHANGE_DEBOUNCE_MS) as unknown as number;\n }\n this.managedInput = false;\n }\n\n protected override onFocus(): void {\n super.onFocus();\n this._trackingValue = this.inputValue;\n this.keyboardFocused = !this.readonly && true;\n this.addEventListener('wheel', this.onScroll, { passive: false });\n this.valueBeforeFocus = this.inputElement.value;\n }\n\n protected override onBlur(_event: FocusEvent): void {\n super.onBlur(_event);\n this.keyboardFocused = !this.readonly && false;\n this.removeEventListener('wheel', this.onScroll);\n this.isIntentDecimal = false;\n }\n\n private handleFocusin(): void {\n this.focused = !this.readonly && true;\n this.keyboardFocused = !this.readonly && true;\n }\n\n private handleFocusout(): void {\n this.focused = !this.readonly && false;\n this.keyboardFocused = !this.readonly && false;\n }\n\n private wasIndeterminate = false;\n private indeterminateValue?: number;\n\n protected override handleChange(): void {\n const value = this.convertValueToNumber(this.inputValue);\n if (this.wasIndeterminate) {\n this.wasIndeterminate = false;\n this.indeterminateValue = undefined;\n if (isNaN(value)) {\n this.indeterminate = true;\n return;\n }\n }\n this.setValue(value);\n this.inputElement.value = this.formattedValue;\n }\n\n protected handleCompositionStart(): void {\n this.isComposing = true;\n }\n\n protected handleCompositionEnd(): void {\n this.isComposing = false;\n requestAnimationFrame(() => {\n this.inputElement.dispatchEvent(\n new Event('input', {\n composed: true,\n bubbles: true,\n })\n );\n });\n }\n\n private hasRecentlyReceivedPointerDown = false;\n\n protected override handleInputElementPointerdown(): void {\n this.hasRecentlyReceivedPointerDown = true;\n this.updateComplete.then(() => {\n requestAnimationFrame(() => {\n this.hasRecentlyReceivedPointerDown = false;\n });\n });\n }\n\n protected override handleInput(event: InputEvent): void {\n if (this.isComposing) {\n // If user actually types a new character.\n if (event.data) {\n // Don't allow non-numeric characters even in composing mode.\n const partialValue = this.convertValueToNumber(event.data);\n\n if (Number.isNaN(partialValue)) {\n this.inputElement.value = this.indeterminate\n ? indeterminatePlaceholder\n : this._trackingValue;\n\n this.isComposing = false;\n }\n }\n\n event.stopPropagation();\n return;\n }\n if (this.indeterminate) {\n this.wasIndeterminate = true;\n this.indeterminateValue = this.value;\n this.inputElement.value = this.inputElement.value.replace(\n indeterminatePlaceholder,\n ''\n );\n }\n if (event.data && this.decimalsChars.has(event.data))\n this.isIntentDecimal = true;\n\n const { value: originalValue, selectionStart } = this.inputElement;\n const value = originalValue\n .split('')\n .map((char) => remapMultiByteCharacters[char] || char)\n .join('');\n\n if (this.numberParser.isValidPartialNumber(value)) {\n // Use starting value as this.value is the `input` value.\n this.lastCommitedValue = this.lastCommitedValue ?? this.value;\n const valueAsNumber = this.convertValueToNumber(value);\n if (!value && this.indeterminateValue) {\n this.indeterminate = true;\n this._value = this.indeterminateValue;\n } else {\n this.indeterminate = false;\n this._value = this.validateInput(valueAsNumber);\n }\n this._trackingValue = value;\n this.inputElement.value = value;\n this.inputElement.setSelectionRange(selectionStart, selectionStart);\n return;\n } else {\n this.inputElement.value = this.indeterminate\n ? indeterminatePlaceholder\n : this._trackingValue;\n\n // Don't emit input event when the character is invalid.\n event.stopPropagation();\n }\n const currentLength = value.length;\n const previousLength = this._trackingValue.length;\n const nextSelectStart =\n (selectionStart || currentLength) -\n (currentLength - previousLength);\n this.inputElement.setSelectionRange(nextSelectStart, nextSelectStart);\n }\n\n private valueWithLimits(nextValue: number): number {\n let value = nextValue;\n if (typeof this.min !== 'undefined') {\n value = Math.max(this.min, value);\n }\n if (typeof this.max !== 'undefined') {\n value = Math.min(this.max, value);\n }\n return value;\n }\n\n private validateInput(value: number): number {\n value = this.valueWithLimits(value);\n const signMultiplier = value < 0 ? -1 : 1; // 'signMultiplier' adjusts 'value' for 'validateInput' and reverts it before returning.\n value *= signMultiplier;\n\n // Step shouldn't validate when 0...\n if (this.step) {\n const min = typeof this.min !== 'undefined' ? this.min : 0;\n const moduloStep = parseFloat(\n this.valueFormatter.format((value - min) % this.step)\n );\n const fallsOnStep = moduloStep === 0;\n if (!fallsOnStep) {\n const overUnder = Math.round(moduloStep / this.step);\n if (overUnder === 1) {\n value += this.step - moduloStep;\n } else {\n value -= moduloStep;\n }\n }\n if (typeof this.max !== 'undefined') {\n while (value > this.max) {\n value -= this.step;\n }\n }\n value = parseFloat(this.valueFormatter.format(value));\n }\n value *= signMultiplier;\n return value;\n }\n\n protected override get displayValue(): string {\n const indeterminateValue = this.focused ? '' : indeterminatePlaceholder;\n return this.indeterminate ? indeterminateValue : this.formattedValue;\n }\n\n protected clearNumberFormatterCache(): void {\n this._numberFormatter = undefined;\n this._numberParser = undefined;\n }\n\n protected get numberFormatter(): NumberFormatter {\n if (!this._numberFormatter || !this._numberFormatterFocused) {\n const {\n style,\n unit,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n unitDisplay,\n ...formatOptionsNoUnit\n } = this.formatOptions;\n if (style !== 'unit') {\n (formatOptionsNoUnit as Intl.NumberFormatOptions).style = style;\n }\n this._numberFormatterFocused = new NumberFormatter(\n this.languageResolver.language,\n formatOptionsNoUnit\n );\n try {\n this._numberFormatter = new NumberFormatter(\n this.languageResolver.language,\n this.formatOptions\n );\n this._forcedUnit = '';\n this._numberFormatter.format(1);\n } catch (error) {\n if (style === 'unit') {\n this._forcedUnit = unit as string;\n }\n this._numberFormatter = this._numberFormatterFocused;\n }\n }\n return this.focused\n ? this._numberFormatterFocused\n : this._numberFormatter;\n }\n\n protected clearValueFormatterCache(): void {\n this._valueFormatter = undefined;\n }\n protected get valueFormatter(): NumberFormatter {\n if (!this._valueFormatter) {\n const digitsAfterDecimal = this.step\n ? this.step != Math.floor(this.step)\n ? this.step.toString().split('.')[1].length\n : 0\n : 0;\n this._valueFormatter = new NumberFormatter('en', {\n useGrouping: false,\n maximumFractionDigits: digitsAfterDecimal,\n });\n }\n\n return this._valueFormatter;\n }\n private _numberFormatter?: NumberFormatter;\n private _numberFormatterFocused?: NumberFormatter;\n private _valueFormatter?: NumberFormatter;\n protected get numberParser(): NumberParser {\n if (!this._numberParser || !this._numberParserFocused) {\n const {\n style,\n unit,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n unitDisplay,\n ...formatOptionsNoUnit\n } = this.formatOptions;\n if (style !== 'unit') {\n (formatOptionsNoUnit as Intl.NumberFormatOptions).style = style;\n }\n this._numberParserFocused = new NumberParser(\n this.languageResolver.language,\n formatOptionsNoUnit\n );\n try {\n this._numberParser = new NumberParser(\n this.languageResolver.language,\n this.formatOptions\n );\n this._forcedUnit = '';\n this._numberParser.parse('0');\n } catch (error) {\n if (style === 'unit') {\n this._forcedUnit = unit as string;\n }\n this._numberParser = this._numberParserFocused;\n }\n }\n return this.focused ? this._numberParserFocused : this._numberParser;\n }\n\n applyFocusElementLabel = (value?: string): void => {\n this.appliedLabel = value;\n };\n\n private _numberParser?: NumberParser;\n private _numberParserFocused?: NumberParser;\n\n protected override renderField(): TemplateResult {\n this.autocomplete = 'off';\n return html`\n ${super.renderField()}\n ${this.hideStepper\n ? nothing\n : html`\n <span\n class=\"buttons\"\n @focusin=${this.handleFocusin}\n @focusout=${this.handleFocusout}\n ${streamingListener({\n start: ['pointerdown', this.handlePointerdown],\n streamInside: [\n [\n 'pointermove',\n 'pointerenter',\n 'pointerleave',\n 'pointerover',\n 'pointerout',\n ],\n this.handlePointermove,\n ],\n end: [\n [\n 'pointerup',\n 'pointercancel',\n 'pointerleave',\n ],\n this.handlePointerup,\n ],\n })}\n >\n <sp-infield-button\n inline=\"end\"\n block=\"start\"\n class=\"button step-up\"\n aria-hidden=\"true\"\n label=${'Increase ' + this.appliedLabel}\n size=${this.size}\n tabindex=\"-1\"\n ?focused=${this.focused}\n ?disabled=${this.disabled ||\n this.readonly ||\n (typeof this.max !== 'undefined' &&\n this.value === this.max)}\n ?quiet=${this.quiet}\n >\n ${chevronIcon[this.size]('Up')}\n </sp-infield-button>\n <sp-infield-button\n inline=\"end\"\n block=\"end\"\n class=\"button step-down\"\n aria-hidden=\"true\"\n label=${'Decrease ' + this.appliedLabel}\n size=${this.size}\n tabindex=\"-1\"\n ?focused=${this.focused}\n ?disabled=${this.disabled ||\n this.readonly ||\n (typeof this.min !== 'undefined' &&\n this.value === this.min)}\n ?quiet=${this.quiet}\n >\n ${chevronIcon[this.size]('Down')}\n </sp-infield-button>\n </span>\n `}\n `;\n }\n\n protected override update(changes: PropertyValues): void {\n if (changes.has('formatOptions') || changes.has('resolvedLanguage')) {\n this.clearNumberFormatterCache();\n }\n if (\n changes.has('value') ||\n changes.has('max') ||\n changes.has('min') ||\n changes.has('step')\n ) {\n const value = this.numberParser.parse(\n this.formattedValue.replace(this._forcedUnit, '')\n );\n this.value = value;\n this.clearValueFormatterCache();\n }\n super.update(changes);\n }\n\n public override willUpdate(changes: PropertyValues): void {\n this.multiline = false;\n if (changes.has(languageResolverUpdatedSymbol)) {\n this.clearNumberFormatterCache();\n }\n }\n\n private isComposing = false;\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.addEventListener('keydown', this.handleKeydown);\n this.addEventListener('compositionstart', this.handleCompositionStart);\n this.addEventListener('compositionend', this.handleCompositionEnd);\n }\n\n protected override updated(changes: PropertyValues<this>): void {\n if (!this.inputElement || !this.isConnected) {\n // Prevent race conditions if inputElement is removed from DOM while a queued update is still running.\n return;\n }\n\n if (changes.has('min') || changes.has('formatOptions')) {\n const hasOnlyPositives =\n typeof this.min !== 'undefined' && this.min >= 0;\n\n const { maximumFractionDigits } =\n this.numberFormatter.resolvedOptions();\n const hasDecimals =\n maximumFractionDigits && maximumFractionDigits > 0;\n\n let inputMode = 'numeric';\n /* c8 ignore next 5 */\n // iPhone doesn't have a minus sign in either numeric or decimal.\n if (isIPhone() && !hasOnlyPositives) inputMode = 'text';\n else if (isIOS() && hasDecimals) inputMode = 'decimal';\n // Android numeric has both a decimal point and minus key. Decimal does not have a minus key.\n else if (isAndroid() && hasDecimals && hasOnlyPositives)\n inputMode = 'decimal';\n\n this.inputElement.inputMode = inputMode;\n }\n if (\n changes.has('focused') &&\n this.focused &&\n !this.hasRecentlyReceivedPointerDown &&\n !!this.formatOptions.unit\n ) {\n // Normalize keyboard focus entry between unit and non-unit bearing Number Fields\n this.setSelectionRange(0, this.displayValue.length);\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAYA,SAAS,iBAAiB,oBAAoB;AAC9C;AAAA,EAEI;AAAA,EACA;AAAA,OAGG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,yBAAyB;AAClC;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAEP,OAAO,mBAAmB;AAC1B,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,SAAS,qBAAqB;AAC9B,OAAO,0BAA0B;AACjC,OAAO,YAAY;AAEZ,aAAM,oBAAoB;AAE1B,aAAM,qBAAqB;AAC3B,aAAM,2BAA2B;AACjC,aAAM,2BAAmD;AAAA,EAC5D,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,UAAK;AAAA,EACL,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AAAA,EACH,QAAG;AACP;AACA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gB,CAAC;AAAA,GArD5D,YAsDF;AAGa;AAAA,EADnB,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAxDjB,YAyDW;",
6
6
  "names": ["event"]
7
7
  }
@@ -1,4 +1,4 @@
1
- "use strict";var y=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var a=(o,p,e,t)=>{for(var i=t>1?void 0:t?F(p,e):p,s=o.length-1,r;s>=0;s--)(r=o[s])&&(i=(t?r(p,e,i):r(i))||i);return t&&i&&y(p,e,i),i};import{NumberFormatter as c,NumberParser as v}from"@internationalized/number";import{html as l,nothing as C}from"@spectrum-web-components/base";import{property as u,query as E}from"@spectrum-web-components/base/src/decorators.js";import{streamingListener as P}from"@spectrum-web-components/base/src/streaming-listener.js";import{LanguageResolutionController as _,languageResolverUpdatedSymbol as V}from"@spectrum-web-components/reactive-controllers/src/LanguageResolution.js";import w from"@spectrum-web-components/icon/src/spectrum-icon-chevron.css.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-chevron100.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-chevron200.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-chevron50.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-chevron75.js";import"@spectrum-web-components/infield-button/sp-infield-button.js";import{isAndroid as I,isIOS as b,isIPhone as x}from"@spectrum-web-components/shared/src/platform.js";import{TextfieldBase as N}from"@spectrum-web-components/textfield";import S from"@spectrum-web-components/icon/src/icon-chevron-overrides.css.js";import R from"./number-field.css.js";export const FRAMES_PER_CHANGE=5,CHANGE_DEBOUNCE_MS=100,indeterminatePlaceholder="-",remapMultiByteCharacters={"\uFF11":"1","\uFF12":"2","\uFF13":"3","\uFF14":"4","\uFF15":"5","\uFF16":"6","\uFF17":"7","\uFF18":"8","\uFF19":"9","\uFF10":"0","\u3001":",","\uFF0C":",","\u3002":".","\uFF0E":".","\uFF05":"%","\uFF0B":"+",\u30FC:"-",\u4E00:"1",\u4E8C:"2",\u4E09:"3",\u56DB:"4",\u4E94:"5",\u516D:"6",\u4E03:"7",\u516B:"8",\u4E5D:"9",\u96F6:"0"};const g={s:o=>l`
1
+ "use strict";var y=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var a=(o,p,e,t)=>{for(var i=t>1?void 0:t?F(p,e):p,s=o.length-1,r;s>=0;s--)(r=o[s])&&(i=(t?r(p,e,i):r(i))||i);return t&&i&&y(p,e,i),i};import{NumberFormatter as c,NumberParser as v}from"@internationalized/number";import{html as l,nothing as C}from"@spectrum-web-components/base";import{property as u,query as E}from"@spectrum-web-components/base/src/decorators.js";import{streamingListener as P}from"@spectrum-web-components/base/src/streaming-listener.js";import{LanguageResolutionController as _,languageResolverUpdatedSymbol as V}from"@spectrum-web-components/reactive-controllers/src/LanguageResolution.js";import w from"@spectrum-web-components/icon/src/spectrum-icon-chevron.css.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-chevron100.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-chevron200.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-chevron50.js";import"@spectrum-web-components/icons-ui/icons/sp-icon-chevron75.js";import"@spectrum-web-components/infield-button/sp-infield-button.js";import{isAndroid as I,isIOS as b,isIPhone as N}from"@spectrum-web-components/shared/src/platform.js";import{TextfieldBase as x}from"@spectrum-web-components/textfield";import S from"@spectrum-web-components/icon/src/icon-chevron-overrides.css.js";import R from"./number-field.css.js";export const FRAMES_PER_CHANGE=5,CHANGE_DEBOUNCE_MS=100,indeterminatePlaceholder="-",remapMultiByteCharacters={"\uFF11":"1","\uFF12":"2","\uFF13":"3","\uFF14":"4","\uFF15":"5","\uFF16":"6","\uFF17":"7","\uFF18":"8","\uFF19":"9","\uFF10":"0","\u3001":",","\uFF0C":",","\u3002":".","\uFF0E":".","\uFF05":"%","\uFF0B":"+",\u30FC:"-",\u4E00:"1",\u4E8C:"2",\u4E09:"3",\u56DB:"4",\u4E94:"5",\u516D:"6",\u4E03:"7",\u516B:"8",\u4E5D:"9",\u96F6:"0"};const g={s:o=>l`
2
2
  <sp-icon-chevron50
3
3
  class="stepper-icon spectrum-UIIcon-Chevron${o}50"
4
4
  ></sp-icon-chevron50>
@@ -14,7 +14,7 @@
14
14
  <sp-icon-chevron200
15
15
  class="stepper-icon spectrum-UIIcon-Chevron${o}200"
16
16
  ></sp-icon-chevron200>
17
- `};export class NumberField extends N{constructor(){super(...arguments);this.focused=!1;this._forcedUnit="";this.formatOptions={};this.hideStepper=!1;this.indeterminate=!1;this.keyboardFocused=!1;this.managedInput=!1;this.stepModifier=10;this._value=NaN;this._trackingValue="";this.decimalsChars=new Set([".",","]);this.valueBeforeFocus="";this.isIntentDecimal=!1;this.changeCount=0;this.languageResolver=new _(this);this.wasIndeterminate=!1;this.hasRecentlyReceivedPointerDown=!1;this.applyFocusElementLabel=e=>{this.appliedLabel=e};this.isComposing=!1}static get styles(){return[...super.styles,R,w,S]}set value(e){const t=this.validateInput(e);if(t===this.value)return;this.lastCommitedValue=t;const i=this._value;this._value=t,this.requestUpdate("value",i)}get value(){return this._value}get inputValue(){return this.indeterminate?this.formattedValue:this.inputElement.value}setValue(e=this.value){const t=this.lastCommitedValue;this.value=e,!(typeof t=="undefined"||t===this.value)&&(this.lastCommitedValue=this.value,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}get valueAsString(){return this._value.toString()}set valueAsString(e){this.value=this.numberParser.parse(e)}get formattedValue(){return isNaN(this.value)?"":this.numberFormatter.format(this.value)+(this.focused?"":this._forcedUnit)}convertValueToNumber(e){let t=e.split("").map(r=>remapMultiByteCharacters[r]||r).join("");const i=this.valueBeforeFocus.split("").filter(r=>this.decimalsChars.has(r)),s=new Set(i);if(b()&&this.inputElement.inputMode==="decimal"&&t!==this.valueBeforeFocus){const d=this.numberFormatter.formatToParts(1000.1).find(n=>n.type==="decimal").value;for(const n of s)!(n===d)&&!this.isIntentDecimal&&(t=t.replace(new RegExp(n,"g"),""));let m=!1;const h=t.split("");for(let n=h.length-1;n>=0;n--){const f=h[n];this.decimalsChars.has(f)&&(m?h[n]="":(h[n]=d,m=!0))}t=h.join("")}return this.numberParser.parse(t)}get _step(){var e;return typeof this.step!="undefined"?this.step:((e=this.formatOptions)==null?void 0:e.style)==="percent"?.01:1}handlePointerdown(e){if(e.button!==0){e.preventDefault();return}this.managedInput=!0,this.buttons.setPointerCapture(e.pointerId);const t=this.buttons.children[0].getBoundingClientRect(),i=this.buttons.children[1].getBoundingClientRect();this.findChange=s=>{s.clientX>=t.x&&s.clientY>=t.y&&s.clientX<=t.x+t.width&&s.clientY<=t.y+t.height?this.change=r=>this.increment(r.shiftKey?this.stepModifier:1):s.clientX>=i.x&&s.clientY>=i.y&&s.clientX<=i.x+i.width&&s.clientY<=i.y+i.height&&(this.change=r=>this.decrement(r.shiftKey?this.stepModifier:1))},this.findChange(e),this.startChange(e)}startChange(e){this.changeCount=0,this.doChange(e),this.safty=setTimeout(()=>{this.doNextChange(e)},400)}doChange(e){this.change(e)}handlePointermove(e){this.findChange(e)}handlePointerup(e){this.buttons.releasePointerCapture(e.pointerId),cancelAnimationFrame(this.nextChange),clearTimeout(this.safty),this.managedInput=!1,this.setValue()}doNextChange(e){return this.changeCount+=1,this.changeCount%FRAMES_PER_CHANGE===0&&this.doChange(e),requestAnimationFrame(()=>{this.nextChange=this.doNextChange(e)})}stepBy(e){if(this.disabled||this.readonly)return;const t=typeof this.min!="undefined"?this.min:0;let i=this.value;i+=e*this._step,isNaN(this.value)&&(i=t),i=this.valueWithLimits(i),this.requestUpdate(),this._value=this.validateInput(i),this.inputElement.value=this.numberFormatter.format(i),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.indeterminate=!1,this.focus()}increment(e=1){this.stepBy(1*e)}decrement(e=1){this.stepBy(-1*e)}handleKeydown(e){if(!this.isComposing)switch(e.code){case"ArrowUp":e.preventDefault(),this.increment(e.shiftKey?this.stepModifier:1),this.setValue();break;case"ArrowDown":e.preventDefault(),this.decrement(e.shiftKey?this.stepModifier:1),this.setValue();break}}onScroll(e){e.preventDefault(),this.managedInput=!0;const t=e.shiftKey?e.deltaX/Math.abs(e.deltaX):e.deltaY/Math.abs(e.deltaY);t!==0&&!isNaN(t)&&(this.stepBy(t*(e.shiftKey?this.stepModifier:1)),clearTimeout(this.queuedChangeEvent),this.queuedChangeEvent=setTimeout(()=>{this.setValue()},CHANGE_DEBOUNCE_MS)),this.managedInput=!1}onFocus(){super.onFocus(),this._trackingValue=this.inputValue,this.keyboardFocused=!this.readonly&&!0,this.addEventListener("wheel",this.onScroll,{passive:!1}),this.valueBeforeFocus=this.inputElement.value}onBlur(e){super.onBlur(e),this.keyboardFocused=!this.readonly&&!1,this.removeEventListener("wheel",this.onScroll),this.isIntentDecimal=!1}handleFocusin(){this.focused=!this.readonly&&!0,this.keyboardFocused=!this.readonly&&!0}handleFocusout(){this.focused=!this.readonly&&!1,this.keyboardFocused=!this.readonly&&!1}handleChange(){const e=this.convertValueToNumber(this.inputValue);if(this.wasIndeterminate&&(this.wasIndeterminate=!1,this.indeterminateValue=void 0,isNaN(e))){this.indeterminate=!0;return}this.setValue(e),this.inputElement.value=this.formattedValue}handleCompositionStart(){this.isComposing=!0}handleCompositionEnd(){this.isComposing=!1,requestAnimationFrame(()=>{this.inputElement.dispatchEvent(new Event("input",{composed:!0,bubbles:!0}))})}handleInputElementPointerdown(){this.hasRecentlyReceivedPointerDown=!0,this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.hasRecentlyReceivedPointerDown=!1})})}handleInput(e){var h;if(this.isComposing){e.stopPropagation();return}this.indeterminate&&(this.wasIndeterminate=!0,this.indeterminateValue=this.value,this.inputElement.value=this.inputElement.value.replace(indeterminatePlaceholder,"")),e.data&&this.decimalsChars.has(e.data)&&(this.isIntentDecimal=!0);const{value:t,selectionStart:i}=this.inputElement,s=t.split("").map(n=>remapMultiByteCharacters[n]||n).join("");if(this.numberParser.isValidPartialNumber(s)){this.lastCommitedValue=(h=this.lastCommitedValue)!=null?h:this.value;const n=this.convertValueToNumber(s);!s&&this.indeterminateValue?(this.indeterminate=!0,this._value=this.indeterminateValue):(this.indeterminate=!1,this._value=this.validateInput(n)),this._trackingValue=s,this.inputElement.value=s,this.inputElement.setSelectionRange(i,i);return}else this.inputElement.value=this.indeterminate?indeterminatePlaceholder:this._trackingValue;const r=s.length,d=this._trackingValue.length,m=(i||r)-(r-d);this.inputElement.setSelectionRange(m,m)}valueWithLimits(e){let t=e;return typeof this.min!="undefined"&&(t=Math.max(this.min,t)),typeof this.max!="undefined"&&(t=Math.min(this.max,t)),t}validateInput(e){e=this.valueWithLimits(e);const t=e<0?-1:1;if(e*=t,this.step){const i=typeof this.min!="undefined"?this.min:0,s=parseFloat(this.valueFormatter.format((e-i)%this.step));if(s===0||(Math.round(s/this.step)===1?e+=this.step-s:e-=s),typeof this.max!="undefined")for(;e>this.max;)e-=this.step;e=parseFloat(this.valueFormatter.format(e))}return e*=t,e}get displayValue(){const e=this.focused?"":indeterminatePlaceholder;return this.indeterminate?e:this.formattedValue}clearNumberFormatterCache(){this._numberFormatter=void 0,this._numberParser=void 0}get numberFormatter(){if(!this._numberFormatter||!this._numberFormatterFocused){const{style:e,unit:t,unitDisplay:i,...s}=this.formatOptions;e!=="unit"&&(s.style=e),this._numberFormatterFocused=new c(this.languageResolver.language,s);try{this._numberFormatter=new c(this.languageResolver.language,this.formatOptions),this._forcedUnit="",this._numberFormatter.format(1)}catch(r){e==="unit"&&(this._forcedUnit=t),this._numberFormatter=this._numberFormatterFocused}}return this.focused?this._numberFormatterFocused:this._numberFormatter}clearValueFormatterCache(){this._valueFormatter=void 0}get valueFormatter(){if(!this._valueFormatter){const e=this.step&&this.step!=Math.floor(this.step)?this.step.toString().split(".")[1].length:0;this._valueFormatter=new c("en",{useGrouping:!1,maximumFractionDigits:e})}return this._valueFormatter}get numberParser(){if(!this._numberParser||!this._numberParserFocused){const{style:e,unit:t,unitDisplay:i,...s}=this.formatOptions;e!=="unit"&&(s.style=e),this._numberParserFocused=new v(this.languageResolver.language,s);try{this._numberParser=new v(this.languageResolver.language,this.formatOptions),this._forcedUnit="",this._numberParser.parse("0")}catch(r){e==="unit"&&(this._forcedUnit=t),this._numberParser=this._numberParserFocused}}return this.focused?this._numberParserFocused:this._numberParser}renderField(){return this.autocomplete="off",l`
17
+ `};export class NumberField extends x{constructor(){super(...arguments);this.focused=!1;this._forcedUnit="";this.formatOptions={};this.hideStepper=!1;this.indeterminate=!1;this.keyboardFocused=!1;this.managedInput=!1;this.stepModifier=10;this._value=NaN;this._trackingValue="";this.decimalsChars=new Set([".",","]);this.valueBeforeFocus="";this.isIntentDecimal=!1;this.changeCount=0;this.languageResolver=new _(this);this.wasIndeterminate=!1;this.hasRecentlyReceivedPointerDown=!1;this.applyFocusElementLabel=e=>{this.appliedLabel=e};this.isComposing=!1}static get styles(){return[...super.styles,R,w,S]}set value(e){const t=this.validateInput(e);if(t===this.value)return;this.lastCommitedValue=t;const i=this._value;this._value=t,this.requestUpdate("value",i)}get value(){return this._value}get inputValue(){return this.indeterminate?this.formattedValue:this.inputElement.value}setValue(e=this.value){const t=this.lastCommitedValue;this.value=e,!(typeof t=="undefined"||t===this.value)&&(this.lastCommitedValue=this.value,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}get valueAsString(){return this._value.toString()}set valueAsString(e){this.value=this.numberParser.parse(e)}get formattedValue(){return isNaN(this.value)?"":this.numberFormatter.format(this.value)+(this.focused?"":this._forcedUnit)}convertValueToNumber(e){let t=e.split("").map(r=>remapMultiByteCharacters[r]||r).join("");const i=this.valueBeforeFocus.split("").filter(r=>this.decimalsChars.has(r)),s=new Set(i);if(b()&&this.inputElement.inputMode==="decimal"&&t!==this.valueBeforeFocus){const d=this.numberFormatter.formatToParts(1000.1).find(n=>n.type==="decimal").value;for(const n of s)!(n===d)&&!this.isIntentDecimal&&(t=t.replace(new RegExp(n,"g"),""));let m=!1;const h=t.split("");for(let n=h.length-1;n>=0;n--){const f=h[n];this.decimalsChars.has(f)&&(m?h[n]="":(h[n]=d,m=!0))}t=h.join("")}return this.numberParser.parse(t)}get _step(){var e;return typeof this.step!="undefined"?this.step:((e=this.formatOptions)==null?void 0:e.style)==="percent"?.01:1}handlePointerdown(e){if(e.button!==0){e.preventDefault();return}this.managedInput=!0,this.buttons.setPointerCapture(e.pointerId);const t=this.buttons.children[0].getBoundingClientRect(),i=this.buttons.children[1].getBoundingClientRect();this.findChange=s=>{s.clientX>=t.x&&s.clientY>=t.y&&s.clientX<=t.x+t.width&&s.clientY<=t.y+t.height?this.change=r=>this.increment(r.shiftKey?this.stepModifier:1):s.clientX>=i.x&&s.clientY>=i.y&&s.clientX<=i.x+i.width&&s.clientY<=i.y+i.height&&(this.change=r=>this.decrement(r.shiftKey?this.stepModifier:1))},this.findChange(e),this.startChange(e)}startChange(e){this.changeCount=0,this.doChange(e),this.safty=setTimeout(()=>{this.doNextChange(e)},400)}doChange(e){this.change(e)}handlePointermove(e){this.findChange(e)}handlePointerup(e){this.buttons.releasePointerCapture(e.pointerId),cancelAnimationFrame(this.nextChange),clearTimeout(this.safty),this.managedInput=!1,this.setValue()}doNextChange(e){return this.changeCount+=1,this.changeCount%FRAMES_PER_CHANGE===0&&this.doChange(e),requestAnimationFrame(()=>{this.nextChange=this.doNextChange(e)})}stepBy(e){if(this.disabled||this.readonly)return;const t=typeof this.min!="undefined"?this.min:0;let i=this.value;i+=e*this._step,isNaN(this.value)&&(i=t),i=this.valueWithLimits(i),this.requestUpdate(),this._value=this.validateInput(i),this.inputElement.value=this.numberFormatter.format(i),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.indeterminate=!1,this.focus()}increment(e=1){this.stepBy(1*e)}decrement(e=1){this.stepBy(-1*e)}handleKeydown(e){if(!this.isComposing)switch(e.code){case"ArrowUp":e.preventDefault(),this.increment(e.shiftKey?this.stepModifier:1),this.setValue();break;case"ArrowDown":e.preventDefault(),this.decrement(e.shiftKey?this.stepModifier:1),this.setValue();break}}onScroll(e){e.preventDefault(),this.managedInput=!0;const t=e.shiftKey?e.deltaX/Math.abs(e.deltaX):e.deltaY/Math.abs(e.deltaY);t!==0&&!isNaN(t)&&(this.stepBy(t*(e.shiftKey?this.stepModifier:1)),clearTimeout(this.queuedChangeEvent),this.queuedChangeEvent=setTimeout(()=>{this.setValue()},CHANGE_DEBOUNCE_MS)),this.managedInput=!1}onFocus(){super.onFocus(),this._trackingValue=this.inputValue,this.keyboardFocused=!this.readonly&&!0,this.addEventListener("wheel",this.onScroll,{passive:!1}),this.valueBeforeFocus=this.inputElement.value}onBlur(e){super.onBlur(e),this.keyboardFocused=!this.readonly&&!1,this.removeEventListener("wheel",this.onScroll),this.isIntentDecimal=!1}handleFocusin(){this.focused=!this.readonly&&!0,this.keyboardFocused=!this.readonly&&!0}handleFocusout(){this.focused=!this.readonly&&!1,this.keyboardFocused=!this.readonly&&!1}handleChange(){const e=this.convertValueToNumber(this.inputValue);if(this.wasIndeterminate&&(this.wasIndeterminate=!1,this.indeterminateValue=void 0,isNaN(e))){this.indeterminate=!0;return}this.setValue(e),this.inputElement.value=this.formattedValue}handleCompositionStart(){this.isComposing=!0}handleCompositionEnd(){this.isComposing=!1,requestAnimationFrame(()=>{this.inputElement.dispatchEvent(new Event("input",{composed:!0,bubbles:!0}))})}handleInputElementPointerdown(){this.hasRecentlyReceivedPointerDown=!0,this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.hasRecentlyReceivedPointerDown=!1})})}handleInput(e){var h;if(this.isComposing){if(e.data){const n=this.convertValueToNumber(e.data);Number.isNaN(n)&&(this.inputElement.value=this.indeterminate?indeterminatePlaceholder:this._trackingValue,this.isComposing=!1)}e.stopPropagation();return}this.indeterminate&&(this.wasIndeterminate=!0,this.indeterminateValue=this.value,this.inputElement.value=this.inputElement.value.replace(indeterminatePlaceholder,"")),e.data&&this.decimalsChars.has(e.data)&&(this.isIntentDecimal=!0);const{value:t,selectionStart:i}=this.inputElement,s=t.split("").map(n=>remapMultiByteCharacters[n]||n).join("");if(this.numberParser.isValidPartialNumber(s)){this.lastCommitedValue=(h=this.lastCommitedValue)!=null?h:this.value;const n=this.convertValueToNumber(s);!s&&this.indeterminateValue?(this.indeterminate=!0,this._value=this.indeterminateValue):(this.indeterminate=!1,this._value=this.validateInput(n)),this._trackingValue=s,this.inputElement.value=s,this.inputElement.setSelectionRange(i,i);return}else this.inputElement.value=this.indeterminate?indeterminatePlaceholder:this._trackingValue,e.stopPropagation();const r=s.length,d=this._trackingValue.length,m=(i||r)-(r-d);this.inputElement.setSelectionRange(m,m)}valueWithLimits(e){let t=e;return typeof this.min!="undefined"&&(t=Math.max(this.min,t)),typeof this.max!="undefined"&&(t=Math.min(this.max,t)),t}validateInput(e){e=this.valueWithLimits(e);const t=e<0?-1:1;if(e*=t,this.step){const i=typeof this.min!="undefined"?this.min:0,s=parseFloat(this.valueFormatter.format((e-i)%this.step));if(s===0||(Math.round(s/this.step)===1?e+=this.step-s:e-=s),typeof this.max!="undefined")for(;e>this.max;)e-=this.step;e=parseFloat(this.valueFormatter.format(e))}return e*=t,e}get displayValue(){const e=this.focused?"":indeterminatePlaceholder;return this.indeterminate?e:this.formattedValue}clearNumberFormatterCache(){this._numberFormatter=void 0,this._numberParser=void 0}get numberFormatter(){if(!this._numberFormatter||!this._numberFormatterFocused){const{style:e,unit:t,unitDisplay:i,...s}=this.formatOptions;e!=="unit"&&(s.style=e),this._numberFormatterFocused=new c(this.languageResolver.language,s);try{this._numberFormatter=new c(this.languageResolver.language,this.formatOptions),this._forcedUnit="",this._numberFormatter.format(1)}catch(r){e==="unit"&&(this._forcedUnit=t),this._numberFormatter=this._numberFormatterFocused}}return this.focused?this._numberFormatterFocused:this._numberFormatter}clearValueFormatterCache(){this._valueFormatter=void 0}get valueFormatter(){if(!this._valueFormatter){const e=this.step&&this.step!=Math.floor(this.step)?this.step.toString().split(".")[1].length:0;this._valueFormatter=new c("en",{useGrouping:!1,maximumFractionDigits:e})}return this._valueFormatter}get numberParser(){if(!this._numberParser||!this._numberParserFocused){const{style:e,unit:t,unitDisplay:i,...s}=this.formatOptions;e!=="unit"&&(s.style=e),this._numberParserFocused=new v(this.languageResolver.language,s);try{this._numberParser=new v(this.languageResolver.language,this.formatOptions),this._forcedUnit="",this._numberParser.parse("0")}catch(r){e==="unit"&&(this._forcedUnit=t),this._numberParser=this._numberParserFocused}}return this.focused?this._numberParserFocused:this._numberParser}renderField(){return this.autocomplete="off",l`
18
18
  ${super.renderField()}
19
19
  ${this.hideStepper?C:l`
20
20
  <span
@@ -27,7 +27,7 @@
27
27
  inline="end"
28
28
  block="start"
29
29
  class="button step-up"
30
- aria-describedby=${this.helpTextId}
30
+ aria-hidden="true"
31
31
  label=${"Increase "+this.appliedLabel}
32
32
  size=${this.size}
33
33
  tabindex="-1"
@@ -41,7 +41,7 @@
41
41
  inline="end"
42
42
  block="end"
43
43
  class="button step-down"
44
- aria-describedby=${this.helpTextId}
44
+ aria-hidden="true"
45
45
  label=${"Decrease "+this.appliedLabel}
46
46
  size=${this.size}
47
47
  tabindex="-1"
@@ -53,5 +53,5 @@
53
53
  </sp-infield-button>
54
54
  </span>
55
55
  `}
56
- `}update(e){if((e.has("formatOptions")||e.has("resolvedLanguage"))&&this.clearNumberFormatterCache(),e.has("value")||e.has("max")||e.has("min")){const t=this.numberParser.parse(this.formattedValue.replace(this._forcedUnit,""));this.value=t}e.has("step")&&this.clearValueFormatterCache(),super.update(e)}willUpdate(e){this.multiline=!1,e.has(V)&&this.clearNumberFormatterCache()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this.handleKeydown),this.addEventListener("compositionstart",this.handleCompositionStart),this.addEventListener("compositionend",this.handleCompositionEnd)}updated(e){if(!(!this.inputElement||!this.isConnected)){if(e.has("min")||e.has("formatOptions")){const t=typeof this.min!="undefined"&&this.min>=0,{maximumFractionDigits:i}=this.numberFormatter.resolvedOptions(),s=i&&i>0;let r="numeric";x()&&!t?r="text":(b()&&s||I()&&s&&t)&&(r="decimal"),this.inputElement.inputMode=r}e.has("focused")&&this.focused&&!this.hasRecentlyReceivedPointerDown&&this.formatOptions.unit&&this.setSelectionRange(0,this.displayValue.length)}}}a([E(".buttons")],NumberField.prototype,"buttons",2),a([u({type:Boolean,reflect:!0})],NumberField.prototype,"focused",2),a([u({type:Object,attribute:"format-options"})],NumberField.prototype,"formatOptions",2),a([u({type:Boolean,reflect:!0,attribute:"hide-stepper"})],NumberField.prototype,"hideStepper",2),a([u({type:Boolean,reflect:!0})],NumberField.prototype,"indeterminate",2),a([u({type:Boolean,reflect:!0,attribute:"keyboard-focused"})],NumberField.prototype,"keyboardFocused",2),a([u({type:Number})],NumberField.prototype,"max",2),a([u({type:Number})],NumberField.prototype,"min",2),a([u({type:Number})],NumberField.prototype,"step",2),a([u({type:Number,reflect:!0,attribute:"step-modifier"})],NumberField.prototype,"stepModifier",2),a([u({type:Number})],NumberField.prototype,"value",1);
56
+ `}update(e){if((e.has("formatOptions")||e.has("resolvedLanguage"))&&this.clearNumberFormatterCache(),e.has("value")||e.has("max")||e.has("min")||e.has("step")){const t=this.numberParser.parse(this.formattedValue.replace(this._forcedUnit,""));this.value=t,this.clearValueFormatterCache()}super.update(e)}willUpdate(e){this.multiline=!1,e.has(V)&&this.clearNumberFormatterCache()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this.handleKeydown),this.addEventListener("compositionstart",this.handleCompositionStart),this.addEventListener("compositionend",this.handleCompositionEnd)}updated(e){if(!(!this.inputElement||!this.isConnected)){if(e.has("min")||e.has("formatOptions")){const t=typeof this.min!="undefined"&&this.min>=0,{maximumFractionDigits:i}=this.numberFormatter.resolvedOptions(),s=i&&i>0;let r="numeric";N()&&!t?r="text":(b()&&s||I()&&s&&t)&&(r="decimal"),this.inputElement.inputMode=r}e.has("focused")&&this.focused&&!this.hasRecentlyReceivedPointerDown&&this.formatOptions.unit&&this.setSelectionRange(0,this.displayValue.length)}}}a([E(".buttons")],NumberField.prototype,"buttons",2),a([u({type:Boolean,reflect:!0})],NumberField.prototype,"focused",2),a([u({type:Object,attribute:"format-options"})],NumberField.prototype,"formatOptions",2),a([u({type:Boolean,reflect:!0,attribute:"hide-stepper"})],NumberField.prototype,"hideStepper",2),a([u({type:Boolean,reflect:!0})],NumberField.prototype,"indeterminate",2),a([u({type:Boolean,reflect:!0,attribute:"keyboard-focused"})],NumberField.prototype,"keyboardFocused",2),a([u({type:Number})],NumberField.prototype,"max",2),a([u({type:Number})],NumberField.prototype,"min",2),a([u({type:Number})],NumberField.prototype,"step",2),a([u({type:Number,reflect:!0,attribute:"step-modifier"})],NumberField.prototype,"stepModifier",2),a([u({type:Number})],NumberField.prototype,"value",1);
57
57
  //# sourceMappingURL=NumberField.js.map