minka-ds 0.2.2 → 0.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minka-ds",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Minka product design system — tokenized component library",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -95,11 +95,47 @@ function ActionCell({ children, className }: ActionCellProps) {
95
95
  )
96
96
  }
97
97
 
98
- export { TextStack, DataCell, AmountCell, BadgeCell, ActionCell }
98
+ // ── StatusCell ────────────────────────────────────────────────────────────────
99
+ // Dot + label status indicator. Use instead of badges for table status columns.
100
+
101
+ type StatusCellVariant = "success" | "warning" | "error" | "neutral"
102
+
103
+ interface StatusCellProps {
104
+ variant: StatusCellVariant
105
+ children: React.ReactNode
106
+ className?: string
107
+ }
108
+
109
+ const STATUS_DOT: Record<StatusCellVariant, string> = {
110
+ success: "bg-[var(--primitive-green-500)]",
111
+ warning: "bg-[var(--primitive-yellow-300)]",
112
+ error: "bg-[var(--primitive-red-500)]",
113
+ neutral: "bg-[var(--color-text-disabled)]",
114
+ }
115
+
116
+ const STATUS_TEXT: Record<StatusCellVariant, string> = {
117
+ success: "text-[var(--primitive-green-700)]",
118
+ warning: "text-[var(--color-text-default)]",
119
+ error: "text-[var(--color-text-default)]",
120
+ neutral: "text-[var(--color-text-disabled)]",
121
+ }
122
+
123
+ function StatusCell({ variant, children, className }: StatusCellProps) {
124
+ return (
125
+ <span className={cn("inline-flex items-center gap-1.5 text-body-sm", STATUS_TEXT[variant], className)}>
126
+ <span className={cn("size-1.5 rounded-full shrink-0", STATUS_DOT[variant])} />
127
+ {children}
128
+ </span>
129
+ )
130
+ }
131
+
132
+ export { TextStack, DataCell, AmountCell, BadgeCell, ActionCell, StatusCell }
99
133
  export type {
100
134
  TextStackProps,
101
135
  DataCellProps,
102
136
  AmountCellProps,
103
137
  BadgeCellProps,
104
138
  ActionCellProps,
139
+ StatusCellProps,
140
+ StatusCellVariant,
105
141
  }
@@ -474,7 +474,7 @@ function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">) {
474
474
  }
475
475
 
476
476
  const sidebarMenuButtonVariants = cva(
477
- "peer/menu-button flex w-full items-center gap-2 overflow-hidden [border-radius:var(--radius-button)] p-2 text-left text-body-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-[var(--color-bg-raised)] data-[active=true]:font-bold data-[active=true]:text-[var(--color-text-default)] data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
477
+ "peer/menu-button flex w-full items-center gap-2 overflow-hidden [border-radius:var(--radius-button)] p-2 text-left text-body-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-[var(--color-bg-raised)] data-[active=true]:ring-1 data-[active=true]:ring-[var(--color-border-default)] data-[active=true]:font-bold data-[active=true]:text-[var(--color-text-default)] data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
478
478
  {
479
479
  variants: {
480
480
  variant: {
@@ -687,7 +687,7 @@ function SidebarMenuSubButton({
687
687
  data-active={isActive}
688
688
  className={cn(
689
689
  "flex h-8 min-w-0 items-center gap-2 overflow-hidden [border-radius:var(--radius-button)] px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
690
- "data-[active=true]:bg-[var(--color-bg-raised)] data-[active=true]:font-bold data-[active=true]:text-[var(--color-text-default)]",
690
+ "data-[active=true]:bg-[var(--color-bg-raised)] data-[active=true]:ring-1 data-[active=true]:ring-[var(--color-border-default)] data-[active=true]:font-bold data-[active=true]:text-[var(--color-text-default)]",
691
691
  size === "sm" && "text-caption",
692
692
  size === "md" && "text-body-sm",
693
693
  "group-data-[collapsible=icon]:hidden",
@@ -7,9 +7,9 @@
7
7
  :root {
8
8
  /* --- Neutral scale --- */
9
9
  --primitive-neutral-0: #ffffff;
10
- --primitive-neutral-50: #eeeeee;
11
- --primitive-neutral-100: #e6e6e6;
12
- --primitive-neutral-200: #d9d9d9;
10
+ --primitive-neutral-50: #f5f5f5;
11
+ --primitive-neutral-100: #eeeeee;
12
+ --primitive-neutral-200: #e0e0e0;
13
13
  --primitive-neutral-300: #c7c7c7;
14
14
  --primitive-neutral-400: #b6b6b6;
15
15
  --primitive-neutral-500: #a1a1a1;