@enya-learning/nova 0.7.0 → 0.7.1
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.
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as i } from "../chunks/dist-i6l6wqicjhnap81o.js";
|
|
3
|
-
import { t as
|
|
3
|
+
import { t as m } from "../chunks/utils-chr77evsz8gs6wle.js";
|
|
4
4
|
import { jsx as o } from "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
|
-
var
|
|
6
|
+
var l = i("font-heading font-medium tracking-[-2%]", {
|
|
7
7
|
variants: {
|
|
8
8
|
size: {
|
|
9
9
|
h1: "text-[4.5rem] leading-[5.625rem]",
|
|
10
10
|
h2: "text-[3.75rem] leading-[4.5rem]",
|
|
11
11
|
h3: "text-[3rem] leading-[3.75rem]",
|
|
12
12
|
h4: "text-[2.25rem] leading-[2.75rem]",
|
|
13
|
-
h5: "text-[1.875rem] leading-[2.375rem]",
|
|
14
|
-
h6: "text-[1.5rem] leading-[2rem]"
|
|
13
|
+
h5: "text-[1.875rem] leading-[2.375rem] tracking-normal",
|
|
14
|
+
h6: "text-[1.5rem] leading-[2rem] tracking-normal"
|
|
15
15
|
},
|
|
16
16
|
color: {
|
|
17
17
|
black: "text-foreground",
|
|
@@ -20,20 +20,20 @@ var d = i("font-heading font-medium tracking-[-0.02em]", {
|
|
|
20
20
|
},
|
|
21
21
|
defaultVariants: { color: "black" }
|
|
22
22
|
});
|
|
23
|
-
function x({ as: e, size:
|
|
23
|
+
function x({ as: e, size: r, color: t = "black", className: a, ...n }) {
|
|
24
24
|
return /* @__PURE__ */ o(e, {
|
|
25
25
|
"data-slot": "heading",
|
|
26
|
-
className:
|
|
27
|
-
size:
|
|
28
|
-
color:
|
|
26
|
+
className: m(l({
|
|
27
|
+
size: r ?? e,
|
|
28
|
+
color: t,
|
|
29
29
|
className: a
|
|
30
30
|
})),
|
|
31
|
-
...
|
|
31
|
+
...n
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
export {
|
|
35
35
|
x as Heading,
|
|
36
|
-
|
|
36
|
+
l as headingVariants
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.js","names":[],"sources":["../../src/components/heading/heading.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst headingVariants = cva(\"font-heading font-medium tracking-[-
|
|
1
|
+
{"version":3,"file":"heading.js","names":[],"sources":["../../src/components/heading/heading.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst headingVariants = cva(\"font-heading font-medium tracking-[-2%]\", {\n variants: {\n size: {\n h1: \"text-[4.5rem] leading-[5.625rem]\",\n h2: \"text-[3.75rem] leading-[4.5rem]\",\n h3: \"text-[3rem] leading-[3.75rem]\",\n h4: \"text-[2.25rem] leading-[2.75rem]\",\n h5: \"text-[1.875rem] leading-[2.375rem] tracking-normal\",\n h6: \"text-[1.5rem] leading-[2rem] tracking-normal\",\n },\n color: {\n black: \"text-foreground\",\n grey: \"text-muted-foreground\",\n },\n },\n defaultVariants: {\n color: \"black\",\n },\n})\n\ntype HeadingLevel = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"\n\ntype HeadingProps = React.ComponentProps<\"h1\"> & {\n as: HeadingLevel\n size?: HeadingLevel\n color?: VariantProps<typeof headingVariants>[\"color\"]\n}\n\nfunction Heading({\n as,\n size,\n color = \"black\",\n className,\n ...props\n}: HeadingProps) {\n const Comp = as\n return (\n <Comp\n data-slot=\"heading\"\n className={cn(headingVariants({ size: size ?? as, color, className }))}\n {...props}\n />\n )\n}\n\nexport { Heading, headingVariants }\nexport type { HeadingProps }\n"],"mappings":";;;;;AAKA,IAAM,IAAkB,EAAI,2CAA2C;AAAA,EACrE,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IACA,OAAO;AAAA,MACL,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,iBAAiB,EACf,OAAO,QACT;AACF,CAAC;AAUD,SAAS,EAAQ,EACf,IAAA,GACA,MAAA,GACA,OAAA,IAAQ,SACR,WAAA,GACA,GAAG,EAAA,GACY;AAEf,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,aAAU;AAAA,IACV,WAAW,EAAG,EAAgB;AAAA,MAAE,MAAM,KAAQ;AAAA,MAAI,OAAA;AAAA,MAAO,WAAA;AAAA,IAAU,CAAC,CAAC;AAAA,IACrE,GAAI;AAAA,EACL,CAAA;AAEL"}
|
package/dist/styles/nova.css
CHANGED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* Vendored from the shadcn CLI's "base-maia" style preset (see
|
|
2
|
+
* components.json). shadcn is a dev-only CLI tool (devDependency, not
|
|
3
|
+
* shipped to consumers), so importing "shadcn/tailwind.css" directly broke
|
|
4
|
+
* downstream installs of @enya-learning/nova. Copied in-repo instead so it
|
|
5
|
+
* ships with dist/styles without depending on the shadcn package at
|
|
6
|
+
* consumer build time. The --radix-accordion-content-height fallback from
|
|
7
|
+
* the original preset was dropped: Nova uses Base UI, not Radix, which
|
|
8
|
+
* exposes --accordion-panel-height instead (see accordion.tsx). */
|
|
9
|
+
|
|
10
|
+
@theme inline {
|
|
11
|
+
@keyframes accordion-down {
|
|
12
|
+
from {
|
|
13
|
+
height: 0;
|
|
14
|
+
}
|
|
15
|
+
to {
|
|
16
|
+
height: var(--accordion-panel-height, auto);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@keyframes accordion-up {
|
|
21
|
+
from {
|
|
22
|
+
height: var(--accordion-panel-height, auto);
|
|
23
|
+
}
|
|
24
|
+
to {
|
|
25
|
+
height: 0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Custom variants */
|
|
31
|
+
@custom-variant data-open {
|
|
32
|
+
&:where([data-state="open"]),
|
|
33
|
+
&:where([data-open]:not([data-open="false"])) {
|
|
34
|
+
@slot;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@custom-variant data-closed {
|
|
39
|
+
&:where([data-state="closed"]),
|
|
40
|
+
&:where([data-closed]:not([data-closed="false"])) {
|
|
41
|
+
@slot;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@custom-variant data-checked {
|
|
46
|
+
&:where([data-state="checked"]),
|
|
47
|
+
&:where([data-checked]:not([data-checked="false"])) {
|
|
48
|
+
@slot;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@custom-variant data-unchecked {
|
|
53
|
+
&:where([data-state="unchecked"]),
|
|
54
|
+
&:where([data-unchecked]:not([data-unchecked="false"])) {
|
|
55
|
+
@slot;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@custom-variant data-selected {
|
|
60
|
+
&:where([data-selected="true"]) {
|
|
61
|
+
@slot;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@custom-variant data-disabled {
|
|
66
|
+
&:where([data-disabled="true"]),
|
|
67
|
+
&:where([data-disabled]:not([data-disabled="false"])) {
|
|
68
|
+
@slot;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@custom-variant data-active {
|
|
73
|
+
&:where([data-state="active"]),
|
|
74
|
+
&:where([data-active]:not([data-active="false"])) {
|
|
75
|
+
@slot;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@custom-variant data-horizontal {
|
|
80
|
+
&:where([data-orientation="horizontal"]) {
|
|
81
|
+
@slot;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@custom-variant data-vertical {
|
|
86
|
+
&:where([data-orientation="vertical"]) {
|
|
87
|
+
@slot;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@utility no-scrollbar {
|
|
92
|
+
-ms-overflow-style: none;
|
|
93
|
+
scrollbar-width: none;
|
|
94
|
+
|
|
95
|
+
&::-webkit-scrollbar {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
}
|