@lessly/ui 2.2.0 → 2.3.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/dist/router.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  cn,
14
14
  useIsMobile,
15
15
  useSidebar
16
- } from "./chunk-F5RMHSPS.js";
16
+ } from "./chunk-CEXND5YW.js";
17
17
 
18
18
  // src/components/extension-link.tsx
19
19
  import { Link } from "react-router";
@@ -143,7 +143,7 @@ function AppSidebar({
143
143
  onClick: toggle,
144
144
  "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
145
145
  "aria-expanded": !collapsed,
146
- className: "flex size-6 shrink-0 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-[var(--hov-bg)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
146
+ className: "flex size-6 shrink-0 items-center justify-center rounded-md text-text-secondary transition-colors duration-fast hover:bg-[var(--hov-bg)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
147
147
  children: /* @__PURE__ */ jsx3(PanelLeft, { className: "size-4", "aria-hidden": "true" })
148
148
  }
149
149
  ) : null;
@@ -168,7 +168,7 @@ function AppSidebar({
168
168
  onClick: toggle,
169
169
  "aria-label": "Expand sidebar",
170
170
  "aria-expanded": false,
171
- className: "flex size-8 shrink-0 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-[var(--hov-bg)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
171
+ className: "flex size-8 shrink-0 items-center justify-center rounded-md text-text-secondary transition-colors duration-fast hover:bg-[var(--hov-bg)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
172
172
  children: /* @__PURE__ */ jsx3(PanelLeft, { className: "size-4", "aria-hidden": "true" })
173
173
  }
174
174
  )
@@ -604,6 +604,34 @@
604
604
  transition-timing-function: var(--motion-easing-standard);
605
605
  }
606
606
 
607
+ /* Backs the `useFreshHighlight` hook: a freshly-created row gets a brief background wash that fades
608
+ back to the resting surface, so the eye lands on the thing you just made. The tint is driven by
609
+ --fresh-tint (default the amber wash — closest to GitHub's yellow flash, chosen over the
610
+ brand/teal alternatives) so a call site can swap it.
611
+
612
+ Reduced-motion: the hold is the animation-DELAY, a fixed 3.2s that the token layer never touches —
613
+ so even when prefers-reduced-motion zeroes --motion-duration-* the tint is still shown for the
614
+ full hold (backwards fill), then removed instantly instead of fading. The emphasis survives; only
615
+ the fade is motion. `both` paints the `from` tint during the delay and keeps `to` after.
616
+
617
+ That `to` is `background-color: transparent`, and `both` HOLDS it until the hook drops the class —
618
+ so an element carrying both the wash and a resting tone is painted transparent for the whole fade,
619
+ its tone flashing away and snapping back. The wash needs an inner layer with no background of its
620
+ own. */
621
+ @keyframes lessly-fresh-flash {
622
+ from {
623
+ background-color: var(--fresh-tint, var(--bg-warning-subtle));
624
+ }
625
+ to {
626
+ background-color: transparent;
627
+ }
628
+ }
629
+
630
+ .is-fresh {
631
+ animation: lessly-fresh-flash var(--motion-duration-slowest, 800ms)
632
+ var(--motion-easing-exit, ease-out) 3200ms both;
633
+ }
634
+
607
635
  /* === Layout === */
608
636
  /* Backs the <PageColumn> primitive: the reading column, capped and centred in the well. A real class
609
637
  rather than a Tailwind arbitrary utility, which the content scanner can drop for a newly-used
@@ -616,6 +644,12 @@
616
644
  /* === Animation layer (tw-animate-css, compiled) — see scripts/build-styles.mjs === */
617
645
  /*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
618
646
  @layer properties;
647
+ .animate-in {
648
+ animation: enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none);
649
+ }
650
+ .animate-out {
651
+ animation: exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none);
652
+ }
619
653
  .slide-in-from-left-2 {
620
654
  --tw-enter-translate-x: calc(2*var(--spacing)*-1);
621
655
  }
package/dist/styles.css CHANGED
@@ -651,6 +651,34 @@
651
651
  transition-timing-function: var(--motion-easing-standard);
652
652
  }
653
653
 
654
+ /* Backs the `useFreshHighlight` hook: a freshly-created row gets a brief background wash that fades
655
+ back to the resting surface, so the eye lands on the thing you just made. The tint is driven by
656
+ --fresh-tint (default the amber wash — closest to GitHub's yellow flash, chosen over the
657
+ brand/teal alternatives) so a call site can swap it.
658
+
659
+ Reduced-motion: the hold is the animation-DELAY, a fixed 3.2s that the token layer never touches —
660
+ so even when prefers-reduced-motion zeroes --motion-duration-* the tint is still shown for the
661
+ full hold (backwards fill), then removed instantly instead of fading. The emphasis survives; only
662
+ the fade is motion. `both` paints the `from` tint during the delay and keeps `to` after.
663
+
664
+ That `to` is `background-color: transparent`, and `both` HOLDS it until the hook drops the class —
665
+ so an element carrying both the wash and a resting tone is painted transparent for the whole fade,
666
+ its tone flashing away and snapping back. The wash needs an inner layer with no background of its
667
+ own. */
668
+ @keyframes lessly-fresh-flash {
669
+ from {
670
+ background-color: var(--fresh-tint, var(--bg-warning-subtle));
671
+ }
672
+ to {
673
+ background-color: transparent;
674
+ }
675
+ }
676
+
677
+ .is-fresh {
678
+ animation: lessly-fresh-flash var(--motion-duration-slowest, 800ms)
679
+ var(--motion-easing-exit, ease-out) 3200ms both;
680
+ }
681
+
654
682
  /* === Layout === */
655
683
  /* Backs the <PageColumn> primitive: the reading column, capped and centred in the well. A real class
656
684
  rather than a Tailwind arbitrary utility, which the content scanner can drop for a newly-used
@@ -663,6 +691,12 @@
663
691
  /* === Animation layer (tw-animate-css, compiled) — see scripts/build-styles.mjs === */
664
692
  /*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
665
693
  @layer properties;
694
+ .animate-in {
695
+ animation: enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none);
696
+ }
697
+ .animate-out {
698
+ animation: exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none);
699
+ }
666
700
  .slide-in-from-left-2 {
667
701
  --tw-enter-translate-x: calc(2*var(--spacing)*-1);
668
702
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lessly/ui",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Lessly design system — shared UI primitives, tokens, and theme",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.30.3",