@alfalab/core-components-table 3.0.1 → 3.0.2
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
|
@@ -9,7 +9,7 @@ var TExpandableRow = forwardRef(function (_a, ref) {
|
|
|
9
9
|
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 = __rest(_a, ["className", "selected", "expanded", "defaultExpanded", "onToggle", "renderContent", "rowRef"]);
|
|
10
10
|
var _g = useState(defaultExpanded), expandedState = _g[0], setExpandedState = _g[1];
|
|
11
11
|
var uncontrolled = expanded === undefined;
|
|
12
|
-
var isExpanded =
|
|
12
|
+
var isExpanded = uncontrolled ? expandedState : expanded;
|
|
13
13
|
var handleToggle = function () {
|
|
14
14
|
if (uncontrolled) {
|
|
15
15
|
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":[],"mappings":";;;;;;IAmBa,cAAc,GAAG,UAAU,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,GAAA,MAAA,CAAA,EAAA,EARhB,+FASC,CADe;IAIV,IAAA,EAAA,GAAoC,QAAQ,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,QACI,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,IAAA;QACX,KAAC,CAAA,aAAA,CAAA,IAAI,EACD,QAAA,CAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;AAC/B,gBAAA,EAAA,CAAC,MAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,gBAAA,EAAA,CAAC,MAAM,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;QAEF,KAAI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,GAAI,EAAA,GAAA,EAAA,EAAA,EAAA,CAAC,MAAM,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,12 +1,12 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--gap-0: 0px;
|
|
3
|
-
} .
|
|
3
|
+
} .table__row_fkd93 {
|
|
4
4
|
cursor: pointer;
|
|
5
|
-
} .
|
|
5
|
+
} .table__selected_fkd93.table__expanded_fkd93 {
|
|
6
6
|
background-color: inherit;
|
|
7
|
-
} .
|
|
7
|
+
} .table__expanded_fkd93:hover {
|
|
8
8
|
background-color: inherit;
|
|
9
|
-
} .
|
|
9
|
+
} .table__expandable_fkd93 td {
|
|
10
10
|
margin: var(--gap-0);
|
|
11
11
|
padding-top: var(--gap-0);
|
|
12
12
|
padding-bottom: var(--gap-0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"row":"
|
|
3
|
+
var styles = {"row":"table__row_fkd93","selected":"table__selected_fkd93","expanded":"table__expanded_fkd93","expandable":"table__expandable_fkd93"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/texpandable-row/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.row {\n cursor: pointer;\n}\n\n.selected.expanded {\n background-color: inherit;\n}\n\n.expanded {\n &:hover {\n background-color: inherit;\n }\n}\n\n.expandable {\n & td {\n margin: var(--gap-0);\n padding-top: var(--gap-0);\n padding-bottom: var(--gap-0);\n border: none;\n height: auto;\n }\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,KAAK,CAAC,kBAAkB,CAAC,UAAU,CAAC,uBAAuB,CAAC,UAAU,CAAC,uBAAuB,CAAC,YAAY,CAAC,yBAAyB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/texpandable-row/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.row {\n cursor: pointer;\n}\n\n.selected.expanded {\n background-color: inherit;\n}\n\n.expanded {\n &:hover {\n background-color: inherit;\n }\n}\n\n.expandable {\n & td {\n margin: var(--gap-0);\n padding-top: var(--gap-0);\n padding-bottom: var(--gap-0);\n border: none;\n height: auto;\n }\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,KAAK,CAAC,kBAAkB,CAAC,UAAU,CAAC,uBAAuB,CAAC,UAAU,CAAC,uBAAuB,CAAC,YAAY,CAAC,yBAAyB,CAAC;;;;"}
|
|
@@ -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":[],"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,GAAA,MAAA,CAAA,EAAA,EAL4B,uDAM3C,CADe;AACV,IAAA,QACF,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,QAAA,CAAA,EAAO,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAgB,cAAA,EAAA,UAAU,IAAM,SAAS,CAAA;AACtF,QAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,EAAE,CAAC,MAAM,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":[],"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,GAAA,MAAA,CAAA,EAAA,EAL4B,uDAM3C,CADe;AACV,IAAA,QACF,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,QAAA,CAAA,EAAO,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAgB,cAAA,EAAA,UAAU,IAAM,SAAS,CAAA;AACtF,QAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,YAAY,CAAC,EAAG,EAAA,QAAQ,CAAM,CACxD;;;;;"}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
--gap-xs: 8px;
|
|
5
5
|
--gap-0: 0px;
|
|
6
6
|
--gap-8: var(--gap-xs);
|
|
7
|
-
} .
|
|
7
|
+
} .table__component_kxmsz {
|
|
8
8
|
position: relative;
|
|
9
9
|
width: 100%;
|
|
10
|
-
box-sizing: border-box
|
|
11
|
-
} .
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
} .table__component_kxmsz th:not(:last-child):not(:empty):after {
|
|
12
12
|
transition: opacity 0.2s;
|
|
13
13
|
position: absolute;
|
|
14
14
|
content: '';
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
top: var(--gap-8);
|
|
20
20
|
bottom: var(--gap-8);
|
|
21
21
|
background-color: var(--color-light-neutral-400);
|
|
22
|
-
} .
|
|
22
|
+
} .table__component_kxmsz th:after {
|
|
23
23
|
opacity: 0;
|
|
24
|
-
} .
|
|
24
|
+
} .table__component_kxmsz:hover th:after {
|
|
25
25
|
opacity: 1;
|
|
26
|
-
} .
|
|
26
|
+
} .table__row_kxmsz {
|
|
27
27
|
height: 72px;
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/thead/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n\n & th:not(:last-child):not(:empty):after {\n transition: opacity 0.2s;\n position: absolute;\n content: '';\n display: block;\n\n width: 1px;\n right: var(--gap-0);\n top: var(--gap-8);\n bottom: var(--gap-8);\n background-color: var(--color-light-neutral-400);\n }\n\n & th:after {\n opacity: 0;\n }\n\n &:hover th:after {\n opacity: 1;\n }\n}\n\n.row {\n height: 72px;\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,kBAAkB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/thead/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n\n & th:not(:last-child):not(:empty):after {\n transition: opacity 0.2s;\n position: absolute;\n content: '';\n display: block;\n\n width: 1px;\n right: var(--gap-0);\n top: var(--gap-8);\n bottom: var(--gap-8);\n background-color: var(--color-light-neutral-400);\n }\n\n & th:after {\n opacity: 0;\n }\n\n &:hover th:after {\n opacity: 1;\n }\n}\n\n.row {\n height: 72px;\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,kBAAkB,CAAC;;;;"}
|
|
@@ -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
|
* Дополнительный класс
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/thead-cell/Component.tsx"],"sourcesContent":["import React, { ThHTMLAttributes, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TextAlignProperty } from '../../typings';\nimport { TableContext } from '../table-context';\n\nimport styles from './index.module.css';\n\nexport type THeadCellProps = ThHTMLAttributes<HTMLHeadingElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Ширина колонки\n */\n width?: string | number;\n\n /**\n * Скрытие колонки\n */\n hidden?: boolean;\n\n /**\n * Выравнивание текста в колонке\n */\n textAlign?: TextAlignProperty;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const THeadCell = ({\n children,\n className,\n dataTestId,\n style,\n width,\n textAlign,\n hidden,\n ...restProps\n}: THeadCellProps) => {\n const { compactHorizontal, stickyHeader } = useContext(TableContext);\n\n if (hidden) return null;\n\n return (\n <th\n className={cn(\n styles.component,\n className,\n compactHorizontal && styles.compactHorizontal,\n {\n [styles.stickyHeader]: stickyHeader,\n },\n )}\n style={{ ...style, width, textAlign }}\n data-test-id={dataTestId}\n {...restProps}\n >\n {children}\n </th>\n );\n};\n"],"names":[],"mappings":";;;;;;AAmCO,IAAM,SAAS,GAAG,UAAC,EAST,EAAA;;IARb,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,MAAM,YAAA,EACH,SAAS,GARU,MAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,EAAA,YAAA,EAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,QAAA,CASzB,CADe;IAEN,IAAA,EAAA,GAAsC,UAAU,CAAC,YAAY,CAAC,EAA5D,iBAAiB,GAAA,EAAA,CAAA,iBAAA,EAAE,YAAY,GAAA,EAAA,CAAA,YAA6B;AAEpE,IAAA,IAAI,MAAM;AAAE,QAAA,OAAO,IAAI;AAEvB,IAAA,QACI,KACI,CAAA,aAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAA,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,iBAAiB,IAAI,MAAM,CAAC,iBAAiB,GAAA,EAAA,GAAA,EAAA;AAEzC,YAAA,EAAA,CAAC,MAAM,CAAC,YAAY,CAAA,GAAG,YAAY;AAE1C,YAAA,EAAA,EAAA,EACD,KAAK,EAAO,QAAA,CAAA,QAAA,CAAA,EAAA,EAAA,KAAK,CAAE,EAAA,EAAA,KAAK,OAAA,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/thead-cell/Component.tsx"],"sourcesContent":["import React, { type ThHTMLAttributes, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { type TextAlignProperty } from '../../typings';\nimport { TableContext } from '../table-context';\n\nimport styles from './index.module.css';\n\nexport type THeadCellProps = ThHTMLAttributes<HTMLHeadingElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Ширина колонки\n */\n width?: string | number;\n\n /**\n * Скрытие колонки\n */\n hidden?: boolean;\n\n /**\n * Выравнивание текста в колонке\n */\n textAlign?: TextAlignProperty;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const THeadCell = ({\n children,\n className,\n dataTestId,\n style,\n width,\n textAlign,\n hidden,\n ...restProps\n}: THeadCellProps) => {\n const { compactHorizontal, stickyHeader } = useContext(TableContext);\n\n if (hidden) return null;\n\n return (\n <th\n className={cn(\n styles.component,\n className,\n compactHorizontal && styles.compactHorizontal,\n {\n [styles.stickyHeader]: stickyHeader,\n },\n )}\n style={{ ...style, width, textAlign }}\n data-test-id={dataTestId}\n {...restProps}\n >\n {children}\n </th>\n );\n};\n"],"names":[],"mappings":";;;;;;AAmCO,IAAM,SAAS,GAAG,UAAC,EAST,EAAA;;IARb,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,MAAM,YAAA,EACH,SAAS,GARU,MAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,EAAA,YAAA,EAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,QAAA,CASzB,CADe;IAEN,IAAA,EAAA,GAAsC,UAAU,CAAC,YAAY,CAAC,EAA5D,iBAAiB,GAAA,EAAA,CAAA,iBAAA,EAAE,YAAY,GAAA,EAAA,CAAA,YAA6B;AAEpE,IAAA,IAAI,MAAM;AAAE,QAAA,OAAO,IAAI;AAEvB,IAAA,QACI,KACI,CAAA,aAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAA,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,iBAAiB,IAAI,MAAM,CAAC,iBAAiB,GAAA,EAAA,GAAA,EAAA;AAEzC,YAAA,EAAA,CAAC,MAAM,CAAC,YAAY,CAAA,GAAG,YAAY;AAE1C,YAAA,EAAA,EAAA,EACD,KAAK,EAAO,QAAA,CAAA,QAAA,CAAA,EAAA,EAAA,KAAK,CAAE,EAAA,EAAA,KAAK,OAAA,EAAE,SAAS,EAAA,SAAA,EAAA,CAAA,EAAA,cAAA,EACrB,UAAU,EACpB,EAAA,SAAS,GAEZ,QAAQ,CACR;AAEb;;;;"}
|
|
@@ -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_1e1mi {
|
|
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_1e1mi:first-child {
|
|
31
31
|
padding-left: var(--gap-16);
|
|
32
|
-
} .
|
|
32
|
+
} .table__component_1e1mi:last-child {
|
|
33
33
|
padding-right: var(--gap-16);
|
|
34
|
-
} .
|
|
34
|
+
} .table__component_1e1mi:not(.table__stickyHeader_1e1mi) {
|
|
35
35
|
position: relative;
|
|
36
|
-
} .
|
|
36
|
+
} .table__sortable_1e1mi {
|
|
37
37
|
cursor: pointer;
|
|
38
|
-
} .
|
|
38
|
+
} .table__sorted_1e1mi {
|
|
39
39
|
color: var(--color-light-text-primary);
|
|
40
|
-
} .
|
|
40
|
+
} .table__stickyHeader_1e1mi {
|
|
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_1e1mi {
|
|
47
47
|
padding-left: 6px;
|
|
48
48
|
padding-right: 6px;
|
|
49
49
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"component":"
|
|
3
|
+
var styles = {"component":"table__component_1e1mi","stickyHeader":"table__stickyHeader_1e1mi","compactHorizontal":"table__compactHorizontal_1e1mi"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# 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":[],"mappings":";;;;;IAoCa,IAAI,GAAG,UAAU,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,GAAA,MAAA,CAAA,EAAA,EAAxE,oEAA0E,CAAF;IAAY,QACjF,KACI,CAAA,aAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;YACrC,EAAC,CAAA,MAAM,CAAC,SAAS,CAAA,GAAG,OAAO,SAAS,CAAC,OAAO,KAAK,WAAW;AAC5D,YAAA,EAAA,CAAC,MAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,YAAA,EAAA,CAAC,MAAM,CAAC,aAAa,CAAA,GAAG,aAAa;AACvC,YAAA,EAAA,EAAA,EAAA,cAAA,EACY,UAAU,EACxB,GAAG,EAAE,GAAG,IACJ,SAAS,CAAA,EAEZ,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAE,KAAK,EAAA,EAAK,OAAA,KAAK,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":[],"mappings":";;;;;IAoCa,IAAI,GAAG,UAAU,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,GAAA,MAAA,CAAA,EAAA,EAAxE,oEAA0E,CAAF;IAAY,QACjF,KACI,CAAA,aAAA,CAAA,IAAA,EAAA,QAAA,CAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;YACrC,EAAC,CAAA,MAAM,CAAC,SAAS,CAAA,GAAG,OAAO,SAAS,CAAC,OAAO,KAAK,WAAW;AAC5D,YAAA,EAAA,CAAC,MAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,YAAA,EAAA,CAAC,MAAM,CAAC,aAAa,CAAA,GAAG,aAAa;AACvC,YAAA,EAAA,EAAA,EAAA,cAAA,EACY,UAAU,EACxB,GAAG,EAAE,GAAG,IACJ,SAAS,CAAA,EAEZ,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAE,KAAK,EAAA,EAAK,OAAA,KAAK,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_5osfn {
|
|
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_5osfn:first-child td {
|
|
13
13
|
border-top: 0;
|
|
14
|
-
} .
|
|
14
|
+
} .table__withoutBorder_5osfn td {
|
|
15
15
|
border: none;
|
|
16
|
-
} .
|
|
17
|
-
cursor: pointer
|
|
18
|
-
} .
|
|
16
|
+
} .table__clickable_5osfn {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
} .table__clickable_5osfn:hover {
|
|
19
19
|
background-color: var(--color-light-base-bg-secondary);
|
|
20
|
-
} .
|
|
21
|
-
background-color: #f2f8ff
|
|
22
|
-
} .
|
|
20
|
+
} .table__selected_5osfn {
|
|
21
|
+
background-color: #f2f8ff;
|
|
22
|
+
} .table__selected_5osfn:hover {
|
|
23
23
|
background-color: var(--color-static-graphic-solitude);
|
|
24
24
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"component":"
|
|
3
|
+
var styles = {"component":"table__component_5osfn","withoutBorder":"table__withoutBorder_5osfn","clickable":"table__clickable_5osfn","selected":"table__selected_5osfn"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# 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":[],"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,GAPkB,MAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,QAAA,CAQjC,CADe;IAEZ,IAAM,QAAQ,GAAG,OAAO,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,GAAG,YAAY,GAAG,WAAW;AAEzE,QAAA,OAAO,aAAa;AACxB,KAAC,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;AAEvC,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,QAAA,CAAA,EAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAA,EAAM,SAAS,CAAA;AAChE,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,GAAA,EAAA,GAAA,EAAA,EAAI,EAAC,CAAA,MAAM,CAAC,OAAO,CAAA,GAAG,SAAS,KAAK,OAAO,EAAG,EAAA,EAAA,EAAA;YAC1E,QAAQ;AACT,YAAA,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EACL,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,GAAA,EAAA,GAAA,EAAA;AACrB,oBAAA,EAAA,CAAC,MAAM,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":[],"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,GAPkB,MAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,QAAA,CAQjC,CADe;IAEZ,IAAM,QAAQ,GAAG,OAAO,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,GAAG,YAAY,GAAG,WAAW;AAEzE,QAAA,OAAO,aAAa;AACxB,KAAC,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;AAEvC,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,QAAA,CAAA,EAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAA,EAAM,SAAS,CAAA;AAChE,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,GAAA,EAAA,GAAA,EAAA,EAAI,EAAC,CAAA,MAAM,CAAC,OAAO,CAAA,GAAG,SAAS,KAAK,OAAO,EAAG,EAAA,EAAA,EAAA;YAC1E,QAAQ;AACT,YAAA,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EACL,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,GAAA,EAAA,GAAA,EAAA;AACrB,oBAAA,EAAA,CAAC,MAAM,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_x3rxx {
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: flex-start;
|
|
12
|
-
} .
|
|
12
|
+
} .table__icon_x3rxx {
|
|
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_x3rxx:hover {
|
|
20
20
|
color: var(--color-light-neutral-translucent-1300);
|
|
21
|
-
} .
|
|
22
|
-
flex-direction: row-reverse
|
|
23
|
-
} .
|
|
21
|
+
} .table__reverse_x3rxx {
|
|
22
|
+
flex-direction: row-reverse;
|
|
23
|
+
} .table__reverse_x3rxx .table__icon_x3rxx {
|
|
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_x3rxx {
|
|
27
|
+
color: var(--color-light-status-info);
|
|
28
|
+
} .table__sorted_x3rxx:hover {
|
|
29
29
|
color: var(--color-light-status-info);
|
|
30
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"content":"
|
|
3
|
+
var styles = {"content":"table__content_x3rxx","icon":"table__icon_x3rxx","reverse":"table__reverse_x3rxx","sorted":"table__sorted_x3rxx"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# 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":[],"mappings":";;;AAEa,IAAA,WAAW,GAAsC,UAAC,KAAK,EAAK,EAAA,QACrE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,QAAA,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;IAET,KAAM,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":[],"mappings":";;;AAEa,IAAA,WAAW,GAAsC,UAAC,KAAK,EAAK,EAAA,QACrE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,QAAA,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;IAET,KAAM,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":[],"mappings":";;;AAEa,IAAA,YAAY,GAAsC,UAAC,KAAK,EAAK,EAAA,QACtE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,QAAA,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;IAET,KAAM,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":[],"mappings":";;;AAEa,IAAA,YAAY,GAAsC,UAAC,KAAK,EAAK,EAAA,QACtE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,QAAA,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;IAET,KAAM,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":[],"mappings":";;;AAEa,IAAA,aAAa,GAAsC,UAAC,KAAK,EAAK,EAAA,QACvE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,QAAA,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;IAET,KAAM,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":[],"mappings":";;;AAEa,IAAA,aAAa,GAAsC,UAAC,KAAK,EAAK,EAAA,QACvE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,QAAA,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;IAET,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,4TAA4T,EAAA,CAAG,CACrU,EACT;;;;"}
|
package/modern/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"],"mappings":";;;;;;;;;;MAYa,KAAK,GAAG,MAAM,CAAC,MAAM,CAACA,OAAc,EAAE;IAC/C,KAAK;IACL,KAAK;IACL,SAAS;IACT,iBAAiB;IACjB,KAAK;IACL,IAAI;IACJ,cAAc;IACd,UAAU;AACb,CAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { PaginationProps as CorePaginationProps } from '@alfalab/core-components-pagination/modern';
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type PaginationProps as CorePaginationProps } from '@alfalab/core-components-pagination/modern';
|
|
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":["CorePagination"],"mappings":";;;;;;;;MA2Ca,UAAU,GAAwB,CAAC,EAC5C,OAAO,GAAG,EAAE,EACZ,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,EAC/B,eAAe,GAAG,MAAM,IAAI,EAC5B,iBAAiB,GAAG,KAAK,EACzB,UAAU,EACV,YAAY,GAAG,MAAM,IAAI,EACzB,SAAS,EACT,UAAU,EACV,GAAG,mBAAmB,EACzB,KAAI;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC;IAE/C,MAAM,OAAO,GAAG,OAAO,CACnB,MACI,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAS,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACtD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;AACpB,SAAA,GAAG,CAAC,CAAC,KAAK,MAAM;AACb,QAAA,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE;QACrB,OAAO,EAAE,CAAiB,cAAA,EAAA,KAAK,CAAE,CAAA;KACpC,CAAC,CAAC,EACX,CAAC,OAAO,EAAE,eAAe,CAAC,CAC7B;IAED,MAAM,mBAAmB,GAAmC,WAAW,CACnE,CAAC,EAAE,QAAQ,EAA2B,KAAI;QACtC,eAAe,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC1C,KAAC,EACD,CAAC,eAAe,CAAC,CACpB;AAED,IAAA,MAAM,gBAAgB,GAAG,WAAW,CAChC,CAAC,SAAiB,KAAI;QAClB,YAAY,CAAC,SAAS,CAAC;QAEvB,UAAU,CAAC,MAAK;YACZ,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,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,kBAAgB,UAAU,EAAA;QACpE,iBAAiB,KAAK,KAAK,KACxB,KAAA,CAAA,aAAA,CAAC,aAAa,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,EAAE,MAAM,CAAC,MAAM,EACxB,oBAAoB,EAAE,MAAM,CAAC,IAAI,EACjC,eAAe,EAAE,MAAM,CAAC,MAAM,EAC9B,KAAK,EAAE,iBAAiB,EAAA,CAC1B,CACL;QAEA,UAAU,GAAG,CAAC,KACX,KAAA,CAAA,aAAA,CAACA,YAAc,EAAA,EACX,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,gBAAgB,EAC9B,SAAS,EAAE,MAAM,CAAC,UAAU,EACxB,GAAA,mBAAmB,EACzB,CAAA,CACL,CACC;AAEd;;;;"}
|
|
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":["CorePagination"],"mappings":";;;;;;;;MA2Ca,UAAU,GAAwB,CAAC,EAC5C,OAAO,GAAG,EAAE,EACZ,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,EAC/B,eAAe,GAAG,MAAM,IAAI,EAC5B,iBAAiB,GAAG,KAAK,EACzB,UAAU,EACV,YAAY,GAAG,MAAM,IAAI,EACzB,SAAS,EACT,UAAU,EACV,GAAG,mBAAmB,EACzB,KAAI;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC;IAE/C,MAAM,OAAO,GAAG,OAAO,CACnB,MACI,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAS,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACtD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;AACpB,SAAA,GAAG,CAAC,CAAC,KAAK,MAAM;AACb,QAAA,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE;QACrB,OAAO,EAAE,CAAiB,cAAA,EAAA,KAAK,CAAE,CAAA;KACpC,CAAC,CAAC,EACX,CAAC,OAAO,EAAE,eAAe,CAAC,CAC7B;IAED,MAAM,mBAAmB,GAAmC,WAAW,CACnE,CAAC,EAAE,QAAQ,EAA2B,KAAI;QACtC,eAAe,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC1C,KAAC,EACD,CAAC,eAAe,CAAC,CACpB;AAED,IAAA,MAAM,gBAAgB,GAAG,WAAW,CAChC,CAAC,SAAiB,KAAI;QAClB,YAAY,CAAC,SAAS,CAAC;QAEvB,UAAU,CAAC,MAAK;YACZ,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,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,kBAAgB,UAAU,EAAA;QACpE,iBAAiB,KAAK,KAAK,KACxB,KAAA,CAAA,aAAA,CAAC,aAAa,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,EAAE,MAAM,CAAC,MAAM,EACxB,oBAAoB,EAAE,MAAM,CAAC,IAAI,EACjC,eAAe,EAAE,MAAM,CAAC,MAAM,EAC9B,KAAK,EAAE,iBAAiB,EAAA,CAC1B,CACL;QAEA,UAAU,GAAG,CAAC,KACX,KAAA,CAAA,aAAA,CAACA,YAAc,EAAA,EACX,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,gBAAgB,EAC9B,SAAS,EAAE,MAAM,CAAC,UAAU,EACxB,GAAA,mBAAmB,EACzB,CAAA,CACL,CACC;AAEd;;;;"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--gap-16: var(--gap-m);
|
|
13
13
|
--gap-24: var(--gap-xl);
|
|
14
14
|
--gap-32: var(--gap-2xl);
|
|
15
|
-
} .
|
|
15
|
+
} .table__component_12zpt {
|
|
16
16
|
position: sticky;
|
|
17
17
|
left: var(--gap-0);
|
|
18
18
|
display: flex;
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
padding: var(--gap-24) var(--gap-16) var(--gap-32);
|
|
23
23
|
border-top: 1px solid var(--color-light-neutral-400);
|
|
24
24
|
box-sizing: border-box;
|
|
25
|
-
} .
|
|
25
|
+
} .table__pagesWrapper_12zpt {
|
|
26
26
|
display: flex;
|
|
27
|
-
} .
|
|
27
|
+
} .table__tag_12zpt.table__tag_12zpt {
|
|
28
28
|
flex-shrink: 0;
|
|
29
29
|
margin-right: var(--gap-8);
|
|
30
30
|
padding: var(--gap-0) var(--gap-8);
|
|
31
|
-
min-width: 32px
|
|
32
|
-
} .
|
|
31
|
+
min-width: 32px;
|
|
32
|
+
} .table__tag_12zpt.table__tag_12zpt:last-child {
|
|
33
33
|
margin-right: var(--gap-0);
|
|
34
|
-
} .
|
|
34
|
+
} .table__tag_12zpt.table__tag_12zpt.table__tagActive_12zpt {
|
|
35
35
|
cursor: default;
|
|
36
|
-
} .
|
|
36
|
+
} .table__pagination_12zpt {
|
|
37
37
|
margin-left: auto;
|
|
38
|
-
} .
|
|
38
|
+
} .table__menu_12zpt {
|
|
39
39
|
margin: var(--gap-4) var(--gap-0);
|
|
40
|
-
} .
|
|
40
|
+
} .table__option_12zpt {
|
|
41
41
|
min-width: 208px;
|
|
42
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"
|
|
3
|
+
const styles = {"component":"table__component_12zpt","pagination":"table__pagination_12zpt","menu":"table__menu_12zpt","option":"table__option_12zpt"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/pagination/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n position: sticky;\n left: var(--gap-0);\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n width: 100%;\n padding: var(--gap-24) var(--gap-16) var(--gap-32);\n border-top: 1px solid var(--color-light-neutral-400);\n box-sizing: border-box;\n}\n\n.pagesWrapper {\n display: flex;\n}\n\n.tag.tag {\n flex-shrink: 0;\n margin-right: var(--gap-8);\n padding: var(--gap-0) var(--gap-8);\n min-width: 32px;\n\n &:last-child {\n margin-right: var(--gap-0);\n }\n\n &.tagActive {\n cursor: default;\n }\n}\n\n.pagination {\n margin-left: auto;\n}\n\n.menu {\n margin: var(--gap-4) var(--gap-0);\n}\n\n.option {\n min-width: 208px;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,wBAAwB,CAA0G,YAAY,CAAC,yBAAyB,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,qBAAqB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/pagination/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n position: sticky;\n left: var(--gap-0);\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n width: 100%;\n padding: var(--gap-24) var(--gap-16) var(--gap-32);\n border-top: 1px solid var(--color-light-neutral-400);\n box-sizing: border-box;\n}\n\n.pagesWrapper {\n display: flex;\n}\n\n.tag.tag {\n flex-shrink: 0;\n margin-right: var(--gap-8);\n padding: var(--gap-0) var(--gap-8);\n min-width: 32px;\n\n &:last-child {\n margin-right: var(--gap-0);\n }\n\n &.tagActive {\n cursor: default;\n }\n}\n\n.pagination {\n margin-left: auto;\n}\n\n.menu {\n margin: var(--gap-4) var(--gap-0);\n}\n\n.option {\n min-width: 208px;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,wBAAwB,CAA0G,YAAY,CAAC,yBAAyB,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,qBAAqB,CAAC;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--color-light-neutral-translucent-200-hover: rgba(15, 25, 55, 0.1);
|
|
3
|
-
} .
|
|
3
|
+
} .table__field_1h86r svg {
|
|
4
4
|
width: 18px;
|
|
5
5
|
height: 18px;
|
|
6
|
-
} .
|
|
7
|
-
.
|
|
6
|
+
} .table__open_1h86r,
|
|
7
|
+
.table__open_1h86r:hover {
|
|
8
8
|
background-color: var(--color-light-neutral-translucent-200-hover);
|
|
9
9
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SelectProps } from '@alfalab/core-components-select/modern';
|
|
1
|
+
import { type SelectProps } from '@alfalab/core-components-select/modern';
|
|
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":[],"mappings":";;;;;AAQO,MAAM,iBAAiB,GAAyB,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,KAAI;IAC7F,MAAM,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,UAAU;AAE7C,IAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,GAAG,EAAA;AACT,QAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EACE,EAAA,GAAA,cAA8B,EACnC,IAAI,EAAC,KAAK,EACV,IAAI,EAAC,aAAa,EAClB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC,EACpD,WAAW,EAAE,KAAK,IAEjB,QAAQ,EAAE,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":[],"mappings":";;;;;AAQO,MAAM,iBAAiB,GAAyB,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,KAAI;IAC7F,MAAM,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,UAAU;AAE7C,IAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,GAAG,EAAA;AACT,QAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EACE,EAAA,GAAA,cAA8B,EACnC,IAAI,EAAC,KAAK,EACV,IAAI,EAAC,aAAa,EAClB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC,EACpD,WAAW,EAAE,KAAK,IAEjB,QAAQ,EAAE,OAAO,CACb,CACP;AAEd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../../src/components/pagination/select-field/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.field {\n & svg {\n width: 18px;\n height: 18px;\n }\n}\n\n.open,\n.open:hover {\n background-color: var(--color-light-neutral-translucent-200-hover);\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,mBAAmB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../../src/components/pagination/select-field/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.field {\n & svg {\n width: 18px;\n height: 18px;\n }\n}\n\n.open,\n.open:hover {\n background-color: var(--color-light-neutral-translucent-200-hover);\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,mBAAmB,CAAC;;;;"}
|