@estiva-app/ui 0.13.0 → 0.13.1

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/Card.d.ts CHANGED
@@ -34,6 +34,12 @@ export interface CardProps extends ComponentPropsWithRef<'div'> {
34
34
  hover?: CardHover;
35
35
  /** No hairline until it is pointed at — a row in a feed that shows its edge only when you are on it. */
36
36
  quietUntilHover?: boolean;
37
+ /**
38
+ * Draw the hover look now, whatever the pointer does. For a card whose own menu or picker is open: the menu
39
+ * opens outside the card, so the pointer on it leaves the card, and the card would go dark under its own menu.
40
+ * Ignored while `selected` or `active`, like the pointer.
41
+ */
42
+ hovered?: boolean;
37
43
  /** The one you are on: the selected fill, a subtle hairline, and no hover. */
38
44
  selected?: boolean;
39
45
  /** Being changed in place: the selected fill with the accent hairline, and no hover. */
@@ -44,5 +50,5 @@ export interface CardProps extends ComponentPropsWithRef<'div'> {
44
50
  unreadable?: boolean;
45
51
  children: ReactNode;
46
52
  }
47
- export declare function Card({ fill, href, hover, quietUntilHover, selected, active, attention, unreadable, className, children, ...props }: CardProps): import("react").JSX.Element;
53
+ export declare function Card({ fill, href, hover, quietUntilHover, hovered, selected, active, attention, unreadable, className, children, ...props }: CardProps): import("react").JSX.Element;
48
54
  //# sourceMappingURL=Card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAI7D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAA;AAChE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAA;AACpD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAA;AAsBhD,MAAM,WA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AAqF;IACrF,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,wGAAwG;IACxG,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wFAAwF;IACxF,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,8FAA8F;IAC9F,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,IAAI,CAAC,EACnB,IAAgB,EAChB,IAAI,EACJ,KAAkC,EAClC,eAAuB,EACvB,OAAe,EACf,QAAgB,EAChB,MAAc,EACd,SAAS,EACT,UAAkB,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,SAAS,+BAkCX"}
package/dist/index.js CHANGED
@@ -189,6 +189,12 @@ var HAIRLINE_HOVER_CLASSES = {
189
189
  inset: "hover:border-border-default",
190
190
  none: "hover:border-border-default"
191
191
  };
192
+ var HAIRLINE_HELD_CLASSES = {
193
+ surface: "border-border-strong",
194
+ elevated: "border-border-strong",
195
+ inset: "border-border-default",
196
+ none: "border-border-default"
197
+ };
192
198
  var ATTENTION_CLASSES = {
193
199
  accent: "border-accent-muted hover:border-accent-muted",
194
200
  warning: "border-warning-muted hover:border-warning-muted"
@@ -198,6 +204,7 @@ function Card({
198
204
  href,
199
205
  hover = href ? "hairline" : "none",
200
206
  quietUntilHover = false,
207
+ hovered = false,
201
208
  selected = false,
202
209
  active = false,
203
210
  attention,
@@ -215,7 +222,10 @@ function Card({
215
222
  quietUntilHover && "border-transparent",
216
223
  !still && hover === "hairline" && HAIRLINE_HOVER_CLASSES[fill],
217
224
  !still && hover === "fill" && "hover:bg-bg-hover hover:border-border-default",
218
- !still && hover !== "none" && !href && props.onClick && "cursor-pointer",
225
+ !still && hovered && hover === "hairline" && HAIRLINE_HELD_CLASSES[fill],
226
+ !still && hovered && hover === "fill" && "bg-bg-hover border-border-default",
227
+ // The one you are on can still be clicked (it opens again); the one being changed cannot.
228
+ !active && hover !== "none" && !href && props.onClick && "cursor-pointer",
219
229
  selected && "bg-bg-selected border-border-subtle",
220
230
  active && "bg-bg-selected border-accent-primary",
221
231
  !active && attention && ATTENTION_CLASSES[attention],