@central-design-system/components 3.0.0-alpha.9 → 3.0.0-beta.10

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 (312) hide show
  1. package/dist/cds.css +1 -1
  2. package/dist/cds.d.ts +34 -1
  3. package/dist/cds.es.js +15758 -6208
  4. package/dist/cds.umd.js +22 -1
  5. package/dist/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +1038 -0
  6. package/dist/components/CdsAutocomplete/index.d.ts +1 -0
  7. package/dist/components/CdsBadge/CdsBadge.vue.d.ts +35 -14
  8. package/dist/components/CdsBadge/index.d.ts +1 -0
  9. package/dist/components/CdsBreadcrumbs/CdsBreadcrumbs.vue.d.ts +12 -5
  10. package/dist/components/CdsBreadcrumbs/CdsBreadcrumbsItem.vue.d.ts +12 -6
  11. package/dist/components/CdsButton/CdsButton.vue.d.ts +95 -33
  12. package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +19 -8
  13. package/dist/components/CdsCheckbox/CdsCheckboxGroup.vue.d.ts +21 -8
  14. package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +764 -585
  15. package/dist/components/CdsCombobox/composable/highlight.d.ts +1 -1
  16. package/dist/components/CdsCombobox/composable/index.d.ts +1 -0
  17. package/dist/components/CdsCombobox/index.d.ts +1 -0
  18. package/dist/components/CdsContainer/CdsContainer.vue.d.ts +220 -0
  19. package/dist/components/CdsContainer/CdsContainerItem.vue.d.ts +123 -0
  20. package/dist/components/CdsContainer/context.d.ts +15 -0
  21. package/dist/components/CdsContainer/index.d.ts +2 -0
  22. package/dist/components/CdsContentSwitcher/CdsContentSwitcher.vue.d.ts +66 -0
  23. package/dist/components/CdsContentSwitcher/CdsContentSwitcherItem.vue.d.ts +212 -0
  24. package/dist/components/CdsContentSwitcher/index.d.ts +2 -0
  25. package/dist/components/CdsDatePicker/CdsDatePicker.vue.d.ts +24 -46
  26. package/dist/components/CdsDatePicker/index.d.ts +1 -0
  27. package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +20 -3
  28. package/dist/components/CdsDrawer/index.d.ts +1 -0
  29. package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +797 -622
  30. package/dist/components/CdsDropdown/composable/index.d.ts +1 -0
  31. package/dist/components/CdsDropdown/composable/scrolling.d.ts +7 -0
  32. package/dist/components/CdsDropdown/index.d.ts +1 -0
  33. package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +4 -4
  34. package/dist/components/CdsEmptyState/index.d.ts +1 -0
  35. package/dist/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +119 -0
  36. package/dist/components/CdsExpandablePanel/CdsExpandablePanelContent.vue.d.ts +15 -0
  37. package/dist/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +55 -0
  38. package/dist/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +126 -0
  39. package/dist/components/CdsExpandablePanel/composable/expandablePanelTitleProps.d.ts +31 -0
  40. package/dist/components/CdsExpandablePanel/composable/expandablePanels.d.ts +16 -0
  41. package/dist/components/CdsExpandablePanel/composable/index.d.ts +1 -0
  42. package/dist/components/CdsExpandablePanel/index.d.ts +4 -0
  43. package/dist/components/CdsFooter/CdsFooter.vue.d.ts +86 -0
  44. package/dist/components/CdsFooter/index.d.ts +1 -0
  45. package/dist/components/CdsForm/CdsForm.vue.d.ts +13 -29
  46. package/dist/components/CdsForm/index.d.ts +1 -0
  47. package/dist/components/CdsGrid/index.d.ts +3 -0
  48. package/dist/components/CdsHeader/CdsHeader.vue.d.ts +86 -0
  49. package/dist/components/CdsHeader/index.d.ts +1 -0
  50. package/dist/components/CdsIcon/CdsIcon.vue.d.ts +16 -3
  51. package/dist/components/CdsInput/CdsInput.vue.d.ts +29 -37
  52. package/dist/components/CdsInput/CdsInputDescription.vue.d.ts +1 -1
  53. package/dist/components/CdsInput/CdsInputLabel.vue.d.ts +1 -1
  54. package/dist/components/CdsInput/CdsInputMessages.vue.d.ts +1 -1
  55. package/dist/components/CdsLayout/CdsLayout.vue.d.ts +47 -0
  56. package/dist/components/CdsLayout/components/LayoutResizeObserver.d.ts +19 -0
  57. package/dist/components/CdsLayout/components/LayoutScrollObserver.d.ts +55 -0
  58. package/dist/components/CdsLayout/components/index.d.ts +2 -0
  59. package/dist/components/CdsLayout/context.d.ts +33 -0
  60. package/dist/components/CdsLayout/index.d.ts +1 -0
  61. package/dist/components/CdsLink/CdsLink.vue.d.ts +13 -1
  62. package/dist/components/CdsList/CdsList.vue.d.ts +16 -9
  63. package/dist/components/CdsList/CdsListGroup.vue.d.ts +8 -8
  64. package/dist/components/CdsList/CdsListItem.vue.d.ts +19 -31
  65. package/dist/components/CdsLoader/CdsLoader.vue.d.ts +13 -1
  66. package/dist/components/CdsMain/CdsMain.vue.d.ts +3 -0
  67. package/dist/components/CdsMain/context.d.ts +4 -0
  68. package/dist/components/CdsMain/index.d.ts +1 -0
  69. package/dist/components/CdsMenu/CdsMenu.vue.d.ts +25 -331
  70. package/dist/components/CdsModal/CdsModal.vue.d.ts +458 -0
  71. package/dist/components/CdsModal/index.d.ts +1 -0
  72. package/dist/components/CdsNotification/CdsNotification.vue.d.ts +166 -0
  73. package/dist/components/CdsNotification/CdsNotificationAlert.vue.d.ts +465 -0
  74. package/dist/components/CdsNotification/composable/index.d.ts +1 -0
  75. package/dist/components/CdsNotification/composable/notification.d.ts +64 -0
  76. package/dist/components/CdsNotification/index.d.ts +2 -0
  77. package/dist/components/CdsOverlay/CdsOverlay.vue.d.ts +14 -11
  78. package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +18 -0
  79. package/dist/components/CdsPage/CdsPage.vue.d.ts +25 -0
  80. package/dist/components/CdsPage/index.d.ts +1 -0
  81. package/dist/components/CdsPagination/CdsPagination.vue.d.ts +15 -9
  82. package/dist/components/CdsPagination/index.d.ts +1 -0
  83. package/dist/components/CdsProgress/CdsProgress.vue.d.ts +156 -0
  84. package/dist/components/CdsProgress/index.d.ts +1 -0
  85. package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +233 -8
  86. package/dist/components/CdsRadioButton/CdsRadioButton.vue.d.ts +21 -8
  87. package/dist/components/CdsRadioButton/index.d.ts +2 -0
  88. package/dist/components/CdsSelect/CdsSelect.vue.d.ts +136 -114
  89. package/dist/components/CdsSelect/index.d.ts +1 -0
  90. package/dist/components/CdsSidebar/CdsSidebar.vue.d.ts +28 -0
  91. package/dist/components/CdsSidebar/index.d.ts +1 -0
  92. package/dist/components/CdsSkeletonLoader/CdsSkeletonLoader.vue.d.ts +132 -0
  93. package/dist/components/CdsSkeletonLoader/index.d.ts +1 -0
  94. package/dist/components/CdsSkeletonLoader/types.d.ts +37 -0
  95. package/dist/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +162 -0
  96. package/dist/components/CdsSlideGroup/CdsSlideGroupItem.vue.d.ts +43 -0
  97. package/dist/components/CdsSlideGroup/index.d.ts +2 -0
  98. package/dist/components/CdsSlideGroup/utils/calculate.d.ts +14 -0
  99. package/dist/components/CdsSlideGroup/utils/index.d.ts +1 -0
  100. package/dist/components/CdsStages/CdsStages.vue.d.ts +12 -0
  101. package/dist/components/CdsStages/index.d.ts +1 -0
  102. package/dist/components/CdsStatus/CdsStatus.vue.d.ts +12 -0
  103. package/dist/components/CdsStatus/index.d.ts +1 -0
  104. package/dist/components/CdsSteps/CdsSteps.vue.d.ts +170 -0
  105. package/dist/components/CdsSteps/CdsStepsItem.vue.d.ts +84 -0
  106. package/dist/components/CdsSteps/context.d.ts +11 -0
  107. package/dist/components/CdsSteps/index.d.ts +2 -0
  108. package/dist/components/CdsSteps/svg/_CdsStepCurrentIcon.vue.d.ts +2 -0
  109. package/dist/components/CdsSteps/svg/_CdsStepsIconIncomplete.vue.d.ts +2 -0
  110. package/dist/components/CdsTable/CdsTable.vue.d.ts +1188 -0
  111. package/dist/components/CdsTable/CdsTableColumn.vue.d.ts +10 -0
  112. package/dist/components/CdsTable/CdsTableColumnGroup.vue.d.ts +10 -0
  113. package/dist/components/CdsTable/components/Body/Body.d.ts +12 -0
  114. package/dist/components/CdsTable/components/Body/BodyRow.d.ts +22 -0
  115. package/dist/components/CdsTable/components/Body/ExpandedRow.d.ts +13 -0
  116. package/dist/components/CdsTable/components/Body/index.d.ts +1 -0
  117. package/dist/components/CdsTable/components/Cell/Cell.d.ts +34 -0
  118. package/dist/components/CdsTable/components/Cell/MeasureCell.d.ts +7 -0
  119. package/dist/components/CdsTable/components/Cell/index.d.ts +2 -0
  120. package/dist/components/CdsTable/components/ColGroup/ColGroup.d.ts +8 -0
  121. package/dist/components/CdsTable/components/ColGroup/index.d.ts +1 -0
  122. package/dist/components/CdsTable/components/Filter/FilterDropdown.d.ts +14 -0
  123. package/dist/components/CdsTable/components/Filter/FilterSearch.d.ts +9 -0
  124. package/dist/components/CdsTable/components/Filter/FilterWrapper.d.ts +4 -0
  125. package/dist/components/CdsTable/components/Filter/index.d.ts +1 -0
  126. package/dist/components/CdsTable/components/FixedHolder/FixedHolder.d.ts +21 -0
  127. package/dist/components/CdsTable/components/FixedHolder/index.d.ts +1 -0
  128. package/dist/components/CdsTable/components/Footer/Footer.d.ts +8 -0
  129. package/dist/components/CdsTable/components/Footer/index.d.ts +1 -0
  130. package/dist/components/CdsTable/components/Header/DragHandle.d.ts +44 -0
  131. package/dist/components/CdsTable/components/Header/Header.d.ts +11 -0
  132. package/dist/components/CdsTable/components/Header/HeaderRow.d.ts +15 -0
  133. package/dist/components/CdsTable/components/Header/index.d.ts +1 -0
  134. package/dist/components/CdsTable/components/Icons/ExpandIcon.d.ts +12 -0
  135. package/dist/components/CdsTable/components/Panel/Panel.d.ts +4 -0
  136. package/dist/components/CdsTable/components/Panel/index.d.ts +1 -0
  137. package/dist/components/CdsTable/components/ResizeObserver/ResizeObserver.d.ts +11 -0
  138. package/dist/components/CdsTable/components/ResizeObserver/index.d.ts +1 -0
  139. package/dist/components/CdsTable/components/StickyScrollbar/StickyScrollbar.d.ts +15 -0
  140. package/dist/components/CdsTable/components/StickyScrollbar/index.d.ts +1 -0
  141. package/dist/components/CdsTable/components/Table/InternalTable.d.ts +1172 -0
  142. package/dist/components/CdsTable/components/TableProvider.d.ts +1176 -0
  143. package/dist/components/CdsTable/composable/columns.d.ts +28 -0
  144. package/dist/components/CdsTable/composable/filter.d.ts +16 -0
  145. package/dist/components/CdsTable/composable/flat.d.ts +17 -0
  146. package/dist/components/CdsTable/composable/frame.d.ts +6 -0
  147. package/dist/components/CdsTable/composable/index.d.ts +10 -0
  148. package/dist/components/CdsTable/composable/pagination.d.ts +18 -0
  149. package/dist/components/CdsTable/composable/selection.d.ts +23 -0
  150. package/dist/components/CdsTable/composable/sorter.d.ts +21 -0
  151. package/dist/components/CdsTable/composable/sticky.d.ts +12 -0
  152. package/dist/components/CdsTable/composable/table.d.ts +655 -0
  153. package/dist/components/CdsTable/constants.d.ts +2 -0
  154. package/dist/components/CdsTable/context/body.d.ts +19 -0
  155. package/dist/components/CdsTable/context/expandedRow.d.ts +10 -0
  156. package/dist/components/CdsTable/context/hover.d.ts +9 -0
  157. package/dist/components/CdsTable/context/index.d.ts +8 -0
  158. package/dist/components/CdsTable/context/resize.d.ts +9 -0
  159. package/dist/components/CdsTable/context/slots.d.ts +17 -0
  160. package/dist/components/CdsTable/context/sticky.d.ts +2 -0
  161. package/dist/components/CdsTable/context/summary.d.ts +14 -0
  162. package/dist/components/CdsTable/context/table.d.ts +20 -0
  163. package/dist/components/CdsTable/index.d.ts +6 -0
  164. package/dist/components/CdsTable/interface.d.ts +323 -0
  165. package/dist/components/CdsTable/utils/column.d.ts +7 -0
  166. package/dist/components/CdsTable/utils/expand.d.ts +2 -0
  167. package/dist/components/CdsTable/utils/fixed.d.ts +13 -0
  168. package/dist/components/CdsTable/utils/index.d.ts +5 -0
  169. package/dist/components/CdsTable/utils/listener.d.ts +5 -0
  170. package/dist/components/CdsTable/utils/value.d.ts +10 -0
  171. package/dist/components/CdsTabs/CdsTab.vue.d.ts +132 -0
  172. package/dist/components/CdsTabs/CdsTabs.vue.d.ts +236 -0
  173. package/dist/components/CdsTabs/index.d.ts +2 -0
  174. package/dist/components/CdsTabs/shared.d.ts +3 -0
  175. package/dist/components/CdsTabs/utils/helpers.d.ts +2 -0
  176. package/dist/components/CdsTabs/utils/index.d.ts +1 -0
  177. package/dist/components/CdsTag/CdsTag.vue.d.ts +14 -2
  178. package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +159 -157
  179. package/dist/components/CdsTextArea/index.d.ts +1 -0
  180. package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +170 -140
  181. package/dist/components/CdsTimePicker/CdsTimePicker.vue.d.ts +21 -37
  182. package/dist/components/CdsTimePicker/index.d.ts +1 -0
  183. package/dist/components/CdsToggle/CdsToggle.vue.d.ts +197 -0
  184. package/dist/components/CdsToggle/index.d.ts +1 -0
  185. package/dist/components/CdsToolbar/CdsToolbar.vue.d.ts +56 -0
  186. package/dist/components/CdsToolbar/CdsToolbarTitle.vue.d.ts +18 -0
  187. package/dist/components/CdsToolbar/index.d.ts +2 -0
  188. package/dist/components/CdsTooltip/CdsTooltip.vue.d.ts +34 -331
  189. package/dist/components/CdsTooltip/index.d.ts +1 -0
  190. package/dist/components/CdsTree/composable/index.d.ts +1 -0
  191. package/dist/components/CdsTree/composable/tree.d.ts +6 -0
  192. package/dist/components/CdsTree/interface.d.ts +60 -0
  193. package/dist/components/CdsTree/utils/conduct.d.ts +11 -0
  194. package/dist/components/CdsTree/utils/data.d.ts +36 -0
  195. package/dist/components/CdsTree/utils/index.d.ts +2 -0
  196. package/dist/components/CdsUploader/CdsUploader.vue.d.ts +548 -0
  197. package/dist/components/CdsUploader/components/AjaxUploader.d.ts +342 -0
  198. package/dist/components/CdsUploader/components/UploadList/ListItem.d.ts +418 -0
  199. package/dist/components/CdsUploader/components/UploadList/UploadList.d.ts +421 -0
  200. package/dist/components/CdsUploader/components/index.d.ts +2 -0
  201. package/dist/components/CdsUploader/composable/index.d.ts +2 -0
  202. package/dist/components/CdsUploader/composable/request.d.ts +4 -0
  203. package/dist/components/CdsUploader/composable/upload.d.ts +370 -0
  204. package/dist/components/CdsUploader/index.d.ts +1 -0
  205. package/dist/components/CdsUploader/interface.d.ts +98 -0
  206. package/dist/components/CdsUploader/utils/accept.d.ts +2 -0
  207. package/dist/components/CdsUploader/utils/helpers.d.ts +5 -0
  208. package/dist/components/CdsUploader/utils/index.d.ts +4 -0
  209. package/dist/components/CdsUploader/utils/traverseFileTree.d.ts +14 -0
  210. package/dist/components/CdsUploader/utils/uid.d.ts +1 -0
  211. package/dist/components/index.d.ts +82 -1
  212. package/dist/composable/align.d.ts +17 -0
  213. package/dist/composable/datetime.d.ts +4 -20
  214. package/dist/composable/delay.d.ts +2 -2
  215. package/dist/composable/display.d.ts +3 -0
  216. package/dist/composable/field.d.ts +22 -4
  217. package/dist/composable/filter.d.ts +10 -2
  218. package/dist/composable/form.d.ts +1 -1
  219. package/dist/composable/group.d.ts +139 -0
  220. package/dist/composable/icon.d.ts +2 -2
  221. package/dist/composable/index.d.ts +9 -0
  222. package/dist/composable/input.d.ts +1 -1
  223. package/dist/composable/intersectionObserver.d.ts +4 -0
  224. package/dist/composable/items.d.ts +6 -0
  225. package/dist/composable/layout.d.ts +79 -0
  226. package/dist/composable/loading.d.ts +2 -2
  227. package/dist/composable/locale.d.ts +18 -0
  228. package/dist/composable/nested/nested.d.ts +1 -2
  229. package/dist/composable/overlay.d.ts +8 -0
  230. package/dist/composable/resizeObserver.d.ts +1 -1
  231. package/dist/composable/select.d.ts +124 -14
  232. package/dist/composable/ssrBoot.d.ts +6 -0
  233. package/dist/composable/state.d.ts +13 -0
  234. package/dist/composable/status.d.ts +5 -1
  235. package/dist/composable/tag.d.ts +0 -3
  236. package/dist/composable/text.d.ts +3 -1
  237. package/dist/composable/theme.d.ts +82 -0
  238. package/dist/composable/variant.d.ts +26 -0
  239. package/dist/create.d.ts +4 -1
  240. package/dist/directives/index.d.ts +2 -0
  241. package/dist/directives/intersect/index.d.ts +19 -0
  242. package/dist/directives/touch/index.d.ts +46 -0
  243. package/dist/globals.d.ts +13 -0
  244. package/dist/locale/en.d.ts +3 -0
  245. package/dist/locale/index.d.ts +23 -10
  246. package/dist/themes/b2b.d.ts +26 -0
  247. package/dist/themes/cds.d.ts +26 -0
  248. package/dist/themes/dark.d.ts +26 -0
  249. package/dist/themes/index.d.ts +5 -0
  250. package/dist/themes/promo.d.ts +26 -0
  251. package/dist/themes/themes.d.ts +10 -0
  252. package/dist/transitions/index.d.ts +61 -0
  253. package/dist/transitions/modalTransition.d.ts +8 -0
  254. package/dist/utils/colors.d.ts +368 -0
  255. package/dist/utils/colorsUtils/APCA.d.ts +7 -0
  256. package/dist/utils/colorsUtils/index.d.ts +1 -0
  257. package/dist/utils/colorsUtils/transformCIELAB.d.ts +3 -0
  258. package/dist/utils/colorsUtils/transformSRGB.d.ts +3 -0
  259. package/dist/utils/colorsUtils/utils.d.ts +41 -0
  260. package/dist/utils/{date.d.ts → date/date.d.ts} +22 -14
  261. package/dist/utils/dom/classNames.d.ts +4 -0
  262. package/dist/utils/dom/dom.d.ts +11 -0
  263. package/dist/utils/dom/getScrollParent.d.ts +16 -0
  264. package/dist/utils/dom/hRender.d.ts +9 -0
  265. package/dist/utils/dom/scrollTo.d.ts +10 -0
  266. package/dist/utils/dom/warn.d.ts +1 -0
  267. package/dist/utils/dom/wrapperRaf.d.ts +4 -0
  268. package/dist/utils/helpers.d.ts +92 -2
  269. package/dist/utils/index.d.ts +20 -9
  270. package/dist/utils/use/copyToClipboard.d.ts +1 -0
  271. package/dist/utils/use/eagerComputed.d.ts +3 -0
  272. package/dist/utils/use/pickAttrs.d.ts +11 -0
  273. package/dist/utils/use/reactiveComputed.d.ts +4 -0
  274. package/dist/utils/use/reactivePick.d.ts +8 -0
  275. package/dist/utils/use/toReactive.d.ts +8 -0
  276. package/dist/utils/use/toValue.d.ts +5 -0
  277. package/package.json +8 -4
  278. package/src/scss/modules/_reset.scss +5 -0
  279. package/src/scss/modules/_transition.scss +72 -1
  280. package/src/scss/modules/grid/_mixins.scss +4 -2
  281. package/src/scss/themes/index.ts +1 -1
  282. package/src/scss/utility/display.scss +56 -5
  283. package/src/scss/utility/flexbox.scss +26 -28
  284. package/src/scss/utility/index.scss +0 -2
  285. package/src/scss/utility/layout.scss +65 -3
  286. package/src/scss/utility/spacing.scss +46 -86
  287. package/src/scss/utility/variables/display.scss +10 -0
  288. package/src/scss/utility/variables/exports/_display.scss +7 -0
  289. package/src/scss/utility/variables/exports/_flex.scss +13 -0
  290. package/src/scss/utility/variables/exports/_overflow.scss +7 -0
  291. package/src/scss/utility/variables/exports/_position.scss +7 -0
  292. package/src/scss/utility/variables/exports/_spacing.scss +14 -0
  293. package/src/scss/utility/variables/exports/_visibility.scss +7 -0
  294. package/src/scss/utility/variables/exports/_widthHeight.scss +7 -0
  295. package/src/scss/utility/variables/flex.scss +140 -0
  296. package/src/scss/utility/variables/index.scss +11 -0
  297. package/src/scss/utility/variables/overflow.scss +6 -0
  298. package/src/scss/utility/variables/position.scss +7 -0
  299. package/src/scss/utility/variables/spacing.scss +37 -0
  300. package/src/scss/utility/variables/visibility.scss +5 -0
  301. package/src/scss/utility/variables/widthHeight.scss +69 -0
  302. package/dist/utils/dom.d.ts +0 -6
  303. package/dist/utils/getScrollParent.d.ts +0 -3
  304. package/src/scss/utility/generatedFiles/generatedStyles.json +0 -1
  305. package/src/scss/utility/generatedFiles/generatedStyles.scss +0 -300
  306. package/src/scss/utility/typography.scss +0 -16
  307. package/src/scss/utility/variables.scss +0 -116
  308. /package/dist/utils/{anchor.d.ts → dom/anchor.d.ts} +0 -0
  309. /package/dist/utils/{animation.d.ts → dom/animation.d.ts} +0 -0
  310. /package/dist/utils/{box.d.ts → dom/box.d.ts} +0 -0
  311. /package/dist/utils/{globals.d.ts → dom/globals.d.ts} +0 -0
  312. /package/dist/utils/{cache.d.ts → use/cache.d.ts} +0 -0
@@ -1,5 +1,6 @@
1
- import type { ComponentPublicInstance, ComputedGetter, PropType, Ref, ToRefs } from 'vue';
1
+ import type { ComponentPublicInstance, ComponentInternalInstance, ComputedGetter, InjectionKey, PropType, Ref, ToRefs, VNodeProps, VNodeChild, AllowedComponentProps, Component } from 'vue';
2
2
  import type { TItemKey } from '../composable';
3
+ export declare const preventedScrollClass = "cds-scroll-blocked";
3
4
  export declare const keyNames: Readonly<{
4
5
  enter: "Enter";
5
6
  tab: "Tab";
@@ -31,7 +32,13 @@ export declare const classesStates: Readonly<{
31
32
  empty: "cds-state-empty";
32
33
  loading: "cds-state-loading";
33
34
  readonly: "cds-state-readonly";
35
+ dragging: "cds-state-dragging";
34
36
  }>;
37
+ export declare function keys<O extends {}>(o: O): (keyof O)[];
38
+ export declare function has<T extends string>(obj: object, key: T[]): obj is Record<T, unknown>;
39
+ export declare function isString(value: any): boolean;
40
+ export declare function isArray(value: any): boolean;
41
+ export declare function isSymbol(value: any): boolean;
35
42
  /**
36
43
  * Check if value is a object.
37
44
  * @param obj
@@ -42,6 +49,23 @@ export declare function isObject(obj: any): obj is object;
42
49
  * @param value
43
50
  */
44
51
  export declare function isDate(value: any): boolean;
52
+ /**
53
+ * Check if value is a Window object.
54
+ * @param obj
55
+ */
56
+ export declare function isWindow(obj: any): boolean;
57
+ /**
58
+ * Add item from array if not exists.
59
+ * @param array
60
+ * @param value
61
+ */
62
+ export declare function addItemToArray<T>(array: T[], value: T): T[];
63
+ /**
64
+ * Remove item from array if exists.
65
+ * @param array
66
+ * @param value
67
+ */
68
+ export declare function removeItemFromArray<T>(array: T[], value: T): T[];
45
69
  /**
46
70
  * Deep merge two objects.
47
71
  * @param source
@@ -59,7 +83,8 @@ export declare function deepEqual(a: any, b: any): boolean;
59
83
  * Wrap value in array if it's not already an array
60
84
  * @param value
61
85
  */
62
- export declare function wrapInArray<T>(value: T | T[] | null | undefined): T[];
86
+ declare type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
87
+ export declare function wrapInArray<T>(value: T | T[] | null | undefined): T extends readonly any[] ? IfAny<T, T[], T> : NonNullable<T>[];
63
88
  /**
64
89
  * Get the nested value of an object at a given path.
65
90
  * @param obj
@@ -74,7 +99,29 @@ export declare function getNestedValue(obj: any, path: (string | number)[], fall
74
99
  * @param fallback
75
100
  */
76
101
  export declare function getObjectValueByPath(obj: any, path: string, fallback?: any): any;
102
+ /**
103
+ * This function is used to get the value of a property from an item. The property can be a string, an array, a function, or a boolean.
104
+ * If the property is a string, it will be used as a path to retrieve the value from the item.
105
+ * If the property is an array, it will be used as a nested path to retrieve the value from the item.
106
+ * If the property is a function, it will be called with the item and the fallback value as arguments, and its return value will be used.
107
+ * If the property is a boolean, and it's true, the item itself will be returned.
108
+ * If the property is null, undefined, or a boolean that's not true, the fallback value will be returned.
109
+ * If the item is not an object, and the property is not a function, the fallback value will be returned.
110
+ * If the property is not a string, an array, or a function, the fallback value will be returned.
111
+ * If the value retrieved from the item is undefined, the fallback value will be returned.
112
+ *
113
+ * @param item - The item from which to get the property value.
114
+ * @param property - The property to get from the item. Can be a string, an array, a function, or a boolean.
115
+ * @param fallback - The value to return if the property is not found or its value is undefined.
116
+ * @returns The value of the property from the item, or the fallback value.
117
+ */
77
118
  export declare function getPropertyFromItem(item: any, property: SelectItemKey, fallback?: any): any;
119
+ /**
120
+ * This function is used to return the scroll position of the given element.
121
+ * @param target
122
+ * @param top
123
+ */
124
+ export declare function getScroll(target: HTMLElement | Window | Document | null, top: boolean): number;
78
125
  /**
79
126
  * @description This function is used to return a copy of the object that is composed of the picked object properties.
80
127
  * @param obj
@@ -94,6 +141,7 @@ export declare function destructComputed<T extends object>(getter: ComputedGette
94
141
  export declare function includes(arr: readonly any[], val: any): boolean;
95
142
  export declare function convertToUnit(str: number, unit?: string): string;
96
143
  export declare function convertToUnit(str: string | number | null | undefined, unit?: string): string | undefined;
144
+ export declare function convertRemToPx(value: string): number;
97
145
  /**
98
146
  * Clamp a value between a min and max
99
147
  * @param value
@@ -110,9 +158,41 @@ export declare const isOn: (key: string) => boolean;
110
158
  export declare const EventProp: PropType<(...args: any[]) => any>;
111
159
  export declare function isComponentInstance(obj: any): obj is ComponentPublicInstance;
112
160
  export declare function isFixedPosition(el?: HTMLElement): boolean;
161
+ export declare function padEnd(str: string, length: number, char?: string): string;
113
162
  export declare function padStart(string: number | string, targetLength: number, padString: string): string;
114
163
  export declare function pad(n: string | number, length?: number): string;
115
164
  export declare function refElement<T extends Record<string, any> | undefined>(obj: T): Exclude<T, ComponentPublicInstance> | HTMLElement;
165
+ export declare function omit<T extends object, K extends keyof T>(obj: T, fields: K[]): Omit<T, K>;
166
+ export declare function findChildrenWithProvide(key: InjectionKey<any> | symbol, vnode?: VNodeChild | {
167
+ [key: string]: any;
168
+ }): ComponentInternalInstance[];
169
+ export declare function focusableChildren(el: Element): HTMLElement[];
170
+ /**
171
+ * https://github.com/lodash/lodash/blob/master/partition.js
172
+ * @param items
173
+ * @param predicates
174
+ */
175
+ export declare function partition<T>(items: T[], predicates: (item: T) => boolean): [T[], T[]];
176
+ export declare function matchesSelector<T>(el: T | Element | undefined, selector: string): boolean | null;
177
+ /**
178
+ * Debounce function
179
+ * @param fn
180
+ * @param delay
181
+ */
182
+ export declare function debounce(fn: Function, delay: number): (...args: any[]) => void;
183
+ /**
184
+ * Pluralize a word based on a number.
185
+ * @param n
186
+ * @param opts
187
+ */
188
+ export declare function plurals(n: number, opts: string[]): string;
189
+ /**
190
+ * Chunk a string into an array of strings.
191
+ * @param str
192
+ * @param size
193
+ */
194
+ export declare function chunk(str: string, size?: number): string[];
195
+ export declare function noop(): void;
116
196
  /**
117
197
  * Types
118
198
  */
@@ -122,4 +202,14 @@ export declare type MaybePick<T extends object, U extends Extract<keyof T, strin
122
202
  export declare type EventProp<T = (...args: any[]) => any> = T;
123
203
  declare type NotAUnion<T> = [T] extends [infer U] ? _NotAUnion<U, U> : never;
124
204
  declare type _NotAUnion<T, U> = U extends any ? ([T] extends [U] ? unknown : never) : never;
205
+ export declare type ComponentProps<C extends Component> = C extends new (...args: any) => any ? Omit<InstanceType<C>['$props'], keyof VNodeProps | keyof AllowedComponentProps> : never;
206
+ /**
207
+ * Maybe it's a ref, or a plain value, or a getter function
208
+ *
209
+ * ```ts
210
+ * type MaybeRefOrGetter<T> = (() => T) | T | Ref<T> | ComputedRef<T>
211
+ * ```
212
+ */
213
+ export declare type MaybeRefOrGetter<T> = MaybeRef<T> | (() => T);
214
+ export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
125
215
  export {};
@@ -1,15 +1,26 @@
1
- export * from './propsFactory';
2
1
  export * from './helpers';
2
+ export * from './propsFactory';
3
3
  export * from './getCurrentInstance';
4
- export * from './getScrollParent';
5
- export * from './globals';
6
- export * from './dom';
7
- export * from './anchor';
8
- export * from './box';
9
- export * from './animation';
10
- export * from './cache';
4
+ export * from './use/reactivePick';
5
+ export * from './use/eagerComputed';
6
+ export * from './use/pickAttrs';
7
+ export * from './use/cache';
8
+ export * from './use/copyToClipboard';
11
9
  export * from './changeCase/noCase';
12
10
  export * from './changeCase/lowerCase';
13
11
  export * from './changeCase/pascalCase';
14
12
  export * from './changeCase/paramCase';
15
- export * from './date';
13
+ export * from './date/date';
14
+ export * from './dom/globals';
15
+ export * from './dom/getScrollParent';
16
+ export * from './dom/dom';
17
+ export * from './dom/anchor';
18
+ export * from './dom/box';
19
+ export * from './dom/animation';
20
+ export * from './dom/scrollTo';
21
+ export * from './dom/wrapperRaf';
22
+ export * from './dom/warn';
23
+ export * from './dom/classNames';
24
+ export * from './dom/hRender';
25
+ export * from './colorsUtils';
26
+ export { default as colors } from './colors';
@@ -0,0 +1 @@
1
+ export declare function copyToClipboard(text: string): Promise<unknown>;
@@ -0,0 +1,3 @@
1
+ import type { ComputedRef } from 'vue';
2
+ export declare type ComputedGetter<T> = (...args: any[]) => T;
3
+ export declare function eagerComputed<T>(fn: ComputedGetter<T>): ComputedRef<T>;
@@ -0,0 +1,11 @@
1
+ export interface IAttrsPickConfig {
2
+ aria?: boolean;
3
+ data?: boolean;
4
+ attr?: boolean;
5
+ }
6
+ /**
7
+ * Picker props from exist props with filter
8
+ * @param props Passed props
9
+ * @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config
10
+ */
11
+ export declare function pickAttrs(props: Record<string, any>, ariaOnly?: boolean | IAttrsPickConfig): Record<string, any>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Computed reactive object.
3
+ */
4
+ export declare function reactiveComputed<T extends {}>(fn: () => T): T;
@@ -0,0 +1,8 @@
1
+ import type { UnwrapRef } from 'vue';
2
+ export declare type ReactivePickPredicate<T> = (value: T[keyof T], key: keyof T) => boolean;
3
+ export declare function reactivePick<T extends object, K extends keyof T>(obj: T, ...keys: (K | K[])[]): {
4
+ [S in K]: UnwrapRef<T[S]>;
5
+ };
6
+ export declare function reactivePick<T extends object>(obj: T, predicate: ReactivePickPredicate<T>): {
7
+ [S in keyof T]?: UnwrapRef<T[S]>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import type { MaybeRef } from '../';
2
+ /**
3
+ * Converts ref to reactive.
4
+ *
5
+ * @see https://vueuse.org/toReactive
6
+ * @param objectRef A ref of object
7
+ */
8
+ export declare function toReactive<T extends object>(objectRef: MaybeRef<T>): T;
@@ -0,0 +1,5 @@
1
+ import type { MaybeRefOrGetter } from '../';
2
+ /**
3
+ * Get the value of value/ref/getter.
4
+ */
5
+ export declare function toValue<T>(r: MaybeRefOrGetter<T>): T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@central-design-system/components",
3
- "version": "3.0.0-alpha.9",
3
+ "version": "3.0.0-beta.10",
4
4
  "description": "Central Design System on the Vue 3.0 and TypeScript",
5
5
  "author": "magersoft",
6
6
  "license": "ISC",
@@ -17,7 +17,11 @@
17
17
  "types": "./dist/cds.d.ts"
18
18
  },
19
19
  "./nuxt": "./nuxt.js",
20
- "./dist/cds.css": "./dist/cds.css"
20
+ "./dist/cds.css": "./dist/cds.css",
21
+ "./src/": {
22
+ "import": "./src/",
23
+ "require": "./src/"
24
+ }
21
25
  },
22
26
  "files": [
23
27
  "dist",
@@ -26,8 +30,8 @@
26
30
  ],
27
31
  "types": "./dist/cds.d.ts",
28
32
  "scripts": {
29
- "build": "rimraf dist && vue-tsc --noEmit && vite build",
30
- "type-check": "npx vue-tsc --noEmit -p tsconfig.json --composite false",
33
+ "build": "rimraf dist && npm run type-check && vite build",
34
+ "type-check": "npx vue-tsc --noEmit -p tsconfig.build.json --composite false",
31
35
  "bump": "npx bumpp",
32
36
  "publish:alpha": "npm publish --tag next"
33
37
  },
@@ -7,6 +7,11 @@
7
7
 
8
8
  html {
9
9
  font-size: var(--cds-font-base);
10
+ box-sizing: border-box;
11
+ overflow-y: scroll;
12
+ -webkit-text-size-adjust: 100%;
13
+ word-break: normal;
14
+ tab-size: 4;
10
15
  }
11
16
 
12
17
  body {
@@ -1,8 +1,12 @@
1
1
  @import '../mixins/motion';
2
2
 
3
3
  $standard-easing: map-get(map-get($easing, 'ease-in-out'), 'basic');
4
- $standard-duration: $cds-duration-fast + ms;
4
+ $decelerated-easing: map-get(map-get($easing, 'ease-out'), 'basic');
5
+ $accelerated-easing: map-get(map-get($easing, 'ease-in'), 'basic');
6
+
5
7
  $accent-easting: map-get(map-get($easing, 'ease-in-out'), 'accent');
8
+
9
+ $standard-duration: $cds-duration-fast + ms;
6
10
  $accent-duration: $cds-duration-normal + ms;
7
11
 
8
12
  @mixin transition-default() {
@@ -154,3 +158,70 @@ $accent-duration: $cds-duration-normal + ms;
154
158
  }
155
159
  }
156
160
 
161
+ .modal-transition,
162
+ .modal-transition-bottom,
163
+ .modal-transition-top {
164
+ &-enter-active {
165
+ transition-duration: 225ms !important;
166
+ transition-timing-function: $decelerated-easing !important;
167
+ }
168
+
169
+ &-leave-active {
170
+ transition-duration: 125ms !important;
171
+ transition-timing-function: $accelerated-easing !important;
172
+ }
173
+
174
+ &-enter-active,
175
+ &-leave-active {
176
+ transition-property: transform, opacity !important;
177
+ pointer-events: none;
178
+ }
179
+ }
180
+
181
+ .modal-transition {
182
+ &-enter-from, &-leave-to {
183
+ transform: scale(0.9);
184
+ opacity: 0;
185
+ }
186
+
187
+ &-enter-to, &-leave-from {
188
+ opacity: 1;
189
+ }
190
+ }
191
+
192
+ .modal-transition-bottom {
193
+ &-enter-from, &-leave-to {
194
+ transform: translateY(calc(50vh + 50%));
195
+ }
196
+ }
197
+
198
+ .modal-transition-top {
199
+ &-enter-from, &-leave-to {
200
+ transform: translateY(calc(-50vh - 50%));
201
+ }
202
+ }
203
+
204
+ .notification-transition {
205
+ &-enter-active,
206
+ &-leave-active {
207
+ transition-duration: $standard-duration;
208
+ transition-timing-function: $decelerated-easing;
209
+ }
210
+
211
+ &-enter-active {
212
+ transition-property: transform, opacity;
213
+ }
214
+
215
+ &-enter-from {
216
+ opacity: 0;
217
+ transform: scale(.8);
218
+ }
219
+
220
+ &-leave-action {
221
+ transition-property: opacity;
222
+ }
223
+
224
+ &-leave-to {
225
+ opacity: 0;
226
+ }
227
+ }
@@ -188,10 +188,12 @@
188
188
 
189
189
  .#{$prefix}-col-auto,
190
190
  .#{$prefix}-col#{$infix}-auto {
191
- width: auto;
191
+ @include -make-col-ready($gutter);
192
+
192
193
  // Reset earlier grid tiers
194
+ width: auto;
193
195
  max-width: 100%;
194
- flex: 1 0 0;
196
+ flex: 0 0 auto;
195
197
  }
196
198
 
197
199
  @for $i from 0 through $columns {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Automatically generated by CDS CLI
3
- * Generated on 6/14/2023, 4:10:00 PM
3
+ * Generated on 1/18/2024, 2:08:21 PM
4
4
  **/
5
5
 
6
6
  /**
@@ -1,13 +1,64 @@
1
- @import "variables";
1
+ @import "./variables";
2
2
 
3
- @each $name, $display in $displays {
3
+ /*
4
+ * При добавлении утилитарных классов необходимо разделять переменные/формирование. Переменные хранятся в папке ./variables и также используются для формирования документации.
5
+ * Для всех утилитарных классов необходимо указывать !important
6
+ * Также, в данном файле необходимо указывать классы как без брейкпоинтов, так и с ними. Пример ниже.
7
+ * Чтобы утилитарные стили начали работать, необходимо экспортировать этот файл в index.scss, который в дальнейшем окажется в основном бандле.
8
+ */
9
+
10
+ // Без брейкпоинтов
11
+ @each $name, $value in $displays {
12
+ .cds-#{$name} {
13
+ display: $value !important;
14
+ }
15
+ }
16
+
17
+ @each $name, $value in $overflow {
18
+ .cds-overflow-#{$name} {
19
+ overflow: $value !important;
20
+ }
21
+ }
22
+
23
+ @each $name, $value in $positions {
4
24
  .cds-#{$name} {
5
- display: $display !important;
25
+ position: $value !important;
6
26
  }
7
27
  }
8
28
 
9
- @each $name, $visibility in $visibility {
29
+ @each $name, $value in $visibility {
10
30
  .cds-#{$name} {
11
- visibility: $visibility !important;
31
+ visibility: $value !important;
32
+ }
33
+ }
34
+
35
+ // С брейкпоинтами
36
+ @each $breakpoint, $map in $grid-breakpoints {
37
+ $width: map-get($map, 'width');
38
+
39
+ @media (min-width: $width) {
40
+ @each $name, $value in $displays {
41
+ .#{$breakpoint}\:cds-#{$name} {
42
+ display: $value !important;
43
+ }
44
+ }
45
+
46
+ @each $name, $value in $overflow {
47
+ .#{$breakpoint}\:cds-overflow-#{$name} {
48
+ overflow: $value !important;
49
+ }
50
+ }
51
+
52
+ @each $name, $value in $visibility {
53
+ .#{$breakpoint}\cds-#{$name} {
54
+ visibility: $value !important;
55
+ }
56
+ }
57
+
58
+ @each $name, $value in $positions {
59
+ .#{$breakpoint}\:cds-#{$name} {
60
+ position: $value !important;
61
+ }
62
+ }
12
63
  }
13
64
  }
@@ -1,37 +1,35 @@
1
- @import "variables";
1
+ @import "./variables";
2
2
 
3
- @each $name, $direction in $flex-direction {
4
- .cds-#{$name} {
5
- flex-direction: $direction !important;
6
- }
7
- }
3
+ /*
4
+ * При добавлении утилитарных классов необходимо разделять переменные/формирование. Переменные хранятся в папке ./variables и также используются для формирования документации.
5
+ * Для всех утилитарных классов необходимо указывать !important
6
+ * Также, в данном файле необходимо указывать классы как без брейкпоинтов, так и с ними. Пример ниже.
7
+ * Чтобы утилитарные стили начали работать, необходимо экспортировать этот файл в index.scss, который в дальнейшем окажется в основном бандле.
8
+ */
8
9
 
9
- @each $name, $value in $justify-content {
10
- .cds-justify-#{$name} {
11
- justify-content: $value !important;
12
- }
13
- }
10
+ @each $key, $value in $flex-properties {
11
+ $prefix: map-get($value, 'name');
12
+ $propertyMap: map-get($value, 'map');
13
+ $cssProperty: map-get($value, 'property');
14
14
 
15
- @each $name, $value in $align-items {
16
- .cds-items-#{$name} {
17
- align-items: $value !important;
15
+ // без брейкпоинтов
16
+ @each $name, $propValue in $propertyMap {
17
+ .cds-#{$prefix}#{$name} {
18
+ #{$cssProperty}: $propValue !important;
19
+ }
18
20
  }
19
- }
20
21
 
21
- @each $name, $value in $align-content {
22
- .cds-content-#{$name} {
23
- align-content: $value !important;
24
- }
25
- }
22
+ // брейкпоинты
23
+ @each $breakpoint, $map in $grid-breakpoints {
24
+ $width: map-get($map, 'width');
26
25
 
27
- @each $name, $value in $flex-wrap {
28
- .cds-flex-#{$name} {
29
- flex-wrap: $value !important;
26
+ @media (min-width: $width) {
27
+ @each $name, $propValue in $propertyMap {
28
+ .#{$breakpoint}\:cds-#{$prefix}#{$name} {
29
+ #{$cssProperty}: $propValue !important;
30
+ }
31
+ }
32
+ }
30
33
  }
31
34
  }
32
35
 
33
- @each $name, $value in $align-self {
34
- .cds-self-#{$name} {
35
- align-self: $value !important;
36
- }
37
- }
@@ -1,7 +1,5 @@
1
- @import 'generatedFiles/generatedStyles';
2
1
  @import 'display';
3
2
  @import 'layout';
4
3
  @import 'spacing';
5
- @import 'typography';
6
4
  @import 'flexbox';
7
5
  @import 'lists';
@@ -1,4 +1,11 @@
1
- @import "variables";
1
+ @import "./variables";
2
+
3
+ /*
4
+ * При добавлении утилитарных классов необходимо разделять переменные/формирование. Переменные хранятся в папке ./variables и также используются для формирования документации.
5
+ * Для всех утилитарных классов необходимо указывать !important
6
+ * Также, в данном файле необходимо указывать классы как без брейкпоинтов, так и с ними. Пример ниже.
7
+ * Чтобы утилитарные стили начали работать, необходимо экспортировать этот файл в index.scss, который в дальнейшем окажется в основном бандле.
8
+ */
2
9
 
3
10
  @each $name, $index in $z-indexes {
4
11
  .#{$name} {
@@ -6,6 +13,61 @@
6
13
  }
7
14
  }
8
15
 
9
- .cds-fullwidth {
10
- width: 100%;
16
+ @each $name, $value in $widthHeight {
17
+ .cds-h-#{$name} {
18
+ height: $value !important;
19
+ }
20
+
21
+ .cds-w-#{$name} {
22
+ width: $value !important;
23
+ }
24
+
25
+ .cds-max-h-#{$name} {
26
+ max-height: $value !important;
27
+ }
28
+
29
+ .cds-max-w-#{$name} {
30
+ max-width: $value !important;
31
+ }
32
+
33
+ .cds-min-h-#{$name} {
34
+ min-height: $value !important;
35
+ }
36
+
37
+ .cds-min-w-#{$name} {
38
+ min-width: $value !important;
39
+ }
40
+ }
41
+
42
+
43
+ @each $breakpoint, $map in $grid-breakpoints {
44
+ $width: map-get($map, 'width');
45
+
46
+ @media (min-width: $width) {
47
+ @each $name, $value in $widthHeight {
48
+ .#{$breakpoint}\:cds-w-#{$name} {
49
+ width: $value !important;
50
+ }
51
+
52
+ .#{$breakpoint}\:cds-min-w-#{$name} {
53
+ min-width: $value !important;
54
+ }
55
+
56
+ .#{$breakpoint}\:cds-max-w-#{$name} {
57
+ max-width: $value !important;
58
+ }
59
+
60
+ .#{$breakpoint}\:cds-h-#{$name} {
61
+ height: $value !important;
62
+ }
63
+
64
+ .#{$breakpoint}\:cds-min-h-#{$name} {
65
+ min-height: $value !important;
66
+ }
67
+
68
+ .#{$breakpoint}\:cds-max-h-#{$name} {
69
+ max-height: $value !important;
70
+ }
71
+ }
72
+ }
11
73
  }