superdesk-ui-framework 3.1.9 → 3.1.12
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/styles/_helpers.scss +913 -780
- package/app/styles/_master-desk.scss +2 -2
- package/app/styles/components/_sd-collapse-box.scss +113 -0
- package/app/styles/components/_subnav.scss +0 -1
- package/app/styles/design-tokens/_design-tokens-general.scss +19 -5
- package/app/styles/design-tokens/_new-colors.scss +11 -1
- package/app-typescript/components/ToggleBox/CustomHeaderToggleBox.tsx +56 -0
- package/app-typescript/components/{Togglebox.tsx → ToggleBox/SimpleToggleBox.tsx} +3 -14
- package/app-typescript/components/ToggleBox/index.tsx +41 -0
- package/app-typescript/components/TreeMenu.tsx +4 -2
- package/app-typescript/index.ts +1 -1
- package/dist/components/Alerts.tsx +1 -1
- package/dist/components/ContentDivider.tsx +1 -1
- package/dist/components/DragHandleDocs.tsx +2 -2
- package/dist/components/Index.tsx +105 -50
- package/dist/components/Panel.tsx +13 -13
- package/dist/components/Tags.tsx +2 -2
- package/dist/components/Togglebox.tsx +154 -15
- package/dist/components/utilities/BorderRadiusUtilities.tsx +56 -0
- package/dist/components/utilities/BorderUtilities.tsx +170 -0
- package/dist/components/utilities/DisplayUtilities.tsx +116 -0
- package/dist/components/utilities/FlexAndGridUtilities.tsx +551 -0
- package/dist/components/utilities/ObjectFitUtilities.tsx +53 -0
- package/dist/components/utilities/ObjectPositionUtilities.tsx +68 -0
- package/dist/components/utilities/OpacityUtilities.tsx +64 -0
- package/dist/components/utilities/OverflowUtilities.tsx +93 -0
- package/dist/components/utilities/PositionUtilities.tsx +52 -0
- package/dist/components/utilities/ShadowUtilities.tsx +123 -0
- package/dist/components/utilities/SpacingUtilities.tsx +2 -2
- package/dist/components/utilities/TextUtilities.tsx +44 -4
- package/dist/components.html +2 -4
- package/dist/components_deprecated/modals.html +2 -2
- package/dist/components_deprecated.html +1 -0
- package/dist/design-patterns/Index.tsx +1 -42
- package/dist/design-patterns.html +2 -4
- package/dist/design.html +1 -0
- package/dist/examples.bundle.css +15 -7
- package/dist/examples.bundle.js +3104 -1270
- package/dist/main.html +1 -0
- package/dist/playgrounds/react-playgrounds/Rundowns.tsx +1 -1
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +214 -2
- package/dist/playgrounds.html +1 -0
- package/dist/superdesk-ui.bundle.css +1325 -999
- package/dist/superdesk-ui.bundle.js +1094 -919
- package/dist/vendor.bundle.js +13 -13
- package/examples/css/docs-page.css +15 -7
- package/examples/js/doc.js +13 -1
- package/examples/pages/components/Alerts.tsx +1 -1
- package/examples/pages/components/ContentDivider.tsx +1 -1
- package/examples/pages/components/DragHandleDocs.tsx +2 -2
- package/examples/pages/components/Index.tsx +105 -50
- package/examples/pages/components/Panel.tsx +13 -13
- package/examples/pages/components/Tags.tsx +2 -2
- package/examples/pages/components/Togglebox.tsx +154 -15
- package/examples/pages/components/utilities/BorderRadiusUtilities.tsx +56 -0
- package/examples/pages/components/utilities/BorderUtilities.tsx +170 -0
- package/examples/pages/components/utilities/DisplayUtilities.tsx +116 -0
- package/examples/pages/components/utilities/FlexAndGridUtilities.tsx +551 -0
- package/examples/pages/components/utilities/ObjectFitUtilities.tsx +53 -0
- package/examples/pages/components/utilities/ObjectPositionUtilities.tsx +68 -0
- package/examples/pages/components/utilities/OpacityUtilities.tsx +64 -0
- package/examples/pages/components/utilities/OverflowUtilities.tsx +93 -0
- package/examples/pages/components/utilities/PositionUtilities.tsx +52 -0
- package/examples/pages/components/utilities/ShadowUtilities.tsx +123 -0
- package/examples/pages/components/utilities/SpacingUtilities.tsx +2 -2
- package/examples/pages/components/utilities/TextUtilities.tsx +44 -4
- package/examples/pages/components.html +2 -4
- package/examples/pages/components_deprecated/modals.html +2 -2
- package/examples/pages/components_deprecated.html +1 -0
- package/examples/pages/design-patterns/Index.tsx +1 -42
- package/examples/pages/design-patterns.html +2 -4
- package/examples/pages/design.html +1 -0
- package/examples/pages/main.html +1 -0
- package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +1 -1
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +214 -2
- package/examples/pages/playgrounds.html +1 -0
- package/package.json +1 -1
- package/react/components/ToggleBox/CustomHeaderToggleBox.d.ts +11 -0
- package/react/components/ToggleBox/CustomHeaderToggleBox.js +78 -0
- package/react/components/ToggleBox/SimpleToggleBox.d.ts +18 -0
- package/react/components/{Togglebox.js → ToggleBox/SimpleToggleBox.js} +7 -7
- package/react/components/ToggleBox/index.d.ts +26 -0
- package/react/components/ToggleBox/index.js +71 -0
- package/react/components/TreeMenu.js +4 -2
- package/react/index.d.ts +1 -1
- package/react/index.js +2 -2
- package/react/components/Togglebox.d.ts +0 -28
@@ -57,15 +57,15 @@ export default class PanelDoc extends React.Component<IProps, IState> {
|
|
57
57
|
<Markup.ReactMarkup>
|
58
58
|
<Markup.ReactMarkupPreview>
|
59
59
|
<p className="docs-page__paragraph">// Left</p>
|
60
|
-
<div className='
|
60
|
+
<div className='d-flex' style={{border: '1px solid var(--sd-colour-line--medium)', backgroundColor: 'var(--sd-colour-panel-bg--100)', maxHeight: '400px'}}>
|
61
61
|
{this.state.openPanel1 ? null :
|
62
|
-
<div className='
|
62
|
+
<div className='d-flex items-center justify-center sd-flex--grow'>
|
63
63
|
<Button text="Open Panel" style="filled" onClick={() => this.setState({'openPanel1': true})} />
|
64
64
|
</div>
|
65
65
|
}
|
66
66
|
<PanelElements.Panel side='left' background='light' open={this.state.openPanel1} size='x-small'>
|
67
67
|
<PanelElements.PanelHeader
|
68
|
-
title='This is the title
|
68
|
+
title='This is the Panel title'
|
69
69
|
onClose={() => this.setState({'openPanel1': false})}
|
70
70
|
iconButtons={[
|
71
71
|
<Rotate degrees={this.state.rotate ? 90 : 0}>
|
@@ -92,7 +92,7 @@ export default class PanelDoc extends React.Component<IProps, IState> {
|
|
92
92
|
<Markup.ReactMarkupCode>{`
|
93
93
|
// Left
|
94
94
|
{this.state.openPanel1 ? null :
|
95
|
-
<div className='
|
95
|
+
<div className='d-flex items-center justify-center sd-flex--grow'>
|
96
96
|
<Button text="Open Panel" style="filled" onClick={() => this.setState({'openPanel1': true})} />
|
97
97
|
</div>
|
98
98
|
}
|
@@ -130,9 +130,9 @@ export default class PanelDoc extends React.Component<IProps, IState> {
|
|
130
130
|
<Markup.ReactMarkup>
|
131
131
|
<Markup.ReactMarkupPreview>
|
132
132
|
<p className="docs-page__paragraph">// Right, custom elements inside the footer + dark theme.</p>
|
133
|
-
<div className='
|
133
|
+
<div className='d-flex' style={{border: '1px solid var(--sd-colour-line--medium)', backgroundColor: 'var(--sd-colour-panel-bg--100)', maxHeight: '400px'}}>
|
134
134
|
{this.state.openPanel2 ? null :
|
135
|
-
<div className='
|
135
|
+
<div className='d-flex items-center justify-center sd-flex--grow'>
|
136
136
|
<Button text="Open Panel" style="filled" onClick={() => this.setState({'openPanel2': true})} />
|
137
137
|
</div>
|
138
138
|
}
|
@@ -168,7 +168,7 @@ export default class PanelDoc extends React.Component<IProps, IState> {
|
|
168
168
|
// Right, custom elements inside the footer + dark theme.
|
169
169
|
|
170
170
|
{this.state.openPanel2 ? null :
|
171
|
-
<div className='
|
171
|
+
<div className='d-flex items-center justify-center sd-flex--grow'>
|
172
172
|
<Button text="Open Panel" style="filled" onClick={() => this.setState({'openPanel2': true})} />
|
173
173
|
</div>
|
174
174
|
}
|
@@ -201,9 +201,9 @@ export default class PanelDoc extends React.Component<IProps, IState> {
|
|
201
201
|
<Markup.ReactMarkup>
|
202
202
|
<Markup.ReactMarkupPreview>
|
203
203
|
<p className="docs-page__paragraph">// With PanelHeaderSlidingToolbar element inside the PanelHeader</p>
|
204
|
-
<div className='
|
204
|
+
<div className='d-flex' style={{border: '1px solid var(--sd-colour-line--medium)', backgroundColor: 'var(--sd-colour-panel-bg--100)', maxHeight: '400px'}}>
|
205
205
|
{this.state.openPanel3 ? null :
|
206
|
-
<div className='
|
206
|
+
<div className='d-flex items-center justify-center sd-flex--grow'>
|
207
207
|
<Button text="Open Panel" style="filled" onClick={() => this.setState({'openPanel3': true})} />
|
208
208
|
</div>
|
209
209
|
}
|
@@ -245,7 +245,7 @@ export default class PanelDoc extends React.Component<IProps, IState> {
|
|
245
245
|
// With PanelHeaderSlidingToolbar element inside the PanelHeader
|
246
246
|
|
247
247
|
{this.state.openPanel3 ? null :
|
248
|
-
<div className='
|
248
|
+
<div className='d-flex items-center justify-center sd-flex--grow'>
|
249
249
|
<Button text="Open Panel" style="filled" onClick={() => this.setState({'openPanel3': true})} />
|
250
250
|
</div>
|
251
251
|
}
|
@@ -284,9 +284,9 @@ export default class PanelDoc extends React.Component<IProps, IState> {
|
|
284
284
|
<Markup.ReactMarkup>
|
285
285
|
<Markup.ReactMarkupPreview>
|
286
286
|
<p className="docs-page__paragraph">// With PanelTools (allowing custom actions) + dark theme</p>
|
287
|
-
<div className='
|
287
|
+
<div className='d-flex' style={{border: '1px solid var(--sd-colour-line--medium)', backgroundColor: 'var(--sd-colour-panel-bg--100)', maxHeight: '400px'}}>
|
288
288
|
{this.state.openPanel4 ? null :
|
289
|
-
<div className='
|
289
|
+
<div className='d-flex items-center justify-center sd-flex--grow'>
|
290
290
|
<Button text="Open Panel" style="filled" onClick={() => this.setState({'openPanel4': true})} />
|
291
291
|
</div>
|
292
292
|
}
|
@@ -317,7 +317,7 @@ export default class PanelDoc extends React.Component<IProps, IState> {
|
|
317
317
|
// With PanelTools (allowing custom actions) + dark theme
|
318
318
|
|
319
319
|
{this.state.openPanel4 ? null :
|
320
|
-
<div className='
|
320
|
+
<div className='d-flex items-center justify-center sd-flex--grow'>
|
321
321
|
<Button text="Open Panel" style="filled" onClick={() => this.setState({'openPanel4': true})} />
|
322
322
|
</div>
|
323
323
|
}
|
package/dist/components/Tags.tsx
CHANGED
@@ -55,7 +55,7 @@ export default class TagDoc extends React.Component<{}, ITag> {
|
|
55
55
|
|
56
56
|
<Markup.ReactMarkup>
|
57
57
|
<Markup.ReactMarkupPreview>
|
58
|
-
<div className='docs-page__content-row
|
58
|
+
<div className='docs-page__content-row d-flex gap-1'>
|
59
59
|
{this.state.tags.map((tag,index)=>{
|
60
60
|
return (
|
61
61
|
<React.Fragment key={index}>
|
@@ -86,7 +86,7 @@ export default class TagDoc extends React.Component<{}, ITag> {
|
|
86
86
|
|
87
87
|
<Markup.ReactMarkup>
|
88
88
|
<Markup.ReactMarkupPreview>
|
89
|
-
<div className='docs-page__content-row
|
89
|
+
<div className='docs-page__content-row d-flex gap-1'>
|
90
90
|
{this.state.tags2.map((tag,index)=>{
|
91
91
|
return (
|
92
92
|
<React.Fragment key={index}>
|
@@ -1,39 +1,170 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as Markup from "../../js/react";
|
3
|
-
import {
|
3
|
+
import { PropsList, Prop, Badge, Icon, Label, AvatarGroup, ContentDivider, FormLabel, Text } from "../../../app-typescript";
|
4
|
+
import {ToggleBox} from './../../../app-typescript/components/ToggleBox/index';
|
5
|
+
import {IAvatarInGroup} from '../../../app-typescript/components/avatar/avatar-group';
|
6
|
+
|
7
|
+
const avatars: Array<IAvatarInGroup> = [
|
8
|
+
{
|
9
|
+
imageUrl: null,
|
10
|
+
initials: "VS",
|
11
|
+
displayName: 'Vladimir Stefanovic',
|
12
|
+
icon:{name: 'text', color: 'var(--sd-colour-highlight)'},
|
13
|
+
},
|
14
|
+
{
|
15
|
+
imageUrl: null,
|
16
|
+
initials: "JL",
|
17
|
+
displayName: 'Jeffrey Lebowski',
|
18
|
+
icon:{name: 'photo', color: 'var(--sd-colour-highlight)'}
|
19
|
+
},
|
20
|
+
{
|
21
|
+
imageUrl: null,
|
22
|
+
initials: "WS",
|
23
|
+
displayName: 'Walter Sobchak',
|
24
|
+
icon:{name: 'video', color: 'var(--sd-colour-highlight)'}
|
25
|
+
},
|
26
|
+
{
|
27
|
+
imageUrl: null,
|
28
|
+
initials: "ML",
|
29
|
+
displayName: 'Maude Lebowski',
|
30
|
+
icon:{name: 'file', color: 'var(--sd-colour-highlight)'}
|
31
|
+
},
|
32
|
+
];
|
4
33
|
|
5
|
-
const ToggleboxDocs = () => {
|
6
|
-
const toggleRef = React.useRef();
|
7
34
|
|
35
|
+
const ToggleboxDocs = () => {
|
8
36
|
return (
|
9
37
|
<section className="docs-page__container">
|
10
38
|
<h2 className="docs-page__h2">Togglebox</h2>
|
11
|
-
<p className="docs-page__paragraph">Simple toggle box element. It provides toggle() function that can be used with React's ref functionality and control close/open state from outside. Arrow left, Arrow right and Enter are supported keyboard events.</p>
|
12
39
|
<Markup.ReactMarkupCodePreview>{`
|
13
40
|
<ToggleBox title="togglebox title">togglebox content</ToggleBox>
|
14
41
|
`}
|
15
42
|
</Markup.ReactMarkupCodePreview>
|
43
|
+
<p className="docs-page__paragraph">Simple ToggleBox:</p>
|
44
|
+
<Markup.ReactMarkup>
|
45
|
+
<Markup.ReactMarkupPreview>
|
46
|
+
<div style={{ marginTop: "2em" }}>
|
47
|
+
<ToggleBox variant='simple' title="Simple togglebox">Togglebox content</ToggleBox>
|
48
|
+
<ToggleBox variant='simple' title="With badge" badge={<Badge text='2' type='primary' />}>Togglebox content</ToggleBox>
|
49
|
+
<ToggleBox variant='simple' title="Togglebox - circled chevron" className="toggle-box--circle">Togglebox content</ToggleBox>
|
50
|
+
</div>
|
51
|
+
</Markup.ReactMarkupPreview>
|
52
|
+
<Markup.ReactMarkupCode>{`
|
53
|
+
<ToggleBox variant='simple' title="Simple togglebox">Togglebox content</ToggleBox>
|
54
|
+
<ToggleBox variant='simple' title="With badge" badge={<Badge text='2' type='primary' />}>Togglebox content</ToggleBox>
|
55
|
+
<ToggleBox variant='simple' title="Togglebox - circled chevron" className="toggle-box--circle">Togglebox content</ToggleBox>
|
56
|
+
`}</Markup.ReactMarkupCode>
|
57
|
+
</Markup.ReactMarkup>
|
58
|
+
|
59
|
+
<p className="docs-page__paragraph">Custom header ToggleBox:</p>
|
16
60
|
<Markup.ReactMarkup>
|
17
61
|
<Markup.ReactMarkupPreview>
|
18
|
-
<Button text="Toggle programatically" onClick={() => { toggleRef.current.toggle() }} />
|
19
62
|
<div style={{ marginTop: "2em" }}>
|
20
|
-
<ToggleBox
|
21
|
-
|
22
|
-
|
23
|
-
|
63
|
+
<ToggleBox
|
64
|
+
variant='custom-header'
|
65
|
+
header={
|
66
|
+
<div role="listitem" className="sd-list-item sd-list-item--no-hover">
|
67
|
+
<div className="sd-list-item__border sd-list-item__border--locked"></div>
|
68
|
+
<div className="sd-list-item__column sd-list-item__column--no-border pe-0-5">
|
69
|
+
<Icon type='primary' name='calendar' scale='1.5x' ariaHidden={true} />
|
70
|
+
</div>
|
71
|
+
<div className="sd-list-item__column sd-list-item__column--grow sd-list-item__column--no-border">
|
72
|
+
<div className="sd-list-item__row">
|
73
|
+
<span className="sd-list-item__slugline">Planning Slugline</span>
|
74
|
+
</div>
|
75
|
+
<div className="sd-list-item__row sd-list-item__row--overflow-visible me-1 mb-1-5">
|
76
|
+
<Label text='draft' style='translucent'/>
|
77
|
+
<span className="sd-margin-s--auto">
|
78
|
+
<AvatarGroup
|
79
|
+
size="x-small"
|
80
|
+
items={avatars}
|
81
|
+
/>
|
82
|
+
</span>
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
}
|
87
|
+
toggleButtonLabel={'show more'}
|
88
|
+
onToggle={(isOpen) => false}
|
89
|
+
>
|
90
|
+
<div>
|
91
|
+
<FormLabel text='Name'/>
|
92
|
+
<Text size='small' weight='medium'>Australian Open 2024</Text>
|
93
|
+
</div>
|
94
|
+
<ContentDivider type="dashed" margin='x-small' />
|
95
|
+
<div>
|
96
|
+
<FormLabel text='Current Date'/>
|
97
|
+
<Text size='small' weight='medium'>05.02.2024 @ 10:00</Text>
|
98
|
+
</div>
|
99
|
+
<ContentDivider type="dashed" margin='x-small' />
|
100
|
+
<div>
|
101
|
+
<FormLabel text='Current Repeat Summary'/>
|
102
|
+
<Text size='small' weight='medium'>Every 1 day(s) until CET 28 Feb 2024</Text>
|
103
|
+
</div>
|
104
|
+
<ContentDivider type="dashed" margin='x-small' />
|
105
|
+
<div>
|
106
|
+
<FormLabel text='No. of events'/>
|
107
|
+
<Text size='small' weight='medium'>1</Text>
|
108
|
+
</div>
|
109
|
+
</ToggleBox>
|
24
110
|
</div>
|
25
111
|
</Markup.ReactMarkupPreview>
|
26
112
|
<Markup.ReactMarkupCode>{`
|
27
|
-
<
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
113
|
+
<ToggleBox
|
114
|
+
variant='custom-header'
|
115
|
+
header={
|
116
|
+
<div role="listitem" className="sd-list-item sd-list-item--no-hover">
|
117
|
+
<div className="sd-list-item__border sd-list-item__border--locked"></div>
|
118
|
+
<div className="sd-list-item__column sd-list-item__column--no-border pe-0-5">
|
119
|
+
<Icon type='primary' name='calendar' scale='1.5x' ariaHidden={true} />
|
120
|
+
</div>
|
121
|
+
<div className="sd-list-item__column sd-list-item__column--grow sd-list-item__column--no-border">
|
122
|
+
<div className="sd-list-item__row">
|
123
|
+
<span className="sd-list-item__slugline">Planning Slugline</span>
|
124
|
+
</div>
|
125
|
+
<div className="sd-list-item__row sd-list-item__row--overflow-visible me-1 mb-1-5">
|
126
|
+
<Label text='draft' style='translucent'/>
|
127
|
+
<span className="sd-margin-s--auto">
|
128
|
+
<AvatarGroup
|
129
|
+
size="x-small"
|
130
|
+
items={avatars}
|
131
|
+
/>
|
132
|
+
</span>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
}
|
137
|
+
onToggle={() => false}
|
138
|
+
>
|
139
|
+
<div>
|
140
|
+
<FormLabel text='Name'/>
|
141
|
+
<Text size='small' weight='medium'>Australian Open 2024</Text>
|
142
|
+
</div>
|
143
|
+
<ContentDivider type="dashed" margin='x-small' />
|
144
|
+
<div>
|
145
|
+
<FormLabel text='Current Date'/>
|
146
|
+
<Text size='small' weight='medium'>05.02.2024 @ 10:00</Text>
|
147
|
+
</div>
|
148
|
+
<ContentDivider type="dashed" margin='x-small' />
|
149
|
+
<div>
|
150
|
+
<FormLabel text='Current Repeat Summary'/>
|
151
|
+
<Text size='small' weight='medium'>Every 1 day(s) until CET 28 Feb 2024</Text>
|
152
|
+
</div>
|
153
|
+
<ContentDivider type="dashed" margin='x-small' />
|
154
|
+
<div>
|
155
|
+
<FormLabel text='No. of events'/>
|
156
|
+
<Text size='small' weight='medium'>1</Text>
|
157
|
+
</div>
|
158
|
+
</ToggleBox>
|
33
159
|
`}</Markup.ReactMarkupCode>
|
34
160
|
</Markup.ReactMarkup>
|
35
161
|
|
36
162
|
<h3 className="docs-page__h3">Props</h3>
|
163
|
+
<PropsList>
|
164
|
+
<Prop name='variant' isRequired={true} type='simple | custom header' default='null' description='Type of component.' />
|
165
|
+
</PropsList>
|
166
|
+
|
167
|
+
<h3 className="docs-page__h3">Props: variant: 'simple'</h3>
|
37
168
|
<PropsList>
|
38
169
|
<Prop name='title' isRequired={true} type='string' default='null' description='Togglebox title' />
|
39
170
|
<Prop name='badge' isRequired={false} type='JSX.Element' default='null' description='Badge' />
|
@@ -44,6 +175,14 @@ const ToggleboxDocs = () => {
|
|
44
175
|
<Prop name='onOpen' isRequired={false} type='function' default='null' description='Callback on open event' />
|
45
176
|
<Prop name='onClose' isRequired={false} type='function' default='null' description='Callback on close event' />
|
46
177
|
</PropsList>
|
178
|
+
|
179
|
+
<h3 className="docs-page__h3">Props: variant: 'custom-header'</h3>
|
180
|
+
<PropsList>
|
181
|
+
<Prop name='header' isRequired={true} type='JSX.Component' default='null' description='Always visible part of component.' />
|
182
|
+
<Prop name='children' isRequired={false} type='JSX.Component' default='null' description='Appear on clicking the button.' />
|
183
|
+
<Prop name='initiallyOpen' isRequired={false} type='boolean' default='false' description='Opens togglebox on initial render.' />
|
184
|
+
<Prop name='onClose' isRequired={false} type='function' default='null' description='Callback on toggle.' />
|
185
|
+
</PropsList>
|
47
186
|
</section>
|
48
187
|
)
|
49
188
|
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as Markup from '../../../js/react';
|
3
|
+
|
4
|
+
class BorderRadiusUtilitiesDoc extends React.Component {
|
5
|
+
render() {
|
6
|
+
return (
|
7
|
+
<section className="docs-page__container">
|
8
|
+
<h2 className="docs-page__h2">Border Radius</h2>
|
9
|
+
<p className="docs-page__paragraph">
|
10
|
+
Utility classes for controlling the border radius of an element.
|
11
|
+
</p>
|
12
|
+
<div className='docs-page__container-block--position'>
|
13
|
+
<div className="utilities-table__container">
|
14
|
+
<table className="table utilities-table">
|
15
|
+
<thead>
|
16
|
+
<tr>
|
17
|
+
<th>Class</th>
|
18
|
+
<th>Properties</th>
|
19
|
+
</tr>
|
20
|
+
</thead>
|
21
|
+
<tbody>
|
22
|
+
<tr>
|
23
|
+
<td>radius-xs</td>
|
24
|
+
<td>{'border-radius: var(--b-radius--x-small);'} <span className="doc-text--highlight">/* 2px */</span></td>
|
25
|
+
</tr>
|
26
|
+
<tr>
|
27
|
+
<td>radius-sm</td>
|
28
|
+
<td>{'border-radius: var(--b-radius--small);'} <span className="doc-text--highlight">/* 3px */</span></td>
|
29
|
+
</tr>
|
30
|
+
<tr>
|
31
|
+
<td>radius-md</td>
|
32
|
+
<td>{'border-radius: var(--b-radius--medium);'} <span className="doc-text--highlight">/* 4px */</span></td>
|
33
|
+
</tr>
|
34
|
+
<tr>
|
35
|
+
<td>radius-lg</td>
|
36
|
+
<td>{'border-radius: var(--b-radius--large);'} <span className="doc-text--highlight">/* 6px */</span></td>
|
37
|
+
</tr>
|
38
|
+
<tr>
|
39
|
+
<td>radius-xl</td>
|
40
|
+
<td>{'border-radius: var(--b-radius--x-large);'} <span className="doc-text--highlight">/* 8px */</span></td>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<td>radius-full</td>
|
44
|
+
<td>{'border-radius: var(--b-radius--full);'} <span className="doc-text--highlight">/* 9999px */</span></td>
|
45
|
+
</tr>
|
46
|
+
</tbody>
|
47
|
+
</table>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</section>
|
52
|
+
)
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
export { BorderRadiusUtilitiesDoc };
|
@@ -0,0 +1,170 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as Markup from '../../../js/react';
|
3
|
+
|
4
|
+
class BorderUtilitiesDoc extends React.Component {
|
5
|
+
render() {
|
6
|
+
return (
|
7
|
+
<section className="docs-page__container">
|
8
|
+
<h2 className="docs-page__h2">Border</h2>
|
9
|
+
<p className="docs-page__paragraph">
|
10
|
+
Utility classes for controlling the borders of an element..
|
11
|
+
</p>
|
12
|
+
<div className='docs-page__container-block--border'>
|
13
|
+
<h3 className="docs-page__h3">Basic Border with neutral color</h3>
|
14
|
+
<p className='docs-page__paragraph'>
|
15
|
+
Utilities classes for adding a neutral 1px solid border to an element.
|
16
|
+
</p>
|
17
|
+
<div className="utilities-table__container">
|
18
|
+
<table className="table utilities-table">
|
19
|
+
<thead>
|
20
|
+
<tr>
|
21
|
+
<th>Class</th>
|
22
|
+
<th>Properties</th>
|
23
|
+
<th></th>
|
24
|
+
</tr>
|
25
|
+
</thead>
|
26
|
+
<tbody>
|
27
|
+
<tr>
|
28
|
+
<td>sd-border--x-light</td>
|
29
|
+
<td>{'border: 1px solid var(--sd-colour-line--x-light);'}</td>
|
30
|
+
<td><div className='border-example-box sd-border--x-light'></div></td>
|
31
|
+
</tr>
|
32
|
+
<tr>
|
33
|
+
<td>sd-border--light</td>
|
34
|
+
<td>{'border: 1px solid var(--sd-colour-line--light);'}</td>
|
35
|
+
<td><div className='border-example-box sd-border--light'></div></td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td>sd-border--medium</td>
|
39
|
+
<td>{'border: 1px solid var(--sd-colour-line--medium);'}</td>
|
40
|
+
<td><div className='border-example-box sd-border--medium'></div></td>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<td>sd-border--strong</td>
|
44
|
+
<td>{'border: 1px solid var(--sd-colour-line--strong);'}</td>
|
45
|
+
<td><div className='border-example-box sd-border--strong'></div></td>
|
46
|
+
</tr>
|
47
|
+
</tbody>
|
48
|
+
</table>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<div className='docs-page__container-block--border-width'>
|
53
|
+
<h3 className="docs-page__h3">Border Width</h3>
|
54
|
+
<p className='docs-page__paragraph'>
|
55
|
+
Utilities classes for overriding the border width of an element. Options are limited to common use cases.
|
56
|
+
</p>
|
57
|
+
<div className="utilities-table__container utilities-table__container--no-height">
|
58
|
+
<table className="table utilities-table">
|
59
|
+
<thead>
|
60
|
+
<tr>
|
61
|
+
<th>Class</th>
|
62
|
+
<th>Properties</th>
|
63
|
+
</tr>
|
64
|
+
</thead>
|
65
|
+
<tbody>
|
66
|
+
<tr>
|
67
|
+
<td>border-0</td>
|
68
|
+
<td>{'border-width: 0px;'}</td>
|
69
|
+
</tr>
|
70
|
+
<tr>
|
71
|
+
<td>border-1</td>
|
72
|
+
<td>{'border-width: 1px;'}</td>
|
73
|
+
</tr>
|
74
|
+
<tr>
|
75
|
+
<td>border-2</td>
|
76
|
+
<td>{'border-width: 2px;'}</td>
|
77
|
+
</tr>
|
78
|
+
<tr>
|
79
|
+
<td>border-3</td>
|
80
|
+
<td>{'border-width: 2px;'}</td>
|
81
|
+
</tr>
|
82
|
+
<tr>
|
83
|
+
<td>border-4</td>
|
84
|
+
<td>{'border-width: 4px;'}</td>
|
85
|
+
</tr>
|
86
|
+
<tr>
|
87
|
+
<td>border-x-0</td>
|
88
|
+
<td>
|
89
|
+
{'border-inline-start-width: 0px;'}<br />
|
90
|
+
{'border-inline-end-width: 0px;'}
|
91
|
+
|
92
|
+
</td>
|
93
|
+
</tr>
|
94
|
+
<tr>
|
95
|
+
<td>border-y-0</td>
|
96
|
+
<td>
|
97
|
+
{'border-block-start-width: 0px;'}<br />
|
98
|
+
{'border-block-end-width: 0px;'}
|
99
|
+
</td>
|
100
|
+
</tr>
|
101
|
+
<tr>
|
102
|
+
<td>border-s-0</td>
|
103
|
+
<td>
|
104
|
+
{'border-inline-start-width: 0px;'}
|
105
|
+
</td>
|
106
|
+
</tr>
|
107
|
+
<tr>
|
108
|
+
<td>border-e-0</td>
|
109
|
+
<td>
|
110
|
+
{'border-inline-end-width: 0px;'}
|
111
|
+
</td>
|
112
|
+
</tr>
|
113
|
+
<tr>
|
114
|
+
<td>border-t-0</td>
|
115
|
+
<td>
|
116
|
+
{'border-top: 0px;'}
|
117
|
+
</td>
|
118
|
+
</tr>
|
119
|
+
<tr>
|
120
|
+
<td>border-b-0</td>
|
121
|
+
<td>
|
122
|
+
{'border-bottom: 0px;'}
|
123
|
+
</td>
|
124
|
+
</tr>
|
125
|
+
</tbody>
|
126
|
+
</table>
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div className='docs-page__container-block--border-style'>
|
131
|
+
<h3 className="docs-page__h3">Border Style</h3>
|
132
|
+
<p className='docs-page__paragraph'>
|
133
|
+
Utilities classes for overriding the border style of an element.
|
134
|
+
</p>
|
135
|
+
<div className="utilities-table__container utilities-table__container--no-height">
|
136
|
+
<table className="table utilities-table">
|
137
|
+
<thead>
|
138
|
+
<tr>
|
139
|
+
<th>Class</th>
|
140
|
+
<th>Properties</th>
|
141
|
+
</tr>
|
142
|
+
</thead>
|
143
|
+
<tbody>
|
144
|
+
<tr>
|
145
|
+
<td>border-solid</td>
|
146
|
+
<td>{'border-style: solid;'}</td>
|
147
|
+
</tr>
|
148
|
+
<tr>
|
149
|
+
<td>border-dotted</td>
|
150
|
+
<td>{'border-style: dotted;'}</td>
|
151
|
+
</tr>
|
152
|
+
<tr>
|
153
|
+
<td>border-dashed</td>
|
154
|
+
<td>{'border-style: dashed;'}</td>
|
155
|
+
</tr>
|
156
|
+
<tr>
|
157
|
+
<td>border-double</td>
|
158
|
+
<td>{'border-style: double;'}</td>
|
159
|
+
</tr>
|
160
|
+
</tbody>
|
161
|
+
</table>
|
162
|
+
</div>
|
163
|
+
</div>
|
164
|
+
|
165
|
+
</section>
|
166
|
+
)
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
export { BorderUtilitiesDoc };
|