Files
Oscar Hinton db7d4f40f3 Pin story dates and share the story clock helpers (#24424)
* Pin the custom range dialog stories to a fixed date

The stories built their bounds from the real clock, so Chromatic diffed
them every day. Build them from STORY_NOW and start the dialog's clock
there, like the other PAM stories.

Add a Storybook rule covering fixed dates in stories.

* Allow liveFromNow in the Storybook dates rule

Its blanket ban on Date.now() contradicted the liveFromNow helper the
same rule recommends.

* Move the story clock helpers to @bitwarden/storybook

STORY_NOW, fromNow, liveFromNow, startClockAtStoryNow and the duration
constants lived in PAM's story fixtures, so other teams' stories couldn't
use them. Move them to the shared Storybook lib, point the PAM stories
and the dates rule at it, and replace decide-dialog's local copy of the
fixed date.
2026-11-04 10:42:27 -06:00
..

storybook

Owned by: ui-foundation

Storybook addons and utilities for Bitwarden