@fairmint/ui 0.3.39 → 0.3.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
- const _commonjsHelpers = require("./_commonjsHelpers.cjs");
3
- const index = require("../node_modules/fast-deep-equal/index.cjs");
4
- var fastDeepEqualExports = index.__require();
5
- const isEqual = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(fastDeepEqualExports);
6
- module.exports = isEqual;
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ var propTypes = { exports: {} };
4
+ exports.__module = propTypes;
7
5
  //# sourceMappingURL=index3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"index3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,8 +1,5 @@
1
- import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
2
- import { __require as requireFastDeepEqual } from "../node_modules/fast-deep-equal/index.js";
3
- var fastDeepEqualExports = requireFastDeepEqual();
4
- const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqualExports);
1
+ var propTypes = { exports: {} };
5
2
  export {
6
- isEqual as default
3
+ propTypes as __module
7
4
  };
8
5
  //# sourceMappingURL=index3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var propTypes = { exports: {} };
4
- exports.__module = propTypes;
2
+ const _commonjsHelpers = require("./_commonjsHelpers.cjs");
3
+ const index = require("../node_modules/fast-deep-equal/index.cjs");
4
+ var fastDeepEqualExports = index.__require();
5
+ const isEqual = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(fastDeepEqualExports);
6
+ module.exports = isEqual;
5
7
  //# sourceMappingURL=index4.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index4.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index4.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,5 +1,8 @@
1
- var propTypes = { exports: {} };
1
+ import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
2
+ import { __require as requireFastDeepEqual } from "../node_modules/fast-deep-equal/index.js";
3
+ var fastDeepEqualExports = requireFastDeepEqual();
4
+ const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqualExports);
2
5
  export {
3
- propTypes as __module
6
+ isEqual as default
4
7
  };
5
8
  //# sourceMappingURL=index4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,13 +1,42 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const index = require("../../../theme/index.cjs");
5
4
  const colors = require("../../../theme/colors.cjs");
5
+ const Avatar = require("../../primitives/Avatar/Avatar.cjs");
6
6
  const Button = require("../../primitives/Button/Button.cjs");
7
7
  const layout = require("../../primitives/layout.cjs");
8
- const Title = require("../../../node_modules/@mantine/core/esm/components/Title/Title.cjs");
9
8
  const Text = require("../../../node_modules/@mantine/core/esm/components/Text/Text.cjs");
9
+ const EMPTY_STATE_AVATAR_SIZE = 56;
10
+ const EMPTY_STATE_ICON_SIZE = 28;
11
+ function EmptyStateAvatar({ avatar, icon }) {
12
+ if (avatar) {
13
+ return avatar;
14
+ }
15
+ if (!icon) {
16
+ return null;
17
+ }
18
+ return /* @__PURE__ */ jsxRuntime.jsx(
19
+ Avatar.Avatar,
20
+ {
21
+ "aria-hidden": true,
22
+ color: colors.colors.neutral,
23
+ radius: "xl",
24
+ size: EMPTY_STATE_AVATAR_SIZE,
25
+ styles: {
26
+ root: {
27
+ "& svg": {
28
+ height: EMPTY_STATE_ICON_SIZE,
29
+ width: EMPTY_STATE_ICON_SIZE
30
+ }
31
+ }
32
+ },
33
+ variant: "light",
34
+ children: icon
35
+ }
36
+ );
37
+ }
10
38
  function EmptyState({
39
+ avatar,
11
40
  icon,
12
41
  title,
13
42
  description,
@@ -16,10 +45,10 @@ function EmptyState({
16
45
  actionColor = colors.colors.primary
17
46
  }) {
18
47
  return /* @__PURE__ */ jsxRuntime.jsxs(layout.Stack, { align: "center", gap: "md", py: "xl", role: "status", children: [
19
- icon && /* @__PURE__ */ jsxRuntime.jsx(layout.Box, { c: index.fairmintVars.colorTextSecondary, fz: "2.5rem", children: icon }),
20
- /* @__PURE__ */ jsxRuntime.jsx(Title.Title, { order: 4, ta: "center", children: title }),
21
- description && /* @__PURE__ */ jsxRuntime.jsx(Text.Text, { c: index.fairmintVars.colorTextSecondary, size: "sm", ta: "center", maw: 360, children: description }),
22
- actionLabel && onAction && /* @__PURE__ */ jsxRuntime.jsx(Button.Button, { variant: "light", color: actionColor, onClick: onAction, children: actionLabel })
48
+ /* @__PURE__ */ jsxRuntime.jsx(EmptyStateAvatar, { avatar, icon }),
49
+ /* @__PURE__ */ jsxRuntime.jsx(Text.Text, { fw: 500, size: "lg", ta: "center", children: title }),
50
+ description && /* @__PURE__ */ jsxRuntime.jsx(Text.Text, { c: "dimmed", maw: 360, size: "sm", ta: "center", children: description }),
51
+ actionLabel && onAction && /* @__PURE__ */ jsxRuntime.jsx(Button.Button, { color: actionColor, onClick: onAction, variant: "light", children: actionLabel })
23
52
  ] });
24
53
  }
25
54
  exports.EmptyState = EmptyState;
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.cjs","sources":["../../../../src/components/generic/EmptyState/EmptyState.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { fairmintVars } from \"../../../theme\";\nimport { colors } from \"../../../theme/colors\";\nimport { Button } from \"../../primitives/Button/Button\";\nimport { Box, Stack, Text, Title } from \"../../primitives/layout\";\n\nexport interface EmptyStateProps {\n /** Icon element (ReactNode — use any icon library). */\n icon?: ReactNode;\n /** Primary heading. */\n title: ReactNode;\n /** Supporting description. */\n description?: ReactNode;\n /** CTA button label. If provided, `onAction` is required. */\n actionLabel?: string;\n /** CTA button callback. */\n onAction?: () => void;\n /** CTA button color. @default colors.primary */\n actionColor?: string;\n}\n\nexport function EmptyState({\n icon,\n title,\n description,\n actionLabel,\n onAction,\n actionColor = colors.primary,\n}: EmptyStateProps) {\n return (\n <Stack align=\"center\" gap=\"md\" py=\"xl\" role=\"status\">\n {icon && (\n <Box c={fairmintVars.colorTextSecondary} fz=\"2.5rem\">\n {icon}\n </Box>\n )}\n <Title order={4} ta=\"center\">\n {title}\n </Title>\n {description && (\n <Text c={fairmintVars.colorTextSecondary} size=\"sm\" ta=\"center\" maw={360}>\n {description}\n </Text>\n )}\n {actionLabel && onAction && (\n <Button variant=\"light\" color={actionColor} onClick={onAction}>\n {actionLabel}\n </Button>\n )}\n </Stack>\n );\n}\n"],"names":["colors","jsxs","Stack","Box","fairmintVars","Title","jsx","Text","Button"],"mappings":";;;;;;;;;AAqBO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAcA,OAAAA,OAAO;AACvB,GAAoB;AAClB,SACEC,gCAACC,OAAAA,SAAM,OAAM,UAAS,KAAI,MAAK,IAAG,MAAK,MAAK,UACzC,UAAA;AAAA,IAAA,uCACEC,YAAA,EAAI,GAAGC,MAAAA,aAAa,oBAAoB,IAAG,UACzC,UAAA,KAAA,CACH;AAAA,mCAEDC,MAAAA,OAAA,EAAM,OAAO,GAAG,IAAG,UACjB,UAAA,OACH;AAAA,IACC,eACCC,2BAAAA,IAACC,KAAAA,MAAA,EAAK,GAAGH,MAAAA,aAAa,oBAAoB,MAAK,MAAK,IAAG,UAAS,KAAK,KAClE,UAAA,aACH;AAAA,IAED,eAAe,YACdE,2BAAAA,IAACE,OAAAA,QAAA,EAAO,SAAQ,SAAQ,OAAO,aAAa,SAAS,UAClD,UAAA,YAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;;"}
1
+ {"version":3,"file":"EmptyState.cjs","sources":["../../../../src/components/generic/EmptyState/EmptyState.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { colors } from \"../../../theme/colors\";\nimport { Avatar } from \"../../primitives/Avatar/Avatar\";\nimport { Button } from \"../../primitives/Button/Button\";\nimport { Stack, Text } from \"../../primitives/layout\";\n\nconst EMPTY_STATE_AVATAR_SIZE = 56;\nconst EMPTY_STATE_ICON_SIZE = 28;\n\nexport interface EmptyStateProps {\n /**\n * Fully composed avatar (photo, initials, or custom node). Takes precedence\n * over `icon`. Use this when the empty state represents a person or entity.\n */\n avatar?: ReactNode;\n /**\n * Icon glyph (e.g. from `@tabler/icons-react`). Wrapped in the canonical\n * empty-state Avatar: 56px, light gray, circular.\n */\n icon?: ReactNode;\n /** Primary heading. */\n title: ReactNode;\n /** Supporting description. */\n description?: ReactNode;\n /** CTA button label. Rendered only when `onAction` is also provided. */\n actionLabel?: string;\n /** CTA button callback. The CTA is omitted unless this is set. */\n onAction?: () => void;\n /** CTA button color. @default colors.primary */\n actionColor?: string;\n}\n\nfunction EmptyStateAvatar({ avatar, icon }: Pick<EmptyStateProps, \"avatar\" | \"icon\">) {\n if (avatar) {\n return avatar;\n }\n if (!icon) {\n return null;\n }\n return (\n <Avatar\n aria-hidden\n color={colors.neutral}\n radius=\"xl\"\n size={EMPTY_STATE_AVATAR_SIZE}\n styles={{\n root: {\n \"& svg\": {\n height: EMPTY_STATE_ICON_SIZE,\n width: EMPTY_STATE_ICON_SIZE,\n },\n },\n }}\n variant=\"light\"\n >\n {icon}\n </Avatar>\n );\n}\n\nexport function EmptyState({\n avatar,\n icon,\n title,\n description,\n actionLabel,\n onAction,\n actionColor = colors.primary,\n}: EmptyStateProps) {\n return (\n <Stack align=\"center\" gap=\"md\" py=\"xl\" role=\"status\">\n <EmptyStateAvatar avatar={avatar} icon={icon} />\n <Text fw={500} size=\"lg\" ta=\"center\">\n {title}\n </Text>\n {description && (\n <Text c=\"dimmed\" maw={360} size=\"sm\" ta=\"center\">\n {description}\n </Text>\n )}\n {actionLabel && onAction && (\n <Button color={actionColor} onClick={onAction} variant=\"light\">\n {actionLabel}\n </Button>\n )}\n </Stack>\n );\n}\n"],"names":["jsx","Avatar","colors","jsxs","Stack","Text","Button"],"mappings":";;;;;;;;AAMA,MAAM,0BAA0B;AAChC,MAAM,wBAAwB;AAyB9B,SAAS,iBAAiB,EAAE,QAAQ,QAAkD;AACpF,MAAI,QAAQ;AACV,WAAO;AAAA,EACT;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,SACEA,2BAAAA;AAAAA,IAACC,OAAAA;AAAAA,IAAA;AAAA,MACC,eAAW;AAAA,MACX,OAAOC,OAAAA,OAAO;AAAA,MACd,QAAO;AAAA,MACP,MAAM;AAAA,MACN,QAAQ;AAAA,QACN,MAAM;AAAA,UACJ,SAAS;AAAA,YACP,QAAQ;AAAA,YACR,OAAO;AAAA,UAAA;AAAA,QACT;AAAA,MACF;AAAA,MAEF,SAAQ;AAAA,MAEP,UAAA;AAAA,IAAA;AAAA,EAAA;AAGP;AAEO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAcA,OAAAA,OAAO;AACvB,GAAoB;AAClB,SACEC,gCAACC,OAAAA,SAAM,OAAM,UAAS,KAAI,MAAK,IAAG,MAAK,MAAK,UAC1C,UAAA;AAAA,IAAAJ,2BAAAA,IAAC,kBAAA,EAAiB,QAAgB,KAAA,CAAY;AAAA,IAC9CA,2BAAAA,IAACK,KAAAA,QAAK,IAAI,KAAK,MAAK,MAAK,IAAG,UACzB,UAAA,MAAA,CACH;AAAA,IACC,eACCL,2BAAAA,IAACK,KAAAA,MAAA,EAAK,GAAE,UAAS,KAAK,KAAK,MAAK,MAAK,IAAG,UACrC,UAAA,YAAA,CACH;AAAA,IAED,eAAe,YACdL,2BAAAA,IAACM,OAAAA,QAAA,EAAO,OAAO,aAAa,SAAS,UAAU,SAAQ,SACpD,UAAA,YAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;;"}
@@ -1,17 +1,25 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface EmptyStateProps {
3
- /** Icon element (ReactNode — use any icon library). */
3
+ /**
4
+ * Fully composed avatar (photo, initials, or custom node). Takes precedence
5
+ * over `icon`. Use this when the empty state represents a person or entity.
6
+ */
7
+ avatar?: ReactNode;
8
+ /**
9
+ * Icon glyph (e.g. from `@tabler/icons-react`). Wrapped in the canonical
10
+ * empty-state Avatar: 56px, light gray, circular.
11
+ */
4
12
  icon?: ReactNode;
5
13
  /** Primary heading. */
6
14
  title: ReactNode;
7
15
  /** Supporting description. */
8
16
  description?: ReactNode;
9
- /** CTA button label. If provided, `onAction` is required. */
17
+ /** CTA button label. Rendered only when `onAction` is also provided. */
10
18
  actionLabel?: string;
11
- /** CTA button callback. */
19
+ /** CTA button callback. The CTA is omitted unless this is set. */
12
20
  onAction?: () => void;
13
21
  /** CTA button color. @default colors.primary */
14
22
  actionColor?: string;
15
23
  }
16
- export declare function EmptyState({ icon, title, description, actionLabel, onAction, actionColor, }: EmptyStateProps): import("react").JSX.Element;
24
+ export declare function EmptyState({ avatar, icon, title, description, actionLabel, onAction, actionColor, }: EmptyStateProps): import("react").JSX.Element;
17
25
  //# sourceMappingURL=EmptyState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../../src/components/generic/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uBAAuB;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,WAA4B,GAC7B,EAAE,eAAe,+BAuBjB"}
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../../src/components/generic/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uBAAuB;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA8BD,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,WAA4B,GAC7B,EAAE,eAAe,+BAmBjB"}
@@ -1,11 +1,40 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { fairmintVars } from "../../../theme/index.js";
3
2
  import { colors } from "../../../theme/colors.js";
3
+ import { Avatar } from "../../primitives/Avatar/Avatar.js";
4
4
  import { Button } from "../../primitives/Button/Button.js";
5
- import { Stack, Box } from "../../primitives/layout.js";
6
- import { Title } from "../../../node_modules/@mantine/core/esm/components/Title/Title.js";
5
+ import { Stack } from "../../primitives/layout.js";
7
6
  import { Text } from "../../../node_modules/@mantine/core/esm/components/Text/Text.js";
7
+ const EMPTY_STATE_AVATAR_SIZE = 56;
8
+ const EMPTY_STATE_ICON_SIZE = 28;
9
+ function EmptyStateAvatar({ avatar, icon }) {
10
+ if (avatar) {
11
+ return avatar;
12
+ }
13
+ if (!icon) {
14
+ return null;
15
+ }
16
+ return /* @__PURE__ */ jsx(
17
+ Avatar,
18
+ {
19
+ "aria-hidden": true,
20
+ color: colors.neutral,
21
+ radius: "xl",
22
+ size: EMPTY_STATE_AVATAR_SIZE,
23
+ styles: {
24
+ root: {
25
+ "& svg": {
26
+ height: EMPTY_STATE_ICON_SIZE,
27
+ width: EMPTY_STATE_ICON_SIZE
28
+ }
29
+ }
30
+ },
31
+ variant: "light",
32
+ children: icon
33
+ }
34
+ );
35
+ }
8
36
  function EmptyState({
37
+ avatar,
9
38
  icon,
10
39
  title,
11
40
  description,
@@ -14,10 +43,10 @@ function EmptyState({
14
43
  actionColor = colors.primary
15
44
  }) {
16
45
  return /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "md", py: "xl", role: "status", children: [
17
- icon && /* @__PURE__ */ jsx(Box, { c: fairmintVars.colorTextSecondary, fz: "2.5rem", children: icon }),
18
- /* @__PURE__ */ jsx(Title, { order: 4, ta: "center", children: title }),
19
- description && /* @__PURE__ */ jsx(Text, { c: fairmintVars.colorTextSecondary, size: "sm", ta: "center", maw: 360, children: description }),
20
- actionLabel && onAction && /* @__PURE__ */ jsx(Button, { variant: "light", color: actionColor, onClick: onAction, children: actionLabel })
46
+ /* @__PURE__ */ jsx(EmptyStateAvatar, { avatar, icon }),
47
+ /* @__PURE__ */ jsx(Text, { fw: 500, size: "lg", ta: "center", children: title }),
48
+ description && /* @__PURE__ */ jsx(Text, { c: "dimmed", maw: 360, size: "sm", ta: "center", children: description }),
49
+ actionLabel && onAction && /* @__PURE__ */ jsx(Button, { color: actionColor, onClick: onAction, variant: "light", children: actionLabel })
21
50
  ] });
22
51
  }
23
52
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.js","sources":["../../../../src/components/generic/EmptyState/EmptyState.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { fairmintVars } from \"../../../theme\";\nimport { colors } from \"../../../theme/colors\";\nimport { Button } from \"../../primitives/Button/Button\";\nimport { Box, Stack, Text, Title } from \"../../primitives/layout\";\n\nexport interface EmptyStateProps {\n /** Icon element (ReactNode — use any icon library). */\n icon?: ReactNode;\n /** Primary heading. */\n title: ReactNode;\n /** Supporting description. */\n description?: ReactNode;\n /** CTA button label. If provided, `onAction` is required. */\n actionLabel?: string;\n /** CTA button callback. */\n onAction?: () => void;\n /** CTA button color. @default colors.primary */\n actionColor?: string;\n}\n\nexport function EmptyState({\n icon,\n title,\n description,\n actionLabel,\n onAction,\n actionColor = colors.primary,\n}: EmptyStateProps) {\n return (\n <Stack align=\"center\" gap=\"md\" py=\"xl\" role=\"status\">\n {icon && (\n <Box c={fairmintVars.colorTextSecondary} fz=\"2.5rem\">\n {icon}\n </Box>\n )}\n <Title order={4} ta=\"center\">\n {title}\n </Title>\n {description && (\n <Text c={fairmintVars.colorTextSecondary} size=\"sm\" ta=\"center\" maw={360}>\n {description}\n </Text>\n )}\n {actionLabel && onAction && (\n <Button variant=\"light\" color={actionColor} onClick={onAction}>\n {actionLabel}\n </Button>\n )}\n </Stack>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAqBO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc,OAAO;AACvB,GAAoB;AAClB,SACE,qBAAC,SAAM,OAAM,UAAS,KAAI,MAAK,IAAG,MAAK,MAAK,UACzC,UAAA;AAAA,IAAA,4BACE,KAAA,EAAI,GAAG,aAAa,oBAAoB,IAAG,UACzC,UAAA,KAAA,CACH;AAAA,wBAED,OAAA,EAAM,OAAO,GAAG,IAAG,UACjB,UAAA,OACH;AAAA,IACC,eACC,oBAAC,MAAA,EAAK,GAAG,aAAa,oBAAoB,MAAK,MAAK,IAAG,UAAS,KAAK,KAClE,UAAA,aACH;AAAA,IAED,eAAe,YACd,oBAAC,QAAA,EAAO,SAAQ,SAAQ,OAAO,aAAa,SAAS,UAClD,UAAA,YAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"EmptyState.js","sources":["../../../../src/components/generic/EmptyState/EmptyState.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { colors } from \"../../../theme/colors\";\nimport { Avatar } from \"../../primitives/Avatar/Avatar\";\nimport { Button } from \"../../primitives/Button/Button\";\nimport { Stack, Text } from \"../../primitives/layout\";\n\nconst EMPTY_STATE_AVATAR_SIZE = 56;\nconst EMPTY_STATE_ICON_SIZE = 28;\n\nexport interface EmptyStateProps {\n /**\n * Fully composed avatar (photo, initials, or custom node). Takes precedence\n * over `icon`. Use this when the empty state represents a person or entity.\n */\n avatar?: ReactNode;\n /**\n * Icon glyph (e.g. from `@tabler/icons-react`). Wrapped in the canonical\n * empty-state Avatar: 56px, light gray, circular.\n */\n icon?: ReactNode;\n /** Primary heading. */\n title: ReactNode;\n /** Supporting description. */\n description?: ReactNode;\n /** CTA button label. Rendered only when `onAction` is also provided. */\n actionLabel?: string;\n /** CTA button callback. The CTA is omitted unless this is set. */\n onAction?: () => void;\n /** CTA button color. @default colors.primary */\n actionColor?: string;\n}\n\nfunction EmptyStateAvatar({ avatar, icon }: Pick<EmptyStateProps, \"avatar\" | \"icon\">) {\n if (avatar) {\n return avatar;\n }\n if (!icon) {\n return null;\n }\n return (\n <Avatar\n aria-hidden\n color={colors.neutral}\n radius=\"xl\"\n size={EMPTY_STATE_AVATAR_SIZE}\n styles={{\n root: {\n \"& svg\": {\n height: EMPTY_STATE_ICON_SIZE,\n width: EMPTY_STATE_ICON_SIZE,\n },\n },\n }}\n variant=\"light\"\n >\n {icon}\n </Avatar>\n );\n}\n\nexport function EmptyState({\n avatar,\n icon,\n title,\n description,\n actionLabel,\n onAction,\n actionColor = colors.primary,\n}: EmptyStateProps) {\n return (\n <Stack align=\"center\" gap=\"md\" py=\"xl\" role=\"status\">\n <EmptyStateAvatar avatar={avatar} icon={icon} />\n <Text fw={500} size=\"lg\" ta=\"center\">\n {title}\n </Text>\n {description && (\n <Text c=\"dimmed\" maw={360} size=\"sm\" ta=\"center\">\n {description}\n </Text>\n )}\n {actionLabel && onAction && (\n <Button color={actionColor} onClick={onAction} variant=\"light\">\n {actionLabel}\n </Button>\n )}\n </Stack>\n );\n}\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,0BAA0B;AAChC,MAAM,wBAAwB;AAyB9B,SAAS,iBAAiB,EAAE,QAAQ,QAAkD;AACpF,MAAI,QAAQ;AACV,WAAO;AAAA,EACT;AACA,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAW;AAAA,MACX,OAAO,OAAO;AAAA,MACd,QAAO;AAAA,MACP,MAAM;AAAA,MACN,QAAQ;AAAA,QACN,MAAM;AAAA,UACJ,SAAS;AAAA,YACP,QAAQ;AAAA,YACR,OAAO;AAAA,UAAA;AAAA,QACT;AAAA,MACF;AAAA,MAEF,SAAQ;AAAA,MAEP,UAAA;AAAA,IAAA;AAAA,EAAA;AAGP;AAEO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc,OAAO;AACvB,GAAoB;AAClB,SACE,qBAAC,SAAM,OAAM,UAAS,KAAI,MAAK,IAAG,MAAK,MAAK,UAC1C,UAAA;AAAA,IAAA,oBAAC,kBAAA,EAAiB,QAAgB,KAAA,CAAY;AAAA,IAC9C,oBAAC,QAAK,IAAI,KAAK,MAAK,MAAK,IAAG,UACzB,UAAA,MAAA,CACH;AAAA,IACC,eACC,oBAAC,MAAA,EAAK,GAAE,UAAS,KAAK,KAAK,MAAK,MAAK,IAAG,UACrC,UAAA,YAAA,CACH;AAAA,IAED,eAAe,YACd,oBAAC,QAAA,EAAO,OAAO,aAAa,SAAS,UAAU,SAAQ,SACpD,UAAA,YAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
- const index = require("../../../../../../_virtual/index3.cjs");
4
+ const index = require("../../../../../../_virtual/index4.cjs");
5
5
  const getStatus = require("../../get-status/get-status.cjs");
6
6
  const clearListState = require("../../lists/clear-list-state.cjs");
7
7
  const getPath = require("../../paths/get-path.cjs");
@@ -1,5 +1,5 @@
1
1
  import { useState, useRef, useCallback } from "react";
2
- import isEqual from "../../../../../../_virtual/index3.js";
2
+ import isEqual from "../../../../../../_virtual/index4.js";
3
3
  import { getStatus } from "../../get-status/get-status.js";
4
4
  import { clearListState } from "../../lists/clear-list-state.js";
5
5
  import { getPath } from "../../paths/get-path.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index$1 = require("../../_virtual/index4.cjs");
3
+ const index$1 = require("../../_virtual/index3.cjs");
4
4
  const index = require("./node_modules/react-is/index.cjs");
5
5
  const factoryWithTypeCheckers = require("./factoryWithTypeCheckers.cjs");
6
6
  const factoryWithThrowingShims = require("./factoryWithThrowingShims.cjs");
@@ -1,4 +1,4 @@
1
- import { __module as propTypes } from "../../_virtual/index4.js";
1
+ import { __module as propTypes } from "../../_virtual/index3.js";
2
2
  import { __require as requireReactIs } from "./node_modules/react-is/index.js";
3
3
  import { __require as requireFactoryWithTypeCheckers } from "./factoryWithTypeCheckers.js";
4
4
  import { __require as requireFactoryWithThrowingShims } from "./factoryWithThrowingShims.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairmint/ui",
3
- "version": "0.3.39",
3
+ "version": "0.3.40",
4
4
  "type": "module",
5
5
  "description": "Fairmint design system and UI component library",
6
6
  "license": "UNLICENSED",