@coorpacademy/components 10.1.2 → 10.1.3
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.js +106 -0
- package/es/atom/button-link/index.js.map +1 -0
- package/es/atom/button-link/style.css +97 -0
- package/es/atom/button-link/test/fixtures/button-dangerous-no-icon.js +10 -0
- package/es/atom/button-link/test/fixtures/button-dangerous-no-icon.js.map +1 -0
- package/es/atom/button-link/test/fixtures/button-primary-icon-left.js +14 -0
- package/es/atom/button-link/test/fixtures/button-primary-icon-left.js.map +1 -0
- package/es/atom/button-link/test/fixtures/button-primary-no-icon.js +10 -0
- package/es/atom/button-link/test/fixtures/button-primary-no-icon.js.map +1 -0
- package/es/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js +11 -0
- package/es/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js.map +1 -0
- package/es/atom/button-link/test/fixtures/button-tertiary-icon-left.js +14 -0
- package/es/atom/button-link/test/fixtures/button-tertiary-icon-left.js.map +1 -0
- package/es/atom/button-link/test/fixtures/icon-button.js +13 -0
- package/es/atom/button-link/test/fixtures/icon-button.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js +17 -0
- package/es/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-secondary-icon-right.js +20 -0
- package/es/atom/button-link/test/fixtures/link-secondary-icon-right.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-tertiary-no-icon.js +16 -0
- package/es/atom/button-link/test/fixtures/link-tertiary-no-icon.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js +17 -0
- package/es/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-text-no-icon-download.js +13 -0
- package/es/atom/button-link/test/fixtures/link-text-no-icon-download.js.map +1 -0
- package/es/atom/input-checkbox/test/fixtures.js +2 -0
- package/es/atom/input-checkbox/test/fixtures.js.map +1 -1
- package/es/atom/input-search/index.js +65 -0
- package/es/atom/input-search/index.js.map +1 -0
- package/es/atom/input-search/style.css +201 -0
- package/es/{molecule/search → atom/input-search}/test/change.js +0 -0
- package/es/atom/input-search/test/change.js.map +1 -0
- package/es/atom/input-search/test/fixtures/coorpmanager-with-value.js +14 -0
- package/es/atom/input-search/test/fixtures/coorpmanager-with-value.js.map +1 -0
- package/es/atom/input-search/test/fixtures/coorpmanager.js +13 -0
- package/es/atom/input-search/test/fixtures/coorpmanager.js.map +1 -0
- package/es/{molecule/search → atom/input-search}/test/fixtures/default.js +0 -0
- package/es/atom/input-search/test/fixtures/default.js.map +1 -0
- package/es/{molecule/search → atom/input-search}/test/fixtures/with-value.js +0 -0
- package/es/atom/input-search/test/fixtures/with-value.js.map +1 -0
- package/es/atom/tag/index.js +27 -0
- package/es/atom/tag/index.js.map +1 -0
- package/es/atom/tag/style.css +38 -0
- package/es/atom/tag/test/fixtures/archived.js +7 -0
- package/es/atom/tag/test/fixtures/archived.js.map +1 -0
- package/es/atom/tag/test/fixtures/default.js +7 -0
- package/es/atom/tag/test/fixtures/default.js.map +1 -0
- package/es/atom/tag/test/fixtures/published.js +7 -0
- package/es/atom/tag/test/fixtures/published.js.map +1 -0
- package/es/atom/tag/test/fixtures/revision.js +7 -0
- package/es/atom/tag/test/fixtures/revision.js.map +1 -0
- package/es/atom/title/test/fixtures.js +6 -2
- package/es/atom/title/test/fixtures.js.map +1 -1
- package/es/molecule/banner/style.css +3 -3
- package/es/molecule/cm-popin/index.js +21 -15
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +2 -44
- package/es/molecule/cm-popin/test/fixtures/dangerous.js +3 -0
- package/es/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -1
- package/es/molecule/cm-popin/test/fixtures/default.js +6 -3
- package/es/molecule/cm-popin/test/fixtures/default.js.map +1 -1
- package/es/molecule/cm-popin/test/fixtures/warning-with-close.js +4 -1
- package/es/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -1
- package/es/molecule/coorp-manager-roles/test/fixtures.js +13 -0
- package/es/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
- package/es/molecule/feedback/test/fixtures.js +2 -0
- package/es/molecule/feedback/test/fixtures.js.map +1 -1
- package/es/molecule/quick-access-card/test/fixtures.js +21 -0
- package/es/molecule/quick-access-card/test/fixtures.js.map +1 -0
- package/es/molecule/quick-access-cards-group/test/fixtures.js +21 -0
- package/es/molecule/quick-access-cards-group/test/fixtures.js.map +1 -0
- package/es/molecule/search-form/index.js +1 -1
- package/es/molecule/search-form/index.js.map +1 -1
- package/es/molecule/wizard-summary/index.js +18 -10
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/molecule/wizard-summary/style.css +4 -21
- package/es/molecule/wizard-summary/test/fixtures/default.js +2 -1
- package/es/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures/one-section.js +2 -1
- package/es/molecule/wizard-summary/test/fixtures/one-section.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js +2 -1
- package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures/three-sections.js +2 -1
- package/es/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures/two-sections.js +2 -1
- package/es/molecule/wizard-summary/test/fixtures/two-sections.js.map +1 -1
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js +4 -0
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/es/organism/brand-dashboard/test/fixtures.js +2 -0
- package/es/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/es/organism/brand-table/index.js +1 -1
- package/es/organism/brand-table/index.js.map +1 -1
- package/es/organism/mooc-header/index.js +1 -1
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/mooc-header/test/fixtures/default.js +1 -1
- package/es/organism/mooc-header/test/fixtures/default.js.map +1 -1
- package/es/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js +1 -1
- package/es/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js.map +1 -1
- package/es/template/app-player/popin-end/test/fixtures.js +2 -0
- package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-list/index.js +6 -2
- package/es/template/back-office/brand-list/index.js.map +1 -1
- package/es/template/back-office/brand-list/style.css +1 -0
- package/es/template/back-office/brand-update/test/fixtures.js +2 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/variables/colors.css +0 -2
- package/lib/atom/button-link/index.js +123 -0
- package/lib/atom/button-link/index.js.map +1 -0
- package/lib/atom/button-link/style.css +97 -0
- package/lib/atom/button-link/test/fixtures/button-dangerous-no-icon.js +15 -0
- package/lib/atom/button-link/test/fixtures/button-dangerous-no-icon.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/button-primary-icon-left.js +19 -0
- package/lib/atom/button-link/test/fixtures/button-primary-icon-left.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/button-primary-no-icon.js +15 -0
- package/lib/atom/button-link/test/fixtures/button-primary-no-icon.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js +16 -0
- package/lib/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/button-tertiary-icon-left.js +19 -0
- package/lib/atom/button-link/test/fixtures/button-tertiary-icon-left.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/icon-button.js +18 -0
- package/lib/atom/button-link/test/fixtures/icon-button.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js +22 -0
- package/lib/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-secondary-icon-right.js +25 -0
- package/lib/atom/button-link/test/fixtures/link-secondary-icon-right.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-tertiary-no-icon.js +21 -0
- package/lib/atom/button-link/test/fixtures/link-tertiary-no-icon.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js +22 -0
- package/lib/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-text-no-icon-download.js +18 -0
- package/lib/atom/button-link/test/fixtures/link-text-no-icon-download.js.map +1 -0
- package/lib/atom/input-checkbox/test/fixtures.js +3 -0
- package/lib/atom/input-checkbox/test/fixtures.js.map +1 -1
- package/lib/{molecule/search → atom/input-search}/index.js +29 -18
- package/lib/atom/input-search/index.js.map +1 -0
- package/lib/atom/input-search/style.css +201 -0
- package/lib/{molecule/search → atom/input-search}/test/change.js +0 -0
- package/lib/atom/input-search/test/change.js.map +1 -0
- package/lib/atom/input-search/test/fixtures/coorpmanager-with-value.js +19 -0
- package/lib/atom/input-search/test/fixtures/coorpmanager-with-value.js.map +1 -0
- package/lib/atom/input-search/test/fixtures/coorpmanager.js +18 -0
- package/lib/atom/input-search/test/fixtures/coorpmanager.js.map +1 -0
- package/lib/{molecule/search → atom/input-search}/test/fixtures/default.js +0 -0
- package/lib/atom/input-search/test/fixtures/default.js.map +1 -0
- package/lib/{molecule/search → atom/input-search}/test/fixtures/with-value.js +0 -0
- package/lib/atom/input-search/test/fixtures/with-value.js.map +1 -0
- package/lib/atom/tag/index.js +39 -0
- package/lib/atom/tag/index.js.map +1 -0
- package/lib/atom/tag/style.css +38 -0
- package/lib/atom/tag/test/fixtures/archived.js +12 -0
- package/lib/atom/tag/test/fixtures/archived.js.map +1 -0
- package/lib/atom/tag/test/fixtures/default.js +12 -0
- package/lib/atom/tag/test/fixtures/default.js.map +1 -0
- package/lib/atom/tag/test/fixtures/published.js +12 -0
- package/lib/atom/tag/test/fixtures/published.js.map +1 -0
- package/lib/atom/tag/test/fixtures/revision.js +12 -0
- package/lib/atom/tag/test/fixtures/revision.js.map +1 -0
- package/lib/atom/title/test/fixtures.js +8 -2
- package/lib/atom/title/test/fixtures.js.map +1 -1
- package/lib/molecule/banner/style.css +3 -3
- package/lib/molecule/cm-popin/index.js +21 -16
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +2 -44
- package/lib/molecule/cm-popin/test/fixtures/dangerous.js +3 -0
- package/lib/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -1
- package/lib/molecule/cm-popin/test/fixtures/default.js +6 -3
- package/lib/molecule/cm-popin/test/fixtures/default.js.map +1 -1
- package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js +4 -1
- package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -1
- package/lib/molecule/coorp-manager-roles/test/fixtures.js +22 -0
- package/lib/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
- package/lib/molecule/feedback/test/fixtures.js +3 -0
- package/lib/molecule/feedback/test/fixtures.js.map +1 -1
- package/lib/molecule/quick-access-card/test/fixtures.js +34 -0
- package/lib/molecule/quick-access-card/test/fixtures.js.map +1 -0
- package/lib/molecule/quick-access-cards-group/test/fixtures.js +34 -0
- package/lib/molecule/quick-access-cards-group/test/fixtures.js.map +1 -0
- package/lib/molecule/search-form/index.js +3 -3
- package/lib/molecule/search-form/index.js.map +1 -1
- package/lib/molecule/wizard-summary/index.js +18 -10
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/molecule/wizard-summary/style.css +4 -21
- package/lib/molecule/wizard-summary/test/fixtures/default.js +2 -1
- package/lib/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures/one-section.js +2 -1
- package/lib/molecule/wizard-summary/test/fixtures/one-section.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js +2 -1
- package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures/three-sections.js +2 -1
- package/lib/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures/two-sections.js +2 -1
- package/lib/molecule/wizard-summary/test/fixtures/two-sections.js.map +1 -1
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js +6 -0
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/lib/organism/brand-dashboard/test/fixtures.js +3 -0
- package/lib/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/lib/organism/brand-table/index.js +3 -3
- package/lib/organism/brand-table/index.js.map +1 -1
- package/lib/organism/mooc-header/index.js +2 -2
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/mooc-header/test/fixtures/default.js +1 -1
- package/lib/organism/mooc-header/test/fixtures/default.js.map +1 -1
- package/lib/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js +1 -1
- package/lib/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js.map +1 -1
- package/lib/template/app-player/popin-end/test/fixtures.js +3 -0
- package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-list/index.js +7 -3
- package/lib/template/back-office/brand-list/index.js.map +1 -1
- package/lib/template/back-office/brand-list/style.css +1 -0
- package/lib/template/back-office/brand-update/test/fixtures.js +3 -3
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/variables/colors.css +0 -2
- package/package.json +3 -3
- package/es/atom/bullet-point-menu-button/test/fixtures.js +0 -27
- package/es/atom/bullet-point-menu-button/test/fixtures.js.map +0 -1
- package/es/molecule/search/index.js +0 -57
- package/es/molecule/search/index.js.map +0 -1
- package/es/molecule/search/style.css +0 -86
- package/es/molecule/search/test/change.js.map +0 -1
- package/es/molecule/search/test/fixtures/default.js.map +0 -1
- package/es/molecule/search/test/fixtures/with-value.js.map +0 -1
- package/lib/atom/bullet-point-menu-button/test/fixtures.js +0 -43
- package/lib/atom/bullet-point-menu-button/test/fixtures.js.map +0 -1
- package/lib/molecule/search/index.js.map +0 -1
- package/lib/molecule/search/style.css +0 -86
- package/lib/molecule/search/test/change.js.map +0 -1
- package/lib/molecule/search/test/fixtures/default.js.map +0 -1
- package/lib/molecule/search/test/fixtures/with-value.js.map +0 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
15
|
+
|
|
16
|
+
var _link = _interopRequireDefault(require("../link"));
|
|
17
|
+
|
|
18
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
|
+
|
|
28
|
+
const ICONS = {
|
|
29
|
+
analytics: _novaIcons.NovaCompositionCoorpacademyAnalytics,
|
|
30
|
+
'chevron-left': _novaIcons.NovaCompositionNavigationArrowLeft,
|
|
31
|
+
'chevron-right': _novaIcons.NovaCompositionNavigationArrowRight,
|
|
32
|
+
close: _novaIcons.NovaCompositionCoorpacademyNext,
|
|
33
|
+
save: _novaIcons.NovaSolidComputersSdCard,
|
|
34
|
+
see: _novaIcons.NovaCompositionCoorpacademyEye
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const getButtonContent = (icon, label) => {
|
|
38
|
+
const {
|
|
39
|
+
type,
|
|
40
|
+
position
|
|
41
|
+
} = icon;
|
|
42
|
+
const Icon = (0, _getOr2.default)(null, type, ICONS);
|
|
43
|
+
|
|
44
|
+
if (!Icon) {
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
+
className: _style.default.buttonContent
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
48
|
+
className: _style.default.label
|
|
49
|
+
}, label));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (position === 'center' && Icon) {
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
className: _style.default.buttonContent
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
56
|
+
className: _style.default.icon
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
className: _style.default.buttonContent
|
|
62
|
+
}, position === 'left' ? /*#__PURE__*/_react.default.createElement(Icon, {
|
|
63
|
+
className: _style.default.icon
|
|
64
|
+
}) : null, /*#__PURE__*/_react.default.createElement("span", {
|
|
65
|
+
className: _style.default.label
|
|
66
|
+
}, label), position === 'right' ? /*#__PURE__*/_react.default.createElement(Icon, {
|
|
67
|
+
className: _style.default.icon
|
|
68
|
+
}) : null);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const ButtonLink = props => {
|
|
72
|
+
const {
|
|
73
|
+
type,
|
|
74
|
+
label,
|
|
75
|
+
disabled,
|
|
76
|
+
icon = {},
|
|
77
|
+
'data-name': dataName,
|
|
78
|
+
'aria-label': ariaLabel,
|
|
79
|
+
link,
|
|
80
|
+
onClick
|
|
81
|
+
} = props;
|
|
82
|
+
const contentView = getButtonContent(icon, label);
|
|
83
|
+
const styleButton = (0, _classnames.default)(_style.default.button, type === 'primary' && _style.default.primary, type === 'secondary' && _style.default.secondary, type === 'tertiary' && _style.default.tertiary, type === 'text' && _style.default.text, type === 'dangerous' && _style.default.dangerous, link && _style.default.link, disabled && _style.default.disabled);
|
|
84
|
+
|
|
85
|
+
if (link) {
|
|
86
|
+
return /*#__PURE__*/_react.default.createElement(_link.default, _extends({}, link, {
|
|
87
|
+
className: styleButton,
|
|
88
|
+
"data-name": dataName,
|
|
89
|
+
"aria-label": ariaLabel || label,
|
|
90
|
+
title: ariaLabel || label
|
|
91
|
+
}), contentView);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const handleOnClick = (0, _react.useMemo)(() => () => onClick(), [onClick]);
|
|
95
|
+
return /*#__PURE__*/_react.default.createElement("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
"aria-label": ariaLabel || label,
|
|
98
|
+
title: ariaLabel || label,
|
|
99
|
+
className: styleButton,
|
|
100
|
+
onClick: handleOnClick
|
|
101
|
+
}, contentView);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
105
|
+
type: _propTypes.default.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),
|
|
106
|
+
label: _propTypes.default.string,
|
|
107
|
+
'aria-label': _propTypes.default.string,
|
|
108
|
+
'data-name': _propTypes.default.string,
|
|
109
|
+
icon: _propTypes.default.shape({
|
|
110
|
+
position: _propTypes.default.oneOf(['right', 'left', 'center']),
|
|
111
|
+
type: _propTypes.default.string
|
|
112
|
+
}),
|
|
113
|
+
onClick: _propTypes.default.func,
|
|
114
|
+
link: _propTypes.default.shape({
|
|
115
|
+
href: _propTypes.default.string,
|
|
116
|
+
download: _propTypes.default.bool,
|
|
117
|
+
target: _propTypes.default.oneOf(['_self', '_blank', '_parent', '_top'])
|
|
118
|
+
}),
|
|
119
|
+
disabled: _propTypes.default.bool
|
|
120
|
+
} : {};
|
|
121
|
+
var _default = ButtonLink;
|
|
122
|
+
exports.default = _default;
|
|
123
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/button-link/index.js"],"names":["ICONS","analytics","AnalyticsIcon","ChevronLeftIcon","ChevronRightIcon","close","CloseIcon","save","SaveIcon","see","EyeIcon","getButtonContent","icon","label","type","position","Icon","style","buttonContent","ButtonLink","props","disabled","dataName","ariaLabel","link","onClick","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","propTypes","PropTypes","oneOf","string","shape","func","href","download","bool","target"],"mappings":"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","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {\n NovaCompositionNavigationArrowLeft as ChevronLeftIcon,\n NovaCompositionNavigationArrowRight as ChevronRightIcon,\n NovaCompositionCoorpacademyEye as EyeIcon,\n NovaCompositionCoorpacademyAnalytics as AnalyticsIcon,\n NovaCompositionCoorpacademyNext as CloseIcon,\n NovaSolidComputersSdCard as SaveIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../link';\nimport style from './style.css';\n\nconst ICONS = {\n analytics: AnalyticsIcon,\n 'chevron-left': ChevronLeftIcon,\n 'chevron-right': ChevronRightIcon,\n close: CloseIcon,\n save: SaveIcon,\n see: EyeIcon\n};\n\nconst getButtonContent = (icon, label) => {\n const {type, position} = icon;\n const Icon = getOr(null, type, ICONS);\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n if (position === 'center' && Icon) {\n return (\n <div className={style.buttonContent}>\n <Icon className={style.icon} />\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = props => {\n const {\n type,\n label,\n disabled,\n icon = {},\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n link,\n onClick\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n style.button,\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 link && style.link,\n disabled && style.disabled\n );\n\n if (link) {\n return (\n <Link\n {...link}\n className={styleButton}\n data-name={dataName}\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n const handleOnClick = useMemo(() => () => onClick(), [onClick]);\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n className={styleButton}\n onClick={handleOnClick}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left', 'center']),\n type: PropTypes.string\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 disabled: PropTypes.bool\n};\n\nexport default ButtonLink;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_primary_blue from colors;
|
|
3
|
+
@value cm_blue_600 from colors;
|
|
4
|
+
@value cm_grey_50 from colors;
|
|
5
|
+
@value cm_grey_100 from colors;
|
|
6
|
+
@value cm_grey_200 from colors;
|
|
7
|
+
@value cm_grey_900 from colors;
|
|
8
|
+
@value cm_negative_100 from colors;
|
|
9
|
+
@value cm_negative_200 from colors;
|
|
10
|
+
@value white from colors;
|
|
11
|
+
|
|
12
|
+
.button {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 44px;
|
|
15
|
+
border-radius: 7px;
|
|
16
|
+
font-family: Gilroy;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
align-items: center;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
border: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.disabled {
|
|
27
|
+
opacity: 0.1;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.buttonContent {
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.link {
|
|
38
|
+
color: inherit;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.icon {
|
|
43
|
+
width: 12px;
|
|
44
|
+
height: 12px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.label {
|
|
48
|
+
margin: 0 8px 0 8px;
|
|
49
|
+
display: block;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.primary {
|
|
53
|
+
background-color: cm_primary_blue;
|
|
54
|
+
color: white;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.primary:hover {
|
|
58
|
+
background-color: cm_blue_600;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.secondary {
|
|
62
|
+
background-color: cm_grey_100;
|
|
63
|
+
color: cm_grey_900;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.secondary:hover {
|
|
67
|
+
background-color: cm_grey_200;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.tertiary {
|
|
71
|
+
background-color: cm_grey_50;
|
|
72
|
+
color: cm_grey_900;
|
|
73
|
+
border-radius: 0px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.tertiary:hover {
|
|
77
|
+
background-color: cm_grey_100;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.dangerous {
|
|
81
|
+
background-color: cm_negative_100;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.dangerous:hover {
|
|
85
|
+
background-color: cm_negative_200;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.text {
|
|
89
|
+
background: transparent;
|
|
90
|
+
color: cm_grey_900;
|
|
91
|
+
border-radius: 0px;
|
|
92
|
+
height: auto;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.text:hover {
|
|
96
|
+
color: cm_primary_blue;
|
|
97
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'dangerous',
|
|
8
|
+
label: 'Delete',
|
|
9
|
+
'aria-label': 'aria button',
|
|
10
|
+
'data-name': 'default-button',
|
|
11
|
+
onClick: () => console.log('click')
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
exports.default = _default;
|
|
15
|
+
//# sourceMappingURL=button-dangerous-no-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/button-dangerous-no-icon.js"],"names":["props","type","label","onClick","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,WADD;AAELC,IAAAA,KAAK,EAAE,QAFF;AAGL,kBAAc,aAHT;AAIL,iBAAa,gBAJR;AAKLC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AALV;AADM,C","sourcesContent":["export default {\n props: {\n type: 'dangerous',\n label: 'Delete',\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n onClick: () => console.log('click')\n }\n};\n"],"file":"button-dangerous-no-icon.js"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'primary',
|
|
8
|
+
label: 'See my platform',
|
|
9
|
+
'aria-label': 'aria button',
|
|
10
|
+
'data-name': 'default-button',
|
|
11
|
+
icon: {
|
|
12
|
+
position: 'left',
|
|
13
|
+
type: 'chevron-left'
|
|
14
|
+
},
|
|
15
|
+
onClick: () => console.log('click')
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.default = _default;
|
|
19
|
+
//# sourceMappingURL=button-primary-icon-left.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/button-primary-icon-left.js"],"names":["props","type","label","icon","position","onClick","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,SADD;AAELC,IAAAA,KAAK,EAAE,iBAFF;AAGL,kBAAc,aAHT;AAIL,iBAAa,gBAJR;AAKLC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,MADN;AAEJH,MAAAA,IAAI,EAAE;AAFF,KALD;AASLI,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATV;AADM,C","sourcesContent":["export default {\n props: {\n type: 'primary',\n label: 'See my platform',\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n icon: {\n position: 'left',\n type: 'chevron-left'\n },\n onClick: () => console.log('click')\n }\n};\n"],"file":"button-primary-icon-left.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'primary',
|
|
8
|
+
label: 'See my platform',
|
|
9
|
+
'aria-label': 'aria button',
|
|
10
|
+
'data-name': 'default-button',
|
|
11
|
+
onClick: () => console.log('click')
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
exports.default = _default;
|
|
15
|
+
//# sourceMappingURL=button-primary-no-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/button-primary-no-icon.js"],"names":["props","type","label","onClick","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,SADD;AAELC,IAAAA,KAAK,EAAE,iBAFF;AAGL,kBAAc,aAHT;AAIL,iBAAa,gBAJR;AAKLC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AALV;AADM,C","sourcesContent":["export default {\n props: {\n type: 'primary',\n label: 'See my platform',\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n onClick: () => console.log('click')\n }\n};\n"],"file":"button-primary-no-icon.js"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'secondary',
|
|
8
|
+
label: 'See my platform',
|
|
9
|
+
'aria-label': 'aria button',
|
|
10
|
+
'data-name': 'default-button',
|
|
11
|
+
onClick: () => console.log('click'),
|
|
12
|
+
disabled: true
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.default = _default;
|
|
16
|
+
//# sourceMappingURL=button-secondary-no-icon-disabled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js"],"names":["props","type","label","onClick","console","log","disabled"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,WADD;AAELC,IAAAA,KAAK,EAAE,iBAFF;AAGL,kBAAc,aAHT;AAIL,iBAAa,gBAJR;AAKLC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ,CALV;AAMLC,IAAAA,QAAQ,EAAE;AANL;AADM,C","sourcesContent":["export default {\n props: {\n type: 'secondary',\n label: 'See my platform',\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n onClick: () => console.log('click'),\n disabled: true\n }\n};\n"],"file":"button-secondary-no-icon-disabled.js"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'tertiary',
|
|
8
|
+
label: 'Button',
|
|
9
|
+
'aria-label': 'aria button',
|
|
10
|
+
'data-name': 'default-button',
|
|
11
|
+
icon: {
|
|
12
|
+
position: 'left',
|
|
13
|
+
type: 'see'
|
|
14
|
+
},
|
|
15
|
+
onClick: () => console.log('click')
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.default = _default;
|
|
19
|
+
//# sourceMappingURL=button-tertiary-icon-left.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/button-tertiary-icon-left.js"],"names":["props","type","label","icon","position","onClick","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,UADD;AAELC,IAAAA,KAAK,EAAE,QAFF;AAGL,kBAAc,aAHT;AAIL,iBAAa,gBAJR;AAKLC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,MADN;AAEJH,MAAAA,IAAI,EAAE;AAFF,KALD;AASLI,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATV;AADM,C","sourcesContent":["export default {\n props: {\n type: 'tertiary',\n label: 'Button',\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n icon: {\n position: 'left',\n type: 'see'\n },\n onClick: () => console.log('click')\n }\n};\n"],"file":"button-tertiary-icon-left.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'secondary',
|
|
8
|
+
'data-name': 'default-button',
|
|
9
|
+
'aria-label': 'aria button',
|
|
10
|
+
icon: {
|
|
11
|
+
position: 'center',
|
|
12
|
+
type: 'close'
|
|
13
|
+
},
|
|
14
|
+
onClick: () => console.log('click')
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.default = _default;
|
|
18
|
+
//# sourceMappingURL=icon-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/icon-button.js"],"names":["props","type","icon","position","onClick","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,WADD;AAEL,iBAAa,gBAFR;AAGL,kBAAc,aAHT;AAILC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,QADN;AAEJF,MAAAA,IAAI,EAAE;AAFF,KAJD;AAQLG,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AARV;AADM,C","sourcesContent":["export default {\n props: {\n type: 'secondary',\n 'data-name': 'default-button',\n 'aria-label': 'aria button',\n icon: {\n position: 'center',\n type: 'close'\n },\n onClick: () => console.log('click')\n }\n};\n"],"file":"icon-button.js"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'primary',
|
|
8
|
+
disabled: true,
|
|
9
|
+
label: 'Global Analytics',
|
|
10
|
+
'aria-label': 'aria button',
|
|
11
|
+
'data-name': 'default-button',
|
|
12
|
+
icon: {
|
|
13
|
+
position: 'right',
|
|
14
|
+
type: 'analytics'
|
|
15
|
+
},
|
|
16
|
+
link: {
|
|
17
|
+
href: 'https://www.google.com'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.default = _default;
|
|
22
|
+
//# sourceMappingURL=link-primary-disabled-icon-right.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js"],"names":["props","type","disabled","label","icon","position","link","href"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,SADD;AAELC,IAAAA,QAAQ,EAAE,IAFL;AAGLC,IAAAA,KAAK,EAAE,kBAHF;AAIL,kBAAc,aAJT;AAKL,iBAAa,gBALR;AAMLC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,OADN;AAEJJ,MAAAA,IAAI,EAAE;AAFF,KAND;AAULK,IAAAA,IAAI,EAAE;AACJC,MAAAA,IAAI,EAAE;AADF;AAVD;AADM,C","sourcesContent":["export default {\n props: {\n type: 'primary',\n disabled: true,\n label: 'Global Analytics',\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n icon: {\n position: 'right',\n type: 'analytics'\n },\n link: {\n href: 'https://www.google.com'\n }\n }\n};\n"],"file":"link-primary-disabled-icon-right.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'secondary',
|
|
8
|
+
label: 'Global Analytics',
|
|
9
|
+
'data-name': 'default-button',
|
|
10
|
+
'aria-label': 'aria button',
|
|
11
|
+
icon: {
|
|
12
|
+
position: 'right',
|
|
13
|
+
type: 'analytics'
|
|
14
|
+
},
|
|
15
|
+
onClick: () => {
|
|
16
|
+
console.log('Click on link');
|
|
17
|
+
return;
|
|
18
|
+
},
|
|
19
|
+
link: {
|
|
20
|
+
href: 'https://www.google.com'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.default = _default;
|
|
25
|
+
//# sourceMappingURL=link-secondary-icon-right.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/link-secondary-icon-right.js"],"names":["props","type","label","icon","position","onClick","console","log","link","href"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,WADD;AAELC,IAAAA,KAAK,EAAE,kBAFF;AAGL,iBAAa,gBAHR;AAIL,kBAAc,aAJT;AAKLC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,OADN;AAEJH,MAAAA,IAAI,EAAE;AAFF,KALD;AASLI,IAAAA,OAAO,EAAE,MAAM;AACbC,MAAAA,OAAO,CAACC,GAAR,CAAY,eAAZ;AACA;AACD,KAZI;AAaLC,IAAAA,IAAI,EAAE;AACJC,MAAAA,IAAI,EAAE;AADF;AAbD;AADM,C","sourcesContent":["export default {\n props: {\n type: 'secondary',\n label: 'Global Analytics',\n 'data-name': 'default-button',\n 'aria-label': 'aria button',\n icon: {\n position: 'right',\n type: 'analytics'\n },\n onClick: () => {\n console.log('Click on link');\n return;\n },\n link: {\n href: 'https://www.google.com'\n }\n }\n};\n"],"file":"link-secondary-icon-right.js"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'tertiary',
|
|
8
|
+
label: 'Go to google',
|
|
9
|
+
'data-name': 'default-button',
|
|
10
|
+
'aria-label': 'aria button',
|
|
11
|
+
onClick: () => {
|
|
12
|
+
console.log('Click on link');
|
|
13
|
+
return;
|
|
14
|
+
},
|
|
15
|
+
link: {
|
|
16
|
+
href: 'https://www.google.com'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
//# sourceMappingURL=link-tertiary-no-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/link-tertiary-no-icon.js"],"names":["props","type","label","onClick","console","log","link","href"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,UADD;AAELC,IAAAA,KAAK,EAAE,cAFF;AAGL,iBAAa,gBAHR;AAIL,kBAAc,aAJT;AAKLC,IAAAA,OAAO,EAAE,MAAM;AACbC,MAAAA,OAAO,CAACC,GAAR,CAAY,eAAZ;AACA;AACD,KARI;AASLC,IAAAA,IAAI,EAAE;AACJC,MAAAA,IAAI,EAAE;AADF;AATD;AADM,C","sourcesContent":["export default {\n props: {\n type: 'tertiary',\n label: 'Go to google',\n 'data-name': 'default-button',\n 'aria-label': 'aria button',\n onClick: () => {\n console.log('Click on link');\n return;\n },\n link: {\n href: 'https://www.google.com'\n }\n }\n};\n"],"file":"link-tertiary-no-icon.js"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'text',
|
|
8
|
+
label: 'Button',
|
|
9
|
+
'data-name': 'default-button',
|
|
10
|
+
'aria-label': 'aria button',
|
|
11
|
+
icon: {
|
|
12
|
+
position: 'right',
|
|
13
|
+
type: 'chevron-left'
|
|
14
|
+
},
|
|
15
|
+
link: {
|
|
16
|
+
href: 'http://www.google.com',
|
|
17
|
+
target: '_blank'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.default = _default;
|
|
22
|
+
//# sourceMappingURL=link-text-icon-right-target-blank.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js"],"names":["props","type","label","icon","position","link","href","target"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,MADD;AAELC,IAAAA,KAAK,EAAE,QAFF;AAGL,iBAAa,gBAHR;AAIL,kBAAc,aAJT;AAKLC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,OADN;AAEJH,MAAAA,IAAI,EAAE;AAFF,KALD;AASLI,IAAAA,IAAI,EAAE;AACJC,MAAAA,IAAI,EAAE,uBADF;AAEJC,MAAAA,MAAM,EAAE;AAFJ;AATD;AADM,C","sourcesContent":["export default {\n props: {\n type: 'text',\n label: 'Button',\n 'data-name': 'default-button',\n 'aria-label': 'aria button',\n icon: {\n position: 'right',\n type: 'chevron-left'\n },\n link: {\n href: 'http://www.google.com',\n target: '_blank'\n }\n }\n};\n"],"file":"link-text-icon-right-target-blank.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
type: 'text',
|
|
8
|
+
label: 'Download',
|
|
9
|
+
'data-name': 'default-button',
|
|
10
|
+
'aria-label': 'aria button',
|
|
11
|
+
link: {
|
|
12
|
+
href: 'https://setup.coorpacademy.com/assets/templates/import-users-template.xlsx',
|
|
13
|
+
download: true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.default = _default;
|
|
18
|
+
//# sourceMappingURL=link-text-no-icon-download.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link/test/fixtures/link-text-no-icon-download.js"],"names":["props","type","label","link","href","download"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,MADD;AAELC,IAAAA,KAAK,EAAE,UAFF;AAGL,iBAAa,gBAHR;AAIL,kBAAc,aAJT;AAKLC,IAAAA,IAAI,EAAE;AACJC,MAAAA,IAAI,EAAE,4EADF;AAEJC,MAAAA,QAAQ,EAAE;AAFN;AALD;AADM,C","sourcesContent":["export default {\n props: {\n type: 'text',\n label: 'Download',\n 'data-name': 'default-button',\n 'aria-label': 'aria button',\n link: {\n href: 'https://setup.coorpacademy.com/assets/templates/import-users-template.xlsx',\n download: true\n }\n }\n};\n"],"file":"link-text-no-icon-download.js"}
|
|
@@ -8,6 +8,8 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
|
|
|
8
8
|
|
|
9
9
|
var _ = _interopRequireDefault(require(".."));
|
|
10
10
|
|
|
11
|
+
var _checkedDisabled = _interopRequireDefault(require("./fixtures/checked-disabled"));
|
|
12
|
+
|
|
11
13
|
var _checked = _interopRequireDefault(require("./fixtures/checked"));
|
|
12
14
|
|
|
13
15
|
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
@@ -28,6 +30,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
28
30
|
t.not(value, undefined, `PropType for "Atom.AtomInputCheckbox.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
29
31
|
});
|
|
30
32
|
});
|
|
33
|
+
(0, _ava.default)('Atom › AtomInputCheckbox › CheckedDisabled › should be rendered', _renderComponent.default, _.default, _checkedDisabled.default);
|
|
31
34
|
(0, _ava.default)('Atom › AtomInputCheckbox › Checked › should be rendered', _renderComponent.default, _.default, _checked.default);
|
|
32
35
|
(0, _ava.default)('Atom › AtomInputCheckbox › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
33
36
|
(0, _ava.default)('Atom › AtomInputCheckbox › Disabled › should be rendered', _renderComponent.default, _.default, _disabled.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/input-checkbox/test/fixtures.js"],"names":["t","pass","AtomInputCheckbox","propTypes","value","key","not","undefined","renderComponentMacro","fixtureChecked","fixtureDefault","fixtureDisabled","fixtureError","fixtureModified","fixtureRequired"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,wDAAL,EAA+DA,CAAC,IAAI;AAClEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAkBC,SAA1B,EAAqC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACnDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kDAAiDF,GAAI,mEAA9E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,yDAAL,
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/input-checkbox/test/fixtures.js"],"names":["t","pass","AtomInputCheckbox","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCheckedDisabled","fixtureChecked","fixtureDefault","fixtureDisabled","fixtureError","fixtureModified","fixtureRequired"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,wDAAL,EAA+DA,CAAC,IAAI;AAClEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAkBC,SAA1B,EAAqC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACnDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kDAAiDF,GAAI,mEAA9E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,iEAAL,EAAwEG,wBAAxE,EAA8FN,SAA9F,EAAiHO,wBAAjH;AACA,kBAAK,yDAAL,EAAgED,wBAAhE,EAAsFN,SAAtF,EAAyGQ,gBAAzG;AACA,kBAAK,yDAAL,EAAgEF,wBAAhE,EAAsFN,SAAtF,EAAyGS,gBAAzG;AACA,kBAAK,0DAAL,EAAiEH,wBAAjE,EAAuFN,SAAvF,EAA0GU,iBAA1G;AACA,kBAAK,uDAAL,EAA8DJ,wBAA9D,EAAoFN,SAApF,EAAuGW,cAAvG;AACA,kBAAK,0DAAL,EAAiEL,wBAAjE,EAAuFN,SAAvF,EAA0GY,iBAA1G;AACA,kBAAK,0DAAL,EAAiEN,wBAAjE,EAAuFN,SAAvF,EAA0Ga,iBAA1G","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputCheckbox from '..';\nimport fixtureCheckedDisabled from './fixtures/checked-disabled';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureError from './fixtures/error';\nimport fixtureModified from './fixtures/modified';\nimport fixtureRequired from './fixtures/required';\n\ntest('Atom › AtomInputCheckbox > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputCheckbox.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputCheckbox.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputCheckbox › CheckedDisabled › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureCheckedDisabled);\ntest('Atom › AtomInputCheckbox › Checked › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureChecked);\ntest('Atom › AtomInputCheckbox › Default › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureDefault);\ntest('Atom › AtomInputCheckbox › Disabled › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureDisabled);\ntest('Atom › AtomInputCheckbox › Error › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureError);\ntest('Atom › AtomInputCheckbox › Modified › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureModified);\ntest('Atom › AtomInputCheckbox › Required › should be rendered', renderComponentMacro, AtomInputCheckbox, fixtureRequired);\n"],"file":"fixtures.js"}
|
|
@@ -3,17 +3,19 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
14
16
|
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
15
17
|
|
|
16
|
-
var _provider = _interopRequireDefault(require("
|
|
18
|
+
var _provider = _interopRequireDefault(require("../provider"));
|
|
17
19
|
|
|
18
20
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
21
|
|
|
@@ -23,27 +25,31 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
|
-
const Search =
|
|
28
|
+
const Search = props => {
|
|
27
29
|
const {
|
|
28
30
|
value,
|
|
29
31
|
placeholder,
|
|
30
32
|
onChange = _noop2.default,
|
|
33
|
+
onClear = _noop2.default,
|
|
31
34
|
onFocus,
|
|
32
|
-
onBlur
|
|
35
|
+
onBlur,
|
|
36
|
+
theme = 'default'
|
|
33
37
|
} = props;
|
|
34
|
-
const {
|
|
35
|
-
skin
|
|
36
|
-
} = context;
|
|
37
|
-
const dark = (0, _get2.default)('common.dark', skin);
|
|
38
38
|
const handleChange = (0, _react.useMemo)(() => e => onChange(e.target.value), [onChange]);
|
|
39
|
+
const cmStyle = (0, _classnames.default)(_style.default.coorpmanager);
|
|
40
|
+
const isDefaultTheme = theme === 'default';
|
|
39
41
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
-
className: _style.default.wrapperSearch
|
|
42
|
+
className: isDefaultTheme ? _style.default.wrapperSearch : cmStyle
|
|
41
43
|
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
42
|
-
htmlFor: "search"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
className: _style.default.
|
|
46
|
-
})
|
|
44
|
+
htmlFor: "search",
|
|
45
|
+
title: placeholder
|
|
46
|
+
}, !isDefaultTheme ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademySearch1, {
|
|
47
|
+
className: _style.default.searchIcon
|
|
48
|
+
}) : /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademySearch, {
|
|
49
|
+
className: _style.default.searchIcon
|
|
50
|
+
}), !isDefaultTheme ? /*#__PURE__*/_react.default.createElement("span", {
|
|
51
|
+
className: (0, _classnames.default)(_style.default.title, (0, _isEmpty2.default)(value) && _style.default.noValue)
|
|
52
|
+
}, placeholder) : null), /*#__PURE__*/_react.default.createElement("input", {
|
|
47
53
|
"data-name": "search-input",
|
|
48
54
|
className: _style.default.search,
|
|
49
55
|
type: "text",
|
|
@@ -51,11 +57,14 @@ const Search = (props, context) => {
|
|
|
51
57
|
id: "search",
|
|
52
58
|
placeholder: placeholder,
|
|
53
59
|
value: value,
|
|
54
|
-
onChange: _noop2.default,
|
|
55
60
|
onInput: handleChange,
|
|
56
61
|
onFocus: onFocus,
|
|
62
|
+
onChange: _noop2.default,
|
|
57
63
|
onBlur: onBlur
|
|
58
|
-
})
|
|
64
|
+
}), value && !isDefaultTheme ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusClose, {
|
|
65
|
+
onClick: onClear,
|
|
66
|
+
className: _style.default.clearIcon
|
|
67
|
+
}) : null);
|
|
59
68
|
};
|
|
60
69
|
|
|
61
70
|
Search.contextTypes = {
|
|
@@ -65,8 +74,10 @@ Search.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
65
74
|
value: _propTypes.default.string,
|
|
66
75
|
placeholder: _propTypes.default.string.isRequired,
|
|
67
76
|
onChange: _propTypes.default.func,
|
|
77
|
+
onClear: _propTypes.default.func,
|
|
68
78
|
onFocus: _propTypes.default.func,
|
|
69
|
-
onBlur: _propTypes.default.func
|
|
79
|
+
onBlur: _propTypes.default.func,
|
|
80
|
+
theme: _propTypes.default.oneOf(['default', 'coorpmanager'])
|
|
70
81
|
} : {};
|
|
71
82
|
var _default = Search;
|
|
72
83
|
exports.default = _default;
|