@neoptocom/neopto-ui 1.6.6 → 1.6.8
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/CONSUMER_SETUP.md +8 -5
- package/README.md +5 -3
- package/dist/index.cjs +12 -11
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -11
- package/dist/styles.css +0 -8
- package/package.json +10 -3
- package/src/assets/logo-neopto-dark.svg +9 -0
- package/src/assets/logo-neopto-light.svg +9 -0
- package/src/components/Breadcrumb.docs.mdx +5 -0
- package/src/components/Breadcrumb.tsx +3 -5
- package/src/components/Button.docs.mdx +5 -0
- package/src/components/Button.stories.tsx +5 -0
- package/src/components/Card.docs.mdx +5 -0
- package/src/components/Chip.tsx +4 -3
- package/src/components/Skeleton.tsx +4 -4
- package/src/components/Typo.tsx +6 -0
- package/src/{components → stories}/Breadcrumb.stories.tsx +10 -5
- package/src/stories/Chip.stories.tsx +2 -1
- package/src/stories/Skeleton.stories.tsx +1 -1
- package/src/styles/library.css +1 -1
- package/src/styles/tailwind.css +1 -1
- package/src/styles/tokens.css +0 -8
- package/src/stories/AgentButton.stories.tsx +0 -170
package/CONSUMER_SETUP.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
This component library uses **Tailwind CSS v4 utility classes** directly in the components. Your project **MUST** have Tailwind CSS v4 configured to use this library.
|
|
6
6
|
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📚 Full Documentation
|
|
10
|
+
|
|
11
|
+
Visit the [documentation site](https://neoptocom.github.io/neopto-ui/docs) for interactive examples and API documentation.
|
|
12
|
+
|
|
13
|
+
|
|
7
14
|
---
|
|
8
15
|
|
|
9
16
|
## 📦 Installation
|
|
@@ -129,8 +136,4 @@ document.documentElement.classList.toggle("dark");
|
|
|
129
136
|
|
|
130
137
|
**Solution:** Ensure the `@source` directive points to the library's **source files** (`/src`), not the compiled dist folder. The source files contain all the Tailwind utility classes that need to be scanned.
|
|
131
138
|
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## 📚 Full Documentation
|
|
135
|
-
|
|
136
|
-
Visit the [Storybook documentation](https://neoptocom.github.io/neopto-ui) for interactive examples and API documentation.
|
|
139
|
+
---
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# NeoPTO UI
|
|
2
2
|
|
|
3
|
-
A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive
|
|
3
|
+
A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive documentation.
|
|
4
4
|
|
|
5
5
|
> ⚠️ **Requirements:** This library requires **Tailwind CSS v4** and **@tailwindcss/postcss** in your project. See installation steps below.
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ A modern React component library built with Tailwind CSS v4 and TypeScript. Feat
|
|
|
11
11
|
- **Type Safe**: Full TypeScript support with exported types
|
|
12
12
|
- **Accessible**: Built with accessibility in mind
|
|
13
13
|
- **Tree Shakable**: Optimized bundle size with tree shaking
|
|
14
|
-
- **
|
|
14
|
+
- **Documentation**: Comprehensive documentation site with interactive examples
|
|
15
15
|
|
|
16
16
|
## 📦 Installation
|
|
17
17
|
|
|
@@ -195,12 +195,14 @@ The library uses a comprehensive design token system:
|
|
|
195
195
|
|
|
196
196
|
## 📚 Documentation
|
|
197
197
|
|
|
198
|
-
Visit our [
|
|
198
|
+
Visit our [documentation site](https://neoptocom.github.io/neopto-ui/docs) for:
|
|
199
199
|
|
|
200
200
|
- Interactive component playground
|
|
201
201
|
- Design system guidelines
|
|
202
202
|
- Usage examples
|
|
203
203
|
- Accessibility information
|
|
204
|
+
- Getting started guide
|
|
205
|
+
- Design tokens reference
|
|
204
206
|
|
|
205
207
|
## 🤝 Contributing
|
|
206
208
|
|
package/dist/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var React11 = require('react');
|
|
5
5
|
var reactDom = require('react-dom');
|
|
6
|
+
var lucideReact = require('lucide-react');
|
|
6
7
|
|
|
7
8
|
function _interopNamespace(e) {
|
|
8
9
|
if (e && e.__esModule) return e;
|
|
@@ -514,9 +515,12 @@ function getTypoClasses(weight = "normal", muted, className) {
|
|
|
514
515
|
semibold: "font-semibold",
|
|
515
516
|
bold: "font-bold"
|
|
516
517
|
};
|
|
518
|
+
const hasMarginRight = className?.includes("mr-");
|
|
519
|
+
const horizontalSpacing = hasMarginRight ? "" : "mr-2";
|
|
517
520
|
return [
|
|
518
521
|
weights[weight],
|
|
519
522
|
muted ? "text-[var(--muted-fg)]" : "",
|
|
523
|
+
horizontalSpacing,
|
|
520
524
|
className
|
|
521
525
|
].filter(Boolean).join(" ");
|
|
522
526
|
}
|
|
@@ -651,10 +655,10 @@ function AvatarGroup({
|
|
|
651
655
|
}
|
|
652
656
|
var roundMap = {
|
|
653
657
|
none: "rounded-none",
|
|
654
|
-
sm: "rounded
|
|
655
|
-
md: "rounded-
|
|
656
|
-
lg: "rounded-
|
|
657
|
-
xl: "rounded-
|
|
658
|
+
sm: "rounded",
|
|
659
|
+
md: "rounded-md",
|
|
660
|
+
lg: "rounded-lg",
|
|
661
|
+
xl: "rounded-xl",
|
|
658
662
|
full: "rounded-full"
|
|
659
663
|
};
|
|
660
664
|
function Skeleton({ className = "", rounded = "md", ...props }) {
|
|
@@ -1265,7 +1269,7 @@ function Chip({
|
|
|
1265
1269
|
title,
|
|
1266
1270
|
...props,
|
|
1267
1271
|
children: [
|
|
1268
|
-
icon ?
|
|
1272
|
+
icon ? icon : null,
|
|
1269
1273
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: label }),
|
|
1270
1274
|
onDelete ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1271
1275
|
"button",
|
|
@@ -1274,7 +1278,7 @@ function Chip({
|
|
|
1274
1278
|
onClick: onDelete,
|
|
1275
1279
|
className: "ml-1 flex h-4 w-4 items-center justify-center rounded-full transition-colors hover:bg-black/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-black/30 flex-shrink-0",
|
|
1276
1280
|
"aria-label": "Remove",
|
|
1277
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1281
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 12, className: "flex-shrink-0" })
|
|
1278
1282
|
}
|
|
1279
1283
|
) : null
|
|
1280
1284
|
]
|
|
@@ -1558,7 +1562,6 @@ var Breadcrumb = ({
|
|
|
1558
1562
|
}
|
|
1559
1563
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", className, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center flex-wrap", children: items.map((item, index) => {
|
|
1560
1564
|
const isLast = index === items.length - 1;
|
|
1561
|
-
const isFirst = index === 0;
|
|
1562
1565
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center", children: [
|
|
1563
1566
|
item.href && !isLast ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1564
1567
|
"a",
|
|
@@ -1572,8 +1575,7 @@ var Breadcrumb = ({
|
|
|
1572
1575
|
},
|
|
1573
1576
|
className: "group flex items-center gap-1 cursor-pointer text-[var(--muted-fg)]",
|
|
1574
1577
|
children: [
|
|
1575
|
-
|
|
1576
|
-
item.icon && !showHomeIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm" }),
|
|
1578
|
+
item.icon && item.icon,
|
|
1577
1579
|
/* @__PURE__ */ jsxRuntime.jsx(Typo, { variant: "label-md", bold: "semibold", className: "group-hover:underline", children: item.label })
|
|
1578
1580
|
]
|
|
1579
1581
|
}
|
|
@@ -1592,8 +1594,7 @@ var Breadcrumb = ({
|
|
|
1592
1594
|
} : void 0,
|
|
1593
1595
|
"aria-current": isLast ? "page" : void 0,
|
|
1594
1596
|
children: [
|
|
1595
|
-
|
|
1596
|
-
item.icon && !showHomeIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm" }),
|
|
1597
|
+
item.icon && item.icon,
|
|
1597
1598
|
/* @__PURE__ */ jsxRuntime.jsx(Typo, { variant: "label-md", bold: isLast ? "bold" : "semibold", className: item.onClick && !isLast ? "group-hover:underline" : "", children: item.label })
|
|
1598
1599
|
]
|
|
1599
1600
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -290,7 +290,7 @@ declare function Icon({ name, className, title, size, fill }: IconProps): react_
|
|
|
290
290
|
|
|
291
291
|
type ChipProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
292
292
|
variant?: "warning" | "success" | "error" | "light" | "dark";
|
|
293
|
-
icon?:
|
|
293
|
+
icon?: React.ReactNode;
|
|
294
294
|
label?: string;
|
|
295
295
|
/** Custom text color (overrides variant) */
|
|
296
296
|
textColor?: string;
|
|
@@ -366,7 +366,7 @@ interface BreadcrumbItem {
|
|
|
366
366
|
/** Optional href for navigation */
|
|
367
367
|
href?: string;
|
|
368
368
|
/** Optional icon name (Material Symbols) */
|
|
369
|
-
icon?:
|
|
369
|
+
icon?: React__default.ReactNode;
|
|
370
370
|
/** Optional click handler */
|
|
371
371
|
onClick?: () => void;
|
|
372
372
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -290,7 +290,7 @@ declare function Icon({ name, className, title, size, fill }: IconProps): react_
|
|
|
290
290
|
|
|
291
291
|
type ChipProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
292
292
|
variant?: "warning" | "success" | "error" | "light" | "dark";
|
|
293
|
-
icon?:
|
|
293
|
+
icon?: React.ReactNode;
|
|
294
294
|
label?: string;
|
|
295
295
|
/** Custom text color (overrides variant) */
|
|
296
296
|
textColor?: string;
|
|
@@ -366,7 +366,7 @@ interface BreadcrumbItem {
|
|
|
366
366
|
/** Optional href for navigation */
|
|
367
367
|
href?: string;
|
|
368
368
|
/** Optional icon name (Material Symbols) */
|
|
369
|
-
icon?:
|
|
369
|
+
icon?: React__default.ReactNode;
|
|
370
370
|
/** Optional click handler */
|
|
371
371
|
onClick?: () => void;
|
|
372
372
|
}
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React11 from 'react';
|
|
3
3
|
import { useState, useEffect, useMemo, useId, useRef, useCallback } from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
|
+
import { X } from 'lucide-react';
|
|
5
6
|
|
|
6
7
|
var __defProp = Object.defineProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
@@ -493,9 +494,12 @@ function getTypoClasses(weight = "normal", muted, className) {
|
|
|
493
494
|
semibold: "font-semibold",
|
|
494
495
|
bold: "font-bold"
|
|
495
496
|
};
|
|
497
|
+
const hasMarginRight = className?.includes("mr-");
|
|
498
|
+
const horizontalSpacing = hasMarginRight ? "" : "mr-2";
|
|
496
499
|
return [
|
|
497
500
|
weights[weight],
|
|
498
501
|
muted ? "text-[var(--muted-fg)]" : "",
|
|
502
|
+
horizontalSpacing,
|
|
499
503
|
className
|
|
500
504
|
].filter(Boolean).join(" ");
|
|
501
505
|
}
|
|
@@ -630,10 +634,10 @@ function AvatarGroup({
|
|
|
630
634
|
}
|
|
631
635
|
var roundMap = {
|
|
632
636
|
none: "rounded-none",
|
|
633
|
-
sm: "rounded
|
|
634
|
-
md: "rounded-
|
|
635
|
-
lg: "rounded-
|
|
636
|
-
xl: "rounded-
|
|
637
|
+
sm: "rounded",
|
|
638
|
+
md: "rounded-md",
|
|
639
|
+
lg: "rounded-lg",
|
|
640
|
+
xl: "rounded-xl",
|
|
637
641
|
full: "rounded-full"
|
|
638
642
|
};
|
|
639
643
|
function Skeleton({ className = "", rounded = "md", ...props }) {
|
|
@@ -1244,7 +1248,7 @@ function Chip({
|
|
|
1244
1248
|
title,
|
|
1245
1249
|
...props,
|
|
1246
1250
|
children: [
|
|
1247
|
-
icon ?
|
|
1251
|
+
icon ? icon : null,
|
|
1248
1252
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: label }),
|
|
1249
1253
|
onDelete ? /* @__PURE__ */ jsx(
|
|
1250
1254
|
"button",
|
|
@@ -1253,7 +1257,7 @@ function Chip({
|
|
|
1253
1257
|
onClick: onDelete,
|
|
1254
1258
|
className: "ml-1 flex h-4 w-4 items-center justify-center rounded-full transition-colors hover:bg-black/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-black/30 flex-shrink-0",
|
|
1255
1259
|
"aria-label": "Remove",
|
|
1256
|
-
children: /* @__PURE__ */ jsx(
|
|
1260
|
+
children: /* @__PURE__ */ jsx(X, { size: 12, className: "flex-shrink-0" })
|
|
1257
1261
|
}
|
|
1258
1262
|
) : null
|
|
1259
1263
|
]
|
|
@@ -1537,7 +1541,6 @@ var Breadcrumb = ({
|
|
|
1537
1541
|
}
|
|
1538
1542
|
return /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className, children: /* @__PURE__ */ jsx("ol", { className: "flex items-center flex-wrap", children: items.map((item, index) => {
|
|
1539
1543
|
const isLast = index === items.length - 1;
|
|
1540
|
-
const isFirst = index === 0;
|
|
1541
1544
|
return /* @__PURE__ */ jsxs("li", { className: "flex items-center", children: [
|
|
1542
1545
|
item.href && !isLast ? /* @__PURE__ */ jsxs(
|
|
1543
1546
|
"a",
|
|
@@ -1551,8 +1554,7 @@ var Breadcrumb = ({
|
|
|
1551
1554
|
},
|
|
1552
1555
|
className: "group flex items-center gap-1 cursor-pointer text-[var(--muted-fg)]",
|
|
1553
1556
|
children: [
|
|
1554
|
-
|
|
1555
|
-
item.icon && !showHomeIcon && /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }),
|
|
1557
|
+
item.icon && item.icon,
|
|
1556
1558
|
/* @__PURE__ */ jsx(Typo, { variant: "label-md", bold: "semibold", className: "group-hover:underline", children: item.label })
|
|
1557
1559
|
]
|
|
1558
1560
|
}
|
|
@@ -1571,8 +1573,7 @@ var Breadcrumb = ({
|
|
|
1571
1573
|
} : void 0,
|
|
1572
1574
|
"aria-current": isLast ? "page" : void 0,
|
|
1573
1575
|
children: [
|
|
1574
|
-
|
|
1575
|
-
item.icon && !showHomeIcon && /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }),
|
|
1576
|
+
item.icon && item.icon,
|
|
1576
1577
|
/* @__PURE__ */ jsx(Typo, { variant: "label-md", bold: isLast ? "bold" : "semibold", className: item.onClick && !isLast ? "group-hover:underline" : "", children: item.label })
|
|
1577
1578
|
]
|
|
1578
1579
|
}
|
package/dist/styles.css
CHANGED
|
@@ -21,10 +21,6 @@
|
|
|
21
21
|
--font-body: 'Roboto', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
|
|
22
22
|
--font-sans: var(--font-body, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif);
|
|
23
23
|
--color-brand: #22A9CB;
|
|
24
|
-
--radius-sm: 0.25rem;
|
|
25
|
-
--radius-md: 0.375rem;
|
|
26
|
-
--radius-lg: 0.5rem;
|
|
27
|
-
--radius-xl: 0.75rem;
|
|
28
24
|
--bg: #F3F4F6;
|
|
29
25
|
--surface: #FFFFFF;
|
|
30
26
|
--fg: #242832;
|
|
@@ -42,10 +38,6 @@
|
|
|
42
38
|
--font-body: 'Roboto', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
|
|
43
39
|
--font-sans: var(--font-body, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif);
|
|
44
40
|
--color-brand: #22A9CB;
|
|
45
|
-
--radius-sm: 0.25rem;
|
|
46
|
-
--radius-md: 0.375rem;
|
|
47
|
-
--radius-lg: 0.5rem;
|
|
48
|
-
--radius-xl: 0.75rem;
|
|
49
41
|
--bg: #F3F4F6;
|
|
50
42
|
--surface: #FFFFFF;
|
|
51
43
|
--fg: #242832;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neoptocom/neopto-ui",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.8",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive
|
|
5
|
+
"description": "A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive documentation. Requires Tailwind v4+.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
8
8
|
"components",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "https://github.com/neoptocom/neopto-ui.git"
|
|
20
20
|
},
|
|
21
|
-
"homepage": "https://github.
|
|
21
|
+
"homepage": "https://neoptocom.github.io/neopto-ui/docs",
|
|
22
22
|
"bugs": {
|
|
23
23
|
"url": "https://github.com/neoptocom/neopto-ui/issues"
|
|
24
24
|
},
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
"storybook": "storybook dev -p 6006",
|
|
51
51
|
"build-storybook": "storybook build",
|
|
52
52
|
"storybook:docs": "storybook build --docs --output-dir storybook-static && cp storybook-static/index.json storybook-static/docs.json",
|
|
53
|
+
"docs": "vite --config docs/vite.config.ts",
|
|
54
|
+
"build:docs": "vite build --config docs/vite.config.ts",
|
|
53
55
|
"prepublishOnly": "npm run build && npm run typecheck",
|
|
54
56
|
"changeset": "changeset",
|
|
55
57
|
"version-packages": "changeset version",
|
|
@@ -70,6 +72,7 @@
|
|
|
70
72
|
"@storybook/test": "^8.1.0",
|
|
71
73
|
"@tailwindcss/postcss": "^4.1.13",
|
|
72
74
|
"@tailwindcss/vite": "^4.1.13",
|
|
75
|
+
"@types/node": "^24.10.1",
|
|
73
76
|
"@types/react": "^18.2.0",
|
|
74
77
|
"@types/react-dom": "^18.2.0",
|
|
75
78
|
"@vitejs/plugin-react": "^5.0.3",
|
|
@@ -84,5 +87,9 @@
|
|
|
84
87
|
},
|
|
85
88
|
"publishConfig": {
|
|
86
89
|
"access": "public"
|
|
90
|
+
},
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"lucide-react": "^0.555.0",
|
|
93
|
+
"react-router-dom": "^7.9.6"
|
|
87
94
|
}
|
|
88
95
|
}
|