@nipsys/shadcn-lsd 0.2.1 → 0.2.3
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/README.md +52 -34
- package/dist/{Button-L-du0fyx.js → Button-DoTpV6G1.js} +31 -26
- package/dist/{Typography-D8OaaVSH.js → Typography-BW4Kc9SY.js} +18 -14
- package/dist/assets/style.css +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/__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 +1 -1
- 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 +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-header.test.js +1 -1
- 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/button/Button.js +1 -1
- package/dist/components/ui/button/button.test.js +159 -123
- package/dist/components/ui/button/types.d.ts +3 -3
- package/dist/components/ui/menubar/Menubar.js +2 -2
- package/dist/components/ui/menubar/MenubarCheckboxItem.js +7 -7
- package/dist/components/ui/menubar/MenubarContent.js +6 -6
- package/dist/components/ui/menubar/MenubarGroup.js +1 -1
- package/dist/components/ui/menubar/MenubarItem.js +2 -2
- package/dist/components/ui/menubar/MenubarLabel.js +4 -4
- package/dist/components/ui/menubar/MenubarMenu.js +1 -1
- package/dist/components/ui/menubar/MenubarPortal.js +1 -1
- package/dist/components/ui/menubar/MenubarRadioGroup.js +1 -1
- package/dist/components/ui/menubar/MenubarRadioItem.js +5 -5
- package/dist/components/ui/menubar/MenubarSeparator.js +6 -6
- package/dist/components/ui/menubar/MenubarSub.js +1 -1
- package/dist/components/ui/menubar/MenubarSubContent.js +5 -5
- package/dist/components/ui/menubar/MenubarSubTrigger.js +4 -4
- package/dist/components/ui/menubar/MenubarTrigger.js +2 -2
- package/dist/components/ui/sidebar/SidebarContent.js +15 -15
- package/dist/components/ui/sidebar/__tests__/sidebar-group.test.js +1 -1
- package/dist/components/ui/sidebar/__tests__/sidebar-menu.test.js +1 -1
- package/dist/components/ui/sidebar/__tests__/sidebar.test.js +1 -1
- 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-list.test.js +25 -25
- package/dist/components/ui/tabs/__tests__/tabs-trigger.test.js +1 -3
- package/dist/components/ui/tabs/__tests__/tabs.test.js +23 -23
- package/dist/components/ui/typography/Typography.js +1 -1
- package/dist/components/ui/typography/types.d.ts +1 -1
- package/dist/components/ui/typography/typography.test.js +143 -111
- package/dist/{index-DSoDGF_j.js → index-CUMPAqVa.js} +18 -18
- package/dist/lib/types.d.ts +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.js +235 -201
- package/dist/{types-D94euSAG.js → types-BSbBWG9A.js} +10 -10
- package/dist/{types-B0wccExf.js → types-ClTXXuXM.js} +2 -2
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { c as r } from "../../../utils-DtaLkIY8.js";
|
|
3
|
-
import { a } from "../../../types-
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
3
|
+
import { f as a } from "../../../types-BSbBWG9A.js";
|
|
4
|
+
import { e } from "../../../index-CUMPAqVa.js";
|
|
5
|
+
function f({ className: t, ...n }) {
|
|
6
6
|
return /* @__PURE__ */ o(
|
|
7
|
-
|
|
7
|
+
e,
|
|
8
8
|
{
|
|
9
9
|
"data-slot": "menubar-sub-content",
|
|
10
10
|
className: r(a(), t),
|
|
@@ -13,5 +13,5 @@ function i({ className: t, ...n }) {
|
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
f as MenubarSubContent
|
|
17
17
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { c as n } from "../../../utils-DtaLkIY8.js";
|
|
3
|
-
import {
|
|
3
|
+
import { i } from "../../../types-BSbBWG9A.js";
|
|
4
4
|
import { c as m } from "../../../createLucideIcon-CP-mMPfa.js";
|
|
5
|
-
import {
|
|
5
|
+
import { g as u } from "../../../index-CUMPAqVa.js";
|
|
6
6
|
const c = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], d = m("chevron-right", c);
|
|
7
|
-
function
|
|
7
|
+
function f({
|
|
8
8
|
className: s,
|
|
9
9
|
inset: r,
|
|
10
10
|
children: e,
|
|
@@ -29,5 +29,5 @@ function b({
|
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
f as MenubarSubTrigger
|
|
33
33
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { c as o } from "../../../utils-DtaLkIY8.js";
|
|
3
|
-
import {
|
|
4
|
-
import { T as e } from "../../../index-
|
|
3
|
+
import { g as t } from "../../../types-BSbBWG9A.js";
|
|
4
|
+
import { T as e } from "../../../index-CUMPAqVa.js";
|
|
5
5
|
function f({ className: r, ...a }) {
|
|
6
6
|
return /* @__PURE__ */ m(
|
|
7
7
|
e,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as s, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { B as n } from "../../../Button-
|
|
3
|
-
import { I as
|
|
4
|
-
import { Separator as
|
|
2
|
+
import { B as n } from "../../../Button-DoTpV6G1.js";
|
|
3
|
+
import { I as f } from "../../../Input-W8QqFI1v.js";
|
|
4
|
+
import { Separator as c } from "../separator/Separator.js";
|
|
5
5
|
import { c as d } from "../../../utils-DtaLkIY8.js";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as t } from "../../../SidebarContext-CRh-DPz_.js";
|
|
7
7
|
import { c as b } from "../../../createLucideIcon-CP-mMPfa.js";
|
|
8
8
|
const p = [
|
|
9
9
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
@@ -50,7 +50,7 @@ function y({
|
|
|
50
50
|
...e
|
|
51
51
|
}) {
|
|
52
52
|
return /* @__PURE__ */ s(
|
|
53
|
-
|
|
53
|
+
c,
|
|
54
54
|
{
|
|
55
55
|
"data-slot": "sidebar-separator",
|
|
56
56
|
"data-sidebar": "separator",
|
|
@@ -61,7 +61,7 @@ function y({
|
|
|
61
61
|
}
|
|
62
62
|
function I({ className: a, ...e }) {
|
|
63
63
|
return /* @__PURE__ */ s(
|
|
64
|
-
|
|
64
|
+
f,
|
|
65
65
|
{
|
|
66
66
|
"data-slot": "sidebar-input",
|
|
67
67
|
"data-sidebar": "input",
|
|
@@ -90,30 +90,30 @@ function _({ className: a, ...e }) {
|
|
|
90
90
|
function T({
|
|
91
91
|
className: a,
|
|
92
92
|
onClick: e,
|
|
93
|
-
...
|
|
93
|
+
...l
|
|
94
94
|
}) {
|
|
95
|
-
const { toggleSidebar: r } =
|
|
95
|
+
const { toggleSidebar: r } = t();
|
|
96
96
|
return /* @__PURE__ */ o(
|
|
97
97
|
n,
|
|
98
98
|
{
|
|
99
99
|
"data-sidebar": "trigger",
|
|
100
100
|
"data-slot": "sidebar-trigger",
|
|
101
|
-
variant: "
|
|
102
|
-
size: "icon-
|
|
103
|
-
className:
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
size: "icon-xs",
|
|
103
|
+
className: a,
|
|
104
104
|
onClick: (i) => {
|
|
105
105
|
e?.(i), r();
|
|
106
106
|
},
|
|
107
|
-
...
|
|
107
|
+
...l,
|
|
108
108
|
children: [
|
|
109
|
-
/* @__PURE__ */ s(u, {}),
|
|
109
|
+
/* @__PURE__ */ s(u, { className: "lsd:size-full" }),
|
|
110
110
|
/* @__PURE__ */ s("span", { className: "lsd:sr-only", children: "Toggle Sidebar" })
|
|
111
111
|
]
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
function C({ className: a, ...e }) {
|
|
116
|
-
const { toggleSidebar:
|
|
116
|
+
const { toggleSidebar: l } = t();
|
|
117
117
|
return /* @__PURE__ */ s(
|
|
118
118
|
"button",
|
|
119
119
|
{
|
|
@@ -121,7 +121,7 @@ function C({ className: a, ...e }) {
|
|
|
121
121
|
"data-slot": "sidebar-rail",
|
|
122
122
|
"aria-label": "Toggle Sidebar",
|
|
123
123
|
tabIndex: -1,
|
|
124
|
-
onClick:
|
|
124
|
+
onClick: l,
|
|
125
125
|
title: "Toggle Sidebar",
|
|
126
126
|
className: d(
|
|
127
127
|
"hover:after:bg-sidebar-border lsd:absolute lsd:inset-y-0 lsd:z-20 lsd:hidden lsd:w-4 lsd:-translate-x-1/2 lsd:transition-all lsd:ease-linear lsd:group-data-[side=left]:-right-4 lsd:group-data-[side=right]:left-0 after:lsd:absolute after:lsd:inset-y-0 after:lsd:left-1/2 after:lsd:w-[2px] lsd:sm:flex",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { d as i, i as t, r as a, g as e, s as n } from "../../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
3
|
import "../../../../SidebarContext-CRh-DPz_.js";
|
|
4
|
-
import "../../../../Button-
|
|
4
|
+
import "../../../../Button-DoTpV6G1.js";
|
|
5
5
|
import "../../../../Input-W8QqFI1v.js";
|
|
6
6
|
import "../../separator/Separator.js";
|
|
7
7
|
import { SidebarGroup as l } from "../SidebarGroup.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { d as l, i as n, r, g as e, s as c } from "../../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
3
|
import "../../../../SidebarContext-CRh-DPz_.js";
|
|
4
|
-
import "../../../../Button-
|
|
4
|
+
import "../../../../Button-DoTpV6G1.js";
|
|
5
5
|
import "../../../../Input-W8QqFI1v.js";
|
|
6
6
|
import "../../separator/Separator.js";
|
|
7
7
|
import { SidebarMenu as a } from "../SidebarMenu.js";
|
|
@@ -99,7 +99,7 @@ l("SidebarTrigger", () => {
|
|
|
99
99
|
const { container: s } = r(
|
|
100
100
|
/* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(I, {}) })
|
|
101
101
|
), n = o(s, "sidebar-trigger");
|
|
102
|
-
t(n).toHaveClass("lsd:
|
|
102
|
+
t(n).toHaveClass("lsd:w-6"), t(n).toHaveClass("lsd:h-6");
|
|
103
103
|
}), a("renders PanelLeftIcon", () => {
|
|
104
104
|
r(
|
|
105
105
|
/* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(I, {}) })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { R as m } from "../../../index-C8zhdkSa.js";
|
|
3
3
|
import { c as i } from "../../../utils-DtaLkIY8.js";
|
|
4
|
-
import { t as f } from "../../../types-
|
|
4
|
+
import { t as f } from "../../../types-ClTXXuXM.js";
|
|
5
5
|
function e({ className: t, size: o, fullWidth: a, ...r }) {
|
|
6
6
|
return /* @__PURE__ */ s(
|
|
7
7
|
m,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { L as i } from "../../../index-C8zhdkSa.js";
|
|
3
3
|
import { c as m } from "../../../utils-DtaLkIY8.js";
|
|
4
|
-
import { a as f } from "../../../types-
|
|
4
|
+
import { a as f } from "../../../types-ClTXXuXM.js";
|
|
5
5
|
function b({ className: t, size: s, fullWidth: a, ...r }) {
|
|
6
6
|
return /* @__PURE__ */ o(
|
|
7
7
|
i,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { T as i } from "../../../index-C8zhdkSa.js";
|
|
3
3
|
import { c as m } from "../../../utils-DtaLkIY8.js";
|
|
4
|
-
import { b as g } from "../../../types-
|
|
4
|
+
import { b as g } from "../../../types-ClTXXuXM.js";
|
|
5
5
|
function T({
|
|
6
6
|
className: r,
|
|
7
7
|
size: t,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { d as
|
|
2
|
+
import { d as o, i, r as d, g as l } from "../../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
3
|
import { Tabs as r } from "../Tabs.js";
|
|
4
|
-
import { TabsContent as
|
|
5
|
-
import { TabsList as
|
|
4
|
+
import { TabsContent as n } from "../TabsContent.js";
|
|
5
|
+
import { TabsList as c } from "../TabsList.js";
|
|
6
6
|
import { TabsTrigger as s } from "../TabsTrigger.js";
|
|
7
|
-
|
|
7
|
+
o("TabsList", () => {
|
|
8
8
|
i("renders without crashing", () => {
|
|
9
9
|
d(
|
|
10
10
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
11
|
-
/* @__PURE__ */ a(
|
|
11
|
+
/* @__PURE__ */ a(c, { children: [
|
|
12
12
|
/* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }),
|
|
13
13
|
/* @__PURE__ */ t(s, { value: "tab-2", children: "Tab 2" })
|
|
14
14
|
] }),
|
|
15
|
-
/* @__PURE__ */ t(
|
|
15
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
16
16
|
] })
|
|
17
17
|
), l(
|
|
18
18
|
document.querySelector('[data-slot="tabs-list"]')
|
|
@@ -20,8 +20,8 @@ c("TabsList", () => {
|
|
|
20
20
|
}), i("applies data-slot attribute", () => {
|
|
21
21
|
d(
|
|
22
22
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
23
|
-
/* @__PURE__ */ t(
|
|
24
|
-
/* @__PURE__ */ t(
|
|
23
|
+
/* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }) }),
|
|
24
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
25
25
|
] })
|
|
26
26
|
);
|
|
27
27
|
const e = document.querySelector('[data-slot="tabs-list"]');
|
|
@@ -29,17 +29,17 @@ c("TabsList", () => {
|
|
|
29
29
|
}), i("applies base classes correctly", () => {
|
|
30
30
|
d(
|
|
31
31
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
32
|
-
/* @__PURE__ */ t(
|
|
33
|
-
/* @__PURE__ */ t(
|
|
32
|
+
/* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }) }),
|
|
33
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
34
34
|
] })
|
|
35
35
|
);
|
|
36
36
|
const e = document.querySelector('[data-slot="tabs-list"]');
|
|
37
|
-
l(e).toHaveClass("lsd:bg-lsd-surface"), l(e).toHaveClass("lsd:border-b"), l(e).toHaveClass("lsd:
|
|
37
|
+
l(e).toHaveClass("lsd:bg-lsd-surface"), l(e).toHaveClass("lsd:border-b"), l(e).toHaveClass("lsd:flex"), l(e).toHaveClass("lsd:flex-row");
|
|
38
38
|
}), i("applies default size classes (lg)", () => {
|
|
39
39
|
d(
|
|
40
40
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
41
|
-
/* @__PURE__ */ t(
|
|
42
|
-
/* @__PURE__ */ t(
|
|
41
|
+
/* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }) }),
|
|
42
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
43
43
|
] })
|
|
44
44
|
);
|
|
45
45
|
const e = document.querySelector('[data-slot="tabs-list"]');
|
|
@@ -47,8 +47,8 @@ c("TabsList", () => {
|
|
|
47
47
|
}), i('applies small size classes when size="sm"', () => {
|
|
48
48
|
d(
|
|
49
49
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
50
|
-
/* @__PURE__ */ t(
|
|
51
|
-
/* @__PURE__ */ t(
|
|
50
|
+
/* @__PURE__ */ t(c, { size: "sm", children: /* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }) }),
|
|
51
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
52
52
|
] })
|
|
53
53
|
);
|
|
54
54
|
const e = document.querySelector('[data-slot="tabs-list"]');
|
|
@@ -56,8 +56,8 @@ c("TabsList", () => {
|
|
|
56
56
|
}), i('applies medium size classes when size="md"', () => {
|
|
57
57
|
d(
|
|
58
58
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
59
|
-
/* @__PURE__ */ t(
|
|
60
|
-
/* @__PURE__ */ t(
|
|
59
|
+
/* @__PURE__ */ t(c, { size: "md", children: /* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }) }),
|
|
60
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
61
61
|
] })
|
|
62
62
|
);
|
|
63
63
|
const e = document.querySelector('[data-slot="tabs-list"]');
|
|
@@ -65,8 +65,8 @@ c("TabsList", () => {
|
|
|
65
65
|
}), i("applies default fullWidth classes (false)", () => {
|
|
66
66
|
d(
|
|
67
67
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
68
|
-
/* @__PURE__ */ t(
|
|
69
|
-
/* @__PURE__ */ t(
|
|
68
|
+
/* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }) }),
|
|
69
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
70
70
|
] })
|
|
71
71
|
);
|
|
72
72
|
const e = document.querySelector('[data-slot="tabs-list"]');
|
|
@@ -74,8 +74,8 @@ c("TabsList", () => {
|
|
|
74
74
|
}), i("applies fullWidth classes when fullWidth={true}", () => {
|
|
75
75
|
d(
|
|
76
76
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
77
|
-
/* @__PURE__ */ t(
|
|
78
|
-
/* @__PURE__ */ t(
|
|
77
|
+
/* @__PURE__ */ t(c, { fullWidth: !0, children: /* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }) }),
|
|
78
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
79
79
|
] })
|
|
80
80
|
);
|
|
81
81
|
const e = document.querySelector('[data-slot="tabs-list"]');
|
|
@@ -83,8 +83,8 @@ c("TabsList", () => {
|
|
|
83
83
|
}), i("merges custom className with component classes", () => {
|
|
84
84
|
d(
|
|
85
85
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
86
|
-
/* @__PURE__ */ t(
|
|
87
|
-
/* @__PURE__ */ t(
|
|
86
|
+
/* @__PURE__ */ t(c, { className: "custom-list-class", children: /* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }) }),
|
|
87
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
88
88
|
] })
|
|
89
89
|
);
|
|
90
90
|
const e = document.querySelector('[data-slot="tabs-list"]');
|
|
@@ -92,8 +92,8 @@ c("TabsList", () => {
|
|
|
92
92
|
}), i("passes through additional props", () => {
|
|
93
93
|
d(
|
|
94
94
|
/* @__PURE__ */ a(r, { defaultValue: "tab-1", children: [
|
|
95
|
-
/* @__PURE__ */ t(
|
|
96
|
-
/* @__PURE__ */ t(
|
|
95
|
+
/* @__PURE__ */ t(c, { "data-testid": "test-list", id: "list-1", children: /* @__PURE__ */ t(s, { value: "tab-1", children: "Tab 1" }) }),
|
|
96
|
+
/* @__PURE__ */ t(n, { value: "tab-1", children: "Content 1" })
|
|
97
97
|
] })
|
|
98
98
|
);
|
|
99
99
|
const e = document.querySelector('[data-slot="tabs-list"]');
|
|
@@ -45,9 +45,7 @@ b("TabsTrigger", () => {
|
|
|
45
45
|
] })
|
|
46
46
|
);
|
|
47
47
|
const e = c.getByRole("tab", { name: "Tab 1" });
|
|
48
|
-
a(e).toHaveAttribute("data-state", "active"), a(e).toHaveClass(
|
|
49
|
-
"lsd:data-[state=active]:border-lsd-text-primary"
|
|
50
|
-
), a(e).toHaveClass("lsd:data-[state=active]:bg-lsd-surface"), a(e).toHaveClass("lsd:data-[state=active]:font-medium");
|
|
48
|
+
a(e).toHaveAttribute("data-state", "active"), a(e).toHaveClass("lsd:data-[state=active]:border-lsd-border"), a(e).toHaveClass("lsd:data-[state=active]:bg-lsd-surface"), a(e).toHaveClass("lsd:data-[state=active]:font-medium");
|
|
51
49
|
}), d("applies default size classes (lg)", () => {
|
|
52
50
|
i(
|
|
53
51
|
/* @__PURE__ */ l(n, { defaultValue: "tab-1", children: [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { d as C, i as s, r as b, g as t, s as f } from "../../../../vi.2VT5v0um-D9hIOtVQ.js";
|
|
3
3
|
import { Tabs as h } from "../Tabs.js";
|
|
4
|
-
import { TabsContent as
|
|
4
|
+
import { TabsContent as o } from "../TabsContent.js";
|
|
5
5
|
import { TabsList as m } from "../TabsList.js";
|
|
6
6
|
import { TabsTrigger as l } from "../TabsTrigger.js";
|
|
7
|
-
import { t as d, a as c, b as u } from "../../../../types-
|
|
7
|
+
import { t as d, a as c, b as u } from "../../../../types-ClTXXuXM.js";
|
|
8
8
|
C("Tabs", () => {
|
|
9
9
|
s("renders without crashing", () => {
|
|
10
10
|
b(
|
|
@@ -13,15 +13,15 @@ C("Tabs", () => {
|
|
|
13
13
|
/* @__PURE__ */ a(l, { value: "tab-1", children: "Tab 1" }),
|
|
14
14
|
/* @__PURE__ */ a(l, { value: "tab-2", children: "Tab 2" })
|
|
15
15
|
] }),
|
|
16
|
-
/* @__PURE__ */ a(
|
|
17
|
-
/* @__PURE__ */ a(
|
|
16
|
+
/* @__PURE__ */ a(o, { value: "tab-1", children: "Content 1" }),
|
|
17
|
+
/* @__PURE__ */ a(o, { value: "tab-2", children: "Content 2" })
|
|
18
18
|
] })
|
|
19
19
|
), t(document.querySelector('[data-slot="tabs"]')).toBeInTheDocument();
|
|
20
20
|
}), s("applies data-slot attribute", () => {
|
|
21
21
|
b(
|
|
22
22
|
/* @__PURE__ */ i(h, { defaultValue: "tab-1", children: [
|
|
23
23
|
/* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(l, { value: "tab-1", children: "Tab 1" }) }),
|
|
24
|
-
/* @__PURE__ */ a(
|
|
24
|
+
/* @__PURE__ */ a(o, { value: "tab-1", children: "Content 1" })
|
|
25
25
|
] })
|
|
26
26
|
);
|
|
27
27
|
const e = document.querySelector('[data-slot="tabs"]');
|
|
@@ -30,7 +30,7 @@ C("Tabs", () => {
|
|
|
30
30
|
b(
|
|
31
31
|
/* @__PURE__ */ i(h, { defaultValue: "tab-1", "data-testid": "test-tabs", id: "tabs-1", children: [
|
|
32
32
|
/* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(l, { value: "tab-1", children: "Tab 1" }) }),
|
|
33
|
-
/* @__PURE__ */ a(
|
|
33
|
+
/* @__PURE__ */ a(o, { value: "tab-1", children: "Content 1" })
|
|
34
34
|
] })
|
|
35
35
|
);
|
|
36
36
|
const e = document.querySelector('[data-slot="tabs"]');
|
|
@@ -39,7 +39,7 @@ C("Tabs", () => {
|
|
|
39
39
|
b(
|
|
40
40
|
/* @__PURE__ */ i(h, { defaultValue: "tab-1", className: "custom-tabs-class", children: [
|
|
41
41
|
/* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(l, { value: "tab-1", children: "Tab 1" }) }),
|
|
42
|
-
/* @__PURE__ */ a(
|
|
42
|
+
/* @__PURE__ */ a(o, { value: "tab-1", children: "Content 1" })
|
|
43
43
|
] })
|
|
44
44
|
);
|
|
45
45
|
const e = document.querySelector('[data-slot="tabs"]');
|
|
@@ -52,9 +52,9 @@ C("Tabs", () => {
|
|
|
52
52
|
/* @__PURE__ */ a(l, { value: "tab-2", children: "Tab 2" }),
|
|
53
53
|
/* @__PURE__ */ a(l, { value: "tab-3", children: "Tab 3" })
|
|
54
54
|
] }),
|
|
55
|
-
/* @__PURE__ */ a(
|
|
56
|
-
/* @__PURE__ */ a(
|
|
57
|
-
/* @__PURE__ */ a(
|
|
55
|
+
/* @__PURE__ */ a(o, { value: "tab-1", children: "Content 1" }),
|
|
56
|
+
/* @__PURE__ */ a(o, { value: "tab-2", children: "Content 2" }),
|
|
57
|
+
/* @__PURE__ */ a(o, { value: "tab-3", children: "Content 3" })
|
|
58
58
|
] })
|
|
59
59
|
), t(document.querySelector('[data-slot="tabs"]')).toBeInTheDocument(), t(
|
|
60
60
|
document.querySelector('[data-slot="tabs-list"]')
|
|
@@ -68,23 +68,23 @@ C("tabsVariants", () => {
|
|
|
68
68
|
const e = d();
|
|
69
69
|
t(e).toBe("");
|
|
70
70
|
}), s("returns correct classes for size variants", () => {
|
|
71
|
-
const e = d({ size: "sm" }),
|
|
72
|
-
t(e).toBe(""), t(
|
|
71
|
+
const e = d({ size: "sm" }), n = d({ size: "md" }), r = d({ size: "lg" });
|
|
72
|
+
t(e).toBe(""), t(n).toBe(""), t(r).toBe("");
|
|
73
73
|
}), s("returns correct classes for fullWidth variants", () => {
|
|
74
|
-
const e = d({ fullWidth: !0 }),
|
|
75
|
-
t(e).toBe(""), t(
|
|
74
|
+
const e = d({ fullWidth: !0 }), n = d({ fullWidth: !1 });
|
|
75
|
+
t(e).toBe(""), t(n).toBe("");
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
78
|
C("tabsListVariants", () => {
|
|
79
79
|
s("returns correct classes for default variants", () => {
|
|
80
80
|
const e = c();
|
|
81
|
-
t(e).toContain("lsd:bg-lsd-surface"), t(e).toContain("lsd:border-b"), t(e).toContain("lsd:
|
|
81
|
+
t(e).toContain("lsd:bg-lsd-surface"), t(e).toContain("lsd:border-b"), t(e).toContain("lsd:flex"), t(e).toContain("lsd:flex-row"), t(e).toContain("lsd:h-12"), t(e).toContain("lsd:w-fit");
|
|
82
82
|
}), s("returns correct classes for size variants", () => {
|
|
83
|
-
const e = c({ size: "sm" }),
|
|
84
|
-
t(e).toContain("lsd:h-8"), t(
|
|
83
|
+
const e = c({ size: "sm" }), n = c({ size: "md" }), r = c({ size: "lg" });
|
|
84
|
+
t(e).toContain("lsd:h-8"), t(n).toContain("lsd:h-10"), t(r).toContain("lsd:h-12");
|
|
85
85
|
}), s("returns correct classes for fullWidth variants", () => {
|
|
86
|
-
const e = c({ fullWidth: !0 }),
|
|
87
|
-
t(e).toContain("lsd:w-full"), t(
|
|
86
|
+
const e = c({ fullWidth: !0 }), n = c({ fullWidth: !1 });
|
|
87
|
+
t(e).toContain("lsd:w-full"), t(n).toContain("lsd:w-fit");
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
C("tabsTriggerVariants", () => {
|
|
@@ -92,10 +92,10 @@ C("tabsTriggerVariants", () => {
|
|
|
92
92
|
const e = u();
|
|
93
93
|
t(e).toContain("lsd:text-lsd-text"), t(e).toContain("lsd:border"), t(e).toContain("lsd:border-transparent"), t(e).toContain("lsd:border-b-0"), t(e).toContain("lsd:flex"), t(e).toContain("lsd:items-center"), t(e).toContain("lsd:justify-center"), t(e).toContain("lsd:px-5"), t(e).toContain("lsd:py-2.5"), t(e).toContain("lsd:text-lg");
|
|
94
94
|
}), s("returns correct classes for size variants", () => {
|
|
95
|
-
const e = u({ size: "sm" }),
|
|
96
|
-
t(e).toContain("lsd:px-3"), t(e).toContain("lsd:py-1.5"), t(e).toContain("lsd:text-sm"), t(
|
|
95
|
+
const e = u({ size: "sm" }), n = u({ size: "md" }), r = u({ size: "lg" });
|
|
96
|
+
t(e).toContain("lsd:px-3"), t(e).toContain("lsd:py-1.5"), t(e).toContain("lsd:text-sm"), t(n).toContain("lsd:px-4"), t(n).toContain("lsd:py-2"), t(n).toContain("lsd:text-base"), t(r).toContain("lsd:px-5"), t(r).toContain("lsd:py-2.5"), t(r).toContain("lsd:text-lg");
|
|
97
97
|
}), s("returns correct classes for fullWidth variants", () => {
|
|
98
|
-
const e = u({ fullWidth: !0 }),
|
|
99
|
-
t(e).toContain("lsd:flex-1"), t(
|
|
98
|
+
const e = u({ fullWidth: !0 }), n = u({ fullWidth: !1 });
|
|
99
|
+
t(e).toContain("lsd:flex-1"), t(n).not.toContain("lsd:flex-1");
|
|
100
100
|
});
|
|
101
101
|
});
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
export type TypographyVariant = 'display1' | 'display2' | 'display3' | 'display4' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'subtitle3' | 'subtitle4' | 'body1' | 'body2' | 'body3' | 'label1' | 'label2';
|
|
3
3
|
export declare const typographyVariants: (props?: ({
|
|
4
4
|
variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "display1" | "display2" | "display3" | "display4" | "subtitle1" | "subtitle2" | "subtitle3" | "subtitle4" | "body1" | "body2" | "body3" | "label1" | "label2" | null | undefined;
|
|
5
|
-
color?: "secondary" | "primary" | null | undefined;
|
|
5
|
+
color?: "destructive" | "success" | "warning" | "info" | "secondary" | "primary" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export type TypographyVariants = VariantProps<typeof typographyVariants>;
|
|
8
8
|
export interface TypographyProps extends Omit<React.HTMLAttributes<HTMLHeadingElement>, 'color'>, TypographyVariants {
|