@smart-react-components/ui 2.0.0-alpha-103 → 2.0.0-alpha-105

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/Dropdown/index.js CHANGED
@@ -32,7 +32,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
32
32
  const react_1 = __importDefault(require("react"));
33
33
  const FixedBox_1 = __importStar(require("../FixedBox"));
34
34
  __exportStar(require("../FixedBox"), exports);
35
- const Dropdown = ({ afterHide, afterShow, beforeHide, beforeShow, breakpoint, children, elementProps = {}, hasHideAnimation, hasShowAnimation, isDismissible, maxWidth, minWidth, position, setStatus, space, status, transitionClassName, transitionDuration, triggerInteraction }) => {
35
+ const Dropdown = ({ afterHide, afterShow, beforeHide, beforeShow, breakpoint, children, elementProps = {}, hasHideAnimation, hasShowAnimation, isDismissible, maxWidth, minWidth, position, setStatus, space, status, transitionClassName, transitionDuration, triggerInteraction = FixedBox_1.TriggerInteraction.CLICK }) => {
36
36
  var _a, _b, _c, _d;
37
37
  const triggerEl = react_1.default.useRef(null);
38
38
  const [localStatus, setLocalStatus] = react_1.default.useState(() => false);
@@ -41,7 +41,7 @@ const Dropdown = ({ afterHide, afterShow, beforeHide, beforeShow, breakpoint, ch
41
41
  getTriggerEl().dispatchEvent(new Event('src.fixedBox.setPosition'));
42
42
  }, [(_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[1]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c.length]);
43
43
  return (react_1.default.createElement(FixedBox_1.default, { afterHide: afterHide, afterShow: afterShow, beforeHide: beforeHide, beforeShow: beforeShow, breakpoint: breakpoint, elementProps: Object.assign({ overflow: ['initial', true] }, elementProps), hasHideAnimation: hasHideAnimation, hasShowAnimation: hasShowAnimation, isDismissible: isDismissible, maxWidth: maxWidth, minWidth: minWidth, position: position, setStatus: setStatus !== null && setStatus !== void 0 ? setStatus : setLocalStatus, space: space, status: status !== null && status !== void 0 ? status : localStatus, transitionClassName: transitionClassName, transitionDuration: transitionDuration, triggerInteraction: triggerInteraction },
44
- react_1.default.cloneElement(children[0], { ref: (_d = children[0].ref) !== null && _d !== void 0 ? _d : triggerEl, cursor: triggerInteraction & FixedBox_1.TriggerInteraction.CLICK ? '$cursor.dropdown' : undefined }),
44
+ react_1.default.cloneElement(children[0], Object.assign({ ref: (_d = children[0].ref) !== null && _d !== void 0 ? _d : triggerEl }, (triggerInteraction & FixedBox_1.TriggerInteraction.CLICK ? { cursor: '$cursor.dropdown' } : {}))),
45
45
  react_1.default.cloneElement(children[1], { setStatus: setStatus !== null && setStatus !== void 0 ? setStatus : setLocalStatus })));
46
46
  };
47
47
  exports.default = Dropdown;
@@ -41,6 +41,12 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
41
41
  word-break: break-word;
42
42
  word-wrap: break-word;
43
43
 
44
+ ${isSoft
45
+ ? `
46
+ font-weight: ${theme.$.fontWeight.semibold};
47
+ `
48
+ : ''}
49
+
44
50
  ${!isOutline
45
51
  ? `
46
52
  ${!isSoft
@@ -85,7 +91,7 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
85
91
 
86
92
  a {
87
93
  color: inherit;
88
- font-weight: ${theme.$.fontWeight.alertLink};
94
+ font-weight: ${!isSoft ? theme.$.fontWeight.semibold : theme.$.fontWeight.bold};
89
95
 
90
96
  &:hover {
91
97
  text-decoration: underline;
@@ -69,6 +69,12 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
69
69
  border-radius: ${(isFixedSize && shape === 'rounded') ? '100%' : theme.$.radius.badge[shape]};
70
70
  }
71
71
 
72
+ ${isSoft
73
+ ? `
74
+ font-weight: ${theme.$.fontWeight.bold};
75
+ `
76
+ : ''}
77
+
72
78
  ${!isOutline
73
79
  ? `
74
80
  ${exports.Content} {
@@ -18,22 +18,23 @@ exports.default = (0, styled_components_1.default)(Li_1.default)(({ theme, isAct
18
18
  transition: 200ms 0s ease-in-out;
19
19
  transition-property: background, border, color, fill;
20
20
 
21
- ${!isActive && !isDisabled
21
+ ${isSoft
22
+ ? `
23
+ font-weight: ${theme.$.fontWeight.bold};
24
+ `
25
+ : ''}
26
+
27
+ ${!isDisabled
22
28
  ? `
23
29
  &:hover {
24
30
  text-decoration: underline;
25
31
  }
26
32
  `
27
33
  : `
34
+ opacity: ${theme.$.opacity.breadcrumbDisabled};
28
35
  pointer-events: none;
29
36
  `}
30
37
 
31
- ${isDisabled
32
- ? `
33
- opacity: ${theme.$.opacity.breadcrumbDisabled};
34
- `
35
- : ''}
36
-
37
38
  ${!isOutline
38
39
  ? `
39
40
  ${!isSoft
@@ -51,12 +52,12 @@ exports.default = (0, styled_components_1.default)(Li_1.default)(({ theme, isAct
51
52
  : `
52
53
  ${(!isActive && !isDisabled) || isDisabled
53
54
  ? `
54
- color: ${theme.$.palette[palette].softFont};
55
- fill: ${theme.$.palette[palette].softFont};
56
- `
57
- : `
58
55
  color: ${theme.$.palette[palette].softDarkest};
59
56
  fill: ${theme.$.palette[palette].softDarkest};
57
+ `
58
+ : `
59
+ color: ${theme.$.palette[palette].softFont};
60
+ fill: ${theme.$.palette[palette].softFont};
60
61
  `}
61
62
  `}
62
63
  `
@@ -71,8 +72,8 @@ exports.default = (0, styled_components_1.default)(Li_1.default)(({ theme, isAct
71
72
  fill: ${theme.$.palette[palette].main};
72
73
  `
73
74
  : `
74
- color: ${theme.$.palette[palette].dynamicest};
75
- fill: ${theme.$.palette[palette].dynamicest};
75
+ color: ${theme.$.color.dynamic.font};
76
+ fill: ${theme.$.color.dynamic.font};
76
77
  `}
77
78
  `
78
79
  : `
@@ -82,8 +83,8 @@ exports.default = (0, styled_components_1.default)(Li_1.default)(({ theme, isAct
82
83
  fill: ${theme.$.palette[palette].soft};
83
84
  `
84
85
  : `
85
- color: ${theme.$.palette[palette].softDarkest};
86
- fill: ${theme.$.palette[palette].softDarkest};
86
+ color: ${theme.$.color.dynamic.font};
87
+ fill: ${theme.$.color.dynamic.font};
87
88
  `}
88
89
  `}
89
90
  `
@@ -106,5 +107,11 @@ exports.default = (0, styled_components_1.default)(Li_1.default)(({ theme, isAct
106
107
  : `
107
108
  color: ${theme.$.color.dynamic.accent};
108
109
  `}
110
+
111
+ ${isSoft
112
+ ? `
113
+ font-weight: ${theme.$.fontWeight.bold};
114
+ `
115
+ : ''}
109
116
  }
110
117
  `);
@@ -15,7 +15,6 @@ exports.default = styled_components_1.default.span.attrs({
15
15
  flex: 1 1 auto;
16
16
  transition: 300ms 0s ease-in-out;
17
17
  transition-property: background, border, color, fill;
18
- user-select: none;
19
18
  word-break: break-word;
20
19
  word-wrap: break-word;
21
20
  `;
@@ -58,6 +58,12 @@ exports.default = (0, styled_components_1.default)(Button_1.default).attrs(({ ha
58
58
  outline: 0;
59
59
  }
60
60
 
61
+ ${isSoft
62
+ ? `
63
+ font-weight: ${theme.$.fontWeight.bold};
64
+ `
65
+ : ''}
66
+
61
67
  ${!isFixedSize
62
68
  ? `
63
69
  ${(!isBlock)
@@ -38,18 +38,38 @@ exports.default = (0, styled_components_1.default)(Section_1.default).attrs({
38
38
  }
39
39
 
40
40
  input {
41
+ border: solid 1px;
41
42
  border-radius: ${theme.$.radius.datePicker};
42
43
  text-align: center;
43
44
 
44
45
  ${!isSoft
45
46
  ? `
46
47
  background: ${theme.$.palette[palette].main};
48
+ border-color: ${theme.$.palette[palette].dynamic};
47
49
  color: ${theme.$.palette[palette].font};
50
+
51
+ &:active,
52
+ &:focus {
53
+ background: ${theme.$.palette[palette].dark};
54
+ border-color: ${theme.$.palette[palette].dynamicer};
55
+ }
48
56
  `
49
57
  : `
50
58
  background: ${theme.$.palette[palette].soft};
59
+ border-color: ${theme.$.palette[palette].softDark};
51
60
  color: ${theme.$.palette[palette].softFont};
61
+
62
+ &:active,
63
+ &:focus {
64
+ background: ${theme.$.palette[palette].softDark};
65
+ border-color: ${theme.$.palette[palette].softDarker};
66
+ }
52
67
  `}
68
+
69
+ &:active,
70
+ &:focus {
71
+ outline: 0;
72
+ }
53
73
  }
54
74
 
55
75
  svg {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-react-components/ui",
3
- "version": "2.0.0-alpha-103",
3
+ "version": "2.0.0-alpha-105",
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.0-alpha-35",
68
- "@smart-react-components/router": "2.0.0-alpha-33",
69
- "@smart-react-components/transition": "2.0.0-alpha-30",
67
+ "@smart-react-components/core": "2.0.0-alpha-37",
68
+ "@smart-react-components/router": "2.0.0-alpha-34",
69
+ "@smart-react-components/transition": "2.0.0-alpha-31",
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.0-alpha-35",
87
- "@smart-react-components/router": "^2.0.0-alpha-33",
88
- "@smart-react-components/transition": "^2.0.0-alpha-30",
86
+ "@smart-react-components/core": "^2.0.0-alpha-37",
87
+ "@smart-react-components/router": "^2.0.0-alpha-34",
88
+ "@smart-react-components/transition": "^2.0.0-alpha-31",
89
89
  "react": "^18.2.0",
90
90
  "react-dom": "^18.2.0",
91
91
  "styled-components": "^5.3.5"