superdesk-ui-framework 4.0.38 → 4.0.40
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-typescript/components/Lists/CalendarWeekDayItem.tsx +21 -5
- package/app-typescript/components/Text/Text.tsx +8 -1
- package/app-typescript/index.ts +2 -1
- package/dist/components/Card.tsx +1 -1
- package/dist/examples.bundle.js +1223 -1193
- package/dist/superdesk-ui.bundle.js +948 -847
- package/dist/vendor.bundle.js +14 -14
- package/examples/pages/components/Card.tsx +1 -1
- package/package.json +1 -1
- package/react/components/Card.d.ts +15 -0
- package/react/components/Card.js +65 -0
- package/react/components/Lists/CalendarWeekDayItem.d.ts +10 -2
- package/react/components/Lists/CalendarWeekDayItem.js +23 -1
- package/react/components/Text/Text.d.ts +1 -0
- package/react/components/Text/Text.js +5 -1
- package/react/index.d.ts +2 -1
- package/react/index.js +7 -3
- /package/app-typescript/components/{card.tsx → Card.tsx} +0 -0
@@ -12,8 +12,7 @@ interface IPropsItem {
|
|
12
12
|
onClick?(): void;
|
13
13
|
}
|
14
14
|
|
15
|
-
class CalendarWeekDayItem extends React.PureComponent<IPropsItem> {
|
16
|
-
|
15
|
+
export class CalendarWeekDayItem extends React.PureComponent<IPropsItem> {
|
17
16
|
render() {
|
18
17
|
let classes = classNames('calendar-week-day__item', {
|
19
18
|
'calendar-week-day__item--clickable': this.props.clickable === true,
|
@@ -23,6 +22,7 @@ class CalendarWeekDayItem extends React.PureComponent<IPropsItem> {
|
|
23
22
|
'calendar-week-day__item--hidden': this.props.hidden,
|
24
23
|
[`calendar-week-day__item--${this.props.state}`]: this.props.state || this.props.state !== undefined,
|
25
24
|
});
|
25
|
+
|
26
26
|
return (
|
27
27
|
<div className={classes}>
|
28
28
|
{this.props.children}
|
@@ -31,6 +31,22 @@ class CalendarWeekDayItem extends React.PureComponent<IPropsItem> {
|
|
31
31
|
}
|
32
32
|
}
|
33
33
|
|
34
|
-
export {
|
35
|
-
|
36
|
-
|
34
|
+
export class WeeklyCalendarGrid extends React.PureComponent<{style?: React.CSSProperties}> {
|
35
|
+
render() {
|
36
|
+
return (
|
37
|
+
<div className="calendar-user-week-row" style={this.props.style}>
|
38
|
+
{this.props.children}
|
39
|
+
</div>
|
40
|
+
);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
export class WeeklyCalendarGridItem extends React.PureComponent {
|
45
|
+
render() {
|
46
|
+
return (
|
47
|
+
<div className="calendar-week-day__container">
|
48
|
+
{this.props.children}
|
49
|
+
</div>
|
50
|
+
);
|
51
|
+
}
|
52
|
+
}
|
@@ -10,6 +10,7 @@ interface IProps {
|
|
10
10
|
size?: 'x-small' | 'small' | 'medium' | 'large';
|
11
11
|
color?: 'normal' | 'light' | 'lighter';
|
12
12
|
fontStyle?: 'sans' | 'serif';
|
13
|
+
noMargin?: boolean;
|
13
14
|
}
|
14
15
|
|
15
16
|
export class Text extends React.PureComponent<IProps> {
|
@@ -27,8 +28,14 @@ export class Text extends React.PureComponent<IProps> {
|
|
27
28
|
[`sd-text-color--${this.props.color}`]: this.props.color && this.props.color !== 'normal',
|
28
29
|
}, this.props.className);
|
29
30
|
|
31
|
+
const styles: React.CSSProperties = {};
|
32
|
+
|
33
|
+
if (this.props.noMargin === true) {
|
34
|
+
styles.margin = 0;
|
35
|
+
}
|
36
|
+
|
30
37
|
return (
|
31
|
-
<p className={classes}>
|
38
|
+
<p className={classes} style={styles}>
|
32
39
|
{this.props.children}
|
33
40
|
</p>
|
34
41
|
);
|
package/app-typescript/index.ts
CHANGED
@@ -9,6 +9,7 @@ export { SelectWithTemplate } from './components/SelectWithTemplate';
|
|
9
9
|
export { WithPagination } from './components/WithPagination';
|
10
10
|
export { Popover } from './components/Popover';
|
11
11
|
export { Label } from './components/Label';
|
12
|
+
export { Card } from './components/Card';
|
12
13
|
export { Badge } from './components/Badge';
|
13
14
|
export { Alert } from './components/Alert';
|
14
15
|
export { AvatarWrapper } from './components/avatar/avatar-wrapper';
|
@@ -106,7 +107,7 @@ export { Spacer, SpacerBlock } from '@superdesk/common';
|
|
106
107
|
export { ResizeObserverComponent } from './components/ResizeObserverComponent';
|
107
108
|
export { DragHandleDots } from './components/DragHandleDots';
|
108
109
|
export { DragHandle } from './components/DragHandle';
|
109
|
-
export {
|
110
|
+
export {CalendarWeekDayItem, WeeklyCalendarGrid, WeeklyCalendarGridItem} from './components/Lists/CalendarWeekDayItem';
|
110
111
|
export { getTextColor } from './helpers';
|
111
112
|
|
112
113
|
// declare non-typescript exports to prevent errors
|
package/dist/components/Card.tsx
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as Markup from "../../js/react";
|
3
|
-
import {Card} from '../../../app-typescript/components/
|
3
|
+
import {Card} from '../../../app-typescript/components/Card';
|
4
4
|
|
5
5
|
export default class CardDoc extends React.Component {
|
6
6
|
render() {
|