@vitality-ds/components 4.3.4 → 4.4.0
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/dist/StatusBadge/StatusBadge.js +4 -2
- package/dist/StatusBadge/StatusBadgeButton.js +4 -2
- package/dist/StatusBadge/StatusBadgeLink.js +4 -2
- package/dist/Switch/constants/labelDirections.js +16 -0
- package/dist/Switch/{constants.js → constants/size.js} +4 -5
- package/dist/Switch/constants/transitions.js +11 -0
- package/dist/Switch/index.js +15 -3
- package/dist/Switch/styled.js +4 -2
- package/dist/Switch/styles/BaseSwitch.styles.js +9 -4
- package/dist/Switch/styles/BaseSwitchLabel.styles.js +23 -0
- package/dist/Switch/styles/BaseSwitchThumb.styles.js +15 -8
- package/dist/components/src/StatusBadge/StatusBadge.d.ts +2 -1
- package/dist/components/src/StatusBadge/StatusBadge.d.ts.map +1 -1
- package/dist/components/src/StatusBadge/StatusBadge.js +2 -2
- package/dist/components/src/StatusBadge/StatusBadge.js.map +1 -1
- package/dist/components/src/StatusBadge/StatusBadgeButton.d.ts +2 -1
- package/dist/components/src/StatusBadge/StatusBadgeButton.d.ts.map +1 -1
- package/dist/components/src/StatusBadge/StatusBadgeButton.js +2 -2
- package/dist/components/src/StatusBadge/StatusBadgeButton.js.map +1 -1
- package/dist/components/src/StatusBadge/StatusBadgeLink.d.ts +2 -1
- package/dist/components/src/StatusBadge/StatusBadgeLink.d.ts.map +1 -1
- package/dist/components/src/StatusBadge/StatusBadgeLink.js +2 -2
- package/dist/components/src/StatusBadge/StatusBadgeLink.js.map +1 -1
- package/dist/components/src/StatusBadge/types.d.ts +5 -0
- package/dist/components/src/StatusBadge/types.d.ts.map +1 -1
- package/dist/components/src/Switch/constants/labelDirections.d.ts +7 -0
- package/dist/components/src/Switch/constants/labelDirections.d.ts.map +1 -0
- package/dist/components/src/Switch/constants/labelDirections.js +13 -0
- package/dist/components/src/Switch/constants/labelDirections.js.map +1 -0
- package/dist/components/src/Switch/constants/size.d.ts +8 -0
- package/dist/components/src/Switch/constants/size.d.ts.map +1 -0
- package/dist/components/src/Switch/{constants.js → constants/size.js} +3 -4
- package/dist/components/src/Switch/constants/size.js.map +1 -0
- package/dist/components/src/Switch/constants/transitions.d.ts +6 -0
- package/dist/components/src/Switch/constants/transitions.d.ts.map +1 -0
- package/dist/components/src/Switch/constants/transitions.js +8 -0
- package/dist/components/src/Switch/constants/transitions.js.map +1 -0
- package/dist/components/src/Switch/index.d.ts +4 -2
- package/dist/components/src/Switch/index.d.ts.map +1 -1
- package/dist/components/src/Switch/index.js +9 -4
- package/dist/components/src/Switch/index.js.map +1 -1
- package/dist/components/src/Switch/styled.d.ts +713 -0
- package/dist/components/src/Switch/styled.d.ts.map +1 -1
- package/dist/components/src/Switch/styled.js +3 -1
- package/dist/components/src/Switch/styled.js.map +1 -1
- package/dist/components/src/Switch/styles/BaseSwitch.styles.d.ts.map +1 -1
- package/dist/components/src/Switch/styles/BaseSwitch.styles.js +7 -4
- package/dist/components/src/Switch/styles/BaseSwitch.styles.js.map +1 -1
- package/dist/components/src/Switch/styles/BaseSwitchLabel.styles.d.ts +366 -0
- package/dist/components/src/Switch/styles/BaseSwitchLabel.styles.d.ts.map +1 -0
- package/dist/components/src/Switch/styles/BaseSwitchLabel.styles.js +20 -0
- package/dist/components/src/Switch/styles/BaseSwitchLabel.styles.js.map +1 -0
- package/dist/components/src/Switch/styles/BaseSwitchThumb.styles.d.ts.map +1 -1
- package/dist/components/src/Switch/styles/BaseSwitchThumb.styles.js +11 -8
- package/dist/components/src/Switch/styles/BaseSwitchThumb.styles.js.map +1 -1
- package/dist/components/src/Switch/types.d.ts +10 -0
- package/dist/components/src/Switch/types.d.ts.map +1 -1
- package/dist/esm/StatusBadge/StatusBadge.js +4 -2
- package/dist/esm/StatusBadge/StatusBadgeButton.js +4 -2
- package/dist/esm/StatusBadge/StatusBadgeLink.js +4 -2
- package/dist/esm/Switch/constants/labelDirections.js +10 -0
- package/dist/esm/Switch/constants/size.js +7 -0
- package/dist/esm/Switch/constants/transitions.js +5 -0
- package/dist/esm/Switch/index.js +16 -4
- package/dist/esm/Switch/styled.js +3 -1
- package/dist/esm/Switch/styles/BaseSwitch.styles.js +9 -4
- package/dist/esm/Switch/styles/BaseSwitchLabel.styles.js +17 -0
- package/dist/esm/Switch/styles/BaseSwitchThumb.styles.js +15 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/components/src/Switch/constants.d.ts +0 -10
- package/dist/components/src/Switch/constants.d.ts.map +0 -1
- package/dist/components/src/Switch/constants.js.map +0 -1
- package/dist/esm/Switch/constants.js +0 -8
|
@@ -11,10 +11,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _StatusBadgeIcon = _interopRequireDefault(require("./components/StatusBadgeIcon"));
|
|
12
12
|
var _logic = require("./logic");
|
|
13
13
|
var _styled = require("./styled");
|
|
14
|
-
var _excluded = ["label", "icon", "importance", "severity", "css", "style", "className", "as"];
|
|
14
|
+
var _excluded = ["label", "icon", "hideIcon", "importance", "severity", "css", "style", "className", "as"];
|
|
15
15
|
var StatusBadge = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwardedRef) {
|
|
16
16
|
var label = _ref.label,
|
|
17
17
|
icon = _ref.icon,
|
|
18
|
+
_ref$hideIcon = _ref.hideIcon,
|
|
19
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
18
20
|
_ref$importance = _ref.importance,
|
|
19
21
|
importance = _ref$importance === void 0 ? "normal" : _ref$importance,
|
|
20
22
|
_ref$severity = _ref.severity,
|
|
@@ -28,7 +30,7 @@ var StatusBadge = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forw
|
|
|
28
30
|
ref: forwardedRef,
|
|
29
31
|
importance: importance,
|
|
30
32
|
severity: severity
|
|
31
|
-
}, restProps), /*#__PURE__*/_react["default"].createElement(_StatusBadgeIcon["default"], null, icon || (0, _logic.getIcon)(severity)), label);
|
|
33
|
+
}, restProps), !hideIcon && /*#__PURE__*/_react["default"].createElement(_StatusBadgeIcon["default"], null, icon || (0, _logic.getIcon)(severity)), label);
|
|
32
34
|
});
|
|
33
35
|
StatusBadge.displayName = "StatusBadge";
|
|
34
36
|
var _default = exports["default"] = StatusBadge;
|
|
@@ -11,10 +11,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _StatusBadgeIcon = _interopRequireDefault(require("./components/StatusBadgeIcon"));
|
|
12
12
|
var _logic = require("./logic");
|
|
13
13
|
var _styled = require("./styled");
|
|
14
|
-
var _excluded = ["label", "icon", "importance", "severity", "css", "style", "className", "as", "onClick"];
|
|
14
|
+
var _excluded = ["label", "icon", "hideIcon", "importance", "severity", "css", "style", "className", "as", "onClick"];
|
|
15
15
|
var StatusBadgeButton = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwardedRef) {
|
|
16
16
|
var label = _ref.label,
|
|
17
17
|
icon = _ref.icon,
|
|
18
|
+
_ref$hideIcon = _ref.hideIcon,
|
|
19
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
18
20
|
_ref$importance = _ref.importance,
|
|
19
21
|
importance = _ref$importance === void 0 ? "normal" : _ref$importance,
|
|
20
22
|
_ref$severity = _ref.severity,
|
|
@@ -31,7 +33,7 @@ var StatusBadgeButton = /*#__PURE__*/_react["default"].forwardRef(function (_ref
|
|
|
31
33
|
ref: forwardedRef,
|
|
32
34
|
importance: importance,
|
|
33
35
|
severity: severity
|
|
34
|
-
}, restProps), /*#__PURE__*/_react["default"].createElement(_StatusBadgeIcon["default"], null, icon || (0, _logic.getIcon)(severity)), label);
|
|
36
|
+
}, restProps), !hideIcon && /*#__PURE__*/_react["default"].createElement(_StatusBadgeIcon["default"], null, icon || (0, _logic.getIcon)(severity)), label);
|
|
35
37
|
});
|
|
36
38
|
StatusBadgeButton.displayName = "StatusBadgeButton";
|
|
37
39
|
var _default = exports["default"] = StatusBadgeButton;
|
|
@@ -11,10 +11,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _StatusBadgeIcon = _interopRequireDefault(require("./components/StatusBadgeIcon"));
|
|
12
12
|
var _logic = require("./logic");
|
|
13
13
|
var _styled = require("./styled");
|
|
14
|
-
var _excluded = ["label", "icon", "importance", "severity", "css", "style", "className", "as", "href", "target"];
|
|
14
|
+
var _excluded = ["label", "icon", "hideIcon", "importance", "severity", "css", "style", "className", "as", "href", "target"];
|
|
15
15
|
var StatusBadgeLink = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwardedRef) {
|
|
16
16
|
var label = _ref.label,
|
|
17
17
|
icon = _ref.icon,
|
|
18
|
+
_ref$hideIcon = _ref.hideIcon,
|
|
19
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
18
20
|
_ref$importance = _ref.importance,
|
|
19
21
|
importance = _ref$importance === void 0 ? "normal" : _ref$importance,
|
|
20
22
|
_ref$severity = _ref.severity,
|
|
@@ -33,7 +35,7 @@ var StatusBadgeLink = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
|
|
|
33
35
|
ref: forwardedRef,
|
|
34
36
|
importance: importance,
|
|
35
37
|
severity: severity
|
|
36
|
-
}, restProps), /*#__PURE__*/_react["default"].createElement(_StatusBadgeIcon["default"], null, icon || (0, _logic.getIcon)(severity)), label);
|
|
38
|
+
}, restProps), !hideIcon && /*#__PURE__*/_react["default"].createElement(_StatusBadgeIcon["default"], null, icon || (0, _logic.getIcon)(severity)), label);
|
|
37
39
|
});
|
|
38
40
|
StatusBadgeLink.displayName = "StatusBadgeLink";
|
|
39
41
|
var _default = exports["default"] = StatusBadgeLink;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Below values relate to direction property of the
|
|
9
|
+
*/
|
|
10
|
+
var LABEL_DIRECTIONS = {
|
|
11
|
+
top: "vertical",
|
|
12
|
+
bottom: "verticalReverse",
|
|
13
|
+
left: "horizontal",
|
|
14
|
+
right: "horizontalReverse"
|
|
15
|
+
};
|
|
16
|
+
var _default = exports["default"] = LABEL_DIRECTIONS;
|
|
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
var
|
|
7
|
+
var SIZE = {
|
|
8
8
|
INSET_SPACING: 2,
|
|
9
9
|
THUMB: 16,
|
|
10
10
|
TRACK_WIDTH: 40,
|
|
11
|
-
TRACK_HEIGHT: 20
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
11
|
+
TRACK_HEIGHT: 20
|
|
12
|
+
};
|
|
13
|
+
var _default = exports["default"] = SIZE;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var TRANSITION = {
|
|
8
|
+
DURATION_MS: 250,
|
|
9
|
+
TIMING_FUNCTION: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
10
|
+
};
|
|
11
|
+
var _default = exports["default"] = TRANSITION;
|
package/dist/Switch/index.js
CHANGED
|
@@ -9,8 +9,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _icons = require("@vitality-ds/icons");
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _Stack = _interopRequireDefault(require("../Stack"));
|
|
13
|
+
var _labelDirections = _interopRequireDefault(require("./constants/labelDirections"));
|
|
12
14
|
var _styled = require("./styled");
|
|
13
|
-
var _excluded = ["defaultChecked", "required", "name", "value", "id", "checked", "onCheckedChange", "disabled", "style", "className", "as", "css"];
|
|
15
|
+
var _excluded = ["defaultChecked", "required", "name", "value", "id", "checked", "onCheckedChange", "disabled", "style", "className", "as", "css", "labelPosition", "label"];
|
|
14
16
|
var iconProps = {
|
|
15
17
|
color: "inherit",
|
|
16
18
|
size: "inherit"
|
|
@@ -28,8 +30,18 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwarded
|
|
|
28
30
|
className = _ref.className,
|
|
29
31
|
as = _ref.as,
|
|
30
32
|
css = _ref.css,
|
|
33
|
+
_ref$labelPosition = _ref.labelPosition,
|
|
34
|
+
labelPosition = _ref$labelPosition === void 0 ? "left" : _ref$labelPosition,
|
|
35
|
+
label = _ref.label,
|
|
31
36
|
restProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
32
|
-
|
|
37
|
+
var direction = _labelDirections["default"][labelPosition];
|
|
38
|
+
return /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
|
|
39
|
+
direction: direction,
|
|
40
|
+
align: "center"
|
|
41
|
+
}, label && /*#__PURE__*/_react["default"].createElement(_styled.BaseSwitchLabel, {
|
|
42
|
+
disabled: disabled,
|
|
43
|
+
htmlFor: id
|
|
44
|
+
}, label), /*#__PURE__*/_react["default"].createElement(_styled.BaseSwitch, (0, _extends2["default"])({
|
|
33
45
|
defaultChecked: defaultChecked,
|
|
34
46
|
required: required,
|
|
35
47
|
name: name,
|
|
@@ -41,7 +53,7 @@ var Switch = /*#__PURE__*/_react["default"].forwardRef(function (_ref, forwarded
|
|
|
41
53
|
ref: forwardedRef
|
|
42
54
|
}, restProps), /*#__PURE__*/_react["default"].createElement(_styled.BaseSwitchThumb, {
|
|
43
55
|
checked: checked
|
|
44
|
-
}), checked ? /*#__PURE__*/_react["default"].createElement(_icons.Done, iconProps) : /*#__PURE__*/_react["default"].createElement(_icons.Close, iconProps));
|
|
56
|
+
}), checked ? /*#__PURE__*/_react["default"].createElement(_icons.Done, iconProps) : /*#__PURE__*/_react["default"].createElement(_icons.Close, iconProps)));
|
|
45
57
|
});
|
|
46
58
|
Switch.displayName = "Switch";
|
|
47
59
|
var _default = exports["default"] = Switch;
|
package/dist/Switch/styled.js
CHANGED
|
@@ -4,10 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.BaseSwitchThumb = exports.BaseSwitch = void 0;
|
|
7
|
+
exports.BaseSwitchThumb = exports.BaseSwitchLabel = exports.BaseSwitch = void 0;
|
|
8
8
|
var _reactSwitch = require("@radix-ui/react-switch");
|
|
9
9
|
var _system = require("@vitality-ds/system");
|
|
10
10
|
var _BaseSwitch = _interopRequireDefault(require("./styles/BaseSwitch.styles"));
|
|
11
|
+
var _BaseSwitchLabel = _interopRequireDefault(require("./styles/BaseSwitchLabel.styles"));
|
|
11
12
|
var _BaseSwitchThumb = _interopRequireDefault(require("./styles/BaseSwitchThumb.styles"));
|
|
12
13
|
var BaseSwitchThumb = exports.BaseSwitchThumb = (0, _system.styled)(_reactSwitch.Thumb, _BaseSwitchThumb["default"]);
|
|
13
|
-
var BaseSwitch = exports.BaseSwitch = (0, _system.styled)(_reactSwitch.Root, _BaseSwitch["default"]);
|
|
14
|
+
var BaseSwitch = exports.BaseSwitch = (0, _system.styled)(_reactSwitch.Root, _BaseSwitch["default"]);
|
|
15
|
+
var BaseSwitchLabel = exports.BaseSwitchLabel = (0, _system.styled)("label", _BaseSwitchLabel["default"]);
|
|
@@ -6,10 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _system = require("@vitality-ds/system");
|
|
9
|
-
var
|
|
9
|
+
var _size = _interopRequireDefault(require("../constants/size"));
|
|
10
|
+
var _transitions = _interopRequireDefault(require("../constants/transitions"));
|
|
10
11
|
var text = _system.colorUseCases.text,
|
|
11
12
|
backgrounds = _system.colorUseCases.backgrounds,
|
|
12
13
|
borders = _system.colorUseCases.borders;
|
|
14
|
+
var DURATION_MS = _transitions["default"].DURATION_MS,
|
|
15
|
+
TIMING_FUNCTION = _transitions["default"].TIMING_FUNCTION;
|
|
16
|
+
var TRACK_WIDTH = _size["default"].TRACK_WIDTH,
|
|
17
|
+
TRACK_HEIGHT = _size["default"].TRACK_HEIGHT;
|
|
13
18
|
var _default = exports["default"] = (0, _system.css)({
|
|
14
19
|
all: "unset",
|
|
15
20
|
boxSizing: "border-box",
|
|
@@ -22,7 +27,7 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
22
27
|
lineHeight: 1,
|
|
23
28
|
margin: "0",
|
|
24
29
|
outline: "none",
|
|
25
|
-
transition: "background-color ".concat(
|
|
30
|
+
transition: "background-color ".concat(DURATION_MS, "ms ").concat(TIMING_FUNCTION),
|
|
26
31
|
borderRadius: "$rounded",
|
|
27
32
|
position: "relative",
|
|
28
33
|
cursor: "pointer",
|
|
@@ -46,8 +51,8 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
46
51
|
variants: {
|
|
47
52
|
size: {
|
|
48
53
|
"1": {
|
|
49
|
-
width:
|
|
50
|
-
height:
|
|
54
|
+
width: TRACK_WIDTH,
|
|
55
|
+
height: TRACK_HEIGHT
|
|
51
56
|
}
|
|
52
57
|
},
|
|
53
58
|
checked: {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _system = require("@vitality-ds/system");
|
|
8
|
+
var text = _system.colorUseCases.text;
|
|
9
|
+
var _default = exports["default"] = (0, _system.css)({
|
|
10
|
+
fontSize: "$body",
|
|
11
|
+
cursor: "pointer",
|
|
12
|
+
whiteSpace: "pre",
|
|
13
|
+
textWrap: "auto",
|
|
14
|
+
flex: 1,
|
|
15
|
+
variants: {
|
|
16
|
+
disabled: {
|
|
17
|
+
"true": {
|
|
18
|
+
cursor: "not-allowed",
|
|
19
|
+
color: (0, _system.getColorScaleValueByUseCase)("neutral", text.disabled)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
@@ -6,25 +6,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _system = require("@vitality-ds/system");
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _size = _interopRequireDefault(require("../constants/size"));
|
|
10
|
+
var _transitions = _interopRequireDefault(require("../constants/transitions"));
|
|
11
|
+
var text = _system.colorUseCases.text,
|
|
12
|
+
backgrounds = _system.colorUseCases.backgrounds;
|
|
13
|
+
var THUMB = _size["default"].THUMB,
|
|
14
|
+
INSET_SPACING = _size["default"].INSET_SPACING,
|
|
15
|
+
TRACK_WIDTH = _size["default"].TRACK_WIDTH;
|
|
16
|
+
var DURATION_MS = _transitions["default"].DURATION_MS,
|
|
17
|
+
TIMING_FUNCTION = _transitions["default"].TIMING_FUNCTION;
|
|
11
18
|
var _default = exports["default"] = (0, _system.css)({
|
|
12
19
|
position: "absolute",
|
|
13
20
|
left: 0,
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
21
|
+
width: THUMB,
|
|
22
|
+
height: THUMB,
|
|
16
23
|
borderRadius: "$rounded",
|
|
17
|
-
transition: "transform ".concat(
|
|
18
|
-
transform: "translateX(".concat(
|
|
24
|
+
transition: "transform ".concat(DURATION_MS, "ms ").concat(TIMING_FUNCTION),
|
|
25
|
+
transform: "translateX(".concat(INSET_SPACING, "px)"),
|
|
19
26
|
willChange: "transform",
|
|
20
27
|
backgroundColor: (0, _system.getColorScaleValueByUseCase)("neutral", text.onSolidBackgrounds),
|
|
21
28
|
"&[data-disabled]": {
|
|
22
|
-
backgroundColor: (0, _system.getColorScaleValueByUseCase)("neutral",
|
|
29
|
+
backgroundColor: (0, _system.getColorScaleValueByUseCase)("neutral", backgrounds.uiElement)
|
|
23
30
|
},
|
|
24
31
|
variants: {
|
|
25
32
|
checked: {
|
|
26
33
|
"true": {
|
|
27
|
-
transform: "translateX(".concat(
|
|
34
|
+
transform: "translateX(".concat(TRACK_WIDTH - THUMB - INSET_SPACING, "px)"),
|
|
28
35
|
"&[data-disabled]": {
|
|
29
36
|
backgroundColor: (0, _system.getColorScaleValueByUseCase)("primary", text.disabled)
|
|
30
37
|
}
|
|
@@ -758,9 +758,10 @@ declare const StatusBadge: React.ForwardRefExoticComponent<Pick<{
|
|
|
758
758
|
} & {
|
|
759
759
|
label?: string;
|
|
760
760
|
icon?: React.ReactNode;
|
|
761
|
+
hideIcon?: boolean;
|
|
761
762
|
severity: "neutral" | "accent" | "success" | "info" | "warning" | "critical";
|
|
762
763
|
importance: "normal" | "low" | "high";
|
|
763
764
|
interactive?: never;
|
|
764
|
-
}, "placeholder" | "color" | "translate" | "css" | "prefix" | "hidden" | "style" | "icon" | "label" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "as" | "severity" | "interactive" | "importance"> & React.RefAttributes<HTMLDivElement>>;
|
|
765
|
+
}, "placeholder" | "color" | "translate" | "css" | "prefix" | "hidden" | "style" | "icon" | "label" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "as" | "severity" | "interactive" | "importance" | "hideIcon"> & React.RefAttributes<HTMLDivElement>>;
|
|
765
766
|
export default StatusBadge;
|
|
766
767
|
//# sourceMappingURL=StatusBadge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gpJA4BhB,CAAC;AAIF,eAAe,WAAW,CAAC"}
|
|
@@ -30,9 +30,9 @@ var StatusBadgeIcon_1 = __importDefault(require("./components/StatusBadgeIcon"))
|
|
|
30
30
|
var logic_1 = require("./logic");
|
|
31
31
|
var styled_1 = require("./styled");
|
|
32
32
|
var StatusBadge = react_1.default.forwardRef(function (_a, forwardedRef) {
|
|
33
|
-
var label = _a.label, icon = _a.icon, _b = _a.importance, importance =
|
|
33
|
+
var label = _a.label, icon = _a.icon, _b = _a.hideIcon, hideIcon = _b === void 0 ? false : _b, _c = _a.importance, importance = _c === void 0 ? "normal" : _c, _d = _a.severity, severity = _d === void 0 ? "neutral" : _d, css = _a.css, style = _a.style, className = _a.className, as = _a.as, restProps = __rest(_a, ["label", "icon", "hideIcon", "importance", "severity", "css", "style", "className", "as"]);
|
|
34
34
|
return (react_1.default.createElement(styled_1.BaseStatusBadge, __assign({ ref: forwardedRef, importance: importance, severity: severity }, restProps),
|
|
35
|
-
react_1.default.createElement(StatusBadgeIcon_1.default, null, icon || (0, logic_1.getIcon)(severity)),
|
|
35
|
+
!hideIcon && (react_1.default.createElement(StatusBadgeIcon_1.default, null, icon || (0, logic_1.getIcon)(severity))),
|
|
36
36
|
label));
|
|
37
37
|
});
|
|
38
38
|
StatusBadge.displayName = "StatusBadge";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.js","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadge.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAE1B,iFAA2D;AAC3D,iCAAkC;AAClC,mCAA2C;AAG3C,IAAM,WAAW,GAAG,eAAK,CAAC,UAAU,CAClC,UACE,
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadge.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAE1B,iFAA2D;AAC3D,iCAAkC;AAClC,mCAA2C;AAG3C,IAAM,WAAW,GAAG,eAAK,CAAC,UAAU,CAClC,UACE,EAWkB,EAClB,YAA6C;IAX3C,IAAA,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,kBAAqB,EAArB,UAAU,mBAAG,QAAQ,KAAA,EACrB,gBAAoB,EAApB,QAAQ,mBAAG,SAAS,KAAA,EACpB,GAAG,SAAA,EACH,KAAK,WAAA,EACL,SAAS,eAAA,EACT,EAAE,QAAA,EACC,SAAS,cAVd,0FAWC,CADa;IAGX,OAAA,CACH,8BAAC,wBAAe,aACd,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,IACd,SAAS;QAEZ,CAAC,QAAQ,IAAI,CACZ,8BAAC,yBAAe,QAAE,IAAI,IAAI,IAAA,eAAO,EAAC,QAAQ,CAAC,CAAmB,CAC/D;QACA,KAAK,CACU,CACnB,CAAA;CAAA,CACF,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,kBAAe,WAAW,CAAC"}
|
|
@@ -758,12 +758,13 @@ declare const StatusBadgeButton: React.ForwardRefExoticComponent<Pick<{
|
|
|
758
758
|
} & {
|
|
759
759
|
label?: string;
|
|
760
760
|
icon?: React.ReactNode;
|
|
761
|
+
hideIcon?: boolean;
|
|
761
762
|
severity: "neutral" | "accent" | "success" | "info" | "warning" | "critical";
|
|
762
763
|
importance: "normal" | "low" | "high";
|
|
763
764
|
interactive?: never;
|
|
764
765
|
} & {
|
|
765
766
|
onClick: () => void;
|
|
766
767
|
ref: React.RefObject<HTMLButtonElement>;
|
|
767
|
-
}, "name" | "disabled" | "placeholder" | "value" | "color" | "translate" | "css" | "prefix" | "hidden" | "style" | "icon" | "form" | "label" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "as" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "severity" | "interactive" | "importance"> & React.RefAttributes<HTMLButtonElement>>;
|
|
768
|
+
}, "name" | "disabled" | "placeholder" | "value" | "color" | "translate" | "css" | "prefix" | "hidden" | "style" | "icon" | "form" | "label" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "as" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "severity" | "interactive" | "importance" | "hideIcon"> & React.RefAttributes<HTMLButtonElement>>;
|
|
768
769
|
export default StatusBadgeButton;
|
|
769
770
|
//# sourceMappingURL=StatusBadgeButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadgeButton.d.ts","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadgeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"StatusBadgeButton.d.ts","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadgeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;myJA+BtB,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
|
|
@@ -30,9 +30,9 @@ var StatusBadgeIcon_1 = __importDefault(require("./components/StatusBadgeIcon"))
|
|
|
30
30
|
var logic_1 = require("./logic");
|
|
31
31
|
var styled_1 = require("./styled");
|
|
32
32
|
var StatusBadgeButton = react_1.default.forwardRef(function (_a, forwardedRef) {
|
|
33
|
-
var label = _a.label, icon = _a.icon, _b = _a.importance, importance =
|
|
33
|
+
var label = _a.label, icon = _a.icon, _b = _a.hideIcon, hideIcon = _b === void 0 ? false : _b, _c = _a.importance, importance = _c === void 0 ? "normal" : _c, _d = _a.severity, severity = _d === void 0 ? "neutral" : _d, css = _a.css, style = _a.style, className = _a.className, as = _a.as, onClick = _a.onClick, restProps = __rest(_a, ["label", "icon", "hideIcon", "importance", "severity", "css", "style", "className", "as", "onClick"]);
|
|
34
34
|
return (react_1.default.createElement(styled_1.BaseStatusBadgeButton, __assign({ interactive: true, onClick: onClick, ref: forwardedRef, importance: importance, severity: severity }, restProps),
|
|
35
|
-
react_1.default.createElement(StatusBadgeIcon_1.default, null, icon || (0, logic_1.getIcon)(severity)),
|
|
35
|
+
!hideIcon && (react_1.default.createElement(StatusBadgeIcon_1.default, null, icon || (0, logic_1.getIcon)(severity))),
|
|
36
36
|
label));
|
|
37
37
|
});
|
|
38
38
|
StatusBadgeButton.displayName = "StatusBadgeButton";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadgeButton.js","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadgeButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAE1B,iFAA2D;AAC3D,iCAAkC;AAClC,mCAAiD;AAGjD,IAAM,iBAAiB,GAAG,eAAK,CAAC,UAAU,CACxC,UACE,
|
|
1
|
+
{"version":3,"file":"StatusBadgeButton.js","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadgeButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAE1B,iFAA2D;AAC3D,iCAAkC;AAClC,mCAAiD;AAGjD,IAAM,iBAAiB,GAAG,eAAK,CAAC,UAAU,CACxC,UACE,EAYwB,EACxB,YAAgD;IAZ9C,IAAA,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,kBAAqB,EAArB,UAAU,mBAAG,QAAQ,KAAA,EACrB,gBAAoB,EAApB,QAAQ,mBAAG,SAAS,KAAA,EACpB,GAAG,SAAA,EACH,KAAK,WAAA,EACL,SAAS,eAAA,EACT,EAAE,QAAA,EACF,OAAO,aAAA,EACJ,SAAS,cAXd,qGAYC,CADa;IAGX,OAAA,CACH,8BAAC,8BAAqB,aACpB,WAAW,QACX,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,IACd,SAAS;QAEZ,CAAC,QAAQ,IAAI,CACZ,8BAAC,yBAAe,QAAE,IAAI,IAAI,IAAA,eAAO,EAAC,QAAQ,CAAC,CAAmB,CAC/D;QACA,KAAK,CACgB,CACzB,CAAA;CAAA,CACF,CAAC;AAEF,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAEpD,kBAAe,iBAAiB,CAAC"}
|
|
@@ -758,6 +758,7 @@ declare const StatusBadgeLink: React.ForwardRefExoticComponent<Pick<{
|
|
|
758
758
|
} & {
|
|
759
759
|
label?: string;
|
|
760
760
|
icon?: React.ReactNode;
|
|
761
|
+
hideIcon?: boolean;
|
|
761
762
|
severity: "neutral" | "accent" | "success" | "info" | "warning" | "critical";
|
|
762
763
|
importance: "normal" | "low" | "high";
|
|
763
764
|
interactive?: never;
|
|
@@ -765,6 +766,6 @@ declare const StatusBadgeLink: React.ForwardRefExoticComponent<Pick<{
|
|
|
765
766
|
href: string;
|
|
766
767
|
target: string;
|
|
767
768
|
ref: React.RefObject<HTMLAnchorElement>;
|
|
768
|
-
}, "placeholder" | "color" | "translate" | "css" | "media" | "prefix" | "hidden" | "style" | "icon" | "label" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "referrerPolicy" | "as" | "target" | "type" | "href" | "download" | "hrefLang" | "ping" | "rel" | "severity" | "interactive" | "importance"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
769
|
+
}, "placeholder" | "color" | "translate" | "css" | "media" | "prefix" | "hidden" | "style" | "icon" | "label" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "referrerPolicy" | "as" | "target" | "type" | "href" | "download" | "hrefLang" | "ping" | "rel" | "severity" | "interactive" | "importance" | "hideIcon"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
769
770
|
export default StatusBadgeLink;
|
|
770
771
|
//# sourceMappingURL=StatusBadgeLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadgeLink.d.ts","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadgeLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"StatusBadgeLink.d.ts","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadgeLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wvJAiCpB,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -30,9 +30,9 @@ var StatusBadgeIcon_1 = __importDefault(require("./components/StatusBadgeIcon"))
|
|
|
30
30
|
var logic_1 = require("./logic");
|
|
31
31
|
var styled_1 = require("./styled");
|
|
32
32
|
var StatusBadgeLink = react_1.default.forwardRef(function (_a, forwardedRef) {
|
|
33
|
-
var label = _a.label, icon = _a.icon, _b = _a.importance, importance =
|
|
33
|
+
var label = _a.label, icon = _a.icon, _b = _a.hideIcon, hideIcon = _b === void 0 ? false : _b, _c = _a.importance, importance = _c === void 0 ? "normal" : _c, _d = _a.severity, severity = _d === void 0 ? "neutral" : _d, css = _a.css, style = _a.style, className = _a.className, as = _a.as, href = _a.href, target = _a.target, restProps = __rest(_a, ["label", "icon", "hideIcon", "importance", "severity", "css", "style", "className", "as", "href", "target"]);
|
|
34
34
|
return (react_1.default.createElement(styled_1.BaseStatusBadgeLink, __assign({ interactive: true, target: target, href: href, ref: forwardedRef, importance: importance, severity: severity }, restProps),
|
|
35
|
-
react_1.default.createElement(StatusBadgeIcon_1.default, null, icon || (0, logic_1.getIcon)(severity)),
|
|
35
|
+
!hideIcon && (react_1.default.createElement(StatusBadgeIcon_1.default, null, icon || (0, logic_1.getIcon)(severity))),
|
|
36
36
|
label));
|
|
37
37
|
});
|
|
38
38
|
StatusBadgeLink.displayName = "StatusBadgeLink";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadgeLink.js","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadgeLink.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAE1B,iFAA2D;AAC3D,iCAAkC;AAClC,mCAA+C;AAG/C,IAAM,eAAe,GAAG,eAAK,CAAC,UAAU,CACtC,UACE,
|
|
1
|
+
{"version":3,"file":"StatusBadgeLink.js","sourceRoot":"","sources":["../../../../src/StatusBadge/StatusBadgeLink.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAE1B,iFAA2D;AAC3D,iCAAkC;AAClC,mCAA+C;AAG/C,IAAM,eAAe,GAAG,eAAK,CAAC,UAAU,CACtC,UACE,EAasB,EACtB,YAAgD;IAb9C,IAAA,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,kBAAqB,EAArB,UAAU,mBAAG,QAAQ,KAAA,EACrB,gBAAoB,EAApB,QAAQ,mBAAG,SAAS,KAAA,EACpB,GAAG,SAAA,EACH,KAAK,WAAA,EACL,SAAS,eAAA,EACT,EAAE,QAAA,EACF,IAAI,UAAA,EACJ,MAAM,YAAA,EACH,SAAS,cAZd,4GAaC,CADa;IAGX,OAAA,CACH,8BAAC,4BAAmB,aAClB,WAAW,QACX,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,IACd,SAAS;QAEZ,CAAC,QAAQ,IAAI,CACZ,8BAAC,yBAAe,QAAE,IAAI,IAAI,IAAA,eAAO,EAAC,QAAQ,CAAC,CAAmB,CAC/D;QACA,KAAK,CACc,CACvB,CAAA;CAAA,CACF,CAAC;AAEF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAEhD,kBAAe,eAAe,CAAC"}
|
|
@@ -18,6 +18,11 @@ declare type BaseStatusBadgeProps = {
|
|
|
18
18
|
* Option to pass in a custom icon. Aim to use an icon from the @vitality-ds/icons package
|
|
19
19
|
*/
|
|
20
20
|
icon?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Option to hide the icon.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
hideIcon?: boolean;
|
|
21
26
|
/**
|
|
22
27
|
* Indicate the severity of a status using Vitality's feedback color scale.
|
|
23
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/StatusBadge/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,wBAAwB,EACxB,OAAO,EACR,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,aAAK,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC;AAC/E,aAAK,kBAAkB,GAAG,IAAI,CAC5B,YAAY,CAAC,OAAO,eAAe,CAAC,EACpC,YAAY,CACb,CAAC;AAGF,aAAK,YAAY,GAAG,OAAO,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACxE,aAAK,cAAc,GAAG,OAAO,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAE5E,oBAAY,YAAY,GAAG;KACxB,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO;CAClC,CAAC;AAEF,aAAK,oBAAoB,GAAG;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,UAAU,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC;AAEF,oBAAY,eAAe,GAAG,aAAa,GACzC,YAAY,CAAC,OAAO,eAAe,CAAC,GACpC,cAAc,CAAC,OAAO,eAAe,CAAC,GACtC,oBAAoB,CAAC;AAEvB,oBAAY,mBAAmB,GAAG,aAAa,GAC7C,YAAY,CAAC,OAAO,mBAAmB,CAAC,GACxC,cAAc,CAAC,OAAO,mBAAmB,CAAC,GAC1C,oBAAoB,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;CACzC,CAAC;AAEJ,oBAAY,qBAAqB,GAAG,aAAa,GAC/C,YAAY,CAAC,OAAO,qBAAqB,CAAC,GAC1C,cAAc,CAAC,OAAO,qBAAqB,CAAC,GAC5C,oBAAoB,GAAG;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;CACzC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/StatusBadge/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,wBAAwB,EACxB,OAAO,EACR,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,aAAK,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC;AAC/E,aAAK,kBAAkB,GAAG,IAAI,CAC5B,YAAY,CAAC,OAAO,eAAe,CAAC,EACpC,YAAY,CACb,CAAC;AAGF,aAAK,YAAY,GAAG,OAAO,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACxE,aAAK,cAAc,GAAG,OAAO,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAE5E,oBAAY,YAAY,GAAG;KACxB,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO;CAClC,CAAC;AAEF,aAAK,oBAAoB,GAAG;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,UAAU,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC;AAEF,oBAAY,eAAe,GAAG,aAAa,GACzC,YAAY,CAAC,OAAO,eAAe,CAAC,GACpC,cAAc,CAAC,OAAO,eAAe,CAAC,GACtC,oBAAoB,CAAC;AAEvB,oBAAY,mBAAmB,GAAG,aAAa,GAC7C,YAAY,CAAC,OAAO,mBAAmB,CAAC,GACxC,cAAc,CAAC,OAAO,mBAAmB,CAAC,GAC1C,oBAAoB,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;CACzC,CAAC;AAEJ,oBAAY,qBAAqB,GAAG,aAAa,GAC/C,YAAY,CAAC,OAAO,qBAAqB,CAAC,GAC1C,cAAc,CAAC,OAAO,qBAAqB,CAAC,GAC5C,oBAAoB,GAAG;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;CACzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelDirections.d.ts","sourceRoot":"","sources":["../../../../../src/Switch/constants/labelDirections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,QAAA,MAAM,gBAAgB,EAAE,mBAKvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Below values relate to direction property of the
|
|
5
|
+
*/
|
|
6
|
+
var LABEL_DIRECTIONS = {
|
|
7
|
+
top: "vertical",
|
|
8
|
+
bottom: "verticalReverse",
|
|
9
|
+
left: "horizontal",
|
|
10
|
+
right: "horizontalReverse",
|
|
11
|
+
};
|
|
12
|
+
exports.default = LABEL_DIRECTIONS;
|
|
13
|
+
//# sourceMappingURL=labelDirections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelDirections.js","sourceRoot":"","sources":["../../../../../src/Switch/constants/labelDirections.ts"],"names":[],"mappings":";;AAEA;;GAEG;AACH,IAAM,gBAAgB,GAAwB;IAC5C,GAAG,EAAE,UAAU;IACf,MAAM,EAAE,iBAAiB;IACzB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,mBAAmB;CAC3B,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../../../src/Switch/constants/size.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI;;;;;CAKT,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
var SIZE = {
|
|
4
4
|
INSET_SPACING: 2,
|
|
5
5
|
THUMB: 16,
|
|
6
6
|
TRACK_WIDTH: 40,
|
|
7
7
|
TRACK_HEIGHT: 20,
|
|
8
|
-
TRANSITION_DURATION_MS: 250,
|
|
9
|
-
TRANSITION_TIMING_FUNCTION: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
10
8
|
};
|
|
11
|
-
|
|
9
|
+
exports.default = SIZE;
|
|
10
|
+
//# sourceMappingURL=size.js.map
|