origam 2.38.0 → 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 +34 -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 +8 -8
@@ -194,382 +194,1194 @@ import { VARIANT_INPUT } from "../../enums/Commons/variant.enum";
194
194
  import { animate, nullifyTransforms } from "../../utils/Commons/animation.util";
195
195
  import { convertToUnit } from "../../utils/Commons/commons.util";
196
196
  import { getUid } from "../../utils/Commons/getCurrentInstance.util";
197
+ /*********************************************************
198
+ * Global
199
+ ********************************************************/
197
200
  const props = defineProps({
198
- centerAffix: { type: Boolean, required: false, default: true },
199
- dirty: { type: Boolean, required: false },
200
- disabled: { type: Boolean, required: false },
201
- error: { type: [String, Boolean], required: false },
202
- inline: { type: Boolean, required: false },
203
- label: { type: String, required: false },
204
- prefix: { type: String, required: false },
205
- suffix: { type: String, required: false },
206
- persistentClear: { type: Boolean, required: false },
207
- singleLine: { type: Boolean, required: false },
208
- required: { type: Boolean, required: false },
209
- id: { type: String, required: false },
210
- class: { type: [String, Array, Object], required: false },
211
- style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
212
- loading: { type: [Boolean, Number, Object], required: false },
213
- loadingText: { type: String, required: false },
214
- tag: { type: String, required: false },
215
- color: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
216
- bgColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
217
- appendInnerAvatar: { type: String, required: false },
218
- appendInnerIcon: { type: null, required: false },
219
- prependInnerAvatar: { type: String, required: false },
220
- prependInnerIcon: { type: null, required: false },
221
- clearIcon: { type: null, required: false, default: MDI_ICONS.CLOSE_CIRCLE_OUTLINE },
222
- clearable: { type: Boolean, required: false },
223
- prependInnerAriaLabel: { type: String, required: false },
224
- appendInnerAriaLabel: { type: String, required: false },
225
- border: { type: [Boolean, Number, String, Array], required: false, skipCheck: true },
226
- borderTop: { type: [Boolean, Number, String], required: false },
227
- borderLeft: { type: [Boolean, Number, String], required: false },
228
- borderBottom: { type: [Boolean, Number, String], required: false },
229
- borderRight: { type: [Boolean, Number, String], required: false },
230
- borderBlock: { type: [Boolean, Number, String], required: false },
231
- borderInline: { type: [Boolean, Number, String], required: false },
232
- borderInlineStart: { type: [Boolean, Number, String], required: false },
233
- borderInlineEnd: { type: [Boolean, Number, String], required: false },
234
- borderBlockStart: { type: [Boolean, Number, String], required: false },
235
- borderBlockEnd: { type: [Boolean, Number, String], required: false },
236
- borderColor: { type: String, required: false },
237
- borderStyle: { type: String, required: false },
238
- borderTopColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
239
- borderRightColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
240
- borderBottomColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
241
- borderLeftColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
242
- borderInlineStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
243
- borderInlineEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
244
- borderBlockStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
245
- borderBlockEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
246
- focused: { type: Boolean, required: false },
247
- density: { type: null, required: false, default: DENSITY.DEFAULT },
248
- text: { type: String, required: false },
249
- floating: { type: Boolean, required: false },
250
- name: { type: String, required: false },
251
- margin: { type: [Boolean, Number, String], required: false },
252
- marginTop: { type: [Boolean, Number, String], required: false },
253
- marginLeft: { type: [Boolean, Number, String], required: false },
254
- marginBottom: { type: [Boolean, Number, String], required: false },
255
- marginRight: { type: [Boolean, Number, String], required: false },
256
- marginBlock: { type: [Boolean, Number, String], required: false },
257
- marginInline: { type: [Boolean, Number, String], required: false },
258
- marginInlineStart: { type: [Boolean, Number, String], required: false },
259
- marginInlineEnd: { type: [Boolean, Number, String], required: false },
260
- marginBlockStart: { type: [Boolean, Number, String], required: false },
261
- marginBlockEnd: { type: [Boolean, Number, String], required: false },
262
- padding: { type: [Boolean, Number, String], required: false },
263
- paddingTop: { type: [Boolean, Number, String], required: false },
264
- paddingLeft: { type: [Boolean, Number, String], required: false },
265
- paddingBottom: { type: [Boolean, Number, String], required: false },
266
- paddingRight: { type: [Boolean, Number, String], required: false },
267
- paddingBlock: { type: [Boolean, Number, String], required: false },
268
- paddingInline: { type: [Boolean, Number, String], required: false },
269
- paddingInlineStart: { type: [Boolean, Number, String], required: false },
270
- paddingInlineEnd: { type: [Boolean, Number, String], required: false },
271
- paddingBlockStart: { type: [Boolean, Number, String], required: false },
272
- paddingBlockEnd: { type: [Boolean, Number, String], required: false },
273
- rounded: { type: [Boolean, Number, String, null], required: false, skipCheck: true },
274
- roundedTopRight: { type: [Boolean, Number, String], required: false },
275
- roundedTopLeft: { type: [Boolean, Number, String], required: false },
276
- roundedBottomLeft: { type: [Boolean, Number, String], required: false },
277
- roundedBottomRight: { type: [Boolean, Number, String], required: false },
278
- roundedStartStart: { type: [Boolean, Number, String], required: false },
279
- roundedStartEnd: { type: [Boolean, Number, String], required: false },
280
- roundedEndStart: { type: [Boolean, Number, String], required: false },
281
- roundedEndEnd: { type: [Boolean, Number, String], required: false },
282
- fontSize: { type: null, required: false },
283
- fontWeight: { type: null, required: false },
284
- lineHeight: { type: null, required: false },
285
- letterSpacing: { type: null, required: false },
286
- active: { type: [Boolean, Object], required: false },
287
- activeClass: { type: String, required: false },
288
- variant: { type: null, required: false, default: VARIANT_INPUT.OUTLINED },
289
- elevation: { type: [Number, String], required: false },
290
- size: { type: null, required: false }
201
+ centerAffix: {
202
+ type: Boolean,
203
+ required: false,
204
+ default: true
205
+ },
206
+ dirty: {
207
+ type: Boolean,
208
+ required: false
209
+ },
210
+ disabled: {
211
+ type: Boolean,
212
+ required: false
213
+ },
214
+ error: {
215
+ type: [String, Boolean],
216
+ required: false
217
+ },
218
+ inline: {
219
+ type: Boolean,
220
+ required: false
221
+ },
222
+ label: {
223
+ type: String,
224
+ required: false
225
+ },
226
+ prefix: {
227
+ type: String,
228
+ required: false
229
+ },
230
+ suffix: {
231
+ type: String,
232
+ required: false
233
+ },
234
+ persistentClear: {
235
+ type: Boolean,
236
+ required: false
237
+ },
238
+ singleLine: {
239
+ type: Boolean,
240
+ required: false
241
+ },
242
+ required: {
243
+ type: Boolean,
244
+ required: false
245
+ },
246
+ id: {
247
+ type: String,
248
+ required: false
249
+ },
250
+ class: {
251
+ type: [
252
+ String,
253
+ Array,
254
+ Object
255
+ ],
256
+ required: false
257
+ },
258
+ style: {
259
+ type: [
260
+ String,
261
+ Array,
262
+ Object,
263
+ Boolean,
264
+ null
265
+ ],
266
+ required: false,
267
+ skipCheck: true
268
+ },
269
+ loading: {
270
+ type: [
271
+ Boolean,
272
+ Number,
273
+ Object
274
+ ],
275
+ required: false
276
+ },
277
+ loadingText: {
278
+ type: String,
279
+ required: false
280
+ },
281
+ tag: {
282
+ type: String,
283
+ required: false
284
+ },
285
+ color: {
286
+ type: [
287
+ String,
288
+ Object,
289
+ Boolean,
290
+ null
291
+ ],
292
+ required: false,
293
+ skipCheck: true
294
+ },
295
+ bgColor: {
296
+ type: [
297
+ String,
298
+ Object,
299
+ Boolean,
300
+ null
301
+ ],
302
+ required: false,
303
+ skipCheck: true
304
+ },
305
+ appendInnerAvatar: {
306
+ type: String,
307
+ required: false
308
+ },
309
+ appendInnerIcon: {
310
+ type: null,
311
+ required: false
312
+ },
313
+ prependInnerAvatar: {
314
+ type: String,
315
+ required: false
316
+ },
317
+ prependInnerIcon: {
318
+ type: null,
319
+ required: false
320
+ },
321
+ clearIcon: {
322
+ type: null,
323
+ required: false,
324
+ default: MDI_ICONS.CLOSE_CIRCLE_OUTLINE
325
+ },
326
+ clearable: {
327
+ type: Boolean,
328
+ required: false
329
+ },
330
+ prependInnerAriaLabel: {
331
+ type: String,
332
+ required: false
333
+ },
334
+ appendInnerAriaLabel: {
335
+ type: String,
336
+ required: false
337
+ },
338
+ border: {
339
+ type: [
340
+ Boolean,
341
+ Number,
342
+ String,
343
+ Array
344
+ ],
345
+ required: false,
346
+ skipCheck: true
347
+ },
348
+ borderTop: {
349
+ type: [
350
+ Boolean,
351
+ Number,
352
+ String
353
+ ],
354
+ required: false
355
+ },
356
+ borderLeft: {
357
+ type: [
358
+ Boolean,
359
+ Number,
360
+ String
361
+ ],
362
+ required: false
363
+ },
364
+ borderBottom: {
365
+ type: [
366
+ Boolean,
367
+ Number,
368
+ String
369
+ ],
370
+ required: false
371
+ },
372
+ borderRight: {
373
+ type: [
374
+ Boolean,
375
+ Number,
376
+ String
377
+ ],
378
+ required: false
379
+ },
380
+ borderBlock: {
381
+ type: [
382
+ Boolean,
383
+ Number,
384
+ String
385
+ ],
386
+ required: false
387
+ },
388
+ borderInline: {
389
+ type: [
390
+ Boolean,
391
+ Number,
392
+ String
393
+ ],
394
+ required: false
395
+ },
396
+ borderInlineStart: {
397
+ type: [
398
+ Boolean,
399
+ Number,
400
+ String
401
+ ],
402
+ required: false
403
+ },
404
+ borderInlineEnd: {
405
+ type: [
406
+ Boolean,
407
+ Number,
408
+ String
409
+ ],
410
+ required: false
411
+ },
412
+ borderBlockStart: {
413
+ type: [
414
+ Boolean,
415
+ Number,
416
+ String
417
+ ],
418
+ required: false
419
+ },
420
+ borderBlockEnd: {
421
+ type: [
422
+ Boolean,
423
+ Number,
424
+ String
425
+ ],
426
+ required: false
427
+ },
428
+ borderColor: {
429
+ type: String,
430
+ required: false
431
+ },
432
+ borderStyle: {
433
+ type: String,
434
+ required: false
435
+ },
436
+ borderTopColor: {
437
+ type: [
438
+ String,
439
+ Object,
440
+ Boolean,
441
+ null
442
+ ],
443
+ required: false,
444
+ skipCheck: true
445
+ },
446
+ borderRightColor: {
447
+ type: [
448
+ String,
449
+ Object,
450
+ Boolean,
451
+ null
452
+ ],
453
+ required: false,
454
+ skipCheck: true
455
+ },
456
+ borderBottomColor: {
457
+ type: [
458
+ String,
459
+ Object,
460
+ Boolean,
461
+ null
462
+ ],
463
+ required: false,
464
+ skipCheck: true
465
+ },
466
+ borderLeftColor: {
467
+ type: [
468
+ String,
469
+ Object,
470
+ Boolean,
471
+ null
472
+ ],
473
+ required: false,
474
+ skipCheck: true
475
+ },
476
+ borderInlineStartColor: {
477
+ type: [
478
+ String,
479
+ Object,
480
+ Boolean,
481
+ null
482
+ ],
483
+ required: false,
484
+ skipCheck: true
485
+ },
486
+ borderInlineEndColor: {
487
+ type: [
488
+ String,
489
+ Object,
490
+ Boolean,
491
+ null
492
+ ],
493
+ required: false,
494
+ skipCheck: true
495
+ },
496
+ borderBlockStartColor: {
497
+ type: [
498
+ String,
499
+ Object,
500
+ Boolean,
501
+ null
502
+ ],
503
+ required: false,
504
+ skipCheck: true
505
+ },
506
+ borderBlockEndColor: {
507
+ type: [
508
+ String,
509
+ Object,
510
+ Boolean,
511
+ null
512
+ ],
513
+ required: false,
514
+ skipCheck: true
515
+ },
516
+ focused: {
517
+ type: Boolean,
518
+ required: false
519
+ },
520
+ density: {
521
+ type: null,
522
+ required: false,
523
+ default: DENSITY.DEFAULT
524
+ },
525
+ text: {
526
+ type: String,
527
+ required: false
528
+ },
529
+ floating: {
530
+ type: Boolean,
531
+ required: false
532
+ },
533
+ name: {
534
+ type: String,
535
+ required: false
536
+ },
537
+ margin: {
538
+ type: [
539
+ Boolean,
540
+ Number,
541
+ String
542
+ ],
543
+ required: false
544
+ },
545
+ marginTop: {
546
+ type: [
547
+ Boolean,
548
+ Number,
549
+ String
550
+ ],
551
+ required: false
552
+ },
553
+ marginLeft: {
554
+ type: [
555
+ Boolean,
556
+ Number,
557
+ String
558
+ ],
559
+ required: false
560
+ },
561
+ marginBottom: {
562
+ type: [
563
+ Boolean,
564
+ Number,
565
+ String
566
+ ],
567
+ required: false
568
+ },
569
+ marginRight: {
570
+ type: [
571
+ Boolean,
572
+ Number,
573
+ String
574
+ ],
575
+ required: false
576
+ },
577
+ marginBlock: {
578
+ type: [
579
+ Boolean,
580
+ Number,
581
+ String
582
+ ],
583
+ required: false
584
+ },
585
+ marginInline: {
586
+ type: [
587
+ Boolean,
588
+ Number,
589
+ String
590
+ ],
591
+ required: false
592
+ },
593
+ marginInlineStart: {
594
+ type: [
595
+ Boolean,
596
+ Number,
597
+ String
598
+ ],
599
+ required: false
600
+ },
601
+ marginInlineEnd: {
602
+ type: [
603
+ Boolean,
604
+ Number,
605
+ String
606
+ ],
607
+ required: false
608
+ },
609
+ marginBlockStart: {
610
+ type: [
611
+ Boolean,
612
+ Number,
613
+ String
614
+ ],
615
+ required: false
616
+ },
617
+ marginBlockEnd: {
618
+ type: [
619
+ Boolean,
620
+ Number,
621
+ String
622
+ ],
623
+ required: false
624
+ },
625
+ padding: {
626
+ type: [
627
+ Boolean,
628
+ Number,
629
+ String
630
+ ],
631
+ required: false
632
+ },
633
+ paddingTop: {
634
+ type: [
635
+ Boolean,
636
+ Number,
637
+ String
638
+ ],
639
+ required: false
640
+ },
641
+ paddingLeft: {
642
+ type: [
643
+ Boolean,
644
+ Number,
645
+ String
646
+ ],
647
+ required: false
648
+ },
649
+ paddingBottom: {
650
+ type: [
651
+ Boolean,
652
+ Number,
653
+ String
654
+ ],
655
+ required: false
656
+ },
657
+ paddingRight: {
658
+ type: [
659
+ Boolean,
660
+ Number,
661
+ String
662
+ ],
663
+ required: false
664
+ },
665
+ paddingBlock: {
666
+ type: [
667
+ Boolean,
668
+ Number,
669
+ String
670
+ ],
671
+ required: false
672
+ },
673
+ paddingInline: {
674
+ type: [
675
+ Boolean,
676
+ Number,
677
+ String
678
+ ],
679
+ required: false
680
+ },
681
+ paddingInlineStart: {
682
+ type: [
683
+ Boolean,
684
+ Number,
685
+ String
686
+ ],
687
+ required: false
688
+ },
689
+ paddingInlineEnd: {
690
+ type: [
691
+ Boolean,
692
+ Number,
693
+ String
694
+ ],
695
+ required: false
696
+ },
697
+ paddingBlockStart: {
698
+ type: [
699
+ Boolean,
700
+ Number,
701
+ String
702
+ ],
703
+ required: false
704
+ },
705
+ paddingBlockEnd: {
706
+ type: [
707
+ Boolean,
708
+ Number,
709
+ String
710
+ ],
711
+ required: false
712
+ },
713
+ rounded: {
714
+ type: [
715
+ Boolean,
716
+ Number,
717
+ String,
718
+ null
719
+ ],
720
+ required: false,
721
+ skipCheck: true
722
+ },
723
+ roundedTopRight: {
724
+ type: [
725
+ Boolean,
726
+ Number,
727
+ String
728
+ ],
729
+ required: false
730
+ },
731
+ roundedTopLeft: {
732
+ type: [
733
+ Boolean,
734
+ Number,
735
+ String
736
+ ],
737
+ required: false
738
+ },
739
+ roundedBottomLeft: {
740
+ type: [
741
+ Boolean,
742
+ Number,
743
+ String
744
+ ],
745
+ required: false
746
+ },
747
+ roundedBottomRight: {
748
+ type: [
749
+ Boolean,
750
+ Number,
751
+ String
752
+ ],
753
+ required: false
754
+ },
755
+ roundedStartStart: {
756
+ type: [
757
+ Boolean,
758
+ Number,
759
+ String
760
+ ],
761
+ required: false
762
+ },
763
+ roundedStartEnd: {
764
+ type: [
765
+ Boolean,
766
+ Number,
767
+ String
768
+ ],
769
+ required: false
770
+ },
771
+ roundedEndStart: {
772
+ type: [
773
+ Boolean,
774
+ Number,
775
+ String
776
+ ],
777
+ required: false
778
+ },
779
+ roundedEndEnd: {
780
+ type: [
781
+ Boolean,
782
+ Number,
783
+ String
784
+ ],
785
+ required: false
786
+ },
787
+ fontSize: {
788
+ type: null,
789
+ required: false
790
+ },
791
+ fontWeight: {
792
+ type: null,
793
+ required: false
794
+ },
795
+ lineHeight: {
796
+ type: null,
797
+ required: false
798
+ },
799
+ letterSpacing: {
800
+ type: null,
801
+ required: false
802
+ },
803
+ active: {
804
+ type: [Boolean, Object],
805
+ required: false
806
+ },
807
+ activeClass: {
808
+ type: String,
809
+ required: false
810
+ },
811
+ variant: {
812
+ type: null,
813
+ required: false,
814
+ default: VARIANT_INPUT.OUTLINED
815
+ },
816
+ elevation: {
817
+ type: [Number, String],
818
+ required: false
819
+ },
820
+ size: {
821
+ type: null,
822
+ required: false
823
+ }
291
824
  });
292
- defineEmits(["update:focused", "click:appendInner", "click:prependInner", "click:clear", "update:active"]);
825
+ defineEmits([
826
+ "update:focused",
827
+ "click:appendInner",
828
+ "click:prependInner",
829
+ "click:clear",
830
+ "update:active"
831
+ ]);
293
832
  defineSlots();
294
833
  const slots = useSlots();
295
834
  const attrs = useAttrs();
296
835
  const { t } = useLocale();
297
- const {
298
- prependInnerCommandAttrs,
299
- appendInnerCommandAttrs,
300
- hasAppendInner,
301
- onClickAppendInner: handleClickAppendInner,
302
- onClickPrependInner: handleClickPrependInner,
303
- onKeydownAppendInner: handleKeydownAppendInner,
304
- onKeydownPrependInner: handleKeydownPrependInner,
305
- clickClear: handleClickClear,
306
- hasPrependInner,
307
- hasClear
308
- } = useAdjacentInner(props);
836
+ /*********************************************************
837
+ * Adjacent
838
+ *
839
+ * @description
840
+ *
841
+ ********************************************************/
842
+ /*********************************************************
843
+ * Composables
844
+ ********************************************************/
845
+ const { prependInnerCommandAttrs, appendInnerCommandAttrs, hasAppendInner, onClickAppendInner: handleClickAppendInner, onClickPrependInner: handleClickPrependInner, onKeydownAppendInner: handleKeydownAppendInner, onKeydownPrependInner: handleKeydownPrependInner, clickClear: handleClickClear, hasPrependInner, hasClear } = useAdjacentInner(props);
846
+ /*********************************************************
847
+ * Clear button — accessible name (issue #443)
848
+ *
849
+ * @description
850
+ * Reuses the pre-existing, previously-unwired `origam.input.clear`
851
+ * locale key ("Clear {0}").
852
+ ********************************************************/
309
853
  const clearLabel = computed(() => t("origam.input.clear", props.label ?? ""));
854
+ /*********************************************************
855
+ * Input
856
+ *
857
+ * @description
858
+ *
859
+ ********************************************************/
310
860
  const uid = getUid();
311
861
  const id = computed(() => props.id || `input-${uid}`);
312
862
  const messagesId = computed(() => `${id.value}-messages`);
863
+ /*********************************************************
864
+ * Events
865
+ *
866
+ * @description
867
+ *
868
+ ********************************************************/
869
+ /*********************************************************
870
+ * Event handlers
871
+ ********************************************************/
313
872
  const handleClick = (e) => {
314
- if (e.target !== document.activeElement) {
315
- e.preventDefault();
316
- }
873
+ if (e.target !== document.activeElement) {
874
+ e.preventDefault();
875
+ }
317
876
  };
877
+ /*********************************************************
878
+ * Clear button (issue #443)
879
+ *
880
+ * @description
881
+ * Was a bare `<div @mousedown>` wrapping an `aria-hidden` icon whose
882
+ * own `@keydown`/`@focus`/`@blur` listeners could never fire —
883
+ * `OrigamIcon` never sets `tabindex`, so the icon was never reachable
884
+ * by Tab in the first place. Now a real `<button type="button">`
885
+ * (Tab-reachable, has an accessible name), but the trigger stays
886
+ * `@mousedown` — NOT `@click` — to preserve the exact pre-existing
887
+ * mouse behaviour: `handleMousedownClear` calls `preventDefault()` +
888
+ * `stopPropagation()` so clearing never blurs the input nor bubbles
889
+ * into the field root's own `@click`. A manual `@keydown` handler
890
+ * (Enter/Space) gives keyboard users the same action WITHOUT also
891
+ * binding `@click` — the button's native keyboard activation
892
+ * synthesizes a `click` DOM event nothing listens for, so there is no
893
+ * double-fire risk between the two paths.
894
+ ********************************************************/
318
895
  const handleKeydownClear = (e) => {
319
- if (e.key !== KEYBOARD_VALUES.ENTER && e.key !== KEYBOARD_VALUES.EMPTY) return;
320
- e.preventDefault();
321
- e.stopPropagation();
322
- handleClickClear(new MouseEvent("click"));
896
+ if (e.key !== KEYBOARD_VALUES.ENTER && e.key !== KEYBOARD_VALUES.EMPTY) return;
897
+ e.preventDefault();
898
+ e.stopPropagation();
899
+ handleClickClear(new MouseEvent("click"));
323
900
  };
324
901
  const handleMousedownClear = (e) => {
325
- e.preventDefault();
326
- e.stopPropagation();
327
- handleClickClear(e);
902
+ e.preventDefault();
903
+ e.stopPropagation();
904
+ handleClickClear(e);
328
905
  };
906
+ /*********************************************************
907
+ * Slot Props
908
+ *
909
+ * @description
910
+ *
911
+ ********************************************************/
329
912
  const controlRef = ref();
913
+ /*********************************************************
914
+ * slotProps — default-slot channel to every consumer's real <input>
915
+ *
916
+ * @description
917
+ * #422 — `required` was declared on IFieldProps and read nowhere: no
918
+ * asterisk (the label side already worked via the template-ref
919
+ * forwarding to OrigamLabel, one render tick later — verified with
920
+ * nextTick before assuming otherwise), but NO aria-required at all on
921
+ * any of the field-family inputs.
922
+ *
923
+ * @description
924
+ * `slotProps` is the one channel every `<origam-field>` consumer
925
+ * (TextField, NumberField, PasswordField, FileField) already
926
+ * destructures via `#default="{class, ref, ...fieldSlotProps}"` and
927
+ * spreads onto its real `<input>` — wiring `aria-required` here fixes
928
+ * all of them at once instead of duplicating it in each consumer.
929
+ ********************************************************/
330
930
  const slotProps = computed(() => {
331
- return {
332
- class: "origam-field__input",
333
- id: id.value,
334
- "aria-describedby": messagesId.value,
335
- "aria-required": props.required || void 0,
336
- isActive: isActive.value,
337
- isFocused: isFocused.value,
338
- ref: controlRef.value,
339
- onBlur: handleBlur,
340
- onFocus: handleFocus
341
- };
931
+ return {
932
+ class: "origam-field__input",
933
+ id: id.value,
934
+ "aria-describedby": messagesId.value,
935
+ "aria-required": props.required || undefined,
936
+ isActive: isActive.value,
937
+ isFocused: isFocused.value,
938
+ ref: controlRef.value,
939
+ onBlur: handleBlur,
940
+ onFocus: handleFocus
941
+ };
342
942
  });
943
+ /*********************************************************
944
+ * Typography — BEM child surface
945
+ *
946
+ * @description
947
+ * Emits --origam-field__label---font-size on the __label child element.
948
+ * The SCSS reads this var on &__label--floating (the animated floating
949
+ * label). The var is also consumed by the JS animation scale calculation
950
+ * (line: `getPropertyValue('--origam-field__label---font-size')`).
951
+ *
952
+ * ⛔ fontWeight / lineHeight / letterSpacing are NOT read via THIS
953
+ * `field__label` prefix — but they are NOT inert either (issue #501
954
+ * correction). `labelProps` / `floatingLabelProps` below forward the
955
+ * full prop set to the nested `<OrigamLabel>` via
956
+ * `origamLabelRef.value.filterProps(props, …)`, and `OrigamLabel` has
957
+ * its OWN `useTypography(props, 'label')` call that DOES read those
958
+ * three (`--origam-label---font-weight` / `---line-height` /
959
+ * `---letter-spacing`) — confirmed via `@vue/test-utils` + `nextTick`
960
+ * (the ref is `undefined` on the first render; the forward lands on
961
+ * the second, invisible-to-paint render per `useProps`'s own doc
962
+ * comment). Only `fontFamily` is genuinely dead on both prefixes.
963
+ ********************************************************/
343
964
  const { typographyStyles } = useTypography(props, "field__label");
965
+ /*********************************************************
966
+ * Label
967
+ *
968
+ * @description
969
+ *
970
+ ********************************************************/
344
971
  const origamLabelRef = ref();
345
972
  const hasLabel = computed(() => {
346
- return !props.singleLine && !!(props.label || slots.label);
973
+ return !props.singleLine && !!(props.label || slots.label);
347
974
  });
975
+ /*********************************************************
976
+ * Forwarded props
977
+ ********************************************************/
348
978
  const labelProps = computed(() => {
349
- const defaultLabelProps = origamLabelRef.value?.filterProps(props, ["text", "class", "style"]);
350
- return {
351
- class: ["origam-field__label"],
352
- for: id.value,
353
- text: props.label,
354
- ...defaultLabelProps,
355
- // BEM-child typography — emits --origam-field__label---font-size on the
356
- // label element so the SCSS floating rule and JS animation scale read it.
357
- style: typographyStyles.value,
358
- // The field's `border` / `rounded` visual props belong to
359
- // the FIELD outline (the input box). Forwarding them onto
360
- // the `<origam-label>` would draw a chip-like border + 8px
361
- // radius around the label text — which is what user
362
- // reported on OrigamFileField (the default `border: true,
363
- // rounded: true` defaults of FileField were bleeding into
364
- // the "Document" label). Reset them to `false` here so the
365
- // label always renders as plain text regardless of what the
366
- // surrounding field declares.
367
- border: false,
368
- rounded: false
369
- };
979
+ const defaultLabelProps = origamLabelRef.value?.filterProps(props, [
980
+ "text",
981
+ "class",
982
+ "style"
983
+ ]);
984
+ return {
985
+ class: ["origam-field__label"],
986
+ for: id.value,
987
+ text: props.label,
988
+ ...defaultLabelProps,
989
+ // BEM-child typography — emits --origam-field__label---font-size on the
990
+ // label element so the SCSS floating rule and JS animation scale read it.
991
+ style: typographyStyles.value,
992
+ // The field's `border` / `rounded` visual props belong to
993
+ // the FIELD outline (the input box). Forwarding them onto
994
+ // the `<origam-label>` would draw a chip-like border + 8px
995
+ // radius around the label text — which is what user
996
+ // reported on OrigamFileField (the default `border: true,
997
+ // rounded: true` defaults of FileField were bleeding into
998
+ // the "Document" label). Reset them to `false` here so the
999
+ // label always renders as plain text regardless of what the
1000
+ // surrounding field declares.
1001
+ border: false,
1002
+ rounded: false
1003
+ };
370
1004
  });
1005
+ /*********************************************************
1006
+ * Floating Label
1007
+ *
1008
+ * @description
1009
+ *
1010
+ ********************************************************/
371
1011
  const origamFloatingLabelRef = ref();
372
1012
  const hasFloatingLabel = computed(() => {
373
- return !props.singleLine && !!(props.label || slots.floatingLabel);
1013
+ return !props.singleLine && !!(props.label || slots.floatingLabel);
374
1014
  });
375
1015
  const floatingLabelProps = computed(() => {
376
- const defaultFloatingLabelProps = origamFloatingLabelRef.value?.filterProps(props, ["text", "class", "style"]);
377
- return {
378
- class: ["origam-field__label", "origam-field__label--floating"],
379
- for: id.value,
380
- text: props.label,
381
- floating: true,
382
- ref: "origamFloatingLabelRef",
383
- ...defaultFloatingLabelProps,
384
- // BEM-child typography — same var as labelProps so the floating
385
- // label's font-size SCSS rule and the JS scale animation both read it.
386
- style: typographyStyles.value,
387
- // Same reason as `labelProps` above — the field's `border` /
388
- // `rounded` defaults belong to the field outline, NOT to the
389
- // floating label that animates above/inside the input on focus.
390
- // Without this override the floating "Document" label inherits
391
- // `--border-thin` + `--rounded-md` from the field's defaults
392
- // and renders as a chip-bordered pill, which the user reported
393
- // as still wrong after fixing the static label.
394
- border: false,
395
- rounded: false
396
- };
1016
+ const defaultFloatingLabelProps = origamFloatingLabelRef.value?.filterProps(props, [
1017
+ "text",
1018
+ "class",
1019
+ "style"
1020
+ ]);
1021
+ return {
1022
+ class: ["origam-field__label", "origam-field__label--floating"],
1023
+ for: id.value,
1024
+ text: props.label,
1025
+ floating: true,
1026
+ ref: "origamFloatingLabelRef",
1027
+ ...defaultFloatingLabelProps,
1028
+ // BEM-child typography — same var as labelProps so the floating
1029
+ // label's font-size SCSS rule and the JS scale animation both read it.
1030
+ style: typographyStyles.value,
1031
+ // Same reason as `labelProps` above — the field's `border` /
1032
+ // `rounded` defaults belong to the field outline, NOT to the
1033
+ // floating label that animates above/inside the input on focus.
1034
+ // Without this override the floating "Document" label inherits
1035
+ // `--border-thin` + `--rounded-md` from the field's defaults
1036
+ // and renders as a chip-bordered pill, which the user reported
1037
+ // as still wrong after fixing the static label.
1038
+ border: false,
1039
+ rounded: false
1040
+ };
397
1041
  });
1042
+ /*********************************************************
1043
+ * Loader
1044
+ *
1045
+ * @description
1046
+ *
1047
+ ********************************************************/
398
1048
  const { loaderClasses, loaderConfig } = useLoader(props, LOADER_KIND.LINE);
399
1049
  const hasLoader = computed(() => {
400
- return slots.loader || loaderConfig.value.isActive;
1050
+ return slots.loader || loaderConfig.value.isActive;
401
1051
  });
1052
+ /*********************************************************
1053
+ * Prefix & suffix
1054
+ *
1055
+ * @description
1056
+ *
1057
+ ********************************************************/
402
1058
  const hasPrefix = computed(() => {
403
- return !!props.prefix || !!slots.prefix;
1059
+ return !!props.prefix || !!slots.prefix;
404
1060
  });
405
1061
  const hasSuffix = computed(() => {
406
- return !!props.suffix || !!slots.suffix;
1062
+ return !!props.suffix || !!slots.suffix;
407
1063
  });
1064
+ /*********************************************************
1065
+ * Effect
1066
+ *
1067
+ * @description
1068
+ * isActive is a ref that holds a boolean value indicating whether the field is active.
1069
+ ********************************************************/
408
1070
  const { focusClasses, isFocused, onFocus: handleFocus, onBlur: handleBlur } = useFocus(props);
409
1071
  const { isOn: active, config: activeState, toggle: handleActive } = useStateFlag(props, { state: "active" });
410
1072
  const isActive = computed(() => {
411
- return props.dirty || active.value || hasPrefix.value || hasSuffix.value;
1073
+ return props.dirty || active.value || hasPrefix.value || hasSuffix.value;
412
1074
  });
413
- const labelFrames = /* @__PURE__ */ new Set();
1075
+ /*********************************************************
1076
+ * WATCHERS DEFERRED TO onMounted — NOT AN OPTIMISATION
1077
+ *
1078
+ * @description
1079
+ * `watch(source, cb)` reads `source` synchronously the instant it is
1080
+ * created, to seed `oldValue` — regardless of `immediate`. `isFocused`
1081
+ * and `isActive` are `computed()`s that read `props.focused` /
1082
+ * `props.dirty` / `active.value` / `hasPrefix.value` / `hasSuffix.value`.
1083
+ * Creating these watchers at the top level of `setup()` forced that
1084
+ * seeding read before Vue's `beforeCreate` hook runs, which is where the
1085
+ * ADR-005 theme resolver patches `instance.props`. A `computed` caches
1086
+ * whatever its first evaluation saw and only invalidates on a tracked
1087
+ * dependency change; the resolver's `Object.defineProperty` patch is not
1088
+ * one on a static mount with no parent re-render, so `isFocused` /
1089
+ * `isActive` stayed cached at their pre-theme value forever — a theme
1090
+ * naming `focused`, `active`, `dirty`, `prefix` or `suffix` never
1091
+ * flipped `--origam-field--active` / `--origam-field--focused`.
1092
+ * Deferring both watchers to `onMounted` delays their first read to
1093
+ * after the component's first render, which is already past
1094
+ * `beforeCreate` — the template's own `fieldClasses` read gets there
1095
+ * first and seeds the correct, themed value.
1096
+ ********************************************************/
1097
+ /*********************************************************
1098
+ * scheduleLabelFrame — rAF bound to the component's lifetime (#719)
1099
+ *
1100
+ * @description
1101
+ * The floating-label animation is deferred by one frame so the label
1102
+ * and its target have been laid out before their rects are read.
1103
+ * Nothing cancelled that frame at unmount. The body is NOT benign:
1104
+ * it calls `getComputedStyle` twice — a bare global. Landing after
1105
+ * the jsdom environment is destroyed throws
1106
+ * `ReferenceError: getComputedStyle is not defined`, which fails the
1107
+ * whole Vitest run with zero red tests (the #706 family).
1108
+ *
1109
+ * @description
1110
+ * `onBeforeUnmount` cancels the armed frames and flips `disposed`, so
1111
+ * a schedule attempt that somehow arrives later is a no-op too.
1112
+ *
1113
+ * @description
1114
+ * Every armed id is tracked, NOT just the latest. Collapsing them into
1115
+ * a single handle would make a later call supersede an earlier one —
1116
+ * a coalescing semantic this component never had, and one no failing
1117
+ * test asks for. The fix adds cancellation at unmount and nothing else.
1118
+ ********************************************************/
1119
+ const labelFrames = new Set();
414
1120
  let disposed = false;
415
1121
  const scheduleLabelFrame = (cb) => {
416
- if (disposed || !IN_BROWSER) return;
417
- const id2 = requestAnimationFrame(() => {
418
- labelFrames.delete(id2);
419
- cb();
420
- });
421
- labelFrames.add(id2);
1122
+ if (disposed || !IN_BROWSER) return;
1123
+ const id = requestAnimationFrame(() => {
1124
+ labelFrames.delete(id);
1125
+ cb();
1126
+ });
1127
+ labelFrames.add(id);
422
1128
  };
423
1129
  onBeforeUnmount(() => {
424
- disposed = true;
425
- for (const id2 of labelFrames) cancelAnimationFrame(id2);
426
- labelFrames.clear();
1130
+ disposed = true;
1131
+ for (const id of labelFrames) cancelAnimationFrame(id);
1132
+ labelFrames.clear();
427
1133
  });
428
1134
  onMounted(() => {
429
- watch(isFocused, (newVal, oldVal) => {
430
- if (newVal !== oldVal) {
431
- handleActive();
432
- }
433
- });
434
- watch(isActive, (newVal, oldVal) => {
435
- if (hasLabel.value && newVal !== oldVal) {
436
- const el = origamLabelRef.value.$el;
437
- const targetEl = origamFloatingLabelRef.value.$el;
438
- scheduleLabelFrame(() => {
439
- const rect = nullifyTransforms(el);
440
- const targetRect = targetEl.getBoundingClientRect();
441
- const x = targetRect.x - rect.x;
442
- const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);
443
- const targetWidth = targetRect.width / 0.75;
444
- const width = Math.abs(targetWidth - rect.width) > 1 ? { maxWidth: convertToUnit(targetWidth) } : void 0;
445
- const style = getComputedStyle(el);
446
- const targetStyle = getComputedStyle(targetEl);
447
- const duration = parseFloat(style.transitionDuration) * 1e3 || 150;
448
- const scale = parseFloat(targetStyle.getPropertyValue("--origam-field__label---font-size"));
449
- const color2 = targetStyle.getPropertyValue("color");
450
- el.style.visibility = "visible";
451
- targetEl.style.visibility = "hidden";
452
- animate(el, {
453
- transform: `translate(${x}px, ${y}px) scale(${scale})`,
454
- color: color2,
455
- ...width
456
- }, {
457
- duration,
458
- easing: EASING.STANDARD,
459
- direction: newVal ? "normal" : "reverse"
460
- }).finished.then(() => {
461
- el.style.removeProperty("visibility");
462
- targetEl.style.removeProperty("visibility");
463
- });
464
- });
465
- }
466
- }, { flush: "post" });
1135
+ watch(isFocused, (newVal, oldVal) => {
1136
+ if (newVal !== oldVal) {
1137
+ handleActive();
1138
+ }
1139
+ });
1140
+ watch(isActive, (newVal, oldVal) => {
1141
+ if (hasLabel.value && newVal !== oldVal) {
1142
+ const el = origamLabelRef.value.$el;
1143
+ const targetEl = origamFloatingLabelRef.value.$el;
1144
+ scheduleLabelFrame(() => {
1145
+ const rect = nullifyTransforms(el);
1146
+ const targetRect = targetEl.getBoundingClientRect();
1147
+ const x = targetRect.x - rect.x;
1148
+ const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);
1149
+ const targetWidth = targetRect.width / .75;
1150
+ const width = Math.abs(targetWidth - rect.width) > 1 ? { maxWidth: convertToUnit(targetWidth) } : undefined;
1151
+ const style = getComputedStyle(el);
1152
+ const targetStyle = getComputedStyle(targetEl);
1153
+ const duration = parseFloat(style.transitionDuration) * 1e3 || 150;
1154
+ const scale = parseFloat(targetStyle.getPropertyValue("--origam-field__label---font-size"));
1155
+ const color = targetStyle.getPropertyValue("color");
1156
+ el.style.visibility = "visible";
1157
+ targetEl.style.visibility = "hidden";
1158
+ animate(el, {
1159
+ transform: `translate(${x}px, ${y}px) scale(${scale})`,
1160
+ color,
1161
+ ...width
1162
+ }, {
1163
+ duration,
1164
+ easing: EASING.STANDARD,
1165
+ direction: newVal ? "normal" : "reverse"
1166
+ }).finished.then(() => {
1167
+ el.style.removeProperty("visibility");
1168
+ targetEl.style.removeProperty("visibility");
1169
+ });
1170
+ });
1171
+ }
1172
+ }, { flush: "post" });
467
1173
  });
1174
+ /*********************************************************
1175
+ * Class & Style
1176
+ *
1177
+ * @description
1178
+ * fieldClasses is a computed property that returns an array of classes for the field element.
1179
+ * fieldStyles is a computed property that returns an array of styles for the field element.
1180
+ ********************************************************/
1181
+ // `activeColor` / `activeBgColor` (flat props) were removed — the
1182
+ // override now reads from the `active` object prop (`activeState`,
1183
+ // already resolved above by `useStateFlag` for the rounded/elevation
1184
+ // axes at line ~541). Gate stays `isActive.value && isFocused.value`
1185
+ // exactly as before: `isActive` alone also turns true on dirty/prefix/
1186
+ // suffix WITHOUT focus, and the accent colour is deliberately a
1187
+ // focus-only affordance (unlike rounded/elevation, which persist once
1188
+ // the field carries content).
468
1189
  const color = computed(() => {
469
- return isActive.value && isFocused.value && activeState.value?.color ? activeState.value.color : props.color;
1190
+ return isActive.value && isFocused.value && activeState.value?.color ? activeState.value.color : props.color;
470
1191
  });
471
1192
  const bgColor = computed(() => {
472
- return isActive.value && isFocused.value && activeState.value?.bgColor ? activeState.value.bgColor : props.bgColor;
1193
+ return isActive.value && isFocused.value && activeState.value?.bgColor ? activeState.value.bgColor : props.bgColor;
473
1194
  });
1195
+ // Phase 3 (Vague D) — class-first companion alongside inline styles.
1196
+ /*********************************************************
1197
+ * Color
1198
+ ********************************************************/
474
1199
  const { colorClasses, colorStyles } = useBothColor(bgColor, color);
1200
+ /*********************************************************
1201
+ * Border — #726
1202
+ *
1203
+ * @description
1204
+ * `borderStyles` ONLY. `borderClasses` is deliberately NOT bound on the
1205
+ * field root: `.origam--border-*` is a real `border-width` utility, so it
1206
+ * would paint a rectangle around `.origam-field` whose top edge sits
1207
+ * exactly where the floating label floats — re-creating the very defect
1208
+ * this fixes, one element further in.
1209
+ *
1210
+ * @description
1211
+ * The resolved declarations are re-routed into the outline's own token
1212
+ * channel by `fieldBorderVarStyles` below.
1213
+ ********************************************************/
475
1214
  const { borderStyles } = useBorder(props);
476
1215
  const { densityClasses } = useDensity(props);
477
- const {
478
- roundedClasses,
479
- roundedStyles,
480
- elevationClasses,
481
- elevationStyles
482
- } = useStateEffect(props, void 0, isActive, void 0, activeState);
1216
+ // Field re-defines its own `isActive` computed above (line 405) combining
1217
+ // `active` from useActive + `dirty` + `hasPrefix` + `hasSuffix` — pass
1218
+ // the computed one so the state-aware rounded / elevation cycle through
1219
+ // any `:active="{ rounded: 'lg', elevation: 'md' }"` override.
1220
+ const { roundedClasses, roundedStyles, elevationClasses, elevationStyles } = useStateEffect(props, undefined, isActive, undefined, activeState);
483
1221
  const { rtlClasses } = useRtl();
484
1222
  const { variantClasses } = useVariant(props);
485
1223
  const { sizeClasses } = useSize(props, "origam-field");
1224
+ // The `rounded` prop rounds the OUTER box (inline `border-radius` via
1225
+ // useStyle), but the field's inner chrome (outline legs, per-corner radii)
1226
+ // reads `--origam-field---border-radius` — which the prop never touched, so
1227
+ // the outline corners stayed at the default and mismatched the box (themes
1228
+ // had to force the var with `!important` hacks). Mirror the radius already
1229
+ // resolved by `roundedStyles` into the component var so both stay in sync.
1230
+ // (`shaped`/`shaped-invert` emit nothing here and stay SCSS-owned.)
486
1231
  const fieldRadiusVarStyles = computed(() => {
487
- const declarations = roundedStyles.value;
488
- if (!Array.isArray(declarations)) return [];
489
- const radius = declarations.find((declaration) => declaration.startsWith("border-radius:"));
490
- if (!radius) return [];
491
- return [`--origam-field---border-radius: ${radius.slice("border-radius:".length).trim()}`];
1232
+ const declarations = roundedStyles.value;
1233
+ if (!Array.isArray(declarations)) return [];
1234
+ const radius = declarations.find((declaration) => declaration.startsWith("border-radius:"));
1235
+ if (!radius) return [];
1236
+ return [`--origam-field---border-radius: ${radius.slice("border-radius:".length).trim()}`];
492
1237
  });
1238
+ /*********************************************************
1239
+ * fieldBorderVarStyles — #726
1240
+ *
1241
+ * @description
1242
+ * `border` used to live ONLY on the outer `OrigamInput` wrapper, which has
1243
+ * no notch: `useBorder` painted a real CSS border on that box and its top
1244
+ * edge ran straight THROUGH the floating label (measured on the live
1245
+ * story: label box `[-7, 11]`, input border band `[0, 2]`, 61.41 px² of
1246
+ * label crossed).
1247
+ *
1248
+ * @description
1249
+ * The field already owns a notched outline — three legs (`--start` /
1250
+ * `--notch` / `--end`) whose width, style and colour are driven entirely
1251
+ * by `--origam-field---border-width`,
1252
+ * `--origam-field__outline---border-style` and
1253
+ * `--origam-field---border-color`, and whose `--notch` leg drops its top
1254
+ * border to 0 under `--active` / `--focused`. That IS the notch.
1255
+ *
1256
+ * @description
1257
+ * So the fix is not to draw a second border anywhere: it is to feed the
1258
+ * channel the mechanism already reads, exactly as `fieldRadiusVarStyles`
1259
+ * above mirrors `rounded` into `--origam-field---border-radius`.
1260
+ *
1261
+ * @description
1262
+ * Only the three GLOBAL declarations are mapped. A directional value
1263
+ * (`border="top"`) emits per-side widths, which have no meaning on a
1264
+ * three-leg outline — those are deliberately left unmapped (the leg keeps
1265
+ * the variant's own width; style and colour, which `useBorder` still emits
1266
+ * globally, do land).
1267
+ *
1268
+ * @description
1269
+ * When no border prop is passed `useBorder` returns an empty array, so
1270
+ * this emits nothing and the field renders exactly as it did before.
1271
+ ********************************************************/
493
1272
  const fieldBorderVarStyles = computed(() => {
494
- const declarations = borderStyles.value;
495
- if (!Array.isArray(declarations)) return [];
496
- const vars = [];
497
- const lastValueOf = (property) => {
498
- const prefix = `${property}:`;
499
- const match = declarations.filter((declaration) => declaration.startsWith(prefix)).pop();
500
- return match ? match.slice(prefix.length).trim() : null;
501
- };
502
- const width = lastValueOf("border-width");
503
- const style = lastValueOf("border-style");
504
- const color2 = lastValueOf("border-color");
505
- if (width) vars.push(`--origam-field---border-width: ${width}`);
506
- if (style) vars.push(`--origam-field__outline---border-style: ${style}`);
507
- if (color2) {
508
- vars.push(`--origam-field---border-color: ${color2}`);
509
- vars.push("--origam-field---border-opacity: 1");
510
- }
511
- return vars;
1273
+ const declarations = borderStyles.value;
1274
+ if (!Array.isArray(declarations)) return [];
1275
+ const vars = [];
1276
+ const lastValueOf = (property) => {
1277
+ const prefix = `${property}:`;
1278
+ const match = declarations.filter((declaration) => declaration.startsWith(prefix)).pop();
1279
+ return match ? match.slice(prefix.length).trim() : null;
1280
+ };
1281
+ const width = lastValueOf("border-width");
1282
+ const style = lastValueOf("border-style");
1283
+ const color = lastValueOf("border-color");
1284
+ if (width) vars.push(`--origam-field---border-width: ${width}`);
1285
+ if (style) vars.push(`--origam-field__outline---border-style: ${style}`);
1286
+ /*********************************************************
1287
+ * Colour — forced opaque
1288
+ *
1289
+ * @description
1290
+ * The outline legs read the colour through
1291
+ * `--origam-field---border-color` and paint at
1292
+ * `--origam-field---border-opacity` (.38 by default). An explicit
1293
+ * border colour is an explicit request, so force it opaque —
1294
+ * otherwise `border="2px solid red"` renders a washed-out pink.
1295
+ ********************************************************/
1296
+ if (color) {
1297
+ vars.push(`--origam-field---border-color: ${color}`);
1298
+ vars.push("--origam-field---border-opacity: 1");
1299
+ }
1300
+ return vars;
512
1301
  });
513
1302
  const fieldStyles = computed(() => {
514
- return [
515
- colorStyles.value,
516
- roundedStyles.value,
517
- fieldRadiusVarStyles.value,
518
- fieldBorderVarStyles.value,
519
- elevationStyles.value,
520
- props.style
521
- ];
1303
+ return [
1304
+ colorStyles.value,
1305
+ roundedStyles.value,
1306
+ fieldRadiusVarStyles.value,
1307
+ fieldBorderVarStyles.value,
1308
+ elevationStyles.value,
1309
+ props.style
1310
+ ];
522
1311
  });
523
1312
  const fieldProgressClasses = computed(() => {
524
- return [
525
- "origam-field__progress",
526
- `origam-field__progress--${loaderConfig.value.kind === "line" ? "linear" : loaderConfig.value.kind}`
527
- ];
1313
+ return ["origam-field__progress", `origam-field__progress--${loaderConfig.value.kind === "line" ? "linear" : loaderConfig.value.kind}`];
528
1314
  });
529
1315
  const fieldClasses = computed(() => {
530
- return [
531
- "origam-field",
532
- {
533
- "origam-field--active": isActive.value,
534
- "origam-field--appended": hasAppendInner.value,
535
- "origam-field--center-affix": props.centerAffix,
536
- "origam-field--disabled": props.disabled,
537
- "origam-field--dirty": props.dirty,
538
- "origam-field--error": props.error,
539
- "origam-field--has-background": !!props.bgColor,
540
- "origam-field--inline": props.inline,
541
- "origam-field--persistent-clear": props.persistentClear,
542
- "origam-field--prepended": hasPrependInner.value,
543
- "origam-field--single-line": props.singleLine,
544
- "origam-field--no-label": !hasLabel.value,
545
- "origam-text-field--prefixed": props.prefix,
546
- "origam-text-field--suffixed": props.suffix
547
- },
548
- loaderClasses.value,
549
- colorClasses.value,
550
- rtlClasses.value,
551
- densityClasses.value,
552
- focusClasses.value,
553
- variantClasses.value,
554
- roundedClasses.value,
555
- elevationClasses.value,
556
- sizeClasses.value,
557
- props.class
558
- ];
1316
+ return [
1317
+ "origam-field",
1318
+ {
1319
+ "origam-field--active": isActive.value,
1320
+ "origam-field--appended": hasAppendInner.value,
1321
+ "origam-field--center-affix": props.centerAffix,
1322
+ "origam-field--disabled": props.disabled,
1323
+ "origam-field--dirty": props.dirty,
1324
+ "origam-field--error": props.error,
1325
+ "origam-field--has-background": !!props.bgColor,
1326
+ "origam-field--inline": props.inline,
1327
+ "origam-field--persistent-clear": props.persistentClear,
1328
+ "origam-field--prepended": hasPrependInner.value,
1329
+ "origam-field--single-line": props.singleLine,
1330
+ "origam-field--no-label": !hasLabel.value,
1331
+ "origam-text-field--prefixed": props.prefix,
1332
+ "origam-text-field--suffixed": props.suffix
1333
+ },
1334
+ loaderClasses.value,
1335
+ colorClasses.value,
1336
+ rtlClasses.value,
1337
+ densityClasses.value,
1338
+ focusClasses.value,
1339
+ variantClasses.value,
1340
+ roundedClasses.value,
1341
+ elevationClasses.value,
1342
+ sizeClasses.value,
1343
+ props.class
1344
+ ];
559
1345
  });
1346
+ /*********************************************************
1347
+ * Expose
1348
+ *
1349
+ * @description
1350
+ * Forwards filterProps to parent components.
1351
+ ********************************************************/
560
1352
  const { filterProps } = useProps(props);
561
- const { id: styleId, css, load, isLoaded, unload } = useStyle(
562
- fieldStyles,
563
- () => props.id ? `${props.id}-field` : void 0
564
- );
1353
+ /*********************************************************
1354
+ * styleId — l'id de la RACINE, derive de celui du consommateur
1355
+ *
1356
+ * @description
1357
+ * #421/#422 — `useStyle(fieldStyles)` etait appele sans son second
1358
+ * argument : la racine rendait `origam-field-<uid>` et l'id du
1359
+ * consommateur n'atteignait jamais le wrapper.
1360
+ *
1361
+ * @description
1362
+ * ⛔ La correction evidente — lier `:id="id"` sur la racine — est
1363
+ * FAUSSE. `props.id` est deja porte par le vrai controle (via
1364
+ * `slotProps.id`) et sert de cible aux `for=` des deux labels : le
1365
+ * poser aussi sur la racine fabriquerait DEUX elements de meme id et
1366
+ * casserait le pairage `label[for]`. Le meme piege a ete mesure sur
1367
+ * `OrigamInput` (#421), ou six consommateurs de la famille auraient
1368
+ * pris un id duplique.
1369
+ *
1370
+ * @description
1371
+ * D'ou un id DERIVE : adressable et deterministe pour qui veut cibler
1372
+ * le wrapper, jamais egal a celui du controle. Le getter garde la
1373
+ * lecture PARESSEUSE (ADR-005) : le resolveur de theme ecrit dans
1374
+ * `beforeCreate`, donc APRES `setup()`.
1375
+ ********************************************************/
1376
+ const { id: styleId, css, load, isLoaded, unload } = useStyle(fieldStyles, () => props.id ? `${props.id}-field` : undefined);
565
1377
  defineExpose({
566
- filterProps,
567
- css,
568
- id,
569
- load,
570
- unload,
571
- isLoaded,
572
- styleId
1378
+ filterProps,
1379
+ css,
1380
+ id,
1381
+ load,
1382
+ unload,
1383
+ isLoaded,
1384
+ styleId
573
1385
  });
574
1386
  </script>
575
1387