@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.
@@ -10,3 +10,4 @@ export declare const Aside: Story;
10
10
  export declare const Nav: Story;
11
11
  export declare const Header: Story;
12
12
  export declare const Footer: Story;
13
+ export declare const UserInteraction: Story;
@@ -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?: React.ReactNode;
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;
@@ -4,3 +4,4 @@ declare const meta: Meta<typeof Container>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Container>;
6
6
  export declare const Default: Story;
7
+ export declare const UserInteraction: Story;
@@ -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;
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof Flex>;
6
6
  export declare const Default: Story;
7
7
  export declare const ColumnCentered: Story;
8
+ export declare const UserInteraction: Story;
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof Grid>;
6
6
  export declare const Default: Story;
7
7
  export declare const Justified: 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: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
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;
@@ -9,3 +9,4 @@ export declare const H3: Story;
9
9
  export declare const H4: Story;
10
10
  export declare const H5: Story;
11
11
  export declare const H6: Story;
12
+ export declare const UserInteraction: Story;
@@ -7,3 +7,4 @@ export declare const Default: Story;
7
7
  export declare const Small: Story;
8
8
  export declare const ExtraSmall: Story;
9
9
  export declare const Large: Story;
10
+ export declare const UserInteraction: Story;
@@ -4,3 +4,4 @@ declare const meta: Meta<typeof Section>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Section>;
6
6
  export declare const Default: Story;
7
+ export declare const UserInteraction: Story;
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof Stack>;
6
6
  export declare const Default: Story;
7
7
  export declare const Vertical: Story;
8
+ export declare const UserInteraction: Story;
@@ -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
- '7xl': string;
19
- '8xl': string;
20
- '9xl': string;
18
+ "7xl": string;
19
+ "8xl": string;
20
+ "9xl": string;
21
21
  };
22
- declare const TEXT_WEIGHT_MAPPER: {
23
- normal: string;
24
- medium: string;
25
- semibold: string;
26
- bold: string;
27
- light: string;
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> {
@@ -6,3 +6,4 @@ type Story = StoryObj<typeof Text>;
6
6
  export declare const Default: Story;
7
7
  export declare const Heading: Story;
8
8
  export declare const Caption: Story;
9
+ export declare const UserInteraction: Story;
@@ -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 './Link/Link';
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 r=require("./ui2.cjs"),i=require("./ui3.cjs"),t=require("./ui4.cjs"),e=require("./ui5.cjs"),n=require("./ui6.cjs"),o=require("./ui7.cjs"),a=require("./ui8.cjs"),c=require("./ui9.cjs"),u=require("./ui10.cjs"),s=require("./ui11.cjs");exports.Box=r.Box;exports.Container=i.Container;exports.Flex=t.Flex;exports.ALIGN_MAPPER=e.ALIGN_MAPPER;exports.Grid=e.Grid;exports.JUASTIFY_MAPPER=e.JUASTIFY_MAPPER;exports.Heading=n.Heading;exports.Link=o.Link;exports.Paragraph=a.Paragraph;exports.Section=c.Section;exports.Stack=u.Stack;exports.Text=s.Text;
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 a, Grid as i, JUASTIFY_MAPPER as n } from "./ui5.js";
5
- import { Heading as A } from "./ui6.js";
6
- import { Link as c } from "./ui7.js";
7
- import { Paragraph as g } from "./ui8.js";
8
- import { Section as E } from "./ui9.js";
9
- import { Stack as G } from "./ui10.js";
10
- import { Text as L } from "./ui11.js";
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
- a as ALIGN_MAPPER,
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
- i as Grid,
17
- A as Heading,
18
- n as JUASTIFY_MAPPER,
19
- c as Link,
20
- g as Paragraph,
21
- E as Section,
22
- G as Stack,
23
- L as Text
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 r=require("./ui12.cjs");require("react");const a=require("./ui13.cjs"),c={body:"font-sans",heading:"font-sans",caption:"font-sans"},i={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"},f={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",light:"font-light"},u=({className:l,children:s,element:n,weight:t,variant:x,size:e,...o})=>{const m=n;return r.jsxRuntimeExports.jsx(m,{className:a.clsx("font-normal text-base font-sans",e&&i[e],t&&f[t],x&&c[x],l),...o,children:s})};exports.Text=u;
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
- }, i = {
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
- }, b = {
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: s,
31
- element: e,
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 = e;
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 && i[l],
44
- t && b[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: s
50
+ children: e
50
51
  }
51
52
  );
52
53
  };
53
54
  export {
54
- p as Text
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 s=require("./ui12.cjs");require("react");const i=({children:e,element:t="div",className:r="",...o})=>{const n=t;return s.jsxRuntimeExports.jsx(n,{className:r,...o,children:e})};exports.Box=i;
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 m } from "./ui12.js";
1
+ import { j as x } from "./ui12.js";
2
2
  import "react";
3
- const i = ({
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__ */ m.jsx(e, { className: r, ...s, children: t });
10
+ return /* @__PURE__ */ x.jsx(e, { className: r, ...s, "data-testid": "box", children: t });
11
11
  };
12
12
  export {
13
- i as Box
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 o=require("./ui13.cjs"),s=({children:e,className:t,href:r,...n})=>i.jsxRuntimeExports.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:o.clsx("text-blue-600 hover:underline visited:text-purple-600 active:text-blue-900 focus:outline-none ",t),...n,children:e});exports.Link=s;
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 n } from "./ui12.js";
1
+ import { j as o } from "./ui12.js";
2
2
  import "react";
3
3
  import { clsx as i } from "./ui13.js";
4
- const u = ({ children: e, className: r, href: t, ...o }) => /* @__PURE__ */ n.jsx(
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: t,
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
- r
18
+ t
13
19
  ),
14
- ...o,
20
+ ...n,
15
21
  children: e
16
22
  }
17
23
  );
18
24
  export {
19
- u as Link
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.5",
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 {};
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { Link } from './Link';
3
- declare const meta: Meta<typeof Link>;
4
- export default meta;
5
- type Story = StoryObj<typeof Link>;
6
- export declare const Default: Story;
7
- export declare const CustomClass: Story;