@rotki/ui-library 2.27.0 → 3.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (433) 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 +9 -10
  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 +16 -3
  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 +22 -32
  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 +17 -13
  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 +39 -26
  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 +136 -55
  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 +66 -97
  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 +6 -3
  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 +12 -8
  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 +21 -22
  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 +17 -21
  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 +5 -5
  67. package/dist/components/color-picker/RuiColorBoard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  68. package/dist/components/color-picker/RuiColorDisplay.vue_vue_type_script_setup_true_lang.js +1 -1
  69. package/dist/components/color-picker/RuiColorHue.js.map +1 -1
  70. package/dist/components/color-picker/RuiColorHue.vue_vue_type_script_setup_true_lang.js +2 -2
  71. package/dist/components/color-picker/RuiColorHue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/components/color-picker/RuiColorInput.js.map +1 -1
  73. package/dist/components/color-picker/RuiColorInput.vue_vue_type_script_setup_true_lang.js +46 -36
  74. package/dist/components/color-picker/RuiColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  75. package/dist/components/color-picker/RuiColorPicker.js.map +1 -1
  76. package/dist/components/color-picker/RuiColorPicker.vue_vue_type_script_setup_true_lang.js +4 -5
  77. package/dist/components/color-picker/RuiColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  78. package/dist/components/date-time-picker/RuiDateTimePicker.js.map +1 -1
  79. package/dist/components/date-time-picker/RuiDateTimePicker.vue.d.ts +3 -2
  80. package/dist/components/date-time-picker/RuiDateTimePicker.vue_vue_type_script_setup_true_lang.js +81 -80
  81. package/dist/components/date-time-picker/RuiDateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  82. package/dist/components/date-time-picker/RuiDateTimePickerMenu.js.map +1 -1
  83. package/dist/components/date-time-picker/RuiDateTimePickerMenu.vue_vue_type_script_setup_true_lang.js +2 -2
  84. package/dist/components/date-time-picker/RuiDateTimePickerMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  85. package/dist/components/date-time-picker/RuiTimezoneSelect.js.map +1 -1
  86. package/dist/components/date-time-picker/RuiTimezoneSelect.vue.d.ts +4 -3
  87. package/dist/components/date-time-picker/RuiTimezoneSelect.vue_vue_type_script_setup_true_lang.js +3 -3
  88. package/dist/components/date-time-picker/RuiTimezoneSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  89. package/dist/components/date-time-picker/date-time-picker-styles.d.ts +128 -219
  90. package/dist/components/date-time-picker/date-time-picker-styles.js +1 -2
  91. package/dist/components/date-time-picker/date-time-picker-styles.js.map +1 -1
  92. package/dist/components/date-time-picker/use-date-bounds.js +1 -1
  93. package/dist/components/date-time-picker/use-date-time-selection.js +65 -66
  94. package/dist/components/date-time-picker/use-date-time-selection.js.map +1 -1
  95. package/dist/components/date-time-picker/use-input-handler.js +1 -1
  96. package/dist/components/date-time-picker/use-keyboard-handler.js +29 -30
  97. package/dist/components/date-time-picker/use-keyboard-handler.js.map +1 -1
  98. package/dist/components/forms/auto-complete/RuiAutoComplete.js.map +1 -1
  99. package/dist/components/forms/auto-complete/RuiAutoComplete.vue.d.ts +1 -68
  100. package/dist/components/forms/auto-complete/RuiAutoComplete.vue_vue_type_script_setup_true_lang.js +203 -198
  101. package/dist/components/forms/auto-complete/RuiAutoComplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  102. package/dist/components/forms/auto-complete/RuiAutoCompleteOption.js.map +1 -1
  103. package/dist/components/forms/auto-complete/RuiAutoCompleteOption.vue_vue_type_script_setup_true_lang.js +1 -0
  104. package/dist/components/forms/auto-complete/RuiAutoCompleteOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
  105. package/dist/components/forms/auto-complete/RuiAutoCompleteOptionList.js.map +1 -1
  106. package/dist/components/forms/auto-complete/RuiAutoCompleteOptionList.vue.d.ts +2 -0
  107. package/dist/components/forms/auto-complete/RuiAutoCompleteOptionList.vue_vue_type_script_setup_true_lang.js +8 -3
  108. package/dist/components/forms/auto-complete/RuiAutoCompleteOptionList.vue_vue_type_script_setup_true_lang.js.map +1 -1
  109. package/dist/components/forms/auto-complete/RuiAutoCompleteSelection.js.map +1 -1
  110. package/dist/components/forms/auto-complete/RuiAutoCompleteSelection.vue.d.ts +4 -0
  111. package/dist/components/forms/auto-complete/RuiAutoCompleteSelection.vue_vue_type_script_setup_true_lang.js +24 -10
  112. package/dist/components/forms/auto-complete/RuiAutoCompleteSelection.vue_vue_type_script_setup_true_lang.js.map +1 -1
  113. package/dist/components/forms/auto-complete/auto-complete-props.d.ts +66 -0
  114. package/dist/components/forms/auto-complete/auto-complete-styles.d.ts +128 -218
  115. package/dist/components/forms/auto-complete/auto-complete-styles.js +4 -2
  116. package/dist/components/forms/auto-complete/auto-complete-styles.js.map +1 -1
  117. package/dist/components/forms/category-picker/RuiCategoryPicker.js.map +1 -1
  118. package/dist/components/forms/category-picker/RuiCategoryPicker.vue.d.ts +3 -6
  119. package/dist/components/forms/category-picker/RuiCategoryPicker.vue_vue_type_script_setup_true_lang.js +154 -154
  120. package/dist/components/forms/category-picker/RuiCategoryPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  121. package/dist/components/forms/category-picker/category-picker-styles.d.ts +83 -232
  122. package/dist/components/forms/category-picker/category-picker-styles.js +20 -26
  123. package/dist/components/forms/category-picker/category-picker-styles.js.map +1 -1
  124. package/dist/components/forms/check-control-styles.d.ts +61 -2
  125. package/dist/components/forms/check-control-styles.js +53 -46
  126. package/dist/components/forms/check-control-styles.js.map +1 -1
  127. package/dist/components/forms/checkbox/RuiCheckbox.js.map +1 -1
  128. package/dist/components/forms/checkbox/RuiCheckbox.vue_vue_type_script_setup_true_lang.js +32 -19
  129. package/dist/components/forms/checkbox/RuiCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  130. package/dist/components/forms/checkbox/checkbox-group/RuiCheckboxGroup.js.map +1 -1
  131. package/dist/components/forms/checkbox/checkbox-group/RuiCheckboxGroup.vue_vue_type_script_setup_true_lang.js +4 -4
  132. package/dist/components/forms/checkbox/checkbox-group/RuiCheckboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  133. package/dist/components/forms/field-defaults/RuiFieldDefaults.js +7 -0
  134. package/dist/components/forms/field-defaults/RuiFieldDefaults.js.map +1 -0
  135. package/dist/components/forms/field-defaults/RuiFieldDefaults.vue.d.ts +16 -0
  136. package/dist/components/forms/field-defaults/RuiFieldDefaults.vue_vue_type_script_setup_true_lang.js +18 -0
  137. package/dist/components/forms/field-defaults/RuiFieldDefaults.vue_vue_type_script_setup_true_lang.js.map +1 -0
  138. package/dist/components/forms/field-label/RuiFieldLabel.js +7 -0
  139. package/dist/components/forms/field-label/RuiFieldLabel.js.map +1 -0
  140. package/dist/components/forms/field-label/RuiFieldLabel.vue.d.ts +17 -0
  141. package/dist/components/forms/field-label/RuiFieldLabel.vue_vue_type_script_setup_true_lang.js +57 -0
  142. package/dist/components/forms/field-label/RuiFieldLabel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  143. package/dist/components/forms/file-upload/RuiFileUpload.js.map +1 -1
  144. package/dist/components/forms/file-upload/RuiFileUpload.vue.d.ts +1 -1
  145. package/dist/components/forms/file-upload/RuiFileUpload.vue_vue_type_script_setup_true_lang.js +56 -35
  146. package/dist/components/forms/file-upload/RuiFileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -1
  147. package/dist/components/forms/radio-button/radio/RuiRadio.js.map +1 -1
  148. package/dist/components/forms/radio-button/radio/RuiRadio.vue_vue_type_script_setup_true_lang.js +14 -15
  149. package/dist/components/forms/radio-button/radio/RuiRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  150. package/dist/components/forms/radio-button/radio-group/RuiRadioGroup.js.map +1 -1
  151. package/dist/components/forms/radio-button/radio-group/RuiRadioGroup.vue_vue_type_script_setup_true_lang.js +3 -3
  152. package/dist/components/forms/radio-button/radio-group/RuiRadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  153. package/dist/components/forms/revealable-text-field/RuiRevealableTextField.js.map +1 -1
  154. package/dist/components/forms/revealable-text-field/RuiRevealableTextField.vue_vue_type_script_setup_true_lang.js +6 -6
  155. package/dist/components/forms/revealable-text-field/RuiRevealableTextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  156. package/dist/components/forms/select/RuiMenuSelect.js.map +1 -1
  157. package/dist/components/forms/select/RuiMenuSelect.vue.d.ts +3 -12
  158. package/dist/components/forms/select/RuiMenuSelect.vue_vue_type_script_setup_true_lang.js +61 -56
  159. package/dist/components/forms/select/RuiMenuSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  160. package/dist/components/forms/select/RuiSimpleSelect.js.map +1 -1
  161. package/dist/components/forms/select/RuiSimpleSelect.vue.d.ts +0 -1
  162. package/dist/components/forms/select/RuiSimpleSelect.vue_vue_type_script_setup_true_lang.js +13 -20
  163. package/dist/components/forms/select/RuiSimpleSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  164. package/dist/components/forms/select/menu-select-styles.d.ts +99 -221
  165. package/dist/components/forms/select/menu-select-styles.js +1 -4
  166. package/dist/components/forms/select/menu-select-styles.js.map +1 -1
  167. package/dist/components/forms/slider/RuiSlider.js.map +1 -1
  168. package/dist/components/forms/slider/RuiSlider.vue.d.ts +0 -4
  169. package/dist/components/forms/slider/RuiSlider.vue_vue_type_script_setup_true_lang.js +129 -106
  170. package/dist/components/forms/slider/RuiSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  171. package/dist/components/forms/slider/slider-styles.d.ts +40 -40
  172. package/dist/components/forms/slider/slider-styles.js +67 -109
  173. package/dist/components/forms/slider/slider-styles.js.map +1 -1
  174. package/dist/components/forms/switch/RuiSwitch.js.map +1 -1
  175. package/dist/components/forms/switch/RuiSwitch.vue_vue_type_script_setup_true_lang.js +33 -45
  176. package/dist/components/forms/switch/RuiSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  177. package/dist/components/forms/text-area/RuiTextArea.js.map +1 -1
  178. package/dist/components/forms/text-area/RuiTextArea.vue.d.ts +3 -2
  179. package/dist/components/forms/text-area/RuiTextArea.vue_vue_type_script_setup_true_lang.js +138 -117
  180. package/dist/components/forms/text-area/RuiTextArea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  181. package/dist/components/forms/text-area/text-area-styles.d.ts +41 -115
  182. package/dist/components/forms/text-area/text-area-styles.js +34 -194
  183. package/dist/components/forms/text-area/text-area-styles.js.map +1 -1
  184. package/dist/components/forms/text-field/RuiTextField.js.map +1 -1
  185. package/dist/components/forms/text-field/RuiTextField.vue.d.ts +5 -2
  186. package/dist/components/forms/text-field/RuiTextField.vue_vue_type_script_setup_true_lang.js +112 -105
  187. package/dist/components/forms/text-field/RuiTextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  188. package/dist/components/forms/text-field/text-field-styles.d.ts +37 -145
  189. package/dist/components/forms/text-field/text-field-styles.js +24 -267
  190. package/dist/components/forms/text-field/text-field-styles.js.map +1 -1
  191. package/dist/components/forms/text-input-styles.d.ts +98 -229
  192. package/dist/components/forms/text-input-styles.js +63 -193
  193. package/dist/components/forms/text-input-styles.js.map +1 -1
  194. package/dist/components/helpers/RuiFormTextDetail.js.map +1 -1
  195. package/dist/components/helpers/RuiFormTextDetail.vue.d.ts +11 -1
  196. package/dist/components/helpers/RuiFormTextDetail.vue_vue_type_script_setup_true_lang.js +5 -5
  197. package/dist/components/helpers/RuiFormTextDetail.vue_vue_type_script_setup_true_lang.js.map +1 -1
  198. package/dist/components/icons/RuiIcon.js.map +1 -1
  199. package/dist/components/icons/RuiIcon.vue_vue_type_script_setup_true_lang.js +7 -4
  200. package/dist/components/icons/RuiIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
  201. package/dist/components/index.d.ts +5 -3
  202. package/dist/components/index.js +4 -3
  203. package/dist/components/loaders/RuiSkeletonBase.js.map +1 -1
  204. package/dist/components/loaders/RuiSkeletonBase.vue_vue_type_script_setup_true_lang.js +6 -5
  205. package/dist/components/loaders/RuiSkeletonBase.vue_vue_type_script_setup_true_lang.js.map +1 -1
  206. package/dist/components/loaders/RuiSkeletonLoader.js.map +1 -1
  207. package/dist/components/loaders/RuiSkeletonLoader.vue_vue_type_script_setup_true_lang.js +8 -8
  208. package/dist/components/loaders/RuiSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  209. package/dist/components/logos/RuiLogo.js.map +1 -1
  210. package/dist/components/logos/RuiLogo.vue_vue_type_script_setup_true_lang.js +2 -2
  211. package/dist/components/logos/RuiLogo.vue_vue_type_script_setup_true_lang.js.map +1 -1
  212. package/dist/components/overlays/badge/RuiBadge.js.map +1 -1
  213. package/dist/components/overlays/badge/RuiBadge.vue_vue_type_script_setup_true_lang.js +76 -48
  214. package/dist/components/overlays/badge/RuiBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  215. package/dist/components/overlays/dialog/RuiDialog.js.map +1 -1
  216. package/dist/components/overlays/dialog/RuiDialog.vue.d.ts +3 -2
  217. package/dist/components/overlays/dialog/RuiDialog.vue_vue_type_script_setup_true_lang.js +17 -13
  218. package/dist/components/overlays/dialog/RuiDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  219. package/dist/components/overlays/menu/RuiMenu.js.map +1 -1
  220. package/dist/components/overlays/menu/RuiMenu.vue.d.ts +9 -7
  221. package/dist/components/overlays/menu/RuiMenu.vue_vue_type_script_setup_true_lang.js +33 -29
  222. package/dist/components/overlays/menu/RuiMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  223. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.js.map +1 -1
  224. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue.d.ts +6 -2
  225. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue_vue_type_script_setup_true_lang.js +49 -25
  226. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  227. package/dist/components/overlays/notification/RuiNotification.js.map +1 -1
  228. package/dist/components/overlays/notification/RuiNotification.vue_vue_type_script_setup_true_lang.js +7 -8
  229. package/dist/components/overlays/notification/RuiNotification.vue_vue_type_script_setup_true_lang.js.map +1 -1
  230. package/dist/components/overlays/tooltip/RuiTooltip.js.map +1 -1
  231. package/dist/components/overlays/tooltip/RuiTooltip.vue.d.ts +0 -5
  232. package/dist/components/overlays/tooltip/RuiTooltip.vue_vue_type_script_setup_true_lang.js +17 -11
  233. package/dist/components/overlays/tooltip/RuiTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  234. package/dist/components/overlays/tooltip/tooltip-styles.d.ts +5 -12
  235. package/dist/components/overlays/tooltip/tooltip-styles.js +11 -18
  236. package/dist/components/overlays/tooltip/tooltip-styles.js.map +1 -1
  237. package/dist/components/progress/RuiProgress.js.map +1 -1
  238. package/dist/components/progress/RuiProgress.vue.d.ts +4 -0
  239. package/dist/components/progress/RuiProgress.vue_vue_type_script_setup_true_lang.js +73 -47
  240. package/dist/components/progress/RuiProgress.vue_vue_type_script_setup_true_lang.js.map +1 -1
  241. package/dist/components/steppers/RuiFooterStepper.js.map +1 -1
  242. package/dist/components/steppers/RuiFooterStepper.vue_vue_type_script_setup_true_lang.js +28 -29
  243. package/dist/components/steppers/RuiFooterStepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  244. package/dist/components/steppers/RuiStepper.js.map +1 -1
  245. package/dist/components/steppers/RuiStepper.vue.d.ts +0 -4
  246. package/dist/components/steppers/RuiStepper.vue_vue_type_script_setup_true_lang.js +36 -29
  247. package/dist/components/steppers/RuiStepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  248. package/dist/components/steppers/RuiStepperIcon.js.map +1 -1
  249. package/dist/components/steppers/RuiStepperIcon.vue.d.ts +2 -0
  250. package/dist/components/steppers/RuiStepperIcon.vue_vue_type_script_setup_true_lang.js +47 -47
  251. package/dist/components/steppers/RuiStepperIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
  252. package/dist/components/tables/RuiDataTable.js.map +1 -1
  253. package/dist/components/tables/RuiDataTable.vue.d.ts +3 -6
  254. package/dist/components/tables/RuiDataTable.vue_vue_type_script_setup_true_lang.js +85 -67
  255. package/dist/components/tables/RuiDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  256. package/dist/components/tables/RuiExpandButton.js.map +1 -1
  257. package/dist/components/tables/RuiExpandButton.vue_vue_type_script_setup_true_lang.js +1 -0
  258. package/dist/components/tables/RuiExpandButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  259. package/dist/components/tables/RuiTable.js.map +1 -1
  260. package/dist/components/tables/RuiTable.vue_vue_type_script_setup_true_lang.js +8 -5
  261. package/dist/components/tables/RuiTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  262. package/dist/components/tables/RuiTableEmptyState.js.map +1 -1
  263. package/dist/components/tables/RuiTableEmptyState.vue_vue_type_script_setup_true_lang.js +1 -1
  264. package/dist/components/tables/RuiTableEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -1
  265. package/dist/components/tables/RuiTableHead.js.map +1 -1
  266. package/dist/components/tables/RuiTableHead.vue_vue_type_script_setup_true_lang.js +89 -67
  267. package/dist/components/tables/RuiTableHead.vue_vue_type_script_setup_true_lang.js.map +1 -1
  268. package/dist/components/tables/RuiTablePagination.js.map +1 -1
  269. package/dist/components/tables/RuiTablePagination.vue_vue_type_script_setup_true_lang.js +9 -12
  270. package/dist/components/tables/RuiTablePagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  271. package/dist/components/tables/data-table/RuiDataTableCell.vue_vue_type_script_setup_true_lang.js +1 -1
  272. package/dist/components/tables/data-table/RuiDataTableExpandedRow.js.map +1 -1
  273. package/dist/components/tables/data-table/RuiDataTableExpandedRow.vue_vue_type_script_setup_true_lang.js +3 -3
  274. package/dist/components/tables/data-table/RuiDataTableExpandedRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  275. package/dist/components/tables/data-table/RuiDataTableGroupRow.js.map +1 -1
  276. package/dist/components/tables/data-table/RuiDataTableGroupRow.vue_vue_type_script_setup_true_lang.js +8 -4
  277. package/dist/components/tables/data-table/RuiDataTableGroupRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  278. package/dist/components/tables/data-table/RuiDataTableMobileSort.js.map +1 -1
  279. package/dist/components/tables/data-table/RuiDataTableMobileSort.vue_vue_type_script_setup_true_lang.js +2 -2
  280. package/dist/components/tables/data-table/RuiDataTableMobileSort.vue_vue_type_script_setup_true_lang.js.map +1 -1
  281. package/dist/components/tables/data-table/RuiDataTableRow.js.map +1 -1
  282. package/dist/components/tables/data-table/RuiDataTableRow.vue_vue_type_script_setup_true_lang.js +47 -8
  283. package/dist/components/tables/data-table/RuiDataTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  284. package/dist/components/tables/data-table-styles.d.ts +24 -0
  285. package/dist/components/tables/data-table-styles.js +35 -20
  286. package/dist/components/tables/data-table-styles.js.map +1 -1
  287. package/dist/components/tables/table_no_data_placeholder.js +1 -1
  288. package/dist/components/tables/table_no_data_placeholder.js.map +1 -1
  289. package/dist/components/tables/table_no_data_placeholder_dark.js +1 -1
  290. package/dist/components/tables/table_no_data_placeholder_dark.js.map +1 -1
  291. package/dist/components/tables/use-pagination-navigation.js +1 -1
  292. package/dist/components/tabs/tab/RuiTab.js.map +1 -1
  293. package/dist/components/tabs/tab/RuiTab.vue.d.ts +2 -5
  294. package/dist/components/tabs/tab/RuiTab.vue_vue_type_script_setup_true_lang.js +95 -69
  295. package/dist/components/tabs/tab/RuiTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  296. package/dist/components/tabs/tab/use-tab-link.js +1 -1
  297. package/dist/components/tabs/tab-item/RuiTabItem.js.map +1 -1
  298. package/dist/components/tabs/tab-item/RuiTabItem.vue.d.ts +0 -1
  299. package/dist/components/tabs/tab-item/RuiTabItem.vue_vue_type_script_setup_true_lang.js +5 -11
  300. package/dist/components/tabs/tab-item/RuiTabItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  301. package/dist/components/tabs/tab-items/RuiTabItems.js.map +1 -1
  302. package/dist/components/tabs/tab-items/RuiTabItems.vue_vue_type_script_setup_true_lang.js +8 -13
  303. package/dist/components/tabs/tab-items/RuiTabItems.vue_vue_type_script_setup_true_lang.js.map +1 -1
  304. package/dist/components/tabs/tab-props.d.ts +7 -1
  305. package/dist/components/tabs/tab-props.js +7 -1
  306. package/dist/components/tabs/tab-props.js.map +1 -1
  307. package/dist/components/tabs/tabs/RuiTabs.js.map +1 -1
  308. package/dist/components/tabs/tabs/RuiTabs.vue.d.ts +2 -1
  309. package/dist/components/tabs/tabs/RuiTabs.vue_vue_type_script_setup_true_lang.js +188 -43
  310. package/dist/components/tabs/tabs/RuiTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  311. package/dist/components/tabs/tabs/use-tab-indicator.d.ts +27 -0
  312. package/dist/components/tabs/tabs/use-tab-indicator.js +67 -0
  313. package/dist/components/tabs/tabs/use-tab-indicator.js.map +1 -0
  314. package/dist/components/tabs/tabs/use-tab-keyboard.d.ts +17 -0
  315. package/dist/components/tabs/tabs/use-tab-keyboard.js +57 -0
  316. package/dist/components/tabs/tabs/use-tab-keyboard.js.map +1 -0
  317. package/dist/components/tabs/tabs/use-tab-routing.js +1 -2
  318. package/dist/components/tabs/tabs/use-tab-routing.js.map +1 -1
  319. package/dist/components/tabs/tabs/use-tab-scroll.js +15 -15
  320. package/dist/components/tabs/tabs/use-tab-scroll.js.map +1 -1
  321. package/dist/components/time-picker/RuiTimePicker.js.map +1 -1
  322. package/dist/components/time-picker/RuiTimePicker.vue_vue_type_script_setup_true_lang.js +95 -93
  323. package/dist/components/time-picker/RuiTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  324. package/dist/components/time-picker/time-picker-styles.d.ts +18 -0
  325. package/dist/components/time-picker/time-picker-styles.js +16 -10
  326. package/dist/components/time-picker/time-picker-styles.js.map +1 -1
  327. package/dist/composables/breakpoint.js +3 -3
  328. package/dist/composables/breakpoint.js.map +1 -1
  329. package/dist/composables/defaults/field.d.ts +22 -0
  330. package/dist/composables/defaults/field.js +29 -0
  331. package/dist/composables/defaults/field.js.map +1 -0
  332. package/dist/composables/dropdown-menu.d.ts +23 -11
  333. package/dist/composables/dropdown-menu.js +44 -34
  334. package/dist/composables/dropdown-menu.js.map +1 -1
  335. package/dist/composables/floating.d.ts +1 -3
  336. package/dist/composables/floating.js +16 -13
  337. package/dist/composables/floating.js.map +1 -1
  338. package/dist/composables/forms/auto-complete/chips.d.ts +22 -0
  339. package/dist/composables/forms/auto-complete/chips.js +42 -0
  340. package/dist/composables/forms/auto-complete/chips.js.map +1 -0
  341. package/dist/composables/forms/auto-complete/combobox.d.ts +25 -0
  342. package/dist/composables/forms/auto-complete/combobox.js +35 -0
  343. package/dist/composables/forms/auto-complete/combobox.js.map +1 -0
  344. package/dist/composables/forms/auto-complete/focus.d.ts +5 -2
  345. package/dist/composables/forms/auto-complete/focus.js +44 -19
  346. package/dist/composables/forms/auto-complete/focus.js.map +1 -1
  347. package/dist/composables/forms/auto-complete/index.d.ts +3 -0
  348. package/dist/composables/forms/auto-complete/keyboard-navigation.d.ts +8 -1
  349. package/dist/composables/forms/auto-complete/keyboard-navigation.js +49 -21
  350. package/dist/composables/forms/auto-complete/keyboard-navigation.js.map +1 -1
  351. package/dist/composables/forms/auto-complete/search.js +6 -7
  352. package/dist/composables/forms/auto-complete/search.js.map +1 -1
  353. package/dist/composables/forms/auto-complete/selection.d.ts +37 -0
  354. package/dist/composables/forms/auto-complete/selection.js +60 -0
  355. package/dist/composables/forms/auto-complete/selection.js.map +1 -0
  356. package/dist/composables/forms/auto-complete/value.js +20 -1
  357. package/dist/composables/forms/auto-complete/value.js.map +1 -1
  358. package/dist/composables/forms/category-picker/use-category-picker.js +1 -1
  359. package/dist/composables/forms/use-prepend-append-width.js +6 -6
  360. package/dist/composables/forms/use-prepend-append-width.js.map +1 -1
  361. package/dist/composables/keyboard-scroll.d.ts +17 -0
  362. package/dist/composables/keyboard-scroll.js +58 -0
  363. package/dist/composables/keyboard-scroll.js.map +1 -0
  364. package/dist/composables/overlay-stack.js +1 -1
  365. package/dist/composables/sticky-header.d.ts +8 -0
  366. package/dist/composables/sticky-header.js +21 -10
  367. package/dist/composables/sticky-header.js.map +1 -1
  368. package/dist/composables/tables/data-table/columns.js +1 -1
  369. package/dist/composables/tables/data-table/expansion.js +1 -1
  370. package/dist/composables/tables/data-table/grouping.js +27 -28
  371. package/dist/composables/tables/data-table/grouping.js.map +1 -1
  372. package/dist/composables/tables/data-table/page-scroll.d.ts +32 -0
  373. package/dist/composables/tables/data-table/page-scroll.js +144 -0
  374. package/dist/composables/tables/data-table/page-scroll.js.map +1 -0
  375. package/dist/composables/tables/data-table/pagination.js +1 -1
  376. package/dist/composables/tables/data-table/selection.js +37 -38
  377. package/dist/composables/tables/data-table/selection.js.map +1 -1
  378. package/dist/composables/tables/data-table/sort.js +1 -1
  379. package/dist/composables/theme.js +12 -12
  380. package/dist/composables/theme.js.map +1 -1
  381. package/dist/composables/timeout-manager.js +1 -1
  382. package/dist/consts/colors.d.ts +4 -0
  383. package/dist/consts/colors.js +1 -37
  384. package/dist/consts/colors.js.map +1 -1
  385. package/dist/consts/tokens.d.ts +56 -0
  386. package/dist/consts/tokens.js +46 -0
  387. package/dist/consts/tokens.js.map +1 -0
  388. package/dist/consts/typography.d.ts +51 -18
  389. package/dist/index.d.ts +7 -2
  390. package/dist/index.js +10 -6
  391. package/dist/index.js.map +1 -1
  392. package/dist/library-icons.json +0 -10
  393. package/dist/style.css +5629 -4678
  394. package/dist/styles/colors.css +315 -0
  395. package/dist/styles/tokens.css +50 -0
  396. package/dist/tailwind.css +145 -0
  397. package/dist/theme/theme.css +403 -0
  398. package/dist/theme.css +403 -0
  399. package/dist/types/dom.d.ts +9 -0
  400. package/dist/types/theme.d.ts +2 -3
  401. package/dist/types/theme.js.map +1 -1
  402. package/dist/utils/form-text-detail.js +1 -1
  403. package/dist/utils/helpers.d.ts +0 -8
  404. package/dist/utils/helpers.js +1 -2
  405. package/dist/utils/helpers.js.map +1 -1
  406. package/dist/utils/tv.js +13 -21
  407. package/dist/utils/tv.js.map +1 -1
  408. package/dist/vendor/@vueuse/core/dist/index.js +1577 -0
  409. package/dist/vendor/@vueuse/core/dist/index.js.map +1 -0
  410. package/dist/vendor/@vueuse/shared/dist/index.js +563 -0
  411. package/dist/vendor/@vueuse/shared/dist/index.js.map +1 -0
  412. package/dist/vite-plugin/index.js +5 -6
  413. package/dist/vite-plugin/index.js.map +1 -1
  414. package/dist/web-types.json +278 -403
  415. package/package.json +17 -19
  416. package/dist/components/icons/LazyIcon.vue.d.ts +0 -8
  417. package/dist/components/steppers/RuiStepperCustomIcon.js +0 -7
  418. package/dist/components/steppers/RuiStepperCustomIcon.js.map +0 -1
  419. package/dist/components/steppers/RuiStepperCustomIcon.vue.d.ts +0 -8
  420. package/dist/components/steppers/RuiStepperCustomIcon.vue_vue_type_script_setup_true_lang.js +0 -43
  421. package/dist/components/steppers/RuiStepperCustomIcon.vue_vue_type_script_setup_true_lang.js.map +0 -1
  422. package/dist/composables/colors/common.d.ts +0 -20
  423. package/dist/composables/colors/index.d.ts +0 -3
  424. package/dist/composables/colors/text-input.d.ts +0 -27
  425. package/dist/composables/forms/use-label-with-quote.d.ts +0 -2
  426. package/dist/composables/popper.d.ts +0 -16
  427. package/dist/composables/popper.js +0 -23
  428. package/dist/composables/popper.js.map +0 -1
  429. package/dist/consts/forms/auto-complete/index.d.ts +0 -4
  430. package/dist/theme/index.d.ts +0 -5
  431. package/dist/theme/index.js +0 -162
  432. package/dist/theme/index.js.map +0 -1
  433. package/dist/utils/forms/auto-complete/index.d.ts +0 -2
@@ -1,15 +1,18 @@
1
+ import { get, objectOmit } from "../../vendor/@vueuse/shared/dist/index.js";
1
2
  import { cn, tv } from "../../utils/tv.js";
2
3
  import RuiIcon_default from "../icons/RuiIcon.js";
3
4
  import { CHIP_CLOSE_ICON_SIZES, ChipSize, ChipVariant } from "./chip-props.js";
4
- import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, unref, withModifiers } from "vue";
5
- import { objectOmit } from "@vueuse/shared";
5
+ import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, unref, useSlots, useTemplateRef, withModifiers } from "vue";
6
6
  //#region src/components/chips/RuiChip.vue?vue&type=script&setup=true&lang.ts
7
7
  var _hoisted_1 = [
8
8
  "data-variant",
9
9
  "data-color",
10
- "data-disabled"
10
+ "data-disabled",
11
+ "role",
12
+ "tabindex",
13
+ "aria-disabled"
11
14
  ];
12
- var _hoisted_2 = ["disabled"];
15
+ var _hoisted_2 = ["disabled", "tabindex"];
13
16
  var RuiChip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
14
17
  name: "RuiChip",
15
18
  inheritAttrs: false,
@@ -34,41 +37,54 @@ var RuiChip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
34
37
  size: { default: () => ChipSize.md },
35
38
  variant: { default: () => ChipVariant.filled },
36
39
  color: { default: "grey" },
37
- closeIcon: { default: "lu-circle-x" },
40
+ closeIcon: { default: "lu-x" },
41
+ closeUnfocusable: {
42
+ type: Boolean,
43
+ default: false
44
+ },
38
45
  bgColor: { default: () => void 0 },
39
46
  textColor: { default: () => void 0 },
40
- classNames: {},
41
- contentClass: { default: "" }
47
+ classNames: {}
42
48
  },
43
49
  emits: ["click:close", "click"],
44
50
  setup(__props, { emit: __emit }) {
45
51
  const emit = __emit;
52
+ const slots = useSlots();
53
+ const root = useTemplateRef("root");
46
54
  const chipStyles = tv({
47
55
  slots: {
48
- root: "inline-flex items-center justify-between px-2 py-1 transition-all cursor-default outline-none max-w-full truncate",
49
- prepend: "rounded-full flex items-center justify-center pr-0 w-6 h-6 text-[0.6rem] text-white bg-rui-grey-400 dark:bg-rui-grey-700 overflow-hidden",
50
- label: "truncate px-2 text-[0.8125rem]",
51
- close: "rounded-full flex items-center p-[0.13rem] pl-0 inset-y-0 focus:outline-none",
52
- closeIcon: "opacity-50 hover:opacity-80 dark:hover:text-rui-grey-300 transition-opacity"
56
+ root: "inline-flex items-center justify-between px-2 transition duration-150 cursor-default outline-hidden max-w-full truncate",
57
+ prepend: "rounded-full flex items-center justify-center shrink-0 w-6 h-6 text-[0.625rem] font-semibold text-rui-neutral-700 bg-rui-neutral-200 dark:text-rui-neutral-200 dark:bg-rui-neutral-700 overflow-hidden",
58
+ label: "truncate px-2 text-[0.8125rem]/5",
59
+ close: "rounded-full flex items-center p-0.5 inset-y-0 focus:outline-hidden transition-colors hover:bg-rui-pressed",
60
+ closeIcon: "opacity-60 hover:opacity-100 transition-opacity"
53
61
  },
54
62
  variants: {
55
63
  tile: {
56
- true: { root: "rounded-lg" },
64
+ true: { root: "rounded-rui-sm" },
57
65
  false: { root: "rounded-full" }
58
66
  },
59
67
  size: {
60
- md: { root: "min-h-8" },
68
+ md: { root: "min-h-7" },
61
69
  sm: {
62
- root: "py-[0.19rem]",
70
+ root: "min-h-6",
63
71
  prepend: "text-[0.5rem] p-[0.08rem] w-4 h-4",
64
- label: "px-1.5 text-[0.7rem]",
65
- close: "p-[0.08rem]"
72
+ label: "px-1.5 text-xs/4",
73
+ close: "p-px"
66
74
  }
67
75
  },
76
+ prepended: {
77
+ true: { root: "pl-0.5" },
78
+ false: {}
79
+ },
80
+ closeable: {
81
+ true: {},
82
+ false: {}
83
+ },
68
84
  disabled: {
69
85
  true: {
70
- root: "opacity-40 cursor-default",
71
- close: "cursor-default"
86
+ root: "!text-rui-text-disabled cursor-default",
87
+ close: "cursor-default hover:bg-transparent dark:hover:bg-transparent"
72
88
  },
73
89
  false: {}
74
90
  },
@@ -81,7 +97,8 @@ var RuiChip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
81
97
  },
82
98
  variant: {
83
99
  filled: {},
84
- outlined: {}
100
+ outlined: {},
101
+ tonal: {}
85
102
  },
86
103
  color: {
87
104
  grey: { root: "text-rui-text" },
@@ -97,24 +114,16 @@ var RuiChip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
97
114
  {
98
115
  clickable: true,
99
116
  disabled: false,
100
- class: { root: "hover:brightness-90 focus:brightness-75 dark:hover:brightness-110" }
117
+ class: { root: "hover:state-layer active:state-layer-pressed focus-visible:focus-ring" }
101
118
  },
102
119
  {
103
120
  color: "grey",
104
121
  variant: "filled",
105
- class: { root: "bg-rui-grey-200 dark:bg-rui-grey-800" }
122
+ class: { root: "bg-rui-neutral-200 dark:bg-rui-neutral-700" }
106
123
  },
107
124
  {
108
- color: "grey",
109
125
  variant: "outlined",
110
- class: { root: "border border-black/[0.26] bg-transparent dark:border-white/[0.26]" }
111
- },
112
- {
113
- color: "grey",
114
- variant: "outlined",
115
- clickable: true,
116
- disabled: false,
117
- class: { root: "hover:bg-black/[0.04] focus:bg-black/[0.12] dark:hover:bg-white/[0.04] dark:focus:bg-white/[0.12]" }
126
+ class: { root: "border border-current/40 bg-transparent" }
118
127
  },
119
128
  {
120
129
  color: "primary",
@@ -129,94 +138,121 @@ var RuiChip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
129
138
  {
130
139
  color: "error",
131
140
  variant: "filled",
132
- class: { root: "bg-rui-error" }
141
+ class: { root: "bg-rui-error dark:bg-rui-error-darker" }
133
142
  },
134
143
  {
135
144
  color: "warning",
136
145
  variant: "filled",
137
- class: { root: "bg-rui-warning" }
146
+ class: { root: "bg-rui-warning dark:bg-rui-warning-darker" }
138
147
  },
139
148
  {
140
149
  color: "info",
141
150
  variant: "filled",
142
- class: { root: "bg-rui-info" }
151
+ class: { root: "bg-rui-info dark:bg-rui-info-darker" }
143
152
  },
144
153
  {
145
154
  color: "success",
146
155
  variant: "filled",
147
- class: { root: "bg-rui-success" }
156
+ class: { root: "bg-rui-success dark:bg-rui-success-darker" }
148
157
  },
149
158
  {
150
159
  color: "primary",
151
160
  variant: "outlined",
152
- class: { root: "border text-rui-primary border-rui-primary/50 bg-transparent" }
161
+ class: { root: "text-rui-primary dark:text-rui-primary-lighter" }
153
162
  },
154
163
  {
155
164
  color: "secondary",
156
165
  variant: "outlined",
157
- class: { root: "border text-rui-secondary border-rui-secondary/50 bg-transparent" }
166
+ class: { root: "text-rui-secondary dark:text-rui-secondary-lighter" }
158
167
  },
159
168
  {
160
169
  color: "error",
161
170
  variant: "outlined",
162
- class: { root: "border text-rui-error border-rui-error/50 bg-transparent" }
171
+ class: { root: "text-rui-error dark:text-rui-error-lighter" }
163
172
  },
164
173
  {
165
174
  color: "warning",
166
175
  variant: "outlined",
167
- class: { root: "border text-rui-warning border-rui-warning/50 bg-transparent" }
176
+ class: { root: "text-rui-warning" }
168
177
  },
169
178
  {
170
179
  color: "info",
171
180
  variant: "outlined",
172
- class: { root: "border text-rui-info border-rui-info/50 bg-transparent" }
181
+ class: { root: "text-rui-info" }
173
182
  },
174
183
  {
175
184
  color: "success",
176
185
  variant: "outlined",
177
- class: { root: "border text-rui-success border-rui-success/50 bg-transparent" }
186
+ class: { root: "text-rui-success" }
187
+ },
188
+ {
189
+ color: "grey",
190
+ variant: "tonal",
191
+ class: { root: "bg-rui-neutral-500/10 dark:bg-rui-neutral-400/10" }
178
192
  },
179
193
  {
180
194
  color: "primary",
181
- variant: "outlined",
182
- clickable: true,
183
- disabled: false,
184
- class: { root: "hover:bg-rui-primary/[0.04] focus:bg-rui-primary/[0.12]" }
195
+ variant: "tonal",
196
+ class: { root: "bg-rui-primary/15 text-rui-primary-darker dark:bg-rui-primary/35 dark:text-rui-primary-lighter" }
185
197
  },
186
198
  {
187
199
  color: "secondary",
188
- variant: "outlined",
189
- clickable: true,
190
- disabled: false,
191
- class: { root: "hover:bg-rui-secondary/[0.04] focus:bg-rui-secondary/[0.12]" }
200
+ variant: "tonal",
201
+ class: { root: "bg-rui-secondary/20 text-rui-secondary-darker dark:bg-rui-secondary/35 dark:text-rui-secondary-lighter" }
192
202
  },
193
203
  {
194
204
  color: "error",
195
- variant: "outlined",
196
- clickable: true,
197
- disabled: false,
198
- class: { root: "hover:bg-rui-error/[0.04] focus:bg-rui-error/[0.12]" }
205
+ variant: "tonal",
206
+ class: { root: "bg-rui-error/10 text-rui-error-darker dark:bg-rui-error/20 dark:text-rui-error-lighter" }
199
207
  },
200
208
  {
201
209
  color: "warning",
202
- variant: "outlined",
203
- clickable: true,
204
- disabled: false,
205
- class: { root: "hover:bg-rui-warning/[0.04] focus:bg-rui-warning/[0.12]" }
210
+ variant: "tonal",
211
+ class: { root: "bg-rui-warning/10 text-rui-warning-darker dark:bg-rui-warning/20 dark:text-rui-warning-lighter" }
206
212
  },
207
213
  {
208
214
  color: "info",
209
- variant: "outlined",
210
- clickable: true,
211
- disabled: false,
212
- class: { root: "hover:bg-rui-info/[0.04] focus:bg-rui-info/[0.12]" }
215
+ variant: "tonal",
216
+ class: { root: "bg-rui-info/10 text-rui-info-darker dark:bg-rui-info/20 dark:text-rui-info-lighter" }
213
217
  },
214
218
  {
215
219
  color: "success",
220
+ variant: "tonal",
221
+ class: { root: "bg-rui-success/10 text-rui-success-darker dark:bg-rui-success/20 dark:text-rui-success-lighter" }
222
+ },
223
+ {
224
+ size: "sm",
225
+ prepended: true,
226
+ class: { root: "pl-1" }
227
+ },
228
+ {
229
+ tile: true,
230
+ class: { prepend: "rounded-sm" }
231
+ },
232
+ {
233
+ closeable: true,
234
+ class: {
235
+ root: "pr-1",
236
+ label: "pr-1"
237
+ }
238
+ },
239
+ {
240
+ closeable: true,
241
+ size: "sm",
242
+ class: {
243
+ root: "pr-1",
244
+ label: "pr-0.5"
245
+ }
246
+ },
247
+ {
248
+ disabled: true,
249
+ variant: ["filled", "tonal"],
250
+ class: { root: "!bg-rui-neutral-100 dark:!bg-rui-neutral-800" }
251
+ },
252
+ {
253
+ disabled: true,
216
254
  variant: "outlined",
217
- clickable: true,
218
- disabled: false,
219
- class: { root: "hover:bg-rui-success/[0.04] focus:bg-rui-success/[0.12]" }
255
+ class: { root: "!border-rui-divider" }
220
256
  }
221
257
  ],
222
258
  compoundSlots: [{
@@ -231,15 +267,6 @@ var RuiChip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
231
267
  ],
232
268
  variant: "filled",
233
269
  class: "text-rui-dark-text"
234
- }, {
235
- slots: ["root"],
236
- color: [
237
- "warning",
238
- "success",
239
- "info"
240
- ],
241
- variant: "filled",
242
- class: "dark:text-rui-light-text"
243
270
  }],
244
271
  defaultVariants: {
245
272
  tile: false,
@@ -256,7 +283,9 @@ var RuiChip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
256
283
  color: __props.color,
257
284
  variant: __props.variant,
258
285
  disabled: __props.disabled,
259
- clickable: __props.clickable
286
+ clickable: __props.clickable,
287
+ prepended: !!slots.prepend,
288
+ closeable: __props.closeable
260
289
  }));
261
290
  const style = computed(() => {
262
291
  const s = {};
@@ -268,26 +297,46 @@ var RuiChip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
268
297
  if (!__props.clickable || __props.disabled) return;
269
298
  emit("click", e);
270
299
  }
300
+ /**
301
+ * Enter and Space activate a clickable chip as they would a button, through a
302
+ * real click so the handler still gets a `MouseEvent`.
303
+ *
304
+ * @param e - the key press on the chip
305
+ */
306
+ function onKeydown(e) {
307
+ if (!__props.clickable || __props.disabled || e.target !== get(root)) return;
308
+ if (e.key !== "Enter" && e.key !== " ") return;
309
+ e.preventDefault();
310
+ get(root)?.click();
311
+ }
271
312
  return (_ctx, _cache) => {
272
313
  return openBlock(), createElementBlock("div", mergeProps({
314
+ ref_key: "root",
315
+ ref: root,
273
316
  class: unref(ui).root({ class: unref(cn)(__props.classNames?.root) }),
274
317
  style: unref(style),
275
318
  "data-variant": __props.variant,
276
319
  "data-color": __props.color,
277
320
  "data-disabled": __props.disabled || void 0,
278
- role: "button",
279
- tabindex: "0"
280
- }, unref(objectOmit)(_ctx.$attrs, ["onClick"]), { onClick: _cache[1] || (_cache[1] = ($event) => click($event)) }), [
321
+ role: __props.clickable ? "button" : void 0,
322
+ tabindex: __props.clickable && !__props.disabled ? 0 : void 0,
323
+ "aria-disabled": __props.clickable && __props.disabled ? true : void 0
324
+ }, unref(objectOmit)(_ctx.$attrs, ["onClick"]), {
325
+ onClick: _cache[1] || (_cache[1] = ($event) => click($event)),
326
+ onKeydown: _cache[2] || (_cache[2] = ($event) => onKeydown($event))
327
+ }), [
281
328
  _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
282
329
  key: 0,
283
330
  class: normalizeClass(unref(ui).prepend())
284
331
  }, [renderSlot(_ctx.$slots, "prepend")], 2)) : createCommentVNode("", true),
285
- createElementVNode("span", { class: normalizeClass(unref(ui).label({ class: unref(cn)(__props.classNames?.content) ?? __props.contentClass })) }, [renderSlot(_ctx.$slots, "default")], 2),
332
+ createElementVNode("span", { class: normalizeClass(unref(ui).label({ class: unref(cn)(__props.classNames?.content) })) }, [renderSlot(_ctx.$slots, "default")], 2),
286
333
  __props.closeable ? (openBlock(), createElementBlock("button", {
287
334
  key: 1,
288
335
  class: normalizeClass(unref(ui).close()),
289
336
  disabled: __props.disabled,
290
337
  type: "button",
338
+ "aria-label": "Remove",
339
+ tabindex: __props.closeUnfocusable ? -1 : void 0,
291
340
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emit("click:close"), ["stop"]))
292
341
  }, [createVNode(RuiIcon_default, {
293
342
  class: normalizeClass(unref(ui).closeIcon()),
@@ -1 +1 @@
1
- {"version":3,"file":"RuiChip.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../src/components/chips/RuiChip.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { StyleValue } from 'vue';\nimport type { ContextColorsType } from '@/consts/colors';\nimport type { RuiIcons } from '@/icons';\nimport type { VueClassValue } from '@/types/class-value';\nimport { objectOmit } from '@vueuse/shared';\nimport { CHIP_CLOSE_ICON_SIZES, ChipSize, ChipVariant } from '@/components/chips/chip-props';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport { cn, tv } from '@/utils/tv';\n\nexport interface RuiChipClassNames {\n root?: VueClassValue;\n content?: VueClassValue;\n}\n\nexport interface Props {\n tile?: boolean;\n clickable?: boolean;\n closeable?: boolean;\n disabled?: boolean;\n size?: ChipSize;\n variant?: ChipVariant;\n color?: 'grey' | ContextColorsType;\n closeIcon?: RuiIcons;\n bgColor?: string;\n textColor?: string;\n classNames?: RuiChipClassNames;\n /** @deprecated Use `classNames.content` instead */\n contentClass?: string;\n}\n\ndefineOptions({\n name: 'RuiChip',\n inheritAttrs: false,\n});\n\nconst {\n tile = false,\n size = ChipSize.md,\n color = 'grey',\n clickable = false,\n closeable = false,\n disabled = false,\n variant = ChipVariant.filled,\n closeIcon = 'lu-circle-x',\n bgColor = undefined,\n textColor = undefined,\n classNames,\n contentClass = '',\n} = defineProps<Props>();\n\nconst emit = defineEmits<{\n 'click:close': [];\n 'click': [e: MouseEvent];\n}>();\n\ndefineSlots<{\n prepend?: () => any;\n default?: () => any;\n}>();\n\nconst chipStyles = tv({\n slots: {\n root: 'inline-flex items-center justify-between px-2 py-1 transition-all cursor-default outline-none max-w-full truncate',\n prepend: 'rounded-full flex items-center justify-center pr-0 w-6 h-6 text-[0.6rem] text-white bg-rui-grey-400 dark:bg-rui-grey-700 overflow-hidden',\n label: 'truncate px-2 text-[0.8125rem]',\n close: 'rounded-full flex items-center p-[0.13rem] pl-0 inset-y-0 focus:outline-none',\n closeIcon: 'opacity-50 hover:opacity-80 dark:hover:text-rui-grey-300 transition-opacity',\n },\n variants: {\n tile: {\n true: { root: 'rounded-lg' },\n false: { root: 'rounded-full' },\n },\n size: {\n md: { root: 'min-h-8' },\n sm: {\n root: 'py-[0.19rem]',\n prepend: 'text-[0.5rem] p-[0.08rem] w-4 h-4',\n label: 'px-1.5 text-[0.7rem]',\n close: 'p-[0.08rem]',\n },\n },\n disabled: {\n true: { root: 'opacity-40 cursor-default', close: 'cursor-default' },\n false: {},\n },\n clickable: {\n true: { root: 'cursor-pointer' },\n false: { root: 'cursor-default', close: 'cursor-default' },\n },\n variant: {\n filled: {},\n outlined: {},\n },\n color: {\n grey: { root: 'text-rui-text' },\n primary: {},\n secondary: {},\n error: {},\n warning: {},\n info: {},\n success: {},\n },\n },\n compoundVariants: [\n // Interactive states (clickable + not disabled)\n { clickable: true, disabled: false, class: { root: 'hover:brightness-90 focus:brightness-75 dark:hover:brightness-110' } },\n\n // Grey filled/outlined\n { color: 'grey', variant: 'filled', class: { root: 'bg-rui-grey-200 dark:bg-rui-grey-800' } },\n { color: 'grey', variant: 'outlined', class: { root: 'border border-black/[0.26] bg-transparent dark:border-white/[0.26]' } },\n { color: 'grey', variant: 'outlined', clickable: true, disabled: false, class: { root: 'hover:bg-black/[0.04] focus:bg-black/[0.12] dark:hover:bg-white/[0.04] dark:focus:bg-white/[0.12]' } },\n\n // Context colors — filled bg\n { color: 'primary', variant: 'filled', class: { root: 'bg-rui-primary' } },\n { color: 'secondary', variant: 'filled', class: { root: 'bg-rui-secondary' } },\n { color: 'error', variant: 'filled', class: { root: 'bg-rui-error' } },\n { color: 'warning', variant: 'filled', class: { root: 'bg-rui-warning' } },\n { color: 'info', variant: 'filled', class: { root: 'bg-rui-info' } },\n { color: 'success', variant: 'filled', class: { root: 'bg-rui-success' } },\n\n // Context colors — outlined base\n { color: 'primary', variant: 'outlined', class: { root: 'border text-rui-primary border-rui-primary/50 bg-transparent' } },\n { color: 'secondary', variant: 'outlined', class: { root: 'border text-rui-secondary border-rui-secondary/50 bg-transparent' } },\n { color: 'error', variant: 'outlined', class: { root: 'border text-rui-error border-rui-error/50 bg-transparent' } },\n { color: 'warning', variant: 'outlined', class: { root: 'border text-rui-warning border-rui-warning/50 bg-transparent' } },\n { color: 'info', variant: 'outlined', class: { root: 'border text-rui-info border-rui-info/50 bg-transparent' } },\n { color: 'success', variant: 'outlined', class: { root: 'border text-rui-success border-rui-success/50 bg-transparent' } },\n\n // Context colors — outlined interactive\n { color: 'primary', variant: 'outlined', clickable: true, disabled: false, class: { root: 'hover:bg-rui-primary/[0.04] focus:bg-rui-primary/[0.12]' } },\n { color: 'secondary', variant: 'outlined', clickable: true, disabled: false, class: { root: 'hover:bg-rui-secondary/[0.04] focus:bg-rui-secondary/[0.12]' } },\n { color: 'error', variant: 'outlined', clickable: true, disabled: false, class: { root: 'hover:bg-rui-error/[0.04] focus:bg-rui-error/[0.12]' } },\n { color: 'warning', variant: 'outlined', clickable: true, disabled: false, class: { root: 'hover:bg-rui-warning/[0.04] focus:bg-rui-warning/[0.12]' } },\n { color: 'info', variant: 'outlined', clickable: true, disabled: false, class: { root: 'hover:bg-rui-info/[0.04] focus:bg-rui-info/[0.12]' } },\n { color: 'success', variant: 'outlined', clickable: true, disabled: false, class: { root: 'hover:bg-rui-success/[0.04] focus:bg-rui-success/[0.12]' } },\n ],\n compoundSlots: [\n // All context colors filled share dark text\n { slots: ['root'], color: ['primary', 'secondary', 'error', 'warning', 'info', 'success'], variant: 'filled', class: 'text-rui-dark-text' },\n // Dark mode: warning/success/info filled use light text\n { slots: ['root'], color: ['warning', 'success', 'info'], variant: 'filled', class: 'dark:text-rui-light-text' },\n ],\n defaultVariants: {\n tile: false,\n size: 'md',\n disabled: false,\n clickable: false,\n variant: 'filled',\n color: 'grey',\n },\n});\n\nconst ui = computed<ReturnType<typeof chipStyles>>(() => chipStyles({\n tile,\n size,\n color,\n variant,\n disabled,\n clickable,\n}));\n\nconst style = computed<Partial<StyleValue>>(() => {\n const s: Partial<StyleValue> = {};\n if (bgColor)\n s.backgroundColor = bgColor;\n if (textColor)\n s.color = textColor;\n return s;\n});\n\nfunction click(e: MouseEvent): void {\n if (!clickable || disabled)\n return;\n\n emit('click', e);\n}\n</script>\n\n<template>\n <div\n :class=\"ui.root({ class: cn(classNames?.root) })\"\n :style=\"style\"\n :data-variant=\"variant\"\n :data-color=\"color\"\n :data-disabled=\"disabled || undefined\"\n role=\"button\"\n tabindex=\"0\"\n v-bind=\"objectOmit($attrs, ['onClick'])\"\n @click=\"click($event)\"\n >\n <div\n v-if=\"$slots.prepend\"\n :class=\"ui.prepend()\"\n >\n <slot name=\"prepend\" />\n </div>\n <span :class=\"ui.label({ class: cn(classNames?.content) ?? contentClass })\">\n <slot />\n </span>\n <button\n v-if=\"closeable\"\n :class=\"ui.close()\"\n :disabled=\"disabled\"\n type=\"button\"\n @click.stop=\"emit('click:close')\"\n >\n <RuiIcon\n :class=\"ui.closeIcon()\"\n :size=\"CHIP_CLOSE_ICON_SIZES[size]\"\n :name=\"closeIcon\"\n />\n </button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,OAAO;EAUb,MAAM,aAAa,GAAG;GACpB,OAAO;IACL,MAAM;IACN,SAAS;IACT,OAAO;IACP,OAAO;IACP,WAAW;GACb;GACA,UAAU;IACR,MAAM;KACJ,MAAM,EAAE,MAAM,aAAa;KAC3B,OAAO,EAAE,MAAM,eAAe;IAChC;IACA,MAAM;KACJ,IAAI,EAAE,MAAM,UAAU;KACtB,IAAI;MACF,MAAM;MACN,SAAS;MACT,OAAO;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A,GAAA,mBAYS,UAAA;;KAVN,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,MAAK,CAAA;KACf,UAAU,QAAA;KACX,MAAK;KACJ,SAAK,OAAA,OAAA,OAAA,KAAA,eAAA,WAAO,KAAI,aAAA,GAAA,CAAA,MAAA,CAAA;IAEjB,GAAA,CAAA,YAIE,iBAAA;KAHC,OAAK,eAAE,MAAA,EAAA,CAAE,CAAC,UAAS,CAAA;KACnB,MAAM,MAAA,qBAAA,CAAqB,CAAC,QAAA;KAC5B,MAAM,QAAA"}
1
+ {"version":3,"file":"RuiChip.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../src/components/chips/RuiChip.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { StyleValue } from 'vue';\nimport type { ContextColorsType } from '@/consts/colors';\nimport type { RuiIcons } from '@/icons';\nimport type { VueClassValue } from '@/types/class-value';\nimport { objectOmit } from '@vueuse/shared';\nimport { CHIP_CLOSE_ICON_SIZES, ChipSize, ChipVariant } from '@/components/chips/chip-props';\nimport RuiIcon from '@/components/icons/RuiIcon.vue';\nimport { cn, tv } from '@/utils/tv';\n\nexport interface RuiChipClassNames {\n root?: VueClassValue;\n content?: VueClassValue;\n}\n\nexport interface Props {\n tile?: boolean;\n clickable?: boolean;\n closeable?: boolean;\n disabled?: boolean;\n size?: ChipSize;\n variant?: ChipVariant;\n color?: 'grey' | ContextColorsType;\n closeIcon?: RuiIcons;\n /**\n * Takes the close button out of the tab order, for a chip inside a widget that removes chips from\n * the keyboard itself, as RuiAutoComplete does with Backspace. The button still takes clicks.\n */\n closeUnfocusable?: boolean;\n bgColor?: string;\n textColor?: string;\n classNames?: RuiChipClassNames;\n}\n\ndefineOptions({\n name: 'RuiChip',\n inheritAttrs: false,\n});\n\nconst {\n tile = false,\n size = ChipSize.md,\n color = 'grey',\n clickable = false,\n closeable = false,\n disabled = false,\n variant = ChipVariant.filled,\n closeIcon = 'lu-x',\n closeUnfocusable = false,\n bgColor = undefined,\n textColor = undefined,\n classNames,\n} = defineProps<Props>();\n\nconst emit = defineEmits<{\n 'click:close': [];\n 'click': [e: MouseEvent];\n}>();\n\nconst slots = defineSlots<{\n prepend?: () => any;\n default?: () => any;\n}>();\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\nconst chipStyles = tv({\n slots: {\n // min-h sets the height and items-center the rest, so a prefix or a border never adds to it\n root: 'inline-flex items-center justify-between px-2 transition duration-150 cursor-default outline-hidden max-w-full truncate',\n // the avatar's neutral pair, so initials stay readable on any chip color\n prepend: 'rounded-full flex items-center justify-center shrink-0 w-6 h-6 text-[0.625rem] font-semibold text-rui-neutral-700 bg-rui-neutral-200 dark:text-rui-neutral-200 dark:bg-rui-neutral-700 overflow-hidden',\n label: 'truncate px-2 text-[0.8125rem]/5',\n // a round hover fill marks the close icon as its own button\n close: 'rounded-full flex items-center p-0.5 inset-y-0 focus:outline-hidden transition-colors hover:bg-rui-pressed',\n closeIcon: 'opacity-60 hover:opacity-100 transition-opacity',\n },\n variants: {\n tile: {\n true: { root: 'rounded-rui-sm' },\n false: { root: 'rounded-full' },\n },\n size: {\n // 28px, to sit in a 44px table row; sm is 24px with 12px text, the smallest the library sets\n md: { root: 'min-h-7' },\n sm: {\n root: 'min-h-6',\n prepend: 'text-[0.5rem] p-[0.08rem] w-4 h-4',\n label: 'px-1.5 text-xs/4',\n close: 'p-px',\n },\n },\n // a leading circle sits as far from the start edge as from the top, like an avatar in a pill\n prepended: {\n true: { root: 'pl-0.5' },\n false: {},\n },\n closeable: {\n true: {},\n false: {},\n },\n disabled: {\n true: { root: '!text-rui-text-disabled cursor-default', close: 'cursor-default hover:bg-transparent dark:hover:bg-transparent' },\n false: {},\n },\n clickable: {\n true: { root: 'cursor-pointer' },\n false: { root: 'cursor-default', close: 'cursor-default' },\n },\n variant: {\n filled: {},\n outlined: {},\n tonal: {},\n },\n color: {\n grey: { root: 'text-rui-text' },\n primary: {},\n secondary: {},\n error: {},\n warning: {},\n info: {},\n success: {},\n },\n },\n compoundVariants: [\n // Interactive states (clickable + not disabled): a tint over any fill, which keeps the text color\n { clickable: true, disabled: false, class: { root: 'hover:state-layer active:state-layer-pressed focus-visible:focus-ring' } },\n\n // Grey filled: a solid step above the tonal tint\n { color: 'grey', variant: 'filled', class: { root: 'bg-rui-neutral-200 dark:bg-rui-neutral-700' } },\n\n // Outlined: the border is the text color at 40%, so it follows the brighter text tone in dark\n { variant: 'outlined', class: { root: 'border border-current/40 bg-transparent' } },\n\n // Context colors — filled bg\n { color: 'primary', variant: 'filled', class: { root: 'bg-rui-primary' } },\n { color: 'secondary', variant: 'filled', class: { root: 'bg-rui-secondary' } },\n // in dark a status color's `main` is a text tone, so the fill is its deep `darker`\n { color: 'error', variant: 'filled', class: { root: 'bg-rui-error dark:bg-rui-error-darker' } },\n { color: 'warning', variant: 'filled', class: { root: 'bg-rui-warning dark:bg-rui-warning-darker' } },\n { color: 'info', variant: 'filled', class: { root: 'bg-rui-info dark:bg-rui-info-darker' } },\n { color: 'success', variant: 'filled', class: { root: 'bg-rui-success dark:bg-rui-success-darker' } },\n\n // Context colors: outlined text\n { color: 'primary', variant: 'outlined', class: { root: 'text-rui-primary dark:text-rui-primary-lighter' } },\n { color: 'secondary', variant: 'outlined', class: { root: 'text-rui-secondary dark:text-rui-secondary-lighter' } },\n { color: 'error', variant: 'outlined', class: { root: 'text-rui-error dark:text-rui-error-lighter' } },\n { color: 'warning', variant: 'outlined', class: { root: 'text-rui-warning' } },\n { color: 'info', variant: 'outlined', class: { root: 'text-rui-info' } },\n { color: 'success', variant: 'outlined', class: { root: 'text-rui-success' } },\n\n // Tonal: a tint with the deeper tone as text, 4.5:1; primary and secondary sit near grey, so tint harder\n { color: 'grey', variant: 'tonal', class: { root: 'bg-rui-neutral-500/10 dark:bg-rui-neutral-400/10' } },\n { color: 'primary', variant: 'tonal', class: { root: 'bg-rui-primary/15 text-rui-primary-darker dark:bg-rui-primary/35 dark:text-rui-primary-lighter' } },\n { color: 'secondary', variant: 'tonal', class: { root: 'bg-rui-secondary/20 text-rui-secondary-darker dark:bg-rui-secondary/35 dark:text-rui-secondary-lighter' } },\n { color: 'error', variant: 'tonal', class: { root: 'bg-rui-error/10 text-rui-error-darker dark:bg-rui-error/20 dark:text-rui-error-lighter' } },\n { color: 'warning', variant: 'tonal', class: { root: 'bg-rui-warning/10 text-rui-warning-darker dark:bg-rui-warning/20 dark:text-rui-warning-lighter' } },\n { color: 'info', variant: 'tonal', class: { root: 'bg-rui-info/10 text-rui-info-darker dark:bg-rui-info/20 dark:text-rui-info-lighter' } },\n { color: 'success', variant: 'tonal', class: { root: 'bg-rui-success/10 text-rui-success-darker dark:bg-rui-success/20 dark:text-rui-success-lighter' } },\n\n // sm: a 16px circle in a 24px chip, 4px in from the start as from the top\n { size: 'sm', prepended: true, class: { root: 'pl-1' } },\n // in a tile chip the prefix follows the corners: the chip's 6px radius less the 2px inset\n { tile: true, class: { prepend: 'rounded-sm' } },\n // the close button's round hover area mirrors the prefix: as far from the end edge as from the top\n { closeable: true, class: { root: 'pr-1', label: 'pr-1' } },\n { closeable: true, size: 'sm', class: { root: 'pr-1', label: 'pr-0.5' } },\n\n // Disabled: a flat neutral chip in any color, like a disabled button\n { disabled: true, variant: ['filled', 'tonal'], class: { root: '!bg-rui-neutral-100 dark:!bg-rui-neutral-800' } },\n { disabled: true, variant: 'outlined', class: { root: '!border-rui-divider' } },\n ],\n compoundSlots: [\n // Every filled color takes light text, in both themes\n { slots: ['root'], color: ['primary', 'secondary', 'error', 'warning', 'info', 'success'], variant: 'filled', class: 'text-rui-dark-text' },\n ],\n defaultVariants: {\n tile: false,\n size: 'md',\n disabled: false,\n clickable: false,\n variant: 'filled',\n color: 'grey',\n },\n});\n\nconst ui = computed<ReturnType<typeof chipStyles>>(() => chipStyles({\n tile,\n size,\n color,\n variant,\n disabled,\n clickable,\n prepended: !!slots.prepend,\n closeable,\n}));\n\nconst style = computed<Partial<StyleValue>>(() => {\n const s: Partial<StyleValue> = {};\n if (bgColor)\n s.backgroundColor = bgColor;\n if (textColor)\n s.color = textColor;\n return s;\n});\n\nfunction click(e: MouseEvent): void {\n if (!clickable || disabled)\n return;\n\n emit('click', e);\n}\n\n/**\n * Enter and Space activate a clickable chip as they would a button, through a\n * real click so the handler still gets a `MouseEvent`.\n *\n * @param e - the key press on the chip\n */\nfunction onKeydown(e: KeyboardEvent): void {\n if (!clickable || disabled || e.target !== get(root))\n return;\n if (e.key !== 'Enter' && e.key !== ' ')\n return;\n\n e.preventDefault();\n get(root)?.click();\n}\n</script>\n\n<template>\n <div\n ref=\"root\"\n :class=\"ui.root({ class: cn(classNames?.root) })\"\n :style=\"style\"\n :data-variant=\"variant\"\n :data-color=\"color\"\n :data-disabled=\"disabled || undefined\"\n :role=\"clickable ? 'button' : undefined\"\n :tabindex=\"clickable && !disabled ? 0 : undefined\"\n :aria-disabled=\"clickable && disabled ? true : undefined\"\n v-bind=\"objectOmit($attrs, ['onClick'])\"\n @click=\"click($event)\"\n @keydown=\"onKeydown($event)\"\n >\n <div\n v-if=\"$slots.prepend\"\n :class=\"ui.prepend()\"\n >\n <slot name=\"prepend\" />\n </div>\n <span :class=\"ui.label({ class: cn(classNames?.content) })\">\n <slot />\n </span>\n <button\n v-if=\"closeable\"\n :class=\"ui.close()\"\n :disabled=\"disabled\"\n type=\"button\"\n aria-label=\"Remove\"\n :tabindex=\"closeUnfocusable ? -1 : undefined\"\n @click.stop=\"emit('click:close')\"\n >\n <RuiIcon\n :class=\"ui.closeIcon()\"\n :size=\"CHIP_CLOSE_ICON_SIZES[size]\"\n :name=\"closeIcon\"\n />\n </button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDA,MAAM,OAAO;EAKb,MAAM,QAAQ,SAAA;EAKd,MAAM,OAAO,eAA+B,MAAM;EAElD,MAAM,aAAa,GAAG;GACpB,OAAO;IAEL,MAAM;IAEN,SAAS;IACT,OAA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,CAAC,UAAS,CAAA;KACnB,MAAM,MAAA,qBAAA,CAAqB,CAAC,QAAA;KAC5B,MAAM,QAAA"}
@@ -6,6 +6,8 @@ export type ChipSize = (typeof ChipSize)[keyof typeof ChipSize];
6
6
  export declare const ChipVariant: {
7
7
  readonly filled: "filled";
8
8
  readonly outlined: "outlined";
9
+ /** A soft tint of the color with deeper text, for status tags in dense views */
10
+ readonly tonal: "tonal";
9
11
  };
10
12
  export type ChipVariant = (typeof ChipVariant)[keyof typeof ChipVariant];
11
13
  export declare const CHIP_CLOSE_ICON_SIZES: Record<ChipSize, number>;
@@ -5,11 +5,13 @@ var ChipSize = {
5
5
  };
6
6
  var ChipVariant = {
7
7
  filled: "filled",
8
- outlined: "outlined"
8
+ outlined: "outlined",
9
+ /** A soft tint of the color with deeper text, for status tags in dense views */
10
+ tonal: "tonal"
9
11
  };
10
12
  var CHIP_CLOSE_ICON_SIZES = {
11
- sm: 16,
12
- md: 24
13
+ sm: 12,
14
+ md: 14
13
15
  };
14
16
  //#endregion
15
17
  export { CHIP_CLOSE_ICON_SIZES, ChipSize, ChipVariant };
@@ -1 +1 @@
1
- {"version":3,"file":"chip-props.js","names":[],"sources":["../../../src/components/chips/chip-props.ts"],"sourcesContent":["export const ChipSize = {\n sm: 'sm',\n md: 'md',\n} as const;\n\nexport type ChipSize = (typeof ChipSize)[keyof typeof ChipSize];\n\nexport const ChipVariant = {\n filled: 'filled',\n outlined: 'outlined',\n} as const;\n\nexport type ChipVariant = (typeof ChipVariant)[keyof typeof ChipVariant];\n\nexport const CHIP_CLOSE_ICON_SIZES: Record<ChipSize, number> = {\n sm: 16,\n md: 24,\n};\n"],"mappings":";AAAA,IAAa,WAAW;CACtB,IAAI;CACJ,IAAI;AACN;AAIA,IAAa,cAAc;CACzB,QAAQ;CACR,UAAU;AACZ;AAIA,IAAa,wBAAkD;CAC7D,IAAI;CACJ,IAAI;AACN"}
1
+ {"version":3,"file":"chip-props.js","names":[],"sources":["../../../src/components/chips/chip-props.ts"],"sourcesContent":["export const ChipSize = {\n sm: 'sm',\n md: 'md',\n} as const;\n\nexport type ChipSize = (typeof ChipSize)[keyof typeof ChipSize];\n\nexport const ChipVariant = {\n filled: 'filled',\n outlined: 'outlined',\n /** A soft tint of the color with deeper text, for status tags in dense views */\n tonal: 'tonal',\n} as const;\n\nexport type ChipVariant = (typeof ChipVariant)[keyof typeof ChipVariant];\n\nexport const CHIP_CLOSE_ICON_SIZES: Record<ChipSize, number> = {\n sm: 12,\n md: 14,\n};\n"],"mappings":";AAAA,IAAa,WAAW;CACtB,IAAI;CACJ,IAAI;AACN;AAIA,IAAa,cAAc;CACzB,QAAQ;CACR,UAAU;;CAEV,OAAO;AACT;AAIA,IAAa,wBAAkD;CAC7D,IAAI;CACJ,IAAI;AACN"}
@@ -1 +1 @@
1
- {"version":3,"file":"RuiColorBoard.js","names":[],"sources":["../../../src/components/color-picker/RuiColorBoard.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { clamp } from '@vueuse/shared';\nimport tinycolor from 'tinycolor2';\nimport { cn, tv } from '@/utils/tv';\nimport { type Color, useElementDrag } from './utils';\n\ndefineOptions({\n name: 'RuiColorBoard',\n inheritAttrs: false,\n});\n\nconst { color } = defineProps<{\n color: Color;\n}>();\n\nconst emit = defineEmits<{\n 'update:board': [event: { saturation: number; brightness: number }];\n}>();\n\nconst wrapper = useTemplateRef<HTMLElement>('wrapper');\n\nconst state = reactive({\n hexString: hueToHex(color.hue),\n saturation: color.saturation,\n brightness: color.brightness,\n});\n\nconst cursorTop = ref<number>(0);\nconst cursorLeft = ref<number>(0);\n\nconst { handleClick, onMouseDown, onTouchStart } = useElementDrag(emitColor);\n\nconst cursorStyle = computed<{ top: string; left: string }>(() => ({\n top: `${get(cursorTop) * 100}%`,\n left: `${get(cursorLeft) * 100}%`,\n}));\n\nfunction hueToHex(hue: number): string {\n return tinycolor({ h: hue, s: 1, v: 1 }).toHexString();\n}\n\nfunction updatePosition(): void {\n set(cursorLeft, state.saturation);\n set(cursorTop, 1 - state.brightness);\n}\n\nfunction emitColor(x: number, y: number): void {\n const el = get(wrapper);\n if (!el)\n return;\n\n const rect = el.getBoundingClientRect();\n const { width, height, left, top } = rect;\n let calculatedX = x - left;\n let calculatedY = y - top;\n\n calculatedX = clamp(calculatedX, 0, width);\n calculatedY = clamp(calculatedY, 0, height);\n\n const saturation = calculatedX / width;\n const brightness = clamp(-(calculatedY / height) + 1, 0, 1);\n\n set(cursorLeft, calculatedX / width);\n set(cursorTop, calculatedY / height);\n\n state.saturation = saturation;\n state.brightness = brightness;\n\n emit('update:board', { saturation, brightness });\n}\n\nwatch(\n () => [color.hue, color.saturation, color.brightness] as const,\n ([hue, saturation, brightness]) => {\n state.hexString = hueToHex(hue);\n state.saturation = saturation;\n state.brightness = brightness;\n updatePosition();\n },\n);\n\nonMounted(() => {\n updatePosition();\n});\n\nconst rootStyle = tv({ base: 'relative w-full h-40 overflow-hidden cursor-pointer' });\n</script>\n\n<template>\n <div\n ref=\"wrapper\"\n role=\"slider\"\n aria-label=\"Color saturation and brightness\"\n :aria-valuetext=\"`Saturation ${Math.round(state.saturation * 100)}%, Brightness ${Math.round(state.brightness * 100)}%`\"\n data-id=\"color-board\"\n :class=\"rootStyle({ class: cn($attrs.class) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n :style=\"{ backgroundColor: state.hexString }\"\n @click=\"handleClick($event)\"\n @mousedown=\"onMouseDown($event)\"\n @touchstart=\"onTouchStart($event)\"\n >\n <div class=\"absolute inset-0 to-transparent bg-gradient-to-r from-white\" />\n <div class=\"absolute inset-0 to-transparent bg-gradient-to-t from-black\" />\n <div\n data-id=\"cursor\"\n class=\"absolute w-5 h-5 -translate-x-1/2 -translate-y-1/2 border-2 border-white shadow rounded-full after:content-[''] after:absolute after:inset-0 after:rounded-full after:border-2 after:border-black/15\"\n :style=\"cursorStyle\"\n />\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"RuiColorBoard.js","names":[],"sources":["../../../src/components/color-picker/RuiColorBoard.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { clamp } from '@vueuse/shared';\nimport tinycolor from 'tinycolor2';\nimport { cn, tv } from '@/utils/tv';\nimport { type Color, useElementDrag } from './utils';\n\ndefineOptions({\n name: 'RuiColorBoard',\n inheritAttrs: false,\n});\n\nconst { color } = defineProps<{\n color: Color;\n}>();\n\nconst emit = defineEmits<{\n 'update:board': [event: { saturation: number; brightness: number }];\n}>();\n\nconst wrapper = useTemplateRef<HTMLElement>('wrapper');\n\nconst state = reactive({\n hexString: hueToHex(color.hue),\n saturation: color.saturation,\n brightness: color.brightness,\n});\n\nconst cursorTop = ref<number>(0);\nconst cursorLeft = ref<number>(0);\n\nconst { handleClick, onMouseDown, onTouchStart } = useElementDrag(emitColor);\n\nconst cursorStyle = computed<{ top: string; left: string }>(() => ({\n top: `${get(cursorTop) * 100}%`,\n left: `${get(cursorLeft) * 100}%`,\n}));\n\nfunction hueToHex(hue: number): string {\n return tinycolor({ h: hue, s: 1, v: 1 }).toHexString();\n}\n\nfunction updatePosition(): void {\n set(cursorLeft, state.saturation);\n set(cursorTop, 1 - state.brightness);\n}\n\nfunction emitColor(x: number, y: number): void {\n const el = get(wrapper);\n if (!el)\n return;\n\n const rect = el.getBoundingClientRect();\n const { width, height, left, top } = rect;\n let calculatedX = x - left;\n let calculatedY = y - top;\n\n calculatedX = clamp(calculatedX, 0, width);\n calculatedY = clamp(calculatedY, 0, height);\n\n const saturation = calculatedX / width;\n const brightness = clamp(-(calculatedY / height) + 1, 0, 1);\n\n set(cursorLeft, calculatedX / width);\n set(cursorTop, calculatedY / height);\n\n state.saturation = saturation;\n state.brightness = brightness;\n\n emit('update:board', { saturation, brightness });\n}\n\nwatch(\n () => [color.hue, color.saturation, color.brightness] as const,\n ([hue, saturation, brightness]) => {\n state.hexString = hueToHex(hue);\n state.saturation = saturation;\n state.brightness = brightness;\n updatePosition();\n },\n);\n\nonMounted(() => {\n updatePosition();\n});\n\nconst rootStyle = tv({ base: 'relative w-full h-40 overflow-hidden cursor-pointer rounded-rui-control' });\n</script>\n\n<template>\n <div\n ref=\"wrapper\"\n role=\"slider\"\n aria-label=\"Color saturation and brightness\"\n :aria-valuetext=\"`Saturation ${Math.round(state.saturation * 100)}%, Brightness ${Math.round(state.brightness * 100)}%`\"\n data-id=\"color-board\"\n :class=\"rootStyle({ class: cn($attrs.class) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n :style=\"{ backgroundColor: state.hexString }\"\n @click=\"handleClick($event)\"\n @mousedown=\"onMouseDown($event)\"\n @touchstart=\"onTouchStart($event)\"\n >\n <div class=\"absolute inset-0 to-transparent bg-linear-to-r from-white\" />\n <div class=\"absolute inset-0 to-transparent bg-linear-to-t from-black\" />\n <div\n data-id=\"cursor\"\n class=\"absolute w-5 h-5 -translate-x-1/2 -translate-y-1/2 border-2 border-white shadow-rui-control rounded-full after:content-[''] after:absolute after:inset-0 after:rounded-full after:border-2 after:border-black/15\"\n :style=\"cursorStyle\"\n />\n </div>\n</template>\n"],"mappings":""}
@@ -1,7 +1,7 @@
1
+ import { clamp, get, set } from "../../vendor/@vueuse/shared/dist/index.js";
1
2
  import { cn, tv } from "../../utils/tv.js";
2
3
  import { useElementDrag } from "./utils.js";
3
4
  import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeStyle, onMounted, openBlock, reactive, ref, unref, useTemplateRef, watch } from "vue";
4
- import { clamp, get, set } from "@vueuse/shared";
5
5
  import tinycolor from "tinycolor2";
6
6
  //#region src/components/color-picker/RuiColorBoard.vue?vue&type=script&setup=true&lang.ts
7
7
  var _hoisted_1 = ["aria-valuetext"];
@@ -69,7 +69,7 @@ var RuiColorBoard_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
69
69
  onMounted(() => {
70
70
  updatePosition();
71
71
  });
72
- const rootStyle = tv({ base: "relative w-full h-40 overflow-hidden cursor-pointer" });
72
+ const rootStyle = tv({ base: "relative w-full h-40 overflow-hidden cursor-pointer rounded-rui-control" });
73
73
  return (_ctx, _cache) => {
74
74
  return openBlock(), createElementBlock("div", mergeProps({
75
75
  ref_key: "wrapper",
@@ -88,11 +88,11 @@ var RuiColorBoard_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
88
88
  onMousedown: _cache[1] || (_cache[1] = ($event) => unref(onMouseDown)($event)),
89
89
  onTouchstart: _cache[2] || (_cache[2] = ($event) => unref(onTouchStart)($event))
90
90
  }), [
91
- _cache[3] || (_cache[3] = createElementVNode("div", { class: "absolute inset-0 to-transparent bg-gradient-to-r from-white" }, null, -1)),
92
- _cache[4] || (_cache[4] = createElementVNode("div", { class: "absolute inset-0 to-transparent bg-gradient-to-t from-black" }, null, -1)),
91
+ _cache[3] || (_cache[3] = createElementVNode("div", { class: "absolute inset-0 to-transparent bg-linear-to-r from-white" }, null, -1)),
92
+ _cache[4] || (_cache[4] = createElementVNode("div", { class: "absolute inset-0 to-transparent bg-linear-to-t from-black" }, null, -1)),
93
93
  createElementVNode("div", {
94
94
  "data-id": "cursor",
95
- class: "absolute w-5 h-5 -translate-x-1/2 -translate-y-1/2 border-2 border-white shadow rounded-full after:content-[''] after:absolute after:inset-0 after:rounded-full after:border-2 after:border-black/15",
95
+ class: "absolute w-5 h-5 -translate-x-1/2 -translate-y-1/2 border-2 border-white shadow-rui-control rounded-full after:content-[''] after:absolute after:inset-0 after:rounded-full after:border-2 after:border-black/15",
96
96
  style: normalizeStyle(unref(cursorStyle))
97
97
  }, null, 4)
98
98
  ], 16, _hoisted_1);
@@ -1 +1 @@
1
- {"version":3,"file":"RuiColorBoard.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/color-picker/RuiColorBoard.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { clamp } from '@vueuse/shared';\nimport tinycolor from 'tinycolor2';\nimport { cn, tv } from '@/utils/tv';\nimport { type Color, useElementDrag } from './utils';\n\ndefineOptions({\n name: 'RuiColorBoard',\n inheritAttrs: false,\n});\n\nconst { color } = defineProps<{\n color: Color;\n}>();\n\nconst emit = defineEmits<{\n 'update:board': [event: { saturation: number; brightness: number }];\n}>();\n\nconst wrapper = useTemplateRef<HTMLElement>('wrapper');\n\nconst state = reactive({\n hexString: hueToHex(color.hue),\n saturation: color.saturation,\n brightness: color.brightness,\n});\n\nconst cursorTop = ref<number>(0);\nconst cursorLeft = ref<number>(0);\n\nconst { handleClick, onMouseDown, onTouchStart } = useElementDrag(emitColor);\n\nconst cursorStyle = computed<{ top: string; left: string }>(() => ({\n top: `${get(cursorTop) * 100}%`,\n left: `${get(cursorLeft) * 100}%`,\n}));\n\nfunction hueToHex(hue: number): string {\n return tinycolor({ h: hue, s: 1, v: 1 }).toHexString();\n}\n\nfunction updatePosition(): void {\n set(cursorLeft, state.saturation);\n set(cursorTop, 1 - state.brightness);\n}\n\nfunction emitColor(x: number, y: number): void {\n const el = get(wrapper);\n if (!el)\n return;\n\n const rect = el.getBoundingClientRect();\n const { width, height, left, top } = rect;\n let calculatedX = x - left;\n let calculatedY = y - top;\n\n calculatedX = clamp(calculatedX, 0, width);\n calculatedY = clamp(calculatedY, 0, height);\n\n const saturation = calculatedX / width;\n const brightness = clamp(-(calculatedY / height) + 1, 0, 1);\n\n set(cursorLeft, calculatedX / width);\n set(cursorTop, calculatedY / height);\n\n state.saturation = saturation;\n state.brightness = brightness;\n\n emit('update:board', { saturation, brightness });\n}\n\nwatch(\n () => [color.hue, color.saturation, color.brightness] as const,\n ([hue, saturation, brightness]) => {\n state.hexString = hueToHex(hue);\n state.saturation = saturation;\n state.brightness = brightness;\n updatePosition();\n },\n);\n\nonMounted(() => {\n updatePosition();\n});\n\nconst rootStyle = tv({ base: 'relative w-full h-40 overflow-hidden cursor-pointer' });\n</script>\n\n<template>\n <div\n ref=\"wrapper\"\n role=\"slider\"\n aria-label=\"Color saturation and brightness\"\n :aria-valuetext=\"`Saturation ${Math.round(state.saturation * 100)}%, Brightness ${Math.round(state.brightness * 100)}%`\"\n data-id=\"color-board\"\n :class=\"rootStyle({ class: cn($attrs.class) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n :style=\"{ backgroundColor: state.hexString }\"\n @click=\"handleClick($event)\"\n @mousedown=\"onMouseDown($event)\"\n @touchstart=\"onTouchStart($event)\"\n >\n <div class=\"absolute inset-0 to-transparent bg-gradient-to-r from-white\" />\n <div class=\"absolute inset-0 to-transparent bg-gradient-to-t from-black\" />\n <div\n data-id=\"cursor\"\n class=\"absolute w-5 h-5 -translate-x-1/2 -translate-y-1/2 border-2 border-white shadow rounded-full after:content-[''] after:absolute after:inset-0 after:rounded-full after:border-2 after:border-black/15\"\n :style=\"cursorStyle\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAeA,MAAM,OAAO;EAIb,MAAM,UAAU,eAA4B,SAAS;EAErD,MAAM,QAAQ,SAAS;GACrB,WAAW,SAAS,QAAA,MAAM,GAAG;GAC7B,YAAY,QAAA,MAAM;GAClB,YAAY,QAAA,MAAM;EACpB,CAAC;EAED,MAAM,YAAY,IAAY,CAAC;EAC/B,MAAM,aAAa,IAAY,CAAC;EAEhC,MAAM,EAAE,aAAa,aAAa,iBAAiB,eAAe,SAAS;EAE3E,MAAM,cAAc,gBAA+C;GACjE,KAAK,GAAG,IAAI,SAAS,IAAI,IAAI;GAC7B,MAAM,GAAG,IAAI,UAAU,IAAI,IAAI;EACjC,EAAE;EAEF,SAAS,SAAS,KAAqB;GACrC,OAAO,UAAU;IAAE,GAAG;IAAK,GAAG;IAAG,GAAG;GAAE,CAAC,CAAC,CAAC,YAAY;EACvD;EAEA,SAAS,iBAAuB;GAC9B,IAAI,YAAY,MAAM,UAAU;GAChC,IAAI,WAAW,IAAI,MAAM,UAAU;EACrC;EAEA,SAAS,UAAU,GAAW,GAAiB;GAC7C,MAAM,KAAK,IAAI,OAAO;GACtB,IAAI,CAAC,IACH;GAGF,MAAM,EAAE,OAAO,QAAQ,MAAM,QADhB,GAAG,sBACqB;GACrC,IAAI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W,CAAC,MAAM;IAC7B,cAAU,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,YAAA,CAAY,CAAC,MAAM;;IAEhC,OAAA,OAAA,OAAA,KAAA,mBAA2E,OAAA,EAAtE,OAAM,8DAA6D,GAAA,MAAA,EAAA;IACxE,OAAA,OAAA,OAAA,KAAA,mBAA2E,OAAA,EAAtE,OAAM,8DAA6D,GAAA,MAAA,EAAA;IACxE,mBAIE,OAAA;KAHA,WAAQ;KACR,OAAM;KACL,OAAK,eAAE,MAAA,WAAA,CAAW"}
1
+ {"version":3,"file":"RuiColorBoard.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/color-picker/RuiColorBoard.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { clamp } from '@vueuse/shared';\nimport tinycolor from 'tinycolor2';\nimport { cn, tv } from '@/utils/tv';\nimport { type Color, useElementDrag } from './utils';\n\ndefineOptions({\n name: 'RuiColorBoard',\n inheritAttrs: false,\n});\n\nconst { color } = defineProps<{\n color: Color;\n}>();\n\nconst emit = defineEmits<{\n 'update:board': [event: { saturation: number; brightness: number }];\n}>();\n\nconst wrapper = useTemplateRef<HTMLElement>('wrapper');\n\nconst state = reactive({\n hexString: hueToHex(color.hue),\n saturation: color.saturation,\n brightness: color.brightness,\n});\n\nconst cursorTop = ref<number>(0);\nconst cursorLeft = ref<number>(0);\n\nconst { handleClick, onMouseDown, onTouchStart } = useElementDrag(emitColor);\n\nconst cursorStyle = computed<{ top: string; left: string }>(() => ({\n top: `${get(cursorTop) * 100}%`,\n left: `${get(cursorLeft) * 100}%`,\n}));\n\nfunction hueToHex(hue: number): string {\n return tinycolor({ h: hue, s: 1, v: 1 }).toHexString();\n}\n\nfunction updatePosition(): void {\n set(cursorLeft, state.saturation);\n set(cursorTop, 1 - state.brightness);\n}\n\nfunction emitColor(x: number, y: number): void {\n const el = get(wrapper);\n if (!el)\n return;\n\n const rect = el.getBoundingClientRect();\n const { width, height, left, top } = rect;\n let calculatedX = x - left;\n let calculatedY = y - top;\n\n calculatedX = clamp(calculatedX, 0, width);\n calculatedY = clamp(calculatedY, 0, height);\n\n const saturation = calculatedX / width;\n const brightness = clamp(-(calculatedY / height) + 1, 0, 1);\n\n set(cursorLeft, calculatedX / width);\n set(cursorTop, calculatedY / height);\n\n state.saturation = saturation;\n state.brightness = brightness;\n\n emit('update:board', { saturation, brightness });\n}\n\nwatch(\n () => [color.hue, color.saturation, color.brightness] as const,\n ([hue, saturation, brightness]) => {\n state.hexString = hueToHex(hue);\n state.saturation = saturation;\n state.brightness = brightness;\n updatePosition();\n },\n);\n\nonMounted(() => {\n updatePosition();\n});\n\nconst rootStyle = tv({ base: 'relative w-full h-40 overflow-hidden cursor-pointer rounded-rui-control' });\n</script>\n\n<template>\n <div\n ref=\"wrapper\"\n role=\"slider\"\n aria-label=\"Color saturation and brightness\"\n :aria-valuetext=\"`Saturation ${Math.round(state.saturation * 100)}%, Brightness ${Math.round(state.brightness * 100)}%`\"\n data-id=\"color-board\"\n :class=\"rootStyle({ class: cn($attrs.class) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n :style=\"{ backgroundColor: state.hexString }\"\n @click=\"handleClick($event)\"\n @mousedown=\"onMouseDown($event)\"\n @touchstart=\"onTouchStart($event)\"\n >\n <div class=\"absolute inset-0 to-transparent bg-linear-to-r from-white\" />\n <div class=\"absolute inset-0 to-transparent bg-linear-to-t from-black\" />\n <div\n data-id=\"cursor\"\n class=\"absolute w-5 h-5 -translate-x-1/2 -translate-y-1/2 border-2 border-white shadow-rui-control rounded-full after:content-[''] after:absolute after:inset-0 after:rounded-full after:border-2 after:border-black/15\"\n :style=\"cursorStyle\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAeA,MAAM,OAAO;EAIb,MAAM,UAAU,eAA4B,SAAS;EAErD,MAAM,QAAQ,SAAS;GACrB,WAAW,SAAS,QAAA,MAAM,GAAG;GAC7B,YAAY,QAAA,MAAM;GAClB,YAAY,QA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M,0EAA0E,CAAC;;GAItG,OAAA,UAAA,GAAA,mBAoBM,OApBN,WAoBM;IAnBA,SAAA;IAAJ,KAAI;IACJ,MAAK;IACL,cAAW;IACV,kBAAc,cAAgB,KAAK,MAAM,MAAA,KAAA,CAAK,CAAC,aAAU,GAAA,EAAA,gBAAwB,KAAK,MAAM,MAAA,KAAA,CAAK,CAAC,aAAU,GAAA,EAAA;IAC7G,WAAQ;IACP,OAAO,MAAA,SAAA,CAAS,CAAA,EAAA,OAAU,MAAA,EAAA,CAAE,CAACA,KAAAA,OAAO,KAAK,EAAA,CAAA;GAC7BA,GAAAA;IAAAA,GAAAA,KAAAA;IAAM,OAAS,KAAA;GAAS,GAAA;IACpC,OAAK,EAAA,iBAAqB,MAAA,KAAA,CAAK,CAAC,UAAS;IACzC,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,WAAA,CAAW,CAAC,MAAM;IACzB,aAAS,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,WAAA,CAAW,CAAC,MAAM;IAC7B,cAAU,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,YAAA,CAAY,CAAC,MAAM;;IAEhC,OAAA,OAAA,OAAA,KAAA,mBAAyE,OAAA,EAApE,OAAM,4DAA2D,GAAA,MAAA,EAAA;IACtE,OAAA,OAAA,OAAA,KAAA,mBAAyE,OAAA,EAApE,OAAM,4DAA2D,GAAA,MAAA,EAAA;IACtE,mBAIE,OAAA;KAHA,WAAQ;KACR,OAAM;KACL,OAAK,eAAE,MAAA,WAAA,CAAW"}
@@ -1,6 +1,6 @@
1
+ import { useClipboard } from "../../vendor/@vueuse/core/dist/index.js";
1
2
  import RuiTooltip_default from "../overlays/tooltip/RuiTooltip.js";
2
3
  import { createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, unref, withCtx } from "vue";
3
- import { useClipboard } from "@vueuse/core";
4
4
  //#region src/components/color-picker/RuiColorDisplay.vue?vue&type=script&setup=true&lang.ts
5
5
  var _hoisted_1 = {
6
6
  key: 0,
@@ -1 +1 @@
1
- {"version":3,"file":"RuiColorHue.js","names":[],"sources":["../../../src/components/color-picker/RuiColorHue.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { clamp } from '@vueuse/shared';\nimport { cn, tv } from '@/utils/tv';\nimport { roundTwoDecimal, useElementDrag } from './utils';\n\ninterface Limit {\n lowerLimit: number;\n upperLimit: number;\n availableWidth: number;\n}\n\ndefineOptions({\n name: 'RuiColorHue',\n inheritAttrs: false,\n});\n\nconst modelValue = defineModel<number>({ required: true });\n\nconst barElement = useTemplateRef<HTMLElement>('barElement');\n\nconst MAX_HUE = 360;\nconst CURSOR_WIDTH = 16;\nconst cursorLeft = ref<string>('');\n\nconst { handleClick, onMouseDown, onTouchStart } = useElementDrag(emitHue);\n\nconst cursorStyle = computed<{ left: string }>(() => ({\n left: get(cursorLeft),\n}));\n\nfunction getLimit(width: number): Limit {\n const lowerLimit = CURSOR_WIDTH / 2;\n const upperLimit = width - lowerLimit;\n const availableWidth = upperLimit - lowerLimit;\n\n return { lowerLimit, upperLimit, availableWidth };\n}\n\nfunction updatePosition(): void {\n set(cursorLeft, getCursorLeft());\n}\n\nfunction getCursorLeft(): string {\n const el = get(barElement);\n if (!el)\n return '0';\n\n const rect = el.getBoundingClientRect();\n const actualWidth = rect.width;\n const { lowerLimit, availableWidth } = getLimit(actualWidth);\n\n const hueVal = get(modelValue);\n const usedHue = hueVal === MAX_HUE ? MAX_HUE : hueVal % MAX_HUE;\n\n const percentage = roundTwoDecimal((usedHue / MAX_HUE) * (availableWidth / actualWidth) * 100);\n return `calc(${percentage}% + ${lowerLimit}px)`;\n}\n\nfunction emitHue(x: number): void {\n const el = get(barElement);\n if (!el)\n return;\n\n const rect = el.getBoundingClientRect();\n let calculatedX = x - rect.left;\n\n const { lowerLimit, upperLimit, availableWidth } = getLimit(rect.width);\n calculatedX = clamp(calculatedX, lowerLimit, upperLimit);\n\n set(modelValue, Math.round(((calculatedX - lowerLimit) / availableWidth) * MAX_HUE));\n}\n\nwatch(modelValue, () => {\n updatePosition();\n});\n\nonMounted(() => {\n updatePosition();\n});\n\nconst rootStyle = tv({ base: 'relative w-full h-3.5 rounded-full cursor-pointer bg-hue-spectrum' });\n</script>\n\n<template>\n <div\n ref=\"barElement\"\n role=\"slider\"\n aria-label=\"Hue\"\n :aria-valuenow=\"modelValue\"\n aria-valuemin=\"0\"\n aria-valuemax=\"360\"\n data-id=\"color-hue\"\n :class=\"rootStyle({ class: cn($attrs.class) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n @click=\"handleClick($event)\"\n @mousedown=\"onMouseDown($event)\"\n @touchstart=\"onTouchStart($event)\"\n >\n <div\n data-id=\"cursor\"\n class=\"absolute w-4 h-4 transform top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-2 bg-white rounded-full\"\n :style=\"cursorStyle\"\n />\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"RuiColorHue.js","names":[],"sources":["../../../src/components/color-picker/RuiColorHue.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { clamp } from '@vueuse/shared';\nimport { cn, tv } from '@/utils/tv';\nimport { roundTwoDecimal, useElementDrag } from './utils';\n\ninterface Limit {\n lowerLimit: number;\n upperLimit: number;\n availableWidth: number;\n}\n\ndefineOptions({\n name: 'RuiColorHue',\n inheritAttrs: false,\n});\n\nconst modelValue = defineModel<number>({ required: true });\n\nconst barElement = useTemplateRef<HTMLElement>('barElement');\n\nconst MAX_HUE = 360;\nconst CURSOR_WIDTH = 16;\nconst cursorLeft = ref<string>('');\n\nconst { handleClick, onMouseDown, onTouchStart } = useElementDrag(emitHue);\n\nconst cursorStyle = computed<{ left: string }>(() => ({\n left: get(cursorLeft),\n}));\n\nfunction getLimit(width: number): Limit {\n const lowerLimit = CURSOR_WIDTH / 2;\n const upperLimit = width - lowerLimit;\n const availableWidth = upperLimit - lowerLimit;\n\n return { lowerLimit, upperLimit, availableWidth };\n}\n\nfunction updatePosition(): void {\n set(cursorLeft, getCursorLeft());\n}\n\nfunction getCursorLeft(): string {\n const el = get(barElement);\n if (!el)\n return '0';\n\n const rect = el.getBoundingClientRect();\n const actualWidth = rect.width;\n const { lowerLimit, availableWidth } = getLimit(actualWidth);\n\n const hueVal = get(modelValue);\n const usedHue = hueVal === MAX_HUE ? MAX_HUE : hueVal % MAX_HUE;\n\n const percentage = roundTwoDecimal((usedHue / MAX_HUE) * (availableWidth / actualWidth) * 100);\n return `calc(${percentage}% + ${lowerLimit}px)`;\n}\n\nfunction emitHue(x: number): void {\n const el = get(barElement);\n if (!el)\n return;\n\n const rect = el.getBoundingClientRect();\n let calculatedX = x - rect.left;\n\n const { lowerLimit, upperLimit, availableWidth } = getLimit(rect.width);\n calculatedX = clamp(calculatedX, lowerLimit, upperLimit);\n\n set(modelValue, Math.round(((calculatedX - lowerLimit) / availableWidth) * MAX_HUE));\n}\n\nwatch(modelValue, () => {\n updatePosition();\n});\n\nonMounted(() => {\n updatePosition();\n});\n\nconst rootStyle = tv({ base: 'relative w-full h-3.5 rounded-full cursor-pointer bg-hue-spectrum' });\n</script>\n\n<template>\n <div\n ref=\"barElement\"\n role=\"slider\"\n aria-label=\"Hue\"\n :aria-valuenow=\"modelValue\"\n aria-valuemin=\"0\"\n aria-valuemax=\"360\"\n data-id=\"color-hue\"\n :class=\"rootStyle({ class: cn($attrs.class) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n @click=\"handleClick($event)\"\n @mousedown=\"onMouseDown($event)\"\n @touchstart=\"onTouchStart($event)\"\n >\n <div\n data-id=\"cursor\"\n class=\"absolute w-4 h-4 transform top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-rui-control bg-white rounded-full\"\n :style=\"cursorStyle\"\n />\n </div>\n</template>\n"],"mappings":""}
@@ -1,7 +1,7 @@
1
+ import { clamp, get, set } from "../../vendor/@vueuse/shared/dist/index.js";
1
2
  import { cn, tv } from "../../utils/tv.js";
2
3
  import { roundTwoDecimal, useElementDrag } from "./utils.js";
3
4
  import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeStyle, onMounted, openBlock, ref, unref, useModel, useTemplateRef, watch } from "vue";
4
- import { clamp, get, set } from "@vueuse/shared";
5
5
  //#region src/components/color-picker/RuiColorHue.vue?vue&type=script&setup=true&lang.ts
6
6
  var _hoisted_1 = ["aria-valuenow"];
7
7
  var MAX_HUE = 360;
@@ -78,7 +78,7 @@ var RuiColorHue_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
78
78
  onTouchstart: _cache[2] || (_cache[2] = ($event) => unref(onTouchStart)($event))
79
79
  }), [createElementVNode("div", {
80
80
  "data-id": "cursor",
81
- class: "absolute w-4 h-4 transform top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-2 bg-white rounded-full",
81
+ class: "absolute w-4 h-4 transform top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-rui-control bg-white rounded-full",
82
82
  style: normalizeStyle(unref(cursorStyle))
83
83
  }, null, 4)], 16, _hoisted_1);
84
84
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RuiColorHue.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/color-picker/RuiColorHue.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { clamp } from '@vueuse/shared';\nimport { cn, tv } from '@/utils/tv';\nimport { roundTwoDecimal, useElementDrag } from './utils';\n\ninterface Limit {\n lowerLimit: number;\n upperLimit: number;\n availableWidth: number;\n}\n\ndefineOptions({\n name: 'RuiColorHue',\n inheritAttrs: false,\n});\n\nconst modelValue = defineModel<number>({ required: true });\n\nconst barElement = useTemplateRef<HTMLElement>('barElement');\n\nconst MAX_HUE = 360;\nconst CURSOR_WIDTH = 16;\nconst cursorLeft = ref<string>('');\n\nconst { handleClick, onMouseDown, onTouchStart } = useElementDrag(emitHue);\n\nconst cursorStyle = computed<{ left: string }>(() => ({\n left: get(cursorLeft),\n}));\n\nfunction getLimit(width: number): Limit {\n const lowerLimit = CURSOR_WIDTH / 2;\n const upperLimit = width - lowerLimit;\n const availableWidth = upperLimit - lowerLimit;\n\n return { lowerLimit, upperLimit, availableWidth };\n}\n\nfunction updatePosition(): void {\n set(cursorLeft, getCursorLeft());\n}\n\nfunction getCursorLeft(): string {\n const el = get(barElement);\n if (!el)\n return '0';\n\n const rect = el.getBoundingClientRect();\n const actualWidth = rect.width;\n const { lowerLimit, availableWidth } = getLimit(actualWidth);\n\n const hueVal = get(modelValue);\n const usedHue = hueVal === MAX_HUE ? MAX_HUE : hueVal % MAX_HUE;\n\n const percentage = roundTwoDecimal((usedHue / MAX_HUE) * (availableWidth / actualWidth) * 100);\n return `calc(${percentage}% + ${lowerLimit}px)`;\n}\n\nfunction emitHue(x: number): void {\n const el = get(barElement);\n if (!el)\n return;\n\n const rect = el.getBoundingClientRect();\n let calculatedX = x - rect.left;\n\n const { lowerLimit, upperLimit, availableWidth } = getLimit(rect.width);\n calculatedX = clamp(calculatedX, lowerLimit, upperLimit);\n\n set(modelValue, Math.round(((calculatedX - lowerLimit) / availableWidth) * MAX_HUE));\n}\n\nwatch(modelValue, () => {\n updatePosition();\n});\n\nonMounted(() => {\n updatePosition();\n});\n\nconst rootStyle = tv({ base: 'relative w-full h-3.5 rounded-full cursor-pointer bg-hue-spectrum' });\n</script>\n\n<template>\n <div\n ref=\"barElement\"\n role=\"slider\"\n aria-label=\"Hue\"\n :aria-valuenow=\"modelValue\"\n aria-valuemin=\"0\"\n aria-valuemax=\"360\"\n data-id=\"color-hue\"\n :class=\"rootStyle({ class: cn($attrs.class) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n @click=\"handleClick($event)\"\n @mousedown=\"onMouseDown($event)\"\n @touchstart=\"onTouchStart($event)\"\n >\n <div\n data-id=\"cursor\"\n class=\"absolute w-4 h-4 transform top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-2 bg-white rounded-full\"\n :style=\"cursorStyle\"\n />\n </div>\n</template>\n"],"mappings":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G,OAAA,UAAA,GAAA,mBAmBM,OAnBN,WAmBM;IAlBA,SAAA;IAAJ,KAAI;IACJ,MAAK;IACL,cAAW;IACV,iBAAe,WAAA;IAChB,iBAAc;IACd,iBAAc;IACd,WAAQ;IACP,OAAO,MAAA,SAAA,CAAS,CAAA,EAAA,OAAU,MAAA,EAAA,CAAE,CAACA,KAAAA,OAAO,KAAK,EAAA,CAAA;GAC7BA,GAAAA;IAAAA,GAAAA,KAAAA;IAAM,OAAS,KAAA;GAAS,GAAA;IACpC,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,WAAA,CAAW,CAAC,MAAM;IACzB,aAAS,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,WAAA,CAAW,CAAC,MAAM;IAC7B,cAAU,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,YAAA,CAAY,CAAC,MAAM;GAEhC,CAAA,GAAA,CAAA,mBAIE,OAAA;IAHA,WAAQ;IACR,OAAM;IACL,OAAK,eAAE,MAAA,WAAA,CAAW"}
1
+ {"version":3,"file":"RuiColorHue.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/color-picker/RuiColorHue.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { clamp } from '@vueuse/shared';\nimport { cn, tv } from '@/utils/tv';\nimport { roundTwoDecimal, useElementDrag } from './utils';\n\ninterface Limit {\n lowerLimit: number;\n upperLimit: number;\n availableWidth: number;\n}\n\ndefineOptions({\n name: 'RuiColorHue',\n inheritAttrs: false,\n});\n\nconst modelValue = defineModel<number>({ required: true });\n\nconst barElement = useTemplateRef<HTMLElement>('barElement');\n\nconst MAX_HUE = 360;\nconst CURSOR_WIDTH = 16;\nconst cursorLeft = ref<string>('');\n\nconst { handleClick, onMouseDown, onTouchStart } = useElementDrag(emitHue);\n\nconst cursorStyle = computed<{ left: string }>(() => ({\n left: get(cursorLeft),\n}));\n\nfunction getLimit(width: number): Limit {\n const lowerLimit = CURSOR_WIDTH / 2;\n const upperLimit = width - lowerLimit;\n const availableWidth = upperLimit - lowerLimit;\n\n return { lowerLimit, upperLimit, availableWidth };\n}\n\nfunction updatePosition(): void {\n set(cursorLeft, getCursorLeft());\n}\n\nfunction getCursorLeft(): string {\n const el = get(barElement);\n if (!el)\n return '0';\n\n const rect = el.getBoundingClientRect();\n const actualWidth = rect.width;\n const { lowerLimit, availableWidth } = getLimit(actualWidth);\n\n const hueVal = get(modelValue);\n const usedHue = hueVal === MAX_HUE ? MAX_HUE : hueVal % MAX_HUE;\n\n const percentage = roundTwoDecimal((usedHue / MAX_HUE) * (availableWidth / actualWidth) * 100);\n return `calc(${percentage}% + ${lowerLimit}px)`;\n}\n\nfunction emitHue(x: number): void {\n const el = get(barElement);\n if (!el)\n return;\n\n const rect = el.getBoundingClientRect();\n let calculatedX = x - rect.left;\n\n const { lowerLimit, upperLimit, availableWidth } = getLimit(rect.width);\n calculatedX = clamp(calculatedX, lowerLimit, upperLimit);\n\n set(modelValue, Math.round(((calculatedX - lowerLimit) / availableWidth) * MAX_HUE));\n}\n\nwatch(modelValue, () => {\n updatePosition();\n});\n\nonMounted(() => {\n updatePosition();\n});\n\nconst rootStyle = tv({ base: 'relative w-full h-3.5 rounded-full cursor-pointer bg-hue-spectrum' });\n</script>\n\n<template>\n <div\n ref=\"barElement\"\n role=\"slider\"\n aria-label=\"Hue\"\n :aria-valuenow=\"modelValue\"\n aria-valuemin=\"0\"\n aria-valuemax=\"360\"\n data-id=\"color-hue\"\n :class=\"rootStyle({ class: cn($attrs.class) })\"\n v-bind=\"{ ...$attrs, class: undefined }\"\n @click=\"handleClick($event)\"\n @mousedown=\"onMouseDown($event)\"\n @touchstart=\"onTouchStart($event)\"\n >\n <div\n data-id=\"cursor\"\n class=\"absolute w-4 h-4 transform top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-rui-control bg-white rounded-full\"\n :style=\"cursorStyle\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;AAoBA,IAAM,UAAU;AAChB,IAAM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