superdesk-ui-framework 3.0.1-beta.12 → 3.0.1-beta.13
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/app-typescript/components/Dropdown.tsx +58 -30
- package/dist/examples.bundle.js +1755 -1665
- package/dist/react/Dropdowns.tsx +227 -47
- package/dist/superdesk-ui.bundle.css +1 -1
- package/dist/superdesk-ui.bundle.js +1234 -1297
- package/dist/vendor.bundle.js +14 -14
- package/examples/pages/react/Dropdowns.tsx +227 -47
- package/package.json +1 -1
- package/react/components/Dropdown.js +30 -16
- package/.vscode/settings.json +0 -5
- package/app-typescript/dist/components/Alert.d.ts +0 -16
- package/app-typescript/dist/components/Autocomplete.d.ts +0 -48
- package/app-typescript/dist/components/Avatar.d.ts +0 -33
- package/app-typescript/dist/components/Badge.d.ts +0 -13
- package/app-typescript/dist/components/Button.d.ts +0 -23
- package/app-typescript/dist/components/ButtonGroup.d.ts +0 -12
- package/app-typescript/dist/components/CheckButtonGroup.d.ts +0 -11
- package/app-typescript/dist/components/CheckGroup.d.ts +0 -9
- package/app-typescript/dist/components/Checkbox.d.ts +0 -19
- package/app-typescript/dist/components/CheckboxButton.d.ts +0 -19
- package/app-typescript/dist/components/DatePicker.d.ts +0 -37
- package/app-typescript/dist/components/Divider.d.ts +0 -9
- package/app-typescript/dist/components/DonutChart.d.ts +0 -12
- package/app-typescript/dist/components/Dropdown.d.ts +0 -28
- package/app-typescript/dist/components/DropdownFirst.d.ts +0 -42
- package/app-typescript/dist/components/EmptyState.d.ts +0 -11
- package/app-typescript/dist/components/FormLabel.d.ts +0 -9
- package/app-typescript/dist/components/Genie.d.ts +0 -13
- package/app-typescript/dist/components/GridItem.d.ts +0 -69
- package/app-typescript/dist/components/GridList.d.ts +0 -14
- package/app-typescript/dist/components/HeadingText.d.ts +0 -10
- package/app-typescript/dist/components/HelloWorld.d.ts +0 -8
- package/app-typescript/dist/components/Icon.d.ts +0 -12
- package/app-typescript/dist/components/IconButton.d.ts +0 -12
- package/app-typescript/dist/components/IconLabel.d.ts +0 -11
- package/app-typescript/dist/components/Input.d.ts +0 -24
- package/app-typescript/dist/components/Label.d.ts +0 -15
- package/app-typescript/dist/components/LeftMenu.d.ts +0 -26
- package/app-typescript/dist/components/Loader.d.ts +0 -8
- package/app-typescript/dist/components/NavButton.d.ts +0 -15
- package/app-typescript/dist/components/Popover.d.ts +0 -13
- package/app-typescript/dist/components/PropsList.d.ts +0 -15
- package/app-typescript/dist/components/Radio.d.ts +0 -19
- package/app-typescript/dist/components/RadioButton.d.ts +0 -20
- package/app-typescript/dist/components/Select.d.ts +0 -29
- package/app-typescript/dist/components/SelectWithTemplate.d.ts +0 -32
- package/app-typescript/dist/components/SlidingToolbar.d.ts +0 -8
- package/app-typescript/dist/components/StrechBar.d.ts +0 -4
- package/app-typescript/dist/components/SubNav.d.ts +0 -10
- package/app-typescript/dist/components/Switch.d.ts +0 -12
- package/app-typescript/dist/components/TabCustom.d.ts +0 -25
- package/app-typescript/dist/components/TabList.d.ts +0 -22
- package/app-typescript/dist/components/Tag.d.ts +0 -9
- package/app-typescript/dist/components/TagInput.d.ts +0 -7
- package/app-typescript/dist/components/TagInputTest.d.ts +0 -18
- package/app-typescript/dist/components/TimePicker.d.ts +0 -11
- package/app-typescript/dist/components/Tooltip.d.ts +0 -11
- package/app-typescript/dist/components/_Positioner.d.ts +0 -27
- package/app-typescript/dist/index.d.ts +0 -56
- package/yarn-error.log +0 -111
package/dist/vendor.bundle.js
CHANGED
@@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
70
70
|
/******/ __webpack_require__.p = "";
|
71
71
|
/******/
|
72
72
|
/******/ // Load entry module and return exports
|
73
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
73
|
+
/******/ return __webpack_require__(__webpack_require__.s = 529);
|
74
74
|
/******/ })
|
75
75
|
/************************************************************************/
|
76
76
|
/******/ ({
|
@@ -28246,7 +28246,7 @@ module.exports = function(module) {
|
|
28246
28246
|
|
28247
28247
|
/***/ }),
|
28248
28248
|
|
28249
|
-
/***/
|
28249
|
+
/***/ 529:
|
28250
28250
|
/***/ (function(module, exports, __webpack_require__) {
|
28251
28251
|
|
28252
28252
|
"use strict";
|
@@ -28256,11 +28256,11 @@ __webpack_require__(33);
|
|
28256
28256
|
|
28257
28257
|
__webpack_require__(41);
|
28258
28258
|
|
28259
|
-
__webpack_require__(
|
28259
|
+
__webpack_require__(530);
|
28260
28260
|
|
28261
|
-
__webpack_require__(
|
28261
|
+
__webpack_require__(532);
|
28262
28262
|
|
28263
|
-
__webpack_require__(
|
28263
|
+
__webpack_require__(534);
|
28264
28264
|
|
28265
28265
|
__webpack_require__(0);
|
28266
28266
|
|
@@ -28268,7 +28268,7 @@ __webpack_require__(9);
|
|
28268
28268
|
|
28269
28269
|
/***/ }),
|
28270
28270
|
|
28271
|
-
/***/
|
28271
|
+
/***/ 530:
|
28272
28272
|
/***/ (function(module, exports, __webpack_require__) {
|
28273
28273
|
|
28274
28274
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
@@ -28292,7 +28292,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
28292
28292
|
if ( true ) {
|
28293
28293
|
|
28294
28294
|
// AMD. Register as an anonymous module.
|
28295
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(41), __webpack_require__(
|
28295
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(41), __webpack_require__(531) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
28296
28296
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
28297
28297
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
28298
28298
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
@@ -29030,7 +29030,7 @@ return $.widget;
|
|
29030
29030
|
|
29031
29031
|
/***/ }),
|
29032
29032
|
|
29033
|
-
/***/
|
29033
|
+
/***/ 531:
|
29034
29034
|
/***/ (function(module, exports, __webpack_require__) {
|
29035
29035
|
|
29036
29036
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;( function( factory ) {
|
@@ -29060,16 +29060,16 @@ return $.ui.version = "1.13.0";
|
|
29060
29060
|
|
29061
29061
|
/***/ }),
|
29062
29062
|
|
29063
|
-
/***/
|
29063
|
+
/***/ 532:
|
29064
29064
|
/***/ (function(module, exports, __webpack_require__) {
|
29065
29065
|
|
29066
|
-
__webpack_require__(
|
29066
|
+
__webpack_require__(533);
|
29067
29067
|
module.exports = angular;
|
29068
29068
|
|
29069
29069
|
|
29070
29070
|
/***/ }),
|
29071
29071
|
|
29072
|
-
/***/
|
29072
|
+
/***/ 533:
|
29073
29073
|
/***/ (function(module, exports, __webpack_require__) {
|
29074
29074
|
|
29075
29075
|
/* WEBPACK VAR INJECTION */(function(__webpack_provided_window_dot_jQuery) {/**
|
@@ -65676,16 +65676,16 @@ $provide.value("$locale", {
|
|
65676
65676
|
|
65677
65677
|
/***/ }),
|
65678
65678
|
|
65679
|
-
/***/
|
65679
|
+
/***/ 534:
|
65680
65680
|
/***/ (function(module, exports, __webpack_require__) {
|
65681
65681
|
|
65682
|
-
__webpack_require__(
|
65682
|
+
__webpack_require__(535);
|
65683
65683
|
module.exports = 'ngAnimate';
|
65684
65684
|
|
65685
65685
|
|
65686
65686
|
/***/ }),
|
65687
65687
|
|
65688
|
-
/***/
|
65688
|
+
/***/ 535:
|
65689
65689
|
/***/ (function(module, exports) {
|
65690
65690
|
|
65691
65691
|
/**
|
@@ -67,27 +67,112 @@ export default class DropdownDoc extends React.Component {
|
|
67
67
|
<p className='docs-page__paragraph'>Add prop value <code>append = true</code> to the dropdown element to append to the inner dropdown menu to the body. This is useful when the dropdown button is inside a div with overflow: hidden, and the menu would otherwise be hidden.</p>
|
68
68
|
<Markup.ReactMarkup>
|
69
69
|
<Markup.ReactMarkupPreview>
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
'
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
70
|
+
<Dropdown
|
71
|
+
header={[
|
72
|
+
{
|
73
|
+
type: 'group',
|
74
|
+
label: 'Create new',
|
75
|
+
items: [
|
76
|
+
{
|
77
|
+
type: 'submenu',
|
78
|
+
label: 'Rundown',
|
79
|
+
icon: 'plus-sign',
|
80
|
+
items: [
|
81
|
+
{
|
82
|
+
type: 'submenu',
|
83
|
+
label: 'Show 1',
|
84
|
+
icon: 'plus-sign',
|
85
|
+
items: [
|
86
|
+
|
87
|
+
],
|
88
|
+
},
|
89
|
+
{
|
90
|
+
type: 'submenu',
|
91
|
+
label: 'Show 2',
|
92
|
+
icon: 'plus-sign',
|
93
|
+
items: [
|
94
|
+
|
95
|
+
],
|
96
|
+
},
|
97
|
+
],
|
98
|
+
},
|
99
|
+
],
|
100
|
+
},
|
101
|
+
]}
|
102
|
+
items={[
|
103
|
+
{
|
104
|
+
type: 'group',
|
105
|
+
label: 'Create new',
|
106
|
+
items: [
|
107
|
+
{
|
108
|
+
type: 'submenu',
|
109
|
+
label: 'Rundown',
|
110
|
+
icon: 'plus-sign',
|
111
|
+
items: [
|
112
|
+
{
|
113
|
+
type: 'submenu',
|
114
|
+
label: 'Show 1',
|
115
|
+
icon: 'plus-sign',
|
116
|
+
items: [
|
117
|
+
|
118
|
+
],
|
119
|
+
},
|
120
|
+
{
|
121
|
+
type: 'submenu',
|
122
|
+
label: 'Show 2',
|
123
|
+
icon: 'plus-sign',
|
124
|
+
items: [
|
125
|
+
|
126
|
+
],
|
127
|
+
},
|
128
|
+
],
|
129
|
+
},
|
130
|
+
],
|
131
|
+
},
|
132
|
+
]}
|
133
|
+
footer={[
|
134
|
+
{
|
135
|
+
type: 'group',
|
136
|
+
items: [
|
137
|
+
{
|
138
|
+
icon: 'rundown',
|
139
|
+
label: 'Create new Show',
|
140
|
+
onSelect: () => false,
|
141
|
+
},
|
142
|
+
],
|
143
|
+
},
|
144
|
+
{
|
145
|
+
type: 'group',
|
146
|
+
label: 'Create new',
|
147
|
+
items: [
|
148
|
+
{
|
149
|
+
type: 'submenu',
|
150
|
+
label: 'Rundown',
|
151
|
+
icon: 'plus-sign',
|
152
|
+
items: [
|
153
|
+
{
|
154
|
+
type: 'submenu',
|
155
|
+
label: 'Show 1',
|
156
|
+
icon: 'plus-sign',
|
157
|
+
items: [
|
158
|
+
|
159
|
+
],
|
160
|
+
},
|
161
|
+
{
|
162
|
+
type: 'submenu',
|
163
|
+
label: 'Show 2',
|
164
|
+
icon: 'plus-sign',
|
165
|
+
items: [
|
166
|
+
|
167
|
+
],
|
168
|
+
},
|
169
|
+
],
|
170
|
+
},
|
171
|
+
],
|
172
|
+
},
|
173
|
+
]}
|
174
|
+
>
|
175
|
+
</Dropdown>
|
91
176
|
</Markup.ReactMarkupPreview>
|
92
177
|
<Markup.ReactMarkupCode>{`
|
93
178
|
<Dropdown
|
@@ -207,8 +292,8 @@ export default class DropdownDoc extends React.Component {
|
|
207
292
|
<SubNav zIndex={1} color='darker'>
|
208
293
|
<h3 className="subnav__page-title">Subnav title</h3>
|
209
294
|
<Dropdown
|
210
|
-
align='right'
|
211
|
-
|
295
|
+
//align='right'
|
296
|
+
header={[
|
212
297
|
{
|
213
298
|
type: 'group', label: 'actions', items: [
|
214
299
|
'divider',
|
@@ -225,7 +310,39 @@ export default class DropdownDoc extends React.Component {
|
|
225
310
|
{ label: 'Action 3', onSelect: () => 1 },
|
226
311
|
{ label: 'Action 4', onSelect: () => 1 },
|
227
312
|
]
|
228
|
-
}
|
313
|
+
}
|
314
|
+
]}
|
315
|
+
items={[
|
316
|
+
// {
|
317
|
+
// type: 'group', label: 'actions', items: [
|
318
|
+
// 'divider',
|
319
|
+
// { label: 'Edit', icon: 'pencil', onSelect: () => 1 },
|
320
|
+
// { label: 'Copy', icon: 'copy', onSelect: () => 1 },
|
321
|
+
// { label: 'Delete', icon: 'trash', onSelect: () => 1 },
|
322
|
+
// 'divider',
|
323
|
+
// ]
|
324
|
+
// },
|
325
|
+
// {
|
326
|
+
// type: 'submenu', label: 'Second level actions', icon: 'star', items: [
|
327
|
+
// { label: 'Action 1', onSelect: () => 1 },
|
328
|
+
// { label: 'Action 2', onSelect: () => 1 },
|
329
|
+
// { label: 'Action 3', onSelect: () => 1 },
|
330
|
+
// { label: 'Action 4', onSelect: () => 1 },
|
331
|
+
// ]
|
332
|
+
// }
|
333
|
+
]}
|
334
|
+
footer={[
|
335
|
+
|
336
|
+
{
|
337
|
+
type: 'submenu', label: 'Second level actions', icon: 'star', items: [
|
338
|
+
{ label: 'Action 1', onSelect: () => 1 },
|
339
|
+
{ label: 'Action 2', onSelect: () => 1 },
|
340
|
+
{ label: 'Action 3', onSelect: () => 1 },
|
341
|
+
{ label: 'Action 4', onSelect: () => 1 },
|
342
|
+
]
|
343
|
+
}
|
344
|
+
]}
|
345
|
+
>
|
229
346
|
<button className='sd-navbtn'>
|
230
347
|
<i className="icon-dots-vertical"></i>
|
231
348
|
</button>
|
@@ -270,42 +387,105 @@ export default class DropdownDoc extends React.Component {
|
|
270
387
|
<SubNav zIndex={1} color='darker'>
|
271
388
|
<h3 className="subnav__page-title">Subnav title</h3>
|
272
389
|
<Dropdown
|
273
|
-
|
390
|
+
append={true}
|
274
391
|
header={[
|
275
392
|
{
|
276
|
-
type: 'group',
|
277
|
-
|
278
|
-
|
279
|
-
|
393
|
+
type: 'group',
|
394
|
+
label: 'Create new',
|
395
|
+
items: [
|
396
|
+
{
|
397
|
+
type: 'submenu',
|
398
|
+
label: 'Rundown',
|
399
|
+
icon: 'plus-sign',
|
400
|
+
items: [
|
401
|
+
{
|
402
|
+
type: 'submenu',
|
403
|
+
label: 'Show 1',
|
404
|
+
icon: 'plus-sign',
|
405
|
+
items: [
|
406
|
+
|
407
|
+
],
|
408
|
+
},
|
409
|
+
{
|
410
|
+
type: 'submenu',
|
411
|
+
label: 'Show 2',
|
412
|
+
icon: 'plus-sign',
|
413
|
+
items: [
|
414
|
+
|
415
|
+
],
|
416
|
+
},
|
417
|
+
],
|
418
|
+
},
|
419
|
+
],
|
280
420
|
},
|
281
421
|
]}
|
282
422
|
items={[
|
283
423
|
{
|
284
424
|
type: 'group', label: 'body actions', items: [
|
285
|
-
{
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
425
|
+
{
|
426
|
+
type: 'group',
|
427
|
+
label: 'Create new',
|
428
|
+
items: [
|
429
|
+
{
|
430
|
+
type: 'submenu',
|
431
|
+
label: 'Rundown',
|
432
|
+
icon: 'plus-sign',
|
433
|
+
items: [
|
434
|
+
{
|
435
|
+
type: 'submenu',
|
436
|
+
label: 'Show 1',
|
437
|
+
icon: 'plus-sign',
|
438
|
+
items: [
|
439
|
+
|
440
|
+
],
|
441
|
+
},
|
442
|
+
{
|
443
|
+
type: 'submenu',
|
444
|
+
label: 'Show 2',
|
445
|
+
icon: 'plus-sign',
|
446
|
+
items: [
|
447
|
+
|
448
|
+
],
|
449
|
+
},
|
450
|
+
],
|
451
|
+
},
|
452
|
+
],
|
453
|
+
},
|
298
454
|
]
|
299
455
|
},
|
300
456
|
]}
|
301
457
|
footer={[
|
302
458
|
{
|
303
|
-
type: 'group',
|
304
|
-
|
305
|
-
|
306
|
-
|
459
|
+
type: 'group',
|
460
|
+
label: 'Create new',
|
461
|
+
items: [
|
462
|
+
{
|
463
|
+
type: 'submenu',
|
464
|
+
label: 'Rundown',
|
465
|
+
icon: 'plus-sign',
|
466
|
+
items: [
|
467
|
+
{
|
468
|
+
type: 'submenu',
|
469
|
+
label: 'Show 1',
|
470
|
+
icon: 'plus-sign',
|
471
|
+
items: [
|
472
|
+
|
473
|
+
],
|
474
|
+
},
|
475
|
+
{
|
476
|
+
type: 'submenu',
|
477
|
+
label: 'Show 2',
|
478
|
+
icon: 'plus-sign',
|
479
|
+
items: [
|
480
|
+
|
481
|
+
],
|
482
|
+
},
|
483
|
+
],
|
484
|
+
},
|
485
|
+
],
|
307
486
|
},
|
308
|
-
]}
|
487
|
+
]}
|
488
|
+
>
|
309
489
|
<button className='sd-navbtn'>
|
310
490
|
<i className="icon-dots-vertical"></i>
|
311
491
|
</button>
|
package/package.json
CHANGED
@@ -31,9 +31,7 @@ var Dropdown = function (_a) {
|
|
31
31
|
var menuID = (0, react_id_generator_1.useId)()[0];
|
32
32
|
var DROPDOWN_ID = "react-placeholder";
|
33
33
|
var ref = React.useRef(null);
|
34
|
-
var refSubMenu = React.useRef(null);
|
35
34
|
var buttonRef = React.useRef(null);
|
36
|
-
var refButtonSubMenu = React.useRef(null);
|
37
35
|
var headerElements = header === null || header === void 0 ? void 0 : header.map(function (el, index) {
|
38
36
|
return each(el, index);
|
39
37
|
});
|
@@ -152,20 +150,7 @@ var Dropdown = function (_a) {
|
|
152
150
|
item['items'].forEach(function (el, key) {
|
153
151
|
submenuItems_1.push(each(el, key));
|
154
152
|
});
|
155
|
-
return (React.createElement(
|
156
|
-
React.createElement("div", { className: 'dropdown' },
|
157
|
-
React.createElement("button", { ref: refButtonSubMenu, className: 'dropdown__toggle dropdown-toggle', "aria-haspopup": "menu", tabIndex: 0, onMouseOver: function () {
|
158
|
-
var subMenuRef = refSubMenu.current;
|
159
|
-
var subToggleRef = refButtonSubMenu.current;
|
160
|
-
if (subMenuRef && subToggleRef) {
|
161
|
-
(0, core_1.createPopper)(subToggleRef, subMenuRef, {
|
162
|
-
placement: 'right-start',
|
163
|
-
});
|
164
|
-
}
|
165
|
-
}, onClick: item['onSelect'] },
|
166
|
-
item['icon'] ? React.createElement("i", { className: 'icon-' + item['icon'] }) : null,
|
167
|
-
item['label']),
|
168
|
-
React.createElement("ul", { ref: refSubMenu, role: 'menu', className: 'dropdown__menu' }, submenuItems_1))));
|
153
|
+
return (React.createElement(DropdownItemWithSubmenu, { key: index, item: item, subMenuItems: submenuItems_1 }));
|
169
154
|
}
|
170
155
|
else if (item['type'] === 'group') {
|
171
156
|
var groupItems_1 = [];
|
@@ -234,3 +219,32 @@ var DropdownItem = function (_a) {
|
|
234
219
|
React.createElement("i", { className: icon ? ('icon-' + icon) : '' }),
|
235
220
|
label)));
|
236
221
|
};
|
222
|
+
var DropdownItemWithSubmenu = function (_a) {
|
223
|
+
var index = _a.index, item = _a.item, subMenuItems = _a.subMenuItems;
|
224
|
+
var _b = React.useState(undefined), open = _b[0], setOpen = _b[1];
|
225
|
+
var refButtonSubMenu = React.useRef(null);
|
226
|
+
var refSubMenu = React.useRef(null);
|
227
|
+
React.useEffect(function () {
|
228
|
+
var subMenuRef = refSubMenu.current;
|
229
|
+
var subToggleRef = refButtonSubMenu.current;
|
230
|
+
if (open === true) {
|
231
|
+
document.body.appendChild(subMenuRef);
|
232
|
+
subMenuRef.style.display = 'block';
|
233
|
+
}
|
234
|
+
else if (open === false) {
|
235
|
+
document.body.removeChild(subMenuRef);
|
236
|
+
subMenuRef.style.display = 'none';
|
237
|
+
}
|
238
|
+
if (subMenuRef && subToggleRef) {
|
239
|
+
(0, core_1.createPopper)(subToggleRef, subMenuRef, {
|
240
|
+
placement: 'right-start',
|
241
|
+
});
|
242
|
+
}
|
243
|
+
}, [open]);
|
244
|
+
return (React.createElement("li", { key: index, ref: refButtonSubMenu },
|
245
|
+
React.createElement("div", { className: 'dropdown', onMouseLeave: function () { return setOpen(false); } },
|
246
|
+
React.createElement("button", { className: 'dropdown__toggle dropdown-toggle', "aria-haspopup": "menu", tabIndex: 0, onMouseOver: function () { return setOpen(true); }, onClick: item['onSelect'] },
|
247
|
+
item['icon'] ? React.createElement("i", { className: 'icon-' + item['icon'] }) : null,
|
248
|
+
item['label']),
|
249
|
+
React.createElement("ul", { role: 'menu', ref: refSubMenu, style: { display: 'none' }, className: 'dropdown__menu' }, subMenuItems))));
|
250
|
+
};
|
package/.vscode/settings.json
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
type?: 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
|
4
|
-
style?: 'filled' | 'hollow';
|
5
|
-
size?: 'normal' | 'small';
|
6
|
-
restoreIcon?: 'info' | 'help';
|
7
|
-
}
|
8
|
-
interface IState {
|
9
|
-
open: boolean;
|
10
|
-
}
|
11
|
-
export declare class Alert extends React.PureComponent<IProps, IState> {
|
12
|
-
constructor(props: IProps);
|
13
|
-
onToggle(): void;
|
14
|
-
render(): JSX.Element;
|
15
|
-
}
|
16
|
-
export {};
|
@@ -1,48 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
items: Array<any>;
|
4
|
-
keyValue?: string;
|
5
|
-
minLength?: number;
|
6
|
-
value?: string | object;
|
7
|
-
label?: string;
|
8
|
-
placeholder?: string;
|
9
|
-
info?: string;
|
10
|
-
error?: string;
|
11
|
-
required?: boolean;
|
12
|
-
disabled?: boolean;
|
13
|
-
invalid?: boolean;
|
14
|
-
inlineLabel?: boolean;
|
15
|
-
isSearchField?: boolean;
|
16
|
-
listItemTemplate?(value: any): any;
|
17
|
-
search?(searhString: string, callback: (result: Array<any>) => void): {
|
18
|
-
cancel: () => void;
|
19
|
-
};
|
20
|
-
onChange(newValue: string): void;
|
21
|
-
onSelect?(suggestion: string): void;
|
22
|
-
}
|
23
|
-
interface IState {
|
24
|
-
selectedItem: any;
|
25
|
-
filteredItems: any;
|
26
|
-
invalid: boolean;
|
27
|
-
focused: boolean;
|
28
|
-
}
|
29
|
-
export declare class Autocomplete extends React.Component<IProps, IState> {
|
30
|
-
latestCall?: {
|
31
|
-
cancel: () => void;
|
32
|
-
};
|
33
|
-
constructor(props: IProps);
|
34
|
-
htmlId: string;
|
35
|
-
search(term: string): void;
|
36
|
-
searchItem(event: any): void;
|
37
|
-
handleChange(event: {
|
38
|
-
originalEvent: Event;
|
39
|
-
value: any;
|
40
|
-
}): void;
|
41
|
-
handleSelect(event: {
|
42
|
-
originalEvent: Event;
|
43
|
-
value: any;
|
44
|
-
}): void;
|
45
|
-
handleInputClear(): void;
|
46
|
-
render(): JSX.Element;
|
47
|
-
}
|
48
|
-
export {};
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IBase {
|
3
|
-
tooltipText?: string;
|
4
|
-
}
|
5
|
-
interface IImageAvatar extends IBase {
|
6
|
-
imageUrl?: string;
|
7
|
-
}
|
8
|
-
interface ITextAvatar extends IBase {
|
9
|
-
text: string;
|
10
|
-
}
|
11
|
-
export declare class AvatarContentText extends React.PureComponent<ITextAvatar> {
|
12
|
-
render(): JSX.Element;
|
13
|
-
}
|
14
|
-
export declare class AvatarContentImage extends React.PureComponent<IImageAvatar> {
|
15
|
-
render(): JSX.Element;
|
16
|
-
}
|
17
|
-
interface IPropsAvatarWrapper {
|
18
|
-
size?: 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';
|
19
|
-
statusIndicator?: {
|
20
|
-
status: 'online' | 'offline';
|
21
|
-
tooltipText?: string;
|
22
|
-
};
|
23
|
-
administratorIndicator?: {
|
24
|
-
enabled: boolean;
|
25
|
-
tooltipText?: string;
|
26
|
-
};
|
27
|
-
children: React.ReactNode;
|
28
|
-
'data-test-id'?: string;
|
29
|
-
}
|
30
|
-
export declare class AvatarWrapper extends React.PureComponent<IPropsAvatarWrapper> {
|
31
|
-
render(): JSX.Element;
|
32
|
-
}
|
33
|
-
export {};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
text?: string;
|
4
|
-
type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'light';
|
5
|
-
color?: string;
|
6
|
-
shape?: 'round' | 'square';
|
7
|
-
children?: React.ReactNode;
|
8
|
-
'data-test-id'?: string;
|
9
|
-
}
|
10
|
-
export declare class Badge extends React.PureComponent<IProps> {
|
11
|
-
render(): JSX.Element;
|
12
|
-
}
|
13
|
-
export {};
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IButtonBase {
|
3
|
-
id?: string;
|
4
|
-
theme?: 'light' | 'dark';
|
5
|
-
type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
|
6
|
-
size?: 'small' | 'normal' | 'large';
|
7
|
-
children?: never;
|
8
|
-
icon?: string;
|
9
|
-
disabled?: boolean;
|
10
|
-
iconOnly?: boolean;
|
11
|
-
onClick(): void;
|
12
|
-
'data-test-id'?: string;
|
13
|
-
}
|
14
|
-
interface IPropsButton extends IButtonBase {
|
15
|
-
text: string;
|
16
|
-
expand?: boolean;
|
17
|
-
style?: 'filled' | 'hollow' | 'text-only';
|
18
|
-
shape?: 'square' | 'round';
|
19
|
-
}
|
20
|
-
export declare class Button extends React.PureComponent<IPropsButton> {
|
21
|
-
render(): JSX.Element;
|
22
|
-
}
|
23
|
-
export {};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
orientation?: 'horizontal' | 'vertical';
|
4
|
-
spaces?: 'comfort' | 'compact';
|
5
|
-
align?: 'left' | 'right' | 'center' | 'inline';
|
6
|
-
padded?: boolean;
|
7
|
-
children: React.ReactNode;
|
8
|
-
}
|
9
|
-
export declare class ButtonGroup extends React.PureComponent<IProps> {
|
10
|
-
render(): JSX.Element;
|
11
|
-
}
|
12
|
-
export {};
|