New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bedrock-layout/center

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bedrock-layout/center - npm Package Compare versions

Comparing version 2.6.5 to 2.7.0

27

lib/index.cjs.js

@@ -1,2 +0,21 @@

"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var o=require("@bedrock-layout/spacing-constants"),g=require("styled-components");function b(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var h=b(g),u={exports:{}},v="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",T=v,S=T;function y(){}function d(){}d.resetWarningCache=y;var _=function(){function e(a,s,f,n,c,m){if(m!==S){var p=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 p.name="Invariant Violation",p}}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:d,resetWarningCache:y};return r.PropTypes=r,r};u.exports=_();var l=u.exports;const i=h.default.div.attrs(({centerChildren:e,centerText:t,maxWidth:r,theme:a,style:s})=>{var n;return{"data-bedrock-center":[t&&"center-text",e&&"center-children"].filter(c=>c).join(" "),style:{...s,"--maxWidth":typeof r=="number"&&r>0?`${r}px`:(n=o.getSizeValue(a,r))!=null?n:r}}})`
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const ce=require("@bedrock-layout/spacing-constants"),Se=require("styled-components"),_e=r=>r&&typeof r=="object"&&"default"in r?r:{default:r},Oe=_e(Se);var B={exports:{}},ee={exports:{}},h={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var le;function Pe(){if(le)return h;le=1;var r=typeof Symbol=="function"&&Symbol.for,C=r?Symbol.for("react.element"):60103,b=r?Symbol.for("react.portal"):60106,l=r?Symbol.for("react.fragment"):60107,S=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,g=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,P=r?Symbol.for("react.async_mode"):60111,O=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,_=r?Symbol.for("react.suspense"):60113,x=r?Symbol.for("react.suspense_list"):60120,w=r?Symbol.for("react.memo"):60115,M=r?Symbol.for("react.lazy"):60116,R=r?Symbol.for("react.block"):60121,I=r?Symbol.for("react.fundamental"):60117,q=r?Symbol.for("react.responder"):60118,z=r?Symbol.for("react.scope"):60119;function j(n){if(typeof n=="object"&&n!==null){var D=n.$$typeof;switch(D){case C:switch(n=n.type,n){case P:case O:case l:case a:case S:case _:return n;default:switch(n=n&&n.$$typeof,n){case s:case m:case M:case w:case g:return n;default:return D}}case b:return D}}}function A(n){return j(n)===O}return h.AsyncMode=P,h.ConcurrentMode=O,h.ContextConsumer=s,h.ContextProvider=g,h.Element=C,h.ForwardRef=m,h.Fragment=l,h.Lazy=M,h.Memo=w,h.Portal=b,h.Profiler=a,h.StrictMode=S,h.Suspense=_,h.isAsyncMode=function(n){return A(n)||j(n)===P},h.isConcurrentMode=A,h.isContextConsumer=function(n){return j(n)===s},h.isContextProvider=function(n){return j(n)===g},h.isElement=function(n){return typeof n=="object"&&n!==null&&n.$$typeof===C},h.isForwardRef=function(n){return j(n)===m},h.isFragment=function(n){return j(n)===l},h.isLazy=function(n){return j(n)===M},h.isMemo=function(n){return j(n)===w},h.isPortal=function(n){return j(n)===b},h.isProfiler=function(n){return j(n)===a},h.isStrictMode=function(n){return j(n)===S},h.isSuspense=function(n){return j(n)===_},h.isValidElementType=function(n){return typeof n=="string"||typeof n=="function"||n===l||n===O||n===a||n===S||n===_||n===x||typeof n=="object"&&n!==null&&(n.$$typeof===M||n.$$typeof===w||n.$$typeof===g||n.$$typeof===s||n.$$typeof===m||n.$$typeof===I||n.$$typeof===q||n.$$typeof===z||n.$$typeof===R)},h.typeOf=j,h}var T={};/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var de;function Re(){return de||(de=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,C=r?Symbol.for("react.element"):60103,b=r?Symbol.for("react.portal"):60106,l=r?Symbol.for("react.fragment"):60107,S=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,g=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,P=r?Symbol.for("react.async_mode"):60111,O=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,_=r?Symbol.for("react.suspense"):60113,x=r?Symbol.for("react.suspense_list"):60120,w=r?Symbol.for("react.memo"):60115,M=r?Symbol.for("react.lazy"):60116,R=r?Symbol.for("react.block"):60121,I=r?Symbol.for("react.fundamental"):60117,q=r?Symbol.for("react.responder"):60118,z=r?Symbol.for("react.scope"):60119;function j(t){return typeof t=="string"||typeof t=="function"||t===l||t===O||t===a||t===S||t===_||t===x||typeof t=="object"&&t!==null&&(t.$$typeof===M||t.$$typeof===w||t.$$typeof===g||t.$$typeof===s||t.$$typeof===m||t.$$typeof===I||t.$$typeof===q||t.$$typeof===z||t.$$typeof===R)}function A(t){if(typeof t=="object"&&t!==null){var k=t.$$typeof;switch(k){case C:var V=t.type;switch(V){case P:case O:case l:case a:case S:case _:return V;default:var fe=V&&V.$$typeof;switch(fe){case s:case m:case M:case w:case g:return fe;default:return k}}case b:return k}}}var n=P,D=O,N=s,H=g,J=C,X=m,F=l,G=M,K=w,W=b,Z=a,Y=S,L=_,U=!1;function Q(t){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),e(t)||A(t)===P}function e(t){return A(t)===O}function o(t){return A(t)===s}function d(t){return A(t)===g}function u(t){return typeof t=="object"&&t!==null&&t.$$typeof===C}function i(t){return A(t)===m}function y(t){return A(t)===l}function c(t){return A(t)===M}function f(t){return A(t)===w}function p(t){return A(t)===b}function E(t){return A(t)===a}function v(t){return A(t)===S}function $(t){return A(t)===_}T.AsyncMode=n,T.ConcurrentMode=D,T.ContextConsumer=N,T.ContextProvider=H,T.Element=J,T.ForwardRef=X,T.Fragment=F,T.Lazy=G,T.Memo=K,T.Portal=W,T.Profiler=Z,T.StrictMode=Y,T.Suspense=L,T.isAsyncMode=Q,T.isConcurrentMode=e,T.isContextConsumer=o,T.isContextProvider=d,T.isElement=u,T.isForwardRef=i,T.isFragment=y,T.isLazy=c,T.isMemo=f,T.isPortal=p,T.isProfiler=E,T.isStrictMode=v,T.isSuspense=$,T.isValidElementType=j,T.typeOf=A}()),T}var ye;function Ee(){return ye||(ye=1,function(r){process.env.NODE_ENV==="production"?r.exports=Pe():r.exports=Re()}(ee)),ee.exports}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var re,pe;function Ce(){if(pe)return re;pe=1;var r=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;function l(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function S(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var g={},s=0;s<10;s++)g["_"+String.fromCharCode(s)]=s;var P=Object.getOwnPropertyNames(g).map(function(m){return g[m]});if(P.join("")!=="0123456789")return!1;var O={};return"abcdefghijklmnopqrst".split("").forEach(function(m){O[m]=m}),Object.keys(Object.assign({},O)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return re=S()?Object.assign:function(a,g){for(var s,P=l(a),O,m=1;m<arguments.length;m++){s=Object(arguments[m]);for(var _ in s)C.call(s,_)&&(P[_]=s[_]);if(r){O=r(s);for(var x=0;x<O.length;x++)b.call(s,O[x])&&(P[O[x]]=s[O[x]])}}return P},re}var te,ve;function se(){if(ve)return te;ve=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return te=r,te}var ne,be;function ge(){return be||(be=1,ne=Function.call.bind(Object.prototype.hasOwnProperty)),ne}var oe,me;function xe(){if(me)return oe;me=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var C=se(),b={},l=ge();r=function(a){var g="Warning: "+a;typeof console<"u"&&console.error(g);try{throw new Error(g)}catch{}}}function S(a,g,s,P,O){if(process.env.NODE_ENV!=="production"){for(var m in a)if(l(a,m)){var _;try{if(typeof a[m]!="function"){var x=Error((P||"React class")+": "+s+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}_=a[m](g,m,P,s,null,C)}catch(M){_=M}if(_&&!(_ instanceof Error)&&r((P||"React class")+": type specification of "+s+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof _+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),_ instanceof Error&&!(_.message in b)){b[_.message]=!0;var w=O?O():"";r("Failed "+s+" type: "+_.message+(w!=null?w:""))}}}}return S.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(b={})},oe=S,oe}var ie,he;function we(){if(he)return ie;he=1;var r=Ee(),C=Ce(),b=se(),l=ge(),S=xe(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var P="Warning: "+s;typeof console<"u"&&console.error(P);try{throw new Error(P)}catch{}});function g(){return null}return ie=function(s,P){var O=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function _(e){var o=e&&(O&&e[O]||e[m]);if(typeof o=="function")return o}var x="<<anonymous>>",w={array:q("array"),bigint:q("bigint"),bool:q("boolean"),func:q("function"),number:q("number"),object:q("object"),string:q("string"),symbol:q("symbol"),any:z(),arrayOf:j,element:A(),elementType:n(),instanceOf:D,node:X(),objectOf:H,oneOf:N,oneOfType:J,shape:G,exact:K};function M(e,o){return e===o?e!==0||1/e===1/o:e!==e&&o!==o}function R(e,o){this.message=e,this.data=o&&typeof o=="object"?o:{},this.stack=""}R.prototype=Error.prototype;function I(e){if(process.env.NODE_ENV!=="production")var o={},d=0;function u(y,c,f,p,E,v,$){if(p=p||x,v=v||f,$!==b){if(P){var t=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 t.name="Invariant Violation",t}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var k=p+":"+f;!o[k]&&d<3&&(a("You are manually calling a React.PropTypes validation function for the `"+v+"` prop on `"+p+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),o[k]=!0,d++)}}return c[f]==null?y?c[f]===null?new R("The "+E+" `"+v+"` is marked as required "+("in `"+p+"`, but its value is `null`.")):new R("The "+E+" `"+v+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(c,f,p,E,v)}var i=u.bind(null,!1);return i.isRequired=u.bind(null,!0),i}function q(e){function o(d,u,i,y,c,f){var p=d[u],E=Y(p);if(E!==e){var v=L(p);return new R("Invalid "+y+" `"+c+"` of type "+("`"+v+"` supplied to `"+i+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return I(o)}function z(){return I(g)}function j(e){function o(d,u,i,y,c){if(typeof e!="function")return new R("Property `"+c+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var f=d[u];if(!Array.isArray(f)){var p=Y(f);return new R("Invalid "+y+" `"+c+"` of type "+("`"+p+"` supplied to `"+i+"`, expected an array."))}for(var E=0;E<f.length;E++){var v=e(f,E,i,y,c+"["+E+"]",b);if(v instanceof Error)return v}return null}return I(o)}function A(){function e(o,d,u,i,y){var c=o[d];if(!s(c)){var f=Y(c);return new R("Invalid "+i+" `"+y+"` of type "+("`"+f+"` supplied to `"+u+"`, expected a single ReactElement."))}return null}return I(e)}function n(){function e(o,d,u,i,y){var c=o[d];if(!r.isValidElementType(c)){var f=Y(c);return new R("Invalid "+i+" `"+y+"` of type "+("`"+f+"` supplied to `"+u+"`, expected a single ReactElement type."))}return null}return I(e)}function D(e){function o(d,u,i,y,c){if(!(d[u]instanceof e)){var f=e.name||x,p=Q(d[u]);return new R("Invalid "+y+" `"+c+"` of type "+("`"+p+"` supplied to `"+i+"`, expected ")+("instance of `"+f+"`."))}return null}return I(o)}function N(e){if(!Array.isArray(e))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),g;function o(d,u,i,y,c){for(var f=d[u],p=0;p<e.length;p++)if(M(f,e[p]))return null;var E=JSON.stringify(e,function($,t){var k=L(t);return k==="symbol"?String(t):t});return new R("Invalid "+y+" `"+c+"` of value `"+String(f)+"` "+("supplied to `"+i+"`, expected one of "+E+"."))}return I(o)}function H(e){function o(d,u,i,y,c){if(typeof e!="function")return new R("Property `"+c+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var f=d[u],p=Y(f);if(p!=="object")return new R("Invalid "+y+" `"+c+"` of type "+("`"+p+"` supplied to `"+i+"`, expected an object."));for(var E in f)if(l(f,E)){var v=e(f,E,i,y,c+"."+E,b);if(v instanceof Error)return v}return null}return I(o)}function J(e){if(!Array.isArray(e))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),g;for(var o=0;o<e.length;o++){var d=e[o];if(typeof d!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(d)+" at index "+o+"."),g}function u(i,y,c,f,p){for(var E=[],v=0;v<e.length;v++){var $=e[v],t=$(i,y,c,f,p,b);if(t==null)return null;t.data&&l(t.data,"expectedType")&&E.push(t.data.expectedType)}var k=E.length>0?", expected one of type ["+E.join(", ")+"]":"";return new R("Invalid "+f+" `"+p+"` supplied to "+("`"+c+"`"+k+"."))}return I(u)}function X(){function e(o,d,u,i,y){return W(o[d])?null:new R("Invalid "+i+" `"+y+"` supplied to "+("`"+u+"`, expected a ReactNode."))}return I(e)}function F(e,o,d,u,i){return new R((e||"React class")+": "+o+" type `"+d+"."+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function G(e){function o(d,u,i,y,c){var f=d[u],p=Y(f);if(p!=="object")return new R("Invalid "+y+" `"+c+"` of type `"+p+"` "+("supplied to `"+i+"`, expected `object`."));for(var E in e){var v=e[E];if(typeof v!="function")return F(i,y,c,E,L(v));var $=v(f,E,i,y,c+"."+E,b);if($)return $}return null}return I(o)}function K(e){function o(d,u,i,y,c){var f=d[u],p=Y(f);if(p!=="object")return new R("Invalid "+y+" `"+c+"` of type `"+p+"` "+("supplied to `"+i+"`, expected `object`."));var E=C({},d[u],e);for(var v in E){var $=e[v];if(l(e,v)&&typeof $!="function")return F(i,y,c,v,L($));if(!$)return new R("Invalid "+y+" `"+c+"` key `"+v+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(d[u],null," ")+`
Valid keys: `+JSON.stringify(Object.keys(e),null," "));var t=$(f,v,i,y,c+"."+v,b);if(t)return t}return null}return I(o)}function W(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(W);if(e===null||s(e))return!0;var o=_(e);if(o){var d=o.call(e),u;if(o!==e.entries){for(;!(u=d.next()).done;)if(!W(u.value))return!1}else for(;!(u=d.next()).done;){var i=u.value;if(i&&!W(i[1]))return!1}}else return!1;return!0;default:return!1}}function Z(e,o){return e==="symbol"?!0:o?o["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&o instanceof Symbol:!1}function Y(e){var o=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":Z(o,e)?"symbol":o}function L(e){if(typeof e>"u"||e===null)return""+e;var o=Y(e);if(o==="object"){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return o}function U(e){var o=L(e);switch(o){case"array":case"object":return"an "+o;case"boolean":case"date":case"regexp":return"a "+o;default:return o}}function Q(e){return!e.constructor||!e.constructor.name?x:e.constructor.name}return w.checkPropTypes=S,w.resetWarningCache=S.resetWarningCache,w.PropTypes=w,w},ie}var ae,Te;function Ae(){if(Te)return ae;Te=1;var r=se();function C(){}function b(){}return b.resetWarningCache=C,ae=function(){function l(g,s,P,O,m,_){if(_!==r){var x=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 x.name="Invariant Violation",x}}l.isRequired=l;function S(){return l}var a={array:l,bigint:l,bool:l,func:l,number:l,object:l,string:l,symbol:l,any:l,arrayOf:S,element:l,elementType:l,instanceOf:S,node:l,objectOf:S,oneOf:S,oneOfType:S,shape:S,exact:S,checkPropTypes:b,resetWarningCache:C};return a.PropTypes=a,a},ae}if(process.env.NODE_ENV!=="production"){var je=Ee(),Ie=!0;B.exports=we()(je.isElement,Ie)}else B.exports=Ae()();const ue=Oe.default.div.attrs(({centerChildren:r,centerText:C,maxWidth:b,theme:l,style:S})=>{var g;return{"data-bedrock-center":[C&&"center-text",r&&"center-children"].filter(s=>s).join(" "),style:{...S,"--maxWidth":typeof b=="number"&&b>0?`${b}px`:(g=ce.getSizeValue(l,b))!=null?g:b}}})`
@property --maxWidth {

@@ -18,7 +37,7 @@ syntax: "<length-percentage>";

${e=>e.centerChildren&&`display: flex;
${r=>r.centerChildren&&`display: flex;
flex-direction: column;
align-items: center;`}
${e=>e.centerText&&"text-align: center;"}
`;i.displayName="Center";function P({maxWidth:e},t){if(e===void 0)return;typeof e=="number"||o.checkIsCSSLength(e)||Object.keys(o.sizes).includes(e)||console.error(`${t} needs to be an number, CSSLength or SizesOptions`)}i.propTypes={maxWidth:P,centerText:l.bool,centerChildren:l.bool};exports.Center=i;
${r=>r.centerText&&"text-align: center;"}
`;ue.displayName="Center";function $e({maxWidth:r},C){if(r===void 0)return;typeof r=="number"||ce.checkIsCSSLength(r)||Object.keys(ce.sizes).includes(r)||console.error(`${C} needs to be an number, CSSLength or SizesOptions`)}ue.propTypes={maxWidth:$e,centerText:B.exports.bool,centerChildren:B.exports.bool};exports.Center=ue;

@@ -1,69 +0,680 @@

import { getSizeValue, checkIsCSSLength, sizes } from "@bedrock-layout/spacing-constants";
import styled from "styled-components";
var propTypes = { exports: {} };
var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
var ReactPropTypesSecret = ReactPropTypesSecret_1;
function emptyFunction() {
import { getSizeValue as ge, checkIsCSSLength as Se, sizes as Oe } from "@bedrock-layout/spacing-constants";
import Pe from "styled-components";
var B = { exports: {} }, ee = { exports: {} }, h = {};
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var ue;
function _e() {
if (ue)
return h;
ue = 1;
var n = typeof Symbol == "function" && Symbol.for, x = n ? Symbol.for("react.element") : 60103, b = n ? Symbol.for("react.portal") : 60106, l = n ? Symbol.for("react.fragment") : 60107, S = n ? Symbol.for("react.strict_mode") : 60108, a = n ? Symbol.for("react.profiler") : 60114, g = n ? Symbol.for("react.provider") : 60109, s = n ? Symbol.for("react.context") : 60110, _ = n ? Symbol.for("react.async_mode") : 60111, P = n ? Symbol.for("react.concurrent_mode") : 60111, m = n ? Symbol.for("react.forward_ref") : 60112, O = n ? Symbol.for("react.suspense") : 60113, C = n ? Symbol.for("react.suspense_list") : 60120, w = n ? Symbol.for("react.memo") : 60115, M = n ? Symbol.for("react.lazy") : 60116, R = n ? Symbol.for("react.block") : 60121, $ = n ? Symbol.for("react.fundamental") : 60117, Y = n ? Symbol.for("react.responder") : 60118, z = n ? Symbol.for("react.scope") : 60119;
function I(t) {
if (typeof t == "object" && t !== null) {
var D = t.$$typeof;
switch (D) {
case x:
switch (t = t.type, t) {
case _:
case P:
case l:
case a:
case S:
case O:
return t;
default:
switch (t = t && t.$$typeof, t) {
case s:
case m:
case M:
case w:
case g:
return t;
default:
return D;
}
}
case b:
return D;
}
}
}
function A(t) {
return I(t) === P;
}
return h.AsyncMode = _, h.ConcurrentMode = P, h.ContextConsumer = s, h.ContextProvider = g, h.Element = x, h.ForwardRef = m, h.Fragment = l, h.Lazy = M, h.Memo = w, h.Portal = b, h.Profiler = a, h.StrictMode = S, h.Suspense = O, h.isAsyncMode = function(t) {
return A(t) || I(t) === _;
}, h.isConcurrentMode = A, h.isContextConsumer = function(t) {
return I(t) === s;
}, h.isContextProvider = function(t) {
return I(t) === g;
}, h.isElement = function(t) {
return typeof t == "object" && t !== null && t.$$typeof === x;
}, h.isForwardRef = function(t) {
return I(t) === m;
}, h.isFragment = function(t) {
return I(t) === l;
}, h.isLazy = function(t) {
return I(t) === M;
}, h.isMemo = function(t) {
return I(t) === w;
}, h.isPortal = function(t) {
return I(t) === b;
}, h.isProfiler = function(t) {
return I(t) === a;
}, h.isStrictMode = function(t) {
return I(t) === S;
}, h.isSuspense = function(t) {
return I(t) === O;
}, h.isValidElementType = function(t) {
return typeof t == "string" || typeof t == "function" || t === l || t === P || t === a || t === S || t === O || t === C || typeof t == "object" && t !== null && (t.$$typeof === M || t.$$typeof === w || t.$$typeof === g || t.$$typeof === s || t.$$typeof === m || t.$$typeof === $ || t.$$typeof === Y || t.$$typeof === z || t.$$typeof === R);
}, h.typeOf = I, h;
}
function emptyFunctionWithReset() {
var T = {};
/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var fe;
function Re() {
return fe || (fe = 1, process.env.NODE_ENV !== "production" && function() {
var n = typeof Symbol == "function" && Symbol.for, x = n ? Symbol.for("react.element") : 60103, b = n ? Symbol.for("react.portal") : 60106, l = n ? Symbol.for("react.fragment") : 60107, S = n ? Symbol.for("react.strict_mode") : 60108, a = n ? Symbol.for("react.profiler") : 60114, g = n ? Symbol.for("react.provider") : 60109, s = n ? Symbol.for("react.context") : 60110, _ = n ? Symbol.for("react.async_mode") : 60111, P = n ? Symbol.for("react.concurrent_mode") : 60111, m = n ? Symbol.for("react.forward_ref") : 60112, O = n ? Symbol.for("react.suspense") : 60113, C = n ? Symbol.for("react.suspense_list") : 60120, w = n ? Symbol.for("react.memo") : 60115, M = n ? Symbol.for("react.lazy") : 60116, R = n ? Symbol.for("react.block") : 60121, $ = n ? Symbol.for("react.fundamental") : 60117, Y = n ? Symbol.for("react.responder") : 60118, z = n ? Symbol.for("react.scope") : 60119;
function I(r) {
return typeof r == "string" || typeof r == "function" || r === l || r === P || r === a || r === S || r === O || r === C || typeof r == "object" && r !== null && (r.$$typeof === M || r.$$typeof === w || r.$$typeof === g || r.$$typeof === s || r.$$typeof === m || r.$$typeof === $ || r.$$typeof === Y || r.$$typeof === z || r.$$typeof === R);
}
function A(r) {
if (typeof r == "object" && r !== null) {
var k = r.$$typeof;
switch (k) {
case x:
var V = r.type;
switch (V) {
case _:
case P:
case l:
case a:
case S:
case O:
return V;
default:
var se = V && V.$$typeof;
switch (se) {
case s:
case m:
case M:
case w:
case g:
return se;
default:
return k;
}
}
case b:
return k;
}
}
}
var t = _, D = P, N = s, H = g, J = x, X = m, F = l, G = M, K = w, W = b, Z = a, q = S, L = O, U = !1;
function Q(r) {
return U || (U = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), e(r) || A(r) === _;
}
function e(r) {
return A(r) === P;
}
function o(r) {
return A(r) === s;
}
function d(r) {
return A(r) === g;
}
function u(r) {
return typeof r == "object" && r !== null && r.$$typeof === x;
}
function i(r) {
return A(r) === m;
}
function p(r) {
return A(r) === l;
}
function c(r) {
return A(r) === M;
}
function f(r) {
return A(r) === w;
}
function y(r) {
return A(r) === b;
}
function E(r) {
return A(r) === a;
}
function v(r) {
return A(r) === S;
}
function j(r) {
return A(r) === O;
}
T.AsyncMode = t, T.ConcurrentMode = D, T.ContextConsumer = N, T.ContextProvider = H, T.Element = J, T.ForwardRef = X, T.Fragment = F, T.Lazy = G, T.Memo = K, T.Portal = W, T.Profiler = Z, T.StrictMode = q, T.Suspense = L, T.isAsyncMode = Q, T.isConcurrentMode = e, T.isContextConsumer = o, T.isContextProvider = d, T.isElement = u, T.isForwardRef = i, T.isFragment = p, T.isLazy = c, T.isMemo = f, T.isPortal = y, T.isProfiler = E, T.isStrictMode = v, T.isSuspense = j, T.isValidElementType = I, T.typeOf = A;
}()), T;
}
emptyFunctionWithReset.resetWarningCache = emptyFunction;
var factoryWithThrowingShims = function() {
function shim(props, propName, componentName, location, propFullName, secret) {
if (secret === ReactPropTypesSecret) {
return;
var le;
function he() {
return le || (le = 1, function(n) {
process.env.NODE_ENV === "production" ? n.exports = _e() : n.exports = Re();
}(ee)), ee.exports;
}
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var re, de;
function xe() {
if (de)
return re;
de = 1;
var n = Object.getOwnPropertySymbols, x = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
function l(a) {
if (a == null)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(a);
}
function S() {
try {
if (!Object.assign)
return !1;
var a = new String("abc");
if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
return !1;
for (var g = {}, s = 0; s < 10; s++)
g["_" + String.fromCharCode(s)] = s;
var _ = Object.getOwnPropertyNames(g).map(function(m) {
return g[m];
});
if (_.join("") !== "0123456789")
return !1;
var P = {};
return "abcdefghijklmnopqrst".split("").forEach(function(m) {
P[m] = m;
}), Object.keys(Object.assign({}, P)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
var err = 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");
err.name = "Invariant Violation";
throw err;
}
shim.isRequired = shim;
function getShim() {
return shim;
return re = S() ? Object.assign : function(a, g) {
for (var s, _ = l(a), P, m = 1; m < arguments.length; m++) {
s = Object(arguments[m]);
for (var O in s)
x.call(s, O) && (_[O] = s[O]);
if (n) {
P = n(s);
for (var C = 0; C < P.length; C++)
b.call(s, P[C]) && (_[P[C]] = s[P[C]]);
}
}
return _;
}, re;
}
var te, pe;
function ce() {
if (pe)
return te;
pe = 1;
var n = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
return te = n, te;
}
var ne, ye;
function Te() {
return ye || (ye = 1, ne = Function.call.bind(Object.prototype.hasOwnProperty)), ne;
}
var oe, ve;
function Ce() {
if (ve)
return oe;
ve = 1;
var n = function() {
};
if (process.env.NODE_ENV !== "production") {
var x = ce(), b = {}, l = Te();
n = function(a) {
var g = "Warning: " + a;
typeof console < "u" && console.error(g);
try {
throw new Error(g);
} catch {
}
};
}
var ReactPropTypes = {
array: shim,
bigint: shim,
bool: shim,
func: shim,
number: shim,
object: shim,
string: shim,
symbol: shim,
any: shim,
arrayOf: getShim,
element: shim,
elementType: shim,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim,
exact: getShim,
checkPropTypes: emptyFunctionWithReset,
resetWarningCache: emptyFunction
function S(a, g, s, _, P) {
if (process.env.NODE_ENV !== "production") {
for (var m in a)
if (l(a, m)) {
var O;
try {
if (typeof a[m] != "function") {
var C = Error(
(_ || "React class") + ": " + s + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
);
throw C.name = "Invariant Violation", C;
}
O = a[m](g, m, _, s, null, x);
} catch (M) {
O = M;
}
if (O && !(O instanceof Error) && n(
(_ || "React class") + ": type specification of " + s + " `" + m + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof O + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
), O instanceof Error && !(O.message in b)) {
b[O.message] = !0;
var w = P ? P() : "";
n(
"Failed " + s + " type: " + O.message + (w != null ? w : "")
);
}
}
}
}
return S.resetWarningCache = function() {
process.env.NODE_ENV !== "production" && (b = {});
}, oe = S, oe;
}
var ie, be;
function we() {
if (be)
return ie;
be = 1;
var n = he(), x = xe(), b = ce(), l = Te(), S = Ce(), a = function() {
};
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
{
propTypes.exports = factoryWithThrowingShims();
process.env.NODE_ENV !== "production" && (a = function(s) {
var _ = "Warning: " + s;
typeof console < "u" && console.error(_);
try {
throw new Error(_);
} catch {
}
});
function g() {
return null;
}
return ie = function(s, _) {
var P = typeof Symbol == "function" && Symbol.iterator, m = "@@iterator";
function O(e) {
var o = e && (P && e[P] || e[m]);
if (typeof o == "function")
return o;
}
var C = "<<anonymous>>", w = {
array: Y("array"),
bigint: Y("bigint"),
bool: Y("boolean"),
func: Y("function"),
number: Y("number"),
object: Y("object"),
string: Y("string"),
symbol: Y("symbol"),
any: z(),
arrayOf: I,
element: A(),
elementType: t(),
instanceOf: D,
node: X(),
objectOf: H,
oneOf: N,
oneOfType: J,
shape: G,
exact: K
};
function M(e, o) {
return e === o ? e !== 0 || 1 / e === 1 / o : e !== e && o !== o;
}
function R(e, o) {
this.message = e, this.data = o && typeof o == "object" ? o : {}, this.stack = "";
}
R.prototype = Error.prototype;
function $(e) {
if (process.env.NODE_ENV !== "production")
var o = {}, d = 0;
function u(p, c, f, y, E, v, j) {
if (y = y || C, v = v || f, j !== b) {
if (_) {
var r = 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 r.name = "Invariant Violation", r;
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
var k = y + ":" + f;
!o[k] && d < 3 && (a(
"You are manually calling a React.PropTypes validation function for the `" + v + "` prop on `" + y + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
), o[k] = !0, d++);
}
}
return c[f] == null ? p ? c[f] === null ? new R("The " + E + " `" + v + "` is marked as required " + ("in `" + y + "`, but its value is `null`.")) : new R("The " + E + " `" + v + "` is marked as required in " + ("`" + y + "`, but its value is `undefined`.")) : null : e(c, f, y, E, v);
}
var i = u.bind(null, !1);
return i.isRequired = u.bind(null, !0), i;
}
function Y(e) {
function o(d, u, i, p, c, f) {
var y = d[u], E = q(y);
if (E !== e) {
var v = L(y);
return new R(
"Invalid " + p + " `" + c + "` of type " + ("`" + v + "` supplied to `" + i + "`, expected ") + ("`" + e + "`."),
{ expectedType: e }
);
}
return null;
}
return $(o);
}
function z() {
return $(g);
}
function I(e) {
function o(d, u, i, p, c) {
if (typeof e != "function")
return new R("Property `" + c + "` of component `" + i + "` has invalid PropType notation inside arrayOf.");
var f = d[u];
if (!Array.isArray(f)) {
var y = q(f);
return new R("Invalid " + p + " `" + c + "` of type " + ("`" + y + "` supplied to `" + i + "`, expected an array."));
}
for (var E = 0; E < f.length; E++) {
var v = e(f, E, i, p, c + "[" + E + "]", b);
if (v instanceof Error)
return v;
}
return null;
}
return $(o);
}
function A() {
function e(o, d, u, i, p) {
var c = o[d];
if (!s(c)) {
var f = q(c);
return new R("Invalid " + i + " `" + p + "` of type " + ("`" + f + "` supplied to `" + u + "`, expected a single ReactElement."));
}
return null;
}
return $(e);
}
function t() {
function e(o, d, u, i, p) {
var c = o[d];
if (!n.isValidElementType(c)) {
var f = q(c);
return new R("Invalid " + i + " `" + p + "` of type " + ("`" + f + "` supplied to `" + u + "`, expected a single ReactElement type."));
}
return null;
}
return $(e);
}
function D(e) {
function o(d, u, i, p, c) {
if (!(d[u] instanceof e)) {
var f = e.name || C, y = Q(d[u]);
return new R("Invalid " + p + " `" + c + "` of type " + ("`" + y + "` supplied to `" + i + "`, expected ") + ("instance of `" + f + "`."));
}
return null;
}
return $(o);
}
function N(e) {
if (!Array.isArray(e))
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
) : a("Invalid argument supplied to oneOf, expected an array.")), g;
function o(d, u, i, p, c) {
for (var f = d[u], y = 0; y < e.length; y++)
if (M(f, e[y]))
return null;
var E = JSON.stringify(e, function(j, r) {
var k = L(r);
return k === "symbol" ? String(r) : r;
});
return new R("Invalid " + p + " `" + c + "` of value `" + String(f) + "` " + ("supplied to `" + i + "`, expected one of " + E + "."));
}
return $(o);
}
function H(e) {
function o(d, u, i, p, c) {
if (typeof e != "function")
return new R("Property `" + c + "` of component `" + i + "` has invalid PropType notation inside objectOf.");
var f = d[u], y = q(f);
if (y !== "object")
return new R("Invalid " + p + " `" + c + "` of type " + ("`" + y + "` supplied to `" + i + "`, expected an object."));
for (var E in f)
if (l(f, E)) {
var v = e(f, E, i, p, c + "." + E, b);
if (v instanceof Error)
return v;
}
return null;
}
return $(o);
}
function J(e) {
if (!Array.isArray(e))
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), g;
for (var o = 0; o < e.length; o++) {
var d = e[o];
if (typeof d != "function")
return a(
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + U(d) + " at index " + o + "."
), g;
}
function u(i, p, c, f, y) {
for (var E = [], v = 0; v < e.length; v++) {
var j = e[v], r = j(i, p, c, f, y, b);
if (r == null)
return null;
r.data && l(r.data, "expectedType") && E.push(r.data.expectedType);
}
var k = E.length > 0 ? ", expected one of type [" + E.join(", ") + "]" : "";
return new R("Invalid " + f + " `" + y + "` supplied to " + ("`" + c + "`" + k + "."));
}
return $(u);
}
function X() {
function e(o, d, u, i, p) {
return W(o[d]) ? null : new R("Invalid " + i + " `" + p + "` supplied to " + ("`" + u + "`, expected a ReactNode."));
}
return $(e);
}
function F(e, o, d, u, i) {
return new R(
(e || "React class") + ": " + o + " type `" + d + "." + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + i + "`."
);
}
function G(e) {
function o(d, u, i, p, c) {
var f = d[u], y = q(f);
if (y !== "object")
return new R("Invalid " + p + " `" + c + "` of type `" + y + "` " + ("supplied to `" + i + "`, expected `object`."));
for (var E in e) {
var v = e[E];
if (typeof v != "function")
return F(i, p, c, E, L(v));
var j = v(f, E, i, p, c + "." + E, b);
if (j)
return j;
}
return null;
}
return $(o);
}
function K(e) {
function o(d, u, i, p, c) {
var f = d[u], y = q(f);
if (y !== "object")
return new R("Invalid " + p + " `" + c + "` of type `" + y + "` " + ("supplied to `" + i + "`, expected `object`."));
var E = x({}, d[u], e);
for (var v in E) {
var j = e[v];
if (l(e, v) && typeof j != "function")
return F(i, p, c, v, L(j));
if (!j)
return new R(
"Invalid " + p + " `" + c + "` key `" + v + "` supplied to `" + i + "`.\nBad object: " + JSON.stringify(d[u], null, " ") + `
Valid keys: ` + JSON.stringify(Object.keys(e), null, " ")
);
var r = j(f, v, i, p, c + "." + v, b);
if (r)
return r;
}
return null;
}
return $(o);
}
function W(e) {
switch (typeof e) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !e;
case "object":
if (Array.isArray(e))
return e.every(W);
if (e === null || s(e))
return !0;
var o = O(e);
if (o) {
var d = o.call(e), u;
if (o !== e.entries) {
for (; !(u = d.next()).done; )
if (!W(u.value))
return !1;
} else
for (; !(u = d.next()).done; ) {
var i = u.value;
if (i && !W(i[1]))
return !1;
}
} else
return !1;
return !0;
default:
return !1;
}
}
function Z(e, o) {
return e === "symbol" ? !0 : o ? o["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && o instanceof Symbol : !1;
}
function q(e) {
var o = typeof e;
return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : Z(o, e) ? "symbol" : o;
}
function L(e) {
if (typeof e > "u" || e === null)
return "" + e;
var o = q(e);
if (o === "object") {
if (e instanceof Date)
return "date";
if (e instanceof RegExp)
return "regexp";
}
return o;
}
function U(e) {
var o = L(e);
switch (o) {
case "array":
case "object":
return "an " + o;
case "boolean":
case "date":
case "regexp":
return "a " + o;
default:
return o;
}
}
function Q(e) {
return !e.constructor || !e.constructor.name ? C : e.constructor.name;
}
return w.checkPropTypes = S, w.resetWarningCache = S.resetWarningCache, w.PropTypes = w, w;
}, ie;
}
var PropTypes = propTypes.exports;
const Center = styled.div.attrs(({ centerChildren, centerText, maxWidth, theme, style }) => {
var _a;
const centerProps = [
centerText && "center-text",
centerChildren && "center-children"
].filter((x) => x).join(" ");
return {
"data-bedrock-center": centerProps,
style: {
...style,
"--maxWidth": typeof maxWidth === "number" && maxWidth > 0 ? `${maxWidth}px` : (_a = getSizeValue(theme, maxWidth)) != null ? _a : maxWidth
var ae, me;
function Ae() {
if (me)
return ae;
me = 1;
var n = ce();
function x() {
}
function b() {
}
return b.resetWarningCache = x, ae = function() {
function l(g, s, _, P, m, O) {
if (O !== n) {
var C = 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 C.name = "Invariant Violation", C;
}
}
};
})`
l.isRequired = l;
function S() {
return l;
}
var a = {
array: l,
bigint: l,
bool: l,
func: l,
number: l,
object: l,
string: l,
symbol: l,
any: l,
arrayOf: S,
element: l,
elementType: l,
instanceOf: S,
node: l,
objectOf: S,
oneOf: S,
oneOfType: S,
shape: S,
exact: S,
checkPropTypes: b,
resetWarningCache: x
};
return a.PropTypes = a, a;
}, ae;
}
if (process.env.NODE_ENV !== "production") {
var Ie = he(), $e = !0;
B.exports = we()(Ie.isElement, $e);
} else
B.exports = Ae()();
const Ee = Pe.div.attrs(
({ centerChildren: n, centerText: x, maxWidth: b, theme: l, style: S }) => {
var g;
return {
"data-bedrock-center": [
x && "center-text",
n && "center-children"
].filter((s) => s).join(" "),
style: {
...S,
"--maxWidth": typeof b == "number" && b > 0 ? `${b}px` : (g = ge(l, b)) != null ? g : b
}
};
}
)`
@property --maxWidth {

@@ -85,23 +696,23 @@ syntax: "<length-percentage>";

${(props) => props.centerChildren && `display: flex;
${(n) => n.centerChildren && `display: flex;
flex-direction: column;
align-items: center;`}
${(props) => props.centerText && `text-align: center;`}
${(n) => n.centerText && "text-align: center;"}
`;
Center.displayName = "Center";
function validateMaxWidth({ maxWidth }, propName) {
if (maxWidth === void 0)
return void 0;
const isValid = typeof maxWidth === "number" || checkIsCSSLength(maxWidth) || Object.keys(sizes).includes(maxWidth);
if (!isValid) {
console.error(`${propName} needs to be an number, CSSLength or SizesOptions`);
}
return void 0;
Ee.displayName = "Center";
function je({ maxWidth: n }, x) {
if (n === void 0)
return;
typeof n == "number" || Se(n) || Object.keys(Oe).includes(n) || console.error(
`${x} needs to be an number, CSSLength or SizesOptions`
);
}
Center.propTypes = {
maxWidth: validateMaxWidth,
centerText: PropTypes.bool,
centerChildren: PropTypes.bool
Ee.propTypes = {
maxWidth: je,
centerText: B.exports.bool,
centerChildren: B.exports.bool
};
export { Center };
export {
Ee as Center
};

@@ -1,2 +0,21 @@

(function(r,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("@bedrock-layout/spacing-constants"),require("styled-components")):typeof define=="function"&&define.amd?define(["exports","@bedrock-layout/spacing-constants","styled-components"],o):(r=typeof globalThis!="undefined"?globalThis:r||self,o(r.center={},r.spacingConstants,r.styled))})(this,function(r,o,m){"use strict";function h(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var T=h(m),a={exports:{}},b="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",g=b,v=g;function c(){}function p(){}p.resetWarningCache=c;var S=function(){function e(u,d,_,s,y,P){if(P!==v){var f=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 f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={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:p,resetWarningCache:c};return n.PropTypes=n,n};a.exports=S();var l=a.exports;const i=T.default.div.attrs(({centerChildren:e,centerText:t,maxWidth:n,theme:u,style:d})=>{var s;return{"data-bedrock-center":[t&&"center-text",e&&"center-children"].filter(y=>y).join(" "),style:{...d,"--maxWidth":typeof n=="number"&&n>0?`${n}px`:(s=o.getSizeValue(u,n))!=null?s:n}}})`
(function(D,L){typeof exports=="object"&&typeof module<"u"?L(exports,require("@bedrock-layout/spacing-constants"),require("styled-components")):typeof define=="function"&&define.amd?define(["exports","@bedrock-layout/spacing-constants","styled-components"],L):(D=typeof globalThis<"u"?globalThis:D||self,L(D.center={},D.spacingConstants,D.styled))})(this,function(D,L,_e){"use strict";const Oe=(r=>r&&typeof r=="object"&&"default"in r?r:{default:r})(_e);var V={exports:{}},J={exports:{}},b={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var le;function Pe(){if(le)return b;le=1;var r=typeof Symbol=="function"&&Symbol.for,x=r?Symbol.for("react.element"):60103,h=r?Symbol.for("react.portal"):60106,l=r?Symbol.for("react.fragment"):60107,S=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,g=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,P=r?Symbol.for("react.async_mode"):60111,O=r?Symbol.for("react.concurrent_mode"):60111,T=r?Symbol.for("react.forward_ref"):60112,_=r?Symbol.for("react.suspense"):60113,C=r?Symbol.for("react.suspense_list"):60120,w=r?Symbol.for("react.memo"):60115,M=r?Symbol.for("react.lazy"):60116,R=r?Symbol.for("react.block"):60121,I=r?Symbol.for("react.fundamental"):60117,q=r?Symbol.for("react.responder"):60118,U=r?Symbol.for("react.scope"):60119;function j(n){if(typeof n=="object"&&n!==null){var W=n.$$typeof;switch(W){case x:switch(n=n.type,n){case P:case O:case l:case a:case S:case _:return n;default:switch(n=n&&n.$$typeof,n){case s:case T:case M:case w:case g:return n;default:return W}}case h:return W}}}function A(n){return j(n)===O}return b.AsyncMode=P,b.ConcurrentMode=O,b.ContextConsumer=s,b.ContextProvider=g,b.Element=x,b.ForwardRef=T,b.Fragment=l,b.Lazy=M,b.Memo=w,b.Portal=h,b.Profiler=a,b.StrictMode=S,b.Suspense=_,b.isAsyncMode=function(n){return A(n)||j(n)===P},b.isConcurrentMode=A,b.isContextConsumer=function(n){return j(n)===s},b.isContextProvider=function(n){return j(n)===g},b.isElement=function(n){return typeof n=="object"&&n!==null&&n.$$typeof===x},b.isForwardRef=function(n){return j(n)===T},b.isFragment=function(n){return j(n)===l},b.isLazy=function(n){return j(n)===M},b.isMemo=function(n){return j(n)===w},b.isPortal=function(n){return j(n)===h},b.isProfiler=function(n){return j(n)===a},b.isStrictMode=function(n){return j(n)===S},b.isSuspense=function(n){return j(n)===_},b.isValidElementType=function(n){return typeof n=="string"||typeof n=="function"||n===l||n===O||n===a||n===S||n===_||n===C||typeof n=="object"&&n!==null&&(n.$$typeof===M||n.$$typeof===w||n.$$typeof===g||n.$$typeof===s||n.$$typeof===T||n.$$typeof===I||n.$$typeof===q||n.$$typeof===U||n.$$typeof===R)},b.typeOf=j,b}var m={};/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var de;function Re(){return de||(de=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,x=r?Symbol.for("react.element"):60103,h=r?Symbol.for("react.portal"):60106,l=r?Symbol.for("react.fragment"):60107,S=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,g=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,P=r?Symbol.for("react.async_mode"):60111,O=r?Symbol.for("react.concurrent_mode"):60111,T=r?Symbol.for("react.forward_ref"):60112,_=r?Symbol.for("react.suspense"):60113,C=r?Symbol.for("react.suspense_list"):60120,w=r?Symbol.for("react.memo"):60115,M=r?Symbol.for("react.lazy"):60116,R=r?Symbol.for("react.block"):60121,I=r?Symbol.for("react.fundamental"):60117,q=r?Symbol.for("react.responder"):60118,U=r?Symbol.for("react.scope"):60119;function j(t){return typeof t=="string"||typeof t=="function"||t===l||t===O||t===a||t===S||t===_||t===C||typeof t=="object"&&t!==null&&(t.$$typeof===M||t.$$typeof===w||t.$$typeof===g||t.$$typeof===s||t.$$typeof===T||t.$$typeof===I||t.$$typeof===q||t.$$typeof===U||t.$$typeof===R)}function A(t){if(typeof t=="object"&&t!==null){var Y=t.$$typeof;switch(Y){case x:var H=t.type;switch(H){case P:case O:case l:case a:case S:case _:return H;default:var Se=H&&H.$$typeof;switch(Se){case s:case T:case M:case w:case g:return Se;default:return Y}}case h:return Y}}}var n=P,W=O,ne=s,oe=g,ie=x,ae=T,B=l,ce=M,se=w,F=h,ue=a,k=S,z=_,N=!1;function fe(t){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),e(t)||A(t)===P}function e(t){return A(t)===O}function o(t){return A(t)===s}function d(t){return A(t)===g}function u(t){return typeof t=="object"&&t!==null&&t.$$typeof===x}function i(t){return A(t)===T}function y(t){return A(t)===l}function c(t){return A(t)===M}function f(t){return A(t)===w}function p(t){return A(t)===h}function E(t){return A(t)===a}function v(t){return A(t)===S}function $(t){return A(t)===_}m.AsyncMode=n,m.ConcurrentMode=W,m.ContextConsumer=ne,m.ContextProvider=oe,m.Element=ie,m.ForwardRef=ae,m.Fragment=B,m.Lazy=ce,m.Memo=se,m.Portal=F,m.Profiler=ue,m.StrictMode=k,m.Suspense=z,m.isAsyncMode=fe,m.isConcurrentMode=e,m.isContextConsumer=o,m.isContextProvider=d,m.isElement=u,m.isForwardRef=i,m.isFragment=y,m.isLazy=c,m.isMemo=f,m.isPortal=p,m.isProfiler=E,m.isStrictMode=v,m.isSuspense=$,m.isValidElementType=j,m.typeOf=A}()),m}var ye;function pe(){return ye||(ye=1,function(r){process.env.NODE_ENV==="production"?r.exports=Pe():r.exports=Re()}(J)),J.exports}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var X,ve;function xe(){if(ve)return X;ve=1;var r=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;function l(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function S(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var g={},s=0;s<10;s++)g["_"+String.fromCharCode(s)]=s;var P=Object.getOwnPropertyNames(g).map(function(T){return g[T]});if(P.join("")!=="0123456789")return!1;var O={};return"abcdefghijklmnopqrst".split("").forEach(function(T){O[T]=T}),Object.keys(Object.assign({},O)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return X=S()?Object.assign:function(a,g){for(var s,P=l(a),O,T=1;T<arguments.length;T++){s=Object(arguments[T]);for(var _ in s)x.call(s,_)&&(P[_]=s[_]);if(r){O=r(s);for(var C=0;C<O.length;C++)h.call(s,O[C])&&(P[O[C]]=s[O[C]])}}return P},X}var G,be;function K(){if(be)return G;be=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return G=r,G}var Z,me;function he(){return me||(me=1,Z=Function.call.bind(Object.prototype.hasOwnProperty)),Z}var Q,Te;function Ce(){if(Te)return Q;Te=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var x=K(),h={},l=he();r=function(a){var g="Warning: "+a;typeof console<"u"&&console.error(g);try{throw new Error(g)}catch{}}}function S(a,g,s,P,O){if(process.env.NODE_ENV!=="production"){for(var T in a)if(l(a,T)){var _;try{if(typeof a[T]!="function"){var C=Error((P||"React class")+": "+s+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}_=a[T](g,T,P,s,null,x)}catch(M){_=M}if(_&&!(_ instanceof Error)&&r((P||"React class")+": type specification of "+s+" `"+T+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof _+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),_ instanceof Error&&!(_.message in h)){h[_.message]=!0;var w=O?O():"";r("Failed "+s+" type: "+_.message+(w!=null?w:""))}}}}return S.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(h={})},Q=S,Q}var ee,Ee;function we(){if(Ee)return ee;Ee=1;var r=pe(),x=xe(),h=K(),l=he(),S=Ce(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var P="Warning: "+s;typeof console<"u"&&console.error(P);try{throw new Error(P)}catch{}});function g(){return null}return ee=function(s,P){var O=typeof Symbol=="function"&&Symbol.iterator,T="@@iterator";function _(e){var o=e&&(O&&e[O]||e[T]);if(typeof o=="function")return o}var C="<<anonymous>>",w={array:q("array"),bigint:q("bigint"),bool:q("boolean"),func:q("function"),number:q("number"),object:q("object"),string:q("string"),symbol:q("symbol"),any:U(),arrayOf:j,element:A(),elementType:n(),instanceOf:W,node:ae(),objectOf:oe,oneOf:ne,oneOfType:ie,shape:ce,exact:se};function M(e,o){return e===o?e!==0||1/e===1/o:e!==e&&o!==o}function R(e,o){this.message=e,this.data=o&&typeof o=="object"?o:{},this.stack=""}R.prototype=Error.prototype;function I(e){if(process.env.NODE_ENV!=="production")var o={},d=0;function u(y,c,f,p,E,v,$){if(p=p||C,v=v||f,$!==h){if(P){var t=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 t.name="Invariant Violation",t}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Y=p+":"+f;!o[Y]&&d<3&&(a("You are manually calling a React.PropTypes validation function for the `"+v+"` prop on `"+p+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),o[Y]=!0,d++)}}return c[f]==null?y?c[f]===null?new R("The "+E+" `"+v+"` is marked as required "+("in `"+p+"`, but its value is `null`.")):new R("The "+E+" `"+v+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(c,f,p,E,v)}var i=u.bind(null,!1);return i.isRequired=u.bind(null,!0),i}function q(e){function o(d,u,i,y,c,f){var p=d[u],E=k(p);if(E!==e){var v=z(p);return new R("Invalid "+y+" `"+c+"` of type "+("`"+v+"` supplied to `"+i+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return I(o)}function U(){return I(g)}function j(e){function o(d,u,i,y,c){if(typeof e!="function")return new R("Property `"+c+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var f=d[u];if(!Array.isArray(f)){var p=k(f);return new R("Invalid "+y+" `"+c+"` of type "+("`"+p+"` supplied to `"+i+"`, expected an array."))}for(var E=0;E<f.length;E++){var v=e(f,E,i,y,c+"["+E+"]",h);if(v instanceof Error)return v}return null}return I(o)}function A(){function e(o,d,u,i,y){var c=o[d];if(!s(c)){var f=k(c);return new R("Invalid "+i+" `"+y+"` of type "+("`"+f+"` supplied to `"+u+"`, expected a single ReactElement."))}return null}return I(e)}function n(){function e(o,d,u,i,y){var c=o[d];if(!r.isValidElementType(c)){var f=k(c);return new R("Invalid "+i+" `"+y+"` of type "+("`"+f+"` supplied to `"+u+"`, expected a single ReactElement type."))}return null}return I(e)}function W(e){function o(d,u,i,y,c){if(!(d[u]instanceof e)){var f=e.name||C,p=fe(d[u]);return new R("Invalid "+y+" `"+c+"` of type "+("`"+p+"` supplied to `"+i+"`, expected ")+("instance of `"+f+"`."))}return null}return I(o)}function ne(e){if(!Array.isArray(e))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),g;function o(d,u,i,y,c){for(var f=d[u],p=0;p<e.length;p++)if(M(f,e[p]))return null;var E=JSON.stringify(e,function($,t){var Y=z(t);return Y==="symbol"?String(t):t});return new R("Invalid "+y+" `"+c+"` of value `"+String(f)+"` "+("supplied to `"+i+"`, expected one of "+E+"."))}return I(o)}function oe(e){function o(d,u,i,y,c){if(typeof e!="function")return new R("Property `"+c+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var f=d[u],p=k(f);if(p!=="object")return new R("Invalid "+y+" `"+c+"` of type "+("`"+p+"` supplied to `"+i+"`, expected an object."));for(var E in f)if(l(f,E)){var v=e(f,E,i,y,c+"."+E,h);if(v instanceof Error)return v}return null}return I(o)}function ie(e){if(!Array.isArray(e))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),g;for(var o=0;o<e.length;o++){var d=e[o];if(typeof d!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+N(d)+" at index "+o+"."),g}function u(i,y,c,f,p){for(var E=[],v=0;v<e.length;v++){var $=e[v],t=$(i,y,c,f,p,h);if(t==null)return null;t.data&&l(t.data,"expectedType")&&E.push(t.data.expectedType)}var Y=E.length>0?", expected one of type ["+E.join(", ")+"]":"";return new R("Invalid "+f+" `"+p+"` supplied to "+("`"+c+"`"+Y+"."))}return I(u)}function ae(){function e(o,d,u,i,y){return F(o[d])?null:new R("Invalid "+i+" `"+y+"` supplied to "+("`"+u+"`, expected a ReactNode."))}return I(e)}function B(e,o,d,u,i){return new R((e||"React class")+": "+o+" type `"+d+"."+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function ce(e){function o(d,u,i,y,c){var f=d[u],p=k(f);if(p!=="object")return new R("Invalid "+y+" `"+c+"` of type `"+p+"` "+("supplied to `"+i+"`, expected `object`."));for(var E in e){var v=e[E];if(typeof v!="function")return B(i,y,c,E,z(v));var $=v(f,E,i,y,c+"."+E,h);if($)return $}return null}return I(o)}function se(e){function o(d,u,i,y,c){var f=d[u],p=k(f);if(p!=="object")return new R("Invalid "+y+" `"+c+"` of type `"+p+"` "+("supplied to `"+i+"`, expected `object`."));var E=x({},d[u],e);for(var v in E){var $=e[v];if(l(e,v)&&typeof $!="function")return B(i,y,c,v,z($));if(!$)return new R("Invalid "+y+" `"+c+"` key `"+v+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(d[u],null," ")+`
Valid keys: `+JSON.stringify(Object.keys(e),null," "));var t=$(f,v,i,y,c+"."+v,h);if(t)return t}return null}return I(o)}function F(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(F);if(e===null||s(e))return!0;var o=_(e);if(o){var d=o.call(e),u;if(o!==e.entries){for(;!(u=d.next()).done;)if(!F(u.value))return!1}else for(;!(u=d.next()).done;){var i=u.value;if(i&&!F(i[1]))return!1}}else return!1;return!0;default:return!1}}function ue(e,o){return e==="symbol"?!0:o?o["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&o instanceof Symbol:!1}function k(e){var o=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":ue(o,e)?"symbol":o}function z(e){if(typeof e>"u"||e===null)return""+e;var o=k(e);if(o==="object"){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return o}function N(e){var o=z(e);switch(o){case"array":case"object":return"an "+o;case"boolean":case"date":case"regexp":return"a "+o;default:return o}}function fe(e){return!e.constructor||!e.constructor.name?C:e.constructor.name}return w.checkPropTypes=S,w.resetWarningCache=S.resetWarningCache,w.PropTypes=w,w},ee}var re,ge;function Ae(){if(ge)return re;ge=1;var r=K();function x(){}function h(){}return h.resetWarningCache=x,re=function(){function l(g,s,P,O,T,_){if(_!==r){var C=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 C.name="Invariant Violation",C}}l.isRequired=l;function S(){return l}var a={array:l,bigint:l,bool:l,func:l,number:l,object:l,string:l,symbol:l,any:l,arrayOf:S,element:l,elementType:l,instanceOf:S,node:l,objectOf:S,oneOf:S,oneOfType:S,shape:S,exact:S,checkPropTypes:h,resetWarningCache:x};return a.PropTypes=a,a},re}if(process.env.NODE_ENV!=="production"){var je=pe(),Ie=!0;V.exports=we()(je.isElement,Ie)}else V.exports=Ae()();const te=Oe.default.div.attrs(({centerChildren:r,centerText:x,maxWidth:h,theme:l,style:S})=>{var g;return{"data-bedrock-center":[x&&"center-text",r&&"center-children"].filter(s=>s).join(" "),style:{...S,"--maxWidth":typeof h=="number"&&h>0?`${h}px`:(g=L.getSizeValue(l,h))!=null?g:h}}})`
@property --maxWidth {

@@ -18,7 +37,7 @@ syntax: "<length-percentage>";

${e=>e.centerChildren&&`display: flex;
${r=>r.centerChildren&&`display: flex;
flex-direction: column;
align-items: center;`}
${e=>e.centerText&&"text-align: center;"}
`;i.displayName="Center";function x({maxWidth:e},t){if(e===void 0)return;typeof e=="number"||o.checkIsCSSLength(e)||Object.keys(o.sizes).includes(e)||console.error(`${t} needs to be an number, CSSLength or SizesOptions`)}i.propTypes={maxWidth:x,centerText:l.bool,centerChildren:l.bool},r.Center=i,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
${r=>r.centerText&&"text-align: center;"}
`;te.displayName="Center";function $e({maxWidth:r},x){if(r===void 0)return;typeof r=="number"||L.checkIsCSSLength(r)||Object.keys(L.sizes).includes(r)||console.error(`${x} needs to be an number, CSSLength or SizesOptions`)}te.propTypes={maxWidth:$e,centerText:V.exports.bool,centerChildren:V.exports.bool},D.Center=te,Object.defineProperties(D,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});

4

package.json
{
"name": "@bedrock-layout/center",
"version": "2.6.5",
"version": "2.7.0",
"description": "bedrock-layout center",

@@ -62,3 +62,3 @@ "sideEffects": false,

},
"gitHead": "169c2982e99695e8a48c20544ca8865de6eb4044"
"gitHead": "d95251245ab591d6e11485a9782fbdb515ff0556"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc