@feugene/granularity 0.20.0 → 0.21.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 (184) hide show
  1. package/dist/chunks/{config-BJ7Bv_G2.js → config-BC8d_smz.js} +10 -2
  2. package/dist/chunks/config-BC8d_smz.js.map +1 -0
  3. package/dist/chunks/config-BDfTXHo1.js.map +1 -0
  4. package/dist/chunks/config-BEVBsvni2.js.map +1 -0
  5. package/dist/chunks/config-B_qi4Fma2.js +92 -0
  6. package/dist/chunks/config-B_qi4Fma2.js.map +1 -0
  7. package/dist/chunks/config-Baj7Wvx-2.js.map +1 -0
  8. package/dist/chunks/{config-gwro_7yn.js → config-Bm_Sovla.js} +6 -2
  9. package/dist/chunks/config-Bm_Sovla.js.map +1 -0
  10. package/dist/chunks/config-COpuWGr_.js.map +1 -0
  11. package/dist/chunks/config-DBQQT-WP.js +66 -0
  12. package/dist/chunks/config-DBQQT-WP.js.map +1 -0
  13. package/dist/chunks/config-DU2DNSRx.js.map +1 -0
  14. package/dist/chunks/config-QJ54_fcM.js +61 -0
  15. package/dist/chunks/config-QJ54_fcM.js.map +1 -0
  16. package/dist/chunks/config-QaIc_gRa2.js.map +1 -0
  17. package/dist/chunks/config-ScuvHw6k.js.map +1 -0
  18. package/dist/chunks/config-jyZq8XKL.js +58 -0
  19. package/dist/chunks/config-jyZq8XKL.js.map +1 -0
  20. package/dist/chunks/{en-COdzxgAX.js → en-CwAr3C_x.js} +8 -2
  21. package/dist/chunks/{en-COdzxgAX.js.map → en-CwAr3C_x.js.map} +1 -1
  22. package/dist/chunks/{es-DGMHwknJ.js → es-Do1q9_SF.js} +3 -3
  23. package/dist/chunks/{es-DGMHwknJ.js.map → es-Do1q9_SF.js.map} +1 -1
  24. package/dist/chunks/{es-ClqJ-4hr.js → es-TR4g2I4A.js} +8 -2
  25. package/dist/chunks/{es-ClqJ-4hr.js.map → es-TR4g2I4A.js.map} +1 -1
  26. package/dist/chunks/{generated-BRkbhyxk.js → generated-Do60Aq2I.js} +98 -0
  27. package/dist/chunks/{generated-BRkbhyxk.js.map → generated-Do60Aq2I.js.map} +1 -1
  28. package/dist/chunks/{granular-provider-CZYm70Pm.js → granular-provider-BW2uopTG.js} +17 -9
  29. package/dist/chunks/granular-provider-BW2uopTG.js.map +1 -0
  30. package/dist/chunks/{ru-9z8ix45c.js → ru-Bm-zWJ3F.js} +8 -2
  31. package/dist/chunks/{ru-9z8ix45c.js.map → ru-Bm-zWJ3F.js.map} +1 -1
  32. package/dist/chunks/trending-up-Bf9AQmoq.js +42 -0
  33. package/dist/chunks/trending-up-Bf9AQmoq.js.map +1 -0
  34. package/dist/components/GrCard/chunks/GrCard-Bc7nRfbe.js +144 -0
  35. package/dist/components/GrCard/chunks/GrCard-Bc7nRfbe.js.map +1 -0
  36. package/dist/components/GrCard/index.js +2 -2
  37. package/dist/components/GrCodeBlock/chunks/GrCodeBlock-CW3zY1ee.js +341 -0
  38. package/dist/components/GrCodeBlock/chunks/GrCodeBlock-CW3zY1ee.js.map +1 -0
  39. package/dist/components/GrCodeBlock/index.js +3 -0
  40. package/dist/components/GrCodeBlock/styles.css +1 -0
  41. package/dist/components/GrCollapse/chunks/{GrCollapse-KFcrji1L.js → GrCollapse-C1rCfbc0.js} +2 -2
  42. package/dist/components/GrCollapse/chunks/{GrCollapse-KFcrji1L.js.map → GrCollapse-C1rCfbc0.js.map} +1 -1
  43. package/dist/components/GrCollapse/index.js +2 -2
  44. package/dist/components/GrDataTable/chunks/{GrDataTable-CNvZg2HZ.js → GrDataTable-B5MmZFUg.js} +67 -5
  45. package/dist/components/GrDataTable/chunks/GrDataTable-B5MmZFUg.js.map +1 -0
  46. package/dist/components/GrDataTable/index.js +2 -2
  47. package/dist/components/GrDelta/chunks/GrDelta-BMmpYz8K.js +0 -0
  48. package/dist/components/GrDelta/chunks/GrDelta-BMmpYz8K.js.map +1 -0
  49. package/dist/components/GrDelta/index.js +3 -0
  50. package/dist/components/GrDescriptionList/chunks/GrDescriptionList-pXh1LZEe.js +103 -0
  51. package/dist/components/GrDescriptionList/chunks/GrDescriptionList-pXh1LZEe.js.map +1 -0
  52. package/dist/components/GrDescriptionList/index.js +3 -0
  53. package/dist/components/GrFilePreview/chunks/GrFilePreview-rbE3zL9w.js +315 -0
  54. package/dist/components/GrFilePreview/chunks/GrFilePreview-rbE3zL9w.js.map +1 -0
  55. package/dist/components/GrFilePreview/index.js +3 -0
  56. package/dist/components/GrForm/chunks/{GrForm-DdJw23Pz.js → GrForm-B_Qq_13k.js} +14 -7
  57. package/dist/components/GrForm/chunks/GrForm-B_Qq_13k.js.map +1 -0
  58. package/dist/components/GrForm/index.js +1 -1
  59. package/dist/components/GrImageViewer/chunks/{GrImageViewer-CMO10TS7.js.map → GrImageViewer-ng7el4wn.js.map} +1 -1
  60. package/dist/components/GrImageViewer/index.js +1 -1
  61. package/dist/components/GrInputTag/chunks/{GrInputTag-Dghhg03-.js.map → GrInputTag-C7QVPijj.js.map} +1 -1
  62. package/dist/components/GrInputTag/index.js +1 -1
  63. package/dist/components/GrList/chunks/{GrList-CHibO0xA.js → GrList-BUzFRa8-.js} +1 -1
  64. package/dist/components/GrList/chunks/{GrList-CHibO0xA.js.map → GrList-BUzFRa8-.js.map} +1 -1
  65. package/dist/components/GrList/index.js +1 -1
  66. package/dist/components/GrRadioGroup/index.js +1 -1
  67. package/dist/components/GrRating/chunks/{GrRating-BSEtaibx.js → GrRating-BiAVT9H7.js} +1 -1
  68. package/dist/components/GrRating/chunks/{GrRating-BSEtaibx.js.map → GrRating-BiAVT9H7.js.map} +1 -1
  69. package/dist/components/GrRating/index.js +2 -2
  70. package/dist/components/GrSegmented/chunks/{GrSegmented-DP9WMAbm.js → GrSegmented-D1mjxF_O.js} +1 -1
  71. package/dist/components/GrSegmented/chunks/GrSegmented-D1mjxF_O.js.map +1 -0
  72. package/dist/components/GrSegmented/index.js +2 -2
  73. package/dist/components/GrSidebar/chunks/{GrSidebar-DG_t4aPE.js → GrSidebar-D7WxRtIu.js} +7 -1
  74. package/dist/components/GrSidebar/chunks/{GrSidebar-DG_t4aPE.js.map → GrSidebar-D7WxRtIu.js.map} +1 -1
  75. package/dist/components/GrSidebar/index.js +1 -1
  76. package/dist/components/GrSortableList/chunks/{GrSortableList-DJFPdUVv.js → GrSortableList-DPjxilmN.js} +1 -1
  77. package/dist/components/GrSortableList/chunks/{GrSortableList-DJFPdUVv.js.map → GrSortableList-DPjxilmN.js.map} +1 -1
  78. package/dist/components/GrSortableList/index.js +1 -1
  79. package/dist/components/GrStatistic/chunks/{GrStatistic-C3VpykHo.js → GrStatistic-DkzWUAw1.js} +8 -41
  80. package/dist/components/GrStatistic/chunks/GrStatistic-DkzWUAw1.js.map +1 -0
  81. package/dist/components/GrStatistic/index.js +1 -1
  82. package/dist/components/GrTextarea/index.js +1 -1
  83. package/dist/components/GrTimeline/chunks/{GrTimeline-DlTraRn5.js → GrTimeline-Ch9sHzwL.js} +1 -1
  84. package/dist/components/GrTimeline/chunks/GrTimeline-Ch9sHzwL.js.map +1 -0
  85. package/dist/components/GrTimeline/index.js +2 -2
  86. package/dist/components/GrTimeline/styles.css +1 -1
  87. package/dist/components/GrToaster/chunks/{GrToaster-Db2NgrXu.js → GrToaster-DJUzx3sR.js} +1 -1
  88. package/dist/components/GrToaster/chunks/{GrToaster-Db2NgrXu.js.map → GrToaster-DJUzx3sR.js.map} +1 -1
  89. package/dist/components/GrToaster/index.js +2 -2
  90. package/dist/composables/useToast.js +14 -2
  91. package/dist/composables/useToast.js.map +1 -1
  92. package/dist/granular-provider-node.js +1 -1
  93. package/dist/granular-provider.js +1 -1
  94. package/dist/i18n/all.js +1 -1
  95. package/dist/i18n/index.js +1 -1
  96. package/dist/index.js +33 -25
  97. package/dist/theme.js +1 -1
  98. package/dist/tokens.js +1 -1
  99. package/dist/types/components/GrButton/GrButton.vue.d.ts +1 -1
  100. package/dist/types/components/GrCard/GrCard.vue.d.ts +25 -6
  101. package/dist/types/components/GrCard/defaults.d.ts +2 -1
  102. package/dist/types/components/GrCard/grCardStyles.d.ts +8 -0
  103. package/dist/types/components/GrCard/index.d.ts +1 -1
  104. package/dist/types/components/GrCodeBlock/GrCodeBlock.vue.d.ts +79 -0
  105. package/dist/types/components/GrCodeBlock/config.d.ts +1 -0
  106. package/dist/types/components/GrCodeBlock/defaults.d.ts +21 -0
  107. package/dist/types/components/GrCodeBlock/grCodeBlockStyles.d.ts +53 -0
  108. package/dist/types/components/GrCodeBlock/index.d.ts +6 -0
  109. package/dist/types/components/GrCodeBlock/safelist.d.ts +1 -0
  110. package/dist/types/components/GrCodeBlock/serializeCode.d.ts +19 -0
  111. package/dist/types/components/GrCodeBlock/tokenizeJson.d.ts +24 -0
  112. package/dist/types/components/GrCollapse/GrCollapse.vue.d.ts +2 -2
  113. package/dist/types/components/GrCommandPalette/GrCommandPalette.vue.d.ts +2 -2
  114. package/dist/types/components/GrDataTable/GrDataTable.vue.d.ts +38 -1
  115. package/dist/types/components/GrDataTable/grDataTableStyles.d.ts +7 -0
  116. package/dist/types/components/GrDataTable/index.d.ts +1 -1
  117. package/dist/types/components/GrDelta/GrDelta.vue.d.ts +84 -0
  118. package/dist/types/components/GrDelta/config.d.ts +1 -0
  119. package/dist/types/components/GrDelta/defaults.d.ts +22 -0
  120. package/dist/types/components/GrDelta/deltaTone.d.ts +24 -0
  121. package/dist/types/components/GrDelta/grDeltaStyles.d.ts +38 -0
  122. package/dist/types/components/GrDelta/index.d.ts +6 -0
  123. package/dist/types/components/GrDelta/safelist.d.ts +1 -0
  124. package/dist/types/components/GrDescriptionList/GrDescriptionList.vue.d.ts +107 -0
  125. package/dist/types/components/GrDescriptionList/config.d.ts +1 -0
  126. package/dist/types/components/GrDescriptionList/defaults.d.ts +21 -0
  127. package/dist/types/components/GrDescriptionList/grDescriptionListStyles.d.ts +25 -0
  128. package/dist/types/components/GrDescriptionList/index.d.ts +6 -0
  129. package/dist/types/components/GrDescriptionList/safelist.d.ts +1 -0
  130. package/dist/types/components/GrFilePreview/GrFilePreview.vue.d.ts +100 -0
  131. package/dist/types/components/GrFilePreview/config.d.ts +1 -0
  132. package/dist/types/components/GrFilePreview/defaults.d.ts +20 -0
  133. package/dist/types/components/GrFilePreview/fileKindOf.d.ts +14 -0
  134. package/dist/types/components/GrFilePreview/grFilePreviewStyles.d.ts +37 -0
  135. package/dist/types/components/GrFilePreview/index.d.ts +6 -0
  136. package/dist/types/components/GrFilePreview/safelist.d.ts +1 -0
  137. package/dist/types/components/GrForm/GrForm.vue.d.ts +47 -86
  138. package/dist/types/components/GrFormField/GrFormField.vue.d.ts +2 -2
  139. package/dist/types/components/GrImageViewer/GrImageViewer.vue.d.ts +1 -1
  140. package/dist/types/components/GrInput/GrInput.vue.d.ts +1 -1
  141. package/dist/types/components/GrInputTag/GrInputTag.vue.d.ts +1 -1
  142. package/dist/types/components/GrNumberInput/GrNumberInput.vue.d.ts +1 -1
  143. package/dist/types/components/GrRating/GrRating.vue.d.ts +1 -1
  144. package/dist/types/components/GrSegmented/GrSegmented.vue.d.ts +1 -1
  145. package/dist/types/components/GrStatistic/GrStatistic.vue.d.ts +2 -2
  146. package/dist/types/components/GrSwitch/GrSwitch.vue.d.ts +1 -1
  147. package/dist/types/components/GrTable/GrTable.vue.d.ts +2 -2
  148. package/dist/types/components/GrTabs/GrTabs.vue.d.ts +1 -1
  149. package/dist/types/components/GrTimeline/GrTimelineItem.vue.d.ts +3 -3
  150. package/dist/types/components/shared/sizes.d.ts +5 -1
  151. package/dist/types/composables/useToast.d.ts +11 -0
  152. package/dist/types/granular-provider/shared.d.ts +4 -0
  153. package/dist/types/i18n/messages/en.d.ts +10 -0
  154. package/dist/types/i18n/messages/es.d.ts +10 -0
  155. package/dist/types/i18n/messages/ru.d.ts +10 -0
  156. package/dist/types/index.d.ts +4 -0
  157. package/dist/web-types.json +556 -139
  158. package/package.json +18 -1
  159. package/dist/chunks/config-BDfTXHo12.js.map +0 -1
  160. package/dist/chunks/config-BEVBsvni.js.map +0 -1
  161. package/dist/chunks/config-BJ7Bv_G2.js.map +0 -1
  162. package/dist/chunks/config-Baj7Wvx-.js.map +0 -1
  163. package/dist/chunks/config-COpuWGr_2.js.map +0 -1
  164. package/dist/chunks/config-DU2DNSRx2.js.map +0 -1
  165. package/dist/chunks/config-QaIc_gRa.js.map +0 -1
  166. package/dist/chunks/config-ScuvHw6k2.js.map +0 -1
  167. package/dist/chunks/config-gwro_7yn.js.map +0 -1
  168. package/dist/chunks/granular-provider-CZYm70Pm.js.map +0 -1
  169. package/dist/components/GrCard/chunks/GrCard-DfIZOP5N.js +0 -89
  170. package/dist/components/GrCard/chunks/GrCard-DfIZOP5N.js.map +0 -1
  171. package/dist/components/GrDataTable/chunks/GrDataTable-CNvZg2HZ.js.map +0 -1
  172. package/dist/components/GrForm/chunks/GrForm-DdJw23Pz.js.map +0 -1
  173. package/dist/components/GrSegmented/chunks/GrSegmented-DP9WMAbm.js.map +0 -1
  174. package/dist/components/GrStatistic/chunks/GrStatistic-C3VpykHo.js.map +0 -1
  175. package/dist/components/GrTimeline/chunks/GrTimeline-DlTraRn5.js.map +0 -1
  176. package/dist/chunks/{config-BDfTXHo12.js → config-BDfTXHo1.js} +0 -0
  177. package/dist/chunks/{config-BEVBsvni.js → config-BEVBsvni2.js} +0 -0
  178. package/dist/chunks/{config-Baj7Wvx-.js → config-Baj7Wvx-2.js} +0 -0
  179. package/dist/chunks/{config-COpuWGr_2.js → config-COpuWGr_.js} +0 -0
  180. package/dist/chunks/{config-DU2DNSRx2.js → config-DU2DNSRx.js} +0 -0
  181. package/dist/chunks/{config-QaIc_gRa.js → config-QaIc_gRa2.js} +0 -0
  182. package/dist/chunks/{config-ScuvHw6k2.js → config-ScuvHw6k.js} +0 -0
  183. package/dist/components/GrImageViewer/chunks/{GrImageViewer-CMO10TS7.js → GrImageViewer-ng7el4wn.js} +1 -1
  184. package/dist/components/GrInputTag/chunks/{GrInputTag-Dghhg03-.js → GrInputTag-C7QVPijj.js} +1 -1
@@ -9,9 +9,17 @@ export type { GrFormFileRule, GrFormRule, GrFormRules, GrFormTrigger, GrFormVali
9
9
  * template ref (`validate` / `validateField` / `clearValidate` / `resetFields` /
10
10
  * `scrollToField`).
11
11
  */
12
- export interface GrFormProps {
13
- /** Реактивный объект данных формы. Поля адресуются по `name` (`GrFormField`), в т.ч. dot-path. */
14
- model: Record<string, unknown>;
12
+ export interface GrFormProps<TModel extends object = Record<string, unknown>> {
13
+ /**
14
+ * Реактивный объект данных формы. Поля адресуются по `name` (`GrFormField`),
15
+ * в т.ч. dot-path.
16
+ *
17
+ * Тип дженерик, а не `Record<string, unknown>`: моделью бывает объект чужой
18
+ * библиотеки (`useForm` Inertia, стор), у которого рядом с полями лежат
19
+ * собственные методы. Под словарь он не подходит, и потребителю пришлось бы
20
+ * приводить его через `as unknown as` в каждой форме.
21
+ */
22
+ model: TModel;
15
23
  /** Правила валидации по имени поля: `{ email: [{ required: true, type: 'email' }] }`. */
16
24
  rules?: GrFormRules;
17
25
  /** Валидировать поле при потере фокуса. */
@@ -27,9 +35,9 @@ export interface GrFormProps {
27
35
  */
28
36
  disabled?: boolean;
29
37
  }
30
- export interface GrFormEmits {
38
+ export interface GrFormEmits<TModel extends object = Record<string, unknown>> {
31
39
  /** Форма прошла валидацию по submit. Отдаёт `model`. */
32
- (e: 'submit', model: Record<string, unknown>): void;
40
+ (e: 'submit', model: TModel): void;
33
41
  /** Результат валидации одного поля. */
34
42
  (e: 'validate', name: string, valid: boolean, message: string | undefined): void;
35
43
  /**
@@ -38,90 +46,43 @@ export interface GrFormEmits {
38
46
  */
39
47
  (e: 'invalid', errors: Record<string, string>): void;
40
48
  }
41
- declare function validateField(name: string, trigger?: GrFormTrigger): Promise<boolean>;
42
- declare function validate(): Promise<boolean>;
43
- declare function clearValidate(names?: string | string[]): void;
44
- /**
45
- * Переснять «исходное» состояние. Нужен формам редактирования: модель там
46
- * наполняется после ответа сервера, а снимок в `setup` фиксировал пустой
47
- * объект — и `resetFields()` возвращал не «как было при загрузке», а пустоту.
48
- */
49
- declare function setSnapshot(model?: Record<string, unknown>): void;
50
- declare function resetFields(names?: string | string[]): void;
51
- declare function scrollToField(name: string): void;
52
- declare var __VLS_1: {
53
- validate: typeof validate;
54
- errors: Record<string, string | undefined>;
55
- isDirty: boolean;
56
- isValid: boolean;
57
- validatingFields: Set<string> & Omit<Set<string>, keyof Set<any>>;
58
- resetFields: typeof resetFields;
59
- setSnapshot: typeof setSnapshot;
60
- };
61
- type __VLS_Slots = {} & {
62
- default?: (props: typeof __VLS_1) => any;
49
+ declare const __VLS_export: <TModel extends object = Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
50
+ props: import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & __VLS_PrettifyLocal<GrFormProps<TModel> & {
51
+ onSubmit?: ((model: TModel) => any) | undefined;
52
+ onInvalid?: ((errors: Record<string, string>) => any) | undefined;
53
+ onValidate?: ((name: string, valid: boolean, message: string | undefined) => any) | undefined;
54
+ }> & (typeof globalThis extends {
55
+ __VLS_PROPS_FALLBACK: infer P;
56
+ } ? P : {});
57
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
58
+ validate: () => Promise<boolean>;
59
+ validateField: (name: string, trigger?: GrFormTrigger) => Promise<boolean>;
60
+ clearValidate: (names?: string | string[]) => void;
61
+ resetFields: (names?: string | string[]) => void;
62
+ scrollToField: (name: string) => void;
63
+ setSnapshot: (model?: Record<string, unknown>) => void;
64
+ isDirty: import("vue").ComputedRef<boolean>;
65
+ isValid: import("vue").ComputedRef<boolean>;
66
+ validatingFields: import("vue").ComputedRef<Set<string> & Omit<Set<string>, keyof Set<any>>>;
67
+ }>) => void;
68
+ attrs: any;
69
+ slots: {
70
+ default?: (props: {
71
+ validate: () => Promise<boolean>;
72
+ errors: Record<string, string | undefined>;
73
+ isDirty: boolean;
74
+ isValid: boolean;
75
+ validatingFields: Set<string> & Omit<Set<string>, keyof Set<any>>;
76
+ resetFields: (names?: string | string[]) => void;
77
+ setSnapshot: (model?: Record<string, unknown>) => void;
78
+ }) => any;
79
+ };
80
+ emit: GrFormEmits<TModel>;
81
+ }>) => import("vue").VNode & {
82
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
63
83
  };
64
- declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GrFormProps>, {
65
- rules: undefined;
66
- validateOnBlur: boolean;
67
- validateOnChange: boolean;
68
- scrollToError: boolean;
69
- scrollBehavior: string;
70
- disabled: boolean;
71
- }>>, {
72
- validate: typeof validate;
73
- validateField: typeof validateField;
74
- clearValidate: typeof clearValidate;
75
- resetFields: typeof resetFields;
76
- scrollToField: typeof scrollToField;
77
- setSnapshot: typeof setSnapshot;
78
- isDirty: import("vue").ComputedRef<boolean>;
79
- isValid: import("vue").ComputedRef<boolean>;
80
- validatingFields: import("vue").ComputedRef<Set<string> & Omit<Set<string>, keyof Set<any>>>;
81
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
82
- submit: (model: Record<string, unknown>) => void;
83
- validate: (name: string, valid: boolean, message: string | undefined) => void;
84
- invalid: (errors: Record<string, string>) => void;
85
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<GrFormProps>, {
86
- rules: undefined;
87
- validateOnBlur: boolean;
88
- validateOnChange: boolean;
89
- scrollToError: boolean;
90
- scrollBehavior: string;
91
- disabled: boolean;
92
- }>>> & Readonly<{
93
- onSubmit?: ((model: Record<string, unknown>) => any) | undefined;
94
- onInvalid?: ((errors: Record<string, string>) => any) | undefined;
95
- onValidate?: ((name: string, valid: boolean, message: string | undefined) => any) | undefined;
96
- }>, {
97
- scrollBehavior: ScrollBehavior;
98
- disabled: boolean;
99
- rules: GrFormRules;
100
- validateOnBlur: boolean;
101
- validateOnChange: boolean;
102
- scrollToError: boolean;
103
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
104
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
105
84
  declare const _default: typeof __VLS_export;
106
85
  export default _default;
107
- type __VLS_TypePropsToOption<T> = {
108
- [K in keyof T]-?: {} extends Pick<T, K> ? {
109
- type: import('vue').PropType<Required<T>[K]>;
110
- } : {
111
- type: import('vue').PropType<T[K]>;
112
- required: true;
113
- };
114
- };
115
- type __VLS_WithDefaults<P, D> = {
116
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
117
- default: D[K];
118
- }> : P[K];
119
- };
120
- type __VLS_WithSlots<T, S> = T & {
121
- new (): {
122
- $slots: S;
123
- };
124
- };
125
86
  type __VLS_PrettifyLocal<T> = (T extends any ? {
126
87
  [K in keyof T]: T[K];
127
88
  } : {
@@ -81,6 +81,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
81
81
  labelClass: undefined;
82
82
  }>>> & Readonly<{}>, {
83
83
  size: GrFormFieldSize;
84
+ labelWidth: string | number;
84
85
  labelPosition: GrFormFieldLabelPosition;
85
86
  readonly: boolean;
86
87
  label: string;
@@ -88,11 +89,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
88
89
  error: string | string[];
89
90
  disabled: boolean;
90
91
  required: boolean;
92
+ labelClass: LabelClass;
91
93
  forId: string;
92
94
  hint: string;
93
95
  showMessage: boolean;
94
- labelWidth: string | number;
95
- labelClass: LabelClass;
96
96
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
97
97
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
98
98
  declare const _default: typeof __VLS_export;
@@ -218,9 +218,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
218
218
  index: number;
219
219
  }) => any) | undefined;
220
220
  }>, {
221
+ emptyText: string;
221
222
  zIndexVar: string;
222
223
  ariaLabel: string;
223
- emptyText: string;
224
224
  closeLabel: string;
225
225
  showProgress: boolean;
226
226
  initialIndex: number;
@@ -152,12 +152,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
152
152
  }>, {
153
153
  size: GrInputSize;
154
154
  clearable: boolean;
155
+ loading: boolean;
155
156
  readonly: boolean;
156
157
  type: "text" | "email" | "password" | "number" | "search" | "tel" | "url";
157
158
  name: string;
158
159
  invalid: boolean;
159
160
  id: string;
160
- loading: boolean;
161
161
  textAlign: GrInputTextAlign;
162
162
  disabled: boolean;
163
163
  required: boolean;
@@ -164,12 +164,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
164
164
  }>, {
165
165
  size: GrInputTagSize;
166
166
  clearable: boolean;
167
+ loading: boolean;
167
168
  trim: boolean;
168
169
  readonly: boolean;
169
170
  name: string;
170
171
  invalid: boolean;
171
172
  max: number;
172
- loading: boolean;
173
173
  disabled: boolean;
174
174
  tagTone: GrBadgeTone;
175
175
  tagDark: boolean;
@@ -187,8 +187,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
187
187
  inputmode: "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal";
188
188
  state: GrNumberInputState;
189
189
  locale: string;
190
- decimalSeparator: string;
191
190
  precision: number;
191
+ decimalSeparator: string;
192
192
  useGrouping: boolean;
193
193
  controls: boolean;
194
194
  controlsDirection: GrNumberInputControlsDirection;
@@ -136,12 +136,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
136
136
  tone: GrRatingTone;
137
137
  size: GrRatingSize;
138
138
  clearable: boolean;
139
+ compact: boolean;
139
140
  icon: string | Component;
140
141
  readonly: boolean;
141
142
  name: string;
142
143
  invalid: boolean;
143
144
  max: number;
144
- compact: boolean;
145
145
  disabled: boolean;
146
146
  required: boolean;
147
147
  ariaLabel: string;
@@ -23,7 +23,7 @@ export interface GrSegmentedProps {
23
23
  invalid?: boolean;
24
24
  /** Обязательное поле (`aria-required`). */
25
25
  required?: boolean;
26
- /** Имя скрытых radio-inputs для интеграции с нативной формой. */
26
+ /** Имя скрытого поля, которым выбранное значение уходит в нативную форму. */
27
27
  name?: string;
28
28
  ariaLabel?: string;
29
29
  }
@@ -123,18 +123,18 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
123
123
  }>, {
124
124
  tone: GrStatisticTone;
125
125
  size: GrStatisticSize;
126
+ loading: boolean;
126
127
  title: string;
127
128
  icon: string | Component;
128
129
  animate: boolean;
129
130
  href: string;
130
- loading: boolean;
131
131
  prefix: string;
132
132
  suffix: string;
133
133
  as: string | Component;
134
134
  clickable: boolean;
135
135
  locale: string;
136
- decimalSeparator: string;
137
136
  precision: number;
137
+ decimalSeparator: string;
138
138
  groupSeparator: string;
139
139
  trend: GrStatisticTrend;
140
140
  trendText: string;
@@ -89,12 +89,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
89
89
  }>, {
90
90
  size: GrSwitchSize;
91
91
  labelPosition: GrSwitchLabelPosition;
92
+ loading: boolean;
92
93
  value: string;
93
94
  readonly: boolean;
94
95
  form: string;
95
96
  name: string;
96
97
  invalid: boolean;
97
- loading: boolean;
98
98
  disabled: boolean;
99
99
  required: boolean;
100
100
  ariaLabel: string;
@@ -132,14 +132,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
132
132
  tableMinWidth: undefined;
133
133
  }>>> & Readonly<{}>, {
134
134
  size: GrTableSize;
135
- caption: string;
135
+ emptyText: string;
136
136
  loading: boolean;
137
+ caption: string;
137
138
  columnCount: number;
138
139
  maxHeight: string | number;
139
140
  ariaLabel: string;
140
141
  empty: boolean;
141
142
  hoverable: boolean;
142
- emptyText: string;
143
143
  ariaLabelledby: string;
144
144
  regionLabel: string;
145
145
  loadingRows: number;
@@ -88,8 +88,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
88
88
  variant: GrTabsVariant;
89
89
  closable: boolean;
90
90
  size: GrTabsSize;
91
- orientation: GrTabsOrientation;
92
91
  emptyText: string;
92
+ orientation: GrTabsOrientation;
93
93
  idBase: string;
94
94
  activationMode: GrTabsActivationMode;
95
95
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -14,8 +14,8 @@ export interface GrTimelineItemProps {
14
14
  /** Заполненная точка — событие случилось, полая — запланировано. */
15
15
  variant?: GrTimelineMarkerVariant;
16
16
  /**
17
- * Событие ещё не произошло: точка полая, а отрезок оси **после** неё
18
- * пунктирный. Перебивает `variant`.
17
+ * Событие ещё не произошло: точка полая, а ось пунктирна начиная с участка,
18
+ * **ведущего** к нему, — непройденный путь. Перебивает `variant`.
19
19
  */
20
20
  pending?: boolean;
21
21
  }
@@ -50,8 +50,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
50
50
  }>>> & Readonly<{}>, {
51
51
  tone: GrTimelineTone;
52
52
  variant: GrTimelineMarkerVariant;
53
- title: string;
54
53
  time: string;
54
+ title: string;
55
55
  description: string;
56
56
  pending: boolean;
57
57
  datetime: string;
@@ -26,5 +26,9 @@ export type GrOverlaySize = typeof GR_OVERLAY_SIZES[number];
26
26
  */
27
27
  export declare const GR_CONTROL_STATES: readonly ["default", "success", "warning", "danger"];
28
28
  export type GrControlState = typeof GR_CONTROL_STATES[number];
29
- /** Размер контрола с escape-hatch в пиксели: только `GrAvatar` и `GrIcon`. */
29
+ /**
30
+ * Размер с escape-hatch в пиксели. Берут его трое: `GrAvatar` и `GrIcon`
31
+ * (исторический произвольный диаметр) и `GrFilePreview` (ширина плитки: лента
32
+ * вложений в четыре ступени не укладывается).
33
+ */
30
34
  export type GrSizeWithPx = GrComponentSize | number;
@@ -30,6 +30,15 @@ export type ToastInput = {
30
30
  action?: ToastAction;
31
31
  /** Несколько action-кнопок в теле тоста. Рендерятся после `action`. */
32
32
  actions?: ToastAction[];
33
+ /**
34
+ * Схлопывать повтор: `push` с уже занятым ключом обновляет **живой** тост
35
+ * и перезапускает его автозакрытие вместо того, чтобы завести второй.
36
+ *
37
+ * Ключ действует только пока тост на экране. Это не то же самое, что помнить
38
+ * последнее показанное: повтор действия с тем же текстом обязан показаться
39
+ * снова, иначе второе «Сохранено» пропадёт молча.
40
+ */
41
+ dedupeKey?: string;
33
42
  };
34
43
  /**
35
44
  * Сообщения для `promise`. Строка — шорткат для `{ title }`; функция получает
@@ -51,6 +60,8 @@ export type Toast = {
51
60
  action?: ToastAction;
52
61
  /** Несколько action-кнопок в теле тоста. */
53
62
  actions?: ToastAction[];
63
+ /** Ключ схлопывания повторов, если тост создан с ним. */
64
+ dedupeKey?: string;
54
65
  };
55
66
  type ToastTimer = {
56
67
  handle: number | null;
@@ -23,12 +23,15 @@ export declare const granularityComponentConfigs: {
23
23
  GrCard: GranularComponentDescriptor<"GrCard">;
24
24
  GrCheckbox: GranularComponentDescriptor<"GrCheckbox">;
25
25
  GrCheckboxGroup: GranularComponentDescriptor<"GrCheckboxGroup">;
26
+ GrCodeBlock: GranularComponentDescriptor<"GrCodeBlock">;
26
27
  GrCollapse: GranularComponentDescriptor<"GrCollapse">;
27
28
  GrColorPicker: GranularComponentDescriptor<"GrColorPicker">;
28
29
  GrCommandPalette: GranularComponentDescriptor<"GrCommandPalette">;
29
30
  GrConfigProvider: GranularComponentDescriptor<"GrConfigProvider">;
30
31
  GrConfirmDialog: GranularComponentDescriptor<"GrConfirmDialog">;
31
32
  GrDataTable: GranularComponentDescriptor<"GrDataTable">;
33
+ GrDelta: GranularComponentDescriptor<"GrDelta">;
34
+ GrDescriptionList: GranularComponentDescriptor<"GrDescriptionList">;
32
35
  GrDialog: GranularComponentDescriptor<"GrDialog">;
33
36
  GrDialogService: GranularComponentDescriptor<"GrDialogService">;
34
37
  GrDivider: GranularComponentDescriptor<"GrDivider">;
@@ -36,6 +39,7 @@ export declare const granularityComponentConfigs: {
36
39
  GrDropdown: GranularComponentDescriptor<"GrDropdown">;
37
40
  GrDropdownMenu: GranularComponentDescriptor<"GrDropdownMenu">;
38
41
  GrEmptyState: GranularComponentDescriptor<"GrEmptyState">;
42
+ GrFilePreview: GranularComponentDescriptor<"GrFilePreview">;
39
43
  GrFileUpload: GranularComponentDescriptor<"GrFileUpload">;
40
44
  GrForm: GranularComponentDescriptor<"GrForm">;
41
45
  GrFormField: GranularComponentDescriptor<"GrFormField">;
@@ -341,6 +341,11 @@ export declare const en: {
341
341
  dropped: string;
342
342
  cancelled: string;
343
343
  };
344
+ codeBlock: {
345
+ copy: string;
346
+ copied: string;
347
+ copyFailed: string;
348
+ };
344
349
  };
345
350
  common: {
346
351
  confirm: string;
@@ -674,6 +679,11 @@ export declare const en: {
674
679
  dropped: string;
675
680
  cancelled: string;
676
681
  };
682
+ codeBlock: {
683
+ copy: string;
684
+ copied: string;
685
+ copyFailed: string;
686
+ };
677
687
  }>;
678
688
  };
679
689
  };
@@ -336,6 +336,11 @@ export declare const es: {
336
336
  dropped: string;
337
337
  cancelled: string;
338
338
  };
339
+ codeBlock: {
340
+ copy: string;
341
+ copied: string;
342
+ copyFailed: string;
343
+ };
339
344
  };
340
345
  common: {
341
346
  confirm: string;
@@ -671,6 +676,11 @@ export declare const es: {
671
676
  dropped: string;
672
677
  cancelled: string;
673
678
  };
679
+ codeBlock: {
680
+ copy: string;
681
+ copied: string;
682
+ copyFailed: string;
683
+ };
674
684
  }>;
675
685
  };
676
686
  };
@@ -338,6 +338,11 @@ export declare const ru: {
338
338
  dropped: string;
339
339
  cancelled: string;
340
340
  };
341
+ codeBlock: {
342
+ copy: string;
343
+ copied: string;
344
+ copyFailed: string;
345
+ };
341
346
  };
342
347
  common: {
343
348
  confirm: string;
@@ -675,6 +680,11 @@ export declare const ru: {
675
680
  dropped: string;
676
681
  cancelled: string;
677
682
  };
683
+ codeBlock: {
684
+ copy: string;
685
+ copied: string;
686
+ copyFailed: string;
687
+ };
678
688
  }>;
679
689
  };
680
690
  };
@@ -10,12 +10,15 @@ export * from './components/GrButtonGroup';
10
10
  export * from './components/GrCard';
11
11
  export * from './components/GrCheckbox';
12
12
  export * from './components/GrCheckboxGroup';
13
+ export * from './components/GrCodeBlock';
13
14
  export * from './components/GrCollapse';
14
15
  export * from './components/GrColorPicker';
15
16
  export * from './components/GrCommandPalette';
16
17
  export * from './components/GrConfigProvider';
17
18
  export * from './components/GrConfirmDialog';
18
19
  export * from './components/GrDataTable';
20
+ export * from './components/GrDelta';
21
+ export * from './components/GrDescriptionList';
19
22
  export * from './components/GrDialog';
20
23
  export * from './components/GrDialogService';
21
24
  export * from './components/GrDivider';
@@ -23,6 +26,7 @@ export * from './components/GrDrawer';
23
26
  export * from './components/GrDropdown';
24
27
  export * from './components/GrDropdownMenu';
25
28
  export * from './components/GrEmptyState';
29
+ export * from './components/GrFilePreview';
26
30
  export * from './components/GrFileUpload';
27
31
  export * from './components/GrForm';
28
32
  export * from './components/GrFormField';