@cocoar/vue-ui 3.4.0-beta.38 → 3.4.0-beta.40
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/package.json +3 -3
- package/skills/cocoar-vue-ui/references/components/calendar/board.md +7 -0
- package/skills/cocoar-vue-ui/references/components/calendar/mini-month.md +11 -1
- package/skills/cocoar-vue-ui/references/components/calendar/month-view.md +3 -1
- package/skills/cocoar-vue-ui/references/foundations/theming.md +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocoar/vue-ui",
|
|
3
|
-
"version": "3.4.0-beta.
|
|
3
|
+
"version": "3.4.0-beta.40",
|
|
4
4
|
"description": "Cocoar Design System — a tablet-first Vue 3 component library with 30+ accessible, themeable components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"skills"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@cocoar/vue-localization": "3.4.0-beta.
|
|
61
|
+
"@cocoar/vue-localization": "3.4.0-beta.40",
|
|
62
62
|
"@fontsource/cascadia-code": "^5.2.3",
|
|
63
63
|
"@fontsource/inter": "^5.2.8",
|
|
64
64
|
"@fontsource/onest": "^5.3.1",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"vue": "^3.5.32",
|
|
85
85
|
"vue-router": "^5.0.4"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "8199948ceea8b8913fae9d11edeccde5ddfff418",
|
|
88
88
|
"scripts": {
|
|
89
89
|
"build": "vite build",
|
|
90
90
|
"test": "vitest run",
|
|
@@ -137,6 +137,8 @@ Dragging an event runs through the same drop pipeline as the other views: `onEve
|
|
|
137
137
|
|
|
138
138
|
The payload's `target.rowKey` and `target.sourceRowKey` say which rows were involved, and `canDrop` gets `rowKey`. What a change of row means, such as another person, is for your `onEventDrop` to apply.
|
|
139
139
|
|
|
140
|
+
Enter, Space and `element.click()` on an event or bar fire `onEventClick` like a press without movement does.
|
|
141
|
+
|
|
140
142
|
With `selectable`, dragging across the days of a row emits `rangeSelect` with `{ rowKey, start, end, native }`, both days inclusive. A mouse selects at once, a touch after a long press. A horizontal swipe turns the page unless `swipeNavigation(false)` is set.
|
|
141
143
|
|
|
142
144
|
## Your own rows
|
|
@@ -185,6 +187,10 @@ interface BoardRow<TMeta> {
|
|
|
185
187
|
|
|
186
188
|
## Styling tokens
|
|
187
189
|
|
|
190
|
+
`--coar-calendar-board-header-bg` colors the day headers and the empty corner above the row labels. `--coar-calendar-board-cell-today-frame` is a `box-shadow` around today's cell, drawn above the bars.
|
|
191
|
+
|
|
192
|
+
The events of a cell are ordered by start, all-day first, whether they are single or from a series.
|
|
193
|
+
|
|
188
194
|
| Token | Default |
|
|
189
195
|
|---|---|
|
|
190
196
|
| `--coar-calendar-board-label-width` | `88px` |
|
|
@@ -194,6 +200,7 @@ interface BoardRow<TMeta> {
|
|
|
194
200
|
| `--coar-calendar-board-cell-padding` | `3px` |
|
|
195
201
|
| `--coar-calendar-board-bar-row-min-height` | `8px` |
|
|
196
202
|
| `--coar-calendar-board-cell-gap` / `-cell-bg` / `-cell-today-bg` | `2px` / none / today's tint |
|
|
203
|
+
| `--coar-calendar-board-cell-today-frame` / `-frame-radius` | none / `0` |
|
|
197
204
|
| `--coar-calendar-board-line` / `-row-line` | the calendar border |
|
|
198
205
|
| `--coar-calendar-board-header-bg` / `-today-bg` / `-padding` / `-line` | none / same / weekday padding / the line |
|
|
199
206
|
| `--coar-calendar-board-header-direction` / `-align` / `-justify` | `column` / `center` / `flex-start` |
|
|
@@ -45,5 +45,15 @@ To drive a calendar with it, pass the day to `api.goTo(day)`.
|
|
|
45
45
|
| Slot | Scope | Purpose |
|
|
46
46
|
|---|---|---|
|
|
47
47
|
| `day` | `{ date, isToday, isSelected, isOtherMonth }` | The content of a day, for example with a mark. |
|
|
48
|
+
| `title` | `{ month, label }` | The heading. `month` is a `Temporal.PlainYearMonth`, `label` the month and year in the locale. |
|
|
48
49
|
|
|
49
|
-
The arrow keys move between days and `Page Up` / `Page Down` between months.
|
|
50
|
+
The arrow keys move between days and `Page Up` / `Page Down` between months.
|
|
51
|
+
|
|
52
|
+
| Token | Default | Sets |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `--coar-calendar-mini-month-day-size` | `26px` | The size of a day. |
|
|
55
|
+
| `--coar-calendar-mini-month-max-width` | `280px` | The width of the month. |
|
|
56
|
+
| `--coar-calendar-mini-month-day-font-size` | inherited | The type size of the days. |
|
|
57
|
+
| `--coar-calendar-mini-month-weekday-font-size` | inherited | The type size of the weekdays. |
|
|
58
|
+
| `--coar-calendar-mini-month-weekday-font-weight` | inherited | The weight of the weekdays. |
|
|
59
|
+
| `--coar-calendar-mini-month-week-radius` | `0` | The corners of each day in the highlighted week. |
|
|
@@ -479,7 +479,7 @@ Full reference: see [the composer's API reference](./coar-calendar.md#api-refere
|
|
|
479
479
|
|
|
480
480
|
Month rows have a fixed height per density plus the height of the week's multi-day lane band, and that band is capped too: a row shows at most `monthMaxVisibleLanes` lanes (default **2**). A multi-day bar past the cap leaves the band entirely — it is never clipped mid-row — and counts into the `+N` of every day it covers. `null` restores the unbounded band of the iOS port, where a week grows with every lane.
|
|
481
481
|
|
|
482
|
-
A Details cell
|
|
482
|
+
A Details cell orders its single-day pills by start, all-day first, whether they are single or from a series. It renders the first `maxEventsPerCell` (default **2**) and folds the rest, together with the folded bars covering the day, into one `+N` row in the subtle text colour. The Details base row is the iOS 94 px or, if the host's styling needs more, the measured height of the day-number row plus `maxEventsPerCell` pills plus the `+N` row — the view measures its own rendered cells (`useMonthMetrics`), so a `:deep()` override that makes pills or the day-number row taller never clips the marker. Details multi-day bars take the measured pill height, so bars and pills in one row are always the same size. In a row of fixed height (`uniform`, `fill`) a day gives up only the lanes of its own bars, and it takes the `+N` row's place for a pill when nothing is folded, so `maxEventsPerCell(3)` shows three lines wherever they fit. Stacked shows 2 marks and Compact 6 capsule segments and, like iOS, cap silently — their marks carry no titles, so the day has to be opened either way. Cells never scroll, and there is no per-cell menu or row expansion.
|
|
483
483
|
|
|
484
484
|
On the web the `+N` row is a button (accessible name "N more events", `aria-haspopup="dialog"`). It opens a **day sheet** over that one cell: a small dialog aligned to the cell's top-left edge that lists every event of the day — the multi-day events covering it first (visible lanes, then folded ones), then the single-day pills — and scrolls when the list is long. The sheet opens downward and flips upward when the space below inside the scroll container is short; it never expands the row or the grid. Every pill in the sheet is a live pill with the grid's own wiring — drag it onto any other day, move it with the keyboard, double-click it for `onEventDoubleClick`. The sheet closes on Escape, its close control, a pointerdown outside it, another `+N`, or when the month changes; focus returns to the `+N` button.
|
|
485
485
|
|
|
@@ -526,6 +526,7 @@ Set these on the calendar or a parent. Without them everything keeps its look. A
|
|
|
526
526
|
|---|---|---|
|
|
527
527
|
| `--coar-calendar-day-number-font-size` | label size | Day number |
|
|
528
528
|
| `--coar-calendar-day-number-font-weight` | label weight | Day number |
|
|
529
|
+
| `--coar-calendar-month-selected-frame` | `none` | A `box-shadow` around the selected day, drawn above the multi-day bars |
|
|
529
530
|
| `--coar-calendar-day-number-row-height` | `24px`, continuous `31px` | Row of the day number |
|
|
530
531
|
| `--coar-calendar-day-number-row-padding` | `4px 6px`, continuous `2px 6px` | Row of the day number |
|
|
531
532
|
| `--coar-calendar-today-font-weight` | day number weight | Today's number |
|
|
@@ -558,4 +559,5 @@ Weekend columns of the continuous header keep their own `--coar-calendar-continu
|
|
|
558
559
|
| `pill` | `{ event, pill }` | Single-day pill renderer. `pill` is the `MonthCellPill` (event + visual order in the cell). |
|
|
559
560
|
| `multiDayBar` | `{ event, bar }` | Multi-day bar renderer. `bar` is the `MonthMultiDayBar` (lane / startCol / endCol / clipping flags). |
|
|
560
561
|
| `dayNumber` (Preview) | `{ date, isToday, isSelected, isOtherMonth }` | Replaces the day number. |
|
|
562
|
+
| `dayFooter` (Preview) | `{ date, isToday, isSelected, isOtherMonth }` | Content at the foot of a day, such as its meal. Its measured height is counted before events fold into `+N`, and a row with `auto` sizing grows by it. A day that renders nothing here keeps its room. |
|
|
561
563
|
| `dayContent` (Preview) | `{ date, isToday, isSelected, isOtherMonth }` | Content beside the day number, also on the neighbouring months' days. Keep it within the height of the day-number row. |
|
|
@@ -192,6 +192,8 @@ import './coar-theme--myapp.css';
|
|
|
192
192
|
|
|
193
193
|
`--coar-role-derivation` (an empty value) is what makes the library derive palette steps, aliases and component roles from the values of the theme, on its class and on the scopes nested in it. The app needs the theme class and this file, loaded after the Cocoar stylesheet; it does not need `.coar-compact`. Dark mode and `.coar-mobile` stay separate choices of the app and combine with the theme.
|
|
194
194
|
|
|
195
|
+
The calendar derives its `--coar-calendar-*` tokens on its outermost element, so with an active theme a value on a wrapper does not arrive. Put the class of a calendar skin on the component, `<CoarMonthView class="my-skin" />`: a rule on that element wins. `--coar-role-derivation: initial` on a wrapper also lets the values through, but it turns off the derivation for every component inside it, vue-ui included.
|
|
196
|
+
|
|
195
197
|
The file is written into the cascade layer of the library's tokens, where `.coar-compact` is too. Your own unlayered styles therefore keep the last word, exactly as with the class: the theme sets body text to 14 px on its scope, and an app that declares `html { font-size: 16px }` itself keeps its 16 px (and the `rem` sizes that follow from it).
|
|
196
198
|
|
|
197
199
|
The file names a font, it does not ship one, and it starts with a comment saying what to load. Load the font your theme uses yourself: `import '@cocoar/vue-ui/fonts/compact'` for the Inter weights of the Compact preset, `import '@cocoar/vue-ui/fonts/onest'` for Onest, or your own `@font-face` rules for another family.
|