@smart-react-components/ui 2.0.13 → 2.0.15

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/Table/Tr.js CHANGED
@@ -5,17 +5,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Tr_1 = __importDefault(require("@smart-react-components/core/Element/Tr"));
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
- exports.default = (0, styled_components_1.default)(Tr_1.default)(({ theme, hasHover, isEven, isSoft, palette, startIndex = 0 }) => `
8
+ exports.default = (0, styled_components_1.default)(Tr_1.default)(({ theme, hasHover, isEven, isSoft, palette, startIndex = 0 }) => {
9
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
10
+ return `
9
11
  ${palette
10
- ? `
12
+ ? `
11
13
  > *:nth-child(n+${startIndex}) {
12
14
  ${!isSoft
13
- ? `
14
- background: ${!isEven ? theme.$.palette[palette].background : theme.$.palette[palette].dynamic};
15
- border-color: ${theme.$.palette[palette].dynamicest};
16
- color: ${theme.$.palette[palette].font};
15
+ ? `
16
+ background: ${!isEven ? ((_c = (_b = (_a = theme.$.palette[palette].table) === null || _a === void 0 ? void 0 : _a.odd) === null || _b === void 0 ? void 0 : _b.background) !== null && _c !== void 0 ? _c : theme.$.palette[palette].background) : ((_f = (_e = (_d = theme.$.palette[palette].table) === null || _d === void 0 ? void 0 : _d.even) === null || _e === void 0 ? void 0 : _e.background) !== null && _f !== void 0 ? _f : theme.$.palette[palette].dynamic)};
17
+ border-color: ${!isEven ? ((_j = (_h = (_g = theme.$.palette[palette].table) === null || _g === void 0 ? void 0 : _g.odd) === null || _h === void 0 ? void 0 : _h.border) !== null && _j !== void 0 ? _j : theme.$.palette[palette].dynamicest) : ((_m = (_l = (_k = theme.$.palette[palette].table) === null || _k === void 0 ? void 0 : _k.even) === null || _l === void 0 ? void 0 : _l.border) !== null && _m !== void 0 ? _m : theme.$.palette[palette].dynamicest)};
18
+ color: ${!isEven ? ((_q = (_p = (_o = theme.$.palette[palette]) === null || _o === void 0 ? void 0 : _o.odd) === null || _p === void 0 ? void 0 : _p.font) !== null && _q !== void 0 ? _q : theme.$.palette[palette].font) : ((_t = (_s = (_r = theme.$.palette[palette]) === null || _r === void 0 ? void 0 : _r.even) === null || _s === void 0 ? void 0 : _s.font) !== null && _t !== void 0 ? _t : theme.$.palette[palette].font)};
17
19
  `
18
- : `
20
+ : `
19
21
  background: ${!isEven ? theme.$.palette[palette].softBackground : theme.$.palette[palette].softDynamic};
20
22
  border-color: ${theme.$.palette[palette].softDynamicest};
21
23
  color: ${theme.$.palette[palette].softFont};
@@ -23,12 +25,19 @@ exports.default = (0, styled_components_1.default)(Tr_1.default)(({ theme, hasHo
23
25
  }
24
26
 
25
27
  ${hasHover
26
- ? `
28
+ ? `
27
29
  &:hover > *:nth-child(n+${startIndex}) {
28
- background: ${!isSoft ? theme.$.palette[palette].dynamicer : theme.$.palette[palette].softDynamicer};
30
+ ${!isSoft
31
+ ? `
32
+ background: ${!isEven ? ((_x = (_w = (_v = (_u = theme.$.palette[palette].table) === null || _u === void 0 ? void 0 : _u.odd) === null || _v === void 0 ? void 0 : _v.hover) === null || _w === void 0 ? void 0 : _w.background) !== null && _x !== void 0 ? _x : theme.$.palette[palette].dynamicer) : ((_1 = (_0 = (_z = (_y = theme.$.palette[palette].table) === null || _y === void 0 ? void 0 : _y.even) === null || _z === void 0 ? void 0 : _z.hover) === null || _0 === void 0 ? void 0 : _0.background) !== null && _1 !== void 0 ? _1 : theme.$.palette[palette].dynamicer)};
33
+ `
34
+ : `
35
+ background: ${theme.$.palette[palette].softDynamicer};
36
+ `}
29
37
  }
30
38
  `
31
- : ''}
39
+ : ''}
32
40
  `
33
- : ''}
34
- `);
41
+ : ''}
42
+ `;
43
+ });
@@ -5,7 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"));
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
- exports.default = (0, styled_components_1.default)(Div_1.default)(({ theme, hasBorder, hasSeparatedLeftAddon, hasSeparatedRightAddon, isDisabled, isFocused, isOutline, isSoft, palette, shape }) => `
8
+ exports.default = (0, styled_components_1.default)(Div_1.default)(({ theme, hasBorder, hasSeparatedLeftAddon, hasSeparatedRightAddon, isDisabled, isFocused, isOutline, isSoft, palette, shape }) => {
9
+ var _a, _b, _c, _d, _e;
10
+ return `
9
11
  border: ${hasBorder ? 'solid 1px' : '0'};
10
12
  border-radius: ${theme.$.radius.input[shape]};
11
13
  display: flex;
@@ -16,43 +18,44 @@ exports.default = (0, styled_components_1.default)(Div_1.default)(({ theme, hasB
16
18
  transition-property: border;
17
19
 
18
20
  ${!isOutline
19
- ? `
20
- ${!isSoft
21
21
  ? `
22
- border-color: ${!isFocused ? theme.$.palette[palette].dark : theme.$.palette[palette].dynamicest};
22
+ ${!isSoft
23
+ ? `
24
+ border-color: ${!isFocused ? ((_b = (_a = theme.$.palette[palette].input) === null || _a === void 0 ? void 0 : _a.border) !== null && _b !== void 0 ? _b : theme.$.palette[palette].dark) : ((_e = (_d = (_c = theme.$.palette[palette].input) === null || _c === void 0 ? void 0 : _c.focused) === null || _d === void 0 ? void 0 : _d.border) !== null && _e !== void 0 ? _e : theme.$.palette[palette].dynamicest)};
23
25
  `
24
- : `
26
+ : `
25
27
  border-color: ${!isFocused ? theme.$.palette[palette].softDynamic : theme.$.palette[palette].softDynamicest};
26
28
  `}
27
29
  `
28
- : `
30
+ : `
29
31
  ${!isFocused
30
- ? `
32
+ ? `
31
33
  border-color: ${theme.$.color.dynamic.accent};
32
34
  `
33
- : `
35
+ : `
34
36
  border-color: ${!isSoft ? theme.$.palette[palette].main : theme.$.palette[palette].soft};
35
37
  `}
36
38
  `}
37
39
 
38
40
  ${isDisabled
39
- ? `
41
+ ? `
40
42
  opacity: ${theme.$.opacity.formDisabled};
41
43
  `
42
- : ''}
44
+ : ''}
43
45
 
44
46
  ${(hasSeparatedLeftAddon)
45
- ? `
47
+ ? `
46
48
  border-left: 0;
47
49
  border-bottom-left-radius: 0;
48
50
  border-top-left-radius: 0;
49
51
  `
50
- : ''}
52
+ : ''}
51
53
  ${hasSeparatedRightAddon
52
- ? `
54
+ ? `
53
55
  border-right: 0;
54
56
  border-bottom-right-radius: 0;
55
57
  border-top-right-radius: 0;
56
58
  `
57
- : ''}
58
- `);
59
+ : ''}
60
+ `;
61
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-react-components/ui",
3
- "version": "2.0.13",
3
+ "version": "2.0.15",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "description": "SRC UI includes React and Styled components.",
@@ -64,9 +64,9 @@
64
64
  "test": "jest"
65
65
  },
66
66
  "devDependencies": {
67
- "@smart-react-components/core": "2.0.11",
68
- "@smart-react-components/router": "2.0.9",
69
- "@smart-react-components/transition": "2.0.10",
67
+ "@smart-react-components/core": "2.0.13",
68
+ "@smart-react-components/router": "2.0.11",
69
+ "@smart-react-components/transition": "2.0.12",
70
70
  "@testing-library/react": "13.4.0",
71
71
  "@types/jest": "29.0.1",
72
72
  "@types/react": "18.0.19",
@@ -83,9 +83,9 @@
83
83
  "typescript": "4.8.3"
84
84
  },
85
85
  "peerDependencies": {
86
- "@smart-react-components/core": "^2.0.11",
87
- "@smart-react-components/router": "^2.0.9",
88
- "@smart-react-components/transition": "^2.0.10",
86
+ "@smart-react-components/core": "^2.0.13",
87
+ "@smart-react-components/router": "^2.0.11",
88
+ "@smart-react-components/transition": "^2.0.12",
89
89
  "react": "^18.2.0",
90
90
  "react-dom": "^18.2.0",
91
91
  "styled-components": "^5.3.5"