margo-ui 1.3.5 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "margo-ui",
3
- "version": "1.3.5",
3
+ "version": "1.4.0",
4
4
  "description": "A small React UI kit built on Tailwind CSS v4 design tokens, themeable through plain CSS custom properties.",
5
5
  "keywords": [
6
6
  "react",
@@ -1,6 +1,7 @@
1
1
  export const buttonBaseClassName = `group/button flex h-8 w-fit shrink-0 items-center px-2 rounded-lg border-2 text-on-main
2
2
  hover:border-on-main hover:text-on-main focus-visible:margo-border-gradient-primary
3
- focus-visible:outline focus-visible:outline-offset-1 focus-visible:outline-on-main shadow-button`;
3
+ focus-visible:outline focus-visible:outline-offset-1 focus-visible:outline-on-main shadow-button
4
+ select-none origin-center transition-transform duration-[160ms] ease-out active:scale-[0.95]`;
4
5
 
5
6
  export const buttonSurfaceClassName = "border-border bg-main";
6
7
 
@@ -1,6 +1,7 @@
1
1
  export const itemBaseClassName = `group/item flex w-full cursor-pointer items-center gap-1 rounded-lg border-2 px-3 py-2 text-on-main
2
2
  text-sm focus-visible:margo-border-gradient-primary focus-visible:outline select-none
3
- focus-visible:outline-offset-1 focus-visible:outline-on-main`;
3
+ focus-visible:outline-offset-1 focus-visible:outline-on-main
4
+ origin-center bg-border/20 transition-transform duration-[160ms] ease-out active:scale-[0.98]`;
4
5
 
5
6
  export const itemSurfaceClassName = `border-transparent text-medium hover:border-border hover:text-on-main
6
7
  hover:shadow-item focus-visible:shadow-item`;
@@ -53,7 +53,7 @@
53
53
  --margo-color-primary: #57e550;
54
54
  --margo-color-primary-darken: #45b93f;
55
55
  --margo-color-secondary: #d3d3d3;
56
- --margo-color-medium: #858585;
56
+ --margo-color-medium: #808080;
57
57
  --margo-color-border: #cecece;
58
58
 
59
59
  --margo-shadow-card: 0 8px 6px -4px rgb(220, 220, 220, 0.5);
@@ -13,14 +13,14 @@ import "./ripple.css";
13
13
  export const Ripple = ({ children, disabled = false, rippleClassName = "bg-primary-darken" }: RippleProps) => {
14
14
  const { endRipple, ripple, startRipple } = useRipple();
15
15
 
16
- const handlePointerDown = (event: PointerEvent<HTMLElement>) => {
16
+ const handlePointerUp = (event: PointerEvent<HTMLElement>) => {
17
17
  if (!disabled) startRipple(event);
18
- children.props.onPointerDown?.(event);
18
+ children.props.onPointerUp?.(event);
19
19
  };
20
20
 
21
21
  return cloneElement(children, {
22
22
  className: cn("relative overflow-hidden", children.props.className),
23
- onPointerDown: handlePointerDown,
23
+ onPointerUp: handlePointerUp,
24
24
  children: (
25
25
  <>
26
26
  {children.props.children}
@@ -3,7 +3,7 @@ import type { PointerEvent, PointerEventHandler, ReactElement, ReactNode } from
3
3
  export type RippleChildProps = {
4
4
  children?: ReactNode;
5
5
  className?: string;
6
- onPointerDown?: PointerEventHandler<HTMLElement>;
6
+ onPointerUp?: PointerEventHandler<HTMLElement>;
7
7
  };
8
8
 
9
9
  export type RippleProps = {