@reltio/components 1.4.2139 → 1.4.2140

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.
@@ -0,0 +1,9 @@
1
+ const styles = {"levelLines":"RCTree-levelLines--wCbE3","levelLine":"RCTree-levelLine--RxwVZ","showLine":"RCTree-showLine--lFoCT","lastLevelLine":"RCTree-lastLevelLine--MW18c","horizontalLine":"RCTree-horizontalLine--VbswG"};
2
+ if (typeof document !== 'undefined') {
3
+ const head = document.head || document.getElementsByTagName('head')[0]
4
+ const style = document.createElement('style');
5
+ style.type = 'text/css'
6
+ style.innerHTML = `.RCTree-levelLines--wCbE3{bottom:0;cursor:auto;display:flex;padding-left:7px;position:absolute;top:0;z-index:-1}.RCTree-levelLine--RxwVZ{height:100%;padding-left:16px;position:relative}.RCTree-showLine--lFoCT:after{background-color:rgba(0,122,193,.3);bottom:0;content:"";height:100%;left:0;position:absolute;top:0;width:1px}.RCTree-lastLevelLine--MW18c:after{height:14px}.RCTree-horizontalLine--VbswG:before{background-color:rgba(0,122,193,.3);content:"";height:1px;left:0;position:absolute;top:14px;width:4px}`;
7
+ head.appendChild(style);
8
+ }
9
+ export default styles;
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
2
  import classnames from 'classnames';
3
3
  import { DEPTH_LEVEL_INDENT } from './helper';
4
- import { useStyles } from './levelLinesStyles';
4
+ import styles from './RCTREELevelLines.module.css';
5
5
  var LevelLine = function (_a) {
6
6
  var _b;
7
7
  var _c = _a.needDrawLine, needDrawLine = _c === void 0 ? false : _c, _d = _a.isLastLevelLine, isLastLevelLine = _d === void 0 ? false : _d, _e = _a.drawHorizontalLine, drawHorizontalLine = _e === void 0 ? false : _e;
8
- var styles = useStyles({});
9
8
  return (React.createElement("div", { className: classnames(styles.levelLine, (_b = {},
10
9
  _b[styles.showLine] = needDrawLine,
11
10
  _b[styles.lastLevelLine] = isLastLevelLine,
@@ -16,7 +15,6 @@ export var RCTreeLevelLines = function (_a) {
16
15
  var levelLine = _a.levelLine;
17
16
  var _b = levelLine || [], _c = _b[0], needDrawLines = _c === void 0 ? [] : _c, _d = _b[1], isLast = _d === void 0 ? false : _d;
18
17
  var level = needDrawLines.length + 2;
19
- var styles = useStyles({ level: level });
20
18
  return (React.createElement("div", { className: styles.levelLines, style: { left: "-".concat(DEPTH_LEVEL_INDENT * level, "px") } }, needDrawLines
21
19
  .map(function (needDrawLine, index) {
22
20
  return React.createElement(LevelLine, { key: index, needDrawLine: needDrawLine });
@@ -0,0 +1,9 @@
1
+ const styles = {"levelLines":"RCTree-levelLines--wCbE3","levelLine":"RCTree-levelLine--RxwVZ","showLine":"RCTree-showLine--lFoCT","lastLevelLine":"RCTree-lastLevelLine--MW18c","horizontalLine":"RCTree-horizontalLine--VbswG"};
2
+ if (typeof document !== 'undefined') {
3
+ const head = document.head || document.getElementsByTagName('head')[0]
4
+ const style = document.createElement('style');
5
+ style.type = 'text/css'
6
+ style.innerHTML = `.RCTree-levelLines--wCbE3{bottom:0;cursor:auto;display:flex;padding-left:7px;position:absolute;top:0;z-index:-1}.RCTree-levelLine--RxwVZ{height:100%;padding-left:16px;position:relative}.RCTree-showLine--lFoCT:after{background-color:rgba(0,122,193,.3);bottom:0;content:"";height:100%;left:0;position:absolute;top:0;width:1px}.RCTree-lastLevelLine--MW18c:after{height:14px}.RCTree-horizontalLine--VbswG:before{background-color:rgba(0,122,193,.3);content:"";height:1px;left:0;position:absolute;top:14px;width:4px}`;
7
+ head.appendChild(style);
8
+ }
9
+ module.exports = styles;
@@ -7,23 +7,21 @@ exports.RCTreeLevelLines = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  var classnames_1 = __importDefault(require("classnames"));
9
9
  var helper_1 = require("./helper");
10
- var levelLinesStyles_1 = require("./levelLinesStyles");
10
+ var RCTREELevelLines_module_css_1 = __importDefault(require("./RCTREELevelLines.module.css"));
11
11
  var LevelLine = function (_a) {
12
12
  var _b;
13
13
  var _c = _a.needDrawLine, needDrawLine = _c === void 0 ? false : _c, _d = _a.isLastLevelLine, isLastLevelLine = _d === void 0 ? false : _d, _e = _a.drawHorizontalLine, drawHorizontalLine = _e === void 0 ? false : _e;
14
- var styles = (0, levelLinesStyles_1.useStyles)({});
15
- return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.levelLine, (_b = {},
16
- _b[styles.showLine] = needDrawLine,
17
- _b[styles.lastLevelLine] = isLastLevelLine,
18
- _b[styles.horizontalLine] = drawHorizontalLine,
14
+ return (react_1.default.createElement("div", { className: (0, classnames_1.default)(RCTREELevelLines_module_css_1.default.levelLine, (_b = {},
15
+ _b[RCTREELevelLines_module_css_1.default.showLine] = needDrawLine,
16
+ _b[RCTREELevelLines_module_css_1.default.lastLevelLine] = isLastLevelLine,
17
+ _b[RCTREELevelLines_module_css_1.default.horizontalLine] = drawHorizontalLine,
19
18
  _b)) }));
20
19
  };
21
20
  var RCTreeLevelLines = function (_a) {
22
21
  var levelLine = _a.levelLine;
23
22
  var _b = levelLine || [], _c = _b[0], needDrawLines = _c === void 0 ? [] : _c, _d = _b[1], isLast = _d === void 0 ? false : _d;
24
23
  var level = needDrawLines.length + 2;
25
- var styles = (0, levelLinesStyles_1.useStyles)({ level: level });
26
- return (react_1.default.createElement("div", { className: styles.levelLines, style: { left: "-".concat(helper_1.DEPTH_LEVEL_INDENT * level, "px") } }, needDrawLines
24
+ return (react_1.default.createElement("div", { className: RCTREELevelLines_module_css_1.default.levelLines, style: { left: "-".concat(helper_1.DEPTH_LEVEL_INDENT * level, "px") } }, needDrawLines
27
25
  .map(function (needDrawLine, index) {
28
26
  return react_1.default.createElement(LevelLine, { key: index, needDrawLine: needDrawLine });
29
27
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.2139",
3
+ "version": "1.4.2140",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./index.js",
@@ -1,5 +0,0 @@
1
- type StyleProps = {
2
- level?: number;
3
- };
4
- export declare const useStyles: (props: StyleProps) => import("@mui/styles").ClassNameMap<"showLine" | "levelLines" | "levelLine" | "lastLevelLine" | "horizontalLine">;
5
- export {};
@@ -1,50 +0,0 @@
1
- import { makeStyles } from '@mui/styles';
2
- import { DEPTH_LEVEL_INDENT } from './helper';
3
- export var useStyles = makeStyles(function () { return ({
4
- levelLines: function (_a) {
5
- var level = _a.level;
6
- return ({
7
- position: 'absolute',
8
- left: "-".concat(level * DEPTH_LEVEL_INDENT, "px"),
9
- display: 'flex',
10
- paddingLeft: '7px',
11
- cursor: 'initial',
12
- bottom: 0,
13
- top: 0,
14
- zIndex: -1
15
- });
16
- },
17
- levelLine: {
18
- paddingLeft: '16px',
19
- height: '100%',
20
- position: 'relative'
21
- },
22
- showLine: {
23
- '&:after': {
24
- content: '""',
25
- position: 'absolute',
26
- height: '100%',
27
- width: '1px',
28
- left: '0',
29
- top: '0',
30
- bottom: '0',
31
- backgroundColor: 'rgba(0, 122, 193, 0.3)'
32
- }
33
- },
34
- lastLevelLine: {
35
- '&:after': {
36
- height: '14px'
37
- }
38
- },
39
- horizontalLine: {
40
- '&:before': {
41
- content: '""',
42
- height: '1px',
43
- width: '4px',
44
- position: 'absolute',
45
- top: '14px',
46
- left: '0',
47
- backgroundColor: 'rgba(0, 122, 193, 0.3)'
48
- }
49
- }
50
- }); });
@@ -1,5 +0,0 @@
1
- type StyleProps = {
2
- level?: number;
3
- };
4
- export declare const useStyles: (props: StyleProps) => import("@mui/styles").ClassNameMap<"showLine" | "levelLines" | "levelLine" | "lastLevelLine" | "horizontalLine">;
5
- export {};
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useStyles = void 0;
4
- var styles_1 = require("@mui/styles");
5
- var helper_1 = require("./helper");
6
- exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
7
- levelLines: function (_a) {
8
- var level = _a.level;
9
- return ({
10
- position: 'absolute',
11
- left: "-".concat(level * helper_1.DEPTH_LEVEL_INDENT, "px"),
12
- display: 'flex',
13
- paddingLeft: '7px',
14
- cursor: 'initial',
15
- bottom: 0,
16
- top: 0,
17
- zIndex: -1
18
- });
19
- },
20
- levelLine: {
21
- paddingLeft: '16px',
22
- height: '100%',
23
- position: 'relative'
24
- },
25
- showLine: {
26
- '&:after': {
27
- content: '""',
28
- position: 'absolute',
29
- height: '100%',
30
- width: '1px',
31
- left: '0',
32
- top: '0',
33
- bottom: '0',
34
- backgroundColor: 'rgba(0, 122, 193, 0.3)'
35
- }
36
- },
37
- lastLevelLine: {
38
- '&:after': {
39
- height: '14px'
40
- }
41
- },
42
- horizontalLine: {
43
- '&:before': {
44
- content: '""',
45
- height: '1px',
46
- width: '4px',
47
- position: 'absolute',
48
- top: '14px',
49
- left: '0',
50
- backgroundColor: 'rgba(0, 122, 193, 0.3)'
51
- }
52
- }
53
- }); });