@wirecore/wirelayer-vue 0.9.2 → 0.11.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/components/Affix/Affix.vue.d.ts +4 -0
- package/dist/components/Affix/Affix.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.vue.d.ts +2 -2
- package/dist/components/NotificationCenter/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationList.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter/types.d.ts +2 -0
- package/dist/components/NotificationCenter/types.d.ts.map +1 -1
- package/dist/components/SidebarNav/SidebarNav.vue.d.ts +8 -0
- package/dist/components/SidebarNav/SidebarNav.vue.d.ts.map +1 -1
- package/dist/components/SidebarNav/SidebarNavItems.vue.d.ts +4 -1
- package/dist/components/SidebarNav/SidebarNavItems.vue.d.ts.map +1 -1
- package/dist/components/SidebarNav/types.d.ts +7 -2
- package/dist/components/SidebarNav/types.d.ts.map +1 -1
- package/dist/data-table/DataTable.vue.d.ts +10 -2
- package/dist/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/data-table/index.d.ts +1 -1
- package/dist/data-table/index.d.ts.map +1 -1
- package/dist/data-table/types.d.ts +13 -1
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +483 -470
- package/dist/index.js +376 -345
- package/llms-full.txt +63 -2
- package/llms.txt +1 -0
- package/package.json +3 -3
package/llms-full.txt
CHANGED
|
@@ -92,6 +92,8 @@ Fixed in a corner of the window, e.g. a help or chat button
|
|
|
92
92
|
| --- | --- | --- |
|
|
93
93
|
| position? | `'bottom-end' \| 'bottom-start' \| 'top-end' \| 'top-start'` | Corner of the window (default bottom-end) |
|
|
94
94
|
| offset? | `string` | Distance from the edges, e.g. "1rem" (default 1.5rem) |
|
|
95
|
+
| offset-x? | `string` | Distance from the side edge (start/end) only, e.g. "1rem" – instead of `offset` |
|
|
96
|
+
| offset-y? | `string` | Distance from the top or bottom edge only, e.g. "4rem" above a banner – instead of `offset` |
|
|
95
97
|
| classes? | `RecipeClasses<typeof affixRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
96
98
|
|
|
97
99
|
|
|
@@ -1751,6 +1753,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
|
|
|
1751
1753
|
| wrap-headers? | `boolean` | Long header texts wrap instead of being shortened |
|
|
1752
1754
|
| vertical-headers? | `boolean` | Header texts read from bottom to top (narrow columns) |
|
|
1753
1755
|
| edit-mode? | `'cell' \| 'row' \| 'batch'` | `cell`: one cell at a time (Tab moves on); `row`: a whole row with save and cancel; `batch`: like `cell`, but the changes are collected (marked) until "Save" (`save`) or "Discard", with undo and redo |
|
|
1756
|
+
| edit-trigger? | `'click' \| 'dblclick'` | What starts editing a cell with the pointer: `click` (default) or `dblclick` – then a single click only focuses the cell. The keyboard always starts editing (Enter or Space on the cell, Enter/F2 in the grid navigation). |
|
|
1754
1757
|
| v-model:size? | `'sm' \| 'md' \| 'lg'` | Row height – use with v-model:size (`densityToggle`) |
|
|
1755
1758
|
| density-toggle? | `boolean` | Menu above the table to change the row height |
|
|
1756
1759
|
| gridlines? | `boolean` | Lines between the columns |
|
|
@@ -1793,6 +1796,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
|
|
|
1793
1796
|
| @row-action | `action: DataTableRowAction<TData>` | |
|
|
1794
1797
|
| @load-more | – | Scrolled near the end (`scrollHeight`) – load more rows (infinite scrolling) |
|
|
1795
1798
|
| @scroll-end | – | |
|
|
1799
|
+
| @scroll | `event: Event` | The table's scroll area scrolled (down/up with `scrollHeight`, sideways when wider) – e.g. to close a popover anchored in a row that virtual scrolling removes |
|
|
1796
1800
|
| @cell-selection-change | `selection: DataTableCellSelection<TData> \| null` | The selected range of cells changed (`cellSelection`; null: none) |
|
|
1797
1801
|
| @cell-paste | `paste: DataTableCellPaste<TData>` | Cells were pasted – call `preventDefault()` to keep them out of the table (cell-edit events follow otherwise) |
|
|
1798
1802
|
| @save | `save: DataTableBatchSave<TData>` | "Save" in the batch mode (`editMode="batch"`): the collected changes |
|
|
@@ -1800,6 +1804,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
|
|
|
1800
1804
|
| Slot | Slot props | Description |
|
|
1801
1805
|
| --- | --- | --- |
|
|
1802
1806
|
| #cell-<id> | `{ row: TData; value: unknown }` | Content of a cell, by column id |
|
|
1807
|
+
| #footer-<id> | `DataTableFooterProps<TData>` | Own content of a footer cell, by column id – e.g. totals as badges; the CSV export keeps the text |
|
|
1803
1808
|
| #filter-<id> | `DataTableFilterInputProps<TData>` | Own filter input of a column (filter row and filter menu), by column id |
|
|
1804
1809
|
| #editor-<id> | `DataTableEditorProps<TData>` | Own editor of a column, by column id |
|
|
1805
1810
|
| #option-<id> | `{ item: unknown; selected: boolean; highlighted: boolean; disabled: boolean; }` | An option in the select filter and editor lists of a column, by column id – e.g. a status as a badge |
|
|
@@ -3882,9 +3887,9 @@ Bell with the unread count (part of its name) that opens the notifications in a
|
|
|
3882
3887
|
| --- | --- | --- |
|
|
3883
3888
|
| v-model:open | `open: boolean` | |
|
|
3884
3889
|
| @mark-read | `id: string` | Mark one item as read |
|
|
3885
|
-
| @mark-all-read | – |
|
|
3890
|
+
| @mark-all-read | `ids: string[]` | "Mark all as read": the ids of the unread items shown – e.g. for one request to the server |
|
|
3886
3891
|
| @load-more | – | Load the next page (hasMore) |
|
|
3887
|
-
| @select | `item: NotificationItem, event: MouseEvent` | The title
|
|
3892
|
+
| @select | `item: NotificationItem, event: MouseEvent` | The title of an item was clicked: its link, or its button (`clickable` without `href`) |
|
|
3888
3893
|
|
|
3889
3894
|
| Slot | Slot props | Description |
|
|
3890
3895
|
| --- | --- | --- |
|
|
@@ -5028,6 +5033,9 @@ Navigation landmark with links and expandable groups (buttons with aria-expanded
|
|
|
5028
5033
|
| --- | --- | --- |
|
|
5029
5034
|
| items | `readonly SidebarNavItem[]` | |
|
|
5030
5035
|
| label | `string` | Name of the navigation landmark, e.g. "Main navigation" |
|
|
5036
|
+
| link-as? | `string \| Component` | Component for the links, e.g. RouterLink or NuxtLink (gets `to` for items with `to`, else `href`); default <a> |
|
|
5037
|
+
| current-href? | `string` | Path of the current page – the item with exactly this href gets aria-current="page" (its groups start open) |
|
|
5038
|
+
| is-current? | `(item: SidebarNavItem) => boolean` | Own check for the current page, e.g. with the router |
|
|
5031
5039
|
| rail? | `boolean` | Icons only, the labels as tooltips (and for screen readers). Default: the collapsed state of a surrounding AppShell (navbarCollapsed) |
|
|
5032
5040
|
| expand-on-hover? | `boolean` | With `rail`: hovering or focusing the rail shows the labels (no tooltips) – default from the AppShell |
|
|
5033
5041
|
| classes? | `RecipeClasses<typeof sidebarNavRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
|
|
@@ -7271,6 +7279,59 @@ suggestThemeFixes(brand);
|
|
|
7271
7279
|
// on: { token: 'on-primary', value: '#050505', ratio: 8.1 } }, …]
|
|
7272
7280
|
```
|
|
7273
7281
|
|
|
7282
|
+
### Second brand color and hover color
|
|
7283
|
+
|
|
7284
|
+
Three more tokens are optional – a theme sets them only when it needs them. Without them they follow another token, so
|
|
7285
|
+
a theme without them looks as before:
|
|
7286
|
+
|
|
7287
|
+
| Token | Without it | Used by |
|
|
7288
|
+
| --------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7289
|
+
| `accent` | `primary` | A second brand color for your own markup: `bg-accent`, `text-accent`, `border-accent` (no component uses it) |
|
|
7290
|
+
| `on-accent` | `on-primary` | Text on the accent: `text-on-accent` |
|
|
7291
|
+
| `primary-hover` | see right | Hover of the primary color: the fill of solid primary buttons (else the fill fades to 85 %) and the text of tinted ones (else it stays `primary`) |
|
|
7292
|
+
|
|
7293
|
+
`primary-hover` is the answer to a strong brand color: a fill that fades on hover, or a tint behind the text, can drop
|
|
7294
|
+
it below 4.5:1 although the color itself passes. Tinted means `soft`, `outline` and `text` buttons in the primary color
|
|
7295
|
+
and avatar buttons with `color="primary"`.
|
|
7296
|
+
|
|
7297
|
+
```ts
|
|
7298
|
+
export const brand = defineTheme({
|
|
7299
|
+
name: 'brand',
|
|
7300
|
+
label: 'Brand',
|
|
7301
|
+
colors: {
|
|
7302
|
+
light: {
|
|
7303
|
+
primary: '#a33d00',
|
|
7304
|
+
'on-primary': '#FFFFFF',
|
|
7305
|
+
'primary-hover': '#8a3300',
|
|
7306
|
+
accent: '#00696d',
|
|
7307
|
+
'on-accent': '#FFFFFF',
|
|
7308
|
+
},
|
|
7309
|
+
dark: {
|
|
7310
|
+
primary: '#e95a00',
|
|
7311
|
+
'on-primary': '#050505',
|
|
7312
|
+
'primary-hover': '#f5772a',
|
|
7313
|
+
accent: '#2aa0a5',
|
|
7314
|
+
'on-accent': '#050505',
|
|
7315
|
+
},
|
|
7316
|
+
},
|
|
7317
|
+
});
|
|
7318
|
+
```
|
|
7319
|
+
|
|
7320
|
+
`checkTheme` checks the accent (text on it, and as text on `bg`, `bg-2` and `card`) once a theme sets `accent` or
|
|
7321
|
+
`on-accent` in a mode. The hover pairs of the primary color use `primary-hover` when it is set, and `suggestThemeFixes`
|
|
7322
|
+
suggests one `primary-hover` that meets all of them, before it would change `primary` itself.
|
|
7323
|
+
|
|
7324
|
+
**Changed with `@wirecore/wirelayer-tokens` 0.6 and `@wirecore/wirelayer-recipes` 0.9:**
|
|
7325
|
+
|
|
7326
|
+
- Solid primary buttons without `primary-hover` fade only their fill on hover (`color-mix`, 85 %); before, the whole
|
|
7327
|
+
button faded with `opacity`, the text included. In the bundled themes this looks the same – the text has the color
|
|
7328
|
+
of the page – and the contrast is never lower. Solid success, danger, info, warn and contrast buttons still fade with
|
|
7329
|
+
`opacity`.
|
|
7330
|
+
- `checkTheme` checks tinted primary text at rest as well: `soft primary: text-primary on bg-primary/10` (on `bg`,
|
|
7331
|
+
`bg-2`, `card`) and `avatar primary: text-primary on primary/14 (card)`. Before, the stricter hover pairs covered
|
|
7332
|
+
them; with `primary-hover` the hover has a text color of its own. A theme that missed a tinted hover may therefore be
|
|
7333
|
+
reported for these pairs as well.
|
|
7334
|
+
|
|
7274
7335
|
### Component sizes and shapes
|
|
7275
7336
|
|
|
7276
7337
|
Besides the colors, a few measures that a brand usually changes are CSS variables. Without them every component looks as
|
package/llms.txt
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecore/wirelayer-vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "WireLayer components for Vue 3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -166,8 +166,8 @@
|
|
|
166
166
|
"@ark-ui/vue": "^5.39.3",
|
|
167
167
|
"@internationalized/date": "^3.12.4",
|
|
168
168
|
"@lucide/vue": "^1.59.0",
|
|
169
|
-
"@wirecore/wirelayer-recipes": "^0.
|
|
170
|
-
"@wirecore/wirelayer-tokens": "^0.
|
|
169
|
+
"@wirecore/wirelayer-recipes": "^0.9.0",
|
|
170
|
+
"@wirecore/wirelayer-tokens": "^0.6.0"
|
|
171
171
|
},
|
|
172
172
|
"devDependencies": {
|
|
173
173
|
"@storybook/addon-a11y": "^10.6.2",
|