@fairmint/ui 0.1.0 → 0.1.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.
Files changed (37) hide show
  1. package/README.md +48 -61
  2. package/dist/components/AppHeader/AppHeader.d.ts +15 -0
  3. package/dist/components/AppHeader/AppHeader.d.ts.map +1 -0
  4. package/dist/components/ErrorFallback/ErrorFallback.d.ts +14 -0
  5. package/dist/components/ErrorFallback/ErrorFallback.d.ts.map +1 -0
  6. package/dist/components/FairmintLogo/FairmintLogo.d.ts +14 -0
  7. package/dist/components/FairmintLogo/FairmintLogo.d.ts.map +1 -0
  8. package/dist/components/FairmintProvider/FairmintProvider.d.ts +9 -0
  9. package/dist/components/FairmintProvider/FairmintProvider.d.ts.map +1 -0
  10. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +10 -0
  11. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
  12. package/dist/components/PageHeader/PageHeader.d.ts +11 -0
  13. package/dist/components/PageHeader/PageHeader.d.ts.map +1 -0
  14. package/dist/components/SideNav/SideNav.d.ts +21 -0
  15. package/dist/components/SideNav/SideNav.d.ts.map +1 -0
  16. package/dist/components/UserMenu/UserMenu.d.ts +31 -0
  17. package/dist/components/UserMenu/UserMenu.d.ts.map +1 -0
  18. package/dist/{fairmint-ui.cjs.js → fairmint-ui.cjs} +76 -62
  19. package/dist/fairmint-ui.cjs.map +1 -0
  20. package/dist/{fairmint-ui.es.js → fairmint-ui.js} +77 -63
  21. package/dist/fairmint-ui.js.map +1 -0
  22. package/dist/index.d.ts +18 -301
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/styles.css +6 -2
  25. package/dist/test/setup.d.ts +1 -0
  26. package/dist/test/setup.d.ts.map +1 -0
  27. package/dist/theme/index.d.ts +170 -0
  28. package/dist/theme/index.d.ts.map +1 -0
  29. package/dist/vite.cjs +30 -0
  30. package/dist/vite.cjs.map +1 -0
  31. package/dist/vite.d.ts +18 -0
  32. package/dist/vite.d.ts.map +1 -0
  33. package/dist/vite.js +30 -0
  34. package/dist/vite.js.map +1 -0
  35. package/package.json +29 -21
  36. package/dist/fairmint-ui.cjs.js.map +0 -1
  37. package/dist/fairmint-ui.es.js.map +0 -1
@@ -1,5 +1,65 @@
1
- import { createTheme, Box, Group, Stack, Title, Text, Container, Button, Burger, NavLink, Menu, UnstyledButton, Avatar, Divider } from "@mantine/core";
2
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { Group, Burger, Container, Stack, Title, Text, Button, createTheme, MantineProvider, Box, NavLink, Menu, UnstyledButton, Avatar, Divider } from "@mantine/core";
3
+ function AppHeader({
4
+ logo,
5
+ rightSection,
6
+ mobileNavOpened = false,
7
+ onMobileNavToggle,
8
+ height = 60
9
+ }) {
10
+ return /* @__PURE__ */ jsxs(Group, { h: height, px: "md", justify: "space-between", children: [
11
+ /* @__PURE__ */ jsxs(Group, { children: [
12
+ onMobileNavToggle && /* @__PURE__ */ jsx(
13
+ Burger,
14
+ {
15
+ opened: mobileNavOpened,
16
+ onClick: onMobileNavToggle,
17
+ hiddenFrom: "sm",
18
+ size: "sm",
19
+ "aria-label": "Toggle navigation"
20
+ }
21
+ ),
22
+ logo
23
+ ] }),
24
+ rightSection
25
+ ] });
26
+ }
27
+ function ErrorFallback({
28
+ title = "Something went wrong",
29
+ description = "We've been notified and are working on a fix.",
30
+ onAction,
31
+ actionLabel = "Reload Page",
32
+ error: error2
33
+ }) {
34
+ if (error2 !== void 0) {
35
+ console.error("[ErrorFallback]", error2);
36
+ }
37
+ const handleAction = onAction ?? (() => window.location.reload());
38
+ return /* @__PURE__ */ jsx(Container, { size: "sm", py: "xl", children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "md", children: [
39
+ /* @__PURE__ */ jsx(Title, { order: 2, children: title }),
40
+ /* @__PURE__ */ jsx(Text, { c: "dimmed", children: description }),
41
+ /* @__PURE__ */ jsx(Button, { onClick: handleAction, children: actionLabel })
42
+ ] }) });
43
+ }
44
+ function FairmintLogo({
45
+ src = "https://imagedelivery.net/Lm6ChJXR4cIKKycsNMvGjA/0367be38-c9d8-4206-aaae-eba5ff830600/public",
46
+ width = 140,
47
+ height = 30,
48
+ className,
49
+ alt = "Fairmint"
50
+ }) {
51
+ return /* @__PURE__ */ jsx(
52
+ "img",
53
+ {
54
+ src,
55
+ alt,
56
+ width,
57
+ height,
58
+ className,
59
+ style: { objectFit: "contain" }
60
+ }
61
+ );
62
+ }
3
63
  const indigo = [
4
64
  "#EEF2FF",
5
65
  "#E0E7FF",
@@ -181,24 +241,8 @@ const semanticColors = {
181
241
  error: "#F04438",
182
242
  info: "#06AED4"
183
243
  };
184
- function FairmintLogo({
185
- src = "https://imagedelivery.net/Lm6ChJXR4cIKKycsNMvGjA/0367be38-c9d8-4206-aaae-eba5ff830600/public",
186
- width = 140,
187
- height = 30,
188
- className,
189
- alt = "Fairmint"
190
- }) {
191
- return /* @__PURE__ */ jsx(
192
- "img",
193
- {
194
- src,
195
- alt,
196
- width,
197
- height,
198
- className,
199
- style: { objectFit: "contain" }
200
- }
201
- );
244
+ function FairmintProvider({ children, colorScheme = "light" }) {
245
+ return /* @__PURE__ */ jsx(MantineProvider, { theme, defaultColorScheme: colorScheme, children });
202
246
  }
203
247
  function LoadingSpinner({ size = 32 }) {
204
248
  const iconProps = {
@@ -220,13 +264,23 @@ function LoadingSpinner({ size = 32 }) {
220
264
  /* @__PURE__ */ jsx("path", { d: "M6 15h2" })
221
265
  ] });
222
266
  return /* @__PURE__ */ jsxs(Box, { pos: "relative", style: { width: size, height: size }, role: "status", "aria-label": "Loading", children: [
223
- /* @__PURE__ */ jsx("svg", { ...iconProps, stroke: "var(--mantine-color-gray-3)", style: { position: "absolute", inset: 0 }, children: paths }),
267
+ /* @__PURE__ */ jsx(
268
+ "svg",
269
+ {
270
+ ...iconProps,
271
+ stroke: "var(--mantine-color-gray-3)",
272
+ style: { position: "absolute", inset: 0 },
273
+ "aria-hidden": "true",
274
+ children: paths
275
+ }
276
+ ),
224
277
  /* @__PURE__ */ jsx(
225
278
  "svg",
226
279
  {
227
280
  ...iconProps,
228
281
  stroke: "var(--mantine-color-indigo-5)",
229
282
  style: { position: "absolute", inset: 0, animation: "fillUp 1.4s ease-in-out infinite" },
283
+ "aria-hidden": "true",
230
284
  children: paths
231
285
  }
232
286
  )
@@ -241,47 +295,6 @@ function PageHeader({ title, subtitle, action }) {
241
295
  action
242
296
  ] });
243
297
  }
244
- function ErrorFallback({
245
- title = "Something went wrong",
246
- description = "We've been notified and are working on a fix.",
247
- onAction,
248
- actionLabel = "Reload Page",
249
- error: error2
250
- }) {
251
- if (error2 !== void 0) {
252
- console.error("[ErrorFallback]", error2);
253
- }
254
- const handleAction = onAction ?? (() => window.location.reload());
255
- return /* @__PURE__ */ jsx(Container, { size: "sm", py: "xl", children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "md", children: [
256
- /* @__PURE__ */ jsx(Title, { order: 2, children: title }),
257
- /* @__PURE__ */ jsx(Text, { c: "dimmed", children: description }),
258
- /* @__PURE__ */ jsx(Button, { onClick: handleAction, children: actionLabel })
259
- ] }) });
260
- }
261
- function AppHeader({
262
- logo,
263
- rightSection,
264
- mobileNavOpened = false,
265
- onMobileNavToggle,
266
- height = 60
267
- }) {
268
- return /* @__PURE__ */ jsxs(Group, { h: height, px: "md", justify: "space-between", children: [
269
- /* @__PURE__ */ jsxs(Group, { children: [
270
- onMobileNavToggle && /* @__PURE__ */ jsx(
271
- Burger,
272
- {
273
- opened: mobileNavOpened,
274
- onClick: onMobileNavToggle,
275
- hiddenFrom: "sm",
276
- size: "sm",
277
- "aria-label": "Toggle navigation"
278
- }
279
- ),
280
- logo
281
- ] }),
282
- rightSection
283
- ] });
284
- }
285
298
  function SideNav({ items, onItemClick, color = "indigo" }) {
286
299
  return /* @__PURE__ */ jsx(Stack, { component: "nav", gap: 4, p: "md", "aria-label": "Main navigation", children: items.map((item) => /* @__PURE__ */ jsx(
287
300
  NavLink,
@@ -340,6 +353,7 @@ export {
340
353
  AppHeader,
341
354
  ErrorFallback,
342
355
  FairmintLogo,
356
+ FairmintProvider,
343
357
  LoadingSpinner,
344
358
  PageHeader,
345
359
  SideNav,
@@ -349,4 +363,4 @@ export {
349
363
  semanticColors,
350
364
  theme
351
365
  };
352
- //# sourceMappingURL=fairmint-ui.es.js.map
366
+ //# sourceMappingURL=fairmint-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fairmint-ui.js","sources":["../src/components/AppHeader/AppHeader.tsx","../src/components/ErrorFallback/ErrorFallback.tsx","../src/components/FairmintLogo/FairmintLogo.tsx","../src/theme/index.ts","../src/components/FairmintProvider/FairmintProvider.tsx","../src/components/LoadingSpinner/LoadingSpinner.tsx","../src/components/PageHeader/PageHeader.tsx","../src/components/SideNav/SideNav.tsx","../src/components/UserMenu/UserMenu.tsx"],"sourcesContent":["import { Burger, Group } from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\n\nexport interface AppHeaderProps {\n /** Logo element (typically FairmintLogo). */\n logo: ReactNode;\n /** Right-aligned content (user menu, actions). */\n rightSection?: ReactNode;\n /** Whether mobile nav is open. Controls burger state. */\n mobileNavOpened?: boolean;\n /** Toggle mobile nav callback. */\n onMobileNavToggle?: () => void;\n /** Header height in pixels. @default 60 */\n height?: number;\n}\n\nexport function AppHeader({\n logo,\n rightSection,\n mobileNavOpened = false,\n onMobileNavToggle,\n height = 60,\n}: AppHeaderProps) {\n return (\n <Group h={height} px=\"md\" justify=\"space-between\">\n <Group>\n {onMobileNavToggle && (\n <Burger\n opened={mobileNavOpened}\n onClick={onMobileNavToggle}\n hiddenFrom=\"sm\"\n size=\"sm\"\n aria-label=\"Toggle navigation\"\n />\n )}\n {logo}\n </Group>\n {rightSection}\n </Group>\n );\n}\n","import { Button, Container, Stack, Text, Title } from \"@mantine/core\";\n\nexport interface ErrorFallbackProps {\n /** Title text. @default \"Something went wrong\" */\n title?: string;\n /** Description text. @default \"We've been notified and are working on a fix.\" */\n description?: string;\n /** Callback when the user clicks the action button. Defaults to window.location.reload(). */\n onAction?: () => void;\n /** Action button label. @default \"Reload Page\" */\n actionLabel?: string;\n /** Optional error object for dev-mode display or logging. Compatible with Sentry ErrorBoundary render props. */\n error?: unknown;\n}\n\nexport function ErrorFallback({\n title = \"Something went wrong\",\n description = \"We've been notified and are working on a fix.\",\n onAction,\n actionLabel = \"Reload Page\",\n error,\n}: ErrorFallbackProps) {\n if (error !== undefined) {\n console.error(\"[ErrorFallback]\", error);\n }\n\n const handleAction = onAction ?? (() => window.location.reload());\n\n return (\n <Container size=\"sm\" py=\"xl\">\n <Stack align=\"center\" gap=\"md\">\n <Title order={2}>{title}</Title>\n <Text c=\"dimmed\">{description}</Text>\n <Button onClick={handleAction}>{actionLabel}</Button>\n </Stack>\n </Container>\n );\n}\n","export interface FairmintLogoProps {\n /** Image source URL. Defaults to the CDN-hosted black wordmark. */\n src?: string;\n /** Width in pixels. @default 140 */\n width?: number;\n /** Height in pixels. @default 30 */\n height?: number;\n /** Additional CSS class. */\n className?: string;\n /** Alt text. @default \"Fairmint\" */\n alt?: string;\n}\n\nexport function FairmintLogo({\n src = \"https://imagedelivery.net/Lm6ChJXR4cIKKycsNMvGjA/0367be38-c9d8-4206-aaae-eba5ff830600/public\",\n width = 140,\n height = 30,\n className,\n alt = \"Fairmint\",\n}: FairmintLogoProps) {\n return (\n <img\n src={src}\n alt={alt}\n width={width}\n height={height}\n className={className}\n style={{ objectFit: \"contain\" }}\n />\n );\n}\n","import { createTheme, type MantineColorsTuple } from \"@mantine/core\";\n\n/**\n * Indigo palette — primary UI color.\n * Used for buttons, links, active navigation, focus rings.\n * Shade [5] (#6366F1) is the default primary.\n */\nconst indigo: MantineColorsTuple = [\n \"#EEF2FF\",\n \"#E0E7FF\",\n \"#C7D2FE\",\n \"#A5B4FC\",\n \"#818CF8\",\n \"#6366F1\",\n \"#4F46E5\",\n \"#4338CA\",\n \"#3730A3\",\n \"#312E81\",\n];\n\n/**\n * Neutral scale — replaces Mantine's default gray.\n * Used for text, borders, backgrounds, disabled states.\n */\nconst neutral: MantineColorsTuple = [\n \"#F8F9FA\",\n \"#F3F4F6\",\n \"#E5E7EB\",\n \"#D2D6DB\",\n \"#9DA4AE\",\n \"#6C737F\",\n \"#4D5761\",\n \"#2F3746\",\n \"#1C2536\",\n \"#111927\",\n];\n\n/**\n * Fairmint brand blue — accent color for gradients and brand elements.\n * Shade [5] (#0A4EFB) is the primary brand blue.\n *\n * NOTE: design/README.md lists #2D00F7 as Fairmint Blue.\n * This library uses #0A4EFB (production value from investorv2).\n */\nconst fairmintBlue: MantineColorsTuple = [\n \"#e6f0ff\",\n \"#cce0ff\",\n \"#99c2ff\",\n \"#66a3ff\",\n \"#3385ff\",\n \"#0A4EFB\",\n \"#083ec9\",\n \"#062e97\",\n \"#041f64\",\n \"#020f32\",\n];\n\n/**\n * Fairmint brand purple — accent color for gradients and brand elements.\n * Shade [5] (#9E03FF) is the primary brand purple.\n *\n * NOTE: design/README.md lists #6739FD as Fairmint Purple.\n * This library uses #9E03FF (production value from investorv2).\n */\nconst fairmintPurple: MantineColorsTuple = [\n \"#f5e6ff\",\n \"#e6ccff\",\n \"#cc99ff\",\n \"#b366ff\",\n \"#9933ff\",\n \"#9E03FF\",\n \"#7e02cc\",\n \"#5f0299\",\n \"#3f0166\",\n \"#200133\",\n];\n\nconst success: MantineColorsTuple = [\n \"#F0FDF9\",\n \"#D1FAE5\",\n \"#A7F3D0\",\n \"#6EE7B7\",\n \"#34D399\",\n \"#10B981\",\n \"#059669\",\n \"#047857\",\n \"#065F46\",\n \"#134E48\",\n];\n\nconst warning: MantineColorsTuple = [\n \"#FFFAEB\",\n \"#FEF0C7\",\n \"#FEDF89\",\n \"#FEC84B\",\n \"#FDB022\",\n \"#F79009\",\n \"#DC6803\",\n \"#B54708\",\n \"#93370D\",\n \"#7A2E0E\",\n];\n\nconst error: MantineColorsTuple = [\n \"#FEF3F2\",\n \"#FEE4E2\",\n \"#FECDCA\",\n \"#FDA29B\",\n \"#F97066\",\n \"#F04438\",\n \"#D92D20\",\n \"#B42318\",\n \"#912018\",\n \"#7A271A\",\n];\n\nconst info: MantineColorsTuple = [\n \"#ECFDFF\",\n \"#CFF9FE\",\n \"#A5F0FC\",\n \"#67E3F9\",\n \"#22CCEE\",\n \"#06AED4\",\n \"#088AB2\",\n \"#0E7090\",\n \"#155B75\",\n \"#164C63\",\n];\n\nexport const theme = createTheme({\n primaryColor: \"indigo\",\n colors: { indigo, gray: neutral, fairmintBlue, fairmintPurple, success, warning, error, info },\n\n fontFamily:\n '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\"',\n headings: {\n fontFamily: '\"Plus Jakarta Sans\", sans-serif',\n fontWeight: \"700\",\n },\n\n radius: {\n xs: \"0.25rem\",\n sm: \"0.375rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n },\n defaultRadius: \"md\",\n\n breakpoints: {\n xs: \"30em\",\n sm: \"48em\",\n md: \"64em\",\n lg: \"74em\",\n xl: \"90em\",\n },\n\n components: {\n Button: {\n defaultProps: { size: \"md\" },\n styles: {\n root: {\n fontWeight: 600,\n borderRadius: \"0.75rem\",\n textTransform: \"none\" as const,\n },\n },\n },\n TextInput: {\n defaultProps: { size: \"md\" },\n },\n Card: {\n defaultProps: {\n padding: \"lg\",\n radius: \"xl\",\n withBorder: true,\n },\n },\n Paper: {\n styles: {\n root: { backgroundImage: \"none\" },\n },\n },\n Table: {\n styles: {\n thead: {\n fontSize: \"0.75rem\",\n fontWeight: 600,\n letterSpacing: \"0.5px\",\n textTransform: \"uppercase\" as const,\n },\n },\n },\n },\n});\n\n/** Brand colors for gradients and custom styling. */\nexport const brandColors = {\n blue: \"#0A4EFB\",\n purple: \"#9E03FF\",\n indigo: \"#6366F1\",\n gradient: \"linear-gradient(90deg, #0A4EFB 0%, #9E03FF 100%)\",\n} as const;\n\n/** Neutral scale for direct access outside Mantine's theme system. Keys are numeric literals. */\nexport const neutralColors = {\n 50: \"#F8F9FA\",\n 100: \"#F3F4F6\",\n 200: \"#E5E7EB\",\n 300: \"#D2D6DB\",\n 400: \"#9DA4AE\",\n 500: \"#6C737F\",\n 600: \"#4D5761\",\n 700: \"#2F3746\",\n 800: \"#1C2536\",\n 900: \"#111927\",\n} as const;\n\n/** Semantic colors for status-based styling. */\nexport const semanticColors = {\n success: \"#10B981\",\n warning: \"#F79009\",\n error: \"#F04438\",\n info: \"#06AED4\",\n} as const;\n","import type { MantineColorScheme } from \"@mantine/core\";\nimport { MantineProvider } from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\nimport { theme } from \"../../theme\";\n\nexport interface FairmintProviderProps {\n children: ReactNode;\n /** Color scheme. @default \"light\" */\n colorScheme?: MantineColorScheme;\n}\n\nexport function FairmintProvider({ children, colorScheme = \"light\" }: FairmintProviderProps) {\n if (import.meta.env?.DEV) {\n validateSetup();\n }\n\n return (\n <MantineProvider theme={theme} defaultColorScheme={colorScheme}>\n {children}\n </MantineProvider>\n );\n}\n\nfunction validateSetup() {\n if (typeof window === \"undefined\") return;\n\n requestIdleCallback(() => {\n const root = document.documentElement;\n const mantineCss = getComputedStyle(root).getPropertyValue(\"--mantine-color-scheme\");\n if (!mantineCss) {\n console.warn(\n '[@fairmint/ui] Mantine CSS not detected. Make sure you import \"@fairmint/ui/styles.css\" in your entry file.',\n );\n }\n });\n}\n","import { Box } from \"@mantine/core\";\n\nexport interface LoadingSpinnerProps {\n /** Icon size in pixels. @default 32 */\n size?: number;\n}\n\n/**\n * Animated certificate icon that fills from bottom to top.\n * Requires the consumer to import `@fairmint/ui/styles.css` for the keyframe animation.\n */\nexport function LoadingSpinner({ size = 32 }: LoadingSpinnerProps) {\n const iconProps = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: size,\n height: size,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n strokeWidth: 1.5,\n strokeLinecap: \"round\" as const,\n strokeLinejoin: \"round\" as const,\n };\n\n const paths = (\n <>\n <path d=\"M15 15m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0\" />\n <path d=\"M13 17.5v4.5l2 -1.5l2 1.5v-4.5\" />\n <path d=\"M10 19h-5a2 2 0 0 1 -2 -2v-10c0 -1.1 .9 -2 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-1\" />\n <path d=\"M6 9h12\" />\n <path d=\"M6 12h3\" />\n <path d=\"M6 15h2\" />\n </>\n );\n\n return (\n <Box pos=\"relative\" style={{ width: size, height: size }} role=\"status\" aria-label=\"Loading\">\n <svg\n {...iconProps}\n stroke=\"var(--mantine-color-gray-3)\"\n style={{ position: \"absolute\", inset: 0 }}\n aria-hidden=\"true\"\n >\n {paths}\n </svg>\n <svg\n {...iconProps}\n stroke=\"var(--mantine-color-indigo-5)\"\n style={{ position: \"absolute\", inset: 0, animation: \"fillUp 1.4s ease-in-out infinite\" }}\n aria-hidden=\"true\"\n >\n {paths}\n </svg>\n </Box>\n );\n}\n","import { Group, Stack, Text, Title } from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\n\nexport interface PageHeaderProps {\n /** Page title text. */\n title: string;\n /** Optional subtitle text. */\n subtitle?: string;\n /** Optional right-aligned action element (button, date picker, etc.). */\n action?: ReactNode;\n}\n\nexport function PageHeader({ title, subtitle, action }: PageHeaderProps) {\n return (\n <Group justify=\"space-between\" align=\"flex-start\" mb=\"lg\">\n <Stack gap={4}>\n <Title order={2}>{title}</Title>\n {subtitle && (\n <Text c=\"dimmed\" size=\"sm\">\n {subtitle}\n </Text>\n )}\n </Stack>\n {action}\n </Group>\n );\n}\n","import { NavLink, Stack } from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\n\nexport interface SideNavItem {\n /** Unique identifier for this nav item (e.g., route path or slug). */\n id: string;\n /** Display label. */\n label: string;\n /** Icon element. */\n icon?: ReactNode;\n /** Whether this item is currently active. */\n active?: boolean;\n}\n\nexport interface SideNavProps {\n /** Navigation items to render. */\n items: SideNavItem[];\n /** Callback when a nav item is clicked. Receives the item's `id`. */\n onItemClick: (id: string) => void;\n /** Active color. @default \"indigo\" */\n color?: string;\n}\n\nexport function SideNav({ items, onItemClick, color = \"indigo\" }: SideNavProps) {\n return (\n <Stack component=\"nav\" gap={4} p=\"md\" aria-label=\"Main navigation\">\n {items.map((item) => (\n <NavLink\n key={item.id}\n label={item.label}\n leftSection={item.icon}\n active={item.active}\n onClick={() => onItemClick(item.id)}\n color={color}\n variant=\"light\"\n style={{ borderRadius: \"var(--mantine-radius-md)\" }}\n styles={{\n root: {\n color: item.active ? undefined : \"var(--mantine-color-gray-5)\",\n fontWeight: item.active ? 500 : 400,\n },\n section: {\n color: item.active ? undefined : \"var(--mantine-color-gray-4)\",\n },\n }}\n />\n ))}\n </Stack>\n );\n}\n","import { Avatar, Box, Divider, Group, Menu, Text, UnstyledButton } from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\n\nexport interface UserMenuItem {\n /** Unique identifier for this menu item. */\n id: string;\n /** Display label. */\n label: string;\n /** Icon element. */\n icon?: ReactNode;\n /** Item color (e.g., \"red\" for destructive actions). */\n color?: string;\n /** Optional section label above this item. Set on the first item in a group. */\n sectionLabel?: string;\n /** Show a divider before this item. */\n dividerBefore?: boolean;\n}\n\nexport interface UserMenuProps {\n /** User display name or email. */\n displayName: string;\n /** Single-character avatar initial. Derived from displayName[0] if not provided. */\n avatarInitial?: string;\n /** Avatar color. @default \"indigo\" */\n avatarColor?: string;\n /** Optional indicator element after the display name (e.g., chevron icon from your app's icon library). */\n indicator?: ReactNode;\n /** Menu items. */\n items: UserMenuItem[];\n /** Callback when a menu item is clicked. Receives the item's `id`. */\n onItemClick: (id: string) => void;\n}\n\nexport function UserMenu({\n displayName,\n avatarInitial,\n avatarColor = \"indigo\",\n indicator,\n items,\n onItemClick,\n}: UserMenuProps) {\n const initial = avatarInitial ?? displayName.charAt(0).toUpperCase();\n\n return (\n <Menu shadow=\"md\" width={200} position=\"bottom-end\">\n <Menu.Target>\n <UnstyledButton aria-label=\"User menu\">\n <Group gap=\"xs\">\n <Avatar size=\"sm\" radius=\"xl\" color={avatarColor}>\n {initial}\n </Avatar>\n <Box visibleFrom=\"sm\">\n <Text size=\"sm\" fw={500} lineClamp={1} style={{ maxWidth: 150 }}>\n {displayName}\n </Text>\n </Box>\n {indicator}\n </Group>\n </UnstyledButton>\n </Menu.Target>\n\n <Menu.Dropdown>\n {items.map((item) => (\n <div key={item.id}>\n {item.dividerBefore && <Divider my=\"xs\" />}\n {item.sectionLabel && <Menu.Label>{item.sectionLabel}</Menu.Label>}\n <Menu.Item\n leftSection={item.icon}\n color={item.color}\n onClick={() => onItemClick(item.id)}\n >\n {item.label}\n </Menu.Item>\n </div>\n ))}\n </Menu.Dropdown>\n </Menu>\n );\n}\n"],"names":["error"],"mappings":";;AAgBO,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB;AAAA,EACA,SAAS;AACX,GAAmB;AACjB,8BACG,OAAA,EAAM,GAAG,QAAQ,IAAG,MAAK,SAAQ,iBAChC,UAAA;AAAA,IAAA,qBAAC,OAAA,EACE,UAAA;AAAA,MAAA,qBACC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,QAAQ;AAAA,UACR,SAAS;AAAA,UACT,YAAW;AAAA,UACX,MAAK;AAAA,UACL,cAAW;AAAA,QAAA;AAAA,MAAA;AAAA,MAGd;AAAA,IAAA,GACH;AAAA,IACC;AAAA,EAAA,GACH;AAEJ;ACzBO,SAAS,cAAc;AAAA,EAC5B,QAAQ;AAAA,EACR,cAAc;AAAA,EACd;AAAA,EACA,cAAc;AAAA,EACd,OAAAA;AACF,GAAuB;AACrB,MAAIA,WAAU,QAAW;AACvB,YAAQ,MAAM,mBAAmBA,MAAK;AAAA,EACxC;AAEA,QAAM,eAAe,aAAa,MAAM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A,MACrD;AAAA,QAAC,KAAK;AAAA,QAAL;AAAA,UACC,aAAa,KAAK;AAAA,UAClB,OAAO,KAAK;AAAA,UACZ,SAAS,MAAM,YAAY,KAAK,EAAE;AAAA,UAEjC,UAAA,KAAK;AAAA,QAAA;AAAA,MAAA;AAAA,IACR,KATQ,KAAK,EAUf,CACD,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
package/dist/index.d.ts CHANGED
@@ -1,301 +1,18 @@
1
- import { JSX } from 'react/jsx-runtime';
2
- import { MantineColorShade } from '@mantine/core';
3
- import { MantineColorsTuple } from '@mantine/core';
4
- import { MantineRadius } from '@mantine/core';
5
- import { ReactNode } from 'react';
6
- import { VariantColorsResolver } from '@mantine/core';
7
-
8
- export declare function AppHeader({ logo, rightSection, mobileNavOpened, onMobileNavToggle, height, }: AppHeaderProps): JSX.Element;
9
-
10
- export declare interface AppHeaderProps {
11
- /** Logo element (typically FairmintLogo). */
12
- logo: ReactNode;
13
- /** Right-aligned content (user menu, actions). */
14
- rightSection?: ReactNode;
15
- /** Whether mobile nav is open. Controls burger state. */
16
- mobileNavOpened?: boolean;
17
- /** Toggle mobile nav callback. */
18
- onMobileNavToggle?: () => void;
19
- /** Header height in pixels. @default 60 */
20
- height?: number;
21
- }
22
-
23
- /** Brand colors for gradients and custom styling. */
24
- export declare const brandColors: {
25
- readonly blue: "#0A4EFB";
26
- readonly purple: "#9E03FF";
27
- readonly indigo: "#6366F1";
28
- readonly gradient: "linear-gradient(90deg, #0A4EFB 0%, #9E03FF 100%)";
29
- };
30
-
31
- export declare function ErrorFallback({ title, description, onAction, actionLabel, error, }: ErrorFallbackProps): JSX.Element;
32
-
33
- export declare interface ErrorFallbackProps {
34
- /** Title text. @default "Something went wrong" */
35
- title?: string;
36
- /** Description text. @default "We've been notified and are working on a fix." */
37
- description?: string;
38
- /** Callback when the user clicks the action button. Defaults to window.location.reload(). */
39
- onAction?: () => void;
40
- /** Action button label. @default "Reload Page" */
41
- actionLabel?: string;
42
- /** Optional error object for dev-mode display or logging. Compatible with Sentry ErrorBoundary render props. */
43
- error?: unknown;
44
- }
45
-
46
- export declare function FairmintLogo({ src, width, height, className, alt, }: FairmintLogoProps): JSX.Element;
47
-
48
- export declare interface FairmintLogoProps {
49
- /** Image source URL. Defaults to the CDN-hosted black wordmark. */
50
- src?: string;
51
- /** Width in pixels. @default 140 */
52
- width?: number;
53
- /** Height in pixels. @default 30 */
54
- height?: number;
55
- /** Additional CSS class. */
56
- className?: string;
57
- /** Alt text. @default "Fairmint" */
58
- alt?: string;
59
- }
60
-
61
- /**
62
- * Animated certificate icon that fills from bottom to top.
63
- * Requires the consumer to import `@fairmint/ui/styles.css` for the keyframe animation.
64
- */
65
- export declare function LoadingSpinner({ size }: LoadingSpinnerProps): JSX.Element;
66
-
67
- export declare interface LoadingSpinnerProps {
68
- /** Icon size in pixels. @default 32 */
69
- size?: number;
70
- }
71
-
72
- /** Neutral scale for direct access outside Mantine's theme system. Keys are numeric literals. */
73
- export declare const neutralColors: {
74
- readonly 50: "#F8F9FA";
75
- readonly 100: "#F3F4F6";
76
- readonly 200: "#E5E7EB";
77
- readonly 300: "#D2D6DB";
78
- readonly 400: "#9DA4AE";
79
- readonly 500: "#6C737F";
80
- readonly 600: "#4D5761";
81
- readonly 700: "#2F3746";
82
- readonly 800: "#1C2536";
83
- readonly 900: "#111927";
84
- };
85
-
86
- export declare function PageHeader({ title, subtitle, action }: PageHeaderProps): JSX.Element;
87
-
88
- export declare interface PageHeaderProps {
89
- /** Page title text. */
90
- title: string;
91
- /** Optional subtitle text. */
92
- subtitle?: string;
93
- /** Optional right-aligned action element (button, date picker, etc.). */
94
- action?: ReactNode;
95
- }
96
-
97
- /** Semantic colors for status-based styling. */
98
- export declare const semanticColors: {
99
- readonly success: "#10B981";
100
- readonly warning: "#F79009";
101
- readonly error: "#F04438";
102
- readonly info: "#06AED4";
103
- };
104
-
105
- export declare function SideNav({ items, onItemClick, color }: SideNavProps): JSX.Element;
106
-
107
- export declare interface SideNavItem {
108
- /** Unique identifier for this nav item (e.g., route path or slug). */
109
- id: string;
110
- /** Display label. */
111
- label: string;
112
- /** Icon element. */
113
- icon?: ReactNode;
114
- /** Whether this item is currently active. */
115
- active?: boolean;
116
- }
117
-
118
- export declare interface SideNavProps {
119
- /** Navigation items to render. */
120
- items: SideNavItem[];
121
- /** Callback when a nav item is clicked. Receives the item's `id`. */
122
- onItemClick: (id: string) => void;
123
- /** Active color. @default "indigo" */
124
- color?: string;
125
- }
126
-
127
- export declare const theme: {
128
- focusRing?: "auto" | "always" | "never" | undefined;
129
- scale?: number | undefined;
130
- fontSmoothing?: boolean | undefined;
131
- white?: string | undefined;
132
- black?: string | undefined;
133
- colors?: {
134
- [x: string & {}]: MantineColorsTuple | undefined;
135
- indigo?: MantineColorsTuple | undefined;
136
- dark?: MantineColorsTuple | undefined;
137
- gray?: MantineColorsTuple | undefined;
138
- red?: MantineColorsTuple | undefined;
139
- pink?: MantineColorsTuple | undefined;
140
- grape?: MantineColorsTuple | undefined;
141
- violet?: MantineColorsTuple | undefined;
142
- blue?: MantineColorsTuple | undefined;
143
- cyan?: MantineColorsTuple | undefined;
144
- green?: MantineColorsTuple | undefined;
145
- lime?: MantineColorsTuple | undefined;
146
- yellow?: MantineColorsTuple | undefined;
147
- orange?: MantineColorsTuple | undefined;
148
- teal?: MantineColorsTuple | undefined;
149
- } | undefined;
150
- primaryShade?: MantineColorShade | {
151
- light?: MantineColorShade | undefined;
152
- dark?: MantineColorShade | undefined;
153
- } | undefined;
154
- primaryColor?: string | undefined;
155
- variantColorResolver?: VariantColorsResolver | undefined;
156
- autoContrast?: boolean | undefined;
157
- luminanceThreshold?: number | undefined;
158
- fontFamily?: string | undefined;
159
- fontFamilyMonospace?: string | undefined;
160
- headings?: {
161
- fontFamily?: string | undefined;
162
- fontWeight?: string | undefined;
163
- textWrap?: "wrap" | "nowrap" | "balance" | "pretty" | "stable" | undefined;
164
- sizes?: {
165
- h1?: {
166
- fontSize?: string | undefined;
167
- fontWeight?: string | undefined;
168
- lineHeight?: string | undefined;
169
- } | undefined;
170
- h2?: {
171
- fontSize?: string | undefined;
172
- fontWeight?: string | undefined;
173
- lineHeight?: string | undefined;
174
- } | undefined;
175
- h3?: {
176
- fontSize?: string | undefined;
177
- fontWeight?: string | undefined;
178
- lineHeight?: string | undefined;
179
- } | undefined;
180
- h4?: {
181
- fontSize?: string | undefined;
182
- fontWeight?: string | undefined;
183
- lineHeight?: string | undefined;
184
- } | undefined;
185
- h5?: {
186
- fontSize?: string | undefined;
187
- fontWeight?: string | undefined;
188
- lineHeight?: string | undefined;
189
- } | undefined;
190
- h6?: {
191
- fontSize?: string | undefined;
192
- fontWeight?: string | undefined;
193
- lineHeight?: string | undefined;
194
- } | undefined;
195
- } | undefined;
196
- } | undefined;
197
- radius?: {
198
- [x: string & {}]: string | undefined;
199
- xs?: string | undefined;
200
- sm?: string | undefined;
201
- md?: string | undefined;
202
- lg?: string | undefined;
203
- xl?: string | undefined;
204
- } | undefined;
205
- defaultRadius?: MantineRadius | undefined;
206
- spacing?: {
207
- [x: number]: string | undefined;
208
- [x: string & {}]: string | undefined;
209
- xs?: string | undefined;
210
- sm?: string | undefined;
211
- md?: string | undefined;
212
- lg?: string | undefined;
213
- xl?: string | undefined;
214
- } | undefined;
215
- fontSizes?: {
216
- [x: string & {}]: string | undefined;
217
- xs?: string | undefined;
218
- sm?: string | undefined;
219
- md?: string | undefined;
220
- lg?: string | undefined;
221
- xl?: string | undefined;
222
- } | undefined;
223
- lineHeights?: {
224
- [x: string & {}]: string | undefined;
225
- xs?: string | undefined;
226
- sm?: string | undefined;
227
- md?: string | undefined;
228
- lg?: string | undefined;
229
- xl?: string | undefined;
230
- } | undefined;
231
- breakpoints?: {
232
- [x: string & {}]: string | undefined;
233
- xs?: string | undefined;
234
- sm?: string | undefined;
235
- md?: string | undefined;
236
- lg?: string | undefined;
237
- xl?: string | undefined;
238
- } | undefined;
239
- shadows?: {
240
- [x: string & {}]: string | undefined;
241
- xs?: string | undefined;
242
- sm?: string | undefined;
243
- md?: string | undefined;
244
- lg?: string | undefined;
245
- xl?: string | undefined;
246
- } | undefined;
247
- respectReducedMotion?: boolean | undefined;
248
- cursorType?: "default" | "pointer" | undefined;
249
- defaultGradient?: {
250
- from?: string | undefined;
251
- to?: string | undefined;
252
- deg?: number | undefined;
253
- } | undefined;
254
- activeClassName?: string | undefined;
255
- focusClassName?: string | undefined;
256
- components?: {
257
- [x: string]: {
258
- classNames?: any;
259
- styles?: any;
260
- vars?: any;
261
- defaultProps?: any;
262
- } | undefined;
263
- } | undefined;
264
- other?: {
265
- [x: string]: any;
266
- } | undefined;
267
- };
268
-
269
- export declare function UserMenu({ displayName, avatarInitial, avatarColor, indicator, items, onItemClick, }: UserMenuProps): JSX.Element;
270
-
271
- export declare interface UserMenuItem {
272
- /** Unique identifier for this menu item. */
273
- id: string;
274
- /** Display label. */
275
- label: string;
276
- /** Icon element. */
277
- icon?: ReactNode;
278
- /** Item color (e.g., "red" for destructive actions). */
279
- color?: string;
280
- /** Optional section label above this item. Set on the first item in a group. */
281
- sectionLabel?: string;
282
- /** Show a divider before this item. */
283
- dividerBefore?: boolean;
284
- }
285
-
286
- export declare interface UserMenuProps {
287
- /** User display name or email. */
288
- displayName: string;
289
- /** Single-character avatar initial. Derived from displayName[0] if not provided. */
290
- avatarInitial?: string;
291
- /** Avatar color. @default "indigo" */
292
- avatarColor?: string;
293
- /** Optional indicator element after the display name (e.g., chevron icon from your app's icon library). */
294
- indicator?: ReactNode;
295
- /** Menu items. */
296
- items: UserMenuItem[];
297
- /** Callback when a menu item is clicked. Receives the item's `id`. */
298
- onItemClick: (id: string) => void;
299
- }
300
-
301
- export { }
1
+ export type { AppHeaderProps } from './components/AppHeader/AppHeader';
2
+ export { AppHeader } from './components/AppHeader/AppHeader';
3
+ export type { ErrorFallbackProps } from './components/ErrorFallback/ErrorFallback';
4
+ export { ErrorFallback } from './components/ErrorFallback/ErrorFallback';
5
+ export type { FairmintLogoProps } from './components/FairmintLogo/FairmintLogo';
6
+ export { FairmintLogo } from './components/FairmintLogo/FairmintLogo';
7
+ export type { FairmintProviderProps } from './components/FairmintProvider/FairmintProvider';
8
+ export { FairmintProvider } from './components/FairmintProvider/FairmintProvider';
9
+ export type { LoadingSpinnerProps } from './components/LoadingSpinner/LoadingSpinner';
10
+ export { LoadingSpinner } from './components/LoadingSpinner/LoadingSpinner';
11
+ export type { PageHeaderProps } from './components/PageHeader/PageHeader';
12
+ export { PageHeader } from './components/PageHeader/PageHeader';
13
+ export type { SideNavItem, SideNavProps } from './components/SideNav/SideNav';
14
+ export { SideNav } from './components/SideNav/SideNav';
15
+ export type { UserMenuItem, UserMenuProps } from './components/UserMenu/UserMenu';
16
+ export { UserMenu } from './components/UserMenu/UserMenu';
17
+ export { brandColors, neutralColors, semanticColors, theme } from './theme';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,YAAY,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,YAAY,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,YAAY,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,YAAY,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAG5E,OAAO,gDAAgD,CAAC"}
package/dist/styles.css CHANGED
@@ -1,4 +1,8 @@
1
1
  @keyframes fillUp {
2
- 0% { clip-path: inset(100% 0 0 0); }
3
- 100% { clip-path: inset(0 0 0 0); }
2
+ 0% {
3
+ clip-path: inset(100% 0 0 0);
4
+ }
5
+ 100% {
6
+ clip-path: inset(0 0 0 0);
7
+ }
4
8
  }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC"}