@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.
- package/dist/cjs/index.cjs.js +5 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +19 -32
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +14 -26
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +15 -4
- package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +21 -40
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.css +1 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +2 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +8 -8
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +25 -35
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +18 -7
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icon.js.map +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +5 -1
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +3 -3
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-datagrid.js +2 -2
- package/dist/components/nv-dialog.js +23 -36
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fielddate.js +2 -2
- package/dist/components/nv-fielddaterange.js +2 -2
- package/dist/components/nv-fielddropdown.js +3 -3
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +3 -3
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +2 -2
- package/dist/components/nv-fieldselect.js +18 -31
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldslider.js +18 -7
- package/dist/components/nv-fieldslider.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtime.js +2 -2
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-menu.js +2 -2
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/{p-144e80f0.js → p-025b8a78.js} +2 -2
- package/dist/components/{p-144e80f0.js.map → p-025b8a78.js.map} +1 -1
- package/dist/components/{p-07550eac.js → p-30f970c3.js} +2 -2
- package/dist/components/{p-07550eac.js.map → p-30f970c3.js.map} +1 -1
- package/dist/components/{p-e8e6f88a.js → p-60064345.js} +2 -2
- package/dist/components/{p-e8e6f88a.js.map → p-60064345.js.map} +1 -1
- package/dist/components/p-6460318d.js +88 -0
- package/dist/components/p-6460318d.js.map +1 -0
- package/dist/components/{p-12258eef.js → p-68ff562f.js} +2 -2
- package/dist/components/{p-12258eef.js.map → p-68ff562f.js.map} +1 -1
- package/dist/components/{p-d576d64f.js → p-6de6866c.js} +2 -2
- package/dist/components/{p-d576d64f.js.map → p-6de6866c.js.map} +1 -1
- package/dist/components/{p-44df0d22.js → p-79e6b6a2.js} +3 -3
- package/dist/components/{p-44df0d22.js.map → p-79e6b6a2.js.map} +1 -1
- package/dist/components/{p-8b82a6f4.js → p-db4ba1d9.js} +3 -3
- package/dist/components/{p-8b82a6f4.js.map → p-db4ba1d9.js.map} +1 -1
- package/dist/components/{p-f97d1cb1.js → p-e4e1a926.js} +2 -2
- package/dist/components/{p-f97d1cb1.js.map → p-e4e1a926.js.map} +1 -1
- package/dist/components/{p-ca130ad2.js → p-ed6686a1.js} +2 -2
- package/dist/components/p-ed6686a1.js.map +1 -0
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-dialog.entry.js +19 -32
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +14 -26
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldslider.entry.js +15 -4
- package/dist/esm/nv-fieldslider.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/{p-baddee4c.entry.js → p-11012998.entry.js} +2 -2
- package/dist/native/p-11012998.entry.js.map +1 -0
- package/dist/native/p-3ff7a912.entry.js +2 -0
- package/dist/native/p-3ff7a912.entry.js.map +1 -0
- package/dist/native/{p-12039da4.entry.js → p-b7ec9a1b.entry.js} +2 -2
- package/dist/native/p-b7ec9a1b.entry.js.map +1 -0
- package/dist/native/p-bc77cac1.entry.js +2 -0
- package/dist/native/p-bc77cac1.entry.js.map +1 -0
- package/dist/native/{p-9dc1c3e7.entry.js → p-ff248eb8.entry.js} +2 -2
- package/dist/native/{p-9dc1c3e7.entry.js.map → p-ff248eb8.entry.js.map} +1 -1
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +6 -17
- package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +22 -9
- package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +5 -4
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components.d.ts +42 -8
- package/dist/vscode-data.json +19 -11
- package/hydrate/index.js +55 -70
- package/hydrate/index.mjs +55 -70
- package/package.json +1 -1
- package/dist/components/p-ca130ad2.js.map +0 -1
- package/dist/components/p-dd7ff995.js +0 -88
- package/dist/components/p-dd7ff995.js.map +0 -1
- package/dist/native/p-12039da4.entry.js.map +0 -1
- package/dist/native/p-40fa3328.entry.js +0 -2
- package/dist/native/p-40fa3328.entry.js.map +0 -1
- package/dist/native/p-baddee4c.entry.js.map +0 -1
- package/dist/native/p-bba5cc9b.entry.js +0 -2
- package/dist/native/p-bba5cc9b.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nv-fieldselect.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,4mSAA4mS,CAAC;AACtoS,4BAAe,gBAAgB;;MC2BlBA,eAAa;IAN1B;;;;;;;QAiCU,yBAAoB,GAAW,EAAE,CAAC;QAGlC,qBAAgB,GAAY,KAAK,CAAC;;;;QAalC,kBAAa,GAiBhB,EAAE,CAAC;;;;;;;;;;QAaC,YAAO,GAAWC,EAAM,EAAE,CAAC;;;;;;QAiC3B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,U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AC,MAC7C,4DAAK,KAAK,EAAC,aAAa,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,cAAc,IACxD,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,KAAK,EAAC,mBAAmB,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,QAAQ,IACxD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldselect","uuidv4"],"sources":["src/components/nv-fieldselect/nv-fieldselect.scss?tag=nv-fieldselect","src/components/nv-fieldselect/nv-fieldselect.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\n@mixin form-field-select-wrapper() {\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n align-self: stretch;\n}\n\n@mixin form-field-select-container() {\n position: relative;\n display: flex;\n flex-grow: 1;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n\n &:hover {\n border-color: var(--nv-field-border-hover);\n }\n\n &:focus-within {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0 0 0 var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n }\n\n &:has(select:disabled) {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n }\n}\n\n@mixin form-field-select() {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n text-overflow: ellipsis;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n height: var(--form-field-line-height);\n padding: var(--form-field-padding-y) var(--form-field-padding-x);\n box-sizing: content-box;\n -webkit-appearance: none;\n -moz-appearance: none;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: 'TT Norms Pro', sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n }\n}\n\n@mixin form-field-multi-select() {\n height: 100%;\n box-sizing: border-box;\n}\n\n@mixin form-field-select-icons() {\n position: absolute;\n right: 0;\n top: 0;\n pointer-events: none;\n}\n\nnv-fieldselect {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[display-value]:not([display-value='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n &[multiple]:not([multiple='false']) {\n .select-wrapper > .select-container {\n > .select-icons {\n top: var(--form-field-padding-y);\n right: var(--form-field-padding-x);\n }\n > select {\n @include form-field-multi-select();\n }\n }\n }\n\n label {\n @include form-field-label();\n }\n\n .select-wrapper {\n @include form-field-select-wrapper();\n\n .select-container {\n @include form-field-select-container();\n\n > .select-icons {\n @include form-field-select-icons();\n > nv-iconbutton {\n @include form-field-action();\n }\n }\n\n input {\n @include form-field-input();\n\n &:read-only {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(\n --components-form-field-background-readonly,\n rgb(0 0 0 / 10%)\n );\n border-color: var(--nv-field-border-readonly);\n }\n }\n\n select {\n @include form-field-select();\n\n & option {\n font-size: var(--form-field-font-size, 16px);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height, 24px);\n }\n\n &.hidden {\n display: none;\n }\n }\n\n nv-icon.readonly-icon {\n @include form-field-icon();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","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"],"version":3}
|
|
1
|
+
{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a,GAAQ,CAC5B,EAEL,CAAC,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,cAAc,IACxD,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,KAAK,EAAC,mBAAmB,EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,QAAQ,IACxD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldselect","uuidv4"],"sources":["src/components/nv-fieldselect/nv-fieldselect.scss?tag=nv-fieldselect","src/components/nv-fieldselect/nv-fieldselect.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\n@mixin form-field-select-wrapper() {\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n align-self: stretch;\n}\n\n@mixin form-field-select-container() {\n position: relative;\n display: flex;\n flex-grow: 1;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n\n &:hover {\n border-color: var(--nv-field-border-hover);\n }\n\n &:focus-within {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0 0 0 var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n }\n\n &:has(select:disabled) {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n }\n}\n\n@mixin form-field-select() {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n text-overflow: ellipsis;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n height: var(--form-field-line-height);\n padding: var(--form-field-padding-y) var(--form-field-padding-x);\n box-sizing: content-box;\n -webkit-appearance: none;\n -moz-appearance: none;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: 'TT Norms Pro', sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n }\n}\n\n@mixin form-field-multi-select() {\n height: 100%;\n box-sizing: border-box;\n}\n\n@mixin form-field-select-icons() {\n position: absolute;\n right: 0;\n top: 0;\n pointer-events: none;\n}\n\nnv-fieldselect {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[display-value]:not([display-value='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n &[multiple]:not([multiple='false']) {\n .select-wrapper > .select-container {\n > .select-icons {\n top: var(--form-field-padding-y);\n right: var(--form-field-padding-x);\n }\n > select {\n @include form-field-multi-select();\n }\n }\n }\n\n label {\n @include form-field-label();\n }\n\n .select-wrapper {\n @include form-field-select-wrapper();\n\n .select-container {\n @include form-field-select-container();\n\n > .select-icons {\n @include form-field-select-icons();\n > nv-iconbutton {\n @include form-field-action();\n }\n }\n\n input {\n @include form-field-input();\n\n &:read-only {\n // opacity: var(--components-form-opacity-disabled, 0.5); broken token generation, is 50px instead of 0.5\n opacity: 0.5;\n background-color: var(\n --components-form-field-background-readonly,\n rgb(0 0 0 / 10%)\n );\n border-color: var(--nv-field-border-readonly);\n }\n }\n\n select {\n @include form-field-select();\n\n & option {\n font-size: var(--form-field-font-size, 16px);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height, 24px);\n background-color: var(--color-level-05-background);\n color: var(--components-form-field-content-text);\n }\n\n &.hidden {\n display: none;\n }\n }\n\n nv-icon.readonly-icon {\n @include form-field-icon();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","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"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, p as proxyCustomElement, H, c as createEvent, d as Host } from './p-aff3ed68.js';
|
|
2
|
-
import { d as defineCustomElement$5 } from './p-
|
|
3
|
-
import { d as defineCustomElement$4 } from './p-
|
|
4
|
-
import { d as defineCustomElement$3 } from './p-
|
|
2
|
+
import { d as defineCustomElement$5 } from './p-db4ba1d9.js';
|
|
3
|
+
import { d as defineCustomElement$4 } from './p-6460318d.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './p-025b8a78.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-dfd2d4f0.js';
|
|
6
6
|
import { v as v4 } from './p-f5ff676c.js';
|
|
7
7
|
|
|
@@ -299,7 +299,7 @@ const NvFieldslider$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldslider ext
|
|
|
299
299
|
* the value should be a an array of one number. When in range mode, the value
|
|
300
300
|
* should be an array of two numbers.
|
|
301
301
|
*/
|
|
302
|
-
this.value = [0
|
|
302
|
+
this.value = [0];
|
|
303
303
|
/**
|
|
304
304
|
* Defines the interval between selectable values on the slider. Controls how
|
|
305
305
|
* much the value increases or decreases with each keyboard interaction, drag
|
|
@@ -679,6 +679,17 @@ const NvFieldslider$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldslider ext
|
|
|
679
679
|
this.rawPosition = this.valueInternal;
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
|
+
componentWillLoad() {
|
|
683
|
+
// Initialize value array based on range mode when props are available
|
|
684
|
+
if (this.value.length === 1 && this.range) {
|
|
685
|
+
// If range mode but only one value provided, duplicate it
|
|
686
|
+
this.value = [this.value[0], this.value[0]];
|
|
687
|
+
}
|
|
688
|
+
else if (this.value.length === 2 && !this.range) {
|
|
689
|
+
// If single mode but two values provided, take the first
|
|
690
|
+
this.value = [this.value[0]];
|
|
691
|
+
}
|
|
692
|
+
}
|
|
682
693
|
disconnectedCallback() {
|
|
683
694
|
this.removeGlobalEvents();
|
|
684
695
|
}
|
|
@@ -686,11 +697,11 @@ const NvFieldslider$1 = /*@__PURE__*/ proxyCustomElement(class NvFieldslider ext
|
|
|
686
697
|
/****************************************************************************/
|
|
687
698
|
//#region RENDER
|
|
688
699
|
render() {
|
|
689
|
-
return (h(Host, { key: '
|
|
700
|
+
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 ||
|
|
690
701
|
this.description ||
|
|
691
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
702
|
+
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 ||
|
|
692
703
|
this.errorDescription ||
|
|
693
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
704
|
+
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)))));
|
|
694
705
|
}
|
|
695
706
|
static get formAssociated() { return true; }
|
|
696
707
|
get el() { return this; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nv-fieldslider.js","mappings":";;;;;;;AAAA;;;AAIA;;;;;SAKgB,gBAAgB,CAAC,GAAW;IAC1C,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,C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AI,CAAC,OAAO;YACZ,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACrB,IAAI,CAAC,OAAO,KACX,gEAAS,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7D,EACD,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,KAAK;YACV,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,KAAK,EAAC,mBAAmB,EAAC,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,IAC/C,IAAI,CAAC,KAAK,KACT,gEAAS,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7D,EACD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldslider","uuidv4"],"sources":["src/components/nv-fieldslider/nv-fieldslider.utils.ts","src/components/nv-fieldslider/partials/single-thumb.tsx","src/components/nv-fieldslider/partials/range-thumb.tsx","src/components/nv-fieldslider/partials/tick-marks.tsx","src/components/nv-fieldslider/partials/field-input.tsx","src/components/nv-fieldslider/styles/nv-fieldslider.scss?tag=nv-fieldslider","src/components/nv-fieldslider/nv-fieldslider.tsx"],"sourcesContent":["/**\n * Utility functions for nv-fieldslider.\n */\n\n/**\n * Gets the number of decimal places in a number.\n * @param {number} num - The number to check\n * @returns {number} The number of decimal places\n */\nexport function getDecimalPlaces(num: number): number {\n if (Number.isInteger(num)) return 0;\n const str = num.toString();\n const decimalPart = str.split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\n/**\n * Clamp a value between min and max.\n * @param {number} value - The value to clamp\n * @param {number} min - The minimum boundary\n * @param {number} max - The maximum boundary\n * @returns {number} The clamped value\n */\nexport function clamp(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, value));\n}\n\n/**\n * Calculate the percentage position of a value within a range.\n * @param {number} value - The value to convert to percentage\n * @param {number} min - The minimum value of the range\n * @param {number} max - The maximum value of the range\n * @returns {number} The percentage (0-100)\n */\nexport function valueToPercent(\n value: number,\n min: number,\n max: number,\n): number {\n if (max === min) return 0;\n return ((value - min) / (max - min)) * 100;\n}\n\n/**\n * Snap a value to the nearest step.\n * @param {number} value - The value to snap\n * @param {number} min - The minimum boundary\n * @param {number} max - The maximum boundary\n * @param {number} step - The step size\n * @returns {number} The snapped value\n */\nexport function snapToStep(\n value: number,\n min: number,\n max: number,\n step: number,\n): number {\n const clamped = clamp(value, min, max);\n const decimalPlaces = getDecimalPlaces(step);\n\n // To avoid floating point issues in calculations, we can work with integers\n // by multiplying all values by a power of 10 based on decimal places\n if (decimalPlaces > 0) {\n const multiplier = Math.pow(10, decimalPlaces);\n\n // Convert to integer-based calculation\n const scaledValue = Math.round((clamped - min) * multiplier);\n const scaledStep = Math.round(step * multiplier);\n\n // Round to nearest step using integer math\n const roundedSteps = Math.round(scaledValue / scaledStep);\n\n // Calculate snapped value and scale back down\n const scaledSnapped = roundedSteps * scaledStep;\n const snapped = min + scaledSnapped / multiplier;\n\n // Format to correct decimal places to ensure precision\n return clamp(parseFloat(snapped.toFixed(decimalPlaces)), min, max);\n }\n\n // For integer steps, use the original method\n const stepsFromMin = (clamped - min) / step;\n const roundedSteps = Math.round(stepsFromMin);\n const snapped = min + roundedSteps * step;\n\n return clamp(snapped, min, max);\n}\n\n/**\n * Generate tick values for the slider.\n * @param {number} min - The minimum value\n * @param {number} max - The maximum value\n * @param {number} step - The step size\n * @returns {number[]} Array of tick values\n */\nexport function generateTicks(\n min: number,\n max: number,\n step: number,\n): number[] {\n const ticks: number[] = [];\n for (let v = min; v <= max; v += step) {\n ticks.push(Number(v.toFixed(10))); // avoid floating point issues\n }\n if (ticks[ticks.length - 1] !== max) {\n ticks.push(max);\n }\n return ticks;\n}\n\n/**\n * Snap a value to the nearest tick mark.\n * @param {number} value - The value to snap\n * @param {object[]} ticks - Array of tick objects\n * @returns {number} The value of the closest tick\n */\nexport function snapToTicks(\n value: number,\n ticks: {\n /** The value of the tick */\n value: number;\n }[],\n) {\n if (!ticks || ticks.length === 0) return value;\n\n // Find the closest tick\n let closestTick = ticks[0].value;\n let minDistance = Math.abs(value - closestTick);\n\n for (const tick of ticks) {\n const distance = Math.abs(value - tick.value);\n if (distance < minDistance) {\n minDistance = distance;\n closestTick = tick.value;\n }\n }\n\n return closestTick;\n}\n\n/**\n * Format a numeric value for display, preserving trailing zeros based on step precision\n * @param {number} value - The value to format\n * @param {number} step - The step size that determines decimal precision\n * @returns {string} Formatted value string with appropriate decimal places\n */\nexport function formatValueForDisplay(value: number, step: number): string {\n const decimalPlaces = getDecimalPlaces(step);\n if (decimalPlaces > 0) {\n return value.toFixed(decimalPlaces);\n }\n return String(value);\n}\n","import { FunctionalComponent, h } from '@stencil/core';\nimport {\n valueToPercent,\n clamp,\n formatValueForDisplay,\n} from '../nv-fieldslider.utils';\n\n/**\n * Props for the SingleThumb component\n */\ninterface SingleThumbProps {\n /** Current value of the slider */\n value: number;\n /** Minimum allowed value */\n min: number;\n /** Maximum allowed value */\n max: number;\n /** Step size of the slider */\n step: number;\n /** Raw position during dragging */\n rawPosition: number;\n /** Whether the thumb is currently being dragged */\n isDragging: boolean;\n /** Whether the thumb should visually snap to steps */\n snap: boolean;\n /** Whether the slider is disabled */\n disabled: boolean;\n /** Whether the slider is readonly */\n readonly: boolean;\n /** Key down event handler */\n onKeyDown: (event: KeyboardEvent) => void;\n /** Label to display before the value */\n labelBeforeValue?: string;\n /** Label to display after the value */\n labelAfterValue?: string;\n}\n\n/**\n * Renders single thumb in standard mode.\n * @param {SingleThumbProps} props - Component properties\n * @returns {JSX.Element} JSX element representing the thumb\n */\nexport const SingleThumb: FunctionalComponent<SingleThumbProps> = props => {\n const {\n value,\n min,\n max,\n step,\n rawPosition,\n isDragging,\n snap,\n disabled,\n readonly,\n onKeyDown,\n labelBeforeValue,\n labelAfterValue,\n } = props;\n\n // Use raw position for visual display during dragging, but the snapped value otherwise\n let displayPosition = value;\n if (isDragging && !snap) {\n displayPosition = clamp(rawPosition, min, max);\n }\n\n const percent = valueToPercent(displayPosition, min, max);\n\n return (\n <div\n class=\"thumb\"\n style={{ left: `${percent}%` }}\n role=\"slider\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-disabled={disabled ? 'true' : undefined}\n aria-readonly={readonly ? 'true' : undefined}\n tabindex={disabled ? -1 : 0}\n onKeyDown={onKeyDown}\n >\n <div class=\"thumb-tooltip\">\n {labelBeforeValue && (\n <span class=\"label-before\">{labelBeforeValue}</span>\n )}\n {formatValueForDisplay(value, step)}\n {labelAfterValue && <span class=\"label-after\">{labelAfterValue}</span>}\n </div>\n </div>\n );\n};\n","import { FunctionalComponent, h } from '@stencil/core';\nimport {\n valueToPercent,\n clamp,\n formatValueForDisplay,\n} from '../nv-fieldslider.utils';\n\n/**\n * Props for the RangeThumb component\n */\ninterface RangeThumbProps {\n /** Range values [left, right] */\n rangeValue: number[];\n /** Raw positions during dragging [left, right] */\n rawRangePosition: [number, number];\n /** Currently active thumb while dragging */\n activeDragThumb: 'left' | 'right' | 'single';\n /** Whether the thumb is currently being dragged */\n isDragging: boolean;\n /** Whether the thumb should visually snap to steps */\n snap: boolean;\n /** Minimum allowed value */\n min: number;\n /** Maximum allowed value */\n max: number;\n /** Step size of the slider */\n step: number;\n /** Whether the slider is disabled */\n disabled: boolean;\n /** Whether the slider is readonly */\n readonly: boolean;\n /** Key down event handler */\n onKeyDown: (event: KeyboardEvent) => void;\n /** Label to display before the value */\n labelBeforeValue?: string;\n /** Label to display after the value */\n labelAfterValue?: string;\n}\n\n/**\n * Renders dual thumbs in range mode.\n * @param {RangeThumbProps} props - Component properties\n * @returns {JSX.Element[]} Array of JSX elements representing the range slider thumbs\n */\nexport const RangeThumb: FunctionalComponent<RangeThumbProps> = props => {\n const {\n rangeValue,\n rawRangePosition,\n activeDragThumb,\n isDragging,\n snap,\n min,\n max,\n step,\n disabled,\n readonly,\n onKeyDown,\n labelBeforeValue,\n labelAfterValue,\n } = props;\n\n const [leftValue, rightValue] = rangeValue;\n\n // Use raw positions for visual display during dragging, but the snapped values otherwise\n let displayLeftPosition = leftValue;\n let displayRightPosition = rightValue;\n\n if (isDragging && !snap) {\n const [rawLeft, rawRight] = rawRangePosition;\n if (activeDragThumb === 'left') {\n displayLeftPosition = clamp(rawLeft, min, Math.min(rightValue, max));\n } else if (activeDragThumb === 'right') {\n displayRightPosition = clamp(rawRight, Math.max(leftValue, min), max);\n }\n }\n\n const leftPercent = valueToPercent(displayLeftPosition, min, max);\n const rightPercent = valueToPercent(displayRightPosition, min, max);\n\n return [\n <div\n class=\"track-range\"\n style={{\n left: `${leftPercent}%`,\n width: `${rightPercent - leftPercent}%`,\n }}\n />,\n <div\n class=\"thumb thumb-left\"\n style={{ left: `${leftPercent}%` }}\n role=\"slider\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={leftValue} // Always use the snapped value for ARIA\n aria-disabled={disabled ? 'true' : undefined}\n aria-readonly={readonly ? 'true' : undefined}\n data-thumb=\"left\"\n tabindex={disabled ? -1 : 0}\n onKeyDown={onKeyDown}\n >\n <div class=\"thumb-tooltip\">\n {labelBeforeValue && (\n <span class=\"label-before\">{labelBeforeValue}</span>\n )}\n {formatValueForDisplay(leftValue, step)}\n {labelAfterValue && <span class=\"label-after\">{labelAfterValue}</span>}\n </div>\n </div>,\n <div\n class=\"thumb thumb-right\"\n style={{ left: `${rightPercent}%` }}\n role=\"slider\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={rightValue} // Always use the snapped value for ARIA\n aria-disabled={disabled ? 'true' : undefined}\n aria-readonly={readonly ? 'true' : undefined}\n data-thumb=\"right\"\n tabindex={disabled ? -1 : 0}\n onKeyDown={onKeyDown}\n >\n <div class=\"thumb-tooltip\">\n {labelBeforeValue && (\n <span class=\"label-before\">{labelBeforeValue}</span>\n )}\n {formatValueForDisplay(rightValue, step)}\n {labelAfterValue && <span class=\"label-after\">{labelAfterValue}</span>}\n </div>\n </div>,\n ];\n};\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { valueToPercent } from '../nv-fieldslider.utils';\n\n/**\n * Represents a tick mark on the slider\n */\ninterface Tick {\n /** The numeric value of the tick */\n value: number;\n /** Optional label for the tick */\n label?: string;\n}\n\n/**\n * Props for the TickMarks component\n */\ninterface TickMarksProps {\n /** Array of tick definitions */\n ticks: Tick[];\n /** Minimum allowed value */\n min: number;\n /** Maximum allowed value */\n max: number;\n}\n\n/**\n * Renders tick marks along the slider track.\n * @param {TickMarksProps} props - Component properties\n * @returns {JSX.Element | null} JSX element representing the tick marks or null if no ticks\n */\nexport const TickMarks: FunctionalComponent<TickMarksProps> = props => {\n const { ticks, min, max } = props;\n\n if (ticks.length === 0) {\n return null;\n }\n\n return (\n <div class=\"track-ticks\">\n {ticks.map(tick => {\n const percent = valueToPercent(tick.value, min, max);\n return (\n <div class=\"track-tick\" style={{ left: `${percent}%` }}>\n {tick.label && <div class=\"tick-label\">{tick.label}</div>}\n </div>\n );\n })}\n </div>\n );\n};\n","import { FunctionalComponent, h } from '@stencil/core';\n\n/**\n * Props for the FieldInput component\n */\ninterface FieldInputProps {\n /** Whether this is a range slider */\n range: boolean;\n /** Whether to show the input field */\n hasField: boolean;\n /** The value for single mode */\n value: number;\n /** The values for range mode [min, max] */\n rangeValue: number[];\n /** Index (0 or 1) for range mode, ignored in single mode */\n index?: number;\n /** ID for the input field */\n inputId: string;\n /** Minimum allowed value */\n min: number;\n /** Maximum allowed value */\n max: number;\n /** Step size */\n step: number;\n /** Whether the slider is disabled */\n disabled: boolean;\n /** Whether the slider is readonly */\n readonly: boolean;\n /** Handler for input changes */\n onInput: (event: Event) => void;\n /** Label to display before the value */\n labelBeforeValue?: string;\n /** Label to display after the value */\n labelAfterValue?: string;\n /** Name attribute for the input field (for form submission) */\n name?: string;\n /** Name attribute for the end input field (when in range mode) */\n endName?: string;\n}\n\n/**\n * Renders field input for direct value entry\n * @param {FieldInputProps} props - Component properties\n * @returns {JSX.Element} JSX element representing the field input\n */\nexport const FieldInput: FunctionalComponent<FieldInputProps> = props => {\n const {\n range,\n hasField,\n value,\n rangeValue,\n index,\n inputId,\n min,\n max,\n step,\n disabled,\n readonly,\n onInput,\n labelBeforeValue,\n labelAfterValue,\n name,\n endName,\n } = props;\n\n // Determine the appropriate value based on mode and index\n const fieldValue = range ? rangeValue[index] : value;\n\n // In range mode, we need data-index for event handling\n const dataAttrs = range ? { 'data-index': index.toString() } : {};\n\n // Determine the appropriate name based on mode and index\n let inputName: string;\n if (range) {\n if (index === 0) {\n inputName = name || '';\n } else {\n // Use endName if provided, otherwise append \"-end\" to the name\n inputName = endName || (name ? `${name}-end` : '');\n }\n } else {\n inputName = name || '';\n }\n\n // If hasField is false, only the containers are visible, not the input fields\n const containerClass = hasField\n ? 'input-container'\n : 'input-container hidden-input';\n\n return hasField ? (\n <div class={containerClass}>\n <nv-fieldnumber\n id={inputId}\n value={fieldValue}\n min={min}\n max={max}\n step={step}\n disabled={disabled}\n readonly={readonly}\n name={inputName}\n {...dataAttrs}\n onInput={onInput}\n >\n {labelBeforeValue && (\n <span class=\"label-before\" slot=\"leading-input\">\n {labelBeforeValue}\n </span>\n )}\n {labelAfterValue && (\n <span class=\"label-after\" slot=\"trailing-input\">\n {labelAfterValue}\n </span>\n )}\n </nv-fieldnumber>\n </div>\n ) : (\n <input\n id={inputId}\n type=\"hidden\"\n value={fieldValue}\n disabled={disabled}\n readonly={readonly}\n name={inputName}\n />\n );\n};\n","@use \"./mixins\" as *;\n\nnv-fieldslider {\n @include form-field-variables();\n @include form-field-root();\n\n .slider-container {\n @include slider-container-styles();\n\n .track-container {\n @include track-container-styles();\n\n .track {\n @include track-styles();\n .track-range {\n @include track-range-styles();\n }\n .thumb {\n @include thumb-styles();\n .thumb-tooltip {\n @include thumb-tooltip-styles();\n }\n &:hover, &:active, &:focus {\n .thumb-tooltip {\n opacity: 1;\n }\n }\n }\n }\n\n .track-ticks {\n @include track-ticks-styles();\n .track-tick {\n @include track-tick-styles();\n .tick-label {\n @include tick-label-styles();\n }\n }\n }\n }\n\n .input-container {\n @include form-field-input-container();\n @include input-container-styles();\n input {\n @include form-field-input();\n }\n .label-before {\n @include input-label-before-styles();\n }\n .label-after {\n @include input-label-after-styles();\n }\n }\n }\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[error]:not([error=\"false\"]) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success=\"false\"]) {\n @include form-field-success-variables();\n }\n\n &[readonly]:not([readonly=\"false\"]) {\n @include form-field-readonly-variables();\n .track,\n .thumb {\n cursor: default;\n }\n }\n\n label {\n @include form-field-label();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n\n &[hide-label]:not([hide-label=\"false\"]) label {\n @include form-field-hide-label();\n }\n\n &[has-field]:not([has-field=\"false\"]) {\n .thumb-tooltip {\n display: none;\n }\n }\n\n > .description {\n @include form-field-description();\n }\n\n > .error-description {\n @include form-field-error-description();\n &[hidden] {\n display: none;\n }\n }\n}\n","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"],"version":3}
|
|
1
|
+
{"file":"nv-fieldslider.js","mappings":";;;;;;;AAAA;;;AAIA;;;;;SAKgB,gBAAgB,CAAC,GAAW;IAC1C,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC,G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,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,IAAI,EAAE,IAAI,CAAC,IAAI,GACf,CACH,CACG,EAEL,CAAC,IAAI,CAAC,OAAO;YACZ,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACrB,IAAI,CAAC,OAAO,KACX,gEAAS,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7D,EACD,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,KAAK;YACV,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,KAAK,EAAC,mBAAmB,EAAC,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,IAC/C,IAAI,CAAC,KAAK,KACT,gEAAS,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7D,EACD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvFieldslider","uuidv4"],"sources":["src/components/nv-fieldslider/nv-fieldslider.utils.ts","src/components/nv-fieldslider/partials/single-thumb.tsx","src/components/nv-fieldslider/partials/range-thumb.tsx","src/components/nv-fieldslider/partials/tick-marks.tsx","src/components/nv-fieldslider/partials/field-input.tsx","src/components/nv-fieldslider/styles/nv-fieldslider.scss?tag=nv-fieldslider","src/components/nv-fieldslider/nv-fieldslider.tsx"],"sourcesContent":["/**\n * Utility functions for nv-fieldslider.\n */\n\n/**\n * Gets the number of decimal places in a number.\n * @param {number} num - The number to check\n * @returns {number} The number of decimal places\n */\nexport function getDecimalPlaces(num: number): number {\n if (Number.isInteger(num)) return 0;\n const str = num.toString();\n const decimalPart = str.split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\n/**\n * Clamp a value between min and max.\n * @param {number} value - The value to clamp\n * @param {number} min - The minimum boundary\n * @param {number} max - The maximum boundary\n * @returns {number} The clamped value\n */\nexport function clamp(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, value));\n}\n\n/**\n * Calculate the percentage position of a value within a range.\n * @param {number} value - The value to convert to percentage\n * @param {number} min - The minimum value of the range\n * @param {number} max - The maximum value of the range\n * @returns {number} The percentage (0-100)\n */\nexport function valueToPercent(\n value: number,\n min: number,\n max: number,\n): number {\n if (max === min) return 0;\n return ((value - min) / (max - min)) * 100;\n}\n\n/**\n * Snap a value to the nearest step.\n * @param {number} value - The value to snap\n * @param {number} min - The minimum boundary\n * @param {number} max - The maximum boundary\n * @param {number} step - The step size\n * @returns {number} The snapped value\n */\nexport function snapToStep(\n value: number,\n min: number,\n max: number,\n step: number,\n): number {\n const clamped = clamp(value, min, max);\n const decimalPlaces = getDecimalPlaces(step);\n\n // To avoid floating point issues in calculations, we can work with integers\n // by multiplying all values by a power of 10 based on decimal places\n if (decimalPlaces > 0) {\n const multiplier = Math.pow(10, decimalPlaces);\n\n // Convert to integer-based calculation\n const scaledValue = Math.round((clamped - min) * multiplier);\n const scaledStep = Math.round(step * multiplier);\n\n // Round to nearest step using integer math\n const roundedSteps = Math.round(scaledValue / scaledStep);\n\n // Calculate snapped value and scale back down\n const scaledSnapped = roundedSteps * scaledStep;\n const snapped = min + scaledSnapped / multiplier;\n\n // Format to correct decimal places to ensure precision\n return clamp(parseFloat(snapped.toFixed(decimalPlaces)), min, max);\n }\n\n // For integer steps, use the original method\n const stepsFromMin = (clamped - min) / step;\n const roundedSteps = Math.round(stepsFromMin);\n const snapped = min + roundedSteps * step;\n\n return clamp(snapped, min, max);\n}\n\n/**\n * Generate tick values for the slider.\n * @param {number} min - The minimum value\n * @param {number} max - The maximum value\n * @param {number} step - The step size\n * @returns {number[]} Array of tick values\n */\nexport function generateTicks(\n min: number,\n max: number,\n step: number,\n): number[] {\n const ticks: number[] = [];\n for (let v = min; v <= max; v += step) {\n ticks.push(Number(v.toFixed(10))); // avoid floating point issues\n }\n if (ticks[ticks.length - 1] !== max) {\n ticks.push(max);\n }\n return ticks;\n}\n\n/**\n * Snap a value to the nearest tick mark.\n * @param {number} value - The value to snap\n * @param {object[]} ticks - Array of tick objects\n * @returns {number} The value of the closest tick\n */\nexport function snapToTicks(\n value: number,\n ticks: {\n /** The value of the tick */\n value: number;\n }[],\n) {\n if (!ticks || ticks.length === 0) return value;\n\n // Find the closest tick\n let closestTick = ticks[0].value;\n let minDistance = Math.abs(value - closestTick);\n\n for (const tick of ticks) {\n const distance = Math.abs(value - tick.value);\n if (distance < minDistance) {\n minDistance = distance;\n closestTick = tick.value;\n }\n }\n\n return closestTick;\n}\n\n/**\n * Format a numeric value for display, preserving trailing zeros based on step precision\n * @param {number} value - The value to format\n * @param {number} step - The step size that determines decimal precision\n * @returns {string} Formatted value string with appropriate decimal places\n */\nexport function formatValueForDisplay(value: number, step: number): string {\n const decimalPlaces = getDecimalPlaces(step);\n if (decimalPlaces > 0) {\n return value.toFixed(decimalPlaces);\n }\n return String(value);\n}\n","import { FunctionalComponent, h } from '@stencil/core';\nimport {\n valueToPercent,\n clamp,\n formatValueForDisplay,\n} from '../nv-fieldslider.utils';\n\n/**\n * Props for the SingleThumb component\n */\ninterface SingleThumbProps {\n /** Current value of the slider */\n value: number;\n /** Minimum allowed value */\n min: number;\n /** Maximum allowed value */\n max: number;\n /** Step size of the slider */\n step: number;\n /** Raw position during dragging */\n rawPosition: number;\n /** Whether the thumb is currently being dragged */\n isDragging: boolean;\n /** Whether the thumb should visually snap to steps */\n snap: boolean;\n /** Whether the slider is disabled */\n disabled: boolean;\n /** Whether the slider is readonly */\n readonly: boolean;\n /** Key down event handler */\n onKeyDown: (event: KeyboardEvent) => void;\n /** Label to display before the value */\n labelBeforeValue?: string;\n /** Label to display after the value */\n labelAfterValue?: string;\n}\n\n/**\n * Renders single thumb in standard mode.\n * @param {SingleThumbProps} props - Component properties\n * @returns {JSX.Element} JSX element representing the thumb\n */\nexport const SingleThumb: FunctionalComponent<SingleThumbProps> = props => {\n const {\n value,\n min,\n max,\n step,\n rawPosition,\n isDragging,\n snap,\n disabled,\n readonly,\n onKeyDown,\n labelBeforeValue,\n labelAfterValue,\n } = props;\n\n // Use raw position for visual display during dragging, but the snapped value otherwise\n let displayPosition = value;\n if (isDragging && !snap) {\n displayPosition = clamp(rawPosition, min, max);\n }\n\n const percent = valueToPercent(displayPosition, min, max);\n\n return (\n <div\n class=\"thumb\"\n style={{ left: `${percent}%` }}\n role=\"slider\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-disabled={disabled ? 'true' : undefined}\n aria-readonly={readonly ? 'true' : undefined}\n tabindex={disabled ? -1 : 0}\n onKeyDown={onKeyDown}\n >\n <div class=\"thumb-tooltip\">\n {labelBeforeValue && (\n <span class=\"label-before\">{labelBeforeValue}</span>\n )}\n {formatValueForDisplay(value, step)}\n {labelAfterValue && <span class=\"label-after\">{labelAfterValue}</span>}\n </div>\n </div>\n );\n};\n","import { FunctionalComponent, h } from '@stencil/core';\nimport {\n valueToPercent,\n clamp,\n formatValueForDisplay,\n} from '../nv-fieldslider.utils';\n\n/**\n * Props for the RangeThumb component\n */\ninterface RangeThumbProps {\n /** Range values [left, right] */\n rangeValue: number[];\n /** Raw positions during dragging [left, right] */\n rawRangePosition: [number, number];\n /** Currently active thumb while dragging */\n activeDragThumb: 'left' | 'right' | 'single';\n /** Whether the thumb is currently being dragged */\n isDragging: boolean;\n /** Whether the thumb should visually snap to steps */\n snap: boolean;\n /** Minimum allowed value */\n min: number;\n /** Maximum allowed value */\n max: number;\n /** Step size of the slider */\n step: number;\n /** Whether the slider is disabled */\n disabled: boolean;\n /** Whether the slider is readonly */\n readonly: boolean;\n /** Key down event handler */\n onKeyDown: (event: KeyboardEvent) => void;\n /** Label to display before the value */\n labelBeforeValue?: string;\n /** Label to display after the value */\n labelAfterValue?: string;\n}\n\n/**\n * Renders dual thumbs in range mode.\n * @param {RangeThumbProps} props - Component properties\n * @returns {JSX.Element[]} Array of JSX elements representing the range slider thumbs\n */\nexport const RangeThumb: FunctionalComponent<RangeThumbProps> = props => {\n const {\n rangeValue,\n rawRangePosition,\n activeDragThumb,\n isDragging,\n snap,\n min,\n max,\n step,\n disabled,\n readonly,\n onKeyDown,\n labelBeforeValue,\n labelAfterValue,\n } = props;\n\n const [leftValue, rightValue] = rangeValue;\n\n // Use raw positions for visual display during dragging, but the snapped values otherwise\n let displayLeftPosition = leftValue;\n let displayRightPosition = rightValue;\n\n if (isDragging && !snap) {\n const [rawLeft, rawRight] = rawRangePosition;\n if (activeDragThumb === 'left') {\n displayLeftPosition = clamp(rawLeft, min, Math.min(rightValue, max));\n } else if (activeDragThumb === 'right') {\n displayRightPosition = clamp(rawRight, Math.max(leftValue, min), max);\n }\n }\n\n const leftPercent = valueToPercent(displayLeftPosition, min, max);\n const rightPercent = valueToPercent(displayRightPosition, min, max);\n\n return [\n <div\n class=\"track-range\"\n style={{\n left: `${leftPercent}%`,\n width: `${rightPercent - leftPercent}%`,\n }}\n />,\n <div\n class=\"thumb thumb-left\"\n style={{ left: `${leftPercent}%` }}\n role=\"slider\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={leftValue} // Always use the snapped value for ARIA\n aria-disabled={disabled ? 'true' : undefined}\n aria-readonly={readonly ? 'true' : undefined}\n data-thumb=\"left\"\n tabindex={disabled ? -1 : 0}\n onKeyDown={onKeyDown}\n >\n <div class=\"thumb-tooltip\">\n {labelBeforeValue && (\n <span class=\"label-before\">{labelBeforeValue}</span>\n )}\n {formatValueForDisplay(leftValue, step)}\n {labelAfterValue && <span class=\"label-after\">{labelAfterValue}</span>}\n </div>\n </div>,\n <div\n class=\"thumb thumb-right\"\n style={{ left: `${rightPercent}%` }}\n role=\"slider\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={rightValue} // Always use the snapped value for ARIA\n aria-disabled={disabled ? 'true' : undefined}\n aria-readonly={readonly ? 'true' : undefined}\n data-thumb=\"right\"\n tabindex={disabled ? -1 : 0}\n onKeyDown={onKeyDown}\n >\n <div class=\"thumb-tooltip\">\n {labelBeforeValue && (\n <span class=\"label-before\">{labelBeforeValue}</span>\n )}\n {formatValueForDisplay(rightValue, step)}\n {labelAfterValue && <span class=\"label-after\">{labelAfterValue}</span>}\n </div>\n </div>,\n ];\n};\n","import { FunctionalComponent, h } from '@stencil/core';\nimport { valueToPercent } from '../nv-fieldslider.utils';\n\n/**\n * Represents a tick mark on the slider\n */\ninterface Tick {\n /** The numeric value of the tick */\n value: number;\n /** Optional label for the tick */\n label?: string;\n}\n\n/**\n * Props for the TickMarks component\n */\ninterface TickMarksProps {\n /** Array of tick definitions */\n ticks: Tick[];\n /** Minimum allowed value */\n min: number;\n /** Maximum allowed value */\n max: number;\n}\n\n/**\n * Renders tick marks along the slider track.\n * @param {TickMarksProps} props - Component properties\n * @returns {JSX.Element | null} JSX element representing the tick marks or null if no ticks\n */\nexport const TickMarks: FunctionalComponent<TickMarksProps> = props => {\n const { ticks, min, max } = props;\n\n if (ticks.length === 0) {\n return null;\n }\n\n return (\n <div class=\"track-ticks\">\n {ticks.map(tick => {\n const percent = valueToPercent(tick.value, min, max);\n return (\n <div class=\"track-tick\" style={{ left: `${percent}%` }}>\n {tick.label && <div class=\"tick-label\">{tick.label}</div>}\n </div>\n );\n })}\n </div>\n );\n};\n","import { FunctionalComponent, h } from '@stencil/core';\n\n/**\n * Props for the FieldInput component\n */\ninterface FieldInputProps {\n /** Whether this is a range slider */\n range: boolean;\n /** Whether to show the input field */\n hasField: boolean;\n /** The value for single mode */\n value: number;\n /** The values for range mode [min, max] */\n rangeValue: number[];\n /** Index (0 or 1) for range mode, ignored in single mode */\n index?: number;\n /** ID for the input field */\n inputId: string;\n /** Minimum allowed value */\n min: number;\n /** Maximum allowed value */\n max: number;\n /** Step size */\n step: number;\n /** Whether the slider is disabled */\n disabled: boolean;\n /** Whether the slider is readonly */\n readonly: boolean;\n /** Handler for input changes */\n onInput: (event: Event) => void;\n /** Label to display before the value */\n labelBeforeValue?: string;\n /** Label to display after the value */\n labelAfterValue?: string;\n /** Name attribute for the input field (for form submission) */\n name?: string;\n /** Name attribute for the end input field (when in range mode) */\n endName?: string;\n}\n\n/**\n * Renders field input for direct value entry\n * @param {FieldInputProps} props - Component properties\n * @returns {JSX.Element} JSX element representing the field input\n */\nexport const FieldInput: FunctionalComponent<FieldInputProps> = props => {\n const {\n range,\n hasField,\n value,\n rangeValue,\n index,\n inputId,\n min,\n max,\n step,\n disabled,\n readonly,\n onInput,\n labelBeforeValue,\n labelAfterValue,\n name,\n endName,\n } = props;\n\n // Determine the appropriate value based on mode and index\n const fieldValue = range ? rangeValue[index] : value;\n\n // In range mode, we need data-index for event handling\n const dataAttrs = range ? { 'data-index': index.toString() } : {};\n\n // Determine the appropriate name based on mode and index\n let inputName: string;\n if (range) {\n if (index === 0) {\n inputName = name || '';\n } else {\n // Use endName if provided, otherwise append \"-end\" to the name\n inputName = endName || (name ? `${name}-end` : '');\n }\n } else {\n inputName = name || '';\n }\n\n // If hasField is false, only the containers are visible, not the input fields\n const containerClass = hasField\n ? 'input-container'\n : 'input-container hidden-input';\n\n return hasField ? (\n <div class={containerClass}>\n <nv-fieldnumber\n id={inputId}\n value={fieldValue}\n min={min}\n max={max}\n step={step}\n disabled={disabled}\n readonly={readonly}\n name={inputName}\n {...dataAttrs}\n onInput={onInput}\n >\n {labelBeforeValue && (\n <span class=\"label-before\" slot=\"leading-input\">\n {labelBeforeValue}\n </span>\n )}\n {labelAfterValue && (\n <span class=\"label-after\" slot=\"trailing-input\">\n {labelAfterValue}\n </span>\n )}\n </nv-fieldnumber>\n </div>\n ) : (\n <input\n id={inputId}\n type=\"hidden\"\n value={fieldValue}\n disabled={disabled}\n readonly={readonly}\n name={inputName}\n />\n );\n};\n","@use \"./mixins\" as *;\n\nnv-fieldslider {\n @include form-field-variables();\n @include form-field-root();\n\n .slider-container {\n @include slider-container-styles();\n\n .track-container {\n @include track-container-styles();\n\n .track {\n @include track-styles();\n .track-range {\n @include track-range-styles();\n }\n .thumb {\n @include thumb-styles();\n .thumb-tooltip {\n @include thumb-tooltip-styles();\n }\n &:hover, &:active, &:focus {\n .thumb-tooltip {\n opacity: 1;\n }\n }\n }\n }\n\n .track-ticks {\n @include track-ticks-styles();\n .track-tick {\n @include track-tick-styles();\n .tick-label {\n @include tick-label-styles();\n }\n }\n }\n }\n\n .input-container {\n @include form-field-input-container();\n @include input-container-styles();\n input {\n @include form-field-input();\n }\n .label-before {\n @include input-label-before-styles();\n }\n .label-after {\n @include input-label-after-styles();\n }\n }\n }\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[error]:not([error=\"false\"]) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success=\"false\"]) {\n @include form-field-success-variables();\n }\n\n &[readonly]:not([readonly=\"false\"]) {\n @include form-field-readonly-variables();\n .track,\n .thumb {\n cursor: default;\n }\n }\n\n label {\n @include form-field-label();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n\n &[hide-label]:not([hide-label=\"false\"]) label {\n @include form-field-hide-label();\n }\n\n &[has-field]:not([has-field=\"false\"]) {\n .thumb-tooltip {\n display: none;\n }\n }\n\n > .description {\n @include form-field-description();\n }\n\n > .error-description {\n @include form-field-error-description();\n &[hidden] {\n display: none;\n }\n }\n}\n","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"],"version":3}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
|
|
2
2
|
import { a as startsWithIgnoreCase } from './p-a5c8eee9.js';
|
|
3
3
|
import { T as TimeType } from './p-1f505531.js';
|
|
4
|
-
import { d as defineCustomElement$5 } from './p-
|
|
5
|
-
import { d as defineCustomElement$4 } from './p-
|
|
4
|
+
import { d as defineCustomElement$5 } from './p-6460318d.js';
|
|
5
|
+
import { d as defineCustomElement$4 } from './p-025b8a78.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './p-dfd2d4f0.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './p-8067d283.js';
|
|
8
8
|
import { v as v4 } from './p-f5ff676c.js';
|