@alfalab/core-components-table 4.0.7 → 4.0.8

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 (192) hide show
  1. package/component.d.ts +21 -22
  2. package/components/pagination/Component.d.ts +1 -1
  3. package/components/pagination/Component.js.map +1 -1
  4. package/components/pagination/index.css +8 -8
  5. package/components/pagination/index.module.css.js +1 -1
  6. package/components/pagination/index.module.css.js.map +1 -1
  7. package/components/pagination/select-field/index.css +3 -3
  8. package/components/pagination/select-field/index.module.css.js +1 -1
  9. package/components/pagination/select-field/index.module.css.js.map +1 -1
  10. package/components/table/Component.d.ts +7 -7
  11. package/components/table/index.css +6 -6
  12. package/components/table/index.module.css.js +1 -1
  13. package/components/table/index.module.css.js.map +1 -1
  14. package/components/table/utils.js.map +1 -1
  15. package/components/table-context/index.d.ts +2 -2
  16. package/components/tbody/Component.d.ts +3 -3
  17. package/components/tbody/index.css +1 -1
  18. package/components/tbody/index.module.css.js +1 -1
  19. package/components/tbody/index.module.css.js.map +1 -1
  20. package/components/tcell/Component.d.ts +1 -1
  21. package/components/tcell/index.css +5 -5
  22. package/components/tcell/index.module.css.js +1 -1
  23. package/components/tcell/index.module.css.js.map +1 -1
  24. package/components/texpandable-row/Component.d.ts +9 -9
  25. package/components/texpandable-row/Component.js.map +1 -1
  26. package/components/texpandable-row/index.css +4 -4
  27. package/components/texpandable-row/index.module.css.js +1 -1
  28. package/components/texpandable-row/index.module.css.js.map +1 -1
  29. package/components/thead/Component.d.ts +1 -1
  30. package/components/thead/index.css +5 -5
  31. package/components/thead/index.module.css.js +1 -1
  32. package/components/thead/index.module.css.js.map +1 -1
  33. package/components/thead-cell/Component.d.ts +1 -1
  34. package/components/thead-cell/index.css +8 -8
  35. package/components/thead-cell/index.module.css.js +1 -1
  36. package/components/thead-cell/index.module.css.js.map +1 -1
  37. package/components/trow/Component.d.ts +6 -6
  38. package/components/trow/index.css +7 -7
  39. package/components/trow/index.module.css.js +1 -1
  40. package/components/trow/index.module.css.js.map +1 -1
  41. package/components/tsortable-head-cell/Component.d.ts +1 -1
  42. package/components/tsortable-head-cell/index.css +7 -7
  43. package/components/tsortable-head-cell/index.module.css.js +1 -1
  44. package/components/tsortable-head-cell/index.module.css.js.map +1 -1
  45. package/cssm/component.d.ts +21 -22
  46. package/cssm/components/pagination/Component.d.ts +1 -1
  47. package/cssm/components/pagination/Component.js.map +1 -1
  48. package/cssm/components/table/Component.d.ts +7 -7
  49. package/cssm/components/table/utils.js.map +1 -1
  50. package/cssm/components/table-context/index.d.ts +2 -2
  51. package/cssm/components/tbody/Component.d.ts +3 -3
  52. package/cssm/components/tcell/Component.d.ts +1 -1
  53. package/cssm/components/texpandable-row/Component.d.ts +9 -9
  54. package/cssm/components/texpandable-row/Component.js.map +1 -1
  55. package/cssm/components/thead/Component.d.ts +1 -1
  56. package/cssm/components/thead-cell/Component.d.ts +1 -1
  57. package/cssm/components/trow/Component.d.ts +6 -6
  58. package/cssm/components/tsortable-head-cell/Component.d.ts +1 -1
  59. package/cssm/typings.d.ts +1 -1
  60. package/cssm/utils.d.ts +4 -1
  61. package/cssm/utils.js +1 -1
  62. package/cssm/utils.js.map +1 -1
  63. package/esm/component.d.ts +21 -22
  64. package/esm/components/pagination/Component.d.ts +1 -1
  65. package/esm/components/pagination/Component.js.map +1 -1
  66. package/esm/components/pagination/index.css +8 -8
  67. package/esm/components/pagination/index.module.css.js +1 -1
  68. package/esm/components/pagination/index.module.css.js.map +1 -1
  69. package/esm/components/pagination/select-field/index.css +3 -3
  70. package/esm/components/pagination/select-field/index.module.css.js +1 -1
  71. package/esm/components/pagination/select-field/index.module.css.js.map +1 -1
  72. package/esm/components/table/Component.d.ts +7 -7
  73. package/esm/components/table/index.css +6 -6
  74. package/esm/components/table/index.module.css.js +1 -1
  75. package/esm/components/table/index.module.css.js.map +1 -1
  76. package/esm/components/table/utils.js.map +1 -1
  77. package/esm/components/table-context/index.d.ts +2 -2
  78. package/esm/components/tbody/Component.d.ts +3 -3
  79. package/esm/components/tbody/index.css +1 -1
  80. package/esm/components/tbody/index.module.css.js +1 -1
  81. package/esm/components/tbody/index.module.css.js.map +1 -1
  82. package/esm/components/tcell/Component.d.ts +1 -1
  83. package/esm/components/tcell/index.css +5 -5
  84. package/esm/components/tcell/index.module.css.js +1 -1
  85. package/esm/components/tcell/index.module.css.js.map +1 -1
  86. package/esm/components/texpandable-row/Component.d.ts +9 -9
  87. package/esm/components/texpandable-row/Component.js.map +1 -1
  88. package/esm/components/texpandable-row/index.css +4 -4
  89. package/esm/components/texpandable-row/index.module.css.js +1 -1
  90. package/esm/components/texpandable-row/index.module.css.js.map +1 -1
  91. package/esm/components/thead/Component.d.ts +1 -1
  92. package/esm/components/thead/index.css +5 -5
  93. package/esm/components/thead/index.module.css.js +1 -1
  94. package/esm/components/thead/index.module.css.js.map +1 -1
  95. package/esm/components/thead-cell/Component.d.ts +1 -1
  96. package/esm/components/thead-cell/index.css +8 -8
  97. package/esm/components/thead-cell/index.module.css.js +1 -1
  98. package/esm/components/thead-cell/index.module.css.js.map +1 -1
  99. package/esm/components/trow/Component.d.ts +6 -6
  100. package/esm/components/trow/index.css +7 -7
  101. package/esm/components/trow/index.module.css.js +1 -1
  102. package/esm/components/trow/index.module.css.js.map +1 -1
  103. package/esm/components/tsortable-head-cell/Component.d.ts +1 -1
  104. package/esm/components/tsortable-head-cell/index.css +7 -7
  105. package/esm/components/tsortable-head-cell/index.module.css.js +1 -1
  106. package/esm/components/tsortable-head-cell/index.module.css.js.map +1 -1
  107. package/esm/typings.d.ts +1 -1
  108. package/esm/utils.d.ts +4 -1
  109. package/esm/utils.js +1 -1
  110. package/esm/utils.js.map +1 -1
  111. package/modern/component.d.ts +21 -22
  112. package/modern/components/pagination/Component.d.ts +1 -1
  113. package/modern/components/pagination/Component.js.map +1 -1
  114. package/modern/components/pagination/index.css +8 -8
  115. package/modern/components/pagination/index.module.css.js +1 -1
  116. package/modern/components/pagination/index.module.css.js.map +1 -1
  117. package/modern/components/pagination/select-field/index.css +3 -3
  118. package/modern/components/pagination/select-field/index.module.css.js +1 -1
  119. package/modern/components/pagination/select-field/index.module.css.js.map +1 -1
  120. package/modern/components/table/Component.d.ts +7 -7
  121. package/modern/components/table/index.css +6 -6
  122. package/modern/components/table/index.module.css.js +1 -1
  123. package/modern/components/table/index.module.css.js.map +1 -1
  124. package/modern/components/table/utils.js.map +1 -1
  125. package/modern/components/table-context/index.d.ts +2 -2
  126. package/modern/components/tbody/Component.d.ts +3 -3
  127. package/modern/components/tbody/index.css +1 -1
  128. package/modern/components/tbody/index.module.css.js +1 -1
  129. package/modern/components/tbody/index.module.css.js.map +1 -1
  130. package/modern/components/tcell/Component.d.ts +1 -1
  131. package/modern/components/tcell/index.css +5 -5
  132. package/modern/components/tcell/index.module.css.js +1 -1
  133. package/modern/components/tcell/index.module.css.js.map +1 -1
  134. package/modern/components/texpandable-row/Component.d.ts +9 -9
  135. package/modern/components/texpandable-row/Component.js.map +1 -1
  136. package/modern/components/texpandable-row/index.css +4 -4
  137. package/modern/components/texpandable-row/index.module.css.js +1 -1
  138. package/modern/components/texpandable-row/index.module.css.js.map +1 -1
  139. package/modern/components/thead/Component.d.ts +1 -1
  140. package/modern/components/thead/index.css +5 -5
  141. package/modern/components/thead/index.module.css.js +1 -1
  142. package/modern/components/thead/index.module.css.js.map +1 -1
  143. package/modern/components/thead-cell/Component.d.ts +1 -1
  144. package/modern/components/thead-cell/index.css +8 -8
  145. package/modern/components/thead-cell/index.module.css.js +1 -1
  146. package/modern/components/thead-cell/index.module.css.js.map +1 -1
  147. package/modern/components/trow/Component.d.ts +6 -6
  148. package/modern/components/trow/index.css +7 -7
  149. package/modern/components/trow/index.module.css.js +1 -1
  150. package/modern/components/trow/index.module.css.js.map +1 -1
  151. package/modern/components/tsortable-head-cell/Component.d.ts +1 -1
  152. package/modern/components/tsortable-head-cell/index.css +7 -7
  153. package/modern/components/tsortable-head-cell/index.module.css.js +1 -1
  154. package/modern/components/tsortable-head-cell/index.module.css.js.map +1 -1
  155. package/modern/typings.d.ts +1 -1
  156. package/modern/utils.d.ts +4 -1
  157. package/modern/utils.js +1 -1
  158. package/modern/utils.js.map +1 -1
  159. package/moderncssm/component.d.ts +21 -22
  160. package/moderncssm/components/pagination/Component.d.ts +1 -1
  161. package/moderncssm/components/pagination/Component.js.map +1 -1
  162. package/moderncssm/components/table/Component.d.ts +7 -7
  163. package/moderncssm/components/table/utils.js.map +1 -1
  164. package/moderncssm/components/table-context/index.d.ts +2 -2
  165. package/moderncssm/components/tbody/Component.d.ts +3 -3
  166. package/moderncssm/components/tcell/Component.d.ts +1 -1
  167. package/moderncssm/components/texpandable-row/Component.d.ts +9 -9
  168. package/moderncssm/components/texpandable-row/Component.js.map +1 -1
  169. package/moderncssm/components/thead/Component.d.ts +1 -1
  170. package/moderncssm/components/thead-cell/Component.d.ts +1 -1
  171. package/moderncssm/components/trow/Component.d.ts +6 -6
  172. package/moderncssm/components/tsortable-head-cell/Component.d.ts +1 -1
  173. package/moderncssm/typings.d.ts +1 -1
  174. package/moderncssm/utils.d.ts +4 -1
  175. package/moderncssm/utils.js +1 -1
  176. package/moderncssm/utils.js.map +1 -1
  177. package/package.json +5 -5
  178. package/src/components/pagination/index.module.css +1 -1
  179. package/src/components/pagination/select-field/index.module.css +1 -1
  180. package/src/components/table/index.module.css +1 -1
  181. package/src/components/tbody/index.module.css +1 -1
  182. package/src/components/tcell/index.module.css +1 -1
  183. package/src/components/texpandable-row/index.module.css +1 -1
  184. package/src/components/thead/index.module.css +1 -1
  185. package/src/components/thead-cell/index.module.css +1 -1
  186. package/src/components/trow/index.module.css +1 -1
  187. package/src/components/tsortable-head-cell/index.module.css +1 -1
  188. package/src/utils.ts +8 -2
  189. package/typings.d.ts +1 -1
  190. package/utils.d.ts +4 -1
  191. package/utils.js +1 -1
  192. package/utils.js.map +1 -1
@@ -1,12 +1,12 @@
1
1
  import { type RefObject } from 'react';
2
2
  import { type TextAlignProperty } from '../../typings';
3
- export declare type ColumnConfiguration = {
3
+ export type ColumnConfiguration = {
4
4
  width?: string | number;
5
5
  textAlign?: TextAlignProperty;
6
6
  hidden?: boolean;
7
7
  index: number;
8
8
  };
9
- export declare type TableContextType = {
9
+ export type TableContextType = {
10
10
  columnsConfiguration: ColumnConfiguration[];
11
11
  stickyHeader: boolean;
12
12
  compactView: boolean;
@@ -1,5 +1,5 @@
1
1
  import React, { type HTMLAttributes } from 'react';
2
- export declare type TBodyProps = HTMLAttributes<HTMLTableSectionElement> & {
2
+ export type TBodyProps = HTMLAttributes<HTMLTableSectionElement> & {
3
3
  /**
4
4
  * Дополнительный класс
5
5
  */
@@ -13,9 +13,9 @@ export declare const TBody: React.ForwardRefExoticComponent<React.HTMLAttributes
13
13
  /**
14
14
  * Дополнительный класс
15
15
  */
16
- className?: string | undefined;
16
+ className?: string;
17
17
  /**
18
18
  * Идентификатор для систем автоматизированного тестирования
19
19
  */
20
- dataTestId?: string | undefined;
20
+ dataTestId?: string;
21
21
  } & React.RefAttributes<HTMLTableSectionElement>>;
@@ -1,5 +1,5 @@
1
1
  import React, { type TdHTMLAttributes } from 'react';
2
- export declare type TCellProps = TdHTMLAttributes<HTMLTableCellElement> & {
2
+ export type TCellProps = TdHTMLAttributes<HTMLTableCellElement> & {
3
3
  /**
4
4
  * Дополнительный класс
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import React, { type ReactNode, type Ref } from 'react';
2
2
  import { type TRowProps } from '../trow';
3
- export declare type TExpandableRowProps = TRowProps & {
3
+ export type TExpandableRowProps = TRowProps & {
4
4
  defaultExpanded?: boolean;
5
5
  expanded?: boolean;
6
6
  onToggle?: (expanded: boolean) => void;
@@ -9,14 +9,14 @@ export declare type TExpandableRowProps = TRowProps & {
9
9
  };
10
10
  export declare const TExpandableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & {
11
11
  children: React.ReactElement<import("..").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("..").TCellProps) => React.JSX.Element | null> | React.ReactElement<import("..").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("..").TCellProps) => React.JSX.Element | null>[];
12
- className?: string | undefined;
13
- selected?: boolean | undefined;
14
- withoutBorder?: boolean | undefined;
15
- dataTestId?: string | undefined;
12
+ className?: string;
13
+ selected?: boolean;
14
+ withoutBorder?: boolean;
15
+ dataTestId?: string;
16
16
  } & {
17
- defaultExpanded?: boolean | undefined;
18
- expanded?: boolean | undefined;
19
- onToggle?: ((expanded: boolean) => void) | undefined;
17
+ defaultExpanded?: boolean;
18
+ expanded?: boolean;
19
+ onToggle?: (expanded: boolean) => void;
20
20
  renderContent: (expanded: boolean) => ReactNode;
21
- rowRef?: React.Ref<HTMLTableRowElement> | undefined;
21
+ rowRef?: Ref<HTMLTableRowElement>;
22
22
  } & React.RefAttributes<HTMLTableRowElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/texpandable-row/Component.tsx"],"sourcesContent":["import React, { forwardRef, type ReactNode, type Ref, useState } from 'react';\nimport cn from 'classnames';\n\nimport { TRow, type TRowProps } from '../trow';\n\nimport styles from './index.module.css';\n\nexport type TExpandableRowProps = TRowProps & {\n defaultExpanded?: boolean;\n\n expanded?: boolean;\n\n onToggle?: (expanded: boolean) => void;\n\n renderContent: (expanded: boolean) => ReactNode;\n\n rowRef?: Ref<HTMLTableRowElement>;\n};\n\nexport const TExpandableRow = forwardRef<HTMLTableRowElement, TExpandableRowProps>(\n (\n {\n className,\n selected,\n expanded,\n defaultExpanded = false,\n onToggle = () => null,\n renderContent = () => null,\n rowRef,\n ...restProps\n }: TExpandableRowProps,\n ref,\n ) => {\n const [expandedState, setExpandedState] = useState<boolean>(defaultExpanded);\n\n const uncontrolled = expanded === undefined;\n\n const isExpanded = uncontrolled ? expandedState : expanded;\n\n const handleToggle = () => {\n if (uncontrolled) {\n setExpandedState(!isExpanded);\n }\n\n onToggle(isExpanded);\n };\n\n return (\n <React.Fragment>\n <TRow\n className={cn(styles.row, className, {\n [styles.selected]: selected,\n [styles.expanded]: isExpanded,\n })}\n selected={selected}\n onClick={handleToggle}\n ref={rowRef}\n {...restProps}\n />\n\n <tr ref={ref} className={cn(styles.expandable, { [styles.expanded]: isExpanded })}>\n {renderContent(isExpanded)}\n </tr>\n </React.Fragment>\n );\n },\n);\n\nTExpandableRow.displayName = 'TExpandableRow';\n"],"names":[],"mappings":";;;;;AAmBa,MAAA,cAAc,GAAG,UAAU,CACpC,CACI,EACI,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,GAAG,KAAK,EACvB,QAAQ,GAAG,MAAM,IAAI,EACrB,aAAa,GAAG,MAAM,IAAI,EAC1B,MAAM,EACN,GAAG,SAAS,EACM,EACtB,GAAG,KACH;IACA,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAU,eAAe,CAAC;AAE5E,IAAA,MAAM,YAAY,GAAG,QAAQ,KAAK,SAAS;IAE3C,MAAM,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,QAAQ;IAE1D,MAAM,YAAY,GAAG,MAAK;AACtB,QAAA,IAAI,YAAY,EAAE;AACd,YAAA,gBAAgB,CAAC,CAAC,UAAU,CAAC;AAChC;QAED,QAAQ,CAAC,UAAU,CAAC;AACxB,KAAC;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,IAAA;QACX,KAAC,CAAA,aAAA,CAAA,IAAI,EACD,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE;AACjC,gBAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ;AAC3B,gBAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU;AAChC,aAAA,CAAC,EACF,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,MAAM,EAAA,GACP,SAAS,EACf,CAAA;AAEF,QAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU,EAAE,CAAC,EAAA,EAC5E,aAAa,CAAC,UAAU,CAAC,CACzB,CACQ;AAEzB,CAAC;AAGL,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/texpandable-row/Component.tsx"],"sourcesContent":["import React, { forwardRef, type ReactNode, type Ref, useState } from 'react';\nimport cn from 'classnames';\n\nimport { TRow, type TRowProps } from '../trow';\n\nimport styles from './index.module.css';\n\nexport type TExpandableRowProps = TRowProps & {\n defaultExpanded?: boolean;\n\n expanded?: boolean;\n\n onToggle?: (expanded: boolean) => void;\n\n renderContent: (expanded: boolean) => ReactNode;\n\n rowRef?: Ref<HTMLTableRowElement>;\n};\n\nexport const TExpandableRow = forwardRef<HTMLTableRowElement, TExpandableRowProps>(\n (\n {\n className,\n selected,\n expanded,\n defaultExpanded = false,\n onToggle = () => null,\n renderContent = () => null,\n rowRef,\n ...restProps\n }: TExpandableRowProps,\n ref,\n ) => {\n const [expandedState, setExpandedState] = useState<boolean>(defaultExpanded);\n\n const uncontrolled = expanded === undefined;\n\n const isExpanded = uncontrolled ? expandedState : expanded;\n\n const handleToggle = () => {\n if (uncontrolled) {\n setExpandedState(!isExpanded);\n }\n\n onToggle(isExpanded);\n };\n\n return (\n <React.Fragment>\n <TRow\n className={cn(styles.row, className, {\n [styles.selected]: selected,\n [styles.expanded]: isExpanded,\n })}\n selected={selected}\n onClick={handleToggle}\n ref={rowRef}\n {...restProps}\n />\n\n <tr ref={ref} className={cn(styles.expandable, { [styles.expanded]: isExpanded })}>\n {renderContent(isExpanded)}\n </tr>\n </React.Fragment>\n );\n },\n);\n\nTExpandableRow.displayName = 'TExpandableRow';\n"],"names":[],"mappings":";;;;;AAmBa,MAAA,cAAc,GAAG,UAAU,CACpC,CACI,EACI,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,GAAG,KAAK,EACvB,QAAQ,GAAG,MAAM,IAAI,EACrB,aAAa,GAAG,MAAM,IAAI,EAC1B,MAAM,EACN,GAAG,SAAS,EACM,EACtB,GAAG,KACH;IACA,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAU,eAAe,CAAC;AAE5E,IAAA,MAAM,YAAY,GAAG,QAAQ,KAAK,SAAS;IAE3C,MAAM,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,QAAQ;IAE1D,MAAM,YAAY,GAAG,MAAK;QACtB,IAAI,YAAY,EAAE;AACd,YAAA,gBAAgB,CAAC,CAAC,UAAU,CAAC;;QAGjC,QAAQ,CAAC,UAAU,CAAC;AACxB,KAAC;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,IAAA;QACX,KAAC,CAAA,aAAA,CAAA,IAAI,EACD,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE;AACjC,gBAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ;AAC3B,gBAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU;AAChC,aAAA,CAAC,EACF,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,MAAM,EAAA,GACP,SAAS,EACf,CAAA;AAEF,QAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU,EAAE,CAAC,EAAA,EAC5E,aAAa,CAAC,UAAU,CAAC,CACzB,CACQ;AAEzB,CAAC;AAGL,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React, { type HTMLAttributes } from 'react';
2
- export declare type THeadProps = HTMLAttributes<HTMLTableSectionElement> & {
2
+ export type THeadProps = HTMLAttributes<HTMLTableSectionElement> & {
3
3
  /**
4
4
  * Дополнительный класс
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import React, { type ThHTMLAttributes } from 'react';
2
2
  import { type TextAlignProperty } from '../../typings';
3
- export declare type THeadCellProps = ThHTMLAttributes<HTMLHeadingElement> & {
3
+ export type THeadCellProps = ThHTMLAttributes<HTMLHeadingElement> & {
4
4
  /**
5
5
  * Дополнительный класс
6
6
  */
@@ -1,7 +1,7 @@
1
1
  import React, { type HTMLAttributes } from 'react';
2
2
  import { type TCell, type TCellProps } from '../tcell';
3
- declare type TCellElement = React.ReactElement<TCellProps, typeof TCell>;
4
- export declare type TRowProps = HTMLAttributes<HTMLTableRowElement> & {
3
+ type TCellElement = React.ReactElement<TCellProps, typeof TCell>;
4
+ export type TRowProps = HTMLAttributes<HTMLTableRowElement> & {
5
5
  /**
6
6
  * Компоненты ячеек
7
7
  */
@@ -31,18 +31,18 @@ export declare const TRow: React.ForwardRefExoticComponent<React.HTMLAttributes<
31
31
  /**
32
32
  * Дополнительный класс
33
33
  */
34
- className?: string | undefined;
34
+ className?: string;
35
35
  /**
36
36
  * Стиль выбранной строки
37
37
  */
38
- selected?: boolean | undefined;
38
+ selected?: boolean;
39
39
  /**
40
40
  * Убирает нижнюю границу
41
41
  */
42
- withoutBorder?: boolean | undefined;
42
+ withoutBorder?: boolean;
43
43
  /**
44
44
  * Идентификатор для систем автоматизированного тестирования
45
45
  */
46
- dataTestId?: string | undefined;
46
+ dataTestId?: string;
47
47
  } & React.RefAttributes<HTMLTableRowElement>>;
48
48
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type THeadCellProps } from '../thead-cell';
3
- export declare type TSortableHeadCellProps = THeadCellProps & {
3
+ export type TSortableHeadCellProps = THeadCellProps & {
4
4
  isSortedDesc?: boolean;
5
5
  defaultIsSortedDesc?: boolean;
6
6
  onSort?: () => void;
@@ -1 +1 @@
1
- export declare type TextAlignProperty = 'center' | 'end' | 'justify' | 'left' | 'match-parent' | 'right' | 'start';
1
+ export type TextAlignProperty = 'center' | 'end' | 'justify' | 'left' | 'match-parent' | 'right' | 'start';
@@ -1,2 +1,5 @@
1
1
  import React from 'react';
2
- export declare function isChildInstanceOf<P>(child: React.ReactElement, Component: React.ComponentType<P>): boolean;
2
+ interface EmptyProps {
3
+ }
4
+ export declare function isChildInstanceOf<P extends EmptyProps>(child: React.ReactElement, Component: React.ComponentType<P>): boolean;
5
+ export {};
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  function isChildInstanceOf(child, Component) {
4
4
  // мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304
5
- return child.type === React.createElement(Component).type;
5
+ return child.type === React.createElement(Component, {}).type;
6
6
  }
7
7
 
8
8
  export { isChildInstanceOf };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import React from 'react';\n\nexport function isChildInstanceOf<P>(child: React.ReactElement, Component: React.ComponentType<P>) {\n // мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304\n return child.type === React.createElement(Component).type;\n}\n"],"names":[],"mappings":";;AAEgB,SAAA,iBAAiB,CAAI,KAAyB,EAAE,SAAiC,EAAA;;AAE7F,IAAA,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,IAAI;AAC7D;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import React from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface EmptyProps {}\n\nexport function isChildInstanceOf<P extends EmptyProps>(\n child: React.ReactElement,\n Component: React.ComponentType<P>,\n) {\n // мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304\n return child.type === React.createElement(Component, {} as P).type;\n}\n"],"names":[],"mappings":";;AAKgB,SAAA,iBAAiB,CAC7B,KAAyB,EACzB,SAAiC,EAAA;;AAGjC,IAAA,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,EAAO,CAAC,CAAC,IAAI;AACtE;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-table",
3
- "version": "4.0.7",
3
+ "version": "4.0.8",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,9 +10,9 @@
10
10
  "main": "index.js",
11
11
  "module": "./esm/index.js",
12
12
  "dependencies": {
13
- "@alfalab/core-components-button": "^13.1.0",
14
- "@alfalab/core-components-pagination": "^4.0.2",
15
- "@alfalab/core-components-select": "^19.1.0",
13
+ "@alfalab/core-components-button": "^13.1.1",
14
+ "@alfalab/core-components-pagination": "^4.0.3",
15
+ "@alfalab/core-components-select": "^19.1.1",
16
16
  "classnames": "^2.5.1",
17
17
  "tslib": "^2.4.0"
18
18
  },
@@ -25,5 +25,5 @@
25
25
  "directory": "dist"
26
26
  },
27
27
  "themesVersion": "15.0.2",
28
- "varsVersion": "11.0.1"
28
+ "varsVersion": "11.0.2"
29
29
  }
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  position: sticky;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .field {
4
4
  & svg {
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  box-sizing: border-box;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  @mixin paragraph_primary_small;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .row {
4
4
  cursor: pointer;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  position: relative;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  @mixin paragraph_caps;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  padding-top: 1px;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .content {
4
4
  display: flex;
package/src/utils.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  import React from 'react';
2
2
 
3
- export function isChildInstanceOf<P>(child: React.ReactElement, Component: React.ComponentType<P>) {
3
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
4
+ interface EmptyProps {}
5
+
6
+ export function isChildInstanceOf<P extends EmptyProps>(
7
+ child: React.ReactElement,
8
+ Component: React.ComponentType<P>,
9
+ ) {
4
10
  // мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304
5
- return child.type === React.createElement(Component).type;
11
+ return child.type === React.createElement(Component, {} as P).type;
6
12
  }
package/typings.d.ts CHANGED
@@ -1 +1 @@
1
- export declare type TextAlignProperty = 'center' | 'end' | 'justify' | 'left' | 'match-parent' | 'right' | 'start';
1
+ export type TextAlignProperty = 'center' | 'end' | 'justify' | 'left' | 'match-parent' | 'right' | 'start';
package/utils.d.ts CHANGED
@@ -1,2 +1,5 @@
1
1
  import React from 'react';
2
- export declare function isChildInstanceOf<P>(child: React.ReactElement, Component: React.ComponentType<P>): boolean;
2
+ interface EmptyProps {
3
+ }
4
+ export declare function isChildInstanceOf<P extends EmptyProps>(child: React.ReactElement, Component: React.ComponentType<P>): boolean;
5
+ export {};
package/utils.js CHANGED
@@ -10,7 +10,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
10
 
11
11
  function isChildInstanceOf(child, Component) {
12
12
  // мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304
13
- return child.type === React__default.default.createElement(Component).type;
13
+ return child.type === React__default.default.createElement(Component, {}).type;
14
14
  }
15
15
 
16
16
  exports.isChildInstanceOf = isChildInstanceOf;
package/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["src/utils.ts"],"sourcesContent":["import React from 'react';\n\nexport function isChildInstanceOf<P>(child: React.ReactElement, Component: React.ComponentType<P>) {\n // мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304\n return child.type === React.createElement(Component).type;\n}\n"],"names":["React"],"mappings":";;;;;;;;;;AAEgB,SAAA,iBAAiB,CAAI,KAAyB,EAAE,SAAiC,EAAA;;AAE7F,IAAA,OAAO,KAAK,CAAC,IAAI,KAAKA,sBAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,IAAI;AAC7D;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["src/utils.ts"],"sourcesContent":["import React from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface EmptyProps {}\n\nexport function isChildInstanceOf<P extends EmptyProps>(\n child: React.ReactElement,\n Component: React.ComponentType<P>,\n) {\n // мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304\n return child.type === React.createElement(Component, {} as P).type;\n}\n"],"names":["React"],"mappings":";;;;;;;;;;AAKgB,SAAA,iBAAiB,CAC7B,KAAyB,EACzB,SAAiC,EAAA;;AAGjC,IAAA,OAAO,KAAK,CAAC,IAAI,KAAKA,sBAAK,CAAC,aAAa,CAAC,SAAS,EAAE,EAAO,CAAC,CAAC,IAAI;AACtE;;;;"}