@a-type/ui 1.5.2 → 1.5.4

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.
@@ -50,6 +50,7 @@ export function CardMain({
50
50
  data-compact={compact}
51
51
  data-visually-focused={rest.visuallyFocused}
52
52
  data-visually-disabled={rest.visuallyDisabled}
53
+ data-interactive={isInteractive}
53
54
  {...rest}
54
55
  />
55
56
  );
@@ -57,15 +58,16 @@ export function CardMain({
57
58
 
58
59
  export const CardTitle = withClassName(
59
60
  'div',
60
- 'layer-components:(flex flex-col gap-1 mt-0 bg-white py-2 px-3 rounded-lg rounded-bl-none rounded-tr-none w-auto mr-auto border border-solid border-grayDarkBlend text-md max-h-80px overflow-hidden text-ellipsis max-w-full text-inherit font-semibold)',
61
+ 'layer-components:(flex flex-col gap-1 mt-0 bg-white py-2 px-3 rounded-lg rounded-bl-none rounded-tr-none w-auto mr-auto border border-solid border-grayDarkBlend text-md max-h-80px overflow-hidden text-ellipsis max-w-full text-inherit font-semibold relative z-1)',
61
62
  'layer-components:[[data-compact=true]_&]:(py-1 text-sm)',
63
+ 'layer-components:[[data-interactive=true]:hover>&]:(bg-gray-2)',
62
64
  );
63
65
 
64
66
  const CardContentRoot = withClassName(
65
67
  'div',
66
- 'layer-components:(flex flex-col gap-1 px-2 py-1 bg-light-blend text-black rounded-md mx-2 my-0.5 border border-solid border-grayDarkBlend text-xs)',
68
+ 'layer-components:(flex flex-col gap-1 px-2 py-1 bg-light-blend text-black rounded-md mx-2 my-0.5 border border-solid border-grayDarkBlend text-xs relative z-1)',
67
69
  'layer-variants:[[data-compact=true]_&]:(py-0 px-1 my-0 text-xs)',
68
- 'layer-variants:[&[data-unstyled]]:(p-0 [background:unset] border-none)',
70
+ 'layer-variants:[&[data-unstyled=true]]:(p-0 [background:unset] border-none)',
69
71
  );
70
72
  export interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
71
73
  unstyled?: boolean;
@@ -77,7 +79,7 @@ export function CardContent({ unstyled, ref, ...rest }: CardContentProps) {
77
79
 
78
80
  export const CardImage = withClassName(
79
81
  SlotDiv,
80
- 'layer-components:(absolute z-0 right-0 top-0 bottom-0 w-full h-full object-cover bg-center)',
82
+ 'layer-components:(absolute z-0 right-0 top-0 bottom-0 w-full h-full object-cover bg-cover bg-center)',
81
83
  );
82
84
 
83
85
  export const CardFooter = withClassName(
@@ -937,6 +937,26 @@ export const IconSpritesheet = (props: any) => (
937
937
  strokeLinejoin="round"
938
938
  />
939
939
  </symbol>
940
+ <symbol id="icon-enterKey" viewBox="0 0 15 15">
941
+ <path
942
+ d="M10.5 8V10.5H3.5M3.5 10.5L5 9M3.5 10.5L5 12"
943
+ stroke="currentColor"
944
+ strokeLinecap="round"
945
+ strokeLinejoin="round"
946
+ />
947
+ <path
948
+ d="M14.5 2H6.5V6.5H0.5V14H14.5V2Z"
949
+ stroke="currentColor"
950
+ strokeLinejoin="round"
951
+ />
952
+ </symbol>
953
+ <symbol id="icon-gamePiece" viewBox="0 0 15 15">
954
+ <path
955
+ d="M10 2.5C10 4 8.5 5 8.5 5L10 11C11.1722 11.4548 12.0956 11.9049 12.5 13C9.5 14.5 5.5 14.5 2.5 13C2.85427 12.0596 3.71706 11.5944 5 11L6.5 5C6.5 5 5 4 5 2.5C5 1 6.52369 0.5 7.5 0.5C8.47631 0.5 10 1 10 2.5Z"
956
+ stroke="currentColor"
957
+ strokeLinejoin="round"
958
+ />
959
+ </symbol>
940
960
  </defs>
941
961
  </svg>
942
962
  );
@@ -83,6 +83,8 @@ export const iconNames = [
83
83
  'previous',
84
84
  'skipStart',
85
85
  'skipEnd',
86
+ 'enterKey',
87
+ 'gamePiece',
86
88
  ] as const;
87
89
 
88
90
  export type IconName = (typeof iconNames)[number];
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
 
3
- export const withProps = <T extends {}, Extras extends {}>(
4
- Component: React.ComponentType<T & Extras>,
5
- extras: Extras,
3
+ export const withProps = <T extends {}>(
4
+ Component: React.ComponentType<T>,
5
+ extras: Partial<T>,
6
6
  ) => {
7
- return (props: T & Extras) => {
7
+ return (props: T) => {
8
8
  return <Component {...props} {...extras} />;
9
9
  };
10
10
  };