@lukeashford/aurelius 1.0.1 → 2.0.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.
- package/LICENSE +21 -0
- package/README.md +101 -48
- package/dist/index.d.mts +10 -7
- package/dist/index.d.ts +10 -7
- package/dist/index.js +200 -308
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +203 -54
- package/dist/index.mjs.map +1 -1
- package/dist/styles/base.css +7 -536
- package/dist/styles/fonts.css +31 -2
- package/dist/styles/theme.css +368 -0
- package/llms.md +145 -0
- package/package.json +32 -16
- package/dist/chunk-H4EGEZQH.mjs +0 -136
- package/dist/chunk-H4EGEZQH.mjs.map +0 -1
- package/dist/chunk-MDNHT46W.mjs +0 -150
- package/dist/chunk-MDNHT46W.mjs.map +0 -1
- package/dist/llms.md +0 -325
- package/dist/tailwind.preset.d.mts +0 -5
- package/dist/tailwind.preset.d.ts +0 -5
- package/dist/tailwind.preset.js +0 -288
- package/dist/tailwind.preset.js.map +0 -1
- package/dist/tailwind.preset.mjs +0 -8
- package/dist/tailwind.preset.mjs.map +0 -1
- package/dist/tokens/index.d.mts +0 -156
- package/dist/tokens/index.d.ts +0 -156
- package/dist/tokens/index.js +0 -182
- package/dist/tokens/index.js.map +0 -1
- package/dist/tokens/index.mjs +0 -19
- package/dist/tokens/index.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -47,280 +47,10 @@ __export(index_exports, {
|
|
|
47
47
|
Switch: () => Switch,
|
|
48
48
|
Textarea: () => Textarea,
|
|
49
49
|
Tooltip: () => Tooltip,
|
|
50
|
-
colors: () => colors,
|
|
51
|
-
duration: () => duration,
|
|
52
|
-
easing: () => easing,
|
|
53
|
-
radii: () => radii,
|
|
54
|
-
shadows: () => shadows,
|
|
55
|
-
spacing: () => spacing,
|
|
56
|
-
tailwindPreset: () => tailwind_preset_default,
|
|
57
|
-
typography: () => typography,
|
|
58
50
|
version: () => version
|
|
59
51
|
});
|
|
60
52
|
module.exports = __toCommonJS(index_exports);
|
|
61
53
|
|
|
62
|
-
// src/tokens/colors.ts
|
|
63
|
-
var colors = {
|
|
64
|
-
// Black spectrum
|
|
65
|
-
void: "#000000",
|
|
66
|
-
obsidian: "#0a0a0a",
|
|
67
|
-
charcoal: "#141414",
|
|
68
|
-
graphite: "#1f1f1f",
|
|
69
|
-
slate: "#2a2a2a",
|
|
70
|
-
ash: "#3d3d3d",
|
|
71
|
-
// Gold spectrum
|
|
72
|
-
gold: "#c9a227",
|
|
73
|
-
goldLight: "#d4b84a",
|
|
74
|
-
goldBright: "#e5c84d",
|
|
75
|
-
goldMuted: "#8b7355",
|
|
76
|
-
goldPale: "#d4c4a8",
|
|
77
|
-
goldGlow: "rgba(201, 162, 39, 0.15)",
|
|
78
|
-
// Neutrals
|
|
79
|
-
white: "#ffffff",
|
|
80
|
-
silver: "#a3a3a3",
|
|
81
|
-
zinc: "#71717a",
|
|
82
|
-
dim: "#52525b",
|
|
83
|
-
// Semantic
|
|
84
|
-
success: "#22c55e",
|
|
85
|
-
successMuted: "#166534",
|
|
86
|
-
error: "#dc2626",
|
|
87
|
-
errorMuted: "#991b1b",
|
|
88
|
-
warning: "#d97706",
|
|
89
|
-
warningMuted: "#92400e",
|
|
90
|
-
info: "#0ea5e9",
|
|
91
|
-
infoMuted: "#0369a1"
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
// src/tokens/typography.ts
|
|
95
|
-
var typography = {
|
|
96
|
-
// Headings use Marcellus, a classic serif
|
|
97
|
-
fontHeading: ["Marcellus", "serif"],
|
|
98
|
-
// Body and UI use Raleway
|
|
99
|
-
fontBody: ["Raleway", "system-ui", "sans-serif"],
|
|
100
|
-
fontMono: ["JetBrains Mono", "Fira Code", "SF Mono", "monospace"],
|
|
101
|
-
fontSize: {
|
|
102
|
-
xs: ["0.75rem", { lineHeight: "1rem" }],
|
|
103
|
-
sm: ["0.875rem", { lineHeight: "1.25rem" }],
|
|
104
|
-
base: ["1rem", { lineHeight: "1.5rem" }],
|
|
105
|
-
lg: ["1.125rem", { lineHeight: "1.75rem" }],
|
|
106
|
-
xl: ["1.25rem", { lineHeight: "1.75rem" }],
|
|
107
|
-
"2xl": ["1.5rem", { lineHeight: "2rem" }],
|
|
108
|
-
"3xl": ["1.875rem", { lineHeight: "2.25rem" }],
|
|
109
|
-
"4xl": ["2.25rem", { lineHeight: "2.5rem" }],
|
|
110
|
-
"5xl": ["3rem", { lineHeight: "1" }],
|
|
111
|
-
"6xl": ["3.75rem", { lineHeight: "1" }]
|
|
112
|
-
},
|
|
113
|
-
fontWeight: {
|
|
114
|
-
normal: "400",
|
|
115
|
-
medium: "500",
|
|
116
|
-
semibold: "600",
|
|
117
|
-
bold: "700"
|
|
118
|
-
},
|
|
119
|
-
lineHeight: {
|
|
120
|
-
none: "1",
|
|
121
|
-
tight: "1.25",
|
|
122
|
-
snug: "1.375",
|
|
123
|
-
normal: "1.5",
|
|
124
|
-
relaxed: "1.625",
|
|
125
|
-
loose: "2"
|
|
126
|
-
},
|
|
127
|
-
letterSpacing: {
|
|
128
|
-
tighter: "-0.05em",
|
|
129
|
-
tight: "-0.025em",
|
|
130
|
-
normal: "0",
|
|
131
|
-
wide: "0.025em",
|
|
132
|
-
wider: "0.05em",
|
|
133
|
-
widest: "0.1em"
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
// src/tokens/spacing.ts
|
|
138
|
-
var spacing = {
|
|
139
|
-
px: "1px",
|
|
140
|
-
0: "0",
|
|
141
|
-
0.5: "0.125rem",
|
|
142
|
-
1: "0.25rem",
|
|
143
|
-
1.5: "0.375rem",
|
|
144
|
-
2: "0.5rem",
|
|
145
|
-
2.5: "0.625rem",
|
|
146
|
-
3: "0.75rem",
|
|
147
|
-
3.5: "0.875rem",
|
|
148
|
-
4: "1rem",
|
|
149
|
-
5: "1.25rem",
|
|
150
|
-
6: "1.5rem",
|
|
151
|
-
7: "1.75rem",
|
|
152
|
-
8: "2rem",
|
|
153
|
-
9: "2.25rem",
|
|
154
|
-
10: "2.5rem",
|
|
155
|
-
11: "2.75rem",
|
|
156
|
-
12: "3rem",
|
|
157
|
-
14: "3.5rem",
|
|
158
|
-
16: "4rem",
|
|
159
|
-
20: "5rem",
|
|
160
|
-
24: "6rem",
|
|
161
|
-
28: "7rem",
|
|
162
|
-
32: "8rem"
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
// src/tokens/shadows.ts
|
|
166
|
-
var shadows = {
|
|
167
|
-
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.4)",
|
|
168
|
-
md: "0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3)",
|
|
169
|
-
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3)",
|
|
170
|
-
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3)",
|
|
171
|
-
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.5)",
|
|
172
|
-
glow: "0 0 20px rgba(201, 162, 39, 0.3)",
|
|
173
|
-
"glow-sm": "0 0 10px rgba(201, 162, 39, 0.2)",
|
|
174
|
-
"glow-lg": "0 0 40px rgba(201, 162, 39, 0.4)",
|
|
175
|
-
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.3)"
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
// src/tokens/transitions.ts
|
|
179
|
-
var duration = {
|
|
180
|
-
instant: "75ms",
|
|
181
|
-
fast: "150ms",
|
|
182
|
-
normal: "200ms",
|
|
183
|
-
slow: "300ms",
|
|
184
|
-
slower: "500ms"
|
|
185
|
-
};
|
|
186
|
-
var easing = {
|
|
187
|
-
smooth: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
188
|
-
snap: "cubic-bezier(0.5, 0, 0.1, 1)"
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
// src/tokens/radii.ts
|
|
192
|
-
var radii = {
|
|
193
|
-
sm: "0.125rem",
|
|
194
|
-
md: "0.25rem",
|
|
195
|
-
lg: "0.375rem",
|
|
196
|
-
xl: "0.5rem",
|
|
197
|
-
"2xl": "0.75rem",
|
|
198
|
-
"3xl": "1rem",
|
|
199
|
-
full: "9999px"
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
// src/tailwind.preset.ts
|
|
203
|
-
var preset = {
|
|
204
|
-
// Safelist color utilities used dynamically in the demo so Tailwind doesn't purge them
|
|
205
|
-
safelist: [
|
|
206
|
-
// Black spectrum
|
|
207
|
-
"bg-void",
|
|
208
|
-
"bg-obsidian",
|
|
209
|
-
"bg-charcoal",
|
|
210
|
-
"bg-graphite",
|
|
211
|
-
"bg-slate",
|
|
212
|
-
"bg-ash",
|
|
213
|
-
// Gold spectrum
|
|
214
|
-
"bg-gold",
|
|
215
|
-
"bg-gold-light",
|
|
216
|
-
"bg-gold-bright",
|
|
217
|
-
"bg-gold-muted",
|
|
218
|
-
"bg-gold-pale",
|
|
219
|
-
// Neutrals
|
|
220
|
-
"bg-white",
|
|
221
|
-
"bg-silver",
|
|
222
|
-
"bg-zinc",
|
|
223
|
-
"bg-dim",
|
|
224
|
-
// Semantic
|
|
225
|
-
"bg-success",
|
|
226
|
-
"bg-success-muted",
|
|
227
|
-
"bg-error",
|
|
228
|
-
"bg-error-muted",
|
|
229
|
-
"bg-warning",
|
|
230
|
-
"bg-warning-muted",
|
|
231
|
-
"bg-info",
|
|
232
|
-
"bg-info-muted"
|
|
233
|
-
],
|
|
234
|
-
theme: {
|
|
235
|
-
extend: {
|
|
236
|
-
colors: {
|
|
237
|
-
// Black spectrum
|
|
238
|
-
void: colors.void,
|
|
239
|
-
obsidian: colors.obsidian,
|
|
240
|
-
charcoal: colors.charcoal,
|
|
241
|
-
graphite: colors.graphite,
|
|
242
|
-
slate: colors.slate,
|
|
243
|
-
ash: colors.ash,
|
|
244
|
-
// Gold spectrum
|
|
245
|
-
gold: {
|
|
246
|
-
DEFAULT: colors.gold,
|
|
247
|
-
light: colors.goldLight,
|
|
248
|
-
bright: colors.goldBright,
|
|
249
|
-
muted: colors.goldMuted,
|
|
250
|
-
pale: colors.goldPale,
|
|
251
|
-
glow: colors.goldGlow
|
|
252
|
-
},
|
|
253
|
-
// Neutrals
|
|
254
|
-
white: colors.white,
|
|
255
|
-
silver: colors.silver,
|
|
256
|
-
zinc: colors.zinc,
|
|
257
|
-
dim: colors.dim,
|
|
258
|
-
// Semantic
|
|
259
|
-
success: {
|
|
260
|
-
DEFAULT: colors.success,
|
|
261
|
-
muted: colors.successMuted
|
|
262
|
-
},
|
|
263
|
-
error: {
|
|
264
|
-
DEFAULT: colors.error,
|
|
265
|
-
muted: colors.errorMuted
|
|
266
|
-
},
|
|
267
|
-
warning: {
|
|
268
|
-
DEFAULT: colors.warning,
|
|
269
|
-
muted: colors.warningMuted
|
|
270
|
-
},
|
|
271
|
-
info: {
|
|
272
|
-
DEFAULT: colors.info,
|
|
273
|
-
muted: colors.infoMuted
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
fontFamily: {
|
|
277
|
-
heading: typography.fontHeading,
|
|
278
|
-
body: typography.fontBody,
|
|
279
|
-
mono: typography.fontMono
|
|
280
|
-
},
|
|
281
|
-
fontSize: typography.fontSize,
|
|
282
|
-
fontWeight: typography.fontWeight,
|
|
283
|
-
lineHeight: typography.lineHeight,
|
|
284
|
-
letterSpacing: typography.letterSpacing,
|
|
285
|
-
spacing,
|
|
286
|
-
borderRadius: radii,
|
|
287
|
-
boxShadow: shadows,
|
|
288
|
-
transitionDuration: duration,
|
|
289
|
-
transitionTimingFunction: easing,
|
|
290
|
-
animation: {
|
|
291
|
-
"fade-in": "fade-in 200ms ease-out",
|
|
292
|
-
"fade-out": "fade-out 150ms ease-in",
|
|
293
|
-
"slide-in-right": `slide-in-right 300ms ${easing.smooth}`,
|
|
294
|
-
"slide-out-right": "slide-out-right 200ms ease-in",
|
|
295
|
-
"pulse-glow": "pulse-glow 2s ease-in-out infinite"
|
|
296
|
-
},
|
|
297
|
-
keyframes: {
|
|
298
|
-
"fade-in": {
|
|
299
|
-
"0%": { opacity: "0" },
|
|
300
|
-
"100%": { opacity: "1" }
|
|
301
|
-
},
|
|
302
|
-
"fade-out": {
|
|
303
|
-
"0%": { opacity: "1" },
|
|
304
|
-
"100%": { opacity: "0" }
|
|
305
|
-
},
|
|
306
|
-
"slide-in-right": {
|
|
307
|
-
"0%": { transform: "translateX(100%)", opacity: "0" },
|
|
308
|
-
"100%": { transform: "translateX(0)", opacity: "1" }
|
|
309
|
-
},
|
|
310
|
-
"slide-out-right": {
|
|
311
|
-
"0%": { transform: "translateX(0)", opacity: "1" },
|
|
312
|
-
"100%": { transform: "translateX(100%)", opacity: "0" }
|
|
313
|
-
},
|
|
314
|
-
"pulse-glow": {
|
|
315
|
-
"0%, 100%": { boxShadow: "0 0 20px rgba(201, 162, 39, 0.3)" },
|
|
316
|
-
"50%": { boxShadow: "0 0 30px rgba(201, 162, 39, 0.5)" }
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
var tailwind_preset_default = preset;
|
|
323
|
-
|
|
324
54
|
// src/components/Button.tsx
|
|
325
55
|
var import_react = __toESM(require("react"));
|
|
326
56
|
function cx(...classes) {
|
|
@@ -329,13 +59,29 @@ function cx(...classes) {
|
|
|
329
59
|
var Button = import_react.default.forwardRef(
|
|
330
60
|
({ variant = "primary", size = "md", loading = false, className, disabled, children, ...rest }, ref) => {
|
|
331
61
|
const isDisabled = disabled || loading;
|
|
332
|
-
const
|
|
333
|
-
const
|
|
62
|
+
const base = "inline-flex items-center justify-center font-semibold tracking-wide transition-all duration-fast rounded-none disabled:opacity-50 disabled:cursor-not-allowed";
|
|
63
|
+
const variantClasses = {
|
|
64
|
+
primary: "bg-charcoal text-white border border-gold/30 hover:border-gold hover:shadow-glow hover:text-gold-light active:bg-white/5 focus-visible:ring-2 focus-visible:ring-gold focus-visible:ring-offset-2 focus-visible:ring-offset-obsidian",
|
|
65
|
+
important: "bg-gold text-obsidian border border-gold hover:bg-gold-light hover:text-obsidian active:bg-gold-bright focus-visible:ring-2 focus-visible:ring-gold focus-visible:ring-offset-2 focus-visible:ring-offset-obsidian",
|
|
66
|
+
elevated: "bg-charcoal text-white border-0 shadow-lg hover:shadow-xl hover:text-gold-light active:bg-white/5 focus-visible:ring-2 focus-visible:ring-gold focus-visible:ring-offset-2 focus-visible:ring-offset-obsidian",
|
|
67
|
+
outlined: "bg-transparent text-white border border-ash hover:border-white hover:text-white active:bg-white/5 focus-visible:ring-2 focus-visible:ring-gold focus-visible:ring-offset-2 focus-visible:ring-offset-obsidian",
|
|
68
|
+
featured: "bg-charcoal text-white border border-gold shadow-[0_0_10px_rgba(201,162,39,0.2)] hover:shadow-[0_0_15px_rgba(201,162,39,0.4)] hover:text-gold-light active:bg-white/5 focus-visible:ring-2 focus-visible:ring-gold focus-visible:ring-offset-2 focus-visible:ring-offset-obsidian",
|
|
69
|
+
ghost: "bg-transparent text-gold border-0 hover:text-gold-light active:text-gold-bright focus-visible:ring-2 focus-visible:ring-gold focus-visible:ring-offset-2 focus-visible:ring-offset-obsidian",
|
|
70
|
+
danger: "bg-error text-white border-0 hover:bg-error/90 active:bg-error/80 focus-visible:ring-2 focus-visible:ring-error focus-visible:ring-offset-2 focus-visible:ring-offset-obsidian"
|
|
71
|
+
};
|
|
72
|
+
const sizeClasses = {
|
|
73
|
+
sm: "h-8 px-3 text-sm",
|
|
74
|
+
md: "h-10 px-4 text-sm",
|
|
75
|
+
lg: "h-12 px-6 text-base",
|
|
76
|
+
xl: "h-14 px-8 text-lg"
|
|
77
|
+
};
|
|
78
|
+
const variantClass = variantClasses[variant];
|
|
79
|
+
const sizeClass = sizeClasses[size];
|
|
334
80
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
335
81
|
"button",
|
|
336
82
|
{
|
|
337
83
|
ref,
|
|
338
|
-
className: cx(
|
|
84
|
+
className: cx(base, variantClass, sizeClass, loading && "opacity-80", className),
|
|
339
85
|
disabled: isDisabled,
|
|
340
86
|
...rest
|
|
341
87
|
},
|
|
@@ -359,8 +105,8 @@ function cx2(...classes) {
|
|
|
359
105
|
}
|
|
360
106
|
var Input = import_react2.default.forwardRef(
|
|
361
107
|
({ error = false, className, leadingIcon, trailingIcon, disabled, ...rest }, ref) => {
|
|
362
|
-
const base = "
|
|
363
|
-
const errorCls = error ? "
|
|
108
|
+
const base = "w-full h-10 px-3 bg-graphite border border-ash rounded-none text-white placeholder:text-zinc transition-all duration-fast focus:border-gold focus:ring-1 focus:ring-gold focus:outline-none disabled:bg-slate disabled:text-dim disabled:cursor-not-allowed";
|
|
109
|
+
const errorCls = error ? "border-error focus:border-error focus:ring-error" : "";
|
|
364
110
|
return /* @__PURE__ */ import_react2.default.createElement("div", { className: cx2("relative", disabled && "opacity-90") }, leadingIcon && /* @__PURE__ */ import_react2.default.createElement("span", { className: "pointer-events-none absolute inset-y-0 left-3 flex items-center text-silver" }, leadingIcon), /* @__PURE__ */ import_react2.default.createElement(
|
|
365
111
|
"input",
|
|
366
112
|
{
|
|
@@ -368,7 +114,7 @@ var Input = import_react2.default.forwardRef(
|
|
|
368
114
|
className: cx2(
|
|
369
115
|
base,
|
|
370
116
|
errorCls,
|
|
371
|
-
|
|
117
|
+
leadingIcon || trailingIcon ? "pl-9 pr-9" : false,
|
|
372
118
|
className
|
|
373
119
|
),
|
|
374
120
|
disabled,
|
|
@@ -386,9 +132,16 @@ function cx3(...classes) {
|
|
|
386
132
|
}
|
|
387
133
|
var Card = import_react3.default.forwardRef(
|
|
388
134
|
({ variant = "default", interactive = false, className, ...rest }, ref) => {
|
|
389
|
-
const base = "
|
|
390
|
-
const
|
|
391
|
-
|
|
135
|
+
const base = "rounded-none p-6";
|
|
136
|
+
const variantClasses = {
|
|
137
|
+
default: "bg-charcoal shadow-sm border border-gold/30",
|
|
138
|
+
elevated: "bg-charcoal shadow-lg border-0",
|
|
139
|
+
outlined: "bg-charcoal shadow-none border border-ash",
|
|
140
|
+
ghost: "bg-transparent shadow-none border-0",
|
|
141
|
+
featured: "bg-charcoal border border-gold shadow-[0_0_10px_rgba(201,162,39,0.2)]"
|
|
142
|
+
};
|
|
143
|
+
const interactiveClass = interactive ? "transition-all duration-200 hover:border-gold hover:shadow-glow cursor-pointer" : "";
|
|
144
|
+
const variantClass = variantClasses[variant];
|
|
392
145
|
return /* @__PURE__ */ import_react3.default.createElement(
|
|
393
146
|
"div",
|
|
394
147
|
{
|
|
@@ -460,8 +213,17 @@ function cx5(...classes) {
|
|
|
460
213
|
}
|
|
461
214
|
var Badge = import_react5.default.forwardRef(
|
|
462
215
|
({ variant = "default", className, ...rest }, ref) => {
|
|
463
|
-
const
|
|
464
|
-
|
|
216
|
+
const base = "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border";
|
|
217
|
+
const variantClasses = {
|
|
218
|
+
default: "bg-slate text-silver border-slate",
|
|
219
|
+
gold: "bg-gold/20 text-gold border-gold/30",
|
|
220
|
+
success: "bg-success/20 text-success border-success/30",
|
|
221
|
+
error: "bg-error/20 text-error border-error/30",
|
|
222
|
+
warning: "bg-warning/20 text-warning border-warning/30",
|
|
223
|
+
info: "bg-info/20 text-info border-info/30"
|
|
224
|
+
};
|
|
225
|
+
const variantClass = variantClasses[variant];
|
|
226
|
+
return /* @__PURE__ */ import_react5.default.createElement("span", { ref, className: cx5(base, variantClass, className), ...rest });
|
|
465
227
|
}
|
|
466
228
|
);
|
|
467
229
|
Badge.displayName = "Badge";
|
|
@@ -500,10 +262,11 @@ var Label = import_react7.default.forwardRef(
|
|
|
500
262
|
"label",
|
|
501
263
|
{
|
|
502
264
|
ref,
|
|
503
|
-
className: cx7("
|
|
265
|
+
className: cx7("block text-sm font-medium text-silver mb-1.5", className),
|
|
504
266
|
...rest
|
|
505
267
|
},
|
|
506
|
-
children
|
|
268
|
+
children,
|
|
269
|
+
required && /* @__PURE__ */ import_react7.default.createElement("span", { className: "text-error ml-1" }, "*")
|
|
507
270
|
);
|
|
508
271
|
}
|
|
509
272
|
);
|
|
@@ -536,7 +299,7 @@ function cx9(...classes) {
|
|
|
536
299
|
}
|
|
537
300
|
var Textarea = import_react9.default.forwardRef(
|
|
538
301
|
({ error = false, className, disabled, ...rest }, ref) => {
|
|
539
|
-
const base = "
|
|
302
|
+
const base = "w-full px-3 py-2 bg-graphite border border-ash rounded-none text-white placeholder:text-zinc min-h-[80px] transition-all duration-fast focus:border-gold focus:ring-1 focus:ring-gold focus:outline-none disabled:bg-slate disabled:text-dim disabled:cursor-not-allowed";
|
|
540
303
|
const errorCls = error ? "border-error focus:border-error focus:ring-error" : "";
|
|
541
304
|
return /* @__PURE__ */ import_react9.default.createElement(
|
|
542
305
|
"textarea",
|
|
@@ -556,15 +319,26 @@ var import_react10 = __toESM(require("react"));
|
|
|
556
319
|
function cx10(...classes) {
|
|
557
320
|
return classes.filter(Boolean).join(" ");
|
|
558
321
|
}
|
|
322
|
+
var selectBgImage = `url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23C9A227' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`;
|
|
559
323
|
var Select = import_react10.default.forwardRef(
|
|
560
324
|
({ error = false, className, disabled, options, children, ...rest }, ref) => {
|
|
561
|
-
const base = "select";
|
|
562
|
-
const errorCls = error ? "border-error focus:border-error focus:ring-error" : "";
|
|
563
325
|
return /* @__PURE__ */ import_react10.default.createElement(
|
|
564
326
|
"select",
|
|
565
327
|
{
|
|
566
328
|
ref,
|
|
567
|
-
className: cx10(
|
|
329
|
+
className: cx10(
|
|
330
|
+
"appearance-none bg-graphite border border-ash rounded-none text-white px-3 py-2 pr-8",
|
|
331
|
+
"focus:border-gold focus:ring-1 focus:ring-gold focus:outline-none",
|
|
332
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
333
|
+
error && "border-error focus:border-error focus:ring-error",
|
|
334
|
+
className
|
|
335
|
+
),
|
|
336
|
+
style: {
|
|
337
|
+
backgroundImage: selectBgImage,
|
|
338
|
+
backgroundPosition: "right 0.5rem center",
|
|
339
|
+
backgroundRepeat: "no-repeat",
|
|
340
|
+
backgroundSize: "1.5em 1.5em"
|
|
341
|
+
},
|
|
568
342
|
disabled,
|
|
569
343
|
...rest
|
|
570
344
|
},
|
|
@@ -579,16 +353,50 @@ var import_react11 = __toESM(require("react"));
|
|
|
579
353
|
function cx11(...classes) {
|
|
580
354
|
return classes.filter(Boolean).join(" ");
|
|
581
355
|
}
|
|
356
|
+
var checkmarkSvg = `url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%231A1A1A' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")`;
|
|
582
357
|
var Checkbox = import_react11.default.forwardRef(
|
|
583
358
|
({ className, label, id, ...rest }, ref) => {
|
|
584
359
|
const inputId = id || rest.name || Math.random().toString(36).substr(2, 9);
|
|
360
|
+
const setRef = (0, import_react11.useCallback)((node) => {
|
|
361
|
+
if (node) {
|
|
362
|
+
if (node.checked) {
|
|
363
|
+
node.style.backgroundImage = checkmarkSvg;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
if (typeof ref === "function") {
|
|
367
|
+
ref(node);
|
|
368
|
+
} else if (ref) {
|
|
369
|
+
ref.current = node;
|
|
370
|
+
}
|
|
371
|
+
}, [ref]);
|
|
585
372
|
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ import_react11.default.createElement(
|
|
586
373
|
"input",
|
|
587
374
|
{
|
|
588
375
|
type: "checkbox",
|
|
589
376
|
id: inputId,
|
|
590
|
-
ref,
|
|
591
|
-
className: cx11(
|
|
377
|
+
ref: setRef,
|
|
378
|
+
className: cx11(
|
|
379
|
+
"appearance-none h-4 w-4 border border-ash rounded-sm bg-graphite",
|
|
380
|
+
"checked:bg-gold checked:border-gold",
|
|
381
|
+
"focus:ring-1 focus:ring-gold focus:ring-offset-1 focus:ring-offset-obsidian",
|
|
382
|
+
"transition duration-200 ease-in-out cursor-pointer",
|
|
383
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
384
|
+
className
|
|
385
|
+
),
|
|
386
|
+
style: {
|
|
387
|
+
backgroundPosition: "center",
|
|
388
|
+
backgroundSize: "contain",
|
|
389
|
+
backgroundRepeat: "no-repeat"
|
|
390
|
+
},
|
|
391
|
+
onChange: (e) => {
|
|
392
|
+
const input = e.currentTarget;
|
|
393
|
+
if (input.checked) {
|
|
394
|
+
input.style.backgroundImage = checkmarkSvg;
|
|
395
|
+
} else {
|
|
396
|
+
input.style.backgroundImage = "none";
|
|
397
|
+
}
|
|
398
|
+
rest.onChange?.(e);
|
|
399
|
+
},
|
|
592
400
|
...rest
|
|
593
401
|
}
|
|
594
402
|
), label && /* @__PURE__ */ import_react11.default.createElement("label", { htmlFor: inputId, className: "ml-2 text-sm text-silver cursor-pointer select-none" }, label));
|
|
@@ -601,16 +409,58 @@ var import_react12 = __toESM(require("react"));
|
|
|
601
409
|
function cx12(...classes) {
|
|
602
410
|
return classes.filter(Boolean).join(" ");
|
|
603
411
|
}
|
|
412
|
+
var radioDotSvg = `url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%231A1A1A' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")`;
|
|
604
413
|
var Radio = import_react12.default.forwardRef(
|
|
605
414
|
({ className, label, id, ...rest }, ref) => {
|
|
606
415
|
const inputId = id || rest.name || Math.random().toString(36).substr(2, 9);
|
|
416
|
+
const setRef = (0, import_react12.useCallback)((node) => {
|
|
417
|
+
if (node) {
|
|
418
|
+
if (node.checked) {
|
|
419
|
+
node.style.backgroundImage = radioDotSvg;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
if (typeof ref === "function") {
|
|
423
|
+
ref(node);
|
|
424
|
+
} else if (ref) {
|
|
425
|
+
ref.current = node;
|
|
426
|
+
}
|
|
427
|
+
}, [ref]);
|
|
607
428
|
return /* @__PURE__ */ import_react12.default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
608
429
|
"input",
|
|
609
430
|
{
|
|
610
431
|
type: "radio",
|
|
611
432
|
id: inputId,
|
|
612
|
-
ref,
|
|
613
|
-
className: cx12(
|
|
433
|
+
ref: setRef,
|
|
434
|
+
className: cx12(
|
|
435
|
+
"appearance-none h-4 w-4 border border-ash rounded-full bg-graphite",
|
|
436
|
+
"checked:bg-gold checked:border-gold",
|
|
437
|
+
"focus:ring-1 focus:ring-gold focus:ring-offset-1 focus:ring-offset-obsidian",
|
|
438
|
+
"transition duration-200 ease-in-out cursor-pointer",
|
|
439
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
440
|
+
className
|
|
441
|
+
),
|
|
442
|
+
style: {
|
|
443
|
+
backgroundPosition: "center",
|
|
444
|
+
backgroundSize: "contain",
|
|
445
|
+
backgroundRepeat: "no-repeat"
|
|
446
|
+
},
|
|
447
|
+
onChange: (e) => {
|
|
448
|
+
const input = e.currentTarget;
|
|
449
|
+
if (input.checked) {
|
|
450
|
+
input.style.backgroundImage = radioDotSvg;
|
|
451
|
+
if (input.name) {
|
|
452
|
+
const radios = document.querySelectorAll(`input[type="radio"][name="${input.name}"]`);
|
|
453
|
+
radios.forEach((radio) => {
|
|
454
|
+
if (radio !== input) {
|
|
455
|
+
radio.style.backgroundImage = "none";
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
} else {
|
|
460
|
+
input.style.backgroundImage = "none";
|
|
461
|
+
}
|
|
462
|
+
rest.onChange?.(e);
|
|
463
|
+
},
|
|
614
464
|
...rest
|
|
615
465
|
}
|
|
616
466
|
), label && /* @__PURE__ */ import_react12.default.createElement("label", { htmlFor: inputId, className: "ml-2 text-sm text-silver cursor-pointer select-none" }, label));
|
|
@@ -628,6 +478,18 @@ var Switch = import_react13.default.forwardRef(
|
|
|
628
478
|
const [internalChecked, setInternalChecked] = (0, import_react13.useState)(defaultChecked);
|
|
629
479
|
const isControlled = controlledChecked !== void 0;
|
|
630
480
|
const checked = isControlled ? controlledChecked : internalChecked;
|
|
481
|
+
const buttonRef = (0, import_react13.useRef)(null);
|
|
482
|
+
const setRefs = (0, import_react13.useCallback)(
|
|
483
|
+
(node) => {
|
|
484
|
+
buttonRef.current = node;
|
|
485
|
+
if (typeof ref === "function") {
|
|
486
|
+
ref(node);
|
|
487
|
+
} else if (ref) {
|
|
488
|
+
ref.current = node;
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
[ref]
|
|
492
|
+
);
|
|
631
493
|
const handleClick = (e) => {
|
|
632
494
|
if (disabled) return;
|
|
633
495
|
const newChecked = !checked;
|
|
@@ -645,13 +507,39 @@ var Switch = import_react13.default.forwardRef(
|
|
|
645
507
|
"aria-checked": checked,
|
|
646
508
|
"data-state": checked ? "checked" : "unchecked",
|
|
647
509
|
disabled,
|
|
648
|
-
ref,
|
|
510
|
+
ref: setRefs,
|
|
649
511
|
onClick: handleClick,
|
|
650
|
-
className: cx13(
|
|
512
|
+
className: cx13(
|
|
513
|
+
"relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent",
|
|
514
|
+
"transition-colors duration-200 ease-in-out",
|
|
515
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-gold focus-visible:ring-offset-2 focus-visible:ring-offset-obsidian",
|
|
516
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
517
|
+
checked ? "bg-gold" : "bg-charcoal",
|
|
518
|
+
className
|
|
519
|
+
),
|
|
651
520
|
...rest
|
|
652
521
|
},
|
|
653
|
-
/* @__PURE__ */ import_react13.default.createElement(
|
|
654
|
-
|
|
522
|
+
/* @__PURE__ */ import_react13.default.createElement(
|
|
523
|
+
"span",
|
|
524
|
+
{
|
|
525
|
+
className: cx13(
|
|
526
|
+
"pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0",
|
|
527
|
+
"transition duration-200 ease-in-out",
|
|
528
|
+
checked ? "translate-x-5" : "translate-x-0"
|
|
529
|
+
)
|
|
530
|
+
}
|
|
531
|
+
)
|
|
532
|
+
), label && /* @__PURE__ */ import_react13.default.createElement(
|
|
533
|
+
"span",
|
|
534
|
+
{
|
|
535
|
+
className: "text-sm text-silver cursor-pointer",
|
|
536
|
+
onClick: () => {
|
|
537
|
+
if (disabled) return;
|
|
538
|
+
buttonRef.current?.click();
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
label
|
|
542
|
+
));
|
|
655
543
|
}
|
|
656
544
|
);
|
|
657
545
|
Switch.displayName = "Switch";
|
|
@@ -668,16 +556,25 @@ var icons = {
|
|
|
668
556
|
warning: import_lucide_react.AlertTriangle,
|
|
669
557
|
error: import_lucide_react.XCircle
|
|
670
558
|
};
|
|
559
|
+
var variantStyles = {
|
|
560
|
+
info: "bg-info/10 border-info text-info",
|
|
561
|
+
success: "bg-success/10 border-success text-success",
|
|
562
|
+
warning: "bg-warning/10 border-warning text-warning",
|
|
563
|
+
error: "bg-error/10 border-error text-error"
|
|
564
|
+
};
|
|
671
565
|
var Alert = import_react14.default.forwardRef(
|
|
672
566
|
({ variant = "info", title, children, className, ...rest }, ref) => {
|
|
673
567
|
const Icon = icons[variant];
|
|
674
|
-
const variantClass = `alert-${variant}`;
|
|
675
568
|
return /* @__PURE__ */ import_react14.default.createElement(
|
|
676
569
|
"div",
|
|
677
570
|
{
|
|
678
571
|
ref,
|
|
679
572
|
role: "alert",
|
|
680
|
-
className: cx14(
|
|
573
|
+
className: cx14(
|
|
574
|
+
"relative w-full p-4 rounded-none border border-l-4 flex gap-3",
|
|
575
|
+
variantStyles[variant],
|
|
576
|
+
className
|
|
577
|
+
),
|
|
681
578
|
...rest
|
|
682
579
|
},
|
|
683
580
|
/* @__PURE__ */ import_react14.default.createElement(Icon, { className: "h-5 w-5 shrink-0" }),
|
|
@@ -766,12 +663,15 @@ var Modal = ({ isOpen, onClose, title, children, className }) => {
|
|
|
766
663
|
}, [onClose]);
|
|
767
664
|
if (!mounted) return null;
|
|
768
665
|
if (!isOpen) return null;
|
|
769
|
-
const content = /* @__PURE__ */ import_react17.default.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6", onClick: onClose }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "
|
|
666
|
+
const content = /* @__PURE__ */ import_react17.default.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6", onClick: onClose }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "fixed inset-0 z-40 bg-obsidian/80 backdrop-blur-sm", "aria-hidden": "true" }), /* @__PURE__ */ import_react17.default.createElement(
|
|
770
667
|
"div",
|
|
771
668
|
{
|
|
772
669
|
role: "dialog",
|
|
773
670
|
"aria-modal": "true",
|
|
774
|
-
className: cx17(
|
|
671
|
+
className: cx17(
|
|
672
|
+
"bg-charcoal border border-gold/30 shadow-2xl z-50 w-full max-w-lg p-6 rounded-none relative",
|
|
673
|
+
className
|
|
674
|
+
),
|
|
775
675
|
"data-state": "open",
|
|
776
676
|
onClick: (e) => e.stopPropagation()
|
|
777
677
|
},
|
|
@@ -783,7 +683,7 @@ var Modal = ({ isOpen, onClose, title, children, className }) => {
|
|
|
783
683
|
Modal.displayName = "Modal";
|
|
784
684
|
|
|
785
685
|
// src/index.ts
|
|
786
|
-
var version = "
|
|
686
|
+
var version = "2.0.0";
|
|
787
687
|
// Annotate the CommonJS export names for ESM import in node:
|
|
788
688
|
0 && (module.exports = {
|
|
789
689
|
Alert,
|
|
@@ -803,14 +703,6 @@ var version = "1.0.0";
|
|
|
803
703
|
Switch,
|
|
804
704
|
Textarea,
|
|
805
705
|
Tooltip,
|
|
806
|
-
colors,
|
|
807
|
-
duration,
|
|
808
|
-
easing,
|
|
809
|
-
radii,
|
|
810
|
-
shadows,
|
|
811
|
-
spacing,
|
|
812
|
-
tailwindPreset,
|
|
813
|
-
typography,
|
|
814
706
|
version
|
|
815
707
|
});
|
|
816
708
|
//# sourceMappingURL=index.js.map
|