@inf-monkeys-tech/monkeys-design 1.0.47 → 1.0.48
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/dist/components/workbench/index.d.mts +2 -0
- package/dist/components/workbench/index.d.ts +2 -0
- package/dist/components/workbench/index.js +3 -1
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +3 -1
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -851,6 +851,8 @@ interface WorkbenchCollectionVirtualizationConfig<Item> {
|
|
|
851
851
|
interface WorkbenchCollectionLayoutConfig<Item> {
|
|
852
852
|
mode: WorkbenchCollectionLayoutMode;
|
|
853
853
|
columns?: 'auto' | WorkbenchCollectionResponsive<number>;
|
|
854
|
+
/** Control whether an underfilled automatic grid stretches its items or preserves full-grid card widths. */
|
|
855
|
+
underfilledBehavior?: 'preserve-columns' | 'stretch-items';
|
|
854
856
|
maxColumns?: WorkbenchCollectionResponsive<number>;
|
|
855
857
|
minCardWidth?: number | string;
|
|
856
858
|
idealCardWidth?: number | string;
|
|
@@ -851,6 +851,8 @@ interface WorkbenchCollectionVirtualizationConfig<Item> {
|
|
|
851
851
|
interface WorkbenchCollectionLayoutConfig<Item> {
|
|
852
852
|
mode: WorkbenchCollectionLayoutMode;
|
|
853
853
|
columns?: 'auto' | WorkbenchCollectionResponsive<number>;
|
|
854
|
+
/** Control whether an underfilled automatic grid stretches its items or preserves full-grid card widths. */
|
|
855
|
+
underfilledBehavior?: 'preserve-columns' | 'stretch-items';
|
|
854
856
|
maxColumns?: WorkbenchCollectionResponsive<number>;
|
|
855
857
|
minCardWidth?: number | string;
|
|
856
858
|
idealCardWidth?: number | string;
|
|
@@ -8971,6 +8971,7 @@ function resolveColumnCount({
|
|
|
8971
8971
|
itemCount,
|
|
8972
8972
|
gap,
|
|
8973
8973
|
columns,
|
|
8974
|
+
underfilledBehavior,
|
|
8974
8975
|
maxColumns,
|
|
8975
8976
|
minCardWidth,
|
|
8976
8977
|
idealCardWidth,
|
|
@@ -8991,7 +8992,7 @@ function resolveColumnCount({
|
|
|
8991
8992
|
const maxCandidate = Math.max(
|
|
8992
8993
|
1,
|
|
8993
8994
|
Math.min(
|
|
8994
|
-
safeItemCount,
|
|
8995
|
+
underfilledBehavior === "preserve-columns" ? MAX_COLUMN_COUNT : safeItemCount,
|
|
8995
8996
|
Math.ceil((containerWidth + gap) / (Math.max(minWidth * 0.75, 1) + gap))
|
|
8996
8997
|
)
|
|
8997
8998
|
);
|
|
@@ -9168,6 +9169,7 @@ function WorkbenchCollection({
|
|
|
9168
9169
|
itemCount: layoutItemCount,
|
|
9169
9170
|
gap,
|
|
9170
9171
|
columns: config.layout.columns,
|
|
9172
|
+
underfilledBehavior: config.layout.underfilledBehavior,
|
|
9171
9173
|
maxColumns: config.layout.maxColumns,
|
|
9172
9174
|
minCardWidth: config.layout.minCardWidth,
|
|
9173
9175
|
idealCardWidth: config.layout.idealCardWidth ?? config.layout.columnWidth,
|