@purpurds/grid
Advanced tools
Comparing version 5.7.0 to 5.8.0
@@ -1,6 +0,6 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("react");function j(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var m={exports:{}};/*! | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),s=require("react");function N(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var z={exports:{}};/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/(function(p){(function(){var _={}.hasOwnProperty;function t(){for(var r="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(r=o(r,d.call(this,i)))}return r}function d(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var i in r)_.call(r,i)&&r[i]&&(u=o(u,this&&this[i]||i));return u}function o(r,u){return u?r?r+" "+u:r+u:r}p.exports?(t.default=t,p.exports=t):window.classNames=t})()})(m);var v=m.exports;const a=j(v),w={"purpur-grid-item":"_purpur-grid-item_zx9tz_1","purpur-grid-item--no-col-gap":"_purpur-grid-item--no-col-gap_zx9tz_6","purpur-grid-item-colspan-sm-4":"_purpur-grid-item-colspan-sm-4_zx9tz_24","purpur-grid-item-colspan-sm-3":"_purpur-grid-item-colspan-sm-3_zx9tz_27","purpur-grid-item-colspan-sm-2":"_purpur-grid-item-colspan-sm-2_zx9tz_30","purpur-grid-item-colspan-sm-1":"_purpur-grid-item-colspan-sm-1_zx9tz_33","purpur-grid-item-colspan-md-8":"_purpur-grid-item-colspan-md-8_zx9tz_37","purpur-grid-item-colspan-md-7":"_purpur-grid-item-colspan-md-7_zx9tz_42","purpur-grid-item-colspan-md-6":"_purpur-grid-item-colspan-md-6_zx9tz_47","purpur-grid-item-colspan-md-5":"_purpur-grid-item-colspan-md-5_zx9tz_52","purpur-grid-item-colspan-md-4":"_purpur-grid-item-colspan-md-4_zx9tz_57","purpur-grid-item-colspan-md-3":"_purpur-grid-item-colspan-md-3_zx9tz_62","purpur-grid-item-colspan-md-2":"_purpur-grid-item-colspan-md-2_zx9tz_67","purpur-grid-item-colspan-md-1":"_purpur-grid-item-colspan-md-1_zx9tz_72","purpur-grid-item-colspan-lg-12":"_purpur-grid-item-colspan-lg-12_zx9tz_77","purpur-grid-item-colspan-lg-11":"_purpur-grid-item-colspan-lg-11_zx9tz_82","purpur-grid-item-colspan-lg-10":"_purpur-grid-item-colspan-lg-10_zx9tz_87","purpur-grid-item-colspan-lg-9":"_purpur-grid-item-colspan-lg-9_zx9tz_92","purpur-grid-item-colspan-lg-8":"_purpur-grid-item-colspan-lg-8_zx9tz_97","purpur-grid-item-colspan-lg-7":"_purpur-grid-item-colspan-lg-7_zx9tz_102","purpur-grid-item-colspan-lg-6":"_purpur-grid-item-colspan-lg-6_zx9tz_107","purpur-grid-item-colspan-lg-5":"_purpur-grid-item-colspan-lg-5_zx9tz_112","purpur-grid-item-colspan-lg-4":"_purpur-grid-item-colspan-lg-4_zx9tz_117","purpur-grid-item-colspan-lg-3":"_purpur-grid-item-colspan-lg-3_zx9tz_122","purpur-grid-item-colspan-lg-2":"_purpur-grid-item-colspan-lg-2_zx9tz_127","purpur-grid-item-colspan-lg-1":"_purpur-grid-item-colspan-lg-1_zx9tz_77"},C=a.bind(w),s="purpur-grid-item",z=({children:p,className:_,["data-testid"]:t,colSpanSm:d=4,colSpanMd:o=8,colSpanLg:r=12,noColGap:u=!1})=>{const i=C([_,s,{[`${s}--no-col-gap`]:u,[`${s}-colspan-sm-${d}`]:d,[`${s}-colspan-md-${o}`]:o,[`${s}-colspan-lg-${r}`]:r}]);return c.jsx("div",{className:i,"data-testid":t,children:p})},N=p=>!!p&&e.isValidElement(p)&&(!!p.props.colSpanSm||!!p.props.colSpanMd||!!p.props.colSpanLg),O={"purpur-grid":"_purpur-grid_1h3bu_1","purpur-grid--no-gap":"_purpur-grid--no-gap_1h3bu_12","purpur-grid--no-row-gap":"_purpur-grid--no-row-gap_1h3bu_12","purpur-grid--grid":"_purpur-grid--grid_1h3bu_36","purpur-grid--no-col-gap":"_purpur-grid--no-col-gap_1h3bu_40","purpur-grid-col-sm-4":"_purpur-grid-col-sm-4_1h3bu_43","purpur-grid-col-sm-3":"_purpur-grid-col-sm-3_1h3bu_46","purpur-grid-col-sm-2":"_purpur-grid-col-sm-2_1h3bu_49","purpur-grid-col-md-8":"_purpur-grid-col-md-8_1h3bu_53","purpur-grid-col-md-7":"_purpur-grid-col-md-7_1h3bu_58","purpur-grid-col-md-6":"_purpur-grid-col-md-6_1h3bu_63","purpur-grid-col-md-5":"_purpur-grid-col-md-5_1h3bu_68","purpur-grid-col-md-4":"_purpur-grid-col-md-4_1h3bu_73","purpur-grid-col-md-3":"_purpur-grid-col-md-3_1h3bu_78","purpur-grid-col-md-2":"_purpur-grid-col-md-2_1h3bu_83","purpur-grid-col-lg-12":"_purpur-grid-col-lg-12_1h3bu_88","purpur-grid-col-lg-11":"_purpur-grid-col-lg-11_1h3bu_93","purpur-grid-col-lg-10":"_purpur-grid-col-lg-10_1h3bu_98","purpur-grid-col-lg-9":"_purpur-grid-col-lg-9_1h3bu_103","purpur-grid-col-lg-8":"_purpur-grid-col-lg-8_1h3bu_108","purpur-grid-col-lg-7":"_purpur-grid-col-lg-7_1h3bu_113","purpur-grid-col-lg-6":"_purpur-grid-col-lg-6_1h3bu_118","purpur-grid-col-lg-5":"_purpur-grid-col-lg-5_1h3bu_123","purpur-grid-col-lg-4":"_purpur-grid-col-lg-4_1h3bu_128","purpur-grid-col-lg-3":"_purpur-grid-col-lg-3_1h3bu_133","purpur-grid-col-lg-2":"_purpur-grid-col-lg-2_1h3bu_138","purpur-grid--flex":"_purpur-grid--flex_1h3bu_142"},S=a.bind(O),l="purpur-grid",h=({children:p,className:_,["data-testid"]:t,colsSm:d=1,colsMd:o=1,colsLg:r=1,noGap:u=!1,noColGap:i=!1,noRowGap:b=!1,...x})=>{const n=e.Children.toArray(p).filter(N),g=n.length,f=S([_,l,{[`${l}--grid`]:!g,[`${l}--flex`]:g,[`${l}--no-gap`]:u,[`${l}--no-col-gap`]:i,[`${l}--no-row-gap`]:b,[`${l}-col-sm-${d}`]:d>1&&!g,[`${l}-col-md-${o}`]:o>1&&!g,[`${l}-col-lg-${r}`]:r>1&&!g}]);return c.jsx("div",{className:f,"data-testid":t,...x,children:g?e.Children.map(n,({props:{children:$,...y}})=>c.jsx(z,{...y,noColGap:u||i,children:$})):p})};h.Item=z;exports.Grid=h; | ||
*/(function(p){(function(){var l={}.hasOwnProperty;function _(){for(var r="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(r=g(r,e.call(this,u)))}return r}function e(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return _.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var u in r)l.call(r,u)&&r[u]&&(i=g(i,this&&this[u]||u));return i}function g(r,i){return i?r?r+" "+i:r+i:r}p.exports?(_.default=_,p.exports=_):window.classNames=_})()})(z);var w=z.exports;const v=N(w),O={"purpur-grid-item":"_purpur-grid-item_zx9tz_1","purpur-grid-item--no-col-gap":"_purpur-grid-item--no-col-gap_zx9tz_6","purpur-grid-item-colspan-sm-4":"_purpur-grid-item-colspan-sm-4_zx9tz_24","purpur-grid-item-colspan-sm-3":"_purpur-grid-item-colspan-sm-3_zx9tz_27","purpur-grid-item-colspan-sm-2":"_purpur-grid-item-colspan-sm-2_zx9tz_30","purpur-grid-item-colspan-sm-1":"_purpur-grid-item-colspan-sm-1_zx9tz_33","purpur-grid-item-colspan-md-8":"_purpur-grid-item-colspan-md-8_zx9tz_37","purpur-grid-item-colspan-md-7":"_purpur-grid-item-colspan-md-7_zx9tz_42","purpur-grid-item-colspan-md-6":"_purpur-grid-item-colspan-md-6_zx9tz_47","purpur-grid-item-colspan-md-5":"_purpur-grid-item-colspan-md-5_zx9tz_52","purpur-grid-item-colspan-md-4":"_purpur-grid-item-colspan-md-4_zx9tz_57","purpur-grid-item-colspan-md-3":"_purpur-grid-item-colspan-md-3_zx9tz_62","purpur-grid-item-colspan-md-2":"_purpur-grid-item-colspan-md-2_zx9tz_67","purpur-grid-item-colspan-md-1":"_purpur-grid-item-colspan-md-1_zx9tz_72","purpur-grid-item-colspan-lg-12":"_purpur-grid-item-colspan-lg-12_zx9tz_77","purpur-grid-item-colspan-lg-11":"_purpur-grid-item-colspan-lg-11_zx9tz_82","purpur-grid-item-colspan-lg-10":"_purpur-grid-item-colspan-lg-10_zx9tz_87","purpur-grid-item-colspan-lg-9":"_purpur-grid-item-colspan-lg-9_zx9tz_92","purpur-grid-item-colspan-lg-8":"_purpur-grid-item-colspan-lg-8_zx9tz_97","purpur-grid-item-colspan-lg-7":"_purpur-grid-item-colspan-lg-7_zx9tz_102","purpur-grid-item-colspan-lg-6":"_purpur-grid-item-colspan-lg-6_zx9tz_107","purpur-grid-item-colspan-lg-5":"_purpur-grid-item-colspan-lg-5_zx9tz_112","purpur-grid-item-colspan-lg-4":"_purpur-grid-item-colspan-lg-4_zx9tz_117","purpur-grid-item-colspan-lg-3":"_purpur-grid-item-colspan-lg-3_zx9tz_122","purpur-grid-item-colspan-lg-2":"_purpur-grid-item-colspan-lg-2_zx9tz_127","purpur-grid-item-colspan-lg-1":"_purpur-grid-item-colspan-lg-1_zx9tz_77"},S=v.bind(O),o="purpur-grid-item",x=({children:p,className:l,["data-testid"]:_,colSpanSm:e=4,colSpanMd:g=8,colSpanLg:r=12,noColGap:i=!1})=>{const u=S([l,o,{[`${o}--no-col-gap`]:i,[`${o}-colspan-sm-${e}`]:e,[`${o}-colspan-md-${g}`]:g,[`${o}-colspan-lg-${r}`]:r}]);return d.jsx("div",{className:u,"data-testid":_,children:p})},I=p=>!!p&&s.isValidElement(p)&&(!!p.props.colSpanSm||!!p.props.colSpanMd||!!p.props.colSpanLg),A={"purpur-grid":"_purpur-grid_13gvu_1","purpur-grid__inner":"_purpur-grid__inner_13gvu_7","purpur-grid__inner--no-gap":"_purpur-grid__inner--no-gap_13gvu_14","purpur-grid__inner--no-row-gap":"_purpur-grid__inner--no-row-gap_13gvu_14","purpur-grid__inner--grid":"_purpur-grid__inner--grid_13gvu_38","purpur-grid__inner--no-col-gap":"_purpur-grid__inner--no-col-gap_13gvu_42","purpur-grid__inner-col-sm-4":"_purpur-grid__inner-col-sm-4_13gvu_45","purpur-grid__inner-col-sm-3":"_purpur-grid__inner-col-sm-3_13gvu_48","purpur-grid__inner-col-sm-2":"_purpur-grid__inner-col-sm-2_13gvu_51","purpur-grid__inner-col-md-8":"_purpur-grid__inner-col-md-8_13gvu_55","purpur-grid__inner-col-md-7":"_purpur-grid__inner-col-md-7_13gvu_60","purpur-grid__inner-col-md-6":"_purpur-grid__inner-col-md-6_13gvu_65","purpur-grid__inner-col-md-5":"_purpur-grid__inner-col-md-5_13gvu_70","purpur-grid__inner-col-md-4":"_purpur-grid__inner-col-md-4_13gvu_75","purpur-grid__inner-col-md-3":"_purpur-grid__inner-col-md-3_13gvu_80","purpur-grid__inner-col-md-2":"_purpur-grid__inner-col-md-2_13gvu_85","purpur-grid__inner-col-lg-12":"_purpur-grid__inner-col-lg-12_13gvu_90","purpur-grid__inner-col-lg-11":"_purpur-grid__inner-col-lg-11_13gvu_95","purpur-grid__inner-col-lg-10":"_purpur-grid__inner-col-lg-10_13gvu_100","purpur-grid__inner-col-lg-9":"_purpur-grid__inner-col-lg-9_13gvu_105","purpur-grid__inner-col-lg-8":"_purpur-grid__inner-col-lg-8_13gvu_110","purpur-grid__inner-col-lg-7":"_purpur-grid__inner-col-lg-7_13gvu_115","purpur-grid__inner-col-lg-6":"_purpur-grid__inner-col-lg-6_13gvu_120","purpur-grid__inner-col-lg-5":"_purpur-grid__inner-col-lg-5_13gvu_125","purpur-grid__inner-col-lg-4":"_purpur-grid__inner-col-lg-4_13gvu_130","purpur-grid__inner-col-lg-3":"_purpur-grid__inner-col-lg-3_13gvu_135","purpur-grid__inner-col-lg-2":"_purpur-grid__inner-col-lg-2_13gvu_140","purpur-grid__inner--flex":"_purpur-grid__inner--flex_13gvu_144"},a=v.bind(A),E="purpur-grid",n="purpur-grid__inner",f=({children:p,className:l,containerClassName:_,["data-testid"]:e,colsSm:g=1,colsMd:r=1,colsLg:i=1,noGap:u=!1,noColGap:c=!1,noRowGap:$=!1,...h})=>{const m=s.Children.toArray(p).filter(I),t=m.length,y=a([_,E]),b=a([l,n,{[`${n}--grid`]:!t,[`${n}--flex`]:t,[`${n}--no-gap`]:u,[`${n}--no-col-gap`]:c,[`${n}--no-row-gap`]:$,[`${n}-col-sm-${g}`]:g>1&&!t,[`${n}-col-md-${r}`]:r>1&&!t,[`${n}-col-lg-${i}`]:i>1&&!t}]);return d.jsx("div",{className:y,"data-testid":e,...h,children:d.jsx("div",{className:b,children:t?s.Children.map(m,({props:{children:j,...C}})=>d.jsx(x,{...C,noColGap:u||c,children:j})):p})})};f.Item=x;exports.Grid=f; | ||
//# sourceMappingURL=grid.cjs.js.map |
@@ -8,2 +8,3 @@ import { Item } from './grid.item'; | ||
className?: string; | ||
containerClassName?: string; | ||
/** The number of columns on small screens. */ | ||
@@ -26,5 +27,5 @@ colsSm?: 1 | 2 | 3 | 4; | ||
export declare const Grid: { | ||
({ children, className, ["data-testid"]: dataTestId, colsSm, colsMd, colsLg, noGap, noColGap, noRowGap, ...props }: GridProps): React.JSX.Element; | ||
({ children, className, containerClassName, ["data-testid"]: dataTestId, colsSm, colsMd, colsLg, noGap, noColGap, noRowGap, ...props }: GridProps): React.JSX.Element; | ||
Item: ({ children, className, ["data-testid"]: dataTestId, colSpanSm, colSpanMd, colSpanLg, noColGap, }: import('./grid.item').ItemProps) => React.JSX.Element; | ||
}; | ||
//# sourceMappingURL=grid.d.ts.map |
@@ -1,7 +0,7 @@ | ||
import { jsx as c } from "react/jsx-runtime"; | ||
import { isValidElement as y, Children as n } from "react"; | ||
function v(p) { | ||
import { jsx as d } from "react/jsx-runtime"; | ||
import { isValidElement as C, Children as m } from "react"; | ||
function w(p) { | ||
return p && p.__esModule && Object.prototype.hasOwnProperty.call(p, "default") ? p.default : p; | ||
} | ||
var m = { exports: {} }; | ||
var z = { exports: {} }; | ||
/*! | ||
@@ -14,11 +14,11 @@ Copyright (c) 2018 Jed Watson. | ||
(function() { | ||
var _ = {}.hasOwnProperty; | ||
function t() { | ||
for (var r = "", u = 0; u < arguments.length; u++) { | ||
var i = arguments[u]; | ||
i && (r = o(r, g.call(this, i))); | ||
var t = {}.hasOwnProperty; | ||
function _() { | ||
for (var r = "", i = 0; i < arguments.length; i++) { | ||
var u = arguments[i]; | ||
u && (r = g(r, e.call(this, u))); | ||
} | ||
return r; | ||
} | ||
function g(r) { | ||
function e(r) { | ||
if (typeof r == "string" || typeof r == "number") | ||
@@ -29,18 +29,18 @@ return this && this[r] || r; | ||
if (Array.isArray(r)) | ||
return t.apply(this, r); | ||
return _.apply(this, r); | ||
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]")) | ||
return r.toString(); | ||
var u = ""; | ||
for (var i in r) | ||
_.call(r, i) && r[i] && (u = o(u, this && this[i] || i)); | ||
return u; | ||
var i = ""; | ||
for (var u in r) | ||
t.call(r, u) && r[u] && (i = g(i, this && this[u] || u)); | ||
return i; | ||
} | ||
function o(r, u) { | ||
return u ? r ? r + " " + u : r + u : r; | ||
function g(r, i) { | ||
return i ? r ? r + " " + i : r + i : r; | ||
} | ||
p.exports ? (t.default = t, p.exports = t) : window.classNames = t; | ||
p.exports ? (_.default = _, p.exports = _) : window.classNames = _; | ||
})(); | ||
})(m); | ||
var w = m.exports; | ||
const a = /* @__PURE__ */ v(w), N = { | ||
})(z); | ||
var j = z.exports; | ||
const v = /* @__PURE__ */ w(j), I = { | ||
"purpur-grid-item": "_purpur-grid-item_zx9tz_1", | ||
@@ -72,82 +72,84 @@ "purpur-grid-item--no-col-gap": "_purpur-grid-item--no-col-gap_zx9tz_6", | ||
"purpur-grid-item-colspan-lg-1": "_purpur-grid-item-colspan-lg-1_zx9tz_77" | ||
}, j = a.bind(N), s = "purpur-grid-item", z = ({ | ||
}, O = v.bind(I), o = "purpur-grid-item", x = ({ | ||
children: p, | ||
className: _, | ||
["data-testid"]: t, | ||
colSpanSm: g = 4, | ||
colSpanMd: o = 8, | ||
className: t, | ||
["data-testid"]: _, | ||
colSpanSm: e = 4, | ||
colSpanMd: g = 8, | ||
colSpanLg: r = 12, | ||
noColGap: u = !1 | ||
noColGap: i = !1 | ||
}) => { | ||
const i = j([ | ||
_, | ||
s, | ||
const u = O([ | ||
t, | ||
o, | ||
{ | ||
[`${s}--no-col-gap`]: u, | ||
[`${s}-colspan-sm-${g}`]: g, | ||
[`${s}-colspan-md-${o}`]: o, | ||
[`${s}-colspan-lg-${r}`]: r | ||
[`${o}--no-col-gap`]: i, | ||
[`${o}-colspan-sm-${e}`]: e, | ||
[`${o}-colspan-md-${g}`]: g, | ||
[`${o}-colspan-lg-${r}`]: r | ||
} | ||
]); | ||
return /* @__PURE__ */ c("div", { className: i, "data-testid": t, children: p }); | ||
}, C = (p) => !!p && y(p) && (!!p.props.colSpanSm || !!p.props.colSpanMd || !!p.props.colSpanLg), I = { | ||
"purpur-grid": "_purpur-grid_1h3bu_1", | ||
"purpur-grid--no-gap": "_purpur-grid--no-gap_1h3bu_12", | ||
"purpur-grid--no-row-gap": "_purpur-grid--no-row-gap_1h3bu_12", | ||
"purpur-grid--grid": "_purpur-grid--grid_1h3bu_36", | ||
"purpur-grid--no-col-gap": "_purpur-grid--no-col-gap_1h3bu_40", | ||
"purpur-grid-col-sm-4": "_purpur-grid-col-sm-4_1h3bu_43", | ||
"purpur-grid-col-sm-3": "_purpur-grid-col-sm-3_1h3bu_46", | ||
"purpur-grid-col-sm-2": "_purpur-grid-col-sm-2_1h3bu_49", | ||
"purpur-grid-col-md-8": "_purpur-grid-col-md-8_1h3bu_53", | ||
"purpur-grid-col-md-7": "_purpur-grid-col-md-7_1h3bu_58", | ||
"purpur-grid-col-md-6": "_purpur-grid-col-md-6_1h3bu_63", | ||
"purpur-grid-col-md-5": "_purpur-grid-col-md-5_1h3bu_68", | ||
"purpur-grid-col-md-4": "_purpur-grid-col-md-4_1h3bu_73", | ||
"purpur-grid-col-md-3": "_purpur-grid-col-md-3_1h3bu_78", | ||
"purpur-grid-col-md-2": "_purpur-grid-col-md-2_1h3bu_83", | ||
"purpur-grid-col-lg-12": "_purpur-grid-col-lg-12_1h3bu_88", | ||
"purpur-grid-col-lg-11": "_purpur-grid-col-lg-11_1h3bu_93", | ||
"purpur-grid-col-lg-10": "_purpur-grid-col-lg-10_1h3bu_98", | ||
"purpur-grid-col-lg-9": "_purpur-grid-col-lg-9_1h3bu_103", | ||
"purpur-grid-col-lg-8": "_purpur-grid-col-lg-8_1h3bu_108", | ||
"purpur-grid-col-lg-7": "_purpur-grid-col-lg-7_1h3bu_113", | ||
"purpur-grid-col-lg-6": "_purpur-grid-col-lg-6_1h3bu_118", | ||
"purpur-grid-col-lg-5": "_purpur-grid-col-lg-5_1h3bu_123", | ||
"purpur-grid-col-lg-4": "_purpur-grid-col-lg-4_1h3bu_128", | ||
"purpur-grid-col-lg-3": "_purpur-grid-col-lg-3_1h3bu_133", | ||
"purpur-grid-col-lg-2": "_purpur-grid-col-lg-2_1h3bu_138", | ||
"purpur-grid--flex": "_purpur-grid--flex_1h3bu_142" | ||
}, O = a.bind(I), l = "purpur-grid", S = ({ | ||
return /* @__PURE__ */ d("div", { className: u, "data-testid": _, children: p }); | ||
}, S = (p) => !!p && C(p) && (!!p.props.colSpanSm || !!p.props.colSpanMd || !!p.props.colSpanLg), A = { | ||
"purpur-grid": "_purpur-grid_13gvu_1", | ||
"purpur-grid__inner": "_purpur-grid__inner_13gvu_7", | ||
"purpur-grid__inner--no-gap": "_purpur-grid__inner--no-gap_13gvu_14", | ||
"purpur-grid__inner--no-row-gap": "_purpur-grid__inner--no-row-gap_13gvu_14", | ||
"purpur-grid__inner--grid": "_purpur-grid__inner--grid_13gvu_38", | ||
"purpur-grid__inner--no-col-gap": "_purpur-grid__inner--no-col-gap_13gvu_42", | ||
"purpur-grid__inner-col-sm-4": "_purpur-grid__inner-col-sm-4_13gvu_45", | ||
"purpur-grid__inner-col-sm-3": "_purpur-grid__inner-col-sm-3_13gvu_48", | ||
"purpur-grid__inner-col-sm-2": "_purpur-grid__inner-col-sm-2_13gvu_51", | ||
"purpur-grid__inner-col-md-8": "_purpur-grid__inner-col-md-8_13gvu_55", | ||
"purpur-grid__inner-col-md-7": "_purpur-grid__inner-col-md-7_13gvu_60", | ||
"purpur-grid__inner-col-md-6": "_purpur-grid__inner-col-md-6_13gvu_65", | ||
"purpur-grid__inner-col-md-5": "_purpur-grid__inner-col-md-5_13gvu_70", | ||
"purpur-grid__inner-col-md-4": "_purpur-grid__inner-col-md-4_13gvu_75", | ||
"purpur-grid__inner-col-md-3": "_purpur-grid__inner-col-md-3_13gvu_80", | ||
"purpur-grid__inner-col-md-2": "_purpur-grid__inner-col-md-2_13gvu_85", | ||
"purpur-grid__inner-col-lg-12": "_purpur-grid__inner-col-lg-12_13gvu_90", | ||
"purpur-grid__inner-col-lg-11": "_purpur-grid__inner-col-lg-11_13gvu_95", | ||
"purpur-grid__inner-col-lg-10": "_purpur-grid__inner-col-lg-10_13gvu_100", | ||
"purpur-grid__inner-col-lg-9": "_purpur-grid__inner-col-lg-9_13gvu_105", | ||
"purpur-grid__inner-col-lg-8": "_purpur-grid__inner-col-lg-8_13gvu_110", | ||
"purpur-grid__inner-col-lg-7": "_purpur-grid__inner-col-lg-7_13gvu_115", | ||
"purpur-grid__inner-col-lg-6": "_purpur-grid__inner-col-lg-6_13gvu_120", | ||
"purpur-grid__inner-col-lg-5": "_purpur-grid__inner-col-lg-5_13gvu_125", | ||
"purpur-grid__inner-col-lg-4": "_purpur-grid__inner-col-lg-4_13gvu_130", | ||
"purpur-grid__inner-col-lg-3": "_purpur-grid__inner-col-lg-3_13gvu_135", | ||
"purpur-grid__inner-col-lg-2": "_purpur-grid__inner-col-lg-2_13gvu_140", | ||
"purpur-grid__inner--flex": "_purpur-grid__inner--flex_13gvu_144" | ||
}, a = v.bind(A), E = "purpur-grid", n = "purpur-grid__inner", P = ({ | ||
children: p, | ||
className: _, | ||
["data-testid"]: t, | ||
className: t, | ||
containerClassName: _, | ||
["data-testid"]: e, | ||
colsSm: g = 1, | ||
colsMd: o = 1, | ||
colsLg: r = 1, | ||
colsMd: r = 1, | ||
colsLg: i = 1, | ||
noGap: u = !1, | ||
noColGap: i = !1, | ||
noRowGap: h = !1, | ||
...b | ||
noColGap: s = !1, | ||
noRowGap: f = !1, | ||
...$ | ||
}) => { | ||
const e = n.toArray(p).filter(C), d = e.length, x = O([ | ||
_, | ||
l, | ||
const c = m.toArray(p).filter(S), l = c.length, h = a([_, E]), y = a([ | ||
t, | ||
n, | ||
{ | ||
[`${l}--grid`]: !d, | ||
[`${l}--flex`]: d, | ||
[`${l}--no-gap`]: u, | ||
[`${l}--no-col-gap`]: i, | ||
[`${l}--no-row-gap`]: h, | ||
[`${l}-col-sm-${g}`]: g > 1 && !d, | ||
[`${l}-col-md-${o}`]: o > 1 && !d, | ||
[`${l}-col-lg-${r}`]: r > 1 && !d | ||
[`${n}--grid`]: !l, | ||
[`${n}--flex`]: l, | ||
[`${n}--no-gap`]: u, | ||
[`${n}--no-col-gap`]: s, | ||
[`${n}--no-row-gap`]: f, | ||
[`${n}-col-sm-${g}`]: g > 1 && !l, | ||
[`${n}-col-md-${r}`]: r > 1 && !l, | ||
[`${n}-col-lg-${i}`]: i > 1 && !l | ||
} | ||
]); | ||
return /* @__PURE__ */ c("div", { className: x, "data-testid": t, ...b, children: d ? n.map(e, ({ props: { children: f, ...$ } }) => /* @__PURE__ */ c(z, { ...$, noColGap: u || i, children: f })) : p }); | ||
return /* @__PURE__ */ d("div", { className: h, "data-testid": e, ...$, children: /* @__PURE__ */ d("div", { className: y, children: l ? m.map(c, ({ props: { children: b, ...N } }) => /* @__PURE__ */ d(x, { ...N, noColGap: u || s, children: b })) : p }) }); | ||
}; | ||
S.Item = z; | ||
P.Item = x; | ||
export { | ||
S as Grid | ||
P as Grid | ||
}; | ||
//# sourceMappingURL=grid.es.js.map |
{ | ||
"name": "@purpurds/grid", | ||
"version": "5.7.0", | ||
"version": "5.8.0", | ||
"license": "AGPL-3.0-only", | ||
@@ -18,3 +18,3 @@ "main": "./dist/grid.cjs.js", | ||
"classnames": "~2.5.0", | ||
"@purpurds/tokens": "5.7.0" | ||
"@purpurds/tokens": "5.8.0" | ||
}, | ||
@@ -45,3 +45,3 @@ "devDependencies": { | ||
"@purpurds/component-rig": "1.0.0", | ||
"@purpurds/link": "5.7.0" | ||
"@purpurds/link": "5.8.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
62854
572
132
+ Added@purpurds/tokens@5.8.0(transitive)
- Removed@purpurds/tokens@5.7.0(transitive)
Updated@purpurds/tokens@5.8.0