@todovue/tv-ui 0.1.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/LICENSE +21 -0
- package/README.md +207 -0
- package/dist/.htaccess +8 -0
- package/dist/demos/tv-alert/CHANGELOG.md +127 -0
- package/dist/demos/tv-alert/README.md +334 -0
- package/dist/demos/tv-article/CHANGELOG.md +221 -0
- package/dist/demos/tv-article/README.md +258 -0
- package/dist/demos/tv-breadcrumbs/CHANGELOG.md +135 -0
- package/dist/demos/tv-breadcrumbs/README.md +364 -0
- package/dist/demos/tv-button/CHANGELOG.md +158 -0
- package/dist/demos/tv-button/README.md +255 -0
- package/dist/demos/tv-card/CHANGELOG.md +158 -0
- package/dist/demos/tv-card/README.md +332 -0
- package/dist/demos/tv-demo/CHANGELOG.md +352 -0
- package/dist/demos/tv-demo/README.md +229 -0
- package/dist/demos/tv-footer/CHANGELOG.md +67 -0
- package/dist/demos/tv-footer/README.md +760 -0
- package/dist/demos/tv-hero/CHANGELOG.md +137 -0
- package/dist/demos/tv-hero/README.md +410 -0
- package/dist/demos/tv-label/CHANGELOG.md +138 -0
- package/dist/demos/tv-label/README.md +357 -0
- package/dist/demos/tv-menu/CHANGELOG.md +145 -0
- package/dist/demos/tv-menu/README.md +389 -0
- package/dist/demos/tv-modal/CHANGELOG.md +127 -0
- package/dist/demos/tv-modal/README.md +466 -0
- package/dist/demos/tv-pagination/CHANGELOG.md +125 -0
- package/dist/demos/tv-pagination/README.md +275 -0
- package/dist/demos/tv-progress-bar/CHANGELOG.md +84 -0
- package/dist/demos/tv-progress-bar/README.md +894 -0
- package/dist/demos/tv-relative-time/CHANGELOG.md +122 -0
- package/dist/demos/tv-relative-time/README.md +405 -0
- package/dist/demos/tv-scroll-top/CHANGELOG.md +69 -0
- package/dist/demos/tv-scroll-top/README.md +445 -0
- package/dist/demos/tv-search/CHANGELOG.md +155 -0
- package/dist/demos/tv-search/README.md +407 -0
- package/dist/demos/tv-settings/CHANGELOG.md +94 -0
- package/dist/demos/tv-settings/README.md +314 -0
- package/dist/demos/tv-sidebar/CHANGELOG.md +229 -0
- package/dist/demos/tv-sidebar/README.md +592 -0
- package/dist/demos/tv-theme-button/CHANGELOG.md +136 -0
- package/dist/demos/tv-theme-button/README.md +392 -0
- package/dist/demos/tv-toc/CHANGELOG.md +80 -0
- package/dist/demos/tv-toc/README.md +288 -0
- package/dist/entry.d.ts +48 -0
- package/dist/favicon.ico +0 -0
- package/dist/tv-ui.cjs.js +1 -0
- package/dist/tv-ui.css +1 -0
- package/dist/tv-ui.d.ts +6 -0
- package/dist/tv-ui.es.js +92 -0
- package/nuxt.js +58 -0
- package/package.json +92 -0
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
<p align="center"><img width="150" src="https://res.cloudinary.com/dcdfhi8qz/image/upload/v1763663056/uqqtkgp1lg3xdplutpga.png" alt="TODOvue logo">
|
|
2
|
+
</p>
|
|
3
|
+
|
|
4
|
+
# TODOvue Breadcrumbs (TvBreadcrumbs)
|
|
5
|
+
A flexible, framework‑agnostic Vue 3 breadcrumb navigation component with auto-generation from routes, custom separators, max items control, and full customization. Works seamlessly in Single Page Apps or Server-Side Rendered (SSR) environments (e.g. Nuxt 3).
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@todovue/tv-breadcrumbs)
|
|
8
|
+
[](https://www.npmjs.com/package/@todovue/tv-breadcrumbs)
|
|
9
|
+
[](https://www.npmjs.com/package/@todovue/tv-breadcrumbs)
|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
> Demo: https://ui.todovue.blog/breadcrumbs
|
|
18
|
+
|
|
19
|
+
## Table of Contents
|
|
20
|
+
- [Features](#features)
|
|
21
|
+
- [Installation](#installation)
|
|
22
|
+
- [Quick Start (SPA)](#quick-start-spa)
|
|
23
|
+
- [Nuxt 4 / SSR Usage](#nuxt-4--ssr-usage)
|
|
24
|
+
- [Component Registration Options](#component-registration-options)
|
|
25
|
+
- [Props](#props)
|
|
26
|
+
- [Events](#events)
|
|
27
|
+
- [Slots](#slots)
|
|
28
|
+
- [Auto-Generate Mode](#auto-generate-mode)
|
|
29
|
+
- [Max Items & Ellipsis](#max-items--ellipsis)
|
|
30
|
+
- [Router Integration](#router-integration)
|
|
31
|
+
- [Customization (Styles / Theming)](#customization-styles--theming)
|
|
32
|
+
- [Accessibility](#accessibility)
|
|
33
|
+
- [SSR Notes](#ssr-notes)
|
|
34
|
+
- [Development](#development)
|
|
35
|
+
- [Contributing](#contributing)
|
|
36
|
+
- [License](#license)
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
- **Manual items**: Provide a static array of breadcrumb items
|
|
40
|
+
- **Auto-generation**: Automatically generate breadcrumbs from Vue Router routes
|
|
41
|
+
- **Max items control**: Collapse long breadcrumb trails with ellipsis (`…`)
|
|
42
|
+
- **Custom separators**: Choose your own separator character or component
|
|
43
|
+
- **Customizable slots**: Override item, current item, and separator rendering
|
|
44
|
+
- **Router integration**: Automatically integrates with Vue Router for navigation
|
|
45
|
+
- **Accessibility**: Full ARIA support with semantic HTML and structured data
|
|
46
|
+
- **SSR-ready**: Works in both SPA and SSR (Nuxt 3) contexts
|
|
47
|
+
- **Lightweight**: Tree-shakeable with Vue marked external in library build
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
Using npm:
|
|
51
|
+
```bash
|
|
52
|
+
npm install @todovue/tv-breadcrumbs
|
|
53
|
+
```
|
|
54
|
+
Using yarn:
|
|
55
|
+
```bash
|
|
56
|
+
yarn add @todovue/tv-breadcrumbs
|
|
57
|
+
```
|
|
58
|
+
Using pnpm:
|
|
59
|
+
```bash
|
|
60
|
+
pnpm add @todovue/tv-breadcrumbs
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Quick Start (SPA)
|
|
64
|
+
Global registration (main.js / main.ts):
|
|
65
|
+
```js
|
|
66
|
+
import { createApp } from 'vue'
|
|
67
|
+
import App from './App.vue'
|
|
68
|
+
import { TvBreadcrumbs } from '@todovue/tv-breadcrumbs'
|
|
69
|
+
import '@todovue/tv-breadcrumbs/style.css' // import styles
|
|
70
|
+
|
|
71
|
+
createApp(App)
|
|
72
|
+
.use(TvBreadcrumbs) // enables <TvBreadcrumbs /> globally
|
|
73
|
+
.mount('#app')
|
|
74
|
+
```
|
|
75
|
+
Local import inside a component:
|
|
76
|
+
```vue
|
|
77
|
+
<script setup>
|
|
78
|
+
import { TvBreadcrumbs } from '@todovue/tv-breadcrumbs'
|
|
79
|
+
|
|
80
|
+
const items = [
|
|
81
|
+
{ label: 'Home', href: '/' },
|
|
82
|
+
{ label: 'Products', href: '/products' },
|
|
83
|
+
{ label: 'Category', href: '/products/category' },
|
|
84
|
+
{ label: 'Item Details' }
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
function onItemClick({ item, index, event }) {
|
|
88
|
+
console.log('Clicked:', item.label)
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<template>
|
|
93
|
+
<TvBreadcrumbs :items="items" @item-click="onItemClick" />
|
|
94
|
+
</template>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Nuxt 4 / SSR Usage
|
|
98
|
+
First, add the stylesheet to your Nuxt config:
|
|
99
|
+
```ts
|
|
100
|
+
// nuxt.config.ts
|
|
101
|
+
export default defineNuxtConfig({
|
|
102
|
+
modules: [
|
|
103
|
+
'@todovue/tv-breadcrumbs/nuxt'
|
|
104
|
+
]
|
|
105
|
+
})
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then create a plugin file: `plugins/tv-breadcrumbs.client.ts` (or without `.client` suffix as it's SSR-safe):
|
|
109
|
+
```ts
|
|
110
|
+
import { defineNuxtPlugin } from '#app'
|
|
111
|
+
import { TvBreadcrumbs } from '@todovue/tv-breadcrumbs'
|
|
112
|
+
|
|
113
|
+
export default defineNuxtPlugin(nuxtApp => {
|
|
114
|
+
nuxtApp.vueApp.use(TvBreadcrumbs)
|
|
115
|
+
})
|
|
116
|
+
```
|
|
117
|
+
Use anywhere:
|
|
118
|
+
```vue
|
|
119
|
+
<TvBreadcrumbs auto-generate />
|
|
120
|
+
```
|
|
121
|
+
Optional direct import (no plugin):
|
|
122
|
+
```vue
|
|
123
|
+
<script setup>
|
|
124
|
+
import { TvBreadcrumbs } from '@todovue/tv-breadcrumbs'
|
|
125
|
+
</script>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Component Registration Options
|
|
129
|
+
| Approach | When to use |
|
|
130
|
+
|---------------------------------------------------------------------------------|------------------------------------------------|
|
|
131
|
+
| Global via `app.use(TvBreadcrumbs)` | Many usages across app / design system install |
|
|
132
|
+
| Local named import `{ TvBreadcrumbs }` | Isolated / code-split contexts |
|
|
133
|
+
| Direct default import `import { TvBreadcrumbs } from '@todovue/tv-breadcrumbs'` | Single usage or manual registration |
|
|
134
|
+
|
|
135
|
+
## Props
|
|
136
|
+
| Prop | Type | Default | Description |
|
|
137
|
+
|--------------|---------|----------------|--------------------------------------------------------------------------------------------------|
|
|
138
|
+
| items | Array | `[]` | Array of breadcrumb items. Each item: `{ label, href?, disabled?, key? }`. |
|
|
139
|
+
| separator | String | `'›'` | Character or string to display between breadcrumb items. |
|
|
140
|
+
| maxItems | Number | `0` | Maximum items to display. If exceeded, shows first item + ellipsis + last N items. 0 = no limit. |
|
|
141
|
+
| autoGenerate | Boolean | `false` | Auto-generate breadcrumbs from `$route.path` or route meta (`breadcrumb`). |
|
|
142
|
+
| homeLabel | String | `'Home'` | Label for the home item when auto-generating breadcrumbs. |
|
|
143
|
+
| activeLink | Boolean | `false` | If `true`, the current page item (last item) is rendered as a link. |
|
|
144
|
+
| ariaLabel | String | `'Breadcrumb'` | ARIA label for the `<nav>` element. |
|
|
145
|
+
|
|
146
|
+
### Item Object Structure
|
|
147
|
+
Each item in the `items` array can have:
|
|
148
|
+
```typescript
|
|
149
|
+
{
|
|
150
|
+
label: string // Display text (required)
|
|
151
|
+
href?: string // Link URL (optional, null for current page)
|
|
152
|
+
icon?: string // Icon CSS class (e.g. "fa-solid fa-home") (optional)
|
|
153
|
+
disabled?: boolean // Disable interaction (optional)
|
|
154
|
+
key?: string // Unique key for rendering (optional, auto-generated if not provided)
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Events
|
|
159
|
+
| Event name (kebab) | Payload | Description |
|
|
160
|
+
|--------------------|--------------------------|-----------------------------------------------------------------------|
|
|
161
|
+
| `item-click` | `{ item, index, event }` | Emitted when any breadcrumb item is clicked. |
|
|
162
|
+
| `navigate` | `{ to, item, index }` | Emitted when navigation occurs via Vue Router (if router is present). |
|
|
163
|
+
|
|
164
|
+
Usage:
|
|
165
|
+
```vue
|
|
166
|
+
<TvBreadcrumbs
|
|
167
|
+
:items="items"
|
|
168
|
+
@item-click="handleClick"
|
|
169
|
+
@navigate="handleNavigate"
|
|
170
|
+
/>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```js
|
|
174
|
+
function handleClick({ item, index, event }) {
|
|
175
|
+
console.log('Clicked item:', item.label, 'at index:', index)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function handleNavigate({ to, item, index }) {
|
|
179
|
+
console.log('Navigating to:', to)
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Slots
|
|
184
|
+
The component provides three slots for full customization:
|
|
185
|
+
|
|
186
|
+
### `item` slot
|
|
187
|
+
Customize the rendering of each breadcrumb link (except the last one).
|
|
188
|
+
```vue
|
|
189
|
+
<TvBreadcrumbs :items="items">
|
|
190
|
+
<template #item="{ item, index }">
|
|
191
|
+
<strong>{{ item.label }}</strong>
|
|
192
|
+
</template>
|
|
193
|
+
</TvBreadcrumbs>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### `current` slot
|
|
197
|
+
Customize the rendering of the current (last) breadcrumb item.
|
|
198
|
+
```vue
|
|
199
|
+
<TvBreadcrumbs :items="items">
|
|
200
|
+
<template #current="{ item, index }">
|
|
201
|
+
<em>{{ item.label }}</em>
|
|
202
|
+
</template>
|
|
203
|
+
</TvBreadcrumbs>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### `separator` slot
|
|
207
|
+
Customize the separator between breadcrumb items.
|
|
208
|
+
```vue
|
|
209
|
+
<TvBreadcrumbs :items="items">
|
|
210
|
+
<template #separator>
|
|
211
|
+
<span> / </span>
|
|
212
|
+
</template>
|
|
213
|
+
</TvBreadcrumbs>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Auto-Generate Mode
|
|
217
|
+
When `autoGenerate` is enabled, the component automatically creates breadcrumbs from your current route.
|
|
218
|
+
|
|
219
|
+
### Basic Auto-Generation
|
|
220
|
+
```vue
|
|
221
|
+
<TvBreadcrumbs auto-generate />
|
|
222
|
+
```
|
|
223
|
+
This reads `$route.path` and creates breadcrumb items. For example:
|
|
224
|
+
- Path: `/docs/guides/installation`
|
|
225
|
+
- Result: `Home › Docs › Guides › Installation`
|
|
226
|
+
|
|
227
|
+
### Custom Home Label
|
|
228
|
+
```vue
|
|
229
|
+
<TvBreadcrumbs auto-generate home-label="Dashboard" />
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Route Meta Integration
|
|
233
|
+
You can define breadcrumbs in your route configuration:
|
|
234
|
+
```js
|
|
235
|
+
const routes = [
|
|
236
|
+
{
|
|
237
|
+
path: '/products',
|
|
238
|
+
meta: {
|
|
239
|
+
breadcrumb: 'Products'
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
path: '/products/:id',
|
|
244
|
+
meta: {
|
|
245
|
+
breadcrumb: (route) => [
|
|
246
|
+
{ label: 'Products', href: '/products' },
|
|
247
|
+
{ label: route.params.id }
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
The component will use:
|
|
255
|
+
1. Route meta `breadcrumb` if defined (string, array, or function)
|
|
256
|
+
2. Fallback to auto-generated path segments if no meta found
|
|
257
|
+
|
|
258
|
+
## Max Items & Ellipsis
|
|
259
|
+
Control long breadcrumb trails with the `maxItems` prop:
|
|
260
|
+
|
|
261
|
+
```vue
|
|
262
|
+
<TvBreadcrumbs :items="longItemsList" :max-items="4" />
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Example:**
|
|
266
|
+
- Original: `Home › Docs › API › v1 › Auth › Scopes`
|
|
267
|
+
- With `max-items="4"`: `Home › … › Auth › Scopes`
|
|
268
|
+
|
|
269
|
+
The algorithm keeps:
|
|
270
|
+
- First item (always visible)
|
|
271
|
+
- Ellipsis (`…`) which is interactive: **click to show hidden items in a dropdown**
|
|
272
|
+
- Last N-1 items (where N = maxItems)
|
|
273
|
+
|
|
274
|
+
## Router Integration
|
|
275
|
+
TvBreadcrumbs automatically detects and integrates with Vue Router:
|
|
276
|
+
|
|
277
|
+
1. **Automatic navigation**: Clicks on breadcrumb links call `router.push()` instead of native navigation
|
|
278
|
+
2. **Route reading**: Accesses `$route` for auto-generation
|
|
279
|
+
3. **Navigate event**: Emits when programmatic navigation occurs
|
|
280
|
+
|
|
281
|
+
**Without router**: Links work as standard `<a>` tags with `href`.
|
|
282
|
+
|
|
283
|
+
**With router**: Navigation is handled programmatically, and the `navigate` event fires.
|
|
284
|
+
|
|
285
|
+
## Customization (Styles / Theming)
|
|
286
|
+
The component uses scoped styles with BEM-like class names for easy customization:
|
|
287
|
+
|
|
288
|
+
### CSS Classes
|
|
289
|
+
- `.tv-breadcrumb-root`: Main `<nav>` container
|
|
290
|
+
- `.tv-breadcrumb-list`: `<ol>` list wrapper
|
|
291
|
+
- `.tv-breadcrumb-item`: Each `<li>` item
|
|
292
|
+
- `.tv-breadcrumb-item--link`: Non-current items
|
|
293
|
+
- `.tv-breadcrumb-item--current`: Current (last) item
|
|
294
|
+
- `.tv-breadcrumb-item--disabled`: Disabled items
|
|
295
|
+
- `.tv-breadcrumb-link`: `<a>` link element
|
|
296
|
+
- `.tv-breadcrumb-current`: Current item `<span>`
|
|
297
|
+
- `.tv-breadcrumb-separator`: Separator `<span>`
|
|
298
|
+
|
|
299
|
+
### Custom Styling Example
|
|
300
|
+
```css
|
|
301
|
+
/* Override default styles */
|
|
302
|
+
.tv-breadcrumb-list {
|
|
303
|
+
font-size: 14px;
|
|
304
|
+
color: #333;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.tv-breadcrumb-link {
|
|
308
|
+
color: #0066cc;
|
|
309
|
+
text-decoration: none;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.tv-breadcrumb-link:hover {
|
|
313
|
+
text-decoration: underline;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.tv-breadcrumb-separator {
|
|
317
|
+
margin: 0 8px;
|
|
318
|
+
color: #999;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.tv-breadcrumb-current {
|
|
322
|
+
font-weight: 600;
|
|
323
|
+
color: #000;
|
|
324
|
+
}
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
## Accessibility
|
|
328
|
+
TvBreadcrumbs follows WAI-ARIA best practices:
|
|
329
|
+
|
|
330
|
+
- **Semantic HTML**: Uses `<nav>`, `<ol>`, `<li>` for proper structure
|
|
331
|
+
- **ARIA attributes**:
|
|
332
|
+
- `aria-label` on `<nav>` (customizable via prop)
|
|
333
|
+
- `aria-current="page"` on the current item
|
|
334
|
+
- `aria-disabled` on disabled items
|
|
335
|
+
- `aria-hidden` on separator
|
|
336
|
+
- **Structured data**: Implements Schema.org `ListItem` markup for search engines
|
|
337
|
+
- **Keyboard navigation**: All interactive elements are focusable and keyboard-accessible
|
|
338
|
+
- **Screen reader friendly**: Proper semantic structure and ARIA labels
|
|
339
|
+
|
|
340
|
+
## SSR Notes
|
|
341
|
+
- No direct DOM (`window` / `document`) access → safe for SSR
|
|
342
|
+
- Router access is wrapped with safe guards (checks for `$route` / `$router` existence)
|
|
343
|
+
- Works with Nuxt 3 out of the box
|
|
344
|
+
- Styles are automatically injected when importing the component
|
|
345
|
+
- Auto-generation mode gracefully handles missing router in SSR context
|
|
346
|
+
|
|
347
|
+
## Development
|
|
348
|
+
```bash
|
|
349
|
+
git clone https://github.com/TODOvue/tv-breadcrumbs.git
|
|
350
|
+
cd tv-breadcrumbs
|
|
351
|
+
npm install
|
|
352
|
+
npm run dev # run demo playground
|
|
353
|
+
npm run build # build library
|
|
354
|
+
```
|
|
355
|
+
Local demo served from Vite using `index.html` + `src/demo` examples.
|
|
356
|
+
|
|
357
|
+
## Contributing
|
|
358
|
+
PRs and issues welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
|
|
359
|
+
|
|
360
|
+
## License
|
|
361
|
+
MIT © TODOvue
|
|
362
|
+
|
|
363
|
+
### Attributions
|
|
364
|
+
Crafted for the TODOvue component ecosystem
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@todovue/tv-button` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [1.2.6] - 2026-01-28
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Simplified build scripts to improve maintainability.
|
|
11
|
+
- Updated package configuration files to the latest versions.
|
|
12
|
+
|
|
13
|
+
## [1.2.5] - 2025-01-27
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Moved the `@todovue/tv-demo` component import from main.js to `Demo.vue` to localize its usage.
|
|
17
|
+
- Updated build commands to include `README.md` and `CHANGELOG.md` files in the public directory during the build process.
|
|
18
|
+
- Enhanced GitHub Actions workflows to automate npm package publishing and GitHub release creation.
|
|
19
|
+
|
|
20
|
+
### Removed
|
|
21
|
+
- Eliminated the global import of the `@todovue/tv-demo` component from `main.js`.
|
|
22
|
+
|
|
23
|
+
### Dependencies
|
|
24
|
+
- Updated `@todovue/tv-demo` to `^1.4.10`.
|
|
25
|
+
- Updated `vue` to `^3.5.27`.
|
|
26
|
+
- Updated `sass` to `^1.97.3`.
|
|
27
|
+
|
|
28
|
+
## [1.2.4] - 2026-01-19
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- Add `dashboard`, `folder`, `image`, `link`, `mail`, `save` icons.
|
|
32
|
+
- Added support for `href` and `to` properties to enable native link and client-side routing functionality within the component.
|
|
33
|
+
|
|
34
|
+
### Dependencies
|
|
35
|
+
- Update `@todovue/tv-demo` to `^1.4.3`.
|
|
36
|
+
- Update `sass` to `^1.97.2`.
|
|
37
|
+
- Update `vite` to `^7.3.1`.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- Standardized button properties to ensure consistent API usage across the application.
|
|
41
|
+
- Refactored the component structure to improve maintainability and code readability.
|
|
42
|
+
- Updated the `README.md` documentation to reflect the standardization of button properties using `variant` and `size` terminology.
|
|
43
|
+
- Simplified button mixins to streamline the styling architecture.
|
|
44
|
+
- Improved hover and active states to enhance visual feedback and user interaction.
|
|
45
|
+
|
|
46
|
+
## [1.2.3] - 2025-12-19
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
- Added automatic publishing to the TODOvue cPanel in `release.yml` for each release, simplifying package distribution and updates.
|
|
50
|
+
- Added `package-lock.json` to the repository to ensure dependency consistency and facilitate version management across development and production environments.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
- Changed the `base` option in `vite.config.js` for website deployment in cpanel.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
- Fixed repository URL in `package.json` to point to the correct GitHub repository.
|
|
57
|
+
- Fixed the token configuration used to generate the package in the GitHub Actions workflow `release.yml`.
|
|
58
|
+
|
|
59
|
+
### Dependencies
|
|
60
|
+
- Updated dependency versions in `package.json` to maintain compatibility and benefit from improvements and bug fixes in the used libraries.
|
|
61
|
+
|
|
62
|
+
## [1.2.2] - 2025-11-21
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
- Prevent duplicate CSS import for TvButton
|
|
66
|
+
|
|
67
|
+
## [1.2.1] - 2025-11-20
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
- Fixed missing export of `nux.js` file in the package.
|
|
71
|
+
- Create `global.d.ts` to declare module for TypeScript users.
|
|
72
|
+
- Create `tsconfig.json` for proper type checking during build.
|
|
73
|
+
|
|
74
|
+
## [1.2.0] - 2025-11-20
|
|
75
|
+
|
|
76
|
+
### Dependencies
|
|
77
|
+
- Update `@todovue/tv-demo` to `^1.2.0` for demo improvements.
|
|
78
|
+
|
|
79
|
+
### Added
|
|
80
|
+
- Add `double-arrow-left`, `double-arrow-right`, `home`, `dots-vertical`, `eye-off`, `trash` and `upload` icons.
|
|
81
|
+
- Add `nux.js` configuration file for Nuxt 4 integration.
|
|
82
|
+
|
|
83
|
+
### Changed
|
|
84
|
+
- Update icon `remove` to `trash`
|
|
85
|
+
|
|
86
|
+
## [1.1.3] - 2025-11-15
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
- Removed CSS injection via `vite-plugin-css-injected-by-js` for the library build.
|
|
90
|
+
- Styles are now served from a separate CSS file generated by Vite (`dist/*.css`) and must be imported explicitly in the consuming app (SPA or Nuxt).
|
|
91
|
+
- Improved compatibility with SSR/SSG environments (especially Nuxt) by avoiding runtime CSS injection.
|
|
92
|
+
|
|
93
|
+
## [1.1.2] - 2025-10-17
|
|
94
|
+
|
|
95
|
+
### Fixed
|
|
96
|
+
- Fixed CSS export to avoid the need for manual import wherever the component is used.
|
|
97
|
+
|
|
98
|
+
## [1.1.1] - 2025-10-17
|
|
99
|
+
|
|
100
|
+
### Changed
|
|
101
|
+
- The library build now uses `src/entry.ts` (exports both the component and the plugin) instead of directly exporting the `.vue` file.
|
|
102
|
+
- CSS injection via JS has been removed for the library build (it is only kept for the demo), generating a `tv-button.css` file optimized for SSR/Nuxt.
|
|
103
|
+
- Changed node-version to workflows release.yml to 20.
|
|
104
|
+
|
|
105
|
+
### Added
|
|
106
|
+
- Plugin installation support: `app.use(TvButton)` or `app.use(TvButtonPlugin)`.
|
|
107
|
+
- Explicit export of the style file: `import '@todovue/tv-button/style.css'`.
|
|
108
|
+
- Documentation for usage in SSR and Nuxt 3 applications.
|
|
109
|
+
|
|
110
|
+
### Dependencies
|
|
111
|
+
- `package.json` exposes `style`, `sideEffects`, and the export of `./style.css` for safe tree-shaking.
|
|
112
|
+
- Updated Vite to `^7.0.0` to ensure compatibility with Node.js 20.19+.
|
|
113
|
+
- Updated @vitejs/plugin-vue to `^6.0.0`.
|
|
114
|
+
|
|
115
|
+
## [1.1.0] - 2025-05-08
|
|
116
|
+
|
|
117
|
+
### Added
|
|
118
|
+
- Add icon-only button support with styling and documentation updates
|
|
119
|
+
- Add loading state support with spinner and update documentation
|
|
120
|
+
|
|
121
|
+
### Fixed
|
|
122
|
+
- Fixed button layout and icon positioning
|
|
123
|
+
- Fixed tv-btn-text styles for improved accessibility and hover effects
|
|
124
|
+
|
|
125
|
+
## [1.0.0] - 2025-05-05
|
|
126
|
+
|
|
127
|
+
### Added
|
|
128
|
+
- Introduced `TvButton` as a reusable and fully customizable button component.
|
|
129
|
+
- Support for multiple button variants: `default`, `outlined`, `text`, `icon-only`.
|
|
130
|
+
- Size options: `small`, `default`, `large`.
|
|
131
|
+
- Status-based styles: `success`, `info`, `warning`, `error`.
|
|
132
|
+
- `disabled` state with the appropriate accessibility handling.
|
|
133
|
+
- Support for custom styles via `customStyle` prop.
|
|
134
|
+
- Icon integration using the `icon` and `iconPosition` props.
|
|
135
|
+
- ARIA accessibility via `ariaLabel` prop.
|
|
136
|
+
- Dual-event emission: `click` and `click-button`.
|
|
137
|
+
|
|
138
|
+
### Included Icons
|
|
139
|
+
- 40+ built-in icons (`account`, `add-user`, `check`, `info`, `logout`, `settings`, etc.)
|
|
140
|
+
- All icons are SVG-based and support `currentColor` for theme compatibility.
|
|
141
|
+
|
|
142
|
+
### Tooling & Setup
|
|
143
|
+
- Bundled and built using Vite.
|
|
144
|
+
- Ready-to-use as a standalone or global Vue component.
|
|
145
|
+
- Scoped styles using SCSS.
|
|
146
|
+
|
|
147
|
+
[1.2.6]: https://github.com/TODOvue/tv-button/pull/24/files
|
|
148
|
+
[1.2.5]: https://github.com/TODOvue/tv-button/pull/23/files
|
|
149
|
+
[1.2.4]: https://github.com/TODOvue/tv-button/pull/22/files
|
|
150
|
+
[1.2.3]: https://github.com/TODOvue/tv-button/pull/21/files
|
|
151
|
+
[1.2.2]: https://github.com/TODOvue/tv-button/pull/20/files
|
|
152
|
+
[1.2.1]: https://github.com/TODOvue/tv-button/pull/19/files
|
|
153
|
+
[1.2.0]: https://github.com/TODOvue/tv-button/pull/18/files
|
|
154
|
+
[1.1.3]: https://github.com/TODOvue/tv-button/pull/17/files
|
|
155
|
+
[1.1.2]: https://github.com/TODOvue/tv-button/pull/16/files
|
|
156
|
+
[1.1.1]: https://github.com/TODOvue/tv-button/pull/15/files
|
|
157
|
+
[1.1.0]: https://github.com/TODOvue/tv-button/pull/13/files
|
|
158
|
+
[1.0.0]: https://github.com/TODOvue/tv-button/pull/12/files
|