wimui 0.2.0 → 0.4.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/dist/WimProvider.cjs +1 -1
- package/dist/WimProvider.d.ts +9 -2
- package/dist/WimProvider.js +27 -21
- package/dist/components/layout/Footer/Footer.cjs +1 -1
- package/dist/components/layout/Footer/Footer.d.ts +2 -0
- package/dist/components/layout/Footer/Footer.js +5 -5
- package/dist/components/layout/Footer/footer.module.cjs +1 -1
- package/dist/components/layout/Footer/footer.module.js +7 -6
- package/dist/components/layout/Header/Header.cjs +1 -1
- package/dist/components/layout/Header/Header.d.ts +2 -0
- package/dist/components/layout/Header/Header.js +5 -5
- package/dist/components/layout/Header/header.module.cjs +1 -1
- package/dist/components/layout/Header/header.module.js +10 -9
- package/dist/components/layout/Navbar/Navbar.cjs +1 -1
- package/dist/components/layout/Navbar/Navbar.d.ts +2 -0
- package/dist/components/layout/Navbar/Navbar.js +7 -7
- package/dist/components/layout/Navbar/navbar.module.cjs +1 -1
- package/dist/components/layout/Navbar/navbar.module.js +15 -14
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -2
- package/dist/llms-full.txt +2941 -0
- package/dist/llms.txt +415 -0
- package/dist/preset.cjs +2 -0
- package/dist/preset.d.ts +11 -0
- package/dist/preset.js +16 -0
- package/dist/styles.css +2 -2
- package/dist/tokens/generated/presets.cjs +2 -0
- package/dist/tokens/generated/presets.d.ts +19 -0
- package/dist/tokens/generated/presets.js +21 -0
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +2 -2
- package/package.json +20 -17
package/dist/llms.txt
ADDED
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
# WIM UI — LLM guide (llms.txt)
|
|
2
|
+
|
|
3
|
+
> Machine-readable map of the wimui React component library for coding agents. Read this before generating any UI with wimui: it defines the required CSS/setup, the correct import paths, the full component list, and the composition rules that keep screens from looking AI-generated.
|
|
4
|
+
|
|
5
|
+
## What this is
|
|
6
|
+
|
|
7
|
+
**wimui** v0.4.0 — a React 19 component library: 216 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
|
+
|
|
9
|
+
## Install & required setup
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i wimui
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
// 1. CSS contract — styles.css is REQUIRED (design tokens + component styles).
|
|
17
|
+
import "wimui/styles.css";
|
|
18
|
+
import "wimui/reset.css"; // optional base reset
|
|
19
|
+
|
|
20
|
+
// 2. Components — import from the root barrel or a category subpath (tree-shakeable).
|
|
21
|
+
import { Button, Card } from "wimui";
|
|
22
|
+
import { Stack, Grid } from "wimui/layout";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- **Theme**: wrap the app in `WimProvider` (recommended) or set `data-theme="light|dark"` on `<html>` (omit to follow OS).
|
|
26
|
+
- **Density**: `data-density="comfortable|compact"`, or `WimProvider` / `setWimDensity()`.
|
|
27
|
+
- **Never hardcode** colors / spacing / sizes in consumer code — use the `--wim-*` CSS custom properties (tokens) that styles.css defines.
|
|
28
|
+
- **Form + RHF** helpers live in `wimui/rhf` (react-hook-form + zod), not the root barrel.
|
|
29
|
+
|
|
30
|
+
## Import paths
|
|
31
|
+
|
|
32
|
+
Every component works from the root barrel `"wimui"`. For smaller bundles, import from its category subpath instead:
|
|
33
|
+
|
|
34
|
+
- `wimui/layout`
|
|
35
|
+
- `wimui/form`
|
|
36
|
+
- `wimui/feedback`
|
|
37
|
+
- `wimui/navigation`
|
|
38
|
+
- `wimui/data-display`
|
|
39
|
+
- `wimui/overlay`
|
|
40
|
+
- `wimui/typography`
|
|
41
|
+
- `wimui/media`
|
|
42
|
+
- `wimui/charts`
|
|
43
|
+
- `wimui/ai`
|
|
44
|
+
|
|
45
|
+
## Composition rules — build screens that don't look AI-generated
|
|
46
|
+
|
|
47
|
+
Single components are judged by state/a11y/token compliance. **Composed screens** are judged by hierarchy, rhythm, asymmetry and real-feeling content. Apply these whenever combining components into a screen, page, pattern or demo.
|
|
48
|
+
|
|
49
|
+
**Before laying out**: pick exactly ONE visual protagonist for the screen. If every element has the same volume, it reads as AI-generated.
|
|
50
|
+
|
|
51
|
+
**Banned patterns (the "AI signature" — do not emit):**
|
|
52
|
+
- `linear-gradient(135deg, …)` hero backgrounds → use surface-hierarchy tokens (`surface` / `surface-raised`) to separate planes.
|
|
53
|
+
- The stock hero (badge → big heading → subtext → two solid/outline buttons) → asymmetric composition led by one protagonist.
|
|
54
|
+
- "Rule of three" equal feature cards (icon + short heading + one line, ×3) → let the count follow content (2 or 5 is fine); vary card size and copy length.
|
|
55
|
+
- Emoji used as UI icons (☰ ★ ✓) → use `src/icon/` components. (Emoji as functional markers in docs/README is fine; as UI icons it is not.)
|
|
56
|
+
- Skeleton used as anything but loading (fake screenshots) → real-looking content or an actual mini UI.
|
|
57
|
+
- Every section center-aligned → default to left-aligned; at most one centered section per page.
|
|
58
|
+
- Round numbers ("1000+", "99%") + generic copy ("Get started", "seamless/powerful/effortless") → jagged realistic numbers (4,281) and product-specific voice.
|
|
59
|
+
- Sequential/alphabetical dummy names (Alice/Bob/Charlie, User 1/2) → culturally diverse, unordered, real-feeling names.
|
|
60
|
+
- Rainbow color-per-category → color carries state only (success/warning/danger); everything else neutral.
|
|
61
|
+
- Perfectly even grids (2×2, 3×3 all same size) → break the grid (span the protagonist cell, size differences, hero+sidebar asymmetry).
|
|
62
|
+
- Filling every slot / uniform gaps everywhere → leave whitespace; group by proximity (tight within a group, loose between groups).
|
|
63
|
+
|
|
64
|
+
**Must rules:**
|
|
65
|
+
1. One visual protagonist per screen (jump in size/weight/color creates the entry point).
|
|
66
|
+
2. Contrast density: hero/showcase sparse, data regions (tables/lists) dense. Uniform "medium density" reads as AI.
|
|
67
|
+
3. Never override a component's defaults via inline `style` (`padding:0`, `borderRadius:0`). Add a prop/token instead.
|
|
68
|
+
4. Never hardcode gap/padding/size — use `--wim-spacing-*` tokens.
|
|
69
|
+
5. Keep one radius stance per screen (`radius.component` / `radius.container` / `radius.overlay`); don't mix 0 and lg arbitrarily.
|
|
70
|
+
6. Limit accent color: primary surfaces (solid buttons, emphasis backgrounds) 1–2 per view.
|
|
71
|
+
7. Give demo content real substance (product-context copy, internally consistent numbers/dates/names — active ≤ total, dates not evenly spaced).
|
|
72
|
+
8. Add intentional "wobble": mix in 1–2 incomplete rows (a truncated long name, a missing optional field, an extreme value, an error/unread state) and show non-happy-path states (hover/focus/disabled/error/empty/loading).
|
|
73
|
+
|
|
74
|
+
## Recipes — copy-paste starting points
|
|
75
|
+
|
|
76
|
+
### 1. Required setup (the contract)
|
|
77
|
+
|
|
78
|
+
Without `styles.css` nothing is styled — this is the one step Storybook hides from you. Import it once at the app entry, wrap the tree in `WimProvider`, then build screens inside.
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
// main.tsx — app entry
|
|
82
|
+
import { createRoot } from "react-dom/client";
|
|
83
|
+
import "wimui/styles.css"; // REQUIRED: design tokens + component styles
|
|
84
|
+
import "wimui/reset.css"; // optional base reset
|
|
85
|
+
import { WimProvider } from "wimui";
|
|
86
|
+
import { App } from "./App";
|
|
87
|
+
|
|
88
|
+
// theme: "light" | "dark" | "system" (default). density: "comfortable" | "compact".
|
|
89
|
+
createRoot(document.getElementById("root")!).render(
|
|
90
|
+
<WimProvider theme="system" density="comfortable">
|
|
91
|
+
<App />
|
|
92
|
+
</WimProvider>,
|
|
93
|
+
);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```tsx
|
|
97
|
+
// App.tsx — app frame. AppShell wires header/sidebar; page content is children.
|
|
98
|
+
import { AppShell, Header, Sidebar, Stack, Title, Text, Button } from "wimui";
|
|
99
|
+
|
|
100
|
+
export function App() {
|
|
101
|
+
return (
|
|
102
|
+
<AppShell
|
|
103
|
+
header={<Header sticky bordered><Title tag="h1" size="md">Larkfield</Title></Header>}
|
|
104
|
+
sidebar={
|
|
105
|
+
<Sidebar width={240}>
|
|
106
|
+
<Stack gap="2xs" p="md">
|
|
107
|
+
<Button variant="ghost" justify="start" fullWidth>Overview</Button>
|
|
108
|
+
<Button variant="ghost" justify="start" fullWidth>Customers</Button>
|
|
109
|
+
<Button variant="ghost" justify="start" fullWidth>Settings</Button>
|
|
110
|
+
</Stack>
|
|
111
|
+
</Sidebar>
|
|
112
|
+
}
|
|
113
|
+
>
|
|
114
|
+
<Stack gap="lg">
|
|
115
|
+
<Title tag="h2" size="lg">Overview</Title>
|
|
116
|
+
<Text color="secondary">Spacing/size/color come from --wim-* tokens via props — never hardcode px/hex.</Text>
|
|
117
|
+
</Stack>
|
|
118
|
+
</AppShell>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 2. A composed content screen
|
|
124
|
+
|
|
125
|
+
One protagonist (the KPI row), a dense table below, tokens via props, jagged real data, and one deliberately incomplete row. Note the compound components (`Stats.Value`, `Table.Head`) and that `Grid` uses `cols` (not `columns`).
|
|
126
|
+
|
|
127
|
+
```tsx
|
|
128
|
+
import { Stack, Grid, Card, Stats, Table, Badge, Title, Text } from "wimui";
|
|
129
|
+
|
|
130
|
+
const rows = [
|
|
131
|
+
{ id: "in_9f2a", name: "Marisol Okonkwo", plan: "Scale", amount: "$4,610.50", status: "paid" },
|
|
132
|
+
{ id: "in_7b41", name: "Dmitri Sørensen", plan: "Enterprise", amount: "$12,199.00", status: "failed" },
|
|
133
|
+
{ id: "in_2a90", name: "Thomas O'Reilly", plan: null, amount: "$89.00", status: "pending" }, // incomplete row
|
|
134
|
+
];
|
|
135
|
+
const intent = { paid: "success", failed: "danger", pending: undefined } as const;
|
|
136
|
+
|
|
137
|
+
export function BillingOverview() {
|
|
138
|
+
return (
|
|
139
|
+
<Stack gap="lg">
|
|
140
|
+
<Title tag="h2" size="lg">Billing</Title>
|
|
141
|
+
|
|
142
|
+
{/* Protagonist: KPI row. Uneven content per tile — not three clones. */}
|
|
143
|
+
<Grid cols={{ base: 1, sm: 2, lg: 3 }} gap="md">
|
|
144
|
+
<Stats><Stats.Label>MRR</Stats.Label><Stats.Value>$48,210</Stats.Value><Stats.Trend>+6.4%</Stats.Trend></Stats>
|
|
145
|
+
<Stats><Stats.Label>Active workspaces</Stats.Label><Stats.Value>1,204</Stats.Value><Stats.Description>176 idle over 30 days</Stats.Description></Stats>
|
|
146
|
+
<Stats><Stats.Label>Failed webhooks</Stats.Label><Stats.Value>137</Stats.Value><Stats.Trend>+23 today</Stats.Trend></Stats>
|
|
147
|
+
</Grid>
|
|
148
|
+
|
|
149
|
+
{/* Dense data region */}
|
|
150
|
+
<Card padding="none">
|
|
151
|
+
<Table hoverable fullWidth>
|
|
152
|
+
<Table.Header>
|
|
153
|
+
<Table.Row>
|
|
154
|
+
<Table.Head>Customer</Table.Head><Table.Head>Plan</Table.Head>
|
|
155
|
+
<Table.Head>Amount</Table.Head><Table.Head>Status</Table.Head>
|
|
156
|
+
</Table.Row>
|
|
157
|
+
</Table.Header>
|
|
158
|
+
<Table.Body>
|
|
159
|
+
{rows.map((r) => (
|
|
160
|
+
<Table.Row key={r.id}>
|
|
161
|
+
<Table.Cell>{r.name}</Table.Cell>
|
|
162
|
+
<Table.Cell>{r.plan ?? <Text color="tertiary">—</Text>}</Table.Cell>
|
|
163
|
+
<Table.Cell>{r.amount}</Table.Cell>
|
|
164
|
+
<Table.Cell><Badge variant="subtle" intent={intent[r.status]}>{r.status}</Badge></Table.Cell>
|
|
165
|
+
</Table.Row>
|
|
166
|
+
))}
|
|
167
|
+
</Table.Body>
|
|
168
|
+
</Table>
|
|
169
|
+
</Card>
|
|
170
|
+
</Stack>
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
> More verified full-screen recipes (auth sign-in, settings form, empty state, filtered data table, onboarding) and per-category idioms (form, navigation, feedback, overlay) are in `llms-full.txt`.
|
|
176
|
+
## Components
|
|
177
|
+
|
|
178
|
+
### layout — `import { … } from "wimui/layout"`
|
|
179
|
+
|
|
180
|
+
- **AppShell** — Basic application shell layout
|
|
181
|
+
- **AspectRatio** — Fixed ratio container
|
|
182
|
+
- **BentoGrid** — Modern card grid
|
|
183
|
+
- **Box** — Polymorphic box
|
|
184
|
+
- **Center** — Radial centering
|
|
185
|
+
- **Container** — Layout wrapper
|
|
186
|
+
- **Dashboard** — Arranges widgets in a configurable grid with an edit mode for adding, removing, and resizing them.
|
|
187
|
+
- **Divider** — Content separator
|
|
188
|
+
- **Flex** — Flexible layout
|
|
189
|
+
- **Footer** — Lower navigation
|
|
190
|
+
- **Grid** — Flexbox or CSS Grid system
|
|
191
|
+
- **Group** — Flexible grouping
|
|
192
|
+
- **Header** — Upper navigation
|
|
193
|
+
- **InteractiveArea** — Interactive empty/drop zone area
|
|
194
|
+
- **Masonry** — Waterfall grid
|
|
195
|
+
- **Navbar** — Primary navigation
|
|
196
|
+
- **ScrollArea** — A custom scrollbar component that provides high-performance, cross-browser consistent themes while maintaining a native-like feel.
|
|
197
|
+
- **Sidebar** — A collapsible navigation or informational panel on the side of the screen
|
|
198
|
+
- **SimpleGrid** — Responsive fixed grid
|
|
199
|
+
- **Splitter** — Split and resize panels
|
|
200
|
+
- **Stack** — Vertical/Horizontal alignment
|
|
201
|
+
- **Toolbar** — Action strip for IconButton, ToggleGroup, and related controls with toolbar keyboard navigation.
|
|
202
|
+
- **Transition** — Utilities for managing smooth enter and leave animations with CSS classes
|
|
203
|
+
- **VisuallyHidden** — Hide content visually while keeping it accessible to screen readers
|
|
204
|
+
- **Watermark** — Translucent text or images overlaid on content to indicate ownership or status
|
|
205
|
+
|
|
206
|
+
### form — `import { … } from "wimui/form"`
|
|
207
|
+
|
|
208
|
+
- **Button** — Action triggers
|
|
209
|
+
- **ButtonGroup** — Group of buttons
|
|
210
|
+
- **Cascader** — Hierarchical selection
|
|
211
|
+
- **Checkbox** — Multiple choice
|
|
212
|
+
- **CheckboxGroup** — Shared state checkboxes
|
|
213
|
+
- **ColorInput** — Input with color preview
|
|
214
|
+
- **ColorPicker** — Color selection picker
|
|
215
|
+
- **Combobox** — Select with search
|
|
216
|
+
- **CopyButton** — Copy to clipboard
|
|
217
|
+
- **CounterTextarea** — Textarea with character count display
|
|
218
|
+
- **CreditCardInput** — Payment card input with brand detection
|
|
219
|
+
- **DatePicker** — Date selection
|
|
220
|
+
- **DateRangePicker** — Date range selection
|
|
221
|
+
- **Dropzone** — Drag & drop files
|
|
222
|
+
- **FieldError** — Validation messages
|
|
223
|
+
- **Fieldset** — Form grouping
|
|
224
|
+
- **FieldTemplate** — Standardizes label placement, required markings, and error message display for all form-related components.
|
|
225
|
+
- **FileUpload** — File selection
|
|
226
|
+
- **FloatButton** — Floating action buttons
|
|
227
|
+
- **IconButton** — Icon-only button
|
|
228
|
+
- **ImageCropper** — Front-end image crop and rotate tool
|
|
229
|
+
- **InlineEdit** — A component that allows users to switch between a view-only mode and an editable mode in-place.
|
|
230
|
+
- **Input** — Single-line input fields for text, numbers, or emails
|
|
231
|
+
- **InputBase** — Standardizes the visual container, icon slots (Prefix/Suffix), and clear button behavior for text-based inputs.
|
|
232
|
+
- **InputGroup** — Inputs with icons/labels
|
|
233
|
+
- **InputMask** — Formatted inputs
|
|
234
|
+
- **LinkButton** — Anchor styled as button
|
|
235
|
+
- **Mentions** — @ / # suggestions
|
|
236
|
+
- **MultiSelect** — Multiple selection
|
|
237
|
+
- **NumberInput** — Input with step adjustments
|
|
238
|
+
- **OtpInput** — One-time password fields
|
|
239
|
+
- **PasswordInput** — Password with toggle
|
|
240
|
+
- **PasswordStrength** — Visual meter to indicate password security level
|
|
241
|
+
- **PhoneInput** — International phone number input
|
|
242
|
+
- **QueryBuilder** — Visual builder for constructing complex search queries.
|
|
243
|
+
- **Radio** — Single choice
|
|
244
|
+
- **RadioGroup** — Shared state radio buttons
|
|
245
|
+
- **RangeSlider** — Range selection
|
|
246
|
+
- **Rating** — Star rating
|
|
247
|
+
- **RichTextEditor** — WYSIWYG rich text editor
|
|
248
|
+
- **SearchInput** — Search with clear button
|
|
249
|
+
- **SegmentedControl** — Button-style controls for switching between a small set of mutually exclusive options
|
|
250
|
+
- **Select** — A dropdown menu for selecting one option from a predefined list
|
|
251
|
+
- **SignaturePad** — Handwritten signature input
|
|
252
|
+
- **Slider** — An input to capture a numeric value from a specified range by dragging a knob
|
|
253
|
+
- **SmartSearchInput** — Smart search input enabling both traditional search and AI prompting.
|
|
254
|
+
- **Switch** — A binary switch for instantly toggling settings between on and off states
|
|
255
|
+
- **SwitchGroup** — Shared state switches
|
|
256
|
+
- **TagInput** — Field for entering free-form text as tags
|
|
257
|
+
- **Textarea** — Multi-line input fields for longer text entries like descriptions or comments
|
|
258
|
+
- **ThemeToggle** — Light / dark / system theme switcher
|
|
259
|
+
- **TimePicker** — Time selection
|
|
260
|
+
- **ToggleGroup** — Toggleable buttons
|
|
261
|
+
- **Transfer** — Move items between lists
|
|
262
|
+
- **TreeSelect** — Select from tree structure
|
|
263
|
+
|
|
264
|
+
### feedback — `import { … } from "wimui/feedback"`
|
|
265
|
+
|
|
266
|
+
- **Alert** — Important messages
|
|
267
|
+
- **Autosave** — Inline status indicator for automatic save state
|
|
268
|
+
- **Banner** — Top prominent messages
|
|
269
|
+
- **ErrorBoundary** — Runtime error fallback
|
|
270
|
+
- **Indicator** — Small status dots
|
|
271
|
+
- **Loader** — Animated indicators to show that data is loading or processing
|
|
272
|
+
- **LoadingOverlay** — Overlay with loading indicator
|
|
273
|
+
- **Notification** — Rich notification card
|
|
274
|
+
- **Progress** — Progress bar
|
|
275
|
+
- **Result** — Task status indicator
|
|
276
|
+
- **ScrollProgress** — Reading progress indicator
|
|
277
|
+
- **Skeleton** — Placeholder for content loading states.
|
|
278
|
+
- **Snackbar** — Bottom notifications
|
|
279
|
+
- **Spinner** — A rotating icon indicating background activity or data fetching
|
|
280
|
+
- **Toast** — Non-intrusive floating messages that provide feedback on system operations
|
|
281
|
+
- **Tour** — Sequential guided walkthroughs to onboard users or highlight features
|
|
282
|
+
|
|
283
|
+
### navigation — `import { … } from "wimui/navigation"`
|
|
284
|
+
|
|
285
|
+
- **Affix** — Sticky elements
|
|
286
|
+
- **Anchor** — Smooth scroll links
|
|
287
|
+
- **BackTop** — Back to top button
|
|
288
|
+
- **Breadcrumb** — Location trace
|
|
289
|
+
- **CommandPalette** — Cmd+K search overlay
|
|
290
|
+
- **HamburgerMenu** — Toggleable menu
|
|
291
|
+
- **KeyboardShortcuts** — Display a structured list of keyboard shortcuts
|
|
292
|
+
- **Link** — Hyperlinks
|
|
293
|
+
- **Menubar** — Desktop-style application menu bar with floating File / Edit / View submenus.
|
|
294
|
+
- **Pagination** — Multi-page navigation
|
|
295
|
+
- **SpeedDial** — Floating action button that expands sub-actions on hover or click.
|
|
296
|
+
- **Stepper** — Visual sequence steps
|
|
297
|
+
- **TabBar** — Mobile bottom navigation
|
|
298
|
+
- **TabNavigation** — Tab-based navigation
|
|
299
|
+
- **Tabs** — A container to organize related content into switchable view panels
|
|
300
|
+
|
|
301
|
+
### data-display — `import { … } from "wimui/data-display"`
|
|
302
|
+
|
|
303
|
+
- **Accordion** — Collapsible panels
|
|
304
|
+
- **Avatar** — Profile initials/pics
|
|
305
|
+
- **AvatarGroup** — Stacked avatars
|
|
306
|
+
- **Badge** — Indicators or counts
|
|
307
|
+
- **Calendar** — Calendar view
|
|
308
|
+
- **CalendarHeatmap** — GitHub-style activity graph for visualizing continuity
|
|
309
|
+
- **Card** — Information containers
|
|
310
|
+
- **Carousel** — Content slideshow
|
|
311
|
+
- **Chip** — Filter/Selection tokens
|
|
312
|
+
- **Countdown** — Display the remaining time until a target moment as a live ticking timer, for sale deadlines, OTP resend waits, and maintenance notices.
|
|
313
|
+
- **DataGrid** — Advanced data table and manipulation
|
|
314
|
+
- **DescriptionList** — Key-value pairs
|
|
315
|
+
- **EmptyState** — Missing data placeholder
|
|
316
|
+
- **FAQSection** — Frequently Asked Questions section
|
|
317
|
+
- **InfiniteScroll** — Infinite scroll control
|
|
318
|
+
- **JsonDiffViewer** — Compares two JSON values as a formatted side-by-side or unified diff, built on top of CodeDiffViewer.
|
|
319
|
+
- **JsonViewer** — Recursive tree viewer and editor for JSON data.
|
|
320
|
+
- **Kanban** — Drag-and-drop board for visualizing workflow stages
|
|
321
|
+
- **Leaderboard** — Display a ranked list of entries with scores and medal highlights for the top three positions.
|
|
322
|
+
- **List** — Structurally organized items in bullet points or numbered formats
|
|
323
|
+
- **Markdown** — A component for safely rendering text in Markdown format.
|
|
324
|
+
- **Marquee** — Scrolling text animation
|
|
325
|
+
- **NodeGraph** — Interactive node-based flowchart and pipeline editor
|
|
326
|
+
- **PullToRefresh** — Pull-to-refresh utility for enhancing mobile user experience.
|
|
327
|
+
- **QRCode** — QR generator
|
|
328
|
+
- **RangeCalendar** — Range calendar view
|
|
329
|
+
- **Reaction** — Display emoji reaction buttons with toggleable state and counts
|
|
330
|
+
- **RelativeTime** — Display a timestamp as a localized relative phrase ("3 minutes ago", "yesterday") that updates automatically as time passes.
|
|
331
|
+
- **ScheduleView** — Time-grid calendar with drag-and-drop scheduling
|
|
332
|
+
- **SortableList** — Item rearrangement and reordering
|
|
333
|
+
- **Stats** — A component to highlight key performance indicators and metrics
|
|
334
|
+
- **SwipeAction** — Mobile-friendly swipe actions (delete, archive) for list items.
|
|
335
|
+
- **Table** — Rows and columns for displaying structured data efficiently
|
|
336
|
+
- **Tag** — Compact visual descriptors used for labeling or categorizing content
|
|
337
|
+
- **Timeline** — A vertical list mapping events or history in chronological order
|
|
338
|
+
- **TreeView** — Hierarchical data
|
|
339
|
+
- **VirtualList** — Efficiently renders large lists by virtualizing off-screen items
|
|
340
|
+
|
|
341
|
+
### overlay — `import { … } from "wimui/overlay"`
|
|
342
|
+
|
|
343
|
+
- **BottomSheet** — Mobile bottom overlay
|
|
344
|
+
- **ContextMenu** — Right-click menus
|
|
345
|
+
- **Dialog** — Focused task windows
|
|
346
|
+
- **Drawer** — Slide-out detail panels
|
|
347
|
+
- **Dropdown** — Overlay selection menu
|
|
348
|
+
- **FocusTrap** — Focus management
|
|
349
|
+
- **HoverCard** — Rich content on hover
|
|
350
|
+
- **Menu** — General menus
|
|
351
|
+
- **Popconfirm** — Confirmation overlay
|
|
352
|
+
- **Popover** — Contextual overlay
|
|
353
|
+
- **Portal** — Out-of-hierarchy render
|
|
354
|
+
- **Tooltip** — Information on hover
|
|
355
|
+
|
|
356
|
+
### typography — `import { … } from "wimui/typography"`
|
|
357
|
+
|
|
358
|
+
- **Blockquote** — Visually separates external quotes or text to be emphasized.
|
|
359
|
+
- **Code** — Code snippets
|
|
360
|
+
- **Highlight** — Text highlighting
|
|
361
|
+
- **Kbd** — Keyboard shortcuts
|
|
362
|
+
- **Label** — Descriptive text for input fields, including required/optional marks
|
|
363
|
+
- **Legend** — Group title
|
|
364
|
+
- **Span** — Lightweight wrapper for inline text or short labels with icon support
|
|
365
|
+
- **Spoiler** — Collapse long text such as reviews and comments to a fixed number of lines, with an accessible "show more" toggle that appears only when the text overflows.
|
|
366
|
+
- **Text** — Has appropriate line-height and spacing to ensure readability of long text.
|
|
367
|
+
- **Title** — Possesses visual weight (boldness/size) to indicate page structure.
|
|
368
|
+
|
|
369
|
+
### media — `import { … } from "wimui/media"`
|
|
370
|
+
|
|
371
|
+
- **Audio** — Audio playback
|
|
372
|
+
- **Gallery** — Displays a responsive image grid with configurable columns, aspect ratios, multi-select, and an optional lightbox.
|
|
373
|
+
- **Icon** — Visual symbols
|
|
374
|
+
- **Image** — Image content
|
|
375
|
+
- **ImageCompare** — ImageCompare overlays two images and reveals them with a draggable divider — a before/after slider for comparing edits, restorations, or AI-generated results against their source.
|
|
376
|
+
- **Lightbox** — A high-quality overlay component for displaying images and media with gallery and zoom functionality.
|
|
377
|
+
- **Video** — A component for embedding and controlling local or remote video content
|
|
378
|
+
|
|
379
|
+
### charts — `import { … } from "wimui/charts"`
|
|
380
|
+
|
|
381
|
+
- **AreaChart** — Area charts
|
|
382
|
+
- **BarChart** — Bar charts
|
|
383
|
+
- **FunnelChart** — Process stage abandonment chart
|
|
384
|
+
- **GanttChart** — Project schedule and timeline visualization
|
|
385
|
+
- **GaugeChart** — KPI goal achievement chart
|
|
386
|
+
- **Heatmap** — Graphical representation of data where individual values are contained in a matrix as colors.
|
|
387
|
+
- **LineChart** — Line charts
|
|
388
|
+
- **PieChart** — Proportional parts of a whole chart
|
|
389
|
+
- **RadarChart** — Multivariate data on concentric axes chart
|
|
390
|
+
- **ScatterChart** — Scatter plots
|
|
391
|
+
- **Sparkline** — Tiny inline trend chart
|
|
392
|
+
- **Treemap** — Hierarchical data area-based display
|
|
393
|
+
|
|
394
|
+
### ai — `import { … } from "wimui/ai"`
|
|
395
|
+
|
|
396
|
+
- **AgentStatus** — Real-time agent state indicator (thinking / running / waiting)
|
|
397
|
+
- **AIResponseFeedback** — Thumbs-up/down feedback controls and regenerate button for AI responses.
|
|
398
|
+
- **ArtifactsOverlay** — ArtifactsOverlay is a specialized side-panel for displaying large AI-generated content (Artifacts) without interrupting the main chat context.
|
|
399
|
+
- **ChatUI** — A comprehensive set of components for building chat interfaces with support for messages, avatars, timestamps, and interactive input.
|
|
400
|
+
- **CodeBlock** — Syntax-highlighted code block with copy button, line numbers, and collapsible overflow.
|
|
401
|
+
- **CodeDiffViewer** — Displays code changes as a side-by-side or unified diff, with line-level highlighting and Apply/Reject actions.
|
|
402
|
+
- **InteractiveGraph** — InteractiveGraph provides a canvas for visualizing node-based data. Ideal for RAG knowledge bases, agent workflows, or state machines.
|
|
403
|
+
- **MarkdownRenderer** — MarkdownRenderer converts a markdown string into WIM UI components. It uses react-markdown under the hood and applies WIM's typography system.
|
|
404
|
+
- **ModelSelector** — ModelSelector is a dropdown for switching between AI models, surfacing the metadata that matters when choosing one — context window size and per-token pricing.
|
|
405
|
+
- **PromptInput** — Auto-resizing prompt input with send and attachment actions
|
|
406
|
+
- **SourceCitation** — Displays cited sources with title, domain, and external link for AI-generated content.
|
|
407
|
+
- **StreamingText** — Streaming Markdown renderer for AI-generated responses
|
|
408
|
+
- **Terminal** — Renders terminal-style output with ANSI color support, prompt prefixes, and copy/clear controls.
|
|
409
|
+
- **ThoughtProcess** — Visualizes AI reasoning steps and execution states in a timeline format.
|
|
410
|
+
- **ThreadList** — ThreadList renders a conversation-history sidebar for AI chat apps — a scrollable list of past threads with an optional new-conversation action and per-thread deletion.
|
|
411
|
+
- **UsageMeter** — UsageMeter (also exported as TokenCounter) visualizes token consumption against a budget such as a model's context window — a labeled bar plus a numeric readout that shifts to warning and danger colors near the limit.
|
|
412
|
+
- **VoiceVisualizer** — Animated voice-level indicator (bars / waveform)
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
For per-component props, types and defaults, see `llms-full.txt`.
|
package/dist/preset.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e=require("./tokens/generated/presets.cjs");var t=`data-wim-preset`,n=new Set(e.WIM_PRESETS.map(e=>e.name));function r(e=void 0){if(typeof document>`u`)return`none`;let r=(e??document.documentElement).getAttribute?.(t);return r&&n.has(r)?r:`none`}function i(e,r=void 0){if(typeof document>`u`)return;let i=r??document.documentElement;e===`none`||!n.has(e)?i.removeAttribute(t):i.setAttribute(t,e)}exports.WIM_PRESETS=e.WIM_PRESETS,exports.getWimPreset=r,exports.setWimPreset=i;
|
package/dist/preset.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WIM_PRESETS, WimPresetName } from './tokens/generated/presets';
|
|
2
|
+
export { WIM_PRESETS };
|
|
3
|
+
export type { WimPresetName };
|
|
4
|
+
/** A preset name, or `none` for the default (no preset). */
|
|
5
|
+
export type WimPreset = WimPresetName | "none";
|
|
6
|
+
export declare function getWimPreset(root?: ParentNode | null | undefined): WimPreset;
|
|
7
|
+
/**
|
|
8
|
+
* Apply a preset to an element (defaults to `document.documentElement`).
|
|
9
|
+
* `none` (or an unknown name) removes the attribute.
|
|
10
|
+
*/
|
|
11
|
+
export declare function setWimPreset(preset: WimPreset, root?: Element | null | undefined): void;
|
package/dist/preset.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { WIM_PRESETS as e } from "./tokens/generated/presets.js";
|
|
3
|
+
//#region src/preset.ts
|
|
4
|
+
var t = "data-wim-preset", n = new Set(e.map((e) => e.name));
|
|
5
|
+
function r(e = void 0) {
|
|
6
|
+
if (typeof document > "u") return "none";
|
|
7
|
+
let r = (e ?? document.documentElement).getAttribute?.(t);
|
|
8
|
+
return r && n.has(r) ? r : "none";
|
|
9
|
+
}
|
|
10
|
+
function i(e, r = void 0) {
|
|
11
|
+
if (typeof document > "u") return;
|
|
12
|
+
let i = r ?? document.documentElement;
|
|
13
|
+
e === "none" || !n.has(e) ? i.removeAttribute(t) : i.setAttribute(t, e);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as WIM_PRESETS, r as getWimPreset, i as setWimPreset };
|