@rotki/ui-library 2.27.0 → 3.0.0-beta.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 (391) hide show
  1. package/README.md +36 -15
  2. package/dist/components/accordions/accordion/RuiAccordion.js.map +1 -1
  3. package/dist/components/accordions/accordion/RuiAccordion.vue.d.ts +0 -4
  4. package/dist/components/accordions/accordion/RuiAccordion.vue_vue_type_script_setup_true_lang.js +6 -7
  5. package/dist/components/accordions/accordion/RuiAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  6. package/dist/components/accordions/accordions/RuiAccordions.js.map +1 -1
  7. package/dist/components/accordions/accordions/RuiAccordions.vue_vue_type_script_setup_true_lang.js +15 -2
  8. package/dist/components/accordions/accordions/RuiAccordions.vue_vue_type_script_setup_true_lang.js.map +1 -1
  9. package/dist/components/alerts/RuiAlert.js.map +1 -1
  10. package/dist/components/alerts/RuiAlert.vue_vue_type_script_setup_true_lang.js +43 -212
  11. package/dist/components/alerts/RuiAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
  12. package/dist/components/avatars/RuiAvatar.js.map +1 -1
  13. package/dist/components/avatars/RuiAvatar.vue_vue_type_script_setup_true_lang.js +21 -31
  14. package/dist/components/avatars/RuiAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  15. package/dist/components/avatars/RuiAvatarGroup.js.map +1 -1
  16. package/dist/components/avatars/RuiAvatarGroup.vue.d.ts +6 -0
  17. package/dist/components/avatars/RuiAvatarGroup.vue_vue_type_script_setup_true_lang.js +16 -12
  18. package/dist/components/avatars/RuiAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/components/avatars/avatar-props.d.ts +16 -3
  20. package/dist/components/avatars/avatar-props.js +42 -5
  21. package/dist/components/avatars/avatar-props.js.map +1 -1
  22. package/dist/components/buttons/button/RuiButton.js.map +1 -1
  23. package/dist/components/buttons/button/RuiButton.vue.d.ts +0 -1
  24. package/dist/components/buttons/button/RuiButton.vue_vue_type_script_setup_true_lang.js +29 -16
  25. package/dist/components/buttons/button/RuiButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  26. package/dist/components/buttons/button/button-props.d.ts +0 -2
  27. package/dist/components/buttons/button/button-props.js +5 -5
  28. package/dist/components/buttons/button/button-props.js.map +1 -1
  29. package/dist/components/buttons/button/button-styles.d.ts +4 -1
  30. package/dist/components/buttons/button/button-styles.js +127 -54
  31. package/dist/components/buttons/button/button-styles.js.map +1 -1
  32. package/dist/components/buttons/button-group/RuiButtonGroup.js.map +1 -1
  33. package/dist/components/buttons/button-group/RuiButtonGroup.vue.d.ts +8 -2
  34. package/dist/components/buttons/button-group/RuiButtonGroup.vue_vue_type_script_setup_true_lang.js +65 -96
  35. package/dist/components/buttons/button-group/RuiButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  36. package/dist/components/buttons/button-group/button-group-context.d.ts +28 -0
  37. package/dist/components/buttons/button-group/button-group-context.js +22 -0
  38. package/dist/components/buttons/button-group/button-group-context.js.map +1 -0
  39. package/dist/components/calendar/RuiCalendar.js.map +1 -1
  40. package/dist/components/calendar/RuiCalendar.vue_vue_type_script_setup_true_lang.js +5 -2
  41. package/dist/components/calendar/RuiCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  42. package/dist/components/calendar/RuiCalendarGrid.js.map +1 -1
  43. package/dist/components/calendar/RuiCalendarGrid.vue_vue_type_script_setup_true_lang.js +11 -7
  44. package/dist/components/calendar/RuiCalendarGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  45. package/dist/components/calendar/RuiCalendarHeader.js.map +1 -1
  46. package/dist/components/calendar/RuiCalendarHeader.vue_vue_type_script_setup_true_lang.js +20 -21
  47. package/dist/components/calendar/RuiCalendarHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  48. package/dist/components/calendar/RuiCalendarMenu.js.map +1 -1
  49. package/dist/components/calendar/RuiCalendarMenu.vue_vue_type_script_setup_true_lang.js +16 -20
  50. package/dist/components/calendar/RuiCalendarMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  51. package/dist/components/cards/RuiCard.js.map +1 -1
  52. package/dist/components/cards/RuiCard.vue.d.ts +0 -3
  53. package/dist/components/cards/RuiCard.vue_vue_type_script_setup_true_lang.js +31 -19
  54. package/dist/components/cards/RuiCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  55. package/dist/components/cards/RuiCardHeader.js.map +1 -1
  56. package/dist/components/cards/RuiCardHeader.vue_vue_type_script_setup_true_lang.js +13 -25
  57. package/dist/components/cards/RuiCardHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  58. package/dist/components/chips/RuiChip.js.map +1 -1
  59. package/dist/components/chips/RuiChip.vue.d.ts +5 -2
  60. package/dist/components/chips/RuiChip.vue_vue_type_script_setup_true_lang.js +127 -78
  61. package/dist/components/chips/RuiChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  62. package/dist/components/chips/chip-props.d.ts +2 -0
  63. package/dist/components/chips/chip-props.js +5 -3
  64. package/dist/components/chips/chip-props.js.map +1 -1
  65. package/dist/components/color-picker/RuiColorBoard.js.map +1 -1
  66. package/dist/components/color-picker/RuiColorBoard.vue_vue_type_script_setup_true_lang.js +4 -4
  67. package/dist/components/color-picker/RuiColorBoard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  68. package/dist/components/color-picker/RuiColorHue.js.map +1 -1
  69. package/dist/components/color-picker/RuiColorHue.vue_vue_type_script_setup_true_lang.js +1 -1
  70. package/dist/components/color-picker/RuiColorHue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/components/color-picker/RuiColorInput.js.map +1 -1
  72. package/dist/components/color-picker/RuiColorInput.vue_vue_type_script_setup_true_lang.js +38 -27
  73. package/dist/components/color-picker/RuiColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  74. package/dist/components/color-picker/RuiColorPicker.js.map +1 -1
  75. package/dist/components/color-picker/RuiColorPicker.vue_vue_type_script_setup_true_lang.js +1 -1
  76. package/dist/components/color-picker/RuiColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  77. package/dist/components/date-time-picker/RuiDateTimePicker.js.map +1 -1
  78. package/dist/components/date-time-picker/RuiDateTimePicker.vue.d.ts +3 -2
  79. package/dist/components/date-time-picker/RuiDateTimePicker.vue_vue_type_script_setup_true_lang.js +48 -47
  80. package/dist/components/date-time-picker/RuiDateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  81. package/dist/components/date-time-picker/RuiDateTimePickerMenu.js.map +1 -1
  82. package/dist/components/date-time-picker/RuiDateTimePickerMenu.vue_vue_type_script_setup_true_lang.js +2 -2
  83. package/dist/components/date-time-picker/RuiDateTimePickerMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  84. package/dist/components/date-time-picker/RuiTimezoneSelect.js.map +1 -1
  85. package/dist/components/date-time-picker/RuiTimezoneSelect.vue.d.ts +4 -3
  86. package/dist/components/date-time-picker/RuiTimezoneSelect.vue_vue_type_script_setup_true_lang.js +3 -3
  87. package/dist/components/date-time-picker/RuiTimezoneSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  88. package/dist/components/date-time-picker/date-time-picker-styles.d.ts +128 -219
  89. package/dist/components/date-time-picker/date-time-picker-styles.js +1 -2
  90. package/dist/components/date-time-picker/date-time-picker-styles.js.map +1 -1
  91. package/dist/components/forms/auto-complete/RuiAutoComplete.js.map +1 -1
  92. package/dist/components/forms/auto-complete/RuiAutoComplete.vue.d.ts +1 -68
  93. package/dist/components/forms/auto-complete/RuiAutoComplete.vue_vue_type_script_setup_true_lang.js +184 -179
  94. package/dist/components/forms/auto-complete/RuiAutoComplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  95. package/dist/components/forms/auto-complete/RuiAutoCompleteOption.js.map +1 -1
  96. package/dist/components/forms/auto-complete/RuiAutoCompleteOption.vue_vue_type_script_setup_true_lang.js +1 -0
  97. package/dist/components/forms/auto-complete/RuiAutoCompleteOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
  98. package/dist/components/forms/auto-complete/RuiAutoCompleteOptionList.js.map +1 -1
  99. package/dist/components/forms/auto-complete/RuiAutoCompleteOptionList.vue.d.ts +2 -0
  100. package/dist/components/forms/auto-complete/RuiAutoCompleteOptionList.vue_vue_type_script_setup_true_lang.js +8 -3
  101. package/dist/components/forms/auto-complete/RuiAutoCompleteOptionList.vue_vue_type_script_setup_true_lang.js.map +1 -1
  102. package/dist/components/forms/auto-complete/RuiAutoCompleteSelection.js.map +1 -1
  103. package/dist/components/forms/auto-complete/RuiAutoCompleteSelection.vue.d.ts +4 -0
  104. package/dist/components/forms/auto-complete/RuiAutoCompleteSelection.vue_vue_type_script_setup_true_lang.js +24 -10
  105. package/dist/components/forms/auto-complete/RuiAutoCompleteSelection.vue_vue_type_script_setup_true_lang.js.map +1 -1
  106. package/dist/components/forms/auto-complete/auto-complete-props.d.ts +66 -0
  107. package/dist/components/forms/auto-complete/auto-complete-styles.d.ts +128 -218
  108. package/dist/components/forms/auto-complete/auto-complete-styles.js +4 -2
  109. package/dist/components/forms/auto-complete/auto-complete-styles.js.map +1 -1
  110. package/dist/components/forms/category-picker/RuiCategoryPicker.js.map +1 -1
  111. package/dist/components/forms/category-picker/RuiCategoryPicker.vue.d.ts +3 -6
  112. package/dist/components/forms/category-picker/RuiCategoryPicker.vue_vue_type_script_setup_true_lang.js +105 -105
  113. package/dist/components/forms/category-picker/RuiCategoryPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  114. package/dist/components/forms/category-picker/category-picker-styles.d.ts +83 -232
  115. package/dist/components/forms/category-picker/category-picker-styles.js +20 -26
  116. package/dist/components/forms/category-picker/category-picker-styles.js.map +1 -1
  117. package/dist/components/forms/check-control-styles.d.ts +61 -2
  118. package/dist/components/forms/check-control-styles.js +53 -46
  119. package/dist/components/forms/check-control-styles.js.map +1 -1
  120. package/dist/components/forms/checkbox/RuiCheckbox.js.map +1 -1
  121. package/dist/components/forms/checkbox/RuiCheckbox.vue_vue_type_script_setup_true_lang.js +31 -18
  122. package/dist/components/forms/checkbox/RuiCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  123. package/dist/components/forms/checkbox/checkbox-group/RuiCheckboxGroup.js.map +1 -1
  124. package/dist/components/forms/checkbox/checkbox-group/RuiCheckboxGroup.vue_vue_type_script_setup_true_lang.js +3 -3
  125. package/dist/components/forms/checkbox/checkbox-group/RuiCheckboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  126. package/dist/components/forms/field-defaults/RuiFieldDefaults.js +7 -0
  127. package/dist/components/forms/field-defaults/RuiFieldDefaults.js.map +1 -0
  128. package/dist/components/forms/field-defaults/RuiFieldDefaults.vue.d.ts +16 -0
  129. package/dist/components/forms/field-defaults/RuiFieldDefaults.vue_vue_type_script_setup_true_lang.js +18 -0
  130. package/dist/components/forms/field-defaults/RuiFieldDefaults.vue_vue_type_script_setup_true_lang.js.map +1 -0
  131. package/dist/components/forms/field-label/RuiFieldLabel.js +7 -0
  132. package/dist/components/forms/field-label/RuiFieldLabel.js.map +1 -0
  133. package/dist/components/forms/field-label/RuiFieldLabel.vue.d.ts +17 -0
  134. package/dist/components/forms/field-label/RuiFieldLabel.vue_vue_type_script_setup_true_lang.js +57 -0
  135. package/dist/components/forms/field-label/RuiFieldLabel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  136. package/dist/components/forms/file-upload/RuiFileUpload.js.map +1 -1
  137. package/dist/components/forms/file-upload/RuiFileUpload.vue.d.ts +1 -1
  138. package/dist/components/forms/file-upload/RuiFileUpload.vue_vue_type_script_setup_true_lang.js +39 -20
  139. package/dist/components/forms/file-upload/RuiFileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -1
  140. package/dist/components/forms/radio-button/radio/RuiRadio.js.map +1 -1
  141. package/dist/components/forms/radio-button/radio/RuiRadio.vue_vue_type_script_setup_true_lang.js +13 -14
  142. package/dist/components/forms/radio-button/radio/RuiRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  143. package/dist/components/forms/radio-button/radio-group/RuiRadioGroup.js.map +1 -1
  144. package/dist/components/forms/radio-button/radio-group/RuiRadioGroup.vue_vue_type_script_setup_true_lang.js +3 -3
  145. package/dist/components/forms/radio-button/radio-group/RuiRadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  146. package/dist/components/forms/revealable-text-field/RuiRevealableTextField.js.map +1 -1
  147. package/dist/components/forms/revealable-text-field/RuiRevealableTextField.vue_vue_type_script_setup_true_lang.js +6 -6
  148. package/dist/components/forms/revealable-text-field/RuiRevealableTextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  149. package/dist/components/forms/select/RuiMenuSelect.js.map +1 -1
  150. package/dist/components/forms/select/RuiMenuSelect.vue.d.ts +3 -12
  151. package/dist/components/forms/select/RuiMenuSelect.vue_vue_type_script_setup_true_lang.js +50 -45
  152. package/dist/components/forms/select/RuiMenuSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  153. package/dist/components/forms/select/RuiSimpleSelect.js.map +1 -1
  154. package/dist/components/forms/select/RuiSimpleSelect.vue.d.ts +0 -1
  155. package/dist/components/forms/select/RuiSimpleSelect.vue_vue_type_script_setup_true_lang.js +13 -20
  156. package/dist/components/forms/select/RuiSimpleSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  157. package/dist/components/forms/select/menu-select-styles.d.ts +99 -221
  158. package/dist/components/forms/select/menu-select-styles.js +1 -4
  159. package/dist/components/forms/select/menu-select-styles.js.map +1 -1
  160. package/dist/components/forms/slider/RuiSlider.js.map +1 -1
  161. package/dist/components/forms/slider/RuiSlider.vue.d.ts +0 -4
  162. package/dist/components/forms/slider/RuiSlider.vue_vue_type_script_setup_true_lang.js +113 -90
  163. package/dist/components/forms/slider/RuiSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  164. package/dist/components/forms/slider/slider-styles.d.ts +40 -40
  165. package/dist/components/forms/slider/slider-styles.js +67 -109
  166. package/dist/components/forms/slider/slider-styles.js.map +1 -1
  167. package/dist/components/forms/switch/RuiSwitch.js.map +1 -1
  168. package/dist/components/forms/switch/RuiSwitch.vue_vue_type_script_setup_true_lang.js +32 -44
  169. package/dist/components/forms/switch/RuiSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  170. package/dist/components/forms/text-area/RuiTextArea.js.map +1 -1
  171. package/dist/components/forms/text-area/RuiTextArea.vue.d.ts +3 -2
  172. package/dist/components/forms/text-area/RuiTextArea.vue_vue_type_script_setup_true_lang.js +120 -99
  173. package/dist/components/forms/text-area/RuiTextArea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  174. package/dist/components/forms/text-area/text-area-styles.d.ts +41 -115
  175. package/dist/components/forms/text-area/text-area-styles.js +34 -194
  176. package/dist/components/forms/text-area/text-area-styles.js.map +1 -1
  177. package/dist/components/forms/text-field/RuiTextField.js.map +1 -1
  178. package/dist/components/forms/text-field/RuiTextField.vue.d.ts +3 -2
  179. package/dist/components/forms/text-field/RuiTextField.vue_vue_type_script_setup_true_lang.js +93 -90
  180. package/dist/components/forms/text-field/RuiTextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  181. package/dist/components/forms/text-field/text-field-styles.d.ts +37 -145
  182. package/dist/components/forms/text-field/text-field-styles.js +24 -267
  183. package/dist/components/forms/text-field/text-field-styles.js.map +1 -1
  184. package/dist/components/forms/text-input-styles.d.ts +98 -229
  185. package/dist/components/forms/text-input-styles.js +63 -193
  186. package/dist/components/forms/text-input-styles.js.map +1 -1
  187. package/dist/components/helpers/RuiFormTextDetail.js.map +1 -1
  188. package/dist/components/helpers/RuiFormTextDetail.vue_vue_type_script_setup_true_lang.js +2 -2
  189. package/dist/components/helpers/RuiFormTextDetail.vue_vue_type_script_setup_true_lang.js.map +1 -1
  190. package/dist/components/icons/RuiIcon.js.map +1 -1
  191. package/dist/components/icons/RuiIcon.vue_vue_type_script_setup_true_lang.js +6 -3
  192. package/dist/components/icons/RuiIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
  193. package/dist/components/index.d.ts +5 -3
  194. package/dist/components/index.js +4 -3
  195. package/dist/components/loaders/RuiSkeletonBase.js.map +1 -1
  196. package/dist/components/loaders/RuiSkeletonBase.vue_vue_type_script_setup_true_lang.js +6 -5
  197. package/dist/components/loaders/RuiSkeletonBase.vue_vue_type_script_setup_true_lang.js.map +1 -1
  198. package/dist/components/loaders/RuiSkeletonLoader.js.map +1 -1
  199. package/dist/components/loaders/RuiSkeletonLoader.vue_vue_type_script_setup_true_lang.js +8 -8
  200. package/dist/components/loaders/RuiSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  201. package/dist/components/logos/RuiLogo.js.map +1 -1
  202. package/dist/components/logos/RuiLogo.vue_vue_type_script_setup_true_lang.js +1 -1
  203. package/dist/components/logos/RuiLogo.vue_vue_type_script_setup_true_lang.js.map +1 -1
  204. package/dist/components/overlays/badge/RuiBadge.js.map +1 -1
  205. package/dist/components/overlays/badge/RuiBadge.vue_vue_type_script_setup_true_lang.js +75 -47
  206. package/dist/components/overlays/badge/RuiBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  207. package/dist/components/overlays/dialog/RuiDialog.js.map +1 -1
  208. package/dist/components/overlays/dialog/RuiDialog.vue.d.ts +3 -2
  209. package/dist/components/overlays/dialog/RuiDialog.vue_vue_type_script_setup_true_lang.js +16 -12
  210. package/dist/components/overlays/dialog/RuiDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  211. package/dist/components/overlays/menu/RuiMenu.js.map +1 -1
  212. package/dist/components/overlays/menu/RuiMenu.vue.d.ts +9 -7
  213. package/dist/components/overlays/menu/RuiMenu.vue_vue_type_script_setup_true_lang.js +16 -12
  214. package/dist/components/overlays/menu/RuiMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  215. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.js.map +1 -1
  216. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue.d.ts +6 -2
  217. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue_vue_type_script_setup_true_lang.js +40 -16
  218. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  219. package/dist/components/overlays/notification/RuiNotification.js.map +1 -1
  220. package/dist/components/overlays/notification/RuiNotification.vue_vue_type_script_setup_true_lang.js +4 -4
  221. package/dist/components/overlays/notification/RuiNotification.vue_vue_type_script_setup_true_lang.js.map +1 -1
  222. package/dist/components/overlays/tooltip/RuiTooltip.js.map +1 -1
  223. package/dist/components/overlays/tooltip/RuiTooltip.vue.d.ts +0 -5
  224. package/dist/components/overlays/tooltip/RuiTooltip.vue_vue_type_script_setup_true_lang.js +16 -10
  225. package/dist/components/overlays/tooltip/RuiTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  226. package/dist/components/overlays/tooltip/tooltip-styles.d.ts +5 -12
  227. package/dist/components/overlays/tooltip/tooltip-styles.js +11 -18
  228. package/dist/components/overlays/tooltip/tooltip-styles.js.map +1 -1
  229. package/dist/components/progress/RuiProgress.js.map +1 -1
  230. package/dist/components/progress/RuiProgress.vue.d.ts +4 -0
  231. package/dist/components/progress/RuiProgress.vue_vue_type_script_setup_true_lang.js +72 -46
  232. package/dist/components/progress/RuiProgress.vue_vue_type_script_setup_true_lang.js.map +1 -1
  233. package/dist/components/steppers/RuiFooterStepper.js.map +1 -1
  234. package/dist/components/steppers/RuiFooterStepper.vue_vue_type_script_setup_true_lang.js +27 -28
  235. package/dist/components/steppers/RuiFooterStepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  236. package/dist/components/steppers/RuiStepper.js.map +1 -1
  237. package/dist/components/steppers/RuiStepper.vue.d.ts +0 -4
  238. package/dist/components/steppers/RuiStepper.vue_vue_type_script_setup_true_lang.js +25 -23
  239. package/dist/components/steppers/RuiStepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  240. package/dist/components/steppers/RuiStepperIcon.js.map +1 -1
  241. package/dist/components/steppers/RuiStepperIcon.vue.d.ts +2 -0
  242. package/dist/components/steppers/RuiStepperIcon.vue_vue_type_script_setup_true_lang.js +47 -47
  243. package/dist/components/steppers/RuiStepperIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
  244. package/dist/components/tables/RuiDataTable.js.map +1 -1
  245. package/dist/components/tables/RuiDataTable.vue.d.ts +3 -6
  246. package/dist/components/tables/RuiDataTable.vue_vue_type_script_setup_true_lang.js +65 -47
  247. package/dist/components/tables/RuiDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  248. package/dist/components/tables/RuiExpandButton.js.map +1 -1
  249. package/dist/components/tables/RuiExpandButton.vue_vue_type_script_setup_true_lang.js +1 -0
  250. package/dist/components/tables/RuiExpandButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  251. package/dist/components/tables/RuiTable.js.map +1 -1
  252. package/dist/components/tables/RuiTable.vue_vue_type_script_setup_true_lang.js +8 -5
  253. package/dist/components/tables/RuiTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  254. package/dist/components/tables/RuiTableEmptyState.js.map +1 -1
  255. package/dist/components/tables/RuiTableEmptyState.vue_vue_type_script_setup_true_lang.js +1 -1
  256. package/dist/components/tables/RuiTableEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -1
  257. package/dist/components/tables/RuiTableHead.js.map +1 -1
  258. package/dist/components/tables/RuiTableHead.vue_vue_type_script_setup_true_lang.js +88 -66
  259. package/dist/components/tables/RuiTableHead.vue_vue_type_script_setup_true_lang.js.map +1 -1
  260. package/dist/components/tables/RuiTablePagination.js.map +1 -1
  261. package/dist/components/tables/RuiTablePagination.vue_vue_type_script_setup_true_lang.js +8 -11
  262. package/dist/components/tables/RuiTablePagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  263. package/dist/components/tables/data-table/RuiDataTableExpandedRow.js.map +1 -1
  264. package/dist/components/tables/data-table/RuiDataTableExpandedRow.vue_vue_type_script_setup_true_lang.js +3 -3
  265. package/dist/components/tables/data-table/RuiDataTableExpandedRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  266. package/dist/components/tables/data-table/RuiDataTableGroupRow.js.map +1 -1
  267. package/dist/components/tables/data-table/RuiDataTableGroupRow.vue_vue_type_script_setup_true_lang.js +7 -3
  268. package/dist/components/tables/data-table/RuiDataTableGroupRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  269. package/dist/components/tables/data-table/RuiDataTableMobileSort.js.map +1 -1
  270. package/dist/components/tables/data-table/RuiDataTableMobileSort.vue_vue_type_script_setup_true_lang.js +1 -1
  271. package/dist/components/tables/data-table/RuiDataTableMobileSort.vue_vue_type_script_setup_true_lang.js.map +1 -1
  272. package/dist/components/tables/data-table/RuiDataTableRow.js.map +1 -1
  273. package/dist/components/tables/data-table/RuiDataTableRow.vue_vue_type_script_setup_true_lang.js +58 -19
  274. package/dist/components/tables/data-table/RuiDataTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  275. package/dist/components/tables/data-table-styles.d.ts +24 -0
  276. package/dist/components/tables/data-table-styles.js +35 -20
  277. package/dist/components/tables/data-table-styles.js.map +1 -1
  278. package/dist/components/tables/table_no_data_placeholder.js +1 -1
  279. package/dist/components/tables/table_no_data_placeholder.js.map +1 -1
  280. package/dist/components/tables/table_no_data_placeholder_dark.js +1 -1
  281. package/dist/components/tables/table_no_data_placeholder_dark.js.map +1 -1
  282. package/dist/components/tabs/tab/RuiTab.js.map +1 -1
  283. package/dist/components/tabs/tab/RuiTab.vue.d.ts +2 -5
  284. package/dist/components/tabs/tab/RuiTab.vue_vue_type_script_setup_true_lang.js +94 -68
  285. package/dist/components/tabs/tab/RuiTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  286. package/dist/components/tabs/tab-item/RuiTabItem.js.map +1 -1
  287. package/dist/components/tabs/tab-item/RuiTabItem.vue.d.ts +0 -1
  288. package/dist/components/tabs/tab-item/RuiTabItem.vue_vue_type_script_setup_true_lang.js +5 -11
  289. package/dist/components/tabs/tab-item/RuiTabItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  290. package/dist/components/tabs/tab-items/RuiTabItems.js.map +1 -1
  291. package/dist/components/tabs/tab-items/RuiTabItems.vue_vue_type_script_setup_true_lang.js +3 -8
  292. package/dist/components/tabs/tab-items/RuiTabItems.vue_vue_type_script_setup_true_lang.js.map +1 -1
  293. package/dist/components/tabs/tab-props.d.ts +7 -1
  294. package/dist/components/tabs/tab-props.js +7 -1
  295. package/dist/components/tabs/tab-props.js.map +1 -1
  296. package/dist/components/tabs/tabs/RuiTabs.js.map +1 -1
  297. package/dist/components/tabs/tabs/RuiTabs.vue.d.ts +2 -1
  298. package/dist/components/tabs/tabs/RuiTabs.vue_vue_type_script_setup_true_lang.js +178 -32
  299. package/dist/components/tabs/tabs/RuiTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  300. package/dist/components/tabs/tabs/use-tab-indicator.d.ts +27 -0
  301. package/dist/components/tabs/tabs/use-tab-indicator.js +67 -0
  302. package/dist/components/tabs/tabs/use-tab-indicator.js.map +1 -0
  303. package/dist/components/tabs/tabs/use-tab-keyboard.d.ts +17 -0
  304. package/dist/components/tabs/tabs/use-tab-keyboard.js +57 -0
  305. package/dist/components/tabs/tabs/use-tab-keyboard.js.map +1 -0
  306. package/dist/components/tabs/tabs/use-tab-routing.js +1 -2
  307. package/dist/components/tabs/tabs/use-tab-routing.js.map +1 -1
  308. package/dist/components/time-picker/RuiTimePicker.js.map +1 -1
  309. package/dist/components/time-picker/RuiTimePicker.vue_vue_type_script_setup_true_lang.js +35 -32
  310. package/dist/components/time-picker/RuiTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  311. package/dist/components/time-picker/time-picker-styles.d.ts +18 -0
  312. package/dist/components/time-picker/time-picker-styles.js +16 -10
  313. package/dist/components/time-picker/time-picker-styles.js.map +1 -1
  314. package/dist/composables/defaults/field.d.ts +22 -0
  315. package/dist/composables/defaults/field.js +29 -0
  316. package/dist/composables/defaults/field.js.map +1 -0
  317. package/dist/composables/dropdown-menu.d.ts +14 -2
  318. package/dist/composables/dropdown-menu.js +12 -2
  319. package/dist/composables/dropdown-menu.js.map +1 -1
  320. package/dist/composables/floating.d.ts +0 -2
  321. package/dist/composables/floating.js +5 -2
  322. package/dist/composables/floating.js.map +1 -1
  323. package/dist/composables/forms/auto-complete/chips.d.ts +22 -0
  324. package/dist/composables/forms/auto-complete/chips.js +42 -0
  325. package/dist/composables/forms/auto-complete/chips.js.map +1 -0
  326. package/dist/composables/forms/auto-complete/combobox.d.ts +25 -0
  327. package/dist/composables/forms/auto-complete/combobox.js +35 -0
  328. package/dist/composables/forms/auto-complete/combobox.js.map +1 -0
  329. package/dist/composables/forms/auto-complete/focus.d.ts +5 -2
  330. package/dist/composables/forms/auto-complete/focus.js +36 -10
  331. package/dist/composables/forms/auto-complete/focus.js.map +1 -1
  332. package/dist/composables/forms/auto-complete/index.d.ts +3 -0
  333. package/dist/composables/forms/auto-complete/keyboard-navigation.d.ts +8 -1
  334. package/dist/composables/forms/auto-complete/keyboard-navigation.js +48 -20
  335. package/dist/composables/forms/auto-complete/keyboard-navigation.js.map +1 -1
  336. package/dist/composables/forms/auto-complete/selection.d.ts +37 -0
  337. package/dist/composables/forms/auto-complete/selection.js +60 -0
  338. package/dist/composables/forms/auto-complete/selection.js.map +1 -0
  339. package/dist/composables/forms/auto-complete/value.js +19 -0
  340. package/dist/composables/forms/auto-complete/value.js.map +1 -1
  341. package/dist/composables/keyboard-scroll.d.ts +17 -0
  342. package/dist/composables/keyboard-scroll.js +58 -0
  343. package/dist/composables/keyboard-scroll.js.map +1 -0
  344. package/dist/composables/sticky-header.d.ts +8 -0
  345. package/dist/composables/sticky-header.js +13 -2
  346. package/dist/composables/sticky-header.js.map +1 -1
  347. package/dist/composables/tables/data-table/page-scroll.d.ts +30 -0
  348. package/dist/composables/tables/data-table/page-scroll.js +113 -0
  349. package/dist/composables/tables/data-table/page-scroll.js.map +1 -0
  350. package/dist/consts/colors.d.ts +4 -0
  351. package/dist/consts/colors.js +1 -37
  352. package/dist/consts/colors.js.map +1 -1
  353. package/dist/consts/tokens.d.ts +56 -0
  354. package/dist/consts/tokens.js +46 -0
  355. package/dist/consts/tokens.js.map +1 -0
  356. package/dist/consts/typography.d.ts +51 -18
  357. package/dist/index.d.ts +5 -0
  358. package/dist/index.js +9 -5
  359. package/dist/index.js.map +1 -1
  360. package/dist/library-icons.json +0 -10
  361. package/dist/style.css +5644 -4677
  362. package/dist/styles/colors.css +315 -0
  363. package/dist/styles/tokens.css +50 -0
  364. package/dist/tailwind.css +145 -0
  365. package/dist/theme/theme.css +403 -0
  366. package/dist/theme.css +403 -0
  367. package/dist/utils/helpers.d.ts +0 -8
  368. package/dist/utils/helpers.js +0 -1
  369. package/dist/utils/helpers.js.map +1 -1
  370. package/dist/utils/tv.js +13 -21
  371. package/dist/utils/tv.js.map +1 -1
  372. package/dist/web-types.json +275 -407
  373. package/package.json +13 -16
  374. package/dist/components/icons/LazyIcon.vue.d.ts +0 -8
  375. package/dist/components/steppers/RuiStepperCustomIcon.js +0 -7
  376. package/dist/components/steppers/RuiStepperCustomIcon.js.map +0 -1
  377. package/dist/components/steppers/RuiStepperCustomIcon.vue.d.ts +0 -8
  378. package/dist/components/steppers/RuiStepperCustomIcon.vue_vue_type_script_setup_true_lang.js +0 -43
  379. package/dist/components/steppers/RuiStepperCustomIcon.vue_vue_type_script_setup_true_lang.js.map +0 -1
  380. package/dist/composables/colors/common.d.ts +0 -20
  381. package/dist/composables/colors/index.d.ts +0 -3
  382. package/dist/composables/colors/text-input.d.ts +0 -27
  383. package/dist/composables/forms/use-label-with-quote.d.ts +0 -2
  384. package/dist/composables/popper.d.ts +0 -16
  385. package/dist/composables/popper.js +0 -23
  386. package/dist/composables/popper.js.map +0 -1
  387. package/dist/consts/forms/auto-complete/index.d.ts +0 -4
  388. package/dist/theme/index.d.ts +0 -5
  389. package/dist/theme/index.js +0 -162
  390. package/dist/theme/index.js.map +0 -1
  391. package/dist/utils/forms/auto-complete/index.d.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"RuiProgress.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/progress/RuiProgress.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ContextColorsType } from '@/consts/colors';\nimport { ProgressVariant } from '@/components/progress/progress-props';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n /**\n * in percentage value, required when variant === determinate or buffer\n * Ranges from 0 to 100.\n */\n value?: number;\n /**\n * in percentage value, required when variant === buffer\n * Ranges from 0 to 100.\n */\n bufferValue?: number;\n variant?: ProgressVariant;\n color?: ContextColorsType | 'inherit';\n circular?: boolean;\n showLabel?: boolean;\n /**\n * Sets the stroke thickness in pixels\n */\n thickness?: number | string;\n /**\n * only used for circular progress\n */\n size?: number | string;\n}\n\ndefineOptions({\n name: 'RuiProgress',\n});\n\nconst {\n value = 0,\n bufferValue = 0,\n variant = ProgressVariant.determinate,\n color = 'inherit',\n circular = false,\n showLabel = false,\n thickness = 4,\n size = 40,\n} = defineProps<Props>();\n\ndefineSlots<Record<string, never>>();\n\nconst CIRCLE_RADIUS = 20;\nconst CIRCLE_CIRCUMFERENCE = 2 * Math.PI * CIRCLE_RADIUS; // ~125.66\n/** approximate width of `100%` in ems */\nconst LABEL_WIDTH_EM = 2.5;\n/** keeps the label off the stroke rather than merely inside it */\nconst LABEL_BREATHING_ROOM = 0.85;\n\nfunction clampPercent(val: number | undefined): number {\n return Math.max(0, Math.min(val ?? 100, 100));\n}\n\nconst progressStyles = tv({\n slots: {\n wrapper: '',\n progressbar: 'w-full overflow-hidden relative',\n rail: 'w-full h-full',\n bar: 'transition-all duration-150 ease-in-out absolute left-0 top-0 h-full w-full',\n indeterminateBar: 'absolute left-0 top-0 h-full w-auto transition-transform duration-200 ease-linear origin-left animate-slide-rail',\n bufferDots: 'absolute h-0 w-[200%] -top-px -left-full border-dashed border-y-[0.2rem] animate-buffer-pulse',\n bufferRail: 'w-full h-full transition-transform duration-200 ease-linear origin-left',\n circularContainer: 'inline-block relative',\n svg: 'block',\n circle: 'stroke-current',\n circleTrack: 'stroke-current opacity-20',\n label: 'text-rui-text',\n },\n variants: {\n color: {\n primary: { circularContainer: 'text-rui-primary' },\n secondary: { circularContainer: 'text-rui-secondary' },\n error: { circularContainer: 'text-rui-error' },\n warning: { circularContainer: 'text-rui-warning' },\n info: { circularContainer: 'text-rui-info' },\n success: { circularContainer: 'text-rui-success' },\n inherit: { circularContainer: 'text-current' },\n },\n variant: {\n [ProgressVariant.determinate]: { svg: '-rotate-90' },\n [ProgressVariant.indeterminate]: {\n svg: 'animate-circular-spin',\n circle: 'animate-collapse-stroke [stroke-dasharray:80px,200px] [stroke-linecap:round]',\n },\n [ProgressVariant.buffer]: {},\n },\n circular: {\n true: { wrapper: 'inline-flex' },\n false: { wrapper: 'w-full' },\n },\n hasLabel: {\n true: { wrapper: 'inline-flex items-center relative' },\n },\n },\n compoundVariants: [\n // Linear label\n { circular: false, hasLabel: true, class: { label: 'block text-sm ml-4' } },\n // Circular label (overlays the circle, font size derived from `size`)\n { circular: true, hasLabel: true, class: { label: 'absolute inset-0 flex items-center justify-center leading-none tabular-nums whitespace-nowrap' } },\n ],\n compoundSlots: [\n // Rail background (track behind the bar)\n { slots: ['rail', 'bufferDots'], color: 'primary', class: 'bg-rui-primary/20 border-rui-primary/20' },\n { slots: ['rail', 'bufferDots'], color: 'secondary', class: 'bg-rui-secondary/20 border-rui-secondary/20' },\n { slots: ['rail', 'bufferDots'], color: 'error', class: 'bg-rui-error/20 border-rui-error/20' },\n { slots: ['rail', 'bufferDots'], color: 'warning', class: 'bg-rui-warning/20 border-rui-warning/20' },\n { slots: ['rail', 'bufferDots'], color: 'info', class: 'bg-rui-info/20 border-rui-info/20' },\n { slots: ['rail', 'bufferDots'], color: 'success', class: 'bg-rui-success/20 border-rui-success/20' },\n { slots: ['rail', 'bufferDots'], color: 'inherit', class: 'bg-current opacity-20 border-current' },\n\n // Bar fill (active progress)\n { slots: ['bar', 'indeterminateBar'], color: 'primary', class: 'bg-rui-primary' },\n { slots: ['bar', 'indeterminateBar'], color: 'secondary', class: 'bg-rui-secondary' },\n { slots: ['bar', 'indeterminateBar'], color: 'error', class: 'bg-rui-error' },\n { slots: ['bar', 'indeterminateBar'], color: 'warning', class: 'bg-rui-warning' },\n { slots: ['bar', 'indeterminateBar'], color: 'info', class: 'bg-rui-info' },\n { slots: ['bar', 'indeterminateBar'], color: 'success', class: 'bg-rui-success' },\n { slots: ['bar', 'indeterminateBar'], color: 'inherit', class: 'bg-current' },\n ],\n});\n\nconst hasLabel = computed<boolean>(() => showLabel && variant !== ProgressVariant.indeterminate);\n\nconst ui = computed<ReturnType<typeof progressStyles>>(() => progressStyles({\n color,\n variant,\n circular,\n hasLabel: get(hasLabel),\n}));\n\nconst currentValue = computed<number>(() => clampPercent(value));\n\nconst label = computed<string>(() => `${Math.floor(get(currentValue))}%`);\n\nconst progress = computed<number>(() => -100 + get(currentValue));\n\nconst barStyle = computed<Record<string, string>>(() => ({\n transform: `translateX(${get(progress)}%)`,\n}));\n\nconst bufferRailStyle = computed<Record<string, string>>(() => ({\n transform: `translateX(${-100 + clampPercent(bufferValue)}%)`,\n}));\n\nconst linearStyle = computed<Record<string, string>>(() => ({\n height: `${+thickness}px`,\n}));\n\nconst circularSize = computed<Record<string, string>>(() => ({\n width: `${+size}px`,\n height: `${+size}px`,\n}));\n\nconst circularGeometry = computed<{ scaledThickness: number; viewSize: number }>(() => {\n const scaledThickness = (+thickness * 32) / +size;\n return { scaledThickness, viewSize: 40 + scaledThickness };\n});\n\n/**\n * The circular label lives inside the ring, so it scales with both `size` and `thickness`.\n * `fit` solves for the widest label (`100%`) fitting the chord it spans, always computed\n * for that widest label so the text does not resize as the value climbs. It is capped by\n * a sublinear curve so large rings do not end up with an oversized number in the middle.\n */\nconst circularLabelStyle = computed<Record<string, string>>(() => {\n const innerRadius = Math.max((+size - 2 * +thickness) / 2, 0);\n const fit = (LABEL_BREATHING_ROOM * 2 * innerRadius) / Math.sqrt(LABEL_WIDTH_EM ** 2 + 1);\n return { fontSize: `${Math.min(fit, +size * 0.15 + 6)}px` };\n});\n\nconst circularStrokeStyle = computed<Record<string, string>>(() => ({\n strokeDasharray: `${CIRCLE_CIRCUMFERENCE}`,\n strokeDashoffset: `${(get(progress) / 100) * -CIRCLE_CIRCUMFERENCE}`,\n transition: 'stroke-dashoffset 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',\n}));\n</script>\n\n<template>\n <div :class=\"ui.wrapper()\">\n <!-- Circular progress (not supported for buffer variant) -->\n <div\n v-if=\"circular && variant !== ProgressVariant.buffer\"\n :aria-valuenow=\"value\"\n :class=\"ui.circularContainer()\"\n :style=\"circularSize\"\n :data-variant=\"variant\"\n :data-color=\"color\"\n aria-valuemax=\"100\"\n aria-valuemin=\"0\"\n role=\"progressbar\"\n >\n <svg\n :class=\"ui.svg()\"\n :viewBox=\"`0 0 ${circularGeometry.viewSize} ${circularGeometry.viewSize}`\"\n >\n <!-- Track behind the arc, mirroring the linear rail. Indeterminate spins, so it gets no track. -->\n <circle\n v-if=\"variant === ProgressVariant.determinate\"\n cx=\"50%\"\n cy=\"50%\"\n fill=\"none\"\n :r=\"CIRCLE_RADIUS\"\n :class=\"ui.circleTrack()\"\n :stroke-width=\"circularGeometry.scaledThickness\"\n />\n <circle\n cx=\"50%\"\n cy=\"50%\"\n fill=\"none\"\n :r=\"CIRCLE_RADIUS\"\n :class=\"ui.circle()\"\n :style=\"variant === ProgressVariant.determinate ? circularStrokeStyle : undefined\"\n :stroke-width=\"circularGeometry.scaledThickness\"\n />\n </svg>\n <div\n v-if=\"hasLabel\"\n :class=\"ui.label()\"\n :style=\"circularLabelStyle\"\n aria-hidden=\"true\"\n >\n {{ label }}\n </div>\n </div>\n\n <!-- Linear progress (also used as fallback for circular + buffer) -->\n <div\n v-else\n :aria-valuenow=\"value\"\n :class=\"ui.progressbar()\"\n :style=\"linearStyle\"\n :data-variant=\"variant\"\n :data-color=\"color\"\n aria-valuemax=\"100\"\n aria-valuemin=\"0\"\n role=\"progressbar\"\n >\n <div\n v-if=\"variant === ProgressVariant.buffer\"\n :class=\"ui.bufferDots()\"\n />\n <div\n :class=\"variant === ProgressVariant.buffer ? [ui.rail(), ui.bufferRail()] : ui.rail()\"\n :style=\"variant === ProgressVariant.buffer ? bufferRailStyle : undefined\"\n />\n <div\n v-if=\"variant === ProgressVariant.indeterminate\"\n :class=\"ui.indeterminateBar()\"\n />\n <div\n v-else\n :class=\"ui.bar()\"\n :style=\"barStyle\"\n />\n </div>\n\n <!-- Linear label -->\n <div\n v-if=\"hasLabel && !circular\"\n :class=\"ui.label()\"\n >\n {{ label }}\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;AA+CA,IAAM,gBAAgB;AAGtB,IAAM,iBAAiB;;AAEvB,IAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;EAJ7B,MAAM,uBAAuB,IAAI,KAAK,KAAK;;EAM3C,SAAS,aAAa,KAAiC;GACrD,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,OAAO,KAAK,GAAG,CAAC;EAC9C;EAEA,MAAM,iBAAiB,GAAG;GACxB,OAAO;IACL,SAAS;IACT,aAAa;IACb,MAAM;IACN,KAAK;IACL,kBAAkB;IAClB,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,KAAK;IACL,QAAQ;IACR,aAAa;IACb,OAAO;GACT;GACA,UAAU;IACR,OAAO;KACL,SAAS,EAAE,mBAAmB,mBAAmB;KACjD,WAAW,EAAE,mBAAmB,qBAAqB;KACrD,OAAO,EAAE,mBAAmB,iBAAiB;KAC7C,SAAS,EAAE,mBAAmB,mBAAmB;KACjD,MAAM,EAAE,mBAAmB,gBAAgB;KAC3C,SAAS,EAAE,mBAAmB,mBAAmB;KACjD,SAAS,EAAE,mBAAmB,eAAe;IAC/C;IACA,SAAS;MACN,gBAAgB,cAAc,EAAE,KAAK,aAAa;MAClD,gBAAgB,gBAAgB;MAC/B,K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AE,MAAA,QAAA,CAAQ;;GAMZ,GAAA,IAAA,UAAA,IAAA,MAAA,QAAA,KAAQ,CAAK,QAAA,YADrB,UAAA,GAAA,mBAKM,OAAA;;IAHH,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,MAAK,CAAA;GAEb,GAAA,gBAAA,MAAA,KAAA,CAAK,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"RuiProgress.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/progress/RuiProgress.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ContextColorsType } from '@/consts/colors';\nimport { ProgressVariant } from '@/components/progress/progress-props';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n /**\n * in percentage value, required when variant === determinate or buffer\n * Ranges from 0 to 100.\n */\n value?: number;\n /**\n * in percentage value, required when variant === buffer\n * Ranges from 0 to 100.\n */\n bufferValue?: number;\n variant?: ProgressVariant;\n color?: ContextColorsType | 'inherit';\n circular?: boolean;\n showLabel?: boolean;\n /**\n * Sets the stroke thickness in pixels\n */\n thickness?: number | string;\n /**\n * only used for circular progress\n */\n size?: number | string;\n /**\n * What is loading, as the progress bar's accessible name (\"Loading\" when not given)\n */\n ariaLabel?: string;\n}\n\ndefineOptions({\n name: 'RuiProgress',\n});\n\nconst {\n value = 0,\n bufferValue = 0,\n variant = ProgressVariant.determinate,\n color = 'inherit',\n circular = false,\n showLabel = false,\n thickness = 4,\n size = 40,\n ariaLabel = 'Loading',\n} = defineProps<Props>();\n\ndefineSlots<Record<string, never>>();\n\nconst CIRCLE_RADIUS = 20;\nconst CIRCLE_CIRCUMFERENCE = 2 * Math.PI * CIRCLE_RADIUS; // ~125.66\n/** width of `100%` in ems, measured with tabular figures */\nconst LABEL_WIDTH_EM = 2.95;\n/** keeps the label off the stroke rather than merely inside it */\nconst LABEL_BREATHING_ROOM = 0.9;\n/** below this font size a label inside the ring is unreadable, so the ring drops it rather than change its footprint */\nconst MIN_INSIDE_LABEL_PX = 9;\n\nfunction clampPercent(val: number | undefined): number {\n return Math.max(0, Math.min(val ?? 100, 100));\n}\n\nconst progressStyles = tv({\n slots: {\n wrapper: '',\n progressbar: 'w-full overflow-hidden relative rounded-full',\n rail: 'w-full h-full',\n bar: 'transition-all duration-150 ease-in-out absolute left-0 top-0 h-full w-full',\n indeterminateBar: 'absolute left-0 top-0 h-full w-auto transition-transform duration-200 ease-linear origin-left animate-slide-rail',\n bufferDots: 'absolute h-0 w-[200%] -top-px -left-full border-dashed border-y-[0.2rem] animate-buffer-pulse',\n bufferRail: 'w-full h-full transition-transform duration-200 ease-linear origin-left',\n circularContainer: 'inline-block relative',\n svg: 'block',\n circle: 'stroke-current',\n circleTrack: '',\n label: 'text-rui-text',\n },\n variants: {\n color: {\n primary: { circularContainer: 'text-rui-primary' },\n secondary: { circularContainer: 'text-rui-secondary' },\n error: { circularContainer: 'text-rui-error' },\n warning: { circularContainer: 'text-rui-warning' },\n info: { circularContainer: 'text-rui-info' },\n success: { circularContainer: 'text-rui-success' },\n inherit: { circularContainer: 'text-current' },\n },\n variant: {\n [ProgressVariant.determinate]: { svg: '-rotate-90' },\n [ProgressVariant.indeterminate]: {\n svg: 'animate-circular-spin',\n circle: 'animate-collapse-stroke [stroke-dasharray:80px,200px] [stroke-linecap:round]',\n },\n [ProgressVariant.buffer]: {},\n },\n circular: {\n true: { wrapper: 'inline-flex' },\n false: { wrapper: 'w-full' },\n },\n hasLabel: {\n true: { wrapper: 'inline-flex items-center relative' },\n },\n },\n compoundVariants: [\n // Linear label\n { circular: false, hasLabel: true, class: { label: 'block text-sm ml-4 text-rui-text-secondary tabular-nums' } },\n // Circular label (overlays the circle, font size derived from `size`)\n { circular: true, hasLabel: true, class: { label: 'absolute inset-0 flex items-center justify-center leading-none font-medium tabular-nums whitespace-nowrap' } },\n ],\n compoundSlots: [\n // Track behind the bar: one neutral for every named color, neutral-700 in dark like the footer stepper pills, which reads on a near-black page\n { slots: ['rail'], color: ['primary', 'secondary', 'error', 'warning', 'info', 'success'], class: 'bg-rui-neutral-200 dark:bg-rui-neutral-700' },\n { slots: ['bufferDots'], color: ['primary', 'secondary', 'error', 'warning', 'info', 'success'], class: 'border-rui-neutral-200 dark:border-rui-neutral-700' },\n { slots: ['circleTrack'], color: ['primary', 'secondary', 'error', 'warning', 'info', 'success'], class: 'stroke-rui-neutral-200 dark:stroke-rui-neutral-700' },\n // `inherit` keeps a tint of whatever color it is given\n { slots: ['rail', 'bufferDots'], color: 'inherit', class: 'bg-current opacity-20 border-current' },\n { slots: ['circleTrack'], color: 'inherit', class: 'stroke-current opacity-20' },\n\n // Bar fill (active progress)\n { slots: ['bar', 'indeterminateBar'], color: 'primary', class: 'bg-rui-primary' },\n { slots: ['bar', 'indeterminateBar'], color: 'secondary', class: 'bg-rui-secondary' },\n { slots: ['bar', 'indeterminateBar'], color: 'error', class: 'bg-rui-error' },\n { slots: ['bar', 'indeterminateBar'], color: 'warning', class: 'bg-rui-warning' },\n { slots: ['bar', 'indeterminateBar'], color: 'info', class: 'bg-rui-info' },\n { slots: ['bar', 'indeterminateBar'], color: 'success', class: 'bg-rui-success' },\n { slots: ['bar', 'indeterminateBar'], color: 'inherit', class: 'bg-current' },\n ],\n});\n\nconst hasLabel = computed<boolean>(() => showLabel && variant !== ProgressVariant.indeterminate);\n\n/**\n * The font size that fits the widest label (`100%`) inside the ring, solved against the chord\n * it spans. Always computed for that widest label so the text does not resize as the value climbs.\n */\nconst insideLabelFit = computed<number>(() => {\n const innerRadius = Math.max((+size - 2 * +thickness) / 2, 0);\n return (LABEL_BREATHING_ROOM * 2 * innerRadius) / Math.sqrt(LABEL_WIDTH_EM ** 2 + 1);\n});\n\nconst labelFits = computed<boolean>(() => get(insideLabelFit) >= MIN_INSIDE_LABEL_PX);\n\nconst ui = computed<ReturnType<typeof progressStyles>>(() => progressStyles({\n color,\n variant,\n circular,\n hasLabel: get(hasLabel),\n}));\n\nconst currentValue = computed<number>(() => clampPercent(value));\n\n/** An indeterminate bar has no value to report, so it leaves `aria-valuenow` off. */\nconst ariaValueNow = computed<number | undefined>(() =>\n variant === ProgressVariant.indeterminate ? undefined : get(currentValue));\n\nconst label = computed<string>(() => `${Math.floor(get(currentValue))}%`);\n\nconst progress = computed<number>(() => -100 + get(currentValue));\n\nconst barStyle = computed<Record<string, string>>(() => ({\n transform: `translateX(${get(progress)}%)`,\n}));\n\nconst bufferRailStyle = computed<Record<string, string>>(() => ({\n transform: `translateX(${-100 + clampPercent(bufferValue)}%)`,\n}));\n\nconst linearStyle = computed<Record<string, string>>(() => ({\n height: `${+thickness}px`,\n}));\n\nconst circularSize = computed<Record<string, string>>(() => ({\n width: `${+size}px`,\n height: `${+size}px`,\n}));\n\nconst circularGeometry = computed<{ scaledThickness: number; viewSize: number }>(() => {\n const scaledThickness = (+thickness * 32) / +size;\n return { scaledThickness, viewSize: 40 + scaledThickness };\n});\n\n/**\n * The label inside the ring scales with both `size` and `thickness`. The fit is capped by\n * a sublinear curve so large rings do not end up with an oversized number in the middle.\n */\nconst circularLabelStyle = computed<Record<string, string>>(() => ({\n fontSize: `${Math.min(get(insideLabelFit), +size * 0.15 + 6)}px`,\n}));\n\nconst circularStrokeStyle = computed<Record<string, string>>(() => ({\n strokeDasharray: `${CIRCLE_CIRCUMFERENCE}`,\n strokeDashoffset: `${(get(progress) / 100) * -CIRCLE_CIRCUMFERENCE}`,\n // the library's own motion, not Material's standard curve\n transition: 'stroke-dashoffset 200ms ease-out',\n}));\n</script>\n\n<template>\n <div :class=\"ui.wrapper()\">\n <!-- Circular progress (not supported for buffer variant) -->\n <div\n v-if=\"circular && variant !== ProgressVariant.buffer\"\n :aria-valuenow=\"ariaValueNow\"\n :class=\"ui.circularContainer()\"\n :style=\"circularSize\"\n :data-variant=\"variant\"\n :data-color=\"color\"\n :aria-label=\"ariaLabel\"\n :title=\"hasLabel && !labelFits ? label : undefined\"\n aria-valuemax=\"100\"\n aria-valuemin=\"0\"\n role=\"progressbar\"\n >\n <svg\n :class=\"ui.svg()\"\n :viewBox=\"`0 0 ${circularGeometry.viewSize} ${circularGeometry.viewSize}`\"\n >\n <!-- Track behind the arc, mirroring the linear rail. Indeterminate spins, so it gets no track. -->\n <circle\n v-if=\"variant === ProgressVariant.determinate\"\n cx=\"50%\"\n cy=\"50%\"\n fill=\"none\"\n :r=\"CIRCLE_RADIUS\"\n :class=\"ui.circleTrack()\"\n :stroke-width=\"circularGeometry.scaledThickness\"\n />\n <circle\n cx=\"50%\"\n cy=\"50%\"\n fill=\"none\"\n :r=\"CIRCLE_RADIUS\"\n :class=\"ui.circle()\"\n :style=\"variant === ProgressVariant.determinate ? circularStrokeStyle : undefined\"\n :stroke-width=\"circularGeometry.scaledThickness\"\n />\n </svg>\n <div\n v-if=\"hasLabel && labelFits\"\n :class=\"ui.label()\"\n :style=\"circularLabelStyle\"\n aria-hidden=\"true\"\n >\n {{ label }}\n </div>\n </div>\n\n <!-- Linear progress (also used as fallback for circular + buffer) -->\n <div\n v-else\n :aria-valuenow=\"ariaValueNow\"\n :class=\"ui.progressbar()\"\n :style=\"linearStyle\"\n :data-variant=\"variant\"\n :data-color=\"color\"\n :aria-label=\"ariaLabel\"\n aria-valuemax=\"100\"\n aria-valuemin=\"0\"\n role=\"progressbar\"\n >\n <div\n v-if=\"variant === ProgressVariant.buffer\"\n :class=\"ui.bufferDots()\"\n />\n <div\n :class=\"variant === ProgressVariant.buffer ? [ui.rail(), ui.bufferRail()] : ui.rail()\"\n :style=\"variant === ProgressVariant.buffer ? bufferRailStyle : undefined\"\n data-id=\"progress-rail\"\n />\n <div\n v-if=\"variant === ProgressVariant.indeterminate\"\n :class=\"ui.indeterminateBar()\"\n />\n <div\n v-else\n :class=\"ui.bar()\"\n :style=\"barStyle\"\n />\n </div>\n\n <!-- Linear label -->\n <div\n v-if=\"hasLabel && !circular\"\n :class=\"ui.label()\"\n >\n {{ label }}\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;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,MAAA,EAAA,CAAE,CAAC,MAAK,CAAA;GAEb,GAAA,gBAAA,MAAA,KAAA,CAAK,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"RuiFooterStepper.js","names":[],"sources":["../../../src/components/steppers/RuiFooterStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport RuiButton from '@/components/buttons/button/RuiButton.vue';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport { FooterStepperVariant } from '@/components/steppers/footer-stepper-variant';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n pages: number;\n variant?: FooterStepperVariant;\n arrowButtons?: boolean;\n hideButtons?: boolean;\n}\n\ndefineOptions({\n name: 'RuiFooterStepper',\n});\n\nconst modelValue = defineModel<number>({ default: 1 });\n\nconst {\n pages,\n variant: variantProp = FooterStepperVariant.numeric,\n arrowButtons = false,\n hideButtons = false,\n} = defineProps<Props>();\n\nconst footerStepper = {\n arrowButton: '!bg-white !disabled:bg-white/60 dark:!disabled:bg-[rgb(50,50,50)]',\n bullet: tv({\n base: 'rounded-full h-2 w-2 bg-black/[0.26] dark:bg-white/30 transition-colors cursor-pointer hover:bg-rui-grey-300 dark:hover:bg-rui-grey-400',\n variants: {\n active: {\n true: 'bg-rui-primary dark:bg-rui-primary hover:bg-rui-primary dark:hover:bg-rui-primary',\n },\n },\n }),\n pill: tv({\n base: 'rounded-full h-2 w-full bg-rui-grey-200 dark:bg-rui-grey-300 transition-colors',\n variants: {\n active: {\n true: 'bg-rui-primary dark:bg-rui-primary',\n },\n },\n }),\n};\n\nfunction onChange(delta: number): void {\n set(modelValue, get(modelValue) + delta);\n}\n\nfunction onPrev(): void {\n if (get(modelValue) > 1)\n onChange(-1);\n}\n\nfunction onNext(): void {\n if (get(modelValue) < pages)\n onChange(1);\n}\n\nfunction onClick(index: number): void {\n onChange(index - get(modelValue));\n}\n</script>\n\n<template>\n <div\n role=\"navigation\"\n aria-label=\"Step navigation\"\n class=\"flex items-center justify-between gap-x-4 transition-all duration-150\"\n :data-variant=\"variantProp\"\n >\n <template v-if=\"variantProp === FooterStepperVariant.pill\">\n <div\n data-id=\"pills\"\n class=\"flex w-full gap-x-3\"\n >\n <span\n v-for=\"i in pages\"\n :key=\"i\"\n :aria-current=\"modelValue === i ? 'step' : undefined\"\n :class=\"footerStepper.pill({ active: modelValue === i })\"\n />\n </div>\n </template>\n <template v-else>\n <RuiButton\n v-if=\"!hideButtons\"\n aria-label=\"Previous\"\n :class=\"arrowButtons ? footerStepper.arrowButton : undefined\"\n :disabled=\"modelValue <= 1\"\n :icon=\"arrowButtons\"\n :variant=\"arrowButtons ? 'outlined' : 'text'\"\n color=\"primary\"\n @click=\"onPrev()\"\n >\n <template\n v-if=\"!arrowButtons\"\n #prepend\n >\n <RuiIcon\n :size=\"18\"\n name=\"lu-chevron-left\"\n />\n </template>\n <span v-if=\"!arrowButtons\">Back</span>\n <RuiIcon\n v-else\n :size=\"24\"\n name=\"lu-arrow-left\"\n />\n </RuiButton>\n <span\n v-if=\"variantProp === FooterStepperVariant.numeric\"\n data-id=\"numeric\"\n class=\"text-rui-text\"\n >\n {{ modelValue }}/{{ pages }}\n </span>\n <div\n v-else-if=\"variantProp === FooterStepperVariant.bullet\"\n data-id=\"bullets\"\n class=\"flex gap-x-1\"\n >\n <span\n v-for=\"i in pages\"\n :key=\"i\"\n :aria-current=\"modelValue === i ? 'step' : undefined\"\n :class=\"footerStepper.bullet({ active: modelValue === i })\"\n @click=\"onClick(i)\"\n />\n </div>\n <RuiProgress\n v-else-if=\"variantProp === FooterStepperVariant.progress\"\n class=\"max-w-[60%]\"\n color=\"primary\"\n :value=\"(modelValue / pages) * 100\"\n />\n <RuiButton\n v-if=\"!hideButtons\"\n aria-label=\"Next\"\n :class=\"arrowButtons ? footerStepper.arrowButton : undefined\"\n :disabled=\"modelValue >= pages\"\n :icon=\"arrowButtons\"\n :variant=\"arrowButtons ? 'outlined' : 'text'\"\n color=\"primary\"\n @click=\"onNext()\"\n >\n <span v-if=\"!arrowButtons\">Next</span>\n <RuiIcon\n v-else\n :size=\"24\"\n name=\"lu-arrow-right\"\n />\n <template\n v-if=\"!arrowButtons\"\n #append\n >\n <RuiIcon\n :size=\"18\"\n name=\"lu-chevron-right\"\n />\n </template>\n </RuiButton>\n </template>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"RuiFooterStepper.js","names":[],"sources":["../../../src/components/steppers/RuiFooterStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport RuiButton from '@/components/buttons/button/RuiButton.vue';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport { FooterStepperVariant } from '@/components/steppers/footer-stepper-variant';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n pages: number;\n variant?: FooterStepperVariant;\n arrowButtons?: boolean;\n hideButtons?: boolean;\n}\n\ndefineOptions({\n name: 'RuiFooterStepper',\n});\n\nconst modelValue = defineModel<number>({ default: 1 });\n\nconst {\n pages,\n variant: variantProp = FooterStepperVariant.numeric,\n arrowButtons = false,\n hideButtons = false,\n} = defineProps<Props>();\n\nconst footerStepper = {\n // the current bullet stretches into a short bar, so position reads without relying on color\n bullet: tv({\n base: [\n 'h-2 w-2 rounded-full bg-rui-neutral-300 transition-[width,background-color] duration-200 ease-out dark:bg-rui-neutral-600',\n 'hover:bg-rui-neutral-400 dark:hover:bg-rui-neutral-500 focus-visible:focus-ring outline-hidden',\n ].join(' '),\n variants: {\n active: {\n true: 'w-5 bg-rui-primary hover:bg-rui-primary dark:bg-rui-primary dark:hover:bg-rui-primary',\n },\n },\n }),\n pill: tv({\n base: 'rounded-full h-1.5 w-full bg-rui-neutral-200 dark:bg-rui-neutral-700 transition-colors',\n variants: {\n active: {\n true: 'bg-rui-primary dark:bg-rui-primary',\n },\n },\n }),\n};\n\nfunction onChange(delta: number): void {\n set(modelValue, get(modelValue) + delta);\n}\n\nfunction onPrev(): void {\n if (get(modelValue) > 1)\n onChange(-1);\n}\n\nfunction onNext(): void {\n if (get(modelValue) < pages)\n onChange(1);\n}\n\nfunction onClick(index: number): void {\n onChange(index - get(modelValue));\n}\n</script>\n\n<template>\n <div\n role=\"navigation\"\n aria-label=\"Step navigation\"\n class=\"flex items-center justify-between gap-x-4 transition-all duration-150\"\n :data-variant=\"variantProp\"\n >\n <template v-if=\"variantProp === FooterStepperVariant.pill\">\n <div\n data-id=\"pills\"\n class=\"flex w-full gap-x-3\"\n >\n <span\n v-for=\"i in pages\"\n :key=\"i\"\n :aria-current=\"modelValue === i ? 'step' : undefined\"\n :class=\"footerStepper.pill({ active: modelValue === i })\"\n />\n </div>\n </template>\n <template v-else>\n <RuiButton\n v-if=\"!hideButtons\"\n aria-label=\"Previous\"\n :disabled=\"modelValue <= 1\"\n :icon=\"arrowButtons\"\n :size=\"arrowButtons ? 'sm' : undefined\"\n :variant=\"arrowButtons ? 'outlined' : 'text'\"\n :color=\"arrowButtons ? undefined : 'primary'\"\n @click=\"onPrev()\"\n >\n <template\n v-if=\"!arrowButtons\"\n #prepend\n >\n <RuiIcon name=\"lu-chevron-left\" />\n </template>\n <span v-if=\"!arrowButtons\">Back</span>\n <RuiIcon\n v-else\n name=\"lu-chevron-left\"\n />\n </RuiButton>\n <span\n v-if=\"variantProp === FooterStepperVariant.numeric\"\n data-id=\"numeric\"\n class=\"text-sm tabular-nums text-rui-text-secondary\"\n >\n {{ modelValue }}/{{ pages }}\n </span>\n <div\n v-else-if=\"variantProp === FooterStepperVariant.bullet\"\n data-id=\"bullets\"\n class=\"flex items-center gap-x-1.5\"\n >\n <button\n v-for=\"i in pages\"\n :key=\"i\"\n type=\"button\"\n :aria-label=\"`Step ${i}`\"\n :aria-current=\"modelValue === i ? 'step' : undefined\"\n :class=\"footerStepper.bullet({ active: modelValue === i })\"\n @click=\"onClick(i)\"\n />\n </div>\n <RuiProgress\n v-else-if=\"variantProp === FooterStepperVariant.progress\"\n class=\"max-w-[60%]\"\n color=\"primary\"\n :value=\"(modelValue / pages) * 100\"\n />\n <RuiButton\n v-if=\"!hideButtons\"\n aria-label=\"Next\"\n :disabled=\"modelValue >= pages\"\n :icon=\"arrowButtons\"\n :size=\"arrowButtons ? 'sm' : undefined\"\n :variant=\"arrowButtons ? 'outlined' : 'text'\"\n :color=\"arrowButtons ? undefined : 'primary'\"\n @click=\"onNext()\"\n >\n <span v-if=\"!arrowButtons\">Next</span>\n <RuiIcon\n v-else\n name=\"lu-chevron-right\"\n />\n <template\n v-if=\"!arrowButtons\"\n #append\n >\n <RuiIcon name=\"lu-chevron-right\" />\n </template>\n </RuiButton>\n </template>\n </div>\n</template>\n"],"mappings":""}
@@ -17,14 +17,18 @@ var _hoisted_4 = { key: 0 };
17
17
  var _hoisted_5 = {
18
18
  key: 1,
19
19
  "data-id": "numeric",
20
- class: "text-rui-text"
20
+ class: "text-sm tabular-nums text-rui-text-secondary"
21
21
  };
22
22
  var _hoisted_6 = {
23
23
  key: 2,
24
24
  "data-id": "bullets",
25
- class: "flex gap-x-1"
25
+ class: "flex items-center gap-x-1.5"
26
26
  };
27
- var _hoisted_7 = ["aria-current", "onClick"];
27
+ var _hoisted_7 = [
28
+ "aria-label",
29
+ "aria-current",
30
+ "onClick"
31
+ ];
28
32
  var _hoisted_8 = { key: 0 };
29
33
  var RuiFooterStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
30
34
  name: "RuiFooterStepper",
@@ -48,13 +52,12 @@ var RuiFooterStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
48
52
  setup(__props) {
49
53
  const modelValue = useModel(__props, "modelValue");
50
54
  const footerStepper = {
51
- arrowButton: "!bg-white !disabled:bg-white/60 dark:!disabled:bg-[rgb(50,50,50)]",
52
55
  bullet: tv({
53
- base: "rounded-full h-2 w-2 bg-black/[0.26] dark:bg-white/30 transition-colors cursor-pointer hover:bg-rui-grey-300 dark:hover:bg-rui-grey-400",
54
- variants: { active: { true: "bg-rui-primary dark:bg-rui-primary hover:bg-rui-primary dark:hover:bg-rui-primary" } }
56
+ base: ["h-2 w-2 rounded-full bg-rui-neutral-300 transition-[width,background-color] duration-200 ease-out dark:bg-rui-neutral-600", "hover:bg-rui-neutral-400 dark:hover:bg-rui-neutral-500 focus-visible:focus-ring outline-hidden"].join(" "),
57
+ variants: { active: { true: "w-5 bg-rui-primary hover:bg-rui-primary dark:bg-rui-primary dark:hover:bg-rui-primary" } }
55
58
  }),
56
59
  pill: tv({
57
- base: "rounded-full h-2 w-full bg-rui-grey-200 dark:bg-rui-grey-300 transition-colors",
60
+ base: "rounded-full h-1.5 w-full bg-rui-neutral-200 dark:bg-rui-neutral-700 transition-colors",
58
61
  variants: { active: { true: "bg-rui-primary dark:bg-rui-primary" } }
59
62
  })
60
63
  };
@@ -86,35 +89,34 @@ var RuiFooterStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
86
89
  !__props.hideButtons ? (openBlock(), createBlock(RuiButton_default, {
87
90
  key: 0,
88
91
  "aria-label": "Previous",
89
- class: normalizeClass(__props.arrowButtons ? footerStepper.arrowButton : void 0),
90
92
  disabled: modelValue.value <= 1,
91
93
  icon: __props.arrowButtons,
94
+ size: __props.arrowButtons ? "sm" : void 0,
92
95
  variant: __props.arrowButtons ? "outlined" : "text",
93
- color: "primary",
96
+ color: __props.arrowButtons ? void 0 : "primary",
94
97
  onClick: _cache[0] || (_cache[0] = ($event) => onPrev())
95
98
  }, createSlots({
96
99
  default: withCtx(() => [!__props.arrowButtons ? (openBlock(), createElementBlock("span", _hoisted_4, "Back")) : (openBlock(), createBlock(RuiIcon_default, {
97
100
  key: 1,
98
- size: 24,
99
- name: "lu-arrow-left"
101
+ name: "lu-chevron-left"
100
102
  }))]),
101
103
  _: 2
102
104
  }, [!__props.arrowButtons ? {
103
105
  name: "prepend",
104
- fn: withCtx(() => [createVNode(RuiIcon_default, {
105
- size: 18,
106
- name: "lu-chevron-left"
107
- })]),
106
+ fn: withCtx(() => [createVNode(RuiIcon_default, { name: "lu-chevron-left" })]),
108
107
  key: "0"
109
108
  } : void 0]), 1032, [
110
- "class",
111
109
  "disabled",
112
110
  "icon",
113
- "variant"
111
+ "size",
112
+ "variant",
113
+ "color"
114
114
  ])) : createCommentVNode("", true),
115
115
  __props.variant === unref(FooterStepperVariant).numeric ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(modelValue.value) + "/" + toDisplayString(__props.pages), 1)) : __props.variant === unref(FooterStepperVariant).bullet ? (openBlock(), createElementBlock("div", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.pages, (i) => {
116
- return openBlock(), createElementBlock("span", {
116
+ return openBlock(), createElementBlock("button", {
117
117
  key: i,
118
+ type: "button",
119
+ "aria-label": `Step ${i}`,
118
120
  "aria-current": modelValue.value === i ? "step" : void 0,
119
121
  class: normalizeClass(footerStepper.bullet({ active: modelValue.value === i })),
120
122
  onClick: ($event) => onClick(i)
@@ -128,31 +130,28 @@ var RuiFooterStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
128
130
  !__props.hideButtons ? (openBlock(), createBlock(RuiButton_default, {
129
131
  key: 4,
130
132
  "aria-label": "Next",
131
- class: normalizeClass(__props.arrowButtons ? footerStepper.arrowButton : void 0),
132
133
  disabled: modelValue.value >= __props.pages,
133
134
  icon: __props.arrowButtons,
135
+ size: __props.arrowButtons ? "sm" : void 0,
134
136
  variant: __props.arrowButtons ? "outlined" : "text",
135
- color: "primary",
137
+ color: __props.arrowButtons ? void 0 : "primary",
136
138
  onClick: _cache[1] || (_cache[1] = ($event) => onNext())
137
139
  }, createSlots({
138
140
  default: withCtx(() => [!__props.arrowButtons ? (openBlock(), createElementBlock("span", _hoisted_8, "Next")) : (openBlock(), createBlock(RuiIcon_default, {
139
141
  key: 1,
140
- size: 24,
141
- name: "lu-arrow-right"
142
+ name: "lu-chevron-right"
142
143
  }))]),
143
144
  _: 2
144
145
  }, [!__props.arrowButtons ? {
145
146
  name: "append",
146
- fn: withCtx(() => [createVNode(RuiIcon_default, {
147
- size: 18,
148
- name: "lu-chevron-right"
149
- })]),
147
+ fn: withCtx(() => [createVNode(RuiIcon_default, { name: "lu-chevron-right" })]),
150
148
  key: "0"
151
149
  } : void 0]), 1032, [
152
- "class",
153
150
  "disabled",
154
151
  "icon",
155
- "variant"
152
+ "size",
153
+ "variant",
154
+ "color"
156
155
  ])) : createCommentVNode("", true)
157
156
  ], 64))], 8, _hoisted_1);
158
157
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RuiFooterStepper.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/steppers/RuiFooterStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport RuiButton from '@/components/buttons/button/RuiButton.vue';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport { FooterStepperVariant } from '@/components/steppers/footer-stepper-variant';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n pages: number;\n variant?: FooterStepperVariant;\n arrowButtons?: boolean;\n hideButtons?: boolean;\n}\n\ndefineOptions({\n name: 'RuiFooterStepper',\n});\n\nconst modelValue = defineModel<number>({ default: 1 });\n\nconst {\n pages,\n variant: variantProp = FooterStepperVariant.numeric,\n arrowButtons = false,\n hideButtons = false,\n} = defineProps<Props>();\n\nconst footerStepper = {\n arrowButton: '!bg-white !disabled:bg-white/60 dark:!disabled:bg-[rgb(50,50,50)]',\n bullet: tv({\n base: 'rounded-full h-2 w-2 bg-black/[0.26] dark:bg-white/30 transition-colors cursor-pointer hover:bg-rui-grey-300 dark:hover:bg-rui-grey-400',\n variants: {\n active: {\n true: 'bg-rui-primary dark:bg-rui-primary hover:bg-rui-primary dark:hover:bg-rui-primary',\n },\n },\n }),\n pill: tv({\n base: 'rounded-full h-2 w-full bg-rui-grey-200 dark:bg-rui-grey-300 transition-colors',\n variants: {\n active: {\n true: 'bg-rui-primary dark:bg-rui-primary',\n },\n },\n }),\n};\n\nfunction onChange(delta: number): void {\n set(modelValue, get(modelValue) + delta);\n}\n\nfunction onPrev(): void {\n if (get(modelValue) > 1)\n onChange(-1);\n}\n\nfunction onNext(): void {\n if (get(modelValue) < pages)\n onChange(1);\n}\n\nfunction onClick(index: number): void {\n onChange(index - get(modelValue));\n}\n</script>\n\n<template>\n <div\n role=\"navigation\"\n aria-label=\"Step navigation\"\n class=\"flex items-center justify-between gap-x-4 transition-all duration-150\"\n :data-variant=\"variantProp\"\n >\n <template v-if=\"variantProp === FooterStepperVariant.pill\">\n <div\n data-id=\"pills\"\n class=\"flex w-full gap-x-3\"\n >\n <span\n v-for=\"i in pages\"\n :key=\"i\"\n :aria-current=\"modelValue === i ? 'step' : undefined\"\n :class=\"footerStepper.pill({ active: modelValue === i })\"\n />\n </div>\n </template>\n <template v-else>\n <RuiButton\n v-if=\"!hideButtons\"\n aria-label=\"Previous\"\n :class=\"arrowButtons ? footerStepper.arrowButton : undefined\"\n :disabled=\"modelValue <= 1\"\n :icon=\"arrowButtons\"\n :variant=\"arrowButtons ? 'outlined' : 'text'\"\n color=\"primary\"\n @click=\"onPrev()\"\n >\n <template\n v-if=\"!arrowButtons\"\n #prepend\n >\n <RuiIcon\n :size=\"18\"\n name=\"lu-chevron-left\"\n />\n </template>\n <span v-if=\"!arrowButtons\">Back</span>\n <RuiIcon\n v-else\n :size=\"24\"\n name=\"lu-arrow-left\"\n />\n </RuiButton>\n <span\n v-if=\"variantProp === FooterStepperVariant.numeric\"\n data-id=\"numeric\"\n class=\"text-rui-text\"\n >\n {{ modelValue }}/{{ pages }}\n </span>\n <div\n v-else-if=\"variantProp === FooterStepperVariant.bullet\"\n data-id=\"bullets\"\n class=\"flex gap-x-1\"\n >\n <span\n v-for=\"i in pages\"\n :key=\"i\"\n :aria-current=\"modelValue === i ? 'step' : undefined\"\n :class=\"footerStepper.bullet({ active: modelValue === i })\"\n @click=\"onClick(i)\"\n />\n </div>\n <RuiProgress\n v-else-if=\"variantProp === FooterStepperVariant.progress\"\n class=\"max-w-[60%]\"\n color=\"primary\"\n :value=\"(modelValue / pages) * 100\"\n />\n <RuiButton\n v-if=\"!hideButtons\"\n aria-label=\"Next\"\n :class=\"arrowButtons ? footerStepper.arrowButton : undefined\"\n :disabled=\"modelValue >= pages\"\n :icon=\"arrowButtons\"\n :variant=\"arrowButtons ? 'outlined' : 'text'\"\n color=\"primary\"\n @click=\"onNext()\"\n >\n <span v-if=\"!arrowButtons\">Next</span>\n <RuiIcon\n v-else\n :size=\"24\"\n name=\"lu-arrow-right\"\n />\n <template\n v-if=\"!arrowButtons\"\n #append\n >\n <RuiIcon\n :size=\"18\"\n name=\"lu-chevron-right\"\n />\n </template>\n </RuiButton>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,aAAa,SAAmB,SAAA,YAAe;EASrD,MAAM,gBAAgB;GACpB,aAAa;GACb,QAAQ,GAAG;IACT,MAAM;IACN,UAAU,EACR,QAAQ,EACN,MAAM,oFACR,EACF;GACF,CAAC;GACD,MAAM,GAAG;IACP,MAAM;IACN,UAAU,EACR,QAAQ,EACN,MAAM,qCACR,EACF;GACF,CAAC;EACH;EAEA,SAAS,SAAS,OAAqB;GACrC,IAAI,YAAY,IAAI,UAAU,IAAI,KAAK;EACzC;EAEA,SAAS,SAAe;GACtB,IAAI,IAAI,UAAU,IAAI,GACpB,SAAS,EAAE;EACf;EAEA,SAAS,SAAe;GACtB,IAAI,IAAI,UAAU,IAAI,QAAA,OACpB,SAAS,CAAC;EACd;EAEA,SAAS,QAAQ,OAAqB;GACpC,SAAS,QAAQ,IAAI,UAAU,CAAC;EAClC;;GAIE,OAAA,UAAA,GAAA,mBAmGM,OAAA;IAlGJ,MAAK;IACL,cAAW;IACX,OAAM;IACL,gBAAc,QAAA;GAEC,GAAA,CAAA,QAA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AAA;MAJC,KAAK;MACL,gBAAc,WAAA,UAAe,IAAC,SAAY,KAAA;MAC1C,OAAK,eAAE,cAAc,OAAM,EAAA,QAAW,WAAA,UAAe,EAAC,CAAA,CAAA;MACtD,UAAK,WAAE,QAAQ,CAAC;;IAIR,CAAA,GAAA,GAAA,EAAA,CAAA,KAAA,QAAA,YAAgB,MAAA,oBAAA,CAAoB,CAAC,YADlD,UAAA,GAAA,YAKE,qBAAA;;KAHA,OAAM;KACN,OAAM;KACL,OAAQ,WAAA,QAAa,QAAA,QAAK;;IAGpB,CAAA,QAAA,eADT,UAAA,GAAA,YAyBY,mBAAA;;KAvBV,cAAW;KACV,OAAK,eAAE,QAAA,eAAe,cAAc,cAAc,KAAA,CAAS;KAC3D,UAAU,WAAA,SAAc,QAAA;KACxB,MAAM,QAAA;KACN,SAAS,QAAA,eAAY,aAAA;KACtB,OAAM;KACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,OAAM;;KAEd,SAAA,cAAsC,CAAzB,CAAA,QAAA,gBAAb,UAAA,GAAA,mBAAsC,QAAA,YAAX,MAAI,MAC/B,UAAA,GAAA,YAIE,iBAAA;;MAFC,MAAM;MACP,MAAK;;;IAGE,GAAA,CAAA,CAAA,QAAA,eAAA;KACN,MAAA;KAED,IAAA,cAGE,CAHF,YAGE,iBAAA;MAFC,MAAM;MACP,MAAK"}
1
+ {"version":3,"file":"RuiFooterStepper.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/steppers/RuiFooterStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport RuiButton from '@/components/buttons/button/RuiButton.vue';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport { FooterStepperVariant } from '@/components/steppers/footer-stepper-variant';\nimport { tv } from '@/utils/tv';\n\nexport interface Props {\n pages: number;\n variant?: FooterStepperVariant;\n arrowButtons?: boolean;\n hideButtons?: boolean;\n}\n\ndefineOptions({\n name: 'RuiFooterStepper',\n});\n\nconst modelValue = defineModel<number>({ default: 1 });\n\nconst {\n pages,\n variant: variantProp = FooterStepperVariant.numeric,\n arrowButtons = false,\n hideButtons = false,\n} = defineProps<Props>();\n\nconst footerStepper = {\n // the current bullet stretches into a short bar, so position reads without relying on color\n bullet: tv({\n base: [\n 'h-2 w-2 rounded-full bg-rui-neutral-300 transition-[width,background-color] duration-200 ease-out dark:bg-rui-neutral-600',\n 'hover:bg-rui-neutral-400 dark:hover:bg-rui-neutral-500 focus-visible:focus-ring outline-hidden',\n ].join(' '),\n variants: {\n active: {\n true: 'w-5 bg-rui-primary hover:bg-rui-primary dark:bg-rui-primary dark:hover:bg-rui-primary',\n },\n },\n }),\n pill: tv({\n base: 'rounded-full h-1.5 w-full bg-rui-neutral-200 dark:bg-rui-neutral-700 transition-colors',\n variants: {\n active: {\n true: 'bg-rui-primary dark:bg-rui-primary',\n },\n },\n }),\n};\n\nfunction onChange(delta: number): void {\n set(modelValue, get(modelValue) + delta);\n}\n\nfunction onPrev(): void {\n if (get(modelValue) > 1)\n onChange(-1);\n}\n\nfunction onNext(): void {\n if (get(modelValue) < pages)\n onChange(1);\n}\n\nfunction onClick(index: number): void {\n onChange(index - get(modelValue));\n}\n</script>\n\n<template>\n <div\n role=\"navigation\"\n aria-label=\"Step navigation\"\n class=\"flex items-center justify-between gap-x-4 transition-all duration-150\"\n :data-variant=\"variantProp\"\n >\n <template v-if=\"variantProp === FooterStepperVariant.pill\">\n <div\n data-id=\"pills\"\n class=\"flex w-full gap-x-3\"\n >\n <span\n v-for=\"i in pages\"\n :key=\"i\"\n :aria-current=\"modelValue === i ? 'step' : undefined\"\n :class=\"footerStepper.pill({ active: modelValue === i })\"\n />\n </div>\n </template>\n <template v-else>\n <RuiButton\n v-if=\"!hideButtons\"\n aria-label=\"Previous\"\n :disabled=\"modelValue <= 1\"\n :icon=\"arrowButtons\"\n :size=\"arrowButtons ? 'sm' : undefined\"\n :variant=\"arrowButtons ? 'outlined' : 'text'\"\n :color=\"arrowButtons ? undefined : 'primary'\"\n @click=\"onPrev()\"\n >\n <template\n v-if=\"!arrowButtons\"\n #prepend\n >\n <RuiIcon name=\"lu-chevron-left\" />\n </template>\n <span v-if=\"!arrowButtons\">Back</span>\n <RuiIcon\n v-else\n name=\"lu-chevron-left\"\n />\n </RuiButton>\n <span\n v-if=\"variantProp === FooterStepperVariant.numeric\"\n data-id=\"numeric\"\n class=\"text-sm tabular-nums text-rui-text-secondary\"\n >\n {{ modelValue }}/{{ pages }}\n </span>\n <div\n v-else-if=\"variantProp === FooterStepperVariant.bullet\"\n data-id=\"bullets\"\n class=\"flex items-center gap-x-1.5\"\n >\n <button\n v-for=\"i in pages\"\n :key=\"i\"\n type=\"button\"\n :aria-label=\"`Step ${i}`\"\n :aria-current=\"modelValue === i ? 'step' : undefined\"\n :class=\"footerStepper.bullet({ active: modelValue === i })\"\n @click=\"onClick(i)\"\n />\n </div>\n <RuiProgress\n v-else-if=\"variantProp === FooterStepperVariant.progress\"\n class=\"max-w-[60%]\"\n color=\"primary\"\n :value=\"(modelValue / pages) * 100\"\n />\n <RuiButton\n v-if=\"!hideButtons\"\n aria-label=\"Next\"\n :disabled=\"modelValue >= pages\"\n :icon=\"arrowButtons\"\n :size=\"arrowButtons ? 'sm' : undefined\"\n :variant=\"arrowButtons ? 'outlined' : 'text'\"\n :color=\"arrowButtons ? undefined : 'primary'\"\n @click=\"onNext()\"\n >\n <span v-if=\"!arrowButtons\">Next</span>\n <RuiIcon\n v-else\n name=\"lu-chevron-right\"\n />\n <template\n v-if=\"!arrowButtons\"\n #append\n >\n <RuiIcon name=\"lu-chevron-right\" />\n </template>\n </RuiButton>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,aAAa,SAAmB,SAAA,YAAe;EASrD,MAAM,gBAAgB;GAEpB,QAAQ,GAAG;IACT,MAAM,CACJ,6HACA,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KAEd,SAAA,cAAsC,CAAzB,CAAA,QAAA,gBAAb,UAAA,GAAA,mBAAsC,QAAA,YAAX,MAAI,MAC/B,UAAA,GAAA,YAGE,iBAAA;;MADA,MAAK;;;IAGE,GAAA,CAAA,CAAA,QAAA,eAAA;KACN,MAAA;KAED,IAAA,cAAmC,CAAnC,YAAmC,iBAAA,EAA1B,MAAK,mBAAkB,CAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"RuiStepper.js","names":[],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperCustomIcon from '@/components/steppers/RuiStepperCustomIcon.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n /** @deprecated Use `classNames.title` instead */\n titleClass?: string;\n /** @deprecated Use `classNames.subtitle` instead */\n subtitleClass?: string;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n titleClass = '',\n subtitleClass = '',\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\n\nconst stepper = tv({\n slots: {\n root: 'flex no-scrollbar overflow-auto',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n divider: 'border-rui-grey-400',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-[1rem] h-0 max-h-0 self-center -mx-4 my-0 border-t [flex:1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n step: 'px-0 py-6',\n divider: 'block min-h-[3rem] min-w-0 max-h-full h-full self-start -my-4 mx-3 border-l',\n },\n },\n state: {\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepper>>(() => stepper({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepper> {\n return stepper({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root()\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <hr\n v-if=\"index > 0\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperCustomIcon\n v-if=\"custom\"\n :index=\"index + 1\"\n :state=\"state\"\n />\n <RuiStepperIcon\n v-else\n :index=\"index + 1\"\n :state=\"state\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n size=\"32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && (classNames?.title ?? titleClass)]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && (classNames?.subtitle ?? subtitleClass)]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"RuiStepper.js","names":[],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\nconst scrollTabindex = useKeyboardScroll(wrapperRef);\n\nconst stepper = tv({\n slots: {\n // takes focus only while it overflows (see useKeyboardScroll); the ring sits inside the clip\n root: 'flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n // the connector is decoration, so it takes the light divider rather than a control's edge\n divider: 'border-rui-divider',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n // 4px in from the edge, so the scrolling root does not clip the active marker's halo\n step: 'px-1 py-6',\n divider: 'block min-h-12 min-w-0 max-h-full h-full self-start -my-4 mx-4 border-l',\n },\n },\n state: {\n // an upcoming step is not disabled, so its text keeps the 4.5:1 of the secondary tone\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n // the line runs through the 32px marker's center\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepper>>(() => stepper({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepper> {\n return stepper({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n :tabindex=\"scrollTabindex\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root()\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <!-- a list may hold only its items, so the connector is drawn but kept out of the accessibility tree -->\n <hr\n v-if=\"index > 0\"\n aria-hidden=\"true\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperIcon\n :index=\"index + 1\"\n :state=\"state\"\n :size=\"custom ? 'lg' : 'md'\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n :size=\"custom ? 40 : 32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && classNames?.title]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && classNames?.subtitle]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":""}
@@ -11,10 +11,6 @@ export interface Props {
11
11
  iconTop?: boolean;
12
12
  custom?: boolean;
13
13
  classNames?: RuiStepperClassNames;
14
- /** @deprecated Use `classNames.title` instead */
15
- titleClass?: string;
16
- /** @deprecated Use `classNames.subtitle` instead */
17
- subtitleClass?: string;
18
14
  orientation?: StepperOrientation;
19
15
  keepActiveVisible?: boolean;
20
16
  }
@@ -1,12 +1,13 @@
1
1
  import { StepperOrientation, StepperState } from "../../types/stepper.js";
2
2
  import { tv } from "../../utils/tv.js";
3
3
  import RuiProgress_default from "../progress/RuiProgress.js";
4
- import RuiStepperCustomIcon_default from "./RuiStepperCustomIcon.js";
4
+ import { useKeyboardScroll } from "../../composables/keyboard-scroll.js";
5
5
  import RuiStepperIcon_default from "./RuiStepperIcon.js";
6
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, nextTick, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, useTemplateRef, watch } from "vue";
6
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, useTemplateRef, watch } from "vue";
7
7
  import { get } from "@vueuse/shared";
8
8
  //#region src/components/steppers/RuiStepper.vue?vue&type=script&setup=true&lang.ts
9
9
  var _hoisted_1 = [
10
+ "tabindex",
10
11
  "data-orientation",
11
12
  "data-icon-top",
12
13
  "data-custom"
@@ -32,8 +33,6 @@ var RuiStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
32
33
  default: false
33
34
  },
34
35
  classNames: {},
35
- titleClass: { default: "" },
36
- subtitleClass: { default: "" },
37
36
  orientation: { default: () => StepperOrientation.horizontal },
38
37
  keepActiveVisible: {
39
38
  type: Boolean,
@@ -42,33 +41,34 @@ var RuiStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
42
41
  },
43
42
  setup(__props) {
44
43
  const wrapperRef = useTemplateRef("wrapperRef");
44
+ const scrollTabindex = useKeyboardScroll(wrapperRef);
45
45
  const stepper = tv({
46
46
  slots: {
47
- root: "flex no-scrollbar overflow-auto",
47
+ root: "flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2",
48
48
  step: "flex items-center px-6 relative",
49
49
  title: "",
50
50
  subtitle: "",
51
51
  label: "flex flex-col items-start text-left ml-2",
52
- divider: "border-rui-grey-400"
52
+ divider: "border-rui-divider"
53
53
  },
54
54
  variants: {
55
55
  orientation: {
56
56
  [StepperOrientation.horizontal]: {
57
57
  root: "whitespace-nowrap lg:whitespace-normal",
58
58
  step: "",
59
- divider: "block max-w-full min-w-[1rem] h-0 max-h-0 self-center -mx-4 my-0 border-t [flex:1_1_0]"
59
+ divider: "block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]"
60
60
  },
61
61
  [StepperOrientation.vertical]: {
62
62
  root: "flex-col inline-flex",
63
- step: "px-0 py-6",
64
- divider: "block min-h-[3rem] min-w-0 max-h-full h-full self-start -my-4 mx-3 border-l"
63
+ step: "px-1 py-6",
64
+ divider: "block min-h-12 min-w-0 max-h-full h-full self-start -my-4 mx-4 border-l"
65
65
  }
66
66
  },
67
67
  state: {
68
68
  [StepperState.inactive]: {
69
69
  step: "text-rui-text-disabled",
70
70
  title: "text-rui-text-secondary",
71
- subtitle: "text-rui-text"
71
+ subtitle: "text-rui-text-secondary"
72
72
  },
73
73
  [StepperState.active]: {
74
74
  step: "text-rui-text",
@@ -184,6 +184,7 @@ var RuiStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
184
184
  return openBlock(), createElementBlock("div", {
185
185
  ref_key: "wrapperRef",
186
186
  ref: wrapperRef,
187
+ tabindex: unref(scrollTabindex),
187
188
  role: "list",
188
189
  "aria-label": "Progress steps",
189
190
  class: normalizeClass(unref(ui).root()),
@@ -193,6 +194,7 @@ var RuiStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
193
194
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(renderedStep), ({ title, description, state, loading }, index) => {
194
195
  return openBlock(), createElementBlock(Fragment, { key: index }, [index > 0 ? (openBlock(), createElementBlock("hr", {
195
196
  key: 0,
197
+ "aria-hidden": "true",
196
198
  class: normalizeClass(unref(ui).divider())
197
199
  }, null, 2)) : createCommentVNode("", true), createElementVNode("div", {
198
200
  role: "listitem",
@@ -203,32 +205,32 @@ var RuiStepper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
203
205
  }, [renderSlot(_ctx.$slots, "icon", mergeProps({ ref_for: true }, {
204
206
  state,
205
207
  index: index + 1
206
- }), () => [createElementVNode("div", _hoisted_3, [__props.custom ? (openBlock(), createBlock(RuiStepperCustomIcon_default, {
207
- key: 0,
208
- index: index + 1,
209
- state
210
- }, null, 8, ["index", "state"])) : (openBlock(), createBlock(RuiStepperIcon_default, {
211
- key: 1,
208
+ }), () => [createElementVNode("div", _hoisted_3, [createVNode(RuiStepperIcon_default, {
212
209
  index: index + 1,
213
- state
214
- }, null, 8, ["index", "state"])), loading ? (openBlock(), createBlock(RuiProgress_default, {
215
- key: 2,
210
+ state,
211
+ size: __props.custom ? "lg" : "md"
212
+ }, null, 8, [
213
+ "index",
214
+ "state",
215
+ "size"
216
+ ]), loading ? (openBlock(), createBlock(RuiProgress_default, {
217
+ key: 0,
216
218
  class: "absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2",
217
- size: "32",
219
+ size: __props.custom ? 40 : 32,
218
220
  variant: "indeterminate",
219
221
  circular: "",
220
222
  thickness: "2",
221
223
  color: "primary"
222
- })) : createCommentVNode("", true)])]), title || description ? (openBlock(), createElementBlock("div", {
224
+ }, null, 8, ["size"])) : createCommentVNode("", true)])]), title || description ? (openBlock(), createElementBlock("div", {
223
225
  key: 0,
224
226
  class: normalizeClass(unref(ui).label()),
225
227
  "data-id": "stepper-label"
226
228
  }, [title ? (openBlock(), createElementBlock("span", {
227
229
  key: 0,
228
- class: normalizeClass([[stepUi(resolveState(state)).title(), __props.custom && (__props.classNames?.title ?? __props.titleClass)], "text-subtitle-2"])
230
+ class: normalizeClass([[stepUi(resolveState(state)).title(), __props.custom && __props.classNames?.title], "text-subtitle-2"])
229
231
  }, toDisplayString(title), 3)) : createCommentVNode("", true), description ? (openBlock(), createElementBlock("span", {
230
232
  key: 1,
231
- class: normalizeClass([[stepUi(resolveState(state)).subtitle(), __props.custom && (__props.classNames?.subtitle ?? __props.subtitleClass)], "text-caption"])
233
+ class: normalizeClass([[stepUi(resolveState(state)).subtitle(), __props.custom && __props.classNames?.subtitle], "text-caption"])
232
234
  }, toDisplayString(description), 3)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)], 10, _hoisted_2)], 64);
233
235
  }), 128))], 10, _hoisted_1);
234
236
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RuiStepper.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperCustomIcon from '@/components/steppers/RuiStepperCustomIcon.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n /** @deprecated Use `classNames.title` instead */\n titleClass?: string;\n /** @deprecated Use `classNames.subtitle` instead */\n subtitleClass?: string;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n titleClass = '',\n subtitleClass = '',\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\n\nconst stepper = tv({\n slots: {\n root: 'flex no-scrollbar overflow-auto',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n divider: 'border-rui-grey-400',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-[1rem] h-0 max-h-0 self-center -mx-4 my-0 border-t [flex:1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n step: 'px-0 py-6',\n divider: 'block min-h-[3rem] min-w-0 max-h-full h-full self-start -my-4 mx-3 border-l',\n },\n },\n state: {\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepper>>(() => stepper({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepper> {\n return stepper({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root()\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <hr\n v-if=\"index > 0\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperCustomIcon\n v-if=\"custom\"\n :index=\"index + 1\"\n :state=\"state\"\n />\n <RuiStepperIcon\n v-else\n :index=\"index + 1\"\n :state=\"state\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n size=\"32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && (classNames?.title ?? titleClass)]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && (classNames?.subtitle ?? subtitleClass)]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDA,MAAM,aAAa,eAA+B,YAAY;EAE9D,MAAM,UAAU,GAAG;GACjB,OAAO;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IACP,SAAS;GACX;GACA,UAAU;IACR,aAAa;MACV,mBAAmB,aAAa;MAC/B,MAAM;MACN,MAAM;MACN,SAAS;KACX;MACC,mBAAmB,WAAW;MAC7B,MAAM;MACN,MAAM;MACN,SAAS;KACX;IACF;IACA,OAAO;MACJ,aAAa,WAAW;MACvB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,SAAS;MACrB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,OAAO;MACnB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,QAAQ;MACpB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,UAAU;MACtB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,OAAO;MACnB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;MACC,aAAa,UAAU;MACtB,MAAM;MACN,OAAO;MACP,UAAU;KACZ;IACF;IACA,SAAS,EACP,MAAM;KACJ,MAAM;KACN,OAAO;IACT,EACF;IACA,QAAQ;KACN,MAAM,CAAC;KACP,OAAO,CAAC;IACV;GACF;GACA,kBAAkB;IAChB;KAAE,QAAQ;KAAM,OAAO,aAAa;KAAU,OAAO,EAAE,MAAM,gBAAgB;IAAE;IAC/E;KAAE,aAAa,mBAAmB;KAAU,QAAQ;KAAM,OAAO,EAAE,SAAS,OAAO;IAAE;IACrF;KAAE,aAAa,mBAAmB;KAAU,SAAS;KAAM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J,OAAK,eAAA,CAAA,CAAG,OAAO,aAAa,KAAK,CAAA,CAAA,CAAG,MAAK,GAAI,QAAA,WAAW,QAAA,YAAY,SAAS,QAAA,WAAU,GAClF,iBAAiB,CAAA;IAEpB,GAAA,gBAAA,KAAK,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAGF,eADR,UAAA,GAAA,mBAMO,QAAA;;KAJJ,OAAK,eAAA,CAAA,CAAG,OAAO,aAAa,KAAK,CAAA,CAAA,CAAG,SAAQ,GAAI,QAAA,WAAW,QAAA,YAAY,YAAY,QAAA,cAAa,GAC3F,cAAc,CAAA;IAEjB,GAAA,gBAAA,WAAW,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,IAAA,UAAA,CAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"RuiStepper.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/steppers/RuiStepper.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { VueClassValue } from '@/types/class-value';\nimport RuiProgress from '@/components/progress/RuiProgress.vue';\nimport RuiStepperIcon from '@/components/steppers/RuiStepperIcon.vue';\nimport { useKeyboardScroll } from '@/composables/keyboard-scroll';\nimport { StepperOrientation, StepperState, type StepperStep } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\nexport interface RuiStepperClassNames {\n root?: VueClassValue;\n title?: VueClassValue;\n subtitle?: VueClassValue;\n}\n\nexport interface Props {\n step?: number;\n steps: StepperStep[];\n iconTop?: boolean;\n custom?: boolean;\n classNames?: RuiStepperClassNames;\n orientation?: StepperOrientation;\n keepActiveVisible?: boolean;\n}\n\ndefineOptions({\n name: 'RuiStepper',\n});\n\nconst {\n step,\n steps,\n iconTop = false,\n custom = false,\n classNames,\n orientation = StepperOrientation.horizontal,\n keepActiveVisible = true,\n} = defineProps<Props>();\n\ndefineSlots<{\n icon?: (props: { state: StepperState | undefined; index: number }) => any;\n}>();\n\nconst wrapperRef = useTemplateRef<HTMLDivElement>('wrapperRef');\nconst scrollTabindex = useKeyboardScroll(wrapperRef);\n\nconst stepper = tv({\n slots: {\n // takes focus only while it overflows (see useKeyboardScroll); the ring sits inside the clip\n root: 'flex no-scrollbar overflow-auto rounded-rui-control outline-hidden focus-visible:focus-ring focus-visible:-outline-offset-2',\n step: 'flex items-center px-6 relative',\n title: '',\n subtitle: '',\n label: 'flex flex-col items-start text-left ml-2',\n // the connector is decoration, so it takes the light divider rather than a control's edge\n divider: 'border-rui-divider',\n },\n variants: {\n orientation: {\n [StepperOrientation.horizontal]: {\n root: 'whitespace-nowrap lg:whitespace-normal',\n step: '',\n divider: 'block max-w-full min-w-4 h-0 max-h-0 self-center -mx-4 my-0 border-t flex-[1_1_0]',\n },\n [StepperOrientation.vertical]: {\n root: 'flex-col inline-flex',\n // 4px in from the edge, so the scrolling root does not clip the active marker's halo\n step: 'px-1 py-6',\n divider: 'block min-h-12 min-w-0 max-h-full h-full self-start -my-4 mx-4 border-l',\n },\n },\n state: {\n // an upcoming step is not disabled, so its text keeps the 4.5:1 of the secondary tone\n [StepperState.inactive]: {\n step: 'text-rui-text-disabled',\n title: 'text-rui-text-secondary',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.active]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.done]: {\n step: 'text-rui-text',\n title: '',\n subtitle: 'text-rui-text-secondary',\n },\n [StepperState.error]: {\n step: 'text-rui-error',\n title: '',\n subtitle: '',\n },\n [StepperState.warning]: {\n step: 'text-rui-warning',\n title: '',\n subtitle: '',\n },\n [StepperState.info]: {\n step: 'text-rui-info',\n title: '',\n subtitle: '',\n },\n [StepperState.success]: {\n step: 'text-rui-success',\n title: '',\n subtitle: '',\n },\n },\n iconTop: {\n true: {\n step: 'flex-col',\n label: 'ml-0 mt-4 items-center text-center',\n },\n },\n custom: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n { custom: true, state: StepperState.inactive, class: { step: 'text-rui-text' } },\n // the line runs through the 32px marker's center\n { orientation: StepperOrientation.vertical, custom: true, class: { divider: 'mx-5' } },\n { orientation: StepperOrientation.vertical, iconTop: true, class: { divider: 'self-center mx-auto' } },\n ],\n defaultVariants: {\n state: StepperState.inactive,\n orientation: StepperOrientation.horizontal,\n custom: false,\n },\n});\n\n// Shared UI for layout props (no per-item state)\nconst ui = computed<ReturnType<typeof stepper>>(() => stepper({ orientation, custom, iconTop }));\n\n/**\n * Resolves the stepper's classes for one step, which vary with the state that\n * step is in, which the shared `ui` above cannot carry because it resolves\n * once for the whole stepper.\n *\n * @param state - the state that step is in\n * @returns the stepper's classes with that state applied\n */\nfunction stepUi(state: StepperState): ReturnType<typeof stepper> {\n return stepper({ orientation, custom, iconTop, state });\n}\n\n// automatically set step state to stepper.\nconst renderedStep = computed<StepperStep[]>(() => {\n if (step === undefined)\n return steps;\n\n return steps.map((item, index) => {\n let stepStatus: StepperState = StepperState.inactive;\n\n if (index + 1 === step)\n stepStatus = StepperState.active;\n\n if (index + 1 < step)\n stepStatus = StepperState.done;\n\n return {\n ...item,\n state: stepStatus,\n };\n });\n});\n\nfunction resolveState(state: StepperState | undefined): StepperState {\n return state ?? StepperState.inactive;\n}\n\nwatch(() => step, () => {\n if (!keepActiveVisible || orientation !== StepperOrientation.horizontal) {\n return;\n }\n\n nextTick(() => {\n const elem = get(wrapperRef);\n if (!elem) {\n return;\n }\n const activeStep = elem.querySelector('[data-active]');\n activeStep?.scrollIntoView?.({\n behavior: 'smooth',\n inline: 'center',\n });\n });\n});\n</script>\n\n<template>\n <div\n ref=\"wrapperRef\"\n :tabindex=\"scrollTabindex\"\n role=\"list\"\n aria-label=\"Progress steps\"\n :class=\"ui.root()\"\n :data-orientation=\"orientation\"\n :data-icon-top=\"iconTop || undefined\"\n :data-custom=\"custom || undefined\"\n >\n <template\n v-for=\"({ title, description, state, loading }, index) in renderedStep\"\n :key=\"index\"\n >\n <!-- a list may hold only its items, so the connector is drawn but kept out of the accessibility tree -->\n <hr\n v-if=\"index > 0\"\n aria-hidden=\"true\"\n :class=\"ui.divider()\"\n />\n <div\n role=\"listitem\"\n :aria-current=\"state === StepperState.active ? 'step' : undefined\"\n :data-state=\"resolveState(state)\"\n :data-active=\"state === StepperState.active || undefined\"\n :class=\"stepUi(resolveState(state)).step()\"\n >\n <slot\n name=\"icon\"\n v-bind=\"{ state, index: index + 1 }\"\n >\n <div class=\"relative flex py-2\">\n <RuiStepperIcon\n :index=\"index + 1\"\n :state=\"state\"\n :size=\"custom ? 'lg' : 'md'\"\n />\n <RuiProgress\n v-if=\"loading\"\n class=\"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2\"\n :size=\"custom ? 40 : 32\"\n variant=\"indeterminate\"\n circular\n thickness=\"2\"\n color=\"primary\"\n />\n </div>\n </slot>\n <div\n v-if=\"title || description\"\n :class=\"ui.label()\"\n data-id=\"stepper-label\"\n >\n <span\n v-if=\"title\"\n :class=\"[stepUi(resolveState(state)).title(), custom && classNames?.title]\"\n class=\"text-subtitle-2\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n :class=\"[stepUi(resolveState(state)).subtitle(), custom && classNames?.subtitle]\"\n class=\"text-caption\"\n >\n {{ description }}\n </span>\n </div>\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,MAAM,aAAa,eAA+B,YAAY;EAC9D,MAAM,iBAAiB,kBAAkB,UAAU;EAEnD,MAAM,UAAU,GAAG;GACjB,OAAO;IAEL,MAAM;IACN,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IAEP,SAAS;GACX;GACA,UAAU;IACR,aAAa;MACV,mBAAmB,aAAa;MAC/B,MAAM;MACN,MAAM;MACN,SAAS;KACX;MACC,mBAAmB,WAAW;MAC7B,MAAM;MAEN,MAAM;MACN,SAAS;KACX;IACF;IACA,OAAO;MAE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["../../../src/components/steppers/RuiStepperIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RuiIcons } from '@/icons';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport { StepperState } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\ninterface StateIconProps {\n name: RuiIcons;\n class?: string;\n size?: number;\n}\n\nconst { state = StepperState.inactive, index } = defineProps<{\n state?: StepperState;\n index: number;\n}>();\n\nconst stateIconMap: Partial<Record<StepperState, StateIconProps>> = {\n [StepperState.done]: { name: 'lu-check', class: 'text-rui-dark-text dark:text-rui-light-text', size: 20 },\n [StepperState.success]: { name: 'lu-circle-check' },\n [StepperState.error]: { name: 'lu-circle-alert' },\n [StepperState.warning]: { name: 'lu-triangle-alert' },\n [StepperState.info]: { name: 'lu-info' },\n};\n\nconst stepperIcon = tv({\n slots: {\n indicator: 'inline-flex items-center justify-center rounded-full h-6 w-6',\n label: 'text-rui-dark-text',\n },\n variants: {\n state: {\n [StepperState.inactive]: {\n indicator: 'bg-current text-xs',\n label: 'dark:text-rui-light-text-secondary',\n },\n [StepperState.active]: {\n indicator: 'bg-rui-primary text-xs',\n label: 'dark:text-rui-light-text',\n },\n [StepperState.done]: {\n indicator: 'bg-rui-primary text-xs',\n label: 'dark:text-rui-light-text',\n },\n [StepperState.error]: {},\n [StepperState.warning]: {},\n [StepperState.info]: {},\n [StepperState.success]: {},\n },\n },\n defaultVariants: { state: StepperState.inactive },\n});\n\nconst ui = computed<ReturnType<typeof stepperIcon>>(() => stepperIcon({ state }));\n\nconst showLabel = computed<boolean>(() => state === StepperState.inactive || state === StepperState.active);\n\nconst iconProps = computed<StateIconProps | undefined>(() => stateIconMap[state]);\n</script>\n\n<template>\n <span :class=\"ui.indicator()\">\n <span\n v-if=\"showLabel\"\n :class=\"ui.label()\"\n >\n {{ index }}\n </span>\n <RuiIcon\n v-else-if=\"iconProps\"\n :name=\"iconProps.name\"\n :class=\"iconProps.class\"\n :size=\"iconProps.size\"\n />\n </span>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"RuiStepperIcon.js","names":[],"sources":["../../../src/components/steppers/RuiStepperIcon.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RuiIcons } from '@/icons';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport { StepperState } from '@/types/stepper';\nimport { tv } from '@/utils/tv';\n\nconst { state = StepperState.inactive, index, size = 'md' } = defineProps<{\n state?: StepperState;\n index: number;\n /** md is 24px, the default stepper; lg is 32px, the `custom` one */\n size?: 'md' | 'lg';\n}>();\n\nconst statusIcons: Partial<Record<StepperState, RuiIcons>> = {\n [StepperState.success]: 'lu-circle-check',\n [StepperState.error]: 'lu-circle-alert',\n [StepperState.warning]: 'lu-triangle-alert',\n [StepperState.info]: 'lu-info',\n};\n\n/**\n * The step marker: an outlined number ahead, a filled number with a soft halo\n * for the current step, and a tinted, primary-outlined check behind. A status state shows its\n * icon at full size in the step's own color.\n */\nconst stepperIcon = tv({\n base: 'inline-flex shrink-0 items-center justify-center rounded-full font-semibold tabular-nums transition-colors',\n variants: {\n size: {\n md: 'size-6 text-xs [--rui-icon-size:0.875rem]',\n lg: 'size-8 text-sm [--rui-icon-size:1rem]',\n },\n state: {\n [StepperState.inactive]: 'border border-rui-outline bg-rui-surface text-rui-text-secondary',\n // the 10% tint vanishes on a dark page, so dark raises the halo and the done well\n [StepperState.active]: 'bg-rui-primary-fill text-rui-primary-foreground ring-4 ring-rui-primary-soft dark:ring-rui-primary/30',\n // a primary outline over the tint, so done sits between the filled current step and a neutral upcoming one\n [StepperState.done]: 'border border-rui-primary bg-rui-primary-soft text-rui-primary dark:border-rui-primary-lighter dark:bg-rui-primary/20 dark:text-rui-primary-lighter',\n [StepperState.error]: '',\n [StepperState.warning]: '',\n [StepperState.info]: '',\n [StepperState.success]: '',\n },\n status: {\n true: '![--rui-icon-size:100%]',\n false: '',\n },\n },\n defaultVariants: { size: 'md', state: StepperState.inactive, status: false },\n});\n\nconst statusIcon = computed<RuiIcons | undefined>(() => statusIcons[state]);\n</script>\n\n<template>\n <span :class=\"stepperIcon({ size, state, status: !!statusIcon })\">\n <RuiIcon\n v-if=\"state === StepperState.done\"\n name=\"lu-check\"\n />\n <RuiIcon\n v-else-if=\"statusIcon\"\n :name=\"statusIcon\"\n />\n <span v-else>{{ index }}</span>\n </span>\n</template>\n"],"mappings":""}
@@ -2,6 +2,8 @@ import { StepperState } from '../../types/stepper.js';
2
2
  type __VLS_Props = {
3
3
  state?: StepperState;
4
4
  index: number;
5
+ /** md is 24px, the default stepper; lg is 32px, the `custom` one */
6
+ size?: 'md' | 'lg';
5
7
  };
6
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
9
  declare const _default: typeof __VLS_export;