@bedrock-layout/column-drop
Advanced tools
Comparing version 3.3.0 to 3.4.0
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@bedrock-layout/spacing-constants"),p=require("@bedrock-layout/type-utils"),b=require("react"),f=p.forwardRefWithAs(function({as:o="div",gutter:r,gap:n,style:s={},minItemWidth:u,noStretchedColumns:c=!1,...a},i){const t=e.useTheme(),l=e.getSafeGutter(t,n??r),m=c===!0?"no-stretched-columns":"",d=e.getSizeValue(t,u);return b.createElement(o,{ref:i,"data-bedrock-column-drop":m,style:{"--gutter":l,"--minItemWidth":d,...s},...a})});exports.ColumnDrop=f; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@bedrock-layout/spacing-constants"),p=require("@bedrock-layout/type-utils"),b=require("react"),g=p.forwardRefWithAs(function({as:r="div",gutter:n,gap:o,style:u={},minItemWidth:s,noStretchedColumns:c=!1,variant:a="default",...i},l){const t=e.useTheme(),m=e.getSafeGutter(t,o??n),d=a==="centered"||c===!0?"no-stretched-columns":"",f=e.getSizeValue(t,s);return b.createElement(r,{ref:l,"data-bedrock-column-drop":d,style:{"--gutter":m,"--minItemWidth":f,...u},...i})});exports.ColumnDrop=g; |
@@ -26,4 +26,9 @@ import { CSSLength, Gutter, SizesOptions } from "@bedrock-layout/spacing-constants"; | ||
* Prevents columns from stretching to fill the space. | ||
* @deprecated use `variant` set to `centered` instead. | ||
*/ | ||
noStretchedColumns?: boolean; | ||
/** | ||
* Setting it to `centered` will prevents columns from stretching to fill the space. | ||
*/ | ||
variant?: "default" | "centered"; | ||
}; | ||
@@ -30,0 +35,0 @@ /** |
@@ -1,5 +0,5 @@ | ||
import { useTheme as d, getSafeGutter as f, getSizeValue as p } from "@bedrock-layout/spacing-constants"; | ||
import { forwardRefWithAs as h } from "@bedrock-layout/type-utils"; | ||
import b from "react"; | ||
const D = h( | ||
import { useTheme as f, getSafeGutter as p, getSizeValue as h } from "@bedrock-layout/spacing-constants"; | ||
import { forwardRefWithAs as b } from "@bedrock-layout/type-utils"; | ||
import g from "react"; | ||
const G = b( | ||
function({ | ||
@@ -11,18 +11,18 @@ as: e = "div", | ||
minItemWidth: n, | ||
// TODO: Remove Boolean type in next major version | ||
noStretchedColumns: u = !1, | ||
...a | ||
}, c) { | ||
const t = d(), i = f(t, r ?? o), s = u === !0 ? "no-stretched-columns" : "", l = p(t, n); | ||
return /* @__PURE__ */ b.createElement( | ||
variant: a = "default", | ||
...c | ||
}, i) { | ||
const t = f(), s = p(t, r ?? o), d = a === "centered" || u === !0 ? "no-stretched-columns" : "", l = h(t, n); | ||
return /* @__PURE__ */ g.createElement( | ||
e, | ||
{ | ||
ref: c, | ||
"data-bedrock-column-drop": s, | ||
ref: i, | ||
"data-bedrock-column-drop": d, | ||
style: { | ||
"--gutter": i, | ||
"--gutter": s, | ||
"--minItemWidth": l, | ||
...m | ||
}, | ||
...a | ||
...c | ||
} | ||
@@ -33,3 +33,3 @@ ); | ||
export { | ||
D as ColumnDrop | ||
G as ColumnDrop | ||
}; |
@@ -1,1 +0,1 @@ | ||
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@bedrock-layout/spacing-constants"),require("@bedrock-layout/type-utils"),require("react")):typeof define=="function"&&define.amd?define(["exports","@bedrock-layout/spacing-constants","@bedrock-layout/type-utils","react"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["column-drop"]={},e.spacingConstants,e.typeUtils,e.React))})(this,function(e,t,n,u){"use strict";const r=n.forwardRefWithAs(function({as:i="div",gutter:c,gap:s,style:d={},minItemWidth:a,noStretchedColumns:f=!1,...l},m){const o=t.useTheme(),p=t.getSafeGutter(o,s??c),y=f===!0?"no-stretched-columns":"",h=t.getSizeValue(o,a);return u.createElement(i,{ref:m,"data-bedrock-column-drop":y,style:{"--gutter":p,"--minItemWidth":h,...d},...l})});e.ColumnDrop=r,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}); | ||
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@bedrock-layout/spacing-constants"),require("@bedrock-layout/type-utils"),require("react")):typeof define=="function"&&define.amd?define(["exports","@bedrock-layout/spacing-constants","@bedrock-layout/type-utils","react"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["column-drop"]={},e.spacingConstants,e.typeUtils,e.React))})(this,function(e,t,n,u){"use strict";const r=n.forwardRefWithAs(function({as:i="div",gutter:c,gap:d,style:s={},minItemWidth:a,noStretchedColumns:f=!1,variant:l="default",...m},p){const o=t.useTheme(),y=t.getSafeGutter(o,d??c),h=l==="centered"||f===!0?"no-stretched-columns":"",b=t.getSizeValue(o,a);return u.createElement(i,{ref:p,"data-bedrock-column-drop":h,style:{"--gutter":y,"--minItemWidth":b,...s},...m})});e.ColumnDrop=r,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}); |
{ | ||
"name": "@bedrock-layout/column-drop", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"description": "bedrock-layout column-drop", | ||
@@ -64,3 +64,3 @@ "sideEffects": false, | ||
}, | ||
"gitHead": "27093923ddbe222091acdc18493405cef6e29711" | ||
"gitHead": "de760c1daceac4d6803ee393221f5f5a93fa779e" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
8355
83