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,145 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as Components from './components/Index';
|
3
|
+
import { ButtonGroup, Button, NavButton, SubNav, Dropdown, Input, IconButton, LeftMenu, BoxedList, BoxedListItem, BoxedListContentRow, Heading, Text, Time } from '../../../../app-typescript/index';
|
4
|
+
import * as Layout from '../../../../app-typescript/components/Layouts';
|
5
|
+
import * as Form from '../../../../app-typescript/components/Form';
|
6
|
+
import * as Nav from '../../../../app-typescript/components/Navigation';
|
7
|
+
import { BottomNav } from '../../../../app-typescript/components/Navigation/BottomNav';
|
8
|
+
|
9
|
+
interface IProps {
|
10
|
+
children?: React.ReactNode;
|
11
|
+
heading?: string;
|
12
|
+
active?: boolean;
|
13
|
+
onClick(): void;
|
14
|
+
ariaControls?: string;
|
15
|
+
menuId?: string;
|
16
|
+
}
|
17
|
+
|
18
|
+
interface IState {
|
19
|
+
theme: 'dark' | 'light' | string;
|
20
|
+
mainMenuOpen: boolean;
|
21
|
+
notificationsOpen: boolean;
|
22
|
+
}
|
23
|
+
|
24
|
+
export class CoreLayout extends React.Component<IProps, IState> {
|
25
|
+
constructor(props: IProps) {
|
26
|
+
super(props);
|
27
|
+
this.state = {
|
28
|
+
theme: 'light',
|
29
|
+
mainMenuOpen: false,
|
30
|
+
notificationsOpen: false,
|
31
|
+
}
|
32
|
+
this.handleMainMenu = this.handleMainMenu.bind(this);
|
33
|
+
this.handleNotifications = this.handleNotifications.bind(this);
|
34
|
+
}
|
35
|
+
|
36
|
+
handleMainMenu() {
|
37
|
+
this.setState((state) => ({
|
38
|
+
mainMenuOpen: !state.mainMenuOpen,
|
39
|
+
}));
|
40
|
+
}
|
41
|
+
handleNotifications() {
|
42
|
+
this.setState((state) => ({
|
43
|
+
notificationsOpen: !state.notificationsOpen,
|
44
|
+
}));
|
45
|
+
}
|
46
|
+
|
47
|
+
|
48
|
+
render() {
|
49
|
+
return (
|
50
|
+
<Layout.CoreLayout
|
51
|
+
heading='Core Layout'
|
52
|
+
menuOpen={this.state.mainMenuOpen}
|
53
|
+
onClick={this.handleMainMenu}
|
54
|
+
active={this.state.mainMenuOpen}
|
55
|
+
ariaControls='main-menu'
|
56
|
+
menuId='main-menu'
|
57
|
+
slideInMenu={(
|
58
|
+
<Layout.MainMenu
|
59
|
+
headerTitle='Main Menu'
|
60
|
+
poweredBy='Powered by Superdesk technology'
|
61
|
+
header={(null)}
|
62
|
+
footerContent={true}
|
63
|
+
footer={(
|
64
|
+
<p>Menu footer testing</p>
|
65
|
+
)}
|
66
|
+
>
|
67
|
+
<LeftMenu
|
68
|
+
style='blanc'
|
69
|
+
reverseItemBorder={true}
|
70
|
+
size='large'
|
71
|
+
ariaLabel={'Left navigation'}
|
72
|
+
activeItemId='1'
|
73
|
+
groups={[
|
74
|
+
{ label: 'MAIN SECTIONS', items: [
|
75
|
+
{ id: '1', label: 'Section 1', ref:'section1'},
|
76
|
+
{ id: '2', label: 'Section 2', ref: 'section2' },
|
77
|
+
{ id: '3', label: 'Section 3', ref: 'section3' },
|
78
|
+
|
79
|
+
]},
|
80
|
+
{ label:'OTHER SECTIONS', items: [
|
81
|
+
{ id: '4', label: 'Section 4', ref: 'section4' },
|
82
|
+
{ id: '5', label: 'Section 5', ref: 'section5' },
|
83
|
+
]},
|
84
|
+
{ label:'OTHER SECTIONS', items: [
|
85
|
+
{ id: '6', label: 'Section 6', ref: 'section6' },
|
86
|
+
{ id: '7', label: 'Section 7', ref: 'section7' },
|
87
|
+
]}
|
88
|
+
]}
|
89
|
+
onSelect={() => false} />
|
90
|
+
</Layout.MainMenu>
|
91
|
+
)}
|
92
|
+
topMenu={(
|
93
|
+
<NavButton badgeValue='6' icon='bell' text='Show notifications' onClick={this.handleNotifications} />
|
94
|
+
)}
|
95
|
+
footer={(
|
96
|
+
<>
|
97
|
+
<Layout.BottomBarAction onClick={()=> false} />
|
98
|
+
<BottomNav
|
99
|
+
items={[
|
100
|
+
{ icon:'photo', title: 'Sed posuere consectetur est at lobortis.', onClick: () => console.log('test1') },
|
101
|
+
{ title: 'Nullam id dolor id nibh ultricies.', onClick: () => console.log('test2')},
|
102
|
+
{ icon:'video', title: 'Nulla vitae elit libero, a pharetra augue.', onClick: () => false},
|
103
|
+
{ title: 'Donec sed odio dui.', onClick: () => false},
|
104
|
+
]} />
|
105
|
+
</>
|
106
|
+
)}
|
107
|
+
overlay={(
|
108
|
+
<Layout.NotificationPanel
|
109
|
+
header={(null)}
|
110
|
+
headerTitle='Notifications'
|
111
|
+
open={this.state.notificationsOpen}
|
112
|
+
onClick={this.handleNotifications}
|
113
|
+
theme='dark'
|
114
|
+
>
|
115
|
+
<BoxedList>
|
116
|
+
<BoxedListItem unread={true}>
|
117
|
+
<Time datetime='29.06.2022'>29.06.2022</Time>
|
118
|
+
<BoxedListContentRow>
|
119
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et
|
120
|
+
magnis dis parturient montes, nascetur ridiculus mus.
|
121
|
+
</BoxedListContentRow>
|
122
|
+
</BoxedListItem>
|
123
|
+
<BoxedListItem>
|
124
|
+
<Time datetime='29.06.2022'>29.06.2022</Time>
|
125
|
+
<BoxedListContentRow>
|
126
|
+
Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Vestibulum id ligula
|
127
|
+
porta felis euismod semper.
|
128
|
+
</BoxedListContentRow>
|
129
|
+
</BoxedListItem>
|
130
|
+
<BoxedListItem>
|
131
|
+
<Time datetime='29.06.2022'>29.06.2022</Time>
|
132
|
+
<BoxedListContentRow>
|
133
|
+
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer
|
134
|
+
posuere erat a ante venenatis dapibus posuere velit aliquet.
|
135
|
+
</BoxedListContentRow>
|
136
|
+
</BoxedListItem>
|
137
|
+
</BoxedList>
|
138
|
+
|
139
|
+
</Layout.NotificationPanel>
|
140
|
+
)}
|
141
|
+
>
|
142
|
+
</Layout.CoreLayout>
|
143
|
+
);
|
144
|
+
}
|
145
|
+
}
|
@@ -263,6 +263,42 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
263
263
|
</div>
|
264
264
|
|
265
265
|
<hr /><hr />
|
266
|
+
<h3 className="docs-page__h3 sd-margin-y--0 sd-margin-b--3">Duration input</h3>
|
267
|
+
|
268
|
+
|
269
|
+
<div className="sd-input">
|
270
|
+
<label className="sd-input__label" id="duration01">Input label</label>
|
271
|
+
<div className="sd-input__duration-input" id="id06" aria-describedby="duration01">
|
272
|
+
<input type="number" className="" placeholder='00'/>
|
273
|
+
<span className="sd-input__suffix">h</span>
|
274
|
+
<input type="number" className="" placeholder='00'/>
|
275
|
+
<span className="sd-input__suffix">m</span>
|
276
|
+
<input type="number" className="" placeholder='00'/>
|
277
|
+
<span className="sd-input__suffix">s</span>
|
278
|
+
</div>
|
279
|
+
<div className="sd-input__char-count">0 / 30</div>
|
280
|
+
<div className="sd-input__message-box">
|
281
|
+
<div className="sd-input__hint">This is some hint message</div>
|
282
|
+
</div>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
<h3 className="docs-page__h3 sd-margin-y--0 sd-margin-b--3">testiramt</h3>
|
286
|
+
|
287
|
+
|
288
|
+
<div className="sd-input">
|
289
|
+
<label className="sd-input__label" id="duration01">Input label</label>
|
290
|
+
{/* temp */}
|
291
|
+
<div id="pr_id_1" className="p-dropdown p-component p-inputwrapper p-dropdown-clearable"><div className="p-hidden-accessible"><input type="text" aria-haspopup="listbox" /></div><div className="p-hidden-accessible p-dropdown-hidden-select"><select aria-hidden="true"><option value=""> </option></select></div><span className="p-dropdown-label p-inputtext p-placeholder"><div>Select a color</div></span><div className="p-dropdown-trigger" role="button" aria-haspopup="listbox" aria-expanded="false"><span className="p-dropdown-trigger-icon pi pi-chevron-down p-clickable"></span></div></div>
|
292
|
+
{/* temp */}
|
293
|
+
|
294
|
+
|
295
|
+
<div className="sd-input__char-count">0 / 30</div>
|
296
|
+
<div className="sd-input__message-box">
|
297
|
+
<div className="sd-input__hint">This is some hint message</div>
|
298
|
+
</div>
|
299
|
+
</div>
|
300
|
+
|
301
|
+
<hr />
|
266
302
|
|
267
303
|
<h3 className="docs-page__h3 sd-margin-t--2 sd-margin-b--0">Radio</h3>
|
268
304
|
<hr />
|
@@ -14,11 +14,16 @@ class DatePickerExample extends React.PureComponent<{}, {date: Date}> {
|
|
14
14
|
render() {
|
15
15
|
return (
|
16
16
|
<DatePicker
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
value={this.state.date}
|
18
|
+
dateFormat="YYYY-MM-DD"
|
19
|
+
onChange={(date) => {
|
20
|
+
this.setState({date});
|
21
|
+
}}
|
22
|
+
required
|
23
|
+
tabindex={1}
|
24
|
+
label={'This is Label'}
|
25
|
+
info={'This is info'}
|
26
|
+
error={'This is error'}
|
22
27
|
/>
|
23
28
|
);
|
24
29
|
}
|
package/dist/react/Index.tsx
CHANGED
@@ -63,6 +63,7 @@ import { MultiselectDocs } from './MultiSelect';
|
|
63
63
|
import { TreeSelectDocs } from './TreeSelect';
|
64
64
|
import { PopoverDoc } from './Popover';
|
65
65
|
import { MenuDocs } from './Menu';
|
66
|
+
import {WithSizeObserverDocs} from './WithSizeObserver';
|
66
67
|
|
67
68
|
const pages = {
|
68
69
|
basicComponents: {
|
@@ -221,6 +222,9 @@ const pages = {
|
|
221
222
|
'select-with-template': {
|
222
223
|
name: 'Select with template',
|
223
224
|
},
|
225
|
+
'with-size-observer': {
|
226
|
+
name: 'With size observer',
|
227
|
+
},
|
224
228
|
'multiselect': {
|
225
229
|
name: 'MultiSelect',
|
226
230
|
},
|
@@ -330,6 +334,7 @@ class ReactDoc extends React.Component<IProps, IState> {
|
|
330
334
|
<Route path="/react/autocomplete" component={AutocompleteDoc} />
|
331
335
|
<Route path="/react/select" component={SelectsDoc} />
|
332
336
|
<Route path="/react/select-with-template" component={SelectWithTemplateDocs} />
|
337
|
+
<Route path="/react/with-size-observer" component={WithSizeObserverDocs} />
|
333
338
|
<Route path="/react/multiselect" component={MultiselectDocs} />
|
334
339
|
<Route path="/react/treeselect" component={TreeSelectDocs} />
|
335
340
|
<Route path="/react/popover" component={PopoverDoc} />
|
package/dist/react/Inputs.tsx
CHANGED
@@ -10,6 +10,7 @@ interface IState {
|
|
10
10
|
disabled: boolean;
|
11
11
|
invalid: boolean;
|
12
12
|
value: any;
|
13
|
+
value2: any;
|
13
14
|
}
|
14
15
|
|
15
16
|
export default class InputsDoc extends React.Component<{}, IState> {
|
@@ -20,7 +21,8 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
20
21
|
required: true,
|
21
22
|
disabled: false,
|
22
23
|
invalid: false,
|
23
|
-
value: null
|
24
|
+
value: null,
|
25
|
+
value2: '',
|
24
26
|
}
|
25
27
|
}
|
26
28
|
|
@@ -47,7 +49,7 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
47
49
|
|
48
50
|
<div className='form__row'>
|
49
51
|
<Input label='Input label'
|
50
|
-
value={
|
52
|
+
value={''}
|
51
53
|
maxLength={30}
|
52
54
|
type='text'
|
53
55
|
error='This is error message'
|
@@ -57,7 +59,7 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
57
59
|
disabled={this.state.disabled}
|
58
60
|
invalid={this.state.invalid}
|
59
61
|
tabindex={0}
|
60
|
-
onChange={(value) => this.setState({
|
62
|
+
onChange={(value) => this.setState({value2: value})} />
|
61
63
|
</div>
|
62
64
|
<div className='form__row'>
|
63
65
|
<Input label='Number Input'
|
@@ -75,9 +77,10 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
75
77
|
<p className="docs-page__paragraph">// Hidden label</p>
|
76
78
|
<div className='form__row'>
|
77
79
|
<Input label='Input label'
|
78
|
-
value={
|
80
|
+
value={''}
|
79
81
|
maxLength={25}
|
80
82
|
type='text'
|
83
|
+
placeholder='Placeholder'
|
81
84
|
error='This is error message'
|
82
85
|
info='Donec id elit non mi porta gravida at eget metus.'
|
83
86
|
inlineLabel={true}
|
@@ -86,7 +89,107 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
86
89
|
disabled={this.state.disabled}
|
87
90
|
invalid={this.state.invalid}
|
88
91
|
tabindex={0}
|
89
|
-
onChange={(value) => this.setState({
|
92
|
+
onChange={(value) => this.setState({value2: value})} />
|
93
|
+
</div>
|
94
|
+
<p className="docs-page__paragraph">// Boxed with hidden label</p>
|
95
|
+
<div className='form__row'>
|
96
|
+
<Input label='Input label'
|
97
|
+
value={''}
|
98
|
+
boxedStyle={true}
|
99
|
+
maxLength={25}
|
100
|
+
type='text'
|
101
|
+
placeholder='Default boxed input'
|
102
|
+
error='This is error message'
|
103
|
+
inlineLabel={true}
|
104
|
+
labelHidden={true}
|
105
|
+
required={this.state.required}
|
106
|
+
disabled={this.state.disabled}
|
107
|
+
invalid={this.state.invalid}
|
108
|
+
tabindex={0}
|
109
|
+
onChange={(value) => this.setState({value2: value})} />
|
110
|
+
</div>
|
111
|
+
<div className='form__row'>
|
112
|
+
<Input label='Input label'
|
113
|
+
value={''}
|
114
|
+
boxedStyle={true}
|
115
|
+
size='large'
|
116
|
+
maxLength={25}
|
117
|
+
type='text'
|
118
|
+
placeholder='Large boxed input'
|
119
|
+
error='This is error message'
|
120
|
+
inlineLabel={true}
|
121
|
+
labelHidden={true}
|
122
|
+
required={this.state.required}
|
123
|
+
disabled={this.state.disabled}
|
124
|
+
invalid={this.state.invalid}
|
125
|
+
tabindex={0}
|
126
|
+
onChange={(value) => this.setState({value2: value})} />
|
127
|
+
</div>
|
128
|
+
<div className='form__row'>
|
129
|
+
<Input label='Input label'
|
130
|
+
value={''}
|
131
|
+
boxedStyle={true}
|
132
|
+
size='x-large'
|
133
|
+
maxLength={25}
|
134
|
+
type='text'
|
135
|
+
placeholder='Extra large boxed input'
|
136
|
+
error='This is error message'
|
137
|
+
inlineLabel={true}
|
138
|
+
labelHidden={true}
|
139
|
+
required={this.state.required}
|
140
|
+
disabled={this.state.disabled}
|
141
|
+
invalid={this.state.invalid}
|
142
|
+
tabindex={0}
|
143
|
+
onChange={(value) => this.setState({value2: value})} />
|
144
|
+
</div>
|
145
|
+
<p className="docs-page__paragraph">// Boxed with default label</p>
|
146
|
+
<div className='form__row'>
|
147
|
+
<Input label='Input label'
|
148
|
+
value={''}
|
149
|
+
boxedStyle={true}
|
150
|
+
size='large'
|
151
|
+
maxLength={25}
|
152
|
+
placeholder='Placeholder'
|
153
|
+
type='text'
|
154
|
+
error='This is error message'
|
155
|
+
required={this.state.required}
|
156
|
+
disabled={this.state.disabled}
|
157
|
+
invalid={this.state.invalid}
|
158
|
+
tabindex={0}
|
159
|
+
onChange={(value) => this.setState({value2: value})} />
|
160
|
+
</div>
|
161
|
+
<p className="docs-page__paragraph">// Boxed with boxed label</p>
|
162
|
+
<div className='form__row'>
|
163
|
+
<Input label='Input label'
|
164
|
+
value={''}
|
165
|
+
boxedStyle={true}
|
166
|
+
boxedLable={true}
|
167
|
+
size='large'
|
168
|
+
maxLength={25}
|
169
|
+
placeholder='Placeholder'
|
170
|
+
type='text'
|
171
|
+
error='This is error message'
|
172
|
+
required={this.state.required}
|
173
|
+
disabled={this.state.disabled}
|
174
|
+
invalid={this.state.invalid}
|
175
|
+
tabindex={0}
|
176
|
+
onChange={(value) => this.setState({value2: value})} />
|
177
|
+
</div>
|
178
|
+
<div className='form__row'>
|
179
|
+
<Input label='Input label'
|
180
|
+
value={''}
|
181
|
+
boxedStyle={true}
|
182
|
+
boxedLable={true}
|
183
|
+
size='large'
|
184
|
+
placeholder='Hide my label'
|
185
|
+
labelHidden={true}
|
186
|
+
type='text'
|
187
|
+
error='This is error message'
|
188
|
+
required={this.state.required}
|
189
|
+
disabled={this.state.disabled}
|
190
|
+
invalid={this.state.invalid}
|
191
|
+
tabindex={0}
|
192
|
+
onChange={(value) => this.setState({value2: value})} />
|
90
193
|
</div>
|
91
194
|
</div>
|
92
195
|
|
@@ -122,4 +225,4 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
122
225
|
</section>
|
123
226
|
)
|
124
227
|
}
|
125
|
-
}
|
228
|
+
}
|
@@ -69,6 +69,11 @@ export class MultiselectDocs extends React.Component<{}, IState> {
|
|
69
69
|
showSelectAll
|
70
70
|
placeholder='Select a color'
|
71
71
|
optionLabel='name'
|
72
|
+
required
|
73
|
+
tabindex={1}
|
74
|
+
label={'This is Label'}
|
75
|
+
info={'This is info'}
|
76
|
+
error={'This is error'}
|
72
77
|
/>
|
73
78
|
</div>
|
74
79
|
</div>
|
@@ -190,4 +195,4 @@ export class MultiselectDocs extends React.Component<{}, IState> {
|
|
190
195
|
</section>
|
191
196
|
)
|
192
197
|
}
|
193
|
-
}
|
198
|
+
}
|