origam 2.38.1 → 2.38.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/src/assets/locales/en.json +1 -1
  3. package/dist/src/assets/locales/fr.json +2 -2
  4. package/dist/src/components/Alert/OrigamAlert.vue +739 -165
  5. package/dist/src/components/App/OrigamApp.vue +95 -19
  6. package/dist/src/components/App/OrigamAppBar.vue +751 -158
  7. package/dist/src/components/Audio/OrigamAudio.vue +1288 -346
  8. package/dist/src/components/Audio/OrigamAudioWaveform.vue +63 -7
  9. package/dist/src/components/Avatar/OrigamAvatar.vue +678 -126
  10. package/dist/src/components/Avatar/OrigamAvatarGroup.vue +700 -153
  11. package/dist/src/components/Badge/OrigamBadge.vue +548 -135
  12. package/dist/src/components/Blockquote/OrigamBlockquote.vue +698 -140
  13. package/dist/src/components/BottomNav/OrigamBottomNav.vue +864 -156
  14. package/dist/src/components/Bracket/OrigamBracket.vue +1013 -380
  15. package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +674 -154
  16. package/dist/src/components/Bracket/OrigamBracketMatch.vue +663 -163
  17. package/dist/src/components/Bracket/OrigamBracketRound.vue +116 -34
  18. package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +654 -119
  19. package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +292 -54
  20. package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +657 -126
  21. package/dist/src/components/Btn/OrigamBtn.vue +928 -249
  22. package/dist/src/components/Btn/OrigamBtnGroup.vue +658 -141
  23. package/dist/src/components/Btn/OrigamBtnToggle.vue +578 -91
  24. package/dist/src/components/Calendar/OrigamCalendar.vue +1142 -484
  25. package/dist/src/components/Card/OrigamCard.vue +938 -194
  26. package/dist/src/components/Card/OrigamCardHeader.vue +593 -104
  27. package/dist/src/components/Card/OrigamCardText.vue +536 -84
  28. package/dist/src/components/Carousel/OrigamCarousel.vue +778 -202
  29. package/dist/src/components/Carousel/OrigamCarouselItem.vue +660 -109
  30. package/dist/src/components/Chart/OrigamChart.vue +942 -452
  31. package/dist/src/components/Chart/OrigamChartAxis.vue +111 -19
  32. package/dist/src/components/Chart/OrigamChartBoxPlot.vue +713 -297
  33. package/dist/src/components/Chart/OrigamChartBullet.vue +701 -286
  34. package/dist/src/components/Chart/OrigamChartCandlestick.vue +663 -243
  35. package/dist/src/components/Chart/OrigamChartCartesian.vue +1055 -487
  36. package/dist/src/components/Chart/OrigamChartGauge.vue +563 -164
  37. package/dist/src/components/Chart/OrigamChartHeatmap.vue +677 -251
  38. package/dist/src/components/Chart/OrigamChartHoneycomb.vue +700 -288
  39. package/dist/src/components/Chart/OrigamChartLegend.vue +108 -16
  40. package/dist/src/components/Chart/OrigamChartMap.vue +723 -299
  41. package/dist/src/components/Chart/OrigamChartPareto.vue +721 -276
  42. package/dist/src/components/Chart/OrigamChartPictorial.vue +777 -355
  43. package/dist/src/components/Chart/OrigamChartPolar.vue +603 -210
  44. package/dist/src/components/Chart/OrigamChartPolarBar.vue +674 -271
  45. package/dist/src/components/Chart/OrigamChartPyramid.vue +685 -250
  46. package/dist/src/components/Chart/OrigamChartRadar.vue +515 -165
  47. package/dist/src/components/Chart/OrigamChartRangeSelector.vue +50 -25
  48. package/dist/src/components/Chart/OrigamChartSankey.vue +913 -467
  49. package/dist/src/components/Chart/OrigamChartSparkline.vue +711 -268
  50. package/dist/src/components/Chart/OrigamChartStreamgraph.vue +810 -368
  51. package/dist/src/components/Chart/OrigamChartSunburst.vue +779 -368
  52. package/dist/src/components/Chart/OrigamChartTooltip.vue +78 -19
  53. package/dist/src/components/Chart/OrigamChartTreemap.vue +750 -288
  54. package/dist/src/components/Chart/OrigamChartVariwide.vue +679 -251
  55. package/dist/src/components/Chart/OrigamChartWordCloud.vue +674 -265
  56. package/dist/src/components/Checkbox/OrigamCheckbox.vue +781 -136
  57. package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +465 -81
  58. package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +824 -137
  59. package/dist/src/components/Chip/OrigamChip.vue +867 -202
  60. package/dist/src/components/Chip/OrigamChipGroup.vue +633 -121
  61. package/dist/src/components/ClientOnly/OrigamClientOnly.vue +30 -4
  62. package/dist/src/components/Clipboard/OrigamClipboard.vue +624 -105
  63. package/dist/src/components/Code/OrigamCode.vue +844 -206
  64. package/dist/src/components/CodeGroup/OrigamCodeGroup.vue +494 -83
  65. package/dist/src/components/ColorPicker/OrigamColorPicker.vue +777 -159
  66. package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +295 -181
  67. package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +108 -45
  68. package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +131 -46
  69. package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +128 -39
  70. package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +1123 -258
  71. package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +415 -162
  72. package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +389 -145
  73. package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +852 -147
  74. package/dist/src/components/Counter/OrigamCounter.vue +588 -96
  75. package/dist/src/components/DataList/OrigamDataList.vue +619 -113
  76. package/dist/src/components/DataList/OrigamDataText.vue +295 -65
  77. package/dist/src/components/DataList/OrigamDataTitle.vue +295 -65
  78. package/dist/src/components/DataTable/OrigamDataTable.vue +934 -222
  79. package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +196 -51
  80. package/dist/src/components/DataTable/OrigamDataTableFooter.vue +319 -78
  81. package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +124 -44
  82. package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +181 -70
  83. package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +155 -46
  84. package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +145 -27
  85. package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +126 -43
  86. package/dist/src/components/DataTable/OrigamDataTableRow.vue +151 -73
  87. package/dist/src/components/DataTable/OrigamDataTableRows.vue +261 -106
  88. package/dist/src/components/DatePicker/OrigamDatePicker.vue +1048 -261
  89. package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +155 -51
  90. package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +147 -46
  91. package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +312 -134
  92. package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +151 -61
  93. package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +154 -67
  94. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1147 -306
  95. package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +74 -14
  96. package/dist/src/components/Dialog/OrigamDialog.vue +953 -196
  97. package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +886 -148
  98. package/dist/src/components/Divider/OrigamDivider.vue +210 -50
  99. package/dist/src/components/Drawer/OrigamDrawer.vue +909 -207
  100. package/dist/src/components/EmptyState/OrigamEmptyState.vue +146 -35
  101. package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +746 -159
  102. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +591 -95
  103. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +663 -143
  104. package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +675 -134
  105. package/dist/src/components/Field/OrigamField.vue +1118 -306
  106. package/dist/src/components/FileField/OrigamFileField.vue +1188 -311
  107. package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +155 -36
  108. package/dist/src/components/FileField/OrigamFileFieldListItem.vue +155 -36
  109. package/dist/src/components/Form/OrigamForm.vue +197 -74
  110. package/dist/src/components/Grid/OrigamGrid.vue +707 -147
  111. package/dist/src/components/Grid/OrigamGridItem.vue +110 -37
  112. package/dist/src/components/Grids/OrigamCol.vue +593 -110
  113. package/dist/src/components/Grids/OrigamContainer.vue +461 -80
  114. package/dist/src/components/Grids/OrigamRow.vue +573 -112
  115. package/dist/src/components/Grids/OrigamSpacer.vue +54 -17
  116. package/dist/src/components/Icon/OrigamClassIcon.vue +573 -98
  117. package/dist/src/components/Icon/OrigamComponentIcon.vue +561 -101
  118. package/dist/src/components/Icon/OrigamIcon.vue +561 -98
  119. package/dist/src/components/Icon/OrigamLigatureIcon.vue +558 -98
  120. package/dist/src/components/Icon/OrigamSvgIcon.vue +593 -100
  121. package/dist/src/components/Img/OrigamImg.vue +869 -228
  122. package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +319 -111
  123. package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +80 -17
  124. package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +476 -140
  125. package/dist/src/components/Input/OrigamInput.vue +747 -180
  126. package/dist/src/components/ItemGroup/OrigamItemGroup.vue +112 -36
  127. package/dist/src/components/ItemGroup/OrigamItemGroupItem.vue +80 -29
  128. package/dist/src/components/Kbd/OrigamKbd.vue +450 -75
  129. package/dist/src/components/Label/OrigamLabel.vue +584 -95
  130. package/dist/src/components/Layout/OrigamLayout.vue +563 -94
  131. package/dist/src/components/Lazy/OrigamLazy.vue +131 -34
  132. package/dist/src/components/List/OrigamList.vue +755 -170
  133. package/dist/src/components/List/OrigamListChildren.vue +59 -19
  134. package/dist/src/components/List/OrigamListGroup.vue +631 -134
  135. package/dist/src/components/List/OrigamListGroupActivator.vue +45 -17
  136. package/dist/src/components/List/OrigamListItem.vue +890 -224
  137. package/dist/src/components/List/OrigamListItemWrapper.vue +20 -10
  138. package/dist/src/components/List/OrigamListSubheader.vue +542 -93
  139. package/dist/src/components/Loader/OrigamLoader.vue +110 -25
  140. package/dist/src/components/Main/OrigamMain.vue +565 -96
  141. package/dist/src/components/Masonry/OrigamMasonry.vue +799 -187
  142. package/dist/src/components/Media/OrigamMediaController.vue +465 -182
  143. package/dist/src/components/Media/OrigamMediaScrubber.vue +389 -152
  144. package/dist/src/components/Media/OrigamMediaVolumeControl.vue +174 -44
  145. package/dist/src/components/Menu/OrigamMenu.vue +1079 -255
  146. package/dist/src/components/Messages/OrigamMessages.vue +606 -97
  147. package/dist/src/components/NumberField/OrigamNumberField.vue +1208 -333
  148. package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +177 -57
  149. package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1016 -272
  150. package/dist/src/components/Overlay/OrigamOverlay.vue +446 -158
  151. package/dist/src/components/Overlay/OrigamOverlayScrim.vue +122 -30
  152. package/dist/src/components/Pagination/OrigamPagination.vue +982 -313
  153. package/dist/src/components/Parallax/OrigamParallax.vue +800 -259
  154. package/dist/src/components/Parallax/OrigamParallaxElement.vue +694 -178
  155. package/dist/src/components/Parallax/OrigamParallaxLayer.vue +132 -47
  156. package/dist/src/components/PasswordField/OrigamPasswordField.vue +1098 -265
  157. package/dist/src/components/Picker/OrigamPicker.vue +655 -108
  158. package/dist/src/components/Picker/OrigamPickerTitle.vue +108 -26
  159. package/dist/src/components/Progress/OrigamProgress.vue +436 -70
  160. package/dist/src/components/Progress/OrigamProgressCircular.vue +399 -82
  161. package/dist/src/components/Progress/OrigamProgressLinear.vue +468 -115
  162. package/dist/src/components/QrCode/OrigamQrCode.vue +642 -126
  163. package/dist/src/components/Radio/OrigamRadio.vue +772 -132
  164. package/dist/src/components/Radio/OrigamRadioBtn.vue +446 -71
  165. package/dist/src/components/Radio/OrigamRadioGroup.vue +808 -135
  166. package/dist/src/components/RatingField/OrigamRatingField.vue +963 -194
  167. package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +657 -106
  168. package/dist/src/components/Responsive/OrigamResponsive.vue +548 -91
  169. package/dist/src/components/Select/OrigamSelect.vue +1639 -567
  170. package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +564 -151
  171. package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +178 -62
  172. package/dist/src/components/Sheet/OrigamSheet.vue +773 -199
  173. package/dist/src/components/Skeleton/OrigamSkeleton.vue +249 -46
  174. package/dist/src/components/Skeleton/OrigamSkeletonGroup.vue +66 -11
  175. package/dist/src/components/Slide/OrigamSlideGroup.vue +772 -257
  176. package/dist/src/components/SliderField/OrigamSliderField.vue +1157 -335
  177. package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +236 -112
  178. package/dist/src/components/Snackbar/OrigamSnackbar.vue +871 -214
  179. package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +218 -51
  180. package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +175 -43
  181. package/dist/src/components/Stepper/OrigamStepper.vue +618 -126
  182. package/dist/src/components/Stepper/OrigamStepperItem.vue +98 -37
  183. package/dist/src/components/Switch/OrigamSwitch.vue +879 -156
  184. package/dist/src/components/Switch/OrigamSwitchTrack.vue +431 -78
  185. package/dist/src/components/SystemBar/OrigamSystemBar.vue +517 -87
  186. package/dist/src/components/Table/OrigamTable.vue +585 -124
  187. package/dist/src/components/Tabs/OrigamTab.vue +239 -73
  188. package/dist/src/components/Tabs/OrigamTabPanel.vue +125 -39
  189. package/dist/src/components/Tabs/OrigamTabPanels.vue +148 -57
  190. package/dist/src/components/Tabs/OrigamTabs.vue +381 -109
  191. package/dist/src/components/TextField/OrigamTextField.vue +1077 -258
  192. package/dist/src/components/TextMask/OrigamTextMask.vue +150 -43
  193. package/dist/src/components/TextareaField/OrigamTextareaField.vue +1162 -310
  194. package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +77 -79
  195. package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +44 -9
  196. package/dist/src/components/Timeline/OrigamTimeline.vue +113 -43
  197. package/dist/src/components/Timeline/OrigamTimelineItem.vue +163 -76
  198. package/dist/src/components/Title/OrigamTitle.vue +505 -82
  199. package/dist/src/components/Toolbar/OrigamToolbar.vue +679 -142
  200. package/dist/src/components/Tooltip/OrigamTooltip.vue +288 -72
  201. package/dist/src/components/Transition/OrigamExpandX.vue +219 -106
  202. package/dist/src/components/Transition/OrigamExpandY.vue +219 -106
  203. package/dist/src/components/Transition/OrigamFade.vue +47 -9
  204. package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +52 -10
  205. package/dist/src/components/Transition/OrigamScaleRotate.vue +52 -10
  206. package/dist/src/components/Transition/OrigamSlideX.vue +52 -10
  207. package/dist/src/components/Transition/OrigamSlideY.vue +52 -10
  208. package/dist/src/components/Transition/OrigamSnack.vue +52 -10
  209. package/dist/src/components/Transition/OrigamTransition.vue +40 -12
  210. package/dist/src/components/Transition/OrigamTranslateBottom.vue +52 -10
  211. package/dist/src/components/Transition/OrigamTranslatePicker.vue +52 -10
  212. package/dist/src/components/Transition/OrigamTranslateScale.vue +209 -97
  213. package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +40 -7
  214. package/dist/src/components/Transition/OrigamWindowXTranslate.vue +40 -7
  215. package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +40 -7
  216. package/dist/src/components/Transition/OrigamWindowYTranslate.vue +40 -7
  217. package/dist/src/components/Treeview/OrigamTreeview.vue +258 -118
  218. package/dist/src/components/Treeview/OrigamTreeviewNode.vue +126 -88
  219. package/dist/src/components/Video/OrigamVideo.vue +1178 -331
  220. package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +147 -55
  221. package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +94 -19
  222. package/dist/src/components/Watermark/OrigamWatermark.vue +224 -124
  223. package/dist/src/components/Window/OrigamWindow.vue +745 -175
  224. package/dist/src/components/Window/OrigamWindowItem.vue +162 -69
  225. package/dist/src/composables/Commons/display.composable.cjs +2 -0
  226. package/dist/src/composables/Commons/display.composable.js +1 -1
  227. package/dist/src/interfaces/Pagination/pagination.interface.d.ts +1 -1
  228. package/package.json +6 -6
@@ -268,22 +268,7 @@
268
268
  </template>
269
269
 
270
270
  <script lang="ts" setup>
271
- import {
272
- computed,
273
- getCurrentInstance,
274
- inject,
275
- mergeProps,
276
- nextTick,
277
- onBeforeUnmount,
278
- onMounted,
279
- ref,
280
- shallowRef,
281
- StyleValue,
282
- toRef,
283
- useSlots,
284
- VNodeRef,
285
- watch
286
- } from "vue";
271
+ import { computed, getCurrentInstance, inject, mergeProps, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, StyleValue, toRef, useSlots, VNodeRef, watch } from "vue";
287
272
  import OrigamAvatar from "../Avatar/OrigamAvatar.vue";
288
273
  import OrigamCheckboxBtn from "../Checkbox/OrigamCheckboxBtn.vue";
289
274
  import OrigamChip from "../Chip/OrigamChip.vue";
@@ -319,233 +304,1072 @@ import { TEXT_FIELD_TYPE } from "../../enums/TextField/text-field.enum";
319
304
  import { deepEqual, matchesSelector, wrapInArray } from "../../utils/Commons/commons.util";
320
305
  import { forwardRefs } from "../../utils/Commons/forwardRefs.util";
321
306
  import { getUid } from "../../utils/Commons/getCurrentInstance.util";
307
+ /*********************************************************
308
+ * Global
309
+ *
310
+ * @description
311
+ * Props, emits and filterProps for the Select component.
312
+ ********************************************************/
322
313
  const props = defineProps({
323
- chips: { type: Boolean, required: false },
324
- closableChips: { type: Boolean, required: false },
325
- hideNoData: { type: Boolean, required: false },
326
- hideSelected: { type: Boolean, required: false },
327
- listProps: { type: Object, required: false },
328
- menu: { type: Boolean, required: false },
329
- menuIcon: { type: null, required: false, default: MDI_ICONS.CHEVRON_DOWN },
330
- menuProps: { type: Object, required: false },
331
- chipProps: { type: Object, required: false },
332
- multiple: { type: Boolean, required: false },
333
- noDataText: { type: String, required: false, default: "origam.no_data_text" },
334
- openOnClear: { type: Boolean, required: false },
335
- autocomplete: { type: Boolean, required: false },
336
- autoSelectFirst: { type: [Boolean, String], required: false },
337
- clearOnSelect: { type: Boolean, required: false },
338
- divider: { type: String, required: false, default: "," },
339
- search: { type: String, required: false },
340
- closeText: { type: String, required: false, default: "origam.close" },
341
- openText: { type: String, required: false, default: "origam.open" },
342
- id: { type: String, required: false },
343
- class: { type: [String, Array, Object], required: false },
344
- style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
345
- color: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
346
- bgColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
347
- autofocus: { type: Boolean, required: false },
348
- counter: { type: [Boolean, Number, String], required: false },
349
- counterValue: { type: [Number, Function], required: false },
350
- placeholder: { type: String, required: false },
351
- persistentPlaceholder: { type: Boolean, required: false },
352
- persistentCounter: { type: Boolean, required: false },
353
- role: { type: String, required: false, default: "combobox" },
354
- type: { type: null, required: false, default: TEXT_FIELD_TYPE.TEXT },
355
- modelModifiers: { type: [String, Boolean], required: false },
356
- mask: { type: null, required: false },
357
- density: { type: null, required: false, default: DENSITY.DEFAULT },
358
- centerAffix: { type: Boolean, required: false, default: true },
359
- dirty: { type: Boolean, required: false },
360
- disabled: { type: Boolean, required: false },
361
- error: { type: [String, Boolean], required: false },
362
- inline: { type: Boolean, required: false },
363
- label: { type: String, required: false },
364
- prefix: { type: String, required: false },
365
- suffix: { type: String, required: false },
366
- persistentClear: { type: Boolean, required: false },
367
- singleLine: { type: Boolean, required: false },
368
- required: { type: Boolean, required: false },
369
- loading: { type: [Boolean, Number, Object], required: false },
370
- loadingText: { type: String, required: false },
371
- tag: { type: String, required: false },
372
- appendInnerAvatar: { type: String, required: false },
373
- appendInnerIcon: { type: null, required: false },
374
- prependInnerAvatar: { type: String, required: false },
375
- prependInnerIcon: { type: null, required: false },
376
- clearIcon: { type: null, required: false },
377
- clearable: { type: Boolean, required: false },
378
- prependInnerAriaLabel: { type: String, required: false },
379
- appendInnerAriaLabel: { type: String, required: false },
380
- border: { type: [Boolean, Number, String, Array], required: false, skipCheck: true, default: true },
381
- borderTop: { type: [Boolean, Number, String], required: false },
382
- borderLeft: { type: [Boolean, Number, String], required: false },
383
- borderBottom: { type: [Boolean, Number, String], required: false },
384
- borderRight: { type: [Boolean, Number, String], required: false },
385
- borderBlock: { type: [Boolean, Number, String], required: false },
386
- borderInline: { type: [Boolean, Number, String], required: false },
387
- borderInlineStart: { type: [Boolean, Number, String], required: false },
388
- borderInlineEnd: { type: [Boolean, Number, String], required: false },
389
- borderBlockStart: { type: [Boolean, Number, String], required: false },
390
- borderBlockEnd: { type: [Boolean, Number, String], required: false },
391
- borderColor: { type: String, required: false },
392
- borderStyle: { type: String, required: false },
393
- borderTopColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
394
- borderRightColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
395
- borderBottomColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
396
- borderLeftColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
397
- borderInlineStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
398
- borderInlineEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
399
- borderBlockStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
400
- borderBlockEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
401
- focused: { type: Boolean, required: false },
402
- text: { type: String, required: false },
403
- floating: { type: Boolean, required: false },
404
- name: { type: String, required: false },
405
- margin: { type: [Boolean, Number, String], required: false },
406
- marginTop: { type: [Boolean, Number, String], required: false },
407
- marginLeft: { type: [Boolean, Number, String], required: false },
408
- marginBottom: { type: [Boolean, Number, String], required: false },
409
- marginRight: { type: [Boolean, Number, String], required: false },
410
- marginBlock: { type: [Boolean, Number, String], required: false },
411
- marginInline: { type: [Boolean, Number, String], required: false },
412
- marginInlineStart: { type: [Boolean, Number, String], required: false },
413
- marginInlineEnd: { type: [Boolean, Number, String], required: false },
414
- marginBlockStart: { type: [Boolean, Number, String], required: false },
415
- marginBlockEnd: { type: [Boolean, Number, String], required: false },
416
- padding: { type: [Boolean, Number, String], required: false },
417
- paddingTop: { type: [Boolean, Number, String], required: false },
418
- paddingLeft: { type: [Boolean, Number, String], required: false },
419
- paddingBottom: { type: [Boolean, Number, String], required: false },
420
- paddingRight: { type: [Boolean, Number, String], required: false },
421
- paddingBlock: { type: [Boolean, Number, String], required: false },
422
- paddingInline: { type: [Boolean, Number, String], required: false },
423
- paddingInlineStart: { type: [Boolean, Number, String], required: false },
424
- paddingInlineEnd: { type: [Boolean, Number, String], required: false },
425
- paddingBlockStart: { type: [Boolean, Number, String], required: false },
426
- paddingBlockEnd: { type: [Boolean, Number, String], required: false },
427
- rounded: { type: [Boolean, Number, String, null], required: false, skipCheck: true, default: true },
428
- roundedTopRight: { type: [Boolean, Number, String], required: false },
429
- roundedTopLeft: { type: [Boolean, Number, String], required: false },
430
- roundedBottomLeft: { type: [Boolean, Number, String], required: false },
431
- roundedBottomRight: { type: [Boolean, Number, String], required: false },
432
- roundedStartStart: { type: [Boolean, Number, String], required: false },
433
- roundedStartEnd: { type: [Boolean, Number, String], required: false },
434
- roundedEndStart: { type: [Boolean, Number, String], required: false },
435
- roundedEndEnd: { type: [Boolean, Number, String], required: false },
436
- fontSize: { type: null, required: false },
437
- fontWeight: { type: null, required: false },
438
- lineHeight: { type: null, required: false },
439
- letterSpacing: { type: null, required: false },
440
- active: { type: [Boolean, Object], required: false },
441
- activeClass: { type: String, required: false },
442
- variant: { type: null, required: false },
443
- elevation: { type: [Number, String], required: false },
444
- size: { type: null, required: false },
445
- hideDetails: { type: [Boolean, String], required: false },
446
- hideSpinButtons: { type: Boolean, required: false },
447
- hint: { type: String, required: false },
448
- persistentHint: { type: Boolean, required: false },
449
- messages: { type: [Array, String], required: false },
450
- height: { type: [Number, String], required: false },
451
- maxHeight: { type: [Number, String], required: false },
452
- maxWidth: { type: [Number, String], required: false },
453
- minHeight: { type: [Number, String], required: false },
454
- minWidth: { type: [Number, String], required: false },
455
- width: { type: [Number, String], required: false },
456
- direction: { type: null, required: false, default: DIRECTION.HORIZONTAL },
457
- errorMessages: { type: [Array, String], required: false },
458
- maxErrors: { type: [Number, String], required: false },
459
- readonly: { type: Boolean, required: false },
460
- rules: { type: Array, required: false },
461
- modelValue: { type: null, required: false, default: null },
462
- validateOn: { type: null, required: false },
463
- validationValue: { type: null, required: false },
464
- appendAvatar: { type: String, required: false },
465
- appendIcon: { type: null, required: false },
466
- prependAvatar: { type: String, required: false },
467
- prependIcon: { type: null, required: false },
468
- prependAriaLabel: { type: String, required: false },
469
- appendAriaLabel: { type: String, required: false },
470
- items: { type: Array, required: false, default: () => [] },
471
- itemTitle: { type: null, required: false, default: "title" },
472
- itemValue: { type: null, required: false, default: "value" },
473
- itemChildren: { type: null, required: false, default: "children" },
474
- itemProps: { type: null, required: false, default: "props" },
475
- returnObject: { type: Boolean, required: false },
476
- valueComparator: { type: null, required: false, default: deepEqual },
477
- transition: { type: [Boolean, String, Object], required: false, default: () => ({ component: OrigamTranslateScale }) },
478
- customFilter: { type: Function, required: false },
479
- customKeyFilter: { type: Object, required: false },
480
- filterKeys: { type: [String, Array], required: false, default: () => ["title"] },
481
- filterMode: { type: null, required: false, default: FILTERS_MODE.INTERSECTION },
482
- noFilter: { type: Boolean, required: false },
483
- eager: { type: Boolean, required: false }
314
+ chips: {
315
+ type: Boolean,
316
+ required: false
317
+ },
318
+ closableChips: {
319
+ type: Boolean,
320
+ required: false
321
+ },
322
+ hideNoData: {
323
+ type: Boolean,
324
+ required: false
325
+ },
326
+ hideSelected: {
327
+ type: Boolean,
328
+ required: false
329
+ },
330
+ listProps: {
331
+ type: Object,
332
+ required: false
333
+ },
334
+ menu: {
335
+ type: Boolean,
336
+ required: false
337
+ },
338
+ menuIcon: {
339
+ type: null,
340
+ required: false,
341
+ default: MDI_ICONS.CHEVRON_DOWN
342
+ },
343
+ menuProps: {
344
+ type: Object,
345
+ required: false
346
+ },
347
+ chipProps: {
348
+ type: Object,
349
+ required: false
350
+ },
351
+ multiple: {
352
+ type: Boolean,
353
+ required: false
354
+ },
355
+ noDataText: {
356
+ type: String,
357
+ required: false,
358
+ default: "origam.no_data_text"
359
+ },
360
+ openOnClear: {
361
+ type: Boolean,
362
+ required: false
363
+ },
364
+ autocomplete: {
365
+ type: Boolean,
366
+ required: false
367
+ },
368
+ autoSelectFirst: {
369
+ type: [Boolean, String],
370
+ required: false
371
+ },
372
+ clearOnSelect: {
373
+ type: Boolean,
374
+ required: false
375
+ },
376
+ divider: {
377
+ type: String,
378
+ required: false,
379
+ default: ","
380
+ },
381
+ search: {
382
+ type: String,
383
+ required: false
384
+ },
385
+ closeText: {
386
+ type: String,
387
+ required: false,
388
+ default: "origam.close"
389
+ },
390
+ openText: {
391
+ type: String,
392
+ required: false,
393
+ default: "origam.open"
394
+ },
395
+ id: {
396
+ type: String,
397
+ required: false
398
+ },
399
+ class: {
400
+ type: [
401
+ String,
402
+ Array,
403
+ Object
404
+ ],
405
+ required: false
406
+ },
407
+ style: {
408
+ type: [
409
+ String,
410
+ Array,
411
+ Object,
412
+ Boolean,
413
+ null
414
+ ],
415
+ required: false,
416
+ skipCheck: true
417
+ },
418
+ color: {
419
+ type: [
420
+ String,
421
+ Object,
422
+ Boolean,
423
+ null
424
+ ],
425
+ required: false,
426
+ skipCheck: true
427
+ },
428
+ bgColor: {
429
+ type: [
430
+ String,
431
+ Object,
432
+ Boolean,
433
+ null
434
+ ],
435
+ required: false,
436
+ skipCheck: true
437
+ },
438
+ autofocus: {
439
+ type: Boolean,
440
+ required: false
441
+ },
442
+ counter: {
443
+ type: [
444
+ Boolean,
445
+ Number,
446
+ String
447
+ ],
448
+ required: false
449
+ },
450
+ counterValue: {
451
+ type: [Number, Function],
452
+ required: false
453
+ },
454
+ placeholder: {
455
+ type: String,
456
+ required: false
457
+ },
458
+ persistentPlaceholder: {
459
+ type: Boolean,
460
+ required: false
461
+ },
462
+ persistentCounter: {
463
+ type: Boolean,
464
+ required: false
465
+ },
466
+ role: {
467
+ type: String,
468
+ required: false,
469
+ default: "combobox"
470
+ },
471
+ type: {
472
+ type: null,
473
+ required: false,
474
+ default: TEXT_FIELD_TYPE.TEXT
475
+ },
476
+ modelModifiers: {
477
+ type: [String, Boolean],
478
+ required: false
479
+ },
480
+ mask: {
481
+ type: null,
482
+ required: false
483
+ },
484
+ density: {
485
+ type: null,
486
+ required: false,
487
+ default: DENSITY.DEFAULT
488
+ },
489
+ centerAffix: {
490
+ type: Boolean,
491
+ required: false,
492
+ default: true
493
+ },
494
+ dirty: {
495
+ type: Boolean,
496
+ required: false
497
+ },
498
+ disabled: {
499
+ type: Boolean,
500
+ required: false
501
+ },
502
+ error: {
503
+ type: [String, Boolean],
504
+ required: false
505
+ },
506
+ inline: {
507
+ type: Boolean,
508
+ required: false
509
+ },
510
+ label: {
511
+ type: String,
512
+ required: false
513
+ },
514
+ prefix: {
515
+ type: String,
516
+ required: false
517
+ },
518
+ suffix: {
519
+ type: String,
520
+ required: false
521
+ },
522
+ persistentClear: {
523
+ type: Boolean,
524
+ required: false
525
+ },
526
+ singleLine: {
527
+ type: Boolean,
528
+ required: false
529
+ },
530
+ required: {
531
+ type: Boolean,
532
+ required: false
533
+ },
534
+ loading: {
535
+ type: [
536
+ Boolean,
537
+ Number,
538
+ Object
539
+ ],
540
+ required: false
541
+ },
542
+ loadingText: {
543
+ type: String,
544
+ required: false
545
+ },
546
+ tag: {
547
+ type: String,
548
+ required: false
549
+ },
550
+ appendInnerAvatar: {
551
+ type: String,
552
+ required: false
553
+ },
554
+ appendInnerIcon: {
555
+ type: null,
556
+ required: false
557
+ },
558
+ prependInnerAvatar: {
559
+ type: String,
560
+ required: false
561
+ },
562
+ prependInnerIcon: {
563
+ type: null,
564
+ required: false
565
+ },
566
+ clearIcon: {
567
+ type: null,
568
+ required: false
569
+ },
570
+ clearable: {
571
+ type: Boolean,
572
+ required: false
573
+ },
574
+ prependInnerAriaLabel: {
575
+ type: String,
576
+ required: false
577
+ },
578
+ appendInnerAriaLabel: {
579
+ type: String,
580
+ required: false
581
+ },
582
+ border: {
583
+ type: [
584
+ Boolean,
585
+ Number,
586
+ String,
587
+ Array
588
+ ],
589
+ required: false,
590
+ skipCheck: true,
591
+ default: true
592
+ },
593
+ borderTop: {
594
+ type: [
595
+ Boolean,
596
+ Number,
597
+ String
598
+ ],
599
+ required: false
600
+ },
601
+ borderLeft: {
602
+ type: [
603
+ Boolean,
604
+ Number,
605
+ String
606
+ ],
607
+ required: false
608
+ },
609
+ borderBottom: {
610
+ type: [
611
+ Boolean,
612
+ Number,
613
+ String
614
+ ],
615
+ required: false
616
+ },
617
+ borderRight: {
618
+ type: [
619
+ Boolean,
620
+ Number,
621
+ String
622
+ ],
623
+ required: false
624
+ },
625
+ borderBlock: {
626
+ type: [
627
+ Boolean,
628
+ Number,
629
+ String
630
+ ],
631
+ required: false
632
+ },
633
+ borderInline: {
634
+ type: [
635
+ Boolean,
636
+ Number,
637
+ String
638
+ ],
639
+ required: false
640
+ },
641
+ borderInlineStart: {
642
+ type: [
643
+ Boolean,
644
+ Number,
645
+ String
646
+ ],
647
+ required: false
648
+ },
649
+ borderInlineEnd: {
650
+ type: [
651
+ Boolean,
652
+ Number,
653
+ String
654
+ ],
655
+ required: false
656
+ },
657
+ borderBlockStart: {
658
+ type: [
659
+ Boolean,
660
+ Number,
661
+ String
662
+ ],
663
+ required: false
664
+ },
665
+ borderBlockEnd: {
666
+ type: [
667
+ Boolean,
668
+ Number,
669
+ String
670
+ ],
671
+ required: false
672
+ },
673
+ borderColor: {
674
+ type: String,
675
+ required: false
676
+ },
677
+ borderStyle: {
678
+ type: String,
679
+ required: false
680
+ },
681
+ borderTopColor: {
682
+ type: [
683
+ String,
684
+ Object,
685
+ Boolean,
686
+ null
687
+ ],
688
+ required: false,
689
+ skipCheck: true
690
+ },
691
+ borderRightColor: {
692
+ type: [
693
+ String,
694
+ Object,
695
+ Boolean,
696
+ null
697
+ ],
698
+ required: false,
699
+ skipCheck: true
700
+ },
701
+ borderBottomColor: {
702
+ type: [
703
+ String,
704
+ Object,
705
+ Boolean,
706
+ null
707
+ ],
708
+ required: false,
709
+ skipCheck: true
710
+ },
711
+ borderLeftColor: {
712
+ type: [
713
+ String,
714
+ Object,
715
+ Boolean,
716
+ null
717
+ ],
718
+ required: false,
719
+ skipCheck: true
720
+ },
721
+ borderInlineStartColor: {
722
+ type: [
723
+ String,
724
+ Object,
725
+ Boolean,
726
+ null
727
+ ],
728
+ required: false,
729
+ skipCheck: true
730
+ },
731
+ borderInlineEndColor: {
732
+ type: [
733
+ String,
734
+ Object,
735
+ Boolean,
736
+ null
737
+ ],
738
+ required: false,
739
+ skipCheck: true
740
+ },
741
+ borderBlockStartColor: {
742
+ type: [
743
+ String,
744
+ Object,
745
+ Boolean,
746
+ null
747
+ ],
748
+ required: false,
749
+ skipCheck: true
750
+ },
751
+ borderBlockEndColor: {
752
+ type: [
753
+ String,
754
+ Object,
755
+ Boolean,
756
+ null
757
+ ],
758
+ required: false,
759
+ skipCheck: true
760
+ },
761
+ focused: {
762
+ type: Boolean,
763
+ required: false
764
+ },
765
+ text: {
766
+ type: String,
767
+ required: false
768
+ },
769
+ floating: {
770
+ type: Boolean,
771
+ required: false
772
+ },
773
+ name: {
774
+ type: String,
775
+ required: false
776
+ },
777
+ margin: {
778
+ type: [
779
+ Boolean,
780
+ Number,
781
+ String
782
+ ],
783
+ required: false
784
+ },
785
+ marginTop: {
786
+ type: [
787
+ Boolean,
788
+ Number,
789
+ String
790
+ ],
791
+ required: false
792
+ },
793
+ marginLeft: {
794
+ type: [
795
+ Boolean,
796
+ Number,
797
+ String
798
+ ],
799
+ required: false
800
+ },
801
+ marginBottom: {
802
+ type: [
803
+ Boolean,
804
+ Number,
805
+ String
806
+ ],
807
+ required: false
808
+ },
809
+ marginRight: {
810
+ type: [
811
+ Boolean,
812
+ Number,
813
+ String
814
+ ],
815
+ required: false
816
+ },
817
+ marginBlock: {
818
+ type: [
819
+ Boolean,
820
+ Number,
821
+ String
822
+ ],
823
+ required: false
824
+ },
825
+ marginInline: {
826
+ type: [
827
+ Boolean,
828
+ Number,
829
+ String
830
+ ],
831
+ required: false
832
+ },
833
+ marginInlineStart: {
834
+ type: [
835
+ Boolean,
836
+ Number,
837
+ String
838
+ ],
839
+ required: false
840
+ },
841
+ marginInlineEnd: {
842
+ type: [
843
+ Boolean,
844
+ Number,
845
+ String
846
+ ],
847
+ required: false
848
+ },
849
+ marginBlockStart: {
850
+ type: [
851
+ Boolean,
852
+ Number,
853
+ String
854
+ ],
855
+ required: false
856
+ },
857
+ marginBlockEnd: {
858
+ type: [
859
+ Boolean,
860
+ Number,
861
+ String
862
+ ],
863
+ required: false
864
+ },
865
+ padding: {
866
+ type: [
867
+ Boolean,
868
+ Number,
869
+ String
870
+ ],
871
+ required: false
872
+ },
873
+ paddingTop: {
874
+ type: [
875
+ Boolean,
876
+ Number,
877
+ String
878
+ ],
879
+ required: false
880
+ },
881
+ paddingLeft: {
882
+ type: [
883
+ Boolean,
884
+ Number,
885
+ String
886
+ ],
887
+ required: false
888
+ },
889
+ paddingBottom: {
890
+ type: [
891
+ Boolean,
892
+ Number,
893
+ String
894
+ ],
895
+ required: false
896
+ },
897
+ paddingRight: {
898
+ type: [
899
+ Boolean,
900
+ Number,
901
+ String
902
+ ],
903
+ required: false
904
+ },
905
+ paddingBlock: {
906
+ type: [
907
+ Boolean,
908
+ Number,
909
+ String
910
+ ],
911
+ required: false
912
+ },
913
+ paddingInline: {
914
+ type: [
915
+ Boolean,
916
+ Number,
917
+ String
918
+ ],
919
+ required: false
920
+ },
921
+ paddingInlineStart: {
922
+ type: [
923
+ Boolean,
924
+ Number,
925
+ String
926
+ ],
927
+ required: false
928
+ },
929
+ paddingInlineEnd: {
930
+ type: [
931
+ Boolean,
932
+ Number,
933
+ String
934
+ ],
935
+ required: false
936
+ },
937
+ paddingBlockStart: {
938
+ type: [
939
+ Boolean,
940
+ Number,
941
+ String
942
+ ],
943
+ required: false
944
+ },
945
+ paddingBlockEnd: {
946
+ type: [
947
+ Boolean,
948
+ Number,
949
+ String
950
+ ],
951
+ required: false
952
+ },
953
+ rounded: {
954
+ type: [
955
+ Boolean,
956
+ Number,
957
+ String,
958
+ null
959
+ ],
960
+ required: false,
961
+ skipCheck: true,
962
+ default: true
963
+ },
964
+ roundedTopRight: {
965
+ type: [
966
+ Boolean,
967
+ Number,
968
+ String
969
+ ],
970
+ required: false
971
+ },
972
+ roundedTopLeft: {
973
+ type: [
974
+ Boolean,
975
+ Number,
976
+ String
977
+ ],
978
+ required: false
979
+ },
980
+ roundedBottomLeft: {
981
+ type: [
982
+ Boolean,
983
+ Number,
984
+ String
985
+ ],
986
+ required: false
987
+ },
988
+ roundedBottomRight: {
989
+ type: [
990
+ Boolean,
991
+ Number,
992
+ String
993
+ ],
994
+ required: false
995
+ },
996
+ roundedStartStart: {
997
+ type: [
998
+ Boolean,
999
+ Number,
1000
+ String
1001
+ ],
1002
+ required: false
1003
+ },
1004
+ roundedStartEnd: {
1005
+ type: [
1006
+ Boolean,
1007
+ Number,
1008
+ String
1009
+ ],
1010
+ required: false
1011
+ },
1012
+ roundedEndStart: {
1013
+ type: [
1014
+ Boolean,
1015
+ Number,
1016
+ String
1017
+ ],
1018
+ required: false
1019
+ },
1020
+ roundedEndEnd: {
1021
+ type: [
1022
+ Boolean,
1023
+ Number,
1024
+ String
1025
+ ],
1026
+ required: false
1027
+ },
1028
+ fontSize: {
1029
+ type: null,
1030
+ required: false
1031
+ },
1032
+ fontWeight: {
1033
+ type: null,
1034
+ required: false
1035
+ },
1036
+ lineHeight: {
1037
+ type: null,
1038
+ required: false
1039
+ },
1040
+ letterSpacing: {
1041
+ type: null,
1042
+ required: false
1043
+ },
1044
+ active: {
1045
+ type: [Boolean, Object],
1046
+ required: false
1047
+ },
1048
+ activeClass: {
1049
+ type: String,
1050
+ required: false
1051
+ },
1052
+ variant: {
1053
+ type: null,
1054
+ required: false
1055
+ },
1056
+ elevation: {
1057
+ type: [Number, String],
1058
+ required: false
1059
+ },
1060
+ size: {
1061
+ type: null,
1062
+ required: false
1063
+ },
1064
+ hideDetails: {
1065
+ type: [Boolean, String],
1066
+ required: false
1067
+ },
1068
+ hideSpinButtons: {
1069
+ type: Boolean,
1070
+ required: false
1071
+ },
1072
+ hint: {
1073
+ type: String,
1074
+ required: false
1075
+ },
1076
+ persistentHint: {
1077
+ type: Boolean,
1078
+ required: false
1079
+ },
1080
+ messages: {
1081
+ type: [Array, String],
1082
+ required: false
1083
+ },
1084
+ height: {
1085
+ type: [Number, String],
1086
+ required: false
1087
+ },
1088
+ maxHeight: {
1089
+ type: [Number, String],
1090
+ required: false
1091
+ },
1092
+ maxWidth: {
1093
+ type: [Number, String],
1094
+ required: false
1095
+ },
1096
+ minHeight: {
1097
+ type: [Number, String],
1098
+ required: false
1099
+ },
1100
+ minWidth: {
1101
+ type: [Number, String],
1102
+ required: false
1103
+ },
1104
+ width: {
1105
+ type: [Number, String],
1106
+ required: false
1107
+ },
1108
+ direction: {
1109
+ type: null,
1110
+ required: false,
1111
+ default: DIRECTION.HORIZONTAL
1112
+ },
1113
+ errorMessages: {
1114
+ type: [Array, String],
1115
+ required: false
1116
+ },
1117
+ maxErrors: {
1118
+ type: [Number, String],
1119
+ required: false
1120
+ },
1121
+ readonly: {
1122
+ type: Boolean,
1123
+ required: false
1124
+ },
1125
+ rules: {
1126
+ type: Array,
1127
+ required: false
1128
+ },
1129
+ modelValue: {
1130
+ type: null,
1131
+ required: false,
1132
+ default: null
1133
+ },
1134
+ validateOn: {
1135
+ type: null,
1136
+ required: false
1137
+ },
1138
+ validationValue: {
1139
+ type: null,
1140
+ required: false
1141
+ },
1142
+ appendAvatar: {
1143
+ type: String,
1144
+ required: false
1145
+ },
1146
+ appendIcon: {
1147
+ type: null,
1148
+ required: false
1149
+ },
1150
+ prependAvatar: {
1151
+ type: String,
1152
+ required: false
1153
+ },
1154
+ prependIcon: {
1155
+ type: null,
1156
+ required: false
1157
+ },
1158
+ prependAriaLabel: {
1159
+ type: String,
1160
+ required: false
1161
+ },
1162
+ appendAriaLabel: {
1163
+ type: String,
1164
+ required: false
1165
+ },
1166
+ items: {
1167
+ type: Array,
1168
+ required: false,
1169
+ default: () => []
1170
+ },
1171
+ itemTitle: {
1172
+ type: null,
1173
+ required: false,
1174
+ default: "title"
1175
+ },
1176
+ itemValue: {
1177
+ type: null,
1178
+ required: false,
1179
+ default: "value"
1180
+ },
1181
+ itemChildren: {
1182
+ type: null,
1183
+ required: false,
1184
+ default: "children"
1185
+ },
1186
+ itemProps: {
1187
+ type: null,
1188
+ required: false,
1189
+ default: "props"
1190
+ },
1191
+ returnObject: {
1192
+ type: Boolean,
1193
+ required: false
1194
+ },
1195
+ valueComparator: {
1196
+ type: null,
1197
+ required: false,
1198
+ default: deepEqual
1199
+ },
1200
+ transition: {
1201
+ type: [
1202
+ Boolean,
1203
+ String,
1204
+ Object
1205
+ ],
1206
+ required: false,
1207
+ default: () => ({ component: OrigamTranslateScale })
1208
+ },
1209
+ customFilter: {
1210
+ type: Function,
1211
+ required: false
1212
+ },
1213
+ customKeyFilter: {
1214
+ type: Object,
1215
+ required: false
1216
+ },
1217
+ filterKeys: {
1218
+ type: [String, Array],
1219
+ required: false,
1220
+ default: () => ["title"]
1221
+ },
1222
+ filterMode: {
1223
+ type: null,
1224
+ required: false,
1225
+ default: FILTERS_MODE.INTERSECTION
1226
+ },
1227
+ noFilter: {
1228
+ type: Boolean,
1229
+ required: false
1230
+ },
1231
+ eager: {
1232
+ type: Boolean,
1233
+ required: false
1234
+ }
484
1235
  });
485
- const emit = defineEmits(["click:control", "mousedown:control", "update:menu", "update:modelValue", "update:focused", "click:append", "click:prepend", "click:appendInner", "click:prependInner", "click:clear"]);
1236
+ const emit = defineEmits([
1237
+ "click:control",
1238
+ "mousedown:control",
1239
+ "update:menu",
1240
+ "update:modelValue",
1241
+ "update:focused",
1242
+ "click:append",
1243
+ "click:prepend",
1244
+ "click:appendInner",
1245
+ "click:prependInner",
1246
+ "click:clear"
1247
+ ]);
486
1248
  defineSlots();
487
1249
  const { filterProps } = useProps(props);
1250
+ /*********************************************************
1251
+ * DOM refs
1252
+ *
1253
+ * @description
1254
+ * Refs to sub-components for forward-prop delegation.
1255
+ * `vm` is the component instance — used as a fallback path
1256
+ * to reach the underlying `<input>` when the forwardRefs-
1257
+ * based proxy on `origamTextFieldRef` doesn't expose `$el`
1258
+ * (filtered because of its `$` prefix).
1259
+ ********************************************************/
488
1260
  const { t } = useLocale();
489
1261
  const origamTextFieldRef = ref();
490
1262
  const origamMenuRef = ref();
491
1263
  const origamVirtualScrollRef = ref();
492
1264
  const origamListRef = ref();
493
1265
  const origamChipsRef = ref();
1266
+ // Component instance — used as a fallback path to reach the
1267
+ // underlying `<input>` (`vm.proxy.$el.querySelector('input')`) when
1268
+ // the `forwardRefs`-based proxy on `origamTextFieldRef` doesn't
1269
+ // expose certain props/methods (notably `$el`, which the proxy filters
1270
+ // because of its `$` prefix).
494
1271
  const vm = getCurrentInstance();
1272
+ /*********************************************************
1273
+ * WAI-ARIA combobox IDs
1274
+ *
1275
+ * @description
1276
+ * Stable IDs for the listbox + per-option elements.
1277
+ * `listboxId` is applied to the OrigamList root; each option
1278
+ * gets `optionId(index)` so `aria-activedescendant` on the
1279
+ * combobox input can point to the keyboard-highlighted row
1280
+ * without moving DOM focus off the input.
1281
+ ********************************************************/
495
1282
  const _uid = getUid();
496
1283
  const listboxId = `origam-select-listbox-${_uid}`;
497
1284
  const optionId = (index) => `${listboxId}-opt-${index}`;
1285
+ // Index of the currently keyboard-highlighted option.
1286
+ // -1 = no highlight (listbox closed or nothing highlighted).
498
1287
  const highlightIndex = shallowRef(-1);
1288
+ /*********************************************************
1289
+ * Value & model
1290
+ *
1291
+ * @description
1292
+ * Locale, slots, color, items, model and search bindings.
1293
+ ********************************************************/
499
1294
  const slots = useSlots();
1295
+ // Phase 3 (Vague B) — class-first companion alongside inline styles.
1296
+ // When `color` resolves to a tokenisable intent, `textColorClasses`
1297
+ // hits `.origam--color-{intent}` on the selection chip; `textColorStyles`
1298
+ // stays in parallel to cover legacy raw colors and to keep zero-regression
1299
+ // during the transition (strategy "a").
1300
+ /*********************************************************
1301
+ * Color
1302
+ ********************************************************/
500
1303
  const { textColorClasses, textColorStyles } = useTextColor(toRef(props, "color"));
1304
+ /*********************************************************
1305
+ * Composables
1306
+ ********************************************************/
501
1307
  const { items, transformIn, transformOut } = useItems(props);
502
- const model = useVModel(
503
- props,
504
- "modelValue",
505
- [],
506
- (v) => {
507
- return transformIn(v === null ? [null] : wrapInArray(v));
508
- },
509
- (v) => {
510
- const transformed = transformOut(v);
511
- return props.multiple ? transformed : transformed[0] ?? null;
512
- }
513
- );
1308
+ /*********************************************************
1309
+ * Value
1310
+ ********************************************************/
1311
+ const model = useVModel(props, "modelValue", [], (v) => {
1312
+ return transformIn(v === null ? [null] : wrapInArray(v));
1313
+ }, (v) => {
1314
+ const transformed = transformOut(v);
1315
+ return props.multiple ? transformed : transformed[0] ?? null;
1316
+ });
514
1317
  const search = useVModel(props, "search", "");
1318
+ /*********************************************************
1319
+ * effectiveValidationValue (#693)
1320
+ *
1321
+ * @description
1322
+ * This was previously named `validationValue`, a bare `const` that
1323
+ * SHADOWED the `validationValue` PROP (`ISelectProps` -> `IInputProps`
1324
+ * -> `IValidationProps.validationValue`, `validation.interface.ts:47`)
1325
+ * inside this `<script lang="ts" setup>` block. The template's
1326
+ * `:validation-value="validationValue"` therefore always resolved to
1327
+ * this model-derived local, never to the consumer's prop — and since
1328
+ * `validationValue` is also stripped from the `filterProps` passthrough
1329
+ * below, there was no second path either: a
1330
+ * `<origam-select :validation-value="somethingElse" />` silently
1331
+ * validated against the model. Same defect family as #622 / #665 /
1332
+ * #666.
1333
+ *
1334
+ * @description
1335
+ * The fallback ladder mirrors `useValidation` exactly
1336
+ * (`validation.composable.ts:52`): `undefined` means "not supplied" and
1337
+ * falls back to the model, ANY other value — `null` included — wins.
1338
+ ********************************************************/
515
1339
  const effectiveValidationValue = computed(() => {
516
- return props.validationValue === void 0 ? model.externalValue : props.validationValue;
1340
+ return props.validationValue === undefined ? model.externalValue : props.validationValue;
517
1341
  });
518
1342
  const menuState = useVModel(props, "menu");
519
1343
  const menu = computed({
520
- get: () => menuState.value,
521
- set: (v) => {
522
- if (menuState.value && !v && origamMenuRef.value?.openChildren) {
523
- return;
524
- }
525
- menuState.value = v;
526
- }
1344
+ get: () => menuState.value,
1345
+ set: (v) => {
1346
+ if (menuState.value && !v && origamMenuRef.value?.openChildren) {
1347
+ return;
1348
+ }
1349
+ menuState.value = v;
1350
+ }
527
1351
  });
528
1352
  const counterValue = computed(() => {
529
- if (typeof props.counterValue === "function") {
530
- return props.counterValue(model.value);
531
- }
532
- if (props.counterValue) {
533
- return props.counterValue;
534
- }
535
- return model.value.length;
1353
+ if (typeof props.counterValue === "function") {
1354
+ return props.counterValue(model.value);
1355
+ }
1356
+ if (props.counterValue) {
1357
+ return props.counterValue;
1358
+ }
1359
+ return model.value.length;
536
1360
  });
537
1361
  const selectedValues = computed(() => {
538
- return model.value.map((selection) => selection.value);
1362
+ return model.value.map((selection) => selection.value);
539
1363
  });
540
1364
  const highlightFirst = computed(() => {
541
- const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === "exact" && search.value === displayItems.value[0]?.title;
542
- return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
1365
+ const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === "exact" && search.value === displayItems.value[0]?.title;
1366
+ return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
543
1367
  });
544
1368
  const showCheckbox = computed(() => {
545
- return props.multiple && !props.hideSelected;
1369
+ return props.multiple && !props.hideSelected;
546
1370
  });
547
1371
  const hasNoData = computed(() => {
548
- return !displayItems.value.length && (!props.hideNoData || slots.noData);
1372
+ return !displayItems.value.length && (!props.hideNoData || slots.noData);
549
1373
  });
550
1374
  const isFocused = shallowRef(false);
551
1375
  const form = inject(ORIGAM_FORM_KEY, null);
@@ -557,455 +1381,703 @@ const listHasFocus = shallowRef(false);
557
1381
  const selectionIndex = shallowRef(-1);
558
1382
  const isSelecting = shallowRef(false);
559
1383
  const displayItems = computed(() => {
560
- if (props.hideSelected) {
561
- return filteredItems.value.filter((filteredItem) => !model.value.some((s) => s.value === filteredItem.value));
562
- }
563
- return filteredItems.value;
1384
+ if (props.hideSelected) {
1385
+ return filteredItems.value.filter((filteredItem) => !model.value.some((s) => s.value === filteredItem.value));
1386
+ }
1387
+ return filteredItems.value;
564
1388
  });
565
1389
  const menuDisabled = computed(() => {
566
- return props.hideNoData && !displayItems.value.length || props.readonly || form?.isReadonly.value;
1390
+ return props.hideNoData && !displayItems.value.length || props.readonly || form?.isReadonly.value;
567
1391
  });
1392
+ // Typography bridge across the teleport — see `useTeleportTypography` for
1393
+ // the full rationale (the menu is teleported out of the select's DOM
1394
+ // subtree, so a consumer's CSS never reaches it, and `rem`-sized option
1395
+ // text would stay pinned to the document root even if it did).
568
1396
  const { typographyStyles: menuTypographyStyles } = useTeleportTypography(origamTextFieldRef, menu, (fontSize) => ({
569
- "--origam-list-item__title---font-size": fontSize,
570
- // Kept proportional to the title rather than pinned, so the pair
571
- // keeps its relationship at any scale.
572
- "--origam-list-item__subtitle---font-size": `calc(${fontSize} * 0.875)`
1397
+ "--origam-list-item__title---font-size": fontSize,
1398
+ // Kept proportional to the title rather than pinned, so the pair
1399
+ // keeps its relationship at any scale.
1400
+ "--origam-list-item__subtitle---font-size": `calc(${fontSize} * 0.875)`
573
1401
  }));
574
1402
  const menuProps = computed(() => {
575
- const consumerProps = props.menuProps ?? {};
576
- const consumerContentProps = consumerProps.contentProps ?? {};
577
- return {
578
- ...consumerProps,
579
- /*********************************************************
580
- * Menu activator ARIA — #1247
581
- *
582
- * @description
583
- * `activator="parent"` is the role-less `.origam-field` wrapper: OrigamMenu's
584
- * default aria-haspopup/expanded/owns are illegal there (aria-allowed-attr).
585
- * The combobox ARIA lives on the <input> (`comboboxAriaAttrs`); `undefined`
586
- * suppresses the defaults.
587
- ********************************************************/
588
- activatorProps: {
589
- ...MENU_WRAPPER_ARIA_RESET,
590
- ...consumerProps.activatorProps ?? {}
591
- },
592
- contentProps: {
593
- ...consumerContentProps,
594
- // The consumer's own style is listed last so it still wins —
595
- // the bridge is a default, not a lock.
596
- style: [menuTypographyStyles.value, consumerContentProps.style]
597
- }
598
- };
1403
+ const consumerProps = props.menuProps ?? {};
1404
+ const consumerContentProps = consumerProps.contentProps ?? {};
1405
+ return {
1406
+ ...consumerProps,
1407
+ /*********************************************************
1408
+ * Menu activator ARIA — #1247
1409
+ *
1410
+ * @description
1411
+ * `activator="parent"` is the role-less `.origam-field` wrapper: OrigamMenu's
1412
+ * default aria-haspopup/expanded/owns are illegal there (aria-allowed-attr).
1413
+ * The combobox ARIA lives on the <input> (`comboboxAriaAttrs`); `undefined`
1414
+ * suppresses the defaults.
1415
+ ********************************************************/
1416
+ activatorProps: {
1417
+ ...MENU_WRAPPER_ARIA_RESET,
1418
+ ...consumerProps.activatorProps ?? {}
1419
+ },
1420
+ contentProps: {
1421
+ ...consumerContentProps,
1422
+ // The consumer's own style is listed last so it still wins —
1423
+ // the bridge is a default, not a lock.
1424
+ style: [menuTypographyStyles.value, consumerContentProps.style]
1425
+ }
1426
+ };
599
1427
  });
1428
+ // Computed ARIA attrs forwarded to the TextField (→ <input>).
1429
+ // `aria-activedescendant` is only emitted when the menu is open
1430
+ // AND a real option is highlighted.
600
1431
  const comboboxAriaAttrs = computed(() => {
601
- const activeDescendant = menu.value && highlightIndex.value >= 0 ? optionId(highlightIndex.value) : void 0;
602
- return {
603
- role: "combobox",
604
- "aria-haspopup": "listbox",
605
- "aria-expanded": menu.value ? "true" : "false",
606
- "aria-controls": listboxId,
607
- "aria-autocomplete": props.autocomplete ? "list" : void 0,
608
- "aria-activedescendant": activeDescendant
609
- };
1432
+ const activeDescendant = menu.value && highlightIndex.value >= 0 ? optionId(highlightIndex.value) : undefined;
1433
+ /*
1434
+ * `role="combobox"` MUST sit on the same element as the
1435
+ * `aria-haspopup` / `aria-expanded` / `aria-controls`
1436
+ * attributes — axe-core's `aria-allowed-attr` rule will
1437
+ * flag those attrs as illegal on an element without the
1438
+ * matching combobox role. We force the role here so
1439
+ * regardless of how `OrigamTextField` distributes the
1440
+ * fall-through attrs, the role travels with them.
1441
+ */
1442
+ return {
1443
+ role: "combobox",
1444
+ "aria-haspopup": "listbox",
1445
+ "aria-expanded": menu.value ? "true" : "false",
1446
+ "aria-controls": listboxId,
1447
+ "aria-autocomplete": props.autocomplete ? "list" : undefined,
1448
+ "aria-activedescendant": activeDescendant
1449
+ };
610
1450
  });
611
1451
  const menuListItemProps = (item, itemRef, index) => {
612
- const isKeyboardHighlighted = highlightIndex.value === index;
613
- const isItemSelected = isSelected(item);
614
- return mergeProps(item.props ?? {}, {
615
- ref: itemRef,
616
- key: index,
617
- id: optionId(index),
618
- role: "option",
619
- "aria-selected": isItemSelected,
620
- active: highlightFirst.value && index === 0 || isItemSelected || isKeyboardHighlighted,
621
- onClick: () => handleSelect(item, null)
622
- });
1452
+ const isKeyboardHighlighted = highlightIndex.value === index;
1453
+ const isItemSelected = isSelected(item);
1454
+ return mergeProps(item.props ?? {}, {
1455
+ ref: itemRef,
1456
+ key: index,
1457
+ id: optionId(index),
1458
+ role: "option",
1459
+ "aria-selected": isItemSelected,
1460
+ active: highlightFirst.value && index === 0 || isItemSelected || isKeyboardHighlighted,
1461
+ onClick: () => handleSelect(item, null)
1462
+ });
623
1463
  };
624
1464
  const isSelected = (item) => {
625
- return selectedValues.value.includes(item.value);
1465
+ return selectedValues.value.includes(item.value);
626
1466
  };
1467
+ // Type-narrow helpers used in the template to avoid TS18048 / TS2365.
1468
+ // `getMatches(item)?.title` is `TFilterMatch | undefined` (union of
1469
+ // boolean | number | tuples) — coerce to number before arithmetic.
1470
+ // `search` is `string | undefined` from the VLS context — fallback to 0
1471
+ // for the length so substr stays well-typed.
627
1472
  const getMatchStart = (item) => Number(getMatches(item)?.title ?? 0);
628
1473
  const getSearchLength = () => (search.value ?? "").length;
629
- const {
630
- onListScroll: handleListScroll,
631
- onListKeydown: handleListKeydown
632
- } = useScrolling(origamListRef, origamTextFieldRef);
633
- const scrollFrames = /* @__PURE__ */ new Set();
1474
+ const { onListScroll: handleListScroll, onListKeydown: handleListKeydown } = useScrolling(origamListRef, origamTextFieldRef);
1475
+ /*********************************************************
1476
+ * scheduleScrollFrame — rAF bound to the component's lifetime (#719)
1477
+ *
1478
+ * @description
1479
+ * Two sites defer `scrollToIndex` by one frame (keyboard lookup, and
1480
+ * the `menu` watcher that re-centres on the selected item). Nothing
1481
+ * cancelled that frame at unmount, so the continuation could land on
1482
+ * a destroyed environment — the #706 family. It is not benign here:
1483
+ * `scrollToIndex` runs through `useVirtual` → `useGoTo`, which arms
1484
+ * its own rAF loop and reads `window`.
1485
+ *
1486
+ * @description
1487
+ * `onBeforeUnmount` cancels the frames already armed and flips
1488
+ * `disposed`, which also neutralises any later scheduling attempt.
1489
+ *
1490
+ * @description
1491
+ * Every armed id is tracked, NOT just the latest. Collapsing them into
1492
+ * a single handle would make a later call supersede an earlier one —
1493
+ * a coalescing semantic this component never had, and one no failing
1494
+ * test asks for. The fix adds cancellation at unmount and nothing else.
1495
+ ********************************************************/
1496
+ const scrollFrames = new Set();
634
1497
  let disposed = false;
635
1498
  const scheduleScrollFrame = (cb) => {
636
- if (disposed || !IN_BROWSER) return;
637
- const id2 = window.requestAnimationFrame(() => {
638
- scrollFrames.delete(id2);
639
- cb();
640
- });
641
- scrollFrames.add(id2);
1499
+ if (disposed || !IN_BROWSER) return;
1500
+ const id = window.requestAnimationFrame(() => {
1501
+ scrollFrames.delete(id);
1502
+ cb();
1503
+ });
1504
+ scrollFrames.add(id);
642
1505
  };
643
- const macrotasks = /* @__PURE__ */ new Set();
1506
+ /*********************************************************
1507
+ * scheduleMacrotask — le pendant `setTimeout` du garde ci-dessus
1508
+ * (#779)
1509
+ *
1510
+ * @description
1511
+ * Deux macrotaches de ce fichier n'ont jamais eu de garde :
1512
+ * la re-selection du texte au `mousedown:control` en mode
1513
+ * autocomplete, et le `listHasFocus = true` du `focusin`. Elles
1514
+ * cohabitaient avec le `disposed` de #719 — pose pour les frames de
1515
+ * defilement, jamais pour elles. C'est precisement le site qu'une
1516
+ * heuristique PAR FICHIER blanchit : le fichier a bien un
1517
+ * `onBeforeUnmount`, il ne couvrait simplement pas ces deux-la.
1518
+ *
1519
+ * @description
1520
+ * Rien d'observable ne change : la premiere dereference
1521
+ * `vm.proxy.$el` pour appeler `input.select()` — sur un arbre
1522
+ * demonte il n'y a plus d'input a selectionner ; la seconde ecrit un
1523
+ * `ref` interne que plus personne ne lit. Ce que le garde retire,
1524
+ * c'est la tache elle-meme, pas un effet.
1525
+ ********************************************************/
1526
+ const macrotasks = new Set();
644
1527
  const scheduleMacrotask = (cb) => {
645
- if (disposed || !IN_BROWSER) return;
646
- const id2 = window.setTimeout(() => {
647
- macrotasks.delete(id2);
648
- cb();
649
- }, 0);
650
- macrotasks.add(id2);
1528
+ if (disposed || !IN_BROWSER) return;
1529
+ const id = window.setTimeout(() => {
1530
+ macrotasks.delete(id);
1531
+ cb();
1532
+ }, 0);
1533
+ macrotasks.add(id);
651
1534
  };
652
1535
  onBeforeUnmount(() => {
653
- disposed = true;
654
- for (const id2 of scrollFrames) window.cancelAnimationFrame(id2);
655
- for (const id2 of macrotasks) window.clearTimeout(id2);
656
- scrollFrames.clear();
657
- macrotasks.clear();
1536
+ disposed = true;
1537
+ for (const id of scrollFrames) window.cancelAnimationFrame(id);
1538
+ for (const id of macrotasks) window.clearTimeout(id);
1539
+ scrollFrames.clear();
1540
+ macrotasks.clear();
658
1541
  });
1542
+ /*********************************************************
1543
+ * Event handlers
1544
+ ********************************************************/
659
1545
  const handleSelect = (item, set = true) => {
660
- if (item.props?.disabled) return;
661
- if (props.multiple) {
662
- const index = model.value.findIndex((selection) => props.valueComparator ? props.valueComparator(selection.value, item.value) : deepEqual(selection.value, item.value));
663
- const add = set == null ? !~index : set;
664
- if (~index) {
665
- const value = add ? [...model.value, item] : [...model.value];
666
- value.splice(index, 1);
667
- model.value = value;
668
- } else if (add) {
669
- model.value = [...model.value, item];
670
- }
671
- if (props.clearOnSelect && props.autocomplete) {
672
- search.value = "";
673
- }
674
- } else {
675
- const add = set !== false;
676
- model.value = add ? [item] : [];
677
- if (props.autocomplete) {
678
- search.value = add ? item.title : "";
679
- }
680
- nextTick(() => {
681
- menu.value = false;
682
- isPristine.value = true;
683
- });
684
- }
1546
+ if (item.props?.disabled) return;
1547
+ if (props.multiple) {
1548
+ const index = model.value.findIndex((selection) => props.valueComparator ? props.valueComparator(selection.value, item.value) : deepEqual(selection.value, item.value));
1549
+ const add = set == null ? !~index : set;
1550
+ if (~index) {
1551
+ const value = add ? [...model.value, item] : [...model.value];
1552
+ value.splice(index, 1);
1553
+ model.value = value;
1554
+ } else if (add) {
1555
+ model.value = [...model.value, item];
1556
+ }
1557
+ if (props.clearOnSelect && props.autocomplete) {
1558
+ search.value = "";
1559
+ }
1560
+ } else {
1561
+ const add = set !== false;
1562
+ model.value = add ? [item] : [];
1563
+ if (props.autocomplete) {
1564
+ search.value = add ? item.title : "";
1565
+ }
1566
+ nextTick(() => {
1567
+ menu.value = false;
1568
+ isPristine.value = true;
1569
+ });
1570
+ }
685
1571
  };
686
1572
  const handleClear = (e) => {
687
- if (props.openOnClear) {
688
- menu.value = true;
689
- }
690
- if (props.autocomplete) {
691
- search.value = "";
692
- }
693
- emit("click:clear", e);
1573
+ if (props.openOnClear) {
1574
+ menu.value = true;
1575
+ }
1576
+ if (props.autocomplete) {
1577
+ search.value = "";
1578
+ }
1579
+ emit("click:clear", e);
694
1580
  };
695
1581
  const handleClickControl = (e) => {
696
- emit("click:control", e);
1582
+ emit("click:control", e);
697
1583
  };
1584
+ /*********************************************************
1585
+ * click:append / click:prepend / click:appendInner /
1586
+ * click:prependInner relay
1587
+ *
1588
+ * @description
1589
+ * `<origam-text-field>` already emits all four via its own
1590
+ * `useAdjacent` / `useAdjacentInner` calls, but nothing here listened
1591
+ * for them — declared, never fired (issue: guard
1592
+ * `unemitted-declarations`, `Select:click:append,click:appendInner,
1593
+ * click:prepend,click:prependInner`). Mirrors `handleClickControl`
1594
+ * above: relay on THIS component's own instance.
1595
+ ********************************************************/
698
1596
  const handleClickAppend = (e) => {
699
- emit("click:append", e);
1597
+ emit("click:append", e);
700
1598
  };
701
1599
  const handleClickPrepend = (e) => {
702
- emit("click:prepend", e);
1600
+ emit("click:prepend", e);
703
1601
  };
704
1602
  const handleClickAppendInner = (e) => {
705
- emit("click:appendInner", e);
1603
+ emit("click:appendInner", e);
706
1604
  };
707
1605
  const handleClickPrependInner = (e) => {
708
- emit("click:prependInner", e);
1606
+ emit("click:prependInner", e);
709
1607
  };
710
1608
  const handleMousedownControl = (e) => {
711
- emit("mousedown:control", e);
712
- if (menuDisabled.value) return;
713
- menu.value = !menu.value;
714
- if (props.autocomplete && !props.multiple && search.value) {
715
- scheduleMacrotask(() => {
716
- const root = vm?.proxy?.$el;
717
- const input = root?.querySelector("input");
718
- input?.select();
719
- });
720
- }
1609
+ emit("mousedown:control", e);
1610
+ if (menuDisabled.value) return;
1611
+ menu.value = !menu.value;
1612
+ // Select-all the input text on every field click in autocomplete-
1613
+ // single mode when there's a selection. The focus watcher already
1614
+ // runs select() on the focus TRANSITION, but that fires only on
1615
+ // the false→true edge — clicking an already-focused field, OR a
1616
+ // click that races with the menu's focus management (focusin
1617
+ // steal / scroll-strategy refocus), leaves the cursor at the end
1618
+ // with the selection cleared. Wiring it here too means EVERY
1619
+ // mousedown re-selects, so the next keystroke always replaces.
1620
+ // We DOM-query the `<input>` instead of going through the
1621
+ // `origamTextFieldRef` proxy — `forwardRefs` doesn't reliably
1622
+ // expose the underlying HTMLInputElement's `select()` method.
1623
+ // Two `nextTick`s — one for Vue to flush, one to land AFTER the
1624
+ // menu's focusin handler has run.
1625
+ if (props.autocomplete && !props.multiple && search.value) {
1626
+ // `setTimeout(0)` instead of `nextTick` — the browser's
1627
+ // click cursor-placement and the TextField's
1628
+ // `handleFocus` chain (which calls `input.focus()` →
1629
+ // cursor jumps to end) run AFTER mousedown's synchronous
1630
+ // handlers AND after Vue's microtask queue. A microtask
1631
+ // `nextTick` resolves too early (before the click cycle
1632
+ // finishes its cursor placement) so our select() takes
1633
+ // effect for an instant then gets clobbered. A macrotask
1634
+ // (setTimeout) lands AFTER all that, so the selection
1635
+ // sticks.
1636
+ scheduleMacrotask(() => {
1637
+ const root = vm?.proxy?.$el;
1638
+ const input = root?.querySelector("input");
1639
+ input?.select();
1640
+ });
1641
+ }
721
1642
  };
722
1643
  const handleMousedownMenuIcon = (e) => {
723
- if (menuDisabled.value) return;
724
- if (isFocused.value) {
725
- e.preventDefault();
726
- e.stopPropagation();
727
- menu.value = !menu.value;
728
- }
1644
+ if (menuDisabled.value) return;
1645
+ if (isFocused.value) {
1646
+ // Field is already focused: stop propagation so the bubbling
1647
+ // mousedown does NOT also reach handleMousedownControl (which
1648
+ // would toggle the menu a second time and cancel the opening).
1649
+ e.preventDefault();
1650
+ e.stopPropagation();
1651
+ menu.value = !menu.value;
1652
+ }
1653
+ // When the field is NOT yet focused, let the event bubble up to
1654
+ // handleControlMousedown in OrigamTextField. That handler emits
1655
+ // mousedown:control → handleMousedownControl toggles the menu AND
1656
+ // manages focus in a single step. Without this guard the first
1657
+ // click double-toggles (icon → open, control → close again) because
1658
+ // stopPropagation is only called after the first focus is set.
729
1659
  };
730
1660
  const handleKeydown = (e) => {
731
- if (!e.key || props.readonly || form?.isReadonly.value) return;
732
- const selectionStart = origamTextFieldRef.value?.selectionStart;
733
- const length = model.value.length;
734
- const keyAutocompleteOut = [KEYBOARD_VALUES.ENTER, KEYBOARD_VALUES.EMPTY, KEYBOARD_VALUES.DOWN, KEYBOARD_VALUES.UP, KEYBOARD_VALUES.HOME, KEYBOARD_VALUES.END];
735
- if (props.autocomplete && selectionIndex.value > -1 || keyAutocompleteOut.includes(e.key)) {
736
- e.preventDefault();
737
- }
738
- const keyMenuOpen = [KEYBOARD_VALUES.ENTER, KEYBOARD_VALUES.DOWN, KEYBOARD_VALUES.EMPTY];
739
- if (keyMenuOpen.includes(e.key)) {
740
- menu.value = true;
741
- }
742
- const keyMenuOut = [KEYBOARD_VALUES.ESC, KEYBOARD_VALUES.TAB];
743
- if (keyMenuOut.includes(e.key)) {
744
- highlightIndex.value = -1;
745
- menu.value = false;
746
- }
747
- const itemCount = displayItems.value.length;
748
- if (menu.value && itemCount > 0) {
749
- if (e.key === KEYBOARD_VALUES.DOWN) {
750
- highlightIndex.value = highlightIndex.value < itemCount - 1 ? highlightIndex.value + 1 : 0;
751
- } else if (e.key === KEYBOARD_VALUES.UP) {
752
- highlightIndex.value = highlightIndex.value > 0 ? highlightIndex.value - 1 : itemCount - 1;
753
- } else if (e.key === KEYBOARD_VALUES.HOME) {
754
- highlightIndex.value = 0;
755
- } else if (e.key === KEYBOARD_VALUES.END) {
756
- highlightIndex.value = itemCount - 1;
757
- } else if (e.key === KEYBOARD_VALUES.ENTER && highlightIndex.value >= 0) {
758
- handleSelect(displayItems.value[highlightIndex.value], null);
759
- highlightIndex.value = -1;
760
- return;
761
- }
762
- }
763
- if (e.key === KEYBOARD_VALUES.HOME) {
764
- origamListRef.value?.focus("first");
765
- } else if (e.key === KEYBOARD_VALUES.END) {
766
- origamListRef.value?.focus("last");
767
- }
768
- const keyAutocompleteEnter = [KEYBOARD_VALUES.ENTER, KEYBOARD_VALUES.TAB];
769
- if (props.autocomplete) {
770
- if (highlightFirst.value && keyAutocompleteEnter.includes(e.key)) {
771
- handleSelect(displayItems.value[0]);
772
- }
773
- if (e.key === KEYBOARD_VALUES.DOWN && highlightFirst.value) {
774
- origamListRef.value?.focus("next");
775
- }
776
- const keyBack = [KEYBOARD_VALUES.BACKSPACE, KEYBOARD_VALUES.DELETE];
777
- if (keyBack.includes(e.key)) {
778
- if (!props.multiple && model.value.length > 0 && !search.value) return handleSelect(model.value[0], false);
779
- if (~selectionIndex.value) {
780
- const originalSelectionIndex = selectionIndex.value;
781
- handleSelect(model.value[selectionIndex.value], false);
782
- selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
783
- } else if (e.key === KEYBOARD_VALUES.BACKSPACE && !search.value) {
784
- selectionIndex.value = length - 1;
785
- }
786
- }
787
- if (!props.multiple) return;
788
- if (e.key === KEYBOARD_VALUES.LEFT) {
789
- if (selectionIndex.value < 0 && (selectionStart ?? 0) > 0) return;
790
- const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
791
- if (model.value[prev]) {
792
- selectionIndex.value = prev;
793
- } else {
794
- selectionIndex.value = -1;
795
- origamTextFieldRef.value?.setSelectionRange(search.value?.length ?? null, search.value?.length ?? null);
796
- }
797
- }
798
- if (e.key === KEYBOARD_VALUES.RIGHT) {
799
- if (selectionIndex.value < 0) return;
800
- const next = selectionIndex.value + 1;
801
- if (model.value[next]) {
802
- selectionIndex.value = next;
803
- } else {
804
- selectionIndex.value = -1;
805
- origamTextFieldRef.value?.setSelectionRange(0, 0);
806
- }
807
- }
808
- } else {
809
- const KEYBOARD_LOOKUP_THRESHOLD = 1e3;
810
- const checkPrintable = (e2) => {
811
- const isPrintableChar = e2.key.length === 1;
812
- const noModifier = !e2.ctrlKey && !e2.metaKey && !e2.altKey;
813
- return isPrintableChar && noModifier;
814
- };
815
- if (props.multiple || !checkPrintable(e)) return;
816
- const now = performance.now();
817
- if (now - keyboardLookupLastTime > KEYBOARD_LOOKUP_THRESHOLD) {
818
- keyboardLookupPrefix = "";
819
- }
820
- keyboardLookupPrefix += e.key.toLowerCase();
821
- keyboardLookupLastTime = now;
822
- const item = items.value.find((item2) => item2.title?.toLowerCase().startsWith(keyboardLookupPrefix));
823
- if (item !== void 0) {
824
- model.value = [item];
825
- const index = displayItems.value.indexOf(item);
826
- scheduleScrollFrame(() => {
827
- if (index >= 0) {
828
- origamVirtualScrollRef.value?.scrollToIndex(index);
829
- }
830
- });
831
- }
832
- }
1661
+ if (!e.key || props.readonly || form?.isReadonly.value) return;
1662
+ const selectionStart = origamTextFieldRef.value?.selectionStart;
1663
+ const length = model.value.length;
1664
+ const keyAutocompleteOut = [
1665
+ KEYBOARD_VALUES.ENTER,
1666
+ KEYBOARD_VALUES.EMPTY,
1667
+ KEYBOARD_VALUES.DOWN,
1668
+ KEYBOARD_VALUES.UP,
1669
+ KEYBOARD_VALUES.HOME,
1670
+ KEYBOARD_VALUES.END
1671
+ ];
1672
+ if (props.autocomplete && selectionIndex.value > -1 || keyAutocompleteOut.includes(e.key)) {
1673
+ e.preventDefault();
1674
+ }
1675
+ const keyMenuOpen = [
1676
+ KEYBOARD_VALUES.ENTER,
1677
+ KEYBOARD_VALUES.DOWN,
1678
+ KEYBOARD_VALUES.EMPTY
1679
+ ];
1680
+ if (keyMenuOpen.includes(e.key)) {
1681
+ menu.value = true;
1682
+ }
1683
+ const keyMenuOut = [KEYBOARD_VALUES.ESC, KEYBOARD_VALUES.TAB];
1684
+ if (keyMenuOut.includes(e.key)) {
1685
+ highlightIndex.value = -1;
1686
+ menu.value = false;
1687
+ }
1688
+ // WAI-ARIA combobox: highlight navigation stays on the <input>.
1689
+ // DOM focus never leaves the input — only aria-activedescendant changes.
1690
+ const itemCount = displayItems.value.length;
1691
+ if (menu.value && itemCount > 0) {
1692
+ if (e.key === KEYBOARD_VALUES.DOWN) {
1693
+ highlightIndex.value = highlightIndex.value < itemCount - 1 ? highlightIndex.value + 1 : 0;
1694
+ } else if (e.key === KEYBOARD_VALUES.UP) {
1695
+ highlightIndex.value = highlightIndex.value > 0 ? highlightIndex.value - 1 : itemCount - 1;
1696
+ } else if (e.key === KEYBOARD_VALUES.HOME) {
1697
+ highlightIndex.value = 0;
1698
+ } else if (e.key === KEYBOARD_VALUES.END) {
1699
+ highlightIndex.value = itemCount - 1;
1700
+ } else if (e.key === KEYBOARD_VALUES.ENTER && highlightIndex.value >= 0) {
1701
+ handleSelect(displayItems.value[highlightIndex.value], null);
1702
+ highlightIndex.value = -1;
1703
+ return;
1704
+ }
1705
+ }
1706
+ if (e.key === KEYBOARD_VALUES.HOME) {
1707
+ origamListRef.value?.focus("first");
1708
+ } else if (e.key === KEYBOARD_VALUES.END) {
1709
+ origamListRef.value?.focus("last");
1710
+ }
1711
+ const keyAutocompleteEnter = [KEYBOARD_VALUES.ENTER, KEYBOARD_VALUES.TAB];
1712
+ if (props.autocomplete) {
1713
+ if (highlightFirst.value && keyAutocompleteEnter.includes(e.key)) {
1714
+ handleSelect(displayItems.value[0]);
1715
+ }
1716
+ if (e.key === KEYBOARD_VALUES.DOWN && highlightFirst.value) {
1717
+ origamListRef.value?.focus("next");
1718
+ }
1719
+ const keyBack = [KEYBOARD_VALUES.BACKSPACE, KEYBOARD_VALUES.DELETE];
1720
+ if (keyBack.includes(e.key)) {
1721
+ if (!props.multiple && model.value.length > 0 && !search.value) return handleSelect(model.value[0], false);
1722
+ if (~selectionIndex.value) {
1723
+ const originalSelectionIndex = selectionIndex.value;
1724
+ handleSelect(model.value[selectionIndex.value], false);
1725
+ selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
1726
+ } else if (e.key === KEYBOARD_VALUES.BACKSPACE && !search.value) {
1727
+ selectionIndex.value = length - 1;
1728
+ }
1729
+ }
1730
+ if (!props.multiple) return;
1731
+ if (e.key === KEYBOARD_VALUES.LEFT) {
1732
+ if (selectionIndex.value < 0 && (selectionStart ?? 0) > 0) return;
1733
+ const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
1734
+ if (model.value[prev]) {
1735
+ selectionIndex.value = prev;
1736
+ } else {
1737
+ selectionIndex.value = -1;
1738
+ origamTextFieldRef.value?.setSelectionRange(search.value?.length ?? null, search.value?.length ?? null);
1739
+ }
1740
+ }
1741
+ if (e.key === KEYBOARD_VALUES.RIGHT) {
1742
+ if (selectionIndex.value < 0) return;
1743
+ const next = selectionIndex.value + 1;
1744
+ if (model.value[next]) {
1745
+ selectionIndex.value = next;
1746
+ } else {
1747
+ selectionIndex.value = -1;
1748
+ origamTextFieldRef.value?.setSelectionRange(0, 0);
1749
+ }
1750
+ }
1751
+ } else {
1752
+ // html select hotkeys
1753
+ const KEYBOARD_LOOKUP_THRESHOLD = 1e3;
1754
+ const checkPrintable = (e) => {
1755
+ const isPrintableChar = e.key.length === 1;
1756
+ const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey;
1757
+ return isPrintableChar && noModifier;
1758
+ };
1759
+ if (props.multiple || !checkPrintable(e)) return;
1760
+ const now = performance.now();
1761
+ if (now - keyboardLookupLastTime > KEYBOARD_LOOKUP_THRESHOLD) {
1762
+ keyboardLookupPrefix = "";
1763
+ }
1764
+ keyboardLookupPrefix += e.key.toLowerCase();
1765
+ keyboardLookupLastTime = now;
1766
+ const item = items.value.find((item) => item.title?.toLowerCase().startsWith(keyboardLookupPrefix));
1767
+ if (item !== undefined) {
1768
+ model.value = [item];
1769
+ const index = displayItems.value.indexOf(item);
1770
+ scheduleScrollFrame(() => {
1771
+ if (index >= 0) {
1772
+ origamVirtualScrollRef.value?.scrollToIndex(index);
1773
+ }
1774
+ });
1775
+ }
1776
+ }
833
1777
  };
834
1778
  const handleBlur = (e) => {
835
- if (!origamListRef.value?.$el.contains(e.relatedTarget)) {
836
- menu.value = false;
837
- }
1779
+ if (!origamListRef.value?.$el.contains(e.relatedTarget)) {
1780
+ menu.value = false;
1781
+ }
838
1782
  };
839
1783
  const handleChange = (e) => {
840
- if (matchesSelector(origamTextFieldRef.value, ":autofill") || matchesSelector(origamTextFieldRef.value, ":-webkit-autofill")) {
841
- const item = items.value.find((item2) => item2.title === e.target.value);
842
- if (item) {
843
- handleSelect(item);
844
- }
845
- }
1784
+ if (matchesSelector(origamTextFieldRef.value, ":autofill") || matchesSelector(origamTextFieldRef.value, ":-webkit-autofill")) {
1785
+ const item = items.value.find((item) => item.title === e.target.value);
1786
+ if (item) {
1787
+ handleSelect(item);
1788
+ }
1789
+ }
846
1790
  };
847
1791
  const handleAfterLeave = () => {
848
- highlightIndex.value = -1;
849
- if (isFocused.value) {
850
- isPristine.value = true;
851
- origamTextFieldRef.value?.focus();
852
- }
1792
+ highlightIndex.value = -1;
1793
+ if (isFocused.value) {
1794
+ isPristine.value = true;
1795
+ origamTextFieldRef.value?.focus();
1796
+ }
853
1797
  };
854
1798
  const handleFocusin = () => {
855
- isFocused.value = true;
856
- scheduleMacrotask(() => {
857
- listHasFocus.value = true;
858
- });
1799
+ isFocused.value = true;
1800
+ scheduleMacrotask(() => {
1801
+ listHasFocus.value = true;
1802
+ });
859
1803
  };
860
1804
  const handleFocusout = () => {
861
- listHasFocus.value = false;
1805
+ listHasFocus.value = false;
862
1806
  };
863
1807
  const handleModelUpdate = (v) => {
864
- if (v == null || v === "" && !props.multiple) {
865
- model.value = [];
866
- }
867
- if (origamTextFieldRef.value) {
868
- origamTextFieldRef.value.value = "";
869
- }
1808
+ if (v == null || v === "" && !props.multiple) {
1809
+ model.value = [];
1810
+ }
1811
+ if (origamTextFieldRef.value) {
1812
+ origamTextFieldRef.value.value = "";
1813
+ }
870
1814
  };
871
1815
  const handleMousedown = (e) => {
872
- e.preventDefault();
1816
+ e.preventDefault();
873
1817
  };
1818
+ /*********************************************************
1819
+ * Chips
1820
+ *
1821
+ * @description
1822
+ * Chip slot props and chip event handlers (close, keydown,
1823
+ * mousedown) for the multi-select chip display mode.
1824
+ ********************************************************/
874
1825
  const hasChips = computed(() => {
875
- return props.chips || slots.chip;
1826
+ return props.chips || slots.chip;
876
1827
  });
1828
+ /*********************************************************
1829
+ * chipSlotProps
1830
+ *
1831
+ * @description
1832
+ * Return typed as Record<string, unknown> so vue-tsc does not try to
1833
+ * validate the event-handler keys ('onClick:close', 'onKeydown', …)
1834
+ * against IChipProps when the object is spread via v-bind on <origam-chip>.
1835
+ * `bgColor` / `color` are deliberately OMITTED (#456) — they used to be
1836
+ * hardcoded RGB literals, hiding the chip behind whatever theme was
1837
+ * active. `OrigamChip`'s own SCSS already reads
1838
+ * `var(--origam-chip---background-color)` / `var(--origam-chip---color)`
1839
+ * with no inline fallback, and the token pipeline emits both
1840
+ * (`packages/ds/tokens/component/chip.json` → `color.surface.overlay` /
1841
+ * `color.text.primary`) — so leaving them unset lets Chip resolve its
1842
+ * own themed default instead of this component overriding it.
1843
+ ********************************************************/
877
1844
  const chipSlotProps = (item) => {
878
- return {
879
- closable: props.closableChips,
880
- disabled: item.props?.disabled,
881
- border: true,
882
- rounded: true,
883
- "onClick:close": (e) => handleChipClose(e, item),
884
- onKeydown: (e) => handleChipKeydown(e, item),
885
- onMousedown: (e) => handleChipMousedown(e),
886
- modelValue: true,
887
- size: "small",
888
- ...props.chipProps
889
- };
1845
+ return {
1846
+ closable: props.closableChips,
1847
+ disabled: item.props?.disabled,
1848
+ border: true,
1849
+ rounded: true,
1850
+ "onClick:close": (e) => handleChipClose(e, item),
1851
+ onKeydown: (e) => handleChipKeydown(e, item),
1852
+ onMousedown: (e) => handleChipMousedown(e),
1853
+ modelValue: true,
1854
+ size: "small",
1855
+ ...props.chipProps
1856
+ };
890
1857
  };
891
1858
  const handleChipClose = (e, item) => {
892
- e.stopPropagation();
893
- e.preventDefault();
894
- handleSelect(item, false);
1859
+ e.stopPropagation();
1860
+ e.preventDefault();
1861
+ handleSelect(item, false);
895
1862
  };
896
1863
  const handleChipKeydown = (e, item) => {
897
- if (e.key !== KEYBOARD_VALUES.ENTER && e.key !== KEYBOARD_VALUES.EMPTY) return;
898
- e.preventDefault();
899
- e.stopPropagation();
900
- handleChipClose(e, item);
1864
+ if (e.key !== KEYBOARD_VALUES.ENTER && e.key !== KEYBOARD_VALUES.EMPTY) return;
1865
+ e.preventDefault();
1866
+ e.stopPropagation();
1867
+ handleChipClose(e, item);
901
1868
  };
902
1869
  const handleChipMousedown = (e) => {
903
- e.preventDefault();
904
- e.stopPropagation();
1870
+ e.preventDefault();
1871
+ e.stopPropagation();
905
1872
  };
906
1873
  watch(isFocused, (val, oldVal) => {
907
- if (val === oldVal) return;
908
- emit("update:focused", val);
909
- if (val) {
910
- isSelecting.value = true;
911
- if (props.autocomplete) {
912
- search.value = props.multiple ? "" : String(model.value?.at(-1)?.props.title ?? "");
913
- }
914
- isPristine.value = true;
915
- nextTick(() => {
916
- isSelecting.value = false;
917
- if (props.autocomplete && !props.multiple && search.value) {
918
- const root = vm?.proxy?.$el;
919
- const input = root?.querySelector("input");
920
- input?.select();
921
- }
922
- });
923
- } else {
924
- if (!props.multiple && search.value == null) model.value = [];
925
- else if (highlightFirst.value && !listHasFocus.value && !model.value.some(({ value }) => value === displayItems.value[0].value)) {
926
- handleSelect(displayItems.value[0]);
927
- }
928
- menu.value = false;
929
- search.value = "";
930
- selectionIndex.value = -1;
931
- }
1874
+ if (val === oldVal) return;
1875
+ /*********************************************************
1876
+ * unemitted-declarations — update:focused relay
1877
+ *
1878
+ * @description
1879
+ * `update:focused` was declared but never fired:
1880
+ * `v-model:focused="isFocused"` only CONSUMES the echo from the
1881
+ * nested `<origam-text-field>` into this local ref, it never
1882
+ * relays it back out to Select's own consumers.
1883
+ ********************************************************/
1884
+ emit("update:focused", val);
1885
+ if (val) {
1886
+ isSelecting.value = true;
1887
+ // Sync `search` (the input value) from the current model on focus
1888
+ // — but ONLY in autocomplete mode, where the input is meant to
1889
+ // be editable so the user can refine their pick. In non-
1890
+ // autocomplete mode this writes the selected title into the
1891
+ // `<input value>`, which then renders ALONGSIDE the
1892
+ // `.origam-select__selection` div that ALSO carries the title
1893
+ // → user sees "Germany Germany" in the field after a re-focus
1894
+ // (tab-out-then-back, click-elsewhere-then-back, …). The input
1895
+ // in non-autocomplete is effectively a screen-reader proxy
1896
+ // (`pointer-events: none`, opacity flipped on by --active) —
1897
+ // it must stay empty so it doesn't visually duplicate the
1898
+ // selection.
1899
+ if (props.autocomplete) {
1900
+ // @ts-expect-error TODO
1901
+ search.value = props.multiple ? "" : String(model.value?.at(-1)?.props.title ?? "");
1902
+ }
1903
+ isPristine.value = true;
1904
+ nextTick(() => {
1905
+ isSelecting.value = false;
1906
+ // Select-all the input text in single-autocomplete mode
1907
+ // when there IS a selection. The user expects: "click
1908
+ // the field with `France` already picked, start typing
1909
+ // → my keystrokes REPLACE the selection". Without the
1910
+ // select-all the cursor lands at the end and typing
1911
+ // appends — `France` + `S` → `FranceS` filters against
1912
+ // nothing and looks broken.
1913
+ // Skip in multiple mode (the input is meant to be a
1914
+ // fresh filter input, NOT a copy of any chip).
1915
+ // We DOM-query the input instead of going through
1916
+ // `origamTextFieldRef.value.select()` — the
1917
+ // `forwardRefs` proxy on TextField doesn't reliably
1918
+ // expose the HTMLInputElement's `select()` method.
1919
+ if (props.autocomplete && !props.multiple && search.value) {
1920
+ const root = vm?.proxy?.$el;
1921
+ const input = root?.querySelector("input");
1922
+ input?.select();
1923
+ }
1924
+ });
1925
+ } else {
1926
+ if (!props.multiple && search.value == null) model.value = [];
1927
+ else if (highlightFirst.value && !listHasFocus.value && !model.value.some(({ value }) => value === displayItems.value[0].value)) {
1928
+ handleSelect(displayItems.value[0]);
1929
+ }
1930
+ menu.value = false;
1931
+ search.value = "";
1932
+ selectionIndex.value = -1;
1933
+ }
932
1934
  });
1935
+ /*********************************************************
1936
+ * DEFERRED TO onMounted — NOT AN OPTIMISATION
1937
+ *
1938
+ * @description
1939
+ * `watch(search, cb)` reads `search.value` synchronously the instant it
1940
+ * is created, to seed `oldValue`. `search` is a `useVModel(props,
1941
+ * 'search', '')` model — its getter reads `props.search`. Creating this
1942
+ * watch at the top level of `setup()` forced that seeding read before
1943
+ * Vue's `beforeCreate` hook runs, which is where the ADR-005 theme
1944
+ * resolver patches `instance.props`. A `computed` (which the `useVModel`
1945
+ * model is) caches whatever its first evaluation saw and only
1946
+ * invalidates on a tracked dependency change; the resolver's
1947
+ * `Object.defineProperty` patch is not one on a static mount with no
1948
+ * parent re-render, so `search` stayed cached at `''` forever — a theme
1949
+ * naming `search` never landed. Deferring to `onMounted` delays the
1950
+ * seeding read to after the component's first render, which is already
1951
+ * past `beforeCreate`.
1952
+ ********************************************************/
933
1953
  onMounted(() => {
934
- watch(search, (val) => {
935
- if (!isFocused.value || isSelecting.value) return;
936
- if (val) menu.value = true;
937
- isPristine.value = !val;
938
- });
1954
+ watch(search, (val) => {
1955
+ if (!isFocused.value || isSelecting.value) return;
1956
+ if (val) menu.value = true;
1957
+ isPristine.value = !val;
1958
+ });
939
1959
  });
940
1960
  watch(menu, () => {
941
- if (!props.hideSelected && menu.value && model.value.length) {
942
- const index = displayItems.value.findIndex(
943
- (item) => model.value.some((s) => props.valueComparator ? props.valueComparator(s.value, item.value) : deepEqual(s.value, item.value))
944
- );
945
- scheduleScrollFrame(() => {
946
- if (index >= 0) {
947
- origamVirtualScrollRef.value?.scrollToIndex(index);
948
- }
949
- });
950
- }
1961
+ if (!props.hideSelected && menu.value && model.value.length) {
1962
+ const index = displayItems.value.findIndex((item) => model.value.some((s) => props.valueComparator ? props.valueComparator(s.value, item.value) : deepEqual(s.value, item.value)));
1963
+ scheduleScrollFrame(() => {
1964
+ if (index >= 0) {
1965
+ origamVirtualScrollRef.value?.scrollToIndex(index);
1966
+ }
1967
+ });
1968
+ }
951
1969
  });
952
1970
  watch(() => props.items, (newVal, oldVal) => {
953
- if (menu.value) return;
954
- if (isFocused.value && !oldVal.length && newVal.length) {
955
- menu.value = true;
956
- }
1971
+ if (menu.value) return;
1972
+ if (isFocused.value && !oldVal.length && newVal.length) {
1973
+ menu.value = true;
1974
+ }
957
1975
  });
958
1976
  const hasList = computed(() => {
959
- return !props.hideNoData || displayItems.value.length || slots.prependItem || slots.appendItem || slots.noData;
1977
+ return !props.hideNoData || displayItems.value.length || slots.prependItem || slots.appendItem || slots.noData;
960
1978
  });
1979
+ /*********************************************************
1980
+ * Forwarded props
1981
+ ********************************************************/
961
1982
  const textFieldProps = computed(() => {
962
- return filterPropsOf(OrigamTextField, props, ["class", "id", "style", "counterValue", "dirty", "modelValue", "placeholder", "validationValue", "focused"]);
1983
+ return filterPropsOf(OrigamTextField, props, [
1984
+ "class",
1985
+ "id",
1986
+ "style",
1987
+ "counterValue",
1988
+ "dirty",
1989
+ "modelValue",
1990
+ "placeholder",
1991
+ "validationValue",
1992
+ "focused"
1993
+ ]);
963
1994
  });
1995
+ // The dropdown rows must sit on the same height rung as the control, so the
1996
+ // popup never dwarfs a small field. `size` is optional on the select and an
1997
+ // unsized `.origam-field` still resolves its control height from the `md`
1998
+ // rung — the list has to be told that explicitly, because with no `size` at
1999
+ // all `useSize` emits no rung class and the row would fall back to the
2000
+ // standalone-list height instead.
964
2001
  const listSize = computed(() => {
965
- return props.size ?? SIZES.DEFAULT;
2002
+ return props.size ?? SIZES.DEFAULT;
966
2003
  });
967
2004
  const isDirty = computed(() => {
968
- return model.value.length > 0;
2005
+ return model.value.length > 0;
969
2006
  });
970
2007
  const placeholder = computed(() => {
971
- return isDirty.value || !isFocused.value && props.label && !props.persistentPlaceholder ? void 0 : props.placeholder;
2008
+ return isDirty.value || !isFocused.value && props.label && !props.persistentPlaceholder ? undefined : props.placeholder;
972
2009
  });
2010
+ /*********************************************************
2011
+ * Accessible name (#622, #1251)
2012
+ *
2013
+ * @description
2014
+ * `aria-label` / `title` mirror `props.label` only. Without a `label`
2015
+ * prop NOTHING is emitted: the name then comes from an external
2016
+ * `<label for>` / the consumer's `aria-labelledby`, which an `aria-label`
2017
+ * would override (it ranks above `<label for>` in the name computation).
2018
+ * The open/close wording stays on the toggle button, not on the input.
2019
+ ********************************************************/
2020
+ /*********************************************************
2021
+ * Class & Style
2022
+ *
2023
+ * @description
2024
+ * selectStyles and selectClasses compose the BEM block.
2025
+ ********************************************************/
973
2026
  const selectStyles = computed(() => {
974
- return [
975
- props.style
976
- ];
2027
+ return [props.style];
977
2028
  });
978
2029
  const getSelectionClasses = (index) => {
979
- return [
980
- "origam-select__selection",
981
- { "origam-select__selection--selected": index === selectionIndex.value },
982
- textColorClasses.value
983
- ];
2030
+ return [
2031
+ "origam-select__selection",
2032
+ { "origam-select__selection--selected": index === selectionIndex.value },
2033
+ textColorClasses.value
2034
+ ];
984
2035
  };
985
2036
  const selectClasses = computed(() => {
986
- return [
987
- "origam-select",
988
- `origam-select--${props.multiple ? "multiple" : "single"}`,
989
- {
990
- "origam-select--autocomplete": props.autocomplete,
991
- "origam-select--active-menu": menu.value,
992
- "origam-select--chips": props.chips,
993
- "origam-select--selected": selectionIndex.value > -1
994
- },
995
- props.class
996
- ];
2037
+ return [
2038
+ "origam-select",
2039
+ `origam-select--${props.multiple ? "multiple" : "single"}`,
2040
+ {
2041
+ "origam-select--autocomplete": props.autocomplete,
2042
+ "origam-select--active-menu": menu.value,
2043
+ "origam-select--chips": props.chips,
2044
+ "origam-select--selected": selectionIndex.value > -1
2045
+ },
2046
+ props.class
2047
+ ];
997
2048
  });
2049
+ /*********************************************************
2050
+ * useStyle
2051
+ *
2052
+ * @description
2053
+ * #372 — `id` must be seeded with `() => props.id`: without it, the id
2054
+ * returned here is a purely GENERATED one for the scoped stylesheet
2055
+ * selector, and the template's `:id="id"` on `<origam-text-field>`
2056
+ * would forward that generated id instead of the consumer's.
2057
+ * @description
2058
+ * `id` was already excluded from `textFieldProps` below
2059
+ * (`filterProps(props, [..., 'id', ...])`) because it needed this
2060
+ * explicit binding instead of the generic spread — the explicit
2061
+ * binding was simply missing.
2062
+ ********************************************************/
998
2063
  const { id, css, load, isLoaded, unload } = useStyle(selectStyles, () => props.id);
2064
+ /*********************************************************
2065
+ * Expose
2066
+ *
2067
+ * @description
2068
+ * Exposes filterProps and imperative handles to parent ref
2069
+ * consumers, forwarded through origamTextFieldRef.
2070
+ ********************************************************/
999
2071
  defineExpose(forwardRefs({
1000
- filterProps,
1001
- isFocused,
1002
- menu,
1003
- handleSelect,
1004
- css,
1005
- id,
1006
- load,
1007
- unload,
1008
- isLoaded
2072
+ filterProps,
2073
+ isFocused,
2074
+ menu,
2075
+ handleSelect,
2076
+ css,
2077
+ id,
2078
+ load,
2079
+ unload,
2080
+ isLoaded
1009
2081
  }, origamTextFieldRef));
1010
2082
  </script>
1011
2083