@stackshift-ui/flex 7.0.0-beta.4 → 7.0.0-beta.6

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.
@@ -0,0 +1 @@
1
+ import{DefaultComponent as j,useStackShiftUIComponents as v}from"@stackshift-ui/system";import b from"classnames";import{jsx as h}from"react/jsx-runtime";var t="Flex",g=({children:s,className:r,align:n="start",direction:o="row",justify:a="start",wrap:i=!1,gap:e,as:l="div",...c})=>{let{[t]:f=j}=v(),m={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},y={start:"items-start",end:"items-end",baseline:"items-baseline",stretch:"items-stretch",center:"items-center"},p={normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},d=m[o],u=y[n],w=p[a],x=`flex ${d} ${u} ${w} ${i?"flex-wrap":""} gap-${e||0}`;return h(f,{as:l,className:b(x,r),...c,children:s})};g.displayName=t;export{g as a};
package/dist/flex.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ import type { ElementType, HTMLProps, ReactNode } from "react";
2
+ type Justify = "normal" | "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch";
3
+ type Direction = "row" | "row-reverse" | "col" | "col-reverse";
4
+ type Align = "start" | "end" | "baseline" | "stretch" | "center";
5
+ export interface FlexProps extends Omit<HTMLProps<HTMLElement>, "as" | "wrap"> {
6
+ children?: ReactNode;
7
+ className?: string;
8
+ align?: Align;
9
+ direction?: Direction;
10
+ justify?: Justify;
11
+ wrap?: boolean;
12
+ gap?: number;
13
+ as?: ElementType;
14
+ [key: string]: any;
15
+ }
16
+ export declare const Flex: React.FC<FlexProps>;
17
+ export {};
package/dist/flex.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var N=Object.create;var o=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var D=(e,t)=>{for(var s in t)o(e,s,{get:t[s],enumerable:!0})},l=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of T(t))!P.call(e,r)&&r!==s&&o(e,r,{get:()=>t[r],enumerable:!(n=F(t,r))||n.enumerable});return e};var E=(e,t,s)=>(s=e!=null?N($(e)):{},l(t||!e||!e.__esModule?o(s,"default",{value:e,enumerable:!0}):s,e)),H=e=>l(o({},"__esModule",{value:!0}),e);var L={};D(L,{Flex:()=>m});module.exports=H(L);var a=require("@stackshift-ui/system"),c=E(require("classnames")),y=require("react/jsx-runtime"),f="Flex",m=({children:e,className:t,align:s="start",direction:n="row",justify:r="start",wrap:p=!1,gap:i,as:d="div",...u})=>{let{[f]:w=a.DefaultComponent}=(0,a.useStackShiftUIComponents)(),x={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},j={start:"items-start",end:"items-end",baseline:"items-baseline",stretch:"items-stretch",center:"items-center"},v={normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},b=x[n],g=j[s],h=v[r],C=`flex ${b} ${g} ${h} ${p?"flex-wrap":""} gap-${i||0}`;return(0,y.jsx)(w,{as:d,className:(0,c.default)(C,t),...u,children:e})};m.displayName=f;0&&(module.exports={Flex});
package/dist/flex.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-7ZSNH2V2.mjs";export{a as Flex};
@@ -0,0 +1 @@
1
+ export * from "./flex";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";var N=Object.create;var o=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var D=(e,t)=>{for(var s in t)o(e,s,{get:t[s],enumerable:!0})},l=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of T(t))!P.call(e,r)&&r!==s&&o(e,r,{get:()=>t[r],enumerable:!(n=F(t,r))||n.enumerable});return e};var E=(e,t,s)=>(s=e!=null?N($(e)):{},l(t||!e||!e.__esModule?o(s,"default",{value:e,enumerable:!0}):s,e)),H=e=>l(o({},"__esModule",{value:!0}),e);var L={};D(L,{Flex:()=>m});module.exports=H(L);var a=require("@stackshift-ui/system"),c=E(require("classnames")),p=require("react/jsx-runtime"),f="Flex",m=({children:e,className:t,align:s="start",direction:n="row",justify:r="start",wrap:y=!1,gap:i,as:u="div",...d})=>{let{[f]:w=a.DefaultComponent}=(0,a.useStackShiftUIComponents)(),x={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},j={start:"items-start",end:"items-end",baseline:"items-baseline",stretch:"items-stretch",center:"items-center"},v={normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},b=x[n],g=j[s],h=v[r],C=`flex ${b} ${g} ${h} ${y?"flex-wrap":""} gap-${i||0}`;return(0,p.jsx)(w,{as:u,className:(0,c.default)(C,t),...d,children:e})};m.displayName=f;0&&(module.exports={Flex});
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";import{a as e}from"./chunk-7ZSNH2V2.mjs";export{e as Flex};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/flex",
3
3
  "description": "",
4
- "version": "7.0.0-beta.4",
4
+ "version": "7.0.0-beta.6",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "classnames": "^2.5.1",
37
- "@stackshift-ui/scripts": "7.0.0-beta.3",
38
- "@stackshift-ui/system": "7.0.0-beta.4"
37
+ "@stackshift-ui/scripts": "7.0.0-beta.5",
38
+ "@stackshift-ui/system": "7.0.0-beta.6"
39
39
  },
40
40
  "peerDependencies": {
41
- "@stackshift-ui/system": ">=7.0.0-beta.4",
41
+ "@stackshift-ui/system": ">=7.0.0-beta.6",
42
42
  "@types/react": "16.8 - 19",
43
43
  "next": "10 - 14",
44
44
  "react": "16.8 - 19",