intelicoreact 2.0.11 → 2.0.12
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.
- package/dist/Atomic/UI/Accordion/Accordion.interface.d.ts +17 -0
- package/dist/Atomic/UI/Accordion/index.d.ts +1 -1
- package/dist/classes.cjs.map +1 -1
- package/dist/classes.d.ts +6 -0
- package/dist/index.cjs +461 -990
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +6 -1
- package/dist/index.js +452 -981
- package/dist/index.js.map +4 -4
- package/dist/layout.cjs +0 -560
- package/dist/layout.cjs.map +4 -4
- package/dist/layout.d.ts +5 -2
- package/dist/layout.js +0 -560
- package/dist/layout.js.map +4 -4
- package/dist/router-ui.cjs +989 -0
- package/dist/router-ui.cjs.map +7 -0
- package/dist/router-ui.d.ts +20 -0
- package/dist/router-ui.js +957 -0
- package/dist/router-ui.js.map +7 -0
- package/dist/ui.cjs +897 -1275
- package/dist/ui.cjs.map +4 -4
- package/dist/ui.d.ts +4 -6
- package/dist/ui.js +867 -1245
- package/dist/ui.js.map +4 -4
- package/package.json +16 -1
- package/router-ui/package.json +5 -0
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { IUniProps } from '../../../types/base.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Компонент ссылки для menu-пунктов аккордеона (`item.children`).
|
|
5
|
+
* По умолчанию AccordionItem рендерит обычный `<a href>` и НЕ зависит от
|
|
6
|
+
* react-router-dom (это позволяет Table -> TdCell жить в subpath "ui" без
|
|
7
|
+
* роутера). Router-aware Accordion (subpath "router-ui") передаёт сюда
|
|
8
|
+
* NavLink, сохраняя SPA-навигацию и active-состояние.
|
|
9
|
+
*
|
|
10
|
+
* Намеренно голая call-signature, а не React.ComponentType: у NavLink поле
|
|
11
|
+
* propTypes типизировано Validator<To>, и ComponentType-вариант ломает
|
|
12
|
+
* assignability (Validator<To> vs Validator<string>).
|
|
13
|
+
*/
|
|
14
|
+
export type AccordionLinkComponent = (props: {
|
|
15
|
+
to: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}) => React.ReactElement | null;
|
|
3
19
|
export interface IAccordionItemProps extends IUniProps {
|
|
4
20
|
item: {
|
|
5
21
|
icon: string;
|
|
@@ -26,6 +42,7 @@ export interface IAccordionItemProps extends IUniProps {
|
|
|
26
42
|
isOpen: boolean;
|
|
27
43
|
children?: React.ReactNode;
|
|
28
44
|
noChevron?: boolean;
|
|
45
|
+
linkComponent?: AccordionLinkComponent;
|
|
29
46
|
}
|
|
30
47
|
export interface IAccordionProps extends IUniProps {
|
|
31
48
|
items: Array<{
|