superdesk-ui-framework 3.0.42 → 3.0.44
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/styles/_accessibility.scss +349 -310
- package/app/styles/_alerts.scss +102 -71
- package/app/styles/_animations.scss +29 -16
- package/app/styles/_avatar.scss +159 -140
- package/app/styles/_badge.scss +11 -5
- package/app/styles/_big-icon-font.scss +21 -9
- package/app/styles/_boxed-list.scss +72 -47
- package/app/styles/_buttons.scss +266 -177
- package/app/styles/_carousel.scss +58 -45
- package/app/styles/_content-divider.scss +28 -2
- package/app/styles/_drag-drop.scss +3 -0
- package/app/styles/_empty-states.scss +21 -13
- package/app/styles/_hamburger.scss +142 -144
- package/app/styles/_helpers.scss +297 -93
- package/app/styles/_icon-font.scss +75 -43
- package/app/styles/_icon-labels.scss +11 -1
- package/app/styles/_labels.scss +27 -14
- package/app/styles/_loaders.scss +2 -1
- package/app/styles/_master-desk.scss +67 -31
- package/app/styles/_mixins.scss +40 -20
- package/app/styles/_modals.scss +112 -56
- package/app/styles/_panel-info.scss +38 -34
- package/app/styles/_popover.scss +0 -1
- package/app/styles/_publisher-styles.scss +132 -122
- package/app/styles/_sd-tag-input.scss +104 -24
- package/app/styles/_simple-list.scss +89 -66
- package/app/styles/_spinner.scss +24 -17
- package/app/styles/_table-list.scss +114 -80
- package/app/styles/_tables.scss +14 -2
- package/app/styles/_tabs-vertical.scss +46 -43
- package/app/styles/_tabs.scss +97 -87
- package/app/styles/_tag-labels.scss +26 -11
- package/app/styles/_thumb-carousel.scss +37 -11
- package/app/styles/_toggle-box.scss +27 -7
- package/app/styles/_toggle-button.scss +5 -1
- package/app/styles/_tooltips.scss +284 -272
- package/app/styles/components/_card-item.scss +268 -192
- package/app/styles/components/_list-item.scss +261 -175
- package/app/styles/components/_sd-circular-progress.scss +109 -79
- package/app/styles/components/_sd-collapse-box.scss +45 -33
- package/app/styles/components/_sd-comment-box.scss +17 -12
- package/app/styles/components/_sd-dropzone.scss +32 -15
- package/app/styles/components/_sd-editor-popup.scss +29 -15
- package/app/styles/components/_sd-grid-item.scss +349 -237
- package/app/styles/components/_sd-loader.scss +1 -2
- package/app/styles/components/_sd-media-carousel.scss +119 -78
- package/app/styles/components/_sd-notification-panel.scss +2 -1
- package/app/styles/components/_sd-pagination.scss +27 -19
- package/app/styles/components/_sd-photo-preview.scss +82 -41
- package/app/styles/components/_sd-searchbar.scss +79 -51
- package/app/styles/components/_sd-toaster.scss +52 -30
- package/app/styles/components/_subnav.scss +230 -135
- package/app/styles/components/_theme-selector.scss +78 -53
- package/app/styles/components/sd-slider.scss +11 -7
- package/app/styles/design-tokens/_design-tokens-general.scss +31 -27
- package/app/styles/design-tokens/_new-colors.scss +3 -1
- package/app/styles/dropdowns/_basic-dropdown.scss +164 -86
- package/app/styles/dropdowns/_input-dropdown.scss +5 -2
- package/app/styles/dropdowns/_navigation_dropdown.scss +18 -4
- package/app/styles/dropdowns/_nested-dropdown.scss +11 -2
- package/app/styles/dropdowns/_other_dropdown.scss +9 -3
- package/app/styles/editor/_editor-buttons.scss +10 -6
- package/app/styles/editor/_editor-themes.scss +401 -350
- package/app/styles/form-elements/_autocomplete.scss +7 -1
- package/app/styles/form-elements/_checkbox.scss +230 -159
- package/app/styles/form-elements/_forms-general.scss +345 -285
- package/app/styles/form-elements/_input-preview.scss +15 -9
- package/app/styles/form-elements/_input-wrap.scss +77 -71
- package/app/styles/form-elements/_inputs.scss +668 -489
- package/app/styles/form-elements/_radio.scss +10 -5
- package/app/styles/form-elements/_switch.scss +27 -16
- package/app/styles/grids/_basic-grid.scss +83 -64
- package/app/styles/grids/_grid-layout.scss +301 -165
- package/app/styles/grids/_layout-grid.scss +85 -59
- package/app/styles/grids/_sd-kanban-list.scss +14 -4
- package/app/styles/interface-elements/_side-panel.scss +279 -200
- package/app/styles/layout/_basic-layout.scss +36 -34
- package/app/styles/layout/_container.scss +38 -31
- package/app/styles/layout/_editor.scss +57 -17
- package/app/styles/layout/_general.scss +81 -67
- package/app/styles/menus/_sd-bottom-tabs.scss +21 -12
- package/app/styles/menus/_sd-content-navigation.scss +20 -16
- package/app/styles/menus/_sd-left-navigation.scss +62 -49
- package/app/styles/menus/_sd-sidebar-menu.scss +365 -323
- package/app/styles/menus/_sd-top-menu.scss +16 -7
- package/app/styles/primereact/_pr-autocomplete.scss +2 -0
- package/app/styles/primereact/_pr-datepicker.scss +13 -2
- package/app/styles/primereact/_pr-dialog.scss +55 -47
- package/app/styles/primereact/_pr-dropdown.scss +27 -22
- package/app/styles/primereact/_pr-general.scss +3 -0
- package/app/styles/primereact/_pr-menu.scss +2 -1
- package/app/styles/primereact/_pr-skeleton.scss +1 -0
- package/app/styles/primereact/_pr-tag-input.scss +1 -0
- package/app/styles/variables/_colors.scss +168 -170
- package/app/styles/variables/_typography.scss +1 -2
- package/app-typescript/components/Form/InputWrapper.tsx +1 -1
- package/app-typescript/components/Menu.tsx +1 -1
- package/app-typescript/components/{TreeSelect.tsx → TreeSelect/TreeSelect.tsx} +228 -257
- package/app-typescript/components/TreeSelect/TreeSelectItem.tsx +84 -0
- package/app-typescript/components/TreeSelect/TreeSelectPill.tsx +53 -0
- package/app-typescript/index.ts +1 -1
- package/dist/examples.bundle.css +18 -16
- package/dist/examples.bundle.js +1029 -918
- package/dist/react/TreeSelect.tsx +1 -1
- package/dist/superdesk-ui.bundle.css +4265 -3552
- package/dist/superdesk-ui.bundle.js +776 -665
- package/dist/vendor.bundle.js +23 -23
- package/examples/pages/react/TreeSelect.tsx +1 -1
- package/package.json +2 -2
- package/react/components/Form/InputWrapper.d.ts +1 -1
- package/react/components/Menu.js +1 -1
- package/react/components/{TreeSelect.d.ts → TreeSelect/TreeSelect.d.ts} +2 -2
- package/react/components/{TreeSelect.js → TreeSelect/TreeSelect.js} +82 -144
- package/react/components/TreeSelect/TreeSelectItem.d.ts +20 -0
- package/react/components/TreeSelect/TreeSelectItem.js +90 -0
- package/react/components/TreeSelect/TreeSelectPill.d.ts +14 -0
- package/react/components/TreeSelect/TreeSelectPill.js +71 -0
- package/react/index.d.ts +1 -1
- package/react/index.js +1 -1
@@ -0,0 +1,20 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import { ITreeNode } from './TreeSelect';
|
3
|
+
export declare function getPrefixedItemId(id: string): string;
|
4
|
+
interface IProps<T> {
|
5
|
+
option: ITreeNode<T>;
|
6
|
+
selectedItem: boolean;
|
7
|
+
allowMultiple?: boolean;
|
8
|
+
handleTree(event: React.MouseEvent<HTMLLIElement, MouseEvent>, option: ITreeNode<T>): any;
|
9
|
+
getLabel(item: T): string;
|
10
|
+
getId(item: T): string;
|
11
|
+
getBackgroundColor?(item: T): string;
|
12
|
+
getBorderColor?(item: T): string;
|
13
|
+
optionTemplate?(item: T): React.ComponentType<T> | JSX.Element;
|
14
|
+
onClick?: () => void;
|
15
|
+
onKeyDown?: () => void;
|
16
|
+
}
|
17
|
+
export declare class TreeSelectItem<T> extends React.Component<IProps<T>> {
|
18
|
+
render(): JSX.Element;
|
19
|
+
}
|
20
|
+
export {};
|
@@ -0,0 +1,90 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
3
|
+
var extendStatics = function (d, b) {
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
|
+
return extendStatics(d, b);
|
8
|
+
};
|
9
|
+
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12
|
+
extendStatics(d, b);
|
13
|
+
function __() { this.constructor = d; }
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
|
+
};
|
16
|
+
})();
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
|
+
if (k2 === undefined) k2 = k;
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
22
|
+
}
|
23
|
+
Object.defineProperty(o, k2, desc);
|
24
|
+
}) : (function(o, m, k, k2) {
|
25
|
+
if (k2 === undefined) k2 = k;
|
26
|
+
o[k2] = m[k];
|
27
|
+
}));
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
30
|
+
}) : function(o, v) {
|
31
|
+
o["default"] = v;
|
32
|
+
});
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
34
|
+
if (mod && mod.__esModule) return mod;
|
35
|
+
var result = {};
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
37
|
+
__setModuleDefault(result, mod);
|
38
|
+
return result;
|
39
|
+
};
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
+
exports.TreeSelectItem = exports.getPrefixedItemId = void 0;
|
42
|
+
var React = __importStar(require("react"));
|
43
|
+
var Icon_1 = require("../Icon");
|
44
|
+
var Label_1 = require("../Label");
|
45
|
+
function getPrefixedItemId(id) {
|
46
|
+
return id + '-focus';
|
47
|
+
}
|
48
|
+
exports.getPrefixedItemId = getPrefixedItemId;
|
49
|
+
var TreeSelectItem = /** @class */ (function (_super) {
|
50
|
+
__extends(TreeSelectItem, _super);
|
51
|
+
function TreeSelectItem() {
|
52
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
53
|
+
}
|
54
|
+
TreeSelectItem.prototype.render = function () {
|
55
|
+
var _this = this;
|
56
|
+
return (React.createElement("li", { className: 'suggestion-item suggestion-item--multi-select', onClick: function (event) {
|
57
|
+
var _a, _b;
|
58
|
+
(_b = (_a = _this.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a);
|
59
|
+
event.preventDefault();
|
60
|
+
event.stopPropagation();
|
61
|
+
_this.props.handleTree(event, _this.props.option);
|
62
|
+
} },
|
63
|
+
React.createElement("button", {
|
64
|
+
// the className is generated in order to focus the element later
|
65
|
+
className: "suggestion-item--btn ".concat(getPrefixedItemId(this.props.getId(this.props.option.value))), onKeyDown: function (event) {
|
66
|
+
var _a, _b;
|
67
|
+
if (event.key === 'Enter' && _this.props.option.children) {
|
68
|
+
(_b = (_a = _this.props).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a);
|
69
|
+
}
|
70
|
+
} },
|
71
|
+
(this.props.getBorderColor && !this.props.allowMultiple)
|
72
|
+
&& React.createElement("div", { className: "item-border", style: {
|
73
|
+
backgroundColor: this.props.getBorderColor(this.props.option.value),
|
74
|
+
} }),
|
75
|
+
React.createElement("span", { className: 'suggestion-item--bgcolor'
|
76
|
+
+ (this.props.selectedItem ? ' suggestion-item--disabled' : ''), style: (this.props.getBackgroundColor && this.props.option.value)
|
77
|
+
? {
|
78
|
+
backgroundColor: this.props.getBackgroundColor(this.props.option.value),
|
79
|
+
color: (0, Label_1.getTextColor)(this.props.getBackgroundColor(this.props.option.value)),
|
80
|
+
}
|
81
|
+
: undefined }, this.props.optionTemplate
|
82
|
+
? this.props.optionTemplate(this.props.option.value)
|
83
|
+
: this.props.getLabel(this.props.option.value)),
|
84
|
+
this.props.option.children
|
85
|
+
&& React.createElement("span", { className: "suggestion-item__icon" },
|
86
|
+
React.createElement(Icon_1.Icon, { name: "chevron-right-thin" })))));
|
87
|
+
};
|
88
|
+
return TreeSelectItem;
|
89
|
+
}(React.Component));
|
90
|
+
exports.TreeSelectItem = TreeSelectItem;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
interface IProps<T> {
|
3
|
+
item: T;
|
4
|
+
readOnly?: boolean;
|
5
|
+
disabled?: boolean;
|
6
|
+
backgroundColor: string | undefined;
|
7
|
+
onRemove(): void;
|
8
|
+
valueTemplate?(item: T, Wrapper: React.ElementType): React.ComponentType<T> | JSX.Element;
|
9
|
+
getBackgroundColor?(item: T): string;
|
10
|
+
}
|
11
|
+
export declare class TreeSelectPill<T> extends React.Component<IProps<T>> {
|
12
|
+
render(): JSX.Element;
|
13
|
+
}
|
14
|
+
export {};
|
@@ -0,0 +1,71 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
3
|
+
var extendStatics = function (d, b) {
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
|
+
return extendStatics(d, b);
|
8
|
+
};
|
9
|
+
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12
|
+
extendStatics(d, b);
|
13
|
+
function __() { this.constructor = d; }
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
|
+
};
|
16
|
+
})();
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
|
+
if (k2 === undefined) k2 = k;
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
22
|
+
}
|
23
|
+
Object.defineProperty(o, k2, desc);
|
24
|
+
}) : (function(o, m, k, k2) {
|
25
|
+
if (k2 === undefined) k2 = k;
|
26
|
+
o[k2] = m[k];
|
27
|
+
}));
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
30
|
+
}) : function(o, v) {
|
31
|
+
o["default"] = v;
|
32
|
+
});
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
34
|
+
if (mod && mod.__esModule) return mod;
|
35
|
+
var result = {};
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
37
|
+
__setModuleDefault(result, mod);
|
38
|
+
return result;
|
39
|
+
};
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
+
exports.TreeSelectPill = void 0;
|
42
|
+
var React = __importStar(require("react"));
|
43
|
+
var Icon_1 = require("../Icon");
|
44
|
+
var Label_1 = require("../Label");
|
45
|
+
var TreeSelectPill = /** @class */ (function (_super) {
|
46
|
+
__extends(TreeSelectPill, _super);
|
47
|
+
function TreeSelectPill() {
|
48
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
49
|
+
}
|
50
|
+
TreeSelectPill.prototype.render = function () {
|
51
|
+
var _this = this;
|
52
|
+
return (React.createElement("li", { className: "tags-input__tag-item tags-input__tag-item--multi-select"
|
53
|
+
+ (this.props.readOnly ? ' tags-input__tag-item--readonly' : ''), onClick: function () { return (!_this.props.readOnly && !_this.props.disabled)
|
54
|
+
&& _this.props.onRemove(); }, style: this.props.valueTemplate
|
55
|
+
? { backgroundColor: this.props.backgroundColor }
|
56
|
+
: this.props.getBackgroundColor
|
57
|
+
&& { backgroundColor: this.props.getBackgroundColor(this.props.item) } },
|
58
|
+
React.createElement("span", { className: "tags-input__helper-box", style: {
|
59
|
+
color: this.props.backgroundColor
|
60
|
+
? (0, Label_1.getTextColor)(this.props.backgroundColor)
|
61
|
+
: this.props.getBackgroundColor
|
62
|
+
&& (0, Label_1.getTextColor)(this.props.getBackgroundColor(this.props.item)),
|
63
|
+
} },
|
64
|
+
this.props.children,
|
65
|
+
!this.props.readOnly
|
66
|
+
&& React.createElement("span", { className: "tags-input__remove-button" },
|
67
|
+
React.createElement(Icon_1.Icon, { name: "close-small" })))));
|
68
|
+
};
|
69
|
+
return TreeSelectPill;
|
70
|
+
}(React.Component));
|
71
|
+
exports.TreeSelectPill = TreeSelectPill;
|
package/react/index.d.ts
CHANGED
@@ -82,7 +82,7 @@ export { Text } from './components/Text/Text';
|
|
82
82
|
export { Time } from './components/Text/Time';
|
83
83
|
export { Heading } from './components/Text/Heading';
|
84
84
|
export { BottomNav } from './components/Navigation/BottomNav';
|
85
|
-
export { TreeSelect } from './components/TreeSelect';
|
85
|
+
export { TreeSelect } from './components/TreeSelect/TreeSelect';
|
86
86
|
export { TableList, TableListItem } from './components/Lists/TableList';
|
87
87
|
export { ContentListItem } from './components/Lists/ContentList';
|
88
88
|
export { MultiSelect } from './components/MultiSelect';
|
package/react/index.js
CHANGED
@@ -201,7 +201,7 @@ var Heading_1 = require("./components/Text/Heading");
|
|
201
201
|
Object.defineProperty(exports, "Heading", { enumerable: true, get: function () { return Heading_1.Heading; } });
|
202
202
|
var BottomNav_1 = require("./components/Navigation/BottomNav");
|
203
203
|
Object.defineProperty(exports, "BottomNav", { enumerable: true, get: function () { return BottomNav_1.BottomNav; } });
|
204
|
-
var TreeSelect_1 = require("./components/TreeSelect");
|
204
|
+
var TreeSelect_1 = require("./components/TreeSelect/TreeSelect");
|
205
205
|
Object.defineProperty(exports, "TreeSelect", { enumerable: true, get: function () { return TreeSelect_1.TreeSelect; } });
|
206
206
|
var TableList_1 = require("./components/Lists/TableList");
|
207
207
|
Object.defineProperty(exports, "TableList", { enumerable: true, get: function () { return TableList_1.TableList; } });
|