@stackshift-ui/text 7.0.0-beta.3 → 7.0.0-beta.4

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/text",
3
3
  "description": "",
4
- "version": "7.0.0-beta.3",
4
+ "version": "7.0.0-beta.4",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -34,15 +34,15 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "classnames": "^2.5.1",
37
- "@stackshift-ui/system": "6.1.0-beta.3",
38
- "@stackshift-ui/scripts": "6.1.0-beta.2"
37
+ "@stackshift-ui/system": "7.0.0-beta.4",
38
+ "@stackshift-ui/scripts": "7.0.0-beta.3"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@types/react": "16.8 - 19",
42
42
  "next": "10 - 14",
43
43
  "react": "16.8 - 19",
44
44
  "react-dom": "16.8 - 19",
45
- "@stackshift-ui/system": ">=6.1.0-beta.3"
45
+ "@stackshift-ui/system": ">=7.0.0-beta.4"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "next": {
@@ -1,55 +0,0 @@
1
- // src/text.tsx
2
- import { DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
3
- import cn from "classnames";
4
- import { jsx } from "react/jsx-runtime";
5
- var displayName = "Text";
6
- var Text = ({
7
- type = "p",
8
- style,
9
- muted = false,
10
- weight = "normal",
11
- fontSize = "base",
12
- children,
13
- className,
14
- as = "p",
15
- ...props
16
- }) => {
17
- var _a;
18
- const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
19
- const fontSizeMap = {
20
- xs: "text-xs",
21
- sm: "text-sm",
22
- base: "text-base",
23
- lg: "text-lg",
24
- xl: "text-xl",
25
- "2xl": "text-2xl",
26
- "3xl": "text-3xl",
27
- "4xl": "text-4xl",
28
- "5xl": "text-5xl",
29
- "6xl": "text-6xl"
30
- };
31
- const fontWeightMap = {
32
- thin: "font-thin",
33
- extralight: "font-extralight",
34
- light: "font-light",
35
- normal: "font-normal",
36
- semibold: "font-semibold",
37
- bold: "font-bold",
38
- medium: "font-medium",
39
- extrabold: "font-extrabold",
40
- black: "font-black"
41
- };
42
- const size = fontSizeMap[fontSize] || "text-base";
43
- const fontWeight = fontWeightMap[weight] || "font-normal";
44
- const commonClass = `${size} ${fontWeight} ${muted && "text-gray-500"}`;
45
- const variants = {
46
- p: commonClass
47
- };
48
- const variantClass = (_a = variants[type]) != null ? _a : variants.p;
49
- return /* @__PURE__ */ jsx(Component, { as, className: cn(variantClass, className), style, ...props, children });
50
- };
51
- Text.displayName = displayName;
52
-
53
- export {
54
- Text
55
- };
@@ -1 +0,0 @@
1
- import{DefaultComponent as h,useStackShiftUIComponents as T}from"@stackshift-ui/system";import C from"classnames";import{jsx as u}from"react/jsx-runtime";var o="Text",S=({type:n="p",style:l,muted:a=!1,weight:s="normal",fontSize:x="base",children:i,className:m,as:r="p",...p})=>{var e;let{[o]:c=h}=T(),f={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl"},d={thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",semibold:"font-semibold",bold:"font-bold",medium:"font-medium",extrabold:"font-extrabold",black:"font-black"},g=f[x]||"text-base",b=d[s]||"font-normal",t={p:`${g} ${b} ${a&&"text-gray-500"}`},y=(e=t[n])!=null?e:t.p;return u(c,{as:r,className:C(y,m),style:l,...p,children:i})};S.displayName=o;export{S as a};
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./text";
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";var k=Object.create;var a=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var W=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},r=(t,e,o,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of M(e))!R.call(t,n)&&n!==o&&a(t,n,{get:()=>e[n],enumerable:!(l=z(e,n))||l.enumerable});return t};var E=(t,e,o)=>(o=t!=null?k(P(t)):{},r(e||!t||!t.__esModule?a(o,"default",{value:t,enumerable:!0}):o,t)),H=t=>r(a({},"__esModule",{value:!0}),t);var L={};W(L,{Text:()=>c});module.exports=H(L);var s=require("@stackshift-ui/system"),m=E(require("classnames")),f=require("react/jsx-runtime"),p="Text",c=({type:t="p",style:e,muted:o=!1,weight:l="normal",fontSize:n="base",children:d,className:g,as:b="p",...y})=>{var i;let{[p]:h=s.DefaultComponent}=(0,s.useStackShiftUIComponents)(),T={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl"},C={thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",semibold:"font-semibold",bold:"font-bold",medium:"font-medium",extrabold:"font-extrabold",black:"font-black"},S=T[n]||"text-base",u=C[l]||"font-normal",x={p:`${S} ${u} ${o&&"text-gray-500"}`},N=(i=x[t])!=null?i:x.p;return(0,f.jsx)(h,{as:b,className:(0,m.default)(N,g),style:e,...y,children:d})};c.displayName=p;0&&(module.exports={Text});
package/dist/index.mjs DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";import{a as e}from"./chunk-QGOU63LY.mjs";export{e as Text};
package/dist/text.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import type { ElementType, HTMLProps, ReactNode } from "react";
2
- type fontSize = "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
3
- type Weight = "thin" | "extralight" | "light" | "normal" | "semibold" | "bold" | "medium" | "extrabold" | "black";
4
- export interface TextProps extends Omit<HTMLProps<HTMLElement>, "as"> {
5
- type?: string;
6
- style?: React.CSSProperties;
7
- muted?: boolean;
8
- weight?: Weight;
9
- fontSize?: fontSize;
10
- [key: string]: any;
11
- children?: ReactNode;
12
- className?: string;
13
- as?: ElementType;
14
- }
15
- export declare const Text: React.FC<TextProps>;
16
- export {};
package/dist/text.js DELETED
@@ -1 +0,0 @@
1
- "use strict";var k=Object.create;var a=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var W=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},m=(t,e,o,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of M(e))!R.call(t,n)&&n!==o&&a(t,n,{get:()=>e[n],enumerable:!(l=z(e,n))||l.enumerable});return t};var E=(t,e,o)=>(o=t!=null?k(P(t)):{},m(e||!t||!t.__esModule?a(o,"default",{value:t,enumerable:!0}):o,t)),H=t=>m(a({},"__esModule",{value:!0}),t);var L={};W(L,{Text:()=>c});module.exports=H(L);var s=require("@stackshift-ui/system"),r=E(require("classnames")),f=require("react/jsx-runtime"),p="Text",c=({type:t="p",style:e,muted:o=!1,weight:l="normal",fontSize:n="base",children:d,className:g,as:b="p",...y})=>{var i;let{[p]:h=s.DefaultComponent}=(0,s.useStackShiftUIComponents)(),T={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl"},C={thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",semibold:"font-semibold",bold:"font-bold",medium:"font-medium",extrabold:"font-extrabold",black:"font-black"},S=T[n]||"text-base",u=C[l]||"font-normal",x={p:`${S} ${u} ${o&&"text-gray-500"}`},N=(i=x[t])!=null?i:x.p;return(0,f.jsx)(h,{as:b,className:(0,r.default)(N,g),style:e,...y,children:d})};c.displayName=p;0&&(module.exports={Text});
package/dist/text.mjs DELETED
@@ -1 +0,0 @@
1
- import{a}from"./chunk-QGOU63LY.mjs";export{a as Text};