@alfalab/core-components-pure-cell 5.0.1 → 5.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.d.ts +10 -16
- package/component.js +6 -6
- package/component.js.map +1 -1
- package/components/addon/component.d.ts +1 -1
- package/components/addon/component.js +2 -2
- package/components/addon/component.js.map +1 -1
- package/components/addon/index.css +17 -15
- package/components/addon/index.module.css.js +1 -1
- package/components/amount/component.d.ts +1 -1
- package/components/amount/component.js +2 -2
- package/components/amount/component.js.map +1 -1
- package/components/amount/index.css +3 -3
- package/components/amount/index.module.css.js +1 -1
- package/components/amount/index.module.css.js.map +1 -1
- package/components/amount-title/component.d.ts +1 -1
- package/components/amount-title/component.js +2 -2
- package/components/amount-title/component.js.map +1 -1
- package/components/amount-title/index.css +14 -14
- package/components/amount-title/index.module.css.js +1 -1
- package/components/amount-title/index.module.css.js.map +1 -1
- package/components/category/component.d.ts +1 -1
- package/components/category/component.js +2 -2
- package/components/category/component.js.map +1 -1
- package/components/category/index.css +4 -4
- package/components/category/index.module.css.js +1 -1
- package/components/category/index.module.css.js.map +1 -1
- package/components/content/component.d.ts +1 -1
- package/components/content/component.js +2 -2
- package/components/content/component.js.map +1 -1
- package/components/content/index.css +3 -3
- package/components/content/index.module.css.js +1 -1
- package/components/content/index.module.css.js.map +1 -1
- package/components/footer/component.d.ts +1 -1
- package/components/footer/component.js +2 -2
- package/components/footer/component.js.map +1 -1
- package/components/footer/index.css +4 -4
- package/components/footer/index.module.css.js +1 -1
- package/components/footer/index.module.css.js.map +1 -1
- package/components/footer-button/component.d.ts +2 -2
- package/components/footer-button/component.js +2 -2
- package/components/footer-button/component.js.map +1 -1
- package/components/footer-button/index.css +1 -1
- package/components/footer-button/index.module.css.js +1 -1
- package/components/footer-button/index.module.css.js.map +1 -1
- package/components/footer-text/component.d.ts +1 -1
- package/components/footer-text/component.js +2 -2
- package/components/footer-text/component.js.map +1 -1
- package/components/graphics/component.d.ts +1 -1
- package/components/graphics/component.js +2 -2
- package/components/graphics/component.js.map +1 -1
- package/components/graphics/index.css +23 -21
- package/components/graphics/index.module.css.js +1 -1
- package/components/main/component.d.ts +1 -1
- package/components/main/component.js +2 -2
- package/components/main/component.js.map +1 -1
- package/components/main/index.css +11 -9
- package/components/main/index.module.css.js +1 -1
- package/components/text/component.d.ts +1 -1
- package/components/text/component.js +2 -2
- package/components/text/component.js.map +1 -1
- package/components/text/index.css +6 -6
- package/components/text/index.module.css.js +1 -1
- package/components/text/index.module.css.js.map +1 -1
- package/components/types.d.ts +8 -8
- package/components/typesProps.d.ts +2 -2
- package/context.d.ts +9 -0
- package/context.js +11 -0
- package/context.js.map +1 -0
- package/cssm/component.d.ts +10 -16
- package/cssm/component.js +6 -6
- package/cssm/component.js.map +1 -1
- package/cssm/components/addon/component.d.ts +1 -1
- package/cssm/components/addon/component.js +2 -2
- package/cssm/components/addon/component.js.map +1 -1
- package/cssm/components/addon/index.module.css +5 -3
- package/cssm/components/amount/component.d.ts +1 -1
- package/cssm/components/amount/component.js +2 -2
- package/cssm/components/amount/component.js.map +1 -1
- package/cssm/components/amount-title/component.d.ts +1 -1
- package/cssm/components/amount-title/component.js +2 -2
- package/cssm/components/amount-title/component.js.map +1 -1
- package/cssm/components/category/component.d.ts +1 -1
- package/cssm/components/category/component.js +2 -2
- package/cssm/components/category/component.js.map +1 -1
- package/cssm/components/content/component.d.ts +1 -1
- package/cssm/components/content/component.js +2 -2
- package/cssm/components/content/component.js.map +1 -1
- package/cssm/components/content/index.module.css +1 -1
- package/cssm/components/footer/component.d.ts +1 -1
- package/cssm/components/footer/component.js +2 -2
- package/cssm/components/footer/component.js.map +1 -1
- package/cssm/components/footer/index.module.css +1 -1
- package/cssm/components/footer-button/component.d.ts +2 -2
- package/cssm/components/footer-button/component.js +2 -2
- package/cssm/components/footer-button/component.js.map +1 -1
- package/cssm/components/footer-text/component.d.ts +1 -1
- package/cssm/components/footer-text/component.js +2 -2
- package/cssm/components/footer-text/component.js.map +1 -1
- package/cssm/components/graphics/component.d.ts +1 -1
- package/cssm/components/graphics/component.js +2 -2
- package/cssm/components/graphics/component.js.map +1 -1
- package/cssm/components/graphics/index.module.css +16 -14
- package/cssm/components/main/component.d.ts +1 -1
- package/cssm/components/main/component.js +2 -2
- package/cssm/components/main/component.js.map +1 -1
- package/cssm/components/main/index.module.css +5 -3
- package/cssm/components/text/component.d.ts +1 -1
- package/cssm/components/text/component.js +2 -2
- package/cssm/components/text/component.js.map +1 -1
- package/cssm/components/types.d.ts +8 -8
- package/cssm/components/typesProps.d.ts +2 -2
- package/cssm/context.d.ts +9 -0
- package/cssm/context.js +11 -0
- package/cssm/context.js.map +1 -0
- package/cssm/index.module.css +6 -4
- package/esm/component.d.ts +10 -16
- package/esm/component.js +2 -2
- package/esm/component.js.map +1 -1
- package/esm/components/addon/component.d.ts +1 -1
- package/esm/components/addon/component.js +1 -1
- package/esm/components/addon/component.js.map +1 -1
- package/esm/components/addon/index.css +17 -15
- package/esm/components/addon/index.module.css.js +1 -1
- package/esm/components/amount/component.d.ts +1 -1
- package/esm/components/amount/component.js +1 -1
- package/esm/components/amount/component.js.map +1 -1
- package/esm/components/amount/index.css +3 -3
- package/esm/components/amount/index.module.css.js +1 -1
- package/esm/components/amount/index.module.css.js.map +1 -1
- package/esm/components/amount-title/component.d.ts +1 -1
- package/esm/components/amount-title/component.js +1 -1
- package/esm/components/amount-title/component.js.map +1 -1
- package/esm/components/amount-title/index.css +14 -14
- package/esm/components/amount-title/index.module.css.js +1 -1
- package/esm/components/amount-title/index.module.css.js.map +1 -1
- package/esm/components/category/component.d.ts +1 -1
- package/esm/components/category/component.js +1 -1
- package/esm/components/category/component.js.map +1 -1
- package/esm/components/category/index.css +4 -4
- package/esm/components/category/index.module.css.js +1 -1
- package/esm/components/category/index.module.css.js.map +1 -1
- package/esm/components/content/component.d.ts +1 -1
- package/esm/components/content/component.js +1 -1
- package/esm/components/content/component.js.map +1 -1
- package/esm/components/content/index.css +3 -3
- package/esm/components/content/index.module.css.js +1 -1
- package/esm/components/content/index.module.css.js.map +1 -1
- package/esm/components/footer/component.d.ts +1 -1
- package/esm/components/footer/component.js +1 -1
- package/esm/components/footer/component.js.map +1 -1
- package/esm/components/footer/index.css +4 -4
- package/esm/components/footer/index.module.css.js +1 -1
- package/esm/components/footer/index.module.css.js.map +1 -1
- package/esm/components/footer-button/component.d.ts +2 -2
- package/esm/components/footer-button/component.js +1 -1
- package/esm/components/footer-button/component.js.map +1 -1
- package/esm/components/footer-button/index.css +1 -1
- package/esm/components/footer-button/index.module.css.js +1 -1
- package/esm/components/footer-button/index.module.css.js.map +1 -1
- package/esm/components/footer-text/component.d.ts +1 -1
- package/esm/components/footer-text/component.js +1 -1
- package/esm/components/footer-text/component.js.map +1 -1
- package/esm/components/graphics/component.d.ts +1 -1
- package/esm/components/graphics/component.js +1 -1
- package/esm/components/graphics/component.js.map +1 -1
- package/esm/components/graphics/index.css +23 -21
- package/esm/components/graphics/index.module.css.js +1 -1
- package/esm/components/main/component.d.ts +1 -1
- package/esm/components/main/component.js +1 -1
- package/esm/components/main/component.js.map +1 -1
- package/esm/components/main/index.css +11 -9
- package/esm/components/main/index.module.css.js +1 -1
- package/esm/components/text/component.d.ts +1 -1
- package/esm/components/text/component.js +1 -1
- package/esm/components/text/component.js.map +1 -1
- package/esm/components/text/index.css +6 -6
- package/esm/components/text/index.module.css.js +1 -1
- package/esm/components/text/index.module.css.js.map +1 -1
- package/esm/components/types.d.ts +8 -8
- package/esm/components/typesProps.d.ts +2 -2
- package/esm/context.d.ts +9 -0
- package/esm/context.js +7 -0
- package/esm/context.js.map +1 -0
- package/esm/index.css +34 -32
- package/esm/index.module.css.js +1 -1
- package/esm/index.module.css.js.map +1 -1
- package/index.css +34 -32
- package/index.module.css.js +1 -1
- package/index.module.css.js.map +1 -1
- package/modern/component.d.ts +10 -16
- package/modern/component.js +2 -3
- package/modern/component.js.map +1 -1
- package/modern/components/addon/component.d.ts +1 -1
- package/modern/components/addon/component.js +1 -1
- package/modern/components/addon/component.js.map +1 -1
- package/modern/components/addon/index.css +17 -15
- package/modern/components/addon/index.module.css.js +1 -1
- package/modern/components/amount/component.d.ts +1 -1
- package/modern/components/amount/component.js +1 -1
- package/modern/components/amount/component.js.map +1 -1
- package/modern/components/amount/index.css +3 -3
- package/modern/components/amount/index.module.css.js +1 -1
- package/modern/components/amount/index.module.css.js.map +1 -1
- package/modern/components/amount-title/component.d.ts +1 -1
- package/modern/components/amount-title/component.js +1 -1
- package/modern/components/amount-title/component.js.map +1 -1
- package/modern/components/amount-title/index.css +14 -14
- package/modern/components/amount-title/index.module.css.js +1 -1
- package/modern/components/amount-title/index.module.css.js.map +1 -1
- package/modern/components/category/component.d.ts +1 -1
- package/modern/components/category/component.js +1 -1
- package/modern/components/category/component.js.map +1 -1
- package/modern/components/category/index.css +4 -4
- package/modern/components/category/index.module.css.js +1 -1
- package/modern/components/category/index.module.css.js.map +1 -1
- package/modern/components/content/component.d.ts +1 -1
- package/modern/components/content/component.js +1 -1
- package/modern/components/content/component.js.map +1 -1
- package/modern/components/content/index.css +3 -3
- package/modern/components/content/index.module.css.js +1 -1
- package/modern/components/content/index.module.css.js.map +1 -1
- package/modern/components/footer/component.d.ts +1 -1
- package/modern/components/footer/component.js +1 -1
- package/modern/components/footer/component.js.map +1 -1
- package/modern/components/footer/index.css +4 -4
- package/modern/components/footer/index.module.css.js +1 -1
- package/modern/components/footer/index.module.css.js.map +1 -1
- package/modern/components/footer-button/component.d.ts +2 -2
- package/modern/components/footer-button/component.js +1 -1
- package/modern/components/footer-button/component.js.map +1 -1
- package/modern/components/footer-button/index.css +1 -1
- package/modern/components/footer-button/index.module.css.js +1 -1
- package/modern/components/footer-button/index.module.css.js.map +1 -1
- package/modern/components/footer-text/component.d.ts +1 -1
- package/modern/components/footer-text/component.js +1 -1
- package/modern/components/footer-text/component.js.map +1 -1
- package/modern/components/graphics/component.d.ts +1 -1
- package/modern/components/graphics/component.js +1 -1
- package/modern/components/graphics/component.js.map +1 -1
- package/modern/components/graphics/index.css +23 -21
- package/modern/components/graphics/index.module.css.js +1 -1
- package/modern/components/main/component.d.ts +1 -1
- package/modern/components/main/component.js +1 -1
- package/modern/components/main/component.js.map +1 -1
- package/modern/components/main/index.css +11 -9
- package/modern/components/main/index.module.css.js +1 -1
- package/modern/components/text/component.d.ts +1 -1
- package/modern/components/text/component.js +1 -1
- package/modern/components/text/component.js.map +1 -1
- package/modern/components/text/index.css +6 -6
- package/modern/components/text/index.module.css.js +1 -1
- package/modern/components/text/index.module.css.js.map +1 -1
- package/modern/components/types.d.ts +8 -8
- package/modern/components/typesProps.d.ts +2 -2
- package/modern/context.d.ts +9 -0
- package/modern/context.js +7 -0
- package/modern/context.js.map +1 -0
- package/modern/index.css +34 -32
- package/modern/index.module.css.js +1 -1
- package/modern/index.module.css.js.map +1 -1
- package/moderncssm/component.d.ts +10 -16
- package/moderncssm/component.js +2 -3
- package/moderncssm/component.js.map +1 -1
- package/moderncssm/components/addon/component.d.ts +1 -1
- package/moderncssm/components/addon/component.js +1 -1
- package/moderncssm/components/addon/component.js.map +1 -1
- package/moderncssm/components/addon/index.module.css +5 -3
- package/moderncssm/components/amount/component.d.ts +1 -1
- package/moderncssm/components/amount/component.js +1 -1
- package/moderncssm/components/amount/component.js.map +1 -1
- package/moderncssm/components/amount/index.module.css +2 -0
- package/moderncssm/components/amount-title/component.d.ts +1 -1
- package/moderncssm/components/amount-title/component.js +1 -1
- package/moderncssm/components/amount-title/component.js.map +1 -1
- package/moderncssm/components/amount-title/index.module.css +2 -0
- package/moderncssm/components/category/component.d.ts +1 -1
- package/moderncssm/components/category/component.js +1 -1
- package/moderncssm/components/category/component.js.map +1 -1
- package/moderncssm/components/category/index.module.css +2 -0
- package/moderncssm/components/content/component.d.ts +1 -1
- package/moderncssm/components/content/component.js +1 -1
- package/moderncssm/components/content/component.js.map +1 -1
- package/moderncssm/components/content/index.module.css +3 -2
- package/moderncssm/components/footer/component.d.ts +1 -1
- package/moderncssm/components/footer/component.js +1 -1
- package/moderncssm/components/footer/component.js.map +1 -1
- package/moderncssm/components/footer/index.module.css +3 -3
- package/moderncssm/components/footer-button/component.d.ts +2 -2
- package/moderncssm/components/footer-button/component.js +1 -1
- package/moderncssm/components/footer-button/component.js.map +1 -1
- package/moderncssm/components/footer-button/index.module.css +2 -0
- package/moderncssm/components/footer-text/component.d.ts +1 -1
- package/moderncssm/components/footer-text/component.js +1 -1
- package/moderncssm/components/footer-text/component.js.map +1 -1
- package/moderncssm/components/graphics/component.d.ts +1 -1
- package/moderncssm/components/graphics/component.js +1 -1
- package/moderncssm/components/graphics/component.js.map +1 -1
- package/moderncssm/components/graphics/index.module.css +16 -14
- package/moderncssm/components/main/component.d.ts +1 -1
- package/moderncssm/components/main/component.js +1 -1
- package/moderncssm/components/main/component.js.map +1 -1
- package/moderncssm/components/main/index.module.css +5 -3
- package/moderncssm/components/text/component.d.ts +1 -1
- package/moderncssm/components/text/component.js +1 -1
- package/moderncssm/components/text/component.js.map +1 -1
- package/moderncssm/components/text/index.module.css +2 -0
- package/moderncssm/components/types.d.ts +8 -8
- package/moderncssm/components/typesProps.d.ts +2 -2
- package/moderncssm/context.d.ts +9 -0
- package/moderncssm/context.js +7 -0
- package/moderncssm/context.js.map +1 -0
- package/moderncssm/index.module.css +6 -4
- package/package.json +4 -4
- package/src/component.tsx +11 -21
- package/src/components/addon/component.tsx +2 -2
- package/src/components/amount/component.tsx +2 -2
- package/src/components/amount/index.module.css +1 -1
- package/src/components/amount-title/component.tsx +2 -2
- package/src/components/amount-title/index.module.css +1 -1
- package/src/components/category/component.tsx +2 -2
- package/src/components/category/index.module.css +1 -1
- package/src/components/content/component.tsx +2 -2
- package/src/components/content/index.module.css +1 -1
- package/src/components/footer/component.tsx +2 -2
- package/src/components/footer/index.module.css +1 -1
- package/src/components/footer-button/component.tsx +8 -3
- package/src/components/footer-button/index.module.css +1 -1
- package/src/components/footer-text/component.tsx +2 -2
- package/src/components/graphics/component.tsx +2 -2
- package/src/components/main/component.tsx +2 -2
- package/src/components/text/component.tsx +2 -2
- package/src/components/text/index.module.css +1 -3
- package/src/components/types.ts +8 -8
- package/src/components/typesProps.ts +2 -2
- package/src/context.ts +12 -0
- package/src/index.module.css +2 -2
- package/src/vars.css +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"pure-
|
|
5
|
+
var styles = {"component":"pure-cell__component_17c7t","categoryName":"pure-cell__categoryName_17c7t","categoryPercent":"pure-cell__categoryPercent_17c7t","rightAddon":"pure-cell__rightAddon_17c7t"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/category/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n display: flex;\n overflow: hidden;\n padding: var(--gap-2) var(--gap-0);\n}\n\n.categoryName {\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-all;\n}\n\n.categoryPercent {\n padding: var(--gap-0) var(--gap-8);\n background-color: var(--color-light-base-bg-secondary);\n border-radius: var(--border-radius-16);\n margin-left: var(--gap-4);\n}\n\n.rightAddon {\n margin-left: var(--gap-4);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,cAAc,CAAC,+BAA+B,CAAC,iBAAiB,CAAC,kCAAkC,CAAC,YAAY,CAAC,6BAA6B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/category/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n display: flex;\n overflow: hidden;\n padding: var(--gap-2) var(--gap-0);\n}\n\n.categoryName {\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n word-break: break-all;\n}\n\n.categoryPercent {\n padding: var(--gap-0) var(--gap-8);\n background-color: var(--color-light-base-bg-secondary);\n border-radius: var(--border-radius-16);\n margin-left: var(--gap-4);\n}\n\n.rightAddon {\n margin-left: var(--gap-4);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,cAAc,CAAC,+BAA+B,CAAC,iBAAiB,CAAC,kCAAkC,CAAC,YAAY,CAAC,6BAA6B,CAAC;;;;"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var cn = require('classnames');
|
|
7
7
|
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
8
|
-
var
|
|
8
|
+
var context = require('../../context.js');
|
|
9
9
|
var index_module = require('./index.module.css.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -16,7 +16,7 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
|
16
16
|
var Content = function (_a) {
|
|
17
17
|
var _b;
|
|
18
18
|
var children = _a.children, dataTestId = _a.dataTestId;
|
|
19
|
-
var _c = React.useContext(
|
|
19
|
+
var _c = React.useContext(context.PureCellContext), direction = _c.direction, contextDataTestId = _c.dataTestId;
|
|
20
20
|
return (React__default.default.createElement("section", { className: cn__default.default(index_module.component, (_b = {}, _b[index_module.horizontal] = direction === 'horizontal', _b)), "data-test-id": coreComponentsShared.getDataTestId(dataTestId || contextDataTestId, 'content') }, children));
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/components/content/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/components/content/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../context';\nimport { type ContentElement } from '../types';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Компоненты\n */\n children: ContentElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Используется модификатор -content\n */\n dataTestId?: string;\n};\n\nexport const Content: React.FC<Props> = ({ children, dataTestId }) => {\n const { direction, dataTestId: contextDataTestId } = useContext(PureCellContext);\n\n return (\n <section\n className={cn(styles.component, { [styles.horizontal]: direction === 'horizontal' })}\n data-test-id={getDataTestId(dataTestId || contextDataTestId, 'content')}\n >\n {children}\n </section>\n );\n};\n"],"names":["useContext","PureCellContext","React","cn","styles","getDataTestId"],"mappings":";;;;;;;;;;;;;;;AAuBO,IAAM,OAAO,GAAoB,UAAC,EAAwB,EAAA;;QAAtB,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA;IACrD,IAAA,EAAA,GAA+CA,gBAAU,CAACC,uBAAe,CAAC,EAAxE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAc,iBAAiB,GAAA,EAAA,CAAA,UAAgC;AAEhF,IAAA,QACIC,sBAAA,CAAA,aAAA,CAAA,SAAA,EAAA,EACI,SAAS,EAAEC,mBAAE,CAACC,YAAM,CAAC,SAAS,GAAI,EAAA,GAAA,EAAA,EAAA,EAAA,CAACA,YAAM,CAAC,UAAU,CAAG,GAAA,SAAS,KAAK,YAAY,EAAG,EAAA,EAAA,EAAA,cAAA,EACtEC,kCAAa,CAAC,UAAU,IAAI,iBAAiB,EAAE,SAAS,CAAC,EAAA,EAEtE,QAAQ,CACH;AAElB;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.pure-
|
|
1
|
+
.pure-cell__component_a4hm3 {
|
|
2
2
|
flex-basis: 100%;
|
|
3
3
|
display: grid;
|
|
4
|
-
grid-template-columns: 1fr auto
|
|
5
|
-
} .pure-
|
|
4
|
+
grid-template-columns: 1fr auto;
|
|
5
|
+
} .pure-cell__component_a4hm3.pure-cell__horizontal_a4hm3 {
|
|
6
6
|
align-self: stretch;
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"pure-
|
|
5
|
+
var styles = {"component":"pure-cell__component_a4hm3","horizontal":"pure-cell__horizontal_a4hm3"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/content/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n flex-basis: 100%;\n display: grid;\n grid-template-columns: 1fr auto;\n\n &.horizontal {\n /* for button */\n align-self: stretch;\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,YAAY,CAAC,6BAA6B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/content/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n flex-basis: 100%;\n display: grid;\n grid-template-columns: 1fr auto;\n\n &.horizontal {\n /* for button */\n align-self: stretch;\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,YAAY,CAAC,6BAA6B,CAAC;;;;"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var cn = require('classnames');
|
|
7
7
|
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
8
|
-
var
|
|
8
|
+
var context = require('../../context.js');
|
|
9
9
|
var index_module = require('./index.module.css.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -15,7 +15,7 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
|
15
15
|
|
|
16
16
|
var Footer = function (_a) {
|
|
17
17
|
var children = _a.children, _b = _a.footerPadding, footerPadding = _b === void 0 ? 'default' : _b, dataTestId = _a.dataTestId;
|
|
18
|
-
var pureCellContext = React.useContext(
|
|
18
|
+
var pureCellContext = React.useContext(context.PureCellContext);
|
|
19
19
|
return (React__default.default.createElement("footer", { className: cn__default.default(index_module.component, index_module[footerPadding]), "data-test-id": coreComponentsShared.getDataTestId(dataTestId || pureCellContext.dataTestId, 'footer') }, children));
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/components/footer/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/components/footer/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../context';\nimport { type FooterElement } from '../types';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Компоненты\n */\n children: FooterElement;\n\n /**\n * Вертикальные отступы\n */\n footerPadding?: 'default' | 'none';\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Используется модификатор -footer\n */\n dataTestId?: string;\n};\n\nexport const Footer: React.FC<Props> = ({ children, footerPadding = 'default', dataTestId }) => {\n const pureCellContext = useContext(PureCellContext);\n\n return (\n <footer\n className={cn(styles.component, styles[footerPadding])}\n data-test-id={getDataTestId(dataTestId || pureCellContext.dataTestId, 'footer')}\n >\n {children}\n </footer>\n );\n};\n"],"names":["useContext","PureCellContext","React","cn","styles","getDataTestId"],"mappings":";;;;;;;;;;;;;;;AA4BO,IAAM,MAAM,GAAoB,UAAC,EAAmD,EAAA;QAAjD,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,EAAA,GAAA,EAAA,CAAA,aAAyB,EAAzB,aAAa,mBAAG,SAAS,GAAA,EAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA;AACrF,IAAA,IAAM,eAAe,GAAGA,gBAAU,CAACC,uBAAe,CAAC;AAEnD,IAAA,QACIC,sBAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EACI,SAAS,EAAEC,mBAAE,CAACC,YAAM,CAAC,SAAS,EAAEA,YAAM,CAAC,aAAa,CAAC,CAAC,EACxC,cAAA,EAAAC,kCAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAA,EAE9E,QAAQ,CACJ;AAEjB;;;;"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
--gap-xs: 8px;
|
|
3
3
|
--gap-0: 0px;
|
|
4
4
|
--gap-8: var(--gap-xs);
|
|
5
|
-
} .pure-
|
|
5
|
+
} .pure-cell__component_12l80 {
|
|
6
6
|
grid-column: 1/3;
|
|
7
7
|
display: grid;
|
|
8
|
-
grid-row-gap: var(--gap-8)
|
|
9
|
-
} .pure-
|
|
8
|
+
grid-row-gap: var(--gap-8);
|
|
9
|
+
} .pure-cell__component_12l80.pure-cell__none_12l80 {
|
|
10
10
|
margin-top: var(--gap-0);
|
|
11
|
-
} .pure-
|
|
11
|
+
} .pure-cell__component_12l80.pure-cell__default_12l80 {
|
|
12
12
|
margin-top: var(--gap-8);
|
|
13
13
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"pure-
|
|
5
|
+
var styles = {"component":"pure-cell__component_12l80","none":"pure-cell__none_12l80","default":"pure-cell__default_12l80"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/footer/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n grid-column: 1/3;\n display: grid;\n grid-row-gap: var(--gap-8);\n\n &.none {\n margin-top: var(--gap-0);\n }\n\n &.default {\n margin-top: var(--gap-8);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/footer/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n grid-column: 1/3;\n display: grid;\n grid-row-gap: var(--gap-8);\n\n &.none {\n margin-top: var(--gap-0);\n }\n\n &.default {\n margin-top: var(--gap-8);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { ButtonProps } from '@alfalab/core-components-button';
|
|
1
|
+
import React, { type AnchorHTMLAttributes, type ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { type ButtonProps } from '@alfalab/core-components-button';
|
|
3
3
|
declare type ComponentProps = Omit<ButtonProps, 'dataTestId'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Идентификатор для систем автоматизированного тестирования.
|
|
@@ -6,7 +6,7 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var coreComponentsButton = require('@alfalab/core-components-button');
|
|
8
8
|
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
9
|
-
var
|
|
9
|
+
var context = require('../../context.js');
|
|
10
10
|
var index_module = require('./index.module.css.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -15,7 +15,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
15
15
|
|
|
16
16
|
var FooterButton = React.forwardRef(function (_a, ref) {
|
|
17
17
|
var children = _a.children, dataTestId = _a.dataTestId, onClick = _a.onClick, onMouseDown = _a.onMouseDown, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, props = tslib.__rest(_a, ["children", "dataTestId", "onClick", "onMouseDown", "onMouseEnter", "onMouseLeave"]);
|
|
18
|
-
var pureCellContext = React.useContext(
|
|
18
|
+
var pureCellContext = React.useContext(context.PureCellContext);
|
|
19
19
|
var handleClick = function (e) {
|
|
20
20
|
e.stopPropagation();
|
|
21
21
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/components/footer-button/component.tsx"],"sourcesContent":["import React, { AnchorHTMLAttributes
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/components/footer-button/component.tsx"],"sourcesContent":["import React, {\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n forwardRef,\n useContext,\n} from 'react';\n\nimport { Button, type ButtonProps } from '@alfalab/core-components-button';\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../context';\n\nimport styles from './index.module.css';\n\ntype ComponentProps = Omit<ButtonProps, 'dataTestId'> & {\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Используется модификатор -button\n */\n dataTestId?: string;\n};\n\ntype FooterButtonProps = ComponentProps &\n Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;\n\ntype FooterButtonMouseEvent = React.MouseEvent<HTMLAnchorElement, MouseEvent> &\n React.MouseEvent<HTMLButtonElement, MouseEvent>;\n\ntype FooterButtonMouseEventHandler =\n | React.MouseEventHandler<HTMLAnchorElement>\n | React.MouseEventHandler<HTMLButtonElement>;\n\nexport const FooterButton = forwardRef<HTMLButtonElement | HTMLAnchorElement, FooterButtonProps>(\n ({ children, dataTestId, onClick, onMouseDown, onMouseEnter, onMouseLeave, ...props }, ref) => {\n const pureCellContext = useContext(PureCellContext);\n\n const handleClick = (e: FooterButtonMouseEvent) => {\n e.stopPropagation();\n (onClick as FooterButtonMouseEventHandler)?.(e);\n };\n\n const handleMouseEnter = (e: FooterButtonMouseEvent) => {\n (onMouseEnter as FooterButtonMouseEventHandler)?.(e);\n pureCellContext.unsetMainHover?.();\n };\n\n const handleMouseLeave = (e: FooterButtonMouseEvent) => {\n (onMouseLeave as FooterButtonMouseEventHandler)?.(e);\n pureCellContext.setMainHover?.();\n };\n\n const handleMouseDown = (e: FooterButtonMouseEvent) => {\n (onMouseDown as FooterButtonMouseEventHandler)?.(e);\n e.stopPropagation();\n };\n\n return (\n <Button\n {...props}\n size='xxs'\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'button')}\n className={styles.component}\n ref={ref}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onMouseDown={handleMouseDown}\n >\n {children}\n </Button>\n );\n },\n);\n"],"names":["forwardRef","__rest","useContext","PureCellContext","React","Button","__assign","getDataTestId","styles"],"mappings":";;;;;;;;;;;;;;;IAgCa,YAAY,GAAGA,gBAAU,CAClC,UAAC,EAAoF,EAAE,GAAG,EAAA;IAAvF,IAAA,QAAQ,cAAA,EAAE,UAAU,gBAAA,EAAE,OAAO,aAAA,EAAE,WAAW,iBAAA,EAAE,YAAY,kBAAA,EAAE,YAAY,kBAAA,EAAK,KAAK,GAAlFC,YAAA,CAAA,EAAA,EAAA,CAAA,UAA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,CAAC,EAC7E,SAAS,EAAEC,YAAM,CAAC,SAAS,EAC3B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,WAAW,EACpB,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,WAAW,EAAE,eAAe,EAE3B,CAAA,EAAA,QAAQ,CACJ;AAEjB,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/footer-button/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n justify-self: start;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/footer-button/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n justify-self: start;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC;;;;"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
7
7
|
var coreComponentsTypography = require('@alfalab/core-components-typography');
|
|
8
|
-
var
|
|
8
|
+
var context = require('../../context.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
13
13
|
|
|
14
14
|
var FooterText = function (_a) {
|
|
15
15
|
var children = _a.children, _b = _a.color, color = _b === void 0 ? 'secondary' : _b, dataTestId = _a.dataTestId;
|
|
16
|
-
var pureCellContext = React.useContext(
|
|
16
|
+
var pureCellContext = React.useContext(context.PureCellContext);
|
|
17
17
|
return (React__default.default.createElement(coreComponentsTypography.Text, { view: 'primary-small', color: color, "data-test-id": coreComponentsShared.getDataTestId(dataTestId || pureCellContext.dataTestId, 'footer-title') }, children));
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/components/footer-text/component.tsx"],"sourcesContent":["import React, { ReactNode, useContext } from 'react';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, Text } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/components/footer-text/component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, Text } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../context';\n\nexport type FooterTextProps = {\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Используется модификатор -footer-title\n */\n dataTestId?: string;\n\n /**\n * Дочерние элементы.\n */\n children?: ReactNode;\n};\n\nexport const FooterText: React.FC<FooterTextProps> = ({\n children,\n color = 'secondary',\n dataTestId,\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n return (\n <Text\n view='primary-small'\n color={color}\n data-test-id={getDataTestId(dataTestId || pureCellContext.dataTestId, 'footer-title')}\n >\n {children}\n </Text>\n );\n};\n"],"names":["useContext","PureCellContext","React","Text","getDataTestId"],"mappings":";;;;;;;;;;;;;AAyBO,IAAM,UAAU,GAA8B,UAAC,EAIrD,EAAA;QAHG,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAAA,GAAA,EAAA,CAAA,KAAmB,EAAnB,KAAK,mBAAG,WAAW,GAAA,EAAA,EACnB,UAAU,GAAA,EAAA,CAAA,UAAA;AAEV,IAAA,IAAM,eAAe,GAAGA,gBAAU,CAACC,uBAAe,CAAC;IAEnD,QACIC,sBAAC,CAAA,aAAA,CAAAC,6BAAI,EACD,EAAA,IAAI,EAAC,eAAe,EACpB,KAAK,EAAE,KAAK,EACE,cAAA,EAAAC,kCAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,cAAc,CAAC,EAEpF,EAAA,QAAQ,CACN;AAEf;;;;"}
|
|
@@ -6,7 +6,7 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
9
|
-
var
|
|
9
|
+
var context = require('../../context.js');
|
|
10
10
|
var index_module = require('./index.module.css.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -21,7 +21,7 @@ var GRAPHICS_COMPONENT = {
|
|
|
21
21
|
var Graphics = function (_a) {
|
|
22
22
|
var _b;
|
|
23
23
|
var children = _a.children, dataTestId = _a.dataTestId, _c = _a.verticalAlign, verticalAlign = _c === void 0 ? 'top' : _c, graphicPadding = _a.graphicPadding, onClick = _a.onClick;
|
|
24
|
-
var pureCellContext = React.useContext(
|
|
24
|
+
var pureCellContext = React.useContext(context.PureCellContext);
|
|
25
25
|
var Component = onClick ? GRAPHICS_COMPONENT.button : GRAPHICS_COMPONENT.section;
|
|
26
26
|
var defaultGraphicPadding = pureCellContext.direction === 'horizontal' ? 'airy' : 'default';
|
|
27
27
|
var onMouseEvents = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/components/graphics/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/components/graphics/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../context';\nimport { type GraphicsElement } from '../types';\n\nimport styles from './index.module.css';\n\nexport type Props = {\n /**\n * Компоненты\n */\n children: GraphicsElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Используется модификатор -graphics\n */\n dataTestId?: string;\n\n /**\n * Вертикальное выравнивание\n */\n verticalAlign?: 'top' | 'center' | 'bottom';\n\n /**\n * Отступ от графики\n */\n graphicPadding?: 'max' | 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n\n /**\n * Клик по контенту графики.\n */\n onClick?: () => void;\n};\n\nconst GRAPHICS_COMPONENT: Record<string, keyof Pick<React.ReactHTML, 'button' | 'section'>> = {\n button: 'button',\n section: 'section',\n};\n\nexport const Graphics: React.FC<Props> = ({\n children,\n dataTestId,\n verticalAlign = 'top',\n graphicPadding,\n onClick,\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n const Component = onClick ? GRAPHICS_COMPONENT.button : GRAPHICS_COMPONENT.section;\n\n const defaultGraphicPadding = pureCellContext.direction === 'horizontal' ? 'airy' : 'default';\n\n const onMouseEvents = {\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onClick?.();\n },\n onMouseEnter: () => {\n pureCellContext.unsetMainHover?.();\n },\n onMouseLeave: () => {\n pureCellContext.setMainHover?.();\n },\n onMouseDown: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n },\n };\n\n return (\n <Component\n className={cn(\n styles.component,\n styles[verticalAlign],\n styles[pureCellContext.direction || 'horizontal'],\n styles[graphicPadding || defaultGraphicPadding],\n { [styles.button]: onClick },\n )}\n data-test-id={getDataTestId(dataTestId || pureCellContext.dataTestId, 'graphics')}\n {...(onClick && onMouseEvents)}\n >\n {children}\n </Component>\n );\n};\n"],"names":["useContext","PureCellContext","React","__assign","cn","styles","getDataTestId"],"mappings":";;;;;;;;;;;;;;;;AAsCA,IAAM,kBAAkB,GAAsE;AAC1F,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,OAAO,EAAE,SAAS;CACrB;AAEM,IAAM,QA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EACrBA,YAAM,CAAC,eAAe,CAAC,SAAS,IAAI,YAAY,CAAC,EACjDA,YAAM,CAAC,cAAc,IAAI,qBAAqB,CAAC,GAC7C,EAAA,GAAA,EAAA,EAAA,EAAA,CAACA,YAAM,CAAC,MAAM,CAAA,GAAG,OAAO,EAAA,EAAA,EAC7B,EACa,cAAA,EAAAC,kCAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,UAAU,CAAC,EAAA,GAC5E,OAAO,IAAI,aAAa,EAAC,EAE7B,QAAQ,CACD;AAEpB;;;;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
|
+
--border-radius-0: 0;
|
|
3
|
+
} :root {
|
|
2
4
|
--gap-2xs: 4px;
|
|
3
5
|
--gap-xs: 8px;
|
|
4
6
|
--gap-s: 12px;
|
|
@@ -13,40 +15,40 @@
|
|
|
13
15
|
} :root {
|
|
14
16
|
--pure-cell-clickable-area-hover-opacity: 1;
|
|
15
17
|
--pure-cell-clickable-area-active-opacity: 1;
|
|
16
|
-
} .pure-
|
|
18
|
+
} .pure-cell__component_fhs7c {
|
|
17
19
|
display: inline-flex;
|
|
18
20
|
flex-basis: auto;
|
|
19
|
-
} .pure-
|
|
21
|
+
} .pure-cell__top_fhs7c {
|
|
20
22
|
align-self: flex-start;
|
|
21
|
-
} .pure-
|
|
23
|
+
} .pure-cell__center_fhs7c {
|
|
22
24
|
align-self: center;
|
|
23
|
-
} .pure-
|
|
25
|
+
} .pure-cell__bottom_fhs7c {
|
|
24
26
|
align-self: flex-end;
|
|
25
|
-
} .pure-
|
|
27
|
+
} .pure-cell__horizontal_fhs7c.pure-cell__none_fhs7c:not(:last-child) {
|
|
26
28
|
margin-right: var(--gap-0);
|
|
27
|
-
} .pure-
|
|
29
|
+
} .pure-cell__horizontal_fhs7c.pure-cell__max_fhs7c:not(:last-child) {
|
|
28
30
|
margin-right: var(--gap-24);
|
|
29
|
-
} .pure-
|
|
31
|
+
} .pure-cell__horizontal_fhs7c.pure-cell__airy_fhs7c:not(:last-child) {
|
|
30
32
|
margin-right: var(--gap-16);
|
|
31
|
-
} .pure-
|
|
33
|
+
} .pure-cell__horizontal_fhs7c.pure-cell__default_fhs7c:not(:last-child) {
|
|
32
34
|
margin-right: var(--gap-12);
|
|
33
|
-
} .pure-
|
|
35
|
+
} .pure-cell__horizontal_fhs7c.pure-cell__compact_fhs7c:not(:last-child) {
|
|
34
36
|
margin-right: var(--gap-8);
|
|
35
|
-
} .pure-
|
|
37
|
+
} .pure-cell__horizontal_fhs7c.pure-cell__tiny_fhs7c:not(:last-child) {
|
|
36
38
|
margin-right: var(--gap-4);
|
|
37
|
-
} .pure-
|
|
39
|
+
} .pure-cell__vertical_fhs7c.pure-cell__none_fhs7c:not(:last-child) {
|
|
38
40
|
margin-bottom: var(--gap-0);
|
|
39
|
-
} .pure-
|
|
41
|
+
} .pure-cell__vertical_fhs7c.pure-cell__max_fhs7c:not(:last-child) {
|
|
40
42
|
margin-bottom: var(--gap-24);
|
|
41
|
-
} .pure-
|
|
43
|
+
} .pure-cell__vertical_fhs7c.pure-cell__airy_fhs7c:not(:last-child) {
|
|
42
44
|
margin-bottom: var(--gap-16);
|
|
43
|
-
} .pure-
|
|
45
|
+
} .pure-cell__vertical_fhs7c.pure-cell__default_fhs7c:not(:last-child) {
|
|
44
46
|
margin-bottom: var(--gap-12);
|
|
45
|
-
} .pure-
|
|
47
|
+
} .pure-cell__vertical_fhs7c.pure-cell__compact_fhs7c:not(:last-child) {
|
|
46
48
|
margin-bottom: var(--gap-8);
|
|
47
|
-
} .pure-
|
|
49
|
+
} .pure-cell__vertical_fhs7c.pure-cell__tiny_fhs7c:not(:last-child) {
|
|
48
50
|
margin-bottom: var(--gap-4);
|
|
49
|
-
} .pure-
|
|
51
|
+
} .pure-cell__button_fhs7c {
|
|
50
52
|
-webkit-tap-highlight-color: transparent;
|
|
51
53
|
box-sizing: border-box;
|
|
52
54
|
background-color: transparent;
|
|
@@ -54,7 +56,7 @@
|
|
|
54
56
|
border: 0;
|
|
55
57
|
margin: var(--gap-0);
|
|
56
58
|
box-shadow: none;
|
|
57
|
-
border-radius: 0;
|
|
59
|
+
border-radius: var(--border-radius-0);
|
|
58
60
|
-webkit-user-select: none;
|
|
59
61
|
-moz-user-select: none;
|
|
60
62
|
user-select: none;
|
|
@@ -67,9 +69,9 @@
|
|
|
67
69
|
cursor: pointer;
|
|
68
70
|
padding: var(--gap-0);
|
|
69
71
|
transition: opacity 0.15s ease-in-out;
|
|
70
|
-
min-width: auto
|
|
71
|
-
} .pure-
|
|
72
|
+
min-width: auto;
|
|
73
|
+
} .pure-cell__button_fhs7c:hover {
|
|
72
74
|
opacity: var(--pure-cell-clickable-area-hover-opacity);
|
|
73
|
-
} .pure-
|
|
75
|
+
} .pure-cell__button_fhs7c:active {
|
|
74
76
|
opacity: var(--pure-cell-clickable-area-active-opacity);
|
|
75
77
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"pure-
|
|
5
|
+
var styles = {"component":"pure-cell__component_fhs7c","top":"pure-cell__top_fhs7c","center":"pure-cell__center_fhs7c","bottom":"pure-cell__bottom_fhs7c","horizontal":"pure-cell__horizontal_fhs7c","none":"pure-cell__none_fhs7c","max":"pure-cell__max_fhs7c","airy":"pure-cell__airy_fhs7c","default":"pure-cell__default_fhs7c","compact":"pure-cell__compact_fhs7c","tiny":"pure-cell__tiny_fhs7c","vertical":"pure-cell__vertical_fhs7c","button":"pure-cell__button_fhs7c"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -6,7 +6,7 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
9
|
-
var
|
|
9
|
+
var context = require('../../context.js');
|
|
10
10
|
var index_module = require('./index.module.css.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -21,7 +21,7 @@ var MAIN_COMPONENT = {
|
|
|
21
21
|
var Main = function (_a) {
|
|
22
22
|
var _b, _c;
|
|
23
23
|
var children = _a.children, isReverse = _a.isReverse, className = _a.className, dataTestId = _a.dataTestId, onClick = _a.onClick;
|
|
24
|
-
var _d = React.useContext(
|
|
24
|
+
var _d = React.useContext(context.PureCellContext), _e = _d.direction, direction = _e === void 0 ? 'horizontal' : _e, contextDataTestId = _d.dataTestId, setMainHover = _d.setMainHover, unsetMainHover = _d.unsetMainHover;
|
|
25
25
|
var Component = onClick ? MAIN_COMPONENT.button : MAIN_COMPONENT.section;
|
|
26
26
|
var onMouseEvents = {
|
|
27
27
|
onClick: function (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/components/main/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/components/main/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../context';\nimport { type MainElement } from '../types';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Компоненты\n */\n children: MainElement;\n\n /**\n * Позволяет изменить расположение блоков внутри main\n */\n isReverse?: boolean;\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Используется модификатор -main\n */\n dataTestId?: string;\n\n /**\n * Клик по контенту.\n */\n onClick?: () => void;\n};\n\nconst MAIN_COMPONENT: Record<string, keyof Pick<React.ReactHTML, 'button' | 'section'>> = {\n button: 'button',\n section: 'section',\n};\n\nexport const Main: React.FC<Props> = ({ children, isReverse, className, dataTestId, onClick }) => {\n const {\n direction = 'horizontal',\n dataTestId: contextDataTestId,\n setMainHover,\n unsetMainHover,\n } = useContext(PureCellContext);\n\n const Component = onClick ? MAIN_COMPONENT.button : MAIN_COMPONENT.section;\n\n const onMouseEvents = {\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onClick?.();\n },\n onMouseEnter: () => {\n unsetMainHover?.();\n },\n onMouseLeave: () => {\n setMainHover?.();\n },\n onMouseDown: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n },\n };\n\n return (\n <Component\n className={cn(\n styles.component,\n styles[direction],\n {\n [styles.reverse]: isReverse,\n },\n { [styles.button]: onClick },\n className,\n )}\n data-test-id={getDataTestId(dataTestId || contextDataTestId, 'main')}\n {...(onClick && onMouseEvents)}\n >\n {children}\n </Component>\n );\n};\n"],"names":["useContext","PureCellContext","React","__assign","cn","styles","getDataTestId"],"mappings":";;;;;;;;;;;;;;;;AAsCA,IAAM,cAAc,GAAsE;AACtF,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,OAAO,EAAE,SAAS;CACrB;AAEM,IAAM,IAAI,GAAoB,UAAC,EAAuD,EAAA;;AAArD,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA;IACjF,IAAA,EAAA,GAKFA,gBAAU,CAACC,uBAAe,CAAC,EAJ3B,EAAA,GAAA,EAAA,CAAA,SAAwB,EAAxB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,YAAY,GAAA,EAAA,EACZ,iBAAiB,GAAA,EAAA,CAAA,UAAA,EAC7B,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,cAAc,GAAA,EAAA,CAAA,cACa;AA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|
} :root {
|
|
6
8
|
--pure-cell-clickable-area-hover-opacity: 1;
|
|
7
9
|
--pure-cell-clickable-area-active-opacity: 1;
|
|
8
|
-
} .pure-
|
|
10
|
+
} .pure-cell__component_2x9sd {
|
|
9
11
|
display: flex;
|
|
10
12
|
flex-direction: column;
|
|
11
13
|
align-self: center;
|
|
12
|
-
white-space: pre-line
|
|
13
|
-
} .pure-
|
|
14
|
+
white-space: pre-line;
|
|
15
|
+
} .pure-cell__component_2x9sd.pure-cell__vertical_2x9sd {
|
|
14
16
|
grid-row-gap: var(--gap-2);
|
|
15
17
|
justify-content: center;
|
|
16
18
|
align-items: center;
|
|
17
19
|
text-align: center;
|
|
18
|
-
} .pure-
|
|
20
|
+
} .pure-cell__component_2x9sd.pure-cell__reverse_2x9sd {
|
|
19
21
|
flex-direction: column-reverse;
|
|
20
|
-
} .pure-
|
|
22
|
+
} .pure-cell__component_2x9sd.pure-cell__button_2x9sd {
|
|
21
23
|
-webkit-tap-highlight-color: transparent;
|
|
22
24
|
box-sizing: border-box;
|
|
23
25
|
background-color: transparent;
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
border: 0;
|
|
26
28
|
margin: var(--gap-0);
|
|
27
29
|
box-shadow: none;
|
|
28
|
-
border-radius: 0;
|
|
30
|
+
border-radius: var(--border-radius-0);
|
|
29
31
|
-webkit-user-select: none;
|
|
30
32
|
-moz-user-select: none;
|
|
31
33
|
user-select: none;
|
|
@@ -38,9 +40,9 @@
|
|
|
38
40
|
cursor: pointer;
|
|
39
41
|
padding: var(--gap-0);
|
|
40
42
|
transition: opacity 0.15s ease-in-out;
|
|
41
|
-
min-width: auto
|
|
42
|
-
} .pure-
|
|
43
|
+
min-width: auto;
|
|
44
|
+
} .pure-cell__component_2x9sd.pure-cell__button_2x9sd:hover {
|
|
43
45
|
opacity: var(--pure-cell-clickable-area-hover-opacity);
|
|
44
|
-
} .pure-
|
|
46
|
+
} .pure-cell__component_2x9sd.pure-cell__button_2x9sd:active {
|
|
45
47
|
opacity: var(--pure-cell-clickable-area-active-opacity);
|
|
46
48
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"pure-
|
|
5
|
+
var styles = {"component":"pure-cell__component_2x9sd","vertical":"pure-cell__vertical_2x9sd","reverse":"pure-cell__reverse_2x9sd","button":"pure-cell__button_2x9sd"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -6,7 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var cn = require('classnames');
|
|
7
7
|
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
8
8
|
var coreComponentsTypography = require('@alfalab/core-components-typography');
|
|
9
|
-
var
|
|
9
|
+
var context = require('../../context.js');
|
|
10
10
|
var index_module = require('./index.module.css.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -17,7 +17,7 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
|
17
17
|
var Text = function (_a) {
|
|
18
18
|
var _b;
|
|
19
19
|
var children = _a.children, value = _a.value, rowLimit = _a.rowLimit, _c = _a.view, view = _c === void 0 ? 'component-primary' : _c, titleWeight = _a.titleWeight, titleColor = _a.titleColor, valueColor = _a.valueColor, dataTestId = _a.dataTestId;
|
|
20
|
-
var _d = React.useContext(
|
|
20
|
+
var _d = React.useContext(context.PureCellContext), _e = _d.direction, direction = _e === void 0 ? 'horizontal' : _e, contextDataTestId = _d.dataTestId;
|
|
21
21
|
var className = rowLimit && index_module["rowLimit".concat(rowLimit)];
|
|
22
22
|
return (React__default.default.createElement("div", { className: cn__default.default(index_module.component, (_b = {},
|
|
23
23
|
_b[index_module.vertical] = direction !== 'horizontal',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/components/text/component.tsx"],"sourcesContent":["import React, { ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, Text as TypographyText } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/components/text/component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, Text as TypographyText } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../context';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Контент\n */\n children?: ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2;\n\n /**\n * Размер текста\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'component'\n | 'component-primary'\n | 'secondary-large';\n\n /**\n * Толщина title\n */\n titleWeight?: 'regular' | 'bold';\n\n /**\n * Цвет title\n */\n titleColor: Color;\n\n /**\n * Value ячейки\n */\n value?: ReactNode;\n\n /**\n * Цвет value\n */\n valueColor?: Color;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для контента используется модификатор -text_content, для value ячейки -text_value\n */\n dataTestId?: string;\n};\n\nexport const Text: React.FC<Props> = ({\n children,\n value,\n rowLimit,\n view = 'component-primary',\n titleWeight,\n titleColor,\n valueColor,\n dataTestId,\n}) => {\n const { direction = 'horizontal', dataTestId: contextDataTestId } = useContext(PureCellContext);\n const className = rowLimit && styles[`rowLimit${rowLimit}`];\n\n return (\n <div\n className={cn(styles.component, {\n [styles.vertical]: direction !== 'horizontal',\n })}\n >\n <div className={styles.title}>\n <TypographyText\n view={view}\n weight={titleWeight}\n tag='div'\n color={titleColor}\n className={className}\n data-test-id={getDataTestId(dataTestId || contextDataTestId, 'text_content')}\n >\n {children}\n </TypographyText>\n </div>\n\n {value && (\n <div className={styles.value}>\n <TypographyText\n view={view}\n tag='div'\n color={valueColor}\n className={className}\n data-test-id={getDataTestId(dataTestId || contextDataTestId, 'text_value')}\n >\n {value}\n </TypographyText>\n </div>\n )}\n </div>\n );\n};\n"],"names":["useContext","PureCellContext","styles","React","cn","TypographyText","getDataTestId"],"mappings":";;;;;;;;;;;;;;;;AA2DO,IAAM,IAAI,GAAoB,UAAC,EASrC,EAAA;;QARG,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAA0B,GAAA,EAAA,CAAA,IAAA,EAA1B,IAAI,GAAA,EAAA,KAAA,MAAA,GAAG,mBAAmB,GAAA,EAAA,EAC1B,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,UAAU,GAAA,EAAA,CAAA,UAAA;AAEJ,IAAA,IAAA,EAA8D,GAAAA,gBAAU,CAACC,uBAAe,CAAC,EAAvF,EAAA,GAAA,EAAA,CAAA,SAAwB,EAAxB,SAAS,mBAAG,YAAY,GAAA,EAAA,EAAc,iBAAiB,gBAAgC;IAC/F,IAAM,SAAS,GAAG,QAAQ,IAAIC,YAAM,CAAC,UAAW,CAAA,MAAA,CAAA,QAAQ,CAAE,CAAC;IAE3D,QACIC,8CACI,SAAS,EAAEC,mBAAE,CAACF,YAAM,CAAC,SAAS,GAAA,EAAA,GAAA,EAAA;AAC1B,YAAA,EAAA,CAACA,YAAM,CAAC,QAAQ,CAAG,GAAA,SAAS,KAAK,YAAY;AAC/C,YAAA,EAAA,EAAA,EAAA;AAEF,QAAAC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAED,YAAM,CAAC,KAAK,EAAA;AACxB,YAAAC,sBAAA,CAAA,aAAA,CAACE,6BAAc,EAAA,EACX,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,WAAW,EACnB,GAAG,EAAC,KAAK,E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