@central-design-system/components 4.0.0-alpha.4 → 4.0.0-alpha.5

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 (970) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/MIGRATION.md +14 -42
  3. package/dist/browser/entry.js +4917 -2238
  4. package/dist/browser/iconsets/cdsLegacy.js +1 -1
  5. package/dist/cds.d.ts +119065 -0
  6. package/dist/cjs/entry.js +9 -9
  7. package/dist/es/entry.css +0 -18
  8. package/dist/es/entry.js +3 -2
  9. package/dist/es/entry.js.map +1 -1
  10. package/dist/es/src/cds.js +1 -1
  11. package/dist/es/src/components/CdsApp/CdsApp.css +0 -18
  12. package/dist/es/src/components/CdsApp/api/CdsApp.props.js +1 -0
  13. package/dist/es/src/components/CdsApp/api/CdsApp.props.js.map +1 -1
  14. package/dist/es/src/components/CdsAutocomplete/CdsAutocomplete.css +0 -18
  15. package/dist/es/src/components/CdsAutocomplete/CdsAutocomplete.vue_vue_type_script_setup_true_lang.js +20 -5
  16. package/dist/es/src/components/CdsAutocomplete/CdsAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  17. package/dist/es/src/components/CdsAutocomplete/api/CdsAutocomplete.props.js +9 -2
  18. package/dist/es/src/components/CdsAutocomplete/api/CdsAutocomplete.props.js.map +1 -1
  19. package/dist/es/src/components/CdsAvatar/CdsAvatar.css +0 -18
  20. package/dist/es/src/components/CdsAvatar/api/CdsAvatar.props.js +20 -5
  21. package/dist/es/src/components/CdsAvatar/api/CdsAvatar.props.js.map +1 -1
  22. package/dist/es/src/components/CdsBadge/CdsBadge.css +0 -18
  23. package/dist/es/src/components/CdsBadge/api/CdsBadge.props.js +37 -9
  24. package/dist/es/src/components/CdsBadge/api/CdsBadge.props.js.map +1 -1
  25. package/dist/es/src/components/CdsBreadcrumbs/CdsBreadcrumbs.css +0 -18
  26. package/dist/es/src/components/CdsBreadcrumbs/api/CdsBreadcrumbs.props.js +32 -8
  27. package/dist/es/src/components/CdsBreadcrumbs/api/CdsBreadcrumbs.props.js.map +1 -1
  28. package/dist/es/src/components/CdsButton/CdsButton.css +0 -18
  29. package/dist/es/src/components/CdsButton/CdsButton.vue_vue_type_script_setup_true_lang.js +4 -1
  30. package/dist/es/src/components/CdsButton/CdsButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  31. package/dist/es/src/components/CdsButton/api/CdsButton.props.js +28 -7
  32. package/dist/es/src/components/CdsButton/api/CdsButton.props.js.map +1 -1
  33. package/dist/es/src/components/CdsButtonGroup/CdsButtonGroup.css +0 -18
  34. package/dist/es/src/components/CdsButtonGroup/api/CdsButtonGroup.props.js +4 -1
  35. package/dist/es/src/components/CdsButtonGroup/api/CdsButtonGroup.props.js.map +1 -1
  36. package/dist/es/src/components/CdsButtonToggle/CdsButtonToggle.css +0 -18
  37. package/dist/es/src/components/CdsButtonToggle/CdsButtonToggle.vue_vue_type_script_setup_true_lang.js +20 -5
  38. package/dist/es/src/components/CdsButtonToggle/CdsButtonToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  39. package/dist/es/src/components/CdsCard/CdsCard.css +0 -18
  40. package/dist/es/src/components/CdsCard/CdsCardGroup.vue_vue_type_script_setup_true_lang.js +20 -5
  41. package/dist/es/src/components/CdsCard/CdsCardGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  42. package/dist/es/src/components/CdsCard/api/CdsCard.props.js +84 -20
  43. package/dist/es/src/components/CdsCard/api/CdsCard.props.js.map +1 -1
  44. package/dist/es/src/components/CdsCarousel/CdsCarousel.css +0 -18
  45. package/dist/es/src/components/CdsCarousel/api/CdsCarousel.props.js +36 -9
  46. package/dist/es/src/components/CdsCarousel/api/CdsCarousel.props.js.map +1 -1
  47. package/dist/es/src/components/CdsCheckbox/CdsCheckbox.css +0 -18
  48. package/dist/es/src/components/CdsCheckboxButton/CdsCheckboxButton.css +0 -18
  49. package/dist/es/src/components/CdsCheckboxButton/api/CdsCheckboxButton.props.js +8 -2
  50. package/dist/es/src/components/CdsCheckboxButton/api/CdsCheckboxButton.props.js.map +1 -1
  51. package/dist/es/src/components/CdsCombobox/CdsCombobox.css +0 -18
  52. package/dist/es/src/components/CdsCombobox/CdsCombobox.vue_vue_type_script_setup_true_lang.js +24 -6
  53. package/dist/es/src/components/CdsCombobox/CdsCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  54. package/dist/es/src/components/CdsCombobox/api/CdsCombobox.props.js +13 -3
  55. package/dist/es/src/components/CdsCombobox/api/CdsCombobox.props.js.map +1 -1
  56. package/dist/es/src/components/CdsCounter/CdsCounter.css +0 -18
  57. package/dist/es/src/components/CdsCounter/api/CdsCounter.props.js +12 -3
  58. package/dist/es/src/components/CdsCounter/api/CdsCounter.props.js.map +1 -1
  59. package/dist/es/src/components/CdsDateInput/CdsDateInput.css +0 -18
  60. package/dist/es/src/components/CdsDateInput/CdsDateInput.vue_vue_type_script_setup_true_lang.js +8 -0
  61. package/dist/es/src/components/CdsDateInput/CdsDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  62. package/dist/es/src/components/CdsDateInput/api/CdsDateInput.props.js +31 -7
  63. package/dist/es/src/components/CdsDateInput/api/CdsDateInput.props.js.map +1 -1
  64. package/dist/es/src/components/CdsDatePicker/CdsDatePicker.css +0 -18
  65. package/dist/es/src/components/CdsDatePicker/CdsDatePicker.vue_vue_type_script_setup_true_lang.js +20 -0
  66. package/dist/es/src/components/CdsDatePicker/CdsDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  67. package/dist/es/src/components/CdsDatePicker/api/CdsDatePicker.props.js +64 -15
  68. package/dist/es/src/components/CdsDatePicker/api/CdsDatePicker.props.js.map +1 -1
  69. package/dist/es/src/components/CdsDefaultsProvider/api/CdsDefaultsProvider.props.js +5 -0
  70. package/dist/es/src/components/CdsDefaultsProvider/api/CdsDefaultsProvider.props.js.map +1 -1
  71. package/dist/es/src/components/CdsDescription/CdsDescription.css +0 -18
  72. package/dist/es/src/components/CdsDivider/CdsDivider.css +0 -18
  73. package/dist/es/src/components/CdsDivider/CdsDivider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  74. package/dist/es/src/components/CdsDivider/api/CdsDivider.props.js +33 -8
  75. package/dist/es/src/components/CdsDivider/api/CdsDivider.props.js.map +1 -1
  76. package/dist/es/src/components/CdsDrawer/CdsDrawer.css +0 -18
  77. package/dist/es/src/components/CdsDrawer/CdsDrawer.vue_vue_type_script_setup_true_lang.js +4 -0
  78. package/dist/es/src/components/CdsDrawer/CdsDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  79. package/dist/es/src/components/CdsDrawer/api/CdsDrawer.props.js +32 -8
  80. package/dist/es/src/components/CdsDrawer/api/CdsDrawer.props.js.map +1 -1
  81. package/dist/es/src/components/CdsEmptyState/CdsEmptyState.css +0 -18
  82. package/dist/es/src/components/CdsEmptyState/api/CdsEmptyState.props.js +33 -8
  83. package/dist/es/src/components/CdsEmptyState/api/CdsEmptyState.props.js.map +1 -1
  84. package/dist/es/src/components/CdsExpandablePanel/CdsExpandablePanel.vue_vue_type_script_setup_true_lang.js +16 -4
  85. package/dist/es/src/components/CdsExpandablePanel/CdsExpandablePanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  86. package/dist/es/src/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue_vue_type_script_setup_true_lang.js +8 -2
  87. package/dist/es/src/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  88. package/dist/es/src/components/CdsExpandablePanel/CdsExpandablePanels.css +0 -18
  89. package/dist/es/src/components/CdsExpandablePanel/CdsExpandablePanels.vue_vue_type_script_setup_true_lang.js +8 -2
  90. package/dist/es/src/components/CdsExpandablePanel/CdsExpandablePanels.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/es/src/components/CdsExpandablePanel/api/CdsExpandablePanel.props.js +38 -9
  92. package/dist/es/src/components/CdsExpandablePanel/api/CdsExpandablePanel.props.js.map +1 -1
  93. package/dist/es/src/components/CdsField/CdsField.css +0 -18
  94. package/dist/es/src/components/CdsField/CdsField.vue_vue_type_script_setup_true_lang.js +13 -3
  95. package/dist/es/src/components/CdsField/CdsField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  96. package/dist/es/src/components/CdsField/api/CdsField.props.js +56 -14
  97. package/dist/es/src/components/CdsField/api/CdsField.props.js.map +1 -1
  98. package/dist/es/src/components/CdsField/composables/useAutocomplete.js +1 -0
  99. package/dist/es/src/components/CdsField/composables/useAutocomplete.js.map +1 -1
  100. package/dist/es/src/components/CdsFileInput/CdsFileInput.css +0 -18
  101. package/dist/es/src/components/CdsFileInput/api/CdsFileInput.props.js +40 -10
  102. package/dist/es/src/components/CdsFileInput/api/CdsFileInput.props.js.map +1 -1
  103. package/dist/es/src/components/CdsFileInput/composables/useFileFilter.js +4 -1
  104. package/dist/es/src/components/CdsFileInput/composables/useFileFilter.js.map +1 -1
  105. package/dist/es/src/components/CdsFileUpload/CdsFileUpload.css +0 -18
  106. package/dist/es/src/components/CdsFileUpload/CdsFileUpload.vue_vue_type_script_setup_true_lang.js +4 -0
  107. package/dist/es/src/components/CdsFileUpload/CdsFileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -1
  108. package/dist/es/src/components/CdsFileUpload/api/CdsFileUpload.props.js +85 -21
  109. package/dist/es/src/components/CdsFileUpload/api/CdsFileUpload.props.js.map +1 -1
  110. package/dist/es/src/components/CdsFooter/CdsFooter.css +0 -18
  111. package/dist/es/src/components/CdsForm/CdsForm.css +0 -18
  112. package/dist/es/src/components/CdsForm/api/CdsForm.props.js +8 -2
  113. package/dist/es/src/components/CdsForm/api/CdsForm.props.js.map +1 -1
  114. package/dist/es/src/components/CdsFunctionalButton/CdsFunctionalButton.css +0 -18
  115. package/dist/es/src/components/CdsFunctionalButton/api/CdsFunctionalButton.props.js +4 -1
  116. package/dist/es/src/components/CdsFunctionalButton/api/CdsFunctionalButton.props.js.map +1 -1
  117. package/dist/es/src/components/CdsGrid/api/CdsGrid.props.js +40 -10
  118. package/dist/es/src/components/CdsGrid/api/CdsGrid.props.js.map +1 -1
  119. package/dist/es/src/components/CdsGrid/components/CSSGrid.css +0 -18
  120. package/dist/es/src/components/CdsGrid/components/FlexGrid.css +0 -18
  121. package/dist/es/src/components/CdsHeader/CdsHeader.css +0 -18
  122. package/dist/es/src/components/CdsHighlight/CdsHighlight.css +0 -18
  123. package/dist/es/src/components/CdsHighlight/api/CdsHighlight.props.js +32 -8
  124. package/dist/es/src/components/CdsHighlight/api/CdsHighlight.props.js.map +1 -1
  125. package/dist/es/src/components/CdsIcon/CdsIcon.css +0 -18
  126. package/dist/es/src/components/CdsIcon/api/CdsIcon.props.js +17 -4
  127. package/dist/es/src/components/CdsIcon/api/CdsIcon.props.js.map +1 -1
  128. package/dist/es/src/components/CdsImage/CdsImage.css +0 -18
  129. package/dist/es/src/components/CdsImage/CdsImage.vue_vue_type_script_setup_true_lang.js +20 -0
  130. package/dist/es/src/components/CdsImage/CdsImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  131. package/dist/es/src/components/CdsImage/api/CdsImage.props.js +64 -16
  132. package/dist/es/src/components/CdsImage/api/CdsImage.props.js.map +1 -1
  133. package/dist/es/src/components/CdsInput/CdsInput.css +0 -18
  134. package/dist/es/src/components/CdsInput/CdsInput.vue_vue_type_script_setup_true_lang.js +44 -11
  135. package/dist/es/src/components/CdsInput/CdsInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  136. package/dist/es/src/components/CdsInput/api/CdsInput.props.js +48 -12
  137. package/dist/es/src/components/CdsInput/api/CdsInput.props.js.map +1 -1
  138. package/dist/es/src/components/CdsLabel/CdsLabel.css +0 -18
  139. package/dist/es/src/components/CdsLabel/api/CdsLabel.props.js +4 -0
  140. package/dist/es/src/components/CdsLabel/api/CdsLabel.props.js.map +1 -1
  141. package/dist/es/src/components/CdsLayout/CdsLayout.css +0 -18
  142. package/dist/es/src/components/CdsLayout/api/CdsLayout.props.js +5 -1
  143. package/dist/es/src/components/CdsLayout/api/CdsLayout.props.js.map +1 -1
  144. package/dist/es/src/components/CdsLink/CdsLink.css +0 -18
  145. package/dist/es/src/components/CdsLink/api/CdsLink.props.js +4 -1
  146. package/dist/es/src/components/CdsLink/api/CdsLink.props.js.map +1 -1
  147. package/dist/es/src/components/CdsList/CdsList.css +0 -18
  148. package/dist/es/src/components/CdsList/CdsList.vue_vue_type_script_setup_true_lang.js +25 -7
  149. package/dist/es/src/components/CdsList/CdsList.vue_vue_type_script_setup_true_lang.js.map +1 -1
  150. package/dist/es/src/components/CdsList/CdsListGroup.vue_vue_type_script_setup_true_lang.js +5 -2
  151. package/dist/es/src/components/CdsList/CdsListGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  152. package/dist/es/src/components/CdsList/CdsListItem.css +0 -18
  153. package/dist/es/src/components/CdsList/CdsListItem.vue_vue_type_script_setup_true_lang.js +29 -8
  154. package/dist/es/src/components/CdsList/CdsListItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  155. package/dist/es/src/components/CdsList/CdsListItemAction.vue_vue_type_script_setup_true_lang.js +8 -2
  156. package/dist/es/src/components/CdsList/CdsListItemAction.vue_vue_type_script_setup_true_lang.js.map +1 -1
  157. package/dist/es/src/components/CdsList/CdsListItemDivider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  158. package/dist/es/src/components/CdsList/CdsListItemMedia.vue_vue_type_script_setup_true_lang.js +8 -2
  159. package/dist/es/src/components/CdsList/CdsListItemMedia.vue_vue_type_script_setup_true_lang.js.map +1 -1
  160. package/dist/es/src/components/CdsList/CdsListSubheader.vue_vue_type_script_setup_true_lang.js +1 -1
  161. package/dist/es/src/components/CdsList/CdsListSubheader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  162. package/dist/es/src/components/CdsList/api/CdsList.constants.js +4 -4
  163. package/dist/es/src/components/CdsList/api/CdsList.props.js +147 -39
  164. package/dist/es/src/components/CdsList/api/CdsList.props.js.map +1 -1
  165. package/dist/es/src/components/CdsList/components/ListChildren.vue_vue_type_script_setup_true_lang.js +8 -2
  166. package/dist/es/src/components/CdsList/components/ListChildren.vue_vue_type_script_setup_true_lang.js.map +1 -1
  167. package/dist/es/src/components/CdsList/components/ListGroupActivator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  168. package/dist/es/src/components/CdsList/index.js +5 -2
  169. package/dist/es/src/components/CdsList/index.js.map +1 -1
  170. package/dist/es/src/components/CdsLoader/CdsLoader.css +0 -18
  171. package/dist/es/src/components/CdsLoader/api/CdsLoader.props.js +12 -3
  172. package/dist/es/src/components/CdsLoader/api/CdsLoader.props.js.map +1 -1
  173. package/dist/es/src/components/CdsMain/CdsMain.css +0 -18
  174. package/dist/es/src/components/CdsMenu/CdsMenu.css +0 -18
  175. package/dist/es/src/components/CdsMenu/api/CdsMenu.props.js +8 -2
  176. package/dist/es/src/components/CdsMenu/api/CdsMenu.props.js.map +1 -1
  177. package/dist/es/src/components/CdsMessages/CdsMessages.css +0 -18
  178. package/dist/es/src/components/CdsMessages/api/CdsMessages.props.js +12 -3
  179. package/dist/es/src/components/CdsMessages/api/CdsMessages.props.js.map +1 -1
  180. package/dist/es/src/components/CdsModal/CdsModal.css +0 -18
  181. package/dist/es/src/components/CdsModal/api/CdsModal.props.js +8 -2
  182. package/dist/es/src/components/CdsModal/api/CdsModal.props.js.map +1 -1
  183. package/dist/es/src/components/CdsNotification/CdsNotification.css +0 -18
  184. package/dist/es/src/components/CdsNotification/api/CdsNotification.props.js +28 -7
  185. package/dist/es/src/components/CdsNotification/api/CdsNotification.props.js.map +1 -1
  186. package/dist/es/src/components/CdsNotificationAlert/CdsNotificationAlert.css +0 -18
  187. package/dist/es/src/components/CdsNotificationAlert/api/CdsNotificationAlert.props.js +28 -7
  188. package/dist/es/src/components/CdsNotificationAlert/api/CdsNotificationAlert.props.js.map +1 -1
  189. package/dist/es/src/components/CdsOtpInput/CdsOtpInput.css +0 -18
  190. package/dist/es/src/components/CdsOtpInput/CdsOtpInput.vue_vue_type_script_setup_true_lang.js +20 -5
  191. package/dist/es/src/components/CdsOtpInput/CdsOtpInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  192. package/dist/es/src/components/CdsOtpInput/api/CdsOtpInput.props.js +52 -13
  193. package/dist/es/src/components/CdsOtpInput/api/CdsOtpInput.props.js.map +1 -1
  194. package/dist/es/src/components/CdsOverlay/CdsOverlay.css +0 -18
  195. package/dist/es/src/components/CdsOverlay/CdsOverlay.vue_vue_type_script_setup_true_lang.js +44 -11
  196. package/dist/es/src/components/CdsOverlay/CdsOverlay.vue_vue_type_script_setup_true_lang.js.map +1 -1
  197. package/dist/es/src/components/CdsOverlay/api/CdsOverlay.props.js +36 -8
  198. package/dist/es/src/components/CdsOverlay/api/CdsOverlay.props.js.map +1 -1
  199. package/dist/es/src/components/CdsOverlay/composables/useActivator.js +25 -6
  200. package/dist/es/src/components/CdsOverlay/composables/useActivator.js.map +1 -1
  201. package/dist/es/src/components/CdsOverlay/composables/useLocationStrategies.js +18 -4
  202. package/dist/es/src/components/CdsOverlay/composables/useLocationStrategies.js.map +1 -1
  203. package/dist/es/src/components/CdsOverlay/composables/useScrollStrategies.js +4 -1
  204. package/dist/es/src/components/CdsOverlay/composables/useScrollStrategies.js.map +1 -1
  205. package/dist/es/src/components/CdsPage/CdsPage.css +0 -18
  206. package/dist/es/src/components/CdsPage/api/CdsPage.props.js +5 -1
  207. package/dist/es/src/components/CdsPage/api/CdsPage.props.js.map +1 -1
  208. package/dist/es/src/components/CdsPagination/CdsPagination.css +0 -18
  209. package/dist/es/src/components/CdsPagination/CdsPagination.vue_vue_type_script_setup_true_lang.js +16 -0
  210. package/dist/es/src/components/CdsPagination/CdsPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  211. package/dist/es/src/components/CdsPagination/api/CdsPagination.props.js +84 -21
  212. package/dist/es/src/components/CdsPagination/api/CdsPagination.props.js.map +1 -1
  213. package/dist/es/src/components/CdsProgressBar/CdsProgressBar.css +0 -18
  214. package/dist/es/src/components/CdsProgressBar/api/CdsProgressBar.props.js +64 -16
  215. package/dist/es/src/components/CdsProgressBar/api/CdsProgressBar.props.js.map +1 -1
  216. package/dist/es/src/components/CdsProgressBar/composables/useChunk.js +4 -0
  217. package/dist/es/src/components/CdsProgressBar/composables/useChunk.js.map +1 -1
  218. package/dist/es/src/components/CdsProgressCircle/CdsProgressCircle.css +0 -18
  219. package/dist/es/src/components/CdsProgressCircle/api/CdsProgressCircle.props.js +28 -7
  220. package/dist/es/src/components/CdsProgressCircle/api/CdsProgressCircle.props.js.map +1 -1
  221. package/dist/es/src/components/CdsRadio/CdsRadio.css +0 -18
  222. package/dist/es/src/components/CdsRadioGroup/CdsRadioGroup.css +0 -18
  223. package/dist/es/src/components/CdsRadioGroup/api/CdsRadioGroup.props.js +16 -4
  224. package/dist/es/src/components/CdsRadioGroup/api/CdsRadioGroup.props.js.map +1 -1
  225. package/dist/es/src/components/CdsResponsive/CdsResponsive.css +0 -18
  226. package/dist/es/src/components/CdsResponsive/api/CdsResponsive.props.js +12 -3
  227. package/dist/es/src/components/CdsResponsive/api/CdsResponsive.props.js.map +1 -1
  228. package/dist/es/src/components/CdsSelect/CdsSelect.css +0 -18
  229. package/dist/es/src/components/CdsSelect/CdsSelect.vue_vue_type_script_setup_true_lang.js +16 -4
  230. package/dist/es/src/components/CdsSelect/CdsSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  231. package/dist/es/src/components/CdsSelect/api/CdsSelect.props.js +4 -1
  232. package/dist/es/src/components/CdsSelect/api/CdsSelect.props.js.map +1 -1
  233. package/dist/es/src/components/CdsSelect/composables/useMenuActivator.js +8 -2
  234. package/dist/es/src/components/CdsSelect/composables/useMenuActivator.js.map +1 -1
  235. package/dist/es/src/components/CdsSelect/composables/useSelect.js +69 -17
  236. package/dist/es/src/components/CdsSelect/composables/useSelect.js.map +1 -1
  237. package/dist/es/src/components/CdsSelectionControl/CdsSelectionControl.css +0 -18
  238. package/dist/es/src/components/CdsSelectionControl/CdsSelectionControl.vue_vue_type_script_setup_true_lang.js +8 -0
  239. package/dist/es/src/components/CdsSelectionControl/CdsSelectionControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
  240. package/dist/es/src/components/CdsSelectionControl/api/CdsSelectionControl.props.js +12 -3
  241. package/dist/es/src/components/CdsSelectionControl/api/CdsSelectionControl.props.js.map +1 -1
  242. package/dist/es/src/components/CdsSelectionControlGroup/CdsSelectionControlGroup.css +0 -18
  243. package/dist/es/src/components/CdsSelectionControlGroup/api/CdsSelectionControlGroup.props.js +44 -11
  244. package/dist/es/src/components/CdsSelectionControlGroup/api/CdsSelectionControlGroup.props.js.map +1 -1
  245. package/dist/es/src/components/CdsSkeletonLoader/CdsSkeletonLoader.css +0 -18
  246. package/dist/es/src/components/CdsSkeletonLoader/api/CdsSkeletonLoader.props.js +16 -4
  247. package/dist/es/src/components/CdsSkeletonLoader/api/CdsSkeletonLoader.props.js.map +1 -1
  248. package/dist/es/src/components/CdsSkeletonLoader/api/CdsSkeletonLoader.types.js.map +1 -1
  249. package/dist/es/src/components/CdsSlideGroup/CdsSlideGroup.css +0 -18
  250. package/dist/es/src/components/CdsSlideGroup/CdsSlideGroup.vue_vue_type_script_setup_true_lang.js +24 -6
  251. package/dist/es/src/components/CdsSlideGroup/CdsSlideGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  252. package/dist/es/src/components/CdsSlideGroup/api/CdsSlideGroup.props.js +25 -6
  253. package/dist/es/src/components/CdsSlideGroup/api/CdsSlideGroup.props.js.map +1 -1
  254. package/dist/es/src/components/CdsSlideView/CdsSlideView.css +0 -18
  255. package/dist/es/src/components/CdsSlideView/CdsSlideView.vue_vue_type_script_setup_true_lang.js +4 -0
  256. package/dist/es/src/components/CdsSlideView/CdsSlideView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  257. package/dist/es/src/components/CdsSlideView/CdsSlideViewItem.vue_vue_type_script_setup_true_lang.js +5 -1
  258. package/dist/es/src/components/CdsSlideView/CdsSlideViewItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  259. package/dist/es/src/components/CdsSlideView/api/CdsSlideView.props.js +44 -0
  260. package/dist/es/src/components/CdsSlideView/api/CdsSlideView.props.js.map +1 -1
  261. package/dist/es/src/components/CdsStages/CdsStages.css +0 -18
  262. package/dist/es/src/components/CdsStages/CdsStages.vue_vue_type_script_setup_true_lang.js +8 -0
  263. package/dist/es/src/components/CdsStages/CdsStages.vue_vue_type_script_setup_true_lang.js.map +1 -1
  264. package/dist/es/src/components/CdsStages/api/CdsStages.props.js +8 -2
  265. package/dist/es/src/components/CdsStages/api/CdsStages.props.js.map +1 -1
  266. package/dist/es/src/components/CdsStatus/CdsStatus.css +0 -18
  267. package/dist/es/src/components/CdsStatus/api/CdsStatus.props.js +4 -1
  268. package/dist/es/src/components/CdsStatus/api/CdsStatus.props.js.map +1 -1
  269. package/dist/es/src/components/CdsSteps/CdsSteps.css +0 -18
  270. package/dist/es/src/components/CdsSteps/CdsSteps.vue_vue_type_script_setup_true_lang.js +8 -0
  271. package/dist/es/src/components/CdsSteps/CdsSteps.vue_vue_type_script_setup_true_lang.js.map +1 -1
  272. package/dist/es/src/components/CdsSteps/api/CdsSteps.props.js +44 -11
  273. package/dist/es/src/components/CdsSteps/api/CdsSteps.props.js.map +1 -1
  274. package/dist/es/src/components/CdsSurface/CdsSurface.css +0 -18
  275. package/dist/es/src/components/CdsSurface/api/CdsSurface.props.js +4 -1
  276. package/dist/es/src/components/CdsSurface/api/CdsSurface.props.js.map +1 -1
  277. package/dist/es/src/components/CdsTable/CdsTable.css +0 -18
  278. package/dist/es/src/components/CdsTable/CdsTable.vue_vue_type_script_setup_true_lang.js +4 -0
  279. package/dist/es/src/components/CdsTable/CdsTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  280. package/dist/es/src/components/CdsTable/composable/table.js +47 -0
  281. package/dist/es/src/components/CdsTable/composable/table.js.map +1 -1
  282. package/dist/es/src/components/CdsTabs/CdsTabs.css +0 -18
  283. package/dist/es/src/components/CdsTabs/api/CdsTabs.props.js +56 -0
  284. package/dist/es/src/components/CdsTabs/api/CdsTabs.props.js.map +1 -1
  285. package/dist/es/src/components/CdsTag/CdsTag.css +0 -18
  286. package/dist/es/src/components/CdsTag/api/CdsTag.props.js +72 -18
  287. package/dist/es/src/components/CdsTag/api/CdsTag.props.js.map +1 -1
  288. package/dist/es/src/components/CdsTagGroup/CdsTagGroup.css +0 -18
  289. package/dist/es/src/components/CdsTagGroup/CdsTagGroup.vue_vue_type_script_setup_true_lang.js +20 -5
  290. package/dist/es/src/components/CdsTagGroup/CdsTagGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  291. package/dist/es/src/components/CdsTagGroup/api/CdsTagGroup.props.js +11 -3
  292. package/dist/es/src/components/CdsTagGroup/api/CdsTagGroup.props.js.map +1 -1
  293. package/dist/es/src/components/CdsTextArea/CdsTextArea.css +0 -18
  294. package/dist/es/src/components/CdsTextArea/api/CdsTextArea.props.js +52 -13
  295. package/dist/es/src/components/CdsTextArea/api/CdsTextArea.props.js.map +1 -1
  296. package/dist/es/src/components/CdsTextInput/CdsTextInput.css +0 -18
  297. package/dist/es/src/components/CdsTextInput/api/CdsTextInput.props.js +40 -10
  298. package/dist/es/src/components/CdsTextInput/api/CdsTextInput.props.js.map +1 -1
  299. package/dist/es/src/components/CdsTimePicker/CdsTimePicker.css +0 -18
  300. package/dist/es/src/components/CdsTimePicker/CdsTimePicker.vue_vue_type_script_setup_true_lang.js +24 -0
  301. package/dist/es/src/components/CdsTimePicker/CdsTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  302. package/dist/es/src/components/CdsTimePicker/api/CdsTimePicker.props.js +32 -8
  303. package/dist/es/src/components/CdsTimePicker/api/CdsTimePicker.props.js.map +1 -1
  304. package/dist/es/src/components/CdsToast/CdsToast.css +0 -18
  305. package/dist/es/src/components/CdsToast/api/CdsToast.props.js +48 -12
  306. package/dist/es/src/components/CdsToast/api/CdsToast.props.js.map +1 -1
  307. package/dist/es/src/components/CdsToastQueue/CdsToastQueue.vue_vue_type_script_setup_true_lang.js +4 -1
  308. package/dist/es/src/components/CdsToastQueue/CdsToastQueue.vue_vue_type_script_setup_true_lang.js.map +1 -1
  309. package/dist/es/src/components/CdsToastQueue/api/CdsToastQueue.props.js +28 -7
  310. package/dist/es/src/components/CdsToastQueue/api/CdsToastQueue.props.js.map +1 -1
  311. package/dist/es/src/components/CdsToggle/CdsToggle.css +0 -18
  312. package/dist/es/src/components/CdsToggle/api/CdsToggle.props.js +12 -3
  313. package/dist/es/src/components/CdsToggle/api/CdsToggle.props.js.map +1 -1
  314. package/dist/es/src/components/CdsToolbar/CdsToolbar.css +0 -18
  315. package/dist/es/src/components/CdsToolbar/api/CdsToolbar.props.js +20 -5
  316. package/dist/es/src/components/CdsToolbar/api/CdsToolbar.props.js.map +1 -1
  317. package/dist/es/src/components/CdsTooltip/CdsTooltip.css +0 -18
  318. package/dist/es/src/components/CdsTooltip/api/CdsTooltip.props.js +20 -5
  319. package/dist/es/src/components/CdsTooltip/api/CdsTooltip.props.js.map +1 -1
  320. package/dist/es/src/components/CdsTree/CdsTree.css +0 -18
  321. package/dist/es/src/components/CdsTree/CdsTree.vue_vue_type_script_setup_true_lang.js +16 -0
  322. package/dist/es/src/components/CdsTree/CdsTree.vue_vue_type_script_setup_true_lang.js.map +1 -1
  323. package/dist/es/src/components/CdsTree/composable/tree.js +28 -0
  324. package/dist/es/src/components/CdsTree/composable/tree.js.map +1 -1
  325. package/dist/es/src/components/CdsTree/composable/treeNode.js +68 -2
  326. package/dist/es/src/components/CdsTree/composable/treeNode.js.map +1 -1
  327. package/dist/es/src/components/CdsUploader/CdsUploader.css +0 -18
  328. package/dist/es/src/components/CdsUploader/CdsUploader.vue_vue_type_script_setup_true_lang.js +8 -0
  329. package/dist/es/src/components/CdsUploader/CdsUploader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  330. package/dist/es/src/components/CdsUploader/composables/useUpload.js +104 -26
  331. package/dist/es/src/components/CdsUploader/composables/useUpload.js.map +1 -1
  332. package/dist/es/src/components/CdsVirtualScroll/CdsVirtualScroll.css +0 -18
  333. package/dist/es/src/components/CdsVirtualScroll/CdsVirtualScroll.vue_vue_type_script_setup_true_lang.js +8 -0
  334. package/dist/es/src/components/CdsVirtualScroll/CdsVirtualScroll.vue_vue_type_script_setup_true_lang.js.map +1 -1
  335. package/dist/es/src/components/CdsVirtualScroll/api/CdsVirtualScroll.props.js +12 -3
  336. package/dist/es/src/components/CdsVirtualScroll/api/CdsVirtualScroll.props.js.map +1 -1
  337. package/dist/es/src/components/index.js +2 -1
  338. package/dist/es/src/components/index.js.map +1 -1
  339. package/dist/es/src/composables/useAppearance/useAppearance.js +4 -1
  340. package/dist/es/src/composables/useAppearance/useAppearance.js.map +1 -1
  341. package/dist/es/src/composables/useColor/useColor.js +20 -5
  342. package/dist/es/src/composables/useColor/useColor.js.map +1 -1
  343. package/dist/es/src/composables/useDatetime/useDatetime.js +3 -0
  344. package/dist/es/src/composables/useDatetime/useDatetime.js.map +1 -1
  345. package/dist/es/src/composables/useDelay/useDelay.js +8 -2
  346. package/dist/es/src/composables/useDelay/useDelay.js.map +1 -1
  347. package/dist/es/src/composables/useDimensions/useDimensions.js +24 -6
  348. package/dist/es/src/composables/useDimensions/useDimensions.js.map +1 -1
  349. package/dist/es/src/composables/useDirection/useDirection.js +4 -1
  350. package/dist/es/src/composables/useDirection/useDirection.js.map +1 -1
  351. package/dist/es/src/composables/useDisabled/useDisabled.js +4 -1
  352. package/dist/es/src/composables/useDisabled/useDisabled.js.map +1 -1
  353. package/dist/es/src/composables/useDisplay/useDisplay.js +2 -0
  354. package/dist/es/src/composables/useDisplay/useDisplay.js.map +1 -1
  355. package/dist/es/src/composables/useFilter/useFilter.js +20 -0
  356. package/dist/es/src/composables/useFilter/useFilter.js.map +1 -1
  357. package/dist/es/src/composables/useFocus/useFocus.js +12 -3
  358. package/dist/es/src/composables/useFocus/useFocus.js.map +1 -1
  359. package/dist/es/src/composables/useFocus/useFocusTrap.js +8 -2
  360. package/dist/es/src/composables/useFocus/useFocusTrap.js.map +1 -1
  361. package/dist/es/src/composables/useForm/useForm.js +45 -0
  362. package/dist/es/src/composables/useForm/useForm.js.map +1 -1
  363. package/dist/es/src/composables/useGroup/useGroup.js +24 -6
  364. package/dist/es/src/composables/useGroup/useGroup.js.map +1 -1
  365. package/dist/es/src/composables/useGroup/useGroupItem.js +8 -2
  366. package/dist/es/src/composables/useGroup/useGroupItem.js.map +1 -1
  367. package/dist/es/src/composables/useItems/useItems.js +32 -8
  368. package/dist/es/src/composables/useItems/useItems.js.map +1 -1
  369. package/dist/es/src/composables/useLayout/context.js.map +1 -1
  370. package/dist/es/src/composables/useLayout/useLayout.js +24 -6
  371. package/dist/es/src/composables/useLayout/useLayout.js.map +1 -1
  372. package/dist/es/src/composables/useLazy/useLazy.js +1 -0
  373. package/dist/es/src/composables/useLazy/useLazy.js.map +1 -1
  374. package/dist/es/src/composables/useLoader/useLoader.js +4 -1
  375. package/dist/es/src/composables/useLoader/useLoader.js.map +1 -1
  376. package/dist/es/src/composables/useLocation/useLocation.js +4 -1
  377. package/dist/es/src/composables/useLocation/useLocation.js.map +1 -1
  378. package/dist/es/src/composables/useNested/useNested.js +44 -11
  379. package/dist/es/src/composables/useNested/useNested.js.map +1 -1
  380. package/dist/es/src/composables/usePosition/usePosition.js +4 -0
  381. package/dist/es/src/composables/usePosition/usePosition.js.map +1 -1
  382. package/dist/es/src/composables/useReadonly/useReadonly.js +4 -1
  383. package/dist/es/src/composables/useReadonly/useReadonly.js.map +1 -1
  384. package/dist/es/src/composables/useReveal/useReveal.js +4 -1
  385. package/dist/es/src/composables/useReveal/useReveal.js.map +1 -1
  386. package/dist/es/src/composables/useRouter/useRouter.js +16 -4
  387. package/dist/es/src/composables/useRouter/useRouter.js.map +1 -1
  388. package/dist/es/src/composables/useSize/useSize.js +4 -1
  389. package/dist/es/src/composables/useSize/useSize.js.map +1 -1
  390. package/dist/es/src/composables/useStatus/useStatus.js +4 -1
  391. package/dist/es/src/composables/useStatus/useStatus.js.map +1 -1
  392. package/dist/es/src/composables/useText/useText.js +8 -2
  393. package/dist/es/src/composables/useText/useText.js.map +1 -1
  394. package/dist/es/src/composables/useTheme/useTheme.js +4 -1
  395. package/dist/es/src/composables/useTheme/useTheme.js.map +1 -1
  396. package/dist/es/src/composables/useTransition/useTransition.js +4 -1
  397. package/dist/es/src/composables/useTransition/useTransition.js.map +1 -1
  398. package/dist/es/src/composables/useValidation/useValidation.js +26 -6
  399. package/dist/es/src/composables/useValidation/useValidation.js.map +1 -1
  400. package/dist/es/src/composables/useVirtual/useVirtual.js +12 -3
  401. package/dist/es/src/composables/useVirtual/useVirtual.js.map +1 -1
  402. package/dist/es/src/core/defineComponent.js +4 -1
  403. package/dist/es/src/core/defineComponent.js.map +1 -1
  404. package/dist/es/src/themes/lumaDark.js +8 -4
  405. package/dist/es/src/themes/lumaDark.js.map +1 -1
  406. package/dist/es/src/utils/date/date.js +4 -4
  407. package/dist/es/src/utils/date/date.js.map +1 -1
  408. package/dist/esm-node/entry.css +0 -18
  409. package/dist/esm-node/entry.mjs +3 -2
  410. package/dist/esm-node/src/cds.mjs +1 -1
  411. package/dist/esm-node/src/components/CdsApp/CdsApp.css +0 -18
  412. package/dist/esm-node/src/components/CdsApp/api/CdsApp.props.mjs +1 -0
  413. package/dist/esm-node/src/components/CdsAutocomplete/CdsAutocomplete.css +0 -18
  414. package/dist/esm-node/src/components/CdsAutocomplete/CdsAutocomplete.vue_vue_type_script_setup_true_lang.mjs +20 -5
  415. package/dist/esm-node/src/components/CdsAutocomplete/api/CdsAutocomplete.props.mjs +9 -2
  416. package/dist/esm-node/src/components/CdsAvatar/CdsAvatar.css +0 -18
  417. package/dist/esm-node/src/components/CdsAvatar/api/CdsAvatar.props.mjs +20 -5
  418. package/dist/esm-node/src/components/CdsBadge/CdsBadge.css +0 -18
  419. package/dist/esm-node/src/components/CdsBadge/api/CdsBadge.props.mjs +37 -9
  420. package/dist/esm-node/src/components/CdsBreadcrumbs/CdsBreadcrumbs.css +0 -18
  421. package/dist/esm-node/src/components/CdsBreadcrumbs/api/CdsBreadcrumbs.props.mjs +32 -8
  422. package/dist/esm-node/src/components/CdsButton/CdsButton.css +0 -18
  423. package/dist/esm-node/src/components/CdsButton/CdsButton.vue_vue_type_script_setup_true_lang.mjs +4 -1
  424. package/dist/esm-node/src/components/CdsButton/api/CdsButton.props.mjs +28 -7
  425. package/dist/esm-node/src/components/CdsButtonGroup/CdsButtonGroup.css +0 -18
  426. package/dist/esm-node/src/components/CdsButtonGroup/api/CdsButtonGroup.props.mjs +4 -1
  427. package/dist/esm-node/src/components/CdsButtonToggle/CdsButtonToggle.css +0 -18
  428. package/dist/esm-node/src/components/CdsButtonToggle/CdsButtonToggle.vue_vue_type_script_setup_true_lang.mjs +20 -5
  429. package/dist/esm-node/src/components/CdsCard/CdsCard.css +0 -18
  430. package/dist/esm-node/src/components/CdsCard/CdsCard.vue_vue_type_script_setup_true_lang.mjs +1 -1
  431. package/dist/esm-node/src/components/CdsCard/CdsCardActions.vue_vue_type_script_setup_true_lang.mjs +1 -1
  432. package/dist/esm-node/src/components/CdsCard/CdsCardDivider.vue_vue_type_script_setup_true_lang.mjs +1 -1
  433. package/dist/esm-node/src/components/CdsCard/CdsCardGroup.vue_vue_type_script_setup_true_lang.mjs +21 -6
  434. package/dist/esm-node/src/components/CdsCard/CdsCardItem.vue_vue_type_script_setup_true_lang.mjs +1 -1
  435. package/dist/esm-node/src/components/CdsCard/CdsCardSubtitle.vue_vue_type_script_setup_true_lang.mjs +1 -1
  436. package/dist/esm-node/src/components/CdsCard/CdsCardText.vue_vue_type_script_setup_true_lang.mjs +1 -1
  437. package/dist/esm-node/src/components/CdsCard/CdsCardTitle.vue_vue_type_script_setup_true_lang.mjs +1 -1
  438. package/dist/esm-node/src/components/CdsCard/api/CdsCard.constants.mjs +9 -9
  439. package/dist/esm-node/src/components/CdsCard/api/CdsCard.props.mjs +85 -21
  440. package/dist/esm-node/src/components/CdsCard/index.mjs +1 -1
  441. package/dist/esm-node/src/components/CdsCarousel/CdsCarousel.css +0 -18
  442. package/dist/esm-node/src/components/CdsCarousel/api/CdsCarousel.props.mjs +36 -9
  443. package/dist/esm-node/src/components/CdsCheckbox/CdsCheckbox.css +0 -18
  444. package/dist/esm-node/src/components/CdsCheckboxButton/CdsCheckboxButton.css +0 -18
  445. package/dist/esm-node/src/components/CdsCheckboxButton/api/CdsCheckboxButton.props.mjs +8 -2
  446. package/dist/esm-node/src/components/CdsCombobox/CdsCombobox.css +0 -18
  447. package/dist/esm-node/src/components/CdsCombobox/CdsCombobox.vue_vue_type_script_setup_true_lang.mjs +24 -6
  448. package/dist/esm-node/src/components/CdsCombobox/api/CdsCombobox.props.mjs +13 -3
  449. package/dist/esm-node/src/components/CdsCounter/CdsCounter.css +0 -18
  450. package/dist/esm-node/src/components/CdsCounter/api/CdsCounter.props.mjs +12 -3
  451. package/dist/esm-node/src/components/CdsDateInput/CdsDateInput.css +0 -18
  452. package/dist/esm-node/src/components/CdsDateInput/CdsDateInput.vue_vue_type_script_setup_true_lang.mjs +8 -0
  453. package/dist/esm-node/src/components/CdsDateInput/api/CdsDateInput.props.mjs +31 -7
  454. package/dist/esm-node/src/components/CdsDatePicker/CdsDatePicker.css +0 -18
  455. package/dist/esm-node/src/components/CdsDatePicker/CdsDatePicker.vue_vue_type_script_setup_true_lang.mjs +20 -0
  456. package/dist/esm-node/src/components/CdsDatePicker/api/CdsDatePicker.props.mjs +64 -15
  457. package/dist/esm-node/src/components/CdsDefaultsProvider/api/CdsDefaultsProvider.props.mjs +5 -0
  458. package/dist/esm-node/src/components/CdsDescription/CdsDescription.css +0 -18
  459. package/dist/esm-node/src/components/CdsDivider/CdsDivider.css +0 -18
  460. package/dist/esm-node/src/components/CdsDivider/api/CdsDivider.props.mjs +33 -8
  461. package/dist/esm-node/src/components/CdsDrawer/CdsDrawer.css +0 -18
  462. package/dist/esm-node/src/components/CdsDrawer/CdsDrawer.vue_vue_type_script_setup_true_lang.mjs +4 -0
  463. package/dist/esm-node/src/components/CdsDrawer/api/CdsDrawer.props.mjs +32 -8
  464. package/dist/esm-node/src/components/CdsEmptyState/CdsEmptyState.css +0 -18
  465. package/dist/esm-node/src/components/CdsEmptyState/api/CdsEmptyState.props.mjs +33 -8
  466. package/dist/esm-node/src/components/CdsExpandablePanel/CdsExpandablePanel.vue_vue_type_script_setup_true_lang.mjs +16 -4
  467. package/dist/esm-node/src/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue_vue_type_script_setup_true_lang.mjs +8 -2
  468. package/dist/esm-node/src/components/CdsExpandablePanel/CdsExpandablePanels.css +0 -18
  469. package/dist/esm-node/src/components/CdsExpandablePanel/CdsExpandablePanels.vue_vue_type_script_setup_true_lang.mjs +8 -2
  470. package/dist/esm-node/src/components/CdsExpandablePanel/api/CdsExpandablePanel.props.mjs +38 -9
  471. package/dist/esm-node/src/components/CdsField/CdsField.css +0 -18
  472. package/dist/esm-node/src/components/CdsField/CdsField.vue_vue_type_script_setup_true_lang.mjs +13 -3
  473. package/dist/esm-node/src/components/CdsField/api/CdsField.props.mjs +56 -14
  474. package/dist/esm-node/src/components/CdsField/composables/useAutocomplete.mjs +1 -0
  475. package/dist/esm-node/src/components/CdsFileInput/CdsFileInput.css +0 -18
  476. package/dist/esm-node/src/components/CdsFileInput/api/CdsFileInput.props.mjs +40 -10
  477. package/dist/esm-node/src/components/CdsFileInput/composables/useFileFilter.mjs +4 -1
  478. package/dist/esm-node/src/components/CdsFileUpload/CdsFileUpload.css +0 -18
  479. package/dist/esm-node/src/components/CdsFileUpload/CdsFileUpload.vue_vue_type_script_setup_true_lang.mjs +4 -0
  480. package/dist/esm-node/src/components/CdsFileUpload/api/CdsFileUpload.props.mjs +85 -21
  481. package/dist/esm-node/src/components/CdsFooter/CdsFooter.css +0 -18
  482. package/dist/esm-node/src/components/CdsForm/CdsForm.css +0 -18
  483. package/dist/esm-node/src/components/CdsForm/api/CdsForm.props.mjs +8 -2
  484. package/dist/esm-node/src/components/CdsFunctionalButton/CdsFunctionalButton.css +0 -18
  485. package/dist/esm-node/src/components/CdsFunctionalButton/api/CdsFunctionalButton.props.mjs +4 -1
  486. package/dist/esm-node/src/components/CdsGrid/api/CdsGrid.props.mjs +40 -10
  487. package/dist/esm-node/src/components/CdsGrid/components/CSSGrid.css +0 -18
  488. package/dist/esm-node/src/components/CdsGrid/components/FlexGrid.css +0 -18
  489. package/dist/esm-node/src/components/CdsHeader/CdsHeader.css +0 -18
  490. package/dist/esm-node/src/components/CdsHighlight/CdsHighlight.css +0 -18
  491. package/dist/esm-node/src/components/CdsHighlight/api/CdsHighlight.props.mjs +32 -8
  492. package/dist/esm-node/src/components/CdsIcon/CdsIcon.css +0 -18
  493. package/dist/esm-node/src/components/CdsIcon/api/CdsIcon.props.mjs +17 -4
  494. package/dist/esm-node/src/components/CdsImage/CdsImage.css +0 -18
  495. package/dist/esm-node/src/components/CdsImage/CdsImage.vue_vue_type_script_setup_true_lang.mjs +20 -0
  496. package/dist/esm-node/src/components/CdsImage/api/CdsImage.props.mjs +64 -16
  497. package/dist/esm-node/src/components/CdsInput/CdsInput.css +0 -18
  498. package/dist/esm-node/src/components/CdsInput/CdsInput.vue_vue_type_script_setup_true_lang.mjs +44 -11
  499. package/dist/esm-node/src/components/CdsInput/api/CdsInput.props.mjs +48 -12
  500. package/dist/esm-node/src/components/CdsLabel/CdsLabel.css +0 -18
  501. package/dist/esm-node/src/components/CdsLabel/api/CdsLabel.props.mjs +4 -0
  502. package/dist/esm-node/src/components/CdsLayout/CdsLayout.css +0 -18
  503. package/dist/esm-node/src/components/CdsLayout/api/CdsLayout.props.mjs +5 -1
  504. package/dist/esm-node/src/components/CdsLink/CdsLink.css +0 -18
  505. package/dist/esm-node/src/components/CdsLink/api/CdsLink.props.mjs +4 -1
  506. package/dist/esm-node/src/components/CdsList/CdsList.css +0 -18
  507. package/dist/esm-node/src/components/CdsList/CdsList.vue_vue_type_script_setup_true_lang.mjs +24 -6
  508. package/dist/esm-node/src/components/CdsList/CdsListGroup.vue_vue_type_script_setup_true_lang.mjs +4 -1
  509. package/dist/esm-node/src/components/CdsList/CdsListItem.css +0 -18
  510. package/dist/esm-node/src/components/CdsList/CdsListItem.vue_vue_type_script_setup_true_lang.mjs +28 -7
  511. package/dist/esm-node/src/components/CdsList/CdsListItemAction.vue_vue_type_script_setup_true_lang.mjs +8 -2
  512. package/dist/esm-node/src/components/CdsList/CdsListItemMedia.vue_vue_type_script_setup_true_lang.mjs +8 -2
  513. package/dist/esm-node/src/components/CdsList/api/CdsList.props.mjs +144 -36
  514. package/dist/esm-node/src/components/CdsList/components/ListChildren.vue_vue_type_script_setup_true_lang.mjs +8 -2
  515. package/dist/esm-node/src/components/CdsList/index.mjs +5 -2
  516. package/dist/esm-node/src/components/CdsLoader/CdsLoader.css +0 -18
  517. package/dist/esm-node/src/components/CdsLoader/api/CdsLoader.props.mjs +12 -3
  518. package/dist/esm-node/src/components/CdsMain/CdsMain.css +0 -18
  519. package/dist/esm-node/src/components/CdsMenu/CdsMenu.css +0 -18
  520. package/dist/esm-node/src/components/CdsMenu/api/CdsMenu.props.mjs +8 -2
  521. package/dist/esm-node/src/components/CdsMessages/CdsMessages.css +0 -18
  522. package/dist/esm-node/src/components/CdsMessages/api/CdsMessages.props.mjs +12 -3
  523. package/dist/esm-node/src/components/CdsModal/CdsModal.css +0 -18
  524. package/dist/esm-node/src/components/CdsModal/api/CdsModal.props.mjs +8 -2
  525. package/dist/esm-node/src/components/CdsNotification/CdsNotification.css +0 -18
  526. package/dist/esm-node/src/components/CdsNotification/api/CdsNotification.props.mjs +28 -7
  527. package/dist/esm-node/src/components/CdsNotificationAlert/CdsNotificationAlert.css +0 -18
  528. package/dist/esm-node/src/components/CdsNotificationAlert/api/CdsNotificationAlert.props.mjs +28 -7
  529. package/dist/esm-node/src/components/CdsOtpInput/CdsOtpInput.css +0 -18
  530. package/dist/esm-node/src/components/CdsOtpInput/CdsOtpInput.vue_vue_type_script_setup_true_lang.mjs +20 -5
  531. package/dist/esm-node/src/components/CdsOtpInput/api/CdsOtpInput.props.mjs +52 -13
  532. package/dist/esm-node/src/components/CdsOverlay/CdsOverlay.css +0 -18
  533. package/dist/esm-node/src/components/CdsOverlay/CdsOverlay.vue_vue_type_script_setup_true_lang.mjs +44 -11
  534. package/dist/esm-node/src/components/CdsOverlay/api/CdsOverlay.props.mjs +36 -8
  535. package/dist/esm-node/src/components/CdsOverlay/composables/useActivator.mjs +25 -6
  536. package/dist/esm-node/src/components/CdsOverlay/composables/useLocationStrategies.mjs +18 -4
  537. package/dist/esm-node/src/components/CdsOverlay/composables/useScrollStrategies.mjs +4 -1
  538. package/dist/esm-node/src/components/CdsPage/CdsPage.css +0 -18
  539. package/dist/esm-node/src/components/CdsPage/api/CdsPage.props.mjs +5 -1
  540. package/dist/esm-node/src/components/CdsPagination/CdsPagination.css +0 -18
  541. package/dist/esm-node/src/components/CdsPagination/CdsPagination.vue_vue_type_script_setup_true_lang.mjs +16 -0
  542. package/dist/esm-node/src/components/CdsPagination/api/CdsPagination.props.mjs +84 -21
  543. package/dist/esm-node/src/components/CdsProgressBar/CdsProgressBar.css +0 -18
  544. package/dist/esm-node/src/components/CdsProgressBar/api/CdsProgressBar.props.mjs +64 -16
  545. package/dist/esm-node/src/components/CdsProgressBar/composables/useChunk.mjs +4 -0
  546. package/dist/esm-node/src/components/CdsProgressCircle/CdsProgressCircle.css +0 -18
  547. package/dist/esm-node/src/components/CdsProgressCircle/api/CdsProgressCircle.props.mjs +28 -7
  548. package/dist/esm-node/src/components/CdsRadio/CdsRadio.css +0 -18
  549. package/dist/esm-node/src/components/CdsRadioGroup/CdsRadioGroup.css +0 -18
  550. package/dist/esm-node/src/components/CdsRadioGroup/api/CdsRadioGroup.props.mjs +16 -4
  551. package/dist/esm-node/src/components/CdsResponsive/CdsResponsive.css +0 -18
  552. package/dist/esm-node/src/components/CdsResponsive/api/CdsResponsive.props.mjs +12 -3
  553. package/dist/esm-node/src/components/CdsSelect/CdsSelect.css +0 -18
  554. package/dist/esm-node/src/components/CdsSelect/CdsSelect.vue_vue_type_script_setup_true_lang.mjs +16 -4
  555. package/dist/esm-node/src/components/CdsSelect/api/CdsSelect.props.mjs +4 -1
  556. package/dist/esm-node/src/components/CdsSelect/composables/useMenuActivator.mjs +8 -2
  557. package/dist/esm-node/src/components/CdsSelect/composables/useSelect.mjs +69 -17
  558. package/dist/esm-node/src/components/CdsSelectionControl/CdsSelectionControl.css +0 -18
  559. package/dist/esm-node/src/components/CdsSelectionControl/CdsSelectionControl.vue_vue_type_script_setup_true_lang.mjs +8 -0
  560. package/dist/esm-node/src/components/CdsSelectionControl/api/CdsSelectionControl.props.mjs +12 -3
  561. package/dist/esm-node/src/components/CdsSelectionControlGroup/CdsSelectionControlGroup.css +0 -18
  562. package/dist/esm-node/src/components/CdsSelectionControlGroup/api/CdsSelectionControlGroup.props.mjs +44 -11
  563. package/dist/esm-node/src/components/CdsSkeletonLoader/CdsSkeletonLoader.css +0 -18
  564. package/dist/esm-node/src/components/CdsSkeletonLoader/api/CdsSkeletonLoader.props.mjs +16 -4
  565. package/dist/esm-node/src/components/CdsSlideGroup/CdsSlideGroup.css +0 -18
  566. package/dist/esm-node/src/components/CdsSlideGroup/CdsSlideGroup.vue_vue_type_script_setup_true_lang.mjs +24 -6
  567. package/dist/esm-node/src/components/CdsSlideGroup/api/CdsSlideGroup.props.mjs +25 -6
  568. package/dist/esm-node/src/components/CdsSlideView/CdsSlideView.css +0 -18
  569. package/dist/esm-node/src/components/CdsSlideView/CdsSlideView.vue_vue_type_script_setup_true_lang.mjs +4 -0
  570. package/dist/esm-node/src/components/CdsSlideView/CdsSlideViewItem.vue_vue_type_script_setup_true_lang.mjs +5 -1
  571. package/dist/esm-node/src/components/CdsSlideView/api/CdsSlideView.props.mjs +44 -0
  572. package/dist/esm-node/src/components/CdsStages/CdsStages.css +0 -18
  573. package/dist/esm-node/src/components/CdsStages/CdsStages.vue_vue_type_script_setup_true_lang.mjs +8 -0
  574. package/dist/esm-node/src/components/CdsStages/api/CdsStages.props.mjs +8 -2
  575. package/dist/esm-node/src/components/CdsStatus/CdsStatus.css +0 -18
  576. package/dist/esm-node/src/components/CdsStatus/api/CdsStatus.props.mjs +4 -1
  577. package/dist/esm-node/src/components/CdsSteps/CdsSteps.css +0 -18
  578. package/dist/esm-node/src/components/CdsSteps/CdsSteps.vue_vue_type_script_setup_true_lang.mjs +8 -0
  579. package/dist/esm-node/src/components/CdsSteps/api/CdsSteps.props.mjs +44 -11
  580. package/dist/esm-node/src/components/CdsSurface/CdsSurface.css +0 -18
  581. package/dist/esm-node/src/components/CdsSurface/api/CdsSurface.props.mjs +4 -1
  582. package/dist/esm-node/src/components/CdsTable/CdsTable.css +0 -18
  583. package/dist/esm-node/src/components/CdsTable/CdsTable.vue_vue_type_script_setup_true_lang.mjs +4 -0
  584. package/dist/esm-node/src/components/CdsTable/composable/table.mjs +47 -0
  585. package/dist/esm-node/src/components/CdsTabs/CdsTabs.css +0 -18
  586. package/dist/esm-node/src/components/CdsTabs/api/CdsTabs.props.mjs +56 -0
  587. package/dist/esm-node/src/components/CdsTag/CdsTag.css +0 -18
  588. package/dist/esm-node/src/components/CdsTag/api/CdsTag.props.mjs +72 -18
  589. package/dist/esm-node/src/components/CdsTagGroup/CdsTagGroup.css +0 -18
  590. package/dist/esm-node/src/components/CdsTagGroup/CdsTagGroup.vue_vue_type_script_setup_true_lang.mjs +20 -5
  591. package/dist/esm-node/src/components/CdsTagGroup/api/CdsTagGroup.props.mjs +11 -3
  592. package/dist/esm-node/src/components/CdsTextArea/CdsTextArea.css +0 -18
  593. package/dist/esm-node/src/components/CdsTextArea/api/CdsTextArea.props.mjs +52 -13
  594. package/dist/esm-node/src/components/CdsTextInput/CdsTextInput.css +0 -18
  595. package/dist/esm-node/src/components/CdsTextInput/api/CdsTextInput.props.mjs +40 -10
  596. package/dist/esm-node/src/components/CdsTimePicker/CdsTimePicker.css +0 -18
  597. package/dist/esm-node/src/components/CdsTimePicker/CdsTimePicker.vue_vue_type_script_setup_true_lang.mjs +24 -0
  598. package/dist/esm-node/src/components/CdsTimePicker/api/CdsTimePicker.props.mjs +32 -8
  599. package/dist/esm-node/src/components/CdsToast/CdsToast.css +0 -18
  600. package/dist/esm-node/src/components/CdsToast/api/CdsToast.props.mjs +48 -12
  601. package/dist/esm-node/src/components/CdsToastQueue/CdsToastQueue.vue_vue_type_script_setup_true_lang.mjs +4 -1
  602. package/dist/esm-node/src/components/CdsToastQueue/api/CdsToastQueue.props.mjs +28 -7
  603. package/dist/esm-node/src/components/CdsToggle/CdsToggle.css +0 -18
  604. package/dist/esm-node/src/components/CdsToggle/api/CdsToggle.props.mjs +12 -3
  605. package/dist/esm-node/src/components/CdsToolbar/CdsToolbar.css +0 -18
  606. package/dist/esm-node/src/components/CdsToolbar/api/CdsToolbar.props.mjs +20 -5
  607. package/dist/esm-node/src/components/CdsTooltip/CdsTooltip.css +0 -18
  608. package/dist/esm-node/src/components/CdsTooltip/api/CdsTooltip.props.mjs +20 -5
  609. package/dist/esm-node/src/components/CdsTree/CdsTree.css +0 -18
  610. package/dist/esm-node/src/components/CdsTree/CdsTree.vue_vue_type_script_setup_true_lang.mjs +16 -0
  611. package/dist/esm-node/src/components/CdsTree/composable/tree.mjs +28 -0
  612. package/dist/esm-node/src/components/CdsTree/composable/treeNode.mjs +68 -2
  613. package/dist/esm-node/src/components/CdsUploader/CdsUploader.css +0 -18
  614. package/dist/esm-node/src/components/CdsUploader/CdsUploader.vue_vue_type_script_setup_true_lang.mjs +8 -0
  615. package/dist/esm-node/src/components/CdsUploader/composables/useUpload.mjs +104 -26
  616. package/dist/esm-node/src/components/CdsVirtualScroll/CdsVirtualScroll.css +0 -18
  617. package/dist/esm-node/src/components/CdsVirtualScroll/CdsVirtualScroll.vue_vue_type_script_setup_true_lang.mjs +8 -0
  618. package/dist/esm-node/src/components/CdsVirtualScroll/api/CdsVirtualScroll.props.mjs +12 -3
  619. package/dist/esm-node/src/components/index.mjs +2 -1
  620. package/dist/esm-node/src/composables/useAppearance/useAppearance.mjs +4 -1
  621. package/dist/esm-node/src/composables/useColor/useColor.mjs +20 -5
  622. package/dist/esm-node/src/composables/useDatetime/useDatetime.mjs +3 -0
  623. package/dist/esm-node/src/composables/useDelay/useDelay.mjs +8 -2
  624. package/dist/esm-node/src/composables/useDimensions/useDimensions.mjs +24 -6
  625. package/dist/esm-node/src/composables/useDirection/useDirection.mjs +4 -1
  626. package/dist/esm-node/src/composables/useDisabled/index.mjs +1 -1
  627. package/dist/esm-node/src/composables/useDisabled/useDisabled.mjs +4 -1
  628. package/dist/esm-node/src/composables/useDisplay/useDisplay.mjs +2 -0
  629. package/dist/esm-node/src/composables/useFilter/useFilter.mjs +20 -0
  630. package/dist/esm-node/src/composables/useFocus/useFocus.mjs +12 -3
  631. package/dist/esm-node/src/composables/useFocus/useFocusTrap.mjs +8 -2
  632. package/dist/esm-node/src/composables/useForm/useForm.mjs +45 -0
  633. package/dist/esm-node/src/composables/useGroup/useGroup.mjs +24 -6
  634. package/dist/esm-node/src/composables/useGroup/useGroupItem.mjs +8 -2
  635. package/dist/esm-node/src/composables/useItems/useItems.mjs +32 -8
  636. package/dist/esm-node/src/composables/useLayout/useLayout.mjs +24 -6
  637. package/dist/esm-node/src/composables/useLazy/useLazy.mjs +1 -0
  638. package/dist/esm-node/src/composables/useLoader/index.mjs +1 -1
  639. package/dist/esm-node/src/composables/useLoader/useLoader.mjs +4 -1
  640. package/dist/esm-node/src/composables/useLocation/index.mjs +1 -1
  641. package/dist/esm-node/src/composables/useLocation/useLocation.mjs +4 -1
  642. package/dist/esm-node/src/composables/useNested/useNested.mjs +44 -11
  643. package/dist/esm-node/src/composables/usePosition/usePosition.mjs +4 -0
  644. package/dist/esm-node/src/composables/useReadonly/useReadonly.mjs +4 -1
  645. package/dist/esm-node/src/composables/useReveal/useReveal.mjs +4 -1
  646. package/dist/esm-node/src/composables/useRouter/index.mjs +1 -1
  647. package/dist/esm-node/src/composables/useRouter/useRouter.mjs +16 -4
  648. package/dist/esm-node/src/composables/useSize/useSize.mjs +4 -1
  649. package/dist/esm-node/src/composables/useStatus/useStatus.mjs +4 -1
  650. package/dist/esm-node/src/composables/useText/useText.mjs +8 -2
  651. package/dist/esm-node/src/composables/useTheme/useTheme.mjs +4 -1
  652. package/dist/esm-node/src/composables/useTransition/useTransition.mjs +4 -1
  653. package/dist/esm-node/src/composables/useValidation/useValidation.mjs +26 -6
  654. package/dist/esm-node/src/composables/useVirtual/useVirtual.mjs +12 -3
  655. package/dist/esm-node/src/core/defineComponent.mjs +4 -1
  656. package/dist/esm-node/src/themes/lumaDark.mjs +8 -4
  657. package/dist/esm-node/src/utils/date/date.mjs +4 -4
  658. package/dist/iife/entry.js +9 -9
  659. package/dist/styles/common.css +1 -1
  660. package/dist/styles/core.css +1 -1
  661. package/dist/styles/tailwind.css +1 -1
  662. package/dist/styles.css +2 -2
  663. package/dist/types/components/CdsApp/api/CdsApp.types.d.ts +4 -1
  664. package/dist/types/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +59 -20
  665. package/dist/types/components/CdsAutocomplete/api/CdsAutocomplete.types.d.ts +60 -15
  666. package/dist/types/components/CdsAutocomplete/index.d.ts +57 -30
  667. package/dist/types/components/CdsAvatar/api/CdsAvatar.types.d.ts +8 -2
  668. package/dist/types/components/CdsBadge/api/CdsBadge.types.d.ts +8 -2
  669. package/dist/types/components/CdsBreadcrumbs/api/CdsBreadcrumbs.types.d.ts +28 -7
  670. package/dist/types/components/CdsButton/CdsButton.vue.d.ts +4 -1
  671. package/dist/types/components/CdsButton/api/CdsButton.types.d.ts +20 -5
  672. package/dist/types/components/CdsButtonGroup/api/CdsButtonGroup.types.d.ts +4 -1
  673. package/dist/types/components/CdsButtonToggle/CdsButtonToggle.vue.d.ts +20 -5
  674. package/dist/types/components/CdsButtonToggle/api/CdsButtonToggle.types.d.ts +8 -2
  675. package/dist/types/components/CdsCard/CdsCardGroup.vue.d.ts +20 -5
  676. package/dist/types/components/CdsCard/api/CdsCard.types.d.ts +68 -17
  677. package/dist/types/components/CdsCarousel/api/CdsCarousel.types.d.ts +12 -3
  678. package/dist/types/components/CdsCheckbox/api/CdsCheckbox.types.d.ts +8 -2
  679. package/dist/types/components/CdsCheckboxButton/api/CdsCheckboxButton.types.d.ts +8 -0
  680. package/dist/types/components/CdsCombobox/CdsCombobox.vue.d.ts +67 -22
  681. package/dist/types/components/CdsCombobox/api/CdsCombobox.types.d.ts +60 -15
  682. package/dist/types/components/CdsCombobox/index.d.ts +57 -30
  683. package/dist/types/components/CdsCounter/api/CdsCounter.types.d.ts +4 -0
  684. package/dist/types/components/CdsDateInput/CdsDateInput.vue.d.ts +35 -10
  685. package/dist/types/components/CdsDateInput/api/CdsDateInput.types.d.ts +44 -11
  686. package/dist/types/components/CdsDateInput/index.d.ts +57 -30
  687. package/dist/types/components/CdsDatePicker/CdsDatePicker.vue.d.ts +20 -0
  688. package/dist/types/components/CdsDatePicker/api/CdsDatePicker.types.d.ts +28 -7
  689. package/dist/types/components/CdsDefaultsProvider/api/CdsDefaultsProvider.types.d.ts +1 -0
  690. package/dist/types/components/CdsDescription/api/CdsDescription.types.d.ts +4 -0
  691. package/dist/types/components/CdsDivider/CdsDivider.vue.d.ts +4 -0
  692. package/dist/types/components/CdsDrawer/CdsDrawer.vue.d.ts +4 -0
  693. package/dist/types/components/CdsDrawer/api/CdsDrawer.types.d.ts +24 -6
  694. package/dist/types/components/CdsEmptyState/api/CdsEmptyState.types.d.ts +36 -9
  695. package/dist/types/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +16 -4
  696. package/dist/types/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +8 -2
  697. package/dist/types/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +8 -2
  698. package/dist/types/components/CdsExpandablePanel/api/CdsExpandablePanel.types.d.ts +56 -14
  699. package/dist/types/components/CdsField/CdsField.vue.d.ts +18 -2
  700. package/dist/types/components/CdsField/api/CdsField.types.d.ts +33 -7
  701. package/dist/types/components/CdsField/index.d.ts +5 -0
  702. package/dist/types/components/CdsFileInput/CdsFileInput.vue.d.ts +5 -2
  703. package/dist/types/components/CdsFileInput/api/CdsFileInput.types.d.ts +28 -7
  704. package/dist/types/components/CdsFileInput/index.d.ts +15 -6
  705. package/dist/types/components/CdsFileUpload/CdsFileUpload.vue.d.ts +8 -0
  706. package/dist/types/components/CdsFileUpload/api/CdsFileUpload.types.d.ts +116 -29
  707. package/dist/types/components/CdsFooter/api/CdsFooter.types.d.ts +12 -3
  708. package/dist/types/components/CdsForm/api/CdsForm.types.d.ts +20 -5
  709. package/dist/types/components/CdsFunctionalButton/api/CdsFunctionalButton.types.d.ts +8 -2
  710. package/dist/types/components/CdsGrid/api/CdsGrid.types.d.ts +12 -0
  711. package/dist/types/components/CdsHeader/api/CdsHeader.types.d.ts +12 -3
  712. package/dist/types/components/CdsIcon/api/CdsIcon.types.d.ts +4 -1
  713. package/dist/types/components/CdsImage/CdsImage.vue.d.ts +20 -0
  714. package/dist/types/components/CdsImage/api/CdsImage.props.d.ts +4 -1
  715. package/dist/types/components/CdsImage/api/CdsImage.types.d.ts +28 -7
  716. package/dist/types/components/CdsInput/CdsInput.vue.d.ts +44 -11
  717. package/dist/types/components/CdsInput/api/CdsInput.types.d.ts +36 -9
  718. package/dist/types/components/CdsLabel/api/CdsLabel.types.d.ts +4 -0
  719. package/dist/types/components/CdsLayout/api/CdsLayout.types.d.ts +16 -4
  720. package/dist/types/components/CdsLink/api/CdsLink.types.d.ts +8 -2
  721. package/dist/types/components/CdsList/CdsList.vue.d.ts +24 -6
  722. package/dist/types/components/CdsList/CdsListGroup.vue.d.ts +4 -1
  723. package/dist/types/components/CdsList/CdsListItem.vue.d.ts +28 -7
  724. package/dist/types/components/CdsList/CdsListItemAction.vue.d.ts +20 -5
  725. package/dist/types/components/CdsList/CdsListItemDivider.vue.d.ts +4 -0
  726. package/dist/types/components/CdsList/CdsListItemMedia.vue.d.ts +20 -5
  727. package/dist/types/components/CdsList/CdsListSubheader.vue.d.ts +4 -1
  728. package/dist/types/components/CdsList/api/CdsList.types.d.ts +84 -21
  729. package/dist/types/components/CdsList/components/ListChildren.vue.d.ts +16 -4
  730. package/dist/types/components/CdsList/components/ListGroupActivator.vue.d.ts +4 -1
  731. package/dist/types/components/CdsList/index.d.ts +76 -0
  732. package/dist/types/components/CdsMain/api/CdsMain.types.d.ts +4 -1
  733. package/dist/types/components/CdsMenu/api/CdsMenu.types.d.ts +12 -0
  734. package/dist/types/components/CdsMessages/api/CdsMessages.types.d.ts +8 -0
  735. package/dist/types/components/CdsModal/api/CdsModal.types.d.ts +12 -3
  736. package/dist/types/components/CdsNotification/api/CdsNotification.types.d.ts +36 -9
  737. package/dist/types/components/CdsNotificationAlert/api/CdsNotificationAlert.types.d.ts +40 -10
  738. package/dist/types/components/CdsOtpInput/CdsOtpInput.vue.d.ts +20 -5
  739. package/dist/types/components/CdsOtpInput/api/CdsOtpInput.types.d.ts +36 -9
  740. package/dist/types/components/CdsOverlay/CdsOverlay.vue.d.ts +44 -11
  741. package/dist/types/components/CdsOverlay/api/CdsOverlay.types.d.ts +28 -3
  742. package/dist/types/components/CdsPage/api/CdsPage.types.d.ts +4 -1
  743. package/dist/types/components/CdsPagination/CdsPagination.vue.d.ts +16 -0
  744. package/dist/types/components/CdsPagination/api/CdsPagination.types.d.ts +44 -11
  745. package/dist/types/components/CdsProgressBar/api/CdsProgressBar.types.d.ts +8 -0
  746. package/dist/types/components/CdsProgressCircle/api/CdsProgressCircle.types.d.ts +4 -1
  747. package/dist/types/components/CdsRadioGroup/api/CdsRadioGroup.types.d.ts +8 -2
  748. package/dist/types/components/CdsResponsive/api/CdsResponsive.types.d.ts +8 -2
  749. package/dist/types/components/CdsSelect/CdsSelect.vue.d.ts +51 -18
  750. package/dist/types/components/CdsSelect/api/CdsSelect.types.d.ts +60 -15
  751. package/dist/types/components/CdsSelect/index.d.ts +57 -30
  752. package/dist/types/components/CdsSelectionControl/CdsSelectionControl.vue.d.ts +8 -0
  753. package/dist/types/components/CdsSelectionControl/api/CdsSelectionControl.types.d.ts +12 -3
  754. package/dist/types/components/CdsSelectionControlGroup/api/CdsSelectionControlGroup.types.d.ts +8 -0
  755. package/dist/types/components/CdsSkeletonLoader/api/CdsSkeletonLoader.types.d.ts +4 -1
  756. package/dist/types/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +24 -6
  757. package/dist/types/components/CdsSlideGroup/api/CdsSlideGroup.types.d.ts +20 -5
  758. package/dist/types/components/CdsSlideView/CdsSlideView.vue.d.ts +4 -0
  759. package/dist/types/components/CdsSlideView/CdsSlideViewItem.vue.d.ts +4 -0
  760. package/dist/types/components/CdsSlideView/api/CdsSlideView.types.d.ts +31 -0
  761. package/dist/types/components/CdsStages/CdsStages.vue.d.ts +8 -0
  762. package/dist/types/components/CdsStatus/api/CdsStatus.types.d.ts +4 -1
  763. package/dist/types/components/CdsSteps/CdsSteps.vue.d.ts +8 -0
  764. package/dist/types/components/CdsSteps/api/CdsSteps.types.d.ts +72 -18
  765. package/dist/types/components/CdsSurface/api/CdsSurface.types.d.ts +4 -1
  766. package/dist/types/components/CdsTable/CdsTable.vue.d.ts +4 -0
  767. package/dist/types/components/CdsTable/api/CdsTable.types.d.ts +96 -24
  768. package/dist/types/components/CdsTabs/api/CdsTabs.types.d.ts +32 -0
  769. package/dist/types/components/CdsTag/api/CdsTag.types.d.ts +64 -16
  770. package/dist/types/components/CdsTagGroup/CdsTagGroup.vue.d.ts +20 -5
  771. package/dist/types/components/CdsTagGroup/api/CdsTagGroup.types.d.ts +8 -2
  772. package/dist/types/components/CdsTextArea/CdsTextArea.vue.d.ts +5 -2
  773. package/dist/types/components/CdsTextArea/api/CdsTextArea.types.d.ts +24 -6
  774. package/dist/types/components/CdsTextArea/index.d.ts +15 -6
  775. package/dist/types/components/CdsTextInput/CdsTextInput.vue.d.ts +7 -4
  776. package/dist/types/components/CdsTextInput/api/CdsTextInput.types.d.ts +44 -11
  777. package/dist/types/components/CdsTextInput/index.d.ts +20 -11
  778. package/dist/types/components/CdsTimePicker/CdsTimePicker.vue.d.ts +24 -0
  779. package/dist/types/components/CdsTimePicker/api/CdsTimePicker.types.d.ts +4 -1
  780. package/dist/types/components/CdsToast/api/CdsToast.types.d.ts +40 -10
  781. package/dist/types/components/CdsToastQueue/CdsToastQueue.vue.d.ts +4 -1
  782. package/dist/types/components/CdsToastQueue/api/CdsToastQueue.types.d.ts +20 -5
  783. package/dist/types/components/CdsToggle/api/CdsToggle.types.d.ts +28 -7
  784. package/dist/types/components/CdsToolbar/api/CdsToolbar.types.d.ts +8 -2
  785. package/dist/types/components/CdsTooltip/api/CdsTooltip.types.d.ts +4 -0
  786. package/dist/types/components/CdsTree/CdsTree.vue.d.ts +16 -0
  787. package/dist/types/components/CdsTree/api/CdsTree.types.d.ts +84 -21
  788. package/dist/types/components/CdsUploader/CdsUploader.vue.d.ts +8 -0
  789. package/dist/types/components/CdsUploader/api/CdsUploader.types.d.ts +68 -17
  790. package/dist/types/components/CdsVirtualScroll/CdsVirtualScroll.vue.d.ts +8 -0
  791. package/dist/types/components/CdsVirtualScroll/api/CdsVirtualScroll.types.d.ts +20 -5
  792. package/dist/types/composables/useForm/useForm.d.ts +33 -0
  793. package/dist/types/composables/useLayout/context.d.ts +61 -0
  794. package/dist/types/composables/useNested/useNested.d.ts +8 -2
  795. package/dist/types/entry.d.ts +1 -0
  796. package/dist/types/themes/lumaDark.d.ts +4 -4
  797. package/dist/types/utils/date/date.d.ts +1 -1
  798. package/llms/llms-components.txt +8861 -10675
  799. package/llms/llms-full.txt +10309 -11489
  800. package/llms/llms-guides.txt +1400 -738
  801. package/llms/llms-migration.txt +18 -46
  802. package/llms/llms-tokens.txt +55 -55
  803. package/llms/llms.txt +110 -109
  804. package/package.json +24 -11
  805. package/src/components/CdsApp/CdsApp.scss +43 -0
  806. package/src/components/CdsApp/styles/_CdsApp.variables.scss +2 -0
  807. package/src/components/CdsAutocomplete/CdsAutocomplete.scss +158 -0
  808. package/src/components/CdsAutocomplete/styles/_CdsAutocomplete.variables.scss +9 -0
  809. package/src/components/CdsAvatar/CdsAvatar.scss +42 -0
  810. package/src/components/CdsAvatar/styles/_CdsAvatar.variables.scss +22 -0
  811. package/src/components/CdsBadge/CdsBadge.scss +69 -0
  812. package/src/components/CdsBadge/styles/_CdsBadge.variables.scss +22 -0
  813. package/src/components/CdsBreadcrumbs/CdsBreadcrumbs.scss +49 -0
  814. package/src/components/CdsBreadcrumbs/styles/_CdsBreadcrumbs.variables.scss +14 -0
  815. package/src/components/CdsButton/CdsButton.scss +138 -0
  816. package/src/components/CdsButton/styles/_CdsButton.mixins.scss +76 -0
  817. package/src/components/CdsButton/styles/_CdsButton.variables.scss +180 -0
  818. package/src/components/CdsButtonGroup/CdsButtonGroup.scss +62 -0
  819. package/src/components/CdsButtonGroup/styles/_CdsButtonGroup.variables.scss +7 -0
  820. package/src/components/CdsButtonToggle/CdsButtonToggle.scss +19 -0
  821. package/src/components/CdsButtonToggle/styles/_CdsButtonToggle.variables.scss +3 -0
  822. package/src/components/CdsCard/CdsCard.scss +194 -0
  823. package/src/components/CdsCard/styles/CdsCard.variables.scss +36 -0
  824. package/src/components/CdsCarousel/CdsCarousel.scss +76 -0
  825. package/src/components/CdsCarousel/styles/_CdsCarousel.variables.scss +7 -0
  826. package/src/components/CdsCheckbox/CdsCheckbox.scss +20 -0
  827. package/src/components/CdsCheckbox/styles/_CdsCheckbox.mixins.scss +24 -0
  828. package/src/components/CdsCheckbox/styles/_CdsCheckbox.variables.scss +8 -0
  829. package/src/components/CdsCheckboxButton/CdsCheckboxButton.scss +78 -0
  830. package/src/components/CdsCheckboxButton/styles/_CdsCheckboxButton.variables.scss +46 -0
  831. package/src/components/CdsCombobox/CdsCombobox.scss +158 -0
  832. package/src/components/CdsCombobox/styles/_CdsCombobox.variables.scss +9 -0
  833. package/src/components/CdsCounter/CdsCounter.scss +11 -0
  834. package/src/components/CdsCounter/styles/_CdsCounter.variables.scss +1 -0
  835. package/src/components/CdsDateInput/CdsDateInput.scss +28 -0
  836. package/src/components/CdsDateInput/styles/_CdsDateInput.variables.scss +6 -0
  837. package/src/components/CdsDatePicker/CdsDatePicker.scss +574 -0
  838. package/src/components/CdsDatePicker/styles/_CdsDatePicker.variables.scss +56 -0
  839. package/src/components/CdsDescription/CdsDescription.scss +12 -0
  840. package/src/components/CdsDescription/styles/_CdsDescription.variables.scss +1 -0
  841. package/src/components/CdsDivider/CdsDivider.scss +83 -0
  842. package/src/components/CdsDivider/styles/_CdsDivider.variables.scss +28 -0
  843. package/src/components/CdsDrawer/CdsDrawer.scss +144 -0
  844. package/src/components/CdsDrawer/styles/_CdsDrawer.variables.scss +17 -0
  845. package/src/components/CdsEmptyState/CdsEmptyState.scss +103 -0
  846. package/src/components/CdsEmptyState/styles/_CdsEmptyState.variables.scss +15 -0
  847. package/src/components/CdsExpandablePanel/CdsExpandablePanel.scss +221 -0
  848. package/src/components/CdsExpandablePanel/styles/_CdsExpandablePanel.variables.scss +24 -0
  849. package/src/components/CdsField/CdsField.scss +209 -0
  850. package/src/components/CdsField/styles/_CdsField.mixins.scss +39 -0
  851. package/src/components/CdsField/styles/_CdsField.variables.scss +84 -0
  852. package/src/components/CdsFileInput/CdsFileInput.scss +40 -0
  853. package/src/components/CdsFileInput/styles/_CdsFileInput.variables.scss +5 -0
  854. package/src/components/CdsFileUpload/CdsFileUpload.scss +173 -0
  855. package/src/components/CdsFileUpload/styles/_CdsFileUpload.variables.scss +40 -0
  856. package/src/components/CdsFooter/CdsFooter.scss +36 -0
  857. package/src/components/CdsFooter/styles/_CdsFooter.variables.scss +4 -0
  858. package/src/components/CdsForm/CdsForm.scss +24 -0
  859. package/src/components/CdsForm/styles/_CdsForm.variables.scss +5 -0
  860. package/src/components/CdsFunctionalButton/CdsFunctionalButton.scss +49 -0
  861. package/src/components/CdsFunctionalButton/styles/_CdsFunctionalButton.variables.scss +25 -0
  862. package/src/components/CdsGrid/components/CSSGrid.scss +3 -0
  863. package/src/components/CdsGrid/components/FlexGrid.scss +3 -0
  864. package/src/components/CdsHeader/CdsHeader.scss +36 -0
  865. package/src/components/CdsHeader/styles/_CdsHeader.variables.scss +3 -0
  866. package/src/components/CdsHighlight/CdsHighlight.scss +16 -0
  867. package/src/components/CdsHighlight/styles/_CdsHighlight.variables.scss +8 -0
  868. package/src/components/CdsIcon/CdsIcon.scss +54 -0
  869. package/src/components/CdsIcon/styles/_CdsIcon.variables.scss +20 -0
  870. package/src/components/CdsImage/CdsImage.scss +62 -0
  871. package/src/components/CdsImage/styles/_CdsImage.variables.scss +4 -0
  872. package/src/components/CdsInput/CdsInput.scss +108 -0
  873. package/src/components/CdsInput/styles/_CdsInput.mixins.scss +54 -0
  874. package/src/components/CdsInput/styles/_CdsInput.variables.scss +98 -0
  875. package/src/components/CdsLabel/CdsLabel.scss +23 -0
  876. package/src/components/CdsLabel/styles/_CdsLabel.variables.scss +2 -0
  877. package/src/components/CdsLayout/CdsLayout.scss +61 -0
  878. package/src/components/CdsLayout/styles/_CdsLayout.variables.scss +2 -0
  879. package/src/components/CdsLink/CdsLink.scss +33 -0
  880. package/src/components/CdsLink/styles/_CdsLink.variables.scss +6 -0
  881. package/src/components/CdsList/CdsList.scss +104 -0
  882. package/src/components/CdsList/CdsListItem.scss +330 -0
  883. package/src/components/CdsList/styles/_CdsList.variables.scss +115 -0
  884. package/src/components/CdsLoader/CdsLoader.scss +78 -0
  885. package/src/components/CdsLoader/styles/_CdsLoader.mixins.scss +9 -0
  886. package/src/components/CdsLoader/styles/_CdsLoader.variables.scss +40 -0
  887. package/src/components/CdsMain/CdsMain.scss +7 -0
  888. package/src/components/CdsMenu/CdsMenu.scss +33 -0
  889. package/src/components/CdsMenu/styles/_CdsMenu.variables.scss +11 -0
  890. package/src/components/CdsMessages/CdsMessages.scss +20 -0
  891. package/src/components/CdsMessages/styles/_CdsMessages.variables.scss +5 -0
  892. package/src/components/CdsModal/CdsModal.scss +106 -0
  893. package/src/components/CdsModal/styles/_CdsModal.variables.scss +12 -0
  894. package/src/components/CdsNotification/CdsNotification.scss +99 -0
  895. package/src/components/CdsNotification/styles/_CdsNotification.variables.scss +13 -0
  896. package/src/components/CdsNotificationAlert/CdsNotificationAlert.scss +48 -0
  897. package/src/components/CdsNotificationAlert/styles/_CdsNotificationAlert.variables.scss +5 -0
  898. package/src/components/CdsOtpInput/CdsOtpInput.scss +192 -0
  899. package/src/components/CdsOtpInput/styles/_CdsOtpInput.variables.scss +31 -0
  900. package/src/components/CdsOverlay/CdsOverlay.scss +74 -0
  901. package/src/components/CdsOverlay/styles/_CdsOverlay.variables.scss +2 -0
  902. package/src/components/CdsPage/CdsPage.scss +9 -0
  903. package/src/components/CdsPagination/CdsPagination.scss +69 -0
  904. package/src/components/CdsPagination/styles/_CdsPagination.variables.scss +10 -0
  905. package/src/components/CdsProgressBar/CdsProgressBar.scss +285 -0
  906. package/src/components/CdsProgressBar/styles/_CdsProgressBar.variables.scss +23 -0
  907. package/src/components/CdsProgressCircle/CdsProgressCircle.scss +116 -0
  908. package/src/components/CdsProgressCircle/styles/_CdsProgressCircle.variables.scss +21 -0
  909. package/src/components/CdsRadio/CdsRadio.scss +42 -0
  910. package/src/components/CdsRadio/styles/_CdsRadio.variables.scss +26 -0
  911. package/src/components/CdsRadioGroup/CdsRadioGroup.scss +24 -0
  912. package/src/components/CdsRadioGroup/styles/_CdsRadioGroup.variables.scss +4 -0
  913. package/src/components/CdsResponsive/CdsResponsive.scss +33 -0
  914. package/src/components/CdsResponsive/styles/_CdsResponsive.variables.scss +3 -0
  915. package/src/components/CdsSelect/CdsSelect.scss +149 -0
  916. package/src/components/CdsSelect/styles/_CdsSelect.variables.scss +7 -0
  917. package/src/components/CdsSelectionControl/CdsSelectionControl.scss +104 -0
  918. package/src/components/CdsSelectionControlGroup/CdsSelectionControlGroup.scss +17 -0
  919. package/src/components/CdsSkeletonLoader/CdsSkeletonLoader.scss +292 -0
  920. package/src/components/CdsSkeletonLoader/styles/_CdsSkeletonLoader.variables.scss +52 -0
  921. package/src/components/CdsSlideGroup/CdsSlideGroup.scss +63 -0
  922. package/src/components/CdsSlideGroup/styles/_CdsSlideGroup.variables.scss +1 -0
  923. package/src/components/CdsSlideView/CdsSlideView.scss +183 -0
  924. package/src/components/CdsSlideView/styles/_CdsSlideView.variables.scss +4 -0
  925. package/src/components/CdsStages/CdsStages.scss +109 -0
  926. package/src/components/CdsStages/styles/_CdsStages.variables.scss +17 -0
  927. package/src/components/CdsStatus/CdsStatus.scss +49 -0
  928. package/src/components/CdsStatus/styles/_CdsStatus.variables.scss +7 -0
  929. package/src/components/CdsSteps/CdsSteps.scss +216 -0
  930. package/src/components/CdsSteps/styles/_CdsSteps.variables.scss +42 -0
  931. package/src/components/CdsSurface/CdsSurface.scss +16 -0
  932. package/src/components/CdsTable/CdsTable.scss +1140 -0
  933. package/src/components/CdsTable/styles/_CdsTable.mixins.scss +86 -0
  934. package/src/components/CdsTable/styles/_CdsTable.variables.scss +82 -0
  935. package/src/components/CdsTabs/CdsTabs.scss +94 -0
  936. package/src/components/CdsTabs/styles/_CdsTabs.variables.scss +30 -0
  937. package/src/components/CdsTag/CdsTag.scss +141 -0
  938. package/src/components/CdsTag/styles/_CdsTag.variables.scss +57 -0
  939. package/src/components/CdsTagGroup/CdsTagGroup.scss +32 -0
  940. package/src/components/CdsTagGroup/styles/_CdsTagGroup.variables.scss +8 -0
  941. package/src/components/CdsTextArea/CdsTextArea.scss +129 -0
  942. package/src/components/CdsTextArea/styles/_CdsTextArea.variables.scss +6 -0
  943. package/src/components/CdsTextInput/CdsTextInput.scss +84 -0
  944. package/src/components/CdsTextInput/styles/_CdsTextInput.variables.scss +7 -0
  945. package/src/components/CdsTimePicker/CdsTimePicker.scss +93 -0
  946. package/src/components/CdsTimePicker/styles/_CdsTimePicker.variables.scss +13 -0
  947. package/src/components/CdsToast/CdsToast.scss +207 -0
  948. package/src/components/CdsToast/styles/_CdsToast.variables.scss +16 -0
  949. package/src/components/CdsToggle/CdsToggle.scss +192 -0
  950. package/src/components/CdsToggle/styles/_CdsToggle.variables.scss +81 -0
  951. package/src/components/CdsToolbar/CdsToolbar.scss +72 -0
  952. package/src/components/CdsToolbar/styles/_CdsToolbar.variables.scss +3 -0
  953. package/src/components/CdsTooltip/CdsTooltip.scss +111 -0
  954. package/src/components/CdsTooltip/styles/_CdsTooltip.variables.scss +15 -0
  955. package/src/components/CdsTree/CdsTree.scss +290 -0
  956. package/src/components/CdsTree/styles/_CdsTree.variables.scss +29 -0
  957. package/src/components/CdsUploader/CdsUploader.scss +109 -0
  958. package/src/components/CdsUploader/styles/_CdsUploader.variables.scss +16 -0
  959. package/src/components/CdsVirtualScroll/CdsVirtualScroll.scss +16 -0
  960. package/src/components/CdsVirtualScroll/styles/_CdsVirtualScroll.variables.scss +3 -0
  961. package/src/styles/component-settings.scss +75 -0
  962. package/src/styles/generic/_fonts.scss +2 -2
  963. package/src/styles/settings/_index.scss +6 -0
  964. package/src/styles/tools/_absolute.sass +9 -0
  965. package/src/styles/tools/_border.sass +10 -0
  966. package/src/styles/tools/_motion.scss +11 -17
  967. package/src/styles/utilities/grid/_config.scss +0 -1
  968. package/src/themes/lumaDark.ts +8 -4
  969. package/dist/styles/breakpoints.css +0 -1
  970. package/dist/styles/index.css +0 -1
@@ -1,21 +1,20 @@
1
- # Central Design System (CDS 4) — гайды
1
+ # Central Design System (CDS 4) — guides
2
2
 
3
- > Версия: 4.0.0-alpha.4
4
- > Подключение, конвенции, формы, тематизация, Tailwind CSS, tree-shaking и адаптив.
5
- > Сгенерировано автоматически (`bun run generate:meta` → `bun run generate:llms`). Не редактировать вручную.
3
+ > Version: 4.0.0-alpha.5
4
+ > Setup, conventions, forms, theming, Tailwind CSS, tree-shaking, and responsiveness.
5
+ > Generated automatically (`bun run generate:meta` → `bun run generate:llms`). Do not edit manually.
6
6
 
7
7
  ---
8
8
 
9
- # Подключение и темы
9
+ # Setup and themes
10
10
 
11
- ## Установка
11
+ ## Installation
12
12
 
13
13
  ```bash
14
- bun add @central-design-system/components
15
- # или npm i / yarn add / pnpm add
14
+ npm install @central-design-system/components
16
15
  ```
17
16
 
18
- ## Подключение к приложению
17
+ ## Wiring it into the app
19
18
 
20
19
  ```ts
21
20
  import { createApp } from 'vue';
@@ -27,31 +26,32 @@ const cds = createCds({ components, directives });
27
26
  createApp(App).use(cds).mount('#app');
28
27
  ```
29
28
 
30
- После этого все компоненты доступны глобально: `<CdsButton appearance="primary">Нажми меня</CdsButton>`.
29
+ After that every component is available globally: `<CdsButton appearance="primary">Click me</CdsButton>`.
31
30
 
32
- Это полная регистрацияона подключает всю библиотеку. Для продуктовых приложений
33
- регистрируй компоненты точечно, см. гайд Tree-shaking.
31
+ This is the full registration it pulls in the entire library. For production
32
+ apps register components individually, see the Tree-shaking guide.
34
33
 
35
- ## Точки входа стилей
34
+ ## Style entry points
36
35
 
37
- | Импорт | Что подключает |
36
+ | Import | What it provides |
38
37
  | --- | --- |
39
- | `@central-design-system/components/styles` | Агрегат: CSS всех компонентов (~556 KB). Быстрый старт, tree-shaking отключён |
40
- | `@central-design-system/components/styles/common.css` | Базовый слой (~9 KB): слои, reset, шрифты, типографика, grid |
41
- | `@central-design-system/components/styles/core` | Только слои, шрифты и reset — без типографики |
42
- | `@central-design-system/components/styles/utilities` | Утилитарные классы |
43
- | `@central-design-system/components/styles/tailwind` | Слой интеграции с Tailwind CSS |
44
- | `@central-design-system/components/styles/legacy` | Legacy-утилиты для миграции с CDS 3 |
38
+ | `@central-design-system/components/styles` | Aggregate: CSS of every component (~556 KB). Quick start, tree-shaking disabled |
39
+ | `@central-design-system/components/styles/common.css` | Base layer (~9 KB): layers, reset, fonts, typography, grid |
40
+ | `@central-design-system/components/styles/core` | Only layers, fonts and reset — no typography |
41
+ | `@central-design-system/components/styles/utilities` | Utility classes |
42
+ | `@central-design-system/components/styles/tailwind` | Tailwind CSS integration layer |
43
+ | `@central-design-system/components/styles/legacy` | Legacy utilities for migrating from CDS 3 |
45
44
 
46
- При точечной регистрации подключается только базовый слой `styles/common.css`
47
- CSS каждого компонента приезжает вместе с самим компонентом.
45
+ With per-component registration you only include the base layer
46
+ `styles/common.css` each component ships its own CSS alongside the
47
+ component itself.
48
48
 
49
- Интеграция с Tailwind CSS v4 (установка, слои, утилиты на CDS-токенах) —
50
- в гайде Tailwind CSS + CDS.
49
+ Tailwind CSS v4 integration (installation, layers, utilities built on CDS
50
+ tokens) is covered in the Tailwind CSS + CDS guide.
51
51
 
52
- ## Темы
52
+ ## Themes
53
53
 
54
- Тема задаётся при инициализации через `createCds`:
54
+ The theme is set at initialization via `createCds`:
55
55
 
56
56
  ```ts
57
57
  const cds = createCds({
@@ -61,17 +61,17 @@ const cds = createCds({
61
61
  });
62
62
  ```
63
63
 
64
- Встроенные темы: `cdsLight` (по умолчанию), `cdsDark`, `b2bLight`, `b2bDark`,
65
- `promoLight`, `promoDark`. Значения всех цветовых токенов каждой темы
66
- в ../tokens/themes.md.
64
+ Built-in themes: `cdsLight` (default), `cdsDark`, `b2bLight`, `b2bDark`,
65
+ `promoLight`, `promoDark`. The values of every color token in each theme
66
+ are listed in ../tokens/themes.md.
67
67
 
68
- Своя тема, смена темы в рантайме и отключение темизации в гайде
69
- Тематизация.
68
+ Custom themes, runtime theme switching and disabling theming are covered in
69
+ the Theming guide.
70
70
 
71
- ## Иконки
71
+ ## Icons
72
72
 
73
- По умолчанию активен встроенный iconpack `cds`. Доступны и другие наборы
74
- (`carbon`, `lucide`, `phosphor`, `remix`):
73
+ The built-in `cds` iconpack is active by default. Other packs are available
74
+ too (`carbon`, `lucide`, `phosphor`, `remix`):
75
75
 
76
76
  ```ts
77
77
  import { createCds, iconsets } from '@central-design-system/components';
@@ -85,95 +85,96 @@ createCds({
85
85
  });
86
86
  ```
87
87
 
88
- Пакет `@central-design-system/icons` (CDS 3) deprecated, см.
89
- миграцию.
88
+ The `@central-design-system/icons` package (CDS 3) is deprecated, see the
89
+ migration guide.
90
90
 
91
91
  ---
92
92
 
93
- # Конвенции CDS 4
93
+ # CDS 4 conventions
94
94
 
95
- Главное правило: **источник истины `api.md` компонента**
96
- (`references/components/<имя>/api.md`). Не выдумывай пропсы, события и слоты —
97
- если их нет в api.md, их нет в компоненте.
95
+ The golden rule: **the source of truth is the component's `api.md`**
96
+ (`references/components/<name>/api.md`). Do not invent props, events or
97
+ slots if they are not in api.md, they do not exist on the component.
98
98
 
99
- ## Единые пропсы
99
+ ## Shared props
100
100
 
101
- Пропсы ниже приходят из общих composable-фабрик и ведут себя одинаково во всех
102
- компонентах, где присутствуют:
101
+ The props below come from shared composable factories and behave identically
102
+ in every component that has them:
103
103
 
104
- | Проп | Семантика |
104
+ | Prop | Semantics |
105
105
  | --- | --- |
106
- | `size` | Размер: `xs` / `sm` / `md` / `lg` / `xl` или число |
107
- | `appearance` | Внешний вид (вариант оформления), набор значений у каждого компонента свойсмотри тип в api.md |
108
- | `color` / `bgColor` | Цвет контента / фона **токеном темы**, не CSS-значением |
109
- | `disabled` | Заблокированное состояние |
110
- | `loading` | Состояние загрузки |
111
- | `width` / `height` | Габариты (число → px или CSS-значение строкой) |
106
+ | `size` | Size: `xs` / `sm` / `md` / `lg` / `xl` or a number |
107
+ | `appearance` | Appearance (visual variant); the set of values is component-specificcheck the type in api.md |
108
+ | `color` / `bgColor` | Content / background color as a **theme token**, not a CSS value |
109
+ | `disabled` | Disabled state |
110
+ | `loading` | Loading state |
111
+ | `width` / `height` | Dimensions (number → px, or a CSS value as a string) |
112
112
 
113
- ## Токены, не raw-значения
113
+ ## Tokens, not raw values
114
114
 
115
- - Цвета задаются через проп `color` / токены темы (`--cds-color-*`), а не
116
- произвольным CSS (`#fff`, `red`). Токены тем в ../tokens/themes.md.
117
- - Отступы, радиусы и прочие величины в кастомном SCSS через глобальные
118
- `--cds-*` переменные, а не хардкод.
115
+ - Set colors via the `color` prop / theme tokens (`--cds-color-*`), never
116
+ arbitrary CSS (`#fff`, `red`). Theme tokens are listed in ../tokens/themes.md.
117
+ - Spacing, radii and other values in custom SCSS go through the global
118
+ `--cds-*` variables, never hardcoded.
119
119
 
120
120
  ## Atomic Design
121
121
 
122
- Сложный UI собирается композицией из атомов. Примерформа: готовая «молекула»
123
- `CdsTextInput` внутри устроена как `CdsField` + `CdsLabel` + `CdsDescription` +
124
- `CdsMessages` + `CdsInput`, и те же атомы доступны для сборки собственных полей.
125
- Подробнее в гайде «Формы».
122
+ Complex UI is composed from atoms. Examplea form: the ready-made
123
+ `CdsTextInput` "molecule" is internally built as `CdsField` + `CdsLabel` +
124
+ `CdsDescription` + `CdsMessages` + `CdsInput`, and the same atoms are
125
+ available for building your own fields. See the Forms guide
126
+ for details.
126
127
 
127
- ## Значения по умолчанию (Defaults)
128
+ ## Defaults
128
129
 
129
- Дефолты пропсов можно задать централизованно:
130
+ Prop defaults can be set centrally:
130
131
 
131
- - глобальночерез опцию `defaults` в `createCds({ defaults: { CdsButton: { size: 'lg' } } })`;
132
- - для поддеревакомпонентом `CdsDefaultsProvider`
132
+ - globallyvia the `defaults` option in `createCds({ defaults: { CdsButton: { size: 'lg' } } })`;
133
+ - for a subtree with the `CdsDefaultsProvider` component
133
134
  (api).
134
135
 
135
- ## Устаревшие API
136
+ ## Deprecated APIs
136
137
 
137
- Пропсы/компоненты, помеченные `_(deprecated)_` в api.md, работают, но будут
138
- удалены. В dev-консоли они дают предупреждение с префиксом `[CDS UPGRADE]`.
139
- При миграции со старого кода смотри гайд миграции.
138
+ Props/components marked `_(deprecated)_` in api.md still work but will be
139
+ removed. In the dev console they emit a warning prefixed `[CDS UPGRADE]`.
140
+ When migrating legacy code, see the migration guide.
140
141
 
141
142
  ---
142
143
 
143
- # Формы на CDS 4
144
+ # Forms with CDS 4
144
145
 
145
- ## Готовые контролы
146
+ ## Ready-made controls
146
147
 
147
- Для типовых форм используй готовые «молекулы» (у каждой свой `api.md` и
148
- `examples.md` в `references/components/`):
148
+ For typical forms use the ready-made "molecules" (each has its own `api.md`
149
+ and `examples.md` in `references/components/`):
149
150
 
150
- | Контрол | Назначение |
151
+ | Control | Purpose |
151
152
  | --- | --- |
152
- | CdsTextInput | Текстовое поле с label / description / messages |
153
- | CdsSelect | Выпадающий список (single / multiple) |
154
- | CdsAutocomplete | Выбор с поиском по списку |
155
- | CdsCombobox | Выбор с возможностью ввода произвольного значения |
156
- | CdsCheckbox | Чекбокс |
157
- | CdsRadioGroup | Группа радиокнопок |
158
- | CdsToggle | Переключатель |
159
- | CdsDatePicker / CdsTimePicker | Дата / время |
153
+ | CdsTextInput | Text field with label / description / messages |
154
+ | CdsSelect | Dropdown (single / multiple) |
155
+ | CdsAutocomplete | Selection with search over the list |
156
+ | CdsCombobox | Selection that also accepts free-form input |
157
+ | CdsCheckbox | Checkbox |
158
+ | CdsRadioGroup | Radio button group |
159
+ | CdsToggle | Toggle |
160
+ | CdsDatePicker / CdsTimePicker | Date / time |
160
161
 
161
- ## CdsForm: агрегация и валидация
162
+ ## CdsForm: aggregation and validation
162
163
 
163
- `CdsForm` объединяет поля, агрегирует их валидацию (`v-model` — валидность
164
- формы) и даёт методы `validate` / `reset` / `resetValidation` через слот-пропсы
165
- и exposed API. Правила валидации задаются на полях пропом `rules`
166
- (массив функций `значение → true | 'текст ошибки'`).
164
+ `CdsForm` groups fields, aggregates their validation (`v-model` — form
165
+ validity) and exposes `validate` / `reset` / `resetValidation` methods via
166
+ slot props and the exposed API. Validation rules are set on the fields with
167
+ the `rules` prop (an array of functions `value → true | 'error text'`).
167
168
 
168
- Проверенный пример (из Storybook):
169
+ A verified example (from Storybook):
169
170
 
170
171
  ```html
171
172
  <CdsForm v-model="valid" @submit.prevent>
172
173
  <template #default="{ reset }">
173
- <CdsTextInput v-model="name" :rules="rules.name" label="Имя" placeholder="Введите имя" />
174
- <CdsTextInput v-model="email" :rules="rules.email" label="Email" placeholder="Введите Email" />
175
- <CdsButton appearance="secondary" @click="reset">Очистить</CdsButton>
176
- <CdsButton type="submit">Отправить</CdsButton>
174
+ <CdsTextInput v-model="name" :rules="rules.name" label="Name" placeholder="Enter name" />
175
+ <CdsTextInput v-model="email" :rules="rules.email" label="Email" placeholder="Enter Email" />
176
+ <CdsButton appearance="secondary" @click="reset">Clear</CdsButton>
177
+ <CdsButton type="submit">Submit</CdsButton>
177
178
  </template>
178
179
  </CdsForm>
179
180
  ```
@@ -185,111 +186,116 @@ const email = ref('');
185
186
 
186
187
  const rules = {
187
188
  name: [
188
- (value: string) => !!value || 'Не может быть пустым',
189
- (value: string) => value.length <= 10 || 'Не более 10 символов'
189
+ (value: string) => !!value || 'Must not be empty',
190
+ (value: string) => value.length <= 10 || 'No more than 10 characters'
190
191
  ],
191
192
  email: [
192
- (value: string) => !!value || 'Не может быть пустым',
193
- (value: string) => /.+@.+\..+/.test(value) || 'Неверный формат'
193
+ (value: string) => !!value || 'Must not be empty',
194
+ (value: string) => /.+@.+\..+/.test(value) || 'Invalid format'
194
195
  ]
195
196
  };
196
197
  ```
197
198
 
198
- Полезные режимы (полный список в api.md):
199
+ Useful modes (full list in api.md):
199
200
 
200
- - `first-fail` — валидация останавливается на первом невалидном поле;
201
- - `disabled` / `readonly` на форме прокидываются во все вложенные поля.
201
+ - `first-fail` — validation stops at the first invalid field;
202
+ - `disabled` / `readonly` on the form propagate to every nested field.
202
203
 
203
- CdsForm совместим и с внешними валидаторами (vuelidate, vee-validate) — см.
204
+ CdsForm also works with external validators (vuelidate, vee-validate) — see
204
205
  examples.md.
205
206
 
206
- ## Атомарная сборка собственного поля
207
+ ## Building your own field from atoms
207
208
 
208
- Когда готовой молекулы не хватает, поле собирается из атомов:
209
+ When no ready-made molecule fits, assemble the field from atoms:
209
210
 
210
- | Атом | Роль |
211
+ | Atom | Role |
211
212
  | --- | --- |
212
- | CdsField | Обёртка поля: связывает label/контрол/сообщения, состояния |
213
- | CdsLabel | Подпись поля |
214
- | CdsDescription | Вспомогательное описание |
215
- | CdsMessages | Сообщения об ошибках / подсказки |
216
- | CdsInput | Голый контрол ввода |
213
+ | CdsField | Field wrapper: wires up label/control/messages, states |
214
+ | CdsLabel | Field label |
215
+ | CdsDescription | Supporting description |
216
+ | CdsMessages | Error messages / hints |
217
+ | CdsInput | Bare input control |
217
218
 
218
- Перед сборкой открой `api.md` каждого атомасостав пропсов и слотов бери
219
- только оттуда.
219
+ Before assembling, open the `api.md` of every atom take the set of props
220
+ and slots only from there.
220
221
 
221
222
  ---
222
223
 
223
- # Миграция CDS 3 → CDS 4 (дайджест)
224
+ # CDS 3 → CDS 4 migration (digest)
224
225
 
225
- Это краткий дайджест. **Полная версия с Before/After по каждому изменению —
226
- `MIGRATION.md` в корне npm-пакета `@central-design-system/components`.**
226
+ This is a short digest. **The full version with Before/After for every
227
+ change is `MIGRATION.md` at the root of the
228
+ `@central-design-system/components` npm package.**
227
229
 
228
- ## Легенда severity
230
+ ## Severity legend
229
231
 
230
- | Маркер | Что значит |
232
+ | Marker | Meaning |
231
233
  | --- | --- |
232
- | ⚠️ **BREAKING** | Ломает существующий кодобязательное действие |
233
- | 🔁 **RENAMED** | Переименованиемеханический поиск/замена |
234
- | 🟠 **DEPRECATED** | Работает в 4.x, будет удалено в 5.x |
235
- | ✨ **NEW** | Новая возможность без ломки |
234
+ | ⚠️ **BREAKING** | Breaks existing codeaction required |
235
+ | 🔁 **RENAMED** | Renamemechanical search & replace |
236
+ | 🟠 **DEPRECATED** | Works in 4.x, will be removed in 5.x |
237
+ | ✨ **NEW** | New capability, nothing breaks |
236
238
 
237
- ## Быстрый чек-лист
239
+ ## Quick checklist
238
240
 
239
- - [ ] Заменить импорт CSS: `@central-design-system/components/dist/cds.css` →
241
+ - [ ] Replace the CSS import: `@central-design-system/components/dist/cds.css` →
240
242
  `@central-design-system/components/styles` (⚠️ breaking).
241
- - [ ] Если используете `@central-design-system/icons` — пакет 🟠 deprecated;
242
- перейти на iconpacks через `createCds({ icons })` (см. setup.md).
243
- - [ ] Пройтись по индексу переименований компонентов ниже.
244
- - [ ] Прогнать сборку и проверить dev-консоль: предупреждения `[CDS UPGRADE]`
245
- указывают на устаревшие пропсы.
243
+ - [ ] If you use `@central-design-system/icons` — the package is 🟠 deprecated;
244
+ switch to iconpacks via `createCds({ icons })` (see setup.md).
245
+ - [ ] Go through the component rename index below.
246
+ - [ ] Run the build and check the dev console: `[CDS UPGRADE]` warnings
247
+ point at deprecated props.
246
248
 
247
- ## Ключевые breaking-изменения
249
+ ## Key breaking changes
248
250
 
249
- - ⚠️ **Путь импорта CSS** — `dist/cds.css` больше не публичная точка входа,
250
- подключать `@central-design-system/components/styles`.
251
- - ⚠️ **Legacy reset выключен по умолчанию**глобальный reset из CDS 3 теперь
251
+ - ⚠️ **CSS import path** — `dist/cds.css` is no longer a public entry point;
252
+ import `@central-design-system/components/styles` instead.
253
+ - ⚠️ **Legacy reset is off by default** the global reset from CDS 3 is now
252
254
  opt-in: `@use '@central-design-system/components/styles' with ($legacy-reset: true);`.
253
- - ⚠️ **CSS-архитектура на ITCSS + CSS Layers** — каскад определяется нативными
254
- `@layer`; глобальные переопределения стилей CDS без `!important` могут
255
- сработать иначе.
255
+ - ⚠️ **CSS architecture on ITCSS + CSS Layers** — the cascade is driven by
256
+ native `@layer`; global overrides of CDS styles without `!important` may
257
+ now resolve differently.
256
258
 
257
- ## Индекс переименований и удалений компонентов
259
+ ## Component rename and removal index
258
260
 
259
261
  | CDS 3 | CDS 4 |
260
262
  | --- | --- |
261
- | `CdsDropdown` | 🔁 `CdsSelect` (нативный `<select>` из CDS 3 — через проп `native-select`) |
263
+ | `CdsDropdown` | 🔁 `CdsSelect` (the native `<select>` from CDS 3 — via the `native-select` prop) |
262
264
  | `CdsRadioButton` | 🔁 `CdsRadioGroup` |
263
265
  | `CdsProgress` | 🔁 `CdsProgressBar` |
264
266
  | `CdsTabsV2` | 🔁 `CdsTabs` |
265
- | `CdsCheckboxGroup` | ⚠️ удалён (использовать `CdsCheckbox` самостоятельно) |
266
- | `CdsContainer` | ⚠️ удалён |
267
- | `CdsBadge` | 🔁 пропсы: `count`→`content`, `limited`→`:max`; ⚠️ удалён `invertColor` |
267
+ | `CdsCheckboxGroup` | ⚠️ removed (use `CdsCheckbox` on its own) |
268
+ | `CdsContainer` | ⚠️ removed |
269
+ | `CdsBadge` | 🔁 props: `count`→`content`, `limited`→`:max`; ⚠️ `invertColor` removed |
268
270
 
269
- После переименования сверься с `api.md` нового компонента в
270
- `../components/` — контракты пропсов могли измениться.
271
+ After renaming, double-check the `api.md` of the new component in
272
+ `../components/` — prop contracts may have changed.
271
273
 
272
274
  ---
273
275
 
276
+ ---
277
+ sourceHash: abc11a2cdeb9c401a04b865e6fd89a2c3f36d3a5
278
+ ---
279
+
274
280
  # Tailwind CSS v4 + CDS 4
275
281
 
276
- Для проектов на Vite подключайте Tailwind CSS v4 по официальной инструкции Tailwind:
277
- [Installing Tailwind CSS with Vite](https://tailwindcss.com/docs/installation/using-vite).
282
+ For Vite projects, install Tailwind CSS v4 by following the official Tailwind
283
+ guide: [Installing Tailwind CSS with Vite](https://tailwindcss.com/docs/installation/using-vite).
278
284
 
279
- Ниже показана рекомендуемая интеграция CDS 4 с Tailwind CSS v4.
285
+ Below is the recommended way to integrate CDS 4 with Tailwind CSS v4.
280
286
 
281
- - Vite-плагин подключается в `vite.config.ts`
282
- - CSS-слой Tailwind подключается в `main.ts`
287
+ - The Vite plugin goes into `vite.config.ts`
288
+ - Tailwind's CSS layer goes into `main.ts`
283
289
 
284
- ## 1. Установите Tailwind CSS
290
+ ## 1. Install Tailwind CSS
285
291
 
286
292
  ```bash
287
293
  npm install -D tailwindcss @tailwindcss/vite
288
294
  ```
289
295
 
290
- ## 2. Подключите Vite-плагин
296
+ ## 2. Add the Vite plugin
291
297
 
292
- Добавьте `@tailwindcss/vite` в `vite.config.ts`:
298
+ Add `@tailwindcss/vite` to `vite.config.ts`:
293
299
 
294
300
  ```ts
295
301
  import { defineConfig } from 'vite';
@@ -300,9 +306,9 @@ export default defineConfig({
300
306
  });
301
307
  ```
302
308
 
303
- ## 3. Создайте файл `tailwind.css`
309
+ ## 3. Create a `tailwind.css` file
304
310
 
305
- Например, `src/tailwind.css`:
311
+ For example, `src/tailwind.css`:
306
312
 
307
313
  ```css
308
314
  @import "@central-design-system/components/styles/tailwind";
@@ -310,9 +316,10 @@ export default defineConfig({
310
316
  @import "tailwindcss/utilities" layer(cds-utilities.tailwind);
311
317
  ```
312
318
 
313
- Такой вариант подключает CDS-токены в Tailwind. `preflight` отдельно не нужен, потому что базовые reset-стили уже приходят из `@central-design-system/components/styles`.
319
+ This wires CDS tokens into Tailwind. You don't need `preflight` separately
320
+ the base reset styles already come from `@central-design-system/components/styles`.
314
321
 
315
- ## 4. Импортируйте стили в точке входа приложения
322
+ ## 4. Import the styles in your app entry point
316
323
 
317
324
  ```ts
318
325
  import { createApp } from 'vue';
@@ -332,45 +339,57 @@ const cds = createCds({
332
339
  createApp(App).use(cds).mount('#app');
333
340
  ```
334
341
 
335
- ## 5. Используйте Tailwind-утилиты и CDS-токены вместе
342
+ ## 5. Use Tailwind utilities and CDS tokens together
336
343
 
337
344
  ```html
338
345
  <template>
339
- <div class="flex flex-col gap-300 rounded-200 bg-surface-primary p-400 text-content-primary">
346
+ <div class="flex flex-col gap-3 rounded-200 bg-surface-primary p-4 text-content-primary">
340
347
  <h1 class="text-900 font-bold text-brand-primary">Hello CDS + Tailwind</h1>
341
- <CdsButton>Нажми меня</CdsButton>
348
+ <CdsButton>Click me</CdsButton>
342
349
  </div>
343
350
  </template>
344
351
  ```
345
352
 
346
- После подключения доступны одновременно:
353
+ Once this is set up, you get both at the same time:
354
+
355
+ - standard Tailwind utilities: `flex`, `font-bold`, `gap-3`, `p-4`
356
+ - utility classes built from CDS tokens: `bg-surface-primary`, `text-content-primary`, `rounded-200`
347
357
 
348
- - стандартные Tailwind-утилиты: `flex`, `font-bold`
349
- - utility-классы на основе CDS-токенов: `bg-surface-primary`, `text-content-primary`, `p-400`, `rounded-200`
358
+ Write spacing with the standard Tailwind numeric scale (`gap-2`, `p-4`,
359
+ `mt-2`): the CDS spacing scale matches it, so there is no need for
360
+ `gap-200`/`p-400`-style spacing classes. Token-based classes remain for
361
+ color, radius, and typography.
350
362
 
351
- CDS-конфигурация автоматически синхронизируется с активной темой CDS, поэтому
352
- цветовые utility-классы будут переключаться вместе с темой.
363
+ The CDS configuration stays in sync with the active CDS theme automatically, so
364
+ color utility classes switch along with the theme.
353
365
 
354
366
  ---
355
367
 
356
- # Тематизация
368
+ ---
369
+ sourceHash: 41872192eda1479740145bb7f4bcb9dbb28f0462
370
+ ---
357
371
 
358
- Дизайн-система поддерживает смену темы или настройку своей собственной темы программно, в том числе прямо в рантайме.
372
+ # Theming
359
373
 
360
- ## Как это устроено
374
+ The design system lets you switch themes or configure your own theme
375
+ programmatically, including at runtime.
361
376
 
362
- Тема в CDS 4 — это набор **семантических токенов**, из которых при старте приложения генерируются CSS-переменные:
377
+ ## How it works
378
+
379
+ A theme in CDS 4 is a set of **semantic tokens** that are turned into CSS
380
+ variables when the application starts:
363
381
 
364
382
  ```
365
- ThemeDefinition (TS) → --cds-color-* / --cds-* (CSS-переменные) → стили компонентов
383
+ ThemeDefinition (TS) → --cds-color-* / --cds-* (CSS variables) → component styles
366
384
 
367
- @theme (Tailwind CSS v4) → bg-surface-primary, p-400, …
385
+ @theme (Tailwind CSS v4) → bg-surface-primary, rounded-200, …
368
386
  ```
369
387
 
370
- Цвета пишутся в переменные **каналами RGB**, а не готовым цветом это позволяет управлять прозрачностью:
388
+ Colors are written into the variables as **RGB channels** rather than finished
389
+ colors — that's what makes opacity control possible:
371
390
 
372
391
  ```css
373
- /* сгенерировано CDS */
392
+ /* generated by CDS */
374
393
  :root {
375
394
  --cds-color-brand-primary: 0,90,178;
376
395
  --cds-color-surface-primary: 255,255,255;
@@ -378,7 +397,7 @@ ThemeDefinition (TS) → --cds-color-* / --cds-* (CSS-переменные)
378
397
  --cds-border-radius-200: 0.25rem;
379
398
  }
380
399
 
381
- /* использование */
400
+ /* usage */
382
401
  .my-block {
383
402
  background: rgb(var(--cds-color-surface-primary));
384
403
  border: var(--cds-border-100) solid rgb(var(--cds-color-brand-primary) / 0.4);
@@ -386,26 +405,27 @@ ThemeDefinition (TS) → --cds-color-* / --cds-* (CSS-переменные)
386
405
  }
387
406
  ```
388
407
 
389
- Стили тем инжектятся в `<style id="cds-theme-stylesheet">` и пересчитываются реактивно при смене темы.
408
+ Theme styles are injected into `<style id="cds-theme-stylesheet">` and are
409
+ recalculated reactively when the theme changes.
390
410
 
391
- ## Подключение темы
411
+ ## Enabling a theme
392
412
 
393
- CDS 4 поставляет восемь готовых тем:
413
+ CDS 4 ships eight ready-made themes:
394
414
 
395
- | Тема | Описание |
415
+ | Theme | Description |
396
416
  | ------------- |-----------------------------------------|
397
- | `cdsLight` | светлая тема, используется по умолчанию |
398
- | `cdsDark` | тёмная тема |
399
- | `b2bLight` | светлая тема для приложений B2B-Center |
400
- | `b2bDark` | тёмная тема для приложений B2B-Center |
401
- | `lumaLight` | светлая тема Luma |
402
- | `lumaDark` | тёмная тема Luma |
403
- | `promoLight` | светлая промо-тема |
404
- | `promoDark` | тёмная промо-тема |
417
+ | `cdsLight` | light theme, used by default |
418
+ | `cdsDark` | dark theme |
419
+ | `b2bLight` | light theme for B2B-Center applications |
420
+ | `b2bDark` | dark theme for B2B-Center applications |
421
+ | `lumaLight` | light Luma theme |
422
+ | `lumaDark` | dark Luma theme |
423
+ | `promoLight` | light promo theme |
424
+ | `promoDark` | dark promo theme |
405
425
 
406
- > По умолчанию используется `cdsLight` — подключать её не нужно.
426
+ > `cdsLight` is used by default you don't need to enable it.
407
427
 
408
- Чтобы включить другую тему, передайте её название в опции `createCds`:
428
+ To switch to another theme, pass its name in the `createCds` options:
409
429
 
410
430
  ```ts
411
431
  import { createApp } from 'vue';
@@ -425,7 +445,7 @@ const cds = createCds({
425
445
  createApp(App).use(cds);
426
446
  ```
427
447
 
428
- ## Опции темизации
448
+ ## Theming options
429
449
 
430
450
  ```ts
431
451
  createCds({
@@ -444,22 +464,24 @@ createCds({
444
464
  });
445
465
  ```
446
466
 
447
- | Опция | Тип | По умолчанию | Назначение |
467
+ | Option | Type | Default | Purpose |
448
468
  | --------------- | ---------------------------------------------------------- | ----------------------- | -------------------------------------------------------------------------- |
449
- | `defaultTheme` | `ThemeName \| string` | `'cdsLight'` | Активная тема при старте |
450
- | `prefix` | `string` | `'cds'` | Префикс генерируемых CSS-переменных (`--cds-color-*`) |
451
- | `themes` | `Record<string, ThemeDefinition>` | штатные темы | Свои темы; мержатся со штатными |
452
- | `variations` | `false \| { colors: string[]; lighten: number; darken: number }` | `false` | Автогенерация светлых/тёмных вариаций цветов |
453
- | `utilities` | `boolean` | `true` | Генерация утилитарных классов фона/текста по токенам темы |
454
- | `legacyClasses` | `boolean` | `false` | Легаси-классы CDS 3 (`cds-bg-*`, `cds-text-*`, `cds-border-*`) |
455
- | `scoped` | `boolean` | `false` | Не писать переменные в `:root` |
456
- | `scope` | `string` | — | Ограничить селекторы темы поддеревом (`:where(<scope>)`) |
457
- | `stylesheetId` | `string` | `'cds-theme-stylesheet'`| `id` тега `<style>` с темой |
458
- | `cspNonce` | `string` | — | `nonce` для Content Security Policy |
459
-
460
- ## Создание своей темы
461
-
462
- Своя тема это объект `ThemeDefinition` с полями `dark`, `colors` и `variables`. Указывать нужно **только переопределения**: недостающие токены наследуются из `cdsLight` / `cdsDark`.
469
+ | `defaultTheme` | `ThemeName \| string` | `'cdsLight'` | Theme active at startup |
470
+ | `prefix` | `string` | `'cds'` | Prefix of the generated CSS variables (`--cds-color-*`) |
471
+ | `themes` | `Record<string, ThemeDefinition>` | built-in themes | Your own themes; merged with the built-in ones |
472
+ | `variations` | `false \| { colors: string[]; lighten: number; darken: number }` | `false` | Auto-generation of lighter/darker color variations |
473
+ | `utilities` | `boolean` | `true` | Generation of background/text utility classes from theme tokens |
474
+ | `legacyClasses` | `boolean` | `false` | CDS 3 legacy classes (`cds-bg-*`, `cds-text-*`, `cds-border-*`) |
475
+ | `scoped` | `boolean` | `false` | Don't write the variables into `:root` |
476
+ | `scope` | `string` | — | Limit theme selectors to a subtree (`:where(<scope>)`) |
477
+ | `stylesheetId` | `string` | `'cds-theme-stylesheet'`| `id` of the `<style>` tag holding the theme |
478
+ | `cspNonce` | `string` | — | `nonce` for Content Security Policy |
479
+
480
+ ## Creating your own theme
481
+
482
+ A custom theme is a `ThemeDefinition` object with the fields `dark`, `colors` and
483
+ `variables`. You only need to specify the **overrides**: missing tokens are
484
+ inherited from `cdsLight` / `cdsDark`.
463
485
 
464
486
  ```ts
465
487
  import { createApp } from 'vue';
@@ -472,7 +494,7 @@ import App from './App.vue';
472
494
  const myCustomGreenTheme: ThemeDefinition = {
473
495
  dark: false,
474
496
  colors: {
475
- // Основные цвета бренда новой темы
497
+ // Main brand colors of the new theme
476
498
  'brand-primary': '#2C8926',
477
499
  'brand-primary-hover': '#3C9C2C',
478
500
  'brand-primary-active': '#50A946',
@@ -482,11 +504,11 @@ const myCustomGreenTheme: ThemeDefinition = {
482
504
  'brand-secondary-hover': '#A5DD98',
483
505
  'brand-secondary-active': '#97D283',
484
506
  'brand-secondary-border': '#BCE8AB',
485
- // Поверхности
507
+ // Surfaces
486
508
  'page-primary': '#F2F8F0',
487
509
  'surface-secondary': '#E8F3E4'
488
510
  },
489
- // Переменные: типографика, отступы, скругления, тени
511
+ // Variables: typography, spacing, radii, shadows
490
512
  variables: {
491
513
  'font-family': 'Roboto, sans-serif',
492
514
  'border-radius-200': '0.625rem'
@@ -507,26 +529,30 @@ const cds = createCds({
507
529
  createApp(App).use(cds);
508
530
  ```
509
531
 
510
- Для каждой зарегистрированной темы дополнительно генерируется класс `.cds-theme--<name>` — им можно включить тему на произвольном участке разметки.
532
+ Every registered theme also gets a `.cds-theme--<name>` class use it to enable
533
+ the theme on an arbitrary part of the markup.
511
534
 
512
- ### Группы токенов
535
+ ### Token groups
513
536
 
514
- `colors` — семантические цвета:
537
+ `colors` — semantic colors:
515
538
 
516
- - `brand-*` — бренд (`primary`, `secondary` и их `hover` / `active` / `border` / `content`)
517
- - `surface-*`, `page-*`, `fill-*` — поверхности и заливки
518
- - `content-*` — текст, иконки, ссылки
519
- - `line-*` — границы, разделители, фокус и выделение
520
- - `status-{success,warning,progress,info,danger,indication}-*` — статусы
521
- - `other-*` — дополнительные акцентные палитры
539
+ - `brand-*` — brand (`primary`, `secondary` and their `hover` / `active` / `border` / `content`)
540
+ - `surface-*`, `page-*`, `fill-*` — surfaces and fills
541
+ - `content-*` — text, icons, links
542
+ - `line-*` — borders, dividers, focus and selection
543
+ - `status-{success,warning,progress,info,danger,indication}-*` — statuses
544
+ - `other-*` — additional accent palettes
522
545
 
523
- `variables` — размерности: `spacing-*`, `font-size-*`, `font-line-height-*`, `font-weight-*`, `border-*`, `border-radius-*`, `shadow-{x,y,blur}-*`, `font-family`, `base-unit`.
546
+ `variables` — dimensions: `spacing-*`, `font-size-*`, `font-line-height-*`,
547
+ `font-weight-*`, `border-*`, `border-radius-*`, `shadow-{x,y,blur}-*`,
548
+ `font-family`, `base-unit`.
524
549
 
525
- Полный список токенов конкретной темы смотрите в исходниках пакета: `@central-design-system/components/src/themes/cdsLight.ts`.
550
+ For the full token list of a specific theme, see the package sources:
551
+ `@central-design-system/components/src/themes/cdsLight.ts`.
526
552
 
527
- ## Смена темы
553
+ ## Switching the theme
528
554
 
529
- Тему можно менять прямо в рантайме через composable `useTheme`:
555
+ You can change the theme at runtime through the `useTheme` composable:
530
556
 
531
557
  ```vue
532
558
  <script setup lang="ts">
@@ -540,34 +566,39 @@ function toggleTheme(): void {
540
566
  </script>
541
567
 
542
568
  <template>
543
- <cds-button @click="toggleTheme">Переключить тему</cds-button>
569
+ <cds-button @click="toggleTheme">Toggle theme</cds-button>
544
570
  </template>
545
571
  ```
546
572
 
547
- Также можно изменить тему конкретного компонента, передав в него проп `theme`. Учитывайте, что тема применится не только к самому компоненту, но и ко всем вложенным в него компонентам:
573
+ You can also change the theme of a single component by passing it the `theme`
574
+ prop. Keep in mind that the theme applies not only to the component itself but to
575
+ everything nested inside it:
548
576
 
549
577
  ```vue
550
578
  <template>
551
579
  <cds-notification theme="b2bLight">
552
- <!-- кнопка будет использовать тему b2bLight -->
580
+ <!-- the button will use the b2bLight theme -->
553
581
  <cds-button>Button</cds-button>
554
582
  </cds-notification>
555
583
  </template>
556
584
  ```
557
585
 
558
- Проп `theme` поддерживают компоненты-контейнеры и большинство визуальных компонентов: `CdsApp`, `CdsLayout`, `CdsPage`, `CdsSurface`, `CdsCard`, `CdsDrawer`, `CdsModal`, `CdsOverlay`, `CdsButton`, `CdsField`, `CdsTable` и другие.
586
+ The `theme` prop is supported by container components and most visual components:
587
+ `CdsApp`, `CdsLayout`, `CdsPage`, `CdsSurface`, `CdsCard`, `CdsDrawer`,
588
+ `CdsModal`, `CdsOverlay`, `CdsButton`, `CdsField`, `CdsTable` and others.
559
589
 
560
- ## Использование токенов темы в своём коде
590
+ ## Using theme tokens in your own code
561
591
 
562
592
  ### Tailwind CSS v4
563
593
 
564
- Токены темы замаплены в `@theme` Tailwind, поэтому утилиты переключаются вместе с темой автоматически:
594
+ Theme tokens are mapped into Tailwind's `@theme`, so utilities switch along with
595
+ the theme automatically:
565
596
 
566
597
  ```html
567
- <div class="bg-surface-primary text-content-primary p-400 rounded-200">…</div>
598
+ <div class="bg-surface-primary text-content-primary p-4 rounded-200">…</div>
568
599
  ```
569
600
 
570
- Подключение описано в Tailwind CSS v4 + CDS 4.
601
+ Setup is described in Tailwind CSS v4 + CDS 4.
571
602
 
572
603
  ### CSS / SCSS
573
604
 
@@ -580,7 +611,8 @@ function toggleTheme(): void {
580
611
  }
581
612
  ```
582
613
 
583
- Переопределяя стили компонентов CDS, пишите их в слой `cds-overrides` — так они гарантированно выиграют у стилей библиотеки:
614
+ When you override CDS component styles, put them into the `cds-overrides` layer
615
+ that way they are guaranteed to win over the library's styles:
584
616
 
585
617
  ```scss
586
618
  @layer cds-overrides {
@@ -590,9 +622,10 @@ function toggleTheme(): void {
590
622
  }
591
623
  ```
592
624
 
593
- ### Легаси-классы CDS 3
625
+ ### CDS 3 legacy classes
594
626
 
595
- Утилитарные классы CDS 3 (`cds-bg-*`, `cds-text-*`, `cds-border-*`) в CDS 4 **выключены по умолчанию**. Чтобы их вернуть на время миграции:
627
+ The CDS 3 utility classes (`cds-bg-*`, `cds-text-*`, `cds-border-*`) are **off by
628
+ default** in CDS 4. To bring them back for the duration of a migration:
596
629
 
597
630
  ```ts
598
631
  import '@central-design-system/components/styles/legacy';
@@ -602,9 +635,11 @@ const cds = createCds({
602
635
  });
603
636
  ```
604
637
 
605
- ## Отключение темизации
638
+ ## Disabling theming
606
639
 
607
- Передайте в опцию `theme` значение `false`. Это предотвратит генерацию CSS-переменных и классов тем и отключит возможность смены темы в рантайме — тег `<style>` вообще не будет создан.
640
+ Pass `false` to the `theme` option. This prevents the generation of CSS variables
641
+ and theme classes and disables runtime theme switching — the `<style>` tag is not
642
+ created at all.
608
643
 
609
644
  ```ts
610
645
  import { createCds } from '@central-design-system/components';
@@ -614,56 +649,59 @@ const cds = createCds({
614
649
  });
615
650
  ```
616
651
 
617
- При отключённой темизации `theme.isDisabled === true`, а `themeClasses` возвращает `undefined`.
652
+ With theming disabled, `theme.isDisabled === true` and `themeClasses` returns
653
+ `undefined`.
618
654
 
619
- ## Интерфейс инстанса темы
655
+ ## Theme instance interface
620
656
 
621
- `useTheme()` возвращает `ThemeInstance` — доступ к текущей теме и её настройкам.
657
+ `useTheme()` returns a `ThemeInstance` — access to the current theme and its
658
+ settings.
622
659
 
623
660
  ```ts
624
661
  interface ThemeInstance {
625
- /** Включена ли темизация (`false` при `theme: false`) */
662
+ /** Whether theming is enabled (`false` with `theme: false`) */
626
663
  readonly isDisabled: boolean;
627
664
 
628
665
  /**
629
- * Raw-объект установленных тем
630
- * Можно добавлять и изменять темы
666
+ * Raw object of the installed themes
667
+ * Themes can be added and modified
631
668
  */
632
669
  readonly themes: Ref<Record<string, InternalThemeDefinition>>;
633
670
 
634
671
  /**
635
- * Название текущей темы
636
- * Наследуется от родительского компонента
672
+ * Name of the current theme
673
+ * Inherited from the parent component
637
674
  */
638
675
  readonly name: Readonly<Ref<string>>;
639
676
 
640
677
  /**
641
- * Обработанный объект текущей темы
642
- * Включает уже автоматически сгенерированные цвета
678
+ * Processed object of the current theme
679
+ * Includes the automatically generated colors
643
680
  */
644
681
  readonly current: DeepReadonly<Ref<InternalThemeDefinition>>;
645
682
  readonly computedThemes: DeepReadonly<Ref<Record<string, InternalThemeDefinition>>>;
646
683
 
647
- /** Класс текущей темы — `cds-theme--<name>` */
684
+ /** Class of the current theme — `cds-theme--<name>` */
648
685
  readonly themeClasses: Readonly<ComputedRef<string | undefined>>;
649
686
 
650
- /** Сгенерированный CSS текущей темы */
687
+ /** Generated CSS of the current theme */
651
688
  readonly styles: Readonly<ComputedRef<string>>;
652
689
 
653
690
  readonly global: {
654
- /** Название текущей глобальной темы в приложении (writable) */
691
+ /** Name of the current global theme in the application (writable) */
655
692
  readonly name: Ref<string>;
656
693
 
657
694
  /**
658
- * Обработанный объект текущей глобальной темы в приложении
659
- * Также можно получить из `theme.computedThemes.value[theme.global.name.value]`
695
+ * Processed object of the current global theme in the application
696
+ * Also available from `theme.computedThemes.value[theme.global.name.value]`
660
697
  */
661
698
  readonly current: DeepReadonly<Ref<InternalThemeDefinition>>;
662
699
  };
663
700
  }
664
701
  ```
665
702
 
666
- Инстанс темы также доступен из объекта, возвращённого `createCds()` — это удобно вне контекста компонента:
703
+ The theme instance is also available on the object returned by `createCds()` —
704
+ handy outside of a component context:
667
705
 
668
706
  ```ts
669
707
  const cds = createCds({ theme: { defaultTheme: 'cdsLight' } });
@@ -673,33 +711,39 @@ cds.theme.global.name.value = 'cdsDark';
673
711
 
674
712
  ---
675
713
 
714
+ ---
715
+ sourceHash: b1ba0f5864509842881b42ebf6cfb46aadcba96f
716
+ ---
717
+
676
718
  # Tree-shaking
677
719
 
678
- CDS 4 публикуется как ESM-бандл с сохранённой модульной структурой: каждый компонент
679
- отдельный чанк, рядом с ним лежит его собственный CSS. Благодаря этому сборщик
680
- (Vite, webpack, Rollup) может выбросить из приложения всё, что вы не используете.
720
+ CDS 4 is published as an ESM bundle with its module structure preserved: every
721
+ component is a separate chunk with its own CSS next to it. That lets the bundler
722
+ (Vite, webpack, Rollup) drop everything your application doesn't use.
681
723
 
682
- Чтобы это работало, нужно соблюсти два правила:
724
+ For this to work, follow two rules:
683
725
 
684
- 1. **Регистрировать в `createCds` только те компоненты, которые реально нужны.**
685
- 2. **Подключать базовые стили точечно**, а не весь `styles.css`.
726
+ 1. **Register only the components you actually need in `createCds`.**
727
+ 2. **Include the base styles selectively** rather than the whole `styles.css`.
686
728
 
687
- Ниже как это сделать и сколько это даёт.
729
+ Below is how to do that and how much it saves.
688
730
 
689
- ## Как это устроено
731
+ ## How it works
690
732
 
691
- - ESM-бандл собирается с `chunkSplitPlugin({ strategy: 'unbundle' })` — модульная структура
692
- библиотеки сохраняется, компоненты не склеиваются в один файл.
693
- - В `package.json` объявлен `sideEffects` — сборщик знает, что JS-модули библиотеки чистые
694
- и их можно безопасно удалять.
695
- - При сборке в чанк каждого компонента дописывается импорт его CSS. Поэтому
696
- `import { CdsButton }` тянет за собой ровно `CdsButton.css`, а не стили всей библиотеки.
733
+ - The ESM bundle is built with `chunkSplitPlugin({ strategy: 'unbundle' })` — the
734
+ library's module structure is preserved and components are not glued into a
735
+ single file.
736
+ - `package.json` declares `sideEffects`, so the bundler knows the library's JS
737
+ modules are pure and safe to remove.
738
+ - During the build, each component's chunk gets an import of its own CSS
739
+ appended. That's why `import { CdsButton }` pulls in exactly `CdsButton.css`,
740
+ not the styles of the entire library.
697
741
 
698
- Отдельная сборка или плагин для этого не нужны достаточно обычных именованных импортов.
742
+ No special build or plugin is requiredordinary named imports are enough.
699
743
 
700
- ## Точечная регистрация компонентов
744
+ ## Selective component registration
701
745
 
702
- Передавайте в `createCds` только используемые компоненты:
746
+ Pass only the components you use to `createCds`:
703
747
 
704
748
  ```ts
705
749
  import { createApp } from 'vue';
@@ -716,25 +760,25 @@ const cds = createCds({
716
760
  createApp(App).use(cds).mount('#app');
717
761
  ```
718
762
 
719
- Компоненты, зарегистрированные таким образом, доступны в шаблонах глобально
720
- как и при полной регистрации:
763
+ Components registered this way are available in templates globally just as with
764
+ full registration:
721
765
 
722
766
  ```html
723
767
  <template>
724
768
  <CdsCard>
725
- <CdsButton>Нажми меня</CdsButton>
769
+ <CdsButton>Click me</CdsButton>
726
770
  </CdsCard>
727
771
  </template>
728
772
  ```
729
773
 
730
- > **Важно:** `createCds` не регистрирует компоненты сам. Набор всегда задаёт вызывающая
731
- > сторона. Это сделано намеренно: если бы фабрика ссылалась на полный список компонентов,
732
- > сборщик не смог бы удалить ни один из них.
774
+ > **Important:** `createCds` does not register components on its own. The set is
775
+ > always defined by the caller. That's deliberate: if the factory referenced the
776
+ > full component list, the bundler could not remove a single one of them.
733
777
 
734
- ### Альтернатива: локальный импорт в SFC
778
+ ### Alternative: a local import in an SFC
735
779
 
736
- Если компонент нужен в одном-двух местах, глобальная регистрация не обязательна
737
- импортируйте его прямо в компоненте:
780
+ If you need a component in one or two places, global registration is optional
781
+ import it right inside the component:
738
782
 
739
783
  ```html
740
784
  <script setup lang="ts">
@@ -742,17 +786,18 @@ import { CdsButton } from '@central-design-system/components';
742
786
  </script>
743
787
 
744
788
  <template>
745
- <CdsButton>Нажми меня</CdsButton>
789
+ <CdsButton>Click me</CdsButton>
746
790
  </template>
747
791
  ```
748
792
 
749
- `createCds` всё равно нужен в точке входа он поставляет темы, локали, иконки
750
- и брейкпоинты через `provide`. Но в `components` его можно не передавать вовсе.
793
+ You still need `createCds` in the entry pointit supplies themes, locales,
794
+ icons and breakpoints through `provide`. But you don't have to pass `components`
795
+ to it at all.
751
796
 
752
- ## Полная регистрация
797
+ ## Full registration
753
798
 
754
- Когда набор компонентов заранее неизвестен (внутренние админки, песочницы,
755
- документация), проще зарегистрировать всё:
799
+ When the set of components is not known in advance (internal admin panels,
800
+ sandboxes, documentation), it's easier to register everything:
756
801
 
757
802
  ```ts
758
803
  import { createCds, components, directives } from '@central-design-system/components';
@@ -760,46 +805,47 @@ import { createCds, components, directives } from '@central-design-system/compon
760
805
  const cds = createCds({ components, directives });
761
806
  ```
762
807
 
763
- Такой вызов отключает tree-shaking компонентов: namespace-импорт `components`
764
- удерживает в бандле всю библиотеку.
808
+ Such a call disables component tree-shaking: the `components` namespace import
809
+ keeps the whole library in the bundle.
765
810
 
766
- ## Стили
811
+ ## Styles
767
812
 
768
- Стили компонентов подключаются автоматически вместе с самими компонентами.
769
- Вручную нужно подключить только **базовый слой** — reset, шрифты, порядок CSS-слоёв
770
- и глобальные стили элементов:
813
+ Component styles are included automatically along with the components themselves.
814
+ The only thing you have to include manually is the **base layer** — reset, fonts,
815
+ CSS layer order and global element styles:
771
816
 
772
817
  ```ts
773
818
  import '@central-design-system/components/styles/common.css';
774
819
  ```
775
820
 
776
- Базовый слой обязателен: именно в нём объявляется порядок `@layer`, от которого
777
- зависит корректный каскад стилей компонентов.
821
+ The base layer is mandatory: it's where the `@layer` order is declared, and the
822
+ correct cascade of component styles depends on it.
778
823
 
779
- Берите `common.css`, а не `core.css`: в `core.css` нет типографики, поэтому заголовки
780
- (`h1`–`h6`) останутся с браузерными размерами вместо шкалы CDS.
824
+ Take `common.css`, not `core.css`: `core.css` has no typography, so headings
825
+ (`h1`–`h6`) keep browser sizes instead of the CDS scale.
781
826
 
782
- Доступные варианты:
827
+ Available options:
783
828
 
784
- | Импорт | Размер | Что внутри |
829
+ | Import | Size | What's inside |
785
830
  | --- | --- | --- |
786
- | `styles/common.css` | ~9 KB | Рекомендуемая база: `core` + типографика + grid-утилиты |
787
- | `styles/core.css` | ~2 KB | Только слои, шрифты и reset — **без типографики** |
788
- | `styles/tailwind.css` | ~12 KB | CDS-токены для Tailwind CSS v4 |
789
- | `styles/legacy.css` | ~253 KB | Совместимость с легаси-разметкой CDS 3 |
831
+ | `styles/common.css` | ~9 KB | The recommended base: `core` + typography + grid utilities |
832
+ | `styles/core.css` | ~2 KB | Layers, fonts and reset only **no typography** |
833
+ | `styles/tailwind.css` | ~12 KB | CDS tokens for Tailwind CSS v4 |
834
+ | `styles/legacy.css` | ~253 KB | Compatibility with legacy CDS 3 markup |
790
835
 
791
- > **Не используйте `@central-design-system/components/styles` в tree-shaking-сценарии.**
792
- > Это агрегат на ~556 KB, содержащий CSS всех компонентов библиотеки. Он удобен для
793
- > быстрого старта, но полностью обесценивает точечную регистрацию.
836
+ > **Don't use `@central-design-system/components/styles` in a tree-shaking
837
+ > scenario.** It's a ~556 KB aggregate containing the CSS of every component in
838
+ > the library. It's convenient for a quick start, but it completely defeats
839
+ > selective registration.
794
840
 
795
- Цветовые токены (`--cds-color-*` и остальные) в CSS-файлах не лежат их генерирует
796
- и вставляет в документ `createCds` в рантайме, исходя из активной темы. Дополнительно
797
- подключать ничего не нужно.
841
+ Color tokens (`--cds-color-*` and the rest) are not in the CSS filesthey are
842
+ generated and injected into the document by `createCds` at runtime, based on the
843
+ active theme. There is nothing extra to include.
798
844
 
799
- ## Директивы
845
+ ## Directives
800
846
 
801
- Директивы (`ClickOutside`, `Intersect`, `Touch`) экспортируются именованно и
802
- регистрируются так же точечно:
847
+ Directives (`ClickOutside`, `Intersect`, `Touch`) are named exports and are
848
+ registered just as selectively:
803
849
 
804
850
  ```ts
805
851
  import { createCds, ClickOutside } from '@central-design-system/components';
@@ -810,107 +856,355 @@ const cds = createCds({
810
856
  });
811
857
  ```
812
858
 
813
- Компонентам библиотеки регистрировать директивы не нужноте, что используют
814
- `ClickOutside`, `Intersect` и `Touch` внутри (`CdsOverlay` и построенные на нём
815
- `CdsSelect`, `CdsMenu`, `CdsTooltip`, `CdsSlideView`, поля ввода), тянут их
816
- собственным импортом и регистрируют локально. Передавайте `directives` в
817
- `createCds` только ради своей разметки — `v-click-outside`, `v-intersect`,
818
- `v-touch` в шаблонах приложения.
859
+ The library's own components don't need you to register directives the ones
860
+ that use `ClickOutside`, `Intersect` and `Touch` internally (`CdsOverlay` and
861
+ everything built on it: `CdsSelect`, `CdsMenu`, `CdsTooltip`, `CdsSlideView`,
862
+ input fields) import them themselves and register them locally. Pass `directives`
863
+ to `createCds` only for your own markup — `v-click-outside`, `v-intersect`,
864
+ `v-touch` in the application's templates.
819
865
 
820
- > **В `4.0.0-alpha.0`:** локальная регистрация внутри
821
- > компонентов не срабатывала, и меню `CdsSelect` / `CdsMenu` не закрывалось по
822
- > клику вне, если в `createCds` не передали `directives`. Если обновиться нельзя —
823
- > добавьте в регистрацию `directives: { ClickOutside, Touch }`.
866
+ > **In `4.0.0-alpha.0`:** local registration inside components didn't work, and
867
+ > the `CdsSelect` / `CdsMenu` menus wouldn't close on an outside click unless
868
+ > `directives` was passed to `createCds`. If you can't upgrade, add
869
+ > `directives: { ClickOutside, Touch }` to the registration.
824
870
 
825
- ## Сколько это даёт
871
+ ## How much it saves
826
872
 
827
- Замеры на Vite 5 (production, minify, стили в отдельном файле, Vue включён в бандл,
828
- базовый `common.css` не учтён):
873
+ Measurements on Vite 5 (production, minified, styles in a separate file, Vue
874
+ included in the bundle, the base `common.css` not counted):
829
875
 
830
- | Сценарий | JS | JS (gzip) | CSS | CSS (gzip) |
876
+ | Scenario | JS | JS (gzip) | CSS | CSS (gzip) |
831
877
  | --- | --- | --- | --- | --- |
832
- | Полная регистрация (`components`, `directives`) | 625 KB | 203 KB | 208 KB | 24.6 KB |
833
- | `createCds` + 3 компонента | 196 KB | 62.6 KB | 27.6 KB | 4.1 KB |
834
- | `createCds` + 1 компонент | 162 KB | 51.4 KB | 12.6 KB | 1.9 KB |
835
- | 1 компонент без `createCds` | 63 KB | 23.4 KB | 12.6 KB | 1.9 KB |
878
+ | Full registration (`components`, `directives`) | 625 KB | 203 KB | 208 KB | 24.6 KB |
879
+ | `createCds` + 3 components | 196 KB | 62.6 KB | 27.6 KB | 4.1 KB |
880
+ | `createCds` + 1 component | 162 KB | 51.4 KB | 12.6 KB | 1.9 KB |
881
+ | 1 component without `createCds` | 63 KB | 23.4 KB | 12.6 KB | 1.9 KB |
836
882
 
837
- Цифры зависят от того, какие именно компоненты подключены: составные компоненты
838
- (`CdsTable`, `CdsAutocomplete`, `CdsDatePicker`) тянут больше зависимостей, чем атомы.
883
+ The numbers depend on which components exactly you include: composite components
884
+ (`CdsTable`, `CdsAutocomplete`, `CdsDatePicker`) pull in more dependencies than
885
+ atoms do.
839
886
 
840
- ### Что не тришейкается
887
+ ### What isn't tree-shaken
841
888
 
842
- Около 99 KB приходится на ядро, которое `createCds` подключает всегда:
843
- темы, локали, иконки, брейкпоинты (`useDisplay`), `goTo` и система `defaults`.
844
- Этот объём не зависит от числа компонентов он и составляет разницу между
845
- строками «1 компонент без `createCds (63 KB) и «`createCds` + 1 компонент» (162 KB).
889
+ About 99 KB is the core that `createCds` always includes: themes, locales, icons,
890
+ breakpoints (`useDisplay`), `goTo` and the `defaults` system. That volume doesn't
891
+ depend on the number of componentsit is exactly the difference between the
892
+ "1 component without `createCds`" (63 KB) and "`createCds` + 1 component"
893
+ (162 KB) rows.
846
894
 
847
- Если CDS используется в паре мест и глобальные подсистемы не нужны, можно вообще
848
- не вызывать `createCds`. Но тогда не будет ни тем, ни локалей, ни настроек
849
- по умолчанию, поэтому такой режим подходит только для точечных встроек.
895
+ If CDS is used in a couple of places and you don't need the global subsystems,
896
+ you can skip `createCds` entirely. But then there are no themes, no locales and
897
+ no defaults, so that mode only suits pinpoint embeds.
850
898
 
851
- ## Как проверить результат
899
+ ## How to verify the result
852
900
 
853
901
  ```bash
854
902
  npx vite-bundle-visualizer
855
903
  ```
856
904
 
857
- На что смотреть:
905
+ What to look for:
858
906
 
859
- - в бандле не должно быть чанков компонентов, которых нет в вашем `createCds`;
860
- - если попал «лишний» компонент скорее всего, он импортируется транзитивно
861
- (например, `CdsSelect` тянет `CdsMenu` и `CdsList`), это нормально;
862
- - если в бандле оказалась вся библиотека ищите `components` или `import * as`
863
- среди своих импортов.
907
+ - the bundle should contain no chunks of components missing from your `createCds`;
908
+ - if an "extra" component shows up, it is most likely imported transitively
909
+ (`CdsSelect` pulls in `CdsMenu` and `CdsList`, for instance) that's normal;
910
+ - if the whole library ended up in the bundle, look for `components` or
911
+ `import * as` among your imports.
864
912
 
865
- ## Частые ошибки
913
+ ## Common mistakes
866
914
 
867
- **Namespace-импорт вместо именованного.** Любой `import * as` из библиотеки
868
- удерживает её целиком:
915
+ **A namespace import instead of a named one.** Any `import * as` from the library
916
+ keeps all of it:
869
917
 
870
918
  ```ts
871
- // ❌ тянет все компоненты
919
+ // ❌ pulls in every component
872
920
  import * as cdsComponents from '@central-design-system/components';
873
921
 
874
922
  // ✅
875
923
  import { CdsButton } from '@central-design-system/components';
876
924
  ```
877
925
 
878
- **Импорт наборов иконок через `iconsets`.** Объект `iconsets` ссылается сразу на все
879
- наборы, поэтому не тришейкается: в бандл попадёт JS всех паков (включая `cds` 46 KB)
880
- и, поскольку UnoCSS сканирует их сам, CSS всех пяти наборов (≈370 KB вместо ≈70 KB).
881
- Импортируйте набор подпутём:
926
+ **Importing icon packs through `iconsets`.** The `iconsets` object references all
927
+ packs at once, so it is not tree-shaken: the bundle gets the JS of every pack
928
+ (including `cds` 46 KB) and, since UnoCSS scans them itself, the CSS of all five
929
+ packs (≈370 KB instead of ≈70 KB). Import the pack through its subpath:
882
930
 
883
931
  ```ts
884
- // ❌ тянет все наборы
932
+ // ❌ pulls in every pack
885
933
  import { iconsets } from '@central-design-system/components';
886
934
  const aliases = iconsets.remix.aliases;
887
935
 
888
- // ✅ только remix
936
+ // ✅ remix only
889
937
  import { remix } from '@central-design-system/components/iconsets/remix';
890
938
  const aliases = remix.aliases;
891
939
  ```
892
940
 
893
- **Подключение агрегата стилей.** `@central-design-system/components/styles` содержит CSS
894
- всех компонентовиспользуйте `styles/common.css`.
941
+ **Including the style aggregate.** `@central-design-system/components/styles`
942
+ contains the CSS of every component use `styles/common.css`.
895
943
 
896
- **Собственный barrel-реэкспорт.** Файл вида `src/ui/index.ts`, который реэкспортирует
897
- десятки компонентов CDS, сводит tree-shaking на нет, если импортировать из него всё подряд.
898
- Импортируйте компоненты напрямую из библиотеки.
944
+ **Your own barrel re-export.** A `src/ui/index.ts` file that re-exports dozens of
945
+ CDS components kills tree-shaking if you import everything from it. Import
946
+ components directly from the library.
899
947
 
900
- **Сборщик без поддержки ESM.** CJS-бандл (`dist/cjs`) и IIFE-сборка не тришейкаются
901
- by design. Убедитесь, что сборщик резолвит `import`-условие экспорта, — Vite, webpack 5
902
- и Rollup делают это по умолчанию.
948
+ **A bundler without ESM support.** The CJS bundle (`dist/cjs`) and the IIFE build
949
+ are not tree-shakable by design. Make sure your bundler resolves the `import`
950
+ export condition — Vite, webpack 5 and Rollup do it by default.
903
951
 
904
952
  ---
905
953
 
906
- # Иконки
954
+ ---
955
+ sourceHash: 5d3ad246b66c58c6ecd39eb645d52dd6a026eaf2
956
+ ---
957
+
958
+ # SASS variables
907
959
 
908
- Дизайн-система CDS v4 «из коробки» поддерживает множество популярных наборов иконок (iconpack).
960
+ CDS 4 styles are written in SASS/SCSS, and part of the internal setup — the base
961
+ reset, global typography, font, grid and breakpoints — is extracted into SASS
962
+ variables flagged with `!default`. You can override them when building your
963
+ application through the standard
964
+ [module configuration](https://sass-lang.com/documentation/at-rules/use/#configuration)
965
+ mechanism: `@use '…' with (…)`.
909
966
 
910
- ## Использование
967
+ > SASS variables are the **compile-time** configuration layer. Colors, spacing
968
+ > and the rest of the component design tokens live in CSS variables (`--cds-*`)
969
+ > and are configured by themes at runtime — see Theming. Start
970
+ > with the theme; drop down to SASS variables when you need to change the base
971
+ > layer itself: reset, typography, grid.
911
972
 
912
- Вы можете выбрать один из готовых наборов иконок или подключить собственный.
913
- По умолчанию CDS использует набор `cds` — он включает все иконки, необходимые компонентам дизайн-системы.
973
+ ## Setup
974
+
975
+ Vite compiles SCSS out of the box — you only need the preprocessor itself:
976
+
977
+ ```bash
978
+ npm install -D sass-embedded
979
+ ```
980
+
981
+ The classic `sass` works too, but `sass-embedded` is noticeably faster. To speed
982
+ up large builds, opt into the modern compiler API:
983
+
984
+ ```ts
985
+ // vite.config.ts
986
+ export default defineConfig({
987
+ css: {
988
+ preprocessorOptions: {
989
+ scss: { api: 'modern-compiler' }
990
+ }
991
+ }
992
+ });
993
+ ```
994
+
995
+ ## Plugging in with a configuration
996
+
997
+ Normally the base styles are plugged in as ready-made CSS —
998
+ `import '@central-design-system/components/styles'`. To override SASS variables,
999
+ replace that import with your own SCSS file: in SCSS the
1000
+ `@central-design-system/components/styles` entry point resolves to the **sources**
1001
+ of the base layer (the `sass` export condition in `package.json`), and your
1002
+ configuration is applied at compile time.
1003
+
1004
+ ```diff
1005
+ // main.ts
1006
+ import { createApp } from 'vue';
1007
+
1008
+ - import '@central-design-system/components/styles';
1009
+ + import './styles/main.scss';
1010
+ ```
1011
+
1012
+ ```scss
1013
+ // src/styles/main.scss
1014
+ @use '@central-design-system/components/styles' with (
1015
+ $reset: false,
1016
+ $body-font-family: ('Inter', sans-serif)
1017
+ );
1018
+ ```
1019
+
1020
+ The component styles themselves need nothing extra: they are precompiled and ship
1021
+ with the components' JS chunks — both with selective and with full registration
1022
+ (see Tree-shaking).
1023
+
1024
+ > Wrap a value containing commas — `$body-font-family` with several fonts, for
1025
+ > instance — in parentheses, otherwise SASS reads it as several arguments.
1026
+
1027
+ ## A settings file
1028
+
1029
+ Module configuration is applied once, on the first load. If you need the values
1030
+ not only in the entry point but also in your application's component styles,
1031
+ extract them into a separate settings file and use that everywhere:
1032
+
1033
+ ```scss
1034
+ // src/styles/settings.scss
1035
+ @forward '@central-design-system/components/styles/settings' with (
1036
+ $body-font-family: ('Inter', sans-serif),
1037
+ $grid-gutter: 24px
1038
+ );
1039
+ ```
1040
+
1041
+ ```scss
1042
+ // src/styles/main.scss
1043
+ @use './settings'; // configures the CDS variables
1044
+ @use '@central-design-system/components/styles'; // the base is built with them
1045
+ ```
1046
+
1047
+ ```html
1048
+ <!-- Component.vue -->
1049
+ <style lang="scss">
1050
+ @use '@/styles/settings' as s;
1051
+
1052
+ .card {
1053
+ gap: s.$grid-gutter;
1054
+ font-family: s.$body-font-family;
1055
+ }
1056
+ </style>
1057
+ ```
1058
+
1059
+ Every `<style>` block is compiled separately, so "configure it in `main.scss` and
1060
+ read it straight from the package" won't work — a direct
1061
+ `@use '@central-design-system/components/styles/settings'` in a component would
1062
+ return the default values. A shared settings file guarantees identical values at
1063
+ every compilation point.
1064
+
1065
+ The `styles/settings` entry contains variables only and emits not a single byte
1066
+ of CSS — it's safe to include in any number of files.
1067
+
1068
+ ## Global variables
1069
+
1070
+ | Variable | Default | What it does |
1071
+ | --- | --- | --- |
1072
+ | `$reset` | `true` | Emit the base layer's CSS reset |
1073
+ | `$legacy-reset` | `false` | Reset for compatibility with CDS 3 markup |
1074
+ | `$enable-typography` | `true` | Global typography (`h1`–`h6`, `.h1`–`.h6` and so on) |
1075
+ | `$body-font-family` | `var(--cds-font-family), 'PT Root UI VF', …` | `body` font |
1076
+ | `$font-size-root` | `var(--cds-base-unit)` (16px) | Root font size |
1077
+ | `$line-height-root` | `1.5` | Root line height |
1078
+ | `$border-color-root` | `transparent` | Default border color |
1079
+ | `$border-style-root` | `solid` | Default border style |
1080
+ | `$border-radius-root` | `var(--cds-border-radius-200)` | Base corner radius |
1081
+ | `$size-scale` | `4px` | Step of the size scale |
1082
+ | `$sizes` | `('xs', 'sm', 'md', 'lg', 'xl')` | Size names |
1083
+ | `$standard-easing` | `cubic-bezier(0.4, 0, 0.2, 1)` | Base animation curve |
1084
+ | `$decelerated-easing` | `cubic-bezier(0, 0, 0.2, 1)` | Enter curve |
1085
+ | `$accelerated-easing` | `cubic-bezier(0.4, 0, 1, 1)` | Leave curve |
1086
+ | `$rounded` | map | Radius scale (`sm`, `md`, `lg`, `xl`, `pill`, `circle`, …) |
1087
+
1088
+ ## Grid and breakpoints
1089
+
1090
+ | Variable | Default | What it does |
1091
+ | --- | --- | --- |
1092
+ | `$prefix` | `'cds'` | Prefix of the grid CSS classes |
1093
+ | `$flex-grid-columns` | `16` | Number of flex grid columns (`12` is supported too) |
1094
+ | `$grid-gutter` | `32px` | Grid gutter |
1095
+ | `$grid-gutter-condensed` | `1px` | Gutter of the condensed grid |
1096
+ | `$grid-breakpoints` | map | Breakpoints: width, columns and spacing for `xs`–`xl` |
1097
+
1098
+ The grid variables belong to the same settings module, while the breakpoint and
1099
+ grid mixins live in a separate `styles/breakpoints` entry — which emits no CSS
1100
+ either:
1101
+
1102
+ ```scss
1103
+ @use '@/styles/settings' as s;
1104
+ @use '@central-design-system/components/styles/breakpoints' as bp;
1105
+
1106
+ .sidebar {
1107
+ gap: s.$grid-gutter;
1108
+
1109
+ @include bp.cds-breakpoint-up('md') {
1110
+ width: 320px;
1111
+ }
1112
+ }
1113
+ ```
1114
+
1115
+ > SASS breakpoints affect your styles and the grid mixins. The runtime
1116
+ > breakpoints of `useDisplay` are configured separately, through the `display`
1117
+ > option of `createCds` (see Display & Platform).
1118
+ > The two sets match by default; when you change one, don't forget the other.
1119
+
1120
+ ## Component variables and vite-plugin
1121
+
1122
+ Without the plugin, `@use … with` configures the base layer only: component CSS
1123
+ is precompiled. The `@central-design-system/vite-plugin` plugin lifts that
1124
+ limitation — it recompiles the styles of every component you use with your
1125
+ settings file:
1126
+
1127
+ ```ts
1128
+ // vite.config.ts
1129
+ import cds from '@central-design-system/vite-plugin';
1130
+
1131
+ export default defineConfig({
1132
+ plugins: [
1133
+ vue(),
1134
+ cds({ styles: { configFile: 'src/styles/settings.scss' } })
1135
+ ]
1136
+ });
1137
+ ```
1138
+
1139
+ The settings file is the same, but you have to forward
1140
+ `styles/component-settings` — the aggregate that includes both global and
1141
+ component variables:
1142
+
1143
+ ```scss
1144
+ // src/styles/settings.scss
1145
+ @forward '@central-design-system/components/styles/component-settings' with (
1146
+ $border-radius-root: 0, // global
1147
+ $button-border-radius: 9999px // component-level
1148
+ );
1149
+ ```
1150
+
1151
+ With the plugin you don't need to change the
1152
+ `@central-design-system/components/styles` import in `main.ts` — it starts
1153
+ meaning "the configured base layer" on its own, and component styles are rebuilt
1154
+ on the fly. The plugin can also auto-import components from templates
1155
+ (`autoImport: true` by default), which makes registration in
1156
+ `createCds({ components })` optional.
1157
+
1158
+ ## What SASS can't configure
1159
+
1160
+ - **Component-local variables** (`$button-border-radius` and friends from
1161
+ `styles/_CdsX.variables.scss`). Unavailable without the plugin: component CSS
1162
+ is published precompiled, so its local variables are frozen at the moment the
1163
+ library was built. With `@central-design-system/vite-plugin` they are
1164
+ configured through `styles/component-settings` — the plugin recompiles the
1165
+ published SCSS sources of the components with your settings file (see above).
1166
+ - **Turning off individual utility classes.** Instead of a toggle map, pick an
1167
+ entry point by content: `styles/core` — layers, fonts and reset only;
1168
+ `styles/common` — plus typography and helpers.
1169
+ - **CSS layers.** `@layer cds-*` is always on: the layer order is declared in the
1170
+ base style layer, and ordinary application CSS (outside `@layer`) always beats
1171
+ the design system's styles — there is nothing to turn off here.
1172
+
1173
+ ## Pitfalls
1174
+
1175
+ - **Variables only in the settings file.** Any styles or imports of regular style
1176
+ files inside `settings.scss` get duplicated into every file that includes it.
1177
+ Styles belong in `main.scss`; the settings file holds variables, mixins and
1178
+ functions.
1179
+ - **Configure before the module's first load.** `@use … with` fails with a
1180
+ `module was already loaded` error if the settings module has already been
1181
+ loaded without a configuration higher up the chain. Include the settings file
1182
+ first.
1183
+ - **Build speed.** With ready-made CSS there is nothing to compile; with a
1184
+ configuration the base layer is built together with the application. The volume
1185
+ is small, but the difference shows on cold builds — `sass-embedded` and
1186
+ `api: 'modern-compiler'` keep it to a minimum.
1187
+ - **Resolution assumes a bundler.** Bare imports such as
1188
+ `@use '@central-design-system/components/styles'` are resolved by Vite and
1189
+ webpack (`sass-loader`) through the `sass` export condition. In plain `sass`
1190
+ CLI without a bundler you'll have to point the paths at the files inside
1191
+ `node_modules` by hand.
1192
+
1193
+ ---
1194
+
1195
+ ---
1196
+ sourceHash: 5822739245a9c6095f09064c0b58dc326ac5c188
1197
+ ---
1198
+
1199
+ # Icons
1200
+
1201
+ CDS v4 supports many popular icon packs out of the box.
1202
+
1203
+ ## Usage
1204
+
1205
+ You can pick one of the ready-made icon packs or plug in your own.
1206
+ By default CDS uses the `cds` pack — it contains every icon the design system
1207
+ components need.
914
1208
 
915
1209
  ```ts
916
1210
  import { createCds } from '@central-design-system/components';
@@ -924,7 +1218,7 @@ const cds = createCds({
924
1218
  app.use(cds);
925
1219
  ```
926
1220
 
927
- После этого иконку можно использовать в шаблонах:
1221
+ After that, use the icon in templates:
928
1222
 
929
1223
  ```html
930
1224
  <template>
@@ -932,19 +1226,25 @@ app.use(cds);
932
1226
  </template>
933
1227
  ```
934
1228
 
935
- ## Установка наборов иконок через UnoCSS
1229
+ ## Installing icon packs through UnoCSS
936
1230
 
937
- Дизайн-система CDS интегрируется с [UnoCSS Preset Icons](https://unocss.dev/presets/icons), который поддерживает все наборы иконок, доступные на [Iconify](https://icon-sets.iconify.design/).
1231
+ CDS integrates with [UnoCSS Preset Icons](https://unocss.dev/presets/icons), which
1232
+ supports every icon pack available on [Iconify](https://icon-sets.iconify.design/).
938
1233
 
939
- Иконки подключаются с tree-shaking, поэтому в итоговый CSS-бандл попадают только те иконки, которые вы действительно используете. Вы можете зарегистрировать сразу несколько наборов и свободно комбинировать иконки из любого из них в своих компонентах.
1234
+ Icons are tree-shaken, so only the icons you actually use end up in the final CSS
1235
+ bundle. You can register several packs at once and freely mix icons from any of
1236
+ them in your components.
940
1237
 
941
- ### Наборы иконок
1238
+ ### Icon packs
942
1239
 
943
- Для перечисленных ниже наборов в CDS подготовлены iconset'ы с alias mappings — псевдонимами для иконок, которые используют компоненты CDS (например, чекбоксы, выпадающие списки, радио-кнопки и т. д.).
944
- В качестве набора по умолчанию (`defaultSet`) нужно выбрать один из них; при необходимости alias mappings можно переопределить.
945
- Дополнительные наборы уже без алиасов можно подключить параллельно и свободно использовать в своих шаблонах.
1240
+ For the packs listed below, CDS ships iconsets with alias mappings — aliases for
1241
+ the icons CDS components use (checkboxes, dropdowns, radio buttons and so on).
1242
+ Pick one of them as the default pack (`defaultSet`); the alias mappings can be
1243
+ overridden if needed.
1244
+ Additional packs — without aliases — can be plugged in alongside and used freely
1245
+ in your own templates.
946
1246
 
947
- | Библиотека иконок | Iconify package | Импорт iconset'а | Set name |
1247
+ | Icon library | Iconify package | Iconset import | Set name |
948
1248
  |------------------------------------------------------------------|------------------------|-----------------------------------------------------------|------------|
949
1249
  | [Remix Icon](https://remixicon.com/) | `@iconify-json/ri` | `@central-design-system/components/iconsets/remix` | `ri` |
950
1250
  | [Phosphor Icons](https://phosphoricons.com/) | `@iconify-json/ph` | `@central-design-system/components/iconsets/phosphor` | `phosphor` |
@@ -952,26 +1252,28 @@ app.use(cds);
952
1252
  | [Carbon](https://carbondesignsystem.com/elements/icons/library/) | `@iconify-json/carbon` | `@central-design-system/components/iconsets/carbon` | `carbon` |
953
1253
  | [Material Design Icons](https://pictogrammers.com/library/mdi/) | `@iconify-json/mdi` | `@central-design-system/components/iconsets/mdi` | `mdi` |
954
1254
 
955
- Каждый модуль экспортирует объект с именем набора: `icons` (сам набор для `sets`) и `aliases` (псевдонимы для `aliases`).
1255
+ Each module exports an object named after the pack: `icons` (the pack itself, for
1256
+ `sets`) and `aliases` (the aliases, for `aliases`).
956
1257
 
957
- Установите нужный набор из таблицы выше:
1258
+ Install the pack you need from the table above:
958
1259
 
959
1260
  ```bash
960
1261
  npm install @iconify-json/ri
961
1262
  ```
962
1263
 
963
- > Иконки из таблицы работают через UnoCSS, поэтому сначала нужно установить и настроить сам UnoCSS.
964
- > Подробнее об этом в [официальной документации](https://unocss.dev/integrations/).
1264
+ > Icons from the table run through UnoCSS, so you have to install and configure
1265
+ > UnoCSS first. See the [official documentation](https://unocss.dev/integrations/)
1266
+ > for details.
965
1267
 
966
- Ниже пример интеграции в проект на Vite.
1268
+ Here is an example integration in a Vite project.
967
1269
 
968
- 1. Установите UnoCSS в dev-зависимости (см. [интеграцию с Vite](https://unocss.dev/integrations/vite)):
1270
+ 1. Install UnoCSS as a dev dependency (see the [Vite integration](https://unocss.dev/integrations/vite)):
969
1271
 
970
1272
  ```bash
971
1273
  npm install -D unocss
972
1274
  ```
973
1275
 
974
- 2. Подключите плагин UnoCSS в конфигурации Vite:
1276
+ 2. Add the UnoCSS plugin to your Vite config:
975
1277
 
976
1278
  ```ts
977
1279
  // vite.config.ts
@@ -985,7 +1287,7 @@ export default defineConfig({
985
1287
  })
986
1288
  ```
987
1289
 
988
- 3. Создайте в корне проекта файл **unocss.config.ts**:
1290
+ 3. Create an **unocss.config.ts** file in the project root:
989
1291
 
990
1292
  ```ts
991
1293
  // unocss.config.ts
@@ -1002,12 +1304,14 @@ export default defineConfig({
1002
1304
  })
1003
1305
  ```
1004
1306
 
1005
- > Больше ничего в `unocss.config.ts` дописывать не нужно: iconset'ы CDS помечены маркером `@unocss-include`,
1006
- > поэтому UnoCSS сканирует их сам несмотря на то, что они лежат в `node_modules` и это `.js`-файлы,
1007
- > которые по умолчанию не попадают в `content.pipeline.include`.
1307
+ > Nothing else needs to go into `unocss.config.ts`: CDS iconsets carry the
1308
+ > `@unocss-include` marker, so UnoCSS scans them on its own even though they
1309
+ > live in `node_modules` as `.js` files, which are not part of
1310
+ > `content.pipeline.include` by default.
1008
1311
 
1009
- 4. Передайте набор иконок в функцию `createCds()`.
1010
- В примере используется набор **[Remix](https://remixicon.com/)**, но его можно заменить любым другим из таблицы выше:
1312
+ 4. Pass the icon pack to `createCds()`.
1313
+ The example uses the **[Remix](https://remixicon.com/)** pack, but you can swap it
1314
+ for any other pack from the table above:
1011
1315
 
1012
1316
  ```ts
1013
1317
  import { createCds } from '@central-design-system/components';
@@ -1026,21 +1330,26 @@ const cds = createCds({
1026
1330
  app.use(cds);
1027
1331
  ```
1028
1332
 
1029
- > Импортируйте набор подпутём `@central-design-system/components/iconsets/<набор>`, а не из общего
1030
- > объекта `iconsets`. Общий объект ссылается сразу на все наборы и не тришейкается — в бандл попадут
1031
- > лишний JS и CSS всех пяти наборов (≈370 КБ против ≈70 КБ у одного).
1333
+ > Import the pack through the `@central-design-system/components/iconsets/<pack>`
1334
+ > subpath, not from the shared `iconsets` object. The shared object references all
1335
+ > packs at once and is not tree-shaken you would ship the JS and CSS of all five
1336
+ > packs (≈370 KB instead of ≈70 KB for a single one).
1032
1337
 
1033
- После этого можно выбрать любую иконку из наборанапример, [ri:settings-3-line](https://icon-sets.iconify.design/ri/?icon-filter=settings-3-line) — и использовать её в шаблонах:
1338
+ After that, pick any icon from the packfor example
1339
+ [ri:settings-3-line](https://icon-sets.iconify.design/ri/?icon-filter=settings-3-line) —
1340
+ and use it in templates:
1034
1341
 
1035
1342
  ```html
1036
1343
  <CdsButton icon="i-ri:settings-3-line" />
1037
1344
  ```
1038
1345
 
1039
- > UnoCSS использует для иконок префикс `i-`. CDS использует тот же префикс и уже настраивает с ним свои алиасы — не меняйте его, иначе алиасы из CDS перестанут работать.
1346
+ > UnoCSS uses the `i-` prefix for icons. CDS uses the same prefix and already
1347
+ > configures its aliases with it — don't change it, or the CDS aliases will stop
1348
+ > working.
1040
1349
 
1041
- ## Legacy-набор иконок из CDS v3
1350
+ ## Legacy icon pack from CDS v3
1042
1351
 
1043
- Если нужен полный набор иконок из CDS v3, подключите его так:
1352
+ If you need the full icon pack from CDS v3, plug it in like this:
1044
1353
 
1045
1354
  ```bash
1046
1355
  npm install @central-design-system/icons
@@ -1058,16 +1367,21 @@ app.use(cds);
1058
1367
 
1059
1368
  ---
1060
1369
 
1370
+ ---
1371
+ sourceHash: 2d02d03da0e4d6f0fcb171775b7b88784a216ac0
1372
+ ---
1373
+
1061
1374
  # Display & Platform
1062
1375
 
1063
- Central Design System предоставляет реактивную информацию об **экране** (брейкпоинты,
1064
- размеры вьюпорта, мобильный режим) и о **платформе** (браузер, ОС, тип устройства) через
1065
- один composable — `useDisplay`. Брейкпоинты используются одинаково в JavaScript и в стилях
1066
- (SCSS-миксины `cds-breakpoint-*`), поэтому адаптивная логика в скрипте и CSS совпадает.
1376
+ Central Design System exposes reactive information about the **screen**
1377
+ (breakpoints, viewport size, mobile mode) and the **platform** (browser, OS,
1378
+ device type) through a single composable — `useDisplay`. Breakpoints are the same
1379
+ in JavaScript and in styles (the `cds-breakpoint-*` SCSS mixins), so responsive
1380
+ logic in script and CSS always agrees.
1067
1381
 
1068
- ## Точки преломления (breakpoints)
1382
+ ## Breakpoints
1069
1383
 
1070
- | Брейкпоинт | Диапазон ширины (px) | Стартовая ширина | Колонки сетки |
1384
+ | Breakpoint | Width range (px) | Start width | Grid columns |
1071
1385
  | --- | --- | --- | --- |
1072
1386
  | `xs` | `0 … 671` | `0` | 4 |
1073
1387
  | `sm` | `672 … 1055` | `672` | 8 |
@@ -1075,45 +1389,46 @@ Central Design System предоставляет реактивную инфор
1075
1389
  | `lg` | `1312 … 1583` | `1312` | 16 |
1076
1390
  | `xl` | `1584 … ∞` | `1584` | 16 |
1077
1391
 
1078
- Источник значений один:
1392
+ The values have a single source:
1079
1393
 
1080
1394
  - JS — `defaultDisplayOptions.thresholds` (`src/composables/useDisplay/internal/useDisplay.constants.ts`);
1081
1395
  - SCSS — `$grid-breakpoints` (`src/styles/utilities/grid/_config.scss`).
1082
1396
 
1083
- ## В JavaScript — `useDisplay`
1397
+ ## In JavaScript — `useDisplay`
1084
1398
 
1085
- Composable `useDisplay` возвращает реактивное состояние экрана и платформы. Он работает
1086
- «из коробки», если приложение инициализировано через `createCds` (он провайдит `cds:display`).
1399
+ The `useDisplay` composable returns the reactive state of the screen and the
1400
+ platform. It works out of the box as long as the application is initialized
1401
+ through `createCds` (which provides `cds:display`).
1087
1402
 
1088
1403
  ```ts
1089
1404
  import { useDisplay } from '@central-design-system/components';
1090
1405
 
1091
1406
  const display = useDisplay();
1092
1407
 
1093
- display.width.value; // текущая ширина вьюпорта, px
1408
+ display.width.value; // current viewport width, px
1094
1409
  display.name.value; // 'xs' | 'sm' | 'md' | 'lg' | 'xl'
1095
- display.mobile.value; // true, если width < mobileBreakpoint (по умолчанию 'sm')
1410
+ display.mobile.value; // true when width < mobileBreakpoint ('sm' by default)
1096
1411
  ```
1097
1412
 
1098
- ### Доступные флаги
1413
+ ### Available flags
1099
1414
 
1100
- | Флаг | Значение |
1415
+ | Flag | Meaning |
1101
1416
  | --- | --- |
1102
- | `xs` / `sm` / `md` / `lg` / `xl` | активен ровно одинтекущий брейкпоинт |
1103
- | `smUp` / `mdUp` / `lgUp` / `xlUp` | ширинастартовой ширины брейкпоинта («и выше») |
1104
- | `smDown` / `mdDown` / `lgDown` / `xlDown` | брейкпоинт и всё, что ниже («и ниже») |
1105
- | `name` | имя текущего брейкпоинта |
1106
- | `mobile` | мобильный режим (по `mobileBreakpoint`) |
1107
- | `mobileBreakpoint` | текущий порог мобильного режима |
1108
- | `width` / `height` | размеры вьюпорта, px |
1109
- | `thresholds` | текущая карта порогов |
1110
- | `platform` | флаги платформы/браузера (см. [Платформа](#платформа-platform)) |
1111
- | `update()` | принудительно пересчитать размеры и платформу |
1112
-
1113
- Например, `mdUp` истинно при `width ≥ 1056`, а `smDown` при `width < 1056`
1114
- (то есть охватывает диапазоны `xs` и `sm`).
1115
-
1116
- ### Пример в компоненте
1417
+ | `xs` / `sm` / `md` / `lg` / `xl` | exactly one is active the current breakpoint |
1418
+ | `smUp` / `mdUp` / `lgUp` / `xlUp` | widththe breakpoint's start width ("and up") |
1419
+ | `smDown` / `mdDown` / `lgDown` / `xlDown` | the breakpoint and everything below it ("and down") |
1420
+ | `name` | name of the current breakpoint |
1421
+ | `mobile` | mobile mode (based on `mobileBreakpoint`) |
1422
+ | `mobileBreakpoint` | current mobile mode threshold |
1423
+ | `width` / `height` | viewport size, px |
1424
+ | `thresholds` | current threshold map |
1425
+ | `platform` | platform/browser flags (see [Platform](#platform)) |
1426
+ | `update()` | force a recalculation of size and platform |
1427
+
1428
+ For example, `mdUp` is true when `width ≥ 1056`, and `smDown` when `width < 1056`
1429
+ (that is, it covers the `xs` and `sm` ranges).
1430
+
1431
+ ### Example in a component
1117
1432
 
1118
1433
  ```tsx
1119
1434
  import { useDisplay } from '@central-design-system/components';
@@ -1127,19 +1442,20 @@ defineRender(() => (
1127
1442
  ));
1128
1443
  ```
1129
1444
 
1130
- ### Мобильный режим на уровне пропсов
1445
+ ### Mobile mode at the prop level
1131
1446
 
1132
- Компоненты, подмешивающие `defineDisplayProps()`, принимают пропсы `mobile` и
1133
- `mobileBreakpoint` — ими можно переопределить порог мобильного режима локально:
1447
+ Components that mix in `defineDisplayProps()` accept the `mobile` and
1448
+ `mobileBreakpoint` props use them to override the mobile mode threshold
1449
+ locally:
1134
1450
 
1135
1451
  ```html
1136
- <!-- Мобильный режим включится при ширине < 1056px (md), а не по глобальному 'sm' -->
1452
+ <!-- Mobile mode kicks in below 1056px (md) instead of the global 'sm' -->
1137
1453
  <CdsSlideGroup mobile-breakpoint="md" />
1138
1454
  ```
1139
1455
 
1140
- ### Переопределение порогов глобально
1456
+ ### Overriding the thresholds globally
1141
1457
 
1142
- Пороги и `mobileBreakpoint` настраиваются при инициализации:
1458
+ Thresholds and `mobileBreakpoint` are configured at initialization:
1143
1459
 
1144
1460
  ```ts
1145
1461
  import { createCds } from '@central-design-system/components';
@@ -1152,75 +1468,79 @@ app.use(createCds({
1152
1468
  }));
1153
1469
  ```
1154
1470
 
1155
- > Если вы меняете пороги в JS синхронизируйте их и в SCSS (`$grid-breakpoints`),
1156
- > иначе адаптивность в скрипте и стилях разойдётся.
1471
+ > If you change the thresholds in JS, keep them in sync in SCSS
1472
+ > (`$grid-breakpoints`) otherwise responsiveness in script and styles will
1473
+ > drift apart.
1157
1474
 
1158
- ## В SCSS — миксины `cds-breakpoint-*`
1475
+ ## In SCSS — the `cds-breakpoint-*` mixins
1159
1476
 
1160
- Миксины подключаются из публичной точки входа:
1477
+ The mixins come from a public entry point:
1161
1478
 
1162
1479
  ```scss
1163
1480
  @use '@central-design-system/components/styles/breakpoints' as breakpoint;
1164
1481
  ```
1165
1482
 
1166
- > В чистом Dart Sass (без бандлера) используйте pkg-схему и Node-импортер:
1483
+ > In plain Dart Sass (without a bundler), use the pkg scheme and the Node
1484
+ > importer:
1167
1485
  > `@use 'pkg:@central-design-system/components/styles/breakpoints' as breakpoint;`.
1168
1486
 
1169
- ### `cds-breakpoint-up($name)` — «и выше»
1487
+ ### `cds-breakpoint-up($name)` — "and up"
1170
1488
 
1171
1489
  ```scss
1172
1490
  .card {
1173
1491
  display: none;
1174
1492
 
1175
- // применится при min-width: 1056px (md и выше)
1493
+ // applies at min-width: 1056px (md and up)
1176
1494
  @include breakpoint.cds-breakpoint-up(md) {
1177
1495
  display: block;
1178
1496
  }
1179
1497
  }
1180
1498
  ```
1181
1499
 
1182
- ### `cds-breakpoint-down($name)` — «и ниже»
1500
+ ### `cds-breakpoint-down($name)` — "and down"
1183
1501
 
1184
1502
  ```scss
1185
1503
  .sidebar {
1186
- // применится при max-width: 1055.98px — то есть на sm и xs
1504
+ // applies at max-width: 1055.98px — that is, on sm and xs
1187
1505
  @include breakpoint.cds-breakpoint-down(sm) {
1188
1506
  display: none;
1189
1507
  }
1190
1508
  }
1191
1509
  ```
1192
1510
 
1193
- `cds-breakpoint-down('<name>')` покрывает сам брейкпоинт **и все, что ниже**
1194
- (верхняя граница старт следующего брейкпоинта минус `0.02px`). Для крупнейшего
1195
- брейкпоинта (`xl`) media query не генерируется «xl и ниже» это все ширины.
1511
+ `cds-breakpoint-down('<name>')` covers the breakpoint itself **and everything
1512
+ below it** (the upper bound is the start of the next breakpoint minus `0.02px`).
1513
+ No media query is generated for the largest breakpoint (`xl`) "xl and down" is
1514
+ every width.
1196
1515
 
1197
- ### `cds-breakpoint-between($lower, $upper)` — диапазон
1516
+ ### `cds-breakpoint-between($lower, $upper)` — a range
1198
1517
 
1199
1518
  ```scss
1200
1519
  .banner {
1201
- // min-width: 672px и max-width: 1056px
1520
+ // min-width: 672px and max-width: 1056px
1202
1521
  @include breakpoint.cds-breakpoint-between(sm, md) {
1203
1522
  padding: 16px;
1204
1523
  }
1205
1524
  }
1206
1525
  ```
1207
1526
 
1208
- Оба миксина также принимают число вместо имени: `cds-breakpoint-up(900px)`.
1527
+ Both mixins also accept a number instead of a name: `cds-breakpoint-up(900px)`.
1209
1528
 
1210
- ### Прочие миксины и функции
1529
+ ### Other mixins and functions
1211
1530
 
1212
- - `cds-breakpoint($name)` — алиас `cds-breakpoint-up`.
1213
- - `cds-largest-breakpoint` — media query для самого крупного брейкпоинта.
1214
- - `breakpoint-next($name)` / `breakpoint-prev($name)` — соседний брейкпоинт.
1215
- - `is-smallest-breakpoint($name)` — является ли `$name` наименьшим.
1216
- - `largest-breakpoint-name()` — имя самого крупного брейкпоинта.
1531
+ - `cds-breakpoint($name)` — an alias for `cds-breakpoint-up`.
1532
+ - `cds-largest-breakpoint` — media query for the largest breakpoint.
1533
+ - `breakpoint-next($name)` / `breakpoint-prev($name)` — the neighboring breakpoint.
1534
+ - `is-smallest-breakpoint($name)` — whether `$name` is the smallest one.
1535
+ - `largest-breakpoint-name()` — name of the largest breakpoint.
1217
1536
 
1218
- ## Соответствие JS ↔ CSS
1537
+ ## JS ↔ CSS correspondence
1219
1538
 
1220
- Флаги `useDisplay` и media query миксинов покрывают одинаковые диапазоны ширины
1221
- это позволяет писать согласованную адаптивную логику в скрипте и стилях.
1539
+ The `useDisplay` flags and the mixins' media queries cover identical width
1540
+ ranges that's what lets you write consistent responsive logic in script and
1541
+ styles.
1222
1542
 
1223
- | JS (`useDisplay`) | SCSS-миксин | Диапазон ширины |
1543
+ | JS (`useDisplay`) | SCSS mixin | Width range |
1224
1544
  | --- | --- | --- |
1225
1545
  | `smUp` | `cds-breakpoint-up(sm)` | `≥ 672` |
1226
1546
  | `mdUp` | `cds-breakpoint-up(md)` | `≥ 1056` |
@@ -1229,19 +1549,20 @@ app.use(createCds({
1229
1549
  | `smDown` | `cds-breakpoint-down(sm)` | `< 1056` |
1230
1550
  | `mdDown` | `cds-breakpoint-down(md)` | `< 1312` |
1231
1551
  | `lgDown` | `cds-breakpoint-down(lg)` | `< 1584` |
1232
- | `xlDown` | `cds-breakpoint-down(xl)` | все ширины |
1552
+ | `xlDown` | `cds-breakpoint-down(xl)` | every width |
1233
1553
 
1234
- > **Важно (миграция с CDS 3).** В CDS 3 семантика `cds-breakpoint-down` в SCSS
1235
- > отличалась от JS: `down('sm')` означало «строго ниже `sm`» (только `xs`), тогда как
1236
- > `smDown` в JS «`sm` и ниже». В CDS 4 CSS выровнен под JS: `down('<name>')` теперь
1237
- > всегда «`<name>` и ниже». Если вы переносите стили из CDS 3 — сдвиньте аргумент
1238
- > `down()` на один вниз (старый `down('md')` новый `down('sm')`).
1239
- > См. Migration Guide.
1554
+ > **Important (migrating from CDS 3).** In CDS 3 the semantics of
1555
+ > `cds-breakpoint-down` in SCSS differed from JS: `down('sm')` meant "strictly
1556
+ > below `sm`" (only `xs`), whereas `smDown` in JS means "`sm` and down". In CDS 4
1557
+ > the CSS is aligned with JS: `down('<name>')` now always means "`<name>` and
1558
+ > down". If you are porting styles from CDS 3, shift the `down()` argument one
1559
+ > step down (old `down('md')` ⇒ new `down('sm')`).
1560
+ > See the Migration Guide.
1240
1561
 
1241
- ## Платформа (platform)
1562
+ ## Platform
1242
1563
 
1243
- `useDisplay().platform` реактивный объект с флагами устройства, ОС и браузера.
1244
- Определение основано на `navigator.userAgent` и поддержке касаний.
1564
+ `useDisplay().platform` is a reactive object with device, OS and browser flags.
1565
+ Detection is based on `navigator.userAgent` and touch support.
1245
1566
 
1246
1567
  ```ts
1247
1568
  import { useDisplay } from '@central-design-system/components';
@@ -1249,33 +1570,33 @@ import { useDisplay } from '@central-design-system/components';
1249
1570
  const { platform } = useDisplay();
1250
1571
 
1251
1572
  if (platform.value.ios) {
1252
- // особое поведение для iOS
1573
+ // special behavior for iOS
1253
1574
  }
1254
1575
 
1255
1576
  const isTouchDevice = platform.value.touch;
1256
1577
  ```
1257
1578
 
1258
- ### Поля объекта `platform`
1579
+ ### Fields of the `platform` object
1259
1580
 
1260
- Все поля `boolean`.
1581
+ Every field is a `boolean`.
1261
1582
 
1262
- | Поле | Значение |
1583
+ | Field | Meaning |
1263
1584
  | --- | --- |
1264
- | `android` | устройство на Android |
1265
- | `ios` | устройство на iOS (iPhone / iPad / iPod) |
1266
- | `cordova` | приложение работает в Cordova |
1267
- | `electron` | приложение работает в Electron |
1268
- | `chrome` | браузер Chrome |
1269
- | `edge` | браузер Edge |
1270
- | `firefox` | браузер Firefox |
1271
- | `opera` | браузер Opera |
1272
- | `win` | ОС Windows |
1273
- | `mac` | ОС macOS |
1274
- | `linux` | ОС Linux |
1275
- | `touch` | устройство поддерживает касания |
1276
- | `ssr` | значение вычислено на сервере (SSR) |
1277
-
1278
- ### Пример: класс на корне приложения
1585
+ | `android` | an Android device |
1586
+ | `ios` | an iOS device (iPhone / iPad / iPod) |
1587
+ | `cordova` | the app runs in Cordova |
1588
+ | `electron` | the app runs in Electron |
1589
+ | `chrome` | Chrome browser |
1590
+ | `edge` | Edge browser |
1591
+ | `firefox` | Firefox browser |
1592
+ | `opera` | Opera browser |
1593
+ | `win` | Windows OS |
1594
+ | `mac` | macOS |
1595
+ | `linux` | Linux OS |
1596
+ | `touch` | the device supports touch |
1597
+ | `ssr` | the value was computed on the server (SSR) |
1598
+
1599
+ ### Example: a class on the app root
1279
1600
 
1280
1601
  ```tsx
1281
1602
  import { useDisplay } from '@central-design-system/components';
@@ -1295,31 +1616,37 @@ defineRender(() => (
1295
1616
  ));
1296
1617
  ```
1297
1618
 
1298
- > **Осторожно с user-agent sniffing.** Определение браузера/ОС по `userAgent`
1299
- > ненадёжно (строку можно подменить, а новые браузеры не распознаться). Используйте
1300
- > `platform` для прогрессивных улучшений (например, специфичные фиксы под iOS Safari),
1301
- > а не как единственное условие доступа к функциональности. Для фич-детекта
1302
- > предпочитайте проверку возможностей (`'ontouchstart' in window` и т. п.).
1619
+ > **Careful with user-agent sniffing.** Detecting the browser or OS from
1620
+ > `userAgent` is unreliable (the string can be spoofed, and new browsers may not
1621
+ > be recognized). Use `platform` for progressive enhancement say, a fix
1622
+ > specific to iOS Safari not as the only gate in front of a feature. For
1623
+ > feature detection, prefer capability checks (`'ontouchstart' in window` and the
1624
+ > like).
1303
1625
 
1304
1626
  ### SSR
1305
1627
 
1306
- При серверном рендеринге `userAgent` недоступен, поэтому `platform.ssr === true`, а
1307
- остальные флаги `false`. После гидрации значения можно пересчитать вызовом
1308
- `display.update()` (пересчитывает и размеры, и платформу). Начальные размеры для SSR
1309
- задаются вторым аргументом `createDisplay(options, ssr)` / опцией `ssr` в `createCds`.
1628
+ During server-side rendering `userAgent` is unavailable, so `platform.ssr === true`
1629
+ and the rest of the flags are `false`. After hydration the values can be
1630
+ recalculated by calling `display.update()` (which recalculates both size and
1631
+ platform). Initial sizes for SSR are set through the second argument of
1632
+ `createDisplay(options, ssr)` or the `ssr` option in `createCds`.
1310
1633
 
1311
1634
  ---
1312
1635
 
1313
- # Глобальная конфигурация
1636
+ ---
1637
+ sourceHash: 49864e870f2f989420a5ebf7ffc7eb1a3458124a
1638
+ ---
1314
1639
 
1315
- CDS 4 позволяет задать значения пропсов по умолчанию — глобально, для конкретного компонента
1316
- или только внутри определённого поддерева. Так вы один раз описываете «как выглядят кнопки
1317
- в нашем продукте» и перестаёте дублировать одни и те же пропсы в каждом шаблоне.
1640
+ # Global configuration
1318
1641
 
1319
- ## Настройка
1642
+ CDS 4 lets you set default prop values — globally, for a specific component, or
1643
+ only inside a given subtree. You describe "what buttons look like in our product"
1644
+ once and stop repeating the same props in every template.
1320
1645
 
1321
- Значения по умолчанию задаются опцией `defaults` в `createCds`. Ключ `global` действует на все
1322
- компоненты, ключ с именем компонента — только на него.
1646
+ ## Setup
1647
+
1648
+ Default values are set through the `defaults` option of `createCds`. The `global`
1649
+ key affects every component; a key named after a component affects only that one.
1323
1650
 
1324
1651
  ```ts
1325
1652
  import { createApp } from 'vue';
@@ -1347,42 +1674,43 @@ const cds = createCds({
1347
1674
  createApp(App).use(cds);
1348
1675
  ```
1349
1676
 
1350
- **Важно.** Пропсы в `defaults` пишутся в camelCase: `hideDetails`, а не `hide-details`.
1677
+ **Important.** Props in `defaults` are written in camelCase: `hideDetails`, not
1678
+ `hide-details`.
1351
1679
 
1352
- Ключ компонента это его имя из `defineOptions({ name })`, то есть `CdsButton`, `CdsTextInput`,
1353
- `CdsCardActions` и так далее. Имена подкомпонентов (`CdsCardTitle`, `CdsListItem`) работают так же,
1354
- как имена корневых.
1680
+ A component key is its name from `defineOptions({ name })` `CdsButton`,
1681
+ `CdsTextInput`, `CdsCardActions` and so on. Subcomponent names (`CdsCardTitle`,
1682
+ `CdsListItem`) work exactly like root component names.
1355
1683
 
1356
- ### Порядок разрешения значения
1684
+ ### Resolution order
1357
1685
 
1358
- Для каждого пропса CDS берёт первое подходящее значение:
1686
+ For every prop, CDS takes the first value that applies:
1359
1687
 
1360
- 1. проп, явно переданный в шаблоне;
1361
- 2. `defaults.<ИмяКомпонента>.<проп>` из ближайшего контекста дефолтов;
1362
- 3. `defaults.global.<проп>`;
1363
- 4. значение по умолчанию, объявленное в самом компоненте.
1688
+ 1. the prop explicitly passed in the template;
1689
+ 2. `defaults.<ComponentName>.<prop>` from the nearest defaults context;
1690
+ 3. `defaults.global.<prop>`;
1691
+ 4. the default value declared in the component itself.
1364
1692
 
1365
- Явно переданный проп всегда выигрываетдефолты не могут «перебить» шаблон.
1693
+ An explicitly passed prop always wins defaults can never override the template.
1366
1694
 
1367
- ### Изменение дефолтов в рантайме
1695
+ ### Changing defaults at runtime
1368
1696
 
1369
- `createCds` возвращает инстанс, у которого дефолты лежат в реактивной ссылке. Их можно менять
1370
- на летувсе смонтированные компоненты пересчитаются:
1697
+ `createCds` returns an instance whose defaults live in a reactive ref. You can
1698
+ change them on the fly every mounted component recalculates:
1371
1699
 
1372
1700
  ```ts
1373
1701
  const cds = createCds({ components, directives });
1374
1702
 
1375
- // например, включить компактный режим по настройке пользователя
1703
+ // for example, turn on compact mode based on a user setting
1376
1704
  cds.defaults.value = {
1377
1705
  ...cds.defaults.value,
1378
1706
  global: { size: 'sm' }
1379
1707
  };
1380
1708
  ```
1381
1709
 
1382
- ## Контекстные дефолты
1710
+ ## Contextual defaults
1383
1711
 
1384
- Дефолты можно задать для компонентов, вложенных в другой компонент. Например, чтобы все кнопки
1385
- внутри карточки по умолчанию были вторичными:
1712
+ Defaults can be set for components nested inside another component. For example,
1713
+ to make every button inside a card secondary by default:
1386
1714
 
1387
1715
  ```ts
1388
1716
  createCds({
@@ -1394,8 +1722,9 @@ createCds({
1394
1722
  });
1395
1723
  ```
1396
1724
 
1397
- Правило простое: ключ с заглавной буквы это имя вложенного компонента, ключ со строчной
1398
- проп текущего компонента. Вложенность не ограничена одним уровнем:
1725
+ The rule is simple: a capitalized key is the name of a nested component, a
1726
+ lowercase key is a prop of the current component. Nesting is not limited to one
1727
+ level:
1399
1728
 
1400
1729
  ```ts
1401
1730
  createCds({
@@ -1409,23 +1738,24 @@ createCds({
1409
1738
  });
1410
1739
  ```
1411
1740
 
1412
- Тот же механизм библиотека использует внутри себя, чтобы группирующие компоненты раздавали
1413
- свои настройки детям:
1741
+ The library uses the same mechanism internally so that grouping components can
1742
+ hand their settings down to their children:
1414
1743
 
1415
- - `CdsButtonGroup` задаёт вложенным `CdsButton` пропсы `appearance`, `color`, `baseColor`, `size`;
1416
- - `CdsTagGroup` задаёт `CdsTag` пропсы `color`, `activeColor`, `disabled`, `filter`;
1417
- - `CdsSelectionControlGroup` раздаёт настройки контролам, имя целевого компонента задаётся
1418
- пропом `defaultsTarget` (`CdsCheckbox`, `CdsRadio` и т. д.);
1419
- - так же работают `CdsTabs`, `CdsSteps`, `CdsList`, `CdsBreadcrumbs`, `CdsButtonToggle`,
1420
- `CdsExpandablePanels`, `CdsOtpInput`.
1744
+ - `CdsButtonGroup` sets the `appearance`, `color`, `baseColor`, `size` props on nested `CdsButton`s;
1745
+ - `CdsTagGroup` sets the `color`, `activeColor`, `disabled`, `filter` props on `CdsTag`;
1746
+ - `CdsSelectionControlGroup` passes settings to the controls, with the target component name
1747
+ set by the `defaultsTarget` prop (`CdsCheckbox`, `CdsRadio` and so on);
1748
+ - `CdsTabs`, `CdsSteps`, `CdsList`, `CdsBreadcrumbs`, `CdsButtonToggle`,
1749
+ `CdsExpandablePanels`, `CdsOtpInput` work the same way.
1421
1750
 
1422
- Поэтому `<CdsButtonGroup size="sm">` делает маленькими все кнопки внутривам не нужно
1423
- проставлять `size` каждой.
1751
+ That's why `<CdsButtonGroup size="sm">` makes every button inside smallyou
1752
+ don't have to set `size` on each of them.
1424
1753
 
1425
- ## Глобальные класс и стиль
1754
+ ## Global class and style
1426
1755
 
1427
- В дефолтах компонента, помимо пропсов, можно задать `class` и `style`. Это удобный способ
1428
- навесить продуктовые правила на все экземпляры компонента, не трогая шаблоны:
1756
+ Besides props, a component's defaults can carry `class` and `style`. It's a
1757
+ convenient way to apply product-specific rules to every instance of a component
1758
+ without touching the templates:
1429
1759
 
1430
1760
  ```ts
1431
1761
  createCds({
@@ -1437,7 +1767,7 @@ createCds({
1437
1767
  });
1438
1768
  ```
1439
1769
 
1440
- Работает любое значение, которое принимает Vue, строка, объект, массив:
1770
+ Any value Vue accepts works — a string, an object, an array:
1441
1771
 
1442
1772
  ```ts
1443
1773
  createCds({
@@ -1449,16 +1779,17 @@ createCds({
1449
1779
  });
1450
1780
  ```
1451
1781
 
1452
- В отличие от обычных пропсов, `class` и `style` не перезаписываются шаблоном, а **объединяются**
1453
- с ним. То есть `<CdsButton class="mt-200">` получит и `my-button`, и `mt-200`.
1782
+ Unlike ordinary props, `class` and `style` are not overwritten by the template
1783
+ but **merged** with it. So `<CdsButton class="mt-2">` gets both `my-button` and
1784
+ `mt-2`.
1454
1785
 
1455
- **Важно.** `class` и `style` работают только в ключе конкретного компонента. В `global` они
1456
- игнорируются.
1786
+ **Important.** `class` and `style` only work under a specific component's key. In
1787
+ `global` they are ignored.
1457
1788
 
1458
- ## Алиасы
1789
+ ## Aliases
1459
1790
 
1460
- Алиас это тот же компонент, зарегистрированный под другим именем и со своими дефолтами.
1461
- Из алиасов удобно собирать «продуктовые» варианты компонентов.
1791
+ An alias is the same component registered under a different name with its own
1792
+ defaults. Aliases are a handy way to assemble "product" variants of components.
1462
1793
 
1463
1794
  ```ts
1464
1795
  import { createCds, components, directives, CdsButton } from '@central-design-system/components';
@@ -1484,24 +1815,26 @@ const cds = createCds({
1484
1815
  });
1485
1816
  ```
1486
1817
 
1487
- Алиасы регистрируются глобально, поэтому в шаблоне их можно использовать сразу:
1818
+ Aliases are registered globally, so you can use them in templates right away:
1488
1819
 
1489
1820
  ```vue
1490
1821
  <template>
1491
- <CdsButtonPrimary>Сохранить</CdsButtonPrimary>
1492
- <CdsButtonDanger class="ml-200">Удалить</CdsButtonDanger>
1822
+ <CdsButtonPrimary>Save</CdsButtonPrimary>
1823
+ <CdsButtonDanger class="ml-2">Delete</CdsButtonDanger>
1493
1824
  </template>
1494
1825
  ```
1495
1826
 
1496
- **Важно.** Алиас не наследует дефолты базового компонента. Если в конфигурации есть
1497
- `defaults.CdsButton`, к `<CdsButtonPrimary>` они не применятся — дефолты ищутся по имени алиаса.
1498
- Общие настройки для обоих выносите в `global` или дублируйте в ключе алиаса.
1827
+ **Important.** An alias does not inherit the base component's defaults. If the
1828
+ configuration has `defaults.CdsButton`, it will not apply to `<CdsButtonPrimary>`
1829
+ defaults are looked up by the alias name. Move shared settings into `global` or
1830
+ duplicate them under the alias key.
1499
1831
 
1500
- ## Дефолты для части приложения
1832
+ ## Defaults for part of the application
1501
1833
 
1502
- Чтобы задать дефолты не глобально, а в поддереве, используйте компонент `CdsDefaultsProvider`.
1503
- На нём же построена панель Controls в Storybook: значения из панели применяются
1504
- к компонентам примера как дефолты.
1834
+ To set defaults for a subtree rather than globally, use the
1835
+ `CdsDefaultsProvider` component. The Controls panel in Storybook is built on it
1836
+ too: the values from the panel are applied to the example's components as
1837
+ defaults.
1505
1838
 
1506
1839
  ```vue
1507
1840
  <script setup lang="ts">
@@ -1510,26 +1843,27 @@ import { CdsButton, CdsDefaultsProvider } from '@central-design-system/component
1510
1843
 
1511
1844
  <template>
1512
1845
  <CdsDefaultsProvider :defaults="{ CdsButton: { appearance: 'tertiary', size: 'sm' } }">
1513
- <CdsButton>Второстепенная маленькая кнопка</CdsButton>
1846
+ <CdsButton>Small tertiary button</CdsButton>
1514
1847
  </CdsDefaultsProvider>
1515
1848
  </template>
1516
1849
  ```
1517
1850
 
1518
- | Проп | Тип | Назначение |
1851
+ | Prop | Type | Purpose |
1519
1852
  | ---------- | ------------------- | -------------------------------------------------------------------------------------------- |
1520
- | `defaults` | `DefaultsOptions` | Дефолты для поддерева; по умолчанию мержатся с унаследованными |
1521
- | `scoped` | `boolean` | Не смешивать с родительскими дефолтамидействуют только заданные здесь |
1522
- | `reset` | `number \| string` | Подняться на N уровней вверх по цепочке дефолтов |
1523
- | `root` | `boolean \| string` | Вернуться к корневым дефолтам из `createCds`; строкойк именованной группе внутри них |
1524
- | `disabled` | `boolean` | Ничего не провайдить поддерево получает дефолты родителя как есть |
1853
+ | `defaults` | `DefaultsOptions` | Defaults for the subtree; merged with the inherited ones by default |
1854
+ | `scoped` | `boolean` | Don't mix with the parent defaults only the ones set here apply |
1855
+ | `reset` | `number \| string` | Go N levels up the defaults chain |
1856
+ | `root` | `boolean \| string` | Fall back to the root defaults from `createCds`; with a string to a named group inside them |
1857
+ | `disabled` | `boolean` | Provide nothingthe subtree gets the parent defaults as they are |
1525
1858
 
1526
- Типичный сценарий `scoped` «островок» в чужом окружении: вложенные группы (например,
1527
- `CdsButtonGroup`) не должны навязывать свои настройки вашему блоку.
1859
+ The typical use for `scoped` is an "island" inside someone else's environment:
1860
+ enclosing groups (`CdsButtonGroup`, say) should not impose their settings on your
1861
+ block.
1528
1862
 
1529
- ## Свои компоненты
1863
+ ## Your own components
1530
1864
 
1531
- Собственные компоненты приложения тоже могут участвовать в системе дефолтов. Для этого
1532
- пропустите пропсы через `useDefaults`:
1865
+ Your application's own components can take part in the defaults system too. Pass
1866
+ their props through `useDefaults`:
1533
1867
 
1534
1868
  ```vue
1535
1869
  <script setup lang="ts">
@@ -1540,39 +1874,40 @@ const props = useDefaults(_props, 'MyComponent');
1540
1874
  </script>
1541
1875
 
1542
1876
  <template>
1543
- <div {{ props.foo }}</div>
1877
+ <div>I am {{ props.foo }}</div>
1544
1878
  </template>
1545
1879
  ```
1546
1880
 
1547
- У `useDefaults` два аргумента, оба опциональные:
1881
+ `useDefaults` takes two arguments, both optional:
1548
1882
 
1549
- - `props` — объект пропсов, возвращённый `defineProps`;
1550
- - `name` — имя компонента, по которому ищется ключ в `defaults`. Если не передать, берётся имя
1551
- из `defineOptions({ name })`, а при его отсутствии имя файла.
1883
+ - `props` — the props object returned by `defineProps`;
1884
+ - `name` — the component name used to look up the key in `defaults`. If omitted,
1885
+ the name from `defineOptions({ name })` is used, and failing that, the file name.
1552
1886
 
1553
- Теперь компонент настраивается из общей конфигурации:
1887
+ Now the component is configurable from the shared configuration:
1554
1888
 
1555
1889
  ```ts
1556
1890
  createCds({
1557
1891
  defaults: {
1558
- MyComponent: { foo: 'бар' }
1892
+ MyComponent: { foo: 'bar' }
1559
1893
  }
1560
1894
  });
1561
1895
  ```
1562
1896
 
1563
- **Важно.** В шаблоне обращайтесь к `props.foo`, а не к `foo`. `useDefaults` возвращает прокси
1564
- над пропсами, и распакованные `defineProps` переменные его минуют:
1897
+ **Important.** In the template, refer to `props.foo`, not `foo`. `useDefaults`
1898
+ returns a proxy over the props, and destructured `defineProps` variables bypass
1899
+ it:
1565
1900
 
1566
1901
  ```diff
1567
- -<div {{ foo }}</div>
1568
- +<div {{ props.foo }}</div>
1902
+ -<div>I am {{ foo }}</div>
1903
+ +<div>I am {{ props.foo }}</div>
1569
1904
  ```
1570
1905
 
1571
- ### Вложенные дефолты в своих компонентах
1906
+ ### Nested defaults in your own components
1572
1907
 
1573
- Чтобы ваш компонент раздавал дефолты детям (как это делает `CdsButtonGroup`), достаточно
1574
- вызвать `useDefaults()` без аргументоввложенные ключи из его секции `defaults` уйдут в
1575
- дочерний контекст:
1908
+ To make your component hand defaults down to its children (the way
1909
+ `CdsButtonGroup` does), just call `useDefaults()` with no arguments the nested
1910
+ keys from its `defaults` section go into the child context:
1576
1911
 
1577
1912
  ```vue
1578
1913
  <script setup lang="ts">
@@ -1598,7 +1933,8 @@ createCds({
1598
1933
  });
1599
1934
  ```
1600
1935
 
1601
- Если дефолты детей зависят от пропсов компонента, используйте `provideDefaults` напрямую:
1936
+ If the children's defaults depend on the component's props, use `provideDefaults`
1937
+ directly:
1602
1938
 
1603
1939
  ```vue
1604
1940
  <script setup lang="ts">
@@ -1621,10 +1957,11 @@ provideDefaults({
1621
1957
  </template>
1622
1958
  ```
1623
1959
 
1624
- ## Blueprint — пресет конфигурации
1960
+ ## Blueprint — a configuration preset
1625
1961
 
1626
- Если один и тот же набор опций нужен нескольким приложениям, вынесите его в `blueprint`:
1627
- это обычный объект опций `createCds`, на который сверху накладывается остальная конфигурация.
1962
+ If several applications need the same set of options, extract it into a
1963
+ `blueprint`: a plain `createCds` options object that the rest of the
1964
+ configuration is layered on top of.
1628
1965
 
1629
1966
  ```ts
1630
1967
  import { createCds, components, directives } from '@central-design-system/components';
@@ -1641,32 +1978,37 @@ const cds = createCds({
1641
1978
  blueprint: productBlueprint,
1642
1979
  components,
1643
1980
  directives,
1644
- // перекрывает значение из blueprint
1981
+ // overrides the value from the blueprint
1645
1982
  defaults: {
1646
1983
  CdsButton: { size: 'sm' }
1647
1984
  }
1648
1985
  });
1649
1986
  ```
1650
1987
 
1651
- Опции сливаются глубоко (`mergeDeep`), поэтому в примере выше у кнопок останется
1652
- `appearance: 'secondary'` из пресета и добавится `size: 'sm'`.
1988
+ Options are merged deeply (`mergeDeep`), so in the example above the buttons keep
1989
+ `appearance: 'secondary'` from the preset and gain `size: 'sm'`.
1990
+
1991
+ ---
1653
1992
 
1993
+ ---
1994
+ sourceHash: 26c790bd53cd55729b9902cf5d1032b5c6457f6b
1654
1995
  ---
1655
1996
 
1656
- # Интернационализация (i18n)
1997
+ # Internationalization (i18n)
1657
1998
 
1658
- У компонентов CDS есть собственные тексты: «Отсутствуют данные» в селекте, подписи фильтров
1659
- таблицы, `aria-label` кнопки закрытия, счётчик файлов. Все они идут через встроенный слой
1660
- локализации, поэтому вы можете перевести их на другой язык, переопределить отдельную строку под
1661
- свой продукт или переключать язык на лету не переписывая компоненты.
1999
+ CDS components carry texts of their own: "No data available" in a select, the
2000
+ table filter labels, the `aria-label` of a close button, the file counter. They
2001
+ all go through the built-in localization layer, so you can translate them into
2002
+ another language, override a single string for your product, or switch languages
2003
+ on the fly — without rewriting components.
1662
2004
 
1663
- В библиотеку встроены два словарярусский и английский. По умолчанию активен `ru`, поэтому без
1664
- настройки всё уже на русском.
2005
+ The library ships two dictionariesRussian and English. `ru` is active by
2006
+ default, so out of the box everything is in Russian.
1665
2007
 
1666
- ## Настройка
2008
+ ## Setup
1667
2009
 
1668
- Локаль настраивается опцией `locale` в `createCds`. Переключиться на встроенный английский —
1669
- одна строка, словари для этого передавать не нужно:
2010
+ The locale is configured through the `locale` option of `createCds`. Switching to
2011
+ the built-in English is a one-liner you don't need to pass any dictionaries:
1670
2012
 
1671
2013
  ```ts
1672
2014
  import { createApp } from 'vue';
@@ -1686,7 +2028,7 @@ const cds = createCds({
1686
2028
  createApp(App).use(cds);
1687
2029
  ```
1688
2030
 
1689
- Языки, которых в библиотеке нет, добавляются словарём в `messages`:
2031
+ Languages the library doesn't have are added as a dictionary in `messages`:
1690
2032
 
1691
2033
  ```ts
1692
2034
  import de from './locales/cds-de';
@@ -1702,43 +2044,46 @@ createCds({
1702
2044
  });
1703
2045
  ```
1704
2046
 
1705
- | Опция | Тип | Назначение |
2047
+ | Option | Type | Purpose |
1706
2048
  | ------------------ | ------------------------- | ----------------------------------------------------------------------------- |
1707
- | `locale` | `string` | Активный язык; из коробки доступны `ru` (по умолчанию) и `en` |
1708
- | `fallback` | `string` | Язык, из которого берётся строка, если в активном её нет; по умолчанию `ru` |
1709
- | `messages` | `LocaleMessages` | Словари дополнительных языков; словарь одноимённого встроенного заменяется целиком |
1710
- | `decimalSeparator` | `string` | Разделитель дробной части; по умолчанию выводится из активной локали |
1711
- | `rtl` | `Record<string, boolean>` | Карта языков с письмом справа налево (см. [RTL](#rtl)) |
1712
- | `adapter` | `LocaleInstance` | Свой движок переводов вместо встроенного (см. [Свой адаптер](#свои-адаптер)) |
2049
+ | `locale` | `string` | Active language; `ru` (default) and `en` are available out of the box |
2050
+ | `fallback` | `string` | Language a string is taken from when the active one lacks it; `ru` by default |
2051
+ | `messages` | `LocaleMessages` | Dictionaries of extra languages; a same-named built-in dictionary is replaced entirely |
2052
+ | `decimalSeparator` | `string` | Decimal separator; derived from the active locale by default |
2053
+ | `rtl` | `Record<string, boolean>` | Map of right-to-left languages (see [RTL](#rtl)) |
2054
+ | `adapter` | `LocaleInstance` | Your own translation engine instead of the built-in one (see [Custom adapter](#custom-adapter)) |
1713
2055
 
1714
- Встроенные словари доступны и вам они лежат в экспорте `locales`. Берите их за основу для
1715
- своего языка или чтобы поправить пару строк:
2056
+ The built-in dictionaries are available to you as well they live in the
2057
+ `locales` export. Use them as a base for your own language or to fix a couple of
2058
+ strings:
1716
2059
 
1717
2060
  ```ts
1718
2061
  import { locales } from '@central-design-system/components';
1719
2062
 
1720
- locales.ru; // русский словарь
1721
- locales.en; // английский словарь
2063
+ locales.ru; // Russian dictionary
2064
+ locales.en; // English dictionary
1722
2065
  ```
1723
2066
 
1724
- Полный набор ключей в разделе [Ключи сообщений](#ключи-сообщении).
2067
+ For the full set of keys, see [Message keys](#message-keys).
1725
2068
 
1726
- ## Как компоненты берут текст
2069
+ ## How components get their text
1727
2070
 
1728
- Строки компонентов это ключи с префиксом `$cds.`, которые библиотека прогоняет через функцию
1729
- перевода. Часть ключей объявлена значениями пропсов по умолчанию, поэтому их видно в API:
1730
- `text` у `CdsFileUpload` `$cds.fileUpload.browse`, `closeLabel` у `CdsNotification` — `$cds.close`,
1731
- `noDataText` у `CdsSelect` `$cds.noDataText`.
2071
+ Component strings are keys prefixed with `$cds.` that the library runs through a
2072
+ translation function. Some of the keys are declared as default prop values, so
2073
+ you can see them in the API: `text` on `CdsFileUpload` is `$cds.fileUpload.browse`,
2074
+ `closeLabel` on `CdsNotification` is `$cds.close`, `noDataText` on `CdsSelect` is
2075
+ `$cds.noDataText`.
1732
2076
 
1733
- Отсюда три способа поменять текст.
2077
+ That gives you three ways to change a text.
1734
2078
 
1735
- **Сменить язык целиком**опцией `locale`:
2079
+ **Switch the whole language** with the `locale` option:
1736
2080
 
1737
2081
  ```ts
1738
2082
  createCds({ locale: { locale: 'en' } });
1739
2083
  ```
1740
2084
 
1741
- **Поменять надписи во всём продукте**словарём поверх встроенного:
2085
+ **Change wording across the product**with a dictionary on top of the built-in
2086
+ one:
1742
2087
 
1743
2088
  ```ts
1744
2089
  import { createCds, locales } from '@central-design-system/components';
@@ -1746,54 +2091,56 @@ import { createCds, locales } from '@central-design-system/components';
1746
2091
  createCds({
1747
2092
  locale: {
1748
2093
  messages: {
1749
- ru: { ...locales.ru, noDataText: 'Ничего не нашлось' }
2094
+ en: { ...locales.en, noDataText: 'Nothing found' }
1750
2095
  }
1751
2096
  }
1752
2097
  });
1753
2098
  ```
1754
2099
 
1755
- **Важно.** Словарь языка заменяется целиком, а не сливается по ключам. Без спреда
1756
- `...locales.ru` в русской локали останется один ключ, а остальные строки превратятся
1757
- в свои же ключи (`$cds.close` вместо «Закрыть»). Вложенные секции спредьте отдельно:
1758
- `table: { ...locales.ru.table, emptyText: '…' }`.
2100
+ **Important.** A language dictionary is replaced entirely, not merged key by key.
2101
+ Without the `...locales.en` spread, the English locale is left with a single key
2102
+ and the rest of the strings turn into their own keys (`$cds.close` instead of
2103
+ "Close"). Spread nested sections separately:
2104
+ `table: { ...locales.en.table, emptyText: '…' }`.
1759
2105
 
1760
- **Поменять одну надпись в одном месте**пропсом:
2106
+ **Change one label in one place**with a prop:
1761
2107
 
1762
2108
  ```vue
1763
- <CdsSelect :items="items" no-data-text="Подходящих поставщиков нет" />
2109
+ <CdsSelect :items="items" no-data-text="No matching suppliers" />
1764
2110
  ```
1765
2111
 
1766
- Тот же проп можно задать значением по умолчанию для всех экземпляров компонента
1767
- см. глобальную конфигурацию:
2112
+ The same prop can be set as the default for every instance of the component see
2113
+ global configuration:
1768
2114
 
1769
2115
  ```ts
1770
2116
  createCds({
1771
2117
  defaults: {
1772
- CdsSelect: { noDataText: 'Ничего не нашлось' }
2118
+ CdsSelect: { noDataText: 'Nothing found' }
1773
2119
  }
1774
2120
  });
1775
2121
  ```
1776
2122
 
1777
- Функция перевода принимает и обычный текст: строка без префикса `$cds.` возвращается как есть,
1778
- подставляя параметры. Так пропсы с локализуемым значением работают одинаково и с ключом,
1779
- и с готовой фразой.
2123
+ The translation function also accepts plain text: a string without the `$cds.`
2124
+ prefix is returned as is, with the parameters substituted. That's how props with
2125
+ a localizable value work the same way with a key and with a ready-made phrase.
1780
2126
 
1781
- Если ключа нет ни в активной локали, ни в `fallback`, компонент покажет сам ключ, а в dev-режиме
1782
- в консоли появится предупреждение `[CDS: useLocale] Translation key … not found`.
2127
+ If a key is missing from both the active locale and the `fallback`, the component
2128
+ shows the key itself, and in dev mode a
2129
+ `[CDS: useLocale] Translation key … not found` warning appears in the console.
1783
2130
 
1784
- ## Смена языка в рантайме
2131
+ ## Switching the language at runtime
1785
2132
 
1786
- `createCds` возвращает инстанс, у которого локаль лежит в реактивных ссылкахпереключение
1787
- языка достаточно записать в `current`:
2133
+ `createCds` returns an instance whose locale lives in reactive refsto switch
2134
+ languages, just write to `current`:
1788
2135
 
1789
2136
  ```ts
1790
2137
  const cds = createCds({ components, directives });
1791
2138
 
1792
- // например, по выбору пользователя в настройках профиля
2139
+ // for example, following the user's choice in profile settings
1793
2140
  cds.locale.current.value = 'en';
1794
2141
  ```
1795
2142
 
1796
- Внутри компонентов то же делает композабл `useLocale`:
2143
+ Inside components, the `useLocale` composable does the same:
1797
2144
 
1798
2145
  ```vue
1799
2146
  <script setup lang="ts">
@@ -1810,13 +2157,15 @@ const { current } = useLocale();
1810
2157
  </template>
1811
2158
  ```
1812
2159
 
1813
- Все смонтированные компоненты пересчитают свои строки самиперезагрузка страницы не нужна.
2160
+ Every mounted component recalculates its strings on its own no page reload
2161
+ needed.
1814
2162
 
1815
- ## Локаль для части приложения
2163
+ ## A locale for part of the application
1816
2164
 
1817
- Отдельному поддереву можно задать свой языкнапример, показать англоязычный виджет внутри
1818
- русского интерфейса. Для этого в компоненте-обёртке вызовите `provideLocale`: он берёт локаль
1819
- из контекста, накладывает переданные пропсы и провайдит результат детям.
2165
+ A single subtree can get its own language for example, an English-language
2166
+ widget inside a Russian interface. Call `provideLocale` in a wrapper component:
2167
+ it takes the locale from the context, applies the props you passed and provides
2168
+ the result to the children.
1820
2169
 
1821
2170
  ```vue
1822
2171
  <script setup lang="ts">
@@ -1842,13 +2191,13 @@ provideLocale(props);
1842
2191
  </template>
1843
2192
  ```
1844
2193
 
1845
- Не переданные пропсы наследуются от родительской локали, поэтому обёртка с одним `locale`
1846
- не теряет ни `fallback`, ни словари.
2194
+ Props you don't pass are inherited from the parent locale, so a wrapper with just
2195
+ a `locale` loses neither the `fallback` nor the dictionaries.
1847
2196
 
1848
2197
  ## useLocale
1849
2198
 
1850
- Композабл отдаёт текущую локаль и её функции используйте его в своих компонентах, чтобы их
1851
- тексты жили в тех же словарях, что и тексты CDS.
2199
+ The composable hands you the current locale and its functions use it in your
2200
+ own components so their texts live in the same dictionaries as the CDS ones.
1852
2201
 
1853
2202
  ```vue
1854
2203
  <script setup lang="ts">
@@ -1863,44 +2212,47 @@ const { t, n } = useLocale();
1863
2212
  </template>
1864
2213
  ```
1865
2214
 
1866
- | Свойство | Тип | Назначение |
2215
+ | Property | Type | Purpose |
1867
2216
  | ------------------ | ---------------------------------------------- | ------------------------------------------------------------- |
1868
- | `t` | `(key: string, ...params: unknown[]) => string` | Перевод ключа `$cds.…` с подстановкой параметров |
1869
- | `n` | `(value: number) => string` | Форматирование числа по активной локали |
1870
- | `current` | `Ref<string>` | Активный язык; запись меняет язык |
1871
- | `fallback` | `Ref<string>` | Язык-подстраховка |
1872
- | `messages` | `Ref<LocaleMessages>` | Словари; можно дописывать в рантайме |
1873
- | `decimalSeparator` | `ShallowRef<string>` | Разделитель дробной части активной локали |
2217
+ | `t` | `(key: string, ...params: unknown[]) => string` | Translation of a `$cds.…` key with parameter substitution |
2218
+ | `n` | `(value: number) => string` | Number formatting for the active locale |
2219
+ | `current` | `Ref<string>` | Active language; writing to it switches the language |
2220
+ | `fallback` | `Ref<string>` | Fallback language |
2221
+ | `messages` | `Ref<LocaleMessages>` | Dictionaries; can be extended at runtime |
2222
+ | `decimalSeparator` | `ShallowRef<string>` | Decimal separator of the active locale |
1874
2223
 
1875
- Параметры в строках нумерованные — `{0}`, `{1}`:
2224
+ Parameters in strings are numbered — `{0}`, `{1}`:
1876
2225
 
1877
2226
  ```ts
1878
2227
  const { t } = useLocale();
1879
2228
 
1880
- t('$cds.carousel.delimiter', 3, 8); // «Слайд 3 из 8»
1881
- t('Осталось дней: {0}', 5); // «Осталось дней: 5»
2229
+ t('$cds.carousel.delimiter', 3, 8); // "Slide 3 of 8"
2230
+ t('Days left: {0}', 5); // "Days left: 5"
1882
2231
  ```
1883
2232
 
1884
- `n` под капотом — `Intl.NumberFormat` с активной локалью и `fallback`, так что разделители групп
1885
- и дробной части приходят из браузера. `decimalSeparator` библиотека выводит из той же локали
1886
- (`,` для `ru`, `.` для `en`); если в продукте принят другой — задайте его явно в `createCds`.
2233
+ Under the hood `n` is `Intl.NumberFormat` with the active locale and the
2234
+ `fallback`, so group and decimal separators come from the browser. The library
2235
+ derives `decimalSeparator` from the same locale (`,` for `ru`, `.` for `en`); if
2236
+ your product uses a different one, set it explicitly in `createCds`.
1887
2237
 
1888
- ## Даты
2238
+ ## Dates
1889
2239
 
1890
- Названия месяцев и дней недели живут в отдельных date-локалях: их везут `ru` и `en`. Компоненты
1891
- даты и времени берут date-локаль по активному языку, поэтому после `current.value = 'en'` календарь
1892
- переключится сам.
2240
+ Month and weekday names live in separate date locales, shipped by `ru` and `en`.
2241
+ Date and time components pick the date locale by the active language, so after
2242
+ `current.value = 'en'` the calendar switches by itself.
1893
2243
 
1894
- Одному компоненту язык задаётся пропом `locale` — он есть у `CdsDatePicker`, `CdsDateInput`
1895
- и `CdsTimePicker`:
2244
+ A single component gets its language from the `locale` prop — `CdsDatePicker`,
2245
+ `CdsDateInput` and `CdsTimePicker` all have it:
1896
2246
 
1897
2247
  ```vue
1898
2248
  <CdsDatePicker v-model="value" locale="en" :first-day-of-week="0" header />
1899
2249
  ```
1900
2250
 
1901
- Проп принимает не только имя языка, но и свой объект date-локали (тип `TDateLocale`) так
1902
- подключается язык, которого в библиотеке нет. Встроенные date-локали для сверки и переиспользования
1903
- лежат в том же экспорте `locales`: `locales.ruDate`, `locales.enDate` и карта `locales.dateLocales`.
2251
+ The prop accepts not only a language name but also your own date locale object
2252
+ (type `TDateLocale`) that's how you plug in a language the library doesn't
2253
+ have. The built-in date locales, for reference and reuse, live in the same
2254
+ `locales` export: `locales.ruDate`, `locales.enDate` and the `locales.dateLocales`
2255
+ map.
1904
2256
 
1905
2257
  ```ts
1906
2258
  const de = {
@@ -1921,18 +2273,20 @@ const de = {
1921
2273
  <CdsDatePicker v-model="value" :locale="de" />
1922
2274
  ```
1923
2275
 
1924
- ## Таблица
2276
+ ## Table
1925
2277
 
1926
- `CdsTable` собирает свои подписи из ключей `$cds.table.*`, но принимает и точечное
1927
- переопределение пропом `locale` — он перекрывает только переданные строки:
2278
+ `CdsTable` builds its labels from the `$cds.table.*` keys, but it also accepts a
2279
+ pinpoint override through the `locale` prop which replaces only the strings you
2280
+ pass:
1928
2281
 
1929
2282
  ```vue
1930
- <CdsTable :columns="columns" :data="data" :locale="{ emptyText: 'Заявок пока нет' }" />
2283
+ <CdsTable :columns="columns" :data="data" :locale="{ emptyText: 'No requests yet' }" />
1931
2284
  ```
1932
2285
 
1933
2286
  ## RTL
1934
2287
 
1935
- Языки с письмом справа налево описываются картой `rtl`: ключ язык, значение направление.
2288
+ Right-to-left languages are described by the `rtl` map: the key is the language,
2289
+ the value is the direction.
1936
2290
 
1937
2291
  ```ts
1938
2292
  createCds({
@@ -1944,13 +2298,15 @@ createCds({
1944
2298
  });
1945
2299
  ```
1946
2300
 
1947
- Компоненты читают направление через `useRtl` и разворачивают то, что зависит от оси: сторону
1948
- раскрытия меню и тултипов, стрелки пагинации, порядок ячеек `CdsOtpInput`, заливку
1949
- `CdsProgressBar`. Отступы и границы в стилях в основном описаны логическими свойствами
1950
- (`margin-inline`, `inset-inline`) и зеркалятся браузером сами — но полноценной поддержки RTL
1951
- дизайн-система пока не заявляет, отдельные места потребуют доводки на вашей стороне.
2301
+ Components read the direction through `useRtl` and flip whatever depends on the
2302
+ axis: the side menus and tooltips open to, the pagination arrows, the cell order
2303
+ in `CdsOtpInput`, the fill of `CdsProgressBar`. Spacing and borders in the styles
2304
+ are mostly written with logical properties (`margin-inline`, `inset-inline`) and
2305
+ are mirrored by the browser itself but the design system does not claim full
2306
+ RTL support yet, and some places will need polishing on your side.
1952
2307
 
1953
- Атрибут направления библиотека за вас не проставляет повесьте его на корень приложения сами:
2308
+ The library does not set the direction attribute for you put it on the
2309
+ application root yourself:
1954
2310
 
1955
2311
  ```vue
1956
2312
  <script setup lang="ts">
@@ -1966,15 +2322,16 @@ const { isRtl } = useRtl();
1966
2322
  </template>
1967
2323
  ```
1968
2324
 
1969
- `useRtl` отдаёт `isRtl` и `rtlClasses` — готовый класс `cds-locale--is-rtl` / `cds-locale--is-ltr`
1970
- для ваших собственных стилей.
2325
+ `useRtl` gives you `isRtl` and `rtlClasses` — a ready `cds-locale--is-rtl` /
2326
+ `cds-locale--is-ltr` class for your own styles.
1971
2327
 
1972
- ## Свой адаптер
2328
+ ## Custom adapter
1973
2329
 
1974
- Если в приложении уже есть i18n-библиотека, отдайте переводы ей: опция `adapter` принимает любой
1975
- объект, реализующий интерфейс `LocaleInstance`. Тогда `messages`, `locale` и `fallback` из
1976
- `createCds` не используются источником истины становится ваш движок, а строки CDS живут
1977
- в общих словарях приложения под ключом `$cds`.
2330
+ If your application already has an i18n library, hand the translations over to
2331
+ it: the `adapter` option accepts any object implementing the `LocaleInstance`
2332
+ interface. In that case `messages`, `locale` and `fallback` from `createCds` are
2333
+ unused your engine becomes the source of truth, and the CDS strings live in the
2334
+ application's shared dictionaries under the `$cds` key.
1978
2335
 
1979
2336
  ```ts
1980
2337
  import type { LocaleInstance, LocaleOptions } from '@central-design-system/components';
@@ -2002,11 +2359,11 @@ import { createI18n } from 'vue-i18n';
2002
2359
 
2003
2360
  const i18n = createI18n({
2004
2361
  legacy: false,
2005
- locale: 'ru',
2362
+ locale: 'en',
2006
2363
  messages: {
2007
- ru: {
2008
- $cds: { noDataText: 'Отсутствуют данные' },
2009
- profile: { title: 'Профиль' }
2364
+ en: {
2365
+ $cds: { noDataText: 'No data available' },
2366
+ profile: { title: 'Profile' }
2010
2367
  }
2011
2368
  }
2012
2369
  });
@@ -2020,85 +2377,390 @@ const cds = createCds({
2020
2377
  });
2021
2378
  ```
2022
2379
 
2023
- Обязательные члены `LocaleInstance`: `name` (по нему адаптер и распознаётся), `current`,
2024
- `fallback`, `messages`, `decimalSeparator`, `t`, `n` и `provide` — фабрика вложенной локали
2025
- для `provideLocale`. Если поддержка «локали в поддереве» вам не нужна, `provide` может возвращать
2026
- тот же инстанс, как в примере выше.
2380
+ Required members of `LocaleInstance`: `name` (that's how the adapter is
2381
+ recognized), `current`, `fallback`, `messages`, `decimalSeparator`, `t`, `n` and
2382
+ `provide` a factory for a nested locale, used by `provideLocale`. If you don't
2383
+ need "a locale in a subtree", `provide` can return the same instance, as in the
2384
+ example above.
2027
2385
 
2028
- ## Ключи сообщений
2386
+ ## Message keys
2029
2387
 
2030
- Встроенный русский словарь шаблон для перевода на новый язык. Скопируйте его, переведите
2031
- значения и передайте в `messages` под ключом своего языка; его английская версия доступна как
2032
- `locales.en`.
2388
+ The built-in English dictionary is a template for translating into a new
2389
+ language. Copy it, translate the values and pass it to `messages` under your
2390
+ language's key; the Russian version is available as `locales.ru`.
2033
2391
 
2034
2392
  ```ts
2035
2393
  export default {
2036
- badge: 'Бейдж',
2037
- noDataText: 'Отсутствуют данные',
2038
- selectAll: 'Выбрать все',
2039
- close: 'Закрыть',
2040
- open: 'Открыть',
2041
- dismiss: 'Отклонить',
2394
+ badge: 'Badge',
2395
+ noDataText: 'No data available',
2396
+ selectAll: 'Select all',
2397
+ close: 'Close',
2398
+ open: 'Open',
2399
+ dismiss: 'Dismiss',
2042
2400
  confirmEdit: {
2043
- ok: 'ОК',
2044
- cancel: 'Отмена'
2401
+ ok: 'OK',
2402
+ cancel: 'Cancel'
2045
2403
  },
2046
2404
  carousel: {
2047
- prev: 'Предыдущий слайд',
2048
- next: 'Следующий слайд',
2049
- delimiter: 'Слайд {0} из {1}'
2405
+ prev: 'Previous slide',
2406
+ next: 'Next slide',
2407
+ delimiter: 'Slide {0} of {1}'
2050
2408
  },
2051
2409
  input: {
2052
- clear: 'Очистить {0}',
2053
- otp: 'Введите одноразовый код',
2054
- prependAction: '{0} предварительных действий',
2055
- appendAction: '{0} добавочных действий'
2410
+ clear: 'Clear {0}',
2411
+ otp: 'Please enter OTP character',
2412
+ prependAction: '{0} prepended action',
2413
+ appendAction: '{0} appended action'
2056
2414
  },
2057
2415
  fileInput: {
2058
- counter: 'Файлов: {0}',
2059
- counterSize: 'Файлов: {0} ({1} всего)'
2416
+ counter: '{0} files',
2417
+ counterSize: '{0} files ({1} in total)'
2060
2418
  },
2061
2419
  fileUpload: {
2062
- title: 'Перетащите файлы сюда',
2063
- divider: 'или',
2064
- browse: 'Выберите файлы'
2420
+ title: 'Drag and drop files here',
2421
+ divider: 'or',
2422
+ browse: 'Browse files'
2065
2423
  },
2066
2424
  steps: {
2067
- prev: 'Назад',
2068
- next: 'Далее'
2425
+ prev: 'Back',
2426
+ next: 'Next'
2069
2427
  },
2070
2428
  table: {
2071
- filterTitle: 'Фильтр меню',
2072
- filterConfirm: 'Выбрать',
2073
- filterReset: 'Сброс',
2074
- filterEmptyText: 'Нет фильтров',
2075
- filterCheckAll: 'Выбрать все элементы',
2076
- filterSearchPlaceholder: 'Поиск фильтров',
2077
- emptyText: 'Нет данных',
2078
- selectAll: 'Выбрать текущую страницу',
2079
- selectInvert: 'Инвертировать текущую страницу',
2080
- selectNone: 'Очистить все данные',
2081
- selectionAll: 'Выбрать все данные',
2082
- sortTitle: 'Сортировка',
2083
- expand: 'Раскрыть строку',
2084
- collapse: 'Свернуть строку',
2085
- triggerDesc: 'Отсортировать по убыванию',
2086
- triggerAsc: 'Отсортировать по возрастанию',
2087
- cancelSort: 'Отменить сортировку',
2088
- showed: 'Отображено',
2089
- from: 'из',
2090
- rowOnPage: 'Строк на странице'
2429
+ filterTitle: 'Filter menu',
2430
+ filterConfirm: 'OK',
2431
+ filterReset: 'Reset',
2432
+ filterEmptyText: 'No filters',
2433
+ filterCheckAll: 'Select all items',
2434
+ filterSearchPlaceholder: 'Search in filters',
2435
+ emptyText: 'No data',
2436
+ selectAll: 'Select current page',
2437
+ selectInvert: 'Invert current page',
2438
+ selectNone: 'Clear all data',
2439
+ selectionAll: 'Select all data',
2440
+ sortTitle: 'Sort',
2441
+ expand: 'Expand row',
2442
+ collapse: 'Collapse row',
2443
+ triggerDesc: 'Click to sort descending',
2444
+ triggerAsc: 'Click to sort ascending',
2445
+ cancelSort: 'Click to cancel sorting',
2446
+ showed: 'Showed',
2447
+ from: 'from',
2448
+ rowOnPage: 'Row on page'
2091
2449
  },
2092
2450
  uploader: {
2093
- uploading: 'Загрузка...',
2094
- uploadFile: 'Загрузить файл',
2095
- downloadFile: 'Скачать файл',
2096
- removeFile: 'Удалить файл',
2097
- uploadError: 'Ошибка загрузки',
2098
- previewFile: 'Предпросмотр файла'
2451
+ uploading: 'Uploading...',
2452
+ uploadFile: 'Upload file',
2453
+ downloadFile: 'Download file',
2454
+ removeFile: 'Remove file',
2455
+ uploadError: 'Upload error',
2456
+ previewFile: 'Preview file'
2099
2457
  }
2100
2458
  };
2101
2459
  ```
2102
2460
 
2103
- Словарь можно оставить неполным: недостающие ключи возьмутся из `fallback`, то есть по умолчанию
2104
- из русского.
2461
+ The dictionary may stay incomplete: missing keys are taken from the `fallback`
2462
+ that is, from Russian by default.
2463
+
2464
+ ---
2465
+
2466
+ ---
2467
+ sourceHash: 16f5caa5227fd7ac98a4d370070985a7094a8a2b
2468
+ ---
2469
+
2470
+ # Date Utils
2471
+
2472
+ Central Design System includes a set of functions for working with the native JS
2473
+ `Date`: mask-based formatting, string parsing, arithmetic, comparison and
2474
+ calendar math. You don't need a separate date library (dayjs, date-fns) for
2475
+ everyday tasks. The date and time components use the very same functions —
2476
+ CdsDateInput, CdsDatePicker,
2477
+ CdsTimePicker — so format masks are identical in
2478
+ the utilities and in the components.
2479
+
2480
+ The functions accept a `Date`, a timestamp (milliseconds) or a date string,
2481
+ return a native `Date` and **never mutate** the arguments you pass — the result
2482
+ is always a new object.
2483
+
2484
+ ## Setup
2485
+
2486
+ The utilities are exported from the package under the `utils` namespace:
2487
+
2488
+ ```ts
2489
+ import { utils } from '@central-design-system/components';
2490
+
2491
+ const { formatDate, addToDate } = utils;
2492
+
2493
+ formatDate(new Date(2026, 7, 18), 'DD.MM.YYYY'); // '18.08.2026'
2494
+ ```
2495
+
2496
+ ## Formatting — `formatDate`
2497
+
2498
+ `formatDate(value, mask, dateLocale?)` turns a date into a string using a mask:
2499
+
2500
+ ```ts
2501
+ const { formatDate } = utils;
2502
+
2503
+ formatDate(new Date(2026, 7, 18, 14, 30), 'DD.MM.YYYY HH:mm'); // '18.08.2026 14:30'
2504
+ formatDate(Date.now(), 'D MMM YYYY'); // '18 Авг 2026'
2505
+ formatDate(new Date(2026, 7, 18), 'dddd'); // 'Вторник'
2506
+ ```
2507
+
2508
+ Without a mask, an ISO-like format is used: `YYYY-MM-DDTHH:mm:ss.SSSZ`.
2509
+ For an invalid value the function returns `undefined`.
2510
+
2511
+ Month and weekday names come from the Russian date locale by default. To print
2512
+ them in another language, pass a date locale as the third argument — the
2513
+ built-in ones live in the `locales` export:
2514
+
2515
+ ```ts
2516
+ import { locales, utils } from '@central-design-system/components';
2517
+
2518
+ utils.formatDate(new Date(2026, 7, 18), 'dddd, D MMMM', locales.enDate);
2519
+ // 'Tuesday, 18 August'
2520
+ ```
2521
+
2522
+ Your own language is plugged in as a `TDateLocale` object — the same fields as
2523
+ `locales.ruDate`. See the Internationalization
2524
+ guide for more on date locales.
2525
+
2526
+ ### Format tokens
2527
+
2528
+ | Unit | Token | Result |
2529
+ | --- | --- | --- |
2530
+ | Year | `YY` / `YYYY` | `26` / `2026` |
2531
+ | Month | `M` / `MM` | `8` / `08` |
2532
+ | Month (name) | `MMM` / `MMMM` | `Авг` / `Август` |
2533
+ | Quarter | `Q` / `Qo` | `3` / `3rd` |
2534
+ | Day of month | `D` / `Do` / `DD` | `18` / `18th` / `18` |
2535
+ | Day of year | `DDD` / `DDDD` | `230` / `230` (zero-padded to 3 digits) |
2536
+ | Day of week | `d` | `2` (0 — Sunday) |
2537
+ | Day of week (name) | `dd` / `ddd` / `dddd` | `Вт` / `Вт` / `Вторник` |
2538
+ | Day of week (ISO) | `E` | `2` (1 — Monday, 7 — Sunday) |
2539
+ | Week of year | `w` / `ww` | `34` / `34` |
2540
+ | Hour (0–23) | `H` / `HH` | `14` / `14` |
2541
+ | Hour (1–12) | `h` / `hh` | `2` / `02` |
2542
+ | Minute | `m` / `mm` | `30` / `30` |
2543
+ | Second | `s` / `ss` | `5` / `05` |
2544
+ | Fractions of a second | `S` / `SS` / `SSS` | `1` / `12` / `123` |
2545
+ | Time zone | `Z` / `ZZ` | `+03:00` / `+0300` |
2546
+ | Meridiem | `A` / `a` / `aa` | `PM` / `pm` / `p.m.` |
2547
+ | Unix time | `X` / `x` | seconds / milliseconds |
2548
+
2549
+ Ordinal suffixes (`Do`, `Qo`) are English (`1st`, `2nd`…) regardless of the
2550
+ locale.
2551
+
2552
+ Arbitrary text inside a mask is escaped with square brackets:
2553
+
2554
+ ```ts
2555
+ formatDate(new Date(2026, 7, 18), '[Сегодня] DD.MM'); // 'Сегодня 18.08'
2556
+ ```
2557
+
2558
+ ## Parsing — `extractDate` and `splitDate`
2559
+
2560
+ `extractDate(str, mask, dateLocale?)` parses a string with a mask and returns a
2561
+ `Date`:
2562
+
2563
+ ```ts
2564
+ const { extractDate } = utils;
2565
+
2566
+ extractDate('21.03.1985', 'DD.MM.YYYY'); // Date: 21 March 1985
2567
+ extractDate('2019-10-29 23:12', 'YYYY-MM-DD HH:mm'); // Date: 29 October 2019, 23:12
2568
+ ```
2569
+
2570
+ Month and day names inside the string are recognized through the date locale —
2571
+ Russian by default, just like in `formatDate`.
2572
+
2573
+ A non-existent day overflows following the rules of the native `Date`:
2574
+ `extractDate('30.02.2024', 'DD.MM.YYYY')` gives 1 March 2024. When you need
2575
+ strict input validation, format the result back and compare it with the string:
2576
+
2577
+ ```ts
2578
+ const strict = (str: string, mask: string) => formatDate(extractDate(str, mask), mask) === str;
2579
+
2580
+ strict('18.08.2026', 'DD.MM.YYYY'); // true
2581
+ strict('30.02.2024', 'DD.MM.YYYY'); // false — overflowed into 01.03.2024
2582
+ ```
2583
+
2584
+ If you don't need a `Date`, `splitDate(str, mask, dateLocale?)` splits the string
2585
+ into its parts — an `IRawDate` object with the fields `year`, `month`, `day`,
2586
+ `hour`, `minute`, `second`, `millisecond` (anything not found is `null`):
2587
+
2588
+ ```ts
2589
+ const { splitDate } = utils;
2590
+
2591
+ splitDate('18.08.2026', 'DD.MM.YYYY');
2592
+ // { year: 2026, month: 8, day: 18, hour: null, … }
2593
+ ```
2594
+
2595
+ ## Creating and changing
2596
+
2597
+ ### `buildDate`
2598
+
2599
+ `buildDate(modified, utc?)` — the current moment with individual parts replaced.
2600
+ Handy when you need "now, but at 15:00" or "today, but in 2010":
2601
+
2602
+ ```ts
2603
+ const { buildDate } = utils;
2604
+
2605
+ buildDate({ year: 2010, day: 5, hour: 15 });
2606
+ // current month, minutes and seconds; year 2010, day 5, hour 15
2607
+ ```
2608
+
2609
+ Supported object fields: `year`, `month` (1–12), `day` (or `date`), `hour`,
2610
+ `minute`, `second`, `millisecond`.
2611
+
2612
+ ### `adjustDate`
2613
+
2614
+ `adjustDate(date, modified, utc?)` — the same thing, but for an arbitrary date:
2615
+
2616
+ ```ts
2617
+ const { adjustDate } = utils;
2618
+
2619
+ adjustDate(new Date(2026, 10, 2), { year: 2010, month: 2 });
2620
+ // Date: 2 February 2010
2621
+ ```
2622
+
2623
+ Note that `month` here is 1-based (February is `2`), unlike in the `Date`
2624
+ constructor.
2625
+
2626
+ ### `addToDate` / `subtractFromDate`
2627
+
2628
+ Add and subtract intervals. The object fields are the same, but they mean "how
2629
+ much to add" rather than "what to set":
2630
+
2631
+ ```ts
2632
+ const { addToDate, subtractFromDate } = utils;
2633
+
2634
+ addToDate(new Date(2026, 2, 7), { day: 7, month: 1 }); // Date: 14 April 2026
2635
+ subtractFromDate(new Date(2026, 2, 7), { hour: 24 }); // Date: 6 March 2026
2636
+ ```
2637
+
2638
+ ### `startOfDate` / `endOfDate`
2639
+
2640
+ The start and the end of a period — year, month, day, hour, minute or second:
2641
+
2642
+ ```ts
2643
+ const { startOfDate, endOfDate } = utils;
2644
+
2645
+ startOfDate(new Date(2026, 7, 18, 14, 30), 'year'); // Date: 1 January 2026, 00:00:00.000
2646
+ endOfDate(new Date(2026, 7, 18, 14, 30), 'month'); // Date: 31 August 2026, 23:59:59.999
2647
+ ```
2648
+
2649
+ Period unit: `'year'`, `'month'`, `'day'`, `'hour'`, `'minute'`, `'second'`
2650
+ (the plural form is accepted too).
2651
+
2652
+ ## Comparison and ranges
2653
+
2654
+ ### `isSameDate`
2655
+
2656
+ Compares dates down to a unit: `'year'` — the year only, `'month'` — month and
2657
+ year, `'day'` — the calendar day, and so on. Without a unit, the timestamps are
2658
+ compared in full.
2659
+
2660
+ ```ts
2661
+ const { isSameDate } = utils;
2662
+
2663
+ isSameDate(new Date(2026, 7, 1), new Date(2026, 7, 30), 'month'); // true
2664
+ isSameDate(new Date(2026, 7, 1), new Date(2026, 7, 30), 'day'); // false
2665
+ ```
2666
+
2667
+ ### `getDateDiff`
2668
+
2669
+ The difference between two dates in the chosen unit (days by default):
2670
+
2671
+ ```ts
2672
+ const { getDateDiff } = utils;
2673
+
2674
+ getDateDiff(new Date(2026, 4, 12), new Date(2026, 3, 8)); // 34 (days)
2675
+ getDateDiff(new Date(2026, 4, 12), new Date(2026, 3, 8), 'months'); // 1
2676
+ ```
2677
+
2678
+ ### `isBetweenDates` / `getDateBetween`
2679
+
2680
+ `isBetweenDates(date, from, to, opts?)` checks whether a date falls inside a
2681
+ range. The bounds are excluded by default; the `inclusiveFrom` and `inclusiveTo`
2682
+ options include them, and `onlyDate: true` compares calendar days only, ignoring
2683
+ the time:
2684
+
2685
+ ```ts
2686
+ const { isBetweenDates } = utils;
2687
+
2688
+ isBetweenDates(date, from, to); // strict range
2689
+ isBetweenDates(date, from, to, { inclusiveFrom: true, inclusiveTo: true, onlyDate: true });
2690
+ ```
2691
+
2692
+ `getDateBetween(date, min, max)` clamps a date to a range: it returns the date
2693
+ itself if it is inside, otherwise the nearest bound:
2694
+
2695
+ ```ts
2696
+ const { getDateBetween } = utils;
2697
+
2698
+ getDateBetween(new Date(2025, 0, 1), new Date(2026, 0, 1), new Date(2026, 11, 31));
2699
+ // Date: 1 January 2026 — the date is below the minimum, so the min bound came back
2700
+ ```
2701
+
2702
+ ### `getMinDate` / `getMaxDate`
2703
+
2704
+ The smallest and the largest of a set of dates. They return a timestamp (number) —
2705
+ wrap it in `new Date()` if you need a date object:
2706
+
2707
+ ```ts
2708
+ const { getMinDate, getMaxDate } = utils;
2709
+
2710
+ const min = getMinDate(new Date(2026, 6, 24), new Date(2026, 5, 20), new Date(2026, 6, 26));
2711
+ new Date(min); // Date: 20 June 2026
2712
+
2713
+ const dates = [/* Date[] */];
2714
+ const max = getMaxDate(dates[0], ...dates.slice(1));
2715
+ ```
2716
+
2717
+ ## Calendar
2718
+
2719
+ ```ts
2720
+ const { getDayOfWeek, getWeekOfYear, getDayOfYear, daysInMonth } = utils;
2721
+
2722
+ getDayOfWeek(new Date(2026, 7, 16)); // 7 — Sunday (ISO: 1 — Monday)
2723
+ getWeekOfYear(new Date(2026, 0, 4)); // 1 — ISO week number in the year
2724
+ getDayOfYear(new Date(2026, 1, 4)); // 35 — ordinal day in the year
2725
+ daysInMonth(new Date(2024, 1, 15)); // 29 — February of a leap year
2726
+ ```
2727
+
2728
+ ## Other
2729
+
2730
+ ### `isValidDate`
2731
+
2732
+ Checks whether a value parses into a date:
2733
+
2734
+ ```ts
2735
+ const { isValidDate } = utils;
2736
+
2737
+ isValidDate('2026-08-18'); // true
2738
+ isValidDate('не дата'); // false
2739
+ ```
2740
+
2741
+ The check is syntactic — it does not catch non-existent calendar days
2742
+ (see `splitDate` above).
2743
+
2744
+ ### `cloneDate`
2745
+
2746
+ A copy of a date. Useful before handing it to third-party code that might mutate
2747
+ the object (CDS utilities themselves never modify their arguments):
2748
+
2749
+ ```ts
2750
+ const { cloneDate } = utils;
2751
+
2752
+ const copy = cloneDate(original);
2753
+ ```
2754
+
2755
+ ### `inferDateFormat`
2756
+
2757
+ Detects the shape of a value — handy for returning the result in the same form
2758
+ the value came in:
2759
+
2760
+ ```ts
2761
+ const { inferDateFormat } = utils;
2762
+
2763
+ inferDateFormat(new Date()); // 'date'
2764
+ inferDateFormat(1787059805000); // 'number'
2765
+ inferDateFormat('18.08.2026'); // 'string'
2766
+ ```