@payloadcms/next 3.0.0-canary.4eb1bfc → 3.0.0-canary.51be7be

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.
Files changed (151) hide show
  1. package/dist/cjs/withPayload.cjs +145 -0
  2. package/dist/cjs/withPayload.cjs.map +1 -0
  3. package/dist/elements/DocumentHeader/Tabs/Tab/index.scss +70 -68
  4. package/dist/elements/DocumentHeader/Tabs/index.scss +41 -39
  5. package/dist/elements/DocumentHeader/index.scss +44 -42
  6. package/dist/elements/DocumentLocked/index.scss +28 -26
  7. package/dist/elements/DocumentTakeOver/index.scss +28 -26
  8. package/dist/elements/FormHeader/index.d.ts +9 -0
  9. package/dist/elements/FormHeader/index.d.ts.map +1 -0
  10. package/dist/elements/FormHeader/index.js +20 -0
  11. package/dist/elements/FormHeader/index.js.map +1 -0
  12. package/dist/elements/FormHeader/index.scss +8 -0
  13. package/dist/elements/LeaveWithoutSaving/index.scss +28 -26
  14. package/dist/elements/Nav/NavWrapper/index.scss +20 -18
  15. package/dist/elements/Nav/index.scss +127 -125
  16. package/dist/exports/utilities.d.ts +1 -0
  17. package/dist/exports/utilities.d.ts.map +1 -1
  18. package/dist/exports/utilities.js +1 -0
  19. package/dist/exports/utilities.js.map +1 -1
  20. package/dist/prod/styles.css +1 -1
  21. package/dist/routes/rest/auth/login.js +2 -2
  22. package/dist/routes/rest/auth/login.js.map +1 -1
  23. package/dist/routes/rest/auth/logout.d.ts.map +1 -1
  24. package/dist/routes/rest/auth/logout.js +3 -2
  25. package/dist/routes/rest/auth/logout.js.map +1 -1
  26. package/dist/routes/rest/auth/refresh.js +2 -2
  27. package/dist/routes/rest/auth/refresh.js.map +1 -1
  28. package/dist/routes/rest/auth/registerFirstUser.js +2 -2
  29. package/dist/routes/rest/auth/registerFirstUser.js.map +1 -1
  30. package/dist/routes/rest/auth/resetPassword.js +2 -2
  31. package/dist/routes/rest/auth/resetPassword.js.map +1 -1
  32. package/dist/routes/rest/collections/delete.d.ts.map +1 -1
  33. package/dist/routes/rest/collections/delete.js +2 -0
  34. package/dist/routes/rest/collections/delete.js.map +1 -1
  35. package/dist/routes/rest/collections/deleteByID.d.ts.map +1 -1
  36. package/dist/routes/rest/collections/deleteByID.js +2 -0
  37. package/dist/routes/rest/collections/deleteByID.js.map +1 -1
  38. package/dist/routes/rest/collections/update.d.ts.map +1 -1
  39. package/dist/routes/rest/collections/update.js +4 -0
  40. package/dist/routes/rest/collections/update.js.map +1 -1
  41. package/dist/routes/rest/collections/updateByID.d.ts.map +1 -1
  42. package/dist/routes/rest/collections/updateByID.js +2 -0
  43. package/dist/routes/rest/collections/updateByID.js.map +1 -1
  44. package/dist/scss/app.scss +166 -162
  45. package/dist/scss/colors.scss +256 -254
  46. package/dist/scss/resets.scss +9 -7
  47. package/dist/scss/toastify.scss +42 -40
  48. package/dist/scss/toasts.scss +105 -103
  49. package/dist/scss/type.scss +80 -79
  50. package/dist/templates/Default/Wrapper/index.scss +38 -36
  51. package/dist/templates/Default/index.scss +60 -58
  52. package/dist/templates/Minimal/index.scss +22 -20
  53. package/dist/utilities/initPage/handleAdminPage.d.ts +12 -11
  54. package/dist/utilities/initPage/handleAdminPage.d.ts.map +1 -1
  55. package/dist/utilities/initPage/handleAdminPage.js +9 -21
  56. package/dist/utilities/initPage/handleAdminPage.js.map +1 -1
  57. package/dist/utilities/initPage/handleAuthRedirect.d.ts +6 -3
  58. package/dist/utilities/initPage/handleAuthRedirect.d.ts.map +1 -1
  59. package/dist/utilities/initPage/handleAuthRedirect.js +23 -36
  60. package/dist/utilities/initPage/handleAuthRedirect.js.map +1 -1
  61. package/dist/utilities/initPage/index.d.ts +1 -1
  62. package/dist/utilities/initPage/index.d.ts.map +1 -1
  63. package/dist/utilities/initPage/index.js +21 -9
  64. package/dist/utilities/initPage/index.js.map +1 -1
  65. package/dist/utilities/initPage/shared.d.ts +2 -2
  66. package/dist/utilities/initPage/shared.d.ts.map +1 -1
  67. package/dist/utilities/initPage/shared.js +18 -13
  68. package/dist/utilities/initPage/shared.js.map +1 -1
  69. package/dist/views/API/RenderJSON/index.scss +68 -66
  70. package/dist/views/API/index.scss +98 -96
  71. package/dist/views/Account/Settings/index.scss +37 -35
  72. package/dist/views/Account/index.js +1 -1
  73. package/dist/views/Account/index.js.map +1 -1
  74. package/dist/views/CreateFirstUser/index.client.d.ts.map +1 -1
  75. package/dist/views/CreateFirstUser/index.client.js +1 -1
  76. package/dist/views/CreateFirstUser/index.client.js.map +1 -1
  77. package/dist/views/CreateFirstUser/index.scss +13 -11
  78. package/dist/views/Dashboard/Default/index.scss +51 -49
  79. package/dist/views/Edit/Default/Auth/index.scss +56 -54
  80. package/dist/views/Edit/Default/index.js +1 -1
  81. package/dist/views/Edit/Default/index.js.map +1 -1
  82. package/dist/views/Edit/Default/index.scss +15 -13
  83. package/dist/views/ForgotPassword/ForgotPasswordForm/index.d.ts.map +1 -1
  84. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +9 -11
  85. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
  86. package/dist/views/ForgotPassword/index.d.ts.map +1 -1
  87. package/dist/views/ForgotPassword/index.js +6 -6
  88. package/dist/views/ForgotPassword/index.js.map +1 -1
  89. package/dist/views/List/Default/index.scss +136 -134
  90. package/dist/views/LivePreview/IFrame/index.scss +8 -6
  91. package/dist/views/LivePreview/Preview/index.scss +32 -30
  92. package/dist/views/LivePreview/Toolbar/Controls/index.scss +49 -47
  93. package/dist/views/LivePreview/Toolbar/SizeInput/index.scss +11 -9
  94. package/dist/views/LivePreview/Toolbar/index.scss +33 -31
  95. package/dist/views/LivePreview/ToolbarArea/index.scss +5 -3
  96. package/dist/views/LivePreview/index.scss +48 -46
  97. package/dist/views/Login/LoginForm/index.d.ts.map +1 -1
  98. package/dist/views/Login/LoginForm/index.js +1 -1
  99. package/dist/views/Login/LoginForm/index.js.map +1 -1
  100. package/dist/views/Login/LoginForm/index.scss +8 -6
  101. package/dist/views/Login/index.scss +8 -6
  102. package/dist/views/Logout/LogoutClient.d.ts.map +1 -1
  103. package/dist/views/Logout/LogoutClient.js +77 -55
  104. package/dist/views/Logout/LogoutClient.js.map +1 -1
  105. package/dist/views/Logout/index.scss +17 -15
  106. package/dist/views/NotFound/index.scss +38 -36
  107. package/dist/views/ResetPassword/ResetPasswordForm/index.d.ts +7 -0
  108. package/dist/views/ResetPassword/ResetPasswordForm/index.d.ts.map +1 -0
  109. package/dist/views/ResetPassword/{index.client.js → ResetPasswordForm/index.js} +16 -19
  110. package/dist/views/ResetPassword/ResetPasswordForm/index.js.map +1 -0
  111. package/dist/views/ResetPassword/index.d.ts.map +1 -1
  112. package/dist/views/ResetPassword/index.js +17 -10
  113. package/dist/views/ResetPassword/index.js.map +1 -1
  114. package/dist/views/ResetPassword/index.scss +6 -26
  115. package/dist/views/Root/getViewFromConfig.d.ts.map +1 -1
  116. package/dist/views/Root/getViewFromConfig.js +0 -6
  117. package/dist/views/Root/getViewFromConfig.js.map +1 -1
  118. package/dist/views/Root/index.d.ts.map +1 -1
  119. package/dist/views/Root/index.js +5 -2
  120. package/dist/views/Root/index.js.map +1 -1
  121. package/dist/views/Unauthorized/index.d.ts.map +1 -1
  122. package/dist/views/Unauthorized/index.js +14 -7
  123. package/dist/views/Unauthorized/index.js.map +1 -1
  124. package/dist/views/Unauthorized/index.scss +4 -31
  125. package/dist/views/Verify/index.client.d.ts +7 -0
  126. package/dist/views/Verify/index.client.d.ts.map +1 -0
  127. package/dist/views/Verify/index.client.js +46 -0
  128. package/dist/views/Verify/index.client.js.map +1 -0
  129. package/dist/views/Verify/index.d.ts.map +1 -1
  130. package/dist/views/Verify/index.js +12 -11
  131. package/dist/views/Verify/index.js.map +1 -1
  132. package/dist/views/Verify/index.scss +13 -11
  133. package/dist/views/Version/Default/index.scss +52 -50
  134. package/dist/views/Version/RenderFieldsToDiff/Label/index.scss +5 -3
  135. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.scss +29 -27
  136. package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.scss +11 -9
  137. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.scss +12 -10
  138. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.scss +12 -10
  139. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.scss +12 -10
  140. package/dist/views/Version/RenderFieldsToDiff/index.scss +12 -10
  141. package/dist/views/Version/Restore/index.scss +57 -55
  142. package/dist/views/Version/SelectComparison/index.scss +12 -10
  143. package/dist/views/Version/SelectLocales/index.scss +6 -4
  144. package/dist/views/Versions/index.js.map +1 -1
  145. package/dist/views/Versions/index.scss +78 -76
  146. package/package.json +9 -9
  147. package/dist/cjs/withPayload.js +0 -111
  148. package/dist/cjs/withPayload.js.map +0 -1
  149. package/dist/views/ResetPassword/index.client.d.ts +0 -7
  150. package/dist/views/ResetPassword/index.client.d.ts.map +0 -1
  151. package/dist/views/ResetPassword/index.client.js.map +0 -1
@@ -0,0 +1,145 @@
1
+ /**
2
+ * @param {import('next').NextConfig} nextConfig
3
+ *
4
+ * @returns {import('next').NextConfig}
5
+ * */ "use strict";
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ function _export(target, all) {
10
+ for(var name in all)Object.defineProperty(target, name, {
11
+ enumerable: true,
12
+ get: all[name]
13
+ });
14
+ }
15
+ _export(exports, {
16
+ default: function() {
17
+ return _default;
18
+ },
19
+ withPayload: function() {
20
+ return withPayload;
21
+ }
22
+ });
23
+ const withPayload = (nextConfig = {})=>{
24
+ const env = nextConfig?.env || {};
25
+ if (nextConfig.experimental?.staleTimes?.dynamic) {
26
+ console.warn('Payload detected a non-zero value for the `staleTimes.dynamic` option in your Next.js config. This will slow down page transitions and may cause stale data to load within the Admin panel. To clear this warning, remove the `staleTimes.dynamic` option from your Next.js config or set it to 0. In the future, Next.js may support scoping this option to specific routes.');
27
+ env.NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH = 'true';
28
+ }
29
+ /**
30
+ * @type {import('next').NextConfig}
31
+ */ const toReturn = {
32
+ ...nextConfig,
33
+ env,
34
+ outputFileTracingExcludes: {
35
+ ...nextConfig?.outputFileTracingExcludes || {},
36
+ '**/*': [
37
+ ...nextConfig?.outputFileTracingExcludes?.['**/*'] || [],
38
+ 'drizzle-kit',
39
+ 'drizzle-kit/api'
40
+ ]
41
+ },
42
+ outputFileTracingIncludes: {
43
+ ...nextConfig?.outputFileTracingIncludes || {},
44
+ '**/*': [
45
+ ...nextConfig?.outputFileTracingIncludes?.['**/*'] || [],
46
+ '@libsql/client'
47
+ ]
48
+ },
49
+ experimental: {
50
+ ...nextConfig?.experimental || {},
51
+ turbo: {
52
+ ...nextConfig?.experimental?.turbo || {},
53
+ resolveAlias: {
54
+ ...nextConfig?.experimental?.turbo?.resolveAlias || {},
55
+ 'payload-mock-package': 'payload-mock-package'
56
+ }
57
+ }
58
+ },
59
+ headers: async ()=>{
60
+ const headersFromConfig = 'headers' in nextConfig ? await nextConfig.headers() : [];
61
+ return [
62
+ ...headersFromConfig || [],
63
+ {
64
+ source: '/:path*',
65
+ headers: [
66
+ {
67
+ key: 'Accept-CH',
68
+ value: 'Sec-CH-Prefers-Color-Scheme'
69
+ },
70
+ {
71
+ key: 'Vary',
72
+ value: 'Sec-CH-Prefers-Color-Scheme'
73
+ },
74
+ {
75
+ key: 'Critical-CH',
76
+ value: 'Sec-CH-Prefers-Color-Scheme'
77
+ }
78
+ ]
79
+ }
80
+ ];
81
+ },
82
+ serverExternalPackages: [
83
+ ...nextConfig?.serverExternalPackages || [],
84
+ 'drizzle-kit',
85
+ 'drizzle-kit/api',
86
+ 'pino',
87
+ 'libsql',
88
+ 'pino-pretty',
89
+ 'graphql'
90
+ ],
91
+ webpack: (webpackConfig, webpackOptions)=>{
92
+ const incomingWebpackConfig = typeof nextConfig.webpack === 'function' ? nextConfig.webpack(webpackConfig, webpackOptions) : webpackConfig;
93
+ return {
94
+ ...incomingWebpackConfig,
95
+ externals: [
96
+ ...incomingWebpackConfig?.externals || [],
97
+ 'drizzle-kit',
98
+ 'drizzle-kit/api',
99
+ 'sharp',
100
+ 'libsql'
101
+ ],
102
+ ignoreWarnings: [
103
+ ...incomingWebpackConfig?.ignoreWarnings || [],
104
+ {
105
+ module: /node_modules\/mongodb\/lib\/utils\.js/
106
+ },
107
+ {
108
+ file: /node_modules\/mongodb\/lib\/utils\.js/
109
+ },
110
+ {
111
+ module: /node_modules\/mongodb\/lib\/bson\.js/
112
+ },
113
+ {
114
+ file: /node_modules\/mongodb\/lib\/bson\.js/
115
+ }
116
+ ],
117
+ resolve: {
118
+ ...incomingWebpackConfig?.resolve || {},
119
+ alias: {
120
+ ...incomingWebpackConfig?.resolve?.alias || {}
121
+ },
122
+ fallback: {
123
+ ...incomingWebpackConfig?.resolve?.fallback || {},
124
+ '@aws-sdk/credential-providers': false,
125
+ '@mongodb-js/zstd': false,
126
+ aws4: false,
127
+ kerberos: false,
128
+ 'mongodb-client-encryption': false,
129
+ snappy: false,
130
+ 'supports-color': false,
131
+ 'yocto-queue': false
132
+ }
133
+ }
134
+ };
135
+ }
136
+ };
137
+ if (nextConfig.basePath) {
138
+ toReturn.env.NEXT_BASE_PATH = nextConfig.basePath;
139
+ }
140
+ return toReturn;
141
+ };
142
+ const _default = withPayload;
143
+
144
+
145
+ //# sourceMappingURL=withPayload.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/withPayload.js"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;IA0HH,OAA0B;eAA1B;;IAzHa,WAAW;eAAX;;;AAAN,MAAM,cAAc,CAAC,aAAa,CAAC,CAAC;IACzC,MAAM,MAAM,YAAY,OAAO,CAAC;IAEhC,IAAI,WAAW,YAAY,EAAE,YAAY,SAAS;QAChD,QAAQ,IAAI,CACV;QAEF,IAAI,uCAAuC,GAAG;IAChD;IAEA;;GAEC,GACD,MAAM,WAAW;QACf,GAAG,UAAU;QACb;QACA,2BAA2B;YACzB,GAAI,YAAY,6BAA6B,CAAC,CAAC;YAC/C,QAAQ;mBACF,YAAY,2BAA2B,CAAC,OAAO,IAAI,EAAE;gBACzD;gBACA;aACD;QACH;QACA,2BAA2B;YACzB,GAAI,YAAY,6BAA6B,CAAC,CAAC;YAC/C,QAAQ;mBAAK,YAAY,2BAA2B,CAAC,OAAO,IAAI,EAAE;gBAAG;aAAiB;QACxF;QACA,cAAc;YACZ,GAAI,YAAY,gBAAgB,CAAC,CAAC;YAClC,OAAO;gBACL,GAAI,YAAY,cAAc,SAAS,CAAC,CAAC;gBACzC,cAAc;oBACZ,GAAI,YAAY,cAAc,OAAO,gBAAgB,CAAC,CAAC;oBACvD,wBAAwB;gBAC1B;YACF;QACF;QACA,SAAS;YACP,MAAM,oBAAoB,aAAa,aAAa,MAAM,WAAW,OAAO,KAAK,EAAE;YAEnF,OAAO;mBACD,qBAAqB,EAAE;gBAC3B;oBACE,QAAQ;oBACR,SAAS;wBACP;4BACE,KAAK;4BACL,OAAO;wBACT;wBACA;4BACE,KAAK;4BACL,OAAO;wBACT;wBACA;4BACE,KAAK;4BACL,OAAO;wBACT;qBACD;gBACH;aACD;QACH;QACA,wBAAwB;eAClB,YAAY,0BAA0B,EAAE;YAC5C;YACA;YACA;YACA;YACA;YACA;SACD;QACD,SAAS,CAAC,eAAe;YACvB,MAAM,wBACJ,OAAO,WAAW,OAAO,KAAK,aAC1B,WAAW,OAAO,CAAC,eAAe,kBAClC;YAEN,OAAO;gBACL,GAAG,qBAAqB;gBACxB,WAAW;uBACL,uBAAuB,aAAa,EAAE;oBAC1C;oBACA;oBACA;oBACA;iBACD;gBACD,gBAAgB;uBACV,uBAAuB,kBAAkB,EAAE;oBAC/C;wBAAE,QAAQ;oBAAwC;oBAClD;wBAAE,MAAM;oBAAwC;oBAChD;wBAAE,QAAQ;oBAAuC;oBACjD;wBAAE,MAAM;oBAAuC;iBAChD;gBACD,SAAS;oBACP,GAAI,uBAAuB,WAAW,CAAC,CAAC;oBACxC,OAAO;wBACL,GAAI,uBAAuB,SAAS,SAAS,CAAC,CAAC;oBACjD;oBACA,UAAU;wBACR,GAAI,uBAAuB,SAAS,YAAY,CAAC,CAAC;wBAClD,iCAAiC;wBACjC,oBAAoB;wBACpB,MAAM;wBACN,UAAU;wBACV,6BAA6B;wBAC7B,QAAQ;wBACR,kBAAkB;wBAClB,eAAe;oBACjB;gBACF;YACF;QACF;IACF;IAEA,IAAI,WAAW,QAAQ,EAAE;QACvB,SAAS,GAAG,CAAC,cAAc,GAAG,WAAW,QAAQ;IACnD;IAEA,OAAO;AACT;MAEA,WAAe","file":"withPayload.cjs","sourcesContent":["/**\n * @param {import('next').NextConfig} nextConfig\n *\n * @returns {import('next').NextConfig}\n * */\nexport const withPayload = (nextConfig = {}) => {\n const env = nextConfig?.env || {}\n\n if (nextConfig.experimental?.staleTimes?.dynamic) {\n console.warn(\n 'Payload detected a non-zero value for the `staleTimes.dynamic` option in your Next.js config. This will slow down page transitions and may cause stale data to load within the Admin panel. To clear this warning, remove the `staleTimes.dynamic` option from your Next.js config or set it to 0. In the future, Next.js may support scoping this option to specific routes.',\n )\n env.NEXT_PUBLIC_ENABLE_ROUTER_CACHE_REFRESH = 'true'\n }\n\n /**\n * @type {import('next').NextConfig}\n */\n const toReturn = {\n ...nextConfig,\n env,\n outputFileTracingExcludes: {\n ...(nextConfig?.outputFileTracingExcludes || {}),\n '**/*': [\n ...(nextConfig?.outputFileTracingExcludes?.['**/*'] || []),\n 'drizzle-kit',\n 'drizzle-kit/api',\n ],\n },\n outputFileTracingIncludes: {\n ...(nextConfig?.outputFileTracingIncludes || {}),\n '**/*': [...(nextConfig?.outputFileTracingIncludes?.['**/*'] || []), '@libsql/client'],\n },\n experimental: {\n ...(nextConfig?.experimental || {}),\n turbo: {\n ...(nextConfig?.experimental?.turbo || {}),\n resolveAlias: {\n ...(nextConfig?.experimental?.turbo?.resolveAlias || {}),\n 'payload-mock-package': 'payload-mock-package',\n },\n },\n },\n headers: async () => {\n const headersFromConfig = 'headers' in nextConfig ? await nextConfig.headers() : []\n\n return [\n ...(headersFromConfig || []),\n {\n source: '/:path*',\n headers: [\n {\n key: 'Accept-CH',\n value: 'Sec-CH-Prefers-Color-Scheme',\n },\n {\n key: 'Vary',\n value: 'Sec-CH-Prefers-Color-Scheme',\n },\n {\n key: 'Critical-CH',\n value: 'Sec-CH-Prefers-Color-Scheme',\n },\n ],\n },\n ]\n },\n serverExternalPackages: [\n ...(nextConfig?.serverExternalPackages || []),\n 'drizzle-kit',\n 'drizzle-kit/api',\n 'pino',\n 'libsql',\n 'pino-pretty',\n 'graphql',\n ],\n webpack: (webpackConfig, webpackOptions) => {\n const incomingWebpackConfig =\n typeof nextConfig.webpack === 'function'\n ? nextConfig.webpack(webpackConfig, webpackOptions)\n : webpackConfig\n\n return {\n ...incomingWebpackConfig,\n externals: [\n ...(incomingWebpackConfig?.externals || []),\n 'drizzle-kit',\n 'drizzle-kit/api',\n 'sharp',\n 'libsql',\n ],\n ignoreWarnings: [\n ...(incomingWebpackConfig?.ignoreWarnings || []),\n { module: /node_modules\\/mongodb\\/lib\\/utils\\.js/ },\n { file: /node_modules\\/mongodb\\/lib\\/utils\\.js/ },\n { module: /node_modules\\/mongodb\\/lib\\/bson\\.js/ },\n { file: /node_modules\\/mongodb\\/lib\\/bson\\.js/ },\n ],\n resolve: {\n ...(incomingWebpackConfig?.resolve || {}),\n alias: {\n ...(incomingWebpackConfig?.resolve?.alias || {}),\n },\n fallback: {\n ...(incomingWebpackConfig?.resolve?.fallback || {}),\n '@aws-sdk/credential-providers': false,\n '@mongodb-js/zstd': false,\n aws4: false,\n kerberos: false,\n 'mongodb-client-encryption': false,\n snappy: false,\n 'supports-color': false,\n 'yocto-queue': false,\n },\n },\n }\n },\n }\n\n if (nextConfig.basePath) {\n toReturn.env.NEXT_BASE_PATH = nextConfig.basePath\n }\n\n return toReturn\n}\n\nexport default withPayload\n"]}
@@ -1,93 +1,95 @@
1
1
  @import '../../../../scss/styles.scss';
2
2
 
3
- .doc-tab {
4
- @extend %h5;
5
- position: relative;
3
+ @layer payload-default {
4
+ .doc-tab {
5
+ @extend %h5;
6
+ position: relative;
6
7
 
7
- &__link {
8
- text-decoration: none;
9
- display: flex;
10
- justify-content: center;
11
- align-items: center;
12
- white-space: nowrap;
8
+ &__link {
9
+ text-decoration: none;
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ white-space: nowrap;
13
14
 
14
- // Use a pseudo element for the accessability so that it doesn't take up DOM space
15
- // Also because the parent element has `overflow: hidden` which would clip an outline
16
- &:focus-visible::after {
17
- content: '';
18
- border: var(--accessibility-outline);
19
- position: absolute;
20
- top: 0;
21
- right: 0;
22
- bottom: 0;
23
- left: 0;
24
- pointer-events: none;
15
+ // Use a pseudo element for the accessability so that it doesn't take up DOM space
16
+ // Also because the parent element has `overflow: hidden` which would clip an outline
17
+ &:focus-visible::after {
18
+ content: '';
19
+ border: var(--accessibility-outline);
20
+ position: absolute;
21
+ top: 0;
22
+ right: 0;
23
+ bottom: 0;
24
+ left: 0;
25
+ pointer-events: none;
26
+ }
25
27
  }
26
- }
27
-
28
- &:focus:not(:focus-visible) {
29
- opacity: 1;
30
- }
31
-
32
- &::before {
33
- content: '';
34
- display: block;
35
- position: absolute;
36
- width: 100%;
37
- height: 100%;
38
- border-radius: var(--style-radius-s);
39
- background-color: var(--theme-elevation-50);
40
- opacity: 0;
41
- }
42
28
 
43
- &:hover {
44
- &::before {
29
+ &:focus:not(:focus-visible) {
45
30
  opacity: 1;
46
31
  }
47
32
 
48
- .doc-tab__count {
49
- background-color: var(--theme-elevation-150);
50
- }
51
- }
52
-
53
- &--active {
54
- font-weight: 600;
55
33
  &::before {
56
- opacity: 1;
57
- background-color: var(--theme-elevation-100);
34
+ content: '';
35
+ display: block;
36
+ position: absolute;
37
+ width: 100%;
38
+ height: 100%;
39
+ border-radius: var(--style-radius-s);
40
+ background-color: var(--theme-elevation-50);
41
+ opacity: 0;
58
42
  }
59
43
 
60
- .doc-tab {
61
- &__count {
62
- background-color: var(--theme-elevation-250);
44
+ &:hover {
45
+ &::before {
46
+ opacity: 1;
47
+ }
48
+
49
+ .doc-tab__count {
50
+ background-color: var(--theme-elevation-150);
63
51
  }
64
52
  }
65
53
 
66
- &:hover {
54
+ &--active {
55
+ font-weight: 600;
56
+ &::before {
57
+ opacity: 1;
58
+ background-color: var(--theme-elevation-100);
59
+ }
60
+
67
61
  .doc-tab {
68
62
  &__count {
69
63
  background-color: var(--theme-elevation-250);
70
64
  }
71
65
  }
66
+
67
+ &:hover {
68
+ .doc-tab {
69
+ &__count {
70
+ background-color: var(--theme-elevation-250);
71
+ }
72
+ }
73
+ }
72
74
  }
73
- }
74
75
 
75
- &__label {
76
- display: flex;
77
- position: relative;
78
- align-items: center;
79
- gap: 4px;
80
- width: 100%;
81
- height: 100%;
82
- line-height: base(1.2);
83
- padding: base(0.2) base(0.6);
84
- }
76
+ &__label {
77
+ display: flex;
78
+ position: relative;
79
+ align-items: center;
80
+ gap: 4px;
81
+ width: 100%;
82
+ height: 100%;
83
+ line-height: base(1.2);
84
+ padding: base(0.2) base(0.6);
85
+ }
85
86
 
86
- &__count {
87
- line-height: base(0.8);
88
- min-width: base(0.8);
89
- text-align: center;
90
- background-color: var(--theme-elevation-100);
91
- border-radius: var(--style-radius-s);
87
+ &__count {
88
+ line-height: base(0.8);
89
+ min-width: base(0.8);
90
+ text-align: center;
91
+ background-color: var(--theme-elevation-100);
92
+ border-radius: var(--style-radius-s);
93
+ }
92
94
  }
93
95
  }
@@ -1,52 +1,54 @@
1
1
  @import '../../../scss/styles.scss';
2
2
 
3
- .doc-tabs {
4
- display: flex;
5
-
6
- &__tabs {
3
+ @layer payload-default {
4
+ .doc-tabs {
7
5
  display: flex;
8
- gap: calc(var(--base) / 2);
9
- list-style: none;
10
- align-items: center;
11
- margin: 0;
12
- padding-left: 0;
13
- }
14
-
15
- @include mid-break {
16
- width: 100%;
17
- padding: 0;
18
- overflow: auto;
19
-
20
- // this container has a gradient overlay as visual indication of `overflow: scroll`
21
- &::-webkit-scrollbar {
22
- display: none;
23
- }
24
6
 
25
- &::after {
26
- content: '';
27
- display: block;
28
- position: sticky;
29
- right: 0;
30
- width: calc(var(--base) * 2);
31
- height: calc(var(--base) * 2);
32
- background: linear-gradient(to right, transparent, var(--theme-bg));
33
- flex-shrink: 0;
34
- z-index: 1111;
35
- pointer-events: none;
7
+ &__tabs {
8
+ display: flex;
9
+ gap: calc(var(--base) / 2);
10
+ list-style: none;
11
+ align-items: center;
12
+ margin: 0;
13
+ padding-left: 0;
36
14
  }
37
15
 
38
- &__tabs {
16
+ @include mid-break {
17
+ width: 100%;
39
18
  padding: 0;
19
+ overflow: auto;
20
+
21
+ // this container has a gradient overlay as visual indication of `overflow: scroll`
22
+ &::-webkit-scrollbar {
23
+ display: none;
24
+ }
25
+
26
+ &::after {
27
+ content: '';
28
+ display: block;
29
+ position: sticky;
30
+ right: 0;
31
+ width: calc(var(--base) * 2);
32
+ height: calc(var(--base) * 2);
33
+ background: linear-gradient(to right, transparent, var(--theme-bg));
34
+ flex-shrink: 0;
35
+ z-index: 1111;
36
+ pointer-events: none;
37
+ }
38
+
39
+ &__tabs {
40
+ padding: 0;
41
+ }
40
42
  }
41
- }
42
43
 
43
- @include small-break {
44
- &__tabs-container {
45
- margin-right: var(--gutter-h);
46
- }
44
+ @include small-break {
45
+ &__tabs-container {
46
+ margin-right: var(--gutter-h);
47
+ }
47
48
 
48
- &__tabs {
49
- gap: var(--gutter-h);
49
+ &__tabs {
50
+ gap: var(--gutter-h);
51
+ }
50
52
  }
51
53
  }
52
54
  }
@@ -1,52 +1,54 @@
1
1
  @import '../../scss/styles.scss';
2
2
 
3
- .doc-header {
4
- width: 100%;
5
- margin-top: base(0.4);
6
- padding-bottom: calc(var(--base) * 1.2);
7
- display: flex;
8
- align-items: center;
9
- position: relative;
10
- display: flex;
11
- gap: calc(var(--base) / 2);
12
-
13
- &::after {
14
- content: '';
15
- display: block;
16
- position: absolute;
17
- height: 1px;
18
- background: var(--theme-elevation-100);
3
+ @layer payload-default {
4
+ .doc-header {
19
5
  width: 100%;
20
- left: 0;
21
- top: calc(100% - 1px);
22
- }
23
-
24
- &__title {
25
- flex-grow: 1;
26
- white-space: nowrap;
27
- overflow: hidden;
28
- text-overflow: ellipsis;
29
- margin: 0;
30
- padding-bottom: base(0.4);
31
- line-height: 1;
32
- vertical-align: top;
33
- }
34
-
35
- @include mid-break {
36
- padding-left: 0;
37
- padding-right: 0;
38
- margin-top: base(0.25);
39
- padding-bottom: calc(var(--base) / 1.5);
40
- flex-direction: column;
6
+ margin-top: base(0.4);
7
+ padding-bottom: calc(var(--base) * 1.2);
8
+ display: flex;
9
+ align-items: center;
10
+ position: relative;
11
+ display: flex;
41
12
  gap: calc(var(--base) / 2);
42
- padding-bottom: calc(var(--base) / 2);
43
13
 
44
- &__title {
14
+ &::after {
15
+ content: '';
16
+ display: block;
17
+ position: absolute;
18
+ height: 1px;
19
+ background: var(--theme-elevation-100);
45
20
  width: 100%;
21
+ left: 0;
22
+ top: calc(100% - 1px);
46
23
  }
47
- }
48
24
 
49
- @include small-break {
50
- margin-top: 0;
25
+ &__title {
26
+ flex-grow: 1;
27
+ white-space: nowrap;
28
+ overflow: hidden;
29
+ text-overflow: ellipsis;
30
+ margin: 0;
31
+ padding-bottom: base(0.4);
32
+ line-height: 1;
33
+ vertical-align: top;
34
+ }
35
+
36
+ @include mid-break {
37
+ padding-left: 0;
38
+ padding-right: 0;
39
+ margin-top: base(0.25);
40
+ padding-bottom: calc(var(--base) / 1.5);
41
+ flex-direction: column;
42
+ gap: calc(var(--base) / 2);
43
+ padding-bottom: calc(var(--base) / 2);
44
+
45
+ &__title {
46
+ width: 100%;
47
+ }
48
+ }
49
+
50
+ @include small-break {
51
+ margin-top: 0;
52
+ }
51
53
  }
52
54
  }
@@ -1,37 +1,39 @@
1
1
  @import '../../scss/styles.scss';
2
2
 
3
- .document-locked {
4
- @include blur-bg;
5
- display: flex;
6
- align-items: center;
7
- justify-content: center;
8
- height: 100%;
9
-
10
- &__wrapper {
11
- z-index: 1;
12
- position: relative;
3
+ @layer payload-default {
4
+ .document-locked {
5
+ @include blur-bg;
13
6
  display: flex;
14
- flex-direction: column;
15
- gap: var(--base);
16
- padding: base(2);
17
- }
7
+ align-items: center;
8
+ justify-content: center;
9
+ height: 100%;
18
10
 
19
- &__content {
20
- display: flex;
21
- flex-direction: column;
22
- gap: var(--base);
11
+ &__wrapper {
12
+ z-index: 1;
13
+ position: relative;
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: var(--base);
17
+ padding: base(2);
18
+ }
23
19
 
24
- > * {
25
- margin: 0;
20
+ &__content {
21
+ display: flex;
22
+ flex-direction: column;
23
+ gap: var(--base);
24
+
25
+ > * {
26
+ margin: 0;
27
+ }
26
28
  }
27
- }
28
29
 
29
- &__controls {
30
- display: flex;
31
- gap: var(--base);
30
+ &__controls {
31
+ display: flex;
32
+ gap: var(--base);
32
33
 
33
- .btn {
34
- margin: 0;
34
+ .btn {
35
+ margin: 0;
36
+ }
35
37
  }
36
38
  }
37
39
  }
@@ -1,37 +1,39 @@
1
1
  @import '../../scss/styles.scss';
2
2
 
3
- .document-take-over {
4
- @include blur-bg;
5
- display: flex;
6
- align-items: center;
7
- justify-content: center;
8
- height: 100%;
9
-
10
- &__wrapper {
11
- z-index: 1;
12
- position: relative;
3
+ @layer payload-default {
4
+ .document-take-over {
5
+ @include blur-bg;
13
6
  display: flex;
14
- flex-direction: column;
15
- gap: var(--base);
16
- padding: base(2);
17
- }
7
+ align-items: center;
8
+ justify-content: center;
9
+ height: 100%;
18
10
 
19
- &__content {
20
- display: flex;
21
- flex-direction: column;
22
- gap: var(--base);
11
+ &__wrapper {
12
+ z-index: 1;
13
+ position: relative;
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: var(--base);
17
+ padding: base(2);
18
+ }
23
19
 
24
- > * {
25
- margin: 0;
20
+ &__content {
21
+ display: flex;
22
+ flex-direction: column;
23
+ gap: var(--base);
24
+
25
+ > * {
26
+ margin: 0;
27
+ }
26
28
  }
27
- }
28
29
 
29
- &__controls {
30
- display: flex;
31
- gap: var(--base);
30
+ &__controls {
31
+ display: flex;
32
+ gap: var(--base);
32
33
 
33
- .btn {
34
- margin: 0;
34
+ .btn {
35
+ margin: 0;
36
+ }
35
37
  }
36
38
  }
37
39
  }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ type Props = {
4
+ description?: React.ReactNode | string;
5
+ heading: string;
6
+ };
7
+ export declare function FormHeader({ description, heading }: Props): React.JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/FormHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAIrB,KAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;IACtC,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AACD,wBAAgB,UAAU,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,KAAK,qBAWzD"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ const baseClass = 'form-header';
4
+ export function FormHeader({
5
+ description,
6
+ heading
7
+ }) {
8
+ if (!heading) {
9
+ return null;
10
+ }
11
+ return /*#__PURE__*/_jsxs("div", {
12
+ className: baseClass,
13
+ children: [/*#__PURE__*/_jsx("h1", {
14
+ children: heading
15
+ }), Boolean(description) && /*#__PURE__*/_jsx("p", {
16
+ children: description
17
+ })]
18
+ });
19
+ }
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["React","baseClass","FormHeader","description","heading","_jsxs","className","_jsx","Boolean"],"sources":["../../../src/elements/FormHeader/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nconst baseClass = 'form-header'\n\ntype Props = {\n description?: React.ReactNode | string\n heading: string\n}\nexport function FormHeader({ description, heading }: Props) {\n if (!heading) {\n return null\n }\n\n return (\n <div className={baseClass}>\n <h1>{heading}</h1>\n {Boolean(description) && <p>{description}</p>}\n </div>\n )\n}\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAIlB,MAAMC,SAAA,GAAY;AAMlB,OAAO,SAASC,WAAW;EAAEC,WAAW;EAAEC;AAAO,CAAS;EACxD,IAAI,CAACA,OAAA,EAAS;IACZ,OAAO;EACT;EAEA,oBACEC,KAAA,CAAC;IAAIC,SAAA,EAAWL,SAAA;4BACdM,IAAA,CAAC;gBAAIH;QACJI,OAAA,CAAQL,WAAA,kBAAgBI,IAAA,CAAC;gBAAGJ;;;AAGnC","ignoreList":[]}