origam 2.40.1 → 2.41.1

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 (330) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/src/components/Alert/OrigamAlert.vue +1 -2
  3. package/dist/src/components/Audio/OrigamAudio.vue +15 -14
  4. package/dist/src/components/Badge/OrigamBadge.vue +6 -1
  5. package/dist/src/components/Bracket/OrigamBracket.vue +5 -5
  6. package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +2 -1
  7. package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +1 -2
  8. package/dist/src/components/Btn/OrigamBtn.vue +14 -15
  9. package/dist/src/components/Card/OrigamCard.vue +2 -1
  10. package/dist/src/components/Carousel/OrigamCarousel.vue +14 -13
  11. package/dist/src/components/Chart/OrigamChartBullet.vue +4 -1
  12. package/dist/src/components/Chart/OrigamChartCartesian.vue +1 -2
  13. package/dist/src/components/Chart/OrigamChartPictorial.vue +3 -6
  14. package/dist/src/components/Chart/OrigamChartPolar.vue +2 -1
  15. package/dist/src/components/Chart/OrigamChartPolarBar.vue +3 -1
  16. package/dist/src/components/Chart/OrigamChartSankey.vue +9 -167
  17. package/dist/src/components/Chart/OrigamChartStreamgraph.vue +14 -12
  18. package/dist/src/components/Chart/OrigamChartSunburst.vue +10 -2
  19. package/dist/src/components/Chart/OrigamChartWordCloud.vue +39 -36
  20. package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +3 -4
  21. package/dist/src/components/Chip/OrigamChip.vue +2 -3
  22. package/dist/src/components/Chip/OrigamChipGroup.vue +2 -3
  23. package/dist/src/components/Clipboard/OrigamClipboard.vue +1 -1
  24. package/dist/src/components/Code/OrigamCode.vue +9 -18
  25. package/dist/src/components/ColorPicker/OrigamColorPicker.vue +5 -1
  26. package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +1 -2
  27. package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +1 -2
  28. package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +1 -2
  29. package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +6 -2
  30. package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +2 -4
  31. package/dist/src/components/Counter/OrigamCounter.vue +1 -0
  32. package/dist/src/components/DataTable/OrigamDataTable.vue +6 -8
  33. package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +1 -2
  34. package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +3 -2
  35. package/dist/src/components/DataTable/OrigamDataTableRow.vue +2 -3
  36. package/dist/src/components/DataTable/OrigamDataTableRows.vue +43 -39
  37. package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +3 -4
  38. package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +1 -1
  39. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1 -2
  40. package/dist/src/components/Dialog/OrigamDialog.vue +4 -12
  41. package/dist/src/components/Drawer/OrigamDrawer.vue +4 -2
  42. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +2 -3
  43. package/dist/src/components/Field/OrigamField.vue +2 -6
  44. package/dist/src/components/FileField/OrigamFileField.vue +23 -6
  45. package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +3 -4
  46. package/dist/src/components/FileField/OrigamFileFieldListItem.vue +3 -4
  47. package/dist/src/components/Form/OrigamForm.vue +0 -2
  48. package/dist/src/components/Grids/OrigamRow.vue +8 -11
  49. package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +7 -7
  50. package/dist/src/components/Input/OrigamInput.vue +3 -11
  51. package/dist/src/components/List/OrigamListGroup.vue +2 -3
  52. package/dist/src/components/List/OrigamListItem.vue +4 -5
  53. package/dist/src/components/Media/OrigamMediaController.vue +15 -15
  54. package/dist/src/components/Media/OrigamMediaScrubber.vue +15 -12
  55. package/dist/src/components/Media/OrigamMediaVolumeControl.vue +4 -5
  56. package/dist/src/components/Menu/OrigamMenu.vue +1 -2
  57. package/dist/src/components/NumberField/OrigamNumberField.vue +7 -10
  58. package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +7 -1
  59. package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1 -1
  60. package/dist/src/components/Overlay/OrigamOverlay.vue +3 -4
  61. package/dist/src/components/Pagination/OrigamPagination.vue +4 -5
  62. package/dist/src/components/Parallax/OrigamParallaxElement.vue +1 -4
  63. package/dist/src/components/PasswordField/OrigamPasswordField.vue +9 -7
  64. package/dist/src/components/Radio/OrigamRadioBtn.vue +2 -3
  65. package/dist/src/components/RatingField/OrigamRatingField.vue +1 -2
  66. package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +2 -3
  67. package/dist/src/components/Select/OrigamSelect.vue +135 -105
  68. package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +7 -2
  69. package/dist/src/components/Slide/OrigamSlideGroup.vue +7 -10
  70. package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +9 -10
  71. package/dist/src/components/Stepper/OrigamStepper.vue +7 -11
  72. package/dist/src/components/Stepper/OrigamStepperItem.vue +2 -3
  73. package/dist/src/components/Switch/OrigamSwitch.vue +0 -9
  74. package/dist/src/components/Tabs/OrigamTabs.vue +1 -1
  75. package/dist/src/components/TextField/OrigamTextField.vue +2 -5
  76. package/dist/src/components/TextareaField/OrigamTextareaField.vue +3 -2
  77. package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +13 -14
  78. package/dist/src/components/Transition/OrigamExpandX.vue +4 -10
  79. package/dist/src/components/Transition/OrigamExpandY.vue +4 -10
  80. package/dist/src/components/Transition/OrigamSnack.vue +2 -8
  81. package/dist/src/components/Transition/OrigamTranslateScale.vue +4 -1
  82. package/dist/src/components/Treeview/OrigamTreeviewNode.vue +24 -18
  83. package/dist/src/components/Video/OrigamVideo.vue +14 -19
  84. package/dist/src/components/Window/OrigamWindow.vue +4 -6
  85. package/dist/src/composables/Audio/use-waveform.composable.cjs +24 -19
  86. package/dist/src/composables/Audio/use-waveform.composable.js +24 -19
  87. package/dist/src/composables/Calendar/calendar.composable.cjs +11 -11
  88. package/dist/src/composables/Calendar/calendar.composable.js +1 -1
  89. package/dist/src/composables/Chart/chart.composable.cjs +541 -415
  90. package/dist/src/composables/Chart/chart.composable.d.ts +2 -5
  91. package/dist/src/composables/Chart/chart.composable.js +392 -338
  92. package/dist/src/composables/Code/code.composable.cjs +4 -4
  93. package/dist/src/composables/Code/code.composable.js +1 -1
  94. package/dist/src/composables/Commons/accessibleCommand.composable.cjs +2 -1
  95. package/dist/src/composables/Commons/accessibleCommand.composable.js +2 -1
  96. package/dist/src/composables/Commons/backButton.composable.cjs +14 -18
  97. package/dist/src/composables/Commons/backButton.composable.d.ts +4 -2
  98. package/dist/src/composables/Commons/backButton.composable.js +14 -18
  99. package/dist/src/composables/Commons/backgroundColor.composable.cjs +7 -3
  100. package/dist/src/composables/Commons/backgroundColor.composable.js +6 -3
  101. package/dist/src/composables/Commons/bothColor.composable.cjs +6 -2
  102. package/dist/src/composables/Commons/bothColor.composable.js +7 -4
  103. package/dist/src/composables/Commons/color.composable.cjs +106 -48
  104. package/dist/src/composables/Commons/color.composable.js +55 -48
  105. package/dist/src/composables/Commons/colorEffect.composable.cjs +2 -1
  106. package/dist/src/composables/Commons/colorEffect.composable.js +3 -1
  107. package/dist/src/composables/Commons/createLayout.composable.cjs +3 -2
  108. package/dist/src/composables/Commons/createLayout.composable.js +3 -2
  109. package/dist/src/composables/Commons/cssSupportClient.composable.d.ts +2 -1
  110. package/dist/src/composables/Commons/display.composable.cjs +7 -1
  111. package/dist/src/composables/Commons/display.composable.js +2 -2
  112. package/dist/src/composables/Commons/dragResizer.composable.cjs +16 -18
  113. package/dist/src/composables/Commons/dragResizer.composable.d.ts +2 -2
  114. package/dist/src/composables/Commons/dragResizer.composable.js +9 -11
  115. package/dist/src/composables/Commons/elevation.composable.cjs +2 -1
  116. package/dist/src/composables/Commons/elevation.composable.js +2 -1
  117. package/dist/src/composables/Commons/group.composable.cjs +17 -14
  118. package/dist/src/composables/Commons/group.composable.js +19 -15
  119. package/dist/src/composables/Commons/locationStrategies.composable.d.ts +1 -1
  120. package/dist/src/composables/Commons/nested.composable.cjs +16 -16
  121. package/dist/src/composables/Commons/nested.composable.d.ts +1 -1
  122. package/dist/src/composables/Commons/nested.composable.js +1 -1
  123. package/dist/src/composables/Commons/nestedItem.composable.cjs +3 -3
  124. package/dist/src/composables/Commons/nestedItem.composable.d.ts +1 -1
  125. package/dist/src/composables/Commons/nestedItem.composable.js +1 -1
  126. package/dist/src/composables/Commons/passedProps.composable.cjs +1 -1
  127. package/dist/src/composables/Commons/passedProps.composable.js +1 -1
  128. package/dist/src/composables/Commons/size.composable.cjs +1 -1
  129. package/dist/src/composables/Commons/size.composable.js +1 -1
  130. package/dist/src/composables/Commons/stateEffect.composable.cjs +54 -32
  131. package/dist/src/composables/Commons/stateEffect.composable.js +43 -33
  132. package/dist/src/composables/Commons/teleport.composable.cjs +2 -1
  133. package/dist/src/composables/Commons/teleport.composable.js +4 -1
  134. package/dist/src/composables/Commons/textColor.composable.cjs +7 -3
  135. package/dist/src/composables/Commons/textColor.composable.js +6 -3
  136. package/dist/src/composables/Commons/touch.composable.cjs +80 -20
  137. package/dist/src/composables/Commons/touch.composable.js +80 -20
  138. package/dist/src/composables/Commons/vModel.composable.cjs +1 -1
  139. package/dist/src/composables/Commons/vModel.composable.js +1 -1
  140. package/dist/src/composables/Commons/validation.composable.cjs +1 -1
  141. package/dist/src/composables/Commons/validation.composable.js +1 -1
  142. package/dist/src/composables/Commons/velocity.composable.cjs +5 -1
  143. package/dist/src/composables/Commons/velocity.composable.js +5 -1
  144. package/dist/src/composables/DataTable/headers.composable.cjs +36 -30
  145. package/dist/src/composables/DataTable/headers.composable.d.ts +1 -1
  146. package/dist/src/composables/DataTable/headers.composable.js +29 -23
  147. package/dist/src/composables/DataTable/headersCell.composable.cjs +2 -2
  148. package/dist/src/composables/DataTable/headersCell.composable.js +1 -1
  149. package/dist/src/composables/DataTable/select.composable.cjs +4 -4
  150. package/dist/src/composables/DataTable/select.composable.js +1 -1
  151. package/dist/src/composables/DataTable/sort.composable.cjs +6 -6
  152. package/dist/src/composables/DataTable/sort.composable.js +1 -1
  153. package/dist/src/composables/Form/form.composable.cjs +1 -1
  154. package/dist/src/composables/Form/form.composable.js +3 -1
  155. package/dist/src/composables/Masonry/masonry.composable.cjs +29 -20
  156. package/dist/src/composables/Masonry/masonry.composable.d.ts +0 -14
  157. package/dist/src/composables/Masonry/masonry.composable.js +29 -20
  158. package/dist/src/composables/NumberFormat/number-format.composable.cjs +28 -23
  159. package/dist/src/composables/NumberFormat/number-format.composable.js +28 -23
  160. package/dist/src/composables/Parallax/parallax.composable.cjs +11 -19
  161. package/dist/src/composables/Parallax/parallax.composable.js +5 -13
  162. package/dist/src/composables/Parallax/transform.composable.cjs +14 -13
  163. package/dist/src/composables/Parallax/transform.composable.js +2 -1
  164. package/dist/src/composables/PasswordField/passwordStrength.composable.cjs +2 -2
  165. package/dist/src/composables/PasswordField/passwordStrength.composable.js +1 -1
  166. package/dist/src/composables/QrCode/qr-code.composable.cjs +1 -1
  167. package/dist/src/composables/QrCode/qr-code.composable.js +1 -1
  168. package/dist/src/composables/Sheet/sheetSwipe.composable.cjs +3 -4
  169. package/dist/src/composables/Sheet/sheetSwipe.composable.js +4 -4
  170. package/dist/src/composables/TextareaField/textarea-field-rich.composable.cjs +31 -31
  171. package/dist/src/composables/TextareaField/textarea-field-rich.composable.js +1 -1
  172. package/dist/src/composables/Watermark/watermark.composable.cjs +1 -1
  173. package/dist/src/composables/Watermark/watermark.composable.js +1 -1
  174. package/dist/src/consts/Audio/audio.const.cjs +5 -4
  175. package/dist/src/consts/Audio/audio.const.d.ts +2 -1
  176. package/dist/src/consts/Audio/audio.const.js +2 -1
  177. package/dist/src/consts/Blockquote/blockquote.const.cjs +3 -3
  178. package/dist/src/consts/Blockquote/blockquote.const.js +1 -1
  179. package/dist/src/consts/Bracket/bracket.const.cjs +4 -3
  180. package/dist/src/consts/Bracket/bracket.const.js +2 -1
  181. package/dist/src/consts/Code/code.const.cjs +3 -3
  182. package/dist/src/consts/Code/code.const.d.ts +1 -1
  183. package/dist/src/consts/Code/code.const.js +1 -1
  184. package/dist/src/consts/Commons/autocomplete.const.cjs +2 -2
  185. package/dist/src/consts/Commons/autocomplete.const.d.ts +1 -1
  186. package/dist/src/consts/Commons/autocomplete.const.js +1 -1
  187. package/dist/src/consts/Commons/border.const.cjs +5 -1
  188. package/dist/src/consts/Commons/border.const.js +5 -1
  189. package/dist/src/consts/Commons/display.const.cjs +2 -2
  190. package/dist/src/consts/Commons/display.const.js +1 -1
  191. package/dist/src/consts/Commons/hotkey.const.cjs +2 -2
  192. package/dist/src/consts/Commons/hotkey.const.js +1 -1
  193. package/dist/src/consts/Commons/margin.const.cjs +1 -1
  194. package/dist/src/consts/Commons/margin.const.js +1 -1
  195. package/dist/src/consts/Commons/padding.const.cjs +1 -1
  196. package/dist/src/consts/Commons/padding.const.js +1 -1
  197. package/dist/src/consts/Commons/rounded.const.cjs +6 -2
  198. package/dist/src/consts/Commons/rounded.const.js +6 -2
  199. package/dist/src/consts/EmptyState/empty-state.const.cjs +12 -12
  200. package/dist/src/consts/EmptyState/empty-state.const.js +6 -6
  201. package/dist/src/consts/PasswordField/password-field.const.cjs +1 -1
  202. package/dist/src/consts/PasswordField/password-field.const.js +1 -1
  203. package/dist/src/consts/QrCode/qr-code.const.cjs +2 -2
  204. package/dist/src/consts/QrCode/qr-code.const.js +1 -1
  205. package/dist/src/consts/TextField/text-field.const.cjs +21 -21
  206. package/dist/src/consts/TextField/text-field.const.d.ts +1 -2
  207. package/dist/src/consts/TextField/text-field.const.js +1 -2
  208. package/dist/src/consts/TextareaField/textarea-field.const.cjs +32 -4
  209. package/dist/src/consts/TextareaField/textarea-field.const.d.ts +1 -0
  210. package/dist/src/consts/TextareaField/textarea-field.const.js +29 -1
  211. package/dist/src/directives/Contrast/contrast.directive.cjs +6 -4
  212. package/dist/src/directives/Contrast/contrast.directive.js +6 -4
  213. package/dist/src/directives/Intersect/intersect.directive.cjs +2 -1
  214. package/dist/src/directives/Intersect/intersect.directive.js +2 -1
  215. package/dist/src/enums/BottomNav/bottom-nav.enum.cjs +4 -5
  216. package/dist/src/enums/BottomNav/bottom-nav.enum.js +4 -5
  217. package/dist/src/interfaces/Blockquote/blockquote.interface.d.ts +1 -1
  218. package/dist/src/interfaces/Chart/chart-map.interface.d.ts +5 -4
  219. package/dist/src/interfaces/Chart/chart.interface.d.ts +70 -1
  220. package/dist/src/interfaces/ColorPicker/color-picker.interface.d.ts +1 -1
  221. package/dist/src/interfaces/Commons/activator.interface.d.ts +1 -1
  222. package/dist/src/interfaces/Commons/border.interface.d.ts +11 -10
  223. package/dist/src/interfaces/Commons/filters.interface.d.ts +7 -0
  224. package/dist/src/interfaces/Commons/margin.interface.d.ts +12 -11
  225. package/dist/src/interfaces/Commons/padding.interface.d.ts +12 -11
  226. package/dist/src/interfaces/Commons/ripple.interface.d.ts +1 -3
  227. package/dist/src/interfaces/Commons/rounded.interface.d.ts +10 -9
  228. package/dist/src/interfaces/DataTable/sort.interface.d.ts +6 -0
  229. package/dist/src/interfaces/Grid/grid.interface.d.ts +4 -4
  230. package/dist/src/interfaces/Parallax/parallax.interface.d.ts +3 -2
  231. package/dist/src/interfaces/SliderField/slider-field.interface.d.ts +4 -4
  232. package/dist/src/origam-core.cjs +52 -34
  233. package/dist/src/origam-core.js +22 -28
  234. package/dist/src/types/Commons/box-value.type.cjs +1 -0
  235. package/dist/src/types/Commons/box-value.type.d.ts +1 -0
  236. package/dist/src/types/Commons/box-value.type.js +0 -0
  237. package/dist/src/types/Commons/location.type.d.ts +13 -0
  238. package/dist/src/types/Commons/point.type.d.ts +1 -1
  239. package/dist/src/types/DataTable/data-table.type.d.ts +1 -0
  240. package/dist/src/types/Grid/grid.type.d.ts +7 -0
  241. package/dist/src/types/Grids/row.type.d.ts +2 -1
  242. package/dist/src/types/Parallax/parallax.type.d.ts +1 -2
  243. package/dist/src/types/SliderField/slider-field.type.d.ts +8 -0
  244. package/dist/src/types/TextField/text-field.type.d.ts +2 -1
  245. package/dist/src/utils/Bracket/bracket-surface.util.cjs +9 -2
  246. package/dist/src/utils/Bracket/bracket-surface.util.js +9 -2
  247. package/dist/src/utils/Calendar/rrule.util.cjs +12 -7
  248. package/dist/src/utils/Calendar/rrule.util.js +12 -7
  249. package/dist/src/utils/Chart/chart-point.util.cjs +15 -0
  250. package/dist/src/utils/Chart/chart-point.util.d.ts +11 -0
  251. package/dist/src/utils/Chart/chart-point.util.js +8 -0
  252. package/dist/src/utils/Chart/sankey-layout.util.cjs +144 -0
  253. package/dist/src/utils/Chart/sankey-layout.util.d.ts +27 -0
  254. package/dist/src/utils/Chart/sankey-layout.util.js +130 -0
  255. package/dist/src/utils/Code/parse-highlight-lines.util.cjs +17 -14
  256. package/dist/src/utils/Code/parse-highlight-lines.util.js +17 -14
  257. package/dist/src/utils/CommandPalette/fuzzy-match.util.cjs +13 -9
  258. package/dist/src/utils/CommandPalette/fuzzy-match.util.js +13 -9
  259. package/dist/src/utils/Commons/anchor.util.cjs +6 -1
  260. package/dist/src/utils/Commons/anchor.util.js +6 -1
  261. package/dist/src/utils/Commons/animation.util.cjs +7 -4
  262. package/dist/src/utils/Commons/animation.util.js +4 -1
  263. package/dist/src/utils/Commons/apply-mask.util.cjs +11 -14
  264. package/dist/src/utils/Commons/apply-mask.util.js +7 -10
  265. package/dist/src/utils/Commons/apply-theme.util.cjs +6 -4
  266. package/dist/src/utils/Commons/apply-theme.util.js +6 -4
  267. package/dist/src/utils/Commons/bindProps.util.cjs +3 -5
  268. package/dist/src/utils/Commons/bindProps.util.js +3 -5
  269. package/dist/src/utils/Commons/color.util.cjs +43 -36
  270. package/dist/src/utils/Commons/color.util.js +44 -31
  271. package/dist/src/utils/Commons/commons.util.cjs +3 -3
  272. package/dist/src/utils/Commons/commons.util.js +3 -3
  273. package/dist/src/utils/Commons/console.util.cjs +6 -0
  274. package/dist/src/utils/Commons/console.util.d.ts +11 -0
  275. package/dist/src/utils/Commons/console.util.js +5 -0
  276. package/dist/src/utils/Commons/date.util.cjs +2 -27
  277. package/dist/src/utils/Commons/date.util.js +2 -27
  278. package/dist/src/utils/Commons/display.util.cjs +10 -1
  279. package/dist/src/utils/Commons/display.util.d.ts +8 -1
  280. package/dist/src/utils/Commons/display.util.js +9 -1
  281. package/dist/src/utils/Commons/eventListener.util.cjs +1 -2
  282. package/dist/src/utils/Commons/eventListener.util.js +1 -2
  283. package/dist/src/utils/Commons/filters.util.cjs +48 -34
  284. package/dist/src/utils/Commons/filters.util.d.ts +3 -8
  285. package/dist/src/utils/Commons/filters.util.js +47 -34
  286. package/dist/src/utils/Commons/forwardRefs.util.cjs +44 -40
  287. package/dist/src/utils/Commons/forwardRefs.util.js +44 -40
  288. package/dist/src/utils/Commons/group.util.cjs +1 -1
  289. package/dist/src/utils/Commons/group.util.js +1 -1
  290. package/dist/src/utils/Commons/hotkey.util.cjs +65 -61
  291. package/dist/src/utils/Commons/hotkey.util.js +56 -53
  292. package/dist/src/utils/Commons/hover.util.cjs +2 -2
  293. package/dist/src/utils/Commons/hover.util.js +2 -2
  294. package/dist/src/utils/Commons/locale.util.cjs +1 -1
  295. package/dist/src/utils/Commons/locale.util.js +1 -1
  296. package/dist/src/utils/Commons/location.util.cjs +87 -92
  297. package/dist/src/utils/Commons/location.util.js +75 -83
  298. package/dist/src/utils/Commons/nested.util.cjs +12 -10
  299. package/dist/src/utils/Commons/nested.util.js +5 -2
  300. package/dist/src/utils/Commons/point.util.cjs +16 -14
  301. package/dist/src/utils/Commons/point.util.js +13 -8
  302. package/dist/src/utils/Commons/ripple.util.cjs +4 -4
  303. package/dist/src/utils/Commons/ripple.util.js +4 -4
  304. package/dist/src/utils/Commons/scroll.util.cjs +9 -6
  305. package/dist/src/utils/Commons/scroll.util.js +9 -6
  306. package/dist/src/utils/Commons/spacing.util.cjs +1 -1
  307. package/dist/src/utils/Commons/spacing.util.js +1 -1
  308. package/dist/src/utils/Commons/token-name.util.cjs +31 -27
  309. package/dist/src/utils/Commons/token-name.util.js +31 -27
  310. package/dist/src/utils/Commons/validate-pattern.util.cjs +6 -6
  311. package/dist/src/utils/Commons/validate-pattern.util.js +1 -1
  312. package/dist/src/utils/DataTable/headers.util.cjs +20 -26
  313. package/dist/src/utils/DataTable/headers.util.js +18 -26
  314. package/dist/src/utils/DataTable/sort.util.cjs +41 -47
  315. package/dist/src/utils/DataTable/sort.util.d.ts +2 -7
  316. package/dist/src/utils/DataTable/sort.util.js +49 -47
  317. package/dist/src/utils/List/list-item.util.cjs +6 -1
  318. package/dist/src/utils/List/list-item.util.js +6 -1
  319. package/dist/src/utils/Parallax/parallax-element.util.cjs +13 -14
  320. package/dist/src/utils/Parallax/parallax-element.util.js +10 -11
  321. package/dist/src/utils/Slide/slide-group.util.cjs +4 -4
  322. package/dist/src/utils/Slide/slide-group.util.js +4 -4
  323. package/dist/src/utils/TextareaField/html-to-markdown.util.cjs +5 -36
  324. package/dist/src/utils/TextareaField/html-to-markdown.util.js +5 -36
  325. package/dist/src/utils/TextareaField/sanitize-html.util.cjs +18 -22
  326. package/dist/src/utils/TextareaField/sanitize-html.util.js +19 -23
  327. package/dist/src/utils/index.cjs +11 -0
  328. package/dist/src/utils/index.d.ts +1 -0
  329. package/dist/src/utils/index.js +1 -0
  330. package/package.json +1 -1
@@ -7,7 +7,7 @@ exports.resetCodeHighlighterForTesting = resetCodeHighlighterForTesting;
7
7
  exports.useCode = useCode;
8
8
  var _vue = require("vue");
9
9
  var _code = require("../../consts/Code/code.const.cjs");
10
- var _enums = require("../../enums/index.cjs");
10
+ var _code2 = require("../../enums/Code/code.enum.cjs");
11
11
  let _highlighterPromise = null;
12
12
  let _highlighterReady = false;
13
13
  let _highlighterUnavailable = false;
@@ -63,9 +63,9 @@ function resolveLang(lang, hasCustomHighlighter, extraLangs) {
63
63
  if (extraLangs?.includes(lang)) return lang;
64
64
  if (!_unsupportedLangWarned.has(lang)) {
65
65
  _unsupportedLangWarned.add(lang);
66
- console.warn(`[origam] OrigamCode: lang="${lang}" is not in the bundled grammar set. Falling back to "${_enums.CODE_LANG.PLAINTEXT}". Supported: ${[..._code.SUPPORTED_LANGS, ...(extraLangs ?? [])].join(", ")}. Add it with createOrigam({ code: { langs } }) or supply a code.highlighter.`);
66
+ console.warn(`[origam] OrigamCode: lang="${lang}" is not in the bundled grammar set. Falling back to "${_code2.CODE_LANG.PLAINTEXT}". Supported: ${[..._code.SUPPORTED_LANGS, ...(extraLangs ?? [])].join(", ")}. Add it with createOrigam({ code: { langs } }) or supply a code.highlighter.`);
67
67
  }
68
- return _enums.CODE_LANG.PLAINTEXT;
68
+ return _code2.CODE_LANG.PLAINTEXT;
69
69
  }
70
70
  function useCode() {
71
71
  const codeOptions = (0, _vue.inject)(_code.ORIGAM_CODE_KEY);
@@ -100,7 +100,7 @@ function useCode() {
100
100
  }
101
101
  html = highlighter.codeToHtml(code, {
102
102
  ...opts,
103
- lang: _enums.CODE_LANG.PLAINTEXT
103
+ lang: _code2.CODE_LANG.PLAINTEXT
104
104
  });
105
105
  }
106
106
  lruSet(key, html);
@@ -1,6 +1,6 @@
1
1
  import { inject } from "vue";
2
2
  import { CODE_CACHE_MAX_ENTRIES, CODE_DARK_THEME as DARK_THEME, CODE_LIGHT_THEME as LIGHT_THEME, ORIGAM_CODE_KEY, SUPPORTED_LANGS } from "../../consts/Code/code.const.js";
3
- import { CODE_LANG } from "../../enums/index.js";
3
+ import { CODE_LANG } from "../../enums/Code/code.enum.js";
4
4
  let _highlighterPromise = null;
5
5
  let _highlighterReady = false;
6
6
  let _highlighterUnavailable = false;
@@ -12,7 +12,8 @@ function useAccessibleCommand(options) {
12
12
  return (0, _vue.computed)(() => {
13
13
  if (!options.active.value) return {};
14
14
  const raw = options.label();
15
- const name = raw ? locale ? locale.t(raw) : raw : "";
15
+ const translated = raw && locale ? locale.t(raw) : raw;
16
+ const name = translated ?? "";
16
17
  if (!name) {
17
18
  (0, _a11y.warnMissingAccessibleName)(options.component, options.zone, options.prop);
18
19
  return {};
@@ -6,7 +6,8 @@ export function useAccessibleCommand(options) {
6
6
  return computed(() => {
7
7
  if (!options.active.value) return {};
8
8
  const raw = options.label();
9
- const name = raw ? locale ? locale.t(raw) : raw : "";
9
+ const translated = raw && locale ? locale.t(raw) : raw;
10
+ const name = translated ?? "";
10
11
  if (!name) {
11
12
  warnMissingAccessibleName(options.component, options.zone, options.prop);
12
13
  return {};
@@ -12,28 +12,24 @@ function useBackButton(router, cb) {
12
12
  let removeBefore;
13
13
  let removeAfter;
14
14
  let poppedReset;
15
+ const decide = () => popped ? cb() : void 0;
16
+ const guard = () => {
17
+ let result;
18
+ if (!inTransition) {
19
+ result = new Promise(resolve => {
20
+ setTimeout(() => resolve(decide()));
21
+ });
22
+ } else {
23
+ result = decide();
24
+ }
25
+ inTransition = true;
26
+ return result;
27
+ };
15
28
  if (_commons.IN_BROWSER) {
16
29
  (0, _vue.nextTick)(() => {
17
30
  window.addEventListener("popstate", onPopstate);
18
31
  if (router) {
19
- removeBefore = router.beforeEach((_to, _from, next) => {
20
- if (!inTransition) {
21
- setTimeout(() => {
22
- if (popped) {
23
- cb(next);
24
- } else {
25
- next();
26
- }
27
- });
28
- } else {
29
- if (popped) {
30
- cb(next);
31
- } else {
32
- next();
33
- }
34
- }
35
- inTransition = true;
36
- });
32
+ removeBefore = router.beforeEach(guard);
37
33
  removeAfter = router.afterEach(() => {
38
34
  inTransition = false;
39
35
  });
@@ -1,4 +1,4 @@
1
- import type { NavigationGuardNext, Router } from 'vue-router';
1
+ import type { Router } from 'vue-router';
2
2
  /*********************************************************
3
3
  * useBackButton
4
4
  *
@@ -7,7 +7,9 @@ import type { NavigationGuardNext, Router } from 'vue-router';
7
7
  * (e.g. a Dialog / Sheet / Bottom-sheet) can intercept the native
8
8
  * back-button gesture and run its own close callback instead of
9
9
  * letting the browser navigate away.
10
+ * `cb` suit la convention des gardes vue-router : elle renvoie `false` pour
11
+ * ANNULER la navigation, toute autre valeur la laisse passer (plus de `next`).
10
12
  * Independent from `useRoute` / `useRouter` / `useLink` — does not
11
13
  * delegate to any of them.
12
14
  ********************************************************/
13
- export declare function useBackButton(router: Router | undefined, cb: (next: NavigationGuardNext) => void): void;
15
+ export declare function useBackButton(router: Router | undefined, cb: () => boolean | void): void;
@@ -6,28 +6,24 @@ export function useBackButton(router, cb) {
6
6
  let removeBefore;
7
7
  let removeAfter;
8
8
  let poppedReset;
9
+ const decide = () => popped ? cb() : void 0;
10
+ const guard = () => {
11
+ let result;
12
+ if (!inTransition) {
13
+ result = new Promise((resolve) => {
14
+ setTimeout(() => resolve(decide()));
15
+ });
16
+ } else {
17
+ result = decide();
18
+ }
19
+ inTransition = true;
20
+ return result;
21
+ };
9
22
  if (IN_BROWSER) {
10
23
  nextTick(() => {
11
24
  window.addEventListener("popstate", onPopstate);
12
25
  if (router) {
13
- removeBefore = router.beforeEach((_to, _from, next) => {
14
- if (!inTransition) {
15
- setTimeout(() => {
16
- if (popped) {
17
- cb(next);
18
- } else {
19
- next();
20
- }
21
- });
22
- } else {
23
- if (popped) {
24
- cb(next);
25
- } else {
26
- next();
27
- }
28
- }
29
- inTransition = true;
30
- });
26
+ removeBefore = router.beforeEach(guard);
31
27
  removeAfter = router.afterEach(() => {
32
28
  inTransition = false;
33
29
  });
@@ -7,9 +7,13 @@ exports.useBackgroundColor = useBackgroundColor;
7
7
  var _vue = require("vue");
8
8
  var _color = require("./color.composable.cjs");
9
9
  function useBackgroundColor(props, name) {
10
- const colors = (0, _vue.computed)(() => ({
11
- background: (0, _vue.isRef)(props) ? props.value : name ? props[name] : null
12
- }));
10
+ const colors = (0, _vue.computed)(() => {
11
+ let background = null;
12
+ if ((0, _vue.isRef)(props)) background = props.value;else if (name) background = props[name];
13
+ return {
14
+ background
15
+ };
16
+ });
13
17
  const {
14
18
  colorClasses: backgroundColorClasses,
15
19
  colorStyles: backgroundColorStyles
@@ -1,9 +1,12 @@
1
1
  import { computed, isRef } from "vue";
2
2
  import { useColor } from "./color.composable.js";
3
3
  export function useBackgroundColor(props, name) {
4
- const colors = computed(() => ({
5
- background: isRef(props) ? props.value : name ? props[name] : null
6
- }));
4
+ const colors = computed(() => {
5
+ let background = null;
6
+ if (isRef(props)) background = props.value;
7
+ else if (name) background = props[name];
8
+ return { background };
9
+ });
7
10
  const { colorClasses: backgroundColorClasses, colorStyles: backgroundColorStyles } = useColor(colors);
8
11
  return { backgroundColorClasses, backgroundColorStyles };
9
12
  }
@@ -8,9 +8,13 @@ var _vue = require("vue");
8
8
  var _color = require("./color.composable.cjs");
9
9
  function useBothColor(bgColorProps, colorProps, name) {
10
10
  const bothColors = (0, _vue.computed)(() => {
11
+ let text = null;
12
+ if ((0, _vue.isRef)(colorProps)) text = colorProps.value;else if (name) text = colorProps[name];
13
+ let background = null;
14
+ if ((0, _vue.isRef)(bgColorProps)) background = bgColorProps.value;else if (name) background = bgColorProps[name];
11
15
  return {
12
- text: (0, _vue.isRef)(colorProps) ? colorProps.value : name ? colorProps[name] : null,
13
- background: (0, _vue.isRef)(bgColorProps) ? bgColorProps.value : name ? bgColorProps[name] : null
16
+ text,
17
+ background
14
18
  };
15
19
  });
16
20
  return (0, _color.useColor)(bothColors);
@@ -2,10 +2,13 @@ import { computed, isRef } from "vue";
2
2
  import { useColor } from "./color.composable.js";
3
3
  export function useBothColor(bgColorProps, colorProps, name) {
4
4
  const bothColors = computed(() => {
5
- return {
6
- text: isRef(colorProps) ? colorProps.value : name ? colorProps[name] : null,
7
- background: isRef(bgColorProps) ? bgColorProps.value : name ? bgColorProps[name] : null
8
- };
5
+ let text = null;
6
+ if (isRef(colorProps)) text = colorProps.value;
7
+ else if (name) text = colorProps[name];
8
+ let background = null;
9
+ if (isRef(bgColorProps)) background = bgColorProps.value;
10
+ else if (name) background = bgColorProps[name];
11
+ return { text, background };
9
12
  });
10
13
  return useColor(bothColors);
11
14
  }
@@ -7,6 +7,102 @@ exports.useColor = useColor;
7
7
  var _vue = require("vue");
8
8
  var _color = require("../../utils/Commons/color.util.cjs");
9
9
  var _gradient = require("../../utils/Commons/gradient.util.cjs");
10
+ function resolveBackground(background) {
11
+ const none = {
12
+ bgDecl: null,
13
+ bgIntentFg: null,
14
+ bgIsGradient: false
15
+ };
16
+ if (!background) return none;
17
+ if ((0, _gradient.isGradient)(background)) {
18
+ const grad = (0, _gradient.resolveGradient)(background);
19
+ return grad ? {
20
+ bgDecl: `background-image: ${grad}`,
21
+ bgIntentFg: null,
22
+ bgIsGradient: true
23
+ } : none;
24
+ }
25
+ if ((0, _color.isIntent)(background)) {
26
+ const m = (0, _color.tokenStylesForIntent)(background, "default");
27
+ return {
28
+ bgDecl: `background-color: ${m["background-color"]}`,
29
+ bgIntentFg: m.color,
30
+ bgIsGradient: false
31
+ };
32
+ }
33
+ if (background === "transparent") {
34
+ return {
35
+ bgDecl: `background-color: ${background}`,
36
+ bgIntentFg: null,
37
+ bgIsGradient: false
38
+ };
39
+ }
40
+ if (typeof background === "string" && (0, _color.isCssColor)(background)) {
41
+ return {
42
+ bgDecl: `background-color: ${background}`,
43
+ bgIntentFg: null,
44
+ bgIsGradient: false
45
+ };
46
+ }
47
+ return none;
48
+ }
49
+ function resolveTextGradient(text) {
50
+ const grad = (0, _gradient.resolveGradient)(text);
51
+ if (!grad) return {
52
+ fgDecl: null,
53
+ gradientStyles: []
54
+ };
55
+ return {
56
+ fgDecl: "color: transparent",
57
+ gradientStyles: [`background-image: ${grad}`, "background-clip: text", "-webkit-background-clip: text"]
58
+ };
59
+ }
60
+ function resolveIntentText(colors, bgIntentFg) {
61
+ if (bgIntentFg && (0, _color.isIntent)(colors.background) && colors.text === colors.background) {
62
+ return `color: ${bgIntentFg}`;
63
+ }
64
+ return `color: ${(0, _color.tokenForegroundForIntent)(colors.text)}`;
65
+ }
66
+ function resolveAutoContrast(background) {
67
+ if (typeof background === "string" && background !== "transparent" && (0, _color.isParsableColor)(background)) {
68
+ const parsed = (0, _color.parseColor)(background);
69
+ if (parsed.a == null || parsed.a === 1) return `color: ${(0, _color.getForeground)(parsed)}`;
70
+ }
71
+ return null;
72
+ }
73
+ function resolveForeground(colors, bgDecl, bgIntentFg, bgIsGradient) {
74
+ const {
75
+ background,
76
+ text
77
+ } = colors;
78
+ if (text) {
79
+ if ((0, _gradient.isGradient)(text)) return resolveTextGradient(text);
80
+ if ((0, _color.isIntent)(text)) return {
81
+ fgDecl: resolveIntentText(colors, bgIntentFg),
82
+ gradientStyles: []
83
+ };
84
+ if (typeof text === "string" && (0, _color.isCssColor)(text)) return {
85
+ fgDecl: `color: ${text}`,
86
+ gradientStyles: []
87
+ };
88
+ return {
89
+ fgDecl: null,
90
+ gradientStyles: []
91
+ };
92
+ }
93
+ if (bgIntentFg && !bgIsGradient) return {
94
+ fgDecl: `color: ${bgIntentFg}`,
95
+ gradientStyles: []
96
+ };
97
+ if (bgDecl && !bgIsGradient) return {
98
+ fgDecl: resolveAutoContrast(background),
99
+ gradientStyles: []
100
+ };
101
+ return {
102
+ fgDecl: null,
103
+ gradientStyles: []
104
+ };
105
+ }
10
106
  function useColor(colors) {
11
107
  const colorClasses = (0, _vue.computed)(() => {
12
108
  const classes = [];
@@ -19,54 +115,16 @@ function useColor(colors) {
19
115
  return classes;
20
116
  });
21
117
  const colorStyles = (0, _vue.computed)(() => {
22
- const styles = [];
23
- let bgIntentFg = null;
24
- let bgDecl = null;
25
- let bgIsGradient = false;
26
- if (colors.value.background) {
27
- if ((0, _gradient.isGradient)(colors.value.background)) {
28
- const grad = (0, _gradient.resolveGradient)(colors.value.background);
29
- if (grad) {
30
- bgDecl = `background-image: ${grad}`;
31
- bgIsGradient = true;
32
- }
33
- } else if ((0, _color.isIntent)(colors.value.background)) {
34
- const m = (0, _color.tokenStylesForIntent)(colors.value.background, "default");
35
- bgDecl = `background-color: ${m["background-color"]}`;
36
- bgIntentFg = m.color;
37
- } else if (colors.value.background === "transparent") {
38
- bgDecl = `background-color: ${colors.value.background}`;
39
- } else if (typeof colors.value.background === "string" && (0, _color.isCssColor)(colors.value.background)) {
40
- bgDecl = `background-color: ${colors.value.background}`;
41
- }
42
- }
43
- let fgDecl = null;
44
- if (colors.value.text) {
45
- if ((0, _gradient.isGradient)(colors.value.text)) {
46
- const grad = (0, _gradient.resolveGradient)(colors.value.text);
47
- if (grad) {
48
- fgDecl = "color: transparent";
49
- styles.push(`background-image: ${grad}`);
50
- styles.push("background-clip: text");
51
- styles.push("-webkit-background-clip: text");
52
- }
53
- } else if ((0, _color.isIntent)(colors.value.text)) {
54
- if (bgIntentFg && (0, _color.isIntent)(colors.value.background) && colors.value.text === colors.value.background) {
55
- fgDecl = `color: ${bgIntentFg}`;
56
- } else {
57
- fgDecl = `color: ${(0, _color.tokenForegroundForIntent)(colors.value.text)}`;
58
- }
59
- } else if (typeof colors.value.text === "string" && (0, _color.isCssColor)(colors.value.text)) {
60
- fgDecl = `color: ${colors.value.text}`;
61
- }
62
- } else if (bgIntentFg && !bgIsGradient) {
63
- fgDecl = `color: ${bgIntentFg}`;
64
- } else if (bgDecl && !bgIsGradient && colors.value.background && typeof colors.value.background === "string" && colors.value.background !== "transparent" && (0, _color.isParsableColor)(colors.value.background)) {
65
- const parsed = (0, _color.parseColor)(colors.value.background);
66
- if (parsed.a == null || parsed.a === 1) {
67
- fgDecl = `color: ${(0, _color.getForeground)(parsed)}`;
68
- }
69
- }
118
+ const {
119
+ bgDecl,
120
+ bgIntentFg,
121
+ bgIsGradient
122
+ } = resolveBackground(colors.value.background);
123
+ const {
124
+ fgDecl,
125
+ gradientStyles
126
+ } = resolveForeground(colors.value, bgDecl, bgIntentFg, bgIsGradient);
127
+ const styles = [...gradientStyles];
70
128
  if (bgDecl) styles.push(bgDecl);
71
129
  if (fgDecl) styles.push(fgDecl);
72
130
  return styles;
@@ -10,6 +10,58 @@ import {
10
10
  tokenStylesForIntent
11
11
  } from "../../utils/Commons/color.util.js";
12
12
  import { isGradient, resolveGradient } from "../../utils/Commons/gradient.util.js";
13
+ function resolveBackground(background) {
14
+ const none = { bgDecl: null, bgIntentFg: null, bgIsGradient: false };
15
+ if (!background) return none;
16
+ if (isGradient(background)) {
17
+ const grad = resolveGradient(background);
18
+ return grad ? { bgDecl: `background-image: ${grad}`, bgIntentFg: null, bgIsGradient: true } : none;
19
+ }
20
+ if (isIntent(background)) {
21
+ const m = tokenStylesForIntent(background, "default");
22
+ return { bgDecl: `background-color: ${m["background-color"]}`, bgIntentFg: m.color, bgIsGradient: false };
23
+ }
24
+ if (background === "transparent") {
25
+ return { bgDecl: `background-color: ${background}`, bgIntentFg: null, bgIsGradient: false };
26
+ }
27
+ if (typeof background === "string" && isCssColor(background)) {
28
+ return { bgDecl: `background-color: ${background}`, bgIntentFg: null, bgIsGradient: false };
29
+ }
30
+ return none;
31
+ }
32
+ function resolveTextGradient(text) {
33
+ const grad = resolveGradient(text);
34
+ if (!grad) return { fgDecl: null, gradientStyles: [] };
35
+ return {
36
+ fgDecl: "color: transparent",
37
+ gradientStyles: [`background-image: ${grad}`, "background-clip: text", "-webkit-background-clip: text"]
38
+ };
39
+ }
40
+ function resolveIntentText(colors, bgIntentFg) {
41
+ if (bgIntentFg && isIntent(colors.background) && colors.text === colors.background) {
42
+ return `color: ${bgIntentFg}`;
43
+ }
44
+ return `color: ${tokenForegroundForIntent(colors.text)}`;
45
+ }
46
+ function resolveAutoContrast(background) {
47
+ if (typeof background === "string" && background !== "transparent" && isParsableColor(background)) {
48
+ const parsed = parseColor(background);
49
+ if (parsed.a == null || parsed.a === 1) return `color: ${getForeground(parsed)}`;
50
+ }
51
+ return null;
52
+ }
53
+ function resolveForeground(colors, bgDecl, bgIntentFg, bgIsGradient) {
54
+ const { background, text } = colors;
55
+ if (text) {
56
+ if (isGradient(text)) return resolveTextGradient(text);
57
+ if (isIntent(text)) return { fgDecl: resolveIntentText(colors, bgIntentFg), gradientStyles: [] };
58
+ if (typeof text === "string" && isCssColor(text)) return { fgDecl: `color: ${text}`, gradientStyles: [] };
59
+ return { fgDecl: null, gradientStyles: [] };
60
+ }
61
+ if (bgIntentFg && !bgIsGradient) return { fgDecl: `color: ${bgIntentFg}`, gradientStyles: [] };
62
+ if (bgDecl && !bgIsGradient) return { fgDecl: resolveAutoContrast(background), gradientStyles: [] };
63
+ return { fgDecl: null, gradientStyles: [] };
64
+ }
13
65
  export function useColor(colors) {
14
66
  const colorClasses = computed(() => {
15
67
  const classes = [];
@@ -22,54 +74,9 @@ export function useColor(colors) {
22
74
  return classes;
23
75
  });
24
76
  const colorStyles = computed(() => {
25
- const styles = [];
26
- let bgIntentFg = null;
27
- let bgDecl = null;
28
- let bgIsGradient = false;
29
- if (colors.value.background) {
30
- if (isGradient(colors.value.background)) {
31
- const grad = resolveGradient(colors.value.background);
32
- if (grad) {
33
- bgDecl = `background-image: ${grad}`;
34
- bgIsGradient = true;
35
- }
36
- } else if (isIntent(colors.value.background)) {
37
- const m = tokenStylesForIntent(colors.value.background, "default");
38
- bgDecl = `background-color: ${m["background-color"]}`;
39
- bgIntentFg = m.color;
40
- } else if (colors.value.background === "transparent") {
41
- bgDecl = `background-color: ${colors.value.background}`;
42
- } else if (typeof colors.value.background === "string" && isCssColor(colors.value.background)) {
43
- bgDecl = `background-color: ${colors.value.background}`;
44
- }
45
- }
46
- let fgDecl = null;
47
- if (colors.value.text) {
48
- if (isGradient(colors.value.text)) {
49
- const grad = resolveGradient(colors.value.text);
50
- if (grad) {
51
- fgDecl = "color: transparent";
52
- styles.push(`background-image: ${grad}`);
53
- styles.push("background-clip: text");
54
- styles.push("-webkit-background-clip: text");
55
- }
56
- } else if (isIntent(colors.value.text)) {
57
- if (bgIntentFg && isIntent(colors.value.background) && colors.value.text === colors.value.background) {
58
- fgDecl = `color: ${bgIntentFg}`;
59
- } else {
60
- fgDecl = `color: ${tokenForegroundForIntent(colors.value.text)}`;
61
- }
62
- } else if (typeof colors.value.text === "string" && isCssColor(colors.value.text)) {
63
- fgDecl = `color: ${colors.value.text}`;
64
- }
65
- } else if (bgIntentFg && !bgIsGradient) {
66
- fgDecl = `color: ${bgIntentFg}`;
67
- } else if (bgDecl && !bgIsGradient && colors.value.background && typeof colors.value.background === "string" && colors.value.background !== "transparent" && isParsableColor(colors.value.background)) {
68
- const parsed = parseColor(colors.value.background);
69
- if (parsed.a == null || parsed.a === 1) {
70
- fgDecl = `color: ${getForeground(parsed)}`;
71
- }
72
- }
77
+ const { bgDecl, bgIntentFg, bgIsGradient } = resolveBackground(colors.value.background);
78
+ const { fgDecl, gradientStyles } = resolveForeground(colors.value, bgDecl, bgIntentFg, bgIsGradient);
79
+ const styles = [...gradientStyles];
73
80
  if (bgDecl) styles.push(bgDecl);
74
81
  if (fgDecl) styles.push(fgDecl);
75
82
  return styles;
@@ -79,7 +79,8 @@ function useColorEffect(props, isHover = (0, _vue.ref)(false), isActive = (0, _v
79
79
  });
80
80
  const colorStyles = (0, _vue.computed)(() => {
81
81
  trackReactiveDependency(isDisabled.value);
82
- const bgRole = isHover.value ? "hover" : isActive.value ? "active" : "default";
82
+ let bgRole = "default";
83
+ if (isHover.value) bgRole = "hover";else if (isActive.value) bgRole = "active";
83
84
  const [bgDeclBase, bgIntentFg, bgIsGradient] = resolveBackground(bgColor.value, bgRole);
84
85
  const [fgDecl, bgDeclOverride, clipText] = resolveForeground(color.value, bgColor.value, bgIntentFg, bgIsGradient);
85
86
  const bgDecl = bgDeclOverride ?? bgDeclBase;
@@ -92,7 +92,9 @@ export function useColorEffect(props, isHover = ref(false), isActive = ref(false
92
92
  });
93
93
  const colorStyles = computed(() => {
94
94
  trackReactiveDependency(isDisabled.value);
95
- const bgRole = isHover.value ? "hover" : isActive.value ? "active" : "default";
95
+ let bgRole = "default";
96
+ if (isHover.value) bgRole = "hover";
97
+ else if (isActive.value) bgRole = "active";
96
98
  const [bgDeclBase, bgIntentFg, bgIsGradient] = resolveBackground(bgColor.value, bgRole);
97
99
  const [fgDecl, bgDeclOverride, clipText] = resolveForeground(
98
100
  color.value,
@@ -142,6 +142,7 @@ function useCreateLayout(props) {
142
142
  const index = (0, _vue.computed)(() => items.value.findIndex(i => i.id === id));
143
143
  const zIndex = (0, _vue.computed)(() => rootZIndex.value + layers.value.length * _layout.LAYOUT_ITEM_ZINDEX_STEP - index.value * _layout.LAYOUT_ITEM_ZINDEX_STEP);
144
144
  const isHorizontalPosition = () => position.value === "left" || position.value === "right";
145
+ const fixedSize = () => elementSize.value ? `${(0, _commons.convertToUnit)(elementSize.value)}` : void 0;
145
146
  const baseItemStyles = () => {
146
147
  const isOpposite = position.value === "right" || position.value === "bottom";
147
148
  return {
@@ -158,12 +159,12 @@ function useCreateLayout(props) {
158
159
  const isHorizontal = isHorizontalPosition();
159
160
  const isOppositeHorizontal = position.value === "right";
160
161
  return {
161
- "height": isHorizontal ? `calc(100% - ${(0, _commons.convertToUnit)(item.top)} - ${(0, _commons.convertToUnit)(item.bottom)})` : elementSize.value ? `${(0, _commons.convertToUnit)(elementSize.value)}` : void 0,
162
+ "height": isHorizontal ? `calc(100% - ${(0, _commons.convertToUnit)(item.top)} - ${(0, _commons.convertToUnit)(item.bottom)})` : fixedSize(),
162
163
  left: isOppositeHorizontal ? void 0 : (0, _commons.convertToUnit)(item.left),
163
164
  right: isOppositeHorizontal ? (0, _commons.convertToUnit)(item.right) : void 0,
164
165
  top: position.value !== "bottom" ? (0, _commons.convertToUnit)(item.top) : void 0,
165
166
  bottom: position.value !== "top" ? (0, _commons.convertToUnit)(item.bottom) : void 0,
166
- "width": !isHorizontal ? `calc(100% - ${(0, _commons.convertToUnit)(item.left)} - ${(0, _commons.convertToUnit)(item.right)})` : elementSize.value ? `${(0, _commons.convertToUnit)(elementSize.value)}` : void 0
167
+ "width": !isHorizontal ? `calc(100% - ${(0, _commons.convertToUnit)(item.left)} - ${(0, _commons.convertToUnit)(item.right)})` : fixedSize()
167
168
  };
168
169
  };
169
170
  const layoutItemStyles = (0, _vue.computed)(() => {
@@ -137,6 +137,7 @@ export function useCreateLayout(props) {
137
137
  const index = computed(() => items.value.findIndex((i) => i.id === id));
138
138
  const zIndex = computed(() => rootZIndex.value + layers.value.length * LAYOUT_ITEM_ZINDEX_STEP - index.value * LAYOUT_ITEM_ZINDEX_STEP);
139
139
  const isHorizontalPosition = () => position.value === "left" || position.value === "right";
140
+ const fixedSize = () => elementSize.value ? `${convertToUnit(elementSize.value)}` : void 0;
140
141
  const baseItemStyles = () => {
141
142
  const isOpposite = position.value === "right" || position.value === "bottom";
142
143
  return {
@@ -151,12 +152,12 @@ export function useCreateLayout(props) {
151
152
  const isHorizontal = isHorizontalPosition();
152
153
  const isOppositeHorizontal = position.value === "right";
153
154
  return {
154
- "height": isHorizontal ? `calc(100% - ${convertToUnit(item.top)} - ${convertToUnit(item.bottom)})` : elementSize.value ? `${convertToUnit(elementSize.value)}` : void 0,
155
+ "height": isHorizontal ? `calc(100% - ${convertToUnit(item.top)} - ${convertToUnit(item.bottom)})` : fixedSize(),
155
156
  left: isOppositeHorizontal ? void 0 : convertToUnit(item.left),
156
157
  right: isOppositeHorizontal ? convertToUnit(item.right) : void 0,
157
158
  top: position.value !== "bottom" ? convertToUnit(item.top) : void 0,
158
159
  bottom: position.value !== "top" ? convertToUnit(item.bottom) : void 0,
159
- "width": !isHorizontal ? `calc(100% - ${convertToUnit(item.left)} - ${convertToUnit(item.right)})` : elementSize.value ? `${convertToUnit(elementSize.value)}` : void 0
160
+ "width": !isHorizontal ? `calc(100% - ${convertToUnit(item.left)} - ${convertToUnit(item.right)})` : fixedSize()
160
161
  };
161
162
  };
162
163
  const layoutItemStyles = computed(() => {
@@ -1,6 +1,7 @@
1
1
  import type { Ref } from 'vue';
2
2
  import type { IUseCssSupportClientOptions } from '../../interfaces/Commons/css-support.interface';
3
3
  import type { TCssFeatureName } from '../../types/Commons/css-support.type';
4
+ import type { TAnyString } from '../../types/Commons/commons.type';
4
5
  /*********************************************************
5
6
  * useCssSupportClient
6
7
  *
@@ -16,4 +17,4 @@ import type { TCssFeatureName } from '../../types/Commons/css-support.type';
16
17
  * // <div v-if="supportsContainer">…CSS path…</div>
17
18
  * // <div v-else>…JS fallback path…</div>
18
19
  ********************************************************/
19
- export declare function useCssSupportClient(feature: TCssFeatureName | string, options?: IUseCssSupportClientOptions): Ref<boolean>;
20
+ export declare function useCssSupportClient(feature: TCssFeatureName | TAnyString, options?: IUseCssSupportClientOptions): Ref<boolean>;
@@ -54,7 +54,13 @@ function createDisplay(options, ssr) {
54
54
  const lg = width.value < thresholds.xl && !(md || sm || xs);
55
55
  const xl = width.value < thresholds.xxl && !(lg || md || sm || xs);
56
56
  const xxl = width.value >= thresholds.xxl;
57
- const name = xs ? "xs" : sm ? "sm" : md ? "md" : lg ? "lg" : xl ? "xl" : "xxl";
57
+ const name = (0, _display2.getBreakpointName)({
58
+ xs,
59
+ sm,
60
+ md,
61
+ lg,
62
+ xl
63
+ });
58
64
  const breakpointValue = typeof mobileBreakpoint === "number" ? mobileBreakpoint : thresholds[mobileBreakpoint];
59
65
  const mobile = width.value < breakpointValue;
60
66
  state.xs = xs;
@@ -1,7 +1,7 @@
1
1
  import { computed, inject, reactive, shallowRef, toRefs, watchEffect } from "vue";
2
2
  import { IN_BROWSER } from "../../consts/Commons/commons.const.js";
3
3
  import { ORIGAM_DISPLAY_KEY } from "../../consts/Commons/display.const.js";
4
- import { getClientHeight, getClientWidth, getPlatform, parseDisplayOptions } from "../../utils/Commons/display.util.js";
4
+ import { getBreakpointName, getClientHeight, getClientWidth, getPlatform, parseDisplayOptions } from "../../utils/Commons/display.util.js";
5
5
  import { getCurrentInstanceName } from "../../utils/Commons/getCurrentInstance.util.js";
6
6
  export function useDisplay(props = {}, name = getCurrentInstanceName()) {
7
7
  const display = inject(ORIGAM_DISPLAY_KEY);
@@ -38,7 +38,7 @@ export function createDisplay(options, ssr) {
38
38
  const lg = width.value < thresholds.xl && !(md || sm || xs);
39
39
  const xl = width.value < thresholds.xxl && !(lg || md || sm || xs);
40
40
  const xxl = width.value >= thresholds.xxl;
41
- const name = xs ? "xs" : sm ? "sm" : md ? "md" : lg ? "lg" : xl ? "xl" : "xxl";
41
+ const name = getBreakpointName({ xs, sm, md, lg, xl });
42
42
  const breakpointValue = typeof mobileBreakpoint === "number" ? mobileBreakpoint : thresholds[mobileBreakpoint];
43
43
  const mobile = width.value < breakpointValue;
44
44
  state.xs = xs;