@mich8060/unified-design-system 0.2.30 → 0.2.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),d=require("react");;/* empty css */const h=new Set(["0","2","4","6","8","10","12","14","16","18","24","32","48","64","80"]);function b(e){return e===!0?"wrap":e===!1||e==null?"nowrap":e}function a(e){return e.replace(/\s+/g,"-")}function G(e){var r;if(e==null)return;const n=String(e).trim();if(n==="auto")return;const l=((r=n.match(/^spacing-(\d+)$/))==null?void 0:r[1])??n;return h.has(l)?`var(--uds-spacing-${l})`:e}const R=d.forwardRef(function({as:n="div",direction:l="row",justifyContent:r,alignItems:o,wrap:s=!1,gap:t,fullWidth:f=!1,span:p=!1,inline:m=!1,className:w,style:u,children:F,...S},g){const j=b(s),v=String(t).trim()==="auto",$=["uds-flex",`uds-flex--direction-${l}`,r&&`uds-flex--justify-${a(r)}`,o&&`uds-flex--align-${a(o)}`,`uds-flex--wrap-${a(j)}`,m&&"uds-flex--inline",f&&"uds-flex--full-width",p&&"uds-flex--span",v&&"uds-flex--gap-auto",w].filter(Boolean).join(" "),i={};return t!=null&&(u==null?void 0:u.gap)==null&&(i.gap=G(t)),f&&(u==null?void 0:u.width)==null&&(i.width="100%"),c.jsx(n,{ref:g,className:$,style:{...i,...u},...S,children:F})}),_=d.forwardRef(function({as:n="div",className:l,children:r,...o},s){const t=["uds-flex__full",l].filter(Boolean).join(" ");return c.jsx(n,{ref:s,className:t,...o,children:r})}),x=R;x.Full=_;exports.Flex=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),p=require("react");;/* empty css */const z=new Set(["0","2","4","6","8","10","12","14","16","18","24","32","48","64","80"]);function N(e){return e===!0?"wrap":e===!1||e==null?"nowrap":e}function a(e){return e.replace(/\s+/g,"-")}function T(e,n){if(e)return"flex-start";if(n)return"flex-end"}function E(e,n){if(e)return"flex-start";if(n)return"flex-end"}function K(e){var l;if(e==null)return;const n=String(e).trim();if(n==="auto")return;const t=((l=n.match(/^spacing-(\d+)$/))==null?void 0:l[1])??n;return z.has(t)?`var(--uds-spacing-${t})`:e}const L=p.forwardRef(function({as:n="div",direction:t="row",justifyContent:l,alignItems:o,top:s=!1,bottom:u=!1,left:F=!1,right:S=!1,wrap:h=!1,gap:i,fullWidth:c=!1,span:j=!1,inline:A=!1,className:$,style:r,children:R,...b},B){const G=N(h),_=String(i).trim()==="auto",d=T(s,u),x=E(F,S),m=l??(t==="row"?x:d),v=o??(t==="row"?d:x),q=["uds-flex",`uds-flex--direction-${t}`,m&&`uds-flex--justify-${a(m)}`,v&&`uds-flex--align-${a(v)}`,`uds-flex--wrap-${a(G)}`,A&&"uds-flex--inline",c&&"uds-flex--full-width",j&&"uds-flex--span",_&&"uds-flex--gap-auto",$].filter(Boolean).join(" "),f={};return i!=null&&(r==null?void 0:r.gap)==null&&(f.gap=K(i)),c&&(r==null?void 0:r.width)==null&&(f.width="100%"),g.jsx(n,{ref:B,className:q,style:{...f,...r},...b,children:R})}),O=p.forwardRef(function({as:n="div",className:t,children:l,...o},s){const u=["uds-flex__full",t].filter(Boolean).join(" ");return g.jsx(n,{ref:s,className:u,...o,children:l})}),w=L;w.Full=O;exports.Flex=w;
@@ -1 +1 @@
1
- import{jsx as c}from"react/jsx-runtime";import d from"react";/* empty css */const g=new Set(["0","2","4","6","8","10","12","14","16","18","24","32","48","64","80"]);function G(n){return n===!0?"wrap":n===!1||n==null?"nowrap":n}function i(n){return n.replace(/\s+/g,"-")}function _(n){var r;if(n==null)return;const e=String(n).trim();if(e==="auto")return;const o=((r=e.match(/^spacing-(\d+)$/))==null?void 0:r[1])??e;return g.has(o)?`var(--uds-spacing-${o})`:n}const j=d.forwardRef(function({as:e="div",direction:o="row",justifyContent:r,alignItems:a,wrap:t=!1,gap:u,fullWidth:s=!1,span:x=!1,inline:p=!1,className:m,style:l,children:w,...F},S){const $=G(t),h=String(u).trim()==="auto",v=["uds-flex",`uds-flex--direction-${o}`,r&&`uds-flex--justify-${i(r)}`,a&&`uds-flex--align-${i(a)}`,`uds-flex--wrap-${i($)}`,p&&"uds-flex--inline",s&&"uds-flex--full-width",x&&"uds-flex--span",h&&"uds-flex--gap-auto",m].filter(Boolean).join(" "),f={};return u!=null&&(l==null?void 0:l.gap)==null&&(f.gap=_(u)),s&&(l==null?void 0:l.width)==null&&(f.width="100%"),c(e,{ref:S,className:v,style:{...f,...l},...F,children:w})}),A=d.forwardRef(function({as:e="div",className:o,children:r,...a},t){const u=["uds-flex__full",o].filter(Boolean).join(" ");return c(e,{ref:t,className:u,...a,children:r})}),B=j;B.Full=A;export{B as Flex};
1
+ import{jsx as v}from"react/jsx-runtime";import w from"react";/* empty css */const N=new Set(["0","2","4","6","8","10","12","14","16","18","24","32","48","64","80"]);function b(e){return e===!0?"wrap":e===!1||e==null?"nowrap":e}function a(e){return e.replace(/\s+/g,"-")}function E(e,n){if(e)return"flex-start";if(n)return"flex-end"}function K(e,n){if(e)return"flex-start";if(n)return"flex-end"}function L(e){var o;if(e==null)return;const n=String(e).trim();if(n==="auto")return;const t=((o=n.match(/^spacing-(\d+)$/))==null?void 0:o[1])??n;return N.has(t)?`var(--uds-spacing-${t})`:e}const T=w.forwardRef(function({as:n="div",direction:t="row",justifyContent:o,alignItems:l,top:f=!1,bottom:s=!1,left:g=!1,right:F=!1,wrap:h=!1,gap:u,fullWidth:c=!1,span:A=!1,inline:S=!1,className:$,style:r,children:j,...B},G){const R=b(h),_=String(u).trim()==="auto",d=E(f,s),x=K(g,F),m=o??(t==="row"?x:d),p=l??(t==="row"?d:x),z=["uds-flex",`uds-flex--direction-${t}`,m&&`uds-flex--justify-${a(m)}`,p&&`uds-flex--align-${a(p)}`,`uds-flex--wrap-${a(R)}`,S&&"uds-flex--inline",c&&"uds-flex--full-width",A&&"uds-flex--span",_&&"uds-flex--gap-auto",$].filter(Boolean).join(" "),i={};return u!=null&&(r==null?void 0:r.gap)==null&&(i.gap=L(u)),c&&(r==null?void 0:r.width)==null&&(i.width="100%"),v(n,{ref:G,className:z,style:{...i,...r},...B,children:j})}),V=w.forwardRef(function({as:n="div",className:t,children:o,...l},f){const s=["uds-flex__full",t].filter(Boolean).join(" ");return v(n,{ref:f,className:s,...l,children:o})}),k=T;k.Full=V;export{k as Flex};
@@ -11,6 +11,10 @@ export interface FlexProps extends React.HTMLAttributes<HTMLElement> {
11
11
  direction?: FlexDirection;
12
12
  justifyContent?: FlexJustifyContent;
13
13
  alignItems?: FlexAlignItems;
14
+ top?: boolean;
15
+ bottom?: boolean;
16
+ left?: boolean;
17
+ right?: boolean;
14
18
  wrap?: boolean | FlexWrap;
15
19
  gap?: FlexGapToken | FlexGapTokenName | FlexGapSpecial | number | string;
16
20
  fullWidth?: boolean;