@wordpress/grid 0.2.1-next.v.202607070741.0 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/grid",
3
- "version": "0.2.1-next.v.202607070741.0+a51d59513",
3
+ "version": "0.3.0",
4
4
  "description": "Grid layout components for arranging tiles in dashboard-style surfaces, with drag-to-reorder and tile resizing.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -49,9 +49,9 @@
49
49
  "@dnd-kit/core": "^6.3.1",
50
50
  "@dnd-kit/sortable": "^10.0.0",
51
51
  "@dnd-kit/utilities": "^3.2.2",
52
- "@wordpress/compose": "^8.3.1-next.v.202607070741.0+a51d59513",
53
- "@wordpress/element": "^8.2.1-next.v.202607070741.0+a51d59513",
54
- "@wordpress/style-runtime": "^0.6.1-next.v.202607070741.0+a51d59513",
52
+ "@wordpress/compose": "^8.4.0",
53
+ "@wordpress/element": "^8.3.0",
54
+ "@wordpress/style-runtime": "^0.7.0",
55
55
  "clsx": "^2.1.1"
56
56
  },
57
57
  "devDependencies": {
@@ -59,14 +59,14 @@
59
59
  "@testing-library/dom": "^10.4.1",
60
60
  "@testing-library/react": "^16.3.2",
61
61
  "@types/jest": "^29.5.14",
62
- "@wordpress/icons": "^15.1.1-next.v.202607070741.0+a51d59513",
63
- "@wordpress/ui": "^0.18.1-next.v.202607070741.0+a51d59513",
62
+ "@wordpress/icons": "^15.2.0",
63
+ "@wordpress/ui": "^0.18.0",
64
64
  "storybook": "^10.4.3"
65
65
  },
66
66
  "peerDependencies": {
67
- "@types/react": "^18.3.27",
68
- "react": "^18.0.0",
69
- "react-dom": "^18.0.0"
67
+ "@types/react": "^18 || ^19",
68
+ "react": "^18 || ^19",
69
+ "react-dom": "^18 || ^19"
70
70
  },
71
71
  "peerDependenciesMeta": {
72
72
  "@types/react": {
@@ -76,5 +76,5 @@
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "gitHead": "f637726e370c8b23695ed9af82adbe171ad235d8"
79
+ "gitHead": "e9a74f9c14095a34398ecd4d1f7a908e55051205"
80
80
  }
@@ -11,14 +11,25 @@
11
11
  * @dnd-kit’s drop translation matches the placeholder; scale lives on
12
12
  * `__lift` (see dnd-kit #398). Owns elevation, radius, cursor, and
13
13
  * pointer pass-through. Further chrome belongs to the consumer. Drag
14
- * elevation animates `xs` → `md` so it reads above edit tiles at `xs`.
14
+ * the shadow strengthens while dragging so it reads above edit tiles.
15
15
  */
16
16
  .drag-preview-frame {
17
+ --_wp-grid-elevation-xs:
18
+ 0 1px 1px rgba(0, 0, 0, 0.03),
19
+ 0 1px 2px rgba(0, 0, 0, 0.02),
20
+ 0 3px 3px rgba(0, 0, 0, 0.02),
21
+ 0 4px 4px rgba(0, 0, 0, 0.01);
22
+ --_wp-grid-elevation-md:
23
+ 0 2px 3px rgba(0, 0, 0, 0.05),
24
+ 0 4px 5px rgba(0, 0, 0, 0.04),
25
+ 0 12px 12px rgba(0, 0, 0, 0.03),
26
+ 0 16px 16px rgba(0, 0, 0, 0.02);
27
+
17
28
  height: 100%;
18
29
  border-radius: var(--wp-grid-drag-preview-radius, 0);
19
30
  cursor: grabbing;
20
31
  pointer-events: none;
21
- box-shadow: var(--wpds-elevation-md);
32
+ box-shadow: var(--_wp-grid-elevation-md);
22
33
  }
23
34
 
24
35
  .drag-preview-frame__lift {
@@ -44,11 +55,11 @@
44
55
  @media not (prefers-reduced-motion: reduce) {
45
56
  @keyframes wp-grid-drag-preview-shadow-enter {
46
57
  from {
47
- box-shadow: var(--wpds-elevation-xs);
58
+ box-shadow: var(--_wp-grid-elevation-xs);
48
59
  }
49
60
 
50
61
  to {
51
- box-shadow: var(--wpds-elevation-md);
62
+ box-shadow: var(--_wp-grid-elevation-md);
52
63
  }
53
64
  }
54
65
 
@@ -87,11 +98,11 @@
87
98
 
88
99
  @keyframes wp-grid-drag-preview-shadow-exit {
89
100
  from {
90
- box-shadow: var(--wpds-elevation-md);
101
+ box-shadow: var(--_wp-grid-elevation-md);
91
102
  }
92
103
 
93
104
  to {
94
- box-shadow: var(--wpds-elevation-xs);
105
+ box-shadow: var(--_wp-grid-elevation-xs);
95
106
  }
96
107
  }
97
108
 
@@ -107,7 +118,7 @@
107
118
  }
108
119
 
109
120
  .drag-preview-frame.dragPreviewFrameExiting {
110
- box-shadow: var(--wpds-elevation-xs);
121
+ box-shadow: var(--_wp-grid-elevation-xs);
111
122
  }
112
123
 
113
124
  .drag-preview-frame.dragPreviewFrameExiting .drag-preview-frame__lift {
@@ -116,7 +127,7 @@
116
127
 
117
128
  @media (prefers-reduced-motion: reduce) {
118
129
  .drag-preview-frame {
119
- box-shadow: var(--wpds-elevation-md);
130
+ box-shadow: var(--_wp-grid-elevation-md);
120
131
  }
121
132
 
122
133
  .drag-preview-frame__lift {
@@ -124,7 +135,7 @@
124
135
  }
125
136
 
126
137
  .drag-preview-frame.dragPreviewFrameExiting {
127
- box-shadow: var(--wpds-elevation-xs);
138
+ box-shadow: var(--_wp-grid-elevation-xs);
128
139
  transition: none;
129
140
  }
130
141
 
@@ -29,14 +29,25 @@
29
29
  * @dnd-kit’s drop translation matches the placeholder; scale lives on
30
30
  * `__lift` (see dnd-kit #398). Owns elevation, radius, cursor, and
31
31
  * pointer pass-through. Further chrome belongs to the consumer. Drag
32
- * elevation animates `xs` → `md` so it reads above edit tiles at `xs`.
32
+ * the shadow strengthens while dragging so it reads above edit tiles.
33
33
  */
34
34
  .drag-preview-frame {
35
+ --_wp-grid-elevation-xs:
36
+ 0 1px 1px rgba(0, 0, 0, 0.03),
37
+ 0 1px 2px rgba(0, 0, 0, 0.02),
38
+ 0 3px 3px rgba(0, 0, 0, 0.02),
39
+ 0 4px 4px rgba(0, 0, 0, 0.01);
40
+ --_wp-grid-elevation-md:
41
+ 0 2px 3px rgba(0, 0, 0, 0.05),
42
+ 0 4px 5px rgba(0, 0, 0, 0.04),
43
+ 0 12px 12px rgba(0, 0, 0, 0.03),
44
+ 0 16px 16px rgba(0, 0, 0, 0.02);
45
+
35
46
  height: 100%;
36
47
  border-radius: var(--wp-grid-drag-preview-radius, 0);
37
48
  cursor: grabbing;
38
49
  pointer-events: none;
39
- box-shadow: var(--wpds-elevation-md);
50
+ box-shadow: var(--_wp-grid-elevation-md);
40
51
  }
41
52
 
42
53
  .drag-preview-frame__lift {
@@ -62,11 +73,11 @@
62
73
  @media not (prefers-reduced-motion: reduce) {
63
74
  @keyframes wp-grid-drag-preview-shadow-enter {
64
75
  from {
65
- box-shadow: var(--wpds-elevation-xs);
76
+ box-shadow: var(--_wp-grid-elevation-xs);
66
77
  }
67
78
 
68
79
  to {
69
- box-shadow: var(--wpds-elevation-md);
80
+ box-shadow: var(--_wp-grid-elevation-md);
70
81
  }
71
82
  }
72
83
 
@@ -105,11 +116,11 @@
105
116
 
106
117
  @keyframes wp-grid-drag-preview-shadow-exit {
107
118
  from {
108
- box-shadow: var(--wpds-elevation-md);
119
+ box-shadow: var(--_wp-grid-elevation-md);
109
120
  }
110
121
 
111
122
  to {
112
- box-shadow: var(--wpds-elevation-xs);
123
+ box-shadow: var(--_wp-grid-elevation-xs);
113
124
  }
114
125
  }
115
126
 
@@ -125,7 +136,7 @@
125
136
  }
126
137
 
127
138
  .drag-preview-frame.dragPreviewFrameExiting {
128
- box-shadow: var(--wpds-elevation-xs);
139
+ box-shadow: var(--_wp-grid-elevation-xs);
129
140
  }
130
141
 
131
142
  .drag-preview-frame.dragPreviewFrameExiting .drag-preview-frame__lift {
@@ -134,7 +145,7 @@
134
145
 
135
146
  @media (prefers-reduced-motion: reduce) {
136
147
  .drag-preview-frame {
137
- box-shadow: var(--wpds-elevation-md);
148
+ box-shadow: var(--_wp-grid-elevation-md);
138
149
  }
139
150
 
140
151
  .drag-preview-frame__lift {
@@ -142,7 +153,7 @@
142
153
  }
143
154
 
144
155
  .drag-preview-frame.dragPreviewFrameExiting {
145
- box-shadow: var(--wpds-elevation-xs);
156
+ box-shadow: var(--_wp-grid-elevation-xs);
146
157
  transition: none;
147
158
  }
148
159