@nova-design-system/nova-webcomponents 3.7.0 → 3.9.0

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 (125) hide show
  1. package/dist/cjs/index.cjs.js +5 -1
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/native.cjs.js +1 -1
  5. package/dist/cjs/nv-dialog.cjs.entry.js +19 -32
  6. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  7. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
  8. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
  9. package/dist/cjs/nv-fieldselect.cjs.entry.js +14 -26
  10. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nv-fieldslider.cjs.entry.js +15 -4
  12. package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nv-icon.cjs.entry.js +2 -2
  14. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  15. package/dist/collection/components/nv-dialog/nv-dialog.js +21 -40
  16. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  17. package/dist/collection/components/nv-dialogheader/nv-dialogheader.css +1 -0
  18. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +2 -0
  19. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -8
  20. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
  21. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +25 -35
  22. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
  23. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +18 -7
  24. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
  25. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  26. package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
  27. package/dist/collection/components/nv-icon/nv-icons.js +5 -1
  28. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  29. package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
  30. package/dist/components/index.js +5 -1
  31. package/dist/components/index.js.map +1 -1
  32. package/dist/components/nv-accordion-item.js +1 -1
  33. package/dist/components/nv-accordion.js +3 -3
  34. package/dist/components/nv-alert.js +1 -1
  35. package/dist/components/nv-avatar.js +1 -1
  36. package/dist/components/nv-badge.js +1 -1
  37. package/dist/components/nv-datagrid.js +2 -2
  38. package/dist/components/nv-dialog.js +23 -36
  39. package/dist/components/nv-dialog.js.map +1 -1
  40. package/dist/components/nv-dialogfooter.js +1 -1
  41. package/dist/components/nv-dialogheader.js +1 -1
  42. package/dist/components/nv-fielddate.js +2 -2
  43. package/dist/components/nv-fielddaterange.js +2 -2
  44. package/dist/components/nv-fielddropdown.js +3 -3
  45. package/dist/components/nv-fielddropdownitem.js +1 -1
  46. package/dist/components/nv-fieldmultiselect.js +3 -3
  47. package/dist/components/nv-fieldnumber.js +1 -1
  48. package/dist/components/nv-fieldpassword.js +2 -2
  49. package/dist/components/nv-fieldselect.js +18 -31
  50. package/dist/components/nv-fieldselect.js.map +1 -1
  51. package/dist/components/nv-fieldslider.js +18 -7
  52. package/dist/components/nv-fieldslider.js.map +1 -1
  53. package/dist/components/nv-fieldtext.js +1 -1
  54. package/dist/components/nv-fieldtime.js +2 -2
  55. package/dist/components/nv-icon.js +1 -1
  56. package/dist/components/nv-iconbutton.js +1 -1
  57. package/dist/components/nv-menu.js +2 -2
  58. package/dist/components/nv-menuitem.js +1 -1
  59. package/dist/components/{p-144e80f0.js → p-025b8a78.js} +2 -2
  60. package/dist/components/{p-144e80f0.js.map → p-025b8a78.js.map} +1 -1
  61. package/dist/components/{p-07550eac.js → p-30f970c3.js} +2 -2
  62. package/dist/components/{p-07550eac.js.map → p-30f970c3.js.map} +1 -1
  63. package/dist/components/{p-e8e6f88a.js → p-60064345.js} +2 -2
  64. package/dist/components/{p-e8e6f88a.js.map → p-60064345.js.map} +1 -1
  65. package/dist/components/p-6460318d.js +88 -0
  66. package/dist/components/p-6460318d.js.map +1 -0
  67. package/dist/components/{p-12258eef.js → p-68ff562f.js} +2 -2
  68. package/dist/components/{p-12258eef.js.map → p-68ff562f.js.map} +1 -1
  69. package/dist/components/{p-d576d64f.js → p-6de6866c.js} +2 -2
  70. package/dist/components/{p-d576d64f.js.map → p-6de6866c.js.map} +1 -1
  71. package/dist/components/{p-44df0d22.js → p-79e6b6a2.js} +3 -3
  72. package/dist/components/{p-44df0d22.js.map → p-79e6b6a2.js.map} +1 -1
  73. package/dist/components/{p-8b82a6f4.js → p-db4ba1d9.js} +3 -3
  74. package/dist/components/{p-8b82a6f4.js.map → p-db4ba1d9.js.map} +1 -1
  75. package/dist/components/{p-f97d1cb1.js → p-e4e1a926.js} +2 -2
  76. package/dist/components/{p-f97d1cb1.js.map → p-e4e1a926.js.map} +1 -1
  77. package/dist/components/{p-ca130ad2.js → p-ed6686a1.js} +2 -2
  78. package/dist/components/p-ed6686a1.js.map +1 -0
  79. package/dist/esm/index.js +5 -1
  80. package/dist/esm/index.js.map +1 -1
  81. package/dist/esm/loader.js +1 -1
  82. package/dist/esm/native.js +1 -1
  83. package/dist/esm/nv-dialog.entry.js +19 -32
  84. package/dist/esm/nv-dialog.entry.js.map +1 -1
  85. package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
  86. package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
  87. package/dist/esm/nv-fieldselect.entry.js +14 -26
  88. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  89. package/dist/esm/nv-fieldslider.entry.js +15 -4
  90. package/dist/esm/nv-fieldslider.entry.js.map +1 -1
  91. package/dist/esm/nv-icon.entry.js +2 -2
  92. package/dist/esm/nv-icon.entry.js.map +1 -1
  93. package/dist/native/index.esm.js +1 -1
  94. package/dist/native/index.esm.js.map +1 -1
  95. package/dist/native/native.css +1 -1
  96. package/dist/native/native.esm.js +1 -1
  97. package/dist/native/native.esm.js.map +1 -1
  98. package/dist/native/{p-baddee4c.entry.js → p-11012998.entry.js} +2 -2
  99. package/dist/native/p-11012998.entry.js.map +1 -0
  100. package/dist/native/p-3ff7a912.entry.js +2 -0
  101. package/dist/native/p-3ff7a912.entry.js.map +1 -0
  102. package/dist/native/{p-12039da4.entry.js → p-b7ec9a1b.entry.js} +2 -2
  103. package/dist/native/p-b7ec9a1b.entry.js.map +1 -0
  104. package/dist/native/p-bc77cac1.entry.js +2 -0
  105. package/dist/native/p-bc77cac1.entry.js.map +1 -0
  106. package/dist/native/{p-9dc1c3e7.entry.js → p-ff248eb8.entry.js} +2 -2
  107. package/dist/native/{p-9dc1c3e7.entry.js.map → p-ff248eb8.entry.js.map} +1 -1
  108. package/dist/types/components/nv-dialog/nv-dialog.d.ts +6 -17
  109. package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +22 -9
  110. package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +5 -4
  111. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  112. package/dist/types/components.d.ts +42 -8
  113. package/dist/vscode-data.json +19 -11
  114. package/hydrate/index.js +55 -70
  115. package/hydrate/index.mjs +55 -70
  116. package/package.json +1 -1
  117. package/dist/components/p-ca130ad2.js.map +0 -1
  118. package/dist/components/p-dd7ff995.js +0 -88
  119. package/dist/components/p-dd7ff995.js.map +0 -1
  120. package/dist/native/p-12039da4.entry.js.map +0 -1
  121. package/dist/native/p-40fa3328.entry.js +0 -2
  122. package/dist/native/p-40fa3328.entry.js.map +0 -1
  123. package/dist/native/p-baddee4c.entry.js.map +0 -1
  124. package/dist/native/p-bba5cc9b.entry.js +0 -2
  125. package/dist/native/p-bba5cc9b.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fieldselect.js","sourceRoot":"","sources":["../../../src/components/nv-fieldselect/nv-fieldselect.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS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AC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,QAAQ;gBACxD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n Element,\n State,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Content to be placed inside the select element.\n * @slot leading-input - Content to be placed before the select input, within the select container.\n * @slot before-input - Content to be placed before the select input, outside the select container.\n * @slot after-input - Content to be placed after the select input, outside the select container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldselect',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldselect.scss',\n})\nexport class NvFieldselect {\n @Element() el: HTMLNvFieldselectElement;\n private selectElement!: HTMLSelectElement;\n private internals: ElementInternals;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Select Field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region STATES\n\n @State()\n private computedDisplayValue: string = '';\n\n @State()\n private internalReadonly: boolean = false;\n\n /**\n * Options to display in the select. Can be passed as a JSON string.\n * Format: [{ label: string, value: string, selected?: boolean, disabled?: boolean }]\n */\n @Prop({ reflect: true })\n readonly options?: string;\n\n /**\n * Parsed options stored internally\n */\n @State()\n private parsedOptions: Array<{\n /**\n * The label of the option\n */\n label: string;\n /**\n * The value of the option\n */\n value: string;\n /**\n * Whether the option is selected\n */\n selected?: boolean;\n /**\n * Whether the option is disabled\n */\n disabled?: boolean;\n }> = [];\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the select element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should choose in the\n * select field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label?: string;\n\n /**\n * Add helpful hints or extra information under the select field. This is\n * where you can clarify what users should choose or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description?: string;\n\n /**\n * Defines the name attribute of the select field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the selected data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * The disabled prop lets you turn off the select field so that users can’t\n * choose something. When disabled, the field is grayed out and won’t respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the select field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to change or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the select field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the select field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the select field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the select field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * When enabled, allows the select to handle multiple selections.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * The value of the select field.\n * - If `multiple` is `false`, it's a single string.\n * - If `multiple` is `true`, it's a comma-separated string of selected values.\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * When enabled, displays the value element instead of the label when readonly.\n * By default, the label is displayed in readonly mode. Also it automatically\n * sets the component to readonly.\n */\n @Prop({ reflect: true })\n readonly displayValue: boolean = false;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on a <select>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the selected value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>; // Emit as a string\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Updates the display value when the value property changes. This watcher is\n * used to update the display value when the selected value changes. This is\n * necessary for readonly select fields to display the selected value.\n * @internal This watcher is not intended to be called outside of the component.\n * @param {string} newValue - The new value of the select field.\n */\n @Watch('value')\n updateDisplayValueWatcher(newValue: string) {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n const selectedValues = newValue.split(',').map(val => val.trim());\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n\n if (!this.multiple) {\n this.selectElement.value = newValue; // Only set when not multiple\n }\n } else {\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Update form value\n this.setFormValue();\n }\n\n /**\n * Watcher for the displayValue prop to ensure internalReadonly is true when displayValue is true.\n * @param {boolean} newValue - The new value of displayValue.\n */\n @Watch('displayValue')\n handleDisplayValueChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.readonly) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Watcher for the readonly prop to ensure internalReadonly is true when readonly is true.\n * @param {boolean} newValue - The new value of readonly.\n */\n @Watch('readonly')\n handleReadonlyChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Parse options and update the internal state\n * @param {string} newValue - The new value of options\n */\n @Watch('options')\n handleOptionsChange(newValue: string) {\n if (typeof newValue === 'string') {\n try {\n const parsedOpts = JSON.parse(newValue);\n this.parsedOptions = [...parsedOpts];\n\n // Update the value if an option is pre-selected\n const selectedOption = parsedOpts.find(opt => opt.selected);\n if (selectedOption) {\n this.value = selectedOption.value;\n }\n } catch (error) {\n console.error('Error parsing options:', error);\n this.parsedOptions = [];\n }\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the change event on the select element. This method is used to\n * update the value property when the selected options change. It is also\n * used to emit the selectChanged event when the selected value changes.\n * @param {Event} event - The change event on the select element.\n * @emits selectChanged\n */\n private readonly handleSelectChange = (event: Event) => {\n const select = event.target as HTMLSelectElement;\n let selectedValues: string[] = Array.from(select.selectedOptions).map(\n option => option.value,\n );\n\n if (!this.multiple) {\n selectedValues = selectedValues.slice(0, 1);\n }\n\n this.value = this.multiple\n ? selectedValues.join(', ')\n : selectedValues[0] || '';\n this.valueChanged.emit(this.value);\n\n // Update form value\n this.setFormValue();\n };\n\n /**\n * Handles focus when the select container is clicked.\n */\n private readonly handleSelectContainerClick = () => {\n if (!this.internalReadonly && this.selectElement) {\n this.selectElement.focus();\n }\n };\n\n /**\n * Updates the display value of the select field. This method is used to\n * update the display value when the selected value changes. This is necessary\n * for readonly select fields to display the selected value. This method is\n * called in the componentDidLoad lifecycle hook and the updateDisplayValueWatcher\n * watcher.\n * @internal This method is not intended to be called outside of the component.\n */\n private updateDisplayValue(): void {\n if (this.internalReadonly && !this.displayValue) {\n if (this.multiple) {\n const selectedLabels = this.value\n .split(',')\n .map(key => key.trim())\n .map(key => this.getLabelFromId(key) || '')\n .filter(label => label !== '');\n this.computedDisplayValue = selectedLabels.join(', ') || '';\n } else {\n this.computedDisplayValue = this.getLabelFromId(this.value) || '';\n }\n } else if (this.internalReadonly && this.displayValue) {\n this.computedDisplayValue = this.value || '';\n }\n }\n\n /**\n * Retrieves the label from the <option> elements based on the provided key (value).\n * This method uses the id or value attribute directly from the <select> options.\n * @param {string} key - The key (value) for which to find the corresponding label.\n * @returns {string} The label if found; otherwise, an empty string.\n */\n private getLabelFromId(key: string): string {\n this.ensureSelectElement();\n if (!this.selectElement) {\n return '';\n }\n\n // Cache the option list\n const options = this.selectElement.options;\n\n if (options) {\n const option = Array.from(options).find(option => option.value === key);\n return option ? option.textContent.trim() || '' : '';\n } else {\n return '';\n }\n }\n\n /**\n * Sets the value of the form element for form submission. This method is\n * called when the selected value changes or when the value property is set.\n * @internal This method is not intended to be called outside of the component.\n */\n private setFormValue(): void {\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Ensures the select element is available. This method is used to ensure\n * the select element is available before attempting to access it.\n * @internal This method is not intended to be called outside of the component.\n */\n private ensureSelectElement(): void {\n if (!this.selectElement) {\n this.selectElement = this.el.querySelector('select') as HTMLSelectElement;\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n this.updateDisplayValue(); // Ensure display value is updated before render\n\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n /**\n * Lifecycle method that is called before the component is rendered. This is\n * where the internal state is set up before rendering occurs.\n */\n componentWillLoad() {\n // Set internalReadonly based on the readonly prop\n this.internalReadonly = this.readonly;\n\n // Ensure internalReadonly is true if displayValue is true during loading\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n\n if ('attachInternals' in this.el) {\n this.internals = (\n this.el as HTMLElement & {\n /**\n * Attach the element to the form internals.\n * @returns {ElementInternals} - The element internals object.\n */\n attachInternals: () => ElementInternals;\n }\n ).attachInternals();\n } else {\n // Fallback logic for browsers without attachInternals support\n this.internals = {\n setFormValue: (value: string) => {\n const formElement = this.el.closest('form');\n if (formElement) {\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = this.name;\n input.value = value;\n formElement.appendChild(input);\n }\n },\n } as ElementInternals;\n }\n\n // Initialize value as an empty string if multiple is true\n if (this.multiple && typeof this.value !== 'string') {\n this.value = '';\n }\n\n // Parse initial options if present\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n /**\n * Lifecycle method that is called after the component has been rendered.\n * This is where the display value is updated and the initial select element's\n * state is set.\n */\n componentDidLoad() {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n // Only set the value for single selection, skip for multiple\n if (!this.multiple) {\n this.selectElement.value = this.value;\n }\n\n const selectedValues = this.multiple\n ? this.value.split(',').map(v => v.trim())\n : [this.value];\n\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n } else {\n // Handle case where there are no options\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Set the initial form value\n this.setFormValue();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDERING\n\n /**\n * The render method creates the HTML structure for the component, including\n * the label, select element, and any error or description messages. It also\n * applies the appropriate CSS classes based on the readonly state and\n * displayValue prop. This method is called when the component is rendered.\n * @returns {HTMLStencilElement} The HTML element to render.\n */\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"select-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"select-container\"\n onClick={this.handleSelectContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.internalReadonly && (\n <input\n id={this.inputId + '-readonly'}\n type=\"text\"\n value={this.computedDisplayValue}\n readonly\n class=\"readonly-input\"\n aria-readonly=\"true\"\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n />\n )}\n\n <select\n id={this.inputId}\n ref={el => (this.selectElement = el)}\n name={this.name}\n autofocus={this.autofocus}\n disabled={this.disabled}\n required={this.required}\n multiple={this.multiple}\n onChange={this.handleSelectChange}\n class={this.internalReadonly ? 'hidden' : ''}\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n >\n {this.parsedOptions.length > 0 ? (\n this.parsedOptions.map(option => (\n <option\n value={option.value}\n selected={option.selected}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))\n ) : (\n <slot />\n )}\n </select>\n <div class=\"select-icons\">\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n {!this.multiple && (\n <nv-iconbutton\n name=\"chevron-down\"\n size=\"md\"\n emphasis=\"lower\"\n tabindex={-1}\n />\n )}\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\" id={`${this.inputId}-description`}>\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" id={`${this.inputId}-error`}>\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDERING\n}\n"]}
1
+ {"version":3,"file":"nv-fieldselect.js","sourceRoot":"","sources":["../../../src/components/nv-fieldselect/nv-fieldselect.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,OAAO,EACP,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;;;GAQG;AAOH,MAAM,OAAO,aAAa;IAN1B;QA4BE,uBAAuB;QACvB,8EAA8E;QAC9E,gBAAgB;QAGR,yBAAoB,GAAW,EAAE,CAAC;QAGlC,qBAAgB,GAAY,KAAK,CAAC;QA0B1C,mBAAmB;QACnB,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;;WAKG;QAEM,YAAO,GAAW,MAAM,EAAE,CAAC;QA2BpC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEH,UAAK,GAAY,KAAK,CAAC;QAWvB;;;WAGG;QAEM,YAAO,GAAY,KAAK,CAAC;QAElC;;WAEG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;;WAIG;QAEH,UAAK,GAAW,EAAE,CAAC;QAEnB;;;;WAIG;QAEM,iBA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C,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,IAAI,CACxD,4DAAK,KAAK,EAAC,mBAAmB,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,QAAQ;gBACxD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n Element,\n State,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Content to be placed inside the select element.\n * @slot leading-input - Content to be placed before the select input, within the select container.\n * @slot before-input - Content to be placed before the select input, outside the select container.\n * @slot after-input - Content to be placed after the select input, outside the select container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldselect',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldselect.scss',\n})\nexport class NvFieldselect {\n @Element() el: HTMLNvFieldselectElement;\n private selectElement!: HTMLSelectElement;\n private internals: ElementInternals;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Select Field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region STATES\n\n @State()\n private computedDisplayValue: string = '';\n\n @State()\n private internalReadonly: boolean = false;\n\n /**\n * Options to display in the select.\n * Format: [{ label: string, value: string, selected?: boolean, disabled?: boolean }]\n */\n @Prop({ reflect: false })\n readonly options?: Array<{\n /**\n * The label of the option\n */\n label: string;\n /**\n * The value of the option\n */\n value: string;\n /**\n * Whether the option is selected\n */\n selected?: boolean;\n /**\n * Whether the option is disabled\n */\n disabled?: boolean;\n }>;\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the select element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should choose in the\n * select field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label?: string;\n\n /**\n * Add helpful hints or extra information under the select field. This is\n * where you can clarify what users should choose or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description?: string;\n\n /**\n * Defines the name attribute of the select field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the selected data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * The disabled prop lets you turn off the select field so that users can’t\n * choose something. When disabled, the field is grayed out and won’t respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the select field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to change or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the select field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the select field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the select field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the select field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * When enabled, allows the select to handle multiple selections.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * The value of the select field.\n * - If `multiple` is `false`, it's a single string.\n * - If `multiple` is `true`, it's a comma-separated string of selected values.\n */\n @Prop({ reflect: true, mutable: true })\n value: string = '';\n\n /**\n * When enabled, displays the value element instead of the label when readonly.\n * By default, the label is displayed in readonly mode. Also it automatically\n * sets the component to readonly.\n */\n @Prop({ reflect: true })\n readonly displayValue: boolean = false;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on a <select>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the selected value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>; // Emit as a string\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Updates the display value when the value property changes. This watcher is\n * used to update the display value when the selected value changes. This is\n * necessary for readonly select fields to display the selected value.\n * @internal This watcher is not intended to be called outside of the component.\n * @param {string} newValue - The new value of the select field.\n */\n @Watch('value')\n updateDisplayValueWatcher(newValue: string) {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n const selectedValues = newValue.split(',').map(val => val.trim());\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n\n if (!this.multiple) {\n this.selectElement.value = newValue; // Only set when not multiple\n }\n } else {\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Update form value\n this.setFormValue();\n }\n\n /**\n * Watcher for the displayValue prop to ensure internalReadonly is true when displayValue is true.\n * @param {boolean} newValue - The new value of displayValue.\n */\n @Watch('displayValue')\n handleDisplayValueChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.readonly) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Watcher for the readonly prop to ensure internalReadonly is true when readonly is true.\n * @param {boolean} newValue - The new value of readonly.\n */\n @Watch('readonly')\n handleReadonlyChange(newValue: boolean) {\n this.internalReadonly = newValue; // Set internalReadonly to true if displayValue is true\n\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n }\n\n /**\n * Handle options change and update the internal state\n * @param {typeof this.options} newValue - The new value of options\n */\n @Watch('options')\n handleOptionsChange(newValue: typeof this.options) {\n if (!newValue) return;\n\n // Update the value if an option is pre-selected\n const selectedOption = newValue.find(opt => opt.selected);\n if (selectedOption) {\n this.value = selectedOption.value;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the change event on the select element. This method is used to\n * update the value property when the selected options change. It is also\n * used to emit the selectChanged event when the selected value changes.\n * @param {Event} event - The change event on the select element.\n * @emits selectChanged\n */\n private readonly handleSelectChange = (event: Event) => {\n const select = event.target as HTMLSelectElement;\n let selectedValues: string[] = Array.from(select.selectedOptions).map(\n option => option.value,\n );\n\n if (!this.multiple) {\n selectedValues = selectedValues.slice(0, 1);\n }\n\n this.value = this.multiple\n ? selectedValues.join(', ')\n : selectedValues[0] || '';\n this.valueChanged.emit(this.value);\n\n // Update form value\n this.setFormValue();\n };\n\n /**\n * Handles focus when the select container is clicked.\n */\n private readonly handleSelectContainerClick = () => {\n if (!this.internalReadonly && this.selectElement) {\n this.selectElement.focus();\n }\n };\n\n /**\n * Updates the display value of the select field. This method is used to\n * update the display value when the selected value changes. This is necessary\n * for readonly select fields to display the selected value. This method is\n * called in the componentDidLoad lifecycle hook and the updateDisplayValueWatcher\n * watcher.\n * @internal This method is not intended to be called outside of the component.\n */\n private updateDisplayValue(): void {\n if (this.internalReadonly && !this.displayValue) {\n if (this.multiple) {\n const selectedLabels = this.value\n .split(',')\n .map(key => key.trim())\n .map(key => this.getLabelFromId(key) || '')\n .filter(label => label !== '');\n this.computedDisplayValue = selectedLabels.join(', ') || '';\n } else {\n this.computedDisplayValue = this.getLabelFromId(this.value) || '';\n }\n } else if (this.internalReadonly && this.displayValue) {\n this.computedDisplayValue = this.value || '';\n }\n }\n\n /**\n * Retrieves the label from the <option> elements based on the provided key (value).\n * This method uses the id or value attribute directly from the <select> options.\n * @param {string} key - The key (value) for which to find the corresponding label.\n * @returns {string} The label if found; otherwise, an empty string.\n */\n private getLabelFromId(key: string): string {\n this.ensureSelectElement();\n if (!this.selectElement) {\n return '';\n }\n\n // Cache the option list\n const options = this.selectElement.options;\n\n if (options) {\n const option = Array.from(options).find(option => option.value === key);\n return option ? option.textContent.trim() || '' : '';\n } else {\n return '';\n }\n }\n\n /**\n * Sets the value of the form element for form submission. This method is\n * called when the selected value changes or when the value property is set.\n * @internal This method is not intended to be called outside of the component.\n */\n private setFormValue(): void {\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Ensures the select element is available. This method is used to ensure\n * the select element is available before attempting to access it.\n * @internal This method is not intended to be called outside of the component.\n */\n private ensureSelectElement(): void {\n if (!this.selectElement) {\n this.selectElement = this.el.querySelector('select') as HTMLSelectElement;\n }\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n this.updateDisplayValue(); // Ensure display value is updated before render\n\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n /**\n * Lifecycle method that is called before the component is rendered. This is\n * where the internal state is set up before rendering occurs.\n */\n componentWillLoad() {\n // Set internalReadonly based on the readonly prop\n this.internalReadonly = this.readonly;\n\n // Ensure internalReadonly is true if displayValue is true during loading\n if (this.displayValue) {\n this.internalReadonly = true;\n }\n\n if ('attachInternals' in this.el) {\n this.internals = (\n this.el as HTMLElement & {\n /**\n * Attach the element to the form internals.\n * @returns {ElementInternals} - The element internals object.\n */\n attachInternals: () => ElementInternals;\n }\n ).attachInternals();\n } else {\n // Fallback logic for browsers without attachInternals support\n this.internals = {\n setFormValue: (value: string) => {\n const formElement = this.el.closest('form');\n if (formElement) {\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = this.name;\n input.value = value;\n formElement.appendChild(input);\n }\n },\n } as ElementInternals;\n }\n\n // Initialize value as an empty string if multiple is true\n if (this.multiple && typeof this.value !== 'string') {\n this.value = '';\n }\n\n // Parse initial options if present\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n /**\n * Lifecycle method that is called after the component has been rendered.\n * This is where the display value is updated and the initial select element's\n * state is set.\n */\n componentDidLoad() {\n this.updateDisplayValue();\n\n if (this.selectElement) {\n // Only set the value for single selection, skip for multiple\n if (!this.multiple) {\n this.selectElement.value = this.value;\n }\n\n const selectedValues = this.multiple\n ? this.value.split(',').map(v => v.trim())\n : [this.value];\n\n const options = this.selectElement.options;\n\n if (options) {\n Array.from(options).forEach(option => {\n option.selected = this.multiple\n ? selectedValues.includes(option.value)\n : option.value === selectedValues[0];\n });\n } else {\n // Handle case where there are no options\n this.selectElement.value = selectedValues[0] || '';\n }\n }\n\n // Set the initial form value\n this.setFormValue();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDERING\n\n /**\n * The render method creates the HTML structure for the component, including\n * the label, select element, and any error or description messages. It also\n * applies the appropriate CSS classes based on the readonly state and\n * displayValue prop. This method is called when the component is rendered.\n * @returns {HTMLStencilElement} The HTML element to render.\n */\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"select-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"select-container\"\n onClick={this.handleSelectContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.internalReadonly && (\n <input\n id={this.inputId + '-readonly'}\n type=\"text\"\n value={this.computedDisplayValue}\n readonly\n class=\"readonly-input\"\n aria-readonly=\"true\"\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n />\n )}\n\n <select\n id={this.inputId}\n ref={el => (this.selectElement = el)}\n name={this.name}\n autofocus={this.autofocus}\n disabled={this.disabled}\n required={this.required}\n multiple={this.multiple}\n onChange={this.handleSelectChange}\n class={this.internalReadonly ? 'hidden' : ''}\n aria-label={this.label}\n aria-describedby={\n this.error\n ? `${this.inputId}-error`\n : `${this.inputId}-description`\n }\n >\n {this.options && this.options.length > 0 ? (\n this.options.map(option => (\n <option\n value={option.value}\n selected={option.selected}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))\n ) : (\n <slot />\n )}\n </select>\n <div class=\"select-icons\">\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n {!this.multiple && (\n <nv-iconbutton\n name=\"chevron-down\"\n size=\"md\"\n emphasis=\"lower\"\n tabindex={-1}\n />\n )}\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\" id={`${this.inputId}-description`}>\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" id={`${this.inputId}-error`}>\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDERING\n}\n"]}
@@ -66,7 +66,7 @@ export class NvFieldslider {
66
66
  * the value should be a an array of one number. When in range mode, the value
67
67
  * should be an array of two numbers.
68
68
  */
69
- this.value = [0, 0];
69
+ this.value = [0];
70
70
  /**
71
71
  * Defines the interval between selectable values on the slider. Controls how
72
72
  * much the value increases or decreases with each keyboard interaction, drag
@@ -446,6 +446,17 @@ export class NvFieldslider {
446
446
  this.rawPosition = this.valueInternal;
447
447
  }
448
448
  }
449
+ componentWillLoad() {
450
+ // Initialize value array based on range mode when props are available
451
+ if (this.value.length === 1 && this.range) {
452
+ // If range mode but only one value provided, duplicate it
453
+ this.value = [this.value[0], this.value[0]];
454
+ }
455
+ else if (this.value.length === 2 && !this.range) {
456
+ // If single mode but two values provided, take the first
457
+ this.value = [this.value[0]];
458
+ }
459
+ }
449
460
  disconnectedCallback() {
450
461
  this.removeGlobalEvents();
451
462
  }
@@ -453,11 +464,11 @@ export class NvFieldslider {
453
464
  /****************************************************************************/
454
465
  //#region RENDER
455
466
  render() {
456
- return (h(Host, { key: '688357b41179bb99a662b8ea22f2beb7454b0d8c' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '7628e9ac0f304aa792f7c68f3e0b9b96d84583e0', htmlFor: this.startInputId }, h("slot", { key: 'd876dc0602df8badadcfdf435d68356d382c8b25', name: "label" }, this.label))), h("div", { key: '4aedd7863c3d06e4ad7dec800b14f858568bcb79', class: "slider-container" }, this.range ? (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 0, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : null, h("div", { key: '74d455d904614092ed51daf34f73425571b7ca24', class: "track-container" }, h("div", { key: 'a53a1e0f1770006fece64a87ca03a511d0e4dd9d', class: "track", onPointerDown: this.onTrackInteraction }, this.range ? (h(RangeThumb, { rangeValue: this.rangeValueInternal, rawRangePosition: this.rawRangePosition, activeDragThumb: this.activeDragThumb, isDragging: this.isDragging, snap: this.snap, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue })) : (h(SingleThumb, { value: this.valueInternal, min: this.min, max: this.max, step: this.step, rawPosition: this.rawPosition, isDragging: this.isDragging, snap: this.snap, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue }))), h(TickMarks, { key: 'aafdd02a87071f214d8710d6a0678ee01668609d', ticks: this.internalTicks, min: this.min, max: this.max })), this.range ? (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 1, inputId: this.endInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name }))), (this.success ||
467
+ return (h(Host, { key: 'd255ebffd908e0b64a9d80316de351c5a35fc230' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'e618f586707865f67d4008855299d4983b2bbb9d', htmlFor: this.startInputId }, h("slot", { key: 'fb9131f051ad669a797b5784f1cceee2169f8b8f', name: "label" }, this.label))), h("div", { key: '37147af53e7e0a0145f543c2a1070378e41e6605', class: "slider-container" }, this.range ? (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 0, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : null, h("div", { key: '64a7232e46499efb355deea683113042bc745ae0', class: "track-container" }, h("div", { key: 'b9f5f5dc7f5e98aaa44b6e361786804af1a9798c', class: "track", onPointerDown: this.onTrackInteraction }, this.range ? (h(RangeThumb, { rangeValue: this.rangeValueInternal, rawRangePosition: this.rawRangePosition, activeDragThumb: this.activeDragThumb, isDragging: this.isDragging, snap: this.snap, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue })) : (h(SingleThumb, { value: this.valueInternal, min: this.min, max: this.max, step: this.step, rawPosition: this.rawPosition, isDragging: this.isDragging, snap: this.snap, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue }))), h(TickMarks, { key: '40e2bc4b91cf40a1d0c7e1f126b092f9d149912b', ticks: this.internalTicks, min: this.min, max: this.max })), this.range ? (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 1, inputId: this.endInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name }))), (this.success ||
457
468
  this.description ||
458
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '10eb3eb2f7a903af08419df8476c11e27e9e575e', class: "description" }, this.success && (h("nv-icon", { key: 'ee312f8f0563e6dc920e9cbf886784df8c57e719', name: "circle-check", class: "validation", size: "md" })), h("slot", { key: '4ee31b6914ebae20404acd582c27b38b5ad64700', name: "description" }, this.description))), (this.error ||
469
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '830b5921d75ee627002ef19ddc7946948d1bb6a7', class: "description" }, this.success && (h("nv-icon", { key: '451d013f7a3ffa19cb12df406187ec4001bbad2a', name: "circle-check", class: "validation", size: "md" })), h("slot", { key: '59f84a04d635db6ceb465a642d8584167bd0cd9d', name: "description" }, this.description))), (this.error ||
459
470
  this.errorDescription ||
460
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'e37e44dea94b691cbac98d16fb74c5c5cb280c5e', class: "error-description", hidden: !this.error }, this.error && (h("nv-icon", { key: 'c1b403a4848fdcf0e9f51f37ec7454224562ed5c', name: "alert-circle", class: "validation", size: "md" })), h("slot", { key: '87db18643f9473ae30e936fc1a316de95f06c107', name: "error-description" }, this.errorDescription)))));
471
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '10a5a273b0feeb9c0248b8aadcb801d7e832dcab', class: "error-description", hidden: !this.error }, this.error && (h("nv-icon", { key: '7540ff563068f83701d82a8a948473b20351021f', name: "alert-circle", class: "validation", size: "md" })), h("slot", { key: 'b76bfbbd817b15faf4f963f9c93c7d04cbbdade4', name: "error-description" }, this.errorDescription)))));
461
472
  }
462
473
  static get is() { return "nv-fieldslider"; }
463
474
  static get formAssociated() { return true; }
@@ -732,7 +743,7 @@ export class NvFieldslider {
732
743
  },
733
744
  "getter": false,
734
745
  "setter": false,
735
- "defaultValue": "[0, 0]"
746
+ "defaultValue": "[0]"
736
747
  },
737
748
  "step": {
738
749
  "type": "number",
@@ -941,7 +952,7 @@ export class NvFieldslider {
941
952
  "optional": false,
942
953
  "docs": {
943
954
  "tags": [],
944
- "text": "Use this to automatically show a label, like \u201C~\u201D for approximate values,\nbefore the slider\u2019s value in the tooltip or input, giving users quick\ncontext about the number."
955
+ "text": "Use this to automatically show a label, like \"~\" for approximate values,\nbefore the slider's value in the tooltip or input, giving users quick\ncontext about the number."
945
956
  },
946
957
  "getter": false,
947
958
  "setter": false,
@@ -960,7 +971,7 @@ export class NvFieldslider {
960
971
  "optional": false,
961
972
  "docs": {
962
973
  "tags": [],
963
- "text": "Use this to automatically show a label, like \u201C$\u201D or \u201Ckg,\u201D after the value\non the slider\u2019s tooltip or input, helping users better understand the\nnumber."
974
+ "text": "Use this to automatically show a label, like \"$\" or \"kg,\" after the value\non the slider's tooltip or input, helping users better understand the\nnumber."
964
975
  },
965
976
  "getter": false,
966
977
  "setter": false,
@@ -1 +1 @@
1
- {"version":3,"file":"nv-fieldslider.js","sourceRoot":"","sources":["../../../src/components/nv-fieldslider/nv-fieldslider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,KAAK,EACL,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EACL,KAAK,EACL,cAAc,EACd,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAw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,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK;gBAC/C,IAAI,CAAC,KAAK,IAAI,CACb,gEAAS,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7D;gBACD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n State,\n Watch,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n clamp,\n valueToPercent,\n snapToStep,\n generateTicks,\n snapToTicks,\n} from './nv-fieldslider.utils';\n\nimport { SingleThumb } from './partials/single-thumb';\nimport { RangeThumb } from './partials/range-thumb';\nimport { TickMarks } from './partials/tick-marks';\nimport { FieldInput } from './partials/field-input';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldslider',\n styleUrl: 'styles/nv-fieldslider.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldslider {\n @Element() el: HTMLNvFieldsliderElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Provides a textual description of the slider's function, helping users\n * understand what the control adjusts. It also supports accessibility by\n * serving as the accessible name for the component.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Keeps the interface clean by removing visible labels, but still announces\n * the label to screen readers so users relying on assistive tech aren't left\n * guessing.\n */\n @Prop({ reflect: true })\n readonly hideLabel: boolean = false;\n\n /**\n * Add helpful hints or extra information under the slider. This is where you\n * can clarify what users should enter or provide additional instructions,\n * making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Enables an optional numeric input field alongside the slider, allowing\n * users to type a value directly instead of—or in addition to—using the\n * slider handle.\n */\n @Prop({ reflect: true })\n readonly hasField: boolean = false;\n\n /**\n * Allows the slider to display two thumbs, enabling users to select a\n * continuous range between a minimum and maximum value. Ideal for use cases\n * like filtering by price or time.\n */\n @Prop({ reflect: true })\n readonly range: boolean = false;\n\n /**\n * Disables user interaction with the slider and its associated input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Makes the slider and input non-editable while keeping them focusable and\n * included in form submissions.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Alters the slider's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the slider.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the slider's appearance to indicate successful input or validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Numeric value of the slider as an array of numbers. When in single mode,\n * the value should be a an array of one number. When in range mode, the value\n * should be an array of two numbers.\n */\n @Prop({ reflect: true, mutable: true })\n value: number[] = [0, 0];\n\n /**\n * Defines the interval between selectable values on the slider. Controls how\n * much the value increases or decreases with each keyboard interaction, drag\n * movement, or direct input.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * Controls whether the slider handle should visually snap to step values\n * during dragging. When false, the handle can be positioned at any point\n * along the track while dragging, but the actual value will still snap to the\n * nearest step value. When true, the handle will visually snap to the nearest\n * step value during dragging.\n */\n @Prop({ reflect: true })\n readonly snap: boolean = false;\n\n /**\n * When true and custom ticks are provided, the slider will snap to the nearest\n * tick value during dragging, instead of using the step value. This is useful\n * when you have custom ticks at specific values that don't align with regular step intervals.\n */\n @Prop({ reflect: true })\n readonly snapTicks: boolean = false;\n\n /**\n * Name attribute for the form input element. Required for form submission.\n * For range sliders, this will be used for the start value input and add -end\n * to the end input name.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Name attribute for the end value input when using range mode.\n * If not provided, the name attribute will be used with '-end' appended.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Defines the minimum allowed value for the slider. The thumb cannot move\n * below this value, and manual input is also constrained accordingly.\n */\n @Prop({ reflect: true })\n readonly min: number = 0;\n\n /**\n * Defines the maximum allowed value for the slider. The thumb cannot move\n * above this value, and manual input is also constrained accordingly.\n */\n @Prop({ reflect: true })\n readonly max: number = 100;\n\n /**\n * Controls the visibility of tick marks on the slider. When enabled, all\n * visual ticks that indicate step points along the track are shown. If custom\n * ticks are provided, they are always shown regardless of this setting.\n */\n @Prop({ reflect: true })\n readonly showTicks: boolean = false;\n\n /**\n * Allows you to specify custom tick marks at specific values along the\n * slider. Each tick can optionally display a label to provide additional\n * context or guidance for users.\n */\n @Prop({ reflect: false })\n readonly ticks: {\n /** The numeric value of the tick */\n value: number;\n /** The label of the tick */\n label?: string;\n }[];\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n /**\n * Use this to automatically show a label, like “~” for approximate values,\n * before the slider’s value in the tooltip or input, giving users quick\n * context about the number.\n */\n @Prop({ reflect: true })\n readonly labelBeforeValue: string;\n\n /**\n * Use this to automatically show a label, like “$” or “kg,” after the value\n * on the slider’s tooltip or input, helping users better understand the\n * number.\n */\n @Prop({ reflect: true })\n readonly labelAfterValue: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n @State()\n isDragging = false;\n\n @State()\n activeDragThumb: 'left' | 'right' | 'single' = 'single';\n\n @State()\n internalTicks: typeof this.ticks = [];\n\n // These track the raw slider positions for visual display\n @State()\n rawPosition = 0;\n\n @State()\n rawRangePosition: [number, number] = [0, 0];\n\n @State()\n valueInternal: number = 0;\n\n @State()\n rangeValueInternal: [number, number] = [0, 0];\n\n //#endregion STATE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Ensures value is valid and within bounds.\n * @param {number} val - The value to validate\n * @returns {number} The validated and snapped value\n */\n private validateValue(val: number): number {\n // First ensure the value is within bounds\n const clampedValue = clamp(val, this.min, this.max);\n\n // If snapTicks is true and we have custom ticks, snap to the nearest tick\n if (this.snapTicks && this.internalTicks && this.internalTicks.length > 0) {\n return snapToTicks(clampedValue, this.internalTicks);\n }\n\n // Otherwise snap to step values\n return snapToStep(clampedValue, this.min, this.max, this.step);\n }\n\n /**\n * Parses the value string into a number or array of numbers for internal use.\n */\n private parseValue = (): void => {\n if (typeof this.value === 'string') {\n console.error(\n 'Sliders require a number or array of numbers to be passed in the value prop.',\n );\n return;\n }\n if (this.range && this.value.length !== 2) {\n console.error(\n 'Range sliders require an array of two values to be passed in the value prop.',\n );\n return;\n }\n\n if (!this.range && this.value.length !== 1) {\n console.error(\n 'Single sliders require a single value as an array to be passed in the value prop.',\n );\n return;\n }\n this.valueInternal = this.value[0];\n this.rangeValueInternal = [this.value[0], this.value[1]];\n };\n\n /**\n * Handles value changes from slider interaction.\n * @param {number | number[]} newValue - The new value or range values\n */\n private handleValueChange(newValue: number | number[]): void {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.range) {\n // Handle range values\n if (Array.isArray(newValue) && newValue.length === 2) {\n // Ensure values are in order (left ≤ right)\n const orderedValues = [\n Math.min(newValue[0], newValue[1]),\n Math.max(newValue[0], newValue[1]),\n ];\n\n // Snap to steps and clamp\n const validatedValues: [number, number] = [\n this.validateValue(orderedValues[0]),\n this.validateValue(orderedValues[1]),\n ];\n\n if (\n validatedValues[0] !== this.rangeValueInternal[0] ||\n validatedValues[1] !== this.rangeValueInternal[1]\n ) {\n this.rangeValueInternal = validatedValues;\n this.value = this.rangeValueInternal;\n this.valueChanged.emit(this.rangeValueInternal);\n }\n }\n } else {\n // Handle single value\n if (typeof newValue === 'number') {\n const validatedValue = this.validateValue(newValue);\n\n if (validatedValue !== this.valueInternal) {\n this.valueInternal = validatedValue;\n this.value = [this.valueInternal];\n this.valueChanged.emit([this.valueInternal]);\n }\n }\n }\n }\n\n /**\n * Generates the ticks to display based on props and state.\n */\n private generateDisplayTicks(): void {\n // If custom ticks are provided, always use them regardless of showTicks setting\n if (this.ticks && this.ticks.length > 0) {\n this.internalTicks = [...this.ticks].sort((a, b) => a.value - b.value);\n return;\n }\n\n // If showTicks is false and there are no custom ticks, hide all ticks\n if (!this.showTicks) {\n this.internalTicks = [];\n return;\n }\n\n // Generate all ticks at each step point\n const autoTicks = generateTicks(this.min, this.max, this.step);\n this.internalTicks = autoTicks.map(value => ({ value }));\n }\n\n /**\n * Handles pointer events on the track.\n * @param {PointerEvent} event - The pointer event\n */\n private onTrackInteraction = (event: PointerEvent): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const trackRect = (\n event.currentTarget as HTMLElement\n ).getBoundingClientRect();\n const percentage = clamp(\n ((event.clientX - trackRect.left) / trackRect.width) * 100,\n 0,\n 100,\n );\n\n const newValue = this.min + (percentage / 100) * (this.max - this.min);\n\n // Store raw position for visual display\n this.rawPosition = newValue;\n\n if (this.range) {\n // In range mode, determine which thumb to move based on proximity\n const leftPct = valueToPercent(\n this.rangeValueInternal[0],\n this.min,\n this.max,\n );\n const rightPct = valueToPercent(\n this.rangeValueInternal[1],\n this.min,\n this.max,\n );\n\n const distanceToLeft = Math.abs(percentage - leftPct);\n const distanceToRight = Math.abs(percentage - rightPct);\n\n if (distanceToLeft <= distanceToRight) {\n this.activeDragThumb = 'left';\n this.rawRangePosition = [newValue, this.rawRangePosition[1]];\n this.handleValueChange([newValue, this.rangeValueInternal[1]]);\n } else {\n this.activeDragThumb = 'right';\n this.rawRangePosition = [this.rawRangePosition[0], newValue];\n this.handleValueChange([this.rangeValueInternal[0], newValue]);\n }\n } else {\n this.activeDragThumb = 'single';\n this.rawPosition = newValue;\n this.handleValueChange(newValue);\n }\n\n this.isDragging = true;\n this.registerGlobalEvents();\n };\n\n /**\n * Handles pointer move events during drag.\n * @param {PointerEvent} event - The pointer event\n */\n private onPointerMove = (event: PointerEvent): void => {\n if (!this.isDragging || this.disabled || this.readonly) {\n return;\n }\n\n const trackElement = this.el.querySelector('.track') as HTMLElement;\n if (!trackElement) return;\n\n const trackRect = trackElement.getBoundingClientRect();\n const percentage = clamp(\n ((event.clientX - trackRect.left) / trackRect.width) * 100,\n 0,\n 100,\n );\n\n const newValue = this.min + (percentage / 100) * (this.max - this.min);\n\n // Update visual position\n if (this.range) {\n if (this.activeDragThumb === 'left') {\n this.rawRangePosition = [newValue, this.rawRangePosition[1]];\n this.handleValueChange([newValue, this.rangeValueInternal[1]]);\n } else {\n this.rawRangePosition = [this.rawRangePosition[0], newValue];\n this.handleValueChange([this.rangeValueInternal[0], newValue]);\n }\n } else {\n this.rawPosition = newValue;\n this.handleValueChange(newValue);\n }\n };\n\n /**\n * Handles the end of a drag operation.\n */\n private onPointerUp = (): void => {\n this.isDragging = false;\n this.removeGlobalEvents();\n };\n\n /**\n * Registers global events for tracking pointer movement.\n */\n private registerGlobalEvents(): void {\n document.addEventListener('pointermove', this.onPointerMove);\n document.addEventListener('pointerup', this.onPointerUp);\n document.addEventListener('pointercancel', this.onPointerUp);\n }\n\n /**\n * Removes global events when tracking ends.\n */\n private removeGlobalEvents(): void {\n document.removeEventListener('pointermove', this.onPointerMove);\n document.removeEventListener('pointerup', this.onPointerUp);\n document.removeEventListener('pointercancel', this.onPointerUp);\n }\n\n /**\n * Handles keydown events for keyboard accessibility.\n * @param {KeyboardEvent} event - The keyboard event\n */\n private onKeyDown = (event: KeyboardEvent): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n let newValue: number | number[];\n const stepMultiplier = event.shiftKey ? 10 : 1;\n const singleStep = this.step * stepMultiplier;\n\n if (this.range) {\n const focusedThumb = (event.target as HTMLElement).getAttribute(\n 'data-thumb',\n );\n const idx = focusedThumb === 'left' ? 0 : 1;\n const currentValue = [...this.rangeValueInternal];\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n currentValue[idx] += singleStep;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n currentValue[idx] -= singleStep;\n break;\n case 'Home':\n currentValue[idx] = this.min;\n break;\n case 'End':\n currentValue[idx] = this.max;\n break;\n case 'PageUp':\n currentValue[idx] += singleStep * 10;\n break;\n case 'PageDown':\n currentValue[idx] -= singleStep * 10;\n break;\n default:\n return;\n }\n\n newValue = currentValue;\n } else {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n newValue = this.valueInternal + singleStep;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n newValue = this.valueInternal - singleStep;\n break;\n case 'Home':\n newValue = this.min;\n break;\n case 'End':\n newValue = this.max;\n break;\n case 'PageUp':\n newValue = this.valueInternal + singleStep * 10;\n break;\n case 'PageDown':\n newValue = this.valueInternal - singleStep * 10;\n break;\n default:\n return;\n }\n }\n\n event.preventDefault();\n this.handleValueChange(newValue);\n };\n\n /**\n * Handles field input value changes.\n * @param {Event} event - The input event\n */\n private handleFieldChange = (event: Event): void => {\n const input = event.target as HTMLInputElement;\n const newValue = parseFloat(input.value);\n\n if (isNaN(newValue)) {\n return;\n }\n\n if (this.range) {\n const fieldIndex = input.getAttribute('data-index') === '0' ? 0 : 1;\n const updatedRange = [...this.rangeValueInternal];\n updatedRange[fieldIndex] = newValue;\n this.handleValueChange(updatedRange);\n } else {\n this.handleValueChange(newValue);\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n onValueChange() {\n this.parseValue();\n }\n\n @Watch('min')\n @Watch('max')\n @Watch('step')\n @Watch('ticks')\n @Watch('showTicks')\n @Watch('snap')\n @Watch('snapTicks')\n onConfigChange() {\n this.generateDisplayTicks();\n\n if (this.range) {\n this.handleValueChange(this.rangeValueInternal);\n } else {\n this.handleValueChange(this.valueInternal);\n }\n }\n\n @Watch('range')\n onRangeChange(newValue: boolean) {\n if (newValue) {\n // Switching to range mode\n this.rangeValueInternal = [this.min, this.valueInternal];\n } else {\n // Switching to single mode, take the higher value\n this.valueInternal = this.rangeValueInternal[1];\n }\n }\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n connectedCallback() {\n this.parseValue();\n this.generateDisplayTicks();\n\n // Initialize values and make sure they're valid\n if (this.range) {\n if (\n !Array.isArray(this.rangeValueInternal) ||\n this.rangeValueInternal.length !== 2\n ) {\n this.rangeValueInternal = [this.min, this.max];\n }\n this.handleValueChange(this.rangeValueInternal);\n // Initialize raw range position to match actual values\n this.rawRangePosition = [\n this.rangeValueInternal[0],\n this.rangeValueInternal[1],\n ];\n } else {\n this.handleValueChange(this.valueInternal);\n // Initialize raw position to match actual value\n this.rawPosition = this.valueInternal;\n }\n }\n\n disconnectedCallback() {\n this.removeGlobalEvents();\n }\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the slider values change.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<number[]>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"slider-container\">\n {/* First input (always render for the start value, but may be hidden) */}\n {this.range ? (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n index={0}\n inputId={this.startInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n endName={this.endName}\n />\n ) : null}\n\n <div class=\"track-container\">\n <div class=\"track\" onPointerDown={this.onTrackInteraction}>\n {this.range ? (\n <RangeThumb\n rangeValue={this.rangeValueInternal}\n rawRangePosition={this.rawRangePosition}\n activeDragThumb={this.activeDragThumb}\n isDragging={this.isDragging}\n snap={this.snap}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onKeyDown={this.onKeyDown}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n />\n ) : (\n <SingleThumb\n value={this.valueInternal}\n min={this.min}\n max={this.max}\n step={this.step}\n rawPosition={this.rawPosition}\n isDragging={this.isDragging}\n snap={this.snap}\n disabled={this.disabled}\n readonly={this.readonly}\n onKeyDown={this.onKeyDown}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n />\n )}\n </div>\n\n <TickMarks\n ticks={this.internalTicks}\n min={this.min}\n max={this.max}\n />\n </div>\n\n {/* Second input (for range mode, or for single value if not already rendered) */}\n {this.range ? (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n index={1}\n inputId={this.endInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n endName={this.endName}\n />\n ) : (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n inputId={this.startInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n />\n )}\n </div>\n\n {(this.success ||\n this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.error ||\n this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" hidden={!this.error}>\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n // #endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-fieldslider.js","sourceRoot":"","sources":["../../../src/components/nv-fieldslider/nv-fieldslider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,KAAK,EACL,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n State,\n Watch,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n clamp,\n valueToPercent,\n snapToStep,\n generateTicks,\n snapToTicks,\n} from './nv-fieldslider.utils';\n\nimport { SingleThumb } from './partials/single-thumb';\nimport { RangeThumb } from './partials/range-thumb';\nimport { TickMarks } from './partials/tick-marks';\nimport { FieldInput } from './partials/field-input';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldslider',\n styleUrl: 'styles/nv-fieldslider.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldslider {\n @Element() el: HTMLNvFieldsliderElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the start input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly startInputId: string = uuidv4();\n\n /**\n * Sets the ID for the end input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated.\n */\n @Prop({ reflect: true })\n readonly endInputId: string = uuidv4();\n\n /**\n * Provides a textual description of the slider's function, helping users\n * understand what the control adjusts. It also supports accessibility by\n * serving as the accessible name for the component.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Keeps the interface clean by removing visible labels, but still announces\n * the label to screen readers so users relying on assistive tech aren't left\n * guessing.\n */\n @Prop({ reflect: true })\n readonly hideLabel: boolean = false;\n\n /**\n * Add helpful hints or extra information under the slider. This is where you\n * can clarify what users should enter or provide additional instructions,\n * making the form easier to fill out correctly.\n */\n @Prop({ reflect: true })\n readonly description: string;\n\n /**\n * Enables an optional numeric input field alongside the slider, allowing\n * users to type a value directly instead of—or in addition to—using the\n * slider handle.\n */\n @Prop({ reflect: true })\n readonly hasField: boolean = false;\n\n /**\n * Allows the slider to display two thumbs, enabling users to select a\n * continuous range between a minimum and maximum value. Ideal for use cases\n * like filtering by price or time.\n */\n @Prop({ reflect: true })\n readonly range: boolean = false;\n\n /**\n * Disables user interaction with the slider and its associated input fields.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Makes the slider and input non-editable while keeping them focusable and\n * included in form submissions.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Alters the slider's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the slider.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the slider's appearance to indicate successful input or validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Numeric value of the slider as an array of numbers. When in single mode,\n * the value should be a an array of one number. When in range mode, the value\n * should be an array of two numbers.\n */\n @Prop({ reflect: true, mutable: true })\n value: number[] = [0];\n\n /**\n * Defines the interval between selectable values on the slider. Controls how\n * much the value increases or decreases with each keyboard interaction, drag\n * movement, or direct input.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * Controls whether the slider handle should visually snap to step values\n * during dragging. When false, the handle can be positioned at any point\n * along the track while dragging, but the actual value will still snap to the\n * nearest step value. When true, the handle will visually snap to the nearest\n * step value during dragging.\n */\n @Prop({ reflect: true })\n readonly snap: boolean = false;\n\n /**\n * When true and custom ticks are provided, the slider will snap to the nearest\n * tick value during dragging, instead of using the step value. This is useful\n * when you have custom ticks at specific values that don't align with regular step intervals.\n */\n @Prop({ reflect: true })\n readonly snapTicks: boolean = false;\n\n /**\n * Name attribute for the form input element. Required for form submission.\n * For range sliders, this will be used for the start value input and add -end\n * to the end input name.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Name attribute for the end value input when using range mode.\n * If not provided, the name attribute will be used with '-end' appended.\n */\n @Prop({ reflect: true })\n readonly endName: string;\n\n /**\n * Defines the minimum allowed value for the slider. The thumb cannot move\n * below this value, and manual input is also constrained accordingly.\n */\n @Prop({ reflect: true })\n readonly min: number = 0;\n\n /**\n * Defines the maximum allowed value for the slider. The thumb cannot move\n * above this value, and manual input is also constrained accordingly.\n */\n @Prop({ reflect: true })\n readonly max: number = 100;\n\n /**\n * Controls the visibility of tick marks on the slider. When enabled, all\n * visual ticks that indicate step points along the track are shown. If custom\n * ticks are provided, they are always shown regardless of this setting.\n */\n @Prop({ reflect: true })\n readonly showTicks: boolean = false;\n\n /**\n * Allows you to specify custom tick marks at specific values along the\n * slider. Each tick can optionally display a label to provide additional\n * context or guidance for users.\n */\n @Prop({ reflect: false })\n readonly ticks: {\n /** The numeric value of the tick */\n value: number;\n /** The label of the tick */\n label?: string;\n }[];\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n /**\n * Use this to automatically show a label, like \"~\" for approximate values,\n * before the slider's value in the tooltip or input, giving users quick\n * context about the number.\n */\n @Prop({ reflect: true })\n readonly labelBeforeValue: string;\n\n /**\n * Use this to automatically show a label, like \"$\" or \"kg,\" after the value\n * on the slider's tooltip or input, helping users better understand the\n * number.\n */\n @Prop({ reflect: true })\n readonly labelAfterValue: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n\n @State()\n isDragging = false;\n\n @State()\n activeDragThumb: 'left' | 'right' | 'single' = 'single';\n\n @State()\n internalTicks: typeof this.ticks = [];\n\n // These track the raw slider positions for visual display\n @State()\n rawPosition = 0;\n\n @State()\n rawRangePosition: [number, number] = [0, 0];\n\n @State()\n valueInternal: number = 0;\n\n @State()\n rangeValueInternal: [number, number] = [0, 0];\n\n //#endregion STATE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Ensures value is valid and within bounds.\n * @param {number} val - The value to validate\n * @returns {number} The validated and snapped value\n */\n private validateValue(val: number): number {\n // First ensure the value is within bounds\n const clampedValue = clamp(val, this.min, this.max);\n\n // If snapTicks is true and we have custom ticks, snap to the nearest tick\n if (this.snapTicks && this.internalTicks && this.internalTicks.length > 0) {\n return snapToTicks(clampedValue, this.internalTicks);\n }\n\n // Otherwise snap to step values\n return snapToStep(clampedValue, this.min, this.max, this.step);\n }\n\n /**\n * Parses the value string into a number or array of numbers for internal use.\n */\n private parseValue = (): void => {\n if (typeof this.value === 'string') {\n console.error(\n 'Sliders require a number or array of numbers to be passed in the value prop.',\n );\n return;\n }\n if (this.range && this.value.length !== 2) {\n console.error(\n 'Range sliders require an array of two values to be passed in the value prop.',\n );\n return;\n }\n\n if (!this.range && this.value.length !== 1) {\n console.error(\n 'Single sliders require a single value as an array to be passed in the value prop.',\n );\n return;\n }\n this.valueInternal = this.value[0];\n this.rangeValueInternal = [this.value[0], this.value[1]];\n };\n\n /**\n * Handles value changes from slider interaction.\n * @param {number | number[]} newValue - The new value or range values\n */\n private handleValueChange(newValue: number | number[]): void {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.range) {\n // Handle range values\n if (Array.isArray(newValue) && newValue.length === 2) {\n // Ensure values are in order (left ≤ right)\n const orderedValues = [\n Math.min(newValue[0], newValue[1]),\n Math.max(newValue[0], newValue[1]),\n ];\n\n // Snap to steps and clamp\n const validatedValues: [number, number] = [\n this.validateValue(orderedValues[0]),\n this.validateValue(orderedValues[1]),\n ];\n\n if (\n validatedValues[0] !== this.rangeValueInternal[0] ||\n validatedValues[1] !== this.rangeValueInternal[1]\n ) {\n this.rangeValueInternal = validatedValues;\n this.value = this.rangeValueInternal;\n this.valueChanged.emit(this.rangeValueInternal);\n }\n }\n } else {\n // Handle single value\n if (typeof newValue === 'number') {\n const validatedValue = this.validateValue(newValue);\n\n if (validatedValue !== this.valueInternal) {\n this.valueInternal = validatedValue;\n this.value = [this.valueInternal];\n this.valueChanged.emit([this.valueInternal]);\n }\n }\n }\n }\n\n /**\n * Generates the ticks to display based on props and state.\n */\n private generateDisplayTicks(): void {\n // If custom ticks are provided, always use them regardless of showTicks setting\n if (this.ticks && this.ticks.length > 0) {\n this.internalTicks = [...this.ticks].sort((a, b) => a.value - b.value);\n return;\n }\n\n // If showTicks is false and there are no custom ticks, hide all ticks\n if (!this.showTicks) {\n this.internalTicks = [];\n return;\n }\n\n // Generate all ticks at each step point\n const autoTicks = generateTicks(this.min, this.max, this.step);\n this.internalTicks = autoTicks.map(value => ({ value }));\n }\n\n /**\n * Handles pointer events on the track.\n * @param {PointerEvent} event - The pointer event\n */\n private onTrackInteraction = (event: PointerEvent): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const trackRect = (\n event.currentTarget as HTMLElement\n ).getBoundingClientRect();\n const percentage = clamp(\n ((event.clientX - trackRect.left) / trackRect.width) * 100,\n 0,\n 100,\n );\n\n const newValue = this.min + (percentage / 100) * (this.max - this.min);\n\n // Store raw position for visual display\n this.rawPosition = newValue;\n\n if (this.range) {\n // In range mode, determine which thumb to move based on proximity\n const leftPct = valueToPercent(\n this.rangeValueInternal[0],\n this.min,\n this.max,\n );\n const rightPct = valueToPercent(\n this.rangeValueInternal[1],\n this.min,\n this.max,\n );\n\n const distanceToLeft = Math.abs(percentage - leftPct);\n const distanceToRight = Math.abs(percentage - rightPct);\n\n if (distanceToLeft <= distanceToRight) {\n this.activeDragThumb = 'left';\n this.rawRangePosition = [newValue, this.rawRangePosition[1]];\n this.handleValueChange([newValue, this.rangeValueInternal[1]]);\n } else {\n this.activeDragThumb = 'right';\n this.rawRangePosition = [this.rawRangePosition[0], newValue];\n this.handleValueChange([this.rangeValueInternal[0], newValue]);\n }\n } else {\n this.activeDragThumb = 'single';\n this.rawPosition = newValue;\n this.handleValueChange(newValue);\n }\n\n this.isDragging = true;\n this.registerGlobalEvents();\n };\n\n /**\n * Handles pointer move events during drag.\n * @param {PointerEvent} event - The pointer event\n */\n private onPointerMove = (event: PointerEvent): void => {\n if (!this.isDragging || this.disabled || this.readonly) {\n return;\n }\n\n const trackElement = this.el.querySelector('.track') as HTMLElement;\n if (!trackElement) return;\n\n const trackRect = trackElement.getBoundingClientRect();\n const percentage = clamp(\n ((event.clientX - trackRect.left) / trackRect.width) * 100,\n 0,\n 100,\n );\n\n const newValue = this.min + (percentage / 100) * (this.max - this.min);\n\n // Update visual position\n if (this.range) {\n if (this.activeDragThumb === 'left') {\n this.rawRangePosition = [newValue, this.rawRangePosition[1]];\n this.handleValueChange([newValue, this.rangeValueInternal[1]]);\n } else {\n this.rawRangePosition = [this.rawRangePosition[0], newValue];\n this.handleValueChange([this.rangeValueInternal[0], newValue]);\n }\n } else {\n this.rawPosition = newValue;\n this.handleValueChange(newValue);\n }\n };\n\n /**\n * Handles the end of a drag operation.\n */\n private onPointerUp = (): void => {\n this.isDragging = false;\n this.removeGlobalEvents();\n };\n\n /**\n * Registers global events for tracking pointer movement.\n */\n private registerGlobalEvents(): void {\n document.addEventListener('pointermove', this.onPointerMove);\n document.addEventListener('pointerup', this.onPointerUp);\n document.addEventListener('pointercancel', this.onPointerUp);\n }\n\n /**\n * Removes global events when tracking ends.\n */\n private removeGlobalEvents(): void {\n document.removeEventListener('pointermove', this.onPointerMove);\n document.removeEventListener('pointerup', this.onPointerUp);\n document.removeEventListener('pointercancel', this.onPointerUp);\n }\n\n /**\n * Handles keydown events for keyboard accessibility.\n * @param {KeyboardEvent} event - The keyboard event\n */\n private onKeyDown = (event: KeyboardEvent): void => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n let newValue: number | number[];\n const stepMultiplier = event.shiftKey ? 10 : 1;\n const singleStep = this.step * stepMultiplier;\n\n if (this.range) {\n const focusedThumb = (event.target as HTMLElement).getAttribute(\n 'data-thumb',\n );\n const idx = focusedThumb === 'left' ? 0 : 1;\n const currentValue = [...this.rangeValueInternal];\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n currentValue[idx] += singleStep;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n currentValue[idx] -= singleStep;\n break;\n case 'Home':\n currentValue[idx] = this.min;\n break;\n case 'End':\n currentValue[idx] = this.max;\n break;\n case 'PageUp':\n currentValue[idx] += singleStep * 10;\n break;\n case 'PageDown':\n currentValue[idx] -= singleStep * 10;\n break;\n default:\n return;\n }\n\n newValue = currentValue;\n } else {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n newValue = this.valueInternal + singleStep;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n newValue = this.valueInternal - singleStep;\n break;\n case 'Home':\n newValue = this.min;\n break;\n case 'End':\n newValue = this.max;\n break;\n case 'PageUp':\n newValue = this.valueInternal + singleStep * 10;\n break;\n case 'PageDown':\n newValue = this.valueInternal - singleStep * 10;\n break;\n default:\n return;\n }\n }\n\n event.preventDefault();\n this.handleValueChange(newValue);\n };\n\n /**\n * Handles field input value changes.\n * @param {Event} event - The input event\n */\n private handleFieldChange = (event: Event): void => {\n const input = event.target as HTMLInputElement;\n const newValue = parseFloat(input.value);\n\n if (isNaN(newValue)) {\n return;\n }\n\n if (this.range) {\n const fieldIndex = input.getAttribute('data-index') === '0' ? 0 : 1;\n const updatedRange = [...this.rangeValueInternal];\n updatedRange[fieldIndex] = newValue;\n this.handleValueChange(updatedRange);\n } else {\n this.handleValueChange(newValue);\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n onValueChange() {\n this.parseValue();\n }\n\n @Watch('min')\n @Watch('max')\n @Watch('step')\n @Watch('ticks')\n @Watch('showTicks')\n @Watch('snap')\n @Watch('snapTicks')\n onConfigChange() {\n this.generateDisplayTicks();\n\n if (this.range) {\n this.handleValueChange(this.rangeValueInternal);\n } else {\n this.handleValueChange(this.valueInternal);\n }\n }\n\n @Watch('range')\n onRangeChange(newValue: boolean) {\n if (newValue) {\n // Switching to range mode\n this.rangeValueInternal = [this.min, this.valueInternal];\n } else {\n // Switching to single mode, take the higher value\n this.valueInternal = this.rangeValueInternal[1];\n }\n }\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n connectedCallback() {\n this.parseValue();\n this.generateDisplayTicks();\n\n // Initialize values and make sure they're valid\n if (this.range) {\n if (\n !Array.isArray(this.rangeValueInternal) ||\n this.rangeValueInternal.length !== 2\n ) {\n this.rangeValueInternal = [this.min, this.max];\n }\n this.handleValueChange(this.rangeValueInternal);\n // Initialize raw range position to match actual values\n this.rawRangePosition = [\n this.rangeValueInternal[0],\n this.rangeValueInternal[1],\n ];\n } else {\n this.handleValueChange(this.valueInternal);\n // Initialize raw position to match actual value\n this.rawPosition = this.valueInternal;\n }\n }\n\n componentWillLoad() {\n // Initialize value array based on range mode when props are available\n if (this.value.length === 1 && this.range) {\n // If range mode but only one value provided, duplicate it\n this.value = [this.value[0], this.value[0]];\n } else if (this.value.length === 2 && !this.range) {\n // If single mode but two values provided, take the first\n this.value = [this.value[0]];\n }\n }\n\n disconnectedCallback() {\n this.removeGlobalEvents();\n }\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the slider values change.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<number[]>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.startInputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"slider-container\">\n {/* First input (always render for the start value, but may be hidden) */}\n {this.range ? (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n index={0}\n inputId={this.startInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n endName={this.endName}\n />\n ) : null}\n\n <div class=\"track-container\">\n <div class=\"track\" onPointerDown={this.onTrackInteraction}>\n {this.range ? (\n <RangeThumb\n rangeValue={this.rangeValueInternal}\n rawRangePosition={this.rawRangePosition}\n activeDragThumb={this.activeDragThumb}\n isDragging={this.isDragging}\n snap={this.snap}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onKeyDown={this.onKeyDown}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n />\n ) : (\n <SingleThumb\n value={this.valueInternal}\n min={this.min}\n max={this.max}\n step={this.step}\n rawPosition={this.rawPosition}\n isDragging={this.isDragging}\n snap={this.snap}\n disabled={this.disabled}\n readonly={this.readonly}\n onKeyDown={this.onKeyDown}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n />\n )}\n </div>\n\n <TickMarks\n ticks={this.internalTicks}\n min={this.min}\n max={this.max}\n />\n </div>\n\n {/* Second input (for range mode, or for single value if not already rendered) */}\n {this.range ? (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n index={1}\n inputId={this.endInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n endName={this.endName}\n />\n ) : (\n <FieldInput\n range={this.range}\n hasField={this.hasField}\n value={this.valueInternal}\n rangeValue={this.rangeValueInternal}\n inputId={this.startInputId}\n min={this.min}\n max={this.max}\n step={this.step}\n disabled={this.disabled}\n readonly={this.readonly}\n onInput={this.handleFieldChange}\n labelBeforeValue={this.labelBeforeValue}\n labelAfterValue={this.labelAfterValue}\n name={this.name}\n />\n )}\n </div>\n\n {(this.success ||\n this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.error ||\n this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div class=\"error-description\" hidden={!this.error}>\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n // #endregion RENDER\n}\n"]}
@@ -48,7 +48,7 @@ export class NvIcon {
48
48
  /****************************************************************************/
49
49
  //#region RENDER
50
50
  render() {
51
- return (h(Host, { key: '8cb4ada2454c7e9676cd088397eb4416ccab2d82', class: clsx(this.color && `${this.color}`), role: "img", "aria-label": `${this.name}-icon` }, h("svg", { key: '4934c79fa096935be509ff6a641361dac44a4a9f', stroke: "currentColor", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: `nv-icon-${this.size}` }, h("use", { key: '54e429910d5f9916f98e4cdef0be5f2f620df51e', href: `#${this.name}` }))));
51
+ return (h(Host, { key: '8cb4ada2454c7e9676cd088397eb4416ccab2d82', class: clsx(this.color && `${this.color}`), role: "img", "aria-label": `${this.name}-icon` }, h("svg", { key: '4934c79fa096935be509ff6a641361dac44a4a9f', stroke: "currentColor", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: `nv-icon-${this.size}` }, h("use", { key: 'fd1463bd985a473937d6d3035edf83a8d5baf92d', href: `#nvicon_${this.name}` }))));
52
52
  }
53
53
  static get is() { return "nv-icon"; }
54
54
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"nv-icon.js","sourceRoot":"","sources":["../../../src/components/nv-icon/nv-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,UAAU,MAAM,4DAA4D,CAAC;AAGpF,OAAO,EAAE,aAAa,EAA4B,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAOxD,MAAM,OAAO,MAAM;IALnB;QA0FE;;WAEG;QAEH,SAAI,GAAuB,IAAI,CAAC;KAiCjC;IAzHC;;OAEG;IACK,MAAM,CAAC,mBAAmB;QAChC,IAAI,CAAC,QAAQ;YAAE,OAAO,CAAC,iCAAiC;QAExD,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC/C,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAChD,SAAS,CAAC,EAAE,GAAG,gBAAgB,CAAC;YAChC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YACjC,SAAS,CAAC,SAAS,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;YAClD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IA0CD,mBAAmB;QACjB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC;QACvC,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,IAA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sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport iconSprite from '@nova-design-system/nova-base/assets/icons/icon-sprite.svg';\n\nimport { IconName } from './nv-icons';\nimport { SemanticSizes, DeprecatedSemanticColors } from '../../utils/constants';\nimport { dataURIToString } from '../../utils/uri.utils';\n\n@Component({\n tag: 'nv-icon',\n styleUrl: 'styles/nv-icon.scss',\n shadow: false,\n})\nexport class NvIcon {\n /**\n * Ensures the icon sprite is loaded into the document.\n */\n private static ensureSpriteInlined(): void {\n if (!document) return; // SSR & node env fallback safety\n\n if (!document.getElementById('nv-icon-sprite')) {\n const container = document.createElement('div');\n container.id = 'nv-icon-sprite';\n container.style.display = 'none';\n container.innerHTML = dataURIToString(iconSprite);\n document.body.appendChild(container);\n }\n }\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Set size to ExtraSmall.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly xsmall: boolean;\n /**\n * Set size to Small.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly small: boolean;\n /**\n * Set size to Medium.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly medium: boolean;\n /**\n * Set size to Large.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly large: boolean;\n /**\n * Set size to ExtraLarge.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly xlarge: boolean;\n /**\n * Set color of the icon.\n * @deprecated use class names instead.\n */\n @Prop({ reflect: true })\n readonly color: `${DeprecatedSemanticColors}`;\n\n componentWillRender() {\n if (this.xsmall) {\n this.size = SemanticSizes.ExtraSmall;\n }\n if (this.small) {\n this.size = SemanticSizes.Small;\n }\n if (this.medium) {\n this.size = SemanticSizes.Medium;\n }\n if (this.large) {\n this.size = SemanticSizes.Large;\n }\n if (this.xlarge) {\n this.size = SemanticSizes.ExtraLarge;\n }\n }\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Choose the icon you want to display. This also sets the aria-label for\n * improved accessibility, helping users who rely on screen readers.\n */\n @Prop({ reflect: true })\n readonly name: `${IconName}` | string;\n\n /**\n * Adjust the size of the icon to fit your design needs.\n */\n @Prop({ mutable: true, reflect: true })\n size: `${SemanticSizes}` = 'md';\n\n componentWillLoad() {\n NvIcon.ensureSpriteInlined();\n }\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(this.color && `${this.color}`)}\n role=\"img\"\n aria-label={`${this.name}-icon`}\n >\n <svg\n stroke=\"currentColor\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class={`nv-icon-${this.size}`}\n >\n <use href={`#${this.name}`} />\n </svg>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-icon.js","sourceRoot":"","sources":["../../../src/components/nv-icon/nv-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,UAAU,MAAM,4DAA4D,CAAC;AAGpF,OAAO,EAAE,aAAa,EAA4B,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAOxD,MAAM,OAAO,MAAM;IALnB;QA0FE;;WAEG;QAEH,SAAI,GAAuB,IAAI,CAAC;KAiCjC;IAzHC;;OAEG;IACK,MAAM,CAAC,mBAAmB;QAChC,IAAI,CAAC,QAAQ;YAAE,OAAO,CAAC,iCAAiC;QAExD,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC/C,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAChD,SAAS,CAAC,EAAE,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,EAClC,KAAK,EAAE,WAAW,IAAI,CAAC,IAAI,EAAE;gBAE7B,4DAAK,IAAI,EAAE,WAAW,IAAI,CAAC,IAAI,EAAE,GAAI,CACjC,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport iconSprite from '@nova-design-system/nova-base/assets/icons/icon-sprite.svg';\n\nimport { IconName } from './nv-icons';\nimport { SemanticSizes, DeprecatedSemanticColors } from '../../utils/constants';\nimport { dataURIToString } from '../../utils/uri.utils';\n\n@Component({\n tag: 'nv-icon',\n styleUrl: 'styles/nv-icon.scss',\n shadow: false,\n})\nexport class NvIcon {\n /**\n * Ensures the icon sprite is loaded into the document.\n */\n private static ensureSpriteInlined(): void {\n if (!document) return; // SSR & node env fallback safety\n\n if (!document.getElementById('nv-icon-sprite')) {\n const container = document.createElement('div');\n container.id = 'nv-icon-sprite';\n container.style.display = 'none';\n container.innerHTML = dataURIToString(iconSprite);\n document.body.appendChild(container);\n }\n }\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Set size to ExtraSmall.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly xsmall: boolean;\n /**\n * Set size to Small.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly small: boolean;\n /**\n * Set size to Medium.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly medium: boolean;\n /**\n * Set size to Large.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly large: boolean;\n /**\n * Set size to ExtraLarge.\n * @deprecated use size instead.\n */\n @Prop({ reflect: true })\n readonly xlarge: boolean;\n /**\n * Set color of the icon.\n * @deprecated use class names instead.\n */\n @Prop({ reflect: true })\n readonly color: `${DeprecatedSemanticColors}`;\n\n componentWillRender() {\n if (this.xsmall) {\n this.size = SemanticSizes.ExtraSmall;\n }\n if (this.small) {\n this.size = SemanticSizes.Small;\n }\n if (this.medium) {\n this.size = SemanticSizes.Medium;\n }\n if (this.large) {\n this.size = SemanticSizes.Large;\n }\n if (this.xlarge) {\n this.size = SemanticSizes.ExtraLarge;\n }\n }\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Choose the icon you want to display. This also sets the aria-label for\n * improved accessibility, helping users who rely on screen readers.\n */\n @Prop({ reflect: true })\n readonly name: `${IconName}` | string;\n\n /**\n * Adjust the size of the icon to fit your design needs.\n */\n @Prop({ mutable: true, reflect: true })\n size: `${SemanticSizes}` = 'md';\n\n componentWillLoad() {\n NvIcon.ensureSpriteInlined();\n }\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(this.color && `${this.color}`)}\n role=\"img\"\n aria-label={`${this.name}-icon`}\n >\n <svg\n stroke=\"currentColor\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class={`nv-icon-${this.size}`}\n >\n <use href={`#nvicon_${this.name}`} />\n </svg>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
@@ -204,6 +204,7 @@ export const iconNames = [
204
204
  'file-type-pdf',
205
205
  'file-type-png',
206
206
  'file-type-ppt',
207
+ 'file-type-xls',
207
208
  'file-type-xml',
208
209
  'file-type-zip',
209
210
  'file-upload',
@@ -243,6 +244,9 @@ export const iconNames = [
243
244
  'headphones-off',
244
245
  'headphones',
245
246
  'headset',
247
+ 'heart-off',
248
+ 'heart',
249
+ 'heartbeat',
246
250
  'helicopter',
247
251
  'helmet-swopp',
248
252
  'helmet',
@@ -374,6 +378,7 @@ export const iconNames = [
374
378
  'rotate',
375
379
  'router',
376
380
  'ruler-measure',
381
+ 'sailboat',
377
382
  'satellite',
378
383
  'scale',
379
384
  'school',
@@ -398,7 +403,6 @@ export const iconNames = [
398
403
  'ship-off',
399
404
  'ship',
400
405
  'shopping-cart',
401
- 'sizexl',
402
406
  'slash',
403
407
  'smart-home',
404
408
  'snowflake',