@bedrock-layout/column-drop
Advanced tools
Comparing version 3.2.10 to 3.3.0
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@bedrock-layout/spacing-constants"),d=require("@bedrock-layout/type-utils"),p=require("react"),b=d.forwardRefWithAs(function({as:o="div",gutter:r,style:n={},minItemWidth:s,noStretchedColumns:u=!1,...c},a){const t=e.useTheme(),i=e.getSafeGutter(t,r),l=u===!0?"no-stretched-columns":"",m=e.getSizeValue(t,s);return p.createElement(o,{ref:a,"data-bedrock-column-drop":l,style:{"--gutter":i,"--minItemWidth":m,...n},...c})});exports.ColumnDrop=b; | ||
"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; |
@@ -12,5 +12,10 @@ import { CSSLength, Gutter, SizesOptions } from "@bedrock-layout/spacing-constants"; | ||
* Sets space between each element. | ||
* @deprecated Use `gap` instead. | ||
*/ | ||
gutter?: Gutter; | ||
/** | ||
* Sets space between each element. | ||
*/ | ||
gap?: Gutter; | ||
/** | ||
* Sets the minimum width of each child. | ||
@@ -17,0 +22,0 @@ * The `minItemWidth` prop can be a CSSLength, a number, or a key of the theme's sizes options. |
@@ -1,26 +0,27 @@ | ||
import { useTheme as l, getSafeGutter as d, getSizeValue as f } from "@bedrock-layout/spacing-constants"; | ||
import { forwardRefWithAs as p } from "@bedrock-layout/type-utils"; | ||
import h from "react"; | ||
const C = p( | ||
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( | ||
function({ | ||
as: e = "div", | ||
gutter: o, | ||
style: r = {}, | ||
minItemWidth: m, | ||
gap: r, | ||
style: m = {}, | ||
minItemWidth: n, | ||
// TODO: Remove Boolean type in next major version | ||
noStretchedColumns: n = !1, | ||
...u | ||
}, a) { | ||
const t = l(), c = d(t, o), i = n === !0 ? "no-stretched-columns" : "", s = f(t, m); | ||
return /* @__PURE__ */ h.createElement( | ||
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( | ||
e, | ||
{ | ||
ref: a, | ||
"data-bedrock-column-drop": i, | ||
ref: c, | ||
"data-bedrock-column-drop": s, | ||
style: { | ||
"--gutter": c, | ||
"--minItemWidth": s, | ||
...r | ||
"--gutter": i, | ||
"--minItemWidth": l, | ||
...m | ||
}, | ||
...u | ||
...a | ||
} | ||
@@ -31,3 +32,3 @@ ); | ||
export { | ||
C as ColumnDrop | ||
D 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,style:s={},minItemWidth:d,noStretchedColumns:a=!1,...f},l){const o=t.useTheme(),m=t.getSafeGutter(o,c),p=a===!0?"no-stretched-columns":"",y=t.getSizeValue(o,d);return u.createElement(i,{ref:l,"data-bedrock-column-drop":p,style:{"--gutter":m,"--minItemWidth":y,...s},...f})});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: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"})}); |
{ | ||
"name": "@bedrock-layout/column-drop", | ||
"version": "3.2.10", | ||
"version": "3.3.0", | ||
"description": "bedrock-layout column-drop", | ||
@@ -64,3 +64,3 @@ "sideEffects": false, | ||
}, | ||
"gitHead": "5101f782e82614ab75c6ad3ad7d7bb01f1726636" | ||
"gitHead": "27093923ddbe222091acdc18493405cef6e29711" | ||
} |
8087
78