@coorpacademy/components 11.40.5 → 11.40.6-alpha.7
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/es/atom/button-link/index.d.ts +15 -8
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +75 -37
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +20 -14
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +4 -3
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/button-menu/index.d.ts +1 -3
- package/es/atom/button-menu/index.d.ts.map +1 -1
- package/es/atom/button-menu/index.js +1 -7
- package/es/atom/button-menu/index.js.map +1 -1
- package/es/atom/button-menu/types.d.ts +2 -6
- package/es/atom/button-menu/types.d.ts.map +1 -1
- package/es/atom/radio-with-title/index.d.ts +15 -8
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +15 -8
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/title/index.d.ts +15 -8
- package/es/molecule/bullet-point-menu-button/index.d.ts +1 -3
- package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/es/molecule/bullet-point-menu-button/types.d.ts +1 -3
- package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
- package/es/molecule/button-menu-action/index.d.ts +19 -11
- package/es/molecule/button-menu-action/index.d.ts.map +1 -1
- package/es/molecule/button-menu-action/index.js +27 -3
- package/es/molecule/button-menu-action/index.js.map +1 -1
- package/es/molecule/button-menu-action/types.d.ts +22 -12
- package/es/molecule/button-menu-action/types.d.ts.map +1 -1
- package/es/molecule/button-menu-action/types.js +7 -2
- package/es/molecule/button-menu-action/types.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +133 -85
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/index.d.ts +17 -14
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +17 -14
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/quick-filters/index.d.ts +15 -8
- package/es/molecule/quick-filters/index.d.ts.map +1 -1
- package/es/molecule/quick-filters/types.d.ts +15 -8
- package/es/molecule/quick-filters/types.d.ts.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +15 -8
- package/es/molecule/title-radio-wrapper/index.d.ts +15 -8
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +15 -8
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/content-skill-modal/index.d.ts +115 -68
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +115 -68
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/icon-editor/index.d.ts +15 -8
- package/es/organism/icon-editor/index.d.ts.map +1 -1
- package/es/organism/icon-editor/types.d.ts +15 -8
- package/es/organism/icon-editor/types.d.ts.map +1 -1
- package/es/organism/list-items/index.d.ts +115 -68
- package/es/organism/rewards-form/index.d.ts +15 -8
- package/es/organism/select-opponents/index.d.ts +15 -8
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +15 -8
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/setup-header/index.d.ts +60 -32
- package/es/organism/title-and-input/index.d.ts +45 -24
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +45 -24
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +62 -38
- package/es/template/app-player/loading/index.d.ts +133 -85
- package/es/template/app-player/player/index.d.ts +274 -170
- package/es/template/app-player/player/slides/header/index.d.ts +8 -0
- package/es/template/app-player/player/slides/header/index.d.ts.map +1 -1
- package/es/template/app-player/player/slides/header/index.js +92 -3
- package/es/template/app-player/player/slides/header/index.js.map +1 -1
- package/es/template/app-player/player/slides/header/style.css +1 -1
- package/es/template/app-player/player/slides/index.d.ts +141 -85
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +133 -85
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +141 -85
- package/es/template/app-review/index.d.ts +133 -85
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +133 -85
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +133 -85
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +60 -32
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +60 -32
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +485 -291
- package/es/template/back-office/dashboard-preview/index.d.ts +60 -32
- package/es/template/back-office/layout/index.d.ts +60 -32
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +266 -170
- package/es/template/common/search-page/index.d.ts +133 -85
- package/es/template/external-course/index.d.ts +133 -85
- package/es/variables/colors.d.ts +1 -0
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +1 -0
- package/es/variables/colors.js.map +1 -1
- package/lib/atom/button-link/index.d.ts +15 -8
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +75 -37
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +20 -14
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +4 -3
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/button-menu/index.d.ts +1 -3
- package/lib/atom/button-menu/index.d.ts.map +1 -1
- package/lib/atom/button-menu/index.js +1 -7
- package/lib/atom/button-menu/index.js.map +1 -1
- package/lib/atom/button-menu/types.d.ts +2 -6
- package/lib/atom/button-menu/types.d.ts.map +1 -1
- package/lib/atom/radio-with-title/index.d.ts +15 -8
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +15 -8
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/title/index.d.ts +15 -8
- package/lib/molecule/bullet-point-menu-button/index.d.ts +1 -3
- package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/lib/molecule/bullet-point-menu-button/types.d.ts +1 -3
- package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/index.d.ts +19 -11
- package/lib/molecule/button-menu-action/index.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/index.js +26 -2
- package/lib/molecule/button-menu-action/index.js.map +1 -1
- package/lib/molecule/button-menu-action/types.d.ts +22 -12
- package/lib/molecule/button-menu-action/types.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/types.js +7 -2
- package/lib/molecule/button-menu-action/types.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +133 -85
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/index.d.ts +17 -14
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +17 -14
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/quick-filters/index.d.ts +15 -8
- package/lib/molecule/quick-filters/index.d.ts.map +1 -1
- package/lib/molecule/quick-filters/types.d.ts +15 -8
- package/lib/molecule/quick-filters/types.d.ts.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +15 -8
- package/lib/molecule/title-radio-wrapper/index.d.ts +15 -8
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +15 -8
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/index.d.ts +115 -68
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +115 -68
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/icon-editor/index.d.ts +15 -8
- package/lib/organism/icon-editor/index.d.ts.map +1 -1
- package/lib/organism/icon-editor/types.d.ts +15 -8
- package/lib/organism/icon-editor/types.d.ts.map +1 -1
- package/lib/organism/list-items/index.d.ts +115 -68
- package/lib/organism/rewards-form/index.d.ts +15 -8
- package/lib/organism/select-opponents/index.d.ts +15 -8
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +15 -8
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/setup-header/index.d.ts +60 -32
- package/lib/organism/title-and-input/index.d.ts +45 -24
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +45 -24
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +62 -38
- package/lib/template/app-player/loading/index.d.ts +133 -85
- package/lib/template/app-player/player/index.d.ts +274 -170
- package/lib/template/app-player/player/slides/header/index.d.ts +8 -0
- package/lib/template/app-player/player/slides/header/index.d.ts.map +1 -1
- package/lib/template/app-player/player/slides/header/index.js +92 -3
- package/lib/template/app-player/player/slides/header/index.js.map +1 -1
- package/lib/template/app-player/player/slides/header/style.css +1 -1
- package/lib/template/app-player/player/slides/index.d.ts +141 -85
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +133 -85
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +141 -85
- package/lib/template/app-review/index.d.ts +133 -85
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +133 -85
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +133 -85
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +60 -32
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +60 -32
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +485 -291
- package/lib/template/back-office/dashboard-preview/index.d.ts +60 -32
- package/lib/template/back-office/layout/index.d.ts +60 -32
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +266 -170
- package/lib/template/common/search-page/index.d.ts +133 -85
- package/lib/template/external-course/index.d.ts +133 -85
- package/lib/variables/colors.d.ts +1 -0
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +1 -0
- package/lib/variables/colors.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
|
|
6
|
+
var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
6
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
9
|
var _link = _interopRequireDefault(require("../link"));
|
|
@@ -16,49 +17,85 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
19
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
const Icon = type && _buttonIcons.ICONS[type];
|
|
29
|
-
if (!Icon && !faIcon) {
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
-
className: (_style.default.buttonContent, customLabelClassName)
|
|
32
|
-
}, typeof content === 'string' ? /*#__PURE__*/_react.default.createElement("span", {
|
|
33
|
-
className: (_style.default.label, customLabelClassName)
|
|
34
|
-
// eslint-disable-next-line react/no-danger
|
|
35
|
-
,
|
|
36
|
-
dangerouslySetInnerHTML: {
|
|
37
|
-
__html: content
|
|
38
|
-
}
|
|
39
|
-
}) : /*#__PURE__*/_react.default.createElement("span", {
|
|
40
|
-
className: (_style.default.label, customLabelClassName)
|
|
41
|
-
}, content));
|
|
20
|
+
const renderNoIcons = (content, customClass) => /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
+
className: (0, _classnames.default)(_style.default.buttonContent, customClass)
|
|
22
|
+
}, typeof content === 'string' ? /*#__PURE__*/_react.default.createElement("span", {
|
|
23
|
+
className: (0, _classnames.default)(_style.default.label, customClass)
|
|
24
|
+
// eslint-disable-next-line react/no-danger
|
|
25
|
+
,
|
|
26
|
+
dangerouslySetInnerHTML: {
|
|
27
|
+
__html: content
|
|
42
28
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
}) : /*#__PURE__*/_react.default.createElement("span", {
|
|
30
|
+
className: (0, _classnames.default)(_style.default.label, customClass)
|
|
31
|
+
}, content));
|
|
32
|
+
const buildFaIcon = (faIcon, hoverOptions) => {
|
|
33
|
+
if ((0, _isEmpty2.default)(faIcon)) return null;
|
|
34
|
+
const {
|
|
35
|
+
name,
|
|
36
|
+
size,
|
|
37
|
+
backgroundColor,
|
|
38
|
+
customStyle,
|
|
39
|
+
color
|
|
40
|
+
} = faIcon;
|
|
41
|
+
const {
|
|
42
|
+
hovered,
|
|
43
|
+
hoverBackgroundColor,
|
|
44
|
+
hoverColor
|
|
45
|
+
} = hoverOptions;
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
47
|
+
iconName: name,
|
|
48
|
+
iconColor: hovered && hoverColor ? hoverColor : color ?? _icon.DEFAULT_ICON_COLOR,
|
|
46
49
|
// eslint-disable-next-line no-nested-ternary
|
|
47
|
-
backgroundColor: !
|
|
50
|
+
backgroundColor: !backgroundColor ? null : hovered && hoverBackgroundColor ? hoverBackgroundColor : backgroundColor,
|
|
48
51
|
size: {
|
|
49
|
-
faSize:
|
|
50
|
-
wrapperSize:
|
|
52
|
+
faSize: size,
|
|
53
|
+
wrapperSize: size
|
|
51
54
|
},
|
|
52
|
-
customStyle
|
|
53
|
-
})
|
|
55
|
+
customStyle
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
const renderIcon = (icon, options) => {
|
|
59
|
+
if ((0, _isEmpty2.default)(icon)) return null;
|
|
60
|
+
const {
|
|
61
|
+
type,
|
|
62
|
+
faIcon
|
|
63
|
+
} = icon;
|
|
64
|
+
const Icon = type && _buttonIcons.ICONS[type];
|
|
65
|
+
if (faIcon) return buildFaIcon(faIcon, options);
|
|
66
|
+
if (Icon) return /*#__PURE__*/_react.default.createElement(Icon, {
|
|
54
67
|
className: _style.default.icon,
|
|
55
68
|
theme: "coorpmanager"
|
|
56
69
|
});
|
|
70
|
+
return null;
|
|
71
|
+
};
|
|
72
|
+
const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverColor, customLabelClassName, tag, contentCustomStyle) => {
|
|
73
|
+
// eslint-disable-next-line no-nested-ternary
|
|
74
|
+
const iconArr = !(0, _isEmpty2.default)(icon) ? Array.isArray(icon) ? icon : [icon] : [];
|
|
75
|
+
const leftIcon = iconArr.find(({
|
|
76
|
+
position
|
|
77
|
+
}) => position === 'left');
|
|
78
|
+
const rightIcon = iconArr.find(({
|
|
79
|
+
position
|
|
80
|
+
}) => position === 'right');
|
|
81
|
+
|
|
82
|
+
// no fa icons
|
|
83
|
+
// nor ICONS
|
|
84
|
+
if (!leftIcon?.faIcon && !(leftIcon?.type && _buttonIcons.ICONS[leftIcon.type]) && !rightIcon?.faIcon && !(rightIcon?.type && _buttonIcons.ICONS[rightIcon.type])) return renderNoIcons(content, customLabelClassName);
|
|
57
85
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
-
className: _style.default.buttonContent
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
86
|
+
className: _style.default.buttonContent,
|
|
87
|
+
style: contentCustomStyle
|
|
88
|
+
}, renderIcon(leftIcon, {
|
|
89
|
+
hovered,
|
|
90
|
+
hoverBackgroundColor,
|
|
91
|
+
hoverColor
|
|
92
|
+
}), content ? /*#__PURE__*/_react.default.createElement("span", {
|
|
93
|
+
className: (0, _classnames.default)(_style.default.label, customLabelClassName)
|
|
94
|
+
}, content) : null, tag ? /*#__PURE__*/_react.default.createElement(_tag.default, tag) : null, renderIcon(rightIcon, {
|
|
95
|
+
hovered,
|
|
96
|
+
hoverBackgroundColor,
|
|
97
|
+
hoverColor
|
|
98
|
+
}));
|
|
62
99
|
};
|
|
63
100
|
const ButtonLink = props => {
|
|
64
101
|
const {
|
|
@@ -80,6 +117,7 @@ const ButtonLink = props => {
|
|
|
80
117
|
onKeyDown = _noop2.default,
|
|
81
118
|
className,
|
|
82
119
|
customStyle,
|
|
120
|
+
contentCustomStyle,
|
|
83
121
|
useTitle = true,
|
|
84
122
|
customLabelClassName,
|
|
85
123
|
tag
|
|
@@ -130,7 +168,7 @@ const ButtonLink = props => {
|
|
|
130
168
|
hoverBackgroundColor: hoverBackgroundColor,
|
|
131
169
|
onMouseEnter: handleMouseOver,
|
|
132
170
|
onMouseLeave: handleMouseLeave
|
|
133
|
-
}), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor, customLabelClassName, tag), renderToolTip());
|
|
171
|
+
}), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor, customLabelClassName, tag, contentCustomStyle), renderToolTip());
|
|
134
172
|
}
|
|
135
173
|
return /*#__PURE__*/_react.default.createElement("button", _extends({}, useTitle && {
|
|
136
174
|
title: ariaLabel || label
|
|
@@ -151,7 +189,7 @@ const ButtonLink = props => {
|
|
|
151
189
|
onMouseLeave: handleMouseLeave,
|
|
152
190
|
tabIndex: 0,
|
|
153
191
|
disabled: disabled
|
|
154
|
-
}), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor, customLabelClassName, tag), renderToolTip());
|
|
192
|
+
}), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor, customLabelClassName, tag, contentCustomStyle), renderToolTip());
|
|
155
193
|
};
|
|
156
194
|
ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
|
|
157
195
|
var _default = exports.default = ButtonLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_link","_icon","_buttonIcons","_tooltip","_tag","_types","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","customLabelClassName","tag","type","faIcon","position","Icon","ICONS","createElement","className","style","buttonContent","label","dangerouslySetInnerHTML","__html","iconComponent","iconName","name","iconColor","color","DEFAULT_ICON_COLOR","backgroundColor","size","faSize","wrapperSize","customStyle","theme","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","tooltipText","tooltipPlacement","link","onClick","_noop2","onKeyDown","useTitle","styleButton","classnames","button","iconButton","primary","secondary","tertiary","text","dangerous","setHovered","useState","handleOnClick","useCallback","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","TooltipContent","tooltipContentWrapper","renderToolTip","closeToolTipInformationTextAriaLabel","fontSize","anchorId","toolTipIsVisible","placement","_customStyle","useMemo","title","onMouseEnter","onMouseLeave","onMouseOver","tabIndex","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon, {DEFAULT_ICON_COLOR, IconProps} from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport ToolTip from '../tooltip';\nimport Tag from '../tag';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (\n icon?: IconType,\n content?: string | React.ReactNode,\n hovered?: boolean,\n hoverBackgroundColor?: string,\n hoverColor?: string,\n customLabelClassName?: string,\n tag?: React.ComponentProps<typeof Tag>\n) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon && !faIcon) {\n return (\n <div className={(style.buttonContent, customLabelClassName)}>\n {typeof content === 'string' ? (\n <span\n className={(style.label, customLabelClassName)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : (\n <span className={(style.label, customLabelClassName)}>{content}</span>\n )}\n </div>\n );\n }\n\n const iconComponent = faIcon ? (\n <FaIcon\n {...({\n iconName: faIcon.name,\n iconColor: hovered && hoverColor ? hoverColor : faIcon.color ?? DEFAULT_ICON_COLOR,\n // eslint-disable-next-line no-nested-ternary\n backgroundColor: !faIcon?.backgroundColor\n ? null\n : hovered && hoverBackgroundColor\n ? hoverBackgroundColor\n : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n },\n customStyle: faIcon.customStyle\n } as IconProps)}\n />\n ) : (\n <Icon className={style.icon} theme=\"coorpmanager\" />\n );\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? iconComponent : null}\n {content ? <span className={style.label}>{content}</span> : null}\n {tag ? <Tag {...tag} /> : null}\n {position === 'right' ? iconComponent : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n usage = 'button',\n label,\n content,\n hoverBackgroundColor,\n hoverColor,\n disabled = false,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n tooltipText,\n tooltipPlacement = 'left',\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true,\n customLabelClassName,\n tag\n } = props;\n const styleButton = classnames(\n link && style.link,\n className,\n style.button,\n !label && style.iconButton,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n disabled && style.disabled\n );\n\n const [hovered, setHovered] = useState(false);\n\n const handleOnClick = useCallback(event => onClick(event), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n const handleMouseOver = useCallback(() => {\n setHovered(true);\n }, [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const TooltipContent = useCallback(\n () => <span className={style.tooltipContentWrapper}>{tooltipText || ariaLabel}</span>,\n [tooltipText, ariaLabel]\n );\n\n const renderToolTip = () => {\n const closeToolTipInformationTextAriaLabel = tooltipText || ariaLabel;\n if (!closeToolTipInformationTextAriaLabel) return null;\n return (\n <ToolTip\n fontSize={12}\n anchorId=\"button-icon\"\n toolTipIsVisible={hovered}\n placement={tooltipPlacement}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n />\n );\n };\n const _customStyle = useMemo(() => {\n return {\n ...customStyle,\n ...((hoverBackgroundColor || hoverColor) && hovered\n ? {\n backgroundColor: hoverBackgroundColor,\n color: hoverColor\n }\n : null)\n };\n }, [hoverBackgroundColor, hoverColor, hovered, customStyle]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n className={styleButton}\n style={customStyle}\n data-name={dataName}\n data-testid={dataTestId}\n onClick={handleOnClick}\n aria-label={ariaLabel || label}\n hoverColor={hoverColor}\n hoverBackgroundColor={hoverBackgroundColor}\n onMouseEnter={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n >\n {getButtonContent(\n icon,\n content ?? label,\n hovered,\n hoverBackgroundColor,\n hoverColor,\n customLabelClassName,\n tag\n )}\n {renderToolTip()}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n {...(ariaLabel && !label\n ? {\n 'data-for': 'button-icon',\n 'data-tip': hovered\n }\n : {})}\n // eslint-disable-next-line react/button-has-type\n type={usage}\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={_customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n tabIndex={0}\n disabled={disabled}\n >\n {getButtonContent(\n icon,\n content ?? label,\n hovered,\n hoverBackgroundColor,\n hoverColor,\n customLabelClassName,\n tag\n )}\n {renderToolTip()}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAA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gB,eAAgB;IAC3BgB,WAAW,EAAEf,eAAgB;IAC7Bc,YAAY,EAAEb,gBAAiB;IAC/Be,QAAQ,EAAE,CAAE;IACZ1C,QAAQ,EAAEA;EAAS,IAElBnC,gBAAgB,CACfC,IAAI,EACJC,OAAO,IAAIe,KAAK,EAChBd,OAAO,EACPC,oBAAoB,EACpBC,UAAU,EACVC,oBAAoB,EACpBC,GACF,CAAC,EACA0D,aAAa,CAAC,CACT,CAAC;AAEb,CAAC;AAEDjC,UAAU,CAAC8C,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAvG,OAAA,GAElBoD,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_link","_icon","_buttonIcons","_tooltip","_tag","_types","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","renderNoIcons","content","customClass","createElement","className","classnames","style","buttonContent","label","dangerouslySetInnerHTML","__html","buildFaIcon","faIcon","hoverOptions","_isEmpty2","name","size","backgroundColor","customStyle","color","hovered","hoverBackgroundColor","hoverColor","iconName","iconColor","DEFAULT_ICON_COLOR","faSize","wrapperSize","renderIcon","icon","options","type","Icon","ICONS","theme","getButtonContent","customLabelClassName","tag","contentCustomStyle","iconArr","Array","isArray","leftIcon","find","position","rightIcon","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","tooltipText","tooltipPlacement","link","onClick","_noop2","onKeyDown","useTitle","styleButton","button","iconButton","primary","secondary","tertiary","text","dangerous","setHovered","useState","handleOnClick","useCallback","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","TooltipContent","tooltipContentWrapper","renderToolTip","closeToolTipInformationTextAriaLabel","fontSize","anchorId","toolTipIsVisible","placement","_customStyle","useMemo","title","onMouseEnter","onMouseLeave","onMouseOver","tabIndex","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport {isEmpty, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon, {DEFAULT_ICON_COLOR, IconProps} from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport ToolTip from '../tooltip';\nimport Tag from '../tag';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst renderNoIcons = (\n content: string | React.ReactNode | undefined,\n customClass: string | undefined\n) => (\n <div className={classnames(style.buttonContent, customClass)}>\n {typeof content === 'string' ? (\n <span\n className={classnames(style.label, customClass)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : (\n <span className={classnames(style.label, customClass)}>{content}</span>\n )}\n </div>\n);\n\nconst buildFaIcon = (\n faIcon: IconType['faIcon'],\n hoverOptions: {hovered?: boolean; hoverBackgroundColor?: string; hoverColor?: string}\n) => {\n if (isEmpty(faIcon)) return null;\n\n const {name, size, backgroundColor, customStyle, color} = faIcon;\n const {hovered, hoverBackgroundColor, hoverColor} = hoverOptions;\n\n return (\n <FaIcon\n {...({\n iconName: name,\n iconColor: hovered && hoverColor ? hoverColor : color ?? DEFAULT_ICON_COLOR,\n // eslint-disable-next-line no-nested-ternary\n backgroundColor: !backgroundColor\n ? null\n : hovered && hoverBackgroundColor\n ? hoverBackgroundColor\n : backgroundColor,\n size: {\n faSize: size,\n wrapperSize: size\n },\n customStyle\n } as IconProps)}\n />\n );\n};\n\nconst renderIcon = (\n icon: IconType | undefined,\n options: {hovered?: boolean; hoverBackgroundColor?: string; hoverColor?: string}\n) => {\n if (isEmpty(icon)) return null;\n\n const {type, faIcon} = icon;\n const Icon = type && ICONS[type];\n\n if (faIcon) return buildFaIcon(faIcon, options);\n if (Icon) return <Icon className={style.icon} theme=\"coorpmanager\" />;\n\n return null;\n};\n\nconst getButtonContent = (\n icon?: IconType | IconType[],\n content?: string | React.ReactNode,\n hovered?: boolean,\n hoverBackgroundColor?: string,\n hoverColor?: string,\n customLabelClassName?: string,\n tag?: React.ComponentProps<typeof Tag>,\n contentCustomStyle?: React.CSSProperties\n) => {\n // eslint-disable-next-line no-nested-ternary\n const iconArr = !isEmpty(icon) ? (Array.isArray(icon) ? icon : [icon]) : [];\n\n const leftIcon = iconArr.find(({position}) => position === 'left');\n const rightIcon = iconArr.find(({position}) => position === 'right');\n\n // no fa icons\n // nor ICONS\n if (\n !leftIcon?.faIcon &&\n !(leftIcon?.type && ICONS[leftIcon.type]) &&\n !rightIcon?.faIcon &&\n !(rightIcon?.type && ICONS[rightIcon.type])\n )\n return renderNoIcons(content, customLabelClassName);\n\n return (\n <div className={style.buttonContent} style={contentCustomStyle}>\n {renderIcon(leftIcon, {hovered, hoverBackgroundColor, hoverColor})}\n {content ? (\n <span className={classnames(style.label, customLabelClassName)}>{content}</span>\n ) : null}\n {tag ? <Tag {...tag} /> : null}\n {renderIcon(rightIcon, {hovered, hoverBackgroundColor, hoverColor})}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n usage = 'button',\n label,\n content,\n hoverBackgroundColor,\n hoverColor,\n disabled = false,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n tooltipText,\n tooltipPlacement = 'left',\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n contentCustomStyle,\n useTitle = true,\n customLabelClassName,\n tag\n } = props;\n const styleButton = classnames(\n link && style.link,\n className,\n style.button,\n !label && style.iconButton,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n disabled && style.disabled\n );\n\n const [hovered, setHovered] = useState(false);\n\n const handleOnClick = useCallback(event => onClick(event), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n const handleMouseOver = useCallback(() => {\n setHovered(true);\n }, [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const TooltipContent = useCallback(\n () => <span className={style.tooltipContentWrapper}>{tooltipText || ariaLabel}</span>,\n [tooltipText, ariaLabel]\n );\n\n const renderToolTip = () => {\n const closeToolTipInformationTextAriaLabel = tooltipText || ariaLabel;\n if (!closeToolTipInformationTextAriaLabel) return null;\n return (\n <ToolTip\n fontSize={12}\n anchorId=\"button-icon\"\n toolTipIsVisible={hovered}\n placement={tooltipPlacement}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n />\n );\n };\n const _customStyle = useMemo(() => {\n return {\n ...customStyle,\n ...((hoverBackgroundColor || hoverColor) && hovered\n ? {\n backgroundColor: hoverBackgroundColor,\n color: hoverColor\n }\n : null)\n };\n }, [hoverBackgroundColor, hoverColor, hovered, customStyle]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n className={styleButton}\n style={customStyle}\n data-name={dataName}\n data-testid={dataTestId}\n onClick={handleOnClick}\n aria-label={ariaLabel || label}\n hoverColor={hoverColor}\n hoverBackgroundColor={hoverBackgroundColor}\n onMouseEnter={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n >\n {getButtonContent(\n icon,\n content ?? label,\n hovered,\n hoverBackgroundColor,\n hoverColor,\n customLabelClassName,\n tag,\n contentCustomStyle\n )}\n {renderToolTip()}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n {...(ariaLabel && !label\n ? {\n 'data-for': 'button-icon',\n 'data-tip': hovered\n }\n : {})}\n // eslint-disable-next-line react/button-has-type\n type={usage}\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={_customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n tabIndex={0}\n disabled={disabled}\n >\n {getButtonContent(\n icon,\n content ?? label,\n hovered,\n hoverBackgroundColor,\n hoverColor,\n customLabelClassName,\n tag,\n contentCustomStyle\n )}\n {renderToolTip()}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,IAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,MAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,MAAA,GAAAP,sBAAA,CAAAF,OAAA;AAAgC,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAA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EACpBC,GAAG,EACHC,kBACF,CAAC,EACAwC,aAAa,CAAC,CACX,CAAC;EAEX;EAEA,oBACEpH,MAAA,CAAAkB,OAAA,CAAAuB,aAAA,WAAAT,QAAA,KACOiE,QAAQ,IAAI;IACf2B,KAAK,EAAElC,SAAS,IAAI5C;EACtB,CAAC,EACI4C,SAAS,IAAI,CAAC5C,KAAK,GACpB;IACE,UAAU,EAAE,aAAa;IACzB,UAAU,EAAEY;EACd,CAAC,GACD,CAAC,CAAC;IACN;IACAW,IAAI,EAAEiB,KAAM;IACZ,cAAYI,SAAS,IAAI5C,KAAM;IAC/B,aAAW0C,QAAS;IACpB,eAAaC,UAAW;IACxB7C,KAAK,EAAE8E,YAAa;IACpBhF,SAAS,EAAEwD,WAAY;IACvBJ,OAAO,EAAEc,aAAc;IACvBZ,SAAS,EAAEe,eAAgB;IAC3BgB,WAAW,EAAEf,eAAgB;IAC7Bc,YAAY,EAAEb,gBAAiB;IAC/Be,QAAQ,EAAE,CAAE;IACZzC,QAAQ,EAAEA;EAAS,IAElBd,gBAAgB,CACfN,IAAI,EACJ5B,OAAO,IAAIO,KAAK,EAChBY,OAAO,EACPC,oBAAoB,EACpBC,UAAU,EACVc,oBAAoB,EACpBC,GAAG,EACHC,kBACF,CAAC,EACAwC,aAAa,CAAC,CACT,CAAC;AAEb,CAAC;AAEDhC,UAAU,CAAC6C,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAApH,OAAA,GAElBkE,UAAU","ignoreList":[]}
|
|
@@ -10,9 +10,7 @@ export declare const iconPropTypes: {
|
|
|
10
10
|
color: PropTypes.Requireable<string>;
|
|
11
11
|
backgroundColor: PropTypes.Requireable<string>;
|
|
12
12
|
size: PropTypes.Requireable<number>;
|
|
13
|
-
customStyle: PropTypes.Requireable<
|
|
14
|
-
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
15
|
-
}>;
|
|
13
|
+
customStyle: PropTypes.Requireable<object>;
|
|
16
14
|
}>>;
|
|
17
15
|
};
|
|
18
16
|
declare const propTypes: {
|
|
@@ -25,7 +23,7 @@ declare const propTypes: {
|
|
|
25
23
|
tooltipPlacement: PropTypes.Requireable<string>;
|
|
26
24
|
'data-name': PropTypes.Requireable<string>;
|
|
27
25
|
'data-testid': PropTypes.Requireable<string>;
|
|
28
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
26
|
+
icon: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
29
27
|
position: PropTypes.Requireable<string>;
|
|
30
28
|
type: PropTypes.Requireable<string>;
|
|
31
29
|
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -33,11 +31,19 @@ declare const propTypes: {
|
|
|
33
31
|
color: PropTypes.Requireable<string>;
|
|
34
32
|
backgroundColor: PropTypes.Requireable<string>;
|
|
35
33
|
size: PropTypes.Requireable<number>;
|
|
36
|
-
customStyle: PropTypes.Requireable<
|
|
37
|
-
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
38
|
-
}>;
|
|
34
|
+
customStyle: PropTypes.Requireable<object>;
|
|
39
35
|
}>>;
|
|
40
|
-
}
|
|
36
|
+
}> | (PropTypes.InferProps<{
|
|
37
|
+
position: PropTypes.Requireable<string>;
|
|
38
|
+
type: PropTypes.Requireable<string>;
|
|
39
|
+
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
40
|
+
name: PropTypes.Validator<string>;
|
|
41
|
+
color: PropTypes.Requireable<string>;
|
|
42
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
43
|
+
size: PropTypes.Requireable<number>;
|
|
44
|
+
customStyle: PropTypes.Requireable<object>;
|
|
45
|
+
}>>;
|
|
46
|
+
}> | null | undefined)[] | null | undefined>>;
|
|
41
47
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
42
48
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
43
49
|
href: PropTypes.Requireable<string>;
|
|
@@ -48,9 +54,8 @@ declare const propTypes: {
|
|
|
48
54
|
hoverColor: PropTypes.Requireable<string>;
|
|
49
55
|
disabled: PropTypes.Requireable<boolean>;
|
|
50
56
|
className: PropTypes.Requireable<string>;
|
|
51
|
-
customStyle: PropTypes.Requireable<
|
|
52
|
-
|
|
53
|
-
}>;
|
|
57
|
+
customStyle: PropTypes.Requireable<object>;
|
|
58
|
+
contentCustomStyle: PropTypes.Requireable<object>;
|
|
54
59
|
useTitle: PropTypes.Requireable<boolean>;
|
|
55
60
|
customLabelClassName: PropTypes.Requireable<string>;
|
|
56
61
|
};
|
|
@@ -59,7 +64,7 @@ export declare type FaIconType = {
|
|
|
59
64
|
color?: string;
|
|
60
65
|
backgroundColor?: string;
|
|
61
66
|
size?: number;
|
|
62
|
-
customStyle?:
|
|
67
|
+
customStyle?: React.CSSProperties;
|
|
63
68
|
};
|
|
64
69
|
export declare type IconType = {
|
|
65
70
|
position: 'right' | 'left';
|
|
@@ -76,7 +81,7 @@ export declare type ButtonLinkProps = {
|
|
|
76
81
|
tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';
|
|
77
82
|
'data-name'?: string;
|
|
78
83
|
'data-testid'?: string;
|
|
79
|
-
icon?: IconType;
|
|
84
|
+
icon?: IconType | IconType[];
|
|
80
85
|
onClick?: () => void;
|
|
81
86
|
onKeyDown?: () => void;
|
|
82
87
|
link?: {
|
|
@@ -88,7 +93,8 @@ export declare type ButtonLinkProps = {
|
|
|
88
93
|
hoverColor?: string;
|
|
89
94
|
disabled?: boolean;
|
|
90
95
|
className?: string;
|
|
91
|
-
customStyle?:
|
|
96
|
+
customStyle?: React.CSSProperties;
|
|
97
|
+
contentCustomStyle?: React.CSSProperties;
|
|
92
98
|
useTitle?: boolean;
|
|
93
99
|
customLabelClassName?: string;
|
|
94
100
|
tag?: React.ComponentProps<typeof Tag>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAC9C,OAAO,GAAG,MAAM,QAAQ,CAAC;AAUzB,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAC9C,OAAO,GAAG,MAAM,QAAQ,CAAC;AAUzB,eAAO,MAAM,aAAa;;;;;;;;;;CAIzB,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Bd,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACnC,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;IAC1B,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;IACnE,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;KAClD,CAAC;IACF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,GAAG,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC;CACxC,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -11,7 +11,7 @@ const faIconPropTypes = {
|
|
|
11
11
|
color: _propTypes.default.string,
|
|
12
12
|
backgroundColor: _propTypes.default.string,
|
|
13
13
|
size: _propTypes.default.number,
|
|
14
|
-
customStyle: _propTypes.default.
|
|
14
|
+
customStyle: _propTypes.default.object
|
|
15
15
|
};
|
|
16
16
|
const iconPropTypes = exports.iconPropTypes = {
|
|
17
17
|
position: _propTypes.default.oneOf(['right', 'left']),
|
|
@@ -28,7 +28,7 @@ const propTypes = {
|
|
|
28
28
|
tooltipPlacement: _propTypes.default.oneOf(['left', 'right', 'top', 'bottom']),
|
|
29
29
|
'data-name': _propTypes.default.string,
|
|
30
30
|
'data-testid': _propTypes.default.string,
|
|
31
|
-
icon: _propTypes.default.shape(iconPropTypes),
|
|
31
|
+
icon: _propTypes.default.oneOfType([_propTypes.default.shape(iconPropTypes), _propTypes.default.arrayOf(_propTypes.default.shape(iconPropTypes))]),
|
|
32
32
|
onClick: _propTypes.default.func,
|
|
33
33
|
link: _propTypes.default.shape({
|
|
34
34
|
href: _propTypes.default.string,
|
|
@@ -39,7 +39,8 @@ const propTypes = {
|
|
|
39
39
|
hoverColor: _propTypes.default.string,
|
|
40
40
|
disabled: _propTypes.default.bool,
|
|
41
41
|
className: _propTypes.default.string,
|
|
42
|
-
customStyle: _propTypes.default.
|
|
42
|
+
customStyle: _propTypes.default.object,
|
|
43
|
+
contentCustomStyle: _propTypes.default.object,
|
|
43
44
|
useTitle: _propTypes.default.bool,
|
|
44
45
|
customLabelClassName: _propTypes.default.string
|
|
45
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_buttonIcons","e","__esModule","default","faIconPropTypes","name","PropTypes","string","isRequired","color","backgroundColor","size","number","customStyle","
|
|
1
|
+
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_buttonIcons","e","__esModule","default","faIconPropTypes","name","PropTypes","string","isRequired","color","backgroundColor","size","number","customStyle","object","iconPropTypes","exports","position","oneOf","type","_keys2","ICONS","faIcon","shape","propTypes","usage","label","content","node","tooltipText","tooltipPlacement","icon","oneOfType","arrayOf","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","contentCustomStyle","useTitle","customLabelClassName","_default"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\nimport Tag from '../tag';\n\nconst faIconPropTypes = {\n name: PropTypes.string.isRequired,\n color: PropTypes.string,\n backgroundColor: PropTypes.string,\n size: PropTypes.number,\n customStyle: PropTypes.object\n};\n\nexport const iconPropTypes = {\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS)),\n faIcon: PropTypes.shape(faIconPropTypes)\n};\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n usage: PropTypes.oneOf(['button', 'submit', 'reset']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n tooltipText: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.oneOfType([\n PropTypes.shape(iconPropTypes),\n PropTypes.arrayOf(PropTypes.shape(iconPropTypes))\n ]),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.object,\n contentCustomStyle: PropTypes.object,\n useTitle: PropTypes.bool,\n customLabelClassName: PropTypes.string\n};\n\nexport type FaIconType = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n customStyle?: React.CSSProperties;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIconType;\n};\n\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?: PropTypes.ReactNodeLike;\n 'aria-label'?: string;\n tooltipText?: string;\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType | IconType[];\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n hoverBackgroundColor?: string;\n hoverColor?: string;\n disabled?: boolean;\n className?: string;\n customStyle?: React.CSSProperties;\n contentCustomStyle?: React.CSSProperties;\n useTitle?: boolean;\n customLabelClassName?: string;\n tag?: React.ComponentProps<typeof Tag>;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAA8C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG9C,MAAMG,eAAe,GAAG;EACtBC,IAAI,EAAEC,kBAAS,CAACC,MAAM,CAACC,UAAU;EACjCC,KAAK,EAAEH,kBAAS,CAACC,MAAM;EACvBG,eAAe,EAAEJ,kBAAS,CAACC,MAAM;EACjCI,IAAI,EAAEL,kBAAS,CAACM,MAAM;EACtBC,WAAW,EAAEP,kBAAS,CAACQ;AACzB,CAAC;AAEM,MAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC3BE,QAAQ,EAAEX,kBAAS,CAACY,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;EAC5CC,IAAI,EAAEb,kBAAS,CAACY,KAAK,CAAC,IAAAE,MAAA,CAAAjB,OAAA,EAAKkB,kBAAK,CAAC,CAAC;EAClCC,MAAM,EAAEhB,kBAAS,CAACiB,KAAK,CAACnB,eAAe;AACzC,CAAC;AAED,MAAMoB,SAAS,GAAG;EAChBL,IAAI,EAAEb,kBAAS,CAACY,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,EA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AAS,CAACQ,MAAM;EACpCgC,QAAQ,EAAExC,kBAAS,CAACiC,IAAI;EACxBQ,oBAAoB,EAAEzC,kBAAS,CAACC;AAClC,CAAC;AAAC,IAAAyC,QAAA,GAAAhC,OAAA,CAAAb,OAAA,GA+CaqB,SAAS","ignoreList":[]}
|
|
@@ -19,9 +19,7 @@ declare const ButtonMenu: {
|
|
|
19
19
|
color: import("prop-types").Requireable<string>;
|
|
20
20
|
backgroundColor: import("prop-types").Requireable<string>;
|
|
21
21
|
size: import("prop-types").Requireable<number>;
|
|
22
|
-
customStyle: import("prop-types").Requireable<
|
|
23
|
-
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
24
|
-
}>;
|
|
22
|
+
customStyle: import("prop-types").Requireable<object>;
|
|
25
23
|
}>>;
|
|
26
24
|
}>>;
|
|
27
25
|
customStyle: import("prop-types").Requireable<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AA+DjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -44,8 +44,6 @@ const Button = props => {
|
|
|
44
44
|
type = 'default',
|
|
45
45
|
buttonLinkType,
|
|
46
46
|
icon,
|
|
47
|
-
customStyle = {},
|
|
48
|
-
customLabelClassName,
|
|
49
47
|
...rest
|
|
50
48
|
} = props;
|
|
51
49
|
const styleButton = (0, _classnames.default)(_style.default.button, type === 'default' && _style.default.defaultStyle, type === 'defaultLeft' && _style.default.defaultLeft, type === 'dangerous' && _style.default.dangerous, type === 'dangerousLeft' && _style.default.dangerousLeft, disabled && _style.default.disabled);
|
|
@@ -58,11 +56,7 @@ const Button = props => {
|
|
|
58
56
|
type: buttonLinkType,
|
|
59
57
|
onClick: handleOnClick,
|
|
60
58
|
'data-name': dataName,
|
|
61
|
-
className: styleButton
|
|
62
|
-
customStyle: {
|
|
63
|
-
...customStyle
|
|
64
|
-
},
|
|
65
|
-
customLabelClassName
|
|
59
|
+
className: styleButton
|
|
66
60
|
};
|
|
67
61
|
const iconProps = buildCustomIconByTheme(icon);
|
|
68
62
|
return /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, buttonLinkProps, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_map","_interopRequireDefault","_classnames","_buttonLink","_style","_types","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","buildCustomIconByTheme","icon","theme","iconProps","custom","THEMES","customProps","DEFAULT_ICON_STYLE","faIcon","Button","props","dataName","ariaLabel","disabled","label","onClick","_noop2","type","buttonLinkType","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_map","_interopRequireDefault","_classnames","_buttonLink","_style","_types","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","buildCustomIconByTheme","icon","theme","iconProps","custom","THEMES","customProps","DEFAULT_ICON_STYLE","faIcon","Button","props","dataName","ariaLabel","disabled","label","onClick","_noop2","type","buttonLinkType","rest","styleButton","classnames","style","button","defaultStyle","defaultLeft","dangerous","dangerousLeft","handleOnClick","useCallback","buttonLinkProps","className","createElement","propTypes","process","env","NODE_ENV","buttonPropTypes","ButtonMenu","buttons","enableScroll","buildButton","index","key","buttonList","useMemo","map","convert","cap","containerStyle","buttonMenuContainer","scrollable","_default","exports"],"sources":["../../../src/atom/button-menu/index.tsx"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport ButtonLink from '../button-link';\nimport style from './style.css';\nimport propTypes, {ButtonMenuProps, ButtonProps, buttonPropTypes} from './types';\nimport {DEFAULT_ICON_STYLE, THEMES} from './utils';\n\nconst buildCustomIconByTheme = (icon: ButtonProps['icon']) => {\n if (!icon) return;\n\n const {theme, ...iconProps} = icon;\n const custom = theme && THEMES[theme];\n if (!custom) return iconProps;\n\n const customProps = custom\n ? {\n ...DEFAULT_ICON_STYLE,\n faIcon: {...DEFAULT_ICON_STYLE.faIcon, ...custom}\n }\n : null;\n\n return {\n ...iconProps,\n ...customProps\n };\n};\n\nconst Button = (props: ButtonProps) => {\n const {\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n disabled,\n label,\n onClick = noop,\n type = 'default',\n buttonLinkType,\n icon,\n ...rest\n } = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.defaultStyle,\n type === 'defaultLeft' && style.defaultLeft,\n type === 'dangerous' && style.dangerous,\n type === 'dangerousLeft' && style.dangerousLeft,\n disabled && style.disabled\n );\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const buttonLinkProps = {\n ...rest,\n 'aria-label': ariaLabel || label,\n disabled,\n label,\n type: buttonLinkType,\n onClick: handleOnClick,\n 'data-name': dataName,\n className: styleButton\n };\n\n const iconProps = buildCustomIconByTheme(icon);\n\n return <ButtonLink {...buttonLinkProps} icon={iconProps} />;\n};\n\nButton.propTypes = buttonPropTypes;\n\nconst ButtonMenu = (props: ButtonMenuProps) => {\n const {buttons, 'data-name': dataName, enableScroll = false} = props;\n const buildButton = useCallback((button: ButtonProps, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n // @ts-expect-error (to avoid using map as any)\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n const containerStyle = classnames(style.buttonMenuContainer, {\n [style.scrollable]: enableScroll\n });\n\n return (\n <div data-name={dataName} className={containerStyle}>\n {buttonList}\n </div>\n );\n};\n\nButtonMenu.propTypes = propTypes;\n\nexport default ButtonMenu;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAAmD,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,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requireable<string>;
|
|
18
18
|
size: PropTypes.Requireable<number>;
|
|
19
|
-
customStyle: PropTypes.Requireable<
|
|
20
|
-
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
21
|
-
}>;
|
|
19
|
+
customStyle: PropTypes.Requireable<object>;
|
|
22
20
|
}>>;
|
|
23
21
|
}>>;
|
|
24
22
|
customStyle: PropTypes.Requireable<{
|
|
@@ -43,9 +41,7 @@ declare const propTypes: {
|
|
|
43
41
|
color: PropTypes.Requireable<string>;
|
|
44
42
|
backgroundColor: PropTypes.Requireable<string>;
|
|
45
43
|
size: PropTypes.Requireable<number>;
|
|
46
|
-
customStyle: PropTypes.Requireable<
|
|
47
|
-
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
48
|
-
}>;
|
|
44
|
+
customStyle: PropTypes.Requireable<object>;
|
|
49
45
|
}>>;
|
|
50
46
|
}>>;
|
|
51
47
|
customStyle: PropTypes.Requireable<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAgB,MAAM,sBAAsB,CAAC;AAE9E,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAgB,MAAM,sBAAsB,CAAC;AAE9E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;CAa3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEzD,oBAAY,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IACjE,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC;IACjE,cAAc,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,QAAQ,GAAG;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAC,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC"}
|
|
@@ -41,7 +41,7 @@ declare const RadioWithTitle: {
|
|
|
41
41
|
tooltipPlacement: import("prop-types").Requireable<string>;
|
|
42
42
|
'data-name': import("prop-types").Requireable<string>;
|
|
43
43
|
'data-testid': import("prop-types").Requireable<string>;
|
|
44
|
-
icon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
44
|
+
icon: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
45
45
|
position: import("prop-types").Requireable<string>;
|
|
46
46
|
type: import("prop-types").Requireable<string>;
|
|
47
47
|
faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
@@ -49,11 +49,19 @@ declare const RadioWithTitle: {
|
|
|
49
49
|
color: import("prop-types").Requireable<string>;
|
|
50
50
|
backgroundColor: import("prop-types").Requireable<string>;
|
|
51
51
|
size: import("prop-types").Requireable<number>;
|
|
52
|
-
customStyle: import("prop-types").Requireable<
|
|
53
|
-
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
54
|
-
}>;
|
|
52
|
+
customStyle: import("prop-types").Requireable<object>;
|
|
55
53
|
}>>;
|
|
56
|
-
}
|
|
54
|
+
}> | (import("prop-types").InferProps<{
|
|
55
|
+
position: import("prop-types").Requireable<string>;
|
|
56
|
+
type: import("prop-types").Requireable<string>;
|
|
57
|
+
faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
58
|
+
name: import("prop-types").Validator<string>;
|
|
59
|
+
color: import("prop-types").Requireable<string>;
|
|
60
|
+
backgroundColor: import("prop-types").Requireable<string>;
|
|
61
|
+
size: import("prop-types").Requireable<number>;
|
|
62
|
+
customStyle: import("prop-types").Requireable<object>;
|
|
63
|
+
}>>;
|
|
64
|
+
}> | null | undefined)[] | null | undefined>>;
|
|
57
65
|
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
58
66
|
link: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
59
67
|
href: import("prop-types").Requireable<string>;
|
|
@@ -64,9 +72,8 @@ declare const RadioWithTitle: {
|
|
|
64
72
|
hoverColor: import("prop-types").Requireable<string>;
|
|
65
73
|
disabled: import("prop-types").Requireable<boolean>;
|
|
66
74
|
className: import("prop-types").Requireable<string>;
|
|
67
|
-
customStyle: import("prop-types").Requireable<
|
|
68
|
-
|
|
69
|
-
}>;
|
|
75
|
+
customStyle: import("prop-types").Requireable<object>;
|
|
76
|
+
contentCustomStyle: import("prop-types").Requireable<object>;
|
|
70
77
|
useTitle: import("prop-types").Requireable<boolean>;
|
|
71
78
|
customLabelClassName: import("prop-types").Requireable<string>;
|
|
72
79
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -39,7 +39,7 @@ export declare const propTypes: {
|
|
|
39
39
|
tooltipPlacement: PropTypes.Requireable<string>;
|
|
40
40
|
'data-name': PropTypes.Requireable<string>;
|
|
41
41
|
'data-testid': PropTypes.Requireable<string>;
|
|
42
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
42
|
+
icon: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
43
43
|
position: PropTypes.Requireable<string>;
|
|
44
44
|
type: PropTypes.Requireable<string>;
|
|
45
45
|
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -47,11 +47,19 @@ export declare const propTypes: {
|
|
|
47
47
|
color: PropTypes.Requireable<string>;
|
|
48
48
|
backgroundColor: PropTypes.Requireable<string>;
|
|
49
49
|
size: PropTypes.Requireable<number>;
|
|
50
|
-
customStyle: PropTypes.Requireable<
|
|
51
|
-
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
52
|
-
}>;
|
|
50
|
+
customStyle: PropTypes.Requireable<object>;
|
|
53
51
|
}>>;
|
|
54
|
-
}
|
|
52
|
+
}> | (PropTypes.InferProps<{
|
|
53
|
+
position: PropTypes.Requireable<string>;
|
|
54
|
+
type: PropTypes.Requireable<string>;
|
|
55
|
+
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
56
|
+
name: PropTypes.Validator<string>;
|
|
57
|
+
color: PropTypes.Requireable<string>;
|
|
58
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
59
|
+
size: PropTypes.Requireable<number>;
|
|
60
|
+
customStyle: PropTypes.Requireable<object>;
|
|
61
|
+
}>>;
|
|
62
|
+
}> | null | undefined)[] | null | undefined>>;
|
|
55
63
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
56
64
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
57
65
|
href: PropTypes.Requireable<string>;
|
|
@@ -62,9 +70,8 @@ export declare const propTypes: {
|
|
|
62
70
|
hoverColor: PropTypes.Requireable<string>;
|
|
63
71
|
disabled: PropTypes.Requireable<boolean>;
|
|
64
72
|
className: PropTypes.Requireable<string>;
|
|
65
|
-
customStyle: PropTypes.Requireable<
|
|
66
|
-
|
|
67
|
-
}>;
|
|
73
|
+
customStyle: PropTypes.Requireable<object>;
|
|
74
|
+
contentCustomStyle: PropTypes.Requireable<object>;
|
|
68
75
|
useTitle: PropTypes.Requireable<boolean>;
|
|
69
76
|
customLabelClassName: PropTypes.Requireable<string>;
|
|
70
77
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOrB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|