@scm-manager/ui-components 2.31.1 → 2.31.2-20220124-105541
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/package.json +5 -5
- package/src/Breadcrumb.tsx +34 -7
- package/src/DangerZone.tsx +7 -0
- package/src/__snapshots__/storyshots.test.ts.snap +2267 -3021
- package/src/buttons/ButtonGroup.tsx +1 -12
- package/src/forms/AddKeyValueEntryToTableField.tsx +15 -8
- package/src/layout/Page.tsx +8 -11
- package/src/markdown/LazyMarkdownView.tsx +230 -0
- package/src/markdown/MarkdownView.tsx +10 -203
- package/src/modals/Modal.tsx +4 -0
- package/src/repos/Diff.tsx +2 -2
- package/src/repos/DiffFile.tsx +10 -492
- package/src/repos/LazyDiffFile.tsx +520 -0
- package/src/repos/changesets/ChangesetRow.tsx +2 -2
- package/src/table/InfoTable.tsx +59 -0
- package/src/table/Table.stories.tsx +1 -0
- package/src/table/Table.tsx +5 -2
- package/src/table/index.ts +1 -0
- package/src/table/types.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scm-manager/ui-components",
|
|
3
|
-
"version": "2.31.
|
|
3
|
+
"version": "2.31.2-20220124-105541",
|
|
4
4
|
"description": "UI Components for SCM-Manager and its plugins",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@scm-manager/jest-preset": "^2.13.0",
|
|
26
26
|
"@scm-manager/prettier-config": "^2.10.1",
|
|
27
27
|
"@scm-manager/tsconfig": "^2.12.0",
|
|
28
|
-
"@scm-manager/ui-tests": "^2.31.
|
|
28
|
+
"@scm-manager/ui-tests": "^2.31.2-20220124-105541",
|
|
29
29
|
"@storybook/addon-actions": "^6.3.12",
|
|
30
30
|
"@storybook/addon-storyshots": "^6.3.12",
|
|
31
31
|
"@storybook/builder-webpack5": "^6.3.12",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@headlessui/react": "^1.4.3",
|
|
69
|
-
"@scm-manager/ui-api": "^2.31.
|
|
70
|
-
"@scm-manager/ui-extensions": "^2.31.
|
|
71
|
-
"@scm-manager/ui-types": "^2.31.
|
|
69
|
+
"@scm-manager/ui-api": "^2.31.2-20220124-105541",
|
|
70
|
+
"@scm-manager/ui-extensions": "^2.31.2-20220124-105541",
|
|
71
|
+
"@scm-manager/ui-types": "^2.31.2-20220124-105541",
|
|
72
72
|
"classnames": "^2.2.6",
|
|
73
73
|
"date-fns": "^2.4.1",
|
|
74
74
|
"deepmerge": "^4.2.2",
|
package/src/Breadcrumb.tsx
CHANGED
|
@@ -32,6 +32,7 @@ import { binder, ExtensionPoint, extensionPoints } from "@scm-manager/ui-extensi
|
|
|
32
32
|
import Icon from "./Icon";
|
|
33
33
|
import Tooltip from "./Tooltip";
|
|
34
34
|
import copyToClipboard from "./CopyToClipboard";
|
|
35
|
+
import { devices } from "./devices";
|
|
35
36
|
|
|
36
37
|
type Props = {
|
|
37
38
|
repository: Repository;
|
|
@@ -51,6 +52,13 @@ const PermaLinkWrapper = styled.span`
|
|
|
51
52
|
height: 16px;
|
|
52
53
|
font-size: 13px;
|
|
53
54
|
|
|
55
|
+
@media screen and (min-width: ${devices.tablet.width}px) {
|
|
56
|
+
margin-left: 0.25rem;
|
|
57
|
+
}
|
|
58
|
+
@media screen and (max-width: ${devices.mobile.width}px) {
|
|
59
|
+
margin-left: auto;
|
|
60
|
+
}
|
|
61
|
+
|
|
54
62
|
i {
|
|
55
63
|
color: #dbdbdb;
|
|
56
64
|
opacity: 0.75;
|
|
@@ -64,9 +72,10 @@ const PermaLinkWrapper = styled.span`
|
|
|
64
72
|
|
|
65
73
|
const BreadcrumbNav = styled.nav`
|
|
66
74
|
flex: 1;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
|
|
76
|
+
@media screen and (max-width: ${devices.mobile.width}px) {
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
}
|
|
70
79
|
|
|
71
80
|
/* move slash to end */
|
|
72
81
|
li + li::before {
|
|
@@ -198,7 +207,15 @@ const Breadcrumb: FC<Props> = ({
|
|
|
198
207
|
|
|
199
208
|
return (
|
|
200
209
|
<BreadcrumbNav
|
|
201
|
-
className={classNames(
|
|
210
|
+
className={classNames(
|
|
211
|
+
"breadcrumb",
|
|
212
|
+
"sources-breadcrumb",
|
|
213
|
+
"mx-2",
|
|
214
|
+
"my-4",
|
|
215
|
+
"is-flex",
|
|
216
|
+
"is-align-items-center",
|
|
217
|
+
"is-full-width"
|
|
218
|
+
)}
|
|
202
219
|
aria-label="breadcrumbs"
|
|
203
220
|
>
|
|
204
221
|
{prefixButtons}
|
|
@@ -214,7 +231,7 @@ const Breadcrumb: FC<Props> = ({
|
|
|
214
231
|
</li>
|
|
215
232
|
{pathSection()}
|
|
216
233
|
</ul>
|
|
217
|
-
<PermaLinkWrapper
|
|
234
|
+
<PermaLinkWrapper tabIndex={0} onKeyDown={e => e.key === "Enter" && copySource()}>
|
|
218
235
|
{copying ? (
|
|
219
236
|
<Icon name="spinner fa-spin" alt={t("breadcrumb.loading")} />
|
|
220
237
|
) : (
|
|
@@ -251,10 +268,20 @@ const Breadcrumb: FC<Props> = ({
|
|
|
251
268
|
|
|
252
269
|
return (
|
|
253
270
|
<>
|
|
254
|
-
<div
|
|
271
|
+
<div
|
|
272
|
+
className={classNames("is-flex", "is-justify-content-flex-end", "is-align-items-center", "is-flex-wrap-wrap")}
|
|
273
|
+
>
|
|
255
274
|
{renderBreadcrumbNav()}
|
|
256
275
|
{
|
|
257
|
-
<ActionBar
|
|
276
|
+
<ActionBar
|
|
277
|
+
className={classNames(
|
|
278
|
+
"is-flex",
|
|
279
|
+
"is-justify-content-flex-start",
|
|
280
|
+
"is-align-self-center",
|
|
281
|
+
"m-2",
|
|
282
|
+
"is-flex-wrap-wrap"
|
|
283
|
+
)}
|
|
284
|
+
>
|
|
258
285
|
{renderExtensionPoints()}
|
|
259
286
|
</ActionBar>
|
|
260
287
|
}
|
package/src/DangerZone.tsx
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import styled from "styled-components";
|
|
26
|
+
import { devices } from "./devices";
|
|
26
27
|
|
|
27
28
|
export const DangerZone = styled.div`
|
|
28
29
|
border: 1px solid #ff6a88;
|
|
@@ -45,6 +46,12 @@ export const DangerZone = styled.div`
|
|
|
45
46
|
padding-bottom: 1.5rem;
|
|
46
47
|
border-bottom: solid 2px whitesmoke;
|
|
47
48
|
}
|
|
49
|
+
@media screen and (max-width: ${devices.tablet.width}px) {
|
|
50
|
+
.button {
|
|
51
|
+
height: 100%;
|
|
52
|
+
white-space: break-spaces;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
48
55
|
`;
|
|
49
56
|
|
|
50
57
|
export default DangerZone;
|