glints-aries 4.0.312 → 4.0.313

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.
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { Item } from './ActionList';
3
- export declare const ActionItem: ({ content, description, icon, action }: Item) => JSX.Element;
3
+ export declare const ActionItem: ({ content, description, icon, action, disabled, }: Item) => JSX.Element;
@@ -6,7 +6,8 @@ export var ActionItem = function ActionItem(_ref) {
6
6
  var content = _ref.content,
7
7
  description = _ref.description,
8
8
  icon = _ref.icon,
9
- action = _ref.action;
9
+ action = _ref.action,
10
+ disabled = _ref.disabled;
10
11
  var hasDescription = !!description;
11
12
  return /*#__PURE__*/React.createElement(StyledActionListItemWrapper, {
12
13
  tabIndex: 0,
@@ -16,13 +17,16 @@ export var ActionItem = function ActionItem(_ref) {
16
17
  },
17
18
  onClick: function onClick() {
18
19
  return action == null ? void 0 : action();
19
- }
20
+ },
21
+ "data-disabled": disabled
20
22
  }, /*#__PURE__*/React.createElement(StyledActionListItem, null, icon, /*#__PURE__*/React.createElement(Typography, {
21
23
  as: "div",
22
- variant: "body1"
24
+ variant: "body1",
25
+ className: "action-item-content"
23
26
  }, content)), hasDescription && /*#__PURE__*/React.createElement(StyledActionListItemDescription, null, /*#__PURE__*/React.createElement(Typography, {
24
27
  as: "div",
25
28
  variant: "body1",
26
- color: Neutral.B40
29
+ color: Neutral.B40,
30
+ className: "action-item-description"
27
31
  }, description)));
28
32
  };
@@ -4,6 +4,7 @@ export declare type Item = {
4
4
  description?: React.ReactNode;
5
5
  icon?: React.ReactElement<React.SVGProps<SVGSVGElement>>;
6
6
  action?: (...args: any) => void;
7
+ disabled?: boolean;
7
8
  };
8
9
  export declare type Section = {
9
10
  title: React.ReactNode;
@@ -14,7 +14,7 @@ export var StyledActionListSection = styled.div.withConfig({
14
14
  export var StyledActionListItemWrapper = styled.div.withConfig({
15
15
  displayName: "ActionListStyle__StyledActionListItemWrapper",
16
16
  componentId: "sc-2x4nd5-2"
17
- })(["margin:0 ", ";cursor:pointer;&:hover{background:", ";border-radius:", ";}&:active{background:", ";border-radius:", ";}&&&{&:active{border:0;}}&:focus{outline:none;border:2px solid ", ";border-radius:", ";}"], space8, Neutral.B99, borderRadius4, Neutral.B95, borderRadius4, Blue.S54, borderRadius4);
17
+ })(["margin:0 ", ";cursor:pointer;&:hover{background:", ";border-radius:", ";}&:active{background:", ";border-radius:", ";}&&&{&:active{border:0;}}&:focus{outline:none;border:2px solid ", ";border-radius:", ";}&[data-disabled='true']{pointer-events:none;svg{fill:", ";}.action-item-content,.action-item-description{color:", ";}}"], space8, Neutral.B99, borderRadius4, Neutral.B95, borderRadius4, Blue.S54, borderRadius4, Neutral.B85, Neutral.B85);
18
18
  export var StyledActionListItem = styled.div.withConfig({
19
19
  displayName: "ActionListStyle__StyledActionListItem",
20
20
  componentId: "sc-2x4nd5-3"
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { Item } from './ActionList';
3
- export declare const ActionItem: ({ content, description, icon, action }: Item) => JSX.Element;
3
+ export declare const ActionItem: ({ content, description, icon, action, disabled, }: Item) => JSX.Element;
@@ -11,7 +11,8 @@ var ActionItem = function ActionItem(_ref) {
11
11
  var content = _ref.content,
12
12
  description = _ref.description,
13
13
  icon = _ref.icon,
14
- action = _ref.action;
14
+ action = _ref.action,
15
+ disabled = _ref.disabled;
15
16
  var hasDescription = !!description;
16
17
  return /*#__PURE__*/_react["default"].createElement(_ActionListStyle.StyledActionListItemWrapper, {
17
18
  tabIndex: 0,
@@ -21,14 +22,17 @@ var ActionItem = function ActionItem(_ref) {
21
22
  },
22
23
  onClick: function onClick() {
23
24
  return action == null ? void 0 : action();
24
- }
25
+ },
26
+ "data-disabled": disabled
25
27
  }, /*#__PURE__*/_react["default"].createElement(_ActionListStyle.StyledActionListItem, null, icon, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
26
28
  as: "div",
27
- variant: "body1"
29
+ variant: "body1",
30
+ className: "action-item-content"
28
31
  }, content)), hasDescription && /*#__PURE__*/_react["default"].createElement(_ActionListStyle.StyledActionListItemDescription, null, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
29
32
  as: "div",
30
33
  variant: "body1",
31
- color: _colors.Neutral.B40
34
+ color: _colors.Neutral.B40,
35
+ className: "action-item-description"
32
36
  }, description)));
33
37
  };
34
38
  exports.ActionItem = ActionItem;
@@ -4,6 +4,7 @@ export declare type Item = {
4
4
  description?: React.ReactNode;
5
5
  icon?: React.ReactElement<React.SVGProps<SVGSVGElement>>;
6
6
  action?: (...args: any) => void;
7
+ disabled?: boolean;
7
8
  };
8
9
  export declare type Section = {
9
10
  title: React.ReactNode;
@@ -23,7 +23,7 @@ exports.StyledActionListSection = StyledActionListSection;
23
23
  var StyledActionListItemWrapper = _styledComponents["default"].div.withConfig({
24
24
  displayName: "ActionListStyle__StyledActionListItemWrapper",
25
25
  componentId: "sc-2x4nd5-2"
26
- })(["margin:0 ", ";cursor:pointer;&:hover{background:", ";border-radius:", ";}&:active{background:", ";border-radius:", ";}&&&{&:active{border:0;}}&:focus{outline:none;border:2px solid ", ";border-radius:", ";}"], _spacing.space8, _colors.Neutral.B99, _borderRadius.borderRadius4, _colors.Neutral.B95, _borderRadius.borderRadius4, _colors.Blue.S54, _borderRadius.borderRadius4);
26
+ })(["margin:0 ", ";cursor:pointer;&:hover{background:", ";border-radius:", ";}&:active{background:", ";border-radius:", ";}&&&{&:active{border:0;}}&:focus{outline:none;border:2px solid ", ";border-radius:", ";}&[data-disabled='true']{pointer-events:none;svg{fill:", ";}.action-item-content,.action-item-description{color:", ";}}"], _spacing.space8, _colors.Neutral.B99, _borderRadius.borderRadius4, _colors.Neutral.B95, _borderRadius.borderRadius4, _colors.Blue.S54, _borderRadius.borderRadius4, _colors.Neutral.B85, _colors.Neutral.B85);
27
27
  exports.StyledActionListItemWrapper = StyledActionListItemWrapper;
28
28
  var StyledActionListItem = _styledComponents["default"].div.withConfig({
29
29
  displayName: "ActionListStyle__StyledActionListItem",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glints-aries",
3
- "version": "4.0.312",
3
+ "version": "4.0.313",
4
4
  "description": "Glints ui-kit for frontend",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",