@wirecore/wirelayer-vue 0.10.0 → 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/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
 
@@ -1794,6 +1796,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1794
1796
  | @row-action | `action: DataTableRowAction<TData>` | |
1795
1797
  | @load-more | – | Scrolled near the end (`scrollHeight`) – load more rows (infinite scrolling) |
1796
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 |
1797
1800
  | @cell-selection-change | `selection: DataTableCellSelection<TData> \| null` | The selected range of cells changed (`cellSelection`; null: none) |
1798
1801
  | @cell-paste | `paste: DataTableCellPaste<TData>` | Cells were pasted – call `preventDefault()` to keep them out of the table (cell-edit events follow otherwise) |
1799
1802
  | @save | `save: DataTableBatchSave<TData>` | "Save" in the batch mode (`editMode="batch"`): the collected changes |
@@ -1801,6 +1804,7 @@ Data table on TanStack Table: sorting (also by several columns), search, filter
1801
1804
  | Slot | Slot props | Description |
1802
1805
  | --- | --- | --- |
1803
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 |
1804
1808
  | #filter-<id> | `DataTableFilterInputProps<TData>` | Own filter input of a column (filter row and filter menu), by column id |
1805
1809
  | #editor-<id> | `DataTableEditorProps<TData>` | Own editor of a column, by column id |
1806
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 |
@@ -3883,9 +3887,9 @@ Bell with the unread count (part of its name) that opens the notifications in a
3883
3887
  | --- | --- | --- |
3884
3888
  | v-model:open | `open: boolean` | |
3885
3889
  | @mark-read | `id: string` | Mark one item as read |
3886
- | @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 |
3887
3891
  | @load-more | – | Load the next page (hasMore) |
3888
- | @select | `item: NotificationItem, event: MouseEvent` | The title link of an item was clicked |
3892
+ | @select | `item: NotificationItem, event: MouseEvent` | The title of an item was clicked: its link, or its button (`clickable` without `href`) |
3889
3893
 
3890
3894
  | Slot | Slot props | Description |
3891
3895
  | --- | --- | --- |
@@ -5029,6 +5033,9 @@ Navigation landmark with links and expandable groups (buttons with aria-expanded
5029
5033
  | --- | --- | --- |
5030
5034
  | items | `readonly SidebarNavItem[]` | |
5031
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 |
5032
5039
  | rail? | `boolean` | Icons only, the labels as tooltips (and for screen readers). Default: the collapsed state of a surrounding AppShell (navbarCollapsed) |
5033
5040
  | expand-on-hover? | `boolean` | With `rail`: hovering or focusing the rail shows the labels (no tooltips) – default from the AppShell |
5034
5041
  | classes? | `RecipeClasses<typeof sidebarNavRecipe>` | Extra classes per part of the component, e.g. { base: "…" } (see the recipe) |
@@ -7272,6 +7279,59 @@ suggestThemeFixes(brand);
7272
7279
  // on: { token: 'on-primary', value: '#050505', ratio: 8.1 } }, …]
7273
7280
  ```
7274
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
+
7275
7335
  ### Component sizes and shapes
7276
7336
 
7277
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
@@ -313,4 +313,5 @@ Full API (props, events, slots, examples) in llms-full.txt next to this file. MC
313
313
  - Pitfalls
314
314
  - Desktop apps (dense UI, many dialogs)
315
315
  - Custom theme
316
+ - Second brand color and hover color
316
317
  - Component sizes and shapes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecore/wirelayer-vue",
3
- "version": "0.10.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.8.1",
170
- "@wirecore/wirelayer-tokens": "^0.5.1"
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",