@central-design-system/components 3.0.0-beta.0 → 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 (140) hide show
  1. package/dist/cds.css +1 -1
  2. package/dist/cds.d.ts +3 -0
  3. package/dist/cds.es.js +9684 -8449
  4. package/dist/cds.umd.js +7 -3
  5. package/dist/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +114 -62
  6. package/dist/components/CdsBadge/CdsBadge.vue.d.ts +35 -14
  7. package/dist/components/CdsBreadcrumbs/CdsBreadcrumbs.vue.d.ts +12 -5
  8. package/dist/components/CdsBreadcrumbs/CdsBreadcrumbsItem.vue.d.ts +12 -6
  9. package/dist/components/CdsButton/CdsButton.vue.d.ts +25 -14
  10. package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +11 -0
  11. package/dist/components/CdsCheckbox/CdsCheckboxGroup.vue.d.ts +13 -0
  12. package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +184 -470
  13. package/dist/components/CdsContainer/CdsContainer.vue.d.ts +37 -24
  14. package/dist/components/CdsContainer/CdsContainerItem.vue.d.ts +1 -1
  15. package/dist/components/CdsContentSwitcher/CdsContentSwitcher.vue.d.ts +66 -0
  16. package/dist/components/CdsContentSwitcher/CdsContentSwitcherItem.vue.d.ts +212 -0
  17. package/dist/components/CdsContentSwitcher/index.d.ts +2 -0
  18. package/dist/components/CdsDatePicker/CdsDatePicker.vue.d.ts +12 -7
  19. package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +12 -0
  20. package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +236 -485
  21. package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +3 -3
  22. package/dist/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +11 -11
  23. package/dist/components/CdsExpandablePanel/CdsExpandablePanelContent.vue.d.ts +1 -1
  24. package/dist/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +11 -11
  25. package/dist/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +14 -3
  26. package/dist/components/CdsExpandablePanel/composable/expandablePanelTitleProps.d.ts +2 -2
  27. package/dist/components/CdsFooter/CdsFooter.vue.d.ts +12 -1
  28. package/dist/components/CdsForm/CdsForm.vue.d.ts +12 -28
  29. package/dist/components/CdsHeader/CdsHeader.vue.d.ts +12 -1
  30. package/dist/components/CdsIcon/CdsIcon.vue.d.ts +16 -3
  31. package/dist/components/CdsInput/CdsInput.vue.d.ts +23 -39
  32. package/dist/components/CdsInput/CdsInputMessages.vue.d.ts +5 -5
  33. package/dist/components/CdsLayout/CdsLayout.vue.d.ts +13 -4
  34. package/dist/components/CdsLink/CdsLink.vue.d.ts +12 -0
  35. package/dist/components/CdsList/CdsList.vue.d.ts +12 -5
  36. package/dist/components/CdsList/CdsListGroup.vue.d.ts +7 -7
  37. package/dist/components/CdsList/CdsListItem.vue.d.ts +14 -26
  38. package/dist/components/CdsLoader/CdsLoader.vue.d.ts +12 -0
  39. package/dist/components/CdsMain/CdsMain.vue.d.ts +1 -1
  40. package/dist/components/CdsMenu/CdsMenu.vue.d.ts +12 -336
  41. package/dist/components/CdsModal/CdsModal.vue.d.ts +12 -341
  42. package/dist/components/CdsNotification/CdsNotification.vue.d.ts +35 -24
  43. package/dist/components/CdsNotification/CdsNotificationAlert.vue.d.ts +28 -351
  44. package/dist/components/CdsNotification/composable/notification.d.ts +3 -3
  45. package/dist/components/CdsOverlay/CdsOverlay.vue.d.ts +2 -8
  46. package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +11 -11
  47. package/dist/components/CdsPage/CdsPage.vue.d.ts +1 -1
  48. package/dist/components/CdsPagination/CdsPagination.vue.d.ts +13 -7
  49. package/dist/components/CdsProgress/CdsProgress.vue.d.ts +13 -2
  50. package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +224 -0
  51. package/dist/components/CdsRadioButton/CdsRadioButton.vue.d.ts +13 -0
  52. package/dist/components/CdsSelect/CdsSelect.vue.d.ts +77 -71
  53. package/dist/components/CdsSidebar/CdsSidebar.vue.d.ts +30 -8
  54. package/dist/components/CdsSkeletonLoader/CdsSkeletonLoader.vue.d.ts +14 -3
  55. package/dist/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +19 -19
  56. package/dist/components/CdsStages/CdsStages.vue.d.ts +12 -0
  57. package/dist/components/CdsStatus/CdsStatus.vue.d.ts +12 -0
  58. package/dist/components/CdsSteps/CdsSteps.vue.d.ts +31 -28
  59. package/dist/components/CdsTable/CdsTable.vue.d.ts +42 -16
  60. package/dist/components/CdsTable/components/Table/InternalTable.d.ts +23 -5
  61. package/dist/components/CdsTable/components/TableProvider.d.ts +33 -4
  62. package/dist/components/CdsTable/composable/table.d.ts +7 -1
  63. package/dist/components/CdsTabs/CdsTab.vue.d.ts +10 -10
  64. package/dist/components/CdsTabs/CdsTabs.vue.d.ts +48 -37
  65. package/dist/components/CdsTag/CdsTag.vue.d.ts +12 -0
  66. package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +81 -67
  67. package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +87 -73
  68. package/dist/components/CdsTimePicker/CdsTimePicker.vue.d.ts +11 -0
  69. package/dist/components/CdsToggle/CdsToggle.vue.d.ts +14 -9
  70. package/dist/components/CdsToolbar/CdsToolbar.vue.d.ts +11 -0
  71. package/dist/components/CdsTooltip/CdsTooltip.vue.d.ts +20 -335
  72. package/dist/components/CdsUploader/CdsUploader.vue.d.ts +61 -389
  73. package/dist/components/CdsUploader/components/AjaxUploader.d.ts +16 -16
  74. package/dist/components/CdsUploader/components/UploadList/ListItem.d.ts +42 -24
  75. package/dist/components/CdsUploader/components/UploadList/UploadList.d.ts +42 -24
  76. package/dist/components/CdsUploader/composable/upload.d.ts +25 -15
  77. package/dist/components/index.d.ts +3 -0
  78. package/dist/composable/datetime.d.ts +2 -2
  79. package/dist/composable/delay.d.ts +2 -2
  80. package/dist/composable/field.d.ts +5 -3
  81. package/dist/composable/filter.d.ts +8 -0
  82. package/dist/composable/form.d.ts +1 -1
  83. package/dist/composable/group.d.ts +2 -2
  84. package/dist/composable/icon.d.ts +2 -2
  85. package/dist/composable/index.d.ts +1 -0
  86. package/dist/composable/items.d.ts +6 -0
  87. package/dist/composable/loading.d.ts +2 -2
  88. package/dist/composable/nested/nested.d.ts +1 -2
  89. package/dist/composable/select.d.ts +31 -3
  90. package/dist/composable/tag.d.ts +0 -3
  91. package/dist/composable/theme.d.ts +82 -0
  92. package/dist/composable/variant.d.ts +1 -1
  93. package/dist/create.d.ts +2 -1
  94. package/dist/directives/index.d.ts +1 -0
  95. package/dist/directives/intersect/index.d.ts +19 -0
  96. package/dist/globals.d.ts +8 -0
  97. package/dist/themes/b2b.d.ts +26 -0
  98. package/dist/themes/cds.d.ts +26 -0
  99. package/dist/themes/dark.d.ts +26 -0
  100. package/dist/themes/index.d.ts +5 -0
  101. package/dist/themes/promo.d.ts +26 -0
  102. package/dist/themes/themes.d.ts +10 -0
  103. package/dist/transitions/createTransition.d.ts +1 -1
  104. package/dist/transitions/index.d.ts +10 -10
  105. package/dist/utils/colors.d.ts +368 -0
  106. package/dist/utils/colorsUtils/APCA.d.ts +7 -0
  107. package/dist/utils/colorsUtils/index.d.ts +1 -0
  108. package/dist/utils/colorsUtils/transformCIELAB.d.ts +3 -0
  109. package/dist/utils/colorsUtils/transformSRGB.d.ts +3 -0
  110. package/dist/utils/colorsUtils/utils.d.ts +41 -0
  111. package/dist/utils/date/date.d.ts +12 -12
  112. package/dist/utils/helpers.d.ts +30 -0
  113. package/dist/utils/index.d.ts +2 -0
  114. package/package.json +1 -1
  115. package/src/scss/modules/grid/_mixins.scss +4 -2
  116. package/src/scss/themes/index.ts +1 -1
  117. package/src/scss/utility/display.scss +56 -5
  118. package/src/scss/utility/flexbox.scss +26 -28
  119. package/src/scss/utility/index.scss +0 -2
  120. package/src/scss/utility/layout.scss +65 -3
  121. package/src/scss/utility/spacing.scss +46 -86
  122. package/src/scss/utility/variables/display.scss +10 -0
  123. package/src/scss/utility/variables/exports/_display.scss +7 -0
  124. package/src/scss/utility/variables/exports/_flex.scss +13 -0
  125. package/src/scss/utility/variables/exports/_overflow.scss +7 -0
  126. package/src/scss/utility/variables/exports/_position.scss +7 -0
  127. package/src/scss/utility/variables/exports/_spacing.scss +14 -0
  128. package/src/scss/utility/variables/exports/_visibility.scss +7 -0
  129. package/src/scss/utility/variables/exports/_widthHeight.scss +7 -0
  130. package/src/scss/utility/variables/flex.scss +140 -0
  131. package/src/scss/utility/variables/index.scss +11 -0
  132. package/src/scss/utility/variables/overflow.scss +6 -0
  133. package/src/scss/utility/variables/position.scss +7 -0
  134. package/src/scss/utility/variables/spacing.scss +37 -0
  135. package/src/scss/utility/variables/visibility.scss +5 -0
  136. package/src/scss/utility/variables/widthHeight.scss +69 -0
  137. package/src/scss/utility/generatedFiles/generatedStyles.json +0 -1
  138. package/src/scss/utility/generatedFiles/generatedStyles.scss +0 -300
  139. package/src/scss/utility/typography.scss +0 -16
  140. package/src/scss/utility/variables.scss +0 -116
@@ -0,0 +1,368 @@
1
+ declare const _default: Readonly<{
2
+ red: Readonly<{
3
+ lighten10: "#faecec";
4
+ lighten50: "#fdcfcf";
5
+ lighten100: "ffb2b2";
6
+ lighten200: "#ff6666";
7
+ lighten300: "#f23838";
8
+ lighten400: "#eb0000";
9
+ lighten500: "#ca0000";
10
+ lighten600: "#aa0000";
11
+ lighten700: "#890000";
12
+ lighten800: "#680000";
13
+ lighten900: "#470000";
14
+ darken10: "#1f0000";
15
+ darken50: "#290000";
16
+ darken100: "#370000";
17
+ darken200: "#4F0000";
18
+ darken300: "#680000";
19
+ darken400: "#800000";
20
+ darken500: "#980C0C";
21
+ darken600: "#b13434";
22
+ darken700: "#c96767";
23
+ darken800: "#e2a4a4";
24
+ darken900: "#f5e7e7";
25
+ }>;
26
+ chocolate: Readonly<{
27
+ lighten10: "#faf0ec";
28
+ lighten50: "#f9ded2";
29
+ lighten100: "#f7cbb8";
30
+ lighten200: "#ec9f7f";
31
+ lighten300: "#e1774a";
32
+ lighten400: "#d6511a";
33
+ lighten500: "#b93b06";
34
+ lighten600: "#9d3104";
35
+ lighten700: "#802802";
36
+ lighten800: "#641e01";
37
+ lighten900: "#471500";
38
+ darken10: "#1f0900";
39
+ darken50: "#290c00";
40
+ darken100: "#371000";
41
+ darken200: "#4F1800";
42
+ darken300: "#681f00";
43
+ darken400: "#802600";
44
+ darken500: "#98360c";
45
+ darken600: "#b15a34";
46
+ darken700: "#c98467";
47
+ darken800: "#e2b7a4";
48
+ darken900: "#f5ebe7";
49
+ }>;
50
+ orange: Readonly<{
51
+ lighten10: "#fff7f1";
52
+ lighten50: "#ffe8d7";
53
+ lighten100: "#ffdec1";
54
+ lighten200: "#ffbc89";
55
+ lighten300: "#ff9b52";
56
+ lighten400: "#f67b1d";
57
+ lighten500: "#d35f06";
58
+ lighten600: "#b04f04";
59
+ lighten700: "#8d3e02";
60
+ lighten800: "#6a2f01";
61
+ lighten900: "#471f00";
62
+ darken10: "#1f0d00";
63
+ darken50: "#291100";
64
+ darken100: "#371800";
65
+ darken200: "#4F2200";
66
+ darken300: "#682d00";
67
+ darken400: "#803700";
68
+ darken500: "#98490c";
69
+ darken600: "#b16a34";
70
+ darken700: "#c99267";
71
+ darken800: "#e2bfa4";
72
+ darken900: "#f5ede7";
73
+ }>;
74
+ yellow: Readonly<{
75
+ lighten10: "#fffbf1";
76
+ lighten50: "#fff1c3";
77
+ lighten100: "#ffeb98";
78
+ lighten200: "#ffd54b";
79
+ lighten300: "#ffc000";
80
+ lighten400: "#e0a900";
81
+ lighten500: "#c29200";
82
+ lighten600: "#a37b00";
83
+ lighten700: "#856400";
84
+ lighten800: "#664d00";
85
+ lighten900: "#473600";
86
+ darken10: "#1f1700";
87
+ darken50: "#291e00";
88
+ darken100: "#372900";
89
+ darken200: "#4f3c00";
90
+ darken300: "#684e00";
91
+ darken400: "#806000";
92
+ darken500: "#98750c";
93
+ darken600: "#b19234";
94
+ darken700: "#c9b167";
95
+ darken800: "#e2d2a4";
96
+ darken900: "#f5f1e7";
97
+ }>;
98
+ lemon: Readonly<{
99
+ lighten10: "#fffef1";
100
+ lighten50: "#fefcc9";
101
+ lighten100: "#ffffa5";
102
+ lighten200: "#fcf75f";
103
+ lighten300: "#f6ef1d";
104
+ lighten400: "#d9d200";
105
+ lighten500: "#bcb600";
106
+ lighten600: "#9f9900";
107
+ lighten700: "#827d00";
108
+ lighten800: "#656100";
109
+ lighten900: "#474500";
110
+ darken10: "#1f1e00";
111
+ darken50: "#292700";
112
+ darken100: "#373500";
113
+ darken200: "#4f4d00";
114
+ darken300: "#686400";
115
+ darken400: "#807c00";
116
+ darken500: "#98940c";
117
+ darken600: "#b1ad34";
118
+ darken700: "#c9c667";
119
+ darken800: "#e2dfa4";
120
+ darken900: "#f5f4e7";
121
+ }>;
122
+ lime: Readonly<{
123
+ lighten10: "#fcfff1";
124
+ lighten50: "#f2fec9";
125
+ lighten100: "#ecffa5";
126
+ lighten200: "#d7fc5f";
127
+ lighten300: "#c3f61d";
128
+ lighten400: "#a6d900";
129
+ lighten500: "#90bc00";
130
+ lighten600: "#7a9f00";
131
+ lighten700: "#638200";
132
+ lighten800: "#4d6500";
133
+ lighten900: "#374700";
134
+ darken10: "#1f1f00";
135
+ darken50: "#1e2900";
136
+ darken100: "#2a3700";
137
+ darken200: "#3d4f00";
138
+ darken300: "#506800";
139
+ darken400: "#628000";
140
+ darken500: "#78980c";
141
+ darken600: "#94b134";
142
+ darken700: "#b2c967";
143
+ darken800: "#d3e2a4";
144
+ darken900: "#f2f5e7";
145
+ }>;
146
+ green: Readonly<{
147
+ lighten10: "#eefaec";
148
+ lighten50: "#cbefc4";
149
+ lighten100: "#aae59f";
150
+ lighten200: "#72d161";
151
+ lighten300: "#42bc2c";
152
+ lighten400: "#1aa800";
153
+ lighten500: "#179500";
154
+ lighten600: "#148100";
155
+ lighten700: "#116e00";
156
+ lighten800: "#0e5b00";
157
+ lighten900: "#0b4700";
158
+ darken10: "#051f00";
159
+ darken50: "#072900";
160
+ darken100: "#083700";
161
+ darken200: "#0c4f00";
162
+ darken300: "#106800";
163
+ darken400: "#138000";
164
+ darken500: "#21980c";
165
+ darken600: "#47b134";
166
+ darken700: "#76c967";
167
+ darken800: "#ade2a4";
168
+ darken900: "#e9f5e7";
169
+ }>;
170
+ cyan: Readonly<{
171
+ lighten10: "#ecfaf8";
172
+ lighten50: "#c9fef5";
173
+ lighten100: "#a5fff2";
174
+ lighten200: "#5ffce2";
175
+ lighten300: "#1df6d2";
176
+ lighten400: "#00d9b5";
177
+ lighten500: "#00bc9d";
178
+ lighten600: "#009f84";
179
+ lighten700: "#00826c";
180
+ lighten800: "#006554";
181
+ lighten900: "#00473c";
182
+ darken10: "#001f1a";
183
+ darken50: "#002922";
184
+ darken100: "#00372c";
185
+ darken200: "#004f42";
186
+ darken300: "#006856";
187
+ darken400: "#00806b";
188
+ darken500: "#0c9881";
189
+ darken600: "#34b19c";
190
+ darken700: "#67c9b9";
191
+ darken800: "#a4e2d7";
192
+ darken900: "#e7f5f3";
193
+ }>;
194
+ lightBlue: Readonly<{
195
+ lighten10: "#ecf4fa";
196
+ lighten50: "#d2edff";
197
+ lighten100: "#b7e5ff";
198
+ lighten200: "#7acaff";
199
+ lighten300: "#3da2e5";
200
+ lighten400: "#0b7ecb";
201
+ lighten500: "#006ab0";
202
+ lighten600: "#005a96";
203
+ lighten700: "#004a7c";
204
+ lighten800: "#003b62";
205
+ lighten900: "#002b47";
206
+ darken10: "#00121f";
207
+ darken50: "#001829";
208
+ darken100: "#002137";
209
+ darken200: "#00304f";
210
+ darken300: "#003e68";
211
+ darken400: "#004d80";
212
+ darken500: "#0c6098";
213
+ darken600: "#347fb1";
214
+ darken700: "#67a2c9";
215
+ darken800: "#a4c9e2";
216
+ darken900: "#e7eff5";
217
+ }>;
218
+ teal: Readonly<{
219
+ lighten10: "#ecf9fa";
220
+ lighten50: "#b1f4fc";
221
+ lighten100: "#76f0fe";
222
+ lighten200: "#1de0f6";
223
+ lighten300: "#00c7dd";
224
+ lighten400: "#00b0c4";
225
+ lighten500: "#009aab";
226
+ lighten600: "#008492";
227
+ lighten700: "#006d79";
228
+ lighten800: "#005760";
229
+ lighten900: "#004047";
230
+ darken10: "#00161f";
231
+ darken50: "#001d29";
232
+ darken100: "#002737";
233
+ darken200: "#00394f";
234
+ darken300: "#004a68";
235
+ darken400: "#005c80";
236
+ darken500: "#0c7198";
237
+ darken600: "#348eb1";
238
+ darken700: "#67adc9";
239
+ darken800: "#a4d0e2";
240
+ darken900: "#e7f0f5";
241
+ }>;
242
+ blue: Readonly<{
243
+ lighten10: "#ecf1fa";
244
+ lighten50: "#d7e6ff";
245
+ lighten100: "#c1daff";
246
+ lighten200: "#89b5ff";
247
+ lighten300: "#5291fb";
248
+ lighten400: "#1d6ef6";
249
+ lighten500: "#0653d3";
250
+ lighten600: "#0444b0";
251
+ lighten700: "#02368d";
252
+ lighten800: "#01286a";
253
+ lighten900: "#001a47";
254
+ darken10: "#000b1f";
255
+ darken50: "#000e29";
256
+ darken100: "#001437";
257
+ darken200: "#001d4f";
258
+ darken300: "#002668";
259
+ darken400: "#002f80";
260
+ darken500: "#0c4098";
261
+ darken600: "#3462b1";
262
+ darken700: "#678bc9";
263
+ darken800: "#a4bbe2";
264
+ darken900: "#e7ecf5";
265
+ }>;
266
+ indigo: Readonly<{
267
+ lighten10: "#eeecfa";
268
+ lighten50: "#ded7ff";
269
+ lighten100: "#cdc1ff";
270
+ lighten200: "#9c89ff";
271
+ lighten300: "#6e52fb";
272
+ lighten400: "#411df6";
273
+ lighten500: "#2806d3";
274
+ lighten600: "#2104b0";
275
+ lighten700: "#19028d";
276
+ lighten800: "#12016a";
277
+ lighten900: "#0c0047";
278
+ darken10: "#05001f";
279
+ darken50: "#070029";
280
+ darken100: "#090037";
281
+ darken200: "#0d004f";
282
+ darken300: "#100068";
283
+ darken400: "#150080";
284
+ darken500: "#240c98";
285
+ darken600: "#4934b1";
286
+ darken700: "#7767c9";
287
+ darken800: "#aea4e2";
288
+ darken900: "#e9e7f5";
289
+ }>;
290
+ purple: Readonly<{
291
+ lighten10: "#f2ecfa";
292
+ lighten50: "#e8d7ff";
293
+ lighten100: "#d3c1ff";
294
+ lighten200: "#bc89ff";
295
+ lighten300: "#9b52fb";
296
+ lighten400: "#7b1df6";
297
+ lighten500: "#5f06d3";
298
+ lighten600: "#4f04b0";
299
+ lighten700: "#3e028d";
300
+ lighten800: "#2f016a";
301
+ lighten900: "#1f0047";
302
+ darken10: "#0d001f";
303
+ darken50: "#110029";
304
+ darken100: "#180037";
305
+ darken200: "#22004f";
306
+ darken300: "#2d0068";
307
+ darken400: "#370080";
308
+ darken500: "#490c98";
309
+ darken600: "#6a34b1";
310
+ darken700: "#9267c9";
311
+ darken800: "#bfa4e2";
312
+ darken900: "#ede7f5";
313
+ }>;
314
+ lightPurple: Readonly<{
315
+ lighten10: "#f6ecfa";
316
+ lighten50: "#f3d7ff";
317
+ lighten100: "#f0c1ff";
318
+ lighten200: "#dc89ff";
319
+ lighten300: "#c852fb";
320
+ lighten400: "#b51df6";
321
+ lighten500: "#9606d3";
322
+ lighten600: "#7d04b0";
323
+ lighten700: "#64028d";
324
+ lighten800: "#4b016a";
325
+ lighten900: "#320047";
326
+ darken10: "#15001f";
327
+ darken50: "#1c0029";
328
+ darken100: "#260037";
329
+ darken200: "#38004f";
330
+ darken300: "#490068";
331
+ darken400: "#5a0080";
332
+ darken500: "#6c0c98";
333
+ darken600: "#8b34b1";
334
+ darken700: "#ac67c9";
335
+ darken800: "#cfa4e2";
336
+ darken900: "#f1e7f5";
337
+ }>;
338
+ gray: Readonly<{
339
+ lighten10: "#f5f5f5";
340
+ lighten50: "#ebebeb";
341
+ lighten100: "#e5e5e5";
342
+ lighten200: "#dadada";
343
+ lighten300: "#bebebe";
344
+ lighten400: "#999999";
345
+ lighten500: "#858585";
346
+ lighten600: "#555555";
347
+ lighten700: "#333333";
348
+ lighten800: "#222222";
349
+ lighten900: "#111111";
350
+ darken10: "#0d0d0d";
351
+ darken50: "#171717";
352
+ darken100: "#1f1f1f";
353
+ darken200: "#2d2d2d";
354
+ darken300: "#3b3b3b";
355
+ darken400: "#494949";
356
+ darken500: "#575757";
357
+ darken600: "#656565";
358
+ darken700: "#737373";
359
+ darken800: "#818181";
360
+ darken900: "#8f8f8f";
361
+ }>;
362
+ shades: Readonly<{
363
+ black: "#000000";
364
+ white: "#ffffff";
365
+ transparent: "#ffffff00";
366
+ }>;
367
+ }>;
368
+ export default _default;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA
3
+ * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
4
+ * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup
5
+ */
6
+ import type { RGB } from './utils';
7
+ export declare function APCAcontrast(text: RGB, background: RGB): number;
@@ -0,0 +1 @@
1
+ export * from './utils';
@@ -0,0 +1,3 @@
1
+ import type { LAB, XYZ } from './utils';
2
+ export declare function fromXYZ(xyz: XYZ): LAB;
3
+ export declare function toXYZ(lab: LAB): XYZ;
@@ -0,0 +1,3 @@
1
+ import type { RGB, XYZ } from './utils';
2
+ export declare function fromXYZ(xyz: XYZ): RGB;
3
+ export declare function toXYZ({ r, g, b }: RGB): XYZ;
@@ -0,0 +1,41 @@
1
+ export declare type XYZ = [number, number, number];
2
+ export declare type LAB = [number, number, number];
3
+ export declare type HSV = {
4
+ h: number;
5
+ s: number;
6
+ v: number;
7
+ a?: number;
8
+ };
9
+ export declare type RGB = {
10
+ r: number;
11
+ g: number;
12
+ b: number;
13
+ a?: number;
14
+ };
15
+ export declare type HSL = {
16
+ h: number;
17
+ s: number;
18
+ l: number;
19
+ a?: number;
20
+ };
21
+ export declare type Hex = string & {
22
+ __hexBrand: never;
23
+ };
24
+ export declare type Color = string | number | HSV | RGB | HSL;
25
+ export declare function isCssColor(color?: string | null | false): boolean;
26
+ export declare function parseColor(color: Color): RGB;
27
+ export declare function lighten(value: RGB, amount: number): RGB;
28
+ export declare function darken(value: RGB, amount: number): RGB;
29
+ export declare function RGBtoHex({ r, g, b, a }: RGB): Hex;
30
+ export declare function HexToRGB(hex: Hex): RGB;
31
+ export declare function parseHex(hex: string): Hex;
32
+ export declare function HSLtoHSV(hsl: HSL): HSV;
33
+ /** Converts HSVA to RGBA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */
34
+ export declare function HSVtoRGB(hsva: HSV): RGB;
35
+ export declare function HSLtoRGB(hsla: HSL): RGB;
36
+ /**
37
+ * Calculate the relative luminance of a given color
38
+ * @see https://www.w3.org/TR/WCAG20/#relativeluminancedef
39
+ */
40
+ export declare function getLuma(color: Color): number;
41
+ export declare function getForeground(color: Color): "#fff" | "#000";
@@ -30,21 +30,21 @@ export declare type TDateLocale = {
30
30
  * @param __forcedYear
31
31
  * @param __forcedTimezoneOffset
32
32
  */
33
- export declare function formatDate(value: any, mask: string, dateLocale: TDateLocale, __forcedYear: number, __forcedTimezoneOffset: number): string | undefined;
33
+ export declare function formatDate(value: any, mask: string, dateLocale?: TDateLocale, __forcedYear?: number, __forcedTimezoneOffset?: number): string | undefined;
34
34
  /**
35
35
  * Set a specific year, month and day to a date.
36
36
  * @param date
37
37
  * @param rawModified
38
38
  * @param utc
39
39
  */
40
- export declare function adjustDate(date: Date, rawModified: IRawDate, utc: boolean): Date;
40
+ export declare function adjustDate(date: Date, rawModified: IRawDate, utc?: boolean): Date;
41
41
  /**
42
42
  * Parse any string into a date object based on the format passed.
43
43
  * @param str
44
44
  * @param mask
45
45
  * @param dateLocale
46
46
  */
47
- export declare function extractDate(str: string, mask: string, dateLocale: TDateLocale): Date;
47
+ export declare function extractDate(str: string, mask: string, dateLocale?: TDateLocale): Date;
48
48
  /**
49
49
  * Split date by mask.
50
50
  * @param str
@@ -57,13 +57,13 @@ export declare function splitDate(str?: string | any, mask?: string, dateLocale?
57
57
  * Check a date string for validity.
58
58
  * @param date
59
59
  */
60
- export declare function isValid(date: any): boolean;
60
+ export declare function isValidDate(date: any): boolean;
61
61
  /**
62
62
  * The following method is just a wrapper to help you in cases where you just need current time but with a different year, or month, or second etc.
63
63
  * @param modified
64
64
  * @param utc
65
65
  */
66
- export declare function buildDate(modified: IRawDate, utc: boolean): Date;
66
+ export declare function buildDate(modified: IRawDate, utc?: boolean): Date;
67
67
  /**
68
68
  * Get the day number in week for a given date.
69
69
  * @param date
@@ -86,10 +86,10 @@ export declare function getDayOfYear(date: Date): number | undefined;
86
86
  * @param to
87
87
  * @param opts
88
88
  */
89
- export declare function isBetweenDates(date: Date, from: Date, to: Date, opts: {
90
- onlyDate: boolean;
91
- inclusiveFrom: boolean;
92
- inclusiveTo: boolean;
89
+ export declare function isBetweenDates(date: Date, from: Date, to: Date, opts?: {
90
+ onlyDate?: boolean;
91
+ inclusiveFrom?: boolean;
92
+ inclusiveTo?: boolean;
93
93
  }): boolean;
94
94
  /**
95
95
  * Add a given date/time unit from a given date.
@@ -164,11 +164,11 @@ export declare function daysInMonth(date: Date): number;
164
164
  * Cloning date object.
165
165
  * @param date
166
166
  */
167
- export declare function clone(date: Date): Date;
167
+ export declare function cloneDate(date: Date): Date;
168
168
  declare const _default: {
169
169
  formatDate: typeof formatDate;
170
- clone: typeof clone;
171
- isValid: typeof isValid;
170
+ cloneDate: typeof cloneDate;
171
+ isValidDate: typeof isValidDate;
172
172
  buildDate: typeof buildDate;
173
173
  getDayOfWeek: typeof getDayOfWeek;
174
174
  getWeekOfYear: typeof getWeekOfYear;
@@ -99,6 +99,22 @@ export declare function getNestedValue(obj: any, path: (string | number)[], fall
99
99
  * @param fallback
100
100
  */
101
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
+ */
102
118
  export declare function getPropertyFromItem(item: any, property: SelectItemKey, fallback?: any): any;
103
119
  /**
104
120
  * This function is used to return the scroll position of the given element.
@@ -142,6 +158,7 @@ export declare const isOn: (key: string) => boolean;
142
158
  export declare const EventProp: PropType<(...args: any[]) => any>;
143
159
  export declare function isComponentInstance(obj: any): obj is ComponentPublicInstance;
144
160
  export declare function isFixedPosition(el?: HTMLElement): boolean;
161
+ export declare function padEnd(str: string, length: number, char?: string): string;
145
162
  export declare function padStart(string: number | string, targetLength: number, padString: string): string;
146
163
  export declare function pad(n: string | number, length?: number): string;
147
164
  export declare function refElement<T extends Record<string, any> | undefined>(obj: T): Exclude<T, ComponentPublicInstance> | HTMLElement;
@@ -163,6 +180,18 @@ export declare function matchesSelector<T>(el: T | Element | undefined, selector
163
180
  * @param delay
164
181
  */
165
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[];
166
195
  export declare function noop(): void;
167
196
  /**
168
197
  * Types
@@ -182,4 +211,5 @@ export declare type ComponentProps<C extends Component> = C extends new (...args
182
211
  * ```
183
212
  */
184
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;
185
215
  export {};
@@ -22,3 +22,5 @@ export * from './dom/wrapperRaf';
22
22
  export * from './dom/warn';
23
23
  export * from './dom/classNames';
24
24
  export * from './dom/hRender';
25
+ export * from './colorsUtils';
26
+ export { default as colors } from './colors';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@central-design-system/components",
3
- "version": "3.0.0-beta.0",
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",
@@ -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 9/27/2023, 11:09:06 AM
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
  }