@usableapp/cardds 0.7.175 → 0.7.176

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/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  > For: a project that consumes `@usableapp/cardds` and its AI — what changed between versions, written as before → after, so a screen can be brought up to date without reading the source. Newest first. A consumer never edits cardds; if something here leaves you without a way to do what you did before, report the gap. Each release section after 0.7.97 carries one `Components:` line, written by `node scripts/components-changed.mjs <previous tag>`: the components the release changed, or `all` when a file changed that any component can read (a token, the build), or `none`; check only the screens that import those.
4
4
 
5
+ ## 0.7.176 — 2026-11-15
6
+
7
+ `Calendar` picks a far month or year from its head, for a birthday.
8
+
9
+ Components: Calendar
10
+
11
+ ### Added
12
+ - **`Calendar` month and year pick** (Lh 2026-11-08, cardds#208): before, the head was one word and prev / next buttons, so a birthday meant tapping back month by month. After, the head's month and year are two buttons; a tap swaps the day grid for a panel of chips, a tap on a chip hands its value back and returns to the days, a second tap on the head's word closes the panel unchanged. While a panel is open the prev / next buttons are gone. What the app gives (and gets back):
13
+ - `year` — the year shown beside `title` ("2024", "2567"): the app's own label, a Buddhist year is never the component's maths. Given, the head is two words.
14
+ - month: `months` (the 12 names in order) + `month` (the shown month, 0–11, January = 0) + `onMonthChange(index)` (the tapped chip's index 0–11).
15
+ - year: `years` (`{ value: number; label: ReactNode }[]`, the range the panel lists, the app says it) + `yearValue` (the `value` of the shown year) + `onYearChange(value)` (the tapped chip's `value`). The panel is a list that scrolls and opens with the shown year in the middle.
16
+ - Give the month props, the year props, or both; a word without its props stays plain text. Both pairs need their `on…Change`, or the panel never opens.
17
+ - The calendar still knows no dates: the app owns month, year, `title`, `days` and `start` (a leap February is its `days`), and clears the day when it turns month or year.
18
+ - Without these props the head and markup are as before. Panel knobs: `--calendar-panel-h`, `--calendar-picks-gap`, `--calendar-pick-pad-x`. Gallery `Calendar/Birthday`; rule in `docs/reference.md`.
19
+
5
20
  ## 0.7.175 — 2026-10-30
6
21
 
7
22
  A StackSheet's tabs stand further in from the edge and further apart.
package/css/actions.css CHANGED
@@ -493,7 +493,7 @@
493
493
  .link-block (Lh 2026-10-28) = a `LinkBlock`, a few pieces of a card's content as one link: as wide as the card, it DIMS.
494
494
  .card--folds > .head (Lh 2026-10-29) = the head of a `Card folds`: a tap opens or folds the card, so it DIMS (pointer and :active only —
495
495
  the focus ring is the card's, from its unseen open button, card.css). A control in the head keeps its own press. */
496
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
496
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
497
497
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
498
498
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick, .count-in__cancel) {
499
499
  cursor: pointer;
@@ -513,7 +513,7 @@
513
513
  transition-duration: var(--motion-press);
514
514
  transition-timing-function: var(--ease-out);
515
515
  }
516
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
516
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
517
517
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
518
518
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick):active:not(:disabled, [aria-disabled="true"], :has(:disabled)) { scale: var(--press-scale); }
519
519
  :where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .card--folds > .head, .toggle-field, .post-box__edge, .bubble--press, .link-block):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
@@ -524,17 +524,17 @@
524
524
  :where(.sheet-stack--tap > .card:not(.is-open), .postcard__turn, .post-letter__sheet:not(:has(.icon-btn:active))) { cursor: pointer; touch-action: manipulation; transition: filter var(--motion-press) var(--ease-out); }
525
525
  :where(.sheet-stack--tap > .card:not(.is-open), .postcard__turn, .post-letter__sheet:not(:has(.icon-btn:active))):active { filter: brightness(var(--press-shade)); }
526
526
  /* the focus ring: on the control, or on the label that wraps a hidden input (chip, tile, file button, a row that is a label, a card that is a label round its radio) */
527
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
527
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
528
528
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
529
529
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove):focus-visible,
530
530
  :where(.chip--pick, .tile--pick, label.btn, label.row, .toggle-field):has(:focus-visible), :where(label.card:has(> input[type="radio"]:focus-visible)) { outline: var(--focus); outline-offset: var(--sp-1); }
531
531
  :where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .feed-card--small, .toggle-field, .post-box__edge, .t-expand--more, .bubble--press, .link-block):not(label, .toggle-field):focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }
532
532
  /* disabled: no pointer anywhere; a control fades (a link and a row keep their own muted look) */
533
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
533
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
534
534
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
535
535
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .toggle-field, .post-box__edge):is(:disabled, [aria-disabled="true"]),
536
536
  :where(.chip--pick, .tile--pick, .mood__opt, .toggle-field, label.btn, label.row):has(:disabled) { cursor: default; }
537
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
537
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
538
538
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
539
539
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove):not(.link):is(:disabled, [aria-disabled="true"]),
540
540
  :where(.chip--pick, .tile--pick, .mood__opt, .toggle-field, label.btn):has(:disabled) { opacity: var(--off); }
package/css/choice.css CHANGED
@@ -119,6 +119,11 @@
119
119
  <div class="calendar"><div class="calendar__head">…</div><div class="calendar__grid"><span class="calendar__wd">Mo</span>×7 <button class="calendar__day" style="--start: 3">1</button>…</div></div> */
120
120
  .calendar { display: grid; gap: var(--calendar-gap, var(--sp-3)); }
121
121
  .calendar__head { display: flex; align-items: center; justify-content: space-between; gap: var(--calendar-head-gap, var(--sp-2)); }
122
+ /* month · year pick: the head's two words are buttons; a tap swaps the day grid for a panel of chips (months: 12 in a grid; years: a list that scrolls) */
123
+ .calendar__picks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--calendar-picks-gap, var(--sp-2)); min-width: 0; }
124
+ .calendar__pick { appearance: none; border: 0; background: none; color: inherit; font: inherit; padding-inline: var(--calendar-pick-pad-x, var(--sp-1)); min-height: var(--form-tap); border-radius: var(--sp-1); }
125
+ .calendar__pick[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 0.2em; }
126
+ .calendar__panel { max-height: var(--calendar-panel-h, calc(var(--tap-base) * 7)); overflow-y: auto; overscroll-behavior: contain; position: relative; padding-block: var(--sp-1); }
122
127
  .calendar__grid { display: grid; grid-template-columns: repeat(var(--_cols, 7), 1fr); gap: var(--calendar-grid-gap, var(--sp-1)); justify-items: center; container-type: inline-size; } /* a container: the span band below is measured in its width */
123
128
  .calendar__wd { font: var(--calendar-wd-font, var(--type-caption)); color: var(--calendar-wd-ink, var(--card-muted)); padding-block: var(--calendar-wd-pad-y, var(--sp-2)); }
124
129
  .calendar__day {
package/dist/cardds.css CHANGED
@@ -3490,7 +3490,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
3490
3490
  .link-block (Lh 2026-10-28) = a `LinkBlock`, a few pieces of a card's content as one link: as wide as the card, it DIMS.
3491
3491
  .card--folds > .head (Lh 2026-10-29) = the head of a `Card folds`: a tap opens or folds the card, so it DIMS (pointer and :active only —
3492
3492
  the focus ring is the card's, from its unseen open button, card.css). A control in the head keeps its own press. */
3493
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
3493
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
3494
3494
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
3495
3495
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick, .count-in__cancel) {
3496
3496
  cursor: pointer;
@@ -3510,7 +3510,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
3510
3510
  transition-duration: var(--motion-press);
3511
3511
  transition-timing-function: var(--ease-out);
3512
3512
  }
3513
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
3513
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
3514
3514
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
3515
3515
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, .map-pick):active:not(:disabled, [aria-disabled="true"], :has(:disabled)) { scale: var(--press-scale); }
3516
3516
  :where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .card--go, .card--press, .feed-card--small, .card--folds > .head, .toggle-field, .post-box__edge, .bubble--press, .link-block):active:not([aria-disabled="true"], :has(:disabled)) { opacity: var(--press-dim); }
@@ -3521,17 +3521,17 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
3521
3521
  :where(.sheet-stack--tap > .card:not(.is-open), .postcard__turn, .post-letter__sheet:not(:has(.icon-btn:active))) { cursor: pointer; touch-action: manipulation; transition: filter var(--motion-press) var(--ease-out); }
3522
3522
  :where(.sheet-stack--tap > .card:not(.is-open), .postcard__turn, .post-letter__sheet:not(:has(.icon-btn:active))):active { filter: brightness(var(--press-shade)); }
3523
3523
  /* the focus ring: on the control, or on the label that wraps a hidden input (chip, tile, file button, a row that is a label, a card that is a label round its radio) */
3524
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
3524
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
3525
3525
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
3526
3526
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove):focus-visible,
3527
3527
  :where(.chip--pick, .tile--pick, label.btn, label.row, .toggle-field):has(:focus-visible), :where(label.card:has(> input[type="radio"]:focus-visible)) { outline: var(--focus); outline-offset: var(--sp-1); }
3528
3528
  :where(a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .feed-card--small, .toggle-field, .post-box__edge, .t-expand--more, .bubble--press, .link-block):not(label, .toggle-field):focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }
3529
3529
  /* disabled: no pointer anywhere; a control fades (a link and a row keep their own muted look) */
3530
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
3530
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
3531
3531
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
3532
3532
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove, a.row, button.row, label.row, .row-expand > summary, .banner__summary, a.card, label.card, .toggle-field, .post-box__edge):is(:disabled, [aria-disabled="true"]),
3533
3533
  :where(.chip--pick, .tile--pick, .mood__opt, .toggle-field, label.btn, label.row):has(:disabled) { cursor: default; }
3534
- :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day,
3534
+ :where(.btn, .icon-btn, .link, a.chip, button.chip, .chip--pick, a.tile, button.tile, .tile--pick, .day, .segment__item, .calendar__day, .calendar__pick,
3535
3535
  .float-bar__item, .avatar-pick__item, .add-row, .picker__item, .dropdown__btn, .appbar__who, .check, .toggle, .mood__opt, .sheet__handle,
3536
3536
  a.avatar, button.avatar, .menu__item, button.snackbar__body, .stamp--tap, button.stamp-cell, button.stamp-place, .post-letter__turn, .post-desk__slot, .post-desk__pick, .post-desk__reach, .stamp-on__remove):not(.link):is(:disabled, [aria-disabled="true"]),
3537
3537
  :where(.chip--pick, .tile--pick, .mood__opt, .toggle-field, label.btn):has(:disabled) { opacity: var(--off); }
@@ -4109,6 +4109,11 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
4109
4109
  <div class="calendar"><div class="calendar__head">…</div><div class="calendar__grid"><span class="calendar__wd">Mo</span>×7 <button class="calendar__day" style="--start: 3">1</button>…</div></div> */
4110
4110
  .calendar { display: grid; gap: var(--calendar-gap, var(--sp-3)); }
4111
4111
  .calendar__head { display: flex; align-items: center; justify-content: space-between; gap: var(--calendar-head-gap, var(--sp-2)); }
4112
+ /* month · year pick: the head's two words are buttons; a tap swaps the day grid for a panel of chips (months: 12 in a grid; years: a list that scrolls) */
4113
+ .calendar__picks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--calendar-picks-gap, var(--sp-2)); min-width: 0; }
4114
+ .calendar__pick { appearance: none; border: 0; background: none; color: inherit; font: inherit; padding-inline: var(--calendar-pick-pad-x, var(--sp-1)); min-height: var(--form-tap); border-radius: var(--sp-1); }
4115
+ .calendar__pick[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 0.2em; }
4116
+ .calendar__panel { max-height: var(--calendar-panel-h, calc(var(--tap-base) * 7)); overflow-y: auto; overscroll-behavior: contain; position: relative; padding-block: var(--sp-1); }
4112
4117
  .calendar__grid { display: grid; grid-template-columns: repeat(var(--_cols, 7), 1fr); gap: var(--calendar-grid-gap, var(--sp-1)); justify-items: center; container-type: inline-size; } /* a container: the span band below is measured in its width */
4113
4118
  .calendar__wd { font: var(--calendar-wd-font, var(--type-caption)); color: var(--calendar-wd-ink, var(--card-muted)); padding-block: var(--calendar-wd-pad-y, var(--sp-2)); }
4114
4119
  .calendar__day {