twico-ui 1.1.0 → 1.2.0
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/README.md +13 -1
- package/dist/icons.cjs +14 -0
- package/dist/icons.cjs.map +1 -0
- package/dist/icons.d.cts +1 -0
- package/dist/icons.d.ts +1 -0
- package/dist/icons.mjs +3 -0
- package/dist/icons.mjs.map +1 -0
- package/llms.txt +12 -4
- package/package.json +19 -2
package/README.md
CHANGED
|
@@ -164,10 +164,22 @@ const brand = indigo[500]; // "#6366f1"
|
|
|
164
164
|
|
|
165
165
|
Each hue is an object keyed by shade — a full `50`–`950` ramp (`50, 100, 200, … 900, 950`). These are static values — unlike the `--color-*` aliases, they do not flip in dark mode.
|
|
166
166
|
|
|
167
|
+
### Icons
|
|
168
|
+
|
|
169
|
+
Components take icons as React nodes (`leftIcon`, `icon`, …) — bring any icon set, or inline SVG. For convenience, **`twico-ui/icons`** re-exports the full [Lucide](https://lucide.dev) set (the icon language Twico UI is designed around):
|
|
170
|
+
|
|
171
|
+
```jsx
|
|
172
|
+
import { Home, Search } from "twico-ui/icons";
|
|
173
|
+
|
|
174
|
+
<Button leftIcon={<Home size={16} />}>Home</Button>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
This subpath needs the **optional peer** `lucide-react` (`npm install lucide-react`) and is tree-shakeable; the core `twico-ui` package stays zero-dependency.
|
|
178
|
+
|
|
167
179
|
## Components
|
|
168
180
|
|
|
169
181
|
**Buttons & actions:** Button, IconButton
|
|
170
|
-
**Layout:** Box, Stack, Grid, Container
|
|
182
|
+
**Layout:** AppShell, Box, Stack, Grid, Container, Divider
|
|
171
183
|
**Typography:** Heading, Text, Code
|
|
172
184
|
**Inputs:** Input, Textarea, Currency, CurrencyField, Select, MultiSelect, Combobox, Checkbox, Radio, Switch, Slider, Rating, FileUpload, DatePicker, DateRangePicker, ColorPicker
|
|
173
185
|
**Data display:** Card, Avatar, AvatarMenu, Badge, Tag, Stat, List, Timeline, Chart, Table, Pagination, Datatable, Kanban
|
package/dist/icons.cjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lucideReact = require('lucide-react');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.keys(lucideReact).forEach(function (k) {
|
|
8
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return lucideReact[k]; }
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=icons.cjs.map
|
|
14
|
+
//# sourceMappingURL=icons.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"icons.cjs","sourcesContent":[]}
|
package/dist/icons.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'lucide-react';
|
package/dist/icons.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'lucide-react';
|
package/dist/icons.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"icons.mjs","sourcesContent":[]}
|
package/llms.txt
CHANGED
|
@@ -161,11 +161,19 @@ function Page() {
|
|
|
161
161
|
|
|
162
162
|
## Icons
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
Components take icons as **React nodes** via props like `leftIcon`, `rightIcon`, `icon`, `header` —
|
|
165
|
+
bring any icon (inline SVG, or any icon library). Icons inherit `currentColor` and the control's size.
|
|
166
|
+
|
|
167
|
+
For convenience, **`twico-ui/icons` re-exports the full [Lucide](https://lucide.dev) icon set** (the
|
|
168
|
+
visual language Twico UI is built on). It needs the **optional peer** `lucide-react`
|
|
169
|
+
(`npm install lucide-react`) and is tree-shakeable — the core `twico-ui` package itself stays
|
|
170
|
+
zero-dependency. The icons are plain SVG components (no hooks), so they work in Server Components too.
|
|
167
171
|
|
|
168
172
|
```jsx
|
|
173
|
+
import { Home, Search } from "twico-ui/icons"; // needs the optional `lucide-react` peer
|
|
174
|
+
<Button leftIcon={<Home size={16} />}>Home</Button>
|
|
175
|
+
|
|
176
|
+
// …or pass your own inline SVG (no peer needed):
|
|
169
177
|
<Button leftIcon={<svg width="16" height="16" viewBox="0 0 24 24" /* … */ />}>Add item</Button>
|
|
170
178
|
```
|
|
171
179
|
|
|
@@ -2450,5 +2458,5 @@ export function useId(prefix?: string): string;
|
|
|
2450
2458
|
|
|
2451
2459
|
---
|
|
2452
2460
|
|
|
2453
|
-
_Generated by `scripts/gen-llms.mjs` from twico-ui v1.
|
|
2461
|
+
_Generated by `scripts/gen-llms.mjs` from twico-ui v1.2.0. Do not edit by hand — run `npm run gen:llms`. Source of truth: the component `.d.ts` files and `hooks/index.d.ts`._
|
|
2454
2462
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twico-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Twico UI — a free, modern, themeable React + Tailwind-friendly component library. 61 components with dark mode, motion, and accessibility built in.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Twico UI",
|
|
@@ -53,6 +53,16 @@
|
|
|
53
53
|
"default": "./dist/colors.cjs"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
+
"./icons": {
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./dist/icons.d.ts",
|
|
59
|
+
"default": "./dist/icons.mjs"
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"types": "./dist/icons.d.cts",
|
|
63
|
+
"default": "./dist/icons.cjs"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
56
66
|
"./styles.css": "./styles/twico-ui.css",
|
|
57
67
|
"./package.json": "./package.json"
|
|
58
68
|
},
|
|
@@ -80,7 +90,13 @@
|
|
|
80
90
|
},
|
|
81
91
|
"peerDependencies": {
|
|
82
92
|
"react": ">=18",
|
|
83
|
-
"react-dom": ">=18"
|
|
93
|
+
"react-dom": ">=18",
|
|
94
|
+
"lucide-react": ">=0.300.0"
|
|
95
|
+
},
|
|
96
|
+
"peerDependenciesMeta": {
|
|
97
|
+
"lucide-react": {
|
|
98
|
+
"optional": true
|
|
99
|
+
}
|
|
84
100
|
},
|
|
85
101
|
"overrides": {
|
|
86
102
|
"esbuild": "^0.28.1"
|
|
@@ -96,6 +112,7 @@
|
|
|
96
112
|
"@types/react": "^19.2.17",
|
|
97
113
|
"@types/react-dom": "^19.2.3",
|
|
98
114
|
"jsdom": "^29.1.1",
|
|
115
|
+
"lucide-react": "^1.21.0",
|
|
99
116
|
"semantic-release": "^25.0.5",
|
|
100
117
|
"size-limit": "^12.1.0",
|
|
101
118
|
"tsup": "^8.3.5",
|