@maxhub/max-ui 0.5.0 → 0.7.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 (118) hide show
  1. package/dist/components/BottomSheet/BottomSheet.d.ts +16 -0
  2. package/dist/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  3. package/dist/components/BottomSheet/index.d.ts +2 -0
  4. package/dist/components/BottomSheet/index.d.ts.map +1 -0
  5. package/dist/components/ContextMenu/ContextMenu.d.ts +9 -0
  6. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -0
  7. package/dist/components/ContextMenu/context.d.ts +24 -0
  8. package/dist/components/ContextMenu/context.d.ts.map +1 -0
  9. package/dist/components/ContextMenu/helpers.d.ts +20 -0
  10. package/dist/components/ContextMenu/helpers.d.ts.map +1 -0
  11. package/dist/components/ContextMenu/index.d.ts +3 -0
  12. package/dist/components/ContextMenu/index.d.ts.map +1 -0
  13. package/dist/components/ContextMenu/parts/ContextMenuActionBar/ContextMenuActionBar.d.ts +9 -0
  14. package/dist/components/ContextMenu/parts/ContextMenuActionBar/ContextMenuActionBar.d.ts.map +1 -0
  15. package/dist/components/ContextMenu/parts/ContextMenuActionBar/index.d.ts +2 -0
  16. package/dist/components/ContextMenu/parts/ContextMenuActionBar/index.d.ts.map +1 -0
  17. package/dist/components/ContextMenu/parts/ContextMenuContent/ContextMenuContent.d.ts +4 -0
  18. package/dist/components/ContextMenu/parts/ContextMenuContent/ContextMenuContent.d.ts.map +1 -0
  19. package/dist/components/ContextMenu/parts/ContextMenuContent/index.d.ts +2 -0
  20. package/dist/components/ContextMenu/parts/ContextMenuContent/index.d.ts.map +1 -0
  21. package/dist/components/ContextMenu/parts/ContextMenuDivider/ContextMenuDivider.d.ts +7 -0
  22. package/dist/components/ContextMenu/parts/ContextMenuDivider/ContextMenuDivider.d.ts.map +1 -0
  23. package/dist/components/ContextMenu/parts/ContextMenuDivider/index.d.ts +2 -0
  24. package/dist/components/ContextMenu/parts/ContextMenuDivider/index.d.ts.map +1 -0
  25. package/dist/components/ContextMenu/parts/ContextMenuList/ContextMenuList.d.ts +11 -0
  26. package/dist/components/ContextMenu/parts/ContextMenuList/ContextMenuList.d.ts.map +1 -0
  27. package/dist/components/ContextMenu/parts/ContextMenuList/index.d.ts +2 -0
  28. package/dist/components/ContextMenu/parts/ContextMenuList/index.d.ts.map +1 -0
  29. package/dist/components/ContextMenu/parts/ContextMenuRow/ContextMenuRow.d.ts +14 -0
  30. package/dist/components/ContextMenu/parts/ContextMenuRow/ContextMenuRow.d.ts.map +1 -0
  31. package/dist/components/ContextMenu/parts/ContextMenuRow/index.d.ts +2 -0
  32. package/dist/components/ContextMenu/parts/ContextMenuRow/index.d.ts.map +1 -0
  33. package/dist/components/ContextMenu/parts/ContextMenuSubmenu/ContextMenuSubmenu.d.ts +20 -0
  34. package/dist/components/ContextMenu/parts/ContextMenuSubmenu/ContextMenuSubmenu.d.ts.map +1 -0
  35. package/dist/components/ContextMenu/parts/ContextMenuSubmenu/index.d.ts +2 -0
  36. package/dist/components/ContextMenu/parts/ContextMenuSubmenu/index.d.ts.map +1 -0
  37. package/dist/components/ContextMenu/parts/index.d.ts +7 -0
  38. package/dist/components/ContextMenu/parts/index.d.ts.map +1 -0
  39. package/dist/components/ContextMenu/types.d.ts +77 -0
  40. package/dist/components/ContextMenu/types.d.ts.map +1 -0
  41. package/dist/components/Segmented/Segmented.d.ts +14 -0
  42. package/dist/components/Segmented/Segmented.d.ts.map +1 -0
  43. package/dist/components/Segmented/index.d.ts +2 -0
  44. package/dist/components/Segmented/index.d.ts.map +1 -0
  45. package/dist/components/Select/Select.d.ts +3 -0
  46. package/dist/components/Select/Select.d.ts.map +1 -0
  47. package/dist/components/Select/context.d.ts +36 -0
  48. package/dist/components/Select/context.d.ts.map +1 -0
  49. package/dist/components/Select/helpers.d.ts +15 -0
  50. package/dist/components/Select/helpers.d.ts.map +1 -0
  51. package/dist/components/Select/hooks.d.ts +18 -0
  52. package/dist/components/Select/hooks.d.ts.map +1 -0
  53. package/dist/components/Select/index.d.ts +7 -0
  54. package/dist/components/Select/index.d.ts.map +1 -0
  55. package/dist/components/Select/parts/SelectContent/SelectContent.d.ts +13 -0
  56. package/dist/components/Select/parts/SelectContent/SelectContent.d.ts.map +1 -0
  57. package/dist/components/Select/parts/SelectContent/index.d.ts +2 -0
  58. package/dist/components/Select/parts/SelectContent/index.d.ts.map +1 -0
  59. package/dist/components/Select/parts/SelectEmpty/SelectEmpty.d.ts +4 -0
  60. package/dist/components/Select/parts/SelectEmpty/SelectEmpty.d.ts.map +1 -0
  61. package/dist/components/Select/parts/SelectEmpty/index.d.ts +2 -0
  62. package/dist/components/Select/parts/SelectEmpty/index.d.ts.map +1 -0
  63. package/dist/components/Select/parts/SelectField/SelectField.d.ts +22 -0
  64. package/dist/components/Select/parts/SelectField/SelectField.d.ts.map +1 -0
  65. package/dist/components/Select/parts/SelectField/index.d.ts +2 -0
  66. package/dist/components/Select/parts/SelectField/index.d.ts.map +1 -0
  67. package/dist/components/Select/parts/SelectOptionRow/SelectOptionRow.d.ts +12 -0
  68. package/dist/components/Select/parts/SelectOptionRow/SelectOptionRow.d.ts.map +1 -0
  69. package/dist/components/Select/parts/SelectOptionRow/index.d.ts +2 -0
  70. package/dist/components/Select/parts/SelectOptionRow/index.d.ts.map +1 -0
  71. package/dist/components/Select/parts/SelectOptions/SelectOptions.d.ts +5 -0
  72. package/dist/components/Select/parts/SelectOptions/SelectOptions.d.ts.map +1 -0
  73. package/dist/components/Select/parts/SelectOptions/index.d.ts +2 -0
  74. package/dist/components/Select/parts/SelectOptions/index.d.ts.map +1 -0
  75. package/dist/components/Select/parts/SelectSearch/SelectSearch.d.ts +5 -0
  76. package/dist/components/Select/parts/SelectSearch/SelectSearch.d.ts.map +1 -0
  77. package/dist/components/Select/parts/SelectSearch/index.d.ts +2 -0
  78. package/dist/components/Select/parts/SelectSearch/index.d.ts.map +1 -0
  79. package/dist/components/Select/types.d.ts +79 -0
  80. package/dist/components/Select/types.d.ts.map +1 -0
  81. package/dist/components/Snackbar/SnackbarContainer.d.ts +8 -0
  82. package/dist/components/Snackbar/SnackbarContainer.d.ts.map +1 -0
  83. package/dist/components/Snackbar/SnackbarItem.d.ts +7 -0
  84. package/dist/components/Snackbar/SnackbarItem.d.ts.map +1 -0
  85. package/dist/components/Snackbar/SnackbarProvider.d.ts +10 -0
  86. package/dist/components/Snackbar/SnackbarProvider.d.ts.map +1 -0
  87. package/dist/components/Snackbar/context.d.ts +3 -0
  88. package/dist/components/Snackbar/context.d.ts.map +1 -0
  89. package/dist/components/Snackbar/index.d.ts +5 -0
  90. package/dist/components/Snackbar/index.d.ts.map +1 -0
  91. package/dist/components/Snackbar/types.d.ts +38 -0
  92. package/dist/components/Snackbar/types.d.ts.map +1 -0
  93. package/dist/components/StatusBadge/StatusBadge.d.ts +8 -0
  94. package/dist/components/StatusBadge/StatusBadge.d.ts.map +1 -0
  95. package/dist/components/StatusBadge/index.d.ts +2 -0
  96. package/dist/components/StatusBadge/index.d.ts.map +1 -0
  97. package/dist/components/Steps/Steps.d.ts +7 -0
  98. package/dist/components/Steps/Steps.d.ts.map +1 -0
  99. package/dist/components/Steps/index.d.ts +2 -0
  100. package/dist/components/Steps/index.d.ts.map +1 -0
  101. package/dist/components/Tabs/Tabs.d.ts +16 -0
  102. package/dist/components/Tabs/Tabs.d.ts.map +1 -0
  103. package/dist/components/Tabs/index.d.ts +2 -0
  104. package/dist/components/Tabs/index.d.ts.map +1 -0
  105. package/dist/components/index.d.ts +8 -0
  106. package/dist/components/index.d.ts.map +1 -1
  107. package/dist/hooks/index.d.ts +2 -0
  108. package/dist/hooks/index.d.ts.map +1 -1
  109. package/dist/hooks/use-drag.d.ts +28 -0
  110. package/dist/hooks/use-drag.d.ts.map +1 -0
  111. package/dist/hooks/use-snackbar.d.ts +2 -0
  112. package/dist/hooks/use-snackbar.d.ts.map +1 -0
  113. package/dist/icons/index.d.ts +2 -1
  114. package/dist/icons/index.d.ts.map +1 -1
  115. package/dist/index.js +5 -1
  116. package/dist/index.js.map +1 -1
  117. package/dist/styles.css +1 -1
  118. package/package.json +2 -1
@@ -0,0 +1,16 @@
1
+ import { CSSProperties, type ReactNode } from 'react';
2
+ import { InnerClassNamesProp } from "../../types";
3
+ export type BottomSheetProps = {
4
+ open: boolean;
5
+ title?: string;
6
+ onClose: () => void;
7
+ children: ReactNode;
8
+ /**
9
+ * Минимальная высота шторки
10
+ */
11
+ minHeight?: CSSProperties['minHeight'];
12
+ innerClassNames?: InnerClassNamesProp<'overlay' | 'sheet' | 'handle' | 'header'>;
13
+ enableDrag?: boolean;
14
+ };
15
+ export declare const BottomSheet: ({ open, title, onClose, children, minHeight, innerClassNames, enableDrag }: BottomSheetProps) => import("react").JSX.Element | null;
16
+ //# sourceMappingURL=BottomSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AAG/F,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAIhD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,eAAe,CAAC,EAAE,mBAAmB,CAAC,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAA;IAChF,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAID,eAAO,MAAM,WAAW,GAAI,4EAEzB,gBAAgB,uCAmIlB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { BottomSheet, type BottomSheetProps } from './BottomSheet';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { type ContextMenuProps } from './types';
2
+ /**
3
+ * Дерево плавающих узлов: рут и все панели подменю регистрируются в нём,
4
+ * чтобы клики по порталу подменю не считались «outside press» для корневого меню.
5
+ * Хуки внутреннего компонента должны выполняться внутри провайдера,
6
+ * поэтому ContextMenu вынесен в отдельный wrapper.
7
+ */
8
+ export declare const ContextMenu: import("react").ForwardRefExoticComponent<ContextMenuProps & import("react").RefAttributes<HTMLElement>>;
9
+ //# sourceMappingURL=ContextMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAqJhD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,0GAItB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type UseInteractionsReturn } from '@floating-ui/react';
2
+ import { type InnerClassNamesProp } from '../../types';
3
+ import { type ContextMenuInnerElementKey, type ContextMenuResolvedMode } from './types';
4
+ export interface ContextMenuContextInterface {
5
+ /** Разрешённый режим: 'desktop' — подменю сбоку, 'mobile' — аккордеон */
6
+ mode: ContextMenuResolvedMode;
7
+ /** Закрыть всё меню целиком (вместе со всеми подменю) */
8
+ close: () => void;
9
+ innerClassNames?: InnerClassNamesProp<ContextMenuInnerElementKey>;
10
+ }
11
+ export declare const ContextMenuContext: import("react").Context<ContextMenuContextInterface>;
12
+ export declare const useContextMenu: () => ContextMenuContextInterface;
13
+ /**
14
+ * Контекст одного уровня меню — корневого или подменю.
15
+ * Каждый уровень держит собственный useListNavigation и раздаёт строкам
16
+ * пропсы для навигации стрелками и roving tabIndex.
17
+ */
18
+ export interface ContextMenuLevelInterface {
19
+ activeIndex: number | null;
20
+ getItemProps: UseInteractionsReturn['getItemProps'];
21
+ }
22
+ export declare const ContextMenuLevelContext: import("react").Context<ContextMenuLevelInterface>;
23
+ export declare const useContextMenuLevel: () => ContextMenuLevelInterface;
24
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAIhE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAExF,MAAM,WAAW,2BAA2B;IAC1C,yEAAyE;IACzE,IAAI,EAAE,uBAAuB,CAAA;IAC7B,yDAAyD;IACzD,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,eAAe,CAAC,EAAE,mBAAmB,CAAC,0BAA0B,CAAC,CAAA;CAClE;AAED,eAAO,MAAM,kBAAkB,sDAG7B,CAAC;AAEH,eAAO,MAAM,cAAc,QAAO,2BAA6D,CAAC;AAEhG;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,YAAY,EAAE,qBAAqB,CAAC,cAAc,CAAC,CAAA;CACpD;AAOD,eAAO,MAAM,uBAAuB,oDAAgE,CAAC;AAErG,eAAO,MAAM,mBAAmB,QAAO,yBAAgE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type ContextMenuMode, type ContextMenuOpenOn, type ContextMenuResolvedMode } from './types';
2
+ /** Задержка открытия вложенного меню при наведении на пункт (desktop) */
3
+ export declare const SUBMENU_OPEN_DELAY = 100;
4
+ /** Задержка закрытия вложенного меню — чтобы курсор успел переехать со строки на панель */
5
+ export declare const SUBMENU_CLOSE_DELAY = 300;
6
+ /** Задержки открытия/закрытия корневого меню при наведении на триггер */
7
+ export declare const TRIGGER_HOVER_DELAY: {
8
+ open: number;
9
+ close: number;
10
+ };
11
+ /** Отступ между триггером и корневым меню */
12
+ export declare const MENU_OFFSET = 4;
13
+ /** Отступ между строкой-родителем и вложенной панелью; с учётом inset строки 8px визуальный зазор между панелями — 8px */
14
+ export declare const SUBMENU_OFFSET = 16;
15
+ /** Отступ от краёв экрана при flip/shift — меню должно целиком помещаться на экране */
16
+ export declare const COLLISION_PADDING = 8;
17
+ export declare const normalizeOpenOn: (openOn: ContextMenuOpenOn | ContextMenuOpenOn[]) => ContextMenuOpenOn[];
18
+ /** Разрешает mode='auto' в 'mobile' для сенсорного указателя и 'desktop' иначе, с подпиской на изменения */
19
+ export declare const useResolvedMode: (mode: ContextMenuMode) => ContextMenuResolvedMode;
20
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAErG,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,2FAA2F;AAC3F,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,yEAAyE;AACzE,eAAO,MAAM,mBAAmB;;;CAA4B,CAAC;AAC7D,6CAA6C;AAC7C,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,0HAA0H;AAC1H,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,uFAAuF;AACvF,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,eAAO,MAAM,eAAe,GAAI,QAAQ,iBAAiB,GAAG,iBAAiB,EAAE,KAAG,iBAAiB,EAElG,CAAC;AAQF,4GAA4G;AAC5G,eAAO,MAAM,eAAe,GAAI,MAAM,eAAe,KAAG,uBAsBvD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ContextMenu } from './ContextMenu';
2
+ export type { ContextMenuActionBar, ContextMenuActionButton, ContextMenuInnerElementKey, ContextMenuItem, ContextMenuItemAction, ContextMenuItemMode, ContextMenuItemNested, ContextMenuMode, ContextMenuOpenOn, ContextMenuProps, ContextMenuResolvedMode } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACV,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { type ContextMenuActionBar as ContextMenuActionBarButtons } from '../../types';
2
+ export interface ContextMenuActionBarProps {
3
+ buttons: ContextMenuActionBarButtons;
4
+ }
5
+ export declare const ContextMenuActionBar: {
6
+ ({ buttons }: ContextMenuActionBarProps): import("react").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ //# sourceMappingURL=ContextMenuActionBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenuActionBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuActionBar/ContextMenuActionBar.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,oBAAoB,IAAI,2BAA2B,EAA+B,MAAM,aAAa,CAAC;AAIpH,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,2BAA2B,CAAA;CACrC;AAED,eAAO,MAAM,oBAAoB;kBAAiB,yBAAyB;;CAwC1E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ContextMenuActionBar, type ContextMenuActionBarProps } from './ContextMenuActionBar';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuActionBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ export type ContextMenuContentProps = HTMLAttributes<HTMLDivElement>;
3
+ export declare const ContextMenuContent: import("react").ForwardRefExoticComponent<ContextMenuContentProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ //# sourceMappingURL=ContextMenuContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenuContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuContent/ContextMenuContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAMxD,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAKrE,eAAO,MAAM,kBAAkB,oHAoB7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ContextMenuContent, type ContextMenuContentProps } from './ContextMenuContent';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuContent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ export type ContextMenuDividerProps = HTMLAttributes<HTMLDivElement>;
3
+ export declare const ContextMenuDivider: {
4
+ ({ className, ...rest }: ContextMenuDividerProps): import("react").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ //# sourceMappingURL=ContextMenuDivider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenuDivider.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuDivider/ContextMenuDivider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAErE,eAAO,MAAM,kBAAkB;6BAA4B,uBAAuB;;CAQjF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ContextMenuDivider, type ContextMenuDividerProps } from './ContextMenuDivider';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type ContextMenuItem } from '../../types';
2
+ export interface ContextMenuListProps {
3
+ items: ContextMenuItem[];
4
+ /** Вложенный уровень мобильного аккордеона — добавляет отступ слева */
5
+ nested?: boolean;
6
+ }
7
+ export declare const ContextMenuList: {
8
+ ({ items, nested }: ContextMenuListProps): import("react").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ //# sourceMappingURL=ContextMenuList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenuList.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuList/ContextMenuList.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,eAAe,EAA8B,MAAM,aAAa,CAAC;AAM/E,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,eAAe;wBAA+B,oBAAoB;;CAuJ9E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ContextMenuList, type ContextMenuListProps } from './ContextMenuList';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { type FocusEvent, type KeyboardEvent, type MouseEvent } from 'react';
2
+ import { type ContextMenuItem } from '../../types';
3
+ export interface ContextMenuRowProps {
4
+ item: ContextMenuItem;
5
+ expanded?: boolean;
6
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
7
+ onMouseEnter?: () => void;
8
+ onMouseLeave?: () => void;
9
+ onFocus?: (event: FocusEvent<HTMLElement>) => void;
10
+ onSubmenuKeyDown?: (event: KeyboardEvent<HTMLElement>) => void;
11
+ className?: string;
12
+ }
13
+ export declare const ContextMenuRow: import("react").ForwardRefExoticComponent<ContextMenuRowProps & import("react").RefAttributes<HTMLElement>>;
14
+ //# sourceMappingURL=ContextMenuRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenuRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuRow/ContextMenuRow.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAc,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAMzF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,eAAe,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;IAClD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;IAClD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,cAAc,6GAyGzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ContextMenuRow, type ContextMenuRowProps } from './ContextMenuRow';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuRow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type FocusEvent, type MouseEvent, type ReactNode } from 'react';
2
+ import { type ContextMenuItemNested } from '../../types';
3
+ export interface ContextMenuSubmenuProps {
4
+ item: ContextMenuItemNested;
5
+ open: boolean;
6
+ /** Клавиатура просит изменить открытость подменю (ArrowRight/ArrowLeft из useListNavigation) */
7
+ onOpenChange: (open: boolean) => void;
8
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
9
+ onRowMouseEnter: (id: string) => void;
10
+ onRowMouseLeave: () => void;
11
+ onPanelMouseEnter: () => void;
12
+ onPanelMouseLeave: () => void;
13
+ onRowFocus?: (event: FocusEvent<HTMLElement>) => void;
14
+ children: ReactNode;
15
+ }
16
+ export declare const ContextMenuSubmenu: {
17
+ (props: ContextMenuSubmenuProps): import("react").JSX.Element;
18
+ displayName: string;
19
+ };
20
+ //# sourceMappingURL=ContextMenuSubmenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenuSubmenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuSubmenu/ContextMenuSubmenu.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAKpG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIzD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,qBAAqB,CAAA;IAC3B,IAAI,EAAE,OAAO,CAAA;IACb,gGAAgG;IAChG,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;IAClD,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;IACrD,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,kBAAkB;YAAW,uBAAuB;;CAgGhE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ContextMenuSubmenu, type ContextMenuSubmenuProps } from './ContextMenuSubmenu';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/parts/ContextMenuSubmenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { ContextMenuActionBar, type ContextMenuActionBarProps } from './ContextMenuActionBar';
2
+ export { ContextMenuContent, type ContextMenuContentProps } from './ContextMenuContent';
3
+ export { ContextMenuDivider, type ContextMenuDividerProps } from './ContextMenuDivider';
4
+ export { ContextMenuList, type ContextMenuListProps } from './ContextMenuList';
5
+ export { ContextMenuRow, type ContextMenuRowProps } from './ContextMenuRow';
6
+ export { ContextMenuSubmenu, type ContextMenuSubmenuProps } from './ContextMenuSubmenu';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ContextMenu/parts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { type Placement } from '@floating-ui/react';
2
+ import { type MouseEvent, type ReactNode } from 'react';
3
+ import { type AsChildProp, type InnerClassNamesProp } from '../../types';
4
+ export type ContextMenuOpenOn = 'click' | 'hover';
5
+ export type ContextMenuMode = 'auto' | 'desktop' | 'mobile';
6
+ export type ContextMenuResolvedMode = 'desktop' | 'mobile';
7
+ export type ContextMenuItemMode = 'default' | 'destructive';
8
+ export type ContextMenuInnerElementKey = 'trigger' | 'content' | 'actionBar' | 'actionBarButton' | 'actionBarButtonIcon' | 'actionBarButtonLabel' | 'list' | 'row' | 'before' | 'label' | 'hint' | 'chevron' | 'accordion' | 'divider';
9
+ /** Кнопка Action bar — опциональной панели сверху меню */
10
+ export interface ContextMenuActionButton {
11
+ id: string;
12
+ icon: ReactNode;
13
+ /** Подпись под иконкой, необязательная */
14
+ label?: ReactNode;
15
+ disabled?: boolean;
16
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
17
+ }
18
+ /** По спеке в Action bar может быть только 2 или 3 кнопки, меньше двух — нельзя */
19
+ export type ContextMenuActionBar = [ContextMenuActionButton, ContextMenuActionButton] | [ContextMenuActionButton, ContextMenuActionButton, ContextMenuActionButton];
20
+ interface ContextMenuItemBase {
21
+ /** Уникальный идентификатор пункта */
22
+ id: string;
23
+ /** Основной текст пункта */
24
+ label: ReactNode;
25
+ /** Слот слева (иконка и любой другой контент) */
26
+ before?: ReactNode;
27
+ /**
28
+ * Зарезервировать место под иконку слева, когда `before` не задан.
29
+ * Используется, если у большинства пунктов меню есть иконки — так текст остаётся на одной оси.
30
+ */
31
+ offset?: boolean;
32
+ /** Разделитель над пунктом (группировка пунктов); перед первой строкой не рисуется */
33
+ divider?: boolean;
34
+ /** 'destructive' — красный текст пункта */
35
+ mode?: ContextMenuItemMode;
36
+ disabled?: boolean;
37
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
38
+ }
39
+ /** Обычный пункт: справа может быть вспомогательный контент (например, хоткей) */
40
+ export interface ContextMenuItemAction extends ContextMenuItemBase {
41
+ hint?: ReactNode;
42
+ items?: undefined;
43
+ }
44
+ /** Вложенный пункт: справа автоматически рисуется Chevron, вспомогательный текст не предусмотрен */
45
+ export interface ContextMenuItemNested extends ContextMenuItemBase {
46
+ /** Вложенное подменю, глубина не ограничена */
47
+ items: ContextMenuItem[];
48
+ hint?: undefined;
49
+ }
50
+ export type ContextMenuItem = ContextMenuItemAction | ContextMenuItemNested;
51
+ export interface ContextMenuProps extends AsChildProp {
52
+ /** Пункты меню */
53
+ items: ContextMenuItem[];
54
+ /** Action bar сверху меню: 2–3 кнопки, Divider после него добавляется автоматически */
55
+ actionBar?: ContextMenuActionBar;
56
+ /** Элемент, по которому открывается меню (кнопка, объект, выделенный текст и т.д.) */
57
+ children: ReactNode;
58
+ /** Способ открытия меню; можно передать оба значения сразу. Default: 'click' */
59
+ openOn?: ContextMenuOpenOn | ContextMenuOpenOn[];
60
+ /**
61
+ * 'desktop' — вложенные меню открываются рядом при наведении;
62
+ * 'mobile' — вложенные меню раскрываются аккордеоном внутри основного;
63
+ * 'auto' — определяется по типу указателя (matchMedia '(pointer: coarse)'). Default: 'auto'
64
+ */
65
+ mode?: ContextMenuMode;
66
+ /** Расположение корневого меню относительно триггера; при нехватке места переворачивается. Default: 'bottom-start' */
67
+ placement?: Placement;
68
+ /** Controlled-состояние открытости */
69
+ open?: boolean;
70
+ defaultOpen?: boolean;
71
+ onOpenChange?: (open: boolean) => void;
72
+ /** Класс триггера (обёртки, если не используется asChild) */
73
+ className?: string;
74
+ innerClassNames?: InnerClassNamesProp<ContextMenuInnerElementKey>;
75
+ }
76
+ export {};
77
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5D,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,aAAa,CAAC;AAE5D,MAAM,MAAM,0BAA0B,GAClC,SAAS,GACT,SAAS,GACT,WAAW,GACX,iBAAiB,GACjB,qBAAqB,GACrB,sBAAsB,GACtB,MAAM,GACN,KAAK,GACL,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,GACT,WAAW,GACX,SAAS,CAAC;AAEd,0DAA0D;AAC1D,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,SAAS,CAAA;IACf,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;CACnD;AAED,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAC5B,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,GAClD,CAAC,uBAAuB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;AAEhF,UAAU,mBAAmB;IAC3B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,4BAA4B;IAC5B,KAAK,EAAE,SAAS,CAAA;IAChB,iDAAiD;IACjD,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,mBAAmB,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;CACnD;AAED,kFAAkF;AAClF,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,oGAAoG;AACpG,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,+CAA+C;IAC/C,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;AAE5E,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,kBAAkB;IAClB,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,uFAAuF;IACvF,SAAS,CAAC,EAAE,oBAAoB,CAAA;IAChC,sFAAsF;IACtF,QAAQ,EAAE,SAAS,CAAA;IACnB,gFAAgF;IAChF,MAAM,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,EAAE,CAAA;IAChD;;;;OAIG;IACH,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,sHAAsH;IACtH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,sCAAsC;IACtC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,mBAAmB,CAAC,0BAA0B,CAAC,CAAA;CAClE"}
@@ -0,0 +1,14 @@
1
+ import type { InnerClassNamesProp } from "../../types";
2
+ export type SegmentedElementKey = 'list' | 'item';
3
+ export interface SegmentedItem {
4
+ id: string;
5
+ title: string;
6
+ }
7
+ export interface SegmentedProps {
8
+ items: SegmentedItem[];
9
+ activeItem: string;
10
+ onClick: (id: string) => void;
11
+ innerClassNames?: InnerClassNamesProp<SegmentedElementKey>;
12
+ }
13
+ export declare const Segmented: ({ items, activeItem, onClick, innerClassNames }: SegmentedProps) => import("react").JSX.Element;
14
+ //# sourceMappingURL=Segmented.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Segmented.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/Segmented.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAGrD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,CAAC;AAClD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,eAAe,CAAC,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;CAC3D;AAED,eAAO,MAAM,SAAS,GAAI,iDAA+C,cAAc,gCA0DtF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Segmented, type SegmentedElementKey, type SegmentedItem, type SegmentedProps } from './Segmented';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Segmented/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,mBAAmB,EAAC,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type SelectProps } from './types';
2
+ export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ //# sourceMappingURL=Select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AA6CA,OAAO,EAAmE,KAAK,WAAW,EAAoB,MAAM,SAAS,CAAC;AAS9H,eAAO,MAAM,MAAM,wGA6YjB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type KeyboardEvent, type ReactNode } from 'react';
2
+ import { type InnerClassNamesProp } from '../../types';
3
+ import { type SelectElementKey, type SelectOption } from './types';
4
+ export interface SelectContextInterface {
5
+ multiple: boolean;
6
+ query: string;
7
+ setQuery: (query: string) => void;
8
+ isSelected: (value: string) => boolean;
9
+ /**
10
+ * single — выбрать и закрыть; multiple — переключить.
11
+ * Опция запоминается, чтобы поле могло показать подпись выбранного значения.
12
+ */
13
+ select: (value: string, option?: SelectOption) => void;
14
+ close: () => void;
15
+ /** Опции после фильтрации (в режиме customDropdownMenu пусто) */
16
+ options: SelectOption[];
17
+ listId: string;
18
+ getOptionId: (index: number) => string;
19
+ /** Индекс подсвеченной опции (виртуальный фокус: реальный остаётся на поле или в поиске) */
20
+ activeIndex: number | null;
21
+ setActiveIndex: (index: number | null) => void;
22
+ /** Клавиатурная навигация; вешается на поле и на строку поиска */
23
+ onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
24
+ emptyText: ReactNode;
25
+ loading: boolean;
26
+ /** Доступное имя для listbox */
27
+ listLabel?: {
28
+ 'aria-label'?: string;
29
+ 'aria-labelledby'?: string;
30
+ };
31
+ innerClassNames?: InnerClassNamesProp<SelectElementKey>;
32
+ }
33
+ export declare const SelectContext: import("react").Context<SelectContextInterface>;
34
+ /** Доступ к состоянию Select из customDropdownMenu и внутренних частей */
35
+ export declare const useSelect: () => SelectContextInterface;
36
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/Select/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,aAAa,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAGtF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;IACtC;;;OAGG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,KAAK,IAAI,CAAA;IACtD,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,iEAAiE;IACjE,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACtC,4FAA4F;IAC5F,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,kEAAkE;IAClE,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;IACtD,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,gCAAgC;IAChC,SAAS,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACjE,eAAe,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;CACxD;AAED,eAAO,MAAM,aAAa,iDAexB,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,SAAS,QAAO,sBAAmD,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type SelectOption, type SelectValue } from './types';
2
+ /** Отступ между полем и панелью */
3
+ export declare const DROPDOWN_OFFSET = 4;
4
+ /** Отступ от краёв экрана при flip/shift/size */
5
+ export declare const COLLISION_PADDING = 8;
6
+ export declare const DEFAULT_EMPTY_TEXT = "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E";
7
+ export declare const DEFAULT_SEARCH_PLACEHOLDER = "\u041F\u043E\u0438\u0441\u043A";
8
+ export declare const EMPTY_OPTIONS: SelectOption[];
9
+ /** Пустая строка в single — «ничего не выбрано» */
10
+ export declare const toValuesArray: (value: SelectValue | undefined) => string[];
11
+ export declare const getOptionSearchText: (option: SelectOption) => string;
12
+ export declare const defaultFilterOption: (option: SelectOption, query: string) => boolean;
13
+ /** Индекс ближайшей неотключённой опции от `from` (не включая) в направлении `step`; -1, если таких нет */
14
+ export declare const findEnabledIndex: (options: SelectOption[], from: number, step: 1 | -1) => number;
15
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/Select/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE9D,mCAAmC;AACnC,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,iDAAiD;AACjD,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,kBAAkB,iGAAsB,CAAC;AACtD,eAAO,MAAM,0BAA0B,mCAAU,CAAC;AAElD,eAAO,MAAM,aAAa,EAAE,YAAY,EAAO,CAAC;AAEhD,mDAAmD;AACnD,eAAO,MAAM,aAAa,GAAI,OAAO,WAAW,GAAG,SAAS,KAAG,MAAM,EAIpE,CAAC;AAMF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,YAAY,KAAG,MAI1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,YAAY,EAAE,OAAO,MAAM,KAAG,OAEzE,CAAC;AAEF,2GAA2G;AAC3G,eAAO,MAAM,gBAAgB,GAAI,SAAS,YAAY,EAAE,EAAE,MAAM,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAG,MAMtF,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type KeyboardEvent } from 'react';
2
+ import { type SelectOption } from './types';
3
+ export declare const useAppearanceClassNames: () => string;
4
+ interface UseSelectNavigationParams {
5
+ open: boolean;
6
+ options: SelectOption[];
7
+ activeIndex: number | null;
8
+ setActiveIndex: (index: number | null) => void;
9
+ onSelectIndex: (index: number) => void;
10
+ onOpen: () => void;
11
+ /** restoreFocus — вернуть фокус на поле после закрытия */
12
+ onClose: (restoreFocus: boolean) => void;
13
+ /** Очистка значения по Backspace/Delete на закрытом поле */
14
+ onClear?: () => void;
15
+ }
16
+ export declare const useSelectNavigation: (params: UseSelectNavigationParams) => (event: KeyboardEvent<HTMLElement>) => void;
17
+ export {};
18
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/Select/hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAe,MAAM,OAAO,CAAC;AAKxD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,uBAAuB,QAAO,MAO1C,CAAC;AAEF,UAAU,yBAAyB;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,0DAA0D;IAC1D,OAAO,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAA;IACxC,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,eAAO,MAAM,mBAAmB,GAAI,QAAQ,yBAAyB,aAGxC,aAAa,CAAC,WAAW,CAAC,SAqEtD,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { useSelect } from './context';
2
+ export { SelectEmpty, type SelectEmptyProps } from './parts/SelectEmpty';
3
+ export { SelectOptionRow, type SelectOptionRowProps } from './parts/SelectOptionRow';
4
+ export { SelectSearch, type SelectSearchProps } from './parts/SelectSearch';
5
+ export { Select } from './Select';
6
+ export type { SelectBaseProps, SelectDropdownApi, SelectDropdownWidth, SelectElementKey, SelectMode, SelectMultipleProps, SelectOption, SelectProps, SelectSingleProps, SelectSize, SelectValue } from './types';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,WAAW,EACZ,MAAM,SAAS,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import { type SelectDropdownWidth } from '../../types';
3
+ export interface SelectContentProps extends HTMLAttributes<HTMLDivElement> {
4
+ dropdownWidth?: SelectDropdownWidth;
5
+ /** Закреплённая сверху часть (например, строка поиска) — не скроллится вместе со списком */
6
+ header?: ReactNode;
7
+ innerClassNames?: {
8
+ header?: string;
9
+ body?: string;
10
+ };
11
+ }
12
+ export declare const SelectContent: import("react").ForwardRefExoticComponent<SelectContentProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ //# sourceMappingURL=SelectContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/parts/SelectContent/SelectContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACxE,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,4FAA4F;IAC5F,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,eAAe,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACrD;AAED,eAAO,MAAM,aAAa,+GAkCxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SelectContent, type SelectContentProps } from './SelectContent';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/parts/SelectContent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ export type SelectEmptyProps = Omit<ComponentPropsWithoutRef<'div'>, 'role'>;
3
+ export declare const SelectEmpty: import("react").ForwardRefExoticComponent<SelectEmptyProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ //# sourceMappingURL=SelectEmpty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectEmpty.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/parts/SelectEmpty/SelectEmpty.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAMlE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;AAE7E,eAAO,MAAM,WAAW,6GAoBtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SelectEmpty, type SelectEmptyProps } from './SelectEmpty';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/parts/SelectEmpty/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ import { type InnerClassNamesProp } from '../../../../types';
3
+ import { type SelectElementKey, type SelectMode, type SelectSize } from '../../types';
4
+ export interface SelectFieldProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
5
+ mode: SelectMode;
6
+ size: SelectSize;
7
+ open: boolean;
8
+ disabled?: boolean;
9
+ iconBefore?: ReactNode;
10
+ /** Подпись выбранного значения; если пусто — показывается placeholder */
11
+ valueContent?: ReactNode;
12
+ placeholder?: ReactNode;
13
+ /** Сколько значений скрыто за первым (multiple); 0 — счётчик не показывается */
14
+ hiddenCount?: number;
15
+ /** id блока со значением: используется в aria-labelledby поля */
16
+ valueId?: string;
17
+ showClearButton: boolean;
18
+ onClear: () => void;
19
+ innerClassNames?: InnerClassNamesProp<SelectElementKey>;
20
+ }
21
+ export declare const SelectField: import("react").ForwardRefExoticComponent<SelectFieldProps & import("react").RefAttributes<HTMLDivElement>>;
22
+ //# sourceMappingURL=SelectField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectField.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/parts/SelectField/SelectField.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAGtF,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACzF,IAAI,EAAE,UAAU,CAAA;IAChB,IAAI,EAAE,UAAU,CAAA;IAChB,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,yEAAyE;IACzE,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,OAAO,CAAA;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,eAAe,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;CACxD;AAED,eAAO,MAAM,WAAW,6GA+FtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SelectField, type SelectFieldProps } from './SelectField';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/parts/SelectField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC"}