@smart-react-components/ui 2.0.0-alpha-104 → 2.0.0-alpha-106

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;
@@ -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 {
@@ -13,7 +13,7 @@ exports.default = (0, styled_components_1.default)(Li_1.default)(({ theme, isAct
13
13
  align-items: center;
14
14
  border: solid 1px;
15
15
  border-radius: ${shape === 'rounded' && isFixedSize ? '100%' : theme.$.radius.pagination[shape]};
16
- cursor: ${!isDisabled ? theme.$.cursor.pagination : theme.$.cursor.paginationDisabled}};
16
+ cursor: ${!isDisabled ? theme.$.cursor.pagination : theme.$.cursor.paginationDisabled};
17
17
  display: inline-flex;
18
18
  justify-content: center;
19
19
  text-decoration: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-react-components/ui",
3
- "version": "2.0.0-alpha-104",
3
+ "version": "2.0.0-alpha-106",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "description": "SRC UI includes React and Styled components.",