@feugene/granularity 0.11.0 → 0.12.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 (189) hide show
  1. package/dist/GrTree.css +1 -1
  2. package/dist/chunks/config-1uSYl98Y2.js.map +1 -0
  3. package/dist/chunks/config-BIRO0vDJ.js.map +1 -0
  4. package/dist/chunks/config-BWiPnygb.js +5 -0
  5. package/dist/chunks/config-BWiPnygb.js.map +1 -0
  6. package/dist/chunks/config-BXtAmU3s2.js.map +1 -0
  7. package/dist/chunks/config-CGHLoBlH.js.map +1 -0
  8. package/dist/chunks/config-CrG1XiE72.js.map +1 -0
  9. package/dist/chunks/config-DUcu1D682.js.map +1 -0
  10. package/dist/chunks/config-Dlm49Jp5.js +5 -0
  11. package/dist/chunks/config-Dlm49Jp5.js.map +1 -0
  12. package/dist/chunks/config-DnvPqu4g2.js.map +1 -0
  13. package/dist/chunks/config-DpqOnJiz.js.map +1 -0
  14. package/dist/chunks/config-JpHA4Xx02.js.map +1 -0
  15. package/dist/chunks/config-LGrZIdaZ.js.map +1 -0
  16. package/dist/chunks/config-eXB87DOi2.js +9 -0
  17. package/dist/chunks/config-eXB87DOi2.js.map +1 -0
  18. package/dist/chunks/context-DdNIxa1w.js +9 -0
  19. package/dist/chunks/context-DdNIxa1w.js.map +1 -0
  20. package/dist/chunks/{en-BdtiS2d3.js → en-CfkDa4GX.js} +8 -2
  21. package/dist/chunks/{en-BdtiS2d3.js.map → en-CfkDa4GX.js.map} +1 -1
  22. package/dist/chunks/{es-DBhctWg-.js → es-CgaLnFYx.js} +3 -3
  23. package/dist/chunks/{es-DBhctWg-.js.map → es-CgaLnFYx.js.map} +1 -1
  24. package/dist/chunks/{es-BGRMZbe9.js → es-FkgECuCm.js} +8 -2
  25. package/dist/chunks/{es-BGRMZbe9.js.map → es-FkgECuCm.js.map} +1 -1
  26. package/dist/chunks/grModalEscStack-BXk-9mv7.js +43 -0
  27. package/dist/chunks/grModalEscStack-BXk-9mv7.js.map +1 -0
  28. package/dist/chunks/{ru-BFCnOiML.js → ru-Bl8CxpEa.js} +8 -2
  29. package/dist/chunks/{ru-BFCnOiML.js.map → ru-Bl8CxpEa.js.map} +1 -1
  30. package/dist/chunks/{shared-ChvcQgDl.js → shared-B6Ay2081.js} +17 -11
  31. package/dist/chunks/shared-B6Ay2081.js.map +1 -0
  32. package/dist/chunks/{transition-TLFw4KBn.js → useScrollLock-K7kaP2Ud.js} +52 -1
  33. package/dist/chunks/useScrollLock-K7kaP2Ud.js.map +1 -0
  34. package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BWYKCsHd.js → GrConfirmDialog-D8CkOtqv.js} +1 -1
  35. package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BWYKCsHd.js.map → GrConfirmDialog-D8CkOtqv.js.map} +1 -1
  36. package/dist/components/GrConfirmDialog/index.js +2 -2
  37. package/dist/components/GrDataTable/chunks/{GrDataTable-ptbARmJ3.js → GrDataTable-Ds5OeGat.js} +42 -16
  38. package/dist/components/GrDataTable/chunks/GrDataTable-Ds5OeGat.js.map +1 -0
  39. package/dist/components/GrDataTable/index.js +1 -1
  40. package/dist/components/GrDialog/chunks/{GrDialog-5DAS-1Lb.js → GrDialog-Ctucxju9.js} +2 -2
  41. package/dist/components/GrDialog/chunks/{GrDialog-5DAS-1Lb.js.map → GrDialog-Ctucxju9.js.map} +1 -1
  42. package/dist/components/GrDialog/index.js +1 -1
  43. package/dist/components/GrDialogService/chunks/{GrDialogService-DY_fmaMu.js → GrDialogService-CU1Fbonc.js} +2 -2
  44. package/dist/components/GrDialogService/chunks/{GrDialogService-DY_fmaMu.js.map → GrDialogService-CU1Fbonc.js.map} +1 -1
  45. package/dist/components/GrDialogService/index.js +1 -1
  46. package/dist/components/GrDivider/chunks/GrDivider-5bcE-BB4.js +54 -0
  47. package/dist/components/GrDivider/chunks/GrDivider-5bcE-BB4.js.map +1 -0
  48. package/dist/components/GrDivider/index.js +3 -0
  49. package/dist/components/GrDrawer/chunks/{GrDrawer-D1kzsjXN.js → GrDrawer-SLGKCY2A.js} +37 -13
  50. package/dist/components/GrDrawer/chunks/GrDrawer-SLGKCY2A.js.map +1 -0
  51. package/dist/components/GrDrawer/index.js +2 -2
  52. package/dist/components/GrDropdown/chunks/{GrDropdown-BXb5Cxxf.js → GrDropdown-BnDMYP8v.js} +90 -4
  53. package/dist/components/GrDropdown/chunks/GrDropdown-BnDMYP8v.js.map +1 -0
  54. package/dist/components/GrDropdown/index.js +1 -1
  55. package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-DFEJLPcV.js → GrDropdownMenu--g9Vofcq.js} +1 -1
  56. package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-DFEJLPcV.js.map → GrDropdownMenu--g9Vofcq.js.map} +1 -1
  57. package/dist/components/GrDropdownMenu/index.js +1 -1
  58. package/dist/components/GrFormField/chunks/GrFormField-DnfMHx_U.js +73 -0
  59. package/dist/components/GrFormField/chunks/GrFormField-DnfMHx_U.js.map +1 -0
  60. package/dist/components/GrFormField/index.js +3 -2
  61. package/dist/components/GrImageViewer/chunks/{GrImageViewer-OCUIrNh2.js → GrImageViewer-Dla9IBkd.js} +311 -222
  62. package/dist/components/GrImageViewer/chunks/GrImageViewer-Dla9IBkd.js.map +1 -0
  63. package/dist/components/GrImageViewer/index.js +1 -1
  64. package/dist/components/GrInput/chunks/GrInput-B8dd3JaA.js +334 -0
  65. package/dist/components/GrInput/chunks/GrInput-B8dd3JaA.js.map +1 -0
  66. package/dist/components/GrInput/index.js +1 -1
  67. package/dist/components/GrKbd/chunks/GrKbd-BEoYxWhE.js +22 -0
  68. package/dist/components/GrKbd/chunks/GrKbd-BEoYxWhE.js.map +1 -0
  69. package/dist/components/GrKbd/index.js +3 -0
  70. package/dist/components/GrModal/chunks/{GrModal-BkjW9jZS.js → GrModal-C0GZrHN3.js} +3 -56
  71. package/dist/components/GrModal/chunks/GrModal-C0GZrHN3.js.map +1 -0
  72. package/dist/components/GrModal/index.js +1 -1
  73. package/dist/components/GrNumberInput/chunks/{GrNumberInput-CldPIWQx.js → GrNumberInput-DxCEvL7V.js} +93 -11
  74. package/dist/components/GrNumberInput/chunks/GrNumberInput-DxCEvL7V.js.map +1 -0
  75. package/dist/components/GrNumberInput/index.js +1 -1
  76. package/dist/components/GrPagination/chunks/{GrPagination-Bu9wv6it.js → GrPagination-mlyfLjQY.js} +1 -1
  77. package/dist/components/GrPagination/chunks/{GrPagination-Bu9wv6it.js.map → GrPagination-mlyfLjQY.js.map} +1 -1
  78. package/dist/components/GrPagination/index.js +2 -2
  79. package/dist/components/GrProgressBar/index.js +1 -1
  80. package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-TmWXbpEP.js → GrPromptDialog-C-_BMNuY.js} +3 -3
  81. package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-TmWXbpEP.js.map → GrPromptDialog-C-_BMNuY.js.map} +1 -1
  82. package/dist/components/GrPromptDialog/index.js +1 -1
  83. package/dist/components/GrRadio/chunks/{GrRadio-CPTixXaY.js → GrRadio-Dr-pvs_9.js} +1 -1
  84. package/dist/components/GrRadio/chunks/{GrRadio-CPTixXaY.js.map → GrRadio-Dr-pvs_9.js.map} +1 -1
  85. package/dist/components/GrRadio/index.js +2 -2
  86. package/dist/components/GrRadioGroup/chunks/{GrRadioGroup-vKZCbkCp.js → GrRadioGroup-nOdvfV_g.js} +1 -1
  87. package/dist/components/GrRadioGroup/chunks/{GrRadioGroup-vKZCbkCp.js.map → GrRadioGroup-nOdvfV_g.js.map} +1 -1
  88. package/dist/components/GrRadioGroup/index.js +1 -1
  89. package/dist/components/GrSelect/chunks/{GrSelect-RShK21lK.js → GrSelect-BVCmitqa.js} +147 -27
  90. package/dist/components/GrSelect/chunks/GrSelect-BVCmitqa.js.map +1 -0
  91. package/dist/components/GrSelect/index.js +1 -1
  92. package/dist/components/GrSidebar/index.js +1 -1
  93. package/dist/components/GrTabPanels/chunks/GrTabPanels-DbKybwe-.js +68 -0
  94. package/dist/components/GrTabPanels/chunks/GrTabPanels-DbKybwe-.js.map +1 -0
  95. package/dist/components/GrTabPanels/index.js +3 -0
  96. package/dist/components/GrTabs/chunks/{GrTabs-Z-FDJUr_.js → GrTabs-DsLwWoRz.js} +6 -1
  97. package/dist/components/GrTabs/chunks/GrTabs-DsLwWoRz.js.map +1 -0
  98. package/dist/components/GrTabs/index.js +1 -1
  99. package/dist/components/GrTextarea/chunks/{GrTextarea-D56YxhKq.js → GrTextarea-CKukGlNl.js} +15 -5
  100. package/dist/components/GrTextarea/chunks/GrTextarea-CKukGlNl.js.map +1 -0
  101. package/dist/components/GrTextarea/index.js +2 -2
  102. package/dist/components/GrToaster/chunks/{GrToaster-eI8YvnIo.js → GrToaster-L2cu6cSR.js} +1 -1
  103. package/dist/components/GrToaster/chunks/{GrToaster-eI8YvnIo.js.map → GrToaster-L2cu6cSR.js.map} +1 -1
  104. package/dist/components/GrToaster/index.js +2 -2
  105. package/dist/components/GrTree/chunks/{GrTree-D3ODe2dB.js → GrTree-B2_yW6g1.js} +107 -8
  106. package/dist/components/GrTree/chunks/GrTree-B2_yW6g1.js.map +1 -0
  107. package/dist/components/GrTree/index.js +2 -2
  108. package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-B2xBKs5Q.js → GrTreeSelect-0aM62xyu.js} +3 -3
  109. package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-B2xBKs5Q.js.map → GrTreeSelect-0aM62xyu.js.map} +1 -1
  110. package/dist/components/GrTreeSelect/index.js +2 -2
  111. package/dist/granular-provider-node.js +2 -2
  112. package/dist/granular-provider.js +1 -1
  113. package/dist/i18n/all.js +1 -1
  114. package/dist/i18n/index.js +1 -1
  115. package/dist/index.js +40 -33
  116. package/dist/index.js.map +1 -1
  117. package/dist/styles/base.css +30 -8
  118. package/dist/styles/preflight.css +5 -1
  119. package/dist/types/src/components/GrDataTable/GrDataTable.vue.d.ts +28 -4
  120. package/dist/types/src/components/GrDivider/GrDivider.vue.d.ts +58 -0
  121. package/dist/types/src/components/GrDivider/config.d.ts +1 -0
  122. package/dist/types/src/components/GrDivider/index.d.ts +4 -0
  123. package/dist/types/src/components/GrDrawer/GrDrawer.vue.d.ts +4 -4
  124. package/dist/types/src/components/GrDropdown/GrDropdown.vue.d.ts +7 -0
  125. package/dist/types/src/components/GrDropdownMenu/GrDropdownMenu.vue.d.ts +6 -0
  126. package/dist/types/src/components/GrFormField/GrFormField.vue.d.ts +15 -2
  127. package/dist/types/src/components/GrFormField/context.d.ts +20 -0
  128. package/dist/types/src/components/GrFormField/index.d.ts +1 -0
  129. package/dist/types/src/components/GrImageViewer/GrImageViewer.vue.d.ts +4 -0
  130. package/dist/types/src/components/GrImageViewer/composables/useViewerKeyboard.d.ts +20 -0
  131. package/dist/types/src/components/GrImageViewer/composables/useWheelGesture.d.ts +16 -0
  132. package/dist/types/src/components/GrImageViewer/composables/useZoomPan.d.ts +50 -0
  133. package/dist/types/src/components/GrInput/GrInput.vue.d.ts +41 -2
  134. package/dist/types/src/components/GrKbd/GrKbd.vue.d.ts +46 -0
  135. package/dist/types/src/components/GrKbd/config.d.ts +1 -0
  136. package/dist/types/src/components/GrKbd/index.d.ts +4 -0
  137. package/dist/types/src/components/GrNumberInput/GrNumberInput.vue.d.ts +16 -0
  138. package/dist/types/src/components/GrSelect/GrSelect.vue.d.ts +2 -2
  139. package/dist/types/src/components/GrTabPanels/GrTabPanel.vue.d.ts +46 -0
  140. package/dist/types/src/components/GrTabPanels/GrTabPanels.vue.d.ts +51 -0
  141. package/dist/types/src/components/GrTabPanels/config.d.ts +5 -0
  142. package/dist/types/src/components/GrTabPanels/context.d.ts +9 -0
  143. package/dist/types/src/components/GrTabPanels/index.d.ts +6 -0
  144. package/dist/types/src/components/GrTabs/GrTabs.vue.d.ts +6 -0
  145. package/dist/types/src/components/GrTree/grTreeInteractionContext.d.ts +2 -0
  146. package/dist/types/src/composables/internal/useScrollLock.d.ts +24 -0
  147. package/dist/types/src/granular-provider/shared.d.ts +3 -0
  148. package/dist/types/src/i18n/messages/en.d.ts +10 -0
  149. package/dist/types/src/i18n/messages/es.d.ts +10 -0
  150. package/dist/types/src/i18n/messages/ru.d.ts +10 -0
  151. package/dist/types/src/index.d.ts +3 -0
  152. package/dist/web-types.json +275 -26
  153. package/package.json +13 -1
  154. package/dist/chunks/config-1uSYl98Y.js.map +0 -1
  155. package/dist/chunks/config-BIRO0vDJ2.js.map +0 -1
  156. package/dist/chunks/config-BXtAmU3s.js.map +0 -1
  157. package/dist/chunks/config-CGHLoBlH2.js.map +0 -1
  158. package/dist/chunks/config-CrG1XiE7.js.map +0 -1
  159. package/dist/chunks/config-DUcu1D68.js.map +0 -1
  160. package/dist/chunks/config-DnvPqu4g.js.map +0 -1
  161. package/dist/chunks/config-DpqOnJiz2.js.map +0 -1
  162. package/dist/chunks/config-JpHA4Xx0.js.map +0 -1
  163. package/dist/chunks/config-LGrZIdaZ2.js.map +0 -1
  164. package/dist/chunks/shared-ChvcQgDl.js.map +0 -1
  165. package/dist/chunks/transition-TLFw4KBn.js.map +0 -1
  166. package/dist/components/GrDataTable/chunks/GrDataTable-ptbARmJ3.js.map +0 -1
  167. package/dist/components/GrDrawer/chunks/GrDrawer-D1kzsjXN.js.map +0 -1
  168. package/dist/components/GrDropdown/chunks/GrDropdown-BXb5Cxxf.js.map +0 -1
  169. package/dist/components/GrFormField/chunks/GrFormField-BujNQrw8.js +0 -35
  170. package/dist/components/GrFormField/chunks/GrFormField-BujNQrw8.js.map +0 -1
  171. package/dist/components/GrImageViewer/chunks/GrImageViewer-OCUIrNh2.js.map +0 -1
  172. package/dist/components/GrInput/chunks/GrInput-C8pOJgCi.js +0 -188
  173. package/dist/components/GrInput/chunks/GrInput-C8pOJgCi.js.map +0 -1
  174. package/dist/components/GrModal/chunks/GrModal-BkjW9jZS.js.map +0 -1
  175. package/dist/components/GrNumberInput/chunks/GrNumberInput-CldPIWQx.js.map +0 -1
  176. package/dist/components/GrSelect/chunks/GrSelect-RShK21lK.js.map +0 -1
  177. package/dist/components/GrTabs/chunks/GrTabs-Z-FDJUr_.js.map +0 -1
  178. package/dist/components/GrTextarea/chunks/GrTextarea-D56YxhKq.js.map +0 -1
  179. package/dist/components/GrTree/chunks/GrTree-D3ODe2dB.js.map +0 -1
  180. /package/dist/chunks/{config-1uSYl98Y.js → config-1uSYl98Y2.js} +0 -0
  181. /package/dist/chunks/{config-BIRO0vDJ2.js → config-BIRO0vDJ.js} +0 -0
  182. /package/dist/chunks/{config-BXtAmU3s.js → config-BXtAmU3s2.js} +0 -0
  183. /package/dist/chunks/{config-CGHLoBlH2.js → config-CGHLoBlH.js} +0 -0
  184. /package/dist/chunks/{config-CrG1XiE7.js → config-CrG1XiE72.js} +0 -0
  185. /package/dist/chunks/{config-DUcu1D68.js → config-DUcu1D682.js} +0 -0
  186. /package/dist/chunks/{config-DnvPqu4g.js → config-DnvPqu4g2.js} +0 -0
  187. /package/dist/chunks/{config-DpqOnJiz2.js → config-DpqOnJiz.js} +0 -0
  188. /package/dist/chunks/{config-JpHA4Xx0.js → config-JpHA4Xx02.js} +0 -0
  189. /package/dist/chunks/{config-LGrZIdaZ2.js → config-LGrZIdaZ.js} +0 -0
@@ -0,0 +1,50 @@
1
+ import { type Ref } from 'vue';
2
+ export declare function formatPercent(value: number): string;
3
+ export interface UseZoomPanOptions {
4
+ minScale: () => number;
5
+ maxScale: () => number;
6
+ zoomRate: () => number;
7
+ draggable: () => boolean;
8
+ /** Ссылка на `<img>` — для измерения layout-размера и подписки ResizeObserver. */
9
+ imageEl: Ref<HTMLImageElement | null>;
10
+ /** Колбэк на поворот (эмит `rotate`). */
11
+ onRotate: (deg: number) => void;
12
+ }
13
+ /**
14
+ * useZoomPan — состояние и логика масштаба/поворота/панорамирования картинки,
15
+ * а также метрики (натуральный/вписанный/фактический размер, реальный масштаб).
16
+ * Вынесено из монолитного `GrImageViewer.vue`.
17
+ */
18
+ export declare function useZoomPan(options: UseZoomPanOptions): {
19
+ scale: Ref<number, number>;
20
+ rotation: Ref<number, number>;
21
+ offsetX: Ref<number, number>;
22
+ offsetY: Ref<number, number>;
23
+ isDragging: Ref<boolean, boolean>;
24
+ naturalWidth: Ref<number, number>;
25
+ naturalHeight: Ref<number, number>;
26
+ fittedWidth: Ref<number, number>;
27
+ fittedHeight: Ref<number, number>;
28
+ imageStyle: import("vue").ComputedRef<{
29
+ transform: string;
30
+ }>;
31
+ zoomValueText: import("vue").ComputedRef<string>;
32
+ renderedWidth: import("vue").ComputedRef<number>;
33
+ renderedHeight: import("vue").ComputedRef<number>;
34
+ realScale: import("vue").ComputedRef<number>;
35
+ realScalePercent: import("vue").ComputedRef<string>;
36
+ setScale: (value: number) => void;
37
+ zoomIn: () => void;
38
+ zoomOut: () => void;
39
+ rotateLeft: () => void;
40
+ rotateRight: () => void;
41
+ resetTransform: () => void;
42
+ resetImageMetrics: () => void;
43
+ measureFitted: () => void;
44
+ onImageLoad: (event: Event) => void;
45
+ startObservingImage: () => void;
46
+ stopObservingImage: () => void;
47
+ onPointerDown: (event: PointerEvent) => void;
48
+ onPointerMove: (event: PointerEvent) => void;
49
+ onPointerUp: (event: PointerEvent) => void;
50
+ };
@@ -8,11 +8,26 @@ type __VLS_Props = {
8
8
  autocomplete?: string;
9
9
  inputmode?: InputHTMLAttributes['inputmode'];
10
10
  disabled?: boolean;
11
+ /** Только для чтения: значение видно и выделяемо, но не редактируется. */
12
+ readonly?: boolean;
11
13
  invalid?: boolean;
12
14
  state?: 'default' | 'success' | 'warning' | 'danger';
13
15
  name?: string;
14
16
  id?: string;
15
17
  size?: GrInputSize;
18
+ /** Показывать кнопку очистки, когда есть значение (и не disabled/readonly). */
19
+ clearable?: boolean;
20
+ /** i18n aria-label кнопки очистки. */
21
+ clearLabel?: string;
22
+ /** Ограничение длины + основа для счётчика символов. */
23
+ maxlength?: number;
24
+ /** Показывать счётчик символов (`len` или `len/maxlength`). */
25
+ showCount?: boolean;
26
+ /** Кнопка показать/скрыть пароль (только при `type="password"`). */
27
+ passwordToggle?: boolean;
28
+ /** i18n aria-label кнопки показать/скрыть пароль. */
29
+ passwordShowLabel?: string;
30
+ passwordHideLabel?: string;
16
31
  textAlign?: GrInputTextAlign;
17
32
  prefixMinWidth?: string;
18
33
  prefixMaxWidth?: string;
@@ -28,11 +43,11 @@ type __VLS_Props = {
28
43
  suffixFixed?: boolean;
29
44
  };
30
45
  declare function focus(): void;
31
- declare var __VLS_1: {}, __VLS_3: {};
46
+ declare var __VLS_1: {}, __VLS_18: {};
32
47
  type __VLS_Slots = {} & {
33
48
  prefix?: (props: typeof __VLS_1) => any;
34
49
  } & {
35
- suffix?: (props: typeof __VLS_3) => any;
50
+ suffix?: (props: typeof __VLS_18) => any;
36
51
  };
37
52
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
38
53
  type: string;
@@ -40,11 +55,19 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
40
55
  autocomplete: undefined;
41
56
  inputmode: undefined;
42
57
  disabled: boolean;
58
+ readonly: boolean;
43
59
  invalid: boolean;
44
60
  state: string;
45
61
  name: undefined;
46
62
  id: undefined;
47
63
  size: string;
64
+ clearable: boolean;
65
+ clearLabel: undefined;
66
+ maxlength: undefined;
67
+ showCount: boolean;
68
+ passwordToggle: boolean;
69
+ passwordShowLabel: undefined;
70
+ passwordHideLabel: undefined;
48
71
  textAlign: string;
49
72
  prefixMinWidth: undefined;
50
73
  prefixMaxWidth: undefined;
@@ -62,11 +85,19 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
62
85
  autocomplete: undefined;
63
86
  inputmode: undefined;
64
87
  disabled: boolean;
88
+ readonly: boolean;
65
89
  invalid: boolean;
66
90
  state: string;
67
91
  name: undefined;
68
92
  id: undefined;
69
93
  size: string;
94
+ clearable: boolean;
95
+ clearLabel: undefined;
96
+ maxlength: undefined;
97
+ showCount: boolean;
98
+ passwordToggle: boolean;
99
+ passwordShowLabel: undefined;
100
+ passwordHideLabel: undefined;
70
101
  textAlign: string;
71
102
  prefixMinWidth: undefined;
72
103
  prefixMaxWidth: undefined;
@@ -77,6 +108,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
77
108
  }>>> & Readonly<{
78
109
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
79
110
  }>, {
111
+ readonly: boolean;
80
112
  type: "text" | "email" | "password" | "number" | "search";
81
113
  size: GrInputSize;
82
114
  disabled: boolean;
@@ -87,6 +119,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
87
119
  placeholder: string;
88
120
  autocomplete: string;
89
121
  state: "default" | "success" | "warning" | "danger";
122
+ clearable: boolean;
123
+ clearLabel: string;
124
+ maxlength: number;
125
+ showCount: boolean;
126
+ passwordToggle: boolean;
127
+ passwordShowLabel: string;
128
+ passwordHideLabel: string;
90
129
  textAlign: GrInputTextAlign;
91
130
  prefixMinWidth: string;
92
131
  prefixMaxWidth: string;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * GrKbd — GR-примитив для отображения клавиш/сочетаний (`<kbd>`).
3
+ *
4
+ * Пример: `<GrKbd>⌘</GrKbd> <GrKbd>K</GrKbd>`.
5
+ */
6
+ export type GrKbdSize = 'sm' | 'md';
7
+ type __VLS_Props = {
8
+ size?: GrKbdSize;
9
+ };
10
+ declare var __VLS_1: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_1) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
15
+ size: string;
16
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
17
+ size: string;
18
+ }>>> & Readonly<{}>, {
19
+ size: GrKbdSize;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_TypePropsToOption<T> = {
25
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
26
+ type: import('vue').PropType<Required<T>[K]>;
27
+ } : {
28
+ type: import('vue').PropType<T[K]>;
29
+ required: true;
30
+ };
31
+ };
32
+ type __VLS_WithDefaults<P, D> = {
33
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
34
+ default: D[K];
35
+ }> : P[K];
36
+ };
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
42
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
43
+ [K in keyof T]: T[K];
44
+ } : {
45
+ [K in keyof T as K]: T[K];
46
+ }) & {};
@@ -0,0 +1 @@
1
+ export declare const grKbdConfig: import("@feugene/unocss-preset-granular").GranularComponentDescriptor<"GrKbd">;
@@ -0,0 +1,4 @@
1
+ export { default } from './GrKbd.vue';
2
+ export { default as GrKbd } from './GrKbd.vue';
3
+ export type { GrKbdSize } from './GrKbd.vue';
4
+ export { grKbdConfig } from './config';
@@ -19,6 +19,16 @@ export interface GrNumberInputProps {
19
19
  min?: number;
20
20
  max?: number;
21
21
  precision?: number;
22
+ /**
23
+ * BCP-47 локаль для отображения значения (группировка разрядов и разделители
24
+ * через `Intl.NumberFormat`). Работает вместе с `useGrouping`.
25
+ */
26
+ locale?: string;
27
+ /**
28
+ * Группировать разряды при отображении (когда поле не в фокусе). При фокусе
29
+ * показывается «сырое» значение для редактирования. По умолчанию выключено.
30
+ */
31
+ useGrouping?: boolean;
22
32
  /** Показывать кнопки +/-. */
23
33
  controls?: boolean;
24
34
  controlsDirection?: GrNumberInputControlsDirection;
@@ -61,6 +71,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
61
71
  min: undefined;
62
72
  max: undefined;
63
73
  precision: undefined;
74
+ locale: undefined;
75
+ useGrouping: boolean;
64
76
  controls: boolean;
65
77
  controlsDirection: string;
66
78
  prefixMinWidth: undefined;
@@ -92,6 +104,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
92
104
  min: undefined;
93
105
  max: undefined;
94
106
  precision: undefined;
107
+ locale: undefined;
108
+ useGrouping: boolean;
95
109
  controls: boolean;
96
110
  controlsDirection: string;
97
111
  prefixMinWidth: undefined;
@@ -127,6 +141,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
127
141
  decimalSeparator: string;
128
142
  step: number;
129
143
  precision: number;
144
+ locale: string;
145
+ useGrouping: boolean;
130
146
  controls: boolean;
131
147
  controlsDirection: GrNumberInputControlsDirection;
132
148
  increaseLabel: string;
@@ -102,6 +102,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
102
102
  disabled: boolean;
103
103
  ariaLabel: string;
104
104
  placeholder: string;
105
+ clearable: boolean;
106
+ clearLabel: string;
105
107
  options: GrSelectOptionOrGroup[];
106
108
  underline: GrSelectUnderline;
107
109
  multiple: boolean;
@@ -110,8 +112,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
110
112
  customValuePlaceholder: string;
111
113
  dropdownMaxHeight: number;
112
114
  closeOnSelect: boolean;
113
- clearable: boolean;
114
- clearLabel: string;
115
115
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
116
116
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
117
117
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * GrTabPanel — одна панель внутри `GrTabPanels`. Показывается, когда её `value`
3
+ * равно активной вкладке. `keepAlive` оставляет неактивные панели в DOM
4
+ * (скрытыми через `hidden`) — полезно, чтобы не терять состояние форм.
5
+ */
6
+ type __VLS_Props = {
7
+ value: string;
8
+ keepAlive?: boolean;
9
+ };
10
+ declare var __VLS_1: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_1) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
15
+ keepAlive: boolean;
16
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
17
+ keepAlive: boolean;
18
+ }>>> & Readonly<{}>, {
19
+ keepAlive: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_TypePropsToOption<T> = {
25
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
26
+ type: import('vue').PropType<Required<T>[K]>;
27
+ } : {
28
+ type: import('vue').PropType<T[K]>;
29
+ required: true;
30
+ };
31
+ };
32
+ type __VLS_WithDefaults<P, D> = {
33
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
34
+ default: D[K];
35
+ }> : P[K];
36
+ };
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
42
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
43
+ [K in keyof T]: T[K];
44
+ } : {
45
+ [K in keyof T as K]: T[K];
46
+ }) & {};
@@ -0,0 +1,51 @@
1
+ /**
2
+ * GrTabPanels — контейнер `tabpanel`-ов, companion к `GrTabs`.
3
+ *
4
+ * Показывает панель, чьё `value` совпадает с `modelValue`, и связывает её с
5
+ * соответствующей вкладкой по ARIA (`role="tabpanel"`, `aria-labelledby`).
6
+ *
7
+ * Для полной связки `tab`↔`tabpanel` передайте **одинаковый `idBase`** и в
8
+ * `GrTabs`, и в `GrTabPanels` — тогда id вкладок и панелей совпадут
9
+ * (`aria-controls` ↔ `aria-labelledby`).
10
+ */
11
+ type __VLS_Props = {
12
+ modelValue: string;
13
+ idBase?: string;
14
+ };
15
+ declare var __VLS_1: {};
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_1) => any;
18
+ };
19
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
20
+ idBase: undefined;
21
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
22
+ idBase: undefined;
23
+ }>>> & Readonly<{}>, {
24
+ idBase: string;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_TypePropsToOption<T> = {
30
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
31
+ type: import('vue').PropType<Required<T>[K]>;
32
+ } : {
33
+ type: import('vue').PropType<T[K]>;
34
+ required: true;
35
+ };
36
+ };
37
+ type __VLS_WithDefaults<P, D> = {
38
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
39
+ default: D[K];
40
+ }> : P[K];
41
+ };
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
47
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
48
+ [K in keyof T]: T[K];
49
+ } : {
50
+ [K in keyof T as K]: T[K];
51
+ }) & {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Granular-конфиг семейства `GrTabPanels` (контейнер `GrTabPanels` + панель
3
+ * `GrTabPanel`). Companion к `GrTabs` для ARIA-связки `tab`↔`tabpanel`.
4
+ */
5
+ export declare const grTabPanelsConfig: import("@feugene/unocss-preset-granular").GranularComponentDescriptor<"GrTabPanels">;
@@ -0,0 +1,9 @@
1
+ import type { ComputedRef, InjectionKey } from 'vue';
2
+ /** Контекст, который `GrTabPanels` предоставляет своим `GrTabPanel`. */
3
+ export interface GrTabPanelsContext {
4
+ /** Значение активной вкладки (совпадает с `modelValue` у `GrTabs`). */
5
+ activeValue: ComputedRef<string>;
6
+ /** Общая база id для связки `tab`↔`tabpanel` (см. проп `idBase` у `GrTabs`). */
7
+ idBase: string;
8
+ }
9
+ export declare const GR_TAB_PANELS_KEY: InjectionKey<GrTabPanelsContext>;
@@ -0,0 +1,6 @@
1
+ export { default } from './GrTabPanels.vue';
2
+ export { default as GrTabPanels } from './GrTabPanels.vue';
3
+ export { default as GrTabPanel } from './GrTabPanel.vue';
4
+ export type { GrTabPanelsContext } from './context';
5
+ export { GR_TAB_PANELS_KEY } from './context';
6
+ export { grTabPanelsConfig } from './config';
@@ -7,6 +7,12 @@ export type GrTab = {
7
7
  export type GrTabsProps = {
8
8
  modelValue: string;
9
9
  tabs: GrTab[];
10
+ /**
11
+ * База id для ARIA-связки с `GrTabPanels`. Если задана, каждая вкладка
12
+ * получает `id="<idBase>-tab-<value>"` и `aria-controls="<idBase>-panel-<value>"`.
13
+ * Передайте тот же `idBase` в `GrTabPanels`, чтобы связать `tab`↔`tabpanel`.
14
+ */
15
+ idBase?: string;
10
16
  };
11
17
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<GrTabsProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
18
  "update:modelValue": (value: string) => void;
@@ -18,6 +18,8 @@ export type GrTreeInteractionEmitters<T> = {
18
18
  };
19
19
  export type GrTreeInteractionContext<T> = {
20
20
  hoveredKey: Ref<GrTreeKey | undefined>;
21
+ /** Клавиша узла, держащего roving-фокус (единственный tabindex=0 во всём дереве). */
22
+ focusedKey: Ref<GrTreeKey | undefined>;
21
23
  draggingNode: ShallowRef<GrTreeNode<T> | null>;
22
24
  dropTarget: ShallowRef<GrTreeDropTarget | null>;
23
25
  canDrag: (node: GrTreeNode<T>) => boolean;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * useScrollLock — общий **reference-counted** lock скролла `<body>` для оверлеев
3
+ * (GrModal, GrDrawer, GrImageViewer).
4
+ *
5
+ * Зачем счётчик: раньше каждый оверлей хранил `savedBodyOverflow` per-instance и
6
+ * восстанавливал `overflow` при СВОЁМ закрытии. Если открыты A, затем B, и первым
7
+ * закрывают A — body получал `overflow: ''` при ещё открытой B (баг LIFO).
8
+ * Здесь состояние `<body>` сохраняется один раз (при переходе счётчика 0→1) и
9
+ * восстанавливается только когда закрыт последний оверлей (счётчик 1→0).
10
+ *
11
+ * Плюс компенсация ширины скроллбара: при `overflow: hidden` скроллбар исчезает и
12
+ * контент дёргается вправо — добавляем `padding-right` на его ширину.
13
+ */
14
+ /**
15
+ * Возвращает пару `lock`/`unlock`, идемпотентную **в пределах одного инстанса**
16
+ * (повторный `lock()` без `unlock()` не увеличивает глобальный счётчик дважды).
17
+ * Глобальный счётчик разделяется всеми оверлеями.
18
+ */
19
+ export declare function useScrollLock(): {
20
+ lock: () => void;
21
+ unlock: () => void;
22
+ };
23
+ /** Тестовая/служебная очистка глобального состояния. */
24
+ export declare function resetScrollLock(): void;
@@ -34,6 +34,7 @@ export declare const granularityComponentConfigs: {
34
34
  GrDataTable: GranularComponentDescriptor<"GrDataTable">;
35
35
  GrDialog: GranularComponentDescriptor<"GrDialog">;
36
36
  GrDialogService: GranularComponentDescriptor<"GrDialogServiceHost">;
37
+ GrDivider: GranularComponentDescriptor<"GrDivider">;
37
38
  GrDrawer: GranularComponentDescriptor<"GrDrawer">;
38
39
  GrDropdown: GranularComponentDescriptor<"GrDropdown">;
39
40
  GrDropdownMenu: GranularComponentDescriptor<"GrDropdownMenu">;
@@ -46,6 +47,7 @@ export declare const granularityComponentConfigs: {
46
47
  GrImageViewer: GranularComponentDescriptor<"GrImageViewer">;
47
48
  GrInput: GranularComponentDescriptor<"GrInput">;
48
49
  GrInputTag: GranularComponentDescriptor<"GrInputTag">;
50
+ GrKbd: GranularComponentDescriptor<"GrKbd">;
49
51
  GrLink: GranularComponentDescriptor<"GrLink">;
50
52
  GrList: GranularComponentDescriptor<"GrList">;
51
53
  GrLoading: GranularComponentDescriptor<"GrLoading">;
@@ -64,6 +66,7 @@ export declare const granularityComponentConfigs: {
64
66
  GrSkeleton: GranularComponentDescriptor<"GrSkeleton">;
65
67
  GrSwitch: GranularComponentDescriptor<"GrSwitch">;
66
68
  GrTable: GranularComponentDescriptor<"GrTable">;
69
+ GrTabPanels: GranularComponentDescriptor<"GrTabPanels">;
67
70
  GrTabs: GranularComponentDescriptor<"GrTabs">;
68
71
  GrTextarea: GranularComponentDescriptor<"GrTextarea">;
69
72
  GrToaster: GranularComponentDescriptor<"GrToaster">;
@@ -133,6 +133,11 @@ export declare const en: {
133
133
  serverTitle: string;
134
134
  serverMessage: string;
135
135
  };
136
+ input: {
137
+ clear: string;
138
+ showPassword: string;
139
+ hidePassword: string;
140
+ };
136
141
  };
137
142
  common: {
138
143
  confirm: string;
@@ -258,6 +263,11 @@ export declare const en: {
258
263
  serverTitle: string;
259
264
  serverMessage: string;
260
265
  };
266
+ input: {
267
+ clear: string;
268
+ showPassword: string;
269
+ hidePassword: string;
270
+ };
261
271
  }>;
262
272
  };
263
273
  };
@@ -126,6 +126,11 @@ export declare const es: {
126
126
  serverTitle: string;
127
127
  serverMessage: string;
128
128
  };
129
+ input: {
130
+ clear: string;
131
+ showPassword: string;
132
+ hidePassword: string;
133
+ };
129
134
  };
130
135
  common: {
131
136
  confirm: string;
@@ -251,6 +256,11 @@ export declare const es: {
251
256
  serverTitle: string;
252
257
  serverMessage: string;
253
258
  };
259
+ input: {
260
+ clear: string;
261
+ showPassword: string;
262
+ hidePassword: string;
263
+ };
254
264
  }>;
255
265
  };
256
266
  };
@@ -126,6 +126,11 @@ export declare const ru: {
126
126
  serverTitle: string;
127
127
  serverMessage: string;
128
128
  };
129
+ input: {
130
+ clear: string;
131
+ showPassword: string;
132
+ hidePassword: string;
133
+ };
129
134
  };
130
135
  common: {
131
136
  confirm: string;
@@ -251,6 +256,11 @@ export declare const ru: {
251
256
  serverTitle: string;
252
257
  serverMessage: string;
253
258
  };
259
+ input: {
260
+ clear: string;
261
+ showPassword: string;
262
+ hidePassword: string;
263
+ };
254
264
  }>;
255
265
  };
256
266
  };
@@ -12,6 +12,7 @@ export * from './components/GrConfirmDialog';
12
12
  export * from './components/GrDataTable';
13
13
  export * from './components/GrDialog';
14
14
  export * from './components/GrDialogService';
15
+ export * from './components/GrDivider';
15
16
  export * from './components/GrDrawer';
16
17
  export * from './components/GrDropdown';
17
18
  export * from './components/GrDropdownMenu';
@@ -24,6 +25,7 @@ export * from './components/GrIcon';
24
25
  export * from './components/GrImageViewer';
25
26
  export * from './components/GrInput';
26
27
  export * from './components/GrInputTag';
28
+ export * from './components/GrKbd';
27
29
  export * from './components/GrLink';
28
30
  export * from './components/GrList';
29
31
  export * from './components/GrLoading';
@@ -42,6 +44,7 @@ export * from './components/GrSidebar';
42
44
  export * from './components/GrSkeleton';
43
45
  export * from './components/GrSwitch';
44
46
  export * from './components/GrTable';
47
+ export * from './components/GrTabPanels';
45
48
  export * from './components/GrTabs';
46
49
  export * from './components/GrTextarea';
47
50
  export * from './components/GrToaster';