@payloadcms/next 3.58.0-canary.1 → 3.58.0-internal.df9fce5
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/dist/elements/DocumentHeader/index.d.ts +0 -1
- package/dist/elements/DocumentHeader/index.d.ts.map +1 -1
- package/dist/elements/DocumentHeader/index.js +8 -15
- package/dist/elements/DocumentHeader/index.js.map +1 -1
- package/dist/elements/DocumentHeader/index.scss +7 -20
- package/dist/prod/styles.css +1 -1
- package/dist/views/Document/index.d.ts.map +1 -1
- package/dist/views/Document/index.js +0 -5
- package/dist/views/Document/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -2,7 +2,6 @@ import type { PayloadRequest, SanitizedCollectionConfig, SanitizedGlobalConfig,
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import './index.scss';
|
|
4
4
|
export declare const DocumentHeader: React.FC<{
|
|
5
|
-
AfterHeader?: React.ReactNode;
|
|
6
5
|
collectionConfig?: SanitizedCollectionConfig;
|
|
7
6
|
globalConfig?: SanitizedGlobalConfig;
|
|
8
7
|
hideTabs?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/DocumentHeader/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/DocumentHeader/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC;IACpC,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,oBAAoB,CAAA;IACjC,GAAG,EAAE,cAAc,CAAA;CACpB,CAgBA,CAAA"}
|
|
@@ -5,7 +5,6 @@ import { DocumentTabs } from './Tabs/index.js';
|
|
|
5
5
|
const baseClass = `doc-header`;
|
|
6
6
|
export const DocumentHeader = props => {
|
|
7
7
|
const {
|
|
8
|
-
AfterHeader,
|
|
9
8
|
collectionConfig,
|
|
10
9
|
globalConfig,
|
|
11
10
|
hideTabs,
|
|
@@ -14,20 +13,14 @@ export const DocumentHeader = props => {
|
|
|
14
13
|
} = props;
|
|
15
14
|
return /*#__PURE__*/_jsxs(Gutter, {
|
|
16
15
|
className: baseClass,
|
|
17
|
-
children: [/*#__PURE__*/
|
|
18
|
-
className: `${baseClass}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
req: req
|
|
26
|
-
})]
|
|
27
|
-
}), AfterHeader ? /*#__PURE__*/_jsx("div", {
|
|
28
|
-
className: `${baseClass}__after-header`,
|
|
29
|
-
children: AfterHeader
|
|
30
|
-
}) : null]
|
|
16
|
+
children: [/*#__PURE__*/_jsx(RenderTitle, {
|
|
17
|
+
className: `${baseClass}__title`
|
|
18
|
+
}), !hideTabs && /*#__PURE__*/_jsx(DocumentTabs, {
|
|
19
|
+
collectionConfig: collectionConfig,
|
|
20
|
+
globalConfig: globalConfig,
|
|
21
|
+
permissions: permissions,
|
|
22
|
+
req: req
|
|
23
|
+
})]
|
|
31
24
|
});
|
|
32
25
|
};
|
|
33
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Gutter","RenderTitle","React","DocumentTabs","baseClass","DocumentHeader","props","
|
|
1
|
+
{"version":3,"file":"index.js","names":["Gutter","RenderTitle","React","DocumentTabs","baseClass","DocumentHeader","props","collectionConfig","globalConfig","hideTabs","permissions","req","_jsxs","className","_jsx"],"sources":["../../../src/elements/DocumentHeader/index.tsx"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type {\n PayloadRequest,\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n SanitizedPermissions,\n} from 'payload'\n\nimport { Gutter, RenderTitle } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { DocumentTabs } from './Tabs/index.js'\nimport './index.scss'\n\nconst baseClass = `doc-header`\n\nexport const DocumentHeader: React.FC<{\n collectionConfig?: SanitizedCollectionConfig\n globalConfig?: SanitizedGlobalConfig\n hideTabs?: boolean\n permissions: SanitizedPermissions\n req: PayloadRequest\n}> = (props) => {\n const { collectionConfig, globalConfig, hideTabs, permissions, req } = props\n\n return (\n <Gutter className={baseClass}>\n <RenderTitle className={`${baseClass}__title`} />\n {!hideTabs && (\n <DocumentTabs\n collectionConfig={collectionConfig}\n globalConfig={globalConfig}\n permissions={permissions}\n req={req}\n />\n )}\n </Gutter>\n )\n}\n"],"mappings":";AAQA,SAASA,MAAM,EAAEC,WAAW,QAAQ;AACpC,OAAOC,KAAA,MAAW;AAElB,SAASC,YAAY,QAAQ;AAG7B,MAAMC,SAAA,GAAY,YAAY;AAE9B,OAAO,MAAMC,cAAA,GAMPC,KAAA;EACJ,MAAM;IAAEC,gBAAgB;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,WAAW;IAAEC;EAAG,CAAE,GAAGL,KAAA;EAEvE,oBACEM,KAAA,CAACZ,MAAA;IAAOa,SAAA,EAAWT,SAAA;4BACjBU,IAAA,CAACb,WAAA;MAAYY,SAAA,EAAW,GAAGT,SAAA;QAC1B,CAACK,QAAA,iBACAK,IAAA,CAACX,YAAA;MACCI,gBAAA,EAAkBA,gBAAA;MAClBC,YAAA,EAAcA,YAAA;MACdE,WAAA,EAAaA,WAAA;MACbC,GAAA,EAAKA;;;AAKf","ignoreList":[]}
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
width: 100%;
|
|
6
6
|
margin-top: base(0.4);
|
|
7
7
|
padding-bottom: calc(var(--base) * 1.2);
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
8
10
|
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: calc(var(--base) / 2);
|
|
9
13
|
|
|
10
14
|
&::after {
|
|
11
15
|
content: '';
|
|
@@ -18,12 +22,6 @@
|
|
|
18
22
|
top: calc(100% - 1px);
|
|
19
23
|
}
|
|
20
24
|
|
|
21
|
-
&__header {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
gap: calc(var(--base) / 2);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
25
|
&__title {
|
|
28
26
|
flex-grow: 1;
|
|
29
27
|
white-space: nowrap;
|
|
@@ -33,29 +31,18 @@
|
|
|
33
31
|
padding-bottom: base(0.4);
|
|
34
32
|
line-height: 1;
|
|
35
33
|
vertical-align: top;
|
|
36
|
-
padding-bottom: 0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&__after-header {
|
|
40
|
-
padding-top: var(--base);
|
|
41
34
|
}
|
|
42
35
|
|
|
43
36
|
@include mid-break {
|
|
44
37
|
margin-top: base(0.25);
|
|
45
38
|
padding-bottom: calc(var(--base) / 1.5);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
gap: calc(var(--base) / 2);
|
|
50
|
-
}
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: calc(var(--base) / 2);
|
|
41
|
+
padding-bottom: calc(var(--base) / 2);
|
|
51
42
|
|
|
52
43
|
&__title {
|
|
53
44
|
width: 100%;
|
|
54
45
|
}
|
|
55
|
-
|
|
56
|
-
&__after-header {
|
|
57
|
-
padding-top: calc(var(--base) / 4);
|
|
58
|
-
}
|
|
59
46
|
}
|
|
60
47
|
|
|
61
48
|
@include small-break {
|