@bedrock-layout/column-drop
Advanced tools
Comparing version 1.1.2 to 1.2.0
@@ -1,2 +0,2 @@ | ||
"use strict";var x=Object.defineProperty,b=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var f=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&f(e,r,t[r]);if(g)for(var r of g(t))P.call(t,r)&&f(e,r,t[r]);return e},d=(e,t)=>b(e,_(t));Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";var a=require("@bedrock-layout/spacing-constants"),O=require("styled-components");function R(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var C=R(O),T={exports:{}},k="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",D=k,w=D;function h(){}function v(){}v.resetWarningCache=h;var z=function(){function e(p,n,c,u,i,o){if(o!==w){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}e.isRequired=e;function t(){return e}var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:v,resetWarningCache:h};return r.PropTypes=r,r};T.exports=z();var s=T.exports;const l=C.default.div.attrs(({gutter:e,theme:t,style:r={},basis:p})=>{var i,o;const n=a.getSpacingValue(t,e),c=n!=null?n:"0px",u=(o=(i=a.getSizeValue(t,p))!=null?i:p)!=null?o:a.sizes.xxsmall;return{"data-bedrock-column-drop":"",style:d(m({},r),{"--gutter":c,"--basis":u})}})` | ||
"use strict";var v=Object.defineProperty,S=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var m=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&m(e,r,t[r]);if(g)for(var r of g(t))O.call(t,r)&&m(e,r,t[r]);return e},h=(e,t)=>S(e,_(t));Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";var a=require("@bedrock-layout/spacing-constants"),R=require("styled-components");function C(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var k=C(R),b={exports:{}},w="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",D=w,z=D;function x(){}function T(){}T.resetWarningCache=x;var E=function(){function e(p,c,s,u,y,i){if(i!==z){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:T,resetWarningCache:x};return r.PropTypes=r,r};b.exports=E();var n=b.exports;const l=k.default.div.attrs(({gutter:e,theme:t,style:r={},basis:p,noStretchedColumns:c=!1})=>{var o,f;const s=a.getSpacingValue(t,e),u=s!=null?s:"0px",y=c===!0?"no-stretched-columns":"",i=(f=(o=a.getSizeValue(t,p))!=null?o:p)!=null?f:a.sizes.xxsmall;return{"data-bedrock-column-drop":y,style:h(d({},r),{"--gutter":u,"--basis":i})}})` | ||
@property --basis { | ||
@@ -17,3 +17,5 @@ syntax: "<length-percentage>"; | ||
margin: 0; | ||
flex: 1 1 var(--basis, ${a.sizes.xxsmall}); | ||
flex-basis: var(--basis, ${a.sizes.xxsmall}); | ||
flex-grow: ${e=>e.noStretchedColumns?"0":"1"}; | ||
flex-shrink: 1; | ||
} | ||
@@ -24,2 +26,2 @@ | ||
gap: var(--gutter); | ||
`;l.displayName="ColumnDrop";l.propTypes={gutter:s.string.isRequired,basis:s.oneOfType([s.number,s.string])};exports.ColumnDrop=l; | ||
`;l.displayName="ColumnDrop";l.propTypes={gutter:n.string.isRequired,basis:n.oneOfType([n.number,n.string]),noStretchedColumns:n.bool};exports.ColumnDrop=l; |
@@ -6,4 +6,5 @@ import { SizesOptions, SpacingOptions } from "@bedrock-layout/spacing-constants"; | ||
basis?: Basis; | ||
noStretchedColumns?: boolean; | ||
} | ||
export declare const ColumnDrop: import("styled-components").StyledComponent<"div", any, ColumnDropProps, never>; | ||
export {}; |
@@ -46,2 +46,3 @@ var __defProp = Object.defineProperty; | ||
array: shim, | ||
bigint: shim, | ||
bool: shim, | ||
@@ -74,9 +75,10 @@ func: shim, | ||
var PropTypes = propTypes.exports; | ||
const ColumnDrop = styled.div.attrs(({ gutter, theme, style = {}, basis }) => { | ||
const ColumnDrop = styled.div.attrs(({ gutter, theme, style = {}, basis, noStretchedColumns = false }) => { | ||
var _a, _b; | ||
const maybeGutter = getSpacingValue(theme, gutter); | ||
const gutterValue = maybeGutter != null ? maybeGutter : "0px"; | ||
const attributeValue = noStretchedColumns === true ? "no-stretched-columns" : ""; | ||
const safeBasis = (_b = (_a = getSizeValue(theme, basis)) != null ? _a : basis) != null ? _b : sizes.xxsmall; | ||
return { | ||
"data-bedrock-column-drop": "", | ||
"data-bedrock-column-drop": attributeValue, | ||
style: __spreadProps(__spreadValues({}, style), { "--gutter": gutterValue, "--basis": safeBasis }) | ||
@@ -100,3 +102,5 @@ }; | ||
margin: 0; | ||
flex: 1 1 var(--basis, ${sizes.xxsmall}); | ||
flex-basis: var(--basis, ${sizes.xxsmall}); | ||
flex-grow: ${(props) => props.noStretchedColumns ? "0" : "1"}; | ||
flex-shrink: 1; | ||
} | ||
@@ -111,4 +115,5 @@ | ||
gutter: PropTypes.string.isRequired, | ||
basis: PropTypes.oneOfType([PropTypes.number, PropTypes.string]) | ||
basis: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), | ||
noStretchedColumns: PropTypes.bool | ||
}; | ||
export { ColumnDrop }; |
@@ -1,6 +0,6 @@ | ||
var D=Object.defineProperty,j=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var T=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var x=(r,e,n)=>e in r?D(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n,b=(r,e)=>{for(var n in e||(e={}))z.call(e,n)&&x(r,n,e[n]);if(T)for(var n of T(e))E.call(e,n)&&x(r,n,e[n]);return r},v=(r,e)=>j(r,w(e));(function(r,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@bedrock-layout/spacing-constants"),require("styled-components")):typeof define=="function"&&define.amd?define(["exports","@bedrock-layout/spacing-constants","styled-components"],e):(r=typeof globalThis!="undefined"?globalThis:r||self,e(r.inline={},r.spacingConstants,r.styled))})(this,function(r,e,n){"use strict";function _(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var S=_(n),y={exports:{}},P="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",O=P,R=O;function f(){}function d(){}d.resetWarningCache=f;var k=function(){function t(c,s,m,g,l,i){if(i!==R){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}t.isRequired=t;function o(){return t}var a={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:o,element:t,elementType:t,instanceOf:o,node:t,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:d,resetWarningCache:f};return a.PropTypes=a,a};y.exports=k();var p=y.exports;const u=S.default.div.attrs(({gutter:t,theme:o,style:a={},basis:c})=>{var l,i;const s=e.getSpacingValue(o,t),m=s!=null?s:"0px",g=(i=(l=e.getSizeValue(o,c))!=null?l:c)!=null?i:e.sizes.xxsmall;return{"data-bedrock-column-drop":"",style:v(b({},a),{"--gutter":m,"--basis":g})}})` | ||
var C=Object.defineProperty,D=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var T=(r,t,n)=>t in r?C(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,v=(r,t)=>{for(var n in t||(t={}))z.call(t,n)&&T(r,n,t[n]);if(x)for(var n of x(t))E.call(t,n)&&T(r,n,t[n]);return r},S=(r,t)=>D(r,j(t));(function(r,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("@bedrock-layout/spacing-constants"),require("styled-components")):typeof define=="function"&&define.amd?define(["exports","@bedrock-layout/spacing-constants","styled-components"],t):(r=typeof globalThis!="undefined"?globalThis:r||self,t(r.inline={},r.spacingConstants,r.styled))})(this,function(r,t,n){"use strict";function _(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var P=_(n),y={exports:{}},O="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R=O,k=R;function f(){}function d(){}d.resetWarningCache=f;var w=function(){function e(u,m,p,g,h,c){if(c!==k){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}e.isRequired=e;function o(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:o,element:e,elementType:e,instanceOf:o,node:e,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:d,resetWarningCache:f};return a.PropTypes=a,a};y.exports=w();var s=y.exports;const l=P.default.div.attrs(({gutter:e,theme:o,style:a={},basis:u,noStretchedColumns:m=!1})=>{var i,b;const p=t.getSpacingValue(o,e),g=p!=null?p:"0px",h=m===!0?"no-stretched-columns":"",c=(b=(i=t.getSizeValue(o,u))!=null?i:u)!=null?b:t.sizes.xxsmall;return{"data-bedrock-column-drop":h,style:S(v({},a),{"--gutter":g,"--basis":c})}})` | ||
@property --basis { | ||
syntax: "<length-percentage>"; | ||
inherits: true; | ||
initial-value: ${e.sizes.xxsmall}; | ||
initial-value: ${t.sizes.xxsmall}; | ||
} | ||
@@ -17,3 +17,5 @@ | ||
margin: 0; | ||
flex: 1 1 var(--basis, ${e.sizes.xxsmall}); | ||
flex-basis: var(--basis, ${t.sizes.xxsmall}); | ||
flex-grow: ${e=>e.noStretchedColumns?"0":"1"}; | ||
flex-shrink: 1; | ||
} | ||
@@ -24,2 +26,2 @@ | ||
gap: var(--gutter); | ||
`;u.displayName="ColumnDrop",u.propTypes={gutter:p.string.isRequired,basis:p.oneOfType([p.number,p.string])},r.ColumnDrop=u,Object.defineProperty(r,"__esModule",{value:!0}),r[Symbol.toStringTag]="Module"}); | ||
`;l.displayName="ColumnDrop",l.propTypes={gutter:s.string.isRequired,basis:s.oneOfType([s.number,s.string]),noStretchedColumns:s.bool},r.ColumnDrop=l,Object.defineProperty(r,"__esModule",{value:!0}),r[Symbol.toStringTag]="Module"}); |
{ | ||
"name": "@bedrock-layout/column-drop", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "bedrock-layout column-drop", | ||
@@ -62,3 +62,3 @@ "sideEffects": false, | ||
}, | ||
"gitHead": "529e04ab651a20cf6cf3425af04af01250d0765b" | ||
"gitHead": "375449e665b31ef3df06e177ad3c2bde87718f17" | ||
} |
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
13707
178