@hilum/ui 3.6.10 → 3.6.12
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/index.d.ts +11 -2
- package/dist/index.js +239 -203
- package/dist/index.js.map +1 -1
- package/llms.txt +4 -3
- package/package.json +1 -1
- package/src/components/card.tsx +2 -0
- package/src/components/checkbox-card.tsx +52 -0
- package/src/index.ts +1 -0
package/llms.txt
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
## Key Facts
|
|
6
6
|
|
|
7
7
|
- Package name: `@hilum/ui`
|
|
8
|
-
- Package version: 3.6.
|
|
9
|
-
- Component modules:
|
|
10
|
-
- Atom components:
|
|
8
|
+
- Package version: 3.6.12
|
|
9
|
+
- Component modules: 104
|
|
10
|
+
- Atom components: 73
|
|
11
11
|
- Molecule components: 31
|
|
12
12
|
- Docs site: https://ui.hilum.dev
|
|
13
13
|
- GitHub repository: https://github.com/hilum-labs/hilum-ui
|
|
@@ -90,6 +90,7 @@ Primary exports:
|
|
|
90
90
|
- Chart (/atoms/chart/) — Recharts-based data visualization with design-system styling.
|
|
91
91
|
- Chat Message (/molecules/chat-message/) — Chat transcript row with avatar, author metadata, alignment, and message bubble tone. Composes: Avatar.
|
|
92
92
|
- Checkbox (/atoms/checkbox/) — Binary selection control with checked, unchecked, and indeterminate states.
|
|
93
|
+
- Checkbox Card (/atoms/checkbox-card/) — Clickable card-style checkbox option for settings, filters, and compact binary choices. Composes: Checkbox.
|
|
93
94
|
- Checkbox Group (/atoms/checkbox-group/) — Grouped multi-select options with contiguous product-style row highlighting.
|
|
94
95
|
- Collapsible (/atoms/collapsible/) — Toggleable content region, often used for navigation groups.
|
|
95
96
|
- Color Input (/atoms/color-input/) — Compact color input combining swatch, hex field, and optional opacity control.
|
package/package.json
CHANGED
package/src/components/card.tsx
CHANGED
|
@@ -11,6 +11,8 @@ const cardVariants = cva(["rounded-xl", motionClasses], {
|
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
13
13
|
default: "bg-card shadow-natural",
|
|
14
|
+
outlined: "border border-border bg-card shadow-natural",
|
|
15
|
+
elevated: "border border-border bg-card shadow-elevated",
|
|
14
16
|
muted: "bg-muted shadow-natural",
|
|
15
17
|
ghost: "bg-transparent",
|
|
16
18
|
responsive:
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
import { Checkbox } from "./checkbox";
|
|
6
|
+
|
|
7
|
+
interface CheckboxCardProps extends Omit<React.LabelHTMLAttributes<HTMLLabelElement>, "onChange"> {
|
|
8
|
+
checked?: boolean | "indeterminate";
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
description?: React.ReactNode;
|
|
12
|
+
onCheckedChange?: (checked: boolean | "indeterminate") => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const CheckboxCard = React.forwardRef<HTMLLabelElement, CheckboxCardProps>(
|
|
16
|
+
({ checked, disabled, label, description, onCheckedChange, className, children, ...props }, ref) => {
|
|
17
|
+
const checkboxProps = {
|
|
18
|
+
...(checked !== undefined ? { checked } : {}),
|
|
19
|
+
...(disabled !== undefined ? { disabled } : {}),
|
|
20
|
+
...(onCheckedChange ? { onCheckedChange } : {}),
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<label
|
|
25
|
+
ref={ref}
|
|
26
|
+
aria-disabled={disabled || undefined}
|
|
27
|
+
className={cn(
|
|
28
|
+
"group flex min-w-0 items-start gap-3 rounded-lg border border-border bg-card p-3",
|
|
29
|
+
"text-sm text-foreground shadow-natural transition-[background-color,border-color,box-shadow,opacity,scale]",
|
|
30
|
+
"hover:bg-muted/40 active:scale-[0.98]",
|
|
31
|
+
"has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-[#6B97FF]",
|
|
32
|
+
"has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50",
|
|
33
|
+
className,
|
|
34
|
+
)}
|
|
35
|
+
{...props}
|
|
36
|
+
>
|
|
37
|
+
<Checkbox {...checkboxProps} className="mt-0.5" />
|
|
38
|
+
<span className="flex min-w-0 flex-1 flex-col gap-0.5">
|
|
39
|
+
<span className="font-medium leading-5 text-foreground">{label}</span>
|
|
40
|
+
{description ? (
|
|
41
|
+
<span className="text-[12px] leading-4 text-muted-foreground">{description}</span>
|
|
42
|
+
) : null}
|
|
43
|
+
{children}
|
|
44
|
+
</span>
|
|
45
|
+
</label>
|
|
46
|
+
);
|
|
47
|
+
},
|
|
48
|
+
);
|
|
49
|
+
CheckboxCard.displayName = "CheckboxCard";
|
|
50
|
+
|
|
51
|
+
export { CheckboxCard };
|
|
52
|
+
export type { CheckboxCardProps };
|
package/src/index.ts
CHANGED
|
@@ -34,6 +34,7 @@ export * from "./components/carousel";
|
|
|
34
34
|
export * from "./components/chart";
|
|
35
35
|
export * from "./components/chat-message";
|
|
36
36
|
export * from "./components/checkbox";
|
|
37
|
+
export * from "./components/checkbox-card";
|
|
37
38
|
export * from "./components/checkbox-group";
|
|
38
39
|
export * from "./components/collapsible";
|
|
39
40
|
export * from "./components/color-input";
|