superdesk-ui-framework 3.0.1-beta.9 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/fonts/sd_icons.eot +0 -0
- package/app/fonts/sd_icons.svg +1 -0
- package/app/fonts/sd_icons.ttf +0 -0
- package/app/fonts/sd_icons.woff +0 -0
- package/app/scripts/toggleBoxNext.js +1 -1
- package/app/styles/_big-icon-font.scss +1 -1
- package/app/styles/_buttons.scss +11 -6
- package/app/styles/_content-divider.scss +63 -8
- package/app/styles/_helpers.scss +24 -1
- package/app/styles/_icon-font.scss +11 -10
- package/app/styles/_labels.scss +0 -1
- package/app/styles/_master-desk.scss +5 -4
- package/app/styles/_modals.scss +7 -3
- package/app/styles/_normalize.scss +4 -0
- package/app/styles/_sd-tag-input.scss +56 -2
- package/app/styles/_simple-list.scss +0 -2
- package/app/styles/_table-list.scss +116 -12
- package/app/styles/app.scss +3 -0
- package/app/styles/components/_list-item.scss +23 -16
- package/app/styles/components/_sd-collapse-box.scss +6 -6
- package/app/styles/components/_sd-comment-box.scss +8 -4
- package/app/styles/components/_sd-editor-popup.scss +4 -4
- package/app/styles/components/_sd-media-carousel.scss +37 -2
- package/app/styles/components/_sd-pagination.scss +41 -0
- package/app/styles/components/_sd-photo-preview.scss +2 -2
- package/app/styles/components/_subnav.scss +470 -470
- package/app/styles/design-tokens/_new-colors.scss +29 -12
- package/app/styles/dropdowns/_basic-dropdown.scss +6 -0
- package/app/styles/form-elements/_input-wrap.scss +138 -0
- package/app/styles/form-elements/_inputs.scss +230 -61
- package/app/styles/grids/_grid-layout.scss +13 -14
- package/app/styles/interface-elements/_side-panel.scss +1 -1
- package/app/styles/layout/_editor.scss +6 -0
- package/app/styles/menus/_sd-sidebar-menu.scss +1 -1
- package/app/styles/primereact/_pr-datepicker.scss +16 -2
- package/app/styles/primereact/_pr-dialog.scss +9 -0
- package/app/styles/primereact/_pr-menu.scss +6 -5
- package/app/styles/variables/_colors.scss +47 -47
- package/app/template/search-handler.html +2 -2
- package/app-typescript/components/ContentDivider.tsx +3 -0
- package/app-typescript/components/DatePicker.tsx +8 -9
- package/app-typescript/components/Dropdown.tsx +127 -82
- package/app-typescript/components/DurationInput.tsx +39 -14
- package/app-typescript/components/Form/FormLabel.tsx +8 -1
- package/app-typescript/components/Form/InputBase.tsx +12 -2
- package/app-typescript/components/Input.tsx +4 -4
- package/app-typescript/components/Label.tsx +17 -1
- package/app-typescript/components/Layouts/AuthoringFrame.tsx +2 -1
- package/app-typescript/components/Layouts/AuthoringFrameRightBar.tsx +21 -2
- package/app-typescript/components/Layouts/AuthoringInnerHeader.tsx +1 -1
- package/app-typescript/components/Layouts/AuthoringMain.tsx +4 -2
- package/app-typescript/components/Layouts/CoreLayout.tsx +3 -1
- package/app-typescript/components/Layouts/CoreLayoutMain.tsx +10 -1
- package/app-typescript/components/Lists/ContentList.tsx +64 -30
- package/app-typescript/components/Lists/TableList.tsx +255 -53
- package/app-typescript/components/Menu.tsx +2 -2
- package/app-typescript/components/Modal.tsx +6 -2
- package/app-typescript/components/MultiSelect.tsx +2 -2
- package/app-typescript/components/NavButton.tsx +2 -1
- package/app-typescript/components/Navigation/SideBarMenu.tsx +30 -4
- package/app-typescript/components/SearchBar.tsx +11 -3
- package/app-typescript/components/Spacer.tsx +87 -0
- package/app-typescript/components/TimePicker.tsx +2 -13
- package/app-typescript/components/TreeSelect.tsx +286 -180
- package/app-typescript/index.ts +1 -0
- package/dist/examples.bundle.css +110 -71
- package/dist/examples.bundle.js +24358 -22168
- package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +505 -2
- package/dist/playgrounds/react-playgrounds/Index.tsx +1 -0
- package/dist/playgrounds/react-playgrounds/Multiedit.tsx +321 -0
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +17 -19
- package/dist/playgrounds/react-playgrounds/Rundowns.tsx +22 -23
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +226 -25
- package/dist/react/ContentDivider.tsx +22 -18
- package/dist/react/ContentList.tsx +188 -12
- package/dist/react/DatePicker.tsx +50 -2
- package/dist/react/Dropdowns.tsx +580 -48
- package/dist/react/DurationInput.tsx +7 -3
- package/dist/react/Inputs.tsx +1 -7
- package/dist/react/Modal.tsx +154 -22
- package/dist/react/MultiSelect.tsx +5 -5
- package/dist/react/NavButtons.tsx +31 -1
- package/dist/react/TableList.tsx +52 -139
- package/dist/react/Togglebox.tsx +1 -1
- package/dist/react/TreeSelect.tsx +167 -176
- package/dist/sd_icons.eot +0 -0
- package/dist/sd_icons.svg +1 -0
- package/dist/sd_icons.ttf +0 -0
- package/dist/sd_icons.woff +0 -0
- package/dist/superdesk-ui.bundle.css +1100 -407
- package/dist/superdesk-ui.bundle.js +6594 -4035
- package/dist/vendor.bundle.js +27 -27
- package/examples/css/docs-page.css +4 -4
- package/examples/index.js +4 -0
- package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +505 -2
- package/examples/pages/playgrounds/react-playgrounds/Index.tsx +1 -0
- package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +321 -0
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +17 -19
- package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +22 -23
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +226 -25
- package/examples/pages/react/ContentDivider.tsx +22 -18
- package/examples/pages/react/ContentList.tsx +188 -12
- package/examples/pages/react/DatePicker.tsx +50 -2
- package/examples/pages/react/Dropdowns.tsx +580 -48
- package/examples/pages/react/DurationInput.tsx +7 -3
- package/examples/pages/react/Inputs.tsx +1 -7
- package/examples/pages/react/Modal.tsx +154 -22
- package/examples/pages/react/MultiSelect.tsx +5 -5
- package/examples/pages/react/NavButtons.tsx +31 -1
- package/examples/pages/react/TableList.tsx +52 -139
- package/examples/pages/react/Togglebox.tsx +1 -1
- package/examples/pages/react/TreeSelect.tsx +167 -176
- package/package.json +3 -5
- package/react/components/ContentDivider.d.ts +1 -0
- package/react/components/ContentDivider.js +2 -0
- package/react/components/DatePicker.d.ts +2 -2
- package/react/components/DatePicker.js +3 -3
- package/react/components/Dropdown.d.ts +6 -5
- package/react/components/Dropdown.js +57 -30
- package/react/components/DurationInput.d.ts +1 -1
- package/react/components/DurationInput.js +46 -17
- package/react/components/Form/FormLabel.d.ts +4 -1
- package/react/components/Form/FormLabel.js +9 -3
- package/react/components/Form/InputBase.d.ts +0 -1
- package/react/components/Form/InputBase.js +15 -1
- package/react/components/Input.d.ts +3 -3
- package/react/components/Input.js +2 -1
- package/react/components/Label.d.ts +1 -0
- package/react/components/Label.js +17 -2
- package/react/components/Layouts/AuthoringFrame.d.ts +1 -0
- package/react/components/Layouts/AuthoringFrame.js +1 -1
- package/react/components/Layouts/AuthoringFrameRightBar.d.ts +9 -2
- package/react/components/Layouts/AuthoringFrameRightBar.js +14 -3
- package/react/components/Layouts/AuthoringInnerHeader.js +1 -1
- package/react/components/Layouts/AuthoringMain.js +1 -1
- package/react/components/Layouts/CoreLayout.d.ts +2 -0
- package/react/components/Layouts/CoreLayout.js +1 -1
- package/react/components/Layouts/CoreLayoutMain.d.ts +2 -0
- package/react/components/Layouts/CoreLayoutMain.js +8 -1
- package/react/components/Lists/ContentList.d.ts +6 -0
- package/react/components/Lists/ContentList.js +42 -16
- package/react/components/Lists/TableList.d.ts +30 -8
- package/react/components/Lists/TableList.js +127 -24
- package/react/components/Menu.js +1 -1
- package/react/components/Modal.d.ts +2 -0
- package/react/components/Modal.js +3 -3
- package/react/components/MultiSelect.d.ts +40 -0
- package/react/components/MultiSelect.js +73 -0
- package/react/components/NavButton.d.ts +1 -1
- package/react/components/Navigation/SideBarMenu.d.ts +6 -0
- package/react/components/Navigation/SideBarMenu.js +19 -2
- package/react/components/SearchBar.d.ts +1 -1
- package/react/components/SearchBar.js +15 -7
- package/react/components/TimePicker.d.ts +1 -5
- package/react/components/TimePicker.js +3 -7
- package/react/components/TreeSelect.d.ts +12 -5
- package/react/components/TreeSelect.js +189 -116
- package/react/index.d.ts +1 -0
- package/react/index.js +3 -0
- package/patches/@superdesk+primereact+5.0.2-4.patch +0 -66
@@ -0,0 +1,87 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import classNames from 'classnames';
|
3
|
+
|
4
|
+
export interface IPropsSpacer {
|
5
|
+
h?: boolean; // horizontal
|
6
|
+
v?: boolean; // vertical
|
7
|
+
gap: '0' | '4' | '8' | '16' | '32' | '64';
|
8
|
+
justifyContent?: 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly' | 'stretch';
|
9
|
+
alignItems?: 'start' | 'end' | 'center' | 'stretch';
|
10
|
+
noGrow?: boolean;
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Will not wrap children in div elements.
|
14
|
+
* `noGrow` prop would then not be relevant.
|
15
|
+
*/
|
16
|
+
noWrap?: boolean;
|
17
|
+
|
18
|
+
style?: React.CSSProperties;
|
19
|
+
|
20
|
+
children: Array<React.ReactNode>;
|
21
|
+
}
|
22
|
+
|
23
|
+
export class Spacer extends React.PureComponent<IPropsSpacer> {
|
24
|
+
constructor(props: IPropsSpacer) {
|
25
|
+
super(props);
|
26
|
+
this.state = {
|
27
|
+
items: [],
|
28
|
+
};
|
29
|
+
|
30
|
+
}
|
31
|
+
render() {
|
32
|
+
const {h, v, gap, justifyContent, alignItems, noGrow, noWrap} = this.props;
|
33
|
+
|
34
|
+
const justifyContentDefault: IPropsSpacer['justifyContent'] = h ? 'space-between' : 'start';
|
35
|
+
const alignItemsDefault: IPropsSpacer['alignItems'] = h ? 'center' : 'start';
|
36
|
+
|
37
|
+
return (
|
38
|
+
<div
|
39
|
+
style={{
|
40
|
+
display: 'flex',
|
41
|
+
flexDirection: v ? 'column' : 'row',
|
42
|
+
gap: `${gap}px`,
|
43
|
+
justifyContent: justifyContent ?? justifyContentDefault,
|
44
|
+
alignItems: alignItems ?? alignItemsDefault,
|
45
|
+
width: noGrow === true ? undefined : '100%',
|
46
|
+
...(this.props.style ?? {}),
|
47
|
+
}}
|
48
|
+
>
|
49
|
+
{this.props.children.map((el, i) => noWrap ? el : (
|
50
|
+
<div
|
51
|
+
key={i}
|
52
|
+
style={{
|
53
|
+
width: noGrow === true ? undefined : '100%',
|
54
|
+
}}
|
55
|
+
>
|
56
|
+
{el}
|
57
|
+
</div>
|
58
|
+
))}
|
59
|
+
</div>
|
60
|
+
);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Renders a standalone spacing block - similar to <br />
|
66
|
+
*/
|
67
|
+
export interface ISpacerBlock {
|
68
|
+
h?: boolean; // horizontal
|
69
|
+
v?: boolean; // vertical
|
70
|
+
gap: '4' | '8' | '16' | '32' | '64';
|
71
|
+
}
|
72
|
+
|
73
|
+
export class SpacerBlock extends React.PureComponent<ISpacerBlock> {
|
74
|
+
render() {
|
75
|
+
const {gap, h, v} = this.props;
|
76
|
+
|
77
|
+
return (
|
78
|
+
<span
|
79
|
+
style={{
|
80
|
+
display: h === true ? 'inline-block' : 'block',
|
81
|
+
width: h === true ? `${gap}px` : undefined,
|
82
|
+
height: v === true ? `${gap}px` : undefined,
|
83
|
+
}}
|
84
|
+
/>
|
85
|
+
);
|
86
|
+
}
|
87
|
+
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
// import classNames from 'classnames';
|
3
2
|
import nextId from "react-id-generator";
|
4
3
|
import { InputWrapper } from './Form';
|
5
4
|
|
@@ -19,18 +18,8 @@ interface IProps {
|
|
19
18
|
error?: string;
|
20
19
|
}
|
21
20
|
|
22
|
-
|
23
|
-
invalid: boolean;
|
24
|
-
}
|
25
|
-
|
26
|
-
export class TimePicker extends React.PureComponent<IProps, IState> {
|
21
|
+
export class TimePicker extends React.PureComponent<IProps> {
|
27
22
|
private htmlId = nextId();
|
28
|
-
constructor(props: IProps) {
|
29
|
-
super(props);
|
30
|
-
this.state = {
|
31
|
-
invalid: this.props.invalid ? this.props.invalid : false,
|
32
|
-
};
|
33
|
-
}
|
34
23
|
|
35
24
|
render() {
|
36
25
|
return (
|
@@ -39,7 +28,7 @@ export class TimePicker extends React.PureComponent<IProps, IState> {
|
|
39
28
|
error={this.props.error}
|
40
29
|
required={this.props.required}
|
41
30
|
disabled={this.props.disabled}
|
42
|
-
invalid={this.
|
31
|
+
invalid={this.props.invalid}
|
43
32
|
info={this.props.info}
|
44
33
|
inlineLabel={this.props.inlineLabel}
|
45
34
|
labelHidden={this.props.labelHidden}
|