@neoptocom/neopto-ui 0.11.1 → 0.12.1

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/index.cjs CHANGED
@@ -151,7 +151,7 @@ function Card({
151
151
  children,
152
152
  className = "",
153
153
  style,
154
- showDecorations = true,
154
+ showDecorations = false,
155
155
  ...props
156
156
  }) {
157
157
  const mergedStyle = {
@@ -346,7 +346,6 @@ var typoStyles = {
346
346
  "button": { fontSize: "16px", lineHeight: "24px", letterSpacing: "0" }
347
347
  };
348
348
  function getTypoClasses(weight = "normal", muted, className) {
349
- const base = "text-current";
350
349
  const weights = {
351
350
  normal: "font-normal",
352
351
  medium: "font-medium",
@@ -354,7 +353,6 @@ function getTypoClasses(weight = "normal", muted, className) {
354
353
  bold: "font-bold"
355
354
  };
356
355
  return [
357
- base,
358
356
  weights[weight],
359
357
  muted ? "text-[var(--muted-fg)]" : "",
360
358
  className
@@ -991,7 +989,7 @@ function Search({
991
989
  );
992
990
  }
993
991
  function getButtonClasses(variant = "primary", size = "md", fullWidth, className) {
994
- const base = "cursor-pointer inline-flex items-center justify-center gap-2 rounded-[var(--radius-2xl)] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-cyan-500/40 disabled:cursor-not-allowed disabled:opacity-50";
992
+ const base = "cursor-pointer inline-flex items-center justify-center gap-2 rounded-[1.875rem] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-cyan-500/40 disabled:cursor-not-allowed disabled:opacity-50";
995
993
  const variants = {
996
994
  primary: "bg-cyan-500 text-white hover:bg-cyan-400 active:bg-cyan-600 disabled:bg-neutral-400",
997
995
  secondary: "border border-cyan-500 text-cyan-500 bg-transparent hover:bg-cyan-50 active:bg-cyan-100 disabled:border-neutral-400 disabled:text-neutral-400",
@@ -1293,6 +1291,30 @@ var AgentButton = ({
1293
1291
  );
1294
1292
  };
1295
1293
  var AgentButton_default = AgentButton;
1294
+ var MessageBubble = React2__namespace.forwardRef(
1295
+ ({ direction, color, children, className, ...props }, ref) => {
1296
+ const borderRadiusClass = direction === "left" ? "[border-radius:16px_16px_16px_2px]" : direction === "right" ? "[border-radius:16px_16px_2px_16px]" : "rounded-2xl";
1297
+ const backgroundColor = color || "var(--muted)";
1298
+ return /* @__PURE__ */ jsxRuntime.jsx(
1299
+ "div",
1300
+ {
1301
+ ref,
1302
+ className: [
1303
+ "px-4 py-2 inline-block",
1304
+ borderRadiusClass,
1305
+ className
1306
+ ].filter(Boolean).join(" "),
1307
+ style: { backgroundColor },
1308
+ ...props,
1309
+ children
1310
+ }
1311
+ );
1312
+ }
1313
+ );
1314
+ MessageBubble.displayName = "MessageBubble";
1315
+ function Separator({ className = "" }) {
1316
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-full my-1.5 h-px bg-[var(--border)] ${className}` });
1317
+ }
1296
1318
 
1297
1319
  exports.AgentButton = AgentButton_default;
1298
1320
  exports.AnimatedBgCircle = AnimatedBgCircle_default;
@@ -1309,8 +1331,10 @@ exports.Counter = Counter;
1309
1331
  exports.Icon = Icon;
1310
1332
  exports.IconButton = IconButton;
1311
1333
  exports.Input = Input;
1334
+ exports.MessageBubble = MessageBubble;
1312
1335
  exports.Modal = Modal;
1313
1336
  exports.Search = Search;
1337
+ exports.Separator = Separator;
1314
1338
  exports.Skeleton = Skeleton;
1315
1339
  exports.Typo = Typo;
1316
1340
  exports.assets = assets_exports;
package/dist/index.d.cts CHANGED
@@ -45,7 +45,7 @@ type CardProps = React.HTMLAttributes<HTMLDivElement> & {
45
45
  children: React.ReactNode;
46
46
  /** Additional CSS classes */
47
47
  className?: string;
48
- /** Show decorative elements (default: true) */
48
+ /** Show decorative elements (default: false) */
49
49
  showDecorations?: boolean;
50
50
  };
51
51
  declare function Card({ children, className, style, showDecorations, ...props }: CardProps): react_jsx_runtime.JSX.Element;
@@ -297,4 +297,21 @@ interface AnimatedBgRectangleProps {
297
297
  }
298
298
  declare const AnimatedBgRectangle: ({ colors, delay }: AnimatedBgRectangleProps) => react_jsx_runtime.JSX.Element;
299
299
 
300
- export { AgentButton, type AgentButtonProps, AnimatedBgCircle, AnimatedBgRectangle, AppBackground, type AppBackgroundProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BackgroundBlur, type BackgroundBlurProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight, index as assets };
300
+ type MessageBubbleProps = {
301
+ /** Direction of the message bubble, affects border radius */
302
+ direction?: "left" | "right";
303
+ /** Custom background color (CSS color value) */
304
+ color?: string;
305
+ /** Content to display inside the bubble */
306
+ children: React.ReactNode;
307
+ /** Additional CSS classes */
308
+ className?: string;
309
+ };
310
+ declare const MessageBubble: React.ForwardRefExoticComponent<MessageBubbleProps & React.RefAttributes<HTMLDivElement>>;
311
+
312
+ type SeparatorProps = {
313
+ className?: string;
314
+ };
315
+ declare function Separator({ className }: SeparatorProps): react_jsx_runtime.JSX.Element;
316
+
317
+ export { AgentButton, type AgentButtonProps, AnimatedBgCircle, AnimatedBgRectangle, AppBackground, type AppBackgroundProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BackgroundBlur, type BackgroundBlurProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, MessageBubble, type MessageBubbleProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight, index as assets };
package/dist/index.d.ts CHANGED
@@ -45,7 +45,7 @@ type CardProps = React.HTMLAttributes<HTMLDivElement> & {
45
45
  children: React.ReactNode;
46
46
  /** Additional CSS classes */
47
47
  className?: string;
48
- /** Show decorative elements (default: true) */
48
+ /** Show decorative elements (default: false) */
49
49
  showDecorations?: boolean;
50
50
  };
51
51
  declare function Card({ children, className, style, showDecorations, ...props }: CardProps): react_jsx_runtime.JSX.Element;
@@ -297,4 +297,21 @@ interface AnimatedBgRectangleProps {
297
297
  }
298
298
  declare const AnimatedBgRectangle: ({ colors, delay }: AnimatedBgRectangleProps) => react_jsx_runtime.JSX.Element;
299
299
 
300
- export { AgentButton, type AgentButtonProps, AnimatedBgCircle, AnimatedBgRectangle, AppBackground, type AppBackgroundProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BackgroundBlur, type BackgroundBlurProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight, index as assets };
300
+ type MessageBubbleProps = {
301
+ /** Direction of the message bubble, affects border radius */
302
+ direction?: "left" | "right";
303
+ /** Custom background color (CSS color value) */
304
+ color?: string;
305
+ /** Content to display inside the bubble */
306
+ children: React.ReactNode;
307
+ /** Additional CSS classes */
308
+ className?: string;
309
+ };
310
+ declare const MessageBubble: React.ForwardRefExoticComponent<MessageBubbleProps & React.RefAttributes<HTMLDivElement>>;
311
+
312
+ type SeparatorProps = {
313
+ className?: string;
314
+ };
315
+ declare function Separator({ className }: SeparatorProps): react_jsx_runtime.JSX.Element;
316
+
317
+ export { AgentButton, type AgentButtonProps, AnimatedBgCircle, AnimatedBgRectangle, AppBackground, type AppBackgroundProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BackgroundBlur, type BackgroundBlurProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, MessageBubble, type MessageBubbleProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight, index as assets };
package/dist/index.js CHANGED
@@ -130,7 +130,7 @@ function Card({
130
130
  children,
131
131
  className = "",
132
132
  style,
133
- showDecorations = true,
133
+ showDecorations = false,
134
134
  ...props
135
135
  }) {
136
136
  const mergedStyle = {
@@ -325,7 +325,6 @@ var typoStyles = {
325
325
  "button": { fontSize: "16px", lineHeight: "24px", letterSpacing: "0" }
326
326
  };
327
327
  function getTypoClasses(weight = "normal", muted, className) {
328
- const base = "text-current";
329
328
  const weights = {
330
329
  normal: "font-normal",
331
330
  medium: "font-medium",
@@ -333,7 +332,6 @@ function getTypoClasses(weight = "normal", muted, className) {
333
332
  bold: "font-bold"
334
333
  };
335
334
  return [
336
- base,
337
335
  weights[weight],
338
336
  muted ? "text-[var(--muted-fg)]" : "",
339
337
  className
@@ -970,7 +968,7 @@ function Search({
970
968
  );
971
969
  }
972
970
  function getButtonClasses(variant = "primary", size = "md", fullWidth, className) {
973
- const base = "cursor-pointer inline-flex items-center justify-center gap-2 rounded-[var(--radius-2xl)] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-cyan-500/40 disabled:cursor-not-allowed disabled:opacity-50";
971
+ const base = "cursor-pointer inline-flex items-center justify-center gap-2 rounded-[1.875rem] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-cyan-500/40 disabled:cursor-not-allowed disabled:opacity-50";
974
972
  const variants = {
975
973
  primary: "bg-cyan-500 text-white hover:bg-cyan-400 active:bg-cyan-600 disabled:bg-neutral-400",
976
974
  secondary: "border border-cyan-500 text-cyan-500 bg-transparent hover:bg-cyan-50 active:bg-cyan-100 disabled:border-neutral-400 disabled:text-neutral-400",
@@ -1272,5 +1270,29 @@ var AgentButton = ({
1272
1270
  );
1273
1271
  };
1274
1272
  var AgentButton_default = AgentButton;
1273
+ var MessageBubble = React2.forwardRef(
1274
+ ({ direction, color, children, className, ...props }, ref) => {
1275
+ const borderRadiusClass = direction === "left" ? "[border-radius:16px_16px_16px_2px]" : direction === "right" ? "[border-radius:16px_16px_2px_16px]" : "rounded-2xl";
1276
+ const backgroundColor = color || "var(--muted)";
1277
+ return /* @__PURE__ */ jsx(
1278
+ "div",
1279
+ {
1280
+ ref,
1281
+ className: [
1282
+ "px-4 py-2 inline-block",
1283
+ borderRadiusClass,
1284
+ className
1285
+ ].filter(Boolean).join(" "),
1286
+ style: { backgroundColor },
1287
+ ...props,
1288
+ children
1289
+ }
1290
+ );
1291
+ }
1292
+ );
1293
+ MessageBubble.displayName = "MessageBubble";
1294
+ function Separator({ className = "" }) {
1295
+ return /* @__PURE__ */ jsx("div", { className: `w-full my-1.5 h-px bg-[var(--border)] ${className}` });
1296
+ }
1275
1297
 
1276
- export { AgentButton_default as AgentButton, AnimatedBgCircle_default as AnimatedBgCircle, AnimatedBgRectangle_default as AnimatedBgRectangle, AppBackground, Autocomplete, Avatar, AvatarGroup, BackgroundBlur, Button, Card, Chip, Counter, Icon, IconButton, Input, Modal, Search, Skeleton, Typo, assets_exports as assets };
1298
+ export { AgentButton_default as AgentButton, AnimatedBgCircle_default as AnimatedBgCircle, AnimatedBgRectangle_default as AnimatedBgRectangle, AppBackground, Autocomplete, Avatar, AvatarGroup, BackgroundBlur, Button, Card, Chip, Counter, Icon, IconButton, Input, MessageBubble, Modal, Search, Separator, Skeleton, Typo, assets_exports as assets };
package/dist/styles.css CHANGED
@@ -25,7 +25,6 @@
25
25
  --radius-md: 0.375rem;
26
26
  --radius-lg: 0.5rem;
27
27
  --radius-xl: 0.75rem;
28
- --radius-2xl: 1.875rem;
29
28
  --bg: #F3F4F6;
30
29
  --surface: #FFFFFF;
31
30
  --fg: #242832;
@@ -47,7 +46,6 @@
47
46
  --radius-md: 0.375rem;
48
47
  --radius-lg: 0.5rem;
49
48
  --radius-xl: 0.75rem;
50
- --radius-2xl: 1.875rem;
51
49
  --bg: #F3F4F6;
52
50
  --surface: #FFFFFF;
53
51
  --fg: #242832;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neoptocom/neopto-ui",
3
- "version": "0.11.1",
3
+ "version": "0.12.1",
4
4
  "private": false,
5
5
  "description": "A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive Storybook documentation. Requires Tailwind v4+.",
6
6
  "keywords": [
@@ -18,7 +18,7 @@ function getButtonClasses(
18
18
  className?: string
19
19
  ): string {
20
20
  const base =
21
- "cursor-pointer inline-flex items-center justify-center gap-2 rounded-[var(--radius-2xl)] transition-colors " +
21
+ "cursor-pointer inline-flex items-center justify-center gap-2 rounded-[1.875rem] transition-colors " +
22
22
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-cyan-500/40 " +
23
23
  "disabled:cursor-not-allowed disabled:opacity-50";
24
24
 
@@ -5,7 +5,7 @@ export type CardProps = React.HTMLAttributes<HTMLDivElement> & {
5
5
  children: React.ReactNode;
6
6
  /** Additional CSS classes */
7
7
  className?: string;
8
- /** Show decorative elements (default: true) */
8
+ /** Show decorative elements (default: false) */
9
9
  showDecorations?: boolean;
10
10
  };
11
11
 
@@ -13,7 +13,7 @@ export function Card({
13
13
  children,
14
14
  className = "",
15
15
  style,
16
- showDecorations = true,
16
+ showDecorations = false,
17
17
  ...props
18
18
  }: CardProps) {
19
19
  // Merge user styles with card styles
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+
3
+ export type MessageBubbleProps = {
4
+ /** Direction of the message bubble, affects border radius */
5
+ direction?: "left" | "right";
6
+ /** Custom background color (CSS color value) */
7
+ color?: string;
8
+ /** Content to display inside the bubble */
9
+ children: React.ReactNode;
10
+ /** Additional CSS classes */
11
+ className?: string;
12
+ };
13
+
14
+ export const MessageBubble = React.forwardRef<HTMLDivElement, MessageBubbleProps>(
15
+ ({ direction, color, children, className, ...props }, ref) => {
16
+ const borderRadiusClass =
17
+ direction === "left"
18
+ ? "[border-radius:16px_16px_16px_2px]"
19
+ : direction === "right"
20
+ ? "[border-radius:16px_16px_2px_16px]"
21
+ : "rounded-2xl";
22
+
23
+ const backgroundColor = color || "var(--muted)";
24
+
25
+ return (
26
+ <div
27
+ ref={ref}
28
+ className={[
29
+ "px-4 py-2 inline-block",
30
+ borderRadiusClass,
31
+ className
32
+ ].filter(Boolean).join(" ")}
33
+ style={{ backgroundColor }}
34
+ {...props}
35
+ >
36
+ {children}
37
+ </div>
38
+ );
39
+ }
40
+ );
41
+
42
+ MessageBubble.displayName = "MessageBubble";
43
+
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+
3
+ export type SeparatorProps = {
4
+ className?: string;
5
+ };
6
+
7
+ export function Separator({ className = "" }: SeparatorProps) {
8
+ return (
9
+ <div className={`w-full my-1.5 h-px bg-[var(--border)] ${className}`} />
10
+ );
11
+ }
12
+
@@ -41,8 +41,6 @@ function getTypoClasses(
41
41
  muted?: boolean,
42
42
  className?: string
43
43
  ): string {
44
- const base = "text-current";
45
-
46
44
  const weights: Record<TypoWeight, string> = {
47
45
  normal: "font-normal",
48
46
  medium: "font-medium",
@@ -51,7 +49,6 @@ function getTypoClasses(
51
49
  };
52
50
 
53
51
  return [
54
- base,
55
52
  weights[weight],
56
53
  muted ? "text-[var(--muted-fg)]" : "",
57
54
  className
package/src/index.ts CHANGED
@@ -19,6 +19,8 @@ export { default as Icon } from "./components/Icon";
19
19
  export { default as Chip } from "./components/Chip";
20
20
  export { default as Counter } from "./components/Counter";
21
21
  export * from "./components/Chat";
22
+ export * from "./components/MessageBubble";
23
+ export * from "./components/Separator";
22
24
 
23
25
  // Types
24
26
  export type { AppBackgroundProps } from "./components/AppBackground";
@@ -37,4 +39,6 @@ export type { IconButtonProps } from "./components/IconButton";
37
39
  export type { IconProps } from "./components/Icon";
38
40
  export type { ChipProps } from "./components/Chip";
39
41
  export type { CounterProps } from "./components/Counter";
40
- export type { AgentButtonProps } from "./components/Chat";
42
+ export type { AgentButtonProps } from "./components/Chat";
43
+ export type { MessageBubbleProps } from "./components/MessageBubble";
44
+ export type { SeparatorProps } from "./components/Separator";
@@ -0,0 +1,233 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Card } from "../components/Card";
3
+ import Typo from "../components/Typo";
4
+ import { Button } from "../components/Button";
5
+
6
+ const meta: Meta<typeof Card> = {
7
+ title: "Components/Card",
8
+ component: Card,
9
+ parameters: {
10
+ layout: "padded",
11
+ },
12
+ };
13
+ export default meta;
14
+ type Story = StoryObj<typeof Card>;
15
+
16
+ export const Default: Story = {
17
+ render: () => (
18
+ <div className="max-w-md">
19
+ <Card>
20
+ <Typo variant="headline-sm" bold="semibold">Default Card</Typo>
21
+ <Typo variant="body-md" className="mt-2">
22
+ This is a default card with glassmorphic styling.
23
+ </Typo>
24
+ </Card>
25
+ </div>
26
+ ),
27
+ };
28
+
29
+ export const WithDecorations: Story = {
30
+ render: () => (
31
+ <div className="max-w-md">
32
+ <Card showDecorations={true}>
33
+ <Typo variant="headline-sm" bold="semibold">Card With Decorations</Typo>
34
+ <Typo variant="body-md" className="mt-2">
35
+ This card has the decorative SVG gradient borders enabled.
36
+ </Typo>
37
+ </Card>
38
+ </div>
39
+ ),
40
+ };
41
+
42
+ export const CustomPadding: Story = {
43
+ render: () => (
44
+ <div className="max-w-md space-y-4">
45
+ <Card className="p-8">
46
+ <Typo variant="label-lg" bold="semibold">Large Padding (p-8)</Typo>
47
+ <Typo variant="body-sm" className="mt-1">More breathing room inside the card.</Typo>
48
+ </Card>
49
+ <Card className="p-4">
50
+ <Typo variant="label-lg" bold="semibold">Small Padding (p-4)</Typo>
51
+ <Typo variant="body-sm" className="mt-1">Compact card layout.</Typo>
52
+ </Card>
53
+ <Card className="p-0">
54
+ <div className="p-6 border-b border-[var(--border)]">
55
+ <Typo variant="label-lg" bold="semibold">No Default Padding (p-0)</Typo>
56
+ </div>
57
+ <div className="p-6">
58
+ <Typo variant="body-sm">Custom padding applied to inner elements.</Typo>
59
+ </div>
60
+ </Card>
61
+ </div>
62
+ ),
63
+ };
64
+
65
+ export const WithContent: Story = {
66
+ render: () => (
67
+ <div className="max-w-md">
68
+ <Card>
69
+ <Typo variant="title-lg" bold="semibold">Product Feature</Typo>
70
+ <Typo variant="body-md" className="mt-3">
71
+ This card showcases how rich content looks with the glassmorphic background.
72
+ </Typo>
73
+ <div className="mt-4 space-y-2">
74
+ <div className="flex items-start gap-2">
75
+ <span className="text-[var(--success)]">✓</span>
76
+ <Typo variant="body-sm">Fast performance</Typo>
77
+ </div>
78
+ <div className="flex items-start gap-2">
79
+ <span className="text-[var(--success)]">✓</span>
80
+ <Typo variant="body-sm">Easy to customize</Typo>
81
+ </div>
82
+ <div className="flex items-start gap-2">
83
+ <span className="text-[var(--success)]">✓</span>
84
+ <Typo variant="body-sm">Beautiful design</Typo>
85
+ </div>
86
+ </div>
87
+ <div className="mt-6">
88
+ <Button variant="primary">Learn More</Button>
89
+ </div>
90
+ </Card>
91
+ </div>
92
+ ),
93
+ };
94
+
95
+ export const MultipleCards: Story = {
96
+ render: () => (
97
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
98
+ <Card>
99
+ <Typo variant="title-md" bold="semibold">Analytics</Typo>
100
+ <Typo variant="display-md" bold="bold" className="mt-4">1,234</Typo>
101
+ <Typo variant="body-sm" className="mt-1 text-[var(--muted-fg)]">Total Users</Typo>
102
+ </Card>
103
+ <Card>
104
+ <Typo variant="title-md" bold="semibold">Revenue</Typo>
105
+ <Typo variant="display-md" bold="bold" className="mt-4">$45.2K</Typo>
106
+ <Typo variant="body-sm" className="mt-1 text-[var(--muted-fg)]">This Month</Typo>
107
+ </Card>
108
+ <Card>
109
+ <Typo variant="title-md" bold="semibold">Growth</Typo>
110
+ <Typo variant="display-md" bold="bold" className="mt-4">+24%</Typo>
111
+ <Typo variant="body-sm" className="mt-1 text-[var(--muted-fg)]">vs Last Month</Typo>
112
+ </Card>
113
+ </div>
114
+ ),
115
+ };
116
+
117
+ export const LargeCard: Story = {
118
+ render: () => (
119
+ <div className="max-w-3xl">
120
+ <Card className="p-8">
121
+ <div className="flex items-start justify-between">
122
+ <div>
123
+ <Typo variant="headline-md" bold="semibold">Welcome to NeoPTO UI</Typo>
124
+ <Typo variant="body-lg" className="mt-2 text-[var(--muted-fg)]">
125
+ A modern React component library
126
+ </Typo>
127
+ </div>
128
+ <Button variant="primary">Get Started</Button>
129
+ </div>
130
+ <div className="mt-6 grid grid-cols-2 gap-6">
131
+ <div>
132
+ <Typo variant="label-lg" bold="semibold" className="text-[var(--color-brand)]">
133
+ Modern Design
134
+ </Typo>
135
+ <Typo variant="body-md" className="mt-2">
136
+ Built with the latest design trends and best practices for creating beautiful user interfaces.
137
+ </Typo>
138
+ </div>
139
+ <div>
140
+ <Typo variant="label-lg" bold="semibold" className="text-[var(--color-brand)]">
141
+ Developer Friendly
142
+ </Typo>
143
+ <Typo variant="body-md" className="mt-2">
144
+ Fully typed with TypeScript and documented with Storybook for the best developer experience.
145
+ </Typo>
146
+ </div>
147
+ </div>
148
+ </Card>
149
+ </div>
150
+ ),
151
+ };
152
+
153
+ export const CardList: Story = {
154
+ render: () => (
155
+ <div className="max-w-2xl space-y-3">
156
+ {[1, 2, 3, 4].map((item) => (
157
+ <Card key={item} className="p-4">
158
+ <div className="flex items-center justify-between">
159
+ <div className="flex items-center gap-4">
160
+ <div className="w-12 h-12 rounded-full bg-[var(--muted)] flex items-center justify-center">
161
+ <Typo variant="title-md" bold="semibold">{item}</Typo>
162
+ </div>
163
+ <div>
164
+ <Typo variant="title-sm" bold="semibold">List Item {item}</Typo>
165
+ <Typo variant="body-sm" className="text-[var(--muted-fg)]">
166
+ Description for item {item}
167
+ </Typo>
168
+ </div>
169
+ </div>
170
+ <Button variant="ghost" size="sm">View</Button>
171
+ </div>
172
+ </Card>
173
+ ))}
174
+ </div>
175
+ ),
176
+ };
177
+
178
+ export const NestedContent: Story = {
179
+ render: () => (
180
+ <div className="max-w-2xl">
181
+ <Card>
182
+ <Typo variant="headline-sm" bold="semibold">Project Dashboard</Typo>
183
+ <div className="mt-4 space-y-3">
184
+ <Card className="p-4 bg-[var(--muted)]">
185
+ <Typo variant="title-sm" bold="medium">In Progress</Typo>
186
+ <Typo variant="body-sm" className="mt-1 text-[var(--muted-fg)]">3 tasks remaining</Typo>
187
+ </Card>
188
+ <Card className="p-4 bg-[var(--muted)]">
189
+ <Typo variant="title-sm" bold="medium">Completed</Typo>
190
+ <Typo variant="body-sm" className="mt-1 text-[var(--muted-fg)]">15 tasks done</Typo>
191
+ </Card>
192
+ </div>
193
+ </Card>
194
+ </div>
195
+ ),
196
+ };
197
+
198
+ export const FormCard: Story = {
199
+ render: () => (
200
+ <div className="max-w-md">
201
+ <Card>
202
+ <Typo variant="headline-sm" bold="semibold">Sign In</Typo>
203
+ <Typo variant="body-sm" className="mt-1 text-[var(--muted-fg)]">
204
+ Enter your credentials to continue
205
+ </Typo>
206
+ <form className="mt-6 space-y-4">
207
+ <div>
208
+ <label className="block mb-2">
209
+ <Typo variant="label-md" bold="medium">Email</Typo>
210
+ </label>
211
+ <input
212
+ type="email"
213
+ placeholder="you@example.com"
214
+ className="w-full px-4 py-3 rounded-2xl bg-[var(--muted)] border-none outline-none focus:ring-2 focus:ring-[var(--color-brand)]"
215
+ />
216
+ </div>
217
+ <div>
218
+ <label className="block mb-2">
219
+ <Typo variant="label-md" bold="medium">Password</Typo>
220
+ </label>
221
+ <input
222
+ type="password"
223
+ placeholder="••••••••"
224
+ className="w-full px-4 py-3 rounded-2xl bg-[var(--muted)] border-none outline-none focus:ring-2 focus:ring-[var(--color-brand)]"
225
+ />
226
+ </div>
227
+ <Button variant="primary" className="w-full">Sign In</Button>
228
+ </form>
229
+ </Card>
230
+ </div>
231
+ ),
232
+ };
233
+
@@ -0,0 +1,135 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { MessageBubble } from "../components/MessageBubble";
3
+ import Typo from "../components/Typo";
4
+
5
+ const meta: Meta<typeof MessageBubble> = {
6
+ title: "Components/MessageBubble",
7
+ component: MessageBubble
8
+ };
9
+ export default meta;
10
+ type Story = StoryObj<typeof MessageBubble>;
11
+
12
+ export const Default: Story = {
13
+ render: () => (
14
+ <div className="flex flex-col gap-4 max-w-md p-4">
15
+ <MessageBubble>
16
+ <Typo variant="title-sm">Hello! This is a default message bubble with no direction.</Typo>
17
+ </MessageBubble>
18
+ </div>
19
+ )
20
+ };
21
+
22
+ export const Directions: Story = {
23
+ render: () => (
24
+ <div className="flex flex-col gap-4 max-w-md p-4">
25
+ <div className="flex justify-start">
26
+ <MessageBubble direction="left">
27
+ <Typo variant="title-sm">This is a left-aligned message bubble.</Typo>
28
+ </MessageBubble>
29
+ </div>
30
+ <div className="flex justify-end">
31
+ <MessageBubble direction="right">
32
+ <Typo variant="title-sm">This is a right-aligned message bubble.</Typo>
33
+ </MessageBubble>
34
+ </div>
35
+ <div className="flex justify-start">
36
+ <MessageBubble direction="left">
37
+ <Typo variant="title-sm">Messages from the left typically have the small radius on bottom-left corner.</Typo>
38
+ </MessageBubble>
39
+ </div>
40
+ <div className="flex justify-end">
41
+ <MessageBubble direction="right">
42
+ <Typo variant="title-sm">Messages from the right have the small radius on bottom-right corner.</Typo>
43
+ </MessageBubble>
44
+ </div>
45
+ </div>
46
+ )
47
+ };
48
+
49
+ export const CustomColors: Story = {
50
+ render: () => (
51
+ <div className="flex flex-col gap-4 max-w-md p-4">
52
+ <div className="flex justify-start">
53
+ <MessageBubble direction="left" color="#E3F2FD">
54
+ <Typo variant="title-sm" className="text-[#1565C0]">Light blue message</Typo>
55
+ </MessageBubble>
56
+ </div>
57
+ <div className="flex justify-end">
58
+ <MessageBubble direction="right" color="#1976D2">
59
+ <Typo variant="title-sm" className="text-white">Blue message with white text</Typo>
60
+ </MessageBubble>
61
+ </div>
62
+ <div className="flex justify-start">
63
+ <MessageBubble direction="left" color="#F3E5F5">
64
+ <Typo variant="title-sm" className="text-[#7B1FA2]">Purple tinted message</Typo>
65
+ </MessageBubble>
66
+ </div>
67
+ <div className="flex justify-end">
68
+ <MessageBubble direction="right" color="#E8F5E9">
69
+ <Typo variant="title-sm" className="text-[#2E7D32]">Green message</Typo>
70
+ </MessageBubble>
71
+ </div>
72
+ </div>
73
+ )
74
+ };
75
+
76
+ export const ChatConversation: Story = {
77
+ render: () => (
78
+ <div className="flex flex-col gap-3 max-w-2xl p-4">
79
+ <div className="flex justify-start">
80
+ <MessageBubble direction="left" color="#F5F5F5">
81
+ <Typo variant="title-sm" className="text-[#333]">Hey! How can I help you today?</Typo>
82
+ </MessageBubble>
83
+ </div>
84
+ <div className="flex justify-end">
85
+ <MessageBubble direction="right" color="var(--color-brand)">
86
+ <Typo variant="title-sm" className="text-white">I need help with my account settings.</Typo>
87
+ </MessageBubble>
88
+ </div>
89
+ <div className="flex justify-start">
90
+ <MessageBubble direction="left" color="#F5F5F5">
91
+ <Typo variant="title-sm" className="text-[#333]">
92
+ Sure! I can help you with that. What specific setting would you like to change?
93
+ </Typo>
94
+ </MessageBubble>
95
+ </div>
96
+ <div className="flex justify-end">
97
+ <MessageBubble direction="right" color="var(--color-brand)">
98
+ <Typo variant="title-sm" className="text-white">I want to update my email address.</Typo>
99
+ </MessageBubble>
100
+ </div>
101
+ <div className="flex justify-start">
102
+ <MessageBubble direction="left" color="#F5F5F5">
103
+ <Typo variant="title-sm" className="text-[#333]">
104
+ No problem! You can update your email in Account Settings → Profile → Email.
105
+ </Typo>
106
+ </MessageBubble>
107
+ </div>
108
+ </div>
109
+ )
110
+ };
111
+
112
+ export const LongMessages: Story = {
113
+ render: () => (
114
+ <div className="flex flex-col gap-4 max-w-2xl p-4">
115
+ <div className="flex justify-start">
116
+ <MessageBubble direction="left">
117
+ <Typo variant="title-sm" className="text-[#333]">
118
+ This is a longer message to demonstrate how the bubble handles multiple lines of text.
119
+ The border radius should remain consistent regardless of the content length.
120
+ The bubble will grow to accommodate the text while maintaining its shape.
121
+ </Typo>
122
+ </MessageBubble>
123
+ </div>
124
+ <div className="flex justify-end">
125
+ <MessageBubble direction="right" color="var(--color-brand)">
126
+ <Typo variant="title-sm" className="text-white">
127
+ Great! The bubble handles long text really well. It maintains the proper border
128
+ radius and looks clean even with multiple lines of content.
129
+ </Typo>
130
+ </MessageBubble>
131
+ </div>
132
+ </div>
133
+ )
134
+ };
135
+
@@ -74,11 +74,11 @@ export const CustomStyling: Story = {
74
74
  This modal has custom styling with a larger max-width and more padding.
75
75
  </Typo>
76
76
  <div className="mt-6 grid grid-cols-2 gap-4">
77
- <div className="p-4 bg-[var(--muted)] rounded-2xl">
77
+ <div className="p-4 bg-[var(--muted)] [border-radius:1.875rem]">
78
78
  <Typo variant="label-lg" bold="semibold">Feature 1</Typo>
79
79
  <Typo variant="body-sm" className="mt-2">Description here</Typo>
80
80
  </div>
81
- <div className="p-4 bg-[var(--muted)] rounded-2xl">
81
+ <div className="p-4 bg-[var(--muted)] [border-radius:1.875rem]">
82
82
  <Typo variant="label-lg" bold="semibold">Feature 2</Typo>
83
83
  <Typo variant="body-sm" className="mt-2">Description here</Typo>
84
84
  </div>
@@ -0,0 +1,197 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Separator } from "../components/Separator";
3
+ import Typo from "../components/Typo";
4
+ import { Card } from "../components/Card";
5
+
6
+ const meta: Meta<typeof Separator> = {
7
+ title: "Components/Separator",
8
+ component: Separator,
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof Separator>;
12
+
13
+ export const Default: Story = {
14
+ render: () => (
15
+ <div className="max-w-md">
16
+ <Typo variant="body-md">Content above separator</Typo>
17
+ <Separator />
18
+ <Typo variant="body-md">Content below separator</Typo>
19
+ </div>
20
+ ),
21
+ };
22
+
23
+ export const InCard: Story = {
24
+ render: () => (
25
+ <div className="max-w-md">
26
+ <Card>
27
+ <Typo variant="title-md" bold="semibold">Card Title</Typo>
28
+ <Typo variant="body-sm" className="mt-2 text-[var(--muted-fg)]">
29
+ Some description text goes here
30
+ </Typo>
31
+ <Separator />
32
+ <Typo variant="body-md">
33
+ Additional content after the separator
34
+ </Typo>
35
+ </Card>
36
+ </div>
37
+ ),
38
+ };
39
+
40
+ export const CustomSpacing: Story = {
41
+ render: () => (
42
+ <div className="max-w-md space-y-8">
43
+ <div>
44
+ <Typo variant="label-lg" bold="semibold">No Margin</Typo>
45
+ <Separator className="my-0" />
46
+ <Typo variant="body-sm">Text immediately after</Typo>
47
+ </div>
48
+
49
+ <div>
50
+ <Typo variant="label-lg" bold="semibold">Large Margin (my-4)</Typo>
51
+ <Separator className="my-4" />
52
+ <Typo variant="body-sm">More space around separator</Typo>
53
+ </div>
54
+
55
+ <div>
56
+ <Typo variant="label-lg" bold="semibold">Extra Large Margin (my-8)</Typo>
57
+ <Separator className="my-8" />
58
+ <Typo variant="body-sm">Even more space</Typo>
59
+ </div>
60
+ </div>
61
+ ),
62
+ };
63
+
64
+ export const DifferentColors: Story = {
65
+ render: () => (
66
+ <div className="max-w-md space-y-6">
67
+ <div>
68
+ <Typo variant="label-lg" bold="semibold">Default Border Color</Typo>
69
+ <Separator />
70
+ </div>
71
+
72
+ <div>
73
+ <Typo variant="label-lg" bold="semibold">Brand Color</Typo>
74
+ <Separator className="bg-[var(--color-brand)]" />
75
+ </div>
76
+
77
+ <div>
78
+ <Typo variant="label-lg" bold="semibold">Success Color</Typo>
79
+ <Separator className="bg-[var(--success)]" />
80
+ </div>
81
+
82
+ <div>
83
+ <Typo variant="label-lg" bold="semibold">Muted Foreground</Typo>
84
+ <Separator className="bg-[var(--muted-fg)]" />
85
+ </div>
86
+ </div>
87
+ ),
88
+ };
89
+
90
+ export const DifferentThickness: Story = {
91
+ render: () => (
92
+ <div className="max-w-md space-y-6">
93
+ <div>
94
+ <Typo variant="label-lg" bold="semibold">Default (1px)</Typo>
95
+ <Separator />
96
+ </div>
97
+
98
+ <div>
99
+ <Typo variant="label-lg" bold="semibold">2px Thick</Typo>
100
+ <Separator className="h-0.5" />
101
+ </div>
102
+
103
+ <div>
104
+ <Typo variant="label-lg" bold="semibold">4px Thick</Typo>
105
+ <Separator className="h-1" />
106
+ </div>
107
+
108
+ <div>
109
+ <Typo variant="label-lg" bold="semibold">8px Thick</Typo>
110
+ <Separator className="h-2" />
111
+ </div>
112
+ </div>
113
+ ),
114
+ };
115
+
116
+ export const InList: Story = {
117
+ render: () => (
118
+ <div className="max-w-md">
119
+ <Card>
120
+ <Typo variant="title-md" bold="semibold">Menu Items</Typo>
121
+ <Separator className="my-3" />
122
+
123
+ <div className="space-y-3">
124
+ <Typo variant="body-md">Home</Typo>
125
+ <Separator />
126
+ <Typo variant="body-md">About</Typo>
127
+ <Separator />
128
+ <Typo variant="body-md">Services</Typo>
129
+ <Separator />
130
+ <Typo variant="body-md">Contact</Typo>
131
+ </div>
132
+ </Card>
133
+ </div>
134
+ ),
135
+ };
136
+
137
+ export const VerticalSections: Story = {
138
+ render: () => (
139
+ <div className="max-w-2xl">
140
+ <Card>
141
+ <Typo variant="headline-sm" bold="semibold">Article Title</Typo>
142
+ <Typo variant="body-sm" className="mt-1 text-[var(--muted-fg)]">
143
+ Published on October 28, 2025
144
+ </Typo>
145
+
146
+ <Separator className="my-6" />
147
+
148
+ <Typo variant="body-md">
149
+ This is the introduction paragraph of the article. It provides context and sets up what the reader can expect.
150
+ </Typo>
151
+
152
+ <Separator className="my-6" />
153
+
154
+ <Typo variant="title-md" bold="semibold">Section 1</Typo>
155
+ <Typo variant="body-md" className="mt-2">
156
+ Content for the first section goes here with relevant information.
157
+ </Typo>
158
+
159
+ <Separator className="my-6" />
160
+
161
+ <Typo variant="title-md" bold="semibold">Section 2</Typo>
162
+ <Typo variant="body-md" className="mt-2">
163
+ Content for the second section with more details.
164
+ </Typo>
165
+ </Card>
166
+ </div>
167
+ ),
168
+ };
169
+
170
+ export const WithWidth: Story = {
171
+ render: () => (
172
+ <div className="max-w-md space-y-6">
173
+ <div>
174
+ <Typo variant="label-lg" bold="semibold">Full Width (default)</Typo>
175
+ <Separator />
176
+ </div>
177
+
178
+ <div>
179
+ <Typo variant="label-lg" bold="semibold">50% Width</Typo>
180
+ <Separator className="w-1/2" />
181
+ </div>
182
+
183
+ <div>
184
+ <Typo variant="label-lg" bold="semibold">25% Width</Typo>
185
+ <Separator className="w-1/4" />
186
+ </div>
187
+
188
+ <div>
189
+ <Typo variant="label-lg" bold="semibold">Centered 50%</Typo>
190
+ <div className="flex justify-center">
191
+ <Separator className="w-1/2" />
192
+ </div>
193
+ </div>
194
+ </div>
195
+ ),
196
+ };
197
+
@@ -1,4 +1,8 @@
1
1
  /* Build-only CSS for publishing the lib (no Preflight/reset) */
2
+
3
+ /* Google Fonts */
4
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');
5
+
2
6
  @import "tailwindcss/utilities";
3
7
  @import "./tokens.css";
4
8
 
@@ -1,3 +1,6 @@
1
+ /* Google Fonts */
2
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');
3
+
1
4
  /* Tailwind v4+ core */
2
5
  @import "tailwindcss";
3
6
 
@@ -9,7 +9,6 @@
9
9
  --radius-md: 0.375rem;
10
10
  --radius-lg: 0.5rem;
11
11
  --radius-xl: 0.75rem;
12
- --radius-2xl: 1.875rem;
13
12
  --bg: #F3F4F6;
14
13
  --surface: #FFFFFF;
15
14
  --fg: #242832;
@@ -31,7 +30,6 @@
31
30
  --radius-md: 0.375rem;
32
31
  --radius-lg: 0.5rem;
33
32
  --radius-xl: 0.75rem;
34
- --radius-2xl: 1.875rem;
35
33
  --bg: #F3F4F6;
36
34
  --surface: #FFFFFF;
37
35
  --fg: #242832;