@wordpress/grid 0.4.0 → 0.6.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/CHANGELOG.md +14 -0
- package/build/dashboard-grid/grid-item.cjs.map +2 -2
- package/build/dashboard-grid/index.cjs +3 -3
- package/build/dashboard-grid/index.cjs.map +2 -2
- package/build/dashboard-grid/resolve-fill-widths.cjs.map +2 -2
- package/build/dashboard-grid/types.cjs.map +1 -1
- package/build/dashboard-lanes/index.cjs +3 -3
- package/build/dashboard-lanes/index.cjs.map +2 -2
- package/build/dashboard-lanes/lanes-item.cjs.map +2 -2
- package/build/dashboard-lanes/types.cjs.map +1 -1
- package/build/dashboard-lanes/use-lane-placement.cjs.map +2 -2
- package/build/shared/drag-overlay-drop-animation.cjs.map +2 -2
- package/build/shared/grid-overlay.cjs.map +2 -2
- package/build/shared/item-exit-overlay.cjs.map +2 -2
- package/build/shared/resize-handle.cjs.map +2 -2
- package/build/shared/types.cjs.map +1 -1
- package/build/shared/use-item-exit-animation.cjs.map +2 -2
- package/build/shared/use-layout-shift-animation.cjs.map +2 -2
- package/build-module/dashboard-grid/grid-item.mjs.map +2 -2
- package/build-module/dashboard-grid/index.mjs +3 -3
- package/build-module/dashboard-grid/index.mjs.map +2 -2
- package/build-module/dashboard-grid/resolve-fill-widths.mjs.map +2 -2
- package/build-module/dashboard-lanes/index.mjs +3 -3
- package/build-module/dashboard-lanes/index.mjs.map +2 -2
- package/build-module/dashboard-lanes/lanes-item.mjs.map +2 -2
- package/build-module/dashboard-lanes/use-lane-placement.mjs.map +2 -2
- package/build-module/shared/drag-overlay-drop-animation.mjs.map +2 -2
- package/build-module/shared/grid-overlay.mjs.map +2 -2
- package/build-module/shared/item-exit-overlay.mjs.map +2 -2
- package/build-module/shared/resize-handle.mjs.map +2 -2
- package/build-module/shared/use-item-exit-animation.mjs.map +2 -2
- package/build-module/shared/use-layout-shift-animation.mjs.map +2 -2
- package/build-types/dashboard-grid/grid-item.d.ts.map +1 -1
- package/build-types/dashboard-grid/index.d.ts.map +1 -1
- package/build-types/dashboard-grid/resolve-fill-widths.d.ts +0 -3
- package/build-types/dashboard-grid/resolve-fill-widths.d.ts.map +1 -1
- package/build-types/dashboard-grid/types.d.ts +0 -3
- package/build-types/dashboard-grid/types.d.ts.map +1 -1
- package/build-types/dashboard-lanes/index.d.ts.map +1 -1
- package/build-types/dashboard-lanes/lanes-item.d.ts.map +1 -1
- package/build-types/dashboard-lanes/types.d.ts +0 -3
- package/build-types/dashboard-lanes/types.d.ts.map +1 -1
- package/build-types/dashboard-lanes/use-lane-placement.d.ts.map +1 -1
- package/build-types/shared/drag-overlay-drop-animation.d.ts.map +1 -1
- package/build-types/shared/grid-overlay.d.ts +0 -3
- package/build-types/shared/grid-overlay.d.ts.map +1 -1
- package/build-types/shared/item-exit-overlay.d.ts.map +1 -1
- package/build-types/shared/resize-handle.d.ts +0 -3
- package/build-types/shared/resize-handle.d.ts.map +1 -1
- package/build-types/shared/types.d.ts +0 -3
- package/build-types/shared/types.d.ts.map +1 -1
- package/build-types/shared/use-item-exit-animation.d.ts +0 -3
- package/build-types/shared/use-item-exit-animation.d.ts.map +1 -1
- package/build-types/shared/use-layout-shift-animation.d.ts.map +1 -1
- package/package.json +10 -9
- package/src/dashboard-grid/grid-item.tsx +0 -11
- package/src/dashboard-grid/grid.module.css +6 -6
- package/src/dashboard-grid/index.tsx +1 -12
- package/src/dashboard-grid/resolve-fill-widths.ts +0 -3
- package/src/dashboard-grid/stories/index.story.tsx +15 -11
- package/src/dashboard-grid/test/keyboard-activation.test.tsx +0 -7
- package/src/dashboard-grid/test/resolve-fill-widths.test.ts +0 -3
- package/src/dashboard-grid/types.ts +0 -3
- package/src/dashboard-lanes/index.tsx +1 -12
- package/src/dashboard-lanes/lanes-item.tsx +0 -11
- package/src/dashboard-lanes/lanes.module.css +6 -6
- package/src/dashboard-lanes/stories/index.story.tsx +25 -11
- package/src/dashboard-lanes/test/keyboard-activation.test.tsx +0 -7
- package/src/dashboard-lanes/test/lane-placement.test.ts +0 -3
- package/src/dashboard-lanes/test/use-lane-placement.test.tsx +10 -14
- package/src/dashboard-lanes/types.ts +0 -3
- package/src/dashboard-lanes/use-lane-placement.ts +0 -7
- package/src/shared/drag-overlay-drop-animation.ts +0 -3
- package/src/shared/grid-overlay.tsx +0 -11
- package/src/shared/item-exit-overlay.tsx +0 -3
- package/src/shared/resize-handle.tsx +0 -11
- package/src/shared/types.ts +0 -3
- package/src/shared/use-item-exit-animation.ts +0 -7
- package/src/shared/use-layout-shift-animation.ts +0 -7
- package/build-types/dashboard-grid/stories/index.story.d.ts +0 -98
- package/build-types/dashboard-grid/stories/index.story.d.ts.map +0 -1
- package/build-types/dashboard-lanes/stories/index.story.d.ts +0 -64
- package/build-types/dashboard-lanes/stories/index.story.d.ts.map +0 -1
- package/build-types/grid-item.d.ts +0 -3
- package/build-types/grid-item.d.ts.map +0 -1
- package/build-types/grid.d.ts +0 -34
- package/build-types/grid.d.ts.map +0 -1
- package/build-types/resize-handle.d.ts +0 -23
- package/build-types/resize-handle.d.ts.map +0 -1
- package/build-types/resolve-fill-widths.d.ts +0 -26
- package/build-types/resolve-fill-widths.d.ts.map +0 -1
- package/build-types/stories/index.story.d.ts +0 -50
- package/build-types/stories/index.story.d.ts.map +0 -1
- package/build-types/types.d.ts +0 -266
- package/build-types/types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dashboard-lanes/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dashboard-lanes/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;GAQG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACtC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAChB,SAAQ,IAAI,CACX,KAAK,CAAC,wBAAwB,CAAE,KAAK,CAAE,EACvC,UAAU,GAAG,WAAW,GAAG,OAAO,CAClC;IACD;;OAEG;IACH,MAAM,EAAE,wBAAwB,EAAE,CAAC;IAEnC;;;;;OAKG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAE,SAAS,EAAE,wBAAwB,EAAE,KAAM,IAAI,CAAC;IAEnE;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAE,aAAa,EAAE,wBAAwB,EAAE,KAAM,IAAI,CAAC;IAExE;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,uBAAuB,CAAE,CAAC;IAEpE;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,sBAAsB,CAAE,CAAC;IAElE;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,sBAAsB,CAAE,CAAC;IAElE;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-lane-placement.d.ts","sourceRoot":"","sources":["../../src/dashboard-lanes/use-lane-placement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-lane-placement.d.ts","sourceRoot":"","sources":["../../src/dashboard-lanes/use-lane-placement.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,aAAa,CAAE,aAAa,CAAE,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC;;;;;;OAMG;IACH,UAAU,EAAE,GAAG,CAAE,MAAM,EAAE,KAAK,CAAC,aAAa,CAAE,CAAC;IAE/C;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,gBAAgB,CAC/B,SAAS,EAAE,WAAW,GAAG,IAAI,EAC7B,KAAK,EAAE,qBAAqB,GAC1B,sBAAsB,CA8MxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drag-overlay-drop-animation.d.ts","sourceRoot":"","sources":["../../src/shared/drag-overlay-drop-animation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drag-overlay-drop-animation.d.ts","sourceRoot":"","sources":["../../src/shared/drag-overlay-drop-animation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,0EAA0E;AAC1E,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAK9C;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC/C,yBAAyB,EAAE,MAAM,EACjC,qBAAqB,EAAE,MAAM,GAC3B,aAAa,CAuCf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-overlay.d.ts","sourceRoot":"","sources":["../../src/shared/grid-overlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grid-overlay.d.ts","sourceRoot":"","sources":["../../src/shared/grid-overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAGtD;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAE,EAC5B,OAAO,EACP,SAAS,EACT,IAAI,EACJ,QAAQ,GACR,EAAE,sBAAsB,+BA0DxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-exit-overlay.d.ts","sourceRoot":"","sources":["../../src/shared/item-exit-overlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"item-exit-overlay.d.ts","sourceRoot":"","sources":["../../src/shared/item-exit-overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACrC,YAAY,EACZ,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CACnC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAE,EAChC,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,cAAc,GACd,EAAE,oBAAoB,+BAsBtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-handle.d.ts","sourceRoot":"","sources":["../../src/shared/resize-handle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resize-handle.d.ts","sourceRoot":"","sources":["../../src/shared/resize-handle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAe,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAsF9D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAE,KAAK,EAAE,iBAAiB,+BA2CpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAKlD,KAAK,iBAAiB,GAAG,UAAU,CAAE,OAAO,YAAY,CAAE,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,GAAG,EAAE,iBAAiB,CAAE,YAAY,CAAE,CAAC;IAEvC;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAE,WAAW,CAAE,CAAC;IAE5C;;OAEG;IACH,UAAU,EAAE,iBAAiB,CAAE,YAAY,CAAE,CAAC;IAE9C;;;OAGG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACtC;;;;OAIG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,sBAAsB;IACtC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,WAAW,KAAM,IAAI,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAEzB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,uBAAuB,CAAE,CAAC;CACpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-item-exit-animation.d.ts","sourceRoot":"","sources":["../../src/shared/use-item-exit-animation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-item-exit-animation.d.ts","sourceRoot":"","sources":["../../src/shared/use-item-exit-animation.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AASjE,MAAM,MAAM,eAAe,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC;CAC1B,CAAC;AAEF,KAAK,2BAA2B,GAAG;IAClC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,WAAW,CAAE,MAAM,CAAE,CAAC;IAClC,4BAA4B,EAAE,MAAM,WAAW,CAC9C,MAAM,EACN,YAAY,CACZ,GAAG,IAAI,CAAC;IACT,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,CACvC,GAAG,CAAE,MAAM,EAAE,KAAK,CAAC,YAAY,CAAE,CACjC,CAAC;CACF,CAAC;AAEF,KAAK,0BAA0B,GAAG;IACjC,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,CAAE,GAAG,EAAE,MAAM,KAAM,IAAI,CAAC;CAC1C,CAAC;AASF;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAE,EACrC,SAAS,EACT,OAAO,EACP,UAAU,EACV,4BAA4B,EAC5B,gBAAgB,GAChB,EAAE,2BAA2B,GAAI,0BAA0B,CA6H3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-layout-shift-animation.d.ts","sourceRoot":"","sources":["../../src/shared/use-layout-shift-animation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-layout-shift-animation.d.ts","sourceRoot":"","sources":["../../src/shared/use-layout-shift-animation.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,8BAA8B,GAAG;IACrC;;OAEG;IACH,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACpC;;;OAGG;IACH,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC;;;OAGG;IACH,gBAAgB,EAAE,MAAM,WAAW,CAAE,MAAM,EAAE,YAAY,CAAE,GAAG,IAAI,CAAC;IAEnE;;;OAGG;IACH,4BAA4B,EAAE,MAAM,WAAW,CAC9C,MAAM,EACN,YAAY,CACZ,GAAG,IAAI,CAAC;CACT,CAAC;AA0EF;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAE,EACxC,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,cAAqB,GACrB,EAAE,8BAA8B,GAAI,6BAA6B,CAkFjE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,aAAa,CAAE;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAE,GACD,MAAM,CASR;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACtC,UAAU,EAAE,GAAG,CAAE,MAAM,EAAE,KAAK,CAAC,aAAa,CAAE,GAC5C,MAAM,CAaR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/grid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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,19 +49,20 @@
|
|
|
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.
|
|
53
|
-
"@wordpress/element": "^8.
|
|
54
|
-
"@wordpress/style-runtime": "^0.
|
|
52
|
+
"@wordpress/compose": "^8.7.0",
|
|
53
|
+
"@wordpress/element": "^8.6.0",
|
|
54
|
+
"@wordpress/style-runtime": "^0.10.0",
|
|
55
55
|
"clsx": "^2.1.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@storybook/react-vite": "^10.
|
|
58
|
+
"@storybook/react-vite": "^10.5.3",
|
|
59
59
|
"@testing-library/dom": "^10.4.1",
|
|
60
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
60
61
|
"@testing-library/react": "^16.3.2",
|
|
61
62
|
"@types/jest": "^30.0.0",
|
|
62
|
-
"@wordpress/icons": "^15.
|
|
63
|
-
"@wordpress/ui": "^0.
|
|
64
|
-
"storybook": "^10.
|
|
63
|
+
"@wordpress/icons": "^15.5.0",
|
|
64
|
+
"@wordpress/ui": "^0.21.0",
|
|
65
|
+
"storybook": "^10.5.3"
|
|
65
66
|
},
|
|
66
67
|
"peerDependencies": {
|
|
67
68
|
"@types/react": "^18 || ^19",
|
|
@@ -76,5 +77,5 @@
|
|
|
76
77
|
"publishConfig": {
|
|
77
78
|
"access": "public"
|
|
78
79
|
},
|
|
79
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "5ef24f60261976bb198ad035db24bf81c1fb92b4"
|
|
80
81
|
}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useSortable } from '@dnd-kit/sortable';
|
|
5
2
|
import clsx from 'clsx';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* WordPress dependencies
|
|
9
|
-
*/
|
|
10
3
|
import { useState, useRef } from '@wordpress/element';
|
|
11
4
|
import { useMergeRefs } from '@wordpress/compose';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
5
|
import actionableAreaStyles from '../shared/actionable-area-slot.module.css';
|
|
17
6
|
import { GRID_ITEM_DATA_KEY } from '../shared/grid-item-key';
|
|
18
7
|
import ResizeHandle from '../shared/resize-handle';
|
|
@@ -82,14 +82,14 @@
|
|
|
82
82
|
* is replaced.
|
|
83
83
|
*/
|
|
84
84
|
@media not (prefers-reduced-motion: reduce) {
|
|
85
|
-
.drag-preview-frame.
|
|
85
|
+
.drag-preview-frame.is-exiting {
|
|
86
86
|
animation:
|
|
87
87
|
wp-grid-drag-preview-shadow-exit
|
|
88
88
|
var(--wpds-motion-duration-md) var(--wpds-motion-easing-balanced)
|
|
89
89
|
forwards;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.drag-preview-frame.
|
|
92
|
+
.drag-preview-frame.is-exiting .drag-preview-frame__lift {
|
|
93
93
|
animation:
|
|
94
94
|
wp-grid-drag-preview-scale-exit
|
|
95
95
|
var(--wpds-motion-duration-md) var(--wpds-motion-easing-balanced)
|
|
@@ -117,11 +117,11 @@
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
.drag-preview-frame.
|
|
120
|
+
.drag-preview-frame.is-exiting {
|
|
121
121
|
box-shadow: var(--_wp-grid-elevation-xs);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
.drag-preview-frame.
|
|
124
|
+
.drag-preview-frame.is-exiting .drag-preview-frame__lift {
|
|
125
125
|
transform: scale(1);
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -134,12 +134,12 @@
|
|
|
134
134
|
transform: none;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
.drag-preview-frame.
|
|
137
|
+
.drag-preview-frame.is-exiting {
|
|
138
138
|
box-shadow: var(--_wp-grid-elevation-xs);
|
|
139
139
|
transition: none;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
.drag-preview-frame.
|
|
142
|
+
.drag-preview-frame.is-exiting .drag-preview-frame__lift {
|
|
143
143
|
transition: none;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import {
|
|
5
2
|
DndContext,
|
|
6
3
|
DragOverlay,
|
|
@@ -16,10 +13,6 @@ import {
|
|
|
16
13
|
} from '@dnd-kit/sortable';
|
|
17
14
|
import type { DragMoveEvent, DragStartEvent } from '@dnd-kit/core';
|
|
18
15
|
import clsx from 'clsx';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* WordPress dependencies
|
|
22
|
-
*/
|
|
23
16
|
import { useResizeObserver, useEvent, useMergeRefs } from '@wordpress/compose';
|
|
24
17
|
import {
|
|
25
18
|
forwardRef,
|
|
@@ -31,10 +24,6 @@ import {
|
|
|
31
24
|
useRef,
|
|
32
25
|
useState,
|
|
33
26
|
} from '@wordpress/element';
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Internal dependencies
|
|
37
|
-
*/
|
|
38
27
|
import { GridItem } from './grid-item';
|
|
39
28
|
import { GridOverlay } from '../shared/grid-overlay';
|
|
40
29
|
import { gridSpanToPixelSize } from '../shared/resize-snap';
|
|
@@ -54,7 +43,7 @@ import styles from './grid.module.css';
|
|
|
54
43
|
|
|
55
44
|
const dashboardDragDropAnimation = createDashboardDragDropAnimation(
|
|
56
45
|
styles[ 'drag-preview-frame' ],
|
|
57
|
-
styles
|
|
46
|
+
styles[ 'is-exiting' ]
|
|
58
47
|
);
|
|
59
48
|
|
|
60
49
|
// Fallback gap in pixels for math that runs before the computed gap
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
2
|
import { useState, useMemo } from '@wordpress/element';
|
|
10
3
|
import { close, justifyStretch, stretchFullWidth } from '@wordpress/icons';
|
|
11
4
|
// eslint-disable-next-line @wordpress/use-recommended-components -- @wordpress/grid consumes @wordpress/ui in story examples only.
|
|
12
5
|
import { Icon, IconButton, Stack } from '@wordpress/ui';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Internal dependencies
|
|
16
|
-
*/
|
|
17
6
|
import { DashboardGrid } from '..';
|
|
18
7
|
import type { DashboardGridLayoutItem } from '../types';
|
|
19
8
|
import type {
|
|
@@ -494,6 +483,11 @@ export const RowHeight: Story = {
|
|
|
494
483
|
* to drop.
|
|
495
484
|
*/
|
|
496
485
|
export const EditMode: Story = {
|
|
486
|
+
parameters: {
|
|
487
|
+
// FIXME: Resize handles are nameless aria commands; edit mode nests interactive controls (aria-command-name, nested-interactive).
|
|
488
|
+
// See: https://github.com/WordPress/gutenberg/issues/81596
|
|
489
|
+
a11y: { test: 'todo' },
|
|
490
|
+
},
|
|
497
491
|
args: {
|
|
498
492
|
columns: 12,
|
|
499
493
|
rowHeight: 80,
|
|
@@ -734,6 +728,11 @@ function CustomDragPreview( { children }: DragPreviewRenderProps ) {
|
|
|
734
728
|
* respond.
|
|
735
729
|
*/
|
|
736
730
|
export const Customization: Story = {
|
|
731
|
+
parameters: {
|
|
732
|
+
// FIXME: Resize handles are nameless aria commands; edit mode nests interactive controls (aria-command-name, nested-interactive).
|
|
733
|
+
// See: https://github.com/WordPress/gutenberg/issues/81596
|
|
734
|
+
a11y: { test: 'todo' },
|
|
735
|
+
},
|
|
737
736
|
args: {
|
|
738
737
|
columns: 6,
|
|
739
738
|
rowHeight: 80,
|
|
@@ -877,6 +876,11 @@ function NumberedOverlay( { columns, isActive }: GridOverlayRenderProps ) {
|
|
|
877
876
|
* on.
|
|
878
877
|
*/
|
|
879
878
|
export const CustomGridOverlayStory: Story = {
|
|
879
|
+
parameters: {
|
|
880
|
+
// FIXME: Resize handles are nameless aria commands; edit mode nests interactive controls (aria-command-name, nested-interactive).
|
|
881
|
+
// See: https://github.com/WordPress/gutenberg/issues/81596
|
|
882
|
+
a11y: { test: 'todo' },
|
|
883
|
+
},
|
|
880
884
|
name: 'Custom Grid Overlay',
|
|
881
885
|
args: {
|
|
882
886
|
columns: 12,
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import {
|
|
5
2
|
DndContext,
|
|
6
3
|
DragOverlay,
|
|
@@ -16,10 +13,6 @@ import {
|
|
|
16
13
|
} from '@dnd-kit/sortable';
|
|
17
14
|
import type { DragMoveEvent, DragStartEvent } from '@dnd-kit/core';
|
|
18
15
|
import clsx from 'clsx';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* WordPress dependencies
|
|
22
|
-
*/
|
|
23
16
|
import { useResizeObserver, useEvent, useMergeRefs } from '@wordpress/compose';
|
|
24
17
|
import {
|
|
25
18
|
forwardRef,
|
|
@@ -31,10 +24,6 @@ import {
|
|
|
31
24
|
useRef,
|
|
32
25
|
useState,
|
|
33
26
|
} from '@wordpress/element';
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Internal dependencies
|
|
37
|
-
*/
|
|
38
27
|
import { LanesItem } from './lanes-item';
|
|
39
28
|
import { useLanePlacement } from './use-lane-placement';
|
|
40
29
|
import { GridOverlay } from '../shared/grid-overlay';
|
|
@@ -55,7 +44,7 @@ import styles from './lanes.module.css';
|
|
|
55
44
|
|
|
56
45
|
const dashboardDragDropAnimation = createDashboardDragDropAnimation(
|
|
57
46
|
styles[ 'drag-preview-frame' ],
|
|
58
|
-
styles
|
|
47
|
+
styles[ 'is-exiting' ]
|
|
59
48
|
);
|
|
60
49
|
|
|
61
50
|
// Fallback gap in pixels for math that runs before the computed gap
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useSortable } from '@dnd-kit/sortable';
|
|
5
2
|
import clsx from 'clsx';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* WordPress dependencies
|
|
9
|
-
*/
|
|
10
3
|
import { useState, useRef } from '@wordpress/element';
|
|
11
4
|
import { useMergeRefs } from '@wordpress/compose';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
5
|
import actionableAreaStyles from '../shared/actionable-area-slot.module.css';
|
|
17
6
|
import ResizeHandle from '../shared/resize-handle';
|
|
18
7
|
import { clampResizeDelta, type ResizeSnapSize } from '../shared/resize-snap';
|
|
@@ -100,14 +100,14 @@
|
|
|
100
100
|
* is replaced.
|
|
101
101
|
*/
|
|
102
102
|
@media not (prefers-reduced-motion: reduce) {
|
|
103
|
-
.drag-preview-frame.
|
|
103
|
+
.drag-preview-frame.is-exiting {
|
|
104
104
|
animation:
|
|
105
105
|
wp-grid-drag-preview-shadow-exit
|
|
106
106
|
var(--wpds-motion-duration-md) var(--wpds-motion-easing-balanced)
|
|
107
107
|
forwards;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
.drag-preview-frame.
|
|
110
|
+
.drag-preview-frame.is-exiting .drag-preview-frame__lift {
|
|
111
111
|
animation:
|
|
112
112
|
wp-grid-drag-preview-scale-exit
|
|
113
113
|
var(--wpds-motion-duration-md) var(--wpds-motion-easing-balanced)
|
|
@@ -135,11 +135,11 @@
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.drag-preview-frame.
|
|
138
|
+
.drag-preview-frame.is-exiting {
|
|
139
139
|
box-shadow: var(--_wp-grid-elevation-xs);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
.drag-preview-frame.
|
|
142
|
+
.drag-preview-frame.is-exiting .drag-preview-frame__lift {
|
|
143
143
|
transform: scale(1);
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -152,12 +152,12 @@
|
|
|
152
152
|
transform: none;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
.drag-preview-frame.
|
|
155
|
+
.drag-preview-frame.is-exiting {
|
|
156
156
|
box-shadow: var(--_wp-grid-elevation-xs);
|
|
157
157
|
transition: none;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.drag-preview-frame.
|
|
160
|
+
.drag-preview-frame.is-exiting .drag-preview-frame__lift {
|
|
161
161
|
transition: none;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
2
|
import { useState, useMemo } from '@wordpress/element';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
14
3
|
import { DashboardLanes } from '..';
|
|
15
4
|
import type { DashboardLanesLayoutItem } from '../types';
|
|
16
5
|
import type { GridOverlayRenderProps } from '../../shared/types';
|
|
@@ -198,6 +187,11 @@ export const Default: Story = {
|
|
|
198
187
|
* frame to see the lane count adapt.
|
|
199
188
|
*/
|
|
200
189
|
export const Responsive: Story = {
|
|
190
|
+
parameters: {
|
|
191
|
+
// FIXME: Resize handles are nameless aria commands; edit mode nests interactive controls (aria-command-name, nested-interactive).
|
|
192
|
+
// See: https://github.com/WordPress/gutenberg/issues/81596
|
|
193
|
+
a11y: { test: 'todo' },
|
|
194
|
+
},
|
|
201
195
|
args: {
|
|
202
196
|
minColumnWidth: 200,
|
|
203
197
|
layout: [
|
|
@@ -227,6 +221,11 @@ export const Responsive: Story = {
|
|
|
227
221
|
* tiles below `minColumnWidth`.
|
|
228
222
|
*/
|
|
229
223
|
export const Layered: Story = {
|
|
224
|
+
parameters: {
|
|
225
|
+
// FIXME: Resize handles are nameless aria commands; edit mode nests interactive controls (aria-command-name, nested-interactive).
|
|
226
|
+
// See: https://github.com/WordPress/gutenberg/issues/81596
|
|
227
|
+
a11y: { test: 'todo' },
|
|
228
|
+
},
|
|
230
229
|
args: {
|
|
231
230
|
columns: 4,
|
|
232
231
|
minColumnWidth: 200,
|
|
@@ -255,6 +254,11 @@ export const Layered: Story = {
|
|
|
255
254
|
* lanes.
|
|
256
255
|
*/
|
|
257
256
|
export const Spanning: Story = {
|
|
257
|
+
parameters: {
|
|
258
|
+
// FIXME: Resize handles are nameless aria commands; edit mode nests interactive controls (aria-command-name, nested-interactive).
|
|
259
|
+
// See: https://github.com/WordPress/gutenberg/issues/81596
|
|
260
|
+
a11y: { test: 'todo' },
|
|
261
|
+
},
|
|
258
262
|
args: {
|
|
259
263
|
columns: 4,
|
|
260
264
|
layout: [
|
|
@@ -298,6 +302,11 @@ export const Spanning: Story = {
|
|
|
298
302
|
* story below for a full override example.
|
|
299
303
|
*/
|
|
300
304
|
export const EditMode: Story = {
|
|
305
|
+
parameters: {
|
|
306
|
+
// FIXME: Resize handles are nameless aria commands; edit mode nests interactive controls (aria-command-name, nested-interactive).
|
|
307
|
+
// See: https://github.com/WordPress/gutenberg/issues/81596
|
|
308
|
+
a11y: { test: 'todo' },
|
|
309
|
+
},
|
|
301
310
|
args: {
|
|
302
311
|
columns: 4,
|
|
303
312
|
editMode: true,
|
|
@@ -444,6 +453,11 @@ function NumberedLanesOverlay( { columns, isActive }: GridOverlayRenderProps ) {
|
|
|
444
453
|
* entirely while keeping `editMode` interactions on.
|
|
445
454
|
*/
|
|
446
455
|
export const CustomGridOverlayStory: Story = {
|
|
456
|
+
parameters: {
|
|
457
|
+
// FIXME: Resize handles are nameless aria commands; edit mode nests interactive controls (aria-command-name, nested-interactive).
|
|
458
|
+
// See: https://github.com/WordPress/gutenberg/issues/81596
|
|
459
|
+
a11y: { test: 'todo' },
|
|
460
|
+
},
|
|
447
461
|
name: 'Custom Grid Overlay',
|
|
448
462
|
args: {
|
|
449
463
|
columns: 4,
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { render, act, screen } from '@testing-library/react';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
2
|
import { useState } from '@wordpress/element';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
14
3
|
import { GRID_ITEM_DATA_KEY } from '../../shared/grid-item-key';
|
|
15
4
|
import { useLanePlacement } from '../use-lane-placement';
|
|
16
5
|
import type {
|
|
@@ -88,9 +77,16 @@ function setNativeSupport( supported: boolean ) {
|
|
|
88
77
|
if ( property === 'display' && value === 'grid-lanes' ) {
|
|
89
78
|
return supported;
|
|
90
79
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
if ( ! originalSupports ) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
/*
|
|
84
|
+
* `call` on the overloaded `CSS.supports` resolves to the
|
|
85
|
+
* single-argument signature, so pass equivalent condition text.
|
|
86
|
+
*/
|
|
87
|
+
return value === undefined
|
|
88
|
+
? originalSupports.call( CSS, property )
|
|
89
|
+
: originalSupports.call( CSS, `(${ property }: ${ value })` );
|
|
94
90
|
};
|
|
95
91
|
}
|
|
96
92
|
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useState, useLayoutEffect, useMemo } from '@wordpress/element';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
2
|
import { computeLanePlacements } from './lane-placement';
|
|
10
3
|
import { GRID_ITEM_DATA_KEY } from '../shared/grid-item-key';
|
|
11
4
|
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
1
|
import clsx from 'clsx';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
2
|
import { useEffect, useState } from '@wordpress/element';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
14
3
|
import type { GridOverlayRenderProps } from './types';
|
|
15
4
|
import styles from './grid-overlay.module.css';
|
|
16
5
|
|