@plyaz/ui 0.1.5 → 0.1.7
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/dist/types/components/Box/Box.stories.d.ts +1 -0
- package/dist/types/components/Container/Container.d.ts +1 -1
- package/dist/types/components/Container/Container.stories.d.ts +1 -0
- package/dist/types/components/ExternalLink/ExternalLink.d.ts +8 -0
- package/dist/types/components/ExternalLink/ExternalLink.stories.d.ts +8 -0
- package/dist/types/components/Flex/Flex.stories.d.ts +1 -0
- package/dist/types/components/Grid/Grid.stories.d.ts +1 -0
- package/dist/types/components/Heading/Heading.d.ts +2 -1
- package/dist/types/components/Heading/Heading.stories.d.ts +1 -0
- package/dist/types/components/Paragraph/Paragraph.stories.d.ts +1 -0
- package/dist/types/components/Section/Section.stories.d.ts +1 -0
- package/dist/types/components/Stack/Stack.stories.d.ts +1 -0
- package/dist/types/components/Text/Text.d.ts +10 -10
- package/dist/types/components/Text/Text.stories.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +18 -16
- package/dist/ui11.cjs +1 -1
- package/dist/ui11.js +12 -9
- package/dist/ui2.cjs +1 -1
- package/dist/ui2.js +4 -4
- package/dist/ui7.cjs +1 -1
- package/dist/ui7.js +12 -6
- package/package.json +2 -1
- package/dist/types/components/Link/Link.d.ts +0 -8
- package/dist/types/components/Link/Link.stories.d.ts +0 -7
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { ElementType } from '../../types/type';
|
|
3
3
|
interface ContainerProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
className?: string;
|
|
5
|
-
children
|
|
5
|
+
children: React.ReactNode;
|
|
6
6
|
element?: ElementType;
|
|
7
7
|
}
|
|
8
8
|
export declare const Container: ({ className, children, element, ...props }: ContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ExternalLinkProps extends React.HTMLAttributes<HTMLAnchorElement> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
href: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ExternalLink: ({ children, className, href, ...props }: ExternalLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExternalLink } from './ExternalLink';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: Meta<typeof ExternalLink>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ExternalLink>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const CustomClass: Story;
|
|
8
|
+
export declare const UserInteraction: Story;
|
|
@@ -9,10 +9,11 @@ declare const SIZE_MAP: {
|
|
|
9
9
|
readonly "3xl": "3xl";
|
|
10
10
|
readonly "4xl": "4xl";
|
|
11
11
|
};
|
|
12
|
+
export type HeadingType = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
12
13
|
interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
13
14
|
children: React.ReactNode;
|
|
14
15
|
className?: string;
|
|
15
|
-
element:
|
|
16
|
+
element: HeadingType;
|
|
16
17
|
size: keyof typeof SIZE_MAP;
|
|
17
18
|
}
|
|
18
19
|
export declare const Heading: ({ children, element, className, size, ...props }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
declare const VARIANT_MAPPER: {
|
|
2
|
+
export declare const VARIANT_MAPPER: {
|
|
3
3
|
body: string;
|
|
4
4
|
heading: string;
|
|
5
5
|
caption: string;
|
|
@@ -15,16 +15,16 @@ declare const SIZES_MAPPER: {
|
|
|
15
15
|
"4xl": string;
|
|
16
16
|
"5xl": string;
|
|
17
17
|
"6xl": string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
"7xl": string;
|
|
19
|
+
"8xl": string;
|
|
20
|
+
"9xl": string;
|
|
21
21
|
};
|
|
22
|
-
declare const TEXT_WEIGHT_MAPPER: {
|
|
23
|
-
normal:
|
|
24
|
-
medium:
|
|
25
|
-
semibold:
|
|
26
|
-
bold:
|
|
27
|
-
light:
|
|
22
|
+
export declare const TEXT_WEIGHT_MAPPER: {
|
|
23
|
+
readonly normal: "font-normal";
|
|
24
|
+
readonly medium: "font-medium";
|
|
25
|
+
readonly semibold: "font-semibold";
|
|
26
|
+
readonly bold: "font-bold";
|
|
27
|
+
readonly light: "font-light";
|
|
28
28
|
};
|
|
29
29
|
type TextElement = "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
30
30
|
interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
@@ -3,7 +3,7 @@ export * from './Container/Container';
|
|
|
3
3
|
export * from './Flex/Flex';
|
|
4
4
|
export * from './Grid/Grid';
|
|
5
5
|
export * from './Heading/Heading';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './ExternalLink/ExternalLink';
|
|
7
7
|
export * from './Paragraph/Paragraph';
|
|
8
8
|
export * from './Section/Section';
|
|
9
9
|
export * from './Stack/Stack';
|
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./ui2.cjs"),n=require("./ui3.cjs"),i=require("./ui4.cjs"),e=require("./ui5.cjs"),a=require("./ui6.cjs"),o=require("./ui7.cjs"),P=require("./ui8.cjs"),c=require("./ui9.cjs"),A=require("./ui10.cjs"),r=require("./ui11.cjs");exports.Box=t.Box;exports.Container=n.Container;exports.Flex=i.Flex;exports.ALIGN_MAPPER=e.ALIGN_MAPPER;exports.Grid=e.Grid;exports.JUASTIFY_MAPPER=e.JUASTIFY_MAPPER;exports.Heading=a.Heading;exports.ExternalLink=o.ExternalLink;exports.Paragraph=P.Paragraph;exports.Section=c.Section;exports.Stack=A.Stack;exports.TEXT_WEIGHT_MAPPER=r.TEXT_WEIGHT_MAPPER;exports.Text=r.Text;exports.VARIANT_MAPPER=r.VARIANT_MAPPER;
|
package/dist/ui.js
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { Box as e } from "./ui2.js";
|
|
2
2
|
import { Container as x } from "./ui3.js";
|
|
3
3
|
import { Flex as f } from "./ui4.js";
|
|
4
|
-
import { ALIGN_MAPPER as
|
|
5
|
-
import { Heading as
|
|
6
|
-
import {
|
|
7
|
-
import { Paragraph as
|
|
8
|
-
import { Section as
|
|
9
|
-
import { Stack as
|
|
10
|
-
import { Text as
|
|
4
|
+
import { ALIGN_MAPPER as P, Grid as A, JUASTIFY_MAPPER as a } from "./ui5.js";
|
|
5
|
+
import { Heading as n } from "./ui6.js";
|
|
6
|
+
import { ExternalLink as i } from "./ui7.js";
|
|
7
|
+
import { Paragraph as _ } from "./ui8.js";
|
|
8
|
+
import { Section as M } from "./ui9.js";
|
|
9
|
+
import { Stack as S } from "./ui10.js";
|
|
10
|
+
import { TEXT_WEIGHT_MAPPER as d, Text as g, VARIANT_MAPPER as k } from "./ui11.js";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
P as ALIGN_MAPPER,
|
|
13
13
|
e as Box,
|
|
14
14
|
x as Container,
|
|
15
|
+
i as ExternalLink,
|
|
15
16
|
f as Flex,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
A as Grid,
|
|
18
|
+
n as Heading,
|
|
19
|
+
a as JUASTIFY_MAPPER,
|
|
20
|
+
_ as Paragraph,
|
|
21
|
+
M as Section,
|
|
22
|
+
S as Stack,
|
|
23
|
+
d as TEXT_WEIGHT_MAPPER,
|
|
24
|
+
g as Text,
|
|
25
|
+
k as VARIANT_MAPPER
|
|
24
26
|
};
|
package/dist/ui11.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./ui12.cjs");require("react");const c=require("./ui13.cjs"),l={body:"font-sans",heading:"font-sans",caption:"font-sans"},d={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","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},s={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",light:"font-light"},E=({className:n,children:o,element:a,weight:t,variant:e,size:x,...m})=>{const r=a;return i.jsxRuntimeExports.jsx(r,{className:c.clsx("font-normal text-base font-sans",x&&d[x],t&&s[t],e&&l[e],n),"data-testid":"text",...m,children:o})};exports.TEXT_WEIGHT_MAPPER=s;exports.Text=E;exports.VARIANT_MAPPER=l;
|
package/dist/ui11.js
CHANGED
|
@@ -5,7 +5,7 @@ const r = {
|
|
|
5
5
|
body: "font-sans",
|
|
6
6
|
heading: "font-sans",
|
|
7
7
|
caption: "font-sans"
|
|
8
|
-
},
|
|
8
|
+
}, d = {
|
|
9
9
|
xs: "text-xs",
|
|
10
10
|
sm: "text-sm",
|
|
11
11
|
base: "text-base",
|
|
@@ -19,7 +19,7 @@ const r = {
|
|
|
19
19
|
"7xl": "text-7xl",
|
|
20
20
|
"8xl": "text-8xl",
|
|
21
21
|
"9xl": "text-9xl"
|
|
22
|
-
},
|
|
22
|
+
}, i = {
|
|
23
23
|
normal: "font-normal",
|
|
24
24
|
medium: "font-medium",
|
|
25
25
|
semibold: "font-semibold",
|
|
@@ -27,29 +27,32 @@ const r = {
|
|
|
27
27
|
light: "font-light"
|
|
28
28
|
}, p = ({
|
|
29
29
|
className: o,
|
|
30
|
-
children:
|
|
31
|
-
element:
|
|
30
|
+
children: e,
|
|
31
|
+
element: s,
|
|
32
32
|
weight: t,
|
|
33
33
|
variant: x,
|
|
34
34
|
size: l,
|
|
35
35
|
...n
|
|
36
36
|
}) => {
|
|
37
|
-
const m =
|
|
37
|
+
const m = s;
|
|
38
38
|
return /* @__PURE__ */ a.jsx(
|
|
39
39
|
m,
|
|
40
40
|
{
|
|
41
41
|
className: f(
|
|
42
42
|
"font-normal text-base font-sans",
|
|
43
|
-
l &&
|
|
44
|
-
t &&
|
|
43
|
+
l && d[l],
|
|
44
|
+
t && i[t],
|
|
45
45
|
x && r[x],
|
|
46
46
|
o
|
|
47
47
|
),
|
|
48
|
+
"data-testid": "text",
|
|
48
49
|
...n,
|
|
49
|
-
children:
|
|
50
|
+
children: e
|
|
50
51
|
}
|
|
51
52
|
);
|
|
52
53
|
};
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
i as TEXT_WEIGHT_MAPPER,
|
|
56
|
+
p as Text,
|
|
57
|
+
r as VARIANT_MAPPER
|
|
55
58
|
};
|
package/dist/ui2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./ui12.cjs");require("react");const n=({children:e,element:t="div",className:o="",...r})=>{const s=t;return i.jsxRuntimeExports.jsx(s,{className:o,...r,"data-testid":"box",children:e})};exports.Box=n;
|
package/dist/ui2.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as x } from "./ui12.js";
|
|
2
2
|
import "react";
|
|
3
|
-
const
|
|
3
|
+
const n = ({
|
|
4
4
|
children: t,
|
|
5
5
|
element: o = "div",
|
|
6
6
|
className: r = "",
|
|
7
7
|
...s
|
|
8
8
|
}) => {
|
|
9
9
|
const e = o;
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ x.jsx(e, { className: r, ...s, "data-testid": "box", children: t });
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
n as Box
|
|
14
14
|
};
|
package/dist/ui7.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./ui12.cjs");require("react");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./ui12.cjs");require("react");const l=require("./ui13.cjs"),s=({children:e,className:t,href:r,...n})=>i.jsxRuntimeExports.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer","data-testid":"link",className:l.clsx("text-blue-600 hover:underline visited:text-purple-600 active:text-blue-900 focus:outline-none ",t),...n,children:e});exports.ExternalLink=s;
|
package/dist/ui7.js
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as o } from "./ui12.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { clsx as i } from "./ui13.js";
|
|
4
|
-
const
|
|
4
|
+
const x = ({
|
|
5
|
+
children: e,
|
|
6
|
+
className: t,
|
|
7
|
+
href: r,
|
|
8
|
+
...n
|
|
9
|
+
}) => /* @__PURE__ */ o.jsx(
|
|
5
10
|
"a",
|
|
6
11
|
{
|
|
7
|
-
href:
|
|
12
|
+
href: r,
|
|
8
13
|
target: "_blank",
|
|
9
14
|
rel: "noopener noreferrer",
|
|
15
|
+
"data-testid": "link",
|
|
10
16
|
className: i(
|
|
11
17
|
"text-blue-600 hover:underline visited:text-purple-600 active:text-blue-900 focus:outline-none ",
|
|
12
|
-
|
|
18
|
+
t
|
|
13
19
|
),
|
|
14
|
-
...
|
|
20
|
+
...n,
|
|
15
21
|
children: e
|
|
16
22
|
}
|
|
17
23
|
);
|
|
18
24
|
export {
|
|
19
|
-
|
|
25
|
+
x as ExternalLink
|
|
20
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plyaz/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "A reusable, accessible, and themeable component library powering the Plyaz Web App interface. Built with performance and consistency in mind, @plyaz/ui delivers modular React components aligned with the Plyaz design system — enabling seamless development across fan-facing features, quests, NFTs, and loyalty flows in the Web3 ecosystem.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
+
"types": "./dist/types/components/index.d.ts",
|
|
12
13
|
"import": "./dist/ui.es.js",
|
|
13
14
|
"require": "./dist/ui.cjs.js"
|
|
14
15
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
interface LinkProps extends React.HTMLAttributes<HTMLAnchorElement> {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
className?: string;
|
|
5
|
-
href?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const Link: ({ children, className, href, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|