@cocoar/vue-ui 3.4.0-beta.38 → 3.4.0-beta.39
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 +2 -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 +2 -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.39",
|
|
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.39",
|
|
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": "15cb0ccca38f7a45bdfbeb0875f155f464c86149",
|
|
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
|
|
@@ -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 renders its first `maxEventsPerCell` single-day pills (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. 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.
|
|
482
|
+
A Details cell renders its first `maxEventsPerCell` single-day pills (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 |
|
|
@@ -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.
|