@payloadcms/next 3.0.0-beta.110 → 3.0.0-beta.112

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 (150) hide show
  1. package/dist/elements/FormHeader/index.d.ts +9 -0
  2. package/dist/elements/FormHeader/index.d.ts.map +1 -0
  3. package/dist/elements/FormHeader/index.js +20 -0
  4. package/dist/elements/FormHeader/index.js.map +1 -0
  5. package/dist/elements/FormHeader/index.scss +6 -0
  6. package/dist/exports/utilities.d.ts +1 -0
  7. package/dist/exports/utilities.d.ts.map +1 -1
  8. package/dist/exports/utilities.js +1 -0
  9. package/dist/exports/utilities.js.map +1 -1
  10. package/dist/layouts/Root/index.js +6 -6
  11. package/dist/layouts/Root/index.js.map +1 -1
  12. package/dist/prod/styles.css +1 -1
  13. package/dist/routes/rest/auth/login.js +2 -2
  14. package/dist/routes/rest/auth/login.js.map +1 -1
  15. package/dist/routes/rest/auth/logout.d.ts.map +1 -1
  16. package/dist/routes/rest/auth/logout.js +3 -2
  17. package/dist/routes/rest/auth/logout.js.map +1 -1
  18. package/dist/routes/rest/auth/refresh.js +2 -2
  19. package/dist/routes/rest/auth/refresh.js.map +1 -1
  20. package/dist/routes/rest/auth/registerFirstUser.js +2 -2
  21. package/dist/routes/rest/auth/registerFirstUser.js.map +1 -1
  22. package/dist/routes/rest/auth/resetPassword.js +2 -2
  23. package/dist/routes/rest/auth/resetPassword.js.map +1 -1
  24. package/dist/routes/rest/index.d.ts +12 -12
  25. package/dist/routes/rest/index.d.ts.map +1 -1
  26. package/dist/routes/rest/index.js +17 -15
  27. package/dist/routes/rest/index.js.map +1 -1
  28. package/dist/scss/app.scss +166 -162
  29. package/dist/scss/colors.scss +256 -254
  30. package/dist/scss/resets.scss +9 -7
  31. package/dist/scss/toastify.scss +42 -40
  32. package/dist/scss/toasts.scss +105 -103
  33. package/dist/scss/type.scss +80 -79
  34. package/dist/utilities/getNextRequestI18n.js +2 -2
  35. package/dist/utilities/getNextRequestI18n.js.map +1 -1
  36. package/dist/utilities/initPage/handleAdminPage.d.ts +11 -11
  37. package/dist/utilities/initPage/handleAdminPage.d.ts.map +1 -1
  38. package/dist/utilities/initPage/handleAdminPage.js +7 -20
  39. package/dist/utilities/initPage/handleAdminPage.js.map +1 -1
  40. package/dist/utilities/initPage/handleAuthRedirect.d.ts +6 -3
  41. package/dist/utilities/initPage/handleAuthRedirect.d.ts.map +1 -1
  42. package/dist/utilities/initPage/handleAuthRedirect.js +23 -36
  43. package/dist/utilities/initPage/handleAuthRedirect.js.map +1 -1
  44. package/dist/utilities/initPage/index.d.ts +1 -1
  45. package/dist/utilities/initPage/index.d.ts.map +1 -1
  46. package/dist/utilities/initPage/index.js +21 -10
  47. package/dist/utilities/initPage/index.js.map +1 -1
  48. package/dist/utilities/initPage/shared.d.ts +2 -2
  49. package/dist/utilities/initPage/shared.d.ts.map +1 -1
  50. package/dist/utilities/initPage/shared.js +18 -13
  51. package/dist/utilities/initPage/shared.js.map +1 -1
  52. package/dist/utilities/initReq.js +1 -1
  53. package/dist/utilities/initReq.js.map +1 -1
  54. package/dist/views/API/index.scss +98 -96
  55. package/dist/views/Account/Settings/index.scss +37 -35
  56. package/dist/views/CreateFirstUser/index.client.d.ts.map +1 -1
  57. package/dist/views/CreateFirstUser/index.client.js +1 -1
  58. package/dist/views/CreateFirstUser/index.client.js.map +1 -1
  59. package/dist/views/CreateFirstUser/index.scss +13 -11
  60. package/dist/views/Dashboard/Default/index.scss +51 -49
  61. package/dist/views/Edit/Default/Auth/index.scss +56 -54
  62. package/dist/views/Edit/Default/index.js +2 -2
  63. package/dist/views/Edit/Default/index.js.map +1 -1
  64. package/dist/views/Edit/Default/index.scss +15 -13
  65. package/dist/views/ForgotPassword/ForgotPasswordForm/index.d.ts.map +1 -1
  66. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +9 -11
  67. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
  68. package/dist/views/ForgotPassword/index.d.ts.map +1 -1
  69. package/dist/views/ForgotPassword/index.js +6 -6
  70. package/dist/views/ForgotPassword/index.js.map +1 -1
  71. package/dist/views/List/Default/index.scss +136 -134
  72. package/dist/views/LivePreview/IFrame/index.scss +8 -6
  73. package/dist/views/LivePreview/Preview/index.scss +32 -30
  74. package/dist/views/LivePreview/Toolbar/Controls/index.scss +49 -47
  75. package/dist/views/LivePreview/Toolbar/SizeInput/index.scss +11 -9
  76. package/dist/views/LivePreview/Toolbar/index.scss +33 -31
  77. package/dist/views/LivePreview/ToolbarArea/index.scss +5 -3
  78. package/dist/views/LivePreview/index.client.js +2 -2
  79. package/dist/views/LivePreview/index.client.js.map +1 -1
  80. package/dist/views/LivePreview/index.scss +48 -46
  81. package/dist/views/Login/LoginForm/index.js +1 -1
  82. package/dist/views/Login/LoginForm/index.js.map +1 -1
  83. package/dist/views/Login/LoginForm/index.scss +8 -6
  84. package/dist/views/Login/index.scss +8 -6
  85. package/dist/views/Logout/LogoutClient.d.ts.map +1 -1
  86. package/dist/views/Logout/LogoutClient.js +77 -55
  87. package/dist/views/Logout/LogoutClient.js.map +1 -1
  88. package/dist/views/Logout/index.scss +17 -15
  89. package/dist/views/NotFound/index.d.ts +5 -5
  90. package/dist/views/NotFound/index.d.ts.map +1 -1
  91. package/dist/views/NotFound/index.js +4 -2
  92. package/dist/views/NotFound/index.js.map +1 -1
  93. package/dist/views/NotFound/index.scss +38 -36
  94. package/dist/views/ResetPassword/ResetPasswordForm/index.d.ts +7 -0
  95. package/dist/views/ResetPassword/ResetPasswordForm/index.d.ts.map +1 -0
  96. package/dist/views/ResetPassword/{index.client.js → ResetPasswordForm/index.js} +16 -19
  97. package/dist/views/ResetPassword/ResetPasswordForm/index.js.map +1 -0
  98. package/dist/views/ResetPassword/index.d.ts.map +1 -1
  99. package/dist/views/ResetPassword/index.js +17 -10
  100. package/dist/views/ResetPassword/index.js.map +1 -1
  101. package/dist/views/ResetPassword/index.scss +6 -26
  102. package/dist/views/Root/getViewFromConfig.d.ts.map +1 -1
  103. package/dist/views/Root/getViewFromConfig.js +0 -6
  104. package/dist/views/Root/getViewFromConfig.js.map +1 -1
  105. package/dist/views/Root/index.d.ts +5 -5
  106. package/dist/views/Root/index.d.ts.map +1 -1
  107. package/dist/views/Root/index.js +9 -4
  108. package/dist/views/Root/index.js.map +1 -1
  109. package/dist/views/Root/meta.d.ts +5 -5
  110. package/dist/views/Root/meta.d.ts.map +1 -1
  111. package/dist/views/Root/meta.js +2 -1
  112. package/dist/views/Root/meta.js.map +1 -1
  113. package/dist/views/Unauthorized/index.d.ts.map +1 -1
  114. package/dist/views/Unauthorized/index.js +14 -7
  115. package/dist/views/Unauthorized/index.js.map +1 -1
  116. package/dist/views/Unauthorized/index.scss +4 -31
  117. package/dist/views/Verify/index.client.d.ts +7 -0
  118. package/dist/views/Verify/index.client.d.ts.map +1 -0
  119. package/dist/views/Verify/index.client.js +46 -0
  120. package/dist/views/Verify/index.client.js.map +1 -0
  121. package/dist/views/Verify/index.d.ts.map +1 -1
  122. package/dist/views/Verify/index.js +12 -11
  123. package/dist/views/Verify/index.js.map +1 -1
  124. package/dist/views/Verify/index.scss +13 -11
  125. package/dist/views/Version/Default/index.scss +52 -50
  126. package/dist/views/Version/RenderFieldsToDiff/Label/index.scss +5 -3
  127. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.scss +29 -27
  128. package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.scss +11 -9
  129. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.scss +12 -10
  130. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.scss +12 -10
  131. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.scss +12 -10
  132. package/dist/views/Version/RenderFieldsToDiff/index.scss +12 -10
  133. package/dist/views/Version/Restore/index.scss +57 -55
  134. package/dist/views/Version/SelectComparison/index.scss +12 -10
  135. package/dist/views/Version/SelectLocales/index.scss +6 -4
  136. package/dist/views/Version/index.d.ts.map +1 -1
  137. package/dist/views/Version/index.js +2 -0
  138. package/dist/views/Version/index.js.map +1 -1
  139. package/dist/views/Versions/getLatestVersion.d.ts +1 -0
  140. package/dist/views/Versions/getLatestVersion.d.ts.map +1 -1
  141. package/dist/views/Versions/getLatestVersion.js +14 -3
  142. package/dist/views/Versions/getLatestVersion.js.map +1 -1
  143. package/dist/views/Versions/index.d.ts.map +1 -1
  144. package/dist/views/Versions/index.js +2 -0
  145. package/dist/views/Versions/index.js.map +1 -1
  146. package/dist/views/Versions/index.scss +78 -76
  147. package/package.json +9 -9
  148. package/dist/views/ResetPassword/index.client.d.ts +0 -7
  149. package/dist/views/ResetPassword/index.client.d.ts.map +0 -1
  150. package/dist/views/ResetPassword/index.client.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Button","formatAdminURL","Translation","LinkImport","React","Fragment","ForgotPasswordForm","generateForgotPasswordMetadata","Link","default","forgotPasswordBaseClass","ForgotPasswordView","initPageResult","req","i18n","payload","config","user","admin","routes","account","accountRoute","login","loginRoute","adminRoute","_jsxs","_jsx","t","elements","0","children","href","path","i18nKey","buttonStyle","el","size","to"],"sources":["../../../src/views/ForgotPassword/index.tsx"],"sourcesContent":["import type { AdminViewProps } from 'payload'\n\nimport { Button } from '@payloadcms/ui'\nimport { formatAdminURL, Translation } from '@payloadcms/ui/shared'\nimport LinkImport from 'next/link.js'\nimport React, { Fragment } from 'react'\n\nimport { ForgotPasswordForm } from './ForgotPasswordForm/index.js'\n\nexport { generateForgotPasswordMetadata } from './meta.js'\n\nconst Link = (LinkImport.default || LinkImport) as unknown as typeof LinkImport.default\nexport const forgotPasswordBaseClass = 'forgot-password'\n\nexport const ForgotPasswordView: React.FC<AdminViewProps> = ({ initPageResult }) => {\n const {\n req: {\n i18n,\n payload: { config },\n user,\n },\n } = initPageResult\n\n const {\n admin: {\n routes: { account: accountRoute, login: loginRoute },\n },\n routes: { admin: adminRoute },\n } = config\n\n if (user) {\n return (\n <Fragment>\n <h1>{i18n.t('authentication:alreadyLoggedIn')}</h1>\n <p>\n <Translation\n elements={{\n '0': ({ children }) => (\n <Link\n href={formatAdminURL({\n adminRoute,\n path: accountRoute,\n })}\n >\n {children}\n </Link>\n ),\n }}\n i18nKey=\"authentication:loggedInChangePassword\"\n t={i18n.t}\n />\n </p>\n <br />\n <Button buttonStyle=\"secondary\" el=\"link\" Link={Link} size=\"large\" to={adminRoute}>\n {i18n.t('general:backToDashboard')}\n </Button>\n </Fragment>\n )\n }\n\n return (\n <Fragment>\n <ForgotPasswordForm />\n <Link\n href={formatAdminURL({\n adminRoute,\n path: loginRoute,\n })}\n >\n {i18n.t('authentication:backToLogin')}\n </Link>\n </Fragment>\n )\n}\n"],"mappings":";AAEA,SAASA,MAAM,QAAQ;AACvB,SAASC,cAAc,EAAEC,WAAW,QAAQ;AAC5C,OAAOC,UAAA,MAAgB;AACvB,OAAOC,KAAA,IAASC,QAAQ,QAAQ;AAEhC,SAASC,kBAAkB,QAAQ;AAEnC,SAASC,8BAA8B,QAAQ;AAE/C,MAAMC,IAAA,GAAQL,UAAA,CAAWM,OAAO,IAAIN,UAAA;AACpC,OAAO,MAAMO,uBAAA,GAA0B;AAEvC,OAAO,MAAMC,kBAAA,GAA+CA,CAAC;EAAEC;AAAc,CAAE;EAC7E,MAAM;IACJC,GAAA,EAAK;MACHC,IAAI;MACJC,OAAA,EAAS;QAAEC;MAAM,CAAE;MACnBC;IAAI;EACL,CACF,GAAGL,cAAA;EAEJ,MAAM;IACJM,KAAA,EAAO;MACLC,MAAA,EAAQ;QAAEC,OAAA,EAASC,YAAY;QAAEC,KAAA,EAAOC;MAAU;IAAE,CACrD;IACDJ,MAAA,EAAQ;MAAED,KAAA,EAAOM;IAAU;EAAE,CAC9B,GAAGR,MAAA;EAEJ,IAAIC,IAAA,EAAM;IACR,oBACEQ,KAAA,CAACpB,QAAA;8BACCqB,IAAA,CAAC;kBAAIZ,IAAA,CAAKa,CAAC,CAAC;uBACZD,IAAA,CAAC;kBACC,aAAAA,IAAA,CAACxB,WAAA;UACC0B,QAAA,EAAU;YACR,KAAKC,CAAC;cAAEC;YAAQ,CAAE,kBAChBJ,IAAA,CAAClB,IAAA;cACCuB,IAAA,EAAM9B,cAAA,CAAe;gBACnBuB,UAAA;gBACAQ,IAAA,EAAMX;cACR;wBAECS;;UAGP;UACAG,OAAA,EAAQ;UACRN,CAAA,EAAGb,IAAA,CAAKa;;uBAGZD,IAAA,CAAC,W,aACDA,IAAA,CAAC1B,MAAA;QAAOkC,WAAA,EAAY;QAAYC,EAAA,EAAG;QAAO3B,IAAA,EAAMA,IAAA;QAAM4B,IAAA,EAAK;QAAQC,EAAA,EAAIb,UAAA;kBACpEV,IAAA,CAAKa,CAAC,CAAC;;;EAIhB;EAEA,oBACEF,KAAA,CAACpB,QAAA;4BACCqB,IAAA,CAACpB,kBAAA,O,aACDoB,IAAA,CAAClB,IAAA;MACCuB,IAAA,EAAM9B,cAAA,CAAe;QACnBuB,UAAA;QACAQ,IAAA,EAAMT;MACR;gBAECT,IAAA,CAAKa,CAAC,CAAC;;;AAIhB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["Button","formatAdminURL","Translation","LinkImport","React","Fragment","FormHeader","ForgotPasswordForm","generateForgotPasswordMetadata","Link","default","forgotPasswordBaseClass","ForgotPasswordView","initPageResult","req","i18n","payload","config","user","admin","routes","account","accountRoute","login","loginRoute","adminRoute","_jsxs","_jsx","description","elements","0","children","href","path","i18nKey","t","heading","buttonStyle","el","size","to"],"sources":["../../../src/views/ForgotPassword/index.tsx"],"sourcesContent":["import type { AdminViewProps } from 'payload'\n\nimport { Button } from '@payloadcms/ui'\nimport { formatAdminURL, Translation } from '@payloadcms/ui/shared'\nimport LinkImport from 'next/link.js'\nimport React, { Fragment } from 'react'\n\nimport { FormHeader } from '../../elements/FormHeader/index.js'\nimport { ForgotPasswordForm } from './ForgotPasswordForm/index.js'\n\nexport { generateForgotPasswordMetadata } from './meta.js'\n\nconst Link = (LinkImport.default || LinkImport) as unknown as typeof LinkImport.default\nexport const forgotPasswordBaseClass = 'forgot-password'\n\nexport const ForgotPasswordView: React.FC<AdminViewProps> = ({ initPageResult }) => {\n const {\n req: {\n i18n,\n payload: { config },\n user,\n },\n } = initPageResult\n\n const {\n admin: {\n routes: { account: accountRoute, login: loginRoute },\n },\n routes: { admin: adminRoute },\n } = config\n\n if (user) {\n return (\n <Fragment>\n <FormHeader\n description={\n <Translation\n elements={{\n '0': ({ children }) => (\n <Link\n href={formatAdminURL({\n adminRoute,\n path: accountRoute,\n })}\n >\n {children}\n </Link>\n ),\n }}\n i18nKey=\"authentication:loggedInChangePassword\"\n t={i18n.t}\n />\n }\n heading={i18n.t('authentication:alreadyLoggedIn')}\n />\n <Button buttonStyle=\"secondary\" el=\"link\" Link={Link} size=\"large\" to={adminRoute}>\n {i18n.t('general:backToDashboard')}\n </Button>\n </Fragment>\n )\n }\n\n return (\n <Fragment>\n <ForgotPasswordForm />\n <Link\n href={formatAdminURL({\n adminRoute,\n path: loginRoute,\n })}\n >\n {i18n.t('authentication:backToLogin')}\n </Link>\n </Fragment>\n )\n}\n"],"mappings":";AAEA,SAASA,MAAM,QAAQ;AACvB,SAASC,cAAc,EAAEC,WAAW,QAAQ;AAC5C,OAAOC,UAAA,MAAgB;AACvB,OAAOC,KAAA,IAASC,QAAQ,QAAQ;AAEhC,SAASC,UAAU,QAAQ;AAC3B,SAASC,kBAAkB,QAAQ;AAEnC,SAASC,8BAA8B,QAAQ;AAE/C,MAAMC,IAAA,GAAQN,UAAA,CAAWO,OAAO,IAAIP,UAAA;AACpC,OAAO,MAAMQ,uBAAA,GAA0B;AAEvC,OAAO,MAAMC,kBAAA,GAA+CA,CAAC;EAAEC;AAAc,CAAE;EAC7E,MAAM;IACJC,GAAA,EAAK;MACHC,IAAI;MACJC,OAAA,EAAS;QAAEC;MAAM,CAAE;MACnBC;IAAI;EACL,CACF,GAAGL,cAAA;EAEJ,MAAM;IACJM,KAAA,EAAO;MACLC,MAAA,EAAQ;QAAEC,OAAA,EAASC,YAAY;QAAEC,KAAA,EAAOC;MAAU;IAAE,CACrD;IACDJ,MAAA,EAAQ;MAAED,KAAA,EAAOM;IAAU;EAAE,CAC9B,GAAGR,MAAA;EAEJ,IAAIC,IAAA,EAAM;IACR,oBACEQ,KAAA,CAACrB,QAAA;8BACCsB,IAAA,CAACrB,UAAA;QACCsB,WAAA,eACED,IAAA,CAACzB,WAAA;UACC2B,QAAA,EAAU;YACR,KAAKC,CAAC;cAAEC;YAAQ,CAAE,kBAChBJ,IAAA,CAAClB,IAAA;cACCuB,IAAA,EAAM/B,cAAA,CAAe;gBACnBwB,UAAA;gBACAQ,IAAA,EAAMX;cACR;wBAECS;;UAGP;UACAG,OAAA,EAAQ;UACRC,CAAA,EAAGpB,IAAA,CAAKoB;;QAGZC,OAAA,EAASrB,IAAA,CAAKoB,CAAC,CAAC;uBAElBR,IAAA,CAAC3B,MAAA;QAAOqC,WAAA,EAAY;QAAYC,EAAA,EAAG;QAAO7B,IAAA,EAAMA,IAAA;QAAM8B,IAAA,EAAK;QAAQC,EAAA,EAAIf,UAAA;kBACpEV,IAAA,CAAKoB,CAAC,CAAC;;;EAIhB;EAEA,oBACET,KAAA,CAACrB,QAAA;4BACCsB,IAAA,CAACpB,kBAAA,O,aACDoB,IAAA,CAAClB,IAAA;MACCuB,IAAA,EAAM/B,cAAA,CAAe;QACnBwB,UAAA;QACAQ,IAAA,EAAMT;MACR;gBAECT,IAAA,CAAKoB,CAAC,CAAC;;;AAIhB","ignoreList":[]}
@@ -1,177 +1,179 @@
1
1
  @import '../../../scss/styles.scss';
2
2
 
3
- .collection-list {
4
- width: 100%;
3
+ @layer payload-default {
4
+ .collection-list {
5
+ width: 100%;
5
6
 
6
- &__wrap {
7
- padding-bottom: var(--spacing-view-bottom);
7
+ &__wrap {
8
+ padding-bottom: var(--spacing-view-bottom);
8
9
 
9
- & > *:not(:last-child) {
10
- margin-bottom: var(--base);
10
+ & > *:not(:last-child) {
11
+ margin-bottom: var(--base);
12
+ }
11
13
  }
12
- }
13
14
 
14
- .list-header {
15
- a {
16
- text-decoration: none;
17
- }
15
+ .list-header {
16
+ a {
17
+ text-decoration: none;
18
+ }
18
19
 
19
- .btn--withoutPopup,
20
- .btn--withPopup {
21
- position: relative;
22
- margin: 0 0 base(0.2);
20
+ .btn--withoutPopup,
21
+ .btn--withPopup {
22
+ position: relative;
23
+ margin: 0 0 base(0.2);
24
+ }
23
25
  }
24
- }
25
-
26
- &__sub-header {
27
- flex-basis: 100%;
28
- }
29
-
30
- .table {
31
- table {
32
- width: 100%;
33
- overflow: auto;
34
26
 
35
- [class^='cell'] > p,
36
- [class^='cell'] > span,
37
- [class^='cell'] > a {
38
- line-clamp: 4;
39
- -webkit-box-orient: vertical;
40
- -webkit-line-clamp: 4;
41
- overflow: hidden;
42
- display: -webkit-box;
43
- max-width: 100vw;
44
- }
27
+ &__sub-header {
28
+ flex-basis: 100%;
29
+ }
45
30
 
46
- #heading-_select,
47
- .cell-_select {
48
- display: flex;
49
- min-width: unset;
31
+ .table {
32
+ table {
33
+ width: 100%;
34
+ overflow: auto;
35
+
36
+ [class^='cell'] > p,
37
+ [class^='cell'] > span,
38
+ [class^='cell'] > a {
39
+ line-clamp: 4;
40
+ -webkit-box-orient: vertical;
41
+ -webkit-line-clamp: 4;
42
+ overflow: hidden;
43
+ display: -webkit-box;
44
+ max-width: 100vw;
45
+ }
46
+
47
+ #heading-_select,
48
+ .cell-_select {
49
+ display: flex;
50
+ min-width: unset;
51
+ }
50
52
  }
51
53
  }
52
- }
53
54
 
54
- &__no-results {
55
- display: flex;
56
- flex-direction: column;
57
- align-items: flex-start;
58
- gap: var(--base);
55
+ &__no-results {
56
+ display: flex;
57
+ flex-direction: column;
58
+ align-items: flex-start;
59
+ gap: var(--base);
59
60
 
60
- & > * {
61
- margin: 0;
61
+ & > * {
62
+ margin: 0;
63
+ }
62
64
  }
63
- }
64
65
 
65
- &__page-controls {
66
- width: 100%;
67
- display: flex;
68
- align-items: center;
69
- }
70
-
71
- .paginator {
72
- margin-bottom: 0;
73
- }
66
+ &__page-controls {
67
+ width: 100%;
68
+ display: flex;
69
+ align-items: center;
70
+ }
74
71
 
75
- &__page-info {
76
- [dir='ltr'] & {
77
- margin-right: base(1);
78
- margin-left: auto;
72
+ .paginator {
73
+ margin-bottom: 0;
79
74
  }
80
- [dir='rtl'] & {
81
- margin-left: base(1);
82
- margin-right: auto;
75
+
76
+ &__page-info {
77
+ [dir='ltr'] & {
78
+ margin-right: base(1);
79
+ margin-left: auto;
80
+ }
81
+ [dir='rtl'] & {
82
+ margin-left: base(1);
83
+ margin-right: auto;
84
+ }
83
85
  }
84
- }
85
86
 
86
- &__list-selection {
87
- position: fixed;
88
- bottom: 0;
89
- z-index: 10;
90
- padding: base(0.8) 0;
91
- width: 100%;
92
- background-color: var(--theme-bg);
87
+ &__list-selection {
88
+ position: fixed;
89
+ bottom: 0;
90
+ z-index: 10;
91
+ padding: base(0.8) 0;
92
+ width: 100%;
93
+ background-color: var(--theme-bg);
93
94
 
94
- .btn {
95
- margin: 0 0 0 base(0.4);
96
- }
95
+ .btn {
96
+ margin: 0 0 0 base(0.4);
97
+ }
97
98
 
98
- .btn {
99
- background-color: var(--theme-elevation-100);
100
- cursor: pointer;
101
- padding: 0 base(0.4);
102
- border-radius: $style-radius-s;
99
+ .btn {
100
+ background-color: var(--theme-elevation-100);
101
+ cursor: pointer;
102
+ padding: 0 base(0.4);
103
+ border-radius: $style-radius-s;
103
104
 
104
- &:hover {
105
- background-color: var(--theme-elevation-200);
105
+ &:hover {
106
+ background-color: var(--theme-elevation-200);
107
+ }
106
108
  }
107
109
  }
108
- }
109
110
 
110
- &__list-selection-actions {
111
- display: flex;
112
- gap: base(0.25);
113
- }
111
+ &__list-selection-actions {
112
+ display: flex;
113
+ gap: base(0.25);
114
+ }
114
115
 
115
- &__shimmer {
116
- margin-top: base(1.75);
117
- width: 100%;
118
- > div {
119
- margin-top: 8px;
116
+ &__shimmer {
117
+ margin-top: base(1.75);
118
+ width: 100%;
119
+ > div {
120
+ margin-top: 8px;
121
+ }
120
122
  }
121
- }
122
123
 
123
- @include mid-break {
124
- margin-top: base(0.25);
124
+ @include mid-break {
125
+ margin-top: base(0.25);
125
126
 
126
- &__wrap {
127
- padding-top: 0;
128
- padding-bottom: 0;
129
- }
127
+ &__wrap {
128
+ padding-top: 0;
129
+ padding-bottom: 0;
130
+ }
130
131
 
131
- &__header {
132
- gap: base(0.5);
133
- }
132
+ &__header {
133
+ gap: base(0.5);
134
+ }
134
135
 
135
- &__sub-header {
136
- margin-top: 0;
137
- }
136
+ &__sub-header {
137
+ margin-top: 0;
138
+ }
138
139
 
139
- &__search-input {
140
- margin: 0;
141
- }
140
+ &__search-input {
141
+ margin: 0;
142
+ }
142
143
 
143
- // on mobile, extend the table all the way to the viewport edges
144
- // this is to visually indicate overflowing content
145
- .table {
146
- display: flex;
147
- width: calc(100% + calc(var(--gutter-h) * 2));
148
- max-width: unset;
149
- left: calc(var(--gutter-h) * -1);
150
- position: relative;
151
- padding-left: var(--gutter-h);
144
+ // on mobile, extend the table all the way to the viewport edges
145
+ // this is to visually indicate overflowing content
146
+ .table {
147
+ display: flex;
148
+ width: calc(100% + calc(var(--gutter-h) * 2));
149
+ max-width: unset;
150
+ left: calc(var(--gutter-h) * -1);
151
+ position: relative;
152
+ padding-left: var(--gutter-h);
153
+
154
+ &::after {
155
+ content: '';
156
+ height: 1px;
157
+ padding-right: var(--gutter-h);
158
+ }
159
+ }
152
160
 
153
- &::after {
154
- content: '';
155
- height: 1px;
156
- padding-right: var(--gutter-h);
161
+ &__page-controls {
162
+ flex-wrap: wrap;
157
163
  }
158
- }
159
164
 
160
- &__page-controls {
161
- flex-wrap: wrap;
162
- }
165
+ &__page-info {
166
+ margin-left: 0;
167
+ }
163
168
 
164
- &__page-info {
165
- margin-left: 0;
169
+ .paginator {
170
+ width: 100%;
171
+ margin-bottom: $baseline;
172
+ }
166
173
  }
167
174
 
168
- .paginator {
169
- width: 100%;
170
- margin-bottom: $baseline;
175
+ @include small-break {
176
+ margin-bottom: base(2.4);
171
177
  }
172
178
  }
173
-
174
- @include small-break {
175
- margin-bottom: base(2.4);
176
- }
177
179
  }
@@ -1,7 +1,9 @@
1
- .live-preview-iframe {
2
- background-color: white;
3
- border: 0;
4
- width: 100%;
5
- height: 100%;
6
- transform-origin: top left;
1
+ @layer payload-default {
2
+ .live-preview-iframe {
3
+ background-color: white;
4
+ border: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ transform-origin: top left;
8
+ }
7
9
  }
@@ -1,41 +1,43 @@
1
1
  @import '../../../scss/styles.scss';
2
2
 
3
- .live-preview-window {
4
- background-color: var(--theme-bg);
5
- width: 60%;
6
- flex-shrink: 0;
7
- flex-grow: 0;
8
- position: sticky;
9
- top: var(--doc-controls-height);
10
- height: calc(100vh - var(--doc-controls-height));
11
- overflow: hidden;
3
+ @layer payload-default {
4
+ .live-preview-window {
5
+ background-color: var(--theme-bg);
6
+ width: 60%;
7
+ flex-shrink: 0;
8
+ flex-grow: 0;
9
+ position: sticky;
10
+ top: var(--doc-controls-height);
11
+ height: calc(100vh - var(--doc-controls-height));
12
+ overflow: hidden;
12
13
 
13
- &__wrapper {
14
- display: flex;
15
- flex-direction: column;
16
- height: 100%;
17
- justify-content: flex-start;
18
- }
19
-
20
- &__main {
21
- flex-grow: 1;
22
- height: 100%;
23
- width: 100%;
24
- }
14
+ &__wrapper {
15
+ display: flex;
16
+ flex-direction: column;
17
+ height: 100%;
18
+ justify-content: flex-start;
19
+ }
25
20
 
26
- &--has-breakpoint {
27
- .live-preview-iframe {
28
- border: 1px solid var(--theme-elevation-100);
21
+ &__main {
22
+ flex-grow: 1;
23
+ height: 100%;
24
+ width: 100%;
29
25
  }
30
26
 
31
- .live-preview-window {
32
- &__main {
33
- padding: var(--base);
27
+ &--has-breakpoint {
28
+ .live-preview-iframe {
29
+ border: 1px solid var(--theme-elevation-100);
30
+ }
31
+
32
+ .live-preview-window {
33
+ &__main {
34
+ padding: var(--base);
35
+ }
34
36
  }
35
37
  }
36
- }
37
38
 
38
- @include mid-break {
39
- width: 100%;
39
+ @include mid-break {
40
+ width: 100%;
41
+ }
40
42
  }
41
43
  }
@@ -1,59 +1,61 @@
1
1
  @import '../../../../scss/styles.scss';
2
2
 
3
- .live-preview-toolbar-controls {
4
- display: flex;
5
- align-items: center;
6
- gap: calc(var(--base) / 3);
7
-
8
- &__breakpoint {
9
- border: none;
10
- background: transparent;
11
- height: var(--base);
12
-
13
- &:focus {
14
- outline: none;
15
- }
16
- }
17
-
18
- &__device-size {
3
+ @layer payload-default {
4
+ .live-preview-toolbar-controls {
19
5
  display: flex;
20
6
  align-items: center;
21
- }
7
+ gap: calc(var(--base) / 3);
22
8
 
23
- &__size {
24
- width: 50px;
25
- height: var(--base);
26
- display: flex;
27
- align-items: center;
28
- border: 1px solid var(--theme-elevation-200);
29
- background: var(--theme-elevation-100);
30
- border-radius: 2px;
31
- font-size: small;
32
- }
9
+ &__breakpoint {
10
+ border: none;
11
+ background: transparent;
12
+ height: var(--base);
33
13
 
34
- &__zoom {
35
- width: 55px;
36
- border: none;
37
- background: transparent;
38
- height: var(--base);
14
+ &:focus {
15
+ outline: none;
16
+ }
17
+ }
39
18
 
40
- &:focus {
41
- outline: none;
19
+ &__device-size {
20
+ display: flex;
21
+ align-items: center;
42
22
  }
43
- }
44
23
 
45
- &__external {
46
- flex-shrink: 0;
47
- display: flex;
48
- width: var(--base);
49
- height: var(--base);
50
- align-items: center;
51
- justify-content: center;
52
- padding: 6px 0;
53
- }
24
+ &__size {
25
+ width: 50px;
26
+ height: var(--base);
27
+ display: flex;
28
+ align-items: center;
29
+ border: 1px solid var(--theme-elevation-200);
30
+ background: var(--theme-elevation-100);
31
+ border-radius: 2px;
32
+ font-size: small;
33
+ }
54
34
 
55
- .popup-button {
56
- display: flex;
57
- align-items: center;
35
+ &__zoom {
36
+ width: 55px;
37
+ border: none;
38
+ background: transparent;
39
+ height: var(--base);
40
+
41
+ &:focus {
42
+ outline: none;
43
+ }
44
+ }
45
+
46
+ &__external {
47
+ flex-shrink: 0;
48
+ display: flex;
49
+ width: var(--base);
50
+ height: var(--base);
51
+ align-items: center;
52
+ justify-content: center;
53
+ padding: 6px 0;
54
+ }
55
+
56
+ .popup-button {
57
+ display: flex;
58
+ align-items: center;
59
+ }
58
60
  }
59
61
  }
@@ -1,10 +1,12 @@
1
- .toolbar-input {
2
- width: 50px;
3
- height: var(--base);
4
- display: flex;
5
- align-items: center;
6
- border: 1px solid var(--theme-elevation-200);
7
- background: var(--theme-elevation-100);
8
- border-radius: 2px;
9
- font-size: small;
1
+ @layer payload-default {
2
+ .toolbar-input {
3
+ width: 50px;
4
+ height: var(--base);
5
+ display: flex;
6
+ align-items: center;
7
+ border: 1px solid var(--theme-elevation-200);
8
+ background: var(--theme-elevation-100);
9
+ border-radius: 2px;
10
+ font-size: small;
11
+ }
10
12
  }
@@ -1,41 +1,43 @@
1
1
  @import '../../../scss/styles.scss';
2
2
 
3
- .live-preview-toolbar {
4
- display: flex;
5
- background-color: var(--theme-bg);
6
- color: var(--theme-text);
7
- height: calc(var(--base) * 1.75);
8
- align-items: center;
9
- flex-shrink: 0;
3
+ @layer payload-default {
4
+ .live-preview-toolbar {
5
+ display: flex;
6
+ background-color: var(--theme-bg);
7
+ color: var(--theme-text);
8
+ height: calc(var(--base) * 1.75);
9
+ align-items: center;
10
+ flex-shrink: 0;
10
11
 
11
- &--static {
12
- position: relative;
13
- width: 100%;
14
- justify-content: center;
15
- border-bottom: 1px solid var(--theme-elevation-100);
16
- }
12
+ &--static {
13
+ position: relative;
14
+ width: 100%;
15
+ justify-content: center;
16
+ border-bottom: 1px solid var(--theme-elevation-100);
17
+ }
17
18
 
18
- &--draggable {
19
- @include shadow-lg;
20
- position: absolute;
21
- top: 0;
22
- left: 0;
23
- margin: 0;
24
- border-radius: 4px;
25
- }
19
+ &--draggable {
20
+ @include shadow-lg;
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ margin: 0;
25
+ border-radius: 4px;
26
+ }
26
27
 
27
- &__drag-handle {
28
- background: transparent;
29
- border: 0;
30
- padding: 0;
31
- cursor: grab;
28
+ &__drag-handle {
29
+ background: transparent;
30
+ border: 0;
31
+ padding: 0;
32
+ cursor: grab;
32
33
 
33
- .icon--drag-handle .fill {
34
- fill: var(--theme-elevation-300);
35
- }
34
+ .icon--drag-handle .fill {
35
+ fill: var(--theme-elevation-300);
36
+ }
36
37
 
37
- &:active {
38
- cursor: grabbing;
38
+ &:active {
39
+ cursor: grabbing;
40
+ }
39
41
  }
40
42
  }
41
43
  }
@@ -1,4 +1,6 @@
1
- .toolbar-area {
2
- width: 100%;
3
- height: 100%;
1
+ @layer payload-default {
2
+ .toolbar-area {
3
+ width: 100%;
4
+ height: 100%;
5
+ }
4
6
  }
@@ -174,7 +174,7 @@ const PreviewView = ({
174
174
  // Unlock the document only if we're actually navigating away from the document
175
175
  if (documentId && documentIsLocked && !isStayingWithinDocument) {
176
176
  // Check if this user is still the current editor
177
- if (documentLockStateRef.current?.user?.id === user.id) {
177
+ if (documentLockStateRef.current?.user?.id === user?.id) {
178
178
  void unlockDocument(id, collectionSlug ?? globalSlug);
179
179
  setDocumentIsLocked(false);
180
180
  setCurrentEditor(null);
@@ -182,7 +182,7 @@ const PreviewView = ({
182
182
  }
183
183
  setShowTakeOverModal(false);
184
184
  };
185
- }, [collectionSlug, globalSlug, id, unlockDocument, user.id, setCurrentEditor, isLockingEnabled, documentIsLocked, setDocumentIsLocked]);
185
+ }, [collectionSlug, globalSlug, id, unlockDocument, user, setCurrentEditor, isLockingEnabled, documentIsLocked, setDocumentIsLocked]);
186
186
  const shouldShowDocumentLockedModal = documentIsLocked && currentEditor && currentEditor.id !== user.id && !isReadOnlyForIncomingUser && !showTakeOverModal &&
187
187
  // eslint-disable-next-line react-compiler/react-compiler
188
188
  !documentLockStateRef.current?.hasShownLockedModal;