@enya-learning/nova 0.4.3 → 0.5.0

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.
Files changed (132) hide show
  1. package/README.md +7 -16
  2. package/dist/chunks/dist-fahbq1psobj0ox6s.js +1327 -0
  3. package/dist/chunks/dist-fahbq1psobj0ox6s.js.map +1 -0
  4. package/dist/chunks/dist-o8x0ip0z71xkr2oh.js +37 -0
  5. package/dist/chunks/dist-o8x0ip0z71xkr2oh.js.map +1 -0
  6. package/dist/components/accordion.js +59 -0
  7. package/dist/components/accordion.js.map +1 -0
  8. package/dist/components/alert-dialog.js +108 -0
  9. package/dist/components/alert-dialog.js.map +1 -0
  10. package/dist/components/alert.js +49 -0
  11. package/dist/components/alert.js.map +1 -0
  12. package/dist/components/aspect-ratio.js +16 -0
  13. package/dist/components/aspect-ratio.js.map +1 -0
  14. package/dist/components/avatar.js +58 -0
  15. package/dist/components/avatar.js.map +1 -0
  16. package/dist/components/badge.js +33 -0
  17. package/dist/components/badge.js.map +1 -0
  18. package/dist/components/breadcrumb.js +81 -0
  19. package/dist/components/breadcrumb.js.map +1 -0
  20. package/dist/components/button-group.js +47 -0
  21. package/dist/components/button-group.js.map +1 -0
  22. package/dist/components/button.js +48 -3
  23. package/dist/components/button.js.map +1 -0
  24. package/dist/components/calendar.js +3000 -0
  25. package/dist/components/calendar.js.map +1 -0
  26. package/dist/components/card.js +65 -0
  27. package/dist/components/card.js.map +1 -0
  28. package/dist/components/carousel.js +1191 -0
  29. package/dist/components/carousel.js.map +1 -0
  30. package/dist/components/chart.js +10596 -0
  31. package/dist/components/chart.js.map +1 -0
  32. package/dist/components/checkbox.js +22 -0
  33. package/dist/components/checkbox.js.map +1 -0
  34. package/dist/components/collapsible.js +28 -0
  35. package/dist/components/collapsible.js.map +1 -0
  36. package/dist/components/combobox.js +179 -0
  37. package/dist/components/combobox.js.map +1 -0
  38. package/dist/components/command.js +656 -0
  39. package/dist/components/command.js.map +1 -0
  40. package/dist/components/context-menu.js +149 -0
  41. package/dist/components/context-menu.js.map +1 -0
  42. package/dist/components/dialog.js +103 -0
  43. package/dist/components/dialog.js.map +1 -0
  44. package/dist/components/direction.js +6 -0
  45. package/dist/components/drawer.js +1042 -0
  46. package/dist/components/drawer.js.map +1 -0
  47. package/dist/components/dropdown-menu.js +153 -0
  48. package/dist/components/dropdown-menu.js.map +1 -0
  49. package/dist/components/empty.js +67 -0
  50. package/dist/components/empty.js.map +1 -0
  51. package/dist/components/enya-logo.js +42 -42
  52. package/dist/components/enya-logo.js.map +1 -1
  53. package/dist/components/field.js +119 -0
  54. package/dist/components/field.js.map +1 -0
  55. package/dist/components/hover-card.js +40 -0
  56. package/dist/components/hover-card.js.map +1 -0
  57. package/dist/components/input-group.js +85 -0
  58. package/dist/components/input-group.js.map +1 -0
  59. package/dist/components/input-otp.js +416 -0
  60. package/dist/components/input-otp.js.map +1 -0
  61. package/dist/components/input.js +18 -0
  62. package/dist/components/input.js.map +1 -0
  63. package/dist/components/item.js +133 -0
  64. package/dist/components/item.js.map +1 -0
  65. package/dist/components/kbd.js +23 -0
  66. package/dist/components/kbd.js.map +1 -0
  67. package/dist/components/label.js +16 -0
  68. package/dist/components/label.js.map +1 -0
  69. package/dist/components/menubar.js +153 -0
  70. package/dist/components/menubar.js.map +1 -0
  71. package/dist/components/native-select.js +43 -0
  72. package/dist/components/native-select.js.map +1 -0
  73. package/dist/components/navigation-menu.js +93 -0
  74. package/dist/components/navigation-menu.js.map +1 -0
  75. package/dist/components/pagination.js +95 -0
  76. package/dist/components/pagination.js.map +1 -0
  77. package/dist/components/popover.js +62 -0
  78. package/dist/components/popover.js.map +1 -0
  79. package/dist/components/progress.js +50 -0
  80. package/dist/components/progress.js.map +1 -0
  81. package/dist/components/radio-group.js +30 -0
  82. package/dist/components/radio-group.js.map +1 -0
  83. package/dist/components/resizable.js +1562 -0
  84. package/dist/components/resizable.js.map +1 -0
  85. package/dist/components/scroll-area.js +40 -0
  86. package/dist/components/scroll-area.js.map +1 -0
  87. package/dist/components/select.js +109 -0
  88. package/dist/components/select.js.map +1 -0
  89. package/dist/components/separator.js +17 -0
  90. package/dist/components/separator.js.map +1 -0
  91. package/dist/components/sheet.js +98 -0
  92. package/dist/components/sheet.js.map +1 -0
  93. package/dist/components/sidebar.js +395 -0
  94. package/dist/components/sidebar.js.map +1 -0
  95. package/dist/components/skeleton.js +15 -0
  96. package/dist/components/skeleton.js.map +1 -0
  97. package/dist/components/slider.js +36 -0
  98. package/dist/components/slider.js.map +1 -0
  99. package/dist/components/sonner.js +722 -0
  100. package/dist/components/sonner.js.map +1 -0
  101. package/dist/components/spinner.js +17 -0
  102. package/dist/components/spinner.js.map +1 -0
  103. package/dist/components/switch.js +21 -0
  104. package/dist/components/switch.js.map +1 -0
  105. package/dist/components/table.js +76 -0
  106. package/dist/components/table.js.map +1 -0
  107. package/dist/components/tabs.js +51 -0
  108. package/dist/components/tabs.js.map +1 -0
  109. package/dist/components/textarea.js +16 -0
  110. package/dist/components/textarea.js.map +1 -0
  111. package/dist/components/toggle-group.js +55 -0
  112. package/dist/components/toggle-group.js.map +1 -0
  113. package/dist/components/toggle.js +39 -0
  114. package/dist/components/toggle.js.map +1 -0
  115. package/dist/components/tooltip.js +46 -0
  116. package/dist/components/tooltip.js.map +1 -0
  117. package/dist/index.js +17 -23241
  118. package/dist/src/components/badge/badge.d.ts +1 -1
  119. package/dist/src/components/button/button.d.ts +1 -1
  120. package/dist/src/components/item/item.d.ts +1 -1
  121. package/dist/src/components/tabs/tabs.d.ts +1 -1
  122. package/dist/src/index.d.ts +1 -53
  123. package/dist/styles/nova-binding.css +102 -0
  124. package/dist/styles/nova.css +106 -48
  125. package/dist/styles/theme-nova.css +77 -81
  126. package/dist/styles/typography.css +34 -22
  127. package/package.json +17 -9
  128. package/src/eslint/no-primitive-colors.test.ts +97 -0
  129. package/dist/chunks/button-kvgr8g13fe959ju0.js +0 -81
  130. package/dist/chunks/button-kvgr8g13fe959ju0.js.map +0 -1
  131. package/dist/index.js.map +0 -1
  132. package/dist/styles/globals.css +0 -77
@@ -8,92 +8,104 @@
8
8
  font-size: 4.5rem;
9
9
  line-height: 4.5rem;
10
10
  letter-spacing: -0.02em;
11
- font-weight: 600;
11
+ font-weight: 500;
12
12
  }
13
13
 
14
14
  @utility text-heading-64 {
15
15
  font-size: 4rem;
16
16
  line-height: 4rem;
17
17
  letter-spacing: -0.02em;
18
- font-weight: 600;
18
+ font-weight: 500;
19
19
  }
20
20
 
21
21
  @utility text-heading-56 {
22
22
  font-size: 3.5rem;
23
23
  line-height: 3.5rem;
24
24
  letter-spacing: -0.02em;
25
- font-weight: 600;
25
+ font-weight: 500;
26
26
  }
27
27
 
28
28
  @utility text-heading-48 {
29
29
  font-size: 3rem;
30
30
  line-height: 3.5rem;
31
31
  letter-spacing: -0.02em;
32
- font-weight: 600;
32
+ font-weight: 500;
33
33
  }
34
34
 
35
35
  @utility text-heading-40 {
36
36
  font-size: 2.5rem;
37
37
  line-height: 3rem;
38
38
  letter-spacing: -0.02em;
39
- font-weight: 600;
39
+ font-weight: 500;
40
40
  }
41
41
 
42
42
  @utility text-heading-32 {
43
43
  font-size: 2rem;
44
44
  line-height: 2.5rem;
45
45
  letter-spacing: -0.02em;
46
- font-weight: 600;
46
+ font-weight: 500;
47
47
  }
48
48
 
49
49
  @utility text-heading-24 {
50
50
  font-size: 1.5rem;
51
51
  line-height: 2rem;
52
52
  letter-spacing: -0.02em;
53
- font-weight: 600;
53
+ font-weight: 500;
54
54
  }
55
55
 
56
56
  @utility text-heading-20 {
57
57
  font-size: 1.25rem;
58
58
  line-height: 1.625;
59
59
  letter-spacing: -0.02em;
60
- font-weight: 600;
60
+ font-weight: 500;
61
61
  }
62
62
 
63
63
  @utility text-heading-16 {
64
64
  font-size: 1rem;
65
65
  line-height: 1.5;
66
66
  letter-spacing: -0.02em;
67
- font-weight: 600;
67
+ font-weight: 500;
68
68
  }
69
69
 
70
70
  @utility text-heading-14 {
71
71
  font-size: 0.875rem;
72
72
  line-height: 1.25;
73
- font-weight: 600;
73
+ font-weight: 500;
74
74
  }
75
75
 
76
76
  /* ─── Buttons ──────────────────────────────────────────────────────────────── */
77
77
 
78
+ @utility text-button-24 {
79
+ font-size: 1.5rem;
80
+ line-height: 1.625;
81
+ letter-spacing: -0.01em;
82
+ font-weight: 400;
83
+ }
84
+ @utility text-button-20 {
85
+ font-size: 1.25rem;
86
+ line-height: 1.5;
87
+ letter-spacing: -0.01em;
88
+ font-weight: 400;
89
+ }
78
90
  @utility text-button-16 {
79
91
  font-size: 1rem;
80
92
  line-height: 1.5;
81
93
  letter-spacing: -0.01em;
82
- font-weight: 500;
94
+ font-weight: 400;
83
95
  }
84
96
 
85
97
  @utility text-button-14 {
86
98
  font-size: 0.875rem;
87
99
  line-height: 1.4286;
88
100
  letter-spacing: -0.01em;
89
- font-weight: 500;
101
+ font-weight: 400;
90
102
  }
91
103
 
92
104
  @utility text-button-12 {
93
105
  font-size: 0.75rem;
94
106
  line-height: 1.3333;
95
107
  letter-spacing: 0;
96
- font-weight: 500;
108
+ font-weight: 400;
97
109
  }
98
110
 
99
111
  /* ─── Labels ───────────────────────────────────────────────────────────────── */
@@ -102,35 +114,35 @@
102
114
  font-size: 1.25rem;
103
115
  line-height: 1.4;
104
116
  letter-spacing: -0.01em;
105
- font-weight: 500;
117
+ font-weight: 400;
106
118
  }
107
119
 
108
120
  @utility text-label-18 {
109
121
  font-size: 1.125rem;
110
122
  line-height: 1.3333;
111
123
  letter-spacing: -0.01em;
112
- font-weight: 500;
124
+ font-weight: 400;
113
125
  }
114
126
 
115
127
  @utility text-label-16 {
116
128
  font-size: 1rem;
117
129
  line-height: 1.5;
118
130
  letter-spacing: -0.01em;
119
- font-weight: 500;
131
+ font-weight: 400;
120
132
  }
121
133
 
122
134
  @utility text-label-14 {
123
135
  font-size: 0.875rem;
124
136
  line-height: 1.4286;
125
137
  letter-spacing: -0.01em;
126
- font-weight: 500;
138
+ font-weight: 400;
127
139
  }
128
140
 
129
141
  @utility text-label-14-mono {
130
142
  font-size: 0.875rem;
131
143
  line-height: 1.4286;
132
144
  letter-spacing: 0;
133
- font-weight: 500;
145
+ font-weight: 400;
134
146
  font-family: var(--font-mono);
135
147
  }
136
148
 
@@ -138,14 +150,14 @@
138
150
  font-size: 0.8125rem;
139
151
  line-height: 1.2308;
140
152
  letter-spacing: 0;
141
- font-weight: 500;
153
+ font-weight: 400;
142
154
  }
143
155
 
144
156
  @utility text-label-13-mono {
145
157
  font-size: 0.8125rem;
146
158
  line-height: 1.2308;
147
159
  letter-spacing: 0;
148
- font-weight: 500;
160
+ font-weight: 400;
149
161
  font-family: var(--font-mono);
150
162
  }
151
163
 
@@ -153,14 +165,14 @@
153
165
  font-size: 0.75rem;
154
166
  line-height: 1.3333;
155
167
  letter-spacing: 0;
156
- font-weight: 500;
168
+ font-weight: 400;
157
169
  }
158
170
 
159
171
  @utility text-label-12-mono {
160
172
  font-size: 0.75rem;
161
173
  line-height: 1.3333;
162
174
  letter-spacing: 0;
163
- font-weight: 500;
175
+ font-weight: 400;
164
176
  font-family: var(--font-mono);
165
177
  }
166
178
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enya-learning/nova",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -32,7 +32,6 @@
32
32
  "react-dom": "^19.2.6"
33
33
  },
34
34
  "devDependencies": {
35
- "@eslint/js": "^10",
36
35
  "@storybook/addon-a11y": "^10.4.2",
37
36
  "@storybook/addon-docs": "^10.4.2",
38
37
  "@storybook/addon-themes": "^10.4.2",
@@ -45,10 +44,7 @@
45
44
  "@types/react-dom": "^19",
46
45
  "@vitejs/plugin-react": "^6.0.2",
47
46
  "@vitest/ui": "^4.1.8",
48
- "eslint": "^10",
49
- "eslint-plugin-react-hooks": "^7.1.1",
50
- "eslint-plugin-react-refresh": "^0.5.2",
51
- "globals": "^17",
47
+ "oxlint": "latest",
52
48
  "plop": "^4.0.0",
53
49
  "react-docgen-typescript": "^2.4.0",
54
50
  "shadcn": "^4.10.0",
@@ -56,7 +52,6 @@
56
52
  "tailwindcss": "^4",
57
53
  "tsx": "^4.22.4",
58
54
  "typescript": "~6",
59
- "typescript-eslint": "^8",
60
55
  "vite": "^8.0.16",
61
56
  "vite-plugin-dts": "^5.0.2",
62
57
  "vitest": "^4.1.8"
@@ -68,11 +63,18 @@
68
63
  },
69
64
  "./styles/tailwind": "./dist/styles/nova.css",
70
65
  "./styles": "./dist/styles/nova.css",
71
- "./globals.css": "./dist/styles/globals.css",
72
66
  "./components/button": {
73
67
  "types": "./dist/src/components/button/index.d.ts",
74
68
  "default": "./dist/components/button.js"
75
69
  },
70
+ "./components/button-group": {
71
+ "types": "./dist/src/components/button-group/index.d.ts",
72
+ "default": "./dist/components/button-group.js"
73
+ },
74
+ "./components/spinner": {
75
+ "types": "./dist/src/components/spinner/index.d.ts",
76
+ "default": "./dist/components/spinner.js"
77
+ },
76
78
  "./components/enya-logo": {
77
79
  "types": "./dist/src/components/enya-logo/index.d.ts",
78
80
  "default": "./dist/components/enya-logo.js"
@@ -90,6 +92,12 @@
90
92
  "components/button": [
91
93
  "./dist/src/components/button/index.d.ts"
92
94
  ],
95
+ "components/button-group": [
96
+ "./dist/src/components/button-group/index.d.ts"
97
+ ],
98
+ "components/spinner": [
99
+ "./dist/src/components/spinner/index.d.ts"
100
+ ],
93
101
  "components/enya-logo": [
94
102
  "./dist/src/components/enya-logo/index.d.ts"
95
103
  ],
@@ -109,7 +117,7 @@
109
117
  "build": "vite build --mode production && tsx scripts/css-build.ts",
110
118
  "dev": "vite build --watch --mode development",
111
119
  "clean": "rm -rf dist",
112
- "lint": "eslint",
120
+ "lint": "oxlint --config oxlint.json src",
113
121
  "format": "prettier --write \"**/*.{ts,tsx}\" --ignore-path ../../.prettierignore",
114
122
  "typecheck": "tsc --noEmit",
115
123
  "test": "vitest run",
@@ -0,0 +1,97 @@
1
+ import { readFileSync } from "node:fs"
2
+ import { globSync } from "node:fs"
3
+ import { resolve } from "node:path"
4
+ import { fileURLToPath } from "node:url"
5
+ import { describe, expect, it } from "vitest"
6
+
7
+ const __dirname = fileURLToPath(new URL(".", import.meta.url))
8
+ const NOVA_ROOT = resolve(__dirname, "../../..")
9
+
10
+ const PREFIXES = [
11
+ "bg",
12
+ "text",
13
+ "border",
14
+ "ring",
15
+ "outline",
16
+ "fill",
17
+ "stroke",
18
+ "decoration",
19
+ "accent",
20
+ "caret",
21
+ "from",
22
+ "via",
23
+ "to",
24
+ "shadow",
25
+ "inset-shadow",
26
+ "divide",
27
+ "placeholder",
28
+ ]
29
+
30
+ const PALETTE = [
31
+ "slate",
32
+ "gray",
33
+ "zinc",
34
+ "neutral",
35
+ "stone",
36
+ "red",
37
+ "orange",
38
+ "amber",
39
+ "yellow",
40
+ "lime",
41
+ "green",
42
+ "emerald",
43
+ "teal",
44
+ "cyan",
45
+ "sky",
46
+ "blue",
47
+ "indigo",
48
+ "violet",
49
+ "purple",
50
+ "fuchsia",
51
+ "pink",
52
+ "rose",
53
+ ]
54
+
55
+ const SHADES = [
56
+ "50",
57
+ "100",
58
+ "150",
59
+ "200",
60
+ "250",
61
+ "300",
62
+ "400",
63
+ "500",
64
+ "600",
65
+ "700",
66
+ "800",
67
+ "900",
68
+ "950",
69
+ ]
70
+
71
+ const COLOR_RE = new RegExp(
72
+ `\\b(${PREFIXES.join("|")})-((?:${PALETTE.join("|")})-(?:${SHADES.join("|")})|white|black)\\b`
73
+ )
74
+
75
+ const STRING_RE =
76
+ /(?:"([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)'|`([^`\\]*(?:\\.[^`\\]*)*)`)/g
77
+
78
+ describe("no-primitive-colors", () => {
79
+ it("contains no raw Tailwind palette colors in component source", () => {
80
+ const files = globSync("src/components/**/*.{ts,tsx}", { cwd: NOVA_ROOT })
81
+ const violations: string[] = []
82
+
83
+ for (const file of files) {
84
+ if (file.includes(".stories.") || file.includes(".test.")) continue
85
+ const content = readFileSync(resolve(NOVA_ROOT, file), "utf-8")
86
+ for (const match of content.matchAll(STRING_RE)) {
87
+ const str = match[1] ?? match[2] ?? match[3] ?? ""
88
+ const found = COLOR_RE.exec(str)
89
+ if (found) {
90
+ violations.push(`${file}: "${found[0]}" in "${str.slice(0, 80)}"`)
91
+ }
92
+ }
93
+ }
94
+
95
+ expect(violations, violations.join("\n")).toHaveLength(0)
96
+ })
97
+ })
@@ -1,81 +0,0 @@
1
- "use client";
2
- import { n as m } from "./vendor-styling-eeiy57tyznmxsfky.js";
3
- import { t as p } from "./utils-kyb5nny4y41y7hd8.js";
4
- import { jsx as y } from "react/jsx-runtime";
5
- import { Button as k } from "@base-ui/react/button";
6
- var g = (n) => typeof n == "boolean" ? `${n}` : n === 0 ? "0" : n, b = m, z = (n, t) => (e) => {
7
- var s;
8
- if (t?.variants == null) return b(n, e?.class, e?.className);
9
- const { variants: u, defaultVariants: d } = t, x = Object.keys(u).map((i) => {
10
- const a = e?.[i], o = d?.[i];
11
- if (a === null) return null;
12
- const r = g(a) || g(o);
13
- return u[i][r];
14
- }), c = e && Object.entries(e).reduce((i, a) => {
15
- let [o, r] = a;
16
- return r === void 0 || (i[o] = r), i;
17
- }, {});
18
- return b(n, x, t == null || (s = t.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((i, a) => {
19
- let { class: o, className: r, ...f } = a;
20
- return Object.entries(f).every((h) => {
21
- let [v, l] = h;
22
- return Array.isArray(l) ? l.includes({
23
- ...d,
24
- ...c
25
- }[v]) : {
26
- ...d,
27
- ...c
28
- }[v] === l;
29
- }) ? [
30
- ...i,
31
- o,
32
- r
33
- ] : i;
34
- }, []), e?.class, e?.className);
35
- }, _ = z("group/button inline-flex shrink-0 items-center justify-center rounded-4xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all duration-150 outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 active:not-aria-[haspopup]:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
36
- variants: {
37
- variant: {
38
- accent: "bg-accent text-primary-foreground hover:bg-accent/80",
39
- default: "bg-foreground text-primary-foreground hover:bg-foreground/80",
40
- outline: "border-border bg-nova-white hover:bg-input/30 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
41
- secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
42
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
43
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
44
- link: "text-primary underline-offset-4 hover:underline"
45
- },
46
- size: {
47
- default: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pe-2.5 has-data-[icon=inline-start]:ps-2.5",
48
- xs: "h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2 [&_svg:not([class*='size-'])]:size-3",
49
- sm: "h-8 gap-1 px-3 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
50
- lg: "h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3",
51
- xl: "h-15 gap-2 rounded-full px-5 text-2xl has-data-[icon=inline-end]:pe-4 has-data-[icon=inline-start]:ps-4",
52
- icon: "size-9",
53
- "icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
54
- "icon-sm": "size-8",
55
- "icon-lg": "size-10",
56
- "icon-xl": "size-12"
57
- }
58
- },
59
- defaultVariants: {
60
- variant: "default",
61
- size: "default"
62
- }
63
- });
64
- function w({ className: n, variant: t = "default", size: e = "default", ...s }) {
65
- return /* @__PURE__ */ y(k, {
66
- "data-slot": "button",
67
- className: p(_({
68
- variant: t,
69
- size: e,
70
- className: n
71
- })),
72
- ...s
73
- });
74
- }
75
- export {
76
- _ as n,
77
- z as r,
78
- w as t
79
- };
80
-
81
- //# sourceMappingURL=button-kvgr8g13fe959ju0.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-kvgr8g13fe959ju0.js","names":[],"sources":["../../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs","../../src/components/button/button.tsx"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n","import { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-4xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all duration-150 outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 active:not-aria-[haspopup]:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n accent: \"bg-accent text-primary-foreground hover:bg-accent/80\",\n default: \"bg-foreground text-primary-foreground hover:bg-foreground/80\",\n outline:\n \"border-border bg-nova-white hover:bg-input/30 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default:\n \"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pe-2.5 has-data-[icon=inline-start]:ps-2.5\",\n xs: \"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1 px-3 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2\",\n lg: \"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3\",\n xl: \"h-15 gap-2 rounded-full px-5 text-2xl has-data-[icon=inline-end]:pe-4 has-data-[icon=inline-start]:ps-4\",\n icon: \"size-9\",\n \"icon-xs\": \"size-6 [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\": \"size-8\",\n \"icon-lg\": \"size-10\",\n \"icon-xl\": \"size-12\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {\n return (\n <ButtonPrimitive\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAeA,IAAM,IAAA,CAAiB,MAAQ,OAAO,KAAU,YAAY,GAAG,CAAA,KAAU,MAAU,IA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