@milaboratories/uikit 2.6.2 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/.turbo/turbo-build.log +135 -135
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +6 -0
  4. package/dist/base/BtnBase.vue.js +18 -18
  5. package/dist/base/BtnBase.vue.js.map +1 -1
  6. package/dist/components/ContextProvider.vue.js.map +1 -1
  7. package/dist/components/DataTable/BaseCellComponent.vue.js +20 -20
  8. package/dist/components/DataTable/BaseCellComponent.vue.js.map +1 -1
  9. package/dist/components/DataTable/ColumnCaret.vue.js +6 -6
  10. package/dist/components/DataTable/ColumnCaret.vue.js.map +1 -1
  11. package/dist/components/DataTable/ColumnsCommandMenu.vue.js.map +1 -1
  12. package/dist/components/DataTable/RowsCommandMenu.vue.js.map +1 -1
  13. package/dist/components/DataTable/TScroll.vue.js +12 -12
  14. package/dist/components/DataTable/TScroll.vue.js.map +1 -1
  15. package/dist/components/DataTable/TableComponent.vue.js +1 -1
  16. package/dist/components/DataTable/TableComponent.vue.js.map +1 -1
  17. package/dist/components/DataTable/TdCell.vue.js +36 -36
  18. package/dist/components/DataTable/TdCell.vue.js.map +1 -1
  19. package/dist/components/DataTable/ThCell.vue.js +27 -27
  20. package/dist/components/DataTable/ThCell.vue.js.map +1 -1
  21. package/dist/components/DataTable/TrBody.vue.js +12 -12
  22. package/dist/components/DataTable/TrBody.vue.js.map +1 -1
  23. package/dist/components/DataTable/TrHead.vue.js.map +1 -1
  24. package/dist/components/DataTable/assets/TableIcon.vue.js +2 -2
  25. package/dist/components/DataTable/assets/TableIcon.vue.js.map +1 -1
  26. package/dist/components/DropdownListItem.vue.js +18 -18
  27. package/dist/components/DropdownListItem.vue.js.map +1 -1
  28. package/dist/components/HScroll.vue.js.map +1 -1
  29. package/dist/components/InputRange.vue.js.map +1 -1
  30. package/dist/components/LongText.vue.js +1 -1
  31. package/dist/components/LongText.vue.js.map +1 -1
  32. package/dist/components/LongText.vue3.js +1 -1
  33. package/dist/components/PlAccordion/ExpandTransition.vue.js +27 -0
  34. package/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -0
  35. package/dist/components/PlAccordion/ExpandTransition.vue2.js.map +1 -1
  36. package/dist/components/PlAccordion/PlAccordion.vue.js.map +1 -1
  37. package/dist/components/PlAccordion/PlAccordionSection.vue2.js +21 -21
  38. package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
  39. package/dist/components/PlAlert/PlAlert.vue.js +23 -23
  40. package/dist/components/PlAlert/PlAlert.vue.js.map +1 -1
  41. package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +86 -86
  42. package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
  43. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js +83 -83
  44. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js.map +1 -1
  45. package/dist/components/PlBtnAccent/PlBtnAccent.vue.js.map +1 -1
  46. package/dist/components/PlBtnDanger/PlBtnDanger.vue.js.map +1 -1
  47. package/dist/components/PlBtnGhost/PlBtnGhost.vue.js +21 -21
  48. package/dist/components/PlBtnGhost/PlBtnGhost.vue.js.map +1 -1
  49. package/dist/components/PlBtnGroup/PlBtnGroup.vue.js +34 -34
  50. package/dist/components/PlBtnGroup/PlBtnGroup.vue.js.map +1 -1
  51. package/dist/components/PlBtnLink/PlBtnLink.vue.js +12 -12
  52. package/dist/components/PlBtnLink/PlBtnLink.vue.js.map +1 -1
  53. package/dist/components/PlBtnPrimary/PlBtnPrimary.vue.js.map +1 -1
  54. package/dist/components/PlBtnSecondary/PlBtnSecondary.vue.js.map +1 -1
  55. package/dist/components/PlBtnSplit/PlBtnSplit.vue.js +31 -31
  56. package/dist/components/PlBtnSplit/PlBtnSplit.vue.js.map +1 -1
  57. package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js +18 -18
  58. package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js.map +1 -1
  59. package/dist/components/PlChartStackedBar/Legends.vue2.js.map +1 -1
  60. package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js +15 -15
  61. package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js.map +1 -1
  62. package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue2.js.map +1 -1
  63. package/dist/components/PlChartStackedBar/StackedRow.vue2.js.map +1 -1
  64. package/dist/components/PlChartStackedBar/StackedRowCompact.vue2.js.map +1 -1
  65. package/dist/components/PlCheckbox/PlCheckbox.vue.js +13 -13
  66. package/dist/components/PlCheckbox/PlCheckbox.vue.js.map +1 -1
  67. package/dist/components/PlCheckbox/PlCheckboxBase.vue.js +6 -6
  68. package/dist/components/PlCheckbox/PlCheckboxBase.vue.js.map +1 -1
  69. package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js +28 -28
  70. package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js.map +1 -1
  71. package/dist/components/PlChip/PlChip.vue.js +20 -20
  72. package/dist/components/PlChip/PlChip.vue.js.map +1 -1
  73. package/dist/components/PlClipboard/PlClipboard.vue2.js.map +1 -1
  74. package/dist/components/PlConfirmDialog.vue.js +14 -14
  75. package/dist/components/PlConfirmDialog.vue.js.map +1 -1
  76. package/dist/components/PlDialogModal/PlDialogModal.vue.js +30 -30
  77. package/dist/components/PlDialogModal/PlDialogModal.vue.js.map +1 -1
  78. package/dist/components/PlDropdown/OptionList.vue.js +40 -40
  79. package/dist/components/PlDropdown/OptionList.vue.js.map +1 -1
  80. package/dist/components/PlDropdown/PlDropdown.vue.js +89 -89
  81. package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
  82. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +92 -92
  83. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js.map +1 -1
  84. package/dist/components/PlDropdownLine/PlDropdownLine.vue.d.ts +1 -1
  85. package/dist/components/PlDropdownLine/PlDropdownLine.vue.js +4 -4
  86. package/dist/components/PlDropdownLine/PlDropdownLine.vue.js.map +1 -1
  87. package/dist/components/PlDropdownLine/ResizableInput.vue.js +12 -12
  88. package/dist/components/PlDropdownLine/ResizableInput.vue.js.map +1 -1
  89. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +70 -70
  90. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js.map +1 -1
  91. package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.d.ts +1 -1
  92. package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.js.map +1 -1
  93. package/dist/components/PlDropdownRef/PlDropdownRef.vue.js +11 -11
  94. package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
  95. package/dist/components/PlEditableTitle/PlEditableTitle.vue.d.ts +1 -1
  96. package/dist/components/PlEditableTitle/PlEditableTitle.vue.js +36 -36
  97. package/dist/components/PlEditableTitle/PlEditableTitle.vue.js.map +1 -1
  98. package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
  99. package/dist/components/PlElementList/PlElementListItem.vue2.js +67 -67
  100. package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
  101. package/dist/components/PlErrorAlert/PlErrorAlert.vue2.js.map +1 -1
  102. package/dist/components/PlErrorBoundary/PlErrorBoundary.vue.js.map +1 -1
  103. package/dist/components/PlFileDialog/Local.vue.js +24 -24
  104. package/dist/components/PlFileDialog/Local.vue.js.map +1 -1
  105. package/dist/components/PlFileDialog/PlFileDialog.vue.js +38 -38
  106. package/dist/components/PlFileDialog/PlFileDialog.vue.js.map +1 -1
  107. package/dist/components/PlFileDialog/Remote.vue.js +2 -2
  108. package/dist/components/PlFileDialog/Remote.vue.js.map +1 -1
  109. package/dist/components/PlFileDialog/Shortcuts.vue2.js +4 -4
  110. package/dist/components/PlFileDialog/Shortcuts.vue2.js.map +1 -1
  111. package/dist/components/PlFileInput/PlFileInput.vue.d.ts +1 -1
  112. package/dist/components/PlFileInput/PlFileInput.vue.js +75 -75
  113. package/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
  114. package/dist/components/PlIcon16/PlIcon16.vue2.js.map +1 -1
  115. package/dist/components/PlIcon24/PlIcon24.vue2.js.map +1 -1
  116. package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js +11 -11
  117. package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js.map +1 -1
  118. package/dist/components/PlLogView/PlLogView.vue.js +58 -58
  119. package/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
  120. package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js +22 -22
  121. package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js.map +1 -1
  122. package/dist/components/PlNumberField/PlNumberField.vue.d.ts +1 -1
  123. package/dist/components/PlNumberField/PlNumberField.vue.js +75 -75
  124. package/dist/components/PlNumberField/PlNumberField.vue.js.map +1 -1
  125. package/dist/components/PlProgressBar/PlProgressBar.vue.js +12 -12
  126. package/dist/components/PlProgressBar/PlProgressBar.vue.js.map +1 -1
  127. package/dist/components/PlProgressCell/PlProgressCell.vue.js +20 -20
  128. package/dist/components/PlProgressCell/PlProgressCell.vue.js.map +1 -1
  129. package/dist/components/PlRadio/PlRadio.vue2.js.map +1 -1
  130. package/dist/components/PlRadio/PlRadioGroup.vue2.js +8 -8
  131. package/dist/components/PlRadio/PlRadioGroup.vue2.js.map +1 -1
  132. package/dist/components/PlSearchField/PlSearchField.vue2.js +19 -19
  133. package/dist/components/PlSearchField/PlSearchField.vue2.js.map +1 -1
  134. package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js +8 -8
  135. package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js.map +1 -1
  136. package/dist/components/PlSidebar/PlSidebarGroup.vue2.js.map +1 -1
  137. package/dist/components/PlSidebar/PlSidebarItem.vue2.js.map +1 -1
  138. package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +1 -1
  139. package/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
  140. package/dist/components/PlSlideModal/PlSlideModal.vue2.js.map +1 -1
  141. package/dist/components/PlSplash/PlSplash.vue.js +16 -16
  142. package/dist/components/PlSplash/PlSplash.vue.js.map +1 -1
  143. package/dist/components/PlStatusTag/PlStatusTag.vue.js +7 -7
  144. package/dist/components/PlStatusTag/PlStatusTag.vue.js.map +1 -1
  145. package/dist/components/PlSvg/PlSvg.vue2.js.map +1 -1
  146. package/dist/components/PlTabs/PlTabs.vue.js +18 -18
  147. package/dist/components/PlTabs/PlTabs.vue.js.map +1 -1
  148. package/dist/components/PlTabs/Tab.vue.js +9 -9
  149. package/dist/components/PlTabs/Tab.vue.js.map +1 -1
  150. package/dist/components/PlTextArea/PlTextArea.vue.js +51 -51
  151. package/dist/components/PlTextArea/PlTextArea.vue.js.map +1 -1
  152. package/dist/components/PlTextField/PlTextField.vue.js +62 -62
  153. package/dist/components/PlTextField/PlTextField.vue.js.map +1 -1
  154. package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js +14 -14
  155. package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js.map +1 -1
  156. package/dist/components/PlTooltip/Beak.vue.js +2 -2
  157. package/dist/components/PlTooltip/Beak.vue.js.map +1 -1
  158. package/dist/components/PlTooltip/PlTooltip.vue.js +50 -50
  159. package/dist/components/PlTooltip/PlTooltip.vue.js.map +1 -1
  160. package/dist/components/Scrollable.vue.js.map +1 -1
  161. package/dist/components/Slider.vue.js +35 -35
  162. package/dist/components/Slider.vue.js.map +1 -1
  163. package/dist/components/SliderRange.vue.js +47 -47
  164. package/dist/components/SliderRange.vue.js.map +1 -1
  165. package/dist/components/SliderRangeTriple.vue.js +47 -47
  166. package/dist/components/SliderRangeTriple.vue.js.map +1 -1
  167. package/dist/components/TabItem.vue.js.map +1 -1
  168. package/dist/components/ThemeSwitcher.vue.js +2 -2
  169. package/dist/components/ThemeSwitcher.vue.js.map +1 -1
  170. package/dist/components/TransitionSlidePanel.vue.js.map +1 -1
  171. package/dist/components/VScroll.vue.js.map +1 -1
  172. package/dist/components/contextMenu/Menu.vue2.js +12 -12
  173. package/dist/components/contextMenu/Menu.vue2.js.map +1 -1
  174. package/dist/index.js +1 -1
  175. package/dist/layout/PlBlockPage/PlBlockPage.vue.js +27 -27
  176. package/dist/layout/PlBlockPage/PlBlockPage.vue.js.map +1 -1
  177. package/dist/layout/PlContainer/PlContainer.vue.js +10 -10
  178. package/dist/layout/PlContainer/PlContainer.vue.js.map +1 -1
  179. package/dist/layout/PlGrid/PlGrid.vue.js.map +1 -1
  180. package/dist/layout/PlRow/PlRow.vue.js +8 -8
  181. package/dist/layout/PlRow/PlRow.vue.js.map +1 -1
  182. package/dist/layout/PlSpacer/PlSpacer.vue.js.map +1 -1
  183. package/dist/utils/DoubleContour.vue.js +9 -9
  184. package/dist/utils/DoubleContour.vue.js.map +1 -1
  185. package/dist/utils/DropdownOverlay/DropdownOverlay.vue.js.map +1 -1
  186. package/dist/utils/PlCloseModalBtn.vue.js +2 -2
  187. package/dist/utils/PlCloseModalBtn.vue.js.map +1 -1
  188. package/dist/utils/TextLabel.vue.js.map +1 -1
  189. package/package.json +4 -4
  190. package/dist/utils/DoubleContour.vue2.js +0 -23
  191. package/dist/utils/DoubleContour.vue2.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PlDropdown.vue.js","sources":["../../../src/components/PlDropdown/PlDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: 'PlDropdown',\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport { computed, reactive, ref, unref, useTemplateRef, watch, watchPostEffect } from 'vue';\nimport SvgRequired from '../../assets/images/required.svg?raw';\nimport { getErrorMessage } from '../../helpers/error.ts';\nimport { tap } from '../../helpers/functions';\nimport { deepEqual } from '../../helpers/objects';\nimport { normalizeListOptions } from '../../helpers/utils';\nimport type { ListOption, ListOptionNormalized, MaskIconName16, MaskIconName24 } from '../../types';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport LongText from '../LongText.vue';\nimport { PlIcon16 } from '../PlIcon16';\nimport { PlIcon24 } from '../PlIcon24';\nimport { PlSvg } from '../PlSvg';\nimport { PlTooltip } from '../PlTooltip';\nimport OptionList from './OptionList.vue';\nimport './pl-dropdown.scss';\nimport type { LOption } from './types';\nimport { useGroupBy } from './useGroupBy';\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: 'update:modelValue', value: M | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current selected value of the dropdown.\n */\n modelValue: M;\n /**\n * The label text for the dropdown field (optional)\n */\n label?: string;\n /**\n * List of available options for the dropdown\n */\n options?: Readonly<ListOption<M>[]>;\n /**\n * A helper text displayed below the dropdown when there are no errors (optional).\n */\n helper?: string;\n /**\n * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).\n */\n loadingOptionsHelper?: string;\n /**\n * Error message displayed below the dropdown (optional)\n */\n error?: unknown;\n /**\n * Shows red border even without an error message\n */\n errorStatus?: boolean;\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n /**\n * Enables a button to clear the selected value (default: false)\n */\n clearable?: boolean;\n /**\n * If `true`, the dropdown component is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * Custom icon (16px) class for the dropdown arrow (optional)\n */\n arrowIcon?: MaskIconName16;\n /**\n * Custom icon (24px) class for the dropdown arrow (optional)\n */\n arrowIconLarge?: MaskIconName24;\n /**\n * Option list item size\n */\n optionSize?: 'small' | 'medium';\n /**\n * Makes some of corners not rounded\n * */\n groupPosition?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle';\n }>(),\n {\n label: '',\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n showErrorMessage: true,\n placeholder: '...',\n clearable: false,\n required: false,\n disabled: false,\n arrowIcon: undefined,\n arrowIconLarge: undefined,\n optionSize: 'small',\n options: undefined,\n groupPosition: undefined,\n },\n);\n\nconst rootRef = ref<HTMLElement | undefined>();\nconst input = ref<HTMLInputElement | undefined>();\n\nconst optionListRef = useTemplateRef<InstanceType<typeof OptionList>>('optionListRef');\n\nconst data = reactive({\n search: '',\n activeIndex: -1,\n open: false,\n optionsHeight: 0,\n});\n\nconst findActiveIndex = () =>\n tap(\n orderedRef.value.findIndex((o) => deepEqual(o.value, props.modelValue)),\n (v) => (v < 0 ? 0 : v),\n );\n\nconst updateActive = () => (data.activeIndex = findActiveIndex());\n\nconst isLoadingOptions = computed(() => {\n return props.options === undefined;\n});\n\nconst isDisabled = computed(() => {\n if (isLoadingOptions.value) {\n return true;\n }\n\n return props.disabled;\n});\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, props.modelValue));\n});\n\nconst computedError = computed(() => {\n if (isLoadingOptions.value) {\n return undefined;\n }\n\n if (props.error) {\n return getErrorMessage(props.error);\n }\n\n if (props.modelValue !== undefined && selectedIndex.value === -1) {\n return 'The selected value is not one of the options';\n }\n\n return undefined;\n});\n\nconst optionsRef = computed<LOption<M>[]>(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst textValue = computed(() => {\n const options = unref(optionsRef);\n\n const item: ListOption | undefined = options.find((o) => deepEqual(o.value, props.modelValue));\n\n return item?.label || props.modelValue; // @todo show inner value?\n});\n\nconst computedPlaceholder = computed(() => {\n if (!data.open && props.modelValue !== undefined) {\n return '';\n }\n\n return props.modelValue ? String(textValue.value) : props.placeholder;\n});\n\nconst hasValue = computed(() => {\n return props.modelValue !== undefined && props.modelValue !== null;\n});\n\nconst filteredRef = computed(() => {\n const options = optionsRef.value;\n\n if (data.search) {\n return options.filter((o: ListOptionNormalized) => {\n const search = data.search.toLowerCase();\n\n if (o.label.toLowerCase().includes(search)) {\n return true;\n }\n\n if (o.description && o.description.toLowerCase().includes(search)) {\n return true;\n }\n\n if (typeof o.value === 'string') {\n return o.value.toLowerCase().includes(search);\n }\n\n return o.value === data.search;\n });\n }\n\n return options;\n});\n\nconst { orderedRef, groupsRef, restRef } = useGroupBy(filteredRef, 'group');\n\nconst tabindex = computed(() => (isDisabled.value ? undefined : '0'));\n\nconst selectOption = (v: M | undefined) => {\n emit('update:modelValue', v);\n data.search = '';\n data.open = false;\n rootRef?.value?.focus();\n};\n\nconst selectOptionWrapper = (v: unknown) => {\n selectOption(v as M | undefined);\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nconst setFocusOnInput = () => input.value?.focus();\n\nconst toggleOpen = () => {\n data.open = !data.open;\n if (!data.open) {\n data.search = '';\n }\n};\n\nconst onInputFocus = () => (data.open = true);\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!rootRef.value?.contains(relatedTarget) && !optionListRef.value?.listRef?.contains(relatedTarget)) {\n data.search = '';\n data.open = false;\n }\n};\n\nconst handleKeydown = (e: { code: string; preventDefault(): void }) => {\n if (!['ArrowDown', 'ArrowUp', 'Enter', 'Escape'].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n const { open, activeIndex } = data;\n\n if (!open) {\n if (e.code === 'Enter') {\n data.open = true;\n }\n return;\n }\n\n if (e.code === 'Escape') {\n data.open = false;\n rootRef.value?.focus();\n }\n\n const ordered = orderedRef.value;\n\n const { length } = ordered;\n\n if (!length) {\n return;\n }\n\n if (e.code === 'Enter') {\n selectOption(ordered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = ordered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === 'ArrowDown' ? 1 : e.code === 'ArrowUp' ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = ordered[newIndex].index ?? -1;\n};\n\nuseLabelNotch(rootRef);\n\nwatch(() => props.modelValue, updateActive, { immediate: true });\n\nwatch(\n () => data.open,\n (open) => (open ? input.value?.focus() : ''),\n);\n\nwatchPostEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n data.search; // to watch\n\n if (data.activeIndex >= 0 && data.open) {\n optionListRef.value?.scrollIntoActive();\n }\n});\n</script>\n\n<template>\n <div class=\"pl-dropdown__envelope\" @click=\"setFocusOnInput\">\n <div\n ref=\"rootRef\"\n :tabindex=\"tabindex\"\n class=\"pl-dropdown\"\n :class=\"{ open: data.open, error: error || errorStatus, disabled: isDisabled }\"\n @keydown=\"handleKeydown\"\n @focusout=\"onFocusOut\"\n >\n <div class=\"pl-dropdown__container\">\n <div class=\"pl-dropdown__field\">\n <input\n ref=\"input\"\n v-model=\"data.search\"\n type=\"text\"\n tabindex=\"-1\"\n :disabled=\"isDisabled\"\n :placeholder=\"computedPlaceholder\"\n spellcheck=\"false\"\n autocomplete=\"chrome-off\"\n @focus=\"onInputFocus\"\n />\n\n <div v-if=\"!data.open\" class=\"input-value\">\n <LongText> {{ textValue }} </LongText>\n </div>\n\n <div class=\"pl-dropdown__controls\">\n <PlIcon24 v-if=\"isLoadingOptions\" name=\"loading\" />\n <PlIcon16 v-if=\"clearable && hasValue\" class=\"clear\" name=\"delete-clear\" @click.stop=\"clear\" />\n <slot name=\"append\" />\n <div class=\"pl-dropdown__arrow-wrapper\" @click.stop=\"toggleOpen\">\n <PlIcon24 v-if=\"arrowIconLarge\" :name=\"arrowIconLarge\" class=\"arrow-icon\" />\n <PlIcon16 v-else-if=\"arrowIcon\" :name=\"arrowIcon\" class=\"arrow-icon\" />\n <PlIcon16 v-else name=\"chevron-down\" class=\"arrow-icon arrow-icon-default\" />\n </div>\n </div>\n </div>\n <label v-if=\"label\">\n <PlSvg v-if=\"required\" :uri=\"SvgRequired\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"$slots.tooltip\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <OptionList\n v-if=\"data.open\"\n ref=\"optionListRef\"\n :root-ref=\"rootRef!\"\n :groups=\"groupsRef\"\n :rest=\"restRef\"\n :option-size=\"optionSize\"\n :select-option=\"selectOptionWrapper\"\n />\n <DoubleContour class=\"pl-dropdown__contour\" :group-position=\"groupPosition\" />\n </div>\n </div>\n <div v-if=\"computedError\" class=\"pl-dropdown__error\">{{ computedError }}</div>\n <div v-else-if=\"isLoadingOptions && loadingOptionsHelper\" class=\"pl-dropdown__helper\">{{ loadingOptionsHelper }}</div>\n <div v-else-if=\"helper\" class=\"pl-dropdown__helper\">{{ helper }}</div>\n </div>\n</template>\n"],"names":["__default__","emit","__emit","props","__props","rootRef","ref","input","optionListRef","useTemplateRef","data","reactive","findActiveIndex","tap","orderedRef","o","deepEqual","v","updateActive","isLoadingOptions","computed","isDisabled","selectedIndex","computedError","getErrorMessage","optionsRef","normalizeListOptions","opt","index","textValue","item","unref","computedPlaceholder","hasValue","filteredRef","options","search","groupsRef","restRef","useGroupBy","tabindex","selectOption","_a","selectOptionWrapper","clear","setFocusOnInput","toggleOpen","onInputFocus","onFocusOut","event","relatedTarget","_c","_b","handleKeydown","open","activeIndex","ordered","length","it","localIndex","delta","newIndex","useLabelNotch","watch","watchPostEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIAA,KAAe;AAAA,EACb,MAAM;AACR;;;;;;;;;;;;;;;;;;;;;AAuBA,UAAMC,IAAOC,GAOPC,IAAQC,GAiFRC,IAAUC,EAAA,GACVC,IAAQD,EAAA,GAERE,IAAgBC,GAAgD,eAAe,GAE/EC,IAAOC,GAAS;AAAA,MACpB,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,MAAM;AAAA,MACN,eAAe;AAAA,IAAA,CAChB,GAEKC,IAAkB,MACtBC;AAAA,MACEC,EAAW,MAAM,U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,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlDropdown.vue.js","sources":["../../../src/components/PlDropdown/PlDropdown.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: 'PlDropdown',\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport { computed, reactive, ref, unref, useTemplateRef, watch, watchPostEffect } from 'vue';\nimport SvgRequired from '../../assets/images/required.svg?raw';\nimport { getErrorMessage } from '../../helpers/error.ts';\nimport { tap } from '../../helpers/functions';\nimport { deepEqual } from '../../helpers/objects';\nimport { normalizeListOptions } from '../../helpers/utils';\nimport type { ListOption, ListOptionNormalized, MaskIconName16, MaskIconName24 } from '../../types';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport LongText from '../LongText.vue';\nimport { PlIcon16 } from '../PlIcon16';\nimport { PlIcon24 } from '../PlIcon24';\nimport { PlSvg } from '../PlSvg';\nimport { PlTooltip } from '../PlTooltip';\nimport OptionList from './OptionList.vue';\nimport './pl-dropdown.scss';\nimport type { LOption } from './types';\nimport { useGroupBy } from './useGroupBy';\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: 'update:modelValue', value: M | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current selected value of the dropdown.\n */\n modelValue: M;\n /**\n * The label text for the dropdown field (optional)\n */\n label?: string;\n /**\n * List of available options for the dropdown\n */\n options?: Readonly<ListOption<M>[]>;\n /**\n * A helper text displayed below the dropdown when there are no errors (optional).\n */\n helper?: string;\n /**\n * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).\n */\n loadingOptionsHelper?: string;\n /**\n * Error message displayed below the dropdown (optional)\n */\n error?: unknown;\n /**\n * Shows red border even without an error message\n */\n errorStatus?: boolean;\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n /**\n * Enables a button to clear the selected value (default: false)\n */\n clearable?: boolean;\n /**\n * If `true`, the dropdown component is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * Custom icon (16px) class for the dropdown arrow (optional)\n */\n arrowIcon?: MaskIconName16;\n /**\n * Custom icon (24px) class for the dropdown arrow (optional)\n */\n arrowIconLarge?: MaskIconName24;\n /**\n * Option list item size\n */\n optionSize?: 'small' | 'medium';\n /**\n * Makes some of corners not rounded\n * */\n groupPosition?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle';\n }>(),\n {\n label: '',\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n showErrorMessage: true,\n placeholder: '...',\n clearable: false,\n required: false,\n disabled: false,\n arrowIcon: undefined,\n arrowIconLarge: undefined,\n optionSize: 'small',\n options: undefined,\n groupPosition: undefined,\n },\n);\n\nconst rootRef = ref<HTMLElement | undefined>();\nconst input = ref<HTMLInputElement | undefined>();\n\nconst optionListRef = useTemplateRef<InstanceType<typeof OptionList>>('optionListRef');\n\nconst data = reactive({\n search: '',\n activeIndex: -1,\n open: false,\n optionsHeight: 0,\n});\n\nconst findActiveIndex = () =>\n tap(\n orderedRef.value.findIndex((o) => deepEqual(o.value, props.modelValue)),\n (v) => (v < 0 ? 0 : v),\n );\n\nconst updateActive = () => (data.activeIndex = findActiveIndex());\n\nconst isLoadingOptions = computed(() => {\n return props.options === undefined;\n});\n\nconst isDisabled = computed(() => {\n if (isLoadingOptions.value) {\n return true;\n }\n\n return props.disabled;\n});\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, props.modelValue));\n});\n\nconst computedError = computed(() => {\n if (isLoadingOptions.value) {\n return undefined;\n }\n\n if (props.error) {\n return getErrorMessage(props.error);\n }\n\n if (props.modelValue !== undefined && selectedIndex.value === -1) {\n return 'The selected value is not one of the options';\n }\n\n return undefined;\n});\n\nconst optionsRef = computed<LOption<M>[]>(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst textValue = computed(() => {\n const options = unref(optionsRef);\n\n const item: ListOption | undefined = options.find((o) => deepEqual(o.value, props.modelValue));\n\n return item?.label || props.modelValue; // @todo show inner value?\n});\n\nconst computedPlaceholder = computed(() => {\n if (!data.open && props.modelValue !== undefined) {\n return '';\n }\n\n return props.modelValue ? String(textValue.value) : props.placeholder;\n});\n\nconst hasValue = computed(() => {\n return props.modelValue !== undefined && props.modelValue !== null;\n});\n\nconst filteredRef = computed(() => {\n const options = optionsRef.value;\n\n if (data.search) {\n return options.filter((o: ListOptionNormalized) => {\n const search = data.search.toLowerCase();\n\n if (o.label.toLowerCase().includes(search)) {\n return true;\n }\n\n if (o.description && o.description.toLowerCase().includes(search)) {\n return true;\n }\n\n if (typeof o.value === 'string') {\n return o.value.toLowerCase().includes(search);\n }\n\n return o.value === data.search;\n });\n }\n\n return options;\n});\n\nconst { orderedRef, groupsRef, restRef } = useGroupBy(filteredRef, 'group');\n\nconst tabindex = computed(() => (isDisabled.value ? undefined : '0'));\n\nconst selectOption = (v: M | undefined) => {\n emit('update:modelValue', v);\n data.search = '';\n data.open = false;\n rootRef?.value?.focus();\n};\n\nconst selectOptionWrapper = (v: unknown) => {\n selectOption(v as M | undefined);\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nconst setFocusOnInput = () => input.value?.focus();\n\nconst toggleOpen = () => {\n data.open = !data.open;\n if (!data.open) {\n data.search = '';\n }\n};\n\nconst onInputFocus = () => (data.open = true);\n\nconst onFocusOut = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!rootRef.value?.contains(relatedTarget) && !optionListRef.value?.listRef?.contains(relatedTarget)) {\n data.search = '';\n data.open = false;\n }\n};\n\nconst handleKeydown = (e: { code: string; preventDefault(): void }) => {\n if (!['ArrowDown', 'ArrowUp', 'Enter', 'Escape'].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n const { open, activeIndex } = data;\n\n if (!open) {\n if (e.code === 'Enter') {\n data.open = true;\n }\n return;\n }\n\n if (e.code === 'Escape') {\n data.open = false;\n rootRef.value?.focus();\n }\n\n const ordered = orderedRef.value;\n\n const { length } = ordered;\n\n if (!length) {\n return;\n }\n\n if (e.code === 'Enter') {\n selectOption(ordered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = ordered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === 'ArrowDown' ? 1 : e.code === 'ArrowUp' ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = ordered[newIndex].index ?? -1;\n};\n\nuseLabelNotch(rootRef);\n\nwatch(() => props.modelValue, updateActive, { immediate: true });\n\nwatch(\n () => data.open,\n (open) => (open ? input.value?.focus() : ''),\n);\n\nwatchPostEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n data.search; // to watch\n\n if (data.activeIndex >= 0 && data.open) {\n optionListRef.value?.scrollIntoActive();\n }\n});\n</script>\n\n<template>\n <div class=\"pl-dropdown__envelope\" @click=\"setFocusOnInput\">\n <div\n ref=\"rootRef\"\n :tabindex=\"tabindex\"\n class=\"pl-dropdown\"\n :class=\"{ open: data.open, error: error || errorStatus, disabled: isDisabled }\"\n @keydown=\"handleKeydown\"\n @focusout=\"onFocusOut\"\n >\n <div class=\"pl-dropdown__container\">\n <div class=\"pl-dropdown__field\">\n <input\n ref=\"input\"\n v-model=\"data.search\"\n type=\"text\"\n tabindex=\"-1\"\n :disabled=\"isDisabled\"\n :placeholder=\"computedPlaceholder\"\n spellcheck=\"false\"\n autocomplete=\"chrome-off\"\n @focus=\"onInputFocus\"\n />\n\n <div v-if=\"!data.open\" class=\"input-value\">\n <LongText> {{ textValue }} </LongText>\n </div>\n\n <div class=\"pl-dropdown__controls\">\n <PlIcon24 v-if=\"isLoadingOptions\" name=\"loading\" />\n <PlIcon16 v-if=\"clearable && hasValue\" class=\"clear\" name=\"delete-clear\" @click.stop=\"clear\" />\n <slot name=\"append\" />\n <div class=\"pl-dropdown__arrow-wrapper\" @click.stop=\"toggleOpen\">\n <PlIcon24 v-if=\"arrowIconLarge\" :name=\"arrowIconLarge\" class=\"arrow-icon\" />\n <PlIcon16 v-else-if=\"arrowIcon\" :name=\"arrowIcon\" class=\"arrow-icon\" />\n <PlIcon16 v-else name=\"chevron-down\" class=\"arrow-icon arrow-icon-default\" />\n </div>\n </div>\n </div>\n <label v-if=\"label\">\n <PlSvg v-if=\"required\" :uri=\"SvgRequired\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"$slots.tooltip\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <OptionList\n v-if=\"data.open\"\n ref=\"optionListRef\"\n :root-ref=\"rootRef!\"\n :groups=\"groupsRef\"\n :rest=\"restRef\"\n :option-size=\"optionSize\"\n :select-option=\"selectOptionWrapper\"\n />\n <DoubleContour class=\"pl-dropdown__contour\" :group-position=\"groupPosition\" />\n </div>\n </div>\n <div v-if=\"computedError\" class=\"pl-dropdown__error\">{{ computedError }}</div>\n <div v-else-if=\"isLoadingOptions && loadingOptionsHelper\" class=\"pl-dropdown__helper\">{{ loadingOptionsHelper }}</div>\n <div v-else-if=\"helper\" class=\"pl-dropdown__helper\">{{ helper }}</div>\n </div>\n</template>\n"],"names":["__default__","emit","__emit","props","__props","rootRef","ref","input","optionListRef","useTemplateRef","data","reactive","findActiveIndex","tap","orderedRef","o","deepEqual","v","updateActive","isLoadingOptions","computed","isDisabled","selectedIndex","computedError","getErrorMessage","optionsRef","normalizeListOptions","opt","index","textValue","item","unref","computedPlaceholder","hasValue","filteredRef","options","search","groupsRef","restRef","useGroupBy","tabindex","selectOption","_a","selectOptionWrapper","clear","setFocusOnInput","toggleOpen","onInputFocus","onFocusOut","event","relatedTarget","_c","_b","handleKeydown","open","activeIndex","ordered","length","it","localIndex","delta","newIndex","useLabelNotch","watch","watchPostEffect","_createElementBlock","_createElementVNode","_normalizeClass","_hoisted_2","_hoisted_3","_cache","$event","_vModelText","_openBlock","_hoisted_5","_createVNode","LongText","_hoisted_6","_createBlock","_unref","PlIcon24","PlIcon16","_renderSlot","_ctx","_hoisted_7","PlSvg","SvgRequired","$slots","PlTooltip","OptionList","DoubleContour","_hoisted_8","_toDisplayString","_hoisted_9","_hoisted_10"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIAA,KAAe;AAAA,EACb,MAAM;AACR;;;;;;;;;;;;;;;;;;;;;AAuBA,UAAMC,IAAOC,GAOPC,IAAQC,GAiFRC,IAAUC,EAAA,GACVC,IAAQD,EAAA,GAERE,IAAgBC,GAAgD,eAAe,GAE/EC,IAAOC,GAAS;AAAA,MACpB,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,MAAM;AAAA,MACN,eAAe;AAAA,IAAA,CAChB,GAEKC,IAAkB,MACtBC;AAAA,MACEC,EAAW,MAAM,UAAU,CAACC,MAAMC,EAAUD,EAAE,OAAOZ,EAAM,UAAU,CAAC;AAAA,MACtE,CAACc,MAAOA,IAAI,IAAI,IAAIA;AAAA,IAAA,GAGlBC,IAAe,MAAOR,EAAK,cAAcE,EAAA,GAEzCO,IAAmBC,EAAS,MACzBjB,EAAM,YAAY,MAC1B,GAEKkB,IAAaD,EAAS,MACtBD,EAAiB,QACZ,KAGFhB,EAAM,QACd,GAEKmB,IAAgBF,EAAS,OACrBjB,EAAM,WAAW,CAAA,GAAI,UAAU,CAACY,MAAMC,EAAUD,EAAE,OAAOZ,EAAM,UAAU,CAAC,CACnF,GAEKoB,IAAgBH,EAAS,MAAM;AACnC,UAAI,CAAAD,EAAi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AA,cAAb6D,EAQQ,SAAAmB,IAAA;AAAA,YAPOhF,EAAA,iBAAb0E,EAA4CC,EAAAM,EAAA,GAAA;AAAA;cAApB,KAAKN,EAAAO,EAAA;AAAA,YAAA;YAC7BpB,EAAwB,gBAAf9D,EAAA,KAAK,GAAA,CAAA;AAAA,YACGmF,EAAAA,OAAO,gBAAxBT,EAIYC,EAAAS,EAAA,GAAA;AAAA;cAJqB,OAAM;AAAA,cAAO,UAAS;AAAA,YAAA;cAC1C,WACT,MAAuB;AAAA,gBAAvBN,EAAuBC,EAAA,QAAA,SAAA;AAAA,cAAA;;;;UAKrBzE,EAAK,aADboE,EAQEW,IAAA;AAAA;qBANI;AAAA,YAAJ,KAAIjF;AAAA,YACH,YAAUH,EAAA;AAAA,YACV,QAAQ0E,EAAA1C,CAAA;AAAA,YACR,MAAM0C,EAAAzC,CAAA;AAAA,YACN,eAAalC,EAAA;AAAA,YACb,iBAAeuC;AAAA,UAAA;UAElBgC,EAA8Ee,IAAA;AAAA,YAA/D,OAAM;AAAA,YAAwB,kBAAgBtF,EAAA;AAAA,UAAA;;;MAGtDmB,EAAA,cAAX0C,EAA8E,OAA9E0B,IAA8EC,EAAtBrE,EAAA,KAAa,GAAA,CAAA,KACrDJ,EAAA,SAAoBf,EAAA,6BAApC6D,EAAsH,OAAtH4B,IAAsHD,EAA7BxF,EAAA,oBAAoB,GAAA,CAAA,KAC7FA,EAAA,eAAhB6D,EAAsE,OAAtE6B,IAAsEF,EAAfxF,EAAA,MAAM,GAAA,CAAA;;;;"}
@@ -1,25 +1,25 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(`.pl-dropdown-legacy{--contour-color: var(--txt-01);--contour-border-width: 1px;--options-bg: #fff;--option-hover-bg: var(--btn-sec-hover-grey);--label-offset-left-x: 8px;--label-offset-right-x: 8px;--label-color: var(--txt-01);position:relative;outline:none;min-height:var(--control-height);border-radius:6px;font-family:var(--font-family-base);font-size:var(--font-size-base);font-weight:var(--font-weigh-base)}[data-theme=dark] .pl-dropdown-legacy{--options-bg: #1b1b1f}.pl-dropdown-legacy__envelope{font-family:var(--control-font-family);min-width:160px}.pl-dropdown-legacy label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.pl-dropdown-legacy label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-dropdown-legacy__container{position:absolute;top:0;left:0;right:0;border-radius:6px;min-height:var(--control-height);color:var(--txt-01)}.pl-dropdown-legacy__contour{border-radius:var(--border-radius-control);border:var(--contour-border-width) solid var(--contour-color);box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.pl-dropdown-legacy__options{position:relative;background-color:var(--options-bg);border-radius:0 0 6px 6px;max-height:244px;border-top:1px solid var(--color-div-black);--thumb-color: var(--ic-02);overflow-y:auto}.pl-dropdown-legacy__options::-webkit-scrollbar{width:var(--scrollbar-width, 6px);height:5px;background-color:transparent;display:block}.pl-dropdown-legacy__options::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-dropdown-legacy__options::-webkit-scrollbar-thumb:hover{--thumb-color: var(--border-color-focus)}.pl-dropdown-legacy__options .nothing-found{padding:0 10px;height:var(--control-height);line-height:var(--control-height);background-color:#fff;opacity:.5;font-style:italic}.pl-dropdown-legacy__options .option{position:relative;padding:0 30px 0 10px;height:var(--control-height);line-height:var(--control-height);cursor:pointer;-webkit-user-select:none;user-select:none}.pl-dropdown-legacy__options .option .checkmark{position:absolute;display:none;right:10px;top:50%;transform:translateY(-50%)}.pl-dropdown-legacy__options .option>span{display:block;overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis}.pl-dropdown-legacy__options .option.selected{background-color:var(--color-active-select)}.pl-dropdown-legacy__options .option.selected .checkmark{display:block}.pl-dropdown-legacy__options .option.active:not(.selected){background-color:var(--option-hover-bg)}.pl-dropdown-legacy__options .option:hover{background-color:var(--option-hover-bg)}.pl-dropdown-legacy__field{position:relative;border-radius:6px;overflow:hidden;background:transparent;padding:0 11px;min-height:var(--control-height);line-height:var(--control-height);display:flex;flex-direction:row;align-items:center}.pl-dropdown-legacy__field .input-value{outline:1px solid red;position:absolute;top:0;left:0;bottom:0;right:0;padding:0 60px 0 11px;pointer-events:none;line-height:var(--control-height);color:var(--contour-color);overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-dropdown-legacy__field input{min-height:calc(var(--control-height) - 2px);line-height:calc(var(--control-height) - 2px);font-family:inherit;font-size:inherit;background-color:transparent;border:none;padding:0;width:calc(100% - 40px);color:var(--txt-01);caret-color:var(--border-color-focus)}.pl-dropdown-legacy__field input:focus{outline:none}.pl-dropdown-legacy__field input:placeholder-shown{text-overflow:ellipsis}.pl-dropdown-legacy__field input::placeholder{color:var(--color-placeholder)}.pl-dropdown-legacy__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-dropdown-legacy__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-dropdown-legacy__controls{display:flex;flex-direction:row;align-items:center;gap:6px;margin-left:auto}.pl-dropdown-legacy__controls .mask-16,.pl-dropdown-legacy__controls .mask-24{--icon-color: var(--control-mask-fill);cursor:pointer}.pl-dropdown-legacy__controls .clear{--icon-color: var(--ic-02)}.pl-dropdown-legacy__controls .mask-loading{--icon-color: var(#07AD3E);animation:spin 2.5s linear infinite}.pl-dropdown-legacy .arrow-icon{cursor:pointer}.pl-dropdown-legacy .arrow-icon.arrow-icon-default{background-color:var(--control-mask-fill);mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.46967%206.53033L3.53033%205.46967L8%209.93934L12.4697%205.46967L13.5303%206.53033L8%2012.0607L2.46967%206.53033Z'%20fill='%23110529'/%3e%3c/svg%3e");-webkit-mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.46967%206.53033L3.53033%205.46967L8%209.93934L12.4697%205.46967L13.5303%206.53033L8%2012.0607L2.46967%206.53033Z'%20fill='%23110529'/%3e%3c/svg%3e");mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:16px;-webkit-mask-size:16px;width:16px;height:16px}.pl-dropdown-legacy.open,.pl-dropdown-legacy:focus-within{z-index:1;--label-color: var(--txt-focus)}.pl-dropdown-legacy.open .pl-dropdown-legacy__container{z-index:1000}.pl-dropdown-legacy.open .pl-dropdown-legacy__field{border-radius:6px 6px 0 0}.pl-dropdown-legacy.open .arrow-icon{background-color:var(--control-mask-fill);mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%204.93933L13.5303%2010.4697L12.4697%2011.5303L8%207.06065L3.53033%2011.5303L2.46967%2010.4697L8%204.93933Z'%20fill='%23110529'/%3e%3c/svg%3e");-webkit-mask-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%204.93933L13.5303%2010.4697L12.4697%2011.5303L8%207.06065L3.53033%2011.5303L2.46967%2010.4697L8%204.93933Z'%20fill='%23110529'/%3e%3c/svg%3e");mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:16px;-webkit-mask-size:16px;width:16px;height:16px}.pl-dropdown-legacy:hover{--contour-color: var(--control-hover-color)}.pl-dropdown-legacy:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.pl-dropdown-legacy:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.pl-dropdown-legacy.error{--contour-color: var(--txt-error);--label-color: var(--txt-error)}.pl-dropdown-legacy.disabled{--contour-color: var(--color-dis-01);--control-mask-fill: var(--color-dis-01);--label-color: var(--color-dis-01);cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}
2
2
  .double-contour.top>div{border-bottom-right-radius:0;border-bottom-left-radius:0}.double-contour.bottom>div{border-top-right-radius:0;border-top-left-radius:0}.double-contour.left>div{border-top-right-radius:0;border-bottom-right-radius:0}.double-contour.right>div{border-top-left-radius:0;border-bottom-left-radius:0}.double-contour.top-left>div{border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.double-contour.top-right>div{border-bottom-right-radius:0;border-top-left-radius:0;border-top-right-radius:0}.double-contour.bottom-left>div{border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.double-contour.bottom-right>div{border-top-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0}.double-contour.middle>div{border-radius:0}
3
- .ui-lt-container{min-width:0;white-space:nowrap;overflow:hidden;position:relative;border-radius:5px}.ui-lt-container span{display:inline-block;overflow:hidden;text-overflow:ellipsis;width:100%;vertical-align:bottom;pointer-events:all!important}.ui-lt-container .ui-lt-animate{position:relative;animation:left-to-right var(--5deba9de) infinite alternate linear;overflow:unset!important;text-overflow:unset!important;width:fit-content!important}@keyframes left-to-right{0%{transform:translate(0);left:0%}to{transform:translate(-101%);left:101%}}`)),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
4
- import { defineComponent as te, useSlots as ne, ref as V, reactive as re, computed as i, unref as u, watch as B, watchPostEffect as le, createElementBlock as s, openBlock as r, createElementVNode as c, createCommentVNode as d, normalizeClass as b, createVNode as F, withDirectives as se, vModelText as ie, withCtx as M, createTextVNode as ae, toDisplayString as v, createBlock as m, renderSlot as N, withModifiers as h, Fragment as de, renderList as ue } from "vue";
3
+ .ui-lt-container{min-width:0;white-space:nowrap;overflow:hidden;position:relative;border-radius:5px}.ui-lt-container span{display:inline-block;overflow:hidden;text-overflow:ellipsis;width:100%;vertical-align:bottom;pointer-events:all!important}.ui-lt-container .ui-lt-animate{position:relative;animation:left-to-right var(--v5deba9de) infinite alternate linear;overflow:unset!important;text-overflow:unset!important;width:fit-content!important}@keyframes left-to-right{0%{transform:translate(0);left:0%}to{transform:translate(-101%);left:101%}}`)),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
4
+ import { defineComponent as te, useSlots as ne, ref as V, reactive as le, computed as s, unref as u, watch as F, watchPostEffect as re, createElementBlock as a, openBlock as l, createElementVNode as p, createCommentVNode as c, normalizeClass as b, createVNode as M, withDirectives as ie, vModelText as ae, withCtx as N, createTextVNode as se, toDisplayString as m, createBlock as h, renderSlot as P, withModifiers as w, Fragment as de, renderList as ce } from "vue";
5
5
 
6
- import { tap as ce, tapIf as pe } from "../../helpers/functions.js";
6
+ import { tap as ue, tapIf as pe } from "../../helpers/functions.js";
7
7
  import fe from "../PlTooltip/PlTooltip.vue.js";
8
8
  import ve from "../../utils/DoubleContour.vue.js";
9
9
 
10
10
  import { useLabelNotch as me } from "../../utils/useLabelNotch.js";
11
11
  import { scrollIntoView as he } from "../../helpers/dom.js";
12
12
  import { deepEqual as C } from "../../helpers/objects.js";
13
- import _e from "../DropdownListItem.vue.js";
14
- import we from "../LongText.vue.js";
13
+ import we from "../DropdownListItem.vue.js";
14
+ import ke from "../LongText.vue.js";
15
15
 
16
- import ke from "../PlIcon16/PlIcon16.vue.js";
16
+ import _e from "../PlIcon16/PlIcon16.vue.js";
17
17
  import ye from "../PlIcon24/PlIcon24.vue.js";
18
18
  import { normalizeListOptions as Ie } from "../../helpers/utils.js";
19
19
  import { getErrorMessage as ge } from "../../helpers/error.js";
20
- import Ve from "../PlSvg/PlSvg.vue.js";
21
- import be from "../../assets/images/required.svg.js";
22
- const Ce = { class: "ui-dropdown__envelope" }, Ee = ["tabindex"], Le = { class: "ui-dropdown__container" }, Se = { class: "ui-dropdown__field" }, $e = ["disabled", "placeholder"], xe = { class: "ui-dropdown__controls" }, Ae = { key: 0 }, Oe = {
20
+ import xe from "../PlSvg/PlSvg.vue.js";
21
+ import Ve from "../../assets/images/required.svg.js";
22
+ const be = { class: "ui-dropdown__envelope" }, Ce = ["tabindex"], Ee = { class: "ui-dropdown__container" }, Le = { class: "ui-dropdown__field" }, Se = ["disabled", "placeholder"], $e = { class: "ui-dropdown__controls" }, Ae = { key: 0 }, Oe = {
23
23
  key: 0,
24
24
  class: "nothing-found"
25
25
  }, De = {
@@ -51,178 +51,178 @@ const Ce = { class: "ui-dropdown__envelope" }, Ee = ["tabindex"], Le = { class:
51
51
  optionSize: { default: "small" }
52
52
  },
53
53
  emits: ["update:modelValue"],
54
- setup(P, { emit: q }) {
55
- const E = q, n = P, T = ne(), a = V(), L = V(), k = V(), t = re({
54
+ setup(r, { emit: q }) {
55
+ const E = q, n = r, T = ne(), d = V(), L = V(), y = V(), t = le({
56
56
  search: "",
57
57
  activeIndex: -1,
58
58
  open: !1
59
- }), H = () => ce(
60
- p.value.findIndex((e) => C(e.value, n.modelValue)),
59
+ }), H = () => ue(
60
+ f.value.findIndex((e) => C(e.value, n.modelValue)),
61
61
  (e) => e < 0 ? 0 : e
62
- ), R = () => t.activeIndex = H(), _ = i(() => n.options === void 0), y = i(() => _.value ? !0 : n.disabled), S = i(() => (n.options ?? []).findIndex((e) => C(e.value, n.modelValue))), $ = i(() => {
63
- if (!_.value) {
62
+ ), R = () => t.activeIndex = H(), k = s(() => n.options === void 0), I = s(() => k.value ? !0 : n.disabled), S = s(() => (n.options ?? []).findIndex((e) => C(e.value, n.modelValue))), $ = s(() => {
63
+ if (!k.value) {
64
64
  if (n.error)
65
65
  return ge(n.error);
66
66
  if (n.modelValue !== void 0 && S.value === -1)
67
67
  return "The selected value is not one of the options";
68
68
  }
69
- }), x = i(
69
+ }), A = s(
70
70
  () => Ie(n.options ?? []).map((e, o) => ({
71
71
  ...e,
72
72
  index: o,
73
73
  isSelected: o === S.value,
74
74
  isActive: o === t.activeIndex
75
75
  }))
76
- ), A = i(() => {
77
- const o = u(x).find((l) => C(l.value, n.modelValue));
76
+ ), O = s(() => {
77
+ const o = u(A).find((i) => C(i.value, n.modelValue));
78
78
  return (o == null ? void 0 : o.label) || n.modelValue;
79
- }), U = i(() => !t.open && n.modelValue ? "" : n.modelValue ? String(A.value) : n.placeholder), K = i(() => n.modelValue !== void 0 && n.modelValue !== null), p = i(() => {
80
- const e = x.value;
79
+ }), U = s(() => !t.open && n.modelValue ? "" : n.modelValue ? String(O.value) : n.placeholder), K = s(() => n.modelValue !== void 0 && n.modelValue !== null), f = s(() => {
80
+ const e = A.value;
81
81
  return t.search ? e.filter((o) => {
82
- const l = t.search.toLowerCase();
83
- return o.label.toLowerCase().includes(l) || o.description && o.description.toLowerCase().includes(l) ? !0 : typeof o.value == "string" ? o.value.toLowerCase().includes(l) : o.value === t.search;
82
+ const i = t.search.toLowerCase();
83
+ return o.label.toLowerCase().includes(i) || o.description && o.description.toLowerCase().includes(i) ? !0 : typeof o.value == "string" ? o.value.toLowerCase().includes(i) : o.value === t.search;
84
84
  }) : e;
85
- }), j = i(() => y.value ? void 0 : "0"), O = (e) => {
85
+ }), j = s(() => I.value ? void 0 : "0"), D = (e) => {
86
86
  var o;
87
- E("update:modelValue", e), t.search = "", t.open = !1, (o = a == null ? void 0 : a.value) == null || o.focus();
87
+ E("update:modelValue", e), t.search = "", t.open = !1, (o = d == null ? void 0 : d.value) == null || o.focus();
88
88
  }, G = () => E("update:modelValue", void 0), J = () => {
89
89
  var e;
90
- return (e = k.value) == null ? void 0 : e.focus();
91
- }, I = () => t.open = !t.open, Q = () => t.open = !0, W = (e) => {
90
+ return (e = y.value) == null ? void 0 : e.focus();
91
+ }, g = () => t.open = !t.open, Q = () => t.open = !0, W = (e) => {
92
92
  var o;
93
- (o = a == null ? void 0 : a.value) != null && o.contains(e.relatedTarget) || (t.search = "", t.open = !1);
93
+ (o = d == null ? void 0 : d.value) != null && o.contains(e.relatedTarget) || (t.search = "", t.open = !1);
94
94
  }, X = () => {
95
95
  const e = L.value;
96
96
  e && pe(e.querySelector(".hovered-item"), (o) => {
97
97
  he(e, o);
98
98
  });
99
99
  }, Y = (e) => {
100
- var D, z;
100
+ var z, B;
101
101
  if (["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(e.code))
102
102
  e.preventDefault();
103
103
  else
104
104
  return;
105
- const { open: o, activeIndex: l } = t;
105
+ const { open: o, activeIndex: i } = t;
106
106
  if (!o) {
107
107
  e.code === "Enter" && (t.open = !0);
108
108
  return;
109
109
  }
110
- e.code === "Escape" && (t.open = !1, (D = a.value) == null || D.focus());
111
- const f = u(p), { length: w } = f;
112
- if (!w)
110
+ e.code === "Escape" && (t.open = !1, (z = d.value) == null || z.focus());
111
+ const v = u(f), { length: _ } = v;
112
+ if (!_)
113
113
  return;
114
- e.code === "Enter" && O((z = f.find((g) => g.index === l)) == null ? void 0 : z.value);
115
- const Z = f.findIndex((g) => g.index === l) ?? -1, ee = e.code === "ArrowDown" ? 1 : e.code === "ArrowUp" ? -1 : 0, oe = Math.abs(Z + ee + w) % w;
116
- t.activeIndex = p.value[oe].index ?? -1;
114
+ e.code === "Enter" && D((B = v.find((x) => x.index === i)) == null ? void 0 : B.value);
115
+ const Z = v.findIndex((x) => x.index === i) ?? -1, ee = e.code === "ArrowDown" ? 1 : e.code === "ArrowUp" ? -1 : 0, oe = Math.abs(Z + ee + _) % _;
116
+ t.activeIndex = f.value[oe].index ?? -1;
117
117
  };
118
- return me(a), B(() => n.modelValue, R, { immediate: !0 }), B(
118
+ return me(d), F(() => n.modelValue, R, { immediate: !0 }), F(
119
119
  () => t.open,
120
120
  (e) => {
121
121
  var o;
122
- return e ? (o = k.value) == null ? void 0 : o.focus() : "";
122
+ return e ? (o = y.value) == null ? void 0 : o.focus() : "";
123
123
  }
124
- ), le(() => {
124
+ ), re(() => {
125
125
  t.search, t.activeIndex >= 0 && t.open && X();
126
- }), (e, o) => (r(), s("div", Ce, [
127
- c("div", {
126
+ }), (e, o) => (l(), a("div", be, [
127
+ p("div", {
128
128
  ref_key: "root",
129
- ref: a,
129
+ ref: d,
130
130
  tabindex: j.value,
131
- class: b(["ui-dropdown", { open: t.open, error: e.error, disabled: y.value }]),
131
+ class: b(["ui-dropdown", { open: t.open, error: r.error, disabled: I.value }]),
132
132
  onKeydown: Y,
133
133
  onFocusout: W
134
134
  }, [
135
- c("div", Le, [
136
- c("div", Se, [
137
- se(c("input", {
135
+ p("div", Ee, [
136
+ p("div", Le, [
137
+ ie(p("input", {
138
138
  ref_key: "input",
139
- ref: k,
140
- "onUpdate:modelValue": o[0] || (o[0] = (l) => t.search = l),
139
+ ref: y,
140
+ "onUpdate:modelValue": o[0] || (o[0] = (i) => t.search = i),
141
141
  type: "text",
142
142
  tabindex: "-1",
143
- disabled: y.value,
143
+ disabled: I.value,
144
144
  placeholder: U.value,
145
145
  spellcheck: "false",
146
146
  autocomplete: "chrome-off",
147
147
  onFocus: Q
148
- }, null, 40, $e), [
149
- [ie, t.search]
148
+ }, null, 40, Se), [
149
+ [ae, t.search]
150
150
  ]),
151
- t.open ? d("", !0) : (r(), s("div", {
151
+ t.open ? c("", !0) : (l(), a("div", {
152
152
  key: 0,
153
153
  onClick: J
154
154
  }, [
155
- F(we, { class: "input-value" }, {
156
- default: M(() => [
157
- ae(v(A.value), 1)
155
+ M(ke, { class: "input-value" }, {
156
+ default: N(() => [
157
+ se(m(O.value), 1)
158
158
  ]),
159
159
  _: 1
160
160
  })
161
161
  ])),
162
- c("div", xe, [
163
- _.value ? (r(), m(u(ye), {
162
+ p("div", $e, [
163
+ k.value ? (l(), h(u(ye), {
164
164
  key: 0,
165
165
  name: "loading"
166
- })) : d("", !0),
167
- e.clearable && K.value ? (r(), m(u(ke), {
166
+ })) : c("", !0),
167
+ r.clearable && K.value ? (l(), h(u(_e), {
168
168
  key: 1,
169
169
  class: "clear",
170
170
  name: "delete-clear",
171
- onClick: h(G, ["stop"])
172
- })) : d("", !0),
173
- N(e.$slots, "append"),
174
- e.arrowIconLarge ? (r(), s("div", {
171
+ onClick: w(G, ["stop"])
172
+ })) : c("", !0),
173
+ P(e.$slots, "append"),
174
+ r.arrowIconLarge ? (l(), a("div", {
175
175
  key: 2,
176
- class: b(["arrow-icon", [`icon-24 ${e.arrowIconLarge}`]]),
177
- onClick: h(I, ["stop"])
178
- }, null, 2)) : e.arrowIcon ? (r(), s("div", {
176
+ class: b(["arrow-icon", [`icon-24 ${r.arrowIconLarge}`]]),
177
+ onClick: w(g, ["stop"])
178
+ }, null, 2)) : r.arrowIcon ? (l(), a("div", {
179
179
  key: 3,
180
- class: b(["arrow-icon", [`icon-16 ${e.arrowIcon}`]]),
181
- onClick: h(I, ["stop"])
182
- }, null, 2)) : (r(), s("div", {
180
+ class: b(["arrow-icon", [`icon-16 ${r.arrowIcon}`]]),
181
+ onClick: w(g, ["stop"])
182
+ }, null, 2)) : (l(), a("div", {
183
183
  key: 4,
184
184
  class: "arrow-icon arrow-icon-default",
185
- onClick: h(I, ["stop"])
185
+ onClick: w(g, ["stop"])
186
186
  }))
187
187
  ])
188
188
  ]),
189
- e.label ? (r(), s("label", Ae, [
190
- e.required ? (r(), m(u(Ve), {
189
+ r.label ? (l(), a("label", Ae, [
190
+ r.required ? (l(), h(u(xe), {
191
191
  key: 0,
192
- uri: u(be)
193
- }, null, 8, ["uri"])) : d("", !0),
194
- c("span", null, v(e.label), 1),
195
- u(T).tooltip ? (r(), m(u(fe), {
192
+ uri: u(Ve)
193
+ }, null, 8, ["uri"])) : c("", !0),
194
+ p("span", null, m(r.label), 1),
195
+ u(T).tooltip ? (l(), h(u(fe), {
196
196
  key: 1,
197
197
  class: "info",
198
198
  position: "top"
199
199
  }, {
200
- tooltip: M(() => [
201
- N(e.$slots, "tooltip")
200
+ tooltip: N(() => [
201
+ P(e.$slots, "tooltip")
202
202
  ]),
203
203
  _: 3
204
- })) : d("", !0)
205
- ])) : d("", !0),
206
- t.open ? (r(), s("div", {
204
+ })) : c("", !0)
205
+ ])) : c("", !0),
206
+ t.open ? (l(), a("div", {
207
207
  key: 1,
208
208
  ref_key: "list",
209
209
  ref: L,
210
210
  class: "ui-dropdown__options"
211
211
  }, [
212
- (r(!0), s(de, null, ue(p.value, (l, f) => (r(), m(_e, {
213
- key: f,
214
- option: l,
215
- "is-selected": l.isSelected,
216
- "is-hovered": l.isActive,
217
- size: e.optionSize,
218
- onClick: h((w) => O(l.value), ["stop"])
212
+ (l(!0), a(de, null, ce(f.value, (i, v) => (l(), h(we, {
213
+ key: v,
214
+ option: i,
215
+ "is-selected": i.isSelected,
216
+ "is-hovered": i.isActive,
217
+ size: r.optionSize,
218
+ onClick: w((_) => D(i.value), ["stop"])
219
219
  }, null, 8, ["option", "is-selected", "is-hovered", "size", "onClick"]))), 128)),
220
- p.value.length ? d("", !0) : (r(), s("div", Oe, "Nothing found"))
221
- ], 512)) : d("", !0),
222
- F(ve, { class: "ui-dropdown__contour" })
220
+ f.value.length ? c("", !0) : (l(), a("div", Oe, "Nothing found"))
221
+ ], 512)) : c("", !0),
222
+ M(ve, { class: "ui-dropdown__contour" })
223
223
  ])
224
- ], 42, Ee),
225
- $.value ? (r(), s("div", De, v($.value), 1)) : _.value && e.loadingOptionsHelper ? (r(), s("div", ze, v(e.loadingOptionsHelper), 1)) : e.helper ? (r(), s("div", Be, v(e.helper), 1)) : d("", !0)
224
+ ], 42, Ce),
225
+ $.value ? (l(), a("div", De, m($.value), 1)) : k.value && r.loadingOptionsHelper ? (l(), a("div", ze, m(r.loadingOptionsHelper), 1)) : r.helper ? (l(), a("div", Be, m(r.helper), 1)) : c("", !0)
226
226
  ]));
227
227
  }
228
228
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PlDropdownLegacy.vue.js","sources":["../../../src/components/PlDropdownLegacy/PlDropdownLegacy.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: 'PlDropdown',\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport './pl-dropdown-legacy.scss';\nimport { computed, reactive, ref, unref, useSlots, watch, watchPostEffect } from 'vue';\nimport { tap, tapIf } from '../../helpers/functions';\nimport { PlTooltip } from '../PlTooltip';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport type { ListOption, ListOptionNormalized } from '../../types';\nimport { scrollIntoView } from '../../helpers/dom';\nimport { deepEqual } from '../../helpers/objects';\nimport DropdownListItem from '../DropdownListItem.vue';\nimport LongText from '../LongText.vue';\nimport { PlIcon16 } from '../PlIcon16';\nimport { PlMaskIcon24 } from '../PlMaskIcon24';\nimport { normalizeListOptions } from '../../helpers/utils';\nimport { getErrorMessage } from '../../helpers/error.ts';\nimport { PlSvg } from '../PlSvg';\nimport SvgRequired from '../../assets/images/required.svg?raw';\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: 'update:modelValue', value: M | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current selected value of the dropdown.\n */\n modelValue: M;\n /**\n * The label text for the dropdown field (optional)\n */\n label?: string;\n /**\n * List of available options for the dropdown\n */\n options?: Readonly<ListOption<M>[]>;\n /**\n * A helper text displayed below the dropdown when there are no errors (optional).\n */\n helper?: string;\n /**\n * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).\n */\n loadingOptionsHelper?: string;\n /**\n * Error message displayed below the dropdown (optional)\n */\n error?: unknown;\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n /**\n * Enables a button to clear the selected value (default: false)\n */\n clearable?: boolean;\n /**\n * If `true`, the dropdown component is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * Custom icon (16px) class for the dropdown arrow (optional)\n */\n arrowIcon?: string;\n /**\n * Custom icon (24px) class for the dropdown arrow (optional)\n */\n arrowIconLarge?: string;\n /**\n * Option list item size\n */\n optionSize?: 'small' | 'medium';\n }>(),\n {\n label: '',\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: '...',\n clearable: false,\n required: false,\n disabled: false,\n arrowIcon: undefined,\n arrowIconLarge: undefined,\n optionSize: 'small',\n options: undefined,\n },\n);\n\nconst slots = useSlots();\n\nconst root = ref<HTMLElement | undefined>();\nconst list = ref<HTMLElement | undefined>();\nconst input = ref<HTMLInputElement | undefined>();\n\nconst data = reactive({\n search: '',\n activeIndex: -1,\n open: false,\n});\n\nconst findActiveIndex = () =>\n tap(\n filteredRef.value.findIndex((o) => deepEqual(o.value, props.modelValue)),\n (v) => (v < 0 ? 0 : v),\n );\n\nconst updateActive = () => (data.activeIndex = findActiveIndex());\n\nconst isLoadingOptions = computed(() => {\n return props.options === undefined;\n});\n\nconst isDisabled = computed(() => {\n if (isLoadingOptions.value) {\n return true;\n }\n\n return props.disabled;\n});\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, props.modelValue));\n});\n\nconst computedError = computed(() => {\n if (isLoadingOptions.value) {\n return undefined;\n }\n\n if (props.error) {\n return getErrorMessage(props.error);\n }\n\n if (props.modelValue !== undefined && selectedIndex.value === -1) {\n return 'The selected value is not one of the options';\n }\n\n return undefined;\n});\n\nconst optionsRef = computed(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst textValue = computed(() => {\n const options = unref(optionsRef);\n\n const item: ListOption | undefined = options.find((o) => deepEqual(o.value, props.modelValue));\n\n return item?.label || props.modelValue; // @todo show inner value?\n});\n\nconst computedPlaceholder = computed(() => {\n if (!data.open && props.modelValue) {\n return '';\n }\n\n return props.modelValue ? String(textValue.value) : props.placeholder;\n});\n\nconst hasValue = computed(() => {\n return props.modelValue !== undefined && props.modelValue !== null;\n});\n\nconst filteredRef = computed(() => {\n const options = optionsRef.value;\n\n if (data.search) {\n return options.filter((o: ListOptionNormalized) => {\n const search = data.search.toLowerCase();\n\n if (o.label.toLowerCase().includes(search)) {\n return true;\n }\n\n if (o.description && o.description.toLowerCase().includes(search)) {\n return true;\n }\n\n if (typeof o.value === 'string') {\n return o.value.toLowerCase().includes(search);\n }\n\n return o.value === data.search;\n });\n }\n\n return options;\n});\n\nconst tabindex = computed(() => (isDisabled.value ? undefined : '0'));\n\nconst selectOption = (v: M | undefined) => {\n emit('update:modelValue', v);\n data.search = '';\n data.open = false;\n root?.value?.focus();\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nconst setFocusOnInput = () => input.value?.focus();\n\nconst toggleOpen = () => (data.open = !data.open);\n\nconst onInputFocus = () => (data.open = true);\n\nconst onFocusOut = (event: FocusEvent) => {\n if (!root?.value?.contains(event.relatedTarget as Node | null)) {\n data.search = '';\n data.open = false;\n }\n};\n\nconst scrollIntoActive = () => {\n const $list = list.value;\n\n if (!$list) {\n return;\n }\n\n tapIf($list.querySelector('.hovered-item') as HTMLElement, (opt) => {\n scrollIntoView($list, opt);\n });\n};\n\nconst handleKeydown = (e: { code: string; preventDefault(): void }) => {\n if (!['ArrowDown', 'ArrowUp', 'Enter', 'Escape'].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n const { open, activeIndex } = data;\n\n if (!open) {\n if (e.code === 'Enter') {\n data.open = true;\n }\n return;\n }\n\n if (e.code === 'Escape') {\n data.open = false;\n root.value?.focus();\n }\n\n const filtered = unref(filteredRef);\n\n const { length } = filtered;\n\n if (!length) {\n return;\n }\n\n if (e.code === 'Enter') {\n selectOption(filtered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = filtered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === 'ArrowDown' ? 1 : e.code === 'ArrowUp' ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = filteredRef.value[newIndex].index ?? -1;\n};\n\nuseLabelNotch(root);\n\nwatch(() => props.modelValue, updateActive, { immediate: true });\n\nwatch(\n () => data.open,\n (open) => (open ? input.value?.focus() : ''),\n);\n\nwatchPostEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n data.search; // to watch\n\n if (data.activeIndex >= 0 && data.open) {\n scrollIntoActive();\n }\n});\n</script>\n\n<template>\n <div class=\"ui-dropdown__envelope\">\n <div\n ref=\"root\"\n :tabindex=\"tabindex\"\n class=\"ui-dropdown\"\n :class=\"{ open: data.open, error, disabled: isDisabled }\"\n @keydown=\"handleKeydown\"\n @focusout=\"onFocusOut\"\n >\n <div class=\"ui-dropdown__container\">\n <div class=\"ui-dropdown__field\">\n <input\n ref=\"input\"\n v-model=\"data.search\"\n type=\"text\"\n tabindex=\"-1\"\n :disabled=\"isDisabled\"\n :placeholder=\"computedPlaceholder\"\n spellcheck=\"false\"\n autocomplete=\"chrome-off\"\n @focus=\"onInputFocus\"\n />\n\n <div v-if=\"!data.open\" @click=\"setFocusOnInput\">\n <LongText class=\"input-value\"> {{ textValue }} </LongText>\n </div>\n\n <div class=\"ui-dropdown__controls\">\n <PlMaskIcon24 v-if=\"isLoadingOptions\" name=\"loading\" />\n <PlIcon16 v-if=\"clearable && hasValue\" class=\"clear\" name=\"delete-clear\" @click.stop=\"clear\" />\n <slot name=\"append\" />\n <div v-if=\"arrowIconLarge\" class=\"arrow-icon\" :class=\"[`icon-24 ${arrowIconLarge}`]\" @click.stop=\"toggleOpen\" />\n <div v-else-if=\"arrowIcon\" class=\"arrow-icon\" :class=\"[`icon-16 ${arrowIcon}`]\" @click.stop=\"toggleOpen\" />\n <div v-else class=\"arrow-icon arrow-icon-default\" @click.stop=\"toggleOpen\" />\n </div>\n </div>\n <label v-if=\"label\">\n <PlSvg v-if=\"required\" :uri=\"SvgRequired\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <div v-if=\"data.open\" ref=\"list\" class=\"ui-dropdown__options\">\n <DropdownListItem\n v-for=\"(item, index) in filteredRef\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"optionSize\"\n @click.stop=\"selectOption(item.value)\"\n />\n <div v-if=\"!filteredRef.length\" class=\"nothing-found\">Nothing found</div>\n </div>\n <DoubleContour class=\"ui-dropdown__contour\" />\n </div>\n </div>\n <div v-if=\"computedError\" class=\"ui-dropdown__error\">{{ computedError }}</div>\n <div v-else-if=\"isLoadingOptions && loadingOptionsHelper\" class=\"ui-dropdown__helper\">{{ loadingOptionsHelper }}</div>\n <div v-else-if=\"helper\" class=\"ui-dropdown__helper\">{{ helper }}</div>\n </div>\n</template>\n"],"names":["__default__","emit","__emit","props","__props","slots","useSlots","root","ref","list","input","data","reactive","findActiveIndex","tap","filteredRef","o","deepEqual","v","updateActive","isLoadingOptions","computed","isDisabled","selectedIndex","computedError","getErrorMessage","optionsRef","normalizeListOptions","opt","index","textValue","item","unref","computedPlaceholder","hasValue","options","search","tabindex","selectOption","_a","clear","setFocusOnInput","toggleOpen","onInputFocus","onFocusOut","event","scrollIntoActive","$list","tapIf","scrollIntoView","handleKeydown","open","activeIndex","filtered","length","_b","it","localIndex","delta","newIndex","useLabelNotch","watch","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AA,MACX,CAACwC,MAAA;;AAAU,eAAAA,KAAOZ,IAAA7B,EAAM,UAAN,gBAAA6B,EAAa,UAAU;AAAA;AAAA,IAAA,GAG3CuB,GAAgB,MAAM;AAEpB,MAAAnD,EAAK,QAEDA,EAAK,eAAe,KAAKA,EAAK,QAChCmC,EAAA;AAAA,IAEJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlDropdownLegacy.vue.js","sources":["../../../src/components/PlDropdownLegacy/PlDropdownLegacy.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * A component for selecting one value from a list of options\n */\nexport default {\n name: 'PlDropdown',\n};\n</script>\n\n<script lang=\"ts\" setup generic=\"M = unknown\">\nimport './pl-dropdown-legacy.scss';\nimport { computed, reactive, ref, unref, useSlots, watch, watchPostEffect } from 'vue';\nimport { tap, tapIf } from '../../helpers/functions';\nimport { PlTooltip } from '../PlTooltip';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport type { ListOption, ListOptionNormalized } from '../../types';\nimport { scrollIntoView } from '../../helpers/dom';\nimport { deepEqual } from '../../helpers/objects';\nimport DropdownListItem from '../DropdownListItem.vue';\nimport LongText from '../LongText.vue';\nimport { PlIcon16 } from '../PlIcon16';\nimport { PlMaskIcon24 } from '../PlMaskIcon24';\nimport { normalizeListOptions } from '../../helpers/utils';\nimport { getErrorMessage } from '../../helpers/error.ts';\nimport { PlSvg } from '../PlSvg';\nimport SvgRequired from '../../assets/images/required.svg?raw';\n\nconst emit = defineEmits<{\n /**\n * Emitted when the model value is updated.\n */\n (e: 'update:modelValue', value: M | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current selected value of the dropdown.\n */\n modelValue: M;\n /**\n * The label text for the dropdown field (optional)\n */\n label?: string;\n /**\n * List of available options for the dropdown\n */\n options?: Readonly<ListOption<M>[]>;\n /**\n * A helper text displayed below the dropdown when there are no errors (optional).\n */\n helper?: string;\n /**\n * A helper text displayed below the dropdown when there are no options yet or options is undefined (optional).\n */\n loadingOptionsHelper?: string;\n /**\n * Error message displayed below the dropdown (optional)\n */\n error?: unknown;\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n /**\n * Enables a button to clear the selected value (default: false)\n */\n clearable?: boolean;\n /**\n * If `true`, the dropdown component is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the dropdown component is disabled and cannot be interacted with.\n */\n disabled?: boolean;\n /**\n * Custom icon (16px) class for the dropdown arrow (optional)\n */\n arrowIcon?: string;\n /**\n * Custom icon (24px) class for the dropdown arrow (optional)\n */\n arrowIconLarge?: string;\n /**\n * Option list item size\n */\n optionSize?: 'small' | 'medium';\n }>(),\n {\n label: '',\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: '...',\n clearable: false,\n required: false,\n disabled: false,\n arrowIcon: undefined,\n arrowIconLarge: undefined,\n optionSize: 'small',\n options: undefined,\n },\n);\n\nconst slots = useSlots();\n\nconst root = ref<HTMLElement | undefined>();\nconst list = ref<HTMLElement | undefined>();\nconst input = ref<HTMLInputElement | undefined>();\n\nconst data = reactive({\n search: '',\n activeIndex: -1,\n open: false,\n});\n\nconst findActiveIndex = () =>\n tap(\n filteredRef.value.findIndex((o) => deepEqual(o.value, props.modelValue)),\n (v) => (v < 0 ? 0 : v),\n );\n\nconst updateActive = () => (data.activeIndex = findActiveIndex());\n\nconst isLoadingOptions = computed(() => {\n return props.options === undefined;\n});\n\nconst isDisabled = computed(() => {\n if (isLoadingOptions.value) {\n return true;\n }\n\n return props.disabled;\n});\n\nconst selectedIndex = computed(() => {\n return (props.options ?? []).findIndex((o) => deepEqual(o.value, props.modelValue));\n});\n\nconst computedError = computed(() => {\n if (isLoadingOptions.value) {\n return undefined;\n }\n\n if (props.error) {\n return getErrorMessage(props.error);\n }\n\n if (props.modelValue !== undefined && selectedIndex.value === -1) {\n return 'The selected value is not one of the options';\n }\n\n return undefined;\n});\n\nconst optionsRef = computed(() =>\n normalizeListOptions(props.options ?? []).map((opt, index) => ({\n ...opt,\n index,\n isSelected: index === selectedIndex.value,\n isActive: index === data.activeIndex,\n })),\n);\n\nconst textValue = computed(() => {\n const options = unref(optionsRef);\n\n const item: ListOption | undefined = options.find((o) => deepEqual(o.value, props.modelValue));\n\n return item?.label || props.modelValue; // @todo show inner value?\n});\n\nconst computedPlaceholder = computed(() => {\n if (!data.open && props.modelValue) {\n return '';\n }\n\n return props.modelValue ? String(textValue.value) : props.placeholder;\n});\n\nconst hasValue = computed(() => {\n return props.modelValue !== undefined && props.modelValue !== null;\n});\n\nconst filteredRef = computed(() => {\n const options = optionsRef.value;\n\n if (data.search) {\n return options.filter((o: ListOptionNormalized) => {\n const search = data.search.toLowerCase();\n\n if (o.label.toLowerCase().includes(search)) {\n return true;\n }\n\n if (o.description && o.description.toLowerCase().includes(search)) {\n return true;\n }\n\n if (typeof o.value === 'string') {\n return o.value.toLowerCase().includes(search);\n }\n\n return o.value === data.search;\n });\n }\n\n return options;\n});\n\nconst tabindex = computed(() => (isDisabled.value ? undefined : '0'));\n\nconst selectOption = (v: M | undefined) => {\n emit('update:modelValue', v);\n data.search = '';\n data.open = false;\n root?.value?.focus();\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nconst setFocusOnInput = () => input.value?.focus();\n\nconst toggleOpen = () => (data.open = !data.open);\n\nconst onInputFocus = () => (data.open = true);\n\nconst onFocusOut = (event: FocusEvent) => {\n if (!root?.value?.contains(event.relatedTarget as Node | null)) {\n data.search = '';\n data.open = false;\n }\n};\n\nconst scrollIntoActive = () => {\n const $list = list.value;\n\n if (!$list) {\n return;\n }\n\n tapIf($list.querySelector('.hovered-item') as HTMLElement, (opt) => {\n scrollIntoView($list, opt);\n });\n};\n\nconst handleKeydown = (e: { code: string; preventDefault(): void }) => {\n if (!['ArrowDown', 'ArrowUp', 'Enter', 'Escape'].includes(e.code)) {\n return;\n } else {\n e.preventDefault();\n }\n\n const { open, activeIndex } = data;\n\n if (!open) {\n if (e.code === 'Enter') {\n data.open = true;\n }\n return;\n }\n\n if (e.code === 'Escape') {\n data.open = false;\n root.value?.focus();\n }\n\n const filtered = unref(filteredRef);\n\n const { length } = filtered;\n\n if (!length) {\n return;\n }\n\n if (e.code === 'Enter') {\n selectOption(filtered.find((it) => it.index === activeIndex)?.value);\n }\n\n const localIndex = filtered.findIndex((it) => it.index === activeIndex) ?? -1;\n\n const delta = e.code === 'ArrowDown' ? 1 : e.code === 'ArrowUp' ? -1 : 0;\n\n const newIndex = Math.abs(localIndex + delta + length) % length;\n\n data.activeIndex = filteredRef.value[newIndex].index ?? -1;\n};\n\nuseLabelNotch(root);\n\nwatch(() => props.modelValue, updateActive, { immediate: true });\n\nwatch(\n () => data.open,\n (open) => (open ? input.value?.focus() : ''),\n);\n\nwatchPostEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n data.search; // to watch\n\n if (data.activeIndex >= 0 && data.open) {\n scrollIntoActive();\n }\n});\n</script>\n\n<template>\n <div class=\"ui-dropdown__envelope\">\n <div\n ref=\"root\"\n :tabindex=\"tabindex\"\n class=\"ui-dropdown\"\n :class=\"{ open: data.open, error, disabled: isDisabled }\"\n @keydown=\"handleKeydown\"\n @focusout=\"onFocusOut\"\n >\n <div class=\"ui-dropdown__container\">\n <div class=\"ui-dropdown__field\">\n <input\n ref=\"input\"\n v-model=\"data.search\"\n type=\"text\"\n tabindex=\"-1\"\n :disabled=\"isDisabled\"\n :placeholder=\"computedPlaceholder\"\n spellcheck=\"false\"\n autocomplete=\"chrome-off\"\n @focus=\"onInputFocus\"\n />\n\n <div v-if=\"!data.open\" @click=\"setFocusOnInput\">\n <LongText class=\"input-value\"> {{ textValue }} </LongText>\n </div>\n\n <div class=\"ui-dropdown__controls\">\n <PlMaskIcon24 v-if=\"isLoadingOptions\" name=\"loading\" />\n <PlIcon16 v-if=\"clearable && hasValue\" class=\"clear\" name=\"delete-clear\" @click.stop=\"clear\" />\n <slot name=\"append\" />\n <div v-if=\"arrowIconLarge\" class=\"arrow-icon\" :class=\"[`icon-24 ${arrowIconLarge}`]\" @click.stop=\"toggleOpen\" />\n <div v-else-if=\"arrowIcon\" class=\"arrow-icon\" :class=\"[`icon-16 ${arrowIcon}`]\" @click.stop=\"toggleOpen\" />\n <div v-else class=\"arrow-icon arrow-icon-default\" @click.stop=\"toggleOpen\" />\n </div>\n </div>\n <label v-if=\"label\">\n <PlSvg v-if=\"required\" :uri=\"SvgRequired\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlTooltip>\n </label>\n <div v-if=\"data.open\" ref=\"list\" class=\"ui-dropdown__options\">\n <DropdownListItem\n v-for=\"(item, index) in filteredRef\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"optionSize\"\n @click.stop=\"selectOption(item.value)\"\n />\n <div v-if=\"!filteredRef.length\" class=\"nothing-found\">Nothing found</div>\n </div>\n <DoubleContour class=\"ui-dropdown__contour\" />\n </div>\n </div>\n <div v-if=\"computedError\" class=\"ui-dropdown__error\">{{ computedError }}</div>\n <div v-else-if=\"isLoadingOptions && loadingOptionsHelper\" class=\"ui-dropdown__helper\">{{ loadingOptionsHelper }}</div>\n <div v-else-if=\"helper\" class=\"ui-dropdown__helper\">{{ helper }}</div>\n </div>\n</template>\n"],"names":["__default__","emit","__emit","props","__props","slots","useSlots","root","ref","list","input","data","reactive","findActiveIndex","tap","filteredRef","o","deepEqual","v","updateActive","isLoadingOptions","computed","isDisabled","selectedIndex","computedError","getErrorMessage","optionsRef","normalizeListOptions","opt","index","textValue","item","unref","computedPlaceholder","hasValue","options","search","tabindex","selectOption","_a","clear","setFocusOnInput","toggleOpen","onInputFocus","onFocusOut","event","scrollIntoActive","$list","tapIf","scrollIntoView","handleKeydown","open","activeIndex","filtered","length","_b","it","localIndex","delta","newIndex","useLabelNotch","watch","watchPostEffect","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_normalizeClass","_hoisted_3","_hoisted_4","_cache","$event","_vModelText","_createVNode","LongText","_hoisted_6","_createBlock","_unref","PlMaskIcon24","PlIcon16","_renderSlot","_ctx","_hoisted_7","PlSvg","SvgRequired","PlTooltip","_Fragment","_renderList","DropdownListItem","_withModifiers","_hoisted_8","DoubleContour","_hoisted_9","_toDisplayString","_hoisted_10","_hoisted_11"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIAA,KAAe;AAAA,EACb,MAAM;AACR;;;;;;;;;;;;;;;;;;;AAsBA,UAAMC,IAAOC,GAOPC,IAAQC,GAuERC,IAAQC,GAAA,GAERC,IAAOC,EAAA,GACPC,IAAOD,EAAA,GACPE,IAAQF,EAAA,GAERG,IAAOC,GAAS;AAAA,MACpB,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,MAAM;AAAA,IAAA,CACP,GAEKC,IAAkB,MACtBC;AAAA,MACEC,EAAY,MAAM,UAAU,CAACC,MAAMC,EAAUD,EAAE,OAAOb,EAAM,UAAU,CAAC;AAAA,MACvE,CAACe,MAAOA,IAAI,IAAI,IAAIA;AAAA,IAAA,GAGlBC,IAAe,MAAOR,EAAK,cAAcE,EAAA,GAEzCO,IAAmBC,EAAS,MACzBlB,EAAM,YAAY,MAC1B,GAEKmB,IAAaD,EAAS,MACtBD,EAAiB,QACZ,KAGFjB,EAAM,QACd,GAEKoB,IAAgBF,EAAS,OACrBlB,EAAM,WAAW,CAAA,GAAI,UAAU,CAACa,MAAMC,EAAUD,EAAE,OAAOb,EAAM,UAAU,CAAC,CACnF,GAEKqB,IAAgBH,EAAS,MAAM;AACnC,UAAI,CAAAD,EAAiB,OAIrB;AAAA,YAAIjB,EAAM;AACR,iBAAOsB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,gBAAf9D,EAAA,KAAK,GAAA,CAAA;AAAA,YACGyE,EAAAxE,CAAA,EAAM,gBAAvBuE,EAIYC,EAAAQ,EAAA,GAAA;AAAA;cAJoB,OAAM;AAAA,cAAO,UAAS;AAAA,YAAA;cACzC,WACT,MAAuB;AAAA,gBAAvBL,EAAuBC,EAAA,QAAA,SAAA;AAAA,cAAA;;;;UAIlBtE,EAAK,aAAhBqD,EAWM,OAAA;AAAA;qBAXoB;AAAA,YAAJ,KAAIvD;AAAA,YAAO,OAAM;AAAA,UAAA;aACrCsD,EAAA,EAAA,GAAAC,EAQEsB,IAAA,MAAAC,GAPwBxE,EAAA,OAAW,CAA3BgB,GAAMF,YADhB+C,EAQEY,IAAA;AAAA,cANC,KAAK3D;AAAA,cACL,QAAQE;AAAA,cACR,eAAaA,EAAK;AAAA,cAClB,cAAYA,EAAK;AAAA,cACjB,MAAM3B,EAAA;AAAA,cACN,SAAKqF,EAAA,CAAAlB,MAAOjC,EAAaP,EAAK,KAAK,GAAA,CAAA,MAAA,CAAA;AAAA,YAAA;YAE1BhB,EAAA,MAAY,2BAAxBiD,EAAyE,OAAzE0B,IAAsD,eAAa;AAAA;UAErEjB,EAA8CkB,IAAA,EAA/B,OAAM,wBAAsB;AAAA,QAAA;;MAGpCnE,EAAA,cAAXwC,EAA8E,OAA9E4B,IAA8EC,EAAtBrE,EAAA,KAAa,GAAA,CAAA,KACrDJ,EAAA,SAAoBhB,EAAA,6BAApC4D,EAAsH,OAAtH8B,IAAsHD,EAA7BzF,EAAA,oBAAoB,GAAA,CAAA,KAC7FA,EAAA,eAAhB4D,EAAsE,OAAtE+B,IAAsEF,EAAfzF,EAAA,MAAM,GAAA,CAAA;;;;"}
@@ -39,8 +39,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
39
39
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
40
40
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
41
41
  }>, {
42
- mode: "list" | "tabs";
43
42
  placeholder: string;
43
+ mode: "list" | "tabs";
44
44
  clearable: boolean;
45
45
  prefix: string;
46
46
  tabsContainerStyles: string | false | import('vue').CSSProperties | StyleValue[] | null;
@@ -193,9 +193,9 @@ const ce = { class: "pl-line-dropdown__prefix" }, fe = { class: "pl-line-dropdow
193
193
  onClick: f((V) => v(o), ["stop"])
194
194
  }, null, 8, ["option", "is-selected", "is-hovered", "onClick"])
195
195
  ])), 128)),
196
- b(a).length === 0 ? (r(), d("div", ve, t[3] || (t[3] = [
196
+ b(a).length === 0 ? (r(), d("div", ve, [...t[3] || (t[3] = [
197
197
  c("div", { class: "pl-line-dropdown__no-item-title text-s" }, "Didn't find anything that matched", -1)
198
- ]))) : k("", !0)
198
+ ])])) : k("", !0)
199
199
  ], 36)) : i.mode === "tabs" ? (r(), d("div", {
200
200
  key: 1,
201
201
  ref_key: "list",
@@ -221,9 +221,9 @@ const ce = { class: "pl-line-dropdown__prefix" }, fe = { class: "pl-line-dropdow
221
221
  onClick: f((V) => v(o), ["stop"])
222
222
  }, null, 8, ["option", "is-selected", "is-hovered", "onClick"])
223
223
  ])), 128)),
224
- b(a).length === 0 ? (r(), d("div", he, t[4] || (t[4] = [
224
+ b(a).length === 0 ? (r(), d("div", he, [...t[4] || (t[4] = [
225
225
  c("div", { class: "pl-line-dropdown__no-item-title text-s" }, "Didn't find anything that matched", -1)
226
- ]))) : k("", !0)
226
+ ])])) : k("", !0)
227
227
  ], 36)) : k("", !0)
228
228
  ])) : k("", !0)
229
229
  ], 34));