superdesk-ui-framework 3.0.1-beta.2 → 3.0.1-beta.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/.vscode/settings.json +5 -0
- package/app/img/SD-logo.svg +52 -0
- package/app/styles/_accessibility.scss +1 -0
- package/app/styles/_big-icon-font.scss +3 -0
- package/app/styles/_boxed-list.scss +3 -0
- package/app/styles/_hamburger.scss +160 -0
- package/app/styles/_helpers.scss +11 -4
- package/app/styles/_icon-font.scss +3 -0
- package/app/styles/app.scss +3 -0
- package/app/styles/components/_sd-notification-panel.scss +48 -0
- package/app/styles/design-tokens/_design-tokens-general.scss +2 -5
- package/app/styles/design-tokens/_new-colors.scss +5 -0
- package/app/styles/form-elements/_inputs.scss +280 -63
- package/app/styles/grids/_grid-layout.scss +119 -39
- package/app/styles/menus/_sd-bottom-tabs.scss +70 -0
- package/app/styles/menus/_sd-left-navigation.scss +24 -1
- package/app/styles/menus/_sd-sidebar-menu.scss +10 -14
- package/app/styles/menus/_sd-top-menu.scss +19 -5
- package/app/styles/primereact/_pr-dropdown.scss +0 -2
- package/app-typescript/components/DatePicker.tsx +67 -20
- package/app-typescript/components/DonutChart.tsx +1 -1
- package/app-typescript/components/Icon.tsx +1 -1
- package/app-typescript/components/IconButton.tsx +5 -1
- package/app-typescript/components/Input.tsx +17 -3
- package/app-typescript/components/Layouts/BottomBarAction.tsx +35 -0
- package/app-typescript/components/Layouts/CoreLayout.tsx +62 -0
- package/app-typescript/components/Layouts/CoreLayoutContainer.tsx +16 -0
- package/app-typescript/components/Layouts/CoreLayoutFooter.tsx +15 -0
- package/app-typescript/components/Layouts/CoreLayoutMain.tsx +16 -0
- package/app-typescript/components/Layouts/CoreLayoutOverlay.tsx +15 -0
- package/app-typescript/components/Layouts/CoreLayoutSlideInMenu.tsx +24 -0
- package/app-typescript/components/Layouts/CoreLayoutTopMenu.tsx +35 -0
- package/app-typescript/components/Layouts/HamburgerButton.tsx +41 -0
- package/app-typescript/components/Layouts/Layout.tsx +1 -1
- package/app-typescript/components/Layouts/MainMenu.tsx +101 -0
- package/app-typescript/components/Layouts/NotificationPanel.tsx +109 -0
- package/app-typescript/components/Layouts/index.tsx +12 -0
- package/app-typescript/components/LeftMenu.tsx +6 -0
- package/app-typescript/components/Lists/BoxedList.tsx +36 -4
- package/app-typescript/components/Menu.tsx +31 -7
- package/app-typescript/components/Modal.tsx +5 -2
- package/app-typescript/components/MultiSelect.tsx +65 -22
- package/app-typescript/components/NavButton.tsx +4 -0
- package/app-typescript/components/Navigation/BottomNav.tsx +82 -0
- package/app-typescript/components/Select.tsx +8 -0
- package/app-typescript/components/SelectGrid.tsx +1 -1
- package/app-typescript/components/Skeleton.tsx +1 -1
- package/app-typescript/components/Text/Time.tsx +34 -0
- package/app-typescript/components/Togglebox.tsx +1 -1
- package/app-typescript/components/Tooltip.tsx +7 -5
- package/app-typescript/components/WithSizeObserver.tsx +88 -0
- package/app-typescript/dist/components/Alert.d.ts +16 -0
- package/app-typescript/dist/components/Autocomplete.d.ts +48 -0
- package/app-typescript/dist/components/Avatar.d.ts +33 -0
- package/app-typescript/dist/components/Badge.d.ts +13 -0
- package/app-typescript/dist/components/Button.d.ts +23 -0
- package/app-typescript/dist/components/ButtonGroup.d.ts +12 -0
- package/app-typescript/dist/components/CheckButtonGroup.d.ts +11 -0
- package/app-typescript/dist/components/CheckGroup.d.ts +9 -0
- package/app-typescript/dist/components/Checkbox.d.ts +19 -0
- package/app-typescript/dist/components/CheckboxButton.d.ts +19 -0
- package/app-typescript/dist/components/DatePicker.d.ts +37 -0
- package/app-typescript/dist/components/Divider.d.ts +9 -0
- package/app-typescript/dist/components/DonutChart.d.ts +12 -0
- package/app-typescript/dist/components/Dropdown.d.ts +28 -0
- package/app-typescript/dist/components/DropdownFirst.d.ts +42 -0
- package/app-typescript/dist/components/EmptyState.d.ts +11 -0
- package/app-typescript/dist/components/FormLabel.d.ts +9 -0
- package/app-typescript/dist/components/Genie.d.ts +13 -0
- package/app-typescript/dist/components/GridItem.d.ts +69 -0
- package/app-typescript/dist/components/GridList.d.ts +14 -0
- package/app-typescript/dist/components/HeadingText.d.ts +10 -0
- package/app-typescript/dist/components/HelloWorld.d.ts +8 -0
- package/app-typescript/dist/components/Icon.d.ts +12 -0
- package/app-typescript/dist/components/IconButton.d.ts +12 -0
- package/app-typescript/dist/components/IconLabel.d.ts +11 -0
- package/app-typescript/dist/components/Input.d.ts +24 -0
- package/app-typescript/dist/components/Label.d.ts +15 -0
- package/app-typescript/dist/components/LeftMenu.d.ts +26 -0
- package/app-typescript/dist/components/Loader.d.ts +8 -0
- package/app-typescript/dist/components/NavButton.d.ts +15 -0
- package/app-typescript/dist/components/Popover.d.ts +13 -0
- package/app-typescript/dist/components/PropsList.d.ts +15 -0
- package/app-typescript/dist/components/Radio.d.ts +19 -0
- package/app-typescript/dist/components/RadioButton.d.ts +20 -0
- package/app-typescript/dist/components/Select.d.ts +29 -0
- package/app-typescript/dist/components/SelectWithTemplate.d.ts +32 -0
- package/app-typescript/dist/components/SlidingToolbar.d.ts +8 -0
- package/app-typescript/dist/components/StrechBar.d.ts +4 -0
- package/app-typescript/dist/components/SubNav.d.ts +10 -0
- package/app-typescript/dist/components/Switch.d.ts +12 -0
- package/app-typescript/dist/components/TabCustom.d.ts +25 -0
- package/app-typescript/dist/components/TabList.d.ts +22 -0
- package/app-typescript/dist/components/Tag.d.ts +9 -0
- package/app-typescript/dist/components/TagInput.d.ts +7 -0
- package/app-typescript/dist/components/TagInputTest.d.ts +18 -0
- package/app-typescript/dist/components/TimePicker.d.ts +11 -0
- package/app-typescript/dist/components/Tooltip.d.ts +11 -0
- package/app-typescript/dist/components/_Positioner.d.ts +27 -0
- package/app-typescript/dist/index.d.ts +56 -0
- package/app-typescript/helpers.tsx +3 -0
- package/app-typescript/index.ts +3 -0
- package/dist/SD-logo.svg +52 -0
- package/dist/examples.bundle.css +660 -0
- package/dist/examples.bundle.js +29711 -27786
- package/dist/playgrounds/accessible-theme-test.html +1 -1
- package/dist/playgrounds/layout-test-2.html +1 -1
- package/dist/playgrounds/list-item-test.html +1 -1
- package/dist/playgrounds/master-desk.html +1 -1
- package/dist/playgrounds/media-carousel.html +1 -1
- package/dist/playgrounds/photo-desk.html +1 -1
- package/dist/playgrounds/planning.html +1 -1
- package/dist/playgrounds/publish.html +1 -1
- package/dist/playgrounds/publisher-content-analytics.html +1 -1
- package/dist/playgrounds/publisher-content-list-automatic.html +1 -1
- package/dist/playgrounds/publisher-content-list-manual.html +1 -1
- package/dist/playgrounds/publisher-content-lists.html +1 -1
- package/dist/playgrounds/publisher-dashboard.html +1 -1
- package/dist/playgrounds/publisher-output-control.html +1 -1
- package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +145 -0
- package/dist/playgrounds/react-playgrounds/Index.tsx +1 -0
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +36 -0
- package/dist/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
- package/dist/playgrounds/swimlane-view.html +1 -1
- package/dist/playgrounds/toasts.html +1 -1
- package/dist/playgrounds/video-editor.html +1 -1
- package/dist/react/DatePicker.tsx +10 -5
- package/dist/react/Index.tsx +5 -0
- package/dist/react/Inputs.tsx +109 -6
- package/dist/react/MultiSelect.tsx +6 -1
- package/dist/react/Selects.tsx +55 -0
- package/dist/react/WithSizeObserver.tsx +44 -0
- package/dist/superdesk-ui.bundle.css +2386 -116
- package/dist/superdesk-ui.bundle.js +30241 -28731
- package/dist/vendor.bundle.js +25026 -25026
- package/examples/index.js +4 -0
- package/examples/pages/playgrounds/accessible-theme-test.html +1 -1
- package/examples/pages/playgrounds/layout-test-2.html +1 -1
- package/examples/pages/playgrounds/list-item-test.html +1 -1
- package/examples/pages/playgrounds/master-desk.html +1 -1
- package/examples/pages/playgrounds/media-carousel.html +1 -1
- package/examples/pages/playgrounds/photo-desk.html +1 -1
- package/examples/pages/playgrounds/planning.html +1 -1
- package/examples/pages/playgrounds/publish.html +1 -1
- package/examples/pages/playgrounds/publisher-content-analytics.html +1 -1
- package/examples/pages/playgrounds/publisher-content-list-automatic.html +1 -1
- package/examples/pages/playgrounds/publisher-content-list-manual.html +1 -1
- package/examples/pages/playgrounds/publisher-content-lists.html +1 -1
- package/examples/pages/playgrounds/publisher-dashboard.html +1 -1
- package/examples/pages/playgrounds/publisher-output-control.html +1 -1
- package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +145 -0
- package/examples/pages/playgrounds/react-playgrounds/Index.tsx +1 -0
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +36 -0
- package/examples/pages/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
- package/examples/pages/playgrounds/swimlane-view.html +1 -1
- package/examples/pages/playgrounds/toasts.html +1 -1
- package/examples/pages/playgrounds/video-editor.html +1 -1
- package/examples/pages/react/DatePicker.tsx +10 -5
- package/examples/pages/react/Index.tsx +5 -0
- package/examples/pages/react/Inputs.tsx +109 -6
- package/examples/pages/react/MultiSelect.tsx +6 -1
- package/examples/pages/react/Selects.tsx +55 -0
- package/examples/pages/react/WithSizeObserver.tsx +44 -0
- package/package.json +4 -4
- package/patches/@superdesk+primereact+5.0.2-4.patch +44 -0
- package/react/components/Alert.js +10 -8
- package/react/components/Autocomplete.js +16 -12
- package/react/components/Avatar.js +8 -6
- package/react/components/Badge.js +7 -5
- package/react/components/Button.js +8 -6
- package/react/components/ButtonGroup.js +7 -5
- package/react/components/Carousel.js +4 -2
- package/react/components/CheckButtonGroup.js +6 -4
- package/react/components/CheckGroup.js +5 -3
- package/react/components/Checkbox.js +5 -3
- package/react/components/CheckboxButton.js +6 -4
- package/react/components/ContentDivider.js +8 -6
- package/react/components/CreateButton.js +6 -4
- package/react/components/DatePicker.d.ts +10 -0
- package/react/components/DatePicker.js +60 -35
- package/react/components/Divider.js +6 -4
- package/react/components/DonutChart.d.ts +1 -1
- package/react/components/DonutChart.js +24 -6
- package/react/components/DropZone.js +6 -4
- package/react/components/Dropdown.js +7 -6
- package/react/components/DropdownFirst.js +18 -11
- package/react/components/EmptyState.js +7 -5
- package/react/components/Form/FormGroup.js +7 -5
- package/react/components/Form/FormItem.js +5 -3
- package/react/components/Form/FormLabel.js +5 -3
- package/react/components/Form/FormRow.js +5 -3
- package/react/components/Form/FormText.js +4 -2
- package/react/components/Form/index.js +1 -0
- package/react/components/FormLabel.js +5 -3
- package/react/components/GridItem.js +9 -7
- package/react/components/GridList.js +8 -6
- package/react/components/HeadingText.js +4 -2
- package/react/components/HelloWorld.js +4 -2
- package/react/components/Icon.d.ts +1 -1
- package/react/components/Icon.js +9 -7
- package/react/components/IconButton.js +8 -6
- package/react/components/IconLabel.js +7 -5
- package/react/components/IconPicker.js +13 -9
- package/react/components/Input.d.ts +6 -2
- package/react/components/Input.js +27 -13
- package/react/components/Label.js +10 -8
- package/react/components/Layouts/AuthorinInnerSideBar.js +4 -2
- package/react/components/Layouts/AuthoringContainer.js +7 -5
- package/react/components/Layouts/AuthoringFrame.js +4 -2
- package/react/components/Layouts/AuthoringFrameContainer.js +4 -2
- package/react/components/Layouts/AuthoringFrameLeftBar.js +4 -2
- package/react/components/Layouts/AuthoringFrameMain.js +4 -2
- package/react/components/Layouts/AuthoringFrameNavBar.js +4 -2
- package/react/components/Layouts/AuthoringFrameOverlay.js +4 -2
- package/react/components/Layouts/AuthoringFrameRightBar.js +4 -2
- package/react/components/Layouts/AuthoringFrameSidePanel.js +5 -3
- package/react/components/Layouts/AuthoringFrameSidePanelOverlay.js +5 -3
- package/react/components/Layouts/AuthoringInnerBody.js +4 -2
- package/react/components/Layouts/AuthoringInnerHeader.js +6 -4
- package/react/components/Layouts/AuthoringMain.js +4 -2
- package/react/components/Layouts/AuthoringMainContainer.js +4 -2
- package/react/components/Layouts/AuthoringMainContent.js +4 -2
- package/react/components/Layouts/AuthoringMainToolBar.js +5 -3
- package/react/components/Layouts/BottomBarAction.d.ts +12 -0
- package/react/components/Layouts/BottomBarAction.js +59 -0
- package/react/components/Layouts/Container.js +9 -7
- package/react/components/Layouts/ContentSplitter.js +6 -4
- package/react/components/Layouts/CoreLayout.d.ts +19 -0
- package/react/components/Layouts/CoreLayout.js +55 -0
- package/react/components/Layouts/CoreLayoutContainer.d.ts +9 -0
- package/react/components/Layouts/CoreLayoutContainer.js +49 -0
- package/react/components/Layouts/CoreLayoutFooter.d.ts +8 -0
- package/react/components/Layouts/CoreLayoutFooter.js +49 -0
- package/react/components/Layouts/CoreLayoutMain.d.ts +9 -0
- package/react/components/Layouts/CoreLayoutMain.js +49 -0
- package/react/components/Layouts/CoreLayoutOverlay.d.ts +8 -0
- package/react/components/Layouts/CoreLayoutOverlay.js +49 -0
- package/react/components/Layouts/CoreLayoutSlideInMenu.d.ts +11 -0
- package/react/components/Layouts/CoreLayoutSlideInMenu.js +58 -0
- package/react/components/Layouts/CoreLayoutTopMenu.d.ts +14 -0
- package/react/components/Layouts/CoreLayoutTopMenu.js +54 -0
- package/react/components/Layouts/HamburgerButton.d.ts +14 -0
- package/react/components/Layouts/HamburgerButton.js +63 -0
- package/react/components/Layouts/HeaderPanel.js +4 -2
- package/react/components/Layouts/Layout.js +4 -3
- package/react/components/Layouts/LayoutContainer.js +4 -2
- package/react/components/Layouts/LeftPanel.js +5 -3
- package/react/components/Layouts/MainMenu.d.ts +41 -0
- package/react/components/Layouts/MainMenu.js +103 -0
- package/react/components/Layouts/MainPanel.js +5 -3
- package/react/components/Layouts/NotificationPanel.d.ts +45 -0
- package/react/components/Layouts/NotificationPanel.js +110 -0
- package/react/components/Layouts/OverlayPanel.js +4 -2
- package/react/components/Layouts/PageLayout.js +4 -2
- package/react/components/Layouts/Panel.js +16 -14
- package/react/components/Layouts/RightPanel.js +4 -2
- package/react/components/Layouts/index.d.ts +11 -0
- package/react/components/Layouts/index.js +23 -0
- package/react/components/LeftMenu.d.ts +2 -0
- package/react/components/LeftMenu.js +19 -12
- package/react/components/ListItemLoader.js +4 -2
- package/react/components/Lists/BoxedList.d.ts +6 -0
- package/react/components/Lists/BoxedList.js +36 -15
- package/react/components/Lists/SimpleList.js +9 -7
- package/react/components/Lists/index.js +1 -0
- package/react/components/Loader.js +4 -2
- package/react/components/Menu.d.ts +2 -1
- package/react/components/Menu.js +48 -12
- package/react/components/Modal.d.ts +2 -1
- package/react/components/Modal.js +30 -9
- package/react/components/NavButton.d.ts +1 -0
- package/react/components/NavButton.js +9 -4
- package/react/components/Navigation/BottomNav.d.ts +23 -0
- package/react/components/Navigation/BottomNav.js +88 -0
- package/react/components/Navigation/QuickNavBar.js +13 -9
- package/react/components/Navigation/SideBarMenu.js +4 -2
- package/react/components/Navigation/SideBarTabs.js +4 -2
- package/react/components/Navigation/index.js +1 -0
- package/react/components/Popover.js +4 -2
- package/react/components/PropsList.js +4 -2
- package/react/components/RadioButtonGroup.js +9 -7
- package/react/components/RadioGroup.js +6 -4
- package/react/components/SearchBar.js +6 -4
- package/react/components/Select.d.ts +4 -0
- package/react/components/Select.js +19 -11
- package/react/components/SelectGrid.d.ts +1 -1
- package/react/components/SelectGrid.js +44 -23
- package/react/components/SelectWithTemplate.js +4 -2
- package/react/components/Skeleton.d.ts +1 -1
- package/react/components/Skeleton.js +26 -5
- package/react/components/SlidingToolbar.js +6 -4
- package/react/components/Spinner.js +6 -4
- package/react/components/StrechBar.js +4 -2
- package/react/components/SubNav.js +9 -7
- package/react/components/Switch.js +6 -4
- package/react/components/SwitchGroup.js +5 -3
- package/react/components/TabCustom.js +11 -7
- package/react/components/TabList.js +6 -4
- package/react/components/Tag.js +5 -4
- package/react/components/TagInput.js +7 -6
- package/react/components/TagInputTest.js +13 -9
- package/react/components/Text/Heading.js +10 -8
- package/react/components/Text/Text.js +10 -8
- package/react/components/Text/Time.d.ts +15 -0
- package/react/components/Text/Time.js +65 -0
- package/react/components/ThemeSelector.js +7 -5
- package/react/components/TimePicker.js +4 -2
- package/react/components/Toast.js +1 -1
- package/react/components/ToastMessage.js +6 -5
- package/react/components/ToastText.js +1 -1
- package/react/components/ToastWrapper.d.ts +2 -2
- package/react/components/ToastWrapper.js +14 -10
- package/react/components/Togglebox.d.ts +1 -1
- package/react/components/Togglebox.js +36 -15
- package/react/components/Tooltip.d.ts +1 -0
- package/react/components/Tooltip.js +14 -10
- package/react/components/WithSizeObserver.d.ts +25 -0
- package/react/components/WithSizeObserver.js +95 -0
- package/react/components/_Positioner.js +4 -2
- package/react/helpers.d.ts +1 -0
- package/react/helpers.js +7 -0
- package/react/index.d.ts +3 -0
- package/react/index.js +9 -1
- package/yarn-error.log +111 -0
- package/sd_icons.eot +0 -0
- package/sd_icons.svg +0 -189
- package/sd_icons.ttf +0 -0
- package/sd_icons.woff +0 -0
@@ -0,0 +1,88 @@
|
|
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
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
20
|
+
}) : (function(o, m, k, k2) {
|
21
|
+
if (k2 === undefined) k2 = k;
|
22
|
+
o[k2] = m[k];
|
23
|
+
}));
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
26
|
+
}) : function(o, v) {
|
27
|
+
o["default"] = v;
|
28
|
+
});
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
30
|
+
if (mod && mod.__esModule) return mod;
|
31
|
+
var result = {};
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
33
|
+
__setModuleDefault(result, mod);
|
34
|
+
return result;
|
35
|
+
};
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
37
|
+
exports.BottomNav = void 0;
|
38
|
+
var React = __importStar(require("react"));
|
39
|
+
var Icon_1 = require("../Icon");
|
40
|
+
var IconButton_1 = require("../IconButton");
|
41
|
+
var lodash_1 = require("lodash");
|
42
|
+
var BottomNav = /** @class */ (function (_super) {
|
43
|
+
__extends(BottomNav, _super);
|
44
|
+
function BottomNav(props) {
|
45
|
+
var _this = _super.call(this, props) || this;
|
46
|
+
_this.state = {
|
47
|
+
index: -1,
|
48
|
+
closeIndex: -1,
|
49
|
+
items: _this.props.items,
|
50
|
+
};
|
51
|
+
_this.handleClick = _this.handleClick.bind(_this);
|
52
|
+
_this.handleDelete = _this.handleDelete.bind(_this);
|
53
|
+
return _this;
|
54
|
+
}
|
55
|
+
BottomNav.prototype.handleClick = function (indexNumber) {
|
56
|
+
this.setState({
|
57
|
+
index: indexNumber,
|
58
|
+
});
|
59
|
+
if (this.state.index === indexNumber) {
|
60
|
+
this.setState({
|
61
|
+
closeIndex: indexNumber,
|
62
|
+
});
|
63
|
+
}
|
64
|
+
};
|
65
|
+
BottomNav.prototype.handleDelete = function (indexNumber) {
|
66
|
+
var newItems = (0, lodash_1.clone)(this.state.items);
|
67
|
+
newItems.splice(indexNumber, 1);
|
68
|
+
this.setState({
|
69
|
+
items: newItems,
|
70
|
+
});
|
71
|
+
};
|
72
|
+
BottomNav.prototype.render = function () {
|
73
|
+
var _this = this;
|
74
|
+
return (React.createElement("ul", { className: 'sd-bottom-nav-list' }, this.state.items.map(function (item, index) {
|
75
|
+
return (React.createElement("li", { key: index, className: 'sd-bottom-nav-list__item' + (item['active'] ? ' sd-bottom-nav-list__item--active' : (index === _this.state.index ? ' sd-bottom-nav-list__item--active' : '')) },
|
76
|
+
React.createElement("a", { className: 'sd-bottom-nav-list__item-title', onClick: function (event) {
|
77
|
+
_this.handleClick(index);
|
78
|
+
item.onClick(event);
|
79
|
+
} },
|
80
|
+
item['icon'] &&
|
81
|
+
React.createElement(Icon_1.Icon, { name: item['icon'] }),
|
82
|
+
React.createElement("span", null, item.title)),
|
83
|
+
React.createElement(IconButton_1.IconButton, { size: 'small', icon: "close-small", ariaValue: 'Delete', onClick: function () { return _this.handleDelete(index); } })));
|
84
|
+
})));
|
85
|
+
};
|
86
|
+
return BottomNav;
|
87
|
+
}(React.PureComponent));
|
88
|
+
exports.BottomNav = BottomNav;
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,16 +29,18 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
34
|
-
var
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
37
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
38
|
+
if (ar || !(i in from)) {
|
39
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
40
|
+
ar[i] = from[i];
|
41
|
+
}
|
42
|
+
}
|
43
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
40
44
|
};
|
41
45
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
42
46
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
@@ -82,7 +86,7 @@ var QuickNavBar = /** @class */ (function (_super) {
|
|
82
86
|
var itemsArr = [];
|
83
87
|
this.props.items.map(function (item) {
|
84
88
|
if (item !== 'divider') {
|
85
|
-
itemsArr =
|
89
|
+
itemsArr = __spreadArray(__spreadArray([], itemsArr, true), ["".concat(item.id)], false);
|
86
90
|
}
|
87
91
|
});
|
88
92
|
return (React.createElement("div", { className: 'sd-quickbar-menu' }, this.props.scrollSpy
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.QuickNavBar = exports.SideBarTabs = exports.SideBarMenu = void 0;
|
3
4
|
var SideBarMenu_1 = require("./SideBarMenu");
|
4
5
|
Object.defineProperty(exports, "SideBarMenu", { enumerable: true, get: function () { return SideBarMenu_1.SideBarMenu; } });
|
5
6
|
var SideBarTabs_1 = require("./SideBarTabs");
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -44,7 +46,7 @@ var RadioButtonGroup = /** @class */ (function (_super) {
|
|
44
46
|
__extends(RadioButtonGroup, _super);
|
45
47
|
function RadioButtonGroup(props) {
|
46
48
|
var _this = _super.call(this, props) || this;
|
47
|
-
_this.htmlId = react_id_generator_1.default();
|
49
|
+
_this.htmlId = (0, react_id_generator_1.default)();
|
48
50
|
_this.handleChange = _this.handleChange.bind(_this);
|
49
51
|
return _this;
|
50
52
|
}
|
@@ -57,8 +59,8 @@ var RadioButtonGroup = /** @class */ (function (_super) {
|
|
57
59
|
var _a;
|
58
60
|
var _this = this;
|
59
61
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
60
|
-
var classes = classnames_1.default('sd-check-button__group', (_a = {},
|
61
|
-
_a["sd-check-button__group--"
|
62
|
+
var classes = (0, classnames_1.default)('sd-check-button__group', (_a = {},
|
63
|
+
_a["sd-check-button__group--".concat((_b = this.props.group) === null || _b === void 0 ? void 0 : _b.align)] = (_c = this.props.group) === null || _c === void 0 ? void 0 : _c.align,
|
62
64
|
_a["sd-check-button__group--start"] = !((_d = this.props.group) === null || _d === void 0 ? void 0 : _d.grid) && ((_e = this.props.group) === null || _e === void 0 ? void 0 : _e.align) === undefined,
|
63
65
|
_a["button-group--vertical"] = ((_f = this.props.group) === null || _f === void 0 ? void 0 : _f.orientation) === 'vertical',
|
64
66
|
_a["sd-check-button__group--grid"] = (_g = this.props.group) === null || _g === void 0 ? void 0 : _g.grid,
|
@@ -69,7 +71,7 @@ var RadioButtonGroup = /** @class */ (function (_super) {
|
|
69
71
|
React.createElement("div", { role: "radiogroup", className: classes, "aria-labelledby": (_k = this.props.group) === null || _k === void 0 ? void 0 : _k.groupLabelledBy }, this.props.options.map(function (item, index) { return (React.createElement("span", { className: "sd-check-button sd-check-button--native", key: index, tabIndex: _this.props.tabindex === undefined ? undefined : -1 },
|
70
72
|
React.createElement("input", { type: "radio", className: "sd-check-button__input", id: _this.htmlId + index, tabIndex: _this.props.tabindex, name: _this.htmlId, onChange: function () { return _this.handleChange(item); }, disabled: item.disabled, required: _this.props.required, checked: item.value === _this.props.value }),
|
71
73
|
React.createElement("label", { className: "sd-check-button__text-label", htmlFor: _this.htmlId + index, "aria-label": item.labelHidden ? item.label : undefined },
|
72
|
-
item.icon ? React.createElement("i", { className: "icon-"
|
74
|
+
item.icon ? React.createElement("i", { className: "icon-".concat(item.icon), "aria-hidden": "true" }) : null,
|
73
75
|
!item.labelHidden || !item.icon ?
|
74
76
|
React.createElement("span", { className: "sd-check-button__text-label-inner" }, item.label) : null))); }))
|
75
77
|
: null,
|
@@ -79,7 +81,7 @@ var RadioButtonGroup = /** @class */ (function (_super) {
|
|
79
81
|
React.createElement("div", { role: "radiogroup", id: this.htmlId + 'group', className: classes }, this.props.options.map(function (item, index) { return (React.createElement("span", { className: "sd-check-button sd-check-button--native", key: index, tabIndex: -1 },
|
80
82
|
React.createElement("input", { type: "radio", className: "sd-check-button__input", id: _this.htmlId + index, tabIndex: 0, name: _this.htmlId, onChange: function () { return _this.handleChange(item); }, disabled: item.disabled, required: _this.props.required, checked: item.value === _this.props.value }),
|
81
83
|
React.createElement("label", { className: "sd-check-button__text-label", htmlFor: _this.htmlId + index, "aria-label": item.labelHidden ? item.label : undefined },
|
82
|
-
item.icon ? React.createElement("i", { className: "icon-"
|
84
|
+
item.icon ? React.createElement("i", { className: "icon-".concat(item.icon), "aria-hidden": "true" }) : null,
|
83
85
|
!item.labelHidden || !item.icon ?
|
84
86
|
React.createElement("span", { className: "sd-check-button__text-label-inner" }, item.label) : null))); })))
|
85
87
|
: null));
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -43,7 +45,7 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
43
45
|
__extends(RadioGroup, _super);
|
44
46
|
function RadioGroup(props) {
|
45
47
|
var _this = _super.call(this, props) || this;
|
46
|
-
_this.htmlId = react_id_generator_1.default();
|
48
|
+
_this.htmlId = (0, react_id_generator_1.default)();
|
47
49
|
_this.handleChange = _this.handleChange.bind(_this);
|
48
50
|
return _this;
|
49
51
|
}
|
@@ -54,7 +56,7 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
54
56
|
};
|
55
57
|
RadioGroup.prototype.render = function () {
|
56
58
|
var _this = this;
|
57
|
-
var classes = classnames_1.default('sd-check__group-new', {
|
59
|
+
var classes = (0, classnames_1.default)('sd-check__group-new', {
|
58
60
|
'sd-check__group-new--vertical': this.props.orientation === 'vertical',
|
59
61
|
});
|
60
62
|
return (React.createElement("div", { className: classes, "aria-labelledby": this.props.groupLabelledBy }, this.props.options.map(function (item, index) { return (React.createElement("span", { className: "sd-check-new__wrapper", key: index, "label-position": _this.props.labelSide || null, tabIndex: _this.props.tabindex === undefined ? undefined : -1 },
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -67,8 +69,8 @@ var SearchBar = /** @class */ (function (_super) {
|
|
67
69
|
SearchBar.prototype.render = function () {
|
68
70
|
var _a;
|
69
71
|
var _this = this;
|
70
|
-
var classes = classnames_1.default('sd-searchbar', (_a = {},
|
71
|
-
_a["sd-searchbar--"
|
72
|
+
var classes = (0, classnames_1.default)('sd-searchbar', (_a = {},
|
73
|
+
_a["sd-searchbar--".concat(this.state.type)] = this.props.type,
|
72
74
|
_a['sd-searchbar--expanded'] = this.state.type === 'expanded' || this.props.type === undefined,
|
73
75
|
_a['sd-searchbar--focused'] = this.state.focused,
|
74
76
|
_a['sd-searchbar--boxed'] = this.state.boxed,
|
@@ -12,6 +12,10 @@ interface ISelect {
|
|
12
12
|
tabindex?: number;
|
13
13
|
fullWidth?: boolean;
|
14
14
|
onChange(newValue: string): void;
|
15
|
+
boxedStyle?: boolean;
|
16
|
+
boxedLable?: boolean;
|
17
|
+
placeholder?: string;
|
18
|
+
size?: 'medium' | 'large' | 'x-large';
|
15
19
|
}
|
16
20
|
interface IState {
|
17
21
|
value: string;
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -44,7 +46,7 @@ var Select = /** @class */ (function (_super) {
|
|
44
46
|
function Select(props) {
|
45
47
|
var _a, _b;
|
46
48
|
var _this = _super.call(this, props) || this;
|
47
|
-
_this.htmlId = react_id_generator_1.default();
|
49
|
+
_this.htmlId = (0, react_id_generator_1.default)();
|
48
50
|
_this.state = {
|
49
51
|
value: (_a = _this.props.value) !== null && _a !== void 0 ? _a : '',
|
50
52
|
invalid: (_b = _this.props.invalid) !== null && _b !== void 0 ? _b : false,
|
@@ -57,14 +59,20 @@ var Select = /** @class */ (function (_super) {
|
|
57
59
|
this.props.onChange(event.target.value);
|
58
60
|
};
|
59
61
|
Select.prototype.render = function () {
|
60
|
-
var
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
62
|
+
var _a;
|
63
|
+
var classes = (0, classnames_1.default)('sd-input sd-input--is-select', (_a = {
|
64
|
+
'sd-input--inline-label': this.props.inlineLabel,
|
65
|
+
'sd-input--required': this.props.required,
|
66
|
+
'sd-input--disabled': this.props.disabled,
|
67
|
+
'sd-input--full-width': this.props.fullWidth,
|
68
|
+
'sd-input--invalid': this.props.invalid || this.state.invalid,
|
69
|
+
'sd-input--medium': this.props.size === undefined
|
70
|
+
},
|
71
|
+
_a["sd-input--".concat(this.props.size)] = this.props.size || this.props.size !== undefined,
|
72
|
+
_a['sd-input--boxed-style'] = this.props.boxedStyle,
|
73
|
+
_a['sd-input--boxed-label'] = this.props.boxedLable,
|
74
|
+
_a));
|
75
|
+
var labelClasses = (0, classnames_1.default)('sd-input__label', {
|
68
76
|
'a11y-only': this.props.labelHidden,
|
69
77
|
});
|
70
78
|
return (React.createElement("div", { className: classes },
|
@@ -3,21 +3,42 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
15
|
};
|
14
16
|
})();
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
|
+
if (k2 === undefined) k2 = k;
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
20
|
+
}) : (function(o, m, k, k2) {
|
21
|
+
if (k2 === undefined) k2 = k;
|
22
|
+
o[k2] = m[k];
|
23
|
+
}));
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
26
|
+
}) : function(o, v) {
|
27
|
+
o["default"] = v;
|
28
|
+
});
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
30
|
+
if (mod && mod.__esModule) return mod;
|
31
|
+
var result = {};
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
33
|
+
__setModuleDefault(result, mod);
|
34
|
+
return result;
|
35
|
+
};
|
15
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
16
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
17
38
|
};
|
18
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
19
40
|
exports.SelectGrid = void 0;
|
20
|
-
var
|
41
|
+
var React = __importStar(require("react"));
|
21
42
|
var react_id_generator_1 = __importDefault(require("react-id-generator"));
|
22
43
|
var overlaypanel_1 = require("@superdesk/primereact/overlaypanel");
|
23
44
|
var Loader_1 = require("./Loader");
|
@@ -25,7 +46,7 @@ var SelectGrid = /** @class */ (function (_super) {
|
|
25
46
|
__extends(SelectGrid, _super);
|
26
47
|
function SelectGrid(props) {
|
27
48
|
var _this = _super.call(this, props) || this;
|
28
|
-
_this.htmlId = react_id_generator_1.default();
|
49
|
+
_this.htmlId = (0, react_id_generator_1.default)();
|
29
50
|
_this.togglePopup = function (event) {
|
30
51
|
if (!event) {
|
31
52
|
// @ts-ignore
|
@@ -69,7 +90,7 @@ var SelectGrid = /** @class */ (function (_super) {
|
|
69
90
|
};
|
70
91
|
_this.getItemElement = function (index) {
|
71
92
|
var _a;
|
72
|
-
return (_a = _this.gridContainer.current) === null || _a === void 0 ? void 0 : _a.querySelector("[data-item-index=\""
|
93
|
+
return (_a = _this.gridContainer.current) === null || _a === void 0 ? void 0 : _a.querySelector("[data-item-index=\"".concat(index, "\"]"));
|
73
94
|
};
|
74
95
|
_this.handleKeydown = function (event) {
|
75
96
|
var _a, _b, _c, _d, _e;
|
@@ -140,10 +161,10 @@ var SelectGrid = /** @class */ (function (_super) {
|
|
140
161
|
}
|
141
162
|
};
|
142
163
|
_this.state = { items: [], loading: true, isOpen: false };
|
143
|
-
_this.buttonContainer =
|
144
|
-
_this.overlayPanel =
|
145
|
-
_this.searchInput =
|
146
|
-
_this.gridContainer =
|
164
|
+
_this.buttonContainer = React.createRef();
|
165
|
+
_this.overlayPanel = React.createRef();
|
166
|
+
_this.searchInput = React.createRef();
|
167
|
+
_this.gridContainer = React.createRef();
|
147
168
|
return _this;
|
148
169
|
}
|
149
170
|
SelectGrid.prototype.componentDidMount = function () {
|
@@ -159,21 +180,21 @@ var SelectGrid = /** @class */ (function (_super) {
|
|
159
180
|
var _this = this;
|
160
181
|
var ItemTemplate = this.props.itemTemplate;
|
161
182
|
var TriggerTemplate = this.props.triggerTemplate;
|
162
|
-
return (
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
this.state.items.map(function (item, index) { return (
|
175
|
-
|
183
|
+
return (React.createElement(React.Fragment, null,
|
184
|
+
React.createElement("div", { className: "sd-input sd-input--grid-select", ref: this.buttonContainer, "aria-label": this.props.label },
|
185
|
+
React.createElement("label", { className: "sd-input__label" }, this.props.label),
|
186
|
+
React.createElement(TriggerTemplate, { onClick: this.togglePopup })),
|
187
|
+
React.createElement(overlaypanel_1.OverlayPanel, { ref: this.overlayPanel, dismissable: true, className: "select-grid__overlay-panel", appendTo: document.body },
|
188
|
+
React.createElement("div", { className: "select-grid__panel" },
|
189
|
+
React.createElement("div", { className: "select-grid__header" },
|
190
|
+
React.createElement("div", { className: "sd-searchbar sd-searchbar--boxed" },
|
191
|
+
React.createElement("label", { className: "sd-searchbar__icon" }),
|
192
|
+
React.createElement("input", { className: "sd-searchbar__input", placeholder: this.props.filterPlaceholder || 'Search...', type: "text", onChange: this.search, ref: this.searchInput }))),
|
193
|
+
React.createElement("div", { className: "select-grid__body", ref: this.gridContainer },
|
194
|
+
React.createElement(Loader_1.Loader, { overlay: this.state.loading }),
|
195
|
+
this.state.items.map(function (item, index) { return (React.createElement("div", { key: _this.htmlId + item.label, "data-item-index": index, className: "flex-grid__item select-grid__item sd-padding-y--3", tabIndex: 0, role: "button", "aria-label": item.name, onClick: function () { return _this.select(item); } },
|
196
|
+
React.createElement(ItemTemplate, { item: item }))); }))))));
|
176
197
|
};
|
177
198
|
return SelectGrid;
|
178
|
-
}(
|
199
|
+
}(React.PureComponent));
|
179
200
|
exports.SelectGrid = SelectGrid;
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
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");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|