@central-design-system/components 3.10.7 → 3.11.0

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 (50) hide show
  1. package/UPGRADE.md +146 -0
  2. package/dist/cds.d.ts +4 -0
  3. package/dist/cds.es.js +7838 -7476
  4. package/dist/cds.es.js.map +1 -1
  5. package/dist/cds.umd.js +5 -5
  6. package/dist/cds.umd.js.map +1 -1
  7. package/dist/components/CdsAutocomplete/CdsAutocomplete.d.ts +21 -3
  8. package/dist/components/CdsBadge/CdsBadge.d.ts +1 -1
  9. package/dist/components/CdsBreadcrumbs/CdsBreadcrumbsItem.d.ts +15 -0
  10. package/dist/components/CdsCard/CdsCard.d.ts +20 -1
  11. package/dist/components/CdsCheckbox/CdsCheckbox.d.ts +43 -2
  12. package/dist/components/CdsCheckbox/CdsCheckboxGroup.d.ts +48 -0
  13. package/dist/components/CdsCombobox/CdsCombobox.d.ts +366 -23
  14. package/dist/components/CdsDropdown/CdsDropdown.d.ts +381 -26
  15. package/dist/components/CdsInput/CdsDescription.d.ts +31 -0
  16. package/dist/components/CdsInput/CdsInput.d.ts +18 -0
  17. package/dist/components/CdsInput/CdsLabel.d.ts +48 -0
  18. package/dist/components/CdsInput/index.d.ts +2 -0
  19. package/dist/components/CdsList/CdsListGroup.d.ts +1 -1
  20. package/dist/components/CdsList/CdsListItem.d.ts +19 -0
  21. package/dist/components/CdsNotification/CdsNotification.d.ts +1 -1
  22. package/dist/components/CdsNotification/CdsNotificationAlert.d.ts +1 -1
  23. package/dist/components/CdsNotification/composable/notification.d.ts +4 -2
  24. package/dist/components/CdsProgress/CdsProgressBar.d.ts +158 -0
  25. package/dist/components/CdsProgress/index.d.ts +1 -0
  26. package/dist/components/CdsRadioButton/CdsRadio.d.ts +84 -0
  27. package/dist/components/CdsRadioButton/CdsRadioButton.d.ts +48 -0
  28. package/dist/components/CdsRadioButton/CdsRadioGroup.d.ts +681 -0
  29. package/dist/components/CdsRadioButton/index.d.ts +1 -0
  30. package/dist/components/CdsSelect/CdsSelect.d.ts +90 -6
  31. package/dist/components/CdsSlideGroup/CdsSlideGroup.d.ts +59 -29
  32. package/dist/components/CdsStatus/CdsStatus.d.ts +23 -1
  33. package/dist/components/CdsTable/CdsTable.d.ts +3 -1
  34. package/dist/components/CdsTable/components/Table/InternalTable.d.ts +3 -1
  35. package/dist/components/CdsTable/components/TableProvider.d.ts +3 -1
  36. package/dist/components/CdsTabsV2/CdsTabsV2.d.ts +30 -0
  37. package/dist/components/CdsTag/CdsTag.d.ts +26 -0
  38. package/dist/components/CdsTextArea/CdsTextArea.d.ts +93 -6
  39. package/dist/components/CdsTextInput/CdsTextInput.d.ts +93 -6
  40. package/dist/components/CdsToggle/CdsToggle.d.ts +18 -0
  41. package/dist/components/CdsTooltip/CdsTooltip.d.ts +21 -0
  42. package/dist/components/CdsUploader/CdsUploader.d.ts +18 -0
  43. package/dist/components/index.d.ts +4 -0
  44. package/dist/composable/field.d.ts +5 -3
  45. package/dist/composable/input.d.ts +20 -0
  46. package/dist/composable/status.d.ts +14 -2
  47. package/dist/utils/compat.d.ts +33 -0
  48. package/dist/utils/dom/warn.d.ts +42 -0
  49. package/dist/utils/index.d.ts +1 -0
  50. package/package.json +4 -2
@@ -107,6 +107,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
107
107
  type: import('vue').PropType<boolean>;
108
108
  default: boolean;
109
109
  };
110
+ hint: {
111
+ type: import('vue').PropType<string>;
112
+ default: undefined;
113
+ };
114
+ persistentHint: {
115
+ type: import('vue').PropType<boolean>;
116
+ default: boolean;
117
+ };
110
118
  active: {
111
119
  type: import('vue').PropType<boolean>;
112
120
  default: boolean;
@@ -147,7 +155,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
147
155
  default: undefined;
148
156
  };
149
157
  counter: {
150
- type: import('vue').PropType<boolean>;
158
+ type: import('vue').PropType<boolean | number | string>;
151
159
  default: boolean;
152
160
  };
153
161
  limit: {
@@ -279,6 +287,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
279
287
  type: import('vue').PropType<boolean>;
280
288
  default: boolean;
281
289
  };
290
+ hint: {
291
+ type: import('vue').PropType<string>;
292
+ default: undefined;
293
+ };
294
+ persistentHint: {
295
+ type: import('vue').PropType<boolean>;
296
+ default: boolean;
297
+ };
282
298
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
283
299
  'update:modelValue': (value: any) => true;
284
300
  'click:control': (event: MouseEvent) => true;
@@ -381,6 +397,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
381
397
  type: import('vue').PropType<boolean>;
382
398
  default: boolean;
383
399
  };
400
+ hint: {
401
+ type: import('vue').PropType<string>;
402
+ default: undefined;
403
+ };
404
+ persistentHint: {
405
+ type: import('vue').PropType<boolean>;
406
+ default: boolean;
407
+ };
384
408
  }>> & Readonly<{
385
409
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
386
410
  "onClick:control"?: ((event: MouseEvent) => any) | undefined;
@@ -400,6 +424,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
400
424
  label: string;
401
425
  messages: string | string[];
402
426
  persistentMessages: boolean;
427
+ hint: string;
428
+ persistentHint: boolean;
403
429
  errorMessages: string | string[];
404
430
  maxErrors: string | number;
405
431
  rules: import('../../composable').TValidationRule[];
@@ -506,6 +532,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
506
532
  type: import('vue').PropType<boolean>;
507
533
  default: boolean;
508
534
  };
535
+ hint: {
536
+ type: import('vue').PropType<string>;
537
+ default: undefined;
538
+ };
539
+ persistentHint: {
540
+ type: import('vue').PropType<boolean>;
541
+ default: boolean;
542
+ };
509
543
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
510
544
  'update:modelValue': (value: any) => true;
511
545
  'click:control': (event: MouseEvent) => true;
@@ -608,6 +642,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
608
642
  type: import('vue').PropType<boolean>;
609
643
  default: boolean;
610
644
  };
645
+ hint: {
646
+ type: import('vue').PropType<string>;
647
+ default: undefined;
648
+ };
649
+ persistentHint: {
650
+ type: import('vue').PropType<boolean>;
651
+ default: boolean;
652
+ };
611
653
  }>> & Readonly<{
612
654
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
613
655
  "onClick:control"?: ((event: MouseEvent) => any) | undefined;
@@ -627,6 +669,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
627
669
  label: string;
628
670
  messages: string | string[];
629
671
  persistentMessages: boolean;
672
+ hint: string;
673
+ persistentHint: boolean;
630
674
  errorMessages: string | string[];
631
675
  maxErrors: string | number;
632
676
  rules: import('../../composable').TValidationRule[];
@@ -650,6 +694,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
650
694
  readonly focused?: boolean | undefined;
651
695
  readonly messages?: string | string[] | undefined;
652
696
  readonly persistentMessages?: boolean | undefined;
697
+ readonly persistentHint?: boolean | undefined;
653
698
  readonly errorMessages?: string | string[] | undefined;
654
699
  readonly maxErrors?: string | number | undefined;
655
700
  readonly rules?: (import('../../composable').TValidationResult | ((value: any) => import('../../composable').TValidationResult) | ((value: any) => PromiseLike<import('../../composable').TValidationResult>) | {
@@ -660,7 +705,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
660
705
  readonly hideMessages?: boolean | undefined;
661
706
  readonly autofocus?: boolean | undefined;
662
707
  readonly type?: "number" | "text" | "password" | "email" | "tel" | "url" | undefined;
663
- readonly counter?: boolean | undefined;
708
+ readonly counter?: string | number | boolean | undefined;
664
709
  readonly clearable?: boolean | undefined;
665
710
  readonly clearLabel?: string | undefined;
666
711
  readonly persistentClearable?: boolean | undefined;
@@ -672,6 +717,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
672
717
  readonly description?: string | undefined;
673
718
  readonly id?: string | undefined;
674
719
  readonly label?: string | undefined;
720
+ readonly hint?: string | undefined;
675
721
  readonly validationValue?: any;
676
722
  readonly prefix?: string | undefined;
677
723
  readonly suffix?: string | undefined;
@@ -796,6 +842,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
796
842
  type: import('vue').PropType<boolean>;
797
843
  default: boolean;
798
844
  };
845
+ hint: {
846
+ type: import('vue').PropType<string>;
847
+ default: undefined;
848
+ };
849
+ persistentHint: {
850
+ type: import('vue').PropType<boolean>;
851
+ default: boolean;
852
+ };
799
853
  active: {
800
854
  type: import('vue').PropType<boolean>;
801
855
  default: boolean;
@@ -836,7 +890,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
836
890
  default: undefined;
837
891
  };
838
892
  counter: {
839
- type: import('vue').PropType<boolean>;
893
+ type: import('vue').PropType<boolean | number | string>;
840
894
  default: boolean;
841
895
  };
842
896
  limit: {
@@ -884,6 +938,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
884
938
  readonly focused?: boolean | undefined;
885
939
  readonly messages?: string | string[] | undefined;
886
940
  readonly persistentMessages?: boolean | undefined;
941
+ readonly persistentHint?: boolean | undefined;
887
942
  readonly errorMessages?: string | string[] | undefined;
888
943
  readonly maxErrors?: string | number | undefined;
889
944
  readonly rules?: (import('../../composable').TValidationResult | ((value: any) => import('../../composable').TValidationResult) | ((value: any) => PromiseLike<import('../../composable').TValidationResult>) | {
@@ -894,7 +949,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
894
949
  readonly hideMessages?: boolean | undefined;
895
950
  readonly autofocus?: boolean | undefined;
896
951
  readonly type?: "number" | "text" | "password" | "email" | "tel" | "url" | undefined;
897
- readonly counter?: boolean | undefined;
952
+ readonly counter?: string | number | boolean | undefined;
898
953
  readonly clearable?: boolean | undefined;
899
954
  readonly clearLabel?: string | undefined;
900
955
  readonly persistentClearable?: boolean | undefined;
@@ -906,6 +961,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
906
961
  readonly description?: string | undefined;
907
962
  readonly id?: string | undefined;
908
963
  readonly label?: string | undefined;
964
+ readonly hint?: string | undefined;
909
965
  readonly validationValue?: any;
910
966
  readonly prefix?: string | undefined;
911
967
  readonly suffix?: string | undefined;
@@ -932,6 +988,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
932
988
  hasLoading: import('vue').ComputedRef<boolean>;
933
989
  hasClear: import('vue').ComputedRef<boolean>;
934
990
  counterValue: import('vue').ComputedRef<any>;
991
+ maxLength: import('vue').ComputedRef<string | number | undefined>;
992
+ counterMax: import('vue').ComputedRef<string | number | undefined>;
993
+ hasCounter: import('vue').ComputedRef<boolean>;
935
994
  iconClasses: import('vue').ComputedRef<Record<string, boolean>>;
936
995
  themeClasses: Readonly<import('vue').ComputedRef<string | undefined>>;
937
996
  sizeClasses: import('vue').ComputedRef<string>;
@@ -1106,6 +1165,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1106
1165
  type: import('vue').PropType<boolean>;
1107
1166
  default: boolean;
1108
1167
  };
1168
+ hint: {
1169
+ type: import('vue').PropType<string>;
1170
+ default: undefined;
1171
+ };
1172
+ persistentHint: {
1173
+ type: import('vue').PropType<boolean>;
1174
+ default: boolean;
1175
+ };
1109
1176
  active: {
1110
1177
  type: import('vue').PropType<boolean>;
1111
1178
  default: boolean;
@@ -1146,7 +1213,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1146
1213
  default: undefined;
1147
1214
  };
1148
1215
  counter: {
1149
- type: import('vue').PropType<boolean>;
1216
+ type: import('vue').PropType<boolean | number | string>;
1150
1217
  default: boolean;
1151
1218
  };
1152
1219
  limit: {
@@ -1202,6 +1269,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1202
1269
  label: string;
1203
1270
  messages: string | string[];
1204
1271
  persistentMessages: boolean;
1272
+ hint: string;
1273
+ persistentHint: boolean;
1205
1274
  errorMessages: string | string[];
1206
1275
  maxErrors: string | number;
1207
1276
  rules: import('../../composable').TValidationRule[];
@@ -1217,7 +1286,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1217
1286
  type: "number" | "text" | "password" | "email" | "tel" | "url";
1218
1287
  role: string;
1219
1288
  placeholder: string;
1220
- counter: boolean;
1289
+ counter: string | number | boolean;
1221
1290
  limit: number;
1222
1291
  clearable: boolean;
1223
1292
  clearLabel: string;
@@ -1324,6 +1393,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1324
1393
  type: import('vue').PropType<boolean>;
1325
1394
  default: boolean;
1326
1395
  };
1396
+ hint: {
1397
+ type: import('vue').PropType<string>;
1398
+ default: undefined;
1399
+ };
1400
+ persistentHint: {
1401
+ type: import('vue').PropType<boolean>;
1402
+ default: boolean;
1403
+ };
1327
1404
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
1328
1405
  'update:modelValue': (value: any) => true;
1329
1406
  'click:control': (event: MouseEvent) => true;
@@ -1426,6 +1503,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1426
1503
  type: import('vue').PropType<boolean>;
1427
1504
  default: boolean;
1428
1505
  };
1506
+ hint: {
1507
+ type: import('vue').PropType<string>;
1508
+ default: undefined;
1509
+ };
1510
+ persistentHint: {
1511
+ type: import('vue').PropType<boolean>;
1512
+ default: boolean;
1513
+ };
1429
1514
  }>> & Readonly<{
1430
1515
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
1431
1516
  "onClick:control"?: ((event: MouseEvent) => any) | undefined;
@@ -1445,6 +1530,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1445
1530
  label: string;
1446
1531
  messages: string | string[];
1447
1532
  persistentMessages: boolean;
1533
+ hint: string;
1534
+ persistentHint: boolean;
1448
1535
  errorMessages: string | string[];
1449
1536
  maxErrors: string | number;
1450
1537
  rules: import('../../composable').TValidationRule[];
@@ -79,6 +79,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
79
79
  type: import('vue').PropType<boolean>;
80
80
  default: boolean;
81
81
  };
82
+ hint: {
83
+ type: import('vue').PropType<string>;
84
+ default: undefined;
85
+ };
86
+ persistentHint: {
87
+ type: import('vue').PropType<boolean>;
88
+ default: boolean;
89
+ };
82
90
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
83
91
  /**
84
92
  * Событие при фокусе
@@ -170,6 +178,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
170
178
  type: import('vue').PropType<boolean>;
171
179
  default: boolean;
172
180
  };
181
+ hint: {
182
+ type: import('vue').PropType<string>;
183
+ default: undefined;
184
+ };
185
+ persistentHint: {
186
+ type: import('vue').PropType<boolean>;
187
+ default: boolean;
188
+ };
173
189
  }>> & Readonly<{
174
190
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
175
191
  "onUpdate:focused"?: ((value: boolean) => any) | undefined;
@@ -185,6 +201,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
185
201
  label: string;
186
202
  messages: string | string[];
187
203
  persistentMessages: boolean;
204
+ hint: string;
205
+ persistentHint: boolean;
188
206
  errorMessages: string | string[];
189
207
  maxErrors: string | number;
190
208
  rules: import('../../composable').TValidationRule[];
@@ -212,6 +212,16 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
212
212
  type: PropType<boolean>;
213
213
  default: boolean;
214
214
  };
215
+ /**
216
+ * Интерактивный контент подсказки: по нему можно вести курсор, кликать
217
+ * ссылки и выделять текст. Доступно с 3.11.0 и ничего не меняет — такое
218
+ * поведение включено всегда; проп принимается, чтобы его можно было
219
+ * проставить заранее.
220
+ */
221
+ interactive: {
222
+ type: PropType<boolean>;
223
+ default: boolean;
224
+ };
215
225
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
216
226
  /**
217
227
  * Событие при изменении значения (v-model)
@@ -429,6 +439,16 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
429
439
  type: PropType<boolean>;
430
440
  default: boolean;
431
441
  };
442
+ /**
443
+ * Интерактивный контент подсказки: по нему можно вести курсор, кликать
444
+ * ссылки и выделять текст. Доступно с 3.11.0 и ничего не меняет — такое
445
+ * поведение включено всегда; проп принимается, чтобы его можно было
446
+ * проставить заранее.
447
+ */
448
+ interactive: {
449
+ type: PropType<boolean>;
450
+ default: boolean;
451
+ };
432
452
  }>> & Readonly<{
433
453
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
434
454
  }>, {
@@ -474,5 +494,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
474
494
  })>;
475
495
  scrollStrategy: NonNullable<"close" | "none" | "block" | "reposition" | ((data: import('../CdsOverlay/composable').IScrollStrategyData, props: import('../CdsOverlay/composable').IScrollStrategyProps, scope: import('vue').EffectScope) => void)>;
476
496
  hideArrow: boolean;
497
+ interactive: boolean;
477
498
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
478
499
  export default _default;
@@ -100,6 +100,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
100
100
  type: import('vue').PropType<boolean>;
101
101
  default: boolean;
102
102
  };
103
+ hint: {
104
+ type: import('vue').PropType<string>;
105
+ default: undefined;
106
+ };
107
+ persistentHint: {
108
+ type: import('vue').PropType<boolean>;
109
+ default: boolean;
110
+ };
103
111
  capture: {
104
112
  type: import('vue').PropType<boolean | "user" | "environment">;
105
113
  default: undefined;
@@ -362,6 +370,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
362
370
  type: import('vue').PropType<boolean>;
363
371
  default: boolean;
364
372
  };
373
+ hint: {
374
+ type: import('vue').PropType<string>;
375
+ default: undefined;
376
+ };
377
+ persistentHint: {
378
+ type: import('vue').PropType<boolean>;
379
+ default: boolean;
380
+ };
365
381
  capture: {
366
382
  type: import('vue').PropType<boolean | "user" | "environment">;
367
383
  default: undefined;
@@ -504,6 +520,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
504
520
  label: string;
505
521
  messages: string | string[];
506
522
  persistentMessages: boolean;
523
+ hint: string;
524
+ persistentHint: boolean;
507
525
  errorMessages: string | string[];
508
526
  maxErrors: string | number;
509
527
  rules: import('../../composable').TValidationRule[];
@@ -41,10 +41,12 @@ export { default as CdsHeader } from './CdsHeader/CdsHeader';
41
41
  export { default as CdsIcon } from './CdsIcon/CdsIcon';
42
42
  export { default as CdsImage } from './CdsImage/CdsImage';
43
43
  export { default as CdsInput } from './CdsInput/CdsInput';
44
+ export { default as CdsDescription } from './CdsInput/CdsDescription';
44
45
  export { default as CdsInputCounter } from './CdsInput/CdsInputCounter';
45
46
  export { default as CdsInputDescription } from './CdsInput/CdsInputDescription';
46
47
  export { default as CdsInputLabel } from './CdsInput/CdsInputLabel';
47
48
  export { default as CdsInputMessages } from './CdsInput/CdsInputMessages';
49
+ export { default as CdsLabel } from './CdsInput/CdsLabel';
48
50
  export { default as CdsLayout } from './CdsLayout/CdsLayout';
49
51
  export { default as CdsLink } from './CdsLink/CdsLink';
50
52
  export { default as CdsList } from './CdsList/CdsList';
@@ -60,8 +62,10 @@ export { default as CdsOverlay } from './CdsOverlay/CdsOverlay';
60
62
  export { default as CdsPage } from './CdsPage/CdsPage';
61
63
  export { default as CdsPagination } from './CdsPagination/CdsPagination';
62
64
  export { default as CdsProgress } from './CdsProgress/CdsProgress';
65
+ export { default as CdsProgressBar } from './CdsProgress/CdsProgressBar';
63
66
  export { default as CdsRadio } from './CdsRadioButton/CdsRadio';
64
67
  export { default as CdsRadioButton } from './CdsRadioButton/CdsRadioButton';
68
+ export { default as CdsRadioGroup } from './CdsRadioButton/CdsRadioGroup';
65
69
  export { default as CdsSelect } from './CdsSelect/CdsSelect';
66
70
  export { default as CdsSidebar } from './CdsSidebar/CdsSidebar';
67
71
  export { default as CdsSkeletonLoader } from './CdsSkeletonLoader/CdsSkeletonLoader';
@@ -12,7 +12,7 @@ export interface IFieldProps {
12
12
  type: TFieldTypes;
13
13
  role: string | undefined;
14
14
  placeholder: string | undefined;
15
- counter: boolean;
15
+ counter: boolean | number | string;
16
16
  disabled: boolean;
17
17
  limit: number | undefined;
18
18
  clearable: boolean;
@@ -115,14 +115,16 @@ export declare const makeFieldProps: <Defaults extends {
115
115
  default: undefined;
116
116
  };
117
117
  /**
118
- * Счетчик введенных символов
118
+ * Счетчик введенных символов. Число или строка задаёт максимум счётчика —
119
+ * так это работает в CDS 4 вместо `limit`.
119
120
  */
120
121
  counter: {
121
- type: PropType<boolean>;
122
+ type: PropType<boolean | number | string>;
122
123
  default: boolean;
123
124
  };
124
125
  /**
125
126
  * Ограничение ввода по количеству символов
127
+ * @deprecated Ограничение ввода — нативный `maxlength`, счётчик — `counter`
126
128
  */
127
129
  limit: {
128
130
  type: PropType<number>;
@@ -18,6 +18,8 @@ export interface IInputProps {
18
18
  value: any;
19
19
  messages: string[] | string;
20
20
  persistentMessages: boolean;
21
+ hint?: string;
22
+ persistentHint?: boolean;
21
23
  }
22
24
  export interface IUseInput {
23
25
  id: ComputedRef<string>;
@@ -31,6 +33,8 @@ export declare const makeInputProps: <Defaults extends {
31
33
  value?: unknown;
32
34
  messages?: unknown;
33
35
  persistentMessages?: unknown;
36
+ hint?: unknown;
37
+ persistentHint?: unknown;
34
38
  } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
35
39
  /**
36
40
  * Идентификатор
@@ -69,11 +73,27 @@ export declare const makeInputProps: <Defaults extends {
69
73
  };
70
74
  /**
71
75
  * Всегда показывать сообщения и подсказки
76
+ * @deprecated В CDS 4 `messages` видны всегда — проп можно просто убрать
72
77
  */
73
78
  persistentMessages: {
74
79
  type: PropType<boolean>;
75
80
  default: boolean;
76
81
  };
82
+ /**
83
+ * Подсказка под полем. Доступно с 3.11.0 — синоним `messages`.
84
+ */
85
+ hint: {
86
+ type: PropType<string>;
87
+ default: undefined;
88
+ };
89
+ /**
90
+ * Всегда показывать подсказку, а не только в фокусе. Доступно с 3.11.0 —
91
+ * синоним `persistentMessages`.
92
+ */
93
+ persistentHint: {
94
+ type: PropType<boolean>;
95
+ default: boolean;
96
+ };
77
97
  }, Defaults>;
78
98
  export declare function useInput(props: IInputProps, slots: Record<string, unknown>, name?: string): IUseInput;
79
99
  export declare function useFilteredInputProps<T extends Record<string, unknown>>(props: T, exclude: string[]): {
@@ -1,6 +1,7 @@
1
1
  import { MaybeRef } from '../utils';
2
2
  import { ComputedRef, PropType } from 'vue';
3
- export type TStatus = typeof allowedStatus[number];
3
+ export type TStatusName = typeof allowedStatus[number];
4
+ export type TStatus = TStatusName | keyof typeof statusAliases;
4
5
  export interface IStatusProps {
5
6
  status: TStatus;
6
7
  }
@@ -8,11 +9,22 @@ export interface IUseStatus {
8
9
  statusClasses: ComputedRef<string>;
9
10
  }
10
11
  export declare const allowedStatus: readonly ["info", "success", "warning", "error", "progress"];
12
+ /**
13
+ * Имена статусов из CDS 4: набор выровнен с токенами `--cds-color-status-*`,
14
+ * поэтому `error` там называется `danger`. Принимаем оба имени, чтобы на
15
+ * `danger` можно было перейти до апгрейда.
16
+ */
17
+ export declare const statusAliases: {
18
+ readonly danger: "error";
19
+ };
20
+ export declare const availableStatus: readonly ["info", "success", "warning", "error", "progress", ...string[]];
21
+ /** Приводит имя статуса из CDS 4 к внутреннему имени CDS 3. */
22
+ export declare function resolveStatus(status: TStatus): TStatusName;
11
23
  export declare const makeStatusProps: <Defaults extends {
12
24
  status?: unknown;
13
25
  } = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
14
26
  /**
15
- * Статус состояния
27
+ * Статус состояния. Значение `danger` доступно с 3.11.0 — синоним `error`.
16
28
  */
17
29
  status: {
18
30
  type: PropType<TStatus>;
@@ -0,0 +1,33 @@
1
+ import { ComponentObjectPropsOptions } from 'vue';
2
+ /**
3
+ * Копия компонента под именем из CDS 4. Обе регистрации рендерят одно и то же,
4
+ * но различаются `name` — по нему `deprecateAlias` понимает, под каким именем
5
+ * компонент отрисован, и молчит на новом.
6
+ */
7
+ export declare function createAlias<T>(component: T, name: string): T;
8
+ /**
9
+ * Передан ли проп явно. `props.x !== undefined` для этого не годится: у пропса
10
+ * может быть дефолт, поэтому смотрим сырые пропсы vnode (camelCase и kebab-case).
11
+ */
12
+ export declare function hasProvidedProp(name: string): boolean;
13
+ /**
14
+ * Используется ли проп на самом деле: передан явно и его значение отличается от
15
+ * дефолта. Именно это условие нужно предупреждениям — проп, переданный со
16
+ * значением по умолчанию (`:persistent-messages="false"`, `v-bind="args"`
17
+ * в Storybook, разворот объекта пропсов), ни на что не влияет, и требовать
18
+ * его замены не за что.
19
+ */
20
+ export declare function usesProp(name: string): boolean;
21
+ /**
22
+ * Фильтр пропсов для проброса во вложенный компонент: пропускает только то, что
23
+ * разработчик задал сам, плюс пропсы, у которых обёртка переопределила дефолт
24
+ * (например `role: 'combobox'` у `CdsAutocomplete`).
25
+ *
26
+ * Прокидывать весь набор нельзя: вложенный компонент увидит дефолты обёртки как
27
+ * явно переданные пропсы — и `hasProvidedProp` выдаст `[CDS UPGRADE]` на код,
28
+ * в котором устаревшего пропса нет.
29
+ *
30
+ * Вызывать только в `setup`: инстанс запоминается, а `vnode` читается на каждой
31
+ * проверке, поэтому фильтр остаётся верным и после ре-рендера.
32
+ */
33
+ export declare function createProvidedPropsFilter(target: ComponentObjectPropsOptions): (name: string) => boolean;
@@ -1,2 +1,44 @@
1
+ /** Сбрасывает историю выведенных предупреждений (нужен тестам). */
2
+ export declare function resetDeprecationWarnings(): void;
1
3
  export declare function warn(component: string, msg: string): void;
4
+ /**
5
+ * Устаревшая сущность без контекста компонента.
6
+ * Оставлена ради совместимости — для новых мест берите узкие хелперы ниже.
7
+ */
2
8
  export declare function deprecate(original: string, replacement: string | string[]): void;
9
+ /** Компонент переименован или удалён: `deprecateComponent('CdsSidebar', 'CdsDrawer')`. */
10
+ export declare function deprecateComponent(original: string, replacement: string | string[] | null, hint?: string): void;
11
+ /**
12
+ * Компонент переименован в v4, но занять новое имя в CDS 3 нельзя — там оно
13
+ * принадлежит другому компоненту. Значит правка возможна только в момент
14
+ * апгрейда: «Use 'CdsTab' instead» здесь звучало бы как совет перейти на
15
+ * старый CDS 3 `CdsTab`, то есть ровно наоборот.
16
+ */
17
+ export declare function renameOnUpgrade(component: string, next: string, hint?: string): void;
18
+ /**
19
+ * Компонент доступен и под именем CDS 4 (алиас), поэтому предупреждаем только
20
+ * тогда, когда он отрисован под старым именем.
21
+ *
22
+ * Алиас создаётся копией опций со своим `name` (см. `createAlias`), так что
23
+ * различить их можно только по имени текущего инстанса.
24
+ */
25
+ export declare function deprecateAlias(original: string, replacement: string): void;
26
+ /** Пропс переименован или удалён: `deprecateProp('CdsBadge', 'count', 'content')`. */
27
+ export declare function deprecateProp(component: string, prop: string, replacement: string | string[] | null, hint?: string): void;
28
+ /** Переименовано значение пропса: `status="error"` → `status="danger"`. */
29
+ export declare function deprecatePropValue(component: string, prop: string, value: string, replacement: string): void;
30
+ /**
31
+ * У пропса меняется значение по умолчанию: код продолжит работать, но поведение
32
+ * станет другим, поэтому просим указать значение явно.
33
+ */
34
+ export declare function deprecatePropDefault(component: string, prop: string, current: string, next: string): void;
35
+ /**
36
+ * Проп остаётся, но начинает работать иначе. Это не deprecation: заменять
37
+ * ничего не нужно, а вот знать о смене поведения — нужно, иначе после апгрейда
38
+ * поле молча начнёт выглядеть по-другому.
39
+ */
40
+ export declare function changePropBehaviour(component: string, prop: string, change: string, hint?: string): void;
41
+ /** Событие переименовано: `remove` → `click:close`. */
42
+ export declare function deprecateEvent(component: string, event: string, replacement: string | null, hint?: string): void;
43
+ /** Слот переименован или удалён. */
44
+ export declare function deprecateSlot(component: string, slot: string, replacement: string | string[] | null, hint?: string): void;
@@ -1,6 +1,7 @@
1
1
  export * from './helpers';
2
2
  export * from './propsFactory';
3
3
  export * from './getCurrentInstance';
4
+ export * from './compat';
4
5
  export * from './use/reactivePick';
5
6
  export * from './use/eagerComputed';
6
7
  export * from './use/pickAttrs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@central-design-system/components",
3
- "version": "3.10.7",
3
+ "version": "3.11.0",
4
4
  "description": "Central Design System on the Vue 3.0 and TypeScript",
5
5
  "author": {
6
6
  "name": "magersoft",
@@ -25,6 +25,7 @@
25
25
  }
26
26
  },
27
27
  "./nuxt": "./nuxt.js",
28
+ "./styles": "./dist/cds.css",
28
29
  "./dist/cds.css": "./dist/cds.css",
29
30
  "./src/": {
30
31
  "import": "./src/",
@@ -36,7 +37,8 @@
36
37
  "src/scss/**/*.css",
37
38
  "src/scss/**/*.scss",
38
39
  "src/themes",
39
- "nuxt.js"
40
+ "nuxt.js",
41
+ "UPGRADE.md"
40
42
  ],
41
43
  "engines": {
42
44
  "node": ">= 18"