@nipsys/shadcn-lsd 0.2.4 → 0.2.5
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/Autocomplete-DI2nShZk.js +216 -0
- package/dist/{Badge-DHID7w-D.js → Badge-SDsdES93.js} +43 -48
- package/dist/{Button-DoTpV6G1.js → Button-CCXyUaSw.js} +37 -46
- package/dist/{ButtonGroup-BgylmC1j.js → ButtonGroup-WtMRnYIq.js} +7 -7
- package/dist/{Input-W8QqFI1v.js → Input-BNaFAHs9.js} +46 -45
- package/dist/{Label-BEM-ZJXI.js → Label-CjkQmoNz.js} +8 -8
- package/dist/{ScrollBar-CyKMm83e.js → ScrollBar-Cuog8lP4.js} +31 -31
- package/dist/SidebarContext-CNUkvXwD.js +107 -0
- package/dist/Toggle-DZIHuZXk.js +34 -0
- package/dist/assets/style.css +1 -1
- package/dist/components/ui/accordion/AccordionContent.js +16 -16
- package/dist/components/ui/accordion/__tests__/accordion-content.test.js +1 -1
- package/dist/components/ui/alert-dialog/AlertDialogAction.js +1 -1
- package/dist/components/ui/alert-dialog/AlertDialogCancel.js +1 -1
- package/dist/components/ui/alert-dialog/AlertDialogContent.js +11 -11
- package/dist/components/ui/alert-dialog/AlertDialogFooter.js +5 -5
- package/dist/components/ui/alert-dialog/AlertDialogHeader.js +7 -7
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-action.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-cancel.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-content.test.js +2 -2
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-description.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-footer.test.js +8 -8
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-header.test.js +2 -2
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-overlay.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-title.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-trigger.test.js +1 -1
- package/dist/components/ui/autocomplete/Autocomplete.js +1 -1
- package/dist/components/ui/autocomplete/__tests__/autocomplete.test.js +1 -1
- package/dist/components/ui/badge/Badge.js +1 -1
- package/dist/components/ui/badge/badge.test.js +112 -112
- package/dist/components/ui/badge/types.d.ts +1 -1
- package/dist/components/ui/button/Button.js +1 -1
- package/dist/components/ui/button/button.test.js +98 -94
- package/dist/components/ui/button/types.d.ts +1 -1
- package/dist/components/ui/button-group/ButtonGroup.js +1 -1
- package/dist/components/ui/button-group/ButtonGroupText.js +11 -11
- package/dist/components/ui/button-group/__tests__/button-group-separator.test.js +1 -1
- package/dist/components/ui/button-group/__tests__/button-group-text.test.js +14 -14
- package/dist/components/ui/button-group/__tests__/button-group.test.js +1 -1
- package/dist/components/ui/card/CardContent.js +9 -6
- package/dist/components/ui/card/CardFooter.js +8 -8
- package/dist/components/ui/card/CardHeader.js +9 -9
- package/dist/components/ui/card/__tests__/card-content.test.js +19 -19
- package/dist/components/ui/card/__tests__/card-footer.test.js +20 -20
- package/dist/components/ui/card/__tests__/card-header.test.js +9 -9
- package/dist/components/ui/checkbox/Checkbox.js +2 -2
- package/dist/components/ui/checkbox/checkbox.test.js +3 -3
- package/dist/components/ui/command/CommandDialog.js +18 -18
- package/dist/components/ui/command/CommandEmpty.js +5 -5
- package/dist/components/ui/command/CommandGroup.js +7 -7
- package/dist/components/ui/command/CommandInput.js +14 -14
- package/dist/components/ui/command/CommandItem.js +7 -7
- package/dist/components/ui/command/CommandList.js +9 -9
- package/dist/components/ui/command/CommandSeparator.js +13 -10
- package/dist/components/ui/command/__tests__/command-empty.test.js +16 -16
- package/dist/components/ui/command/__tests__/command-group.test.js +13 -13
- package/dist/components/ui/command/__tests__/command-input.test.js +29 -29
- package/dist/components/ui/command/__tests__/command-item.test.js +19 -19
- package/dist/components/ui/command/__tests__/command-list.test.js +12 -12
- package/dist/components/ui/command/__tests__/command-separator.test.js +19 -19
- package/dist/components/ui/dialog/DialogContent.js +10 -10
- package/dist/components/ui/dialog/DialogFooter.js +6 -6
- package/dist/components/ui/dialog/DialogHeader.js +9 -9
- package/dist/components/ui/dialog/__tests__/dialog-content.test.js +1 -1
- package/dist/components/ui/dialog/__tests__/dialog-footer.test.js +7 -7
- package/dist/components/ui/dialog/__tests__/dialog-header.test.js +1 -1
- package/dist/components/ui/input/Input.js +1 -1
- package/dist/components/ui/input/input.test.js +5 -5
- package/dist/components/ui/label/Label.js +1 -1
- package/dist/components/ui/label/label.test.js +2 -2
- package/dist/components/ui/menubar/Menubar.js +1 -1
- package/dist/components/ui/menubar/MenubarCheckboxItem.js +18 -18
- package/dist/components/ui/menubar/MenubarContent.js +1 -1
- package/dist/components/ui/menubar/MenubarItem.js +1 -1
- package/dist/components/ui/menubar/MenubarLabel.js +1 -1
- package/dist/components/ui/menubar/MenubarRadioItem.js +14 -14
- package/dist/components/ui/menubar/MenubarSeparator.js +1 -1
- package/dist/components/ui/menubar/MenubarSubContent.js +1 -1
- package/dist/components/ui/menubar/MenubarSubTrigger.js +16 -16
- package/dist/components/ui/menubar/MenubarTrigger.js +1 -1
- package/dist/components/ui/menubar/__tests__/menubar-trigger.test.js +26 -26
- package/dist/components/ui/menubar/__tests__/menubar.test.js +15 -15
- package/dist/components/ui/popover/PopoverContent.js +5 -5
- package/dist/components/ui/popover/__tests__/popover-content.test.js +1 -1
- package/dist/components/ui/progress/Progress.js +41 -41
- package/dist/components/ui/progress/progress.test.js +10 -10
- package/dist/components/ui/scroll-area/ScrollArea.js +1 -1
- package/dist/components/ui/scroll-area/ScrollBar.js +1 -1
- package/dist/components/ui/select/SelectContent.js +11 -11
- package/dist/components/ui/select/SelectItem.js +13 -13
- package/dist/components/ui/select/SelectLabel.js +9 -9
- package/dist/components/ui/select/SelectScrollDownButton.js +12 -12
- package/dist/components/ui/select/SelectScrollUpButton.js +13 -13
- package/dist/components/ui/select/SelectSeparator.js +11 -11
- package/dist/components/ui/select/SelectTrigger.js +12 -12
- package/dist/components/ui/sheet/SheetContent.js +16 -16
- package/dist/components/ui/sheet/SheetFooter.js +9 -9
- package/dist/components/ui/sheet/SheetHeader.js +10 -7
- package/dist/components/ui/sheet/__tests__/sheet-footer.test.js +10 -10
- package/dist/components/ui/sheet/__tests__/sheet-header.test.js +9 -9
- package/dist/components/ui/sidebar/Sidebar.js +6 -6
- package/dist/components/ui/sidebar/SidebarContent.js +62 -53
- package/dist/components/ui/sidebar/SidebarContext.js +1 -1
- package/dist/components/ui/sidebar/SidebarGroup.js +24 -24
- package/dist/components/ui/sidebar/SidebarMenu.js +82 -82
- package/dist/components/ui/sidebar/__tests__/sidebar-content.test.js +1 -1
- package/dist/components/ui/sidebar/__tests__/sidebar-group.test.js +3 -3
- package/dist/components/ui/sidebar/__tests__/sidebar-menu.test.js +3 -3
- package/dist/components/ui/sidebar/__tests__/sidebar.test.js +20 -20
- package/dist/components/ui/switch/Switch.js +35 -35
- package/dist/components/ui/switch/switch.test.js +20 -20
- package/dist/components/ui/tabs/Tabs.js +1 -1
- package/dist/components/ui/tabs/TabsList.js +1 -1
- package/dist/components/ui/tabs/TabsTrigger.js +1 -1
- package/dist/components/ui/tabs/__tests__/tabs-trigger.test.js +3 -3
- package/dist/components/ui/tabs/__tests__/tabs.test.js +44 -44
- package/dist/components/ui/toggle/Toggle.js +1 -1
- package/dist/components/ui/toggle/toggle.test.js +85 -73
- package/dist/components/ui/toggle-group/ToggleGroupItem.js +1 -1
- package/dist/components/ui/toggle-group/__tests__/toggle-group.test.js +3 -3
- package/dist/main.js +9 -9
- package/dist/{types-ClTXXuXM.js → types-D4rgriAV.js} +7 -7
- package/dist/types-DsORryJJ.js +69 -0
- package/package.json +1 -1
- package/dist/Autocomplete-3wLa9P4X.js +0 -216
- package/dist/SidebarContext-CRh-DPz_.js +0 -107
- package/dist/Toggle-DOc92BjI.js +0 -34
- package/dist/types-BSbBWG9A.js +0 -69
|
@@ -1,154 +1,150 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { d
|
|
3
|
-
import { b as e, B as
|
|
4
|
-
|
|
2
|
+
import { d, i as o, r as a, g as t, s as r, v as i, f as u } from "../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
|
+
import { b as e, B as l } from "../../../Button-CCXyUaSw.js";
|
|
4
|
+
d("Button", () => {
|
|
5
5
|
o("renders without crashing", () => {
|
|
6
|
-
|
|
6
|
+
a(/* @__PURE__ */ n(l, { children: "Click me" })), t(r.getByRole("button")).toBeInTheDocument();
|
|
7
7
|
}), o("renders children correctly", () => {
|
|
8
|
-
|
|
8
|
+
a(/* @__PURE__ */ n(l, { children: "Test Button" })), t(r.getByRole("button")).toHaveTextContent("Test Button");
|
|
9
9
|
}), o("applies filled variant classes correctly", () => {
|
|
10
|
-
|
|
11
|
-
const s =
|
|
10
|
+
a(/* @__PURE__ */ n(l, { variant: "filled", children: "Filled" }));
|
|
11
|
+
const s = r.getByRole("button");
|
|
12
12
|
t(s).toHaveClass("lsd:bg-primary"), t(s).toHaveClass("lsd:text-primary-foreground");
|
|
13
13
|
}), o("applies outlined variant classes correctly", () => {
|
|
14
|
-
|
|
15
|
-
const s =
|
|
14
|
+
a(/* @__PURE__ */ n(l, { variant: "outlined", children: "Outlined" }));
|
|
15
|
+
const s = r.getByRole("button");
|
|
16
16
|
t(s).toHaveClass("lsd:bg-transparent"), t(s).toHaveClass("lsd:text-foreground");
|
|
17
17
|
}), o("applies filled-icon variant classes correctly", () => {
|
|
18
|
-
|
|
19
|
-
const s =
|
|
18
|
+
a(/* @__PURE__ */ n(l, { variant: "filled-icon", children: "Icon" }));
|
|
19
|
+
const s = r.getByRole("button");
|
|
20
20
|
t(s).toHaveClass("lsd:bg-primary"), t(s).toHaveClass("lsd:rounded-full");
|
|
21
21
|
}), o("applies outlined-icon variant classes correctly", () => {
|
|
22
|
-
|
|
23
|
-
const s =
|
|
22
|
+
a(/* @__PURE__ */ n(l, { variant: "outlined-icon", children: "Icon" }));
|
|
23
|
+
const s = r.getByRole("button");
|
|
24
24
|
t(s).toHaveClass("lsd:bg-transparent"), t(s).toHaveClass("lsd:rounded-full");
|
|
25
25
|
}), o("applies link variant classes correctly", () => {
|
|
26
|
-
|
|
27
|
-
const s =
|
|
26
|
+
a(/* @__PURE__ */ n(l, { variant: "link", children: "Link" }));
|
|
27
|
+
const s = r.getByRole("button");
|
|
28
28
|
t(s).toHaveClass("lsd:bg-transparent"), t(s).toHaveClass("lsd:text-foreground"), t(s).toHaveClass("lsd:border-0"), t(s).toHaveClass("lsd:hover:underline");
|
|
29
29
|
}), o("applies ghost variant classes correctly", () => {
|
|
30
|
-
|
|
31
|
-
const s =
|
|
30
|
+
a(/* @__PURE__ */ n(l, { variant: "ghost", children: "Ghost" }));
|
|
31
|
+
const s = r.getByRole("button");
|
|
32
32
|
t(s).toHaveClass("lsd:bg-transparent"), t(s).toHaveClass("lsd:text-foreground"), t(s).toHaveClass("lsd:border-0"), t(s).toHaveClass("lsd:hover:bg-accent"), t(s).toHaveClass("lsd:hover:text-accent-foreground");
|
|
33
33
|
}), o("applies ghost-icon variant classes correctly", () => {
|
|
34
|
-
|
|
35
|
-
const s =
|
|
34
|
+
a(/* @__PURE__ */ n(l, { variant: "ghost-icon", children: "Icon" }));
|
|
35
|
+
const s = r.getByRole("button");
|
|
36
36
|
t(s).toHaveClass("lsd:bg-transparent"), t(s).toHaveClass("lsd:text-foreground"), t(s).toHaveClass("lsd:border-0"), t(s).toHaveClass("lsd:rounded-full"), t(s).toHaveClass("lsd:hover:bg-accent"), t(s).toHaveClass("lsd:hover:text-accent-foreground");
|
|
37
37
|
}), o("applies destructive variant classes correctly", () => {
|
|
38
|
-
|
|
39
|
-
const s =
|
|
38
|
+
a(/* @__PURE__ */ n(l, { variant: "destructive", children: "Delete" }));
|
|
39
|
+
const s = r.getByRole("button");
|
|
40
40
|
t(s).toHaveClass("lsd:bg-lsd-destructive"), t(s).toHaveClass("lsd:text-white"), t(s).toHaveClass("lsd:border-lsd-destructive"), t(s).toHaveClass("lsd:hover:bg-lsd-destructive/90");
|
|
41
41
|
}), o("applies destructive-icon variant classes correctly", () => {
|
|
42
|
-
|
|
43
|
-
const s =
|
|
42
|
+
a(/* @__PURE__ */ n(l, { variant: "destructive-icon", children: "Delete" }));
|
|
43
|
+
const s = r.getByRole("button");
|
|
44
44
|
t(s).toHaveClass("lsd:bg-lsd-destructive"), t(s).toHaveClass("lsd:text-white"), t(s).toHaveClass("lsd:border-lsd-destructive"), t(s).toHaveClass("lsd:rounded-full"), t(s).toHaveClass("lsd:hover:bg-lsd-destructive/90");
|
|
45
45
|
}), o("applies success variant classes correctly", () => {
|
|
46
|
-
|
|
47
|
-
const s =
|
|
46
|
+
a(/* @__PURE__ */ n(l, { variant: "success", children: "Save" }));
|
|
47
|
+
const s = r.getByRole("button");
|
|
48
48
|
t(s).toHaveClass("lsd:bg-lsd-success"), t(s).toHaveClass("lsd:text-white"), t(s).toHaveClass("lsd:border-lsd-success"), t(s).toHaveClass("lsd:hover:bg-lsd-success/90");
|
|
49
49
|
}), o("applies success-icon variant classes correctly", () => {
|
|
50
|
-
|
|
51
|
-
const s =
|
|
50
|
+
a(/* @__PURE__ */ n(l, { variant: "success-icon", children: "Save" }));
|
|
51
|
+
const s = r.getByRole("button");
|
|
52
52
|
t(s).toHaveClass("lsd:bg-lsd-success"), t(s).toHaveClass("lsd:text-white"), t(s).toHaveClass("lsd:border-lsd-success"), t(s).toHaveClass("lsd:rounded-full"), t(s).toHaveClass("lsd:hover:bg-lsd-success/90");
|
|
53
53
|
}), o("applies medium size classes correctly", () => {
|
|
54
|
-
|
|
55
|
-
const s =
|
|
56
|
-
t(s).toHaveClass("lsd:h-
|
|
54
|
+
a(/* @__PURE__ */ n(l, { size: "md", children: "Medium" }));
|
|
55
|
+
const s = r.getByRole("button");
|
|
56
|
+
t(s).toHaveClass("lsd:h-10"), t(s).toHaveClass("lsd:px-[var(--lsd-spacing-larger)]"), t(s).toHaveClass("lsd:py-[var(--lsd-spacing-smaller)]"), t(s).toHaveClass("lsd:text-base");
|
|
57
57
|
}), o("applies small size classes correctly", () => {
|
|
58
|
-
|
|
59
|
-
const s =
|
|
60
|
-
t(s).toHaveClass("lsd:h-8"), t(s).toHaveClass("lsd:px-
|
|
58
|
+
a(/* @__PURE__ */ n(l, { size: "sm", children: "Small" }));
|
|
59
|
+
const s = r.getByRole("button");
|
|
60
|
+
t(s).toHaveClass("lsd:h-8"), t(s).toHaveClass("lsd:px-[var(--lsd-spacing-small)]"), t(s).toHaveClass("lsd:py-[var(--lsd-spacing-smaller)]"), t(s).toHaveClass("lsd:text-sm");
|
|
61
61
|
}), o("applies large size classes correctly", () => {
|
|
62
|
-
|
|
63
|
-
const s =
|
|
64
|
-
t(s).toHaveClass("lsd:h-12"), t(s).toHaveClass("lsd:px-8"), t(s).toHaveClass("lsd:py-[
|
|
62
|
+
a(/* @__PURE__ */ n(l, { size: "lg", children: "Large" }));
|
|
63
|
+
const s = r.getByRole("button");
|
|
64
|
+
t(s).toHaveClass("lsd:h-12"), t(s).toHaveClass("lsd:px-8"), t(s).toHaveClass("lsd:py-[var(--lsd-spacing-small)]"), t(s).toHaveClass("lsd:text-lg");
|
|
65
65
|
}), o("applies icon-md size classes correctly", () => {
|
|
66
|
-
|
|
67
|
-
const s =
|
|
66
|
+
a(/* @__PURE__ */ n(l, { size: "icon-md", children: "Icon" }));
|
|
67
|
+
const s = r.getByRole("button");
|
|
68
68
|
t(s).toHaveClass("lsd:w-10"), t(s).toHaveClass("lsd:h-10");
|
|
69
69
|
}), o("applies icon-sm size classes correctly", () => {
|
|
70
|
-
|
|
71
|
-
const s =
|
|
70
|
+
a(/* @__PURE__ */ n(l, { size: "icon-sm", children: "Icon" }));
|
|
71
|
+
const s = r.getByRole("button");
|
|
72
72
|
t(s).toHaveClass("lsd:w-8"), t(s).toHaveClass("lsd:h-8");
|
|
73
|
-
}), o("applies icon-
|
|
74
|
-
|
|
75
|
-
const s =
|
|
76
|
-
t(s).toHaveClass("lsd:w-
|
|
73
|
+
}), o("applies icon-md size classes correctly", () => {
|
|
74
|
+
a(/* @__PURE__ */ n(l, { size: "icon-md", children: "Icon" }));
|
|
75
|
+
const s = r.getByRole("button");
|
|
76
|
+
t(s).toHaveClass("lsd:w-10"), t(s).toHaveClass("lsd:h-10");
|
|
77
77
|
}), o("applies icon-lg size classes correctly", () => {
|
|
78
|
-
|
|
79
|
-
const s =
|
|
78
|
+
a(/* @__PURE__ */ n(l, { size: "icon-lg", children: "Icon" }));
|
|
79
|
+
const s = r.getByRole("button");
|
|
80
80
|
t(s).toHaveClass("lsd:w-12"), t(s).toHaveClass("lsd:h-12");
|
|
81
|
-
}), o("applies icon-xl size classes correctly", () => {
|
|
82
|
-
l(/* @__PURE__ */ n(a, { size: "icon-xl", children: "Icon" }));
|
|
83
|
-
const s = i.getByRole("button");
|
|
84
|
-
t(s).toHaveClass("lsd:w-16"), t(s).toHaveClass("lsd:h-16");
|
|
85
81
|
}), o("uses default variant when not specified", () => {
|
|
86
|
-
|
|
87
|
-
const s =
|
|
82
|
+
a(/* @__PURE__ */ n(l, { children: "Default" }));
|
|
83
|
+
const s = r.getByRole("button");
|
|
88
84
|
t(s).toHaveClass("lsd:bg-primary");
|
|
89
85
|
}), o("uses default size when not specified", () => {
|
|
90
|
-
|
|
91
|
-
const s =
|
|
92
|
-
t(s).toHaveClass("lsd:h-
|
|
86
|
+
a(/* @__PURE__ */ n(l, { children: "Default" }));
|
|
87
|
+
const s = r.getByRole("button");
|
|
88
|
+
t(s).toHaveClass("lsd:h-10");
|
|
93
89
|
}), o("handles click events", () => {
|
|
94
|
-
const s =
|
|
95
|
-
|
|
90
|
+
const s = i.fn();
|
|
91
|
+
a(/* @__PURE__ */ n(l, { onClick: s, children: "Click me" })), u.click(r.getByRole("button")), t(s).toHaveBeenCalledTimes(1);
|
|
96
92
|
}), o("forwards ref to underlying button element", () => {
|
|
97
|
-
const s =
|
|
98
|
-
|
|
93
|
+
const s = i.fn();
|
|
94
|
+
a(/* @__PURE__ */ n(l, { ref: s, children: "Ref Test" })), t(s).toHaveBeenCalled(), t(s.mock.calls[0][0]).toBeInstanceOf(HTMLButtonElement);
|
|
99
95
|
}), o("applies disabled state correctly", () => {
|
|
100
|
-
|
|
101
|
-
const s =
|
|
96
|
+
a(/* @__PURE__ */ n(l, { disabled: !0, children: "Disabled" }));
|
|
97
|
+
const s = r.getByRole("button");
|
|
102
98
|
t(s).toBeDisabled(), t(s).toHaveClass("lsd:disabled:opacity-34"), t(s).toHaveClass("lsd:disabled:cursor-not-allowed");
|
|
103
99
|
}), o("merges custom className with component classes", () => {
|
|
104
|
-
|
|
105
|
-
const s =
|
|
100
|
+
a(/* @__PURE__ */ n(l, { className: "custom-class", children: "Custom" }));
|
|
101
|
+
const s = r.getByRole("button");
|
|
106
102
|
t(s).toHaveClass("custom-class");
|
|
107
103
|
}), o("applies base classes correctly", () => {
|
|
108
|
-
|
|
109
|
-
const s =
|
|
104
|
+
a(/* @__PURE__ */ n(l, { children: "Base" }));
|
|
105
|
+
const s = r.getByRole("button");
|
|
110
106
|
t(s).toHaveClass("lsd:inline-flex"), t(s).toHaveClass("lsd:items-center"), t(s).toHaveClass("lsd:justify-center"), t(s).toHaveClass("lsd:border"), t(s).toHaveClass("lsd:transition-colors"), t(s).toHaveClass("lsd:cursor-pointer"), t(s).toHaveClass("lsd:text-primary-foreground"), t(s).toHaveClass("lsd:hover:underline");
|
|
111
107
|
}), o("passes through additional props", () => {
|
|
112
|
-
|
|
113
|
-
/* @__PURE__ */ n(
|
|
108
|
+
a(
|
|
109
|
+
/* @__PURE__ */ n(l, { "data-testid": "test-button", "aria-label": "Test", children: "Button" })
|
|
114
110
|
);
|
|
115
|
-
const s =
|
|
111
|
+
const s = r.getByRole("button");
|
|
116
112
|
t(s).toHaveAttribute("data-testid", "test-button"), t(s).toHaveAttribute("aria-label", "Test");
|
|
117
113
|
}), o("shows loading spinner when loading prop is true", () => {
|
|
118
|
-
|
|
119
|
-
const s =
|
|
114
|
+
a(/* @__PURE__ */ n(l, { loading: !0, children: "Loading" }));
|
|
115
|
+
const s = r.getByRole("button");
|
|
120
116
|
t(s).toBeDisabled(), t(s.querySelector("svg")).toBeInTheDocument();
|
|
121
117
|
}), o("dims content when loading", () => {
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
t(
|
|
118
|
+
a(/* @__PURE__ */ n(l, { loading: !0, children: "Click me" }));
|
|
119
|
+
const c = r.getByRole("button").querySelector("span.lsd\\:opacity-50");
|
|
120
|
+
t(c).toHaveTextContent("Click me");
|
|
125
121
|
}), o("does not show spinner when loading prop is false", () => {
|
|
126
|
-
|
|
127
|
-
const s =
|
|
122
|
+
a(/* @__PURE__ */ n(l, { loading: !1, children: "Click me" }));
|
|
123
|
+
const s = r.getByRole("button");
|
|
128
124
|
t(s).not.toBeDisabled(), t(s.querySelector("svg")).not.toBeInTheDocument();
|
|
129
125
|
}), o("applies fullWidth class when fullWidth prop is true", () => {
|
|
130
|
-
|
|
131
|
-
const s =
|
|
126
|
+
a(/* @__PURE__ */ n(l, { fullWidth: !0, children: "Full Width" }));
|
|
127
|
+
const s = r.getByRole("button");
|
|
132
128
|
t(s).toHaveClass("lsd:w-full");
|
|
133
129
|
}), o("does not apply fullWidth class when fullWidth prop is false", () => {
|
|
134
|
-
|
|
135
|
-
const s =
|
|
130
|
+
a(/* @__PURE__ */ n(l, { fullWidth: !1, children: "Normal Width" }));
|
|
131
|
+
const s = r.getByRole("button");
|
|
136
132
|
t(s).not.toHaveClass("lsd:w-full");
|
|
137
133
|
}), o("disables button when loading is true even if disabled prop is false", () => {
|
|
138
|
-
|
|
139
|
-
/* @__PURE__ */ n(
|
|
134
|
+
a(
|
|
135
|
+
/* @__PURE__ */ n(l, { loading: !0, disabled: !1, children: "Loading" })
|
|
140
136
|
);
|
|
141
|
-
const s =
|
|
137
|
+
const s = r.getByRole("button");
|
|
142
138
|
t(s).toBeDisabled();
|
|
143
139
|
}), o("keeps button disabled when both loading and disabled are true", () => {
|
|
144
|
-
|
|
145
|
-
/* @__PURE__ */ n(
|
|
140
|
+
a(
|
|
141
|
+
/* @__PURE__ */ n(l, { loading: !0, disabled: !0, children: "Loading" })
|
|
146
142
|
);
|
|
147
|
-
const s =
|
|
143
|
+
const s = r.getByRole("button");
|
|
148
144
|
t(s).toBeDisabled();
|
|
149
145
|
});
|
|
150
146
|
});
|
|
151
|
-
|
|
147
|
+
d("buttonVariants", () => {
|
|
152
148
|
o("returns correct classes for filled variant", () => {
|
|
153
149
|
t(e({ variant: "filled" })).toContain("lsd:bg-primary"), t(e({ variant: "filled" })).toContain(
|
|
154
150
|
"lsd:text-primary-foreground"
|
|
@@ -234,25 +230,33 @@ c("buttonVariants", () => {
|
|
|
234
230
|
"lsd:hover:bg-lsd-success/90"
|
|
235
231
|
);
|
|
236
232
|
}), o("returns correct classes for medium size", () => {
|
|
237
|
-
t(e({ size: "md" })).toContain("lsd:h-
|
|
233
|
+
t(e({ size: "md" })).toContain("lsd:h-10"), t(e({ size: "md" })).toContain(
|
|
234
|
+
"lsd:px-[var(--lsd-spacing-larger)]"
|
|
235
|
+
), t(e({ size: "md" })).toContain(
|
|
236
|
+
"lsd:py-[var(--lsd-spacing-smaller)]"
|
|
237
|
+
), t(e({ size: "md" })).toContain("lsd:text-base");
|
|
238
238
|
}), o("returns correct classes for small size", () => {
|
|
239
|
-
t(e({ size: "sm" })).toContain("lsd:h-8"), t(e({ size: "sm" })).toContain(
|
|
239
|
+
t(e({ size: "sm" })).toContain("lsd:h-8"), t(e({ size: "sm" })).toContain(
|
|
240
|
+
"lsd:px-[var(--lsd-spacing-small)]"
|
|
241
|
+
), t(e({ size: "sm" })).toContain(
|
|
242
|
+
"lsd:py-[var(--lsd-spacing-smaller)]"
|
|
243
|
+
), t(e({ size: "sm" })).toContain("lsd:text-sm");
|
|
240
244
|
}), o("returns correct classes for large size", () => {
|
|
241
|
-
t(e({ size: "lg" })).toContain("lsd:h-12"), t(e({ size: "lg" })).toContain("lsd:px-8"), t(e({ size: "lg" })).toContain(
|
|
245
|
+
t(e({ size: "lg" })).toContain("lsd:h-12"), t(e({ size: "lg" })).toContain("lsd:px-8"), t(e({ size: "lg" })).toContain(
|
|
246
|
+
"lsd:py-[var(--lsd-spacing-small)]"
|
|
247
|
+
), t(e({ size: "lg" })).toContain("lsd:text-lg");
|
|
242
248
|
}), o("returns correct classes for icon-md size", () => {
|
|
243
249
|
t(e({ size: "icon-md" })).toContain("lsd:w-10"), t(e({ size: "icon-md" })).toContain("lsd:h-10");
|
|
244
250
|
}), o("returns correct classes for icon-sm size", () => {
|
|
245
251
|
t(e({ size: "icon-sm" })).toContain("lsd:w-8"), t(e({ size: "icon-sm" })).toContain("lsd:h-8");
|
|
246
|
-
}), o("returns correct classes for icon-
|
|
247
|
-
t(e({ size: "icon-
|
|
252
|
+
}), o("returns correct classes for icon-md size", () => {
|
|
253
|
+
t(e({ size: "icon-md" })).toContain("lsd:w-10"), t(e({ size: "icon-md" })).toContain("lsd:h-10");
|
|
248
254
|
}), o("returns correct classes for icon-lg size", () => {
|
|
249
255
|
t(e({ size: "icon-lg" })).toContain("lsd:w-12"), t(e({ size: "icon-lg" })).toContain("lsd:h-12");
|
|
250
|
-
}), o("returns correct classes for icon-xl size", () => {
|
|
251
|
-
t(e({ size: "icon-xl" })).toContain("lsd:w-16"), t(e({ size: "icon-xl" })).toContain("lsd:h-16");
|
|
252
256
|
}), o("uses default variant when not specified", () => {
|
|
253
257
|
t(e({})).toContain("lsd:bg-primary");
|
|
254
258
|
}), o("uses default size when not specified", () => {
|
|
255
|
-
t(e({})).toContain("lsd:h-
|
|
259
|
+
t(e({})).toContain("lsd:h-10");
|
|
256
260
|
}), o("combines variant and size correctly", () => {
|
|
257
261
|
const s = e({ variant: "outlined", size: "lg" });
|
|
258
262
|
t(s).toContain("lsd:bg-transparent"), t(s).toContain("lsd:h-12");
|
|
@@ -3,7 +3,7 @@ import { IconSize, SizeVariant } from '../../../lib/types';
|
|
|
3
3
|
export type ButtonVariant = 'filled' | 'outlined' | 'filled-icon' | 'outlined-icon' | 'link' | 'ghost' | 'ghost-icon' | 'destructive' | 'destructive-icon' | 'success' | 'success-icon';
|
|
4
4
|
export declare const buttonVariants: (props?: ({
|
|
5
5
|
variant?: "link" | "outlined" | "filled" | "filled-icon" | "outlined-icon" | "ghost" | "ghost-icon" | "destructive" | "destructive-icon" | "success" | "success-icon" | null | undefined;
|
|
6
|
-
size?: "
|
|
6
|
+
size?: "sm" | "md" | "lg" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export type ButtonVariants = VariantProps<typeof buttonVariants> & {
|
|
9
9
|
variant?: ButtonVariant;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { S as
|
|
3
|
-
import * as
|
|
4
|
-
import { c as
|
|
5
|
-
const
|
|
6
|
-
({ className: s, asChild: o = !1, ...d }, e) => /* @__PURE__ */
|
|
7
|
-
o ?
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { S as t } from "../../../index-BvoZGpli.js";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { c as a } from "../../../utils-DtaLkIY8.js";
|
|
5
|
+
const m = r.forwardRef(
|
|
6
|
+
({ className: s, asChild: o = !1, ...d }, e) => /* @__PURE__ */ l(
|
|
7
|
+
o ? t : "div",
|
|
8
8
|
{
|
|
9
9
|
ref: e,
|
|
10
|
-
className:
|
|
11
|
-
"lsd:bg-secondary lsd:flex lsd:items-center lsd:gap-
|
|
10
|
+
className: a(
|
|
11
|
+
"lsd:bg-secondary lsd:flex lsd:items-center lsd:gap-(--lsd-spacing-smaller) lsd:rounded-md lsd:border lsd:px-(--lsd-spacing-base) lsd:text-sm lsd:font-medium lsd:shadow-xs lsd:[&_svg]:pointer-events-none lsd:[&_svg:not([class*='size-'])]:size-4 lsd:disabled:cursor-not-allowed",
|
|
12
12
|
s
|
|
13
13
|
),
|
|
14
14
|
...d
|
|
15
15
|
}
|
|
16
16
|
)
|
|
17
17
|
);
|
|
18
|
-
|
|
18
|
+
m.displayName = "ButtonGroupText";
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
m as ButtonGroupText
|
|
21
21
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { d as l, i as e, r as s, g as o, s as c } from "../../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
|
-
import "../../../../ButtonGroup-
|
|
3
|
+
import "../../../../ButtonGroup-WtMRnYIq.js";
|
|
4
4
|
import { ButtonGroupSeparator as n } from "../ButtonGroupSeparator.js";
|
|
5
5
|
import "../ButtonGroupText.js";
|
|
6
6
|
const i = (t, a) => t.querySelector(`[data-slot="${a}"]`);
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { d, i as a, r as
|
|
3
|
-
import "../../../../ButtonGroup-
|
|
2
|
+
import { d, i as a, r as l, g as t, s as o } from "../../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
|
+
import "../../../../ButtonGroup-WtMRnYIq.js";
|
|
4
4
|
import "../ButtonGroupSeparator.js";
|
|
5
5
|
import { ButtonGroupText as r } from "../ButtonGroupText.js";
|
|
6
6
|
d("ButtonGroupText", () => {
|
|
7
7
|
a("renders without crashing", () => {
|
|
8
|
-
|
|
8
|
+
l(/* @__PURE__ */ s(r, { children: "Text" })), t(o.getByText("Text")).toBeInTheDocument();
|
|
9
9
|
}), a("renders with custom className", () => {
|
|
10
|
-
|
|
10
|
+
l(/* @__PURE__ */ s(r, { className: "custom-class", children: "Text" })), t(o.getByText("Text")).toHaveClass("custom-class");
|
|
11
11
|
}), a("applies default classes", () => {
|
|
12
|
-
|
|
13
|
-
const e =
|
|
14
|
-
t(e).toHaveClass("lsd:bg-secondary"), t(e).toHaveClass("lsd:flex"), t(e).toHaveClass("lsd:items-center"), t(e).toHaveClass("lsd:gap-
|
|
12
|
+
l(/* @__PURE__ */ s(r, { children: "Text" }));
|
|
13
|
+
const e = o.getByText("Text");
|
|
14
|
+
t(e).toHaveClass("lsd:bg-secondary"), t(e).toHaveClass("lsd:flex"), t(e).toHaveClass("lsd:items-center"), t(e).toHaveClass("lsd:gap-(--lsd-spacing-smaller)"), t(e).toHaveClass("lsd:rounded-md"), t(e).toHaveClass("lsd:border"), t(e).toHaveClass("lsd:px-(--lsd-spacing-base)"), t(e).toHaveClass("lsd:text-sm"), t(e).toHaveClass("lsd:font-medium"), t(e).toHaveClass("lsd:shadow-xs");
|
|
15
15
|
}), a("renders as div by default", () => {
|
|
16
|
-
|
|
17
|
-
const e =
|
|
16
|
+
l(/* @__PURE__ */ s(r, { children: "Text" }));
|
|
17
|
+
const e = o.getByText("Text");
|
|
18
18
|
t(e.tagName).toBe("DIV");
|
|
19
19
|
}), a("renders as Slot when asChild is true", () => {
|
|
20
|
-
|
|
20
|
+
l(
|
|
21
21
|
/* @__PURE__ */ s(r, { asChild: !0, children: /* @__PURE__ */ s("span", { children: "Text" }) })
|
|
22
22
|
);
|
|
23
|
-
const e =
|
|
23
|
+
const e = o.getByText("Text");
|
|
24
24
|
t(e.tagName).toBe("SPAN");
|
|
25
25
|
}), a("passes through additional props", () => {
|
|
26
|
-
|
|
26
|
+
l(
|
|
27
27
|
/* @__PURE__ */ s(r, { "data-testid": "test-text", "data-custom": "value", children: "Text" })
|
|
28
|
-
), t(
|
|
28
|
+
), t(o.getByTestId("test-text")).toHaveAttribute(
|
|
29
29
|
"data-custom",
|
|
30
30
|
"value"
|
|
31
31
|
);
|
|
32
32
|
}), a("forwards ref", () => {
|
|
33
33
|
const e = { current: null };
|
|
34
|
-
|
|
34
|
+
l(/* @__PURE__ */ s(r, { ref: e, children: "Text" })), t(e.current).toBeInstanceOf(HTMLDivElement);
|
|
35
35
|
});
|
|
36
36
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { d, i as r, r as s, g as t, s as u } from "../../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
|
-
import { b as c, B as a } from "../../../../ButtonGroup-
|
|
3
|
+
import { b as c, B as a } from "../../../../ButtonGroup-WtMRnYIq.js";
|
|
4
4
|
import { ButtonGroupSeparator as p } from "../ButtonGroupSeparator.js";
|
|
5
5
|
import { ButtonGroupText as h } from "../ButtonGroupText.js";
|
|
6
6
|
const l = (o, n) => o.querySelector(`[data-slot="${n}"]`);
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
3
|
import { c as d } from "../../../utils-DtaLkIY8.js";
|
|
4
|
-
const e =
|
|
4
|
+
const e = o.forwardRef(({ className: r, ...a }, t) => /* @__PURE__ */ s(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
|
-
ref:
|
|
7
|
+
ref: t,
|
|
8
8
|
"data-slot": "card-content",
|
|
9
|
-
className: d(
|
|
10
|
-
|
|
9
|
+
className: d(
|
|
10
|
+
"lsd:px-(--lsd-spacing-larger) lsd:py-(--lsd-spacing-larger)",
|
|
11
|
+
r
|
|
12
|
+
),
|
|
13
|
+
...a
|
|
11
14
|
}
|
|
12
15
|
));
|
|
13
16
|
e.displayName = "CardContent";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "react";
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
3
|
+
import { c as o } from "../../../utils-DtaLkIY8.js";
|
|
4
|
+
const l = e.forwardRef(({ className: r, ...s }, d) => /* @__PURE__ */ a(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
7
|
ref: d,
|
|
8
8
|
"data-slot": "card-footer",
|
|
9
|
-
className:
|
|
10
|
-
"lsd:flex lsd:items-center lsd:px-
|
|
9
|
+
className: o(
|
|
10
|
+
"lsd:flex lsd:items-center lsd:px-(--lsd-spacing-larger) lsd:py-(--lsd-spacing-larger) lsd:border-t lsd:border-lsd-border lsd:pt-(--lsd-spacing-larger)",
|
|
11
11
|
r
|
|
12
12
|
),
|
|
13
|
-
...
|
|
13
|
+
...s
|
|
14
14
|
}
|
|
15
15
|
));
|
|
16
|
-
|
|
16
|
+
l.displayName = "CardFooter";
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
l as CardFooter
|
|
19
19
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { c as e } from "../../../utils-DtaLkIY8.js";
|
|
4
|
+
const o = l.forwardRef(({ className: r, ...a }, d) => /* @__PURE__ */ s(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
|
-
ref:
|
|
7
|
+
ref: d,
|
|
8
8
|
"data-slot": "card-header",
|
|
9
|
-
className:
|
|
10
|
-
"@container/card-header lsd:grid lsd:auto-rows-min lsd:grid-rows-[auto_auto] lsd:items-start lsd:gap-
|
|
9
|
+
className: e(
|
|
10
|
+
"@container/card-header lsd:grid lsd:auto-rows-min lsd:grid-rows-[auto_auto] lsd:items-start lsd:gap-(--lsd-spacing-smaller) lsd:px-(--lsd-spacing-larger) lsd:py-(--lsd-spacing-larger) lsd:has-data-[slot=card-action]:grid-cols-[1fr_auto] lsd:border-b lsd:border-lsd-border lsd:pb-(--lsd-spacing-larger)",
|
|
11
11
|
r
|
|
12
12
|
),
|
|
13
|
-
...
|
|
13
|
+
...a
|
|
14
14
|
}
|
|
15
15
|
));
|
|
16
|
-
|
|
16
|
+
o.displayName = "CardHeader";
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
o as CardHeader
|
|
19
19
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { d as
|
|
2
|
+
import { d as l, i as s, r as o, g as r, s as i } from "../../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
3
|
import "../Card.js";
|
|
4
4
|
import "../CardAction.js";
|
|
5
|
-
import { CardContent as
|
|
5
|
+
import { CardContent as a } from "../CardContent.js";
|
|
6
6
|
import "../CardDescription.js";
|
|
7
7
|
import "../CardFooter.js";
|
|
8
8
|
import "../CardHeader.js";
|
|
9
9
|
import "../CardTitle.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const { container: t } =
|
|
14
|
-
|
|
15
|
-
}),
|
|
16
|
-
const { container: t } =
|
|
17
|
-
|
|
18
|
-
}),
|
|
19
|
-
const { container: t } =
|
|
20
|
-
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
/* @__PURE__ */ n(
|
|
24
|
-
),
|
|
25
|
-
}),
|
|
10
|
+
const c = (t, e) => t.querySelector(`[data-slot="${e}"]`);
|
|
11
|
+
l("CardContent", () => {
|
|
12
|
+
s("renders without crashing", () => {
|
|
13
|
+
const { container: t } = o(/* @__PURE__ */ n(a, {}));
|
|
14
|
+
r(c(t, "card-content")).toBeInTheDocument();
|
|
15
|
+
}), s("renders with custom className", () => {
|
|
16
|
+
const { container: t } = o(/* @__PURE__ */ n(a, { className: "custom-class" })), e = c(t, "card-content");
|
|
17
|
+
r(e).toHaveClass("custom-class");
|
|
18
|
+
}), s("applies default classes", () => {
|
|
19
|
+
const { container: t } = o(/* @__PURE__ */ n(a, {})), e = c(t, "card-content");
|
|
20
|
+
r(e).toHaveClass("lsd:px-(--lsd-spacing-larger)"), r(e).toHaveClass("lsd:py-(--lsd-spacing-larger)");
|
|
21
|
+
}), s("renders children", () => {
|
|
22
|
+
o(
|
|
23
|
+
/* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: "Content" }) })
|
|
24
|
+
), r(i.getByText("Content")).toBeInTheDocument();
|
|
25
|
+
}), s("forwards ref", () => {
|
|
26
26
|
const t = { current: null };
|
|
27
|
-
|
|
27
|
+
o(/* @__PURE__ */ n(a, { ref: t })), r(t.current).toBeInstanceOf(HTMLDivElement);
|
|
28
28
|
});
|
|
29
29
|
});
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { d as
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { d as c, i as o, r as a, g as t, s as d } from "../../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
3
|
import "../Card.js";
|
|
4
4
|
import "../CardAction.js";
|
|
5
5
|
import "../CardContent.js";
|
|
6
6
|
import "../CardDescription.js";
|
|
7
|
-
import { CardFooter as
|
|
7
|
+
import { CardFooter as l } from "../CardFooter.js";
|
|
8
8
|
import "../CardHeader.js";
|
|
9
9
|
import "../CardTitle.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const { container:
|
|
14
|
-
|
|
15
|
-
}),
|
|
16
|
-
const { container:
|
|
17
|
-
e
|
|
18
|
-
}),
|
|
19
|
-
const { container:
|
|
20
|
-
e
|
|
21
|
-
}),
|
|
10
|
+
const n = (r, e) => r.querySelector(`[data-slot="${e}"]`);
|
|
11
|
+
c("CardFooter", () => {
|
|
12
|
+
o("renders without crashing", () => {
|
|
13
|
+
const { container: r } = a(/* @__PURE__ */ s(l, {}));
|
|
14
|
+
t(n(r, "card-footer")).toBeInTheDocument();
|
|
15
|
+
}), o("renders with custom className", () => {
|
|
16
|
+
const { container: r } = a(/* @__PURE__ */ s(l, { className: "custom-class" })), e = n(r, "card-footer");
|
|
17
|
+
t(e).toHaveClass("custom-class");
|
|
18
|
+
}), o("applies default classes", () => {
|
|
19
|
+
const { container: r } = a(/* @__PURE__ */ s(l, {})), e = n(r, "card-footer");
|
|
20
|
+
t(e).toHaveClass("lsd:flex"), t(e).toHaveClass("lsd:items-center"), t(e).toHaveClass("lsd:px-(--lsd-spacing-larger)"), t(e).toHaveClass("lsd:py-(--lsd-spacing-larger)"), t(e).toHaveClass("lsd:border-t"), t(e).toHaveClass("lsd:border-lsd-border"), t(e).toHaveClass("lsd:pt-(--lsd-spacing-larger)");
|
|
21
|
+
}), o("renders children", () => {
|
|
22
22
|
a(
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
),
|
|
25
|
-
}),
|
|
26
|
-
const
|
|
27
|
-
a(/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ s(l, { children: /* @__PURE__ */ s("button", { type: "button", children: "Footer Action" }) })
|
|
24
|
+
), t(d.getByRole("button")).toBeInTheDocument();
|
|
25
|
+
}), o("forwards ref", () => {
|
|
26
|
+
const r = { current: null };
|
|
27
|
+
a(/* @__PURE__ */ s(l, { ref: r })), t(r.current).toBeInstanceOf(HTMLDivElement);
|
|
28
28
|
});
|
|
29
29
|
});
|