superdesk-ui-framework 3.0.13 → 3.0.15
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/.mocharc.json +5 -0
- package/app-typescript/components/Dropdown.tsx +11 -7
- package/app-typescript/components/ResizablePanels.tsx +98 -0
- package/app-typescript/components/Tooltip.tsx +11 -5
- package/app-typescript/components/WithPagination.tsx +231 -0
- package/app-typescript/components/with-pagination.spec.tsx +146 -0
- package/app-typescript/index.ts +2 -0
- package/dist/examples.bundle.js +4475 -1729
- package/dist/react/Index.tsx +11 -0
- package/dist/react/ResizablePanels.tsx +49 -0
- package/dist/react/WithPaginationDocs.tsx +57 -0
- package/dist/superdesk-ui.bundle.js +3403 -1170
- package/dist/vendor.bundle.js +20 -20
- package/examples/pages/react/Index.tsx +11 -0
- package/examples/pages/react/ResizablePanels.tsx +49 -0
- package/examples/pages/react/WithPaginationDocs.tsx +57 -0
- package/mocha-setup.ts +5 -0
- package/package.json +16 -3
- package/react/components/Alert.js +5 -1
- package/react/components/Autocomplete.js +7 -2
- package/react/components/Avatar.js +5 -1
- package/react/components/Badge.js +5 -1
- package/react/components/Button.js +5 -1
- package/react/components/ButtonGroup.js +5 -1
- package/react/components/Carousel.js +5 -1
- package/react/components/CheckButtonGroup.js +5 -1
- package/react/components/CheckGroup.js +5 -1
- package/react/components/Checkbox.js +5 -1
- package/react/components/CheckboxButton.js +5 -1
- package/react/components/ContentDivider.js +5 -1
- package/react/components/CreateButton.js +5 -1
- package/react/components/DatePicker.d.ts +1 -1
- package/react/components/DatePicker.js +7 -2
- package/react/components/Divider.js +5 -1
- package/react/components/DonutChart.js +5 -1
- package/react/components/DropZone.js +5 -1
- package/react/components/Dropdown.js +15 -8
- package/react/components/DropdownFirst.js +5 -1
- package/react/components/DurationInput.js +5 -1
- package/react/components/EmptyState.js +5 -1
- package/react/components/Form/FormGroup.js +5 -1
- package/react/components/Form/FormItem.js +5 -1
- package/react/components/Form/FormLabel.js +5 -1
- package/react/components/Form/FormRow.js +5 -1
- package/react/components/Form/FormRowNew.js +5 -1
- package/react/components/Form/FormText.js +5 -1
- package/react/components/Form/InputBase.d.ts +1 -1
- package/react/components/Form/InputBase.js +7 -2
- package/react/components/Form/InputNew.d.ts +1 -1
- package/react/components/Form/InputNew.js +7 -2
- package/react/components/Form/InputWrapper.js +7 -2
- package/react/components/FormLabel.js +5 -1
- package/react/components/GridItem.js +5 -1
- package/react/components/GridList.js +5 -1
- package/react/components/HeadingText.js +5 -1
- package/react/components/HelloWorld.js +5 -1
- package/react/components/Icon.js +5 -1
- package/react/components/IconButton.js +5 -1
- package/react/components/IconLabel.js +5 -1
- package/react/components/IconPicker.js +5 -1
- package/react/components/Input.d.ts +1 -1
- package/react/components/Input.js +7 -2
- package/react/components/Label.js +5 -1
- package/react/components/Layouts/AuthorinInnerSideBar.js +5 -1
- package/react/components/Layouts/AuthoringContainer.js +5 -1
- package/react/components/Layouts/AuthoringFrame.js +5 -1
- package/react/components/Layouts/AuthoringFrameContainer.js +5 -1
- package/react/components/Layouts/AuthoringFrameLeftBar.js +5 -1
- package/react/components/Layouts/AuthoringFrameMain.js +5 -1
- package/react/components/Layouts/AuthoringFrameNavBar.js +5 -1
- package/react/components/Layouts/AuthoringFrameOverlay.js +5 -1
- package/react/components/Layouts/AuthoringFrameRightBar.js +5 -1
- package/react/components/Layouts/AuthoringFrameSidePanel.js +5 -1
- package/react/components/Layouts/AuthoringFrameSidePanelOverlay.js +5 -1
- package/react/components/Layouts/AuthoringInnerBody.js +5 -1
- package/react/components/Layouts/AuthoringInnerHeader.js +5 -1
- package/react/components/Layouts/AuthoringMain.js +5 -1
- package/react/components/Layouts/AuthoringMainContainer.js +5 -1
- package/react/components/Layouts/AuthoringMainContent.js +5 -1
- package/react/components/Layouts/AuthoringMainToolBar.js +5 -1
- package/react/components/Layouts/BottomBarAction.js +5 -1
- package/react/components/Layouts/Container.js +5 -1
- package/react/components/Layouts/ContentSplitter.js +5 -1
- package/react/components/Layouts/CoreLayout.js +5 -1
- package/react/components/Layouts/CoreLayoutContainer.js +5 -1
- package/react/components/Layouts/CoreLayoutFooter.js +5 -1
- package/react/components/Layouts/CoreLayoutMain.js +5 -1
- package/react/components/Layouts/CoreLayoutOverlay.js +5 -1
- package/react/components/Layouts/CoreLayoutSlideInMenu.js +5 -1
- package/react/components/Layouts/CoreLayoutTopMenu.js +5 -1
- package/react/components/Layouts/HamburgerButton.js +5 -1
- package/react/components/Layouts/HeaderPanel.js +5 -1
- package/react/components/Layouts/Layout.js +5 -1
- package/react/components/Layouts/LayoutContainer.js +5 -1
- package/react/components/Layouts/LeftPanel.js +5 -1
- package/react/components/Layouts/MainMenu.js +5 -1
- package/react/components/Layouts/MainPanel.js +5 -1
- package/react/components/Layouts/NotificationPanel.js +5 -1
- package/react/components/Layouts/OverlayPanel.js +5 -1
- package/react/components/Layouts/PageLayout.js +5 -1
- package/react/components/Layouts/Panel.js +5 -1
- package/react/components/Layouts/RightPanel.js +5 -1
- package/react/components/LeftMenu.js +5 -1
- package/react/components/ListItemLoader.js +5 -1
- package/react/components/Lists/BoxedList.js +5 -1
- package/react/components/Lists/ContentList.js +5 -1
- package/react/components/Lists/SimpleList.js +5 -1
- package/react/components/Lists/TableList.js +5 -1
- package/react/components/Loader.js +5 -1
- package/react/components/Menu.d.ts +2 -2
- package/react/components/Menu.js +5 -1
- package/react/components/Modal.js +5 -1
- package/react/components/MultiSelect.js +5 -1
- package/react/components/NavButton.js +5 -1
- package/react/components/Navigation/BottomNav.js +5 -1
- package/react/components/Navigation/QuickNavBar.js +5 -1
- package/react/components/Navigation/SideBarMenu.js +5 -1
- package/react/components/Navigation/SideBarTabs.js +5 -1
- package/react/components/Popover.js +5 -1
- package/react/components/PropsList.js +5 -1
- package/react/components/RadioButtonGroup.js +5 -1
- package/react/components/RadioGroup.js +5 -1
- package/react/components/ResizablePanels.d.ts +34 -0
- package/react/components/ResizablePanels.js +101 -0
- package/react/components/SearchBar.js +5 -1
- package/react/components/Select.js +7 -2
- package/react/components/SelectGrid.d.ts +1 -1
- package/react/components/SelectGrid.js +5 -1
- package/react/components/SelectWithTemplate.js +5 -1
- package/react/components/Skeleton.js +5 -1
- package/react/components/SlidingToolbar.js +5 -1
- package/react/components/Spinner.js +5 -1
- package/react/components/StrechBar.js +5 -1
- package/react/components/SubNav.js +5 -1
- package/react/components/Switch.js +5 -1
- package/react/components/SwitchGroup.js +5 -1
- package/react/components/TabCustom.js +5 -1
- package/react/components/TabList.js +5 -1
- package/react/components/Tag.js +5 -1
- package/react/components/TagInput.js +5 -1
- package/react/components/Text/Heading.js +5 -1
- package/react/components/Text/Text.js +5 -1
- package/react/components/Text/Time.js +5 -1
- package/react/components/ThemeSelector.js +5 -1
- package/react/components/TimePicker.js +5 -1
- package/react/components/Toast.js +5 -1
- package/react/components/ToastMessage.d.ts +3 -3
- package/react/components/ToastMessage.js +5 -1
- package/react/components/ToastText.js +5 -1
- package/react/components/ToastWrapper.d.ts +1 -1
- package/react/components/ToastWrapper.js +5 -1
- package/react/components/Togglebox.js +7 -2
- package/react/components/Tooltip.js +13 -6
- package/react/components/TreeSelect.d.ts +2 -2
- package/react/components/TreeSelect.js +5 -1
- package/react/components/WithPagination.d.ts +26 -0
- package/react/components/WithPagination.js +191 -0
- package/react/components/WithSizeObserver.js +5 -1
- package/react/components/_Positioner.d.ts +1 -1
- package/react/components/_Positioner.js +5 -1
- package/react/index.d.ts +2 -0
- package/react/index.js +12 -3
- package/tsconfig.json +1 -1
- package/spec/scenarios.js +0 -13
package/dist/react/Index.tsx
CHANGED
@@ -62,9 +62,11 @@ import { SelectWithTemplateDocs } from './SelectWithTemplate';
|
|
62
62
|
import { MultiselectDocs } from './MultiSelect';
|
63
63
|
import { TreeSelectDocs } from './TreeSelect';
|
64
64
|
import DurationInputDoc from './DurationInput';
|
65
|
+
import {WithPaginationDocs} from './WithPaginationDocs';
|
65
66
|
import { PopoverDoc } from './Popover';
|
66
67
|
import { MenuDocs } from './Menu';
|
67
68
|
import {WithSizeObserverDocs} from './WithSizeObserver';
|
69
|
+
import {ResizablePanelsDoc} from './ResizablePanels';
|
68
70
|
|
69
71
|
const pages = {
|
70
72
|
basicComponents: {
|
@@ -166,6 +168,9 @@ const pages = {
|
|
166
168
|
"togglebox": {
|
167
169
|
name: "Togglebox"
|
168
170
|
},
|
171
|
+
"resizable-panels": {
|
172
|
+
name: "Resizable panels"
|
173
|
+
},
|
169
174
|
}
|
170
175
|
},
|
171
176
|
textComponents: {
|
@@ -200,6 +205,9 @@ const pages = {
|
|
200
205
|
'content-list': {
|
201
206
|
name: 'Content list'
|
202
207
|
},
|
208
|
+
'with-pagination': {
|
209
|
+
name: 'With pagination'
|
210
|
+
},
|
203
211
|
}
|
204
212
|
},
|
205
213
|
formComponents: {
|
@@ -342,6 +350,7 @@ class ReactDoc extends React.Component<IProps, IState> {
|
|
342
350
|
<Route path="/react/multiselect" component={MultiselectDocs} />
|
343
351
|
<Route path="/react/treeselect" component={TreeSelectDocs} />
|
344
352
|
<Route path="/react/duration-input" component={DurationInputDoc} />
|
353
|
+
<Route path="/react/with-pagination" component={WithPaginationDocs} />
|
345
354
|
<Route path="/react/popover" component={PopoverDoc} />
|
346
355
|
<Route path="/react/date-picker" component={DatePickerDoc} />
|
347
356
|
<Route path="/react/time-picker" component={TimePickerDoc} />
|
@@ -379,6 +388,7 @@ class ReactDoc extends React.Component<IProps, IState> {
|
|
379
388
|
<Route path="/react/container" component={ContainerDoc} />
|
380
389
|
<Route path="/react/dropzone" component={DropZoneDoc} />
|
381
390
|
<Route path="/react/create-button" component={CreateButtonDoc} />
|
391
|
+
<Route path="/react/resizable-panels" component={ResizablePanelsDoc} />
|
382
392
|
<Route path="/" component={ReactDefault} />
|
383
393
|
</Switch>
|
384
394
|
</main>
|
@@ -409,3 +419,4 @@ const parsePlayground = ({ match }, playgrounds) => {
|
|
409
419
|
};
|
410
420
|
|
411
421
|
export { ReactDoc, ReactPlayground };
|
422
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
|
3
|
+
import * as Markup from '../../js/react';
|
4
|
+
|
5
|
+
import {ResizablePanels} from '../../../app-typescript';
|
6
|
+
import {repeat} from 'lodash';
|
7
|
+
|
8
|
+
export class ResizablePanelsDoc extends React.Component {
|
9
|
+
render() {
|
10
|
+
return (
|
11
|
+
<section className='docs-page__container'>
|
12
|
+
|
13
|
+
<h2 className='docs-page__h2'>Resizable panels</h2>
|
14
|
+
|
15
|
+
<p className='docs-page__paragraph'></p>
|
16
|
+
<Markup.ReactMarkup>
|
17
|
+
<Markup.ReactMarkupPreview>
|
18
|
+
<div className='docs-page__content-row docs-page__content-row--no-margin'>
|
19
|
+
<div className='form__row'>
|
20
|
+
<ResizablePanels direction="horizontal" secondarySize={{default: 20}}>
|
21
|
+
<div>
|
22
|
+
{repeat('Lorem ipsum dolor sit amet ', 50)}
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div>
|
26
|
+
{repeat('Lorem ipsum dolor sit amet ', 50)}
|
27
|
+
</div>
|
28
|
+
</ResizablePanels>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
</Markup.ReactMarkupPreview>
|
33
|
+
|
34
|
+
<Markup.ReactMarkupCode>{`
|
35
|
+
<ResizablePanels direction="horizontal" secondarySize={{default: 20}}>
|
36
|
+
<div>
|
37
|
+
{repeat('Lorem ipsum dolor sit amet', 50)}
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div>
|
41
|
+
{repeat('Lorem ipsum dolor sit amet', 50)}
|
42
|
+
</div>
|
43
|
+
</ResizablePanels>
|
44
|
+
`}</Markup.ReactMarkupCode>
|
45
|
+
</Markup.ReactMarkup>
|
46
|
+
</section>
|
47
|
+
)
|
48
|
+
}
|
49
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
|
3
|
+
import * as Markup from '../../js/react';
|
4
|
+
|
5
|
+
import {WithPagination} from '../../../app-typescript';
|
6
|
+
import {range} from 'lodash';
|
7
|
+
|
8
|
+
function getItems(pageNo: number): Promise<{items: Array<number>, itemCount: number}> {
|
9
|
+
return new Promise((resolve) => {
|
10
|
+
setTimeout(() => {
|
11
|
+
return resolve({items: range(1, 500).slice((pageNo - 1) * 20, (pageNo - 1) * 20 + 20), itemCount: 500});
|
12
|
+
}, 1000);
|
13
|
+
});
|
14
|
+
};
|
15
|
+
|
16
|
+
export class WithPaginationDocs extends React.Component {
|
17
|
+
render() {
|
18
|
+
const wrapperStyle: React.CSSProperties = {
|
19
|
+
display: 'flex',
|
20
|
+
flexDirection: 'column',
|
21
|
+
alignItems: 'center'
|
22
|
+
};
|
23
|
+
|
24
|
+
return (
|
25
|
+
<section className='docs-page__container'>
|
26
|
+
<h2 className='docs-page__h2'>With pagination</h2>
|
27
|
+
<p className='docs-page__paragraph'></p>
|
28
|
+
<Markup.ReactMarkup>
|
29
|
+
<Markup.ReactMarkupPreview>
|
30
|
+
<WithPagination
|
31
|
+
getItems={(pageNo) => getItems(pageNo)}
|
32
|
+
>
|
33
|
+
{
|
34
|
+
(items) =>
|
35
|
+
<div style={wrapperStyle}>
|
36
|
+
{items.map((x, i) => <div key={i}>{x}</div>)}
|
37
|
+
</div>
|
38
|
+
}
|
39
|
+
</WithPagination>
|
40
|
+
</Markup.ReactMarkupPreview>
|
41
|
+
<Markup.ReactMarkupCode>{`
|
42
|
+
<WithPagination
|
43
|
+
getItems={(pageNo) => getItems(pageNo)}
|
44
|
+
>
|
45
|
+
{
|
46
|
+
(items) =>
|
47
|
+
<div style={wrapperStyle}>
|
48
|
+
{items.map((x, i) => <div key={i}>{x}</div>)}
|
49
|
+
</div>
|
50
|
+
}
|
51
|
+
</WithPagination>
|
52
|
+
`}</Markup.ReactMarkupCode>
|
53
|
+
</Markup.ReactMarkup>
|
54
|
+
</section>
|
55
|
+
)
|
56
|
+
}
|
57
|
+
}
|