@fairmint/ui 0.1.4 → 0.1.6

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 (124) hide show
  1. package/dist/components/FairmintProvider/FairmintProvider.d.ts +6 -1
  2. package/dist/components/FairmintProvider/FairmintProvider.d.ts.map +1 -1
  3. package/dist/components/form/EmailField.d.ts +8 -0
  4. package/dist/components/form/EmailField.d.ts.map +1 -0
  5. package/dist/components/form/Form.d.ts +13 -0
  6. package/dist/components/form/Form.d.ts.map +1 -0
  7. package/dist/components/form/FormField.d.ts +18 -0
  8. package/dist/components/form/FormField.d.ts.map +1 -0
  9. package/dist/components/form/PasswordField.d.ts +8 -0
  10. package/dist/components/form/PasswordField.d.ts.map +1 -0
  11. package/dist/components/form/PhoneField.d.ts +8 -0
  12. package/dist/components/form/PhoneField.d.ts.map +1 -0
  13. package/dist/components/generic/AnimateIn/AnimateIn.d.ts +18 -0
  14. package/dist/components/generic/AnimateIn/AnimateIn.d.ts.map +1 -0
  15. package/dist/components/generic/ConfirmDialog/ConfirmDialog.d.ts +23 -0
  16. package/dist/components/generic/ConfirmDialog/ConfirmDialog.d.ts.map +1 -0
  17. package/dist/components/generic/Currency/Currency.d.ts +11 -0
  18. package/dist/components/generic/Currency/Currency.d.ts.map +1 -0
  19. package/dist/components/generic/DataTable/DataTable.d.ts +37 -0
  20. package/dist/components/generic/DataTable/DataTable.d.ts.map +1 -0
  21. package/dist/components/generic/DateDisplay/DateDisplay.d.ts +7 -0
  22. package/dist/components/generic/DateDisplay/DateDisplay.d.ts.map +1 -0
  23. package/dist/components/generic/DetailDrawer/DetailDrawer.d.ts +16 -0
  24. package/dist/components/generic/DetailDrawer/DetailDrawer.d.ts.map +1 -0
  25. package/dist/components/generic/EmptyState/EmptyState.d.ts +17 -0
  26. package/dist/components/generic/EmptyState/EmptyState.d.ts.map +1 -0
  27. package/dist/components/generic/ListRow/ListRow.d.ts +33 -0
  28. package/dist/components/generic/ListRow/ListRow.d.ts.map +1 -0
  29. package/dist/components/generic/Percent/Percent.d.ts +9 -0
  30. package/dist/components/generic/Percent/Percent.d.ts.map +1 -0
  31. package/dist/components/generic/SearchInput/SearchInput.d.ts +16 -0
  32. package/dist/components/generic/SearchInput/SearchInput.d.ts.map +1 -0
  33. package/dist/components/generic/StatCard/StatCard.d.ts +19 -0
  34. package/dist/components/generic/StatCard/StatCard.d.ts.map +1 -0
  35. package/dist/components/generic/StatusBadge/StatusBadge.d.ts +11 -0
  36. package/dist/components/generic/StatusBadge/StatusBadge.d.ts.map +1 -0
  37. package/dist/components/layout/AppHeader/AppHeader.d.ts.map +1 -0
  38. package/dist/components/layout/PageHeader/PageHeader.d.ts.map +1 -0
  39. package/dist/components/layout/SideNav/SideNav.d.ts.map +1 -0
  40. package/dist/components/layout/UserMenu/UserMenu.d.ts.map +1 -0
  41. package/dist/components/primitives/ActionIcon/ActionIcon.d.ts +6 -0
  42. package/dist/components/primitives/ActionIcon/ActionIcon.d.ts.map +1 -0
  43. package/dist/components/primitives/Alert/Alert.d.ts +5 -0
  44. package/dist/components/primitives/Alert/Alert.d.ts.map +1 -0
  45. package/dist/components/primitives/Avatar/Avatar.d.ts +5 -0
  46. package/dist/components/primitives/Avatar/Avatar.d.ts.map +1 -0
  47. package/dist/components/primitives/Badge/Badge.d.ts +5 -0
  48. package/dist/components/primitives/Badge/Badge.d.ts.map +1 -0
  49. package/dist/components/primitives/Button/Button.d.ts +6 -0
  50. package/dist/components/primitives/Button/Button.d.ts.map +1 -0
  51. package/dist/components/primitives/Card/Card.d.ts +5 -0
  52. package/dist/components/primitives/Card/Card.d.ts.map +1 -0
  53. package/dist/components/primitives/Checkbox/Checkbox.d.ts +5 -0
  54. package/dist/components/primitives/Checkbox/Checkbox.d.ts.map +1 -0
  55. package/dist/components/primitives/Drawer/Drawer.d.ts +5 -0
  56. package/dist/components/primitives/Drawer/Drawer.d.ts.map +1 -0
  57. package/dist/components/primitives/Menu/Menu.d.ts +54 -0
  58. package/dist/components/primitives/Menu/Menu.d.ts.map +1 -0
  59. package/dist/components/primitives/Modal/Modal.d.ts +5 -0
  60. package/dist/components/primitives/Modal/Modal.d.ts.map +1 -0
  61. package/dist/components/primitives/PasswordInput/PasswordInput.d.ts +5 -0
  62. package/dist/components/primitives/PasswordInput/PasswordInput.d.ts.map +1 -0
  63. package/dist/components/primitives/Select/Select.d.ts +5 -0
  64. package/dist/components/primitives/Select/Select.d.ts.map +1 -0
  65. package/dist/components/primitives/Skeleton/Skeleton.d.ts +5 -0
  66. package/dist/components/primitives/Skeleton/Skeleton.d.ts.map +1 -0
  67. package/dist/components/primitives/Switch/Switch.d.ts +5 -0
  68. package/dist/components/primitives/Switch/Switch.d.ts.map +1 -0
  69. package/dist/components/primitives/Table/Table.d.ts +50 -0
  70. package/dist/components/primitives/Table/Table.d.ts.map +1 -0
  71. package/dist/components/primitives/Tabs/Tabs.d.ts +26 -0
  72. package/dist/components/primitives/Tabs/Tabs.d.ts.map +1 -0
  73. package/dist/components/primitives/TextInput/TextInput.d.ts +5 -0
  74. package/dist/components/primitives/TextInput/TextInput.d.ts.map +1 -0
  75. package/dist/components/primitives/Tooltip/Tooltip.d.ts +5 -0
  76. package/dist/components/primitives/Tooltip/Tooltip.d.ts.map +1 -0
  77. package/dist/components/primitives/layout.d.ts +3 -0
  78. package/dist/components/primitives/layout.d.ts.map +1 -0
  79. package/dist/components/specific/DocumentRow/DocumentRow.d.ts +17 -0
  80. package/dist/components/specific/DocumentRow/DocumentRow.d.ts.map +1 -0
  81. package/dist/components/specific/EquityGrantCard/EquityGrantCard.d.ts +23 -0
  82. package/dist/components/specific/EquityGrantCard/EquityGrantCard.d.ts.map +1 -0
  83. package/dist/components/specific/InvestmentCard/InvestmentCard.d.ts +19 -0
  84. package/dist/components/specific/InvestmentCard/InvestmentCard.d.ts.map +1 -0
  85. package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.d.ts +15 -0
  86. package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.d.ts.map +1 -0
  87. package/dist/fairmint-ui.cjs +25068 -240
  88. package/dist/fairmint-ui.cjs.map +1 -1
  89. package/dist/fairmint-ui.js +25047 -235
  90. package/dist/fairmint-ui.js.map +1 -1
  91. package/dist/hooks/index.d.ts +4 -0
  92. package/dist/hooks/index.d.ts.map +1 -0
  93. package/dist/hooks/useDebouncedCallback.d.ts +6 -0
  94. package/dist/hooks/useDebouncedCallback.d.ts.map +1 -0
  95. package/dist/hooks/useForm.d.ts +8 -0
  96. package/dist/hooks/useForm.d.ts.map +1 -0
  97. package/dist/hooks/useIsMobile.d.ts +6 -0
  98. package/dist/hooks/useIsMobile.d.ts.map +1 -0
  99. package/dist/index.d.ts +78 -9
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/notify.d.ts +23 -0
  102. package/dist/notify.d.ts.map +1 -0
  103. package/dist/styles.css +69 -0
  104. package/dist/theme/colors.d.ts +37 -0
  105. package/dist/theme/colors.d.ts.map +1 -0
  106. package/dist/theme/index.d.ts +8 -6
  107. package/dist/theme/index.d.ts.map +1 -1
  108. package/dist/utils/address.d.ts +10 -0
  109. package/dist/utils/address.d.ts.map +1 -0
  110. package/dist/utils/avatar.d.ts +9 -0
  111. package/dist/utils/avatar.d.ts.map +1 -0
  112. package/dist/utils/format.d.ts +62 -0
  113. package/dist/utils/format.d.ts.map +1 -0
  114. package/dist/utils/index.d.ts +4 -0
  115. package/dist/utils/index.d.ts.map +1 -0
  116. package/package.json +8 -5
  117. package/dist/components/AppHeader/AppHeader.d.ts.map +0 -1
  118. package/dist/components/PageHeader/PageHeader.d.ts.map +0 -1
  119. package/dist/components/SideNav/SideNav.d.ts.map +0 -1
  120. package/dist/components/UserMenu/UserMenu.d.ts.map +0 -1
  121. /package/dist/components/{AppHeader → layout/AppHeader}/AppHeader.d.ts +0 -0
  122. /package/dist/components/{PageHeader → layout/PageHeader}/PageHeader.d.ts +0 -0
  123. /package/dist/components/{SideNav → layout/SideNav}/SideNav.d.ts +0 -0
  124. /package/dist/components/{UserMenu → layout/UserMenu}/UserMenu.d.ts +0 -0
@@ -0,0 +1,4 @@
1
+ export { useDebouncedCallback } from './useDebouncedCallback';
2
+ export { useForm } from './useForm';
3
+ export { MOBILE_BREAKPOINT, useIsMobile } from './useIsMobile';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns a debounced version of `fn` that delays invocation by `delay` ms.
3
+ * The debounced function is stable across renders (same reference).
4
+ */
5
+ export declare function useDebouncedCallback<T extends (...args: Parameters<T>) => void>(fn: T, delay: number): (...args: Parameters<T>) => void;
6
+ //# sourceMappingURL=useDebouncedCallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDebouncedCallback.d.ts","sourceRoot":"","sources":["../../src/hooks/useDebouncedCallback.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,EAC7E,EAAE,EAAE,CAAC,EACL,KAAK,EAAE,MAAM,GACZ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAoBlC"}
@@ -0,0 +1,8 @@
1
+ import { UseFormReturnType } from '@mantine/form';
2
+ import { z } from 'zod';
3
+ export declare function useForm<T extends z.ZodType>(options: {
4
+ schema: T;
5
+ initialValues: z.infer<T>;
6
+ validateInputOnBlur?: boolean;
7
+ }): UseFormReturnType<z.infer<T>>;
8
+ //# sourceMappingURL=useForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../src/hooks/useForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAA6B,MAAM,eAAe,CAAC;AAElF,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,wBAAgB,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE;IACpD,MAAM,EAAE,CAAC,CAAC;IACV,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,GAAG,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAOhC"}
@@ -0,0 +1,6 @@
1
+ export declare const MOBILE_BREAKPOINT = "(max-width: 48em)";
2
+ /**
3
+ * Returns true when the viewport is below the Fairmint `sm` breakpoint (48em / 768px).
4
+ */
5
+ export declare function useIsMobile(): boolean;
6
+ //# sourceMappingURL=useIsMobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsMobile.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsMobile.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAMrC"}
package/dist/index.d.ts CHANGED
@@ -1,18 +1,87 @@
1
- export type { AppHeaderProps } from './components/AppHeader/AppHeader';
2
- export { AppHeader } from './components/AppHeader/AppHeader';
3
1
  export type { ErrorFallbackProps } from './components/ErrorFallback/ErrorFallback';
4
2
  export { ErrorFallback } from './components/ErrorFallback/ErrorFallback';
5
3
  export type { FairmintLogoProps } from './components/FairmintLogo/FairmintLogo';
6
4
  export { FairmintLogo } from './components/FairmintLogo/FairmintLogo';
7
5
  export type { FairmintProviderProps } from './components/FairmintProvider/FairmintProvider';
8
6
  export { FairmintProvider } from './components/FairmintProvider/FairmintProvider';
7
+ export type { EmailFieldProps } from './components/form/EmailField';
8
+ export { EmailField, emailSchema } from './components/form/EmailField';
9
+ export type { FormProps } from './components/form/Form';
10
+ export { Form } from './components/form/Form';
11
+ export type { FormFieldProps } from './components/form/FormField';
12
+ export { FormField } from './components/form/FormField';
13
+ export type { PasswordFieldProps } from './components/form/PasswordField';
14
+ export { PasswordField, passwordSchema } from './components/form/PasswordField';
15
+ export type { PhoneFieldProps } from './components/form/PhoneField';
16
+ export { PhoneField, phoneSchema } from './components/form/PhoneField';
17
+ export type { AnimateInDirection, AnimateInProps } from './components/generic/AnimateIn/AnimateIn';
18
+ export { AnimateIn } from './components/generic/AnimateIn/AnimateIn';
19
+ export type { ConfirmDialogProps } from './components/generic/ConfirmDialog/ConfirmDialog';
20
+ export { ConfirmDialog } from './components/generic/ConfirmDialog/ConfirmDialog';
21
+ export type { CurrencyProps } from './components/generic/Currency/Currency';
22
+ export { Currency } from './components/generic/Currency/Currency';
23
+ export type { DataTableColumn, DataTableProps } from './components/generic/DataTable/DataTable';
24
+ export { DataTable } from './components/generic/DataTable/DataTable';
25
+ export type { DateDisplayProps } from './components/generic/DateDisplay/DateDisplay';
26
+ export { DateDisplay } from './components/generic/DateDisplay/DateDisplay';
27
+ export type { DetailDrawerProps } from './components/generic/DetailDrawer/DetailDrawer';
28
+ export { DetailDrawer } from './components/generic/DetailDrawer/DetailDrawer';
29
+ export type { EmptyStateProps } from './components/generic/EmptyState/EmptyState';
30
+ export { EmptyState } from './components/generic/EmptyState/EmptyState';
31
+ export type { ListRowProps } from './components/generic/ListRow/ListRow';
32
+ export { ListRow } from './components/generic/ListRow/ListRow';
33
+ export type { PercentProps } from './components/generic/Percent/Percent';
34
+ export { Percent } from './components/generic/Percent/Percent';
35
+ export type { SearchInputProps } from './components/generic/SearchInput/SearchInput';
36
+ export { SearchInput } from './components/generic/SearchInput/SearchInput';
37
+ export type { StatCardProps } from './components/generic/StatCard/StatCard';
38
+ export { StatCard } from './components/generic/StatCard/StatCard';
39
+ export type { StatusBadgeProps } from './components/generic/StatusBadge/StatusBadge';
40
+ export { StatusBadge } from './components/generic/StatusBadge/StatusBadge';
9
41
  export type { LoadingSpinnerProps } from './components/LoadingSpinner/LoadingSpinner';
10
42
  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';
43
+ export type { AppHeaderProps } from './components/layout/AppHeader/AppHeader';
44
+ export { AppHeader } from './components/layout/AppHeader/AppHeader';
45
+ export type { PageHeaderProps } from './components/layout/PageHeader/PageHeader';
46
+ export { PageHeader } from './components/layout/PageHeader/PageHeader';
47
+ export type { SideNavItem, SideNavProps } from './components/layout/SideNav/SideNav';
48
+ export { SideNav } from './components/layout/SideNav/SideNav';
49
+ export type { UserMenuItem, UserMenuProps } from './components/layout/UserMenu/UserMenu';
50
+ export { UserMenu } from './components/layout/UserMenu/UserMenu';
51
+ export { ActionIcon } from './components/primitives/ActionIcon/ActionIcon';
52
+ export { Alert } from './components/primitives/Alert/Alert';
53
+ export { Avatar } from './components/primitives/Avatar/Avatar';
54
+ export { Badge } from './components/primitives/Badge/Badge';
55
+ export { Button, type ButtonProps } from './components/primitives/Button/Button';
56
+ export { Card } from './components/primitives/Card/Card';
57
+ export { Checkbox } from './components/primitives/Checkbox/Checkbox';
58
+ export { Drawer } from './components/primitives/Drawer/Drawer';
59
+ export { Anchor, Box, Center, Collapse, Container, Divider, Flex, Grid, Group, Paper, ScrollArea, SimpleGrid, Space, Stack, Text, Title, useClickOutside, useClipboard, useDebouncedValue, useDisclosure, useHotkeys, useId, useIntersection, useMediaQuery, useScrollIntoView, useViewportSize, } from './components/primitives/layout';
60
+ export { Menu } from './components/primitives/Menu/Menu';
61
+ export { Modal } from './components/primitives/Modal/Modal';
62
+ export { PasswordInput } from './components/primitives/PasswordInput/PasswordInput';
63
+ export { Select } from './components/primitives/Select/Select';
64
+ export { Skeleton } from './components/primitives/Skeleton/Skeleton';
65
+ export { Switch } from './components/primitives/Switch/Switch';
66
+ export { Table } from './components/primitives/Table/Table';
67
+ export { Tabs } from './components/primitives/Tabs/Tabs';
68
+ export { TextInput } from './components/primitives/TextInput/TextInput';
69
+ export { Tooltip } from './components/primitives/Tooltip/Tooltip';
70
+ export type { DocumentRowProps } from './components/specific/DocumentRow/DocumentRow';
71
+ export { DocumentRow } from './components/specific/DocumentRow/DocumentRow';
72
+ export type { EquityGrantCardProps } from './components/specific/EquityGrantCard/EquityGrantCard';
73
+ export { EquityGrantCard } from './components/specific/EquityGrantCard/EquityGrantCard';
74
+ export type { InvestmentCardProps } from './components/specific/InvestmentCard/InvestmentCard';
75
+ export { InvestmentCard } from './components/specific/InvestmentCard/InvestmentCard';
76
+ export type { InvestorProfileCardProps } from './components/specific/InvestorProfileCard/InvestorProfileCard';
77
+ export { InvestorProfileCard } from './components/specific/InvestorProfileCard/InvestorProfileCard';
78
+ export { useDebouncedCallback } from './hooks/useDebouncedCallback';
79
+ export { useForm } from './hooks/useForm';
80
+ export { MOBILE_BREAKPOINT, useIsMobile } from './hooks/useIsMobile';
81
+ export { notify } from './notify';
82
+ export type { AvatarPaletteColor, FairmintColor } from './theme';
83
+ export { AVATAR_PALETTE, brandColors, colors, neutralColors, semanticColors, theme } from './theme';
84
+ export { truncateAddress } from './utils/address';
85
+ export { getAvatarColor } from './utils/avatar';
86
+ export { formatCurrency, formatCurrencyPrecise, formatDate, formatNumber, formatPercent, formatPreciseWithCurrency, } from './utils/format';
18
87
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRo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airmint notification helpers.
8
+ *
9
+ * Uses Mantine's notifications system with Fairmint semantic colors.
10
+ * Requires FairmintProvider to be mounted in the component tree.
11
+ *
12
+ * @example
13
+ * notify.success({ message: "Investment saved." });
14
+ * notify.error({ title: "Error", message: "Failed to load data." });
15
+ */
16
+ export declare const notify: {
17
+ success: ({ title, message, autoClose }: NotifyOptions) => string;
18
+ error: ({ title, message, autoClose }: NotifyOptions) => string;
19
+ warning: ({ title, message, autoClose }: NotifyOptions) => string;
20
+ info: ({ title, message, autoClose }: NotifyOptions) => string;
21
+ };
22
+ export {};
23
+ //# sourceMappingURL=notify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../src/notify.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC5B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;6CAC+B,aAAa;2CAGf,aAAa;6CAGX,aAAa;0CAGhB,aAAa;CAE3D,CAAC"}
package/dist/styles.css CHANGED
@@ -1,3 +1,4 @@
1
+ /* fillUp — used by LoadingSpinner */
1
2
  @keyframes fillUp {
2
3
  0% {
3
4
  clip-path: inset(100% 0 0 0);
@@ -6,3 +7,71 @@
6
7
  clip-path: inset(0 0 0 0);
7
8
  }
8
9
  }
10
+ /* gradientFlow — animated gradient text/background */
11
+ @keyframes gradientFlow {
12
+ 0% {
13
+ background-position: 0% center;
14
+ }
15
+ 50% {
16
+ background-position: 100% center;
17
+ }
18
+ 100% {
19
+ background-position: 0% center;
20
+ }
21
+ }
22
+ /* fadeUp — staggered entrance for list items */
23
+ @keyframes fadeUp {
24
+ from {
25
+ opacity: 0;
26
+ transform: translateY(10px);
27
+ }
28
+ to {
29
+ opacity: 1;
30
+ transform: translateY(0);
31
+ }
32
+ }
33
+ /* breathe — subtle pulsing glow effect */
34
+ @keyframes breathe {
35
+ 0%,
36
+ 100% {
37
+ opacity: 0.6;
38
+ transform: scale(1);
39
+ }
40
+ 50% {
41
+ opacity: 1;
42
+ transform: scale(1.05);
43
+ }
44
+ }
45
+ /* rowSlideIn — list rows slide in from left */
46
+ @keyframes rowSlideIn {
47
+ from {
48
+ opacity: 0;
49
+ transform: translateX(-12px);
50
+ }
51
+ to {
52
+ opacity: 1;
53
+ transform: translateX(0);
54
+ }
55
+ }
56
+ /* rowSlideInRight — list rows slide in from right */
57
+ @keyframes rowSlideInRight {
58
+ from {
59
+ opacity: 0;
60
+ transform: translateX(12px);
61
+ }
62
+ to {
63
+ opacity: 1;
64
+ transform: translateX(0);
65
+ }
66
+ }
67
+ /* fadeDown — entrance from above */
68
+ @keyframes fadeDown {
69
+ from {
70
+ opacity: 0;
71
+ transform: translateY(-10px);
72
+ }
73
+ to {
74
+ opacity: 1;
75
+ transform: translateY(0);
76
+ }
77
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Branded color constants for Fairmint UI.
3
+ * These map to Mantine color names defined in src/theme/index.ts.
4
+ * Import from here instead of hardcoding color name strings.
5
+ */
6
+ export declare const colors: {
7
+ /** Primary UI color — buttons, links, active states. */
8
+ readonly primary: "indigo";
9
+ /** Fairmint brand blue — gradients, brand elements. */
10
+ readonly brandBlue: "fairmintBlue";
11
+ /** Fairmint brand purple — gradients, brand elements. */
12
+ readonly brandPurple: "fairmintPurple";
13
+ /** Positive outcome — completed, approved, active. */
14
+ readonly success: "success";
15
+ /** Caution — pending, processing, review. */
16
+ readonly warning: "warning";
17
+ /** Negative outcome — failed, rejected, cancelled. */
18
+ readonly error: "error";
19
+ /** Informational — neutral status messages. */
20
+ readonly info: "info";
21
+ /** Neutral gray scale — borders, backgrounds, disabled. */
22
+ readonly neutral: "gray";
23
+ /** Accent color 1 for avatar palette. */
24
+ readonly accent1: "teal";
25
+ /** Accent color 2 for avatar palette. */
26
+ readonly accent2: "cyan";
27
+ /** Accent color 3 for avatar palette. */
28
+ readonly accent3: "green";
29
+ };
30
+ export type FairmintColor = (typeof colors)[keyof typeof colors];
31
+ /**
32
+ * Avatar palette for deterministic color assignment.
33
+ * Used by getAvatarColor() to map names to colors.
34
+ */
35
+ export declare const AVATAR_PALETTE: readonly ["indigo", "fairmintBlue", "fairmintPurple", "success", "info", "teal", "cyan", "green"];
36
+ export type AvatarPaletteColor = (typeof AVATAR_PALETTE)[number];
37
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/theme/colors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,MAAM;IACjB,wDAAwD;;IAExD,uDAAuD;;IAEvD,yDAAyD;;IAEzD,sDAAsD;;IAEtD,6CAA6C;;IAE7C,sDAAsD;;IAEtD,+CAA+C;;IAE/C,2DAA2D;;IAE3D,yCAAyC;;IAEzC,yCAAyC;;IAEzC,yCAAyC;;CAEjC,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,cAAc,mGASjB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -71,8 +71,8 @@ export declare const theme: {
71
71
  } | undefined;
72
72
  radius?: {
73
73
  [x: string & {}]: string | undefined;
74
- xs?: string | undefined;
75
74
  sm?: string | undefined;
75
+ xs?: string | undefined;
76
76
  md?: string | undefined;
77
77
  lg?: string | undefined;
78
78
  xl?: string | undefined;
@@ -81,40 +81,40 @@ export declare const theme: {
81
81
  spacing?: {
82
82
  [x: number]: string | undefined;
83
83
  [x: string & {}]: string | undefined;
84
- xs?: string | undefined;
85
84
  sm?: string | undefined;
85
+ xs?: string | undefined;
86
86
  md?: string | undefined;
87
87
  lg?: string | undefined;
88
88
  xl?: string | undefined;
89
89
  } | undefined;
90
90
  fontSizes?: {
91
91
  [x: string & {}]: string | undefined;
92
- xs?: string | undefined;
93
92
  sm?: string | undefined;
93
+ xs?: string | undefined;
94
94
  md?: string | undefined;
95
95
  lg?: string | undefined;
96
96
  xl?: string | undefined;
97
97
  } | undefined;
98
98
  lineHeights?: {
99
99
  [x: string & {}]: string | undefined;
100
- xs?: string | undefined;
101
100
  sm?: string | undefined;
101
+ xs?: string | undefined;
102
102
  md?: string | undefined;
103
103
  lg?: string | undefined;
104
104
  xl?: string | undefined;
105
105
  } | undefined;
106
106
  breakpoints?: {
107
107
  [x: string & {}]: string | undefined;
108
- xs?: string | undefined;
109
108
  sm?: string | undefined;
109
+ xs?: string | undefined;
110
110
  md?: string | undefined;
111
111
  lg?: string | undefined;
112
112
  xl?: string | undefined;
113
113
  } | undefined;
114
114
  shadows?: {
115
115
  [x: string & {}]: string | undefined;
116
- xs?: string | undefined;
117
116
  sm?: string | undefined;
117
+ xs?: string | undefined;
118
118
  md?: string | undefined;
119
119
  lg?: string | undefined;
120
120
  xl?: string | undefined;
@@ -167,4 +167,6 @@ export declare const semanticColors: {
167
167
  readonly error: "#F04438";
168
168
  readonly info: "#06AED4";
169
169
  };
170
+ export type { AvatarPaletteColor, FairmintColor } from './colors';
171
+ export { AVATAR_PALETTE, colors } from './colors';
170
172
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAiIrE,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEhB,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,iGAAiG;AACjG,eAAO,MAAM,aAAa;;;;;;;;;;;CAWhB,CAAC;AAEX,gDAAgD;AAChD,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAiIrE,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEhB,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,iGAAiG;AACjG,eAAO,MAAM,aAAa;;;;;;;;;;;CAWhB,CAAC;AAEX,gDAAgD;AAChD,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Truncate a wallet address to "0x1234...5678" format.
3
+ *
4
+ * @param address - Full address string (e.g., "0x1234567890abcdef...")
5
+ * @param chars - Characters to show on each side. @default 4
6
+ * @example truncateAddress("0x1234567890abcdef1234") → "0x1234...1234"
7
+ * @example truncateAddress("0x1234567890abcdef1234", 6) → "0x123456...ef1234"
8
+ */
9
+ export declare function truncateAddress(address: string, chars?: number): string;
10
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/utils/address.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,CAGlE"}
@@ -0,0 +1,9 @@
1
+ import { AvatarPaletteColor } from '../theme/colors';
2
+ /**
3
+ * Deterministically map a string (e.g., company name) to a Mantine color name.
4
+ *
5
+ * @example getAvatarColor("Acme Corp") → "teal"
6
+ * @example getAvatarColor("") → colors.primary (fallback)
7
+ */
8
+ export declare function getAvatarColor(name: string): AvatarPaletteColor;
9
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/utils/avatar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1E;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAO/D"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Shared formatting utilities.
3
+ *
4
+ * Reusable across features — currency, number, and date formatting
5
+ * using the Intl API for locale-aware output.
6
+ */
7
+ /**
8
+ * Format a number as USD currency (no cents).
9
+ *
10
+ * @example formatCurrency(125000) → "$125,000"
11
+ */
12
+ export declare function formatCurrency(n: number): string;
13
+ /**
14
+ * Format a number as USD currency with up to 2 decimal places.
15
+ * Useful for per-share prices and exercise prices where cents matter.
16
+ * For sub-penny values (< $0.01), uses up to 6 decimal places to
17
+ * avoid showing "$0.00" for values like $0.0001.
18
+ *
19
+ * @example formatCurrencyPrecise(0.01) → "$0.01"
20
+ * @example formatCurrencyPrecise(12.50) → "$12.50"
21
+ * @example formatCurrencyPrecise(100) → "$100.00"
22
+ * @example formatCurrencyPrecise(0.0001) → "$0.0001"
23
+ * @example formatCurrencyPrecise(0.000001) → "$0.000001"
24
+ */
25
+ export declare function formatCurrencyPrecise(n: number): string;
26
+ /**
27
+ * Format a number as currency with the correct symbol for any currency code.
28
+ * Uses sub-penny precision for values < $0.01, same as formatCurrencyPrecise.
29
+ *
30
+ * @example formatPreciseWithCurrency(1.50, 'USD') → "$1.50"
31
+ * @example formatPreciseWithCurrency(1.50, 'EUR') → "€1.50"
32
+ * @example formatPreciseWithCurrency(0.0001, 'USD') → "$0.0001"
33
+ */
34
+ export declare function formatPreciseWithCurrency(n: number, currency: string): string;
35
+ /**
36
+ * Format a number with locale-aware comma separators.
37
+ *
38
+ * @example formatNumber(1234567) → "1,234,567"
39
+ */
40
+ export declare function formatNumber(n: number): string;
41
+ /**
42
+ * Format an ISO date string for display.
43
+ *
44
+ * Handles both full ISO timestamps and date-only strings (YYYY-MM-DD).
45
+ * Date-only strings are parsed as local time to avoid the classic
46
+ * off-by-one timezone bug where UTC midnight shifts to the previous
47
+ * day in western timezones.
48
+ *
49
+ * @example formatDate("2024-01-15T00:00:00.000Z") → "Jan 15, 2024"
50
+ * @example formatDate("2024-01-15") → "Jan 15, 2024"
51
+ */
52
+ export declare function formatDate(dateString: string): string;
53
+ /**
54
+ * Format a number as a percentage string.
55
+ *
56
+ * @param n - The decimal value (e.g., 12.5 for 12.5%)
57
+ * @param decimals - Number of decimal places. @default 2
58
+ * @example formatPercent(12.5) → "12.50%"
59
+ * @example formatPercent(0.5, 1) → "0.5%"
60
+ */
61
+ export declare function formatPercent(n: number, decimals?: number): string;
62
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAOhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAQvD;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY7E;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAarD;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,SAAI,GAAG,MAAM,CAE7D"}
@@ -0,0 +1,4 @@
1
+ export * from './address';
2
+ export * from './avatar';
3
+ export * from './format';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairmint/ui",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "Fairmint design system and UI component library",
6
6
  "license": "UNLICENSED",
@@ -39,7 +39,11 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@mantine/core": "~8.3.0",
42
- "@mantine/hooks": "~8.3.0"
42
+ "@mantine/form": "~8.3.0",
43
+ "@mantine/hooks": "~8.3.0",
44
+ "@mantine/notifications": "~8.3.0",
45
+ "mantine-form-zod-resolver": "1.3.0",
46
+ "zod": "3.25.3"
43
47
  },
44
48
  "scripts": {
45
49
  "dev": "storybook dev -p 6006",
@@ -55,14 +59,13 @@
55
59
  "prepublishOnly": "bun run build"
56
60
  },
57
61
  "peerDependencies": {
58
- "@mantine/core": "~8.3.0",
59
- "@mantine/hooks": "~8.3.0",
60
62
  "react": "^19.0.0",
61
63
  "react-dom": "^19.0.0"
62
64
  },
63
65
  "devDependencies": {
64
66
  "@biomejs/biome": "2.4.5",
65
67
  "@storybook/addon-a11y": "10.2.13",
68
+ "@storybook/addon-docs": "10.2.13",
66
69
  "@storybook/react": "10.2.13",
67
70
  "@storybook/react-vite": "10.2.13",
68
71
  "@tabler/icons-react": "3.37.1",
@@ -75,8 +78,8 @@
75
78
  "@types/react-dom": "19.2.3",
76
79
  "@vitejs/plugin-react": "5.1.4",
77
80
  "@vitest/coverage-v8": "4.0.18",
78
- "jsdom": "28.1.0",
79
81
  "husky": "9.1.7",
82
+ "jsdom": "28.1.0",
80
83
  "react": "19.2.4",
81
84
  "react-dom": "19.2.4",
82
85
  "storybook": "10.2.13",
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AppHeader/AppHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,IAAI,EAAE,SAAS,CAAC;IAChB,kDAAkD;IAClD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,yDAAyD;IACzD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,YAAY,EACZ,eAAuB,EACvB,iBAAiB,EACjB,MAAW,GACZ,EAAE,cAAc,2CAkBhB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/PageHeader/PageHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,eAAe,2CActE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,kCAAkC;IAClC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,qEAAqE;IACrE,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAgB,EAAE,EAAE,YAAY,2CA0B7E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserMenu.d.ts","sourceRoot":"","sources":["../../../src/components/UserMenu/UserMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2GAA2G;IAC3G,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,kBAAkB;IAClB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,sEAAsE;IACtE,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,aAAa,EACb,WAAsB,EACtB,SAAS,EACT,KAAK,EACL,WAAW,GACZ,EAAE,aAAa,2CAsCf"}