@wordpress/boot 0.20.0 → 0.21.2-next.v.202608281122.0

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 (126) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +4 -0
  3. package/build-module/components/app/router.mjs +100 -4
  4. package/build-module/components/app/router.mjs.map +3 -3
  5. package/build-module/components/canvas/index.mjs +72 -13
  6. package/build-module/components/canvas/index.mjs.map +2 -2
  7. package/build-module/components/canvas/site-preview.mjs +50 -0
  8. package/build-module/components/canvas/site-preview.mjs.map +7 -0
  9. package/build-module/components/canvas/use-navigate-to-entity-record.mjs +122 -0
  10. package/build-module/components/canvas/use-navigate-to-entity-record.mjs.map +7 -0
  11. package/build-module/components/canvas/viewport.mjs +18 -0
  12. package/build-module/components/canvas/viewport.mjs.map +7 -0
  13. package/build-module/components/error-boundary/index.mjs +129 -0
  14. package/build-module/components/error-boundary/index.mjs.map +7 -0
  15. package/build-module/components/navigation/drilldown-item/index.mjs +91 -1
  16. package/build-module/components/navigation/drilldown-item/index.mjs.map +3 -3
  17. package/build-module/components/navigation/dropdown-item/index.mjs +98 -11
  18. package/build-module/components/navigation/dropdown-item/index.mjs.map +4 -4
  19. package/build-module/components/navigation/index.mjs +0 -1
  20. package/build-module/components/navigation/index.mjs.map +2 -2
  21. package/build-module/components/navigation/navigation-item/index.mjs +88 -15
  22. package/build-module/components/navigation/navigation-item/index.mjs.map +3 -3
  23. package/build-module/components/navigation/navigation-screen/index.mjs +111 -38
  24. package/build-module/components/navigation/navigation-screen/index.mjs.map +3 -3
  25. package/build-module/components/plugin-area/index.mjs +29 -0
  26. package/build-module/components/plugin-area/index.mjs.map +7 -0
  27. package/build-module/components/root/index.mjs +220 -122
  28. package/build-module/components/root/index.mjs.map +3 -3
  29. package/build-module/components/root/single-page.mjs +139 -47
  30. package/build-module/components/root/single-page.mjs.map +3 -3
  31. package/build-module/components/root/use-sync-body-background.mjs.map +1 -1
  32. package/build-module/components/save-button/index.mjs +127 -16
  33. package/build-module/components/save-button/index.mjs.map +3 -3
  34. package/build-module/components/save-panel/index.mjs +91 -1
  35. package/build-module/components/save-panel/index.mjs.map +3 -3
  36. package/build-module/components/sidebar/index.mjs +90 -10
  37. package/build-module/components/sidebar/index.mjs.map +3 -3
  38. package/build-module/index.mjs +0 -16
  39. package/build-module/index.mjs.map +3 -3
  40. package/build-module/store/actions.mjs +8 -0
  41. package/build-module/store/actions.mjs.map +2 -2
  42. package/build-module/store/reducer.mjs +16 -1
  43. package/build-module/store/reducer.mjs.map +2 -2
  44. package/build-module/store/selectors.mjs +9 -0
  45. package/build-module/store/selectors.mjs.map +2 -2
  46. package/build-types/components/app/router.d.ts.map +1 -1
  47. package/build-types/components/canvas/index.d.ts.map +1 -1
  48. package/build-types/components/canvas/site-preview.d.ts +10 -0
  49. package/build-types/components/canvas/site-preview.d.ts.map +1 -0
  50. package/build-types/components/canvas/use-navigate-to-entity-record.d.ts +40 -0
  51. package/build-types/components/canvas/use-navigate-to-entity-record.d.ts.map +1 -0
  52. package/build-types/components/canvas/viewport.d.ts +15 -0
  53. package/build-types/components/canvas/viewport.d.ts.map +1 -0
  54. package/build-types/components/error-boundary/index.d.ts +22 -0
  55. package/build-types/components/error-boundary/index.d.ts.map +1 -0
  56. package/build-types/components/navigation/drilldown-item/index.d.ts.map +1 -1
  57. package/build-types/components/navigation/dropdown-item/index.d.ts +0 -1
  58. package/build-types/components/navigation/dropdown-item/index.d.ts.map +1 -1
  59. package/build-types/components/navigation/index.d.ts.map +1 -1
  60. package/build-types/components/navigation/navigation-item/index.d.ts +0 -1
  61. package/build-types/components/navigation/navigation-item/index.d.ts.map +1 -1
  62. package/build-types/components/navigation/navigation-screen/index.d.ts +0 -1
  63. package/build-types/components/navigation/navigation-screen/index.d.ts.map +1 -1
  64. package/build-types/components/plugin-area/index.d.ts +12 -0
  65. package/build-types/components/plugin-area/index.d.ts.map +1 -0
  66. package/build-types/components/root/index.d.ts +0 -1
  67. package/build-types/components/root/index.d.ts.map +1 -1
  68. package/build-types/components/root/single-page.d.ts +0 -1
  69. package/build-types/components/root/single-page.d.ts.map +1 -1
  70. package/build-types/components/root/use-sync-body-background.d.ts +1 -1
  71. package/build-types/components/save-button/index.d.ts +0 -1
  72. package/build-types/components/save-button/index.d.ts.map +1 -1
  73. package/build-types/components/save-panel/index.d.ts.map +1 -1
  74. package/build-types/components/sidebar/index.d.ts +0 -1
  75. package/build-types/components/sidebar/index.d.ts.map +1 -1
  76. package/build-types/index.d.ts +0 -2
  77. package/build-types/index.d.ts.map +1 -1
  78. package/build-types/store/actions.d.ts +15 -2
  79. package/build-types/store/actions.d.ts.map +1 -1
  80. package/build-types/store/reducer.d.ts.map +1 -1
  81. package/build-types/store/selectors.d.ts +12 -0
  82. package/build-types/store/selectors.d.ts.map +1 -1
  83. package/build-types/store/types.d.ts +34 -3
  84. package/build-types/store/types.d.ts.map +1 -1
  85. package/package.json +27 -25
  86. package/src/components/app/router.tsx +19 -7
  87. package/src/components/canvas/index.tsx +117 -15
  88. package/src/components/canvas/site-preview.tsx +64 -0
  89. package/src/components/canvas/use-navigate-to-entity-record.ts +220 -0
  90. package/src/components/canvas/viewport.ts +34 -0
  91. package/src/components/error-boundary/index.tsx +71 -0
  92. package/src/components/error-boundary/style.module.scss +13 -0
  93. package/src/components/navigation/drilldown-item/index.tsx +2 -1
  94. package/src/components/navigation/dropdown-item/index.tsx +10 -6
  95. package/src/components/navigation/dropdown-item/{style.scss → style.module.scss} +6 -2
  96. package/src/components/navigation/index.tsx +0 -1
  97. package/src/components/navigation/navigation-item/index.tsx +3 -6
  98. package/src/components/navigation/navigation-item/{style.scss → style.module.scss} +7 -14
  99. package/src/components/navigation/navigation-screen/index.tsx +6 -15
  100. package/src/components/navigation/navigation-screen/{style.scss → style.module.scss} +10 -9
  101. package/src/components/plugin-area/index.tsx +34 -0
  102. package/src/components/root/{style.scss → _layout.module.scss} +71 -40
  103. package/src/components/root/_view-transitions.module.scss +205 -0
  104. package/src/components/root/index.tsx +44 -24
  105. package/src/components/root/single-page.tsx +15 -7
  106. package/src/components/root/style.module.scss +2 -0
  107. package/src/components/root/use-sync-body-background.ts +1 -1
  108. package/src/components/save-button/index.tsx +36 -14
  109. package/src/components/save-button/style.module.scss +10 -0
  110. package/src/components/save-panel/index.tsx +2 -1
  111. package/src/components/save-panel/style.module.scss +7 -0
  112. package/src/components/sidebar/index.tsx +5 -5
  113. package/src/components/sidebar/style.module.scss +29 -0
  114. package/src/index.tsx +0 -2
  115. package/src/store/actions.ts +18 -1
  116. package/src/store/reducer.ts +19 -0
  117. package/src/store/selectors.ts +28 -0
  118. package/src/store/types.ts +37 -3
  119. package/build-style/style-rtl.css +0 -133
  120. package/build-style/style.css +0 -133
  121. package/build-style/view-transitions-rtl.css +0 -189
  122. package/build-style/view-transitions.css +0 -189
  123. package/src/components/save-button/style.scss +0 -9
  124. package/src/components/sidebar/style.scss +0 -23
  125. package/src/style.scss +0 -34
  126. package/src/view-transitions.scss +0 -221
@@ -2,12 +2,21 @@ import { useEffect, useState } from '@wordpress/element';
2
2
  import { useSelect } from '@wordpress/data';
3
3
  import { _n, __, sprintf } from '@wordpress/i18n';
4
4
  import { store as coreStore } from '@wordpress/core-data';
5
- import { displayShortcut, rawShortcut } from '@wordpress/keycodes';
5
+ import {
6
+ ariaKeyShortcut,
7
+ displayShortcut,
8
+ shortcutAriaLabel,
9
+ } from '@wordpress/keycodes';
6
10
  import { check } from '@wordpress/icons';
7
11
  import { EntitiesSavedStates } from '@wordpress/editor';
8
12
  import { Button, Modal } from '@wordpress/components';
9
- import { Tooltip } from '@wordpress/ui';
10
- import './style.scss';
13
+ import {
14
+ KeyboardShortcutDescription,
15
+ KeyboardShortcutDisplay,
16
+ Tooltip,
17
+ useKeyboardShortcutProps,
18
+ } from '@wordpress/ui';
19
+ import styles from './style.module.scss';
11
20
  import useSaveShortcut from '../save-panel/use-save-shortcut';
12
21
 
13
22
  export default function SaveButton() {
@@ -53,6 +62,14 @@ export default function SaveButton() {
53
62
  const shouldShowButton = hasChanges || showSavedState;
54
63
 
55
64
  useSaveShortcut( { openSavePanel: () => setIsSaveViewOpened( true ) } );
65
+ const shortcut = {
66
+ displayShortcut: displayShortcut.primary( 's' ),
67
+ ariaKeyShortcut: ariaKeyShortcut.primary( 's' ),
68
+ label: shortcutAriaLabel.primary( 's' ),
69
+ };
70
+ const { descriptionId, targetProps } = useKeyboardShortcutProps( {
71
+ shortcut,
72
+ } );
56
73
 
57
74
  if ( ! shouldShowButton ) {
58
75
  return null;
@@ -76,12 +93,12 @@ export default function SaveButton() {
76
93
  );
77
94
  };
78
95
  const label = getLabel();
79
- const shortcut = displayShortcut.primary( 's' );
80
96
 
81
97
  return (
82
98
  <>
83
99
  <Tooltip.Root>
84
100
  <Tooltip.Trigger
101
+ { ...targetProps }
85
102
  render={
86
103
  <Button
87
104
  variant="primary"
@@ -91,20 +108,25 @@ export default function SaveButton() {
91
108
  disabled={ disabled }
92
109
  accessibleWhenDisabled
93
110
  isBusy={ isSaving }
94
- aria-keyshortcuts={ rawShortcut.primary( 's' ) }
95
- className="boot-save-button"
111
+ className={ styles[ 'save-button' ] }
96
112
  icon={ isInSavedState ? check : undefined }
97
- >
98
- { label }
99
- </Button>
113
+ />
100
114
  }
101
- />
115
+ >
116
+ { label }
117
+ { descriptionId && (
118
+ <KeyboardShortcutDescription
119
+ descriptionId={ descriptionId }
120
+ shortcut={ shortcut }
121
+ />
122
+ ) }
123
+ </Tooltip.Trigger>
102
124
  <Tooltip.Popup>
103
125
  { hasChanges && <span>{ label }</span> }
104
- { /* TODO: replace with a future `@wordpress/ui` `Shortcut` primitive once available */ }
105
- <span className="boot-save-button__shortcut">
106
- { shortcut }
107
- </span>
126
+ <KeyboardShortcutDisplay
127
+ className={ styles.shortcut }
128
+ shortcut={ shortcut }
129
+ />
108
130
  </Tooltip.Popup>
109
131
  </Tooltip.Root>
110
132
  { isSaveViewOpen && (
@@ -0,0 +1,10 @@
1
+ @use "@wordpress/base-styles/variables" as *;
2
+
3
+ .save-button {
4
+ width: 100%;
5
+ }
6
+
7
+
8
+ .shortcut:not(:first-child) {
9
+ margin-inline-start: $grid-unit-10;
10
+ }
@@ -3,6 +3,7 @@ import { Modal } from '@wordpress/components';
3
3
  import { EntitiesSavedStates } from '@wordpress/editor';
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import useSaveShortcut from './use-save-shortcut';
6
+ import styles from './style.module.scss';
6
7
 
7
8
  export default function SavePanel() {
8
9
  const [ isOpen, setIsOpen ] = useState< boolean >( false );
@@ -14,7 +15,7 @@ export default function SavePanel() {
14
15
  }
15
16
  return (
16
17
  <Modal
17
- className="edit-site-save-panel__modal"
18
+ className={ styles.modal }
18
19
  onRequestClose={ () => setIsOpen( false ) }
19
20
  title={ __( 'Review changes' ) }
20
21
  size="small"
@@ -0,0 +1,7 @@
1
+ @use "@wordpress/base-styles/mixins" as *;
2
+
3
+ .modal {
4
+ @include break-small() {
5
+ width: 600px;
6
+ }
7
+ }
@@ -5,7 +5,7 @@ import { chevronLeft, chevronRight } from '@wordpress/icons';
5
5
  import Navigation from '../navigation';
6
6
  import SaveButton from '../save-button';
7
7
  import { store as bootStore } from '../../store';
8
- import './style.scss';
8
+ import styles from './style.module.scss';
9
9
 
10
10
  function DashboardBackButton() {
11
11
  const dashboardLink = useSelect(
@@ -15,7 +15,7 @@ function DashboardBackButton() {
15
15
  return (
16
16
  <Button
17
17
  __next40pxDefaultSize
18
- className="boot-sidebar__back-button"
18
+ className={ styles[ 'back-button' ] }
19
19
  href={ dashboardLink || '/' }
20
20
  icon={ isRTL() ? chevronRight : chevronLeft }
21
21
  label={ __( 'Go to the Dashboard' ) }
@@ -27,12 +27,12 @@ function DashboardBackButton() {
27
27
 
28
28
  export default function Sidebar() {
29
29
  return (
30
- <div className="boot-sidebar__scrollable">
30
+ <div className={ styles.scrollable }>
31
31
  <DashboardBackButton />
32
- <div className="boot-sidebar__content">
32
+ <div className={ styles.content }>
33
33
  <Navigation />
34
34
  </div>
35
- <div className="boot-sidebar__footer">
35
+ <div className={ styles.footer }>
36
36
  <SaveButton />
37
37
  </div>
38
38
  </div>
@@ -0,0 +1,29 @@
1
+ @use "@wordpress/base-styles/variables";
2
+
3
+ .scrollable {
4
+ overflow: auto;
5
+ height: 100%;
6
+ position: relative;
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
+
11
+ .content {
12
+ flex-grow: 1;
13
+ contain: content;
14
+ position: relative;
15
+ }
16
+
17
+ .footer {
18
+ padding-block-start: variables.$grid-unit-20;
19
+ padding-inline-end: variables.$grid-unit-10;
20
+ padding-block-end: variables.$grid-unit-10;
21
+ padding-inline-start: variables.$grid-unit-20;
22
+ }
23
+
24
+ .back-button {
25
+ margin-block-start: variables.$grid-unit-20;
26
+ margin-inline-end: variables.$grid-unit-15;
27
+ margin-block-end: variables.$grid-unit-10;
28
+ margin-inline-start: variables.$grid-unit-15;
29
+ }
package/src/index.tsx CHANGED
@@ -1,4 +1,2 @@
1
- import './style.scss';
2
- import './view-transitions.scss';
3
1
  export { init, initSinglePage } from './components/app';
4
2
  export { store } from './store';
@@ -1,4 +1,4 @@
1
- import type { MenuItem, Route } from './types';
1
+ import type { EntityLinks, MenuItem, Route } from './types';
2
2
 
3
3
  export function registerMenuItem( id: string, menuItem: MenuItem ) {
4
4
  return {
@@ -23,6 +23,22 @@ export function registerRoute( route: Route ) {
23
23
  };
24
24
  }
25
25
 
26
+ /**
27
+ * Registers where entities of a post type are listed and edited.
28
+ *
29
+ * Register `default` to cover post types with no entry of their own.
30
+ *
31
+ * @param postType Post type the links belong to, or `default`.
32
+ * @param links Paths to list and edit an entity of that post type.
33
+ */
34
+ export function registerEntityLinks( postType: string, links: EntityLinks ) {
35
+ return {
36
+ type: 'REGISTER_ENTITY_LINKS' as const,
37
+ postType,
38
+ links,
39
+ };
40
+ }
41
+
26
42
  export function setDashboardLink( dashboardLink: string ) {
27
43
  return {
28
44
  type: 'SET_DASHBOARD_LINK' as const,
@@ -34,4 +50,5 @@ export type Action =
34
50
  | ReturnType< typeof registerMenuItem >
35
51
  | ReturnType< typeof updateMenuItem >
36
52
  | ReturnType< typeof registerRoute >
53
+ | ReturnType< typeof registerEntityLinks >
37
54
  | ReturnType< typeof setDashboardLink >;
@@ -5,6 +5,7 @@ const initialState: State = {
5
5
  menuItems: {},
6
6
  routes: [],
7
7
  dashboardLink: undefined,
8
+ entityLinks: {},
8
9
  };
9
10
 
10
11
  export function reducer( state: State = initialState, action: Action ): State {
@@ -19,6 +20,12 @@ export function reducer( state: State = initialState, action: Action ): State {
19
20
  };
20
21
 
21
22
  case 'UPDATE_MENU_ITEM':
23
+ // Updating an item that was never registered would add a partial
24
+ // entry to the menu, which renders as an empty navigation row.
25
+ if ( ! state.menuItems[ action.id ] ) {
26
+ return state;
27
+ }
28
+
22
29
  return {
23
30
  ...state,
24
31
  menuItems: {
@@ -36,6 +43,18 @@ export function reducer( state: State = initialState, action: Action ): State {
36
43
  routes: [ ...state.routes, action.route ],
37
44
  };
38
45
 
46
+ case 'REGISTER_ENTITY_LINKS':
47
+ return {
48
+ ...state,
49
+ entityLinks: {
50
+ ...state.entityLinks,
51
+ [ action.postType ]: {
52
+ ...state.entityLinks[ action.postType ],
53
+ ...action.links,
54
+ },
55
+ },
56
+ };
57
+
39
58
  case 'SET_DASHBOARD_LINK':
40
59
  return {
41
60
  ...state,
@@ -11,3 +11,31 @@ export function getRoutes( state: State ) {
11
11
  export function getDashboardLink( state: State ) {
12
12
  return state.dashboardLink;
13
13
  }
14
+
15
+ /**
16
+ * Returns the path an entity is edited or listed at.
17
+ *
18
+ * Falls back to the links registered for `default`, so a post type with no
19
+ * entry of its own still resolves.
20
+ *
21
+ * @param state Store state.
22
+ * @param postType Post type to resolve for.
23
+ * @param postId Entity to edit. Omit for the list of the post type.
24
+ * @return The path, or undefined when nothing is registered for it.
25
+ */
26
+ export function getEntityLink(
27
+ state: State,
28
+ postType: string,
29
+ postId?: string | number
30
+ ) {
31
+ const links = state.entityLinks[ postType ] ?? state.entityLinks.default;
32
+ const path = postId === undefined ? links?.list : links?.edit;
33
+
34
+ if ( ! path ) {
35
+ return undefined;
36
+ }
37
+
38
+ return path
39
+ .replace( '{type}', encodeURIComponent( postType ) )
40
+ .replace( '{id}', encodeURIComponent( postId ?? '' ) );
41
+ }
@@ -53,11 +53,25 @@ export interface CanvasData {
53
53
  * Indicates if the canvas is in preview mode.
54
54
  */
55
55
  isPreview?: boolean;
56
+ }
57
+
58
+ /**
59
+ * The routes an entity of a given post type is edited and listed at.
60
+ *
61
+ * Registered by the application rather than known here, so the shell holds no
62
+ * knowledge of any particular page's URLs.
63
+ */
64
+ export interface EntityLinks {
56
65
  /**
57
- * Optional edit link for click-to-edit navigation.
58
- * When provided with isPreview: true, clicking the canvas navigates to this URL.
66
+ * Path the entities of this post type are listed at.
59
67
  */
60
- editLink?: string;
68
+ list?: string;
69
+
70
+ /**
71
+ * Path an entity of this post type is edited at. `{id}` is replaced with
72
+ * the encoded entity ID.
73
+ */
74
+ edit?: string;
61
75
  }
62
76
 
63
77
  /**
@@ -104,6 +118,25 @@ export interface RouteConfig {
104
118
  */
105
119
  inspector?: ( context: RouteLoaderContext ) => boolean | Promise< boolean >;
106
120
 
121
+ /**
122
+ * Function that determines whether to show the stage.
123
+ * When not defined, defaults to true (always show stage if component exists).
124
+ * When it returns false, the stage is hidden even if a stage component is
125
+ * exported, leaving the canvas to fill the surfaces area.
126
+ *
127
+ * @example
128
+ * ```tsx
129
+ * export const route = {
130
+ * stage: async () => {
131
+ * // Only show the stage when there is something to edit
132
+ * const theme = await resolveSelect( coreStore ).getCurrentTheme();
133
+ * return !! theme?.is_block_theme;
134
+ * },
135
+ * };
136
+ * ```
137
+ */
138
+ stage?: ( context: RouteLoaderContext ) => boolean | Promise< boolean >;
139
+
107
140
  /**
108
141
  * Function that returns the document title for the route.
109
142
  * The returned title will be formatted as: "{title} ‹ {siteTitle} — WordPress"
@@ -161,4 +194,5 @@ export interface State {
161
194
  menuItems: Record< string, MenuItem >;
162
195
  routes: Route[];
163
196
  dashboardLink?: string;
197
+ entityLinks: Record< string, EntityLinks >;
164
198
  }
@@ -1,133 +0,0 @@
1
- /**
2
- * Typography
3
- */
4
- /**
5
- * SCSS Variables.
6
- *
7
- * Please use variables from this sheet to ensure consistency across the UI.
8
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
9
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
10
- */
11
- /**
12
- * Colors
13
- */
14
- /**
15
- * Fonts & basic variables.
16
- */
17
- /**
18
- * Typography
19
- */
20
- /**
21
- * Grid System.
22
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
23
- */
24
- /**
25
- * Radius scale.
26
- */
27
- /**
28
- * Elevation scale.
29
- */
30
- /**
31
- * Dimensions.
32
- */
33
- /**
34
- * Mobile specific styles
35
- */
36
- /**
37
- * Editor styles.
38
- */
39
- /**
40
- * Block & Editor UI.
41
- */
42
- /**
43
- * Block paddings.
44
- */
45
- /**
46
- * React Native specific.
47
- * These variables do not appear to be used anywhere else.
48
- */
49
- /**
50
- * Breakpoints & Media Queries
51
- */
52
- /**
53
- * Converts a hex value into the rgb equivalent.
54
- *
55
- * @param {string} hex - the hexadecimal value to convert
56
- * @return {string} comma separated rgb values
57
- */
58
- /**
59
- * Long content fade mixin
60
- *
61
- * Creates a fading overlay to signify that the content is longer
62
- * than the space allows.
63
- */
64
- /**
65
- * Breakpoint mixins
66
- */
67
- /**
68
- * Focus styles.
69
- */
70
- /**
71
- * Standard focus rings for the WordPress Design System.
72
- *
73
- * Apply `outset-ring__focus` inside the relevant pseudo-class at the call site,
74
- * e.g. `&:focus { @include outset-ring__focus(); }`.
75
- */
76
- /**
77
- * Applies editor left position to the selector passed as argument
78
- */
79
- /**
80
- * Styles that are reused verbatim in a few places
81
- */
82
- /**
83
- * Allows users to opt-out of animations via OS-level preferences.
84
- */
85
- /**
86
- * Reset default styles for JavaScript UI based pages.
87
- * This is a WP-admin agnostic reset
88
- */
89
- /**
90
- * Reset the WP Admin page styles for Gutenberg-like pages.
91
- */
92
- /**
93
- * Creates a checkerboard pattern background to indicate transparency.
94
- * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
95
- */
96
- @media (min-width: 600px) {
97
- .boot-layout-container .boot-layout {
98
- position: absolute;
99
- top: 0;
100
- left: 0;
101
- bottom: 0;
102
- right: 0;
103
- min-height: calc(100vh - 46px);
104
- }
105
- }
106
- @media (min-width: 782px) {
107
- .boot-layout-container .boot-layout {
108
- min-height: calc(100vh - 32px);
109
- }
110
- body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout {
111
- min-height: 100vh;
112
- }
113
- }
114
-
115
- :where(.boot-layout) img {
116
- max-width: 100%;
117
- height: auto;
118
- }
119
-
120
- .boot-layout .boot-notices__snackbar {
121
- position: fixed;
122
- bottom: var(--wpds-dimension-size-md, 32px);
123
- right: 0;
124
- left: 0;
125
- padding-inline: 16px;
126
- box-sizing: border-box;
127
- display: flex;
128
- flex-direction: column;
129
- pointer-events: none;
130
- }
131
- .boot-layout .boot-notices__snackbar .components-snackbar {
132
- margin-inline: auto;
133
- }
@@ -1,133 +0,0 @@
1
- /**
2
- * Typography
3
- */
4
- /**
5
- * SCSS Variables.
6
- *
7
- * Please use variables from this sheet to ensure consistency across the UI.
8
- * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
9
- * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
10
- */
11
- /**
12
- * Colors
13
- */
14
- /**
15
- * Fonts & basic variables.
16
- */
17
- /**
18
- * Typography
19
- */
20
- /**
21
- * Grid System.
22
- * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
23
- */
24
- /**
25
- * Radius scale.
26
- */
27
- /**
28
- * Elevation scale.
29
- */
30
- /**
31
- * Dimensions.
32
- */
33
- /**
34
- * Mobile specific styles
35
- */
36
- /**
37
- * Editor styles.
38
- */
39
- /**
40
- * Block & Editor UI.
41
- */
42
- /**
43
- * Block paddings.
44
- */
45
- /**
46
- * React Native specific.
47
- * These variables do not appear to be used anywhere else.
48
- */
49
- /**
50
- * Breakpoints & Media Queries
51
- */
52
- /**
53
- * Converts a hex value into the rgb equivalent.
54
- *
55
- * @param {string} hex - the hexadecimal value to convert
56
- * @return {string} comma separated rgb values
57
- */
58
- /**
59
- * Long content fade mixin
60
- *
61
- * Creates a fading overlay to signify that the content is longer
62
- * than the space allows.
63
- */
64
- /**
65
- * Breakpoint mixins
66
- */
67
- /**
68
- * Focus styles.
69
- */
70
- /**
71
- * Standard focus rings for the WordPress Design System.
72
- *
73
- * Apply `outset-ring__focus` inside the relevant pseudo-class at the call site,
74
- * e.g. `&:focus { @include outset-ring__focus(); }`.
75
- */
76
- /**
77
- * Applies editor left position to the selector passed as argument
78
- */
79
- /**
80
- * Styles that are reused verbatim in a few places
81
- */
82
- /**
83
- * Allows users to opt-out of animations via OS-level preferences.
84
- */
85
- /**
86
- * Reset default styles for JavaScript UI based pages.
87
- * This is a WP-admin agnostic reset
88
- */
89
- /**
90
- * Reset the WP Admin page styles for Gutenberg-like pages.
91
- */
92
- /**
93
- * Creates a checkerboard pattern background to indicate transparency.
94
- * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
95
- */
96
- @media (min-width: 600px) {
97
- .boot-layout-container .boot-layout {
98
- position: absolute;
99
- top: 0;
100
- right: 0;
101
- bottom: 0;
102
- left: 0;
103
- min-height: calc(100vh - 46px);
104
- }
105
- }
106
- @media (min-width: 782px) {
107
- .boot-layout-container .boot-layout {
108
- min-height: calc(100vh - 32px);
109
- }
110
- body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout {
111
- min-height: 100vh;
112
- }
113
- }
114
-
115
- :where(.boot-layout) img {
116
- max-width: 100%;
117
- height: auto;
118
- }
119
-
120
- .boot-layout .boot-notices__snackbar {
121
- position: fixed;
122
- bottom: var(--wpds-dimension-size-md, 32px);
123
- left: 0;
124
- right: 0;
125
- padding-inline: 16px;
126
- box-sizing: border-box;
127
- display: flex;
128
- flex-direction: column;
129
- pointer-events: none;
130
- }
131
- .boot-layout .boot-notices__snackbar .components-snackbar {
132
- margin-inline: auto;
133
- }