@cloud-ru/uikit-product-site-table 0.2.11 → 0.2.13

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/CHANGELOG.md CHANGED
@@ -3,6 +3,27 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.2.13 (2025-11-13)
7
+
8
+ ### Only dependencies have been changed
9
+ * [@cloud-ru/uikit-product-site-rich-text@0.2.12](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/site-rich-text/CHANGELOG.md)
10
+ * [@cloud-ru/uikit-product-utils@7.0.2](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/utils/CHANGELOG.md)
11
+
12
+
13
+
14
+
15
+
16
+ ## 0.2.12 (2025-11-12)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **PD-3377:** contributors update to publish all packages ([719fd3e](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/719fd3e1249e247443b125c47ea408d92c8395c3))
22
+
23
+
24
+
25
+
26
+
6
27
  ## 0.2.11 (2025-11-12)
7
28
 
8
29
  ### Only dependencies have been changed
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { WithSupportProps } from '@sbercloud/uikit-product-utils';
3
+ type Cell = {
4
+ id?: string | number;
5
+ content: ReactNode;
6
+ rowSpan?: number;
7
+ colSpan?: number;
8
+ className?: string;
9
+ };
10
+ export type TableProps = WithSupportProps<{
11
+ withHeader?: boolean;
12
+ rows: Cell[][];
13
+ }>;
14
+ export declare function Table({ withHeader, rows, ...rest }: TableProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Table = Table;
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const classnames_1 = __importDefault(require("classnames"));
20
+ const uikit_product_site_rich_text_1 = require("@sbercloud/uikit-product-site-rich-text");
21
+ const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
22
+ const scroll_1 = require("@snack-uikit/scroll");
23
+ const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
24
+ function Table(_a) {
25
+ var { withHeader = true, rows } = _a, rest = __rest(_a, ["withHeader", "rows"]);
26
+ const header = withHeader ? rows[0] : undefined;
27
+ const body = withHeader ? rows.slice(1) : rows;
28
+ return ((0, jsx_runtime_1.jsx)(scroll_1.Scroll, { barHideStrategy: 'never', children: (0, jsx_runtime_1.jsxs)("table", Object.assign({ className: styles_module_scss_1.default.table }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: [header && ((0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsx)("tr", { className: (0, classnames_1.default)(styles_module_scss_1.default.row, styles_module_scss_1.default.rowHeader), children: header.map(({ id, content, colSpan, rowSpan, className }, index) => ((0, jsx_runtime_1.jsx)("td", { className: (0, classnames_1.default)(styles_module_scss_1.default.cell, styles_module_scss_1.default.cellHeader, className), colSpan: colSpan, rowSpan: rowSpan, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: content }) }, id !== null && id !== void 0 ? id : index))) }) })), body && ((0, jsx_runtime_1.jsx)("tbody", { children: body.map((row, index) => ((0, jsx_runtime_1.jsx)("tr", { className: (0, classnames_1.default)(styles_module_scss_1.default.row, styles_module_scss_1.default.rowBody), children: row.map(({ id, content, rowSpan, colSpan, className }, index) => ((0, jsx_runtime_1.jsx)("td", { className: (0, classnames_1.default)(styles_module_scss_1.default.cell, styles_module_scss_1.default.cellBody, className), rowSpan: rowSpan, colSpan: colSpan, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: content }) }, id !== null && id !== void 0 ? id : index))) }, index))) }))] })) }));
29
+ }
@@ -0,0 +1 @@
1
+ export * from './Table';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Table"), exports);
@@ -0,0 +1,48 @@
1
+ .table{
2
+ border-spacing:0;
3
+ border-collapse:collapse;
4
+ width:100%;
5
+ table-layout:auto;
6
+ }
7
+
8
+ .rowHeader{
9
+ position:relative;
10
+ z-index:0;
11
+ }
12
+ .rowHeader:after{
13
+ content:"";
14
+ position:absolute;
15
+ top:0;
16
+ left:0;
17
+ display:block;
18
+ width:100%;
19
+ height:100%;
20
+ background-color:var(--sys-neutral-accent-default, #787b8a);
21
+ opacity:0.08;
22
+ z-index:-1;
23
+ }
24
+
25
+ .cell{
26
+ padding:18px 16px;
27
+ min-width:120px;
28
+ border:1px solid var(--sys-neutral-decor-default, #dde0ea);
29
+ color:var(--sys-neutral-text-main, #41424e);
30
+ }
31
+
32
+ .cellHeader{
33
+ font-family:var(--sans-label-l-font-family, SB Sans Text);
34
+ font-weight:var(--sans-label-l-font-weight, Semibold);
35
+ line-height:var(--sans-label-l-line-height, 20px);
36
+ font-size:var(--sans-label-l-font-size, 14px);
37
+ letter-spacing:var(--sans-label-l-letter-spacing, 0px);
38
+ paragraph-spacing:var(--sans-label-l-paragraph-spacing, 7.7px);
39
+ }
40
+
41
+ .cellBody{
42
+ font-family:var(--sans-body-l-font-family, SB Sans Text);
43
+ font-weight:var(--sans-body-l-font-weight, Regular);
44
+ line-height:var(--sans-body-l-line-height, 24px);
45
+ font-size:var(--sans-body-l-font-size, 16px);
46
+ letter-spacing:var(--sans-body-l-letter-spacing, 0px);
47
+ paragraph-spacing:var(--sans-body-l-paragraph-spacing, 8.8px);
48
+ }
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components"), exports);
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { WithSupportProps } from '@sbercloud/uikit-product-utils';
3
+ type Cell = {
4
+ id?: string | number;
5
+ content: ReactNode;
6
+ rowSpan?: number;
7
+ colSpan?: number;
8
+ className?: string;
9
+ };
10
+ export type TableProps = WithSupportProps<{
11
+ withHeader?: boolean;
12
+ rows: Cell[][];
13
+ }>;
14
+ export declare function Table({ withHeader, rows, ...rest }: TableProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,23 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import cn from 'classnames';
14
+ import { RichText } from '@sbercloud/uikit-product-site-rich-text';
15
+ import { extractSupportProps } from '@sbercloud/uikit-product-utils';
16
+ import { Scroll } from '@snack-uikit/scroll';
17
+ import styles from './styles.module.css';
18
+ export function Table(_a) {
19
+ var { withHeader = true, rows } = _a, rest = __rest(_a, ["withHeader", "rows"]);
20
+ const header = withHeader ? rows[0] : undefined;
21
+ const body = withHeader ? rows.slice(1) : rows;
22
+ return (_jsx(Scroll, { barHideStrategy: 'never', children: _jsxs("table", Object.assign({ className: styles.table }, extractSupportProps(rest), { children: [header && (_jsx("thead", { children: _jsx("tr", { className: cn(styles.row, styles.rowHeader), children: header.map(({ id, content, colSpan, rowSpan, className }, index) => (_jsx("td", { className: cn(styles.cell, styles.cellHeader, className), colSpan: colSpan, rowSpan: rowSpan, children: _jsx(RichText, { richText: content }) }, id !== null && id !== void 0 ? id : index))) }) })), body && (_jsx("tbody", { children: body.map((row, index) => (_jsx("tr", { className: cn(styles.row, styles.rowBody), children: row.map(({ id, content, rowSpan, colSpan, className }, index) => (_jsx("td", { className: cn(styles.cell, styles.cellBody, className), rowSpan: rowSpan, colSpan: colSpan, children: _jsx(RichText, { richText: content }) }, id !== null && id !== void 0 ? id : index))) }, index))) }))] })) }));
23
+ }
@@ -0,0 +1 @@
1
+ export * from './Table';
@@ -0,0 +1 @@
1
+ export * from './Table';
@@ -0,0 +1,48 @@
1
+ .table{
2
+ border-spacing:0;
3
+ border-collapse:collapse;
4
+ width:100%;
5
+ table-layout:auto;
6
+ }
7
+
8
+ .rowHeader{
9
+ position:relative;
10
+ z-index:0;
11
+ }
12
+ .rowHeader:after{
13
+ content:"";
14
+ position:absolute;
15
+ top:0;
16
+ left:0;
17
+ display:block;
18
+ width:100%;
19
+ height:100%;
20
+ background-color:var(--sys-neutral-accent-default, #787b8a);
21
+ opacity:0.08;
22
+ z-index:-1;
23
+ }
24
+
25
+ .cell{
26
+ padding:18px 16px;
27
+ min-width:120px;
28
+ border:1px solid var(--sys-neutral-decor-default, #dde0ea);
29
+ color:var(--sys-neutral-text-main, #41424e);
30
+ }
31
+
32
+ .cellHeader{
33
+ font-family:var(--sans-label-l-font-family, SB Sans Text);
34
+ font-weight:var(--sans-label-l-font-weight, Semibold);
35
+ line-height:var(--sans-label-l-line-height, 20px);
36
+ font-size:var(--sans-label-l-font-size, 14px);
37
+ letter-spacing:var(--sans-label-l-letter-spacing, 0px);
38
+ paragraph-spacing:var(--sans-label-l-paragraph-spacing, 7.7px);
39
+ }
40
+
41
+ .cellBody{
42
+ font-family:var(--sans-body-l-font-family, SB Sans Text);
43
+ font-weight:var(--sans-body-l-font-weight, Regular);
44
+ line-height:var(--sans-body-l-line-height, 24px);
45
+ font-size:var(--sans-body-l-font-size, 16px);
46
+ letter-spacing:var(--sans-body-l-letter-spacing, 0px);
47
+ paragraph-spacing:var(--sans-body-l-paragraph-spacing, 8.8px);
48
+ }
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1 @@
1
+ export * from './components';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloud-ru/uikit-product-site-table",
3
3
  "title": "Site Table",
4
- "version": "0.2.11",
4
+ "version": "0.2.13",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -30,16 +30,17 @@
30
30
  "name": "Akhremenko Grigorii",
31
31
  "url": "https://github.com/AGrigorii"
32
32
  },
33
+ "contributors": [],
33
34
  "license": "Apache-2.0",
34
35
  "publishConfig": {
35
36
  "access": "public"
36
37
  },
37
38
  "scripts": {},
38
39
  "dependencies": {
39
- "@cloud-ru/uikit-product-site-rich-text": "0.2.10",
40
- "@cloud-ru/uikit-product-utils": "7.0.0",
40
+ "@cloud-ru/uikit-product-site-rich-text": "0.2.12",
41
+ "@cloud-ru/uikit-product-utils": "7.0.2",
41
42
  "@snack-uikit/scroll": "0.9.4",
42
43
  "classnames": "2.5.1"
43
44
  },
44
- "gitHead": "e8bd79bc92b26a8f52611972eec98a867536ccd3"
45
+ "gitHead": "bf479ecf7238ef20b78f20acaef439efa535d1a1"
45
46
  }