superdesk-ui-framework 4.0.37 → 4.0.39
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/Card.tsx +36 -0
- package/app-typescript/index.ts +1 -0
- package/dist/components/Card.tsx +24 -0
- package/dist/components/Index.tsx +5 -0
- package/dist/examples.bundle.js +1343 -1200
- package/dist/superdesk-ui.bundle.js +991 -916
- package/dist/vendor.bundle.js +14 -14
- package/examples/pages/components/Card.tsx +24 -0
- package/examples/pages/components/Index.tsx +5 -0
- package/package.json +1 -1
- package/react/components/Card.d.ts +15 -0
- package/react/components/Card.js +65 -0
- package/react/index.d.ts +1 -0
- package/react/index.js +5 -3
@@ -0,0 +1,36 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
|
3
|
+
interface IProps extends Pick<React.CSSProperties, 'paddingBlock'> {
|
4
|
+
children: React.ReactNode;
|
5
|
+
paddingBase: '0' | '1' | '2' | '3' | '4';
|
6
|
+
paddingBlock?: React.CSSProperties['paddingBlock'];
|
7
|
+
paddingBlockStart?: React.CSSProperties['paddingBlockStart'];
|
8
|
+
paddingBlockEnd?: React.CSSProperties['paddingBlockEnd'];
|
9
|
+
paddingInline?: React.CSSProperties['paddingInline'];
|
10
|
+
paddingInlineStart?: React.CSSProperties['paddingInlineStart'];
|
11
|
+
paddingInlineEnd?: React.CSSProperties['paddingInlineEnd'];
|
12
|
+
}
|
13
|
+
|
14
|
+
export class Card extends React.PureComponent<IProps> {
|
15
|
+
render() {
|
16
|
+
return (
|
17
|
+
<div
|
18
|
+
style={{
|
19
|
+
width: '100%',
|
20
|
+
background: 'var(--sd-item__main-Bg)',
|
21
|
+
borderRadius: 'var(--b-radius--medium)',
|
22
|
+
padding: `calc( ${this.props.paddingBase} * var(--base-increment))`,
|
23
|
+
boxShadow: 'var(--sd-shadow--z2)',
|
24
|
+
paddingBlock: this.props.paddingBlock,
|
25
|
+
paddingBlockStart: this.props.paddingBlockStart,
|
26
|
+
paddingBlockEnd: this.props.paddingBlockEnd,
|
27
|
+
paddingInline: this.props.paddingInline,
|
28
|
+
paddingInlineStart: this.props.paddingInlineStart,
|
29
|
+
paddingInlineEnd: this.props.paddingInlineEnd,
|
30
|
+
}}
|
31
|
+
>
|
32
|
+
{this.props.children}
|
33
|
+
</div>
|
34
|
+
);
|
35
|
+
}
|
36
|
+
}
|
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';
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import * as Markup from "../../js/react";
|
3
|
+
import {Card} from '../../../app-typescript/components/Card';
|
4
|
+
|
5
|
+
export default class CardDoc extends React.Component {
|
6
|
+
render() {
|
7
|
+
return (
|
8
|
+
<section className="docs-page__container">
|
9
|
+
<h2 className="docs-page__h2">Card</h2>
|
10
|
+
|
11
|
+
<Markup.ReactMarkupCodePreview>{`
|
12
|
+
<Card paddingBase="1">
|
13
|
+
card content
|
14
|
+
</Card>
|
15
|
+
`}
|
16
|
+
</Markup.ReactMarkupCodePreview>
|
17
|
+
|
18
|
+
<Card paddingBase="1">
|
19
|
+
card content
|
20
|
+
</Card>
|
21
|
+
</section>
|
22
|
+
)
|
23
|
+
}
|
24
|
+
}
|
@@ -86,6 +86,7 @@ import { OpacityUtilitiesDoc } from './utilities/OpacityUtilities';
|
|
86
86
|
import { ObjectFitUtilitiesDoc } from './utilities/ObjectFitUtilities';
|
87
87
|
import { ObjectPositionUtilitiesDoc } from './utilities/ObjectPositionUtilities';
|
88
88
|
import LoaderDoc from './Loader';
|
89
|
+
import CardDoc from './Card';
|
89
90
|
|
90
91
|
|
91
92
|
interface IPages {
|
@@ -104,6 +105,10 @@ const pages: IPages = {
|
|
104
105
|
basicComponents: {
|
105
106
|
name: 'Basic Components',
|
106
107
|
items: {
|
108
|
+
'card': {
|
109
|
+
name: 'Card',
|
110
|
+
component: CardDoc,
|
111
|
+
},
|
107
112
|
'buttons': {
|
108
113
|
name: 'Buttons',
|
109
114
|
component: ButtonsDoc,
|