linear-react-components-ui 1.0.10-beta.9 → 1.0.10-rc.1
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/.eslintrc.json +1 -0
- package/README.md +19 -12
- package/coverage/clover.xml +6 -0
- package/coverage/coverage-final.json +1 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +101 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +0 -0
- package/lib/alerts/AlertContainer.d.ts +2 -0
- package/lib/alerts/AlertProvider.d.ts +2 -0
- package/lib/alerts/BaseAlert.d.ts +2 -0
- package/lib/alerts/Message.d.ts +2 -0
- package/lib/alerts/Message.js +1 -1
- package/lib/alerts/helpers.d.ts +2 -0
- package/lib/alerts/index.d.ts +2 -0
- package/lib/alerts/types.d.ts +3 -1
- package/lib/alerts/withAlert.d.ts +2 -0
- package/lib/assets/styles/dialog.scss +9 -6
- package/lib/assets/styles/effects.scss +2 -2
- package/lib/assets/styles/radio.scss +52 -8
- package/lib/assets/styles/tooltip.scss +42 -2
- package/lib/buttons/ActivateButton.d.ts +2 -0
- package/lib/buttons/AddButton.d.ts +2 -0
- package/lib/buttons/Button.d.ts +2 -0
- package/lib/buttons/CancelButton.d.ts +2 -0
- package/lib/buttons/DangerButton.d.ts +2 -0
- package/lib/buttons/DefaultButton.d.ts +2 -0
- package/lib/buttons/DefaultButton.js +2 -1
- package/lib/buttons/DestroyButton.d.ts +2 -0
- package/lib/buttons/EditButton.d.ts +2 -0
- package/lib/buttons/InactivateButton.d.ts +2 -0
- package/lib/buttons/InfoButton.d.ts +2 -0
- package/lib/buttons/PrimaryButton.d.ts +2 -0
- package/lib/buttons/RestoreButton.d.ts +2 -0
- package/lib/buttons/SaveButton.d.ts +2 -0
- package/lib/buttons/SuccessButton.d.ts +2 -0
- package/lib/buttons/WarningButton.d.ts +2 -0
- package/lib/buttons/index.d.ts +2 -0
- package/lib/buttons/split_button/index.d.ts +2 -0
- package/lib/buttons/types.d.ts +4 -1
- package/lib/dialog/Alert.d.ts +2 -0
- package/lib/dialog/Custom.d.ts +2 -0
- package/lib/dialog/Custom.js +1 -1
- package/lib/dialog/Error.d.ts +2 -0
- package/lib/dialog/Information.d.ts +2 -0
- package/lib/dialog/Question.d.ts +2 -0
- package/lib/dialog/Warning.d.ts +2 -0
- package/lib/dialog/base/Content.d.ts +2 -0
- package/lib/dialog/base/Footer.d.ts +2 -0
- package/lib/dialog/base/Header.d.ts +2 -0
- package/lib/dialog/base/Header.js +12 -1
- package/lib/dialog/base/index.d.ts +2 -0
- package/lib/dialog/base/index.js +78 -16
- package/lib/dialog/form/index.d.ts +6 -3
- package/lib/dialog/form/index.js +11 -4
- package/lib/dialog/index.d.ts +2 -0
- package/lib/dialog/types.d.ts +8 -3
- package/lib/drawer/Content.d.ts +2 -0
- package/lib/drawer/Drawer.d.ts +2 -0
- package/lib/drawer/Header.d.ts +2 -0
- package/lib/drawer/helpers.d.ts +2 -0
- package/lib/drawer/index.d.ts +2 -0
- package/lib/drawer/types.d.ts +3 -1
- package/lib/dropdown/Popup.js +5 -0
- package/lib/form/FieldArray.js +2 -2
- package/lib/icons/helper.d.ts +4 -0
- package/lib/icons/helper.js +4 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/icons/types.d.ts +3 -1
- package/lib/index.d.ts +3 -1
- package/lib/inputs/date/helpers.d.ts +1 -1
- package/lib/inputs/date/helpers.js +3 -2
- package/lib/inputs/date/index.js +23 -9
- package/lib/inputs/date/types.d.ts +2 -1
- package/lib/inputs/inputHOC.d.ts +2 -0
- package/lib/inputs/mask/helpers.d.ts +2 -0
- package/lib/inputs/mask/imaskHOC.d.ts +2 -0
- package/lib/inputs/mask/imaskHOC.js +1 -1
- package/lib/inputs/multiSelect/Dropdown.js +3 -3
- package/lib/inputs/multiSelect/index.js +10 -9
- package/lib/inputs/multiSelect/types.d.ts +4 -3
- package/lib/inputs/number/BaseNumber.d.ts +2 -0
- package/lib/inputs/number/Currency.d.ts +2 -0
- package/lib/inputs/number/Decimal.d.ts +2 -0
- package/lib/inputs/number/index.d.ts +2 -0
- package/lib/inputs/number/types.d.ts +2 -0
- package/lib/inputs/search/index.d.ts +2 -0
- package/lib/inputs/select/ActionButtons.d.ts +2 -0
- package/lib/inputs/select/Dropdown.d.ts +2 -0
- package/lib/inputs/select/helper.d.ts +2 -0
- package/lib/inputs/select/simple/index.js +30 -10
- package/lib/inputs/select/types.d.ts +1 -1
- package/lib/inputs/types.d.ts +2 -0
- package/lib/internals/types.d.ts +1 -0
- package/lib/internals/withTooltip.js +13 -6
- package/lib/labelMessages/index.d.ts +2 -0
- package/lib/labelMessages/index.js +3 -4
- package/lib/labelMessages/types.d.ts +3 -1
- package/lib/labels/DangerLabel.d.ts +2 -0
- package/lib/labels/DefaultLabel.d.ts +2 -0
- package/lib/labels/InfoLabel.d.ts +2 -0
- package/lib/labels/PrimaryLabel.d.ts +2 -0
- package/lib/labels/SuccessLabel.d.ts +2 -0
- package/lib/labels/WarningLabel.d.ts +2 -0
- package/lib/labels/index.d.ts +2 -0
- package/lib/labels/types.d.ts +3 -1
- package/lib/list/Header.d.ts +2 -0
- package/lib/list/Item.d.ts +2 -0
- package/lib/list/helpers.d.ts +2 -0
- package/lib/list/index.d.ts +2 -0
- package/lib/list/types.d.ts +4 -2
- package/lib/menus/float/MenuItem.d.ts +2 -0
- package/lib/menus/float/helpers.d.ts +2 -0
- package/lib/menus/float/index.d.ts +2 -0
- package/lib/menus/float/types.d.ts +3 -1
- package/lib/menus/index.d.ts +2 -0
- package/lib/menus/sidenav/ExpandMenu.d.ts +2 -0
- package/lib/menus/sidenav/MenuLink.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuGroup.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/NavSubMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/helpers.d.ts +2 -0
- package/lib/menus/sidenav/index.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/index.d.ts +2 -0
- package/lib/menus/sidenav/types.d.ts +4 -2
- package/lib/panel/Content.d.ts +3 -1
- package/lib/panel/DangerPanel.d.ts +3 -1
- package/lib/panel/Default.d.ts +3 -1
- package/lib/panel/Header.d.ts +3 -1
- package/lib/panel/Header.js +3 -4
- package/lib/panel/InfoPanel.d.ts +3 -1
- package/lib/panel/PrimaryPanel.d.ts +3 -1
- package/lib/panel/SuccessPanel.d.ts +3 -1
- package/lib/panel/ToolBar.d.ts +3 -1
- package/lib/panel/WarningPanel.d.ts +3 -1
- package/lib/panel/helpers.d.ts +3 -1
- package/lib/panel/index.d.ts +3 -1
- package/lib/panel/types.d.ts +3 -1
- package/lib/popover/PopoverText.d.ts +2 -0
- package/lib/popover/PopoverTitle.d.ts +2 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +1 -2
- package/lib/popover/types.d.ts +3 -1
- package/lib/radio/index.d.ts +2 -1
- package/lib/radio/index.js +3 -1
- package/lib/radio/types.d.ts +2 -0
- package/lib/tabs/DropdownItems.d.ts +2 -0
- package/lib/tabs/Menu.d.ts +2 -0
- package/lib/tabs/MenuItems.d.ts +2 -0
- package/lib/tabs/Panel.d.ts +2 -0
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/tabHelpers.d.ts +2 -0
- package/lib/tabs/types.d.ts +3 -1
- package/lib/toolbar/ButtonBar.d.ts +2 -0
- package/lib/toolbar/LabelBar.d.ts +2 -0
- package/lib/toolbar/ToolBarGroup.d.ts +2 -0
- package/lib/toolbar/helpers.d.ts +2 -0
- package/lib/toolbar/index.d.ts +2 -0
- package/lib/toolbar/types.d.ts +4 -2
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tooltip/index.js +5 -1
- package/lib/tooltip/types.d.ts +1 -0
- package/lib/treeview/index.js +1 -0
- package/lib/{types-90c43ae1.d.ts → types-c1e2d0c9.d.ts} +2 -1
- package/package.json +6 -3
- package/demo/06c001f4d19c06397d470bb43ff3fe49.png +0 -0
- package/demo/270084ef02ed3bddc3f735fd91ee3cae.png +0 -0
- package/demo/882f8e819d18f5f2dc08d23ebd28a7d5.png +0 -0
- package/demo/bundle.js +0 -2
- package/demo/bundle.js.LICENSE.txt +0 -65
- package/demo/cbc3b4bd6342c551db7afafe26dc458c.jpg +0 -0
- package/demo/edc9476523b940deab91951066981a31.png +0 -0
- package/demo/fb44e7c36db6d95bb85a745d4f060fb2.png +0 -0
- package/demo/fonts/Roboto-Black.woff +0 -0
- package/demo/fonts/Roboto-Black.woff2 +0 -0
- package/demo/fonts/Roboto-Bold.woff +0 -0
- package/demo/fonts/Roboto-Bold.woff2 +0 -0
- package/demo/fonts/Roboto-Light.woff +0 -0
- package/demo/fonts/Roboto-Light.woff2 +0 -0
- package/demo/fonts/Roboto-Medium.woff +0 -0
- package/demo/fonts/Roboto-Medium.woff2 +0 -0
- package/demo/fonts/Roboto-Regular.woff +0 -0
- package/demo/fonts/Roboto-Regular.woff2 +0 -0
- package/demo/fonts/Roboto-Thin.woff +0 -0
- package/demo/fonts/Roboto-Thin.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Black.woff +0 -0
- package/demo/fonts/TitilliumWeb-Black.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Bold.woff +0 -0
- package/demo/fonts/TitilliumWeb-Bold.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-ExtraLight.woff +0 -0
- package/demo/fonts/TitilliumWeb-ExtraLight.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Light.woff +0 -0
- package/demo/fonts/TitilliumWeb-Light.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Regular.woff +0 -0
- package/demo/fonts/TitilliumWeb-Regular.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-SemiBold.woff +0 -0
- package/demo/fonts/TitilliumWeb-SemiBold.woff2 +0 -0
- package/demo/index.html +0 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var addSorting = (function() {
|
|
3
|
+
'use strict';
|
|
4
|
+
var cols,
|
|
5
|
+
currentSort = {
|
|
6
|
+
index: 0,
|
|
7
|
+
desc: false
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// returns the summary table element
|
|
11
|
+
function getTable() {
|
|
12
|
+
return document.querySelector('.coverage-summary');
|
|
13
|
+
}
|
|
14
|
+
// returns the thead element of the summary table
|
|
15
|
+
function getTableHeader() {
|
|
16
|
+
return getTable().querySelector('thead tr');
|
|
17
|
+
}
|
|
18
|
+
// returns the tbody element of the summary table
|
|
19
|
+
function getTableBody() {
|
|
20
|
+
return getTable().querySelector('tbody');
|
|
21
|
+
}
|
|
22
|
+
// returns the th element for nth column
|
|
23
|
+
function getNthColumn(n) {
|
|
24
|
+
return getTableHeader().querySelectorAll('th')[n];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function onFilterInput() {
|
|
28
|
+
const searchValue = document.getElementById('fileSearch').value;
|
|
29
|
+
const rows = document.getElementsByTagName('tbody')[0].children;
|
|
30
|
+
for (let i = 0; i < rows.length; i++) {
|
|
31
|
+
const row = rows[i];
|
|
32
|
+
if (
|
|
33
|
+
row.textContent
|
|
34
|
+
.toLowerCase()
|
|
35
|
+
.includes(searchValue.toLowerCase())
|
|
36
|
+
) {
|
|
37
|
+
row.style.display = '';
|
|
38
|
+
} else {
|
|
39
|
+
row.style.display = 'none';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// loads the search box
|
|
45
|
+
function addSearchBox() {
|
|
46
|
+
var template = document.getElementById('filterTemplate');
|
|
47
|
+
var templateClone = template.content.cloneNode(true);
|
|
48
|
+
templateClone.getElementById('fileSearch').oninput = onFilterInput;
|
|
49
|
+
template.parentElement.appendChild(templateClone);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// loads all columns
|
|
53
|
+
function loadColumns() {
|
|
54
|
+
var colNodes = getTableHeader().querySelectorAll('th'),
|
|
55
|
+
colNode,
|
|
56
|
+
cols = [],
|
|
57
|
+
col,
|
|
58
|
+
i;
|
|
59
|
+
|
|
60
|
+
for (i = 0; i < colNodes.length; i += 1) {
|
|
61
|
+
colNode = colNodes[i];
|
|
62
|
+
col = {
|
|
63
|
+
key: colNode.getAttribute('data-col'),
|
|
64
|
+
sortable: !colNode.getAttribute('data-nosort'),
|
|
65
|
+
type: colNode.getAttribute('data-type') || 'string'
|
|
66
|
+
};
|
|
67
|
+
cols.push(col);
|
|
68
|
+
if (col.sortable) {
|
|
69
|
+
col.defaultDescSort = col.type === 'number';
|
|
70
|
+
colNode.innerHTML =
|
|
71
|
+
colNode.innerHTML + '<span class="sorter"></span>';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return cols;
|
|
75
|
+
}
|
|
76
|
+
// attaches a data attribute to every tr element with an object
|
|
77
|
+
// of data values keyed by column name
|
|
78
|
+
function loadRowData(tableRow) {
|
|
79
|
+
var tableCols = tableRow.querySelectorAll('td'),
|
|
80
|
+
colNode,
|
|
81
|
+
col,
|
|
82
|
+
data = {},
|
|
83
|
+
i,
|
|
84
|
+
val;
|
|
85
|
+
for (i = 0; i < tableCols.length; i += 1) {
|
|
86
|
+
colNode = tableCols[i];
|
|
87
|
+
col = cols[i];
|
|
88
|
+
val = colNode.getAttribute('data-value');
|
|
89
|
+
if (col.type === 'number') {
|
|
90
|
+
val = Number(val);
|
|
91
|
+
}
|
|
92
|
+
data[col.key] = val;
|
|
93
|
+
}
|
|
94
|
+
return data;
|
|
95
|
+
}
|
|
96
|
+
// loads all row data
|
|
97
|
+
function loadData() {
|
|
98
|
+
var rows = getTableBody().querySelectorAll('tr'),
|
|
99
|
+
i;
|
|
100
|
+
|
|
101
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
102
|
+
rows[i].data = loadRowData(rows[i]);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// sorts the table using the data for the ith column
|
|
106
|
+
function sortByIndex(index, desc) {
|
|
107
|
+
var key = cols[index].key,
|
|
108
|
+
sorter = function(a, b) {
|
|
109
|
+
a = a.data[key];
|
|
110
|
+
b = b.data[key];
|
|
111
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
112
|
+
},
|
|
113
|
+
finalSorter = sorter,
|
|
114
|
+
tableBody = document.querySelector('.coverage-summary tbody'),
|
|
115
|
+
rowNodes = tableBody.querySelectorAll('tr'),
|
|
116
|
+
rows = [],
|
|
117
|
+
i;
|
|
118
|
+
|
|
119
|
+
if (desc) {
|
|
120
|
+
finalSorter = function(a, b) {
|
|
121
|
+
return -1 * sorter(a, b);
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
for (i = 0; i < rowNodes.length; i += 1) {
|
|
126
|
+
rows.push(rowNodes[i]);
|
|
127
|
+
tableBody.removeChild(rowNodes[i]);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
rows.sort(finalSorter);
|
|
131
|
+
|
|
132
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
133
|
+
tableBody.appendChild(rows[i]);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// removes sort indicators for current column being sorted
|
|
137
|
+
function removeSortIndicators() {
|
|
138
|
+
var col = getNthColumn(currentSort.index),
|
|
139
|
+
cls = col.className;
|
|
140
|
+
|
|
141
|
+
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
|
142
|
+
col.className = cls;
|
|
143
|
+
}
|
|
144
|
+
// adds sort indicators for current column being sorted
|
|
145
|
+
function addSortIndicators() {
|
|
146
|
+
getNthColumn(currentSort.index).className += currentSort.desc
|
|
147
|
+
? ' sorted-desc'
|
|
148
|
+
: ' sorted';
|
|
149
|
+
}
|
|
150
|
+
// adds event listeners for all sorter widgets
|
|
151
|
+
function enableUI() {
|
|
152
|
+
var i,
|
|
153
|
+
el,
|
|
154
|
+
ithSorter = function ithSorter(i) {
|
|
155
|
+
var col = cols[i];
|
|
156
|
+
|
|
157
|
+
return function() {
|
|
158
|
+
var desc = col.defaultDescSort;
|
|
159
|
+
|
|
160
|
+
if (currentSort.index === i) {
|
|
161
|
+
desc = !currentSort.desc;
|
|
162
|
+
}
|
|
163
|
+
sortByIndex(i, desc);
|
|
164
|
+
removeSortIndicators();
|
|
165
|
+
currentSort.index = i;
|
|
166
|
+
currentSort.desc = desc;
|
|
167
|
+
addSortIndicators();
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
for (i = 0; i < cols.length; i += 1) {
|
|
171
|
+
if (cols[i].sortable) {
|
|
172
|
+
// add the click event handler on the th so users
|
|
173
|
+
// dont have to click on those tiny arrows
|
|
174
|
+
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
|
175
|
+
if (el.addEventListener) {
|
|
176
|
+
el.addEventListener('click', ithSorter(i));
|
|
177
|
+
} else {
|
|
178
|
+
el.attachEvent('onclick', ithSorter(i));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// adds sorting functionality to the UI
|
|
184
|
+
return function() {
|
|
185
|
+
if (!getTable()) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
cols = loadColumns();
|
|
189
|
+
loadData();
|
|
190
|
+
addSearchBox();
|
|
191
|
+
addSortIndicators();
|
|
192
|
+
enableUI();
|
|
193
|
+
};
|
|
194
|
+
})();
|
|
195
|
+
|
|
196
|
+
window.addEventListener('load', addSorting);
|
|
File without changes
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IMessageProps, DefaultMessageConfigType } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PositionAlert.js';
|
|
4
|
+
import '../@types/Icon.js';
|
|
5
|
+
import '../icons/helper.js';
|
|
4
6
|
|
|
5
7
|
declare class AlertContainer {
|
|
6
8
|
pushAlert: (params: IMessageProps) => void;
|
package/lib/alerts/Message.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IMessageProps } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PositionAlert.js';
|
|
4
|
+
import '../@types/Icon.js';
|
|
5
|
+
import '../icons/helper.js';
|
|
4
6
|
|
|
5
7
|
declare const Message: ({ handleClose, message, id, color, icon, iconName, timeout, customClass, closeButton, className, position, }: IMessageProps) => JSX.Element;
|
|
6
8
|
|
package/lib/alerts/Message.js
CHANGED
|
@@ -38,7 +38,7 @@ var Message = function Message(_ref2) {
|
|
|
38
38
|
_ref2$icon = _ref2.icon,
|
|
39
39
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
40
40
|
_ref2$iconName = _ref2.iconName,
|
|
41
|
-
iconName = _ref2$iconName === void 0 ?
|
|
41
|
+
iconName = _ref2$iconName === void 0 ? null : _ref2$iconName,
|
|
42
42
|
_ref2$timeout = _ref2.timeout,
|
|
43
43
|
timeout = _ref2$timeout === void 0 ? 3000 : _ref2$timeout,
|
|
44
44
|
_ref2$customClass = _ref2.customClass,
|
package/lib/alerts/helpers.d.ts
CHANGED
package/lib/alerts/index.d.ts
CHANGED
package/lib/alerts/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { PositionAlert } from '../@types/PositionAlert.js';
|
|
3
|
+
import { IconNames } from '../@types/Icon.js';
|
|
4
|
+
import '../icons/helper.js';
|
|
3
5
|
|
|
4
6
|
type AlertContainerMethods = {
|
|
5
7
|
default: (messageConfig: DefaultMessageConfigType) => void;
|
|
@@ -25,7 +27,7 @@ interface IMessageProps {
|
|
|
25
27
|
color?: string;
|
|
26
28
|
customClass?: string;
|
|
27
29
|
icon?: ReactNode | null;
|
|
28
|
-
iconName?:
|
|
30
|
+
iconName?: IconNames | null;
|
|
29
31
|
timeout?: number;
|
|
30
32
|
}
|
|
31
33
|
interface IBaseAlertProps {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { WithAlertContextProps } from './types.js';
|
|
3
3
|
import '../@types/PositionAlert.js';
|
|
4
|
+
import '../@types/Icon.js';
|
|
5
|
+
import '../icons/helper.js';
|
|
4
6
|
|
|
5
7
|
declare const withAlert: <ComponentProps extends WithAlertContextProps>(WrapperComponent: React__default.ComponentType<ComponentProps>) => (props: ComponentProps) => JSX.Element;
|
|
6
8
|
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
font-family: 'Roboto', sans-serif;
|
|
6
6
|
line-height: 22px;
|
|
7
7
|
font-size: 14px;
|
|
8
|
-
z-index: 99999;
|
|
9
8
|
position: fixed;
|
|
10
9
|
top: 0;
|
|
11
10
|
bottom: 0;
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
background: $default-color;
|
|
30
29
|
padding: 2px;
|
|
31
30
|
border-radius: 6px;
|
|
32
|
-
animation:
|
|
31
|
+
animation: 0.3s ease-out 0s 1 slideInFromTop;
|
|
33
32
|
> .dialog-content {
|
|
34
33
|
height: 100%;
|
|
35
34
|
text-align: left;
|
|
@@ -56,12 +55,18 @@
|
|
|
56
55
|
padding-left: 10px;
|
|
57
56
|
padding-right: 10px;
|
|
58
57
|
padding-top: 3px;
|
|
58
|
+
cursor: grab;
|
|
59
|
+
&:active {
|
|
60
|
+
cursor: grabbing;
|
|
61
|
+
}
|
|
59
62
|
> .left > .icon-component {
|
|
60
63
|
margin-right: 10px;
|
|
61
64
|
}
|
|
62
65
|
> .right {
|
|
63
|
-
|
|
66
|
+
width: 100%;
|
|
64
67
|
margin-left: 2px;
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
65
70
|
&.modal-title {
|
|
66
71
|
color: #4e4c4c;
|
|
67
72
|
font-weight: 600;
|
|
@@ -70,10 +75,9 @@
|
|
|
70
75
|
.close-button {
|
|
71
76
|
color: #777;
|
|
72
77
|
cursor: pointer;
|
|
73
|
-
float: right;
|
|
74
78
|
font-size: 16px;
|
|
75
79
|
text-shadow: 0 1px 0 $default-color;
|
|
76
|
-
margin-
|
|
80
|
+
margin-left: auto;
|
|
77
81
|
}
|
|
78
82
|
}
|
|
79
83
|
.footer {
|
|
@@ -176,5 +180,4 @@
|
|
|
176
180
|
width: 100%;
|
|
177
181
|
top: 0;
|
|
178
182
|
left: 0;
|
|
179
|
-
z-index: 99998;
|
|
180
183
|
}
|
|
@@ -37,14 +37,26 @@ $radio-button-ripple-size: 15px;
|
|
|
37
37
|
left: -9999px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
.radio-component:focus + label:before {
|
|
41
|
+
box-shadow: 0 0 2px 1px $radio-button-checked-color;
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
.radio-component:checked + .description,
|
|
41
45
|
.radio-component:not(:checked) + .description {
|
|
42
46
|
position: relative;
|
|
43
|
-
padding-left:
|
|
47
|
+
padding-left: 1.35rem;
|
|
44
48
|
cursor: pointer;
|
|
45
49
|
line-height: 20px;
|
|
46
50
|
display: inline-block;
|
|
47
|
-
color: $font-color-soft;
|
|
51
|
+
color: $font-color-soft;
|
|
52
|
+
&.-medium {
|
|
53
|
+
padding-left: 1.6rem;
|
|
54
|
+
padding-top: 0.1rem;
|
|
55
|
+
}
|
|
56
|
+
&.-large {
|
|
57
|
+
padding-left: 1.875rem;
|
|
58
|
+
padding-top: 0.2rem;
|
|
59
|
+
}
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
.disabled + .description {
|
|
@@ -57,22 +69,54 @@ $radio-button-ripple-size: 15px;
|
|
|
57
69
|
position: absolute;
|
|
58
70
|
left: 0;
|
|
59
71
|
top: 0;
|
|
60
|
-
width: 20px;
|
|
61
|
-
height: 20px;
|
|
62
72
|
border: 1px solid $component-border-color;
|
|
63
73
|
border-radius: 100%;
|
|
64
74
|
background: $default-color;
|
|
65
75
|
}
|
|
66
76
|
|
|
77
|
+
.-small:before{
|
|
78
|
+
width: 16px;
|
|
79
|
+
height: 16px;
|
|
80
|
+
top: 0.225rem;
|
|
81
|
+
left: 0.265rem;
|
|
82
|
+
}
|
|
83
|
+
.-medium:before{
|
|
84
|
+
width: 20px;
|
|
85
|
+
height: 20px;
|
|
86
|
+
top: 0.245rem;
|
|
87
|
+
left: 0.285rem;
|
|
88
|
+
}
|
|
89
|
+
.-large:before{
|
|
90
|
+
width: 24px;
|
|
91
|
+
height: 24px;
|
|
92
|
+
top: 0.245rem;
|
|
93
|
+
left: 0.285rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.-small:after{
|
|
97
|
+
width: 8px;
|
|
98
|
+
height: 8px;
|
|
99
|
+
top: 0.23rem;
|
|
100
|
+
left: 0.27rem;
|
|
101
|
+
}
|
|
102
|
+
.-medium:after{
|
|
103
|
+
width: 12px;
|
|
104
|
+
height: 12px;
|
|
105
|
+
top: 0.24rem;
|
|
106
|
+
left: 0.26rem;
|
|
107
|
+
}
|
|
108
|
+
.-large:after{
|
|
109
|
+
width: 16px;
|
|
110
|
+
height: 16px;
|
|
111
|
+
top: 0.245rem;
|
|
112
|
+
left: 0.285rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
67
115
|
.radio-component:checked + .description:after,
|
|
68
116
|
.radio-component:not(:checked) + .description:after {
|
|
69
117
|
content: '';
|
|
70
|
-
width: 12px;
|
|
71
|
-
height: 12px;
|
|
72
118
|
background: $radio-button-checked-color;
|
|
73
119
|
position: absolute;
|
|
74
|
-
top: 4px;
|
|
75
|
-
left: 4px;
|
|
76
120
|
border-radius: 100%;
|
|
77
121
|
-webkit-transition: all 0.2s ease;
|
|
78
122
|
transition: all 0.2s ease;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import "colors.scss";
|
|
2
|
+
|
|
1
3
|
.tooltip-component {
|
|
2
4
|
font-family: 'Roboto', sans-serif;
|
|
3
5
|
position: absolute;
|
|
@@ -5,7 +7,7 @@
|
|
|
5
7
|
background: rgba(black, 0.85);
|
|
6
8
|
border-radius: 5px;
|
|
7
9
|
color: white;
|
|
8
|
-
box-shadow: 2px 2px 3px rgba(0
|
|
10
|
+
box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
|
|
9
11
|
text-align: center;
|
|
10
12
|
font-size: 13px;
|
|
11
13
|
z-index: 999999;
|
|
@@ -45,11 +47,49 @@
|
|
|
45
47
|
&.bottom::after {
|
|
46
48
|
content: " ";
|
|
47
49
|
position: absolute;
|
|
48
|
-
bottom: 100%;
|
|
50
|
+
bottom: 100%;
|
|
49
51
|
left: 50%;
|
|
50
52
|
margin-left: -5px;
|
|
51
53
|
border-width: 5px;
|
|
52
54
|
border-style: solid;
|
|
53
55
|
border-color: transparent transparent rgba(black, 0.85) transparent;
|
|
54
56
|
}
|
|
57
|
+
&.tooltip-error {
|
|
58
|
+
background: $danger-hover-color;
|
|
59
|
+
color: $default-color;
|
|
60
|
+
z-index: 99999;
|
|
61
|
+
&::before {
|
|
62
|
+
content: '';
|
|
63
|
+
position: absolute;
|
|
64
|
+
left: 0;
|
|
65
|
+
top: 0;
|
|
66
|
+
right: 0;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
height: 100%;
|
|
69
|
+
width: 100%;
|
|
70
|
+
background: inherit;
|
|
71
|
+
border-radius: inherit;
|
|
72
|
+
z-index: -1;
|
|
73
|
+
opacity: 0.7;
|
|
74
|
+
animation: tooltip-component 2s ease-out infinite;
|
|
75
|
+
}
|
|
76
|
+
@keyframes tooltip-component {
|
|
77
|
+
100% {
|
|
78
|
+
transform: scale(1.05, 1.25);
|
|
79
|
+
opacity: 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
&.left::after {
|
|
83
|
+
border-left-color: $danger-hover-color;
|
|
84
|
+
}
|
|
85
|
+
&.right::after {
|
|
86
|
+
border-right-color: $danger-hover-color;
|
|
87
|
+
}
|
|
88
|
+
&.top::after {
|
|
89
|
+
border-top-color: $danger-hover-color;
|
|
90
|
+
}
|
|
91
|
+
&.bottom::after {
|
|
92
|
+
border-bottom-color: $danger-hover-color;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
55
95
|
}
|
package/lib/buttons/Button.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const CancelButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const DangerButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -12,7 +12,7 @@ var _withTooltip = _interopRequireDefault(require("../internals/withTooltip"));
|
|
|
12
12
|
var _spinner = _interopRequireDefault(require("../spinner"));
|
|
13
13
|
var _withDropdown = _interopRequireDefault(require("../dropdown/withDropdown"));
|
|
14
14
|
var _permissionValidations = require("../permissionValidations");
|
|
15
|
-
var _excluded = ["dropdown", "onClick", "disabled", "iconName", "icon", "targetRef", "tabIndex", "isLoading", "label", "showDropdown", "getDropdownPopup", "isDropdownOpened", "showIconDropdown", "content", "style", "toggleable", "activeIconColor", "iconStyle", "visible", "customClass", "className", "size", "iconAlign", "boxShadow", "transparent", "round", "permissionAttr", "skeletonize", "tooltipPosition", "tooltipWidth", "isFloatMenu", "dropdownAlign", "customClassForDropdown", "buttonRef"];
|
|
15
|
+
var _excluded = ["dropdown", "onClick", "disabled", "iconName", "icon", "targetRef", "tabIndex", "isLoading", "label", "showDropdown", "getDropdownPopup", "isDropdownOpened", "showIconDropdown", "content", "style", "toggleable", "activeIconColor", "iconStyle", "visible", "customClass", "className", "size", "iconAlign", "boxShadow", "transparent", "round", "permissionAttr", "skeletonize", "tooltipPosition", "errorMessage", "tooltipWidth", "isFloatMenu", "dropdownAlign", "customClassForDropdown", "buttonRef"];
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
@@ -60,6 +60,7 @@ var DefaultButton = function DefaultButton(_ref) {
|
|
|
60
60
|
permissionAttr = _ref.permissionAttr,
|
|
61
61
|
skeletonize = _ref.skeletonize,
|
|
62
62
|
tooltipPosition = _ref.tooltipPosition,
|
|
63
|
+
errorMessage = _ref.errorMessage,
|
|
63
64
|
tooltipWidth = _ref.tooltipWidth,
|
|
64
65
|
isFloatMenu = _ref.isFloatMenu,
|
|
65
66
|
dropdownAlign = _ref.dropdownAlign,
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const InfoButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const PrimaryButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const SaveButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|