@alfalab/core-components-table 3.0.1 → 3.0.3
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/component.js.map +1 -1
- package/components/pagination/Component.d.ts +2 -2
- package/components/pagination/Component.js.map +1 -1
- package/components/pagination/index.css +9 -9
- package/components/pagination/index.module.css.js +1 -1
- package/components/pagination/index.module.css.js.map +1 -1
- package/components/pagination/select-field/index.css +3 -3
- package/components/pagination/select-field/index.d.ts +1 -1
- package/components/pagination/select-field/index.js.map +1 -1
- package/components/pagination/select-field/index.module.css.js +1 -1
- package/components/pagination/select-field/index.module.css.js.map +1 -1
- package/components/table/Component.d.ts +1 -1
- package/components/table/Component.js.map +1 -1
- package/components/table/index.css +7 -7
- package/components/table/index.module.css.js +1 -1
- package/components/table/index.module.css.js.map +1 -1
- package/components/table/utils.d.ts +1 -1
- package/components/table/utils.js.map +1 -1
- package/components/table-context/index.d.ts +3 -3
- package/components/table-context/index.js +1 -5
- package/components/table-context/index.js.map +1 -1
- package/components/tbody/Component.d.ts +1 -1
- package/components/tbody/Component.js.map +1 -1
- package/components/tbody/index.css +1 -1
- package/components/tbody/index.module.css.js +1 -1
- package/components/tbody/index.module.css.js.map +1 -1
- package/components/tcell/Component.d.ts +1 -1
- package/components/tcell/Component.js.map +1 -1
- package/components/tcell/index.css +6 -6
- package/components/tcell/index.module.css.js +1 -1
- package/components/tcell/index.module.css.js.map +1 -1
- package/components/texpandable-row/Component.d.ts +2 -2
- package/components/texpandable-row/Component.js +1 -1
- package/components/texpandable-row/Component.js.map +1 -1
- package/components/texpandable-row/index.css +4 -4
- package/components/texpandable-row/index.module.css.js +1 -1
- package/components/texpandable-row/index.module.css.js.map +1 -1
- package/components/thead/Component.d.ts +1 -1
- package/components/thead/Component.js.map +1 -1
- package/components/thead/index.css +6 -6
- package/components/thead/index.module.css.js +1 -1
- package/components/thead/index.module.css.js.map +1 -1
- package/components/thead-cell/Component.d.ts +2 -2
- package/components/thead-cell/Component.js.map +1 -1
- package/components/thead-cell/index.css +9 -9
- package/components/thead-cell/index.module.css.js +1 -1
- package/components/thead-cell/index.module.css.js.map +1 -1
- package/components/trow/Component.d.ts +2 -2
- package/components/trow/Component.js.map +1 -1
- package/components/trow/index.css +10 -10
- package/components/trow/index.module.css.js +1 -1
- package/components/trow/index.module.css.js.map +1 -1
- package/components/tsortable-head-cell/Component.d.ts +1 -1
- package/components/tsortable-head-cell/Component.js.map +1 -1
- package/components/tsortable-head-cell/index.css +10 -10
- package/components/tsortable-head-cell/index.module.css.js +1 -1
- package/components/tsortable-head-cell/index.module.css.js.map +1 -1
- package/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
- package/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
- package/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
- package/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
- package/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
- package/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
- package/cssm/component.js.map +1 -1
- package/cssm/components/pagination/Component.d.ts +2 -2
- package/cssm/components/pagination/Component.js.map +1 -1
- package/cssm/components/pagination/index.module.css +1 -1
- package/cssm/components/pagination/select-field/index.d.ts +1 -1
- package/cssm/components/pagination/select-field/index.js.map +1 -1
- package/cssm/components/table/Component.d.ts +1 -1
- package/cssm/components/table/Component.js.map +1 -1
- package/cssm/components/table/index.module.css +1 -1
- package/cssm/components/table/utils.d.ts +1 -1
- package/cssm/components/table/utils.js.map +1 -1
- package/cssm/components/table-context/index.d.ts +3 -3
- package/cssm/components/table-context/index.js +1 -5
- package/cssm/components/table-context/index.js.map +1 -1
- package/cssm/components/tbody/Component.d.ts +1 -1
- package/cssm/components/tbody/Component.js.map +1 -1
- package/cssm/components/tcell/Component.d.ts +1 -1
- package/cssm/components/tcell/Component.js.map +1 -1
- package/cssm/components/tcell/index.module.css +1 -1
- package/cssm/components/texpandable-row/Component.d.ts +2 -2
- package/cssm/components/texpandable-row/Component.js +1 -1
- package/cssm/components/texpandable-row/Component.js.map +1 -1
- package/cssm/components/thead/Component.d.ts +1 -1
- package/cssm/components/thead/Component.js.map +1 -1
- package/cssm/components/thead/index.module.css +1 -1
- package/cssm/components/thead-cell/Component.d.ts +2 -2
- package/cssm/components/thead-cell/Component.js.map +1 -1
- package/cssm/components/thead-cell/index.module.css +1 -1
- package/cssm/components/trow/Component.d.ts +2 -2
- package/cssm/components/trow/Component.js.map +1 -1
- package/cssm/components/trow/index.module.css +3 -3
- package/cssm/components/tsortable-head-cell/Component.d.ts +1 -1
- package/cssm/components/tsortable-head-cell/Component.js.map +1 -1
- package/cssm/components/tsortable-head-cell/index.module.css +3 -3
- package/cssm/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
- package/cssm/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
- package/cssm/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
- package/cssm/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
- package/cssm/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
- package/cssm/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
- package/esm/component.js.map +1 -1
- package/esm/components/pagination/Component.d.ts +2 -2
- package/esm/components/pagination/Component.js.map +1 -1
- package/esm/components/pagination/index.css +9 -9
- package/esm/components/pagination/index.module.css.js +1 -1
- package/esm/components/pagination/index.module.css.js.map +1 -1
- package/esm/components/pagination/select-field/index.css +3 -3
- package/esm/components/pagination/select-field/index.d.ts +1 -1
- package/esm/components/pagination/select-field/index.js.map +1 -1
- package/esm/components/pagination/select-field/index.module.css.js +1 -1
- package/esm/components/pagination/select-field/index.module.css.js.map +1 -1
- package/esm/components/table/Component.d.ts +1 -1
- package/esm/components/table/Component.js.map +1 -1
- package/esm/components/table/index.css +7 -7
- package/esm/components/table/index.module.css.js +1 -1
- package/esm/components/table/index.module.css.js.map +1 -1
- package/esm/components/table/utils.d.ts +1 -1
- package/esm/components/table/utils.js.map +1 -1
- package/esm/components/table-context/index.d.ts +3 -3
- package/esm/components/table-context/index.js +2 -2
- package/esm/components/table-context/index.js.map +1 -1
- package/esm/components/tbody/Component.d.ts +1 -1
- package/esm/components/tbody/Component.js.map +1 -1
- package/esm/components/tbody/index.css +1 -1
- package/esm/components/tbody/index.module.css.js +1 -1
- package/esm/components/tbody/index.module.css.js.map +1 -1
- package/esm/components/tcell/Component.d.ts +1 -1
- package/esm/components/tcell/Component.js.map +1 -1
- package/esm/components/tcell/index.css +6 -6
- package/esm/components/tcell/index.module.css.js +1 -1
- package/esm/components/tcell/index.module.css.js.map +1 -1
- package/esm/components/texpandable-row/Component.d.ts +2 -2
- package/esm/components/texpandable-row/Component.js +1 -1
- package/esm/components/texpandable-row/Component.js.map +1 -1
- package/esm/components/texpandable-row/index.css +4 -4
- package/esm/components/texpandable-row/index.module.css.js +1 -1
- package/esm/components/texpandable-row/index.module.css.js.map +1 -1
- package/esm/components/thead/Component.d.ts +1 -1
- package/esm/components/thead/Component.js.map +1 -1
- package/esm/components/thead/index.css +6 -6
- package/esm/components/thead/index.module.css.js +1 -1
- package/esm/components/thead/index.module.css.js.map +1 -1
- package/esm/components/thead-cell/Component.d.ts +2 -2
- package/esm/components/thead-cell/Component.js.map +1 -1
- package/esm/components/thead-cell/index.css +9 -9
- package/esm/components/thead-cell/index.module.css.js +1 -1
- package/esm/components/thead-cell/index.module.css.js.map +1 -1
- package/esm/components/trow/Component.d.ts +2 -2
- package/esm/components/trow/Component.js.map +1 -1
- package/esm/components/trow/index.css +10 -10
- package/esm/components/trow/index.module.css.js +1 -1
- package/esm/components/trow/index.module.css.js.map +1 -1
- package/esm/components/tsortable-head-cell/Component.d.ts +1 -1
- package/esm/components/tsortable-head-cell/Component.js.map +1 -1
- package/esm/components/tsortable-head-cell/index.css +10 -10
- package/esm/components/tsortable-head-cell/index.module.css.js +1 -1
- package/esm/components/tsortable-head-cell/index.module.css.js.map +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
- package/modern/component.js.map +1 -1
- package/modern/components/pagination/Component.d.ts +2 -2
- package/modern/components/pagination/Component.js.map +1 -1
- package/modern/components/pagination/index.css +9 -9
- package/modern/components/pagination/index.module.css.js +1 -1
- package/modern/components/pagination/index.module.css.js.map +1 -1
- package/modern/components/pagination/select-field/index.css +3 -3
- package/modern/components/pagination/select-field/index.d.ts +1 -1
- package/modern/components/pagination/select-field/index.js.map +1 -1
- package/modern/components/pagination/select-field/index.module.css.js +1 -1
- package/modern/components/pagination/select-field/index.module.css.js.map +1 -1
- package/modern/components/table/Component.d.ts +1 -1
- package/modern/components/table/Component.js.map +1 -1
- package/modern/components/table/index.css +7 -7
- package/modern/components/table/index.module.css.js +1 -1
- package/modern/components/table/index.module.css.js.map +1 -1
- package/modern/components/table/utils.d.ts +1 -1
- package/modern/components/table/utils.js.map +1 -1
- package/modern/components/table-context/index.d.ts +3 -3
- package/modern/components/table-context/index.js +2 -2
- package/modern/components/table-context/index.js.map +1 -1
- package/modern/components/tbody/Component.d.ts +1 -1
- package/modern/components/tbody/Component.js.map +1 -1
- package/modern/components/tbody/index.css +1 -1
- package/modern/components/tbody/index.module.css.js +1 -1
- package/modern/components/tbody/index.module.css.js.map +1 -1
- package/modern/components/tcell/Component.d.ts +1 -1
- package/modern/components/tcell/Component.js.map +1 -1
- package/modern/components/tcell/index.css +6 -6
- package/modern/components/tcell/index.module.css.js +1 -1
- package/modern/components/tcell/index.module.css.js.map +1 -1
- package/modern/components/texpandable-row/Component.d.ts +2 -2
- package/modern/components/texpandable-row/Component.js +1 -1
- package/modern/components/texpandable-row/Component.js.map +1 -1
- package/modern/components/texpandable-row/index.css +4 -4
- package/modern/components/texpandable-row/index.module.css.js +1 -1
- package/modern/components/texpandable-row/index.module.css.js.map +1 -1
- package/modern/components/thead/Component.d.ts +1 -1
- package/modern/components/thead/Component.js.map +1 -1
- package/modern/components/thead/index.css +6 -6
- package/modern/components/thead/index.module.css.js +1 -1
- package/modern/components/thead/index.module.css.js.map +1 -1
- package/modern/components/thead-cell/Component.d.ts +2 -2
- package/modern/components/thead-cell/Component.js.map +1 -1
- package/modern/components/thead-cell/index.css +9 -9
- package/modern/components/thead-cell/index.module.css.js +1 -1
- package/modern/components/thead-cell/index.module.css.js.map +1 -1
- package/modern/components/trow/Component.d.ts +2 -2
- package/modern/components/trow/Component.js.map +1 -1
- package/modern/components/trow/index.css +10 -10
- package/modern/components/trow/index.module.css.js +1 -1
- package/modern/components/trow/index.module.css.js.map +1 -1
- package/modern/components/tsortable-head-cell/Component.d.ts +1 -1
- package/modern/components/tsortable-head-cell/Component.js.map +1 -1
- package/modern/components/tsortable-head-cell/index.css +10 -10
- package/modern/components/tsortable-head-cell/index.module.css.js +1 -1
- package/modern/components/tsortable-head-cell/index.module.css.js.map +1 -1
- package/modern/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
- package/modern/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
- package/modern/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
- package/modern/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
- package/modern/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
- package/modern/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
- package/moderncssm/component.js.map +1 -1
- package/moderncssm/components/pagination/Component.d.ts +2 -2
- package/moderncssm/components/pagination/Component.js.map +1 -1
- package/moderncssm/components/pagination/index.module.css +3 -1
- package/moderncssm/components/pagination/select-field/index.d.ts +1 -1
- package/moderncssm/components/pagination/select-field/index.js.map +1 -1
- package/moderncssm/components/pagination/select-field/index.module.css +2 -1
- package/moderncssm/components/table/Component.d.ts +1 -1
- package/moderncssm/components/table/Component.js.map +1 -1
- package/moderncssm/components/table/index.module.css +3 -1
- package/moderncssm/components/table/utils.d.ts +1 -1
- package/moderncssm/components/table/utils.js.map +1 -1
- package/moderncssm/components/table-context/index.d.ts +3 -3
- package/moderncssm/components/table-context/index.js +2 -2
- package/moderncssm/components/table-context/index.js.map +1 -1
- package/moderncssm/components/tbody/Component.d.ts +1 -1
- package/moderncssm/components/tbody/Component.js.map +1 -1
- package/moderncssm/components/tbody/index.module.css +2 -0
- package/moderncssm/components/tcell/Component.d.ts +1 -1
- package/moderncssm/components/tcell/Component.js.map +1 -1
- package/moderncssm/components/tcell/index.module.css +3 -1
- package/moderncssm/components/texpandable-row/Component.d.ts +2 -2
- package/moderncssm/components/texpandable-row/Component.js +1 -1
- package/moderncssm/components/texpandable-row/Component.js.map +1 -1
- package/moderncssm/components/texpandable-row/index.module.css +2 -0
- package/moderncssm/components/thead/Component.d.ts +1 -1
- package/moderncssm/components/thead/Component.js.map +1 -1
- package/moderncssm/components/thead/index.module.css +3 -1
- package/moderncssm/components/thead-cell/Component.d.ts +2 -2
- package/moderncssm/components/thead-cell/Component.js.map +1 -1
- package/moderncssm/components/thead-cell/index.module.css +3 -1
- package/moderncssm/components/trow/Component.d.ts +2 -2
- package/moderncssm/components/trow/Component.js.map +1 -1
- package/moderncssm/components/trow/index.module.css +5 -3
- package/moderncssm/components/tsortable-head-cell/Component.d.ts +1 -1
- package/moderncssm/components/tsortable-head-cell/Component.js.map +1 -1
- package/moderncssm/components/tsortable-head-cell/index.module.css +5 -3
- package/moderncssm/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
- package/moderncssm/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
- package/moderncssm/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
- package/moderncssm/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
- package/moderncssm/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
- package/moderncssm/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
- package/package.json +3 -3
- package/src/components/pagination/Component.tsx +4 -4
- package/src/components/pagination/index.module.css +1 -1
- package/src/components/pagination/select-field/index.module.css +1 -1
- package/src/components/pagination/select-field/index.tsx +2 -2
- package/src/components/table/Component.tsx +8 -2
- package/src/components/table/index.module.css +1 -1
- package/src/components/table/utils.ts +1 -1
- package/src/components/table-context/{index.tsx → index.ts} +3 -3
- package/src/components/tbody/Component.tsx +1 -1
- package/src/components/tbody/index.module.css +1 -1
- package/src/components/tcell/Component.tsx +1 -1
- package/src/components/tcell/index.module.css +1 -1
- package/src/components/texpandable-row/Component.tsx +3 -3
- package/src/components/texpandable-row/index.module.css +1 -1
- package/src/components/thead/Component.tsx +1 -1
- package/src/components/thead/index.module.css +1 -1
- package/src/components/thead-cell/Component.tsx +2 -2
- package/src/components/thead-cell/index.module.css +1 -1
- package/src/components/trow/Component.tsx +2 -2
- package/src/components/trow/index.module.css +1 -1
- package/src/components/tsortable-head-cell/Component.tsx +1 -1
- package/src/components/tsortable-head-cell/index.module.css +1 -1
- package/src/components/tsortable-head-cell/sort-icon-asc.tsx +1 -1
- package/src/components/tsortable-head-cell/sort-icon-desc.tsx +1 -1
- package/src/components/tsortable-head-cell/sort-icon-unset.tsx +1 -1
- /package/src/{component.tsx → component.ts} +0 -0
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--gap-12: var(--gap-s);
|
|
13
13
|
--gap-16: var(--gap-m);
|
|
14
14
|
--gap-32: var(--gap-2xl);
|
|
15
|
-
} .
|
|
15
|
+
} .table__component_c1mcu {
|
|
16
16
|
font-size: 12px;
|
|
17
17
|
line-height: 16px;
|
|
18
18
|
font-weight: 500;
|
|
@@ -26,24 +26,24 @@
|
|
|
26
26
|
border-bottom: 1px solid var(--color-light-neutral-400);
|
|
27
27
|
background: var(--color-light-base-bg-primary);
|
|
28
28
|
vertical-align: top;
|
|
29
|
-
box-sizing: border-box
|
|
30
|
-
} .
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
} .table__component_c1mcu:first-child {
|
|
31
31
|
padding-left: var(--gap-16);
|
|
32
|
-
} .
|
|
32
|
+
} .table__component_c1mcu:last-child {
|
|
33
33
|
padding-right: var(--gap-16);
|
|
34
|
-
} .
|
|
34
|
+
} .table__component_c1mcu:not(.table__stickyHeader_c1mcu) {
|
|
35
35
|
position: relative;
|
|
36
|
-
} .
|
|
36
|
+
} .table__sortable_c1mcu {
|
|
37
37
|
cursor: pointer;
|
|
38
|
-
} .
|
|
38
|
+
} .table__sorted_c1mcu {
|
|
39
39
|
color: var(--color-light-text-primary);
|
|
40
|
-
} .
|
|
40
|
+
} .table__stickyHeader_c1mcu {
|
|
41
41
|
top: var(--gap-0);
|
|
42
42
|
position: sticky;
|
|
43
43
|
box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);
|
|
44
44
|
border: none;
|
|
45
45
|
z-index: 1;
|
|
46
|
-
} .
|
|
46
|
+
} .table__compactHorizontal_c1mcu {
|
|
47
47
|
padding-left: 6px;
|
|
48
48
|
padding-right: 6px;
|
|
49
49
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"table__component_c1mcu","stickyHeader":"table__stickyHeader_c1mcu","compactHorizontal":"table__compactHorizontal_c1mcu"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/thead-cell/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n @mixin paragraph_caps;\n\n line-height: 20px;\n text-align: left;\n color: var(--color-light-text-primary);\n padding: var(--gap-32) var(--gap-12) var(--gap-4);\n border-bottom: 1px solid var(--color-light-neutral-400);\n background: var(--color-light-base-bg-primary);\n vertical-align: top;\n box-sizing: border-box;\n\n &:first-child {\n padding-left: var(--gap-16);\n }\n\n &:last-child {\n padding-right: var(--gap-16);\n }\n\n &:not(.stickyHeader) {\n position: relative;\n }\n}\n\n.sortable {\n cursor: pointer;\n}\n\n.sorted {\n color: var(--color-light-text-primary);\n}\n\n.stickyHeader {\n top: var(--gap-0);\n position: sticky;\n box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);\n border: none;\n z-index: 1;\n}\n\n.compactHorizontal {\n padding-left: 6px;\n padding-right: 6px;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,cAAc,CAAC,2BAA2B,CAAmE,mBAAmB,CAAC,gCAAgC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/thead-cell/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n @mixin paragraph_caps;\n\n line-height: 20px;\n text-align: left;\n color: var(--color-light-text-primary);\n padding: var(--gap-32) var(--gap-12) var(--gap-4);\n border-bottom: 1px solid var(--color-light-neutral-400);\n background: var(--color-light-base-bg-primary);\n vertical-align: top;\n box-sizing: border-box;\n\n &:first-child {\n padding-left: var(--gap-16);\n }\n\n &:last-child {\n padding-right: var(--gap-16);\n }\n\n &:not(.stickyHeader) {\n position: relative;\n }\n}\n\n.sortable {\n cursor: pointer;\n}\n\n.sorted {\n color: var(--color-light-text-primary);\n}\n\n.stickyHeader {\n top: var(--gap-0);\n position: sticky;\n box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);\n border: none;\n z-index: 1;\n}\n\n.compactHorizontal {\n padding-left: 6px;\n padding-right: 6px;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,cAAc,CAAC,2BAA2B,CAAmE,mBAAmB,CAAC,gCAAgC,CAAC;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
import { TCell, TCellProps } from '../tcell';
|
|
1
|
+
import React, { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type TCell, type TCellProps } from '../tcell';
|
|
3
3
|
declare type TCellElement = React.ReactElement<TCellProps, typeof TCell>;
|
|
4
4
|
export declare type TRowProps = HTMLAttributes<HTMLTableRowElement> & {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/components/trow/Component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport { TCell, TCellProps } from '../tcell';\n\nimport styles from './index.module.css';\n\ntype TCellElement = React.ReactElement<TCellProps, typeof TCell>;\n\nexport type TRowProps = HTMLAttributes<HTMLTableRowElement> & {\n /**\n * Компоненты ячеек\n */\n children: TCellElement | TCellElement[];\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Стиль выбранной строки\n */\n selected?: boolean;\n\n /**\n * Убирает нижнюю границу\n */\n withoutBorder?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const TRow = forwardRef<HTMLTableRowElement, TRowProps>(\n ({ children, className, selected, withoutBorder, dataTestId, ...restProps }, ref) => (\n <tr\n className={cn(styles.component, className, {\n [styles.clickable]: typeof restProps.onClick !== 'undefined',\n [styles.selected]: selected,\n [styles.withoutBorder]: withoutBorder,\n })}\n data-test-id={dataTestId}\n ref={ref}\n {...restProps}\n >\n {React.Children.map(children, (child, index) => React.cloneElement(child, { index }))}\n </tr>\n ),\n);\n\nTRow.displayName = 'TRow';\n"],"names":["forwardRef","__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;IAoCa,IAAI,GAAGA,gBAAU,CAC1B,UAAC,EAA0E,EAAE,GAAG,EAAA;;AAA7E,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,aAAa,GAAA,EAAA,CAAA,aAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAK,SAAS,GAAAC,YAAA,CAAA,EAAA,EAAxE,oEAA0E,CAAF;IAAY,QACjFC,sBACI,CAAA,aAAA,CAAA,IAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,YAAM,CAAC,SAAS,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;YACrC,EAAC,CAAAA,YAAM,CAAC,SAAS,CAAA,GAAG,OAAO,SAAS,CAAC,OAAO,KAAK,WAAW;AAC5D,YAAA,EAAA,CAACA,YAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,YAAA,EAAA,CAACA,YAAM,CAAC,aAAa,CAAA,GAAG,aAAa;AACvC,YAAA,EAAA,EAAA,EAAA,cAAA,EACY,UAAU,EACxB,GAAG,EAAE,GAAG,IACJ,SAAS,CAAA,EAEZH,sBAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAE,KAAK,EAAA,EAAK,OAAAA,sBAAK,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,KAAK,EAAA,KAAA,EAAE,CAAC,CAAA,EAAA,CAAC,CACpF;AACR,CAAA;AAGL,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../src/components/trow/Component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport { type TCell, type TCellProps } from '../tcell';\n\nimport styles from './index.module.css';\n\ntype TCellElement = React.ReactElement<TCellProps, typeof TCell>;\n\nexport type TRowProps = HTMLAttributes<HTMLTableRowElement> & {\n /**\n * Компоненты ячеек\n */\n children: TCellElement | TCellElement[];\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Стиль выбранной строки\n */\n selected?: boolean;\n\n /**\n * Убирает нижнюю границу\n */\n withoutBorder?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const TRow = forwardRef<HTMLTableRowElement, TRowProps>(\n ({ children, className, selected, withoutBorder, dataTestId, ...restProps }, ref) => (\n <tr\n className={cn(styles.component, className, {\n [styles.clickable]: typeof restProps.onClick !== 'undefined',\n [styles.selected]: selected,\n [styles.withoutBorder]: withoutBorder,\n })}\n data-test-id={dataTestId}\n ref={ref}\n {...restProps}\n >\n {React.Children.map(children, (child, index) => React.cloneElement(child, { index }))}\n </tr>\n ),\n);\n\nTRow.displayName = 'TRow';\n"],"names":["forwardRef","__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;IAoCa,IAAI,GAAGA,gBAAU,CAC1B,UAAC,EAA0E,EAAE,GAAG,EAAA;;AAA7E,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,aAAa,GAAA,EAAA,CAAA,aAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAK,SAAS,GAAAC,YAAA,CAAA,EAAA,EAAxE,oEAA0E,CAAF;IAAY,QACjFC,sBACI,CAAA,aAAA,CAAA,IAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,YAAM,CAAC,SAAS,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;YACrC,EAAC,CAAAA,YAAM,CAAC,SAAS,CAAA,GAAG,OAAO,SAAS,CAAC,OAAO,KAAK,WAAW;AAC5D,YAAA,EAAA,CAACA,YAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,YAAA,EAAA,CAACA,YAAM,CAAC,aAAa,CAAA,GAAG,aAAa;AACvC,YAAA,EAAA,EAAA,EAAA,cAAA,EACY,UAAU,EACxB,GAAG,EAAE,GAAG,IACJ,SAAS,CAAA,EAEZH,sBAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAE,KAAK,EAAA,EAAK,OAAAA,sBAAK,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,KAAK,EAAA,KAAA,EAAE,CAAC,CAAA,EAAA,CAAC,CACpF;AACR,CAAA;AAGL,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
--color-light-base-bg-secondary: #f2f3f5;
|
|
4
4
|
} :root {
|
|
5
5
|
--color-static-graphic-solitude: #e8f2fe;
|
|
6
|
-
} .
|
|
6
|
+
} .table__component_1jaqz {
|
|
7
7
|
padding-top: 1px;
|
|
8
8
|
width: 100%;
|
|
9
9
|
transition: background-color 0.2s;
|
|
10
10
|
box-sizing: border-box;
|
|
11
|
-
background: var(--color-light-base-bg-primary)
|
|
12
|
-
} .
|
|
11
|
+
background: var(--color-light-base-bg-primary);
|
|
12
|
+
} .table__component_1jaqz:first-child td {
|
|
13
13
|
border-top: 0;
|
|
14
|
-
} .
|
|
14
|
+
} .table__withoutBorder_1jaqz td {
|
|
15
15
|
border: none;
|
|
16
|
-
} .
|
|
17
|
-
cursor: pointer
|
|
18
|
-
} .
|
|
16
|
+
} .table__clickable_1jaqz {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
} .table__clickable_1jaqz:hover {
|
|
19
19
|
background-color: var(--color-light-base-bg-secondary);
|
|
20
|
-
} .
|
|
21
|
-
background-color: #f2f8ff
|
|
22
|
-
} .
|
|
20
|
+
} .table__selected_1jaqz {
|
|
21
|
+
background-color: #f2f8ff;
|
|
22
|
+
} .table__selected_1jaqz:hover {
|
|
23
23
|
background-color: var(--color-static-graphic-solitude);
|
|
24
24
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"table__component_1jaqz","withoutBorder":"table__withoutBorder_1jaqz","clickable":"table__clickable_1jaqz","selected":"table__selected_1jaqz"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/trow/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n padding-top: 1px;\n width: 100%;\n transition: background-color 0.2s;\n box-sizing: border-box;\n background: var(--color-light-base-bg-primary);\n\n &:first-child td {\n border-top: 0;\n }\n}\n\n.withoutBorder {\n & td {\n border: none;\n }\n}\n\n.clickable {\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-light-base-bg-secondary);\n }\n}\n\n.selected {\n background-color: #f2f8ff; /* нет цвета в палитре */\n\n &:hover {\n background-color: var(--color-static-graphic-solitude);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,eAAe,CAAC,4BAA4B,CAAC,WAAW,CAAC,wBAAwB,CAAC,UAAU,CAAC,uBAAuB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/trow/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n padding-top: 1px;\n width: 100%;\n transition: background-color 0.2s;\n box-sizing: border-box;\n background: var(--color-light-base-bg-primary);\n\n &:first-child td {\n border-top: 0;\n }\n}\n\n.withoutBorder {\n & td {\n border: none;\n }\n}\n\n.clickable {\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-light-base-bg-secondary);\n }\n}\n\n.selected {\n background-color: #f2f8ff; /* нет цвета в палитре */\n\n &:hover {\n background-color: var(--color-static-graphic-solitude);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,eAAe,CAAC,4BAA4B,CAAC,WAAW,CAAC,wBAAwB,CAAC,UAAU,CAAC,uBAAuB,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/components/tsortable-head-cell/Component.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport cn from 'classnames';\n\nimport { THeadCell, THeadCellProps } from '../thead-cell';\n\nimport { SortIconAsc } from './sort-icon-asc';\nimport { SortIconDesc } from './sort-icon-desc';\nimport { SortIconUnset } from './sort-icon-unset';\n\nimport styles from './index.module.css';\n\nexport type TSortableHeadCellProps = THeadCellProps & {\n isSortedDesc?: boolean;\n defaultIsSortedDesc?: boolean;\n onSort?: () => void;\n};\n\nexport const TSortableHeadCell = ({\n children,\n className,\n defaultIsSortedDesc,\n isSortedDesc,\n textAlign,\n onSort,\n ...restProps\n}: TSortableHeadCellProps) => {\n const SortIcon = useMemo(() => {\n let value = isSortedDesc;\n\n if (value === undefined) value = defaultIsSortedDesc;\n\n if (typeof value === 'boolean') return value ? SortIconDesc : SortIconAsc;\n\n return SortIconUnset;\n }, [defaultIsSortedDesc, isSortedDesc]);\n\n return (\n <THeadCell className={className} textAlign={textAlign} {...restProps}>\n <div className={cn(styles.content, { [styles.reverse]: textAlign === 'right' })}>\n {children}\n <SortIcon\n onClick={onSort}\n className={cn(styles.icon, {\n [styles.sorted]: isSortedDesc !== undefined,\n })}\n />\n </div>\n </THeadCell>\n );\n};\n"],"names":["__rest","useMemo","SortIconDesc","SortIconAsc","SortIconUnset","React","THeadCell","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;;;AAiBO,IAAM,iBAAiB,GAAG,UAAC,EAQT,EAAA;;IAPrB,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,mBAAmB,yBAAA,EACnB,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,MAAM,YAAA,EACH,SAAS,GAPkBA,YAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,QAAA,CAQjC,CADe;IAEZ,IAAM,QAAQ,GAAGC,aAAO,CAAC,YAAA;QACrB,IAAI,KAAK,GAAG,YAAY;QAExB,IAAI,KAAK,KAAK,SAAS;YAAE,KAAK,GAAG,mBAAmB;QAEpD,IAAI,OAAO,KAAK,KAAK,SAAS;YAAE,OAAO,KAAK,GAAGC,yBAAY,GAAGC,uBAAW;AAEzE,QAAA,OAAOC,2BAAa;AACxB,KAAC,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;AAEvC,IAAA,QACIC,sBAAA,CAAA,aAAA,CAACC,mBAAS,EAAAC,cAAA,CAAA,EAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAA,EAAM,SAAS,CAAA;AAChE,QAAAF,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEG,mBAAE,CAACC,YAAM,CAAC,OAAO,GAAA,EAAA,GAAA,EAAA,EAAI,EAAC,CAAAA,YAAM,CAAC,OAAO,CAAA,GAAG,SAAS,KAAK,OAAO,EAAG,EAAA,EAAA,EAAA;YAC1E,QAAQ;AACT,YAAAJ,sBAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EACL,OAAO,EAAE,MAAM,EACf,SAAS,EAAEG,mBAAE,CAACC,YAAM,CAAC,IAAI,GAAA,EAAA,GAAA,EAAA;AACrB,oBAAA,EAAA,CAACA,YAAM,CAAC,MAAM,CAAG,GAAA,YAAY,KAAK,SAAS;wBAC7C,EACJ,CAAA,CACA,CACE;AAEpB;;;;"}
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../src/components/tsortable-head-cell/Component.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport cn from 'classnames';\n\nimport { THeadCell, type THeadCellProps } from '../thead-cell';\n\nimport { SortIconAsc } from './sort-icon-asc';\nimport { SortIconDesc } from './sort-icon-desc';\nimport { SortIconUnset } from './sort-icon-unset';\n\nimport styles from './index.module.css';\n\nexport type TSortableHeadCellProps = THeadCellProps & {\n isSortedDesc?: boolean;\n defaultIsSortedDesc?: boolean;\n onSort?: () => void;\n};\n\nexport const TSortableHeadCell = ({\n children,\n className,\n defaultIsSortedDesc,\n isSortedDesc,\n textAlign,\n onSort,\n ...restProps\n}: TSortableHeadCellProps) => {\n const SortIcon = useMemo(() => {\n let value = isSortedDesc;\n\n if (value === undefined) value = defaultIsSortedDesc;\n\n if (typeof value === 'boolean') return value ? SortIconDesc : SortIconAsc;\n\n return SortIconUnset;\n }, [defaultIsSortedDesc, isSortedDesc]);\n\n return (\n <THeadCell className={className} textAlign={textAlign} {...restProps}>\n <div className={cn(styles.content, { [styles.reverse]: textAlign === 'right' })}>\n {children}\n <SortIcon\n onClick={onSort}\n className={cn(styles.icon, {\n [styles.sorted]: isSortedDesc !== undefined,\n })}\n />\n </div>\n </THeadCell>\n );\n};\n"],"names":["__rest","useMemo","SortIconDesc","SortIconAsc","SortIconUnset","React","THeadCell","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;;;AAiBO,IAAM,iBAAiB,GAAG,UAAC,EAQT,EAAA;;IAPrB,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,mBAAmB,yBAAA,EACnB,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,MAAM,YAAA,EACH,SAAS,GAPkBA,YAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,QAAA,CAQjC,CADe;IAEZ,IAAM,QAAQ,GAAGC,aAAO,CAAC,YAAA;QACrB,IAAI,KAAK,GAAG,YAAY;QAExB,IAAI,KAAK,KAAK,SAAS;YAAE,KAAK,GAAG,mBAAmB;QAEpD,IAAI,OAAO,KAAK,KAAK,SAAS;YAAE,OAAO,KAAK,GAAGC,yBAAY,GAAGC,uBAAW;AAEzE,QAAA,OAAOC,2BAAa;AACxB,KAAC,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;AAEvC,IAAA,QACIC,sBAAA,CAAA,aAAA,CAACC,mBAAS,EAAAC,cAAA,CAAA,EAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAA,EAAM,SAAS,CAAA;AAChE,QAAAF,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEG,mBAAE,CAACC,YAAM,CAAC,OAAO,GAAA,EAAA,GAAA,EAAA,EAAI,EAAC,CAAAA,YAAM,CAAC,OAAO,CAAA,GAAG,SAAS,KAAK,OAAO,EAAG,EAAA,EAAA,EAAA;YAC1E,QAAQ;AACT,YAAAJ,sBAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EACL,OAAO,EAAE,MAAM,EACf,SAAS,EAAEG,mBAAE,CAACC,YAAM,CAAC,IAAI,GAAA,EAAA,GAAA,EAAA;AACrB,oBAAA,EAAA,CAACA,YAAM,CAAC,MAAM,CAAG,GAAA,YAAY,KAAK,SAAS;wBAC7C,EACJ,CAAA,CACA,CACE;AAEpB;;;;"}
|
|
@@ -6,25 +6,25 @@
|
|
|
6
6
|
--gap-xs: 8px;
|
|
7
7
|
--gap-0: 0px;
|
|
8
8
|
--gap-8: var(--gap-xs);
|
|
9
|
-
} .
|
|
9
|
+
} .table__content_hmysw {
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: flex-start;
|
|
12
|
-
} .
|
|
12
|
+
} .table__icon_hmysw {
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
margin-left: var(--gap-8);
|
|
15
15
|
margin-top: 1px;
|
|
16
16
|
color: var(--color-light-neutral-700);
|
|
17
17
|
transition: color 0.2s ease;
|
|
18
|
-
flex-shrink: 0
|
|
19
|
-
} .
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
} .table__icon_hmysw:hover {
|
|
20
20
|
color: var(--color-light-neutral-translucent-1300);
|
|
21
|
-
} .
|
|
22
|
-
flex-direction: row-reverse
|
|
23
|
-
} .
|
|
21
|
+
} .table__reverse_hmysw {
|
|
22
|
+
flex-direction: row-reverse;
|
|
23
|
+
} .table__reverse_hmysw .table__icon_hmysw {
|
|
24
24
|
margin-left: var(--gap-0);
|
|
25
25
|
margin-right: var(--gap-8);
|
|
26
|
-
} .
|
|
27
|
-
color: var(--color-light-status-info)
|
|
28
|
-
} .
|
|
26
|
+
} .table__sorted_hmysw {
|
|
27
|
+
color: var(--color-light-status-info);
|
|
28
|
+
} .table__sorted_hmysw:hover {
|
|
29
29
|
color: var(--color-light-status-info);
|
|
30
30
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"content":"
|
|
5
|
+
var styles = {"content":"table__content_hmysw","icon":"table__icon_hmysw","reverse":"table__reverse_hmysw","sorted":"table__sorted_hmysw"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/tsortable-head-cell/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.content {\n display: flex;\n align-items: flex-start;\n}\n\n.icon {\n cursor: pointer;\n margin-left: var(--gap-8);\n\n /**\n * иконка сортировки должна быть выровнена по верхнему краю,\n * т.к. текст может быть в две строки\n */\n margin-top: 1px;\n color: var(--color-light-neutral-700);\n transition: color 0.2s ease;\n flex-shrink: 0;\n\n &:hover {\n color: var(--color-light-neutral-translucent-1300);\n }\n}\n\n.reverse {\n flex-direction: row-reverse;\n\n & .icon {\n margin-left: var(--gap-0);\n margin-right: var(--gap-8);\n }\n}\n\n.sorted {\n color: var(--color-light-status-info);\n\n &:hover {\n color: var(--color-light-status-info);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,qBAAqB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/tsortable-head-cell/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.content {\n display: flex;\n align-items: flex-start;\n}\n\n.icon {\n cursor: pointer;\n margin-left: var(--gap-8);\n\n /**\n * иконка сортировки должна быть выровнена по верхнему краю,\n * т.к. текст может быть в две строки\n */\n margin-top: 1px;\n color: var(--color-light-neutral-700);\n transition: color 0.2s ease;\n flex-shrink: 0;\n\n &:hover {\n color: var(--color-light-neutral-translucent-1300);\n }\n}\n\n.reverse {\n flex-direction: row-reverse;\n\n & .icon {\n margin-left: var(--gap-0);\n margin-right: var(--gap-8);\n }\n}\n\n.sorted {\n color: var(--color-light-status-info);\n\n &:hover {\n color: var(--color-light-status-info);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,qBAAqB,CAAC;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React, { SVGProps } from 'react';
|
|
1
|
+
import React, { type SVGProps } from 'react';
|
|
2
2
|
export declare const SortIconAsc: React.FC<SVGProps<SVGSVGElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-icon-asc.js","sources":["../../src/components/tsortable-head-cell/sort-icon-asc.tsx"],"sourcesContent":["import React, { SVGProps } from 'react';\n\nexport const SortIconAsc: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3.00004 10C3.00004 10 11.4477 10 12 10C12 9.33333 12.0001 8.16667 12.0001 7.5H3.0001C3.00006 8 3.0001 9.5 3.00004 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H9C9 5.33333 9 4.16667 9 3.5C9 3.5 3.55238 3.5 3.0001 3.5ZM3.00009 14C3.21041 14 15 14 15 14C15 13.5 15 12 15 11.5C15 11.5 3.55238 11.5 3.00009 11.5C3 12 3 13.5 3.00009 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,WAAW,GAAsC,UAAC,KAAK,EAAK,EAAA,QACrEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,6UAA6U,EAAA,CAAG,CACtV,EACT;;;;"}
|
|
1
|
+
{"version":3,"file":"sort-icon-asc.js","sources":["../../src/components/tsortable-head-cell/sort-icon-asc.tsx"],"sourcesContent":["import React, { type SVGProps } from 'react';\n\nexport const SortIconAsc: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3.00004 10C3.00004 10 11.4477 10 12 10C12 9.33333 12.0001 8.16667 12.0001 7.5H3.0001C3.00006 8 3.0001 9.5 3.00004 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H9C9 5.33333 9 4.16667 9 3.5C9 3.5 3.55238 3.5 3.0001 3.5ZM3.00009 14C3.21041 14 15 14 15 14C15 13.5 15 12 15 11.5C15 11.5 3.55238 11.5 3.00009 11.5C3 12 3 13.5 3.00009 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,WAAW,GAAsC,UAAC,KAAK,EAAK,EAAA,QACrEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,6UAA6U,EAAA,CAAG,CACtV,EACT;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React, { SVGProps } from 'react';
|
|
1
|
+
import React, { type SVGProps } from 'react';
|
|
2
2
|
export declare const SortIconDesc: React.FC<SVGProps<SVGSVGElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-icon-desc.js","sources":["../../src/components/tsortable-head-cell/sort-icon-desc.tsx"],"sourcesContent":["import React, { SVGProps } from 'react';\n\nexport const SortIconDesc: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3.00004 10C3.00004 10 11.4477 10 12 10C12 9.33333 12.0001 8.16667 12.0001 7.5H3.0001C3.00006 8 3.0001 9.5 3.00004 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H15C15 5.33333 15 4.16667 15 3.5C15 3.5 3.55238 3.5 3.0001 3.5ZM3.00009 14C3.21041 14 9 14 9 14C9 13.5 9 12 9 11.5C9 11.5 3.55238 11.5 3.00009 11.5C3 12 3 13.5 3.00009 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,YAAY,GAAsC,UAAC,KAAK,EAAK,EAAA,QACtEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,4UAA4U,EAAA,CAAG,CACrV,EACT;;;;"}
|
|
1
|
+
{"version":3,"file":"sort-icon-desc.js","sources":["../../src/components/tsortable-head-cell/sort-icon-desc.tsx"],"sourcesContent":["import React, { type SVGProps } from 'react';\n\nexport const SortIconDesc: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3.00004 10C3.00004 10 11.4477 10 12 10C12 9.33333 12.0001 8.16667 12.0001 7.5H3.0001C3.00006 8 3.0001 9.5 3.00004 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H15C15 5.33333 15 4.16667 15 3.5C15 3.5 3.55238 3.5 3.0001 3.5ZM3.00009 14C3.21041 14 9 14 9 14C9 13.5 9 12 9 11.5C9 11.5 3.55238 11.5 3.00009 11.5C3 12 3 13.5 3.00009 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,YAAY,GAAsC,UAAC,KAAK,EAAK,EAAA,QACtEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,4UAA4U,EAAA,CAAG,CACrV,EACT;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React, { SVGProps } from 'react';
|
|
1
|
+
import React, { type SVGProps } from 'react';
|
|
2
2
|
export declare const SortIconUnset: React.FC<SVGProps<SVGSVGElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-icon-unset.js","sources":["../../src/components/tsortable-head-cell/sort-icon-unset.tsx"],"sourcesContent":["import React, { SVGProps } from 'react';\n\nexport const SortIconUnset: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3 10C3 10 10.4477 10 11 10C11 9.33333 11.0001 8.16667 11.0001 7.5H3.00006C3.00002 8 3.00006 9.5 3 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H15C15 5.33333 15 4.16667 15 3.5C15 3.5 3.55238 3.5 3.0001 3.5ZM3 14C3.21032 14 14 14 14 14C14 13.5 14 12 14 11.5C14 11.5 3.55228 11.5 3 11.5C2.99991 12 2.99991 13.5 3 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,aAAa,GAAsC,UAAC,KAAK,EAAK,EAAA,QACvEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,4TAA4T,EAAA,CAAG,CACrU,EACT;;;;"}
|
|
1
|
+
{"version":3,"file":"sort-icon-unset.js","sources":["../../src/components/tsortable-head-cell/sort-icon-unset.tsx"],"sourcesContent":["import React, { type SVGProps } from 'react';\n\nexport const SortIconUnset: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3 10C3 10 10.4477 10 11 10C11 9.33333 11.0001 8.16667 11.0001 7.5H3.00006C3.00002 8 3.00006 9.5 3 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H15C15 5.33333 15 4.16667 15 3.5C15 3.5 3.55238 3.5 3.0001 3.5ZM3 14C3.21032 14 14 14 14 14C14 13.5 14 12 14 11.5C14 11.5 3.55228 11.5 3 11.5C2.99991 12 2.99991 13.5 3 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,aAAa,GAAsC,UAAC,KAAK,EAAK,EAAA,QACvEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,4TAA4T,EAAA,CAAG,CACrU,EACT;;;;"}
|
package/cssm/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../src/component.
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../src/component.ts"],"sourcesContent":["import {\n Pagination,\n Table as TableComponent,\n TBody,\n TCell,\n TExpandableRow,\n THead,\n THeadCell,\n TRow,\n TSortableHeadCell,\n} from './components';\n\nexport const Table = Object.assign(TableComponent, {\n TBody,\n THead,\n THeadCell,\n TSortableHeadCell,\n TCell,\n TRow,\n TExpandableRow,\n Pagination,\n});\n\nexport {\n TableComponent,\n TBody,\n THead,\n THeadCell,\n TSortableHeadCell,\n TCell,\n TRow,\n TExpandableRow,\n Pagination,\n};\n"],"names":["TableComponent","TBody","THead","THeadCell","TSortableHeadCell","TCell","TRow","TExpandableRow","Pagination"],"mappings":";;;;;;;;;;;;;;IAYa,KAAK,GAAG,MAAM,CAAC,MAAM,CAACA,eAAc,EAAE;AAC/C,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,SAAS,EAAAC,qBAAA;AACT,IAAA,iBAAiB,EAAAC,6BAAA;AACjB,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,IAAI,EAAAC,gBAAA;AACJ,IAAA,cAAc,EAAAC,0BAAA;AACd,IAAA,UAAU,EAAAC,sBAAA;AACb,CAAA;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { PaginationProps as CorePaginationProps } from '@alfalab/core-components-pagination/cssm';
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type PaginationProps as CorePaginationProps } from '@alfalab/core-components-pagination/cssm';
|
|
3
3
|
export declare type PaginationProps = CorePaginationProps & {
|
|
4
4
|
/**
|
|
5
5
|
* Количество строк на страницу
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/pagination/Component.tsx"],"sourcesContent":["import React, { FC, useCallback, useContext, useMemo } from 'react';\nimport cn from 'classnames';\n\nimport {\n Pagination as CorePagination,\n PaginationProps as CorePaginationProps,\n} from '@alfalab/core-components-pagination';\nimport { SelectDesktop, SelectDesktopProps } from '@alfalab/core-components-select/desktop';\nimport { BaseSelectChangePayload } from '@alfalab/core-components-select/shared';\n\nimport { TableContext } from '../table-context';\n\nimport { CustomSelectField } from './select-field';\n\nimport styles from './index.module.css';\n\nexport type PaginationProps = CorePaginationProps & {\n /**\n * Количество строк на страницу\n */\n perPage?: number;\n\n /**\n * Возможные варианты разбивки\n */\n possiblePerPage?: number[];\n\n /**\n * Обработчик переключения perPage\n */\n onPerPageChange?: (perPage: number) => void;\n\n /**\n * Скрывает переключатель количества строк на страницу\n */\n hidePerPageSelect?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const Pagination: FC<PaginationProps> = ({\n perPage = 25,\n possiblePerPage = [25, 50, 100],\n onPerPageChange = () => null,\n hidePerPageSelect = false,\n pagesCount,\n onPageChange = () => null,\n className,\n dataTestId,\n ...restPaginationProps\n}) => {\n const { wrapperRef } = useContext(TableContext);\n\n const options = useMemo(\n () =>\n Array.from(new Set<number>(possiblePerPage.concat(perPage)))\n .sort((a, b) => a - b)\n .map((value) => ({\n key: value.toString(),\n content: `Показывать по ${value}`,\n })),\n [perPage, possiblePerPage],\n );\n\n const handlePerPageChange: SelectDesktopProps['onChange'] = useCallback(\n ({ selected }: BaseSelectChangePayload) => {\n onPerPageChange(Number(selected?.key));\n },\n [onPerPageChange],\n );\n\n const handlePageChange = useCallback(\n (pageIndex: number) => {\n onPageChange(pageIndex);\n\n setTimeout(() => {\n if (wrapperRef.current) {\n wrapperRef.current.scrollIntoView();\n }\n }, 0);\n },\n [onPageChange, wrapperRef],\n );\n\n return (\n <div className={cn(styles.component, className)} data-test-id={dataTestId}>\n {hidePerPageSelect === false && (\n <SelectDesktop\n options={options}\n selected={perPage.toString()}\n onChange={handlePerPageChange}\n preventFlip={false}\n size='s'\n className={styles.select}\n optionsListClassName={styles.menu}\n optionClassName={styles.option}\n Field={CustomSelectField}\n />\n )}\n\n {pagesCount > 1 && (\n <CorePagination\n pagesCount={pagesCount}\n onPageChange={handlePageChange}\n className={styles.pagination}\n {...restPaginationProps}\n />\n )}\n </div>\n );\n};\n"],"names":["__rest","useContext","TableContext","useMemo","useCallback","React","cn","styles","SelectDesktop","CustomSelectField","CorePagination","__assign"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/pagination/Component.tsx"],"sourcesContent":["import React, { type FC, useCallback, useContext, useMemo } from 'react';\nimport cn from 'classnames';\n\nimport {\n Pagination as CorePagination,\n type PaginationProps as CorePaginationProps,\n} from '@alfalab/core-components-pagination';\nimport { SelectDesktop, type SelectDesktopProps } from '@alfalab/core-components-select/desktop';\nimport { type BaseSelectChangePayload } from '@alfalab/core-components-select/shared';\n\nimport { TableContext } from '../table-context';\n\nimport { CustomSelectField } from './select-field';\n\nimport styles from './index.module.css';\n\nexport type PaginationProps = CorePaginationProps & {\n /**\n * Количество строк на страницу\n */\n perPage?: number;\n\n /**\n * Возможные варианты разбивки\n */\n possiblePerPage?: number[];\n\n /**\n * Обработчик переключения perPage\n */\n onPerPageChange?: (perPage: number) => void;\n\n /**\n * Скрывает переключатель количества строк на страницу\n */\n hidePerPageSelect?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const Pagination: FC<PaginationProps> = ({\n perPage = 25,\n possiblePerPage = [25, 50, 100],\n onPerPageChange = () => null,\n hidePerPageSelect = false,\n pagesCount,\n onPageChange = () => null,\n className,\n dataTestId,\n ...restPaginationProps\n}) => {\n const { wrapperRef } = useContext(TableContext);\n\n const options = useMemo(\n () =>\n Array.from(new Set<number>(possiblePerPage.concat(perPage)))\n .sort((a, b) => a - b)\n .map((value) => ({\n key: value.toString(),\n content: `Показывать по ${value}`,\n })),\n [perPage, possiblePerPage],\n );\n\n const handlePerPageChange: SelectDesktopProps['onChange'] = useCallback(\n ({ selected }: BaseSelectChangePayload) => {\n onPerPageChange(Number(selected?.key));\n },\n [onPerPageChange],\n );\n\n const handlePageChange = useCallback(\n (pageIndex: number) => {\n onPageChange(pageIndex);\n\n setTimeout(() => {\n if (wrapperRef.current) {\n wrapperRef.current.scrollIntoView();\n }\n }, 0);\n },\n [onPageChange, wrapperRef],\n );\n\n return (\n <div className={cn(styles.component, className)} data-test-id={dataTestId}>\n {hidePerPageSelect === false && (\n <SelectDesktop\n options={options}\n selected={perPage.toString()}\n onChange={handlePerPageChange}\n preventFlip={false}\n size='s'\n className={styles.select}\n optionsListClassName={styles.menu}\n optionClassName={styles.option}\n Field={CustomSelectField}\n />\n )}\n\n {pagesCount > 1 && (\n <CorePagination\n pagesCount={pagesCount}\n onPageChange={handlePageChange}\n className={styles.pagination}\n {...restPaginationProps}\n />\n )}\n </div>\n );\n};\n"],"names":["__rest","useContext","TableContext","useMemo","useCallback","React","cn","styles","SelectDesktop","CustomSelectField","CorePagination","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;AA2CO,IAAM,UAAU,GAAwB,UAAC,EAU/C,EAAA;AATG,IAAA,IAAA,EAAY,GAAA,EAAA,CAAA,OAAA,EAAZ,OAAO,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACZ,EAAA,GAAA,EAAA,CAAA,eAA+B,EAA/B,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,GAAA,EAAA,EAC/B,EAA4B,GAAA,EAAA,CAAA,eAAA,EAA5B,eAAe,GAAA,EAAA,KAAA,MAAA,GAAG,YAAM,EAAA,OAAA,IAAI,CAAA,EAAA,GAAA,EAAA,EAC5B,EAAA,GAAA,EAAA,CAAA,iBAAyB,EAAzB,iBAAiB,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,GAAA,EAAA,EACzB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,EAAA,GAAA,EAAA,CAAA,YAAyB,EAAzB,YAAY,GAAG,EAAA,KAAA,MAAA,GAAA,YAAA,EAAM,OAAA,IAAI,CAAJ,EAAI,GAAA,EAAA,EACzB,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACP,mBAAmB,GAAAA,YAAA,CAAA,EAAA,EATsB,+HAU/C,CADyB;AAEd,IAAA,IAAA,UAAU,GAAKC,gBAAU,CAACC,kBAAY,CAAC,WAA7B;IAElB,IAAM,OAAO,GAAGC,aAAO,CACnB,YAAA;AACI,QAAA,OAAA,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAS,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACtD,aAAA,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,EAAA,EAAK,OAAA,CAAC,GAAG,CAAC,CAAL,EAAK;AACpB,aAAA,GAAG,CAAC,UAAC,KAAK,EAAA,EAAK,QAAC;AACb,YAAA,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE;YACrB,OAAO,EAAE,4EAAiB,CAAA,MAAA,CAAA,KAAK,CAAE;SACpC,EAAC,EAAA,CAAC;AALP,KAKO,EACX,CAAC,OAAO,EAAE,eAAe,CAAC,CAC7B;AAED,IAAA,IAAM,mBAAmB,GAAmCC,iBAAW,CACnE,UAAC,EAAqC,EAAA;AAAnC,QAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA;AACP,QAAA,eAAe,CAAC,MAAM,CAAC,QAAQ,KAAR,IAAA,IAAA,QAAQ,KAAR,MAAA,GAAA,MAAA,GAAA,QAAQ,CAAE,GAAG,CAAC,CAAC;AAC1C,KAAC,EACD,CAAC,eAAe,CAAC,CACpB;AAED,IAAA,IAAM,gBAAgB,GAAGA,iBAAW,CAChC,UAAC,SAAiB,EAAA;QACd,YAAY,CAAC,SAAS,CAAC;AAEvB,QAAA,UAAU,CAAC,YAAA;YACP,IAAI,UAAU,CAAC,OAAO,EAAE;AACpB,gBAAA,UAAU,CAAC,OAAO,CAAC,cAAc,EAAE;AACtC;SACJ,EAAE,CAAC,CAAC;AACT,KAAC,EACD,CAAC,YAAY,EAAE,UAAU,CAAC,CAC7B;AAED,IAAA,QACIC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,kBAAgB,UAAU,EAAA;QACpE,iBAAiB,KAAK,KAAK,KACxBF,sBAAA,CAAA,aAAA,CAACG,qBAAa,EACV,EAAA,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,EAC5B,QAAQ,EAAE,mBAAmB,EAC7B,WAAW,EAAE,KAAK,EAClB,IAAI,EAAC,GAAG,EACR,SAAS,EAAED,uBAAM,CAAC,MAAM,EACxB,oBAAoB,EAAEA,uBAAM,CAAC,IAAI,EACjC,eAAe,EAAEA,uBAAM,CAAC,MAAM,EAC9B,KAAK,EAAEE,yBAAiB,EAAA,CAC1B,CACL;QAEA,UAAU,GAAG,CAAC,KACXJ,sBAAA,CAAA,aAAA,CAACK,eAAc,EAAAC,cAAA,CAAA,EACX,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,gBAAgB,EAC9B,SAAS,EAAEJ,uBAAM,CAAC,UAAU,EACxB,EAAA,mBAAmB,CACzB,CAAA,CACL,CACC;AAEd;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SelectProps } from '@alfalab/core-components-select/cssm';
|
|
1
|
+
import { type SelectProps } from '@alfalab/core-components-select/cssm';
|
|
2
2
|
export declare const CustomSelectField: SelectProps['Field'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/pagination/select-field/index.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { Button, ButtonProps } from '@alfalab/core-components-button';\nimport { SelectProps } from '@alfalab/core-components-select';\n\nimport styles from './index.module.css';\n\nexport const CustomSelectField: SelectProps['Field'] = ({ selected, innerProps, Arrow, open }) => {\n const { ref, ...restInnerProps } = innerProps;\n\n return (\n <div ref={ref}>\n <Button\n {...(restInnerProps as ButtonProps)}\n size='xxs'\n view='transparent'\n className={cn(styles.field, { [styles.open]: open })}\n rightAddons={Arrow}\n >\n {selected?.content}\n </Button>\n </div>\n );\n};\n"],"names":["__rest","React","Button","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;AAQO,IAAM,iBAAiB,GAAyB,UAAC,EAAqC,EAAA;;QAAnC,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,IAAI,GAAA,EAAA,CAAA,IAAA;IAC/E,IAAA,GAAG,GAAwB,UAAU,CAAlC,GAAA,EAAK,cAAc,GAAAA,YAAA,CAAK,UAAU,EAAvC,CAA0B,KAAA,CAAA,CAAF;AAE9B,IAAA,QACIC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,GAAG,EAAA;AACT,QAAAA,sBAAA,CAAA,aAAA,CAACC,WAAM,EACEC,cAAA,CAAA,EAAA,EAAA,cAA8B,IACnC,IAAI,EAAC,KAAK,EACV,IAAI,EAAC,aAAa,EAClB,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,KAAK,GAAI,EAAA,GAAA,EAAA,EAAA,EAAA,CAACA,uBAAM,CAAC,IAAI,CAAG,GAAA,IAAI,MAAG,EACpD,WAAW,EAAE,KAAK,EAAA,CAAA,EAEjB,QAAQ,KAAR,IAAA,IAAA,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CACb,CACP;AAEd;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/pagination/select-field/index.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { Button, type ButtonProps } from '@alfalab/core-components-button';\nimport { type SelectProps } from '@alfalab/core-components-select';\n\nimport styles from './index.module.css';\n\nexport const CustomSelectField: SelectProps['Field'] = ({ selected, innerProps, Arrow, open }) => {\n const { ref, ...restInnerProps } = innerProps;\n\n return (\n <div ref={ref}>\n <Button\n {...(restInnerProps as ButtonProps)}\n size='xxs'\n view='transparent'\n className={cn(styles.field, { [styles.open]: open })}\n rightAddons={Arrow}\n >\n {selected?.content}\n </Button>\n </div>\n );\n};\n"],"names":["__rest","React","Button","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;AAQO,IAAM,iBAAiB,GAAyB,UAAC,EAAqC,EAAA;;QAAnC,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,IAAI,GAAA,EAAA,CAAA,IAAA;IAC/E,IAAA,GAAG,GAAwB,UAAU,CAAlC,GAAA,EAAK,cAAc,GAAAA,YAAA,CAAK,UAAU,EAAvC,CAA0B,KAAA,CAAA,CAAF;AAE9B,IAAA,QACIC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,GAAG,EAAA;AACT,QAAAA,sBAAA,CAAA,aAAA,CAACC,WAAM,EACEC,cAAA,CAAA,EAAA,EAAA,cAA8B,IACnC,IAAI,EAAC,KAAK,EACV,IAAI,EAAC,aAAa,EAClB,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,KAAK,GAAI,EAAA,GAAA,EAAA,EAAA,EAAA,CAACA,uBAAM,CAAC,IAAI,CAAG,GAAA,IAAI,MAAG,EACpD,WAAW,EAAE,KAAK,EAAA,CAAA,EAEjB,QAAQ,KAAR,IAAA,IAAA,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CACb,CACP;AAEd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/table/Component.tsx"],"sourcesContent":["import React, {
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/table/Component.tsx"],"sourcesContent":["import React, {\n forwardRef,\n type ReactNode,\n type TableHTMLAttributes,\n useMemo,\n useRef,\n} from 'react';\nimport cn from 'classnames';\n\nimport { type ColumnConfiguration, TableContext } from '../table-context';\n\nimport { findAllHeadCellsProps } from './utils';\n\nimport styles from './index.module.css';\n\nexport type TableProps = TableHTMLAttributes<HTMLTableElement> & {\n /**\n * Компактный вид\n */\n compactView?: boolean;\n\n /**\n * Уменьшение горизонтальных паддингов\n */\n compactHorizontal?: boolean;\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дочерние компоненты\n */\n children: React.ReactElement | React.ReactElement[];\n\n /**\n * Оборачивает таблицу в стилизованный контейнер\n */\n wrapper?: boolean;\n\n /**\n * Слот для пагинации\n */\n pagination?: ReactNode;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n\n /**\n * Если true то заголовок будет фиксироваться при скроле\n */\n stickyHeader?: boolean;\n};\n\nexport const Table = forwardRef<HTMLTableElement, TableProps>(\n (\n {\n className,\n children,\n compactView = false,\n compactHorizontal = false,\n wrapper = true,\n pagination,\n dataTestId,\n stickyHeader = false,\n ...restProps\n },\n ref,\n ) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const columnsConfiguration: ColumnConfiguration[] = useMemo(\n () =>\n findAllHeadCellsProps(children).map((columnProps, index) => ({\n width: columnProps.width,\n textAlign: columnProps.textAlign,\n hidden: columnProps.hidden,\n index,\n })),\n [children],\n );\n\n /* eslint-disable react/jsx-no-constructed-context-values */\n return (\n <TableContext.Provider\n value={{\n stickyHeader,\n columnsConfiguration,\n compactView,\n compactHorizontal,\n wrapperRef,\n }}\n >\n <div\n ref={wrapperRef}\n className={cn(styles.component, className, {\n [styles.wrapper]: wrapper,\n [styles.hasPagination]: !!pagination,\n [styles.stickyHeader]: stickyHeader,\n })}\n data-test-id={dataTestId}\n >\n <table ref={ref} className={styles.table} {...restProps}>\n {children}\n </table>\n\n {pagination}\n </div>\n </TableContext.Provider>\n );\n },\n);\n"],"names":["forwardRef","__rest","useRef","useMemo","findAllHeadCellsProps","React","TableContext","cn","styles","__assign"],"mappings":";;;;;;;;;;;;;;;;;IAyDa,KAAK,GAAGA,gBAAU,CAC3B,UACI,EAUC,EACD,GAAG,EAAA;;AAVC,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,mBAAmB,EAAnB,WAAW,mBAAG,KAAK,GAAA,EAAA,EACnB,EAAyB,GAAA,EAAA,CAAA,iBAAA,EAAzB,iBAAiB,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACzB,EAAA,GAAA,EAAA,CAAA,OAAc,EAAd,OAAO,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EACd,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,oBAAoB,EAApB,YAAY,mBAAG,KAAK,GAAA,EAAA,EACjB,SAAS,GAAAC,YAAA,CAAA,EAAA,EAThB,oHAUC,CADe;AAIhB,IAAA,IAAM,UAAU,GAAGC,YAAM,CAAiB,IAAI,CAAC;IAE/C,IAAM,oBAAoB,GAA0BC,aAAO,CACvD,YAAA;AACI,QAAA,OAAAC,2BAAqB,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,UAAC,WAAW,EAAE,KAAK,EAAA,EAAK,QAAC;YACzD,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,SAAS,EAAE,WAAW,CAAC,SAAS;YAChC,MAAM,EAAE,WAAW,CAAC,MAAM;AAC1B,YAAA,KAAK,EAAA,KAAA;SACR,EAAC,EAAA,CAAC;AALH,KAKG,EACP,CAAC,QAAQ,CAAC,CACb;;AAGD,IAAA,QACIC,sBAAC,CAAA,aAAA,CAAAC,kBAAY,CAAC,QAAQ,EAAA,EAClB,KAAK,EAAE;AACH,YAAA,YAAY,EAAA,YAAA;AACZ,YAAA,oBAAoB,EAAA,oBAAA;AACpB,YAAA,WAAW,EAAA,WAAA;AACX,YAAA,iBAAiB,EAAA,iBAAA;AACjB,YAAA,UAAU,EAAA,UAAA;AACb,SAAA,EAAA;AAED,QAAAD,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,GAAG,EAAE,UAAU,EACf,SAAS,EAAEE,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;AACrC,gBAAA,EAAA,CAACA,uBAAM,CAAC,OAAO,CAAA,GAAG,OAAO;AACzB,gBAAA,EAAA,CAACA,uBAAM,CAAC,aAAa,CAAG,GAAA,CAAC,CAAC,UAAU;AACpC,gBAAA,EAAA,CAACA,uBAAM,CAAC,YAAY,CAAA,GAAG,YAAY;AACrC,gBAAA,EAAA,EAAA,EAAA,cAAA,EACY,UAAU,EAAA;AAExB,YAAAH,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAAI,cAAA,CAAA,EAAO,GAAG,EAAE,GAAG,EAAE,SAAS,EAAED,uBAAM,CAAC,KAAK,EAAA,EAAM,SAAS,CAAA,EAClD,QAAQ,CACL;YAEP,UAAU,CACT,CACc;AAEhC,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/components/table/utils.ts"],"sourcesContent":["import React from 'react';\n\nimport { isChildInstanceOf } from '../../utils';\nimport { THead } from '../thead';\nimport { THeadCellProps } from '../thead-cell';\n\nexport function findAllHeadCellsProps(children: React.ReactElement | React.ReactElement[]) {\n const result: THeadCellProps[] = [];\n\n React.Children.forEach(children, (child) => {\n if (isChildInstanceOf(child, THead)) {\n React.Children.forEach(child.props.children, (headChild) => {\n result.push(headChild.props);\n });\n }\n });\n\n return result;\n}\n"],"names":["React","isChildInstanceOf","THead"],"mappings":";;;;;;;;;;;;AAMM,SAAU,qBAAqB,CAAC,QAAmD,EAAA;IACrF,IAAM,MAAM,GAAqB,EAAE;IAEnCA,sBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAA;AACnC,QAAA,IAAIC,uBAAiB,CAAC,KAAK,EAAEC,eAAK,CAAC,EAAE;AACjC,YAAAF,sBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAC,SAAS,EAAA;AACnD,gBAAA,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AAChC,aAAC,CAAC;AACL;AACL,KAAC,CAAC;AAEF,IAAA,OAAO,MAAM;AACjB;;;;"}
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/components/table/utils.ts"],"sourcesContent":["import React from 'react';\n\nimport { isChildInstanceOf } from '../../utils';\nimport { THead } from '../thead';\nimport { type THeadCellProps } from '../thead-cell';\n\nexport function findAllHeadCellsProps(children: React.ReactElement | React.ReactElement[]) {\n const result: THeadCellProps[] = [];\n\n React.Children.forEach(children, (child) => {\n if (isChildInstanceOf(child, THead)) {\n React.Children.forEach(child.props.children, (headChild) => {\n result.push(headChild.props);\n });\n }\n });\n\n return result;\n}\n"],"names":["React","isChildInstanceOf","THead"],"mappings":";;;;;;;;;;;;AAMM,SAAU,qBAAqB,CAAC,QAAmD,EAAA;IACrF,IAAM,MAAM,GAAqB,EAAE;IAEnCA,sBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAA;AACnC,QAAA,IAAIC,uBAAiB,CAAC,KAAK,EAAEC,eAAK,CAAC,EAAE;AACjC,YAAAF,sBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAC,SAAS,EAAA;AACnD,gBAAA,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AAChC,aAAC,CAAC;AACL;AACL,KAAC,CAAC;AAEF,IAAA,OAAO,MAAM;AACjB;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TextAlignProperty } from '../../typings';
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type TextAlignProperty } from '../../typings';
|
|
3
3
|
export declare type ColumnConfiguration = {
|
|
4
4
|
width?: string | number;
|
|
5
5
|
textAlign?: TextAlignProperty;
|
|
@@ -14,4 +14,4 @@ export declare type TableContextType = {
|
|
|
14
14
|
wrapperRef: RefObject<HTMLDivElement>;
|
|
15
15
|
};
|
|
16
16
|
export declare const DEFAULT_TABLE_CONTEXT: TableContextType;
|
|
17
|
-
export declare const TableContext:
|
|
17
|
+
export declare const TableContext: import("react").Context<TableContextType>;
|
|
@@ -4,10 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
|
|
7
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
-
|
|
11
7
|
var DEFAULT_TABLE_CONTEXT = {
|
|
12
8
|
columnsConfiguration: [],
|
|
13
9
|
compactView: false,
|
|
@@ -15,7 +11,7 @@ var DEFAULT_TABLE_CONTEXT = {
|
|
|
15
11
|
compactHorizontal: false,
|
|
16
12
|
wrapperRef: { current: null },
|
|
17
13
|
};
|
|
18
|
-
var TableContext =
|
|
14
|
+
var TableContext = React.createContext(DEFAULT_TABLE_CONTEXT);
|
|
19
15
|
|
|
20
16
|
exports.DEFAULT_TABLE_CONTEXT = DEFAULT_TABLE_CONTEXT;
|
|
21
17
|
exports.TableContext = TableContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/table-context/index.
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/table-context/index.ts"],"sourcesContent":["import { createContext, type RefObject } from 'react';\n\nimport { type TextAlignProperty } from '../../typings';\n\nexport type ColumnConfiguration = {\n width?: string | number;\n textAlign?: TextAlignProperty;\n hidden?: boolean;\n index: number;\n};\n\nexport type TableContextType = {\n columnsConfiguration: ColumnConfiguration[];\n stickyHeader: boolean;\n compactView: boolean;\n compactHorizontal: boolean;\n wrapperRef: RefObject<HTMLDivElement>;\n};\n\nexport const DEFAULT_TABLE_CONTEXT: TableContextType = {\n columnsConfiguration: [],\n compactView: false,\n stickyHeader: false,\n compactHorizontal: false,\n wrapperRef: { current: null },\n};\n\nexport const TableContext = createContext<TableContextType>(DEFAULT_TABLE_CONTEXT);\n"],"names":["createContext"],"mappings":";;;;;;AAmBa,IAAA,qBAAqB,GAAqB;AACnD,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,iBAAiB,EAAE,KAAK;AACxB,IAAA,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;;IAGpB,YAAY,GAAGA,mBAAa,CAAmB,qBAAqB;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/tbody/Component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport styles from './index.module.css';\n\nexport type TBodyProps = HTMLAttributes<HTMLTableSectionElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const TBody = forwardRef<HTMLTableSectionElement, TBodyProps>(\n ({ className, children, dataTestId, ...restProps }, ref) => (\n <tbody\n className={cn(styles.component, className)}\n data-test-id={dataTestId}\n ref={ref}\n {...restProps}\n >\n {children}\n </tbody>\n ),\n);\n\nTBody.displayName = 'TBody';\n"],"names":["forwardRef","__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;IAiBa,KAAK,GAAGA,gBAAU,CAC3B,UAAC,EAAiD,EAAE,GAAG,EAAA;AAApD,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAK,SAAS,GAA/CC,YAAA,CAAA,EAAA,EAAA,CAAA,WAAA,EAAA,UAAA,EAAA,YAAA,CAAiD,CAAF;IAAY,QACxDC,sBACI,CAAA,aAAA,CAAA,OAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,kBAC5B,UAAU,EACxB,GAAG,EAAE,GAAG,EAAA,EACJ,SAAS,CAEZ,EAAA,QAAQ,CACL;AACX,CAAA;AAGL,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/tbody/Component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport styles from './index.module.css';\n\nexport type TBodyProps = HTMLAttributes<HTMLTableSectionElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const TBody = forwardRef<HTMLTableSectionElement, TBodyProps>(\n ({ className, children, dataTestId, ...restProps }, ref) => (\n <tbody\n className={cn(styles.component, className)}\n data-test-id={dataTestId}\n ref={ref}\n {...restProps}\n >\n {children}\n </tbody>\n ),\n);\n\nTBody.displayName = 'TBody';\n"],"names":["forwardRef","__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;IAiBa,KAAK,GAAGA,gBAAU,CAC3B,UAAC,EAAiD,EAAE,GAAG,EAAA;AAApD,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAK,SAAS,GAA/CC,YAAA,CAAA,EAAA,EAAA,CAAA,WAAA,EAAA,UAAA,EAAA,YAAA,CAAiD,CAAF;IAAY,QACxDC,sBACI,CAAA,aAAA,CAAA,OAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,kBAC5B,UAAU,EACxB,GAAG,EAAE,GAAG,EAAA,EACJ,SAAS,CAEZ,EAAA,QAAQ,CACL;AACX,CAAA;AAGL,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/tcell/Component.tsx"],"sourcesContent":["import React, { TdHTMLAttributes, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TableContext } from '../table-context';\n\nimport styles from './index.module.css';\n\nexport type TCellProps = TdHTMLAttributes<HTMLTableCellElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n\n /**\n * Устанавливается автоматически и позволяет использовать конфиг для соответствующего индекса\n */\n index?: number;\n};\n\nexport const TCell = ({\n className,\n style,\n dataTestId,\n children,\n index,\n ...restProps\n}: TCellProps) => {\n const { columnsConfiguration, compactView, compactHorizontal } = useContext(TableContext);\n const column = index === undefined ? null : columnsConfiguration[index];\n const width = column?.width;\n const textAlign = column?.textAlign;\n const hidden = column?.hidden || false;\n\n if (hidden) return null;\n\n return (\n <td\n className={cn(\n styles.component,\n className,\n compactView && styles.compact,\n compactHorizontal && styles.compactHorizontal,\n )}\n style={{ ...style, width, textAlign }}\n data-test-id={dataTestId}\n {...restProps}\n >\n {children}\n </td>\n );\n};\n"],"names":["index","__rest","useContext","TableContext","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;AAwBO,IAAM,KAAK,GAAG,UAAC,EAOT,EAAA;AANT,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,QAAQ,GAAA,EAAA,CAAA,QAAA,EACRA,OAAK,GAAA,EAAA,CAAA,KAAA,EACF,SAAS,GAAAC,YAAA,CAAA,EAAA,EANM,yDAOrB,CADe;AAEN,IAAA,IAAA,EAA2D,GAAAC,gBAAU,CAACC,kBAAY,CAAC,EAAjF,oBAAoB,GAAA,EAAA,CAAA,oBAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,iBAAiB,uBAA6B;AACzF,IAAA,IAAM,MAAM,GAAGH,OAAK,KAAK,SAAS,GAAG,IAAI,GAAG,oBAAoB,CAACA,OAAK,CAAC;IACvE,IAAM,KAAK,GAAG,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,KAAK;IAC3B,IAAM,SAAS,GAAG,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,SAAS;AACnC,IAAA,IAAM,MAAM,GAAG,CAAA,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,MAAM,KAAI,KAAK;AAEtC,IAAA,IAAI,MAAM;AAAE,QAAA,OAAO,IAAI;AAEvB,IAAA,QACII,sBACI,CAAA,aAAA,CAAA,IAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CACTC,uBAAM,CAAC,SAAS,EAChB,SAAS,EACT,WAAW,IAAIA,uBAAM,CAAC,OAAO,EAC7B,iBAAiB,IAAIA,uBAAM,CAAC,iBAAiB,CAChD,EACD,KAAK,oCAAO,KAAK,CAAA,EAAA,EAAE,KAAK,EAAA,KAAA,EAAE,SAAS,EAAA,SAAA,EAAA,CAAA,EAAA,cAAA,EACrB,UAAU,EACpB,EAAA,SAAS,GAEZ,QAAQ,CACR;AAEb;;;;"}
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/tcell/Component.tsx"],"sourcesContent":["import React, { type TdHTMLAttributes, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TableContext } from '../table-context';\n\nimport styles from './index.module.css';\n\nexport type TCellProps = TdHTMLAttributes<HTMLTableCellElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n\n /**\n * Устанавливается автоматически и позволяет использовать конфиг для соответствующего индекса\n */\n index?: number;\n};\n\nexport const TCell = ({\n className,\n style,\n dataTestId,\n children,\n index,\n ...restProps\n}: TCellProps) => {\n const { columnsConfiguration, compactView, compactHorizontal } = useContext(TableContext);\n const column = index === undefined ? null : columnsConfiguration[index];\n const width = column?.width;\n const textAlign = column?.textAlign;\n const hidden = column?.hidden || false;\n\n if (hidden) return null;\n\n return (\n <td\n className={cn(\n styles.component,\n className,\n compactView && styles.compact,\n compactHorizontal && styles.compactHorizontal,\n )}\n style={{ ...style, width, textAlign }}\n data-test-id={dataTestId}\n {...restProps}\n >\n {children}\n </td>\n );\n};\n"],"names":["index","__rest","useContext","TableContext","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;AAwBO,IAAM,KAAK,GAAG,UAAC,EAOT,EAAA;AANT,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,QAAQ,GAAA,EAAA,CAAA,QAAA,EACRA,OAAK,GAAA,EAAA,CAAA,KAAA,EACF,SAAS,GAAAC,YAAA,CAAA,EAAA,EANM,yDAOrB,CADe;AAEN,IAAA,IAAA,EAA2D,GAAAC,gBAAU,CAACC,kBAAY,CAAC,EAAjF,oBAAoB,GAAA,EAAA,CAAA,oBAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,iBAAiB,uBAA6B;AACzF,IAAA,IAAM,MAAM,GAAGH,OAAK,KAAK,SAAS,GAAG,IAAI,GAAG,oBAAoB,CAACA,OAAK,CAAC;IACvE,IAAM,KAAK,GAAG,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,KAAK;IAC3B,IAAM,SAAS,GAAG,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,SAAS;AACnC,IAAA,IAAM,MAAM,GAAG,CAAA,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,MAAM,KAAI,KAAK;AAEtC,IAAA,IAAI,MAAM;AAAE,QAAA,OAAO,IAAI;AAEvB,IAAA,QACII,sBACI,CAAA,aAAA,CAAA,IAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CACTC,uBAAM,CAAC,SAAS,EAChB,SAAS,EACT,WAAW,IAAIA,uBAAM,CAAC,OAAO,EAC7B,iBAAiB,IAAIA,uBAAM,CAAC,iBAAiB,CAChD,EACD,KAAK,oCAAO,KAAK,CAAA,EAAA,EAAE,KAAK,EAAA,KAAA,EAAE,SAAS,EAAA,SAAA,EAAA,CAAA,EAAA,cAAA,EACrB,UAAU,EACpB,EAAA,SAAS,GAEZ,QAAQ,CACR;AAEb;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { ReactNode, Ref } from 'react';
|
|
2
|
-
import { TRowProps } from '../trow';
|
|
1
|
+
import React, { type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type TRowProps } from '../trow';
|
|
3
3
|
export declare type TExpandableRowProps = TRowProps & {
|
|
4
4
|
defaultExpanded?: boolean;
|
|
5
5
|
expanded?: boolean;
|
|
@@ -19,7 +19,7 @@ var TExpandableRow = React.forwardRef(function (_a, ref) {
|
|
|
19
19
|
var className = _a.className, selected = _a.selected, expanded = _a.expanded, _d = _a.defaultExpanded, defaultExpanded = _d === void 0 ? false : _d, _e = _a.onToggle, onToggle = _e === void 0 ? function () { return null; } : _e, _f = _a.renderContent, renderContent = _f === void 0 ? function () { return null; } : _f, rowRef = _a.rowRef, restProps = tslib.__rest(_a, ["className", "selected", "expanded", "defaultExpanded", "onToggle", "renderContent", "rowRef"]);
|
|
20
20
|
var _g = React.useState(defaultExpanded), expandedState = _g[0], setExpandedState = _g[1];
|
|
21
21
|
var uncontrolled = expanded === undefined;
|
|
22
|
-
var isExpanded =
|
|
22
|
+
var isExpanded = uncontrolled ? expandedState : expanded;
|
|
23
23
|
var handleToggle = function () {
|
|
24
24
|
if (uncontrolled) {
|
|
25
25
|
setExpandedState(!isExpanded);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/texpandable-row/Component.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode, Ref, useState } from 'react';\nimport cn from 'classnames';\n\nimport { TRow, 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 =
|
|
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":["forwardRef","__rest","useState","React","TRow","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;IAmBa,cAAc,GAAGA,gBAAU,CACpC,UACI,EASsB,EACtB,GAAG,EAAA;;IATC,IAAA,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,EAAA,GAAA,EAAA,CAAA,eAAuB,EAAvB,eAAe,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,EACvB,gBAAqB,EAArB,QAAQ,mBAAG,YAAM,EAAA,OAAA,IAAI,CAAJ,EAAI,KAAA,EACrB,EAAA,GAAA,EAAA,CAAA,aAA0B,EAA1B,aAAa,GAAA,EAAA,KAAA,MAAA,GAAG,cAAM,OAAA,IAAI,GAAA,GAAA,EAAA,EAC1B,MAAM,GAAA,EAAA,CAAA,MAAA,EACH,SAAS,GAAAC,YAAA,CAAA,EAAA,EARhB,+FASC,CADe;IAIV,IAAA,EAAA,GAAoCC,cAAQ,CAAU,eAAe,CAAC,EAArE,aAAa,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,gBAAgB,GAAA,EAAA,CAAA,CAAA,CAAsC;AAE5E,IAAA,IAAM,YAAY,GAAG,QAAQ,KAAK,SAAS;IAE3C,IAAM,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,QAAQ;AAE1D,IAAA,IAAM,YAAY,GAAG,YAAA;AACjB,QAAA,IAAI,YAAY,EAAE;AACd,YAAA,gBAAgB,CAAC,CAAC,UAAU,CAAC;AAChC;QAED,QAAQ,CAAC,UAAU,CAAC;AACxB,KAAC;AAED,IAAA,QACIC,sBAAA,CAAA,aAAA,CAACA,sBAAK,CAAC,QAAQ,EAAA,IAAA;QACXA,sBAAC,CAAA,aAAA,CAAAC,cAAI,EACDC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,GAAG,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;AAC/B,gBAAA,EAAA,CAACA,uBAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,gBAAA,EAAA,CAACA,uBAAM,CAAC,QAAQ,CAAA,GAAG,UAAU;AAC/B,gBAAA,EAAA,EAAA,EACF,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,MAAM,EAAA,EACP,SAAS,CACf,CAAA;QAEFJ,sBAAI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,GAAG,EAAE,GAAG,EAAE,SAAS,EAAEG,mBAAE,CAACC,uBAAM,CAAC,UAAU,GAAI,EAAA,GAAA,EAAA,EAAA,EAAA,CAACA,uBAAM,CAAC,QAAQ,CAAA,GAAG,UAAU,EAAA,EAAA,EAAG,EAC5E,EAAA,aAAa,CAAC,UAAU,CAAC,CACzB,CACQ;AAEzB,CAAC;AAGL,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/thead/Component.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport styles from './index.module.css';\n\nexport type THeadProps = HTMLAttributes<HTMLTableSectionElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дополнительный класс для tr\n */\n rowClassName?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const THead: React.FC<THeadProps> = ({\n className,\n rowClassName,\n children,\n dataTestId,\n ...restProps\n}) => (\n <thead className={cn(styles.component, className)} data-test-id={dataTestId} {...restProps}>\n <tr className={cn(styles.row, rowClassName)}>{children}</tr>\n </thead>\n);\n"],"names":["__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;AAsBO,IAAM,KAAK,GAAyB,UAAC,EAM3C,EAAA;AALG,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,YAAY,kBAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,UAAU,GAAA,EAAA,CAAA,UAAA,EACP,SAAS,GAAAA,YAAA,CAAA,EAAA,EAL4B,uDAM3C,CADe;AACV,IAAA,QACFC,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAAC,cAAA,CAAA,EAAO,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAgB,cAAA,EAAA,UAAU,IAAM,SAAS,CAAA;AACtF,QAAAH,sBAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAEE,mBAAE,CAACC,uBAAM,CAAC,GAAG,EAAE,YAAY,CAAC,EAAG,EAAA,QAAQ,CAAM,CACxD;;;;;"}
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/thead/Component.tsx"],"sourcesContent":["import React, { type HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport styles from './index.module.css';\n\nexport type THeadProps = HTMLAttributes<HTMLTableSectionElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дополнительный класс для tr\n */\n rowClassName?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const THead: React.FC<THeadProps> = ({\n className,\n rowClassName,\n children,\n dataTestId,\n ...restProps\n}) => (\n <thead className={cn(styles.component, className)} data-test-id={dataTestId} {...restProps}>\n <tr className={cn(styles.row, rowClassName)}>{children}</tr>\n </thead>\n);\n"],"names":["__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;AAsBO,IAAM,KAAK,GAAyB,UAAC,EAM3C,EAAA;AALG,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,YAAY,kBAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,UAAU,GAAA,EAAA,CAAA,UAAA,EACP,SAAS,GAAAA,YAAA,CAAA,EAAA,EAL4B,uDAM3C,CADe;AACV,IAAA,QACFC,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAAC,cAAA,CAAA,EAAO,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAgB,cAAA,EAAA,UAAU,IAAM,SAAS,CAAA;AACtF,QAAAH,sBAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAEE,mBAAE,CAACC,uBAAM,CAAC,GAAG,EAAE,YAAY,CAAC,EAAG,EAAA,QAAQ,CAAM,CACxD;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { ThHTMLAttributes } from 'react';
|
|
2
|
-
import { TextAlignProperty } from '../../typings';
|
|
1
|
+
import React, { type ThHTMLAttributes } from 'react';
|
|
2
|
+
import { type TextAlignProperty } from '../../typings';
|
|
3
3
|
export declare type THeadCellProps = ThHTMLAttributes<HTMLHeadingElement> & {
|
|
4
4
|
/**
|
|
5
5
|
* Дополнительный класс
|