@agg-market/ui 0.0.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 (192) hide show
  1. package/dist/badge.d.mts +26 -0
  2. package/dist/badge.d.ts +26 -0
  3. package/dist/badge.js +70 -0
  4. package/dist/badge.mjs +9 -0
  5. package/dist/button.d.mts +20 -0
  6. package/dist/button.d.ts +20 -0
  7. package/dist/button.js +197 -0
  8. package/dist/button.mjs +8 -0
  9. package/dist/card.d.mts +8 -0
  10. package/dist/card.d.ts +8 -0
  11. package/dist/card.js +84 -0
  12. package/dist/card.mjs +7 -0
  13. package/dist/chart.d.mts +40 -0
  14. package/dist/chart.d.ts +40 -0
  15. package/dist/chart.js +418 -0
  16. package/dist/chart.mjs +8 -0
  17. package/dist/chunk-2PGUPOXY.mjs +285 -0
  18. package/dist/chunk-3DV3D2LH.mjs +155 -0
  19. package/dist/chunk-44UEI6KD.mjs +280 -0
  20. package/dist/chunk-4ADCXJE6.mjs +297 -0
  21. package/dist/chunk-4GSXVVSA.mjs +64 -0
  22. package/dist/chunk-4NK2FNAG.mjs +581 -0
  23. package/dist/chunk-4XWCYUV3.mjs +355 -0
  24. package/dist/chunk-5MN6ZNFA.mjs +355 -0
  25. package/dist/chunk-6RRBINER.mjs +50 -0
  26. package/dist/chunk-765JPQDG.mjs +280 -0
  27. package/dist/chunk-7CD7GIZC.mjs +850 -0
  28. package/dist/chunk-7XRKA6XF.mjs +462 -0
  29. package/dist/chunk-AOFP74IB.mjs +850 -0
  30. package/dist/chunk-BNDFQPHF.mjs +9 -0
  31. package/dist/chunk-C4OI72SM.mjs +14 -0
  32. package/dist/chunk-CB2MLGCJ.mjs +279 -0
  33. package/dist/chunk-CKTAVEW2.mjs +212 -0
  34. package/dist/chunk-DA6KZWSK.mjs +807 -0
  35. package/dist/chunk-DBD5GHHD.mjs +147 -0
  36. package/dist/chunk-DQ6XFBYJ.mjs +37 -0
  37. package/dist/chunk-FACIYUNK.mjs +217 -0
  38. package/dist/chunk-FUJQIYOF.mjs +37 -0
  39. package/dist/chunk-FZTAHWOS.mjs +82 -0
  40. package/dist/chunk-GC3QIIH7.mjs +112 -0
  41. package/dist/chunk-GPBLZGJ2.mjs +136 -0
  42. package/dist/chunk-H4LELROL.mjs +262 -0
  43. package/dist/chunk-H7P6DIX4.mjs +262 -0
  44. package/dist/chunk-H7YEBGYY.mjs +42 -0
  45. package/dist/chunk-HJOBAMDU.mjs +142 -0
  46. package/dist/chunk-IJG5I642.mjs +462 -0
  47. package/dist/chunk-IY2AA3OL.mjs +50 -0
  48. package/dist/chunk-J6L5BLKX.mjs +136 -0
  49. package/dist/chunk-J7OETCZ7.mjs +147 -0
  50. package/dist/chunk-JLLMIPIX.mjs +42 -0
  51. package/dist/chunk-KBRLFTJT.mjs +741 -0
  52. package/dist/chunk-KDBYDMYV.mjs +64 -0
  53. package/dist/chunk-L6E6Q4C4.mjs +217 -0
  54. package/dist/chunk-LY6474C4.mjs +297 -0
  55. package/dist/chunk-M23S2DVV.mjs +581 -0
  56. package/dist/chunk-MG243DSX.mjs +44 -0
  57. package/dist/chunk-MRHSN2B7.mjs +279 -0
  58. package/dist/chunk-MXWRCVRJ.mjs +285 -0
  59. package/dist/chunk-NFYS557L.mjs +481 -0
  60. package/dist/chunk-NNSY462N.mjs +212 -0
  61. package/dist/chunk-OUOIDPGX.mjs +25 -0
  62. package/dist/chunk-P5PFQX75.mjs +31 -0
  63. package/dist/chunk-P674XRDY.mjs +481 -0
  64. package/dist/chunk-PAQ542ER.mjs +170 -0
  65. package/dist/chunk-QE46DVJG.mjs +323 -0
  66. package/dist/chunk-QXFDXXDB.mjs +792 -0
  67. package/dist/chunk-R3DRVI4J.mjs +741 -0
  68. package/dist/chunk-TTOR7JCT.mjs +155 -0
  69. package/dist/chunk-V5WIYMKS.mjs +25 -0
  70. package/dist/chunk-VAZE267Q.mjs +82 -0
  71. package/dist/chunk-VLIJ7PQK.mjs +792 -0
  72. package/dist/chunk-VYNVBJK6.mjs +44 -0
  73. package/dist/chunk-WIWJ6DIE.mjs +323 -0
  74. package/dist/chunk-XDAEEJYR.mjs +142 -0
  75. package/dist/chunk-YUIZZ6XE.mjs +31 -0
  76. package/dist/connect-button.d.mts +40 -0
  77. package/dist/connect-button.d.ts +40 -0
  78. package/dist/connect-button.js +1815 -0
  79. package/dist/connect-button.mjs +14 -0
  80. package/dist/event-list-item-details.d.mts +11 -0
  81. package/dist/event-list-item-details.d.ts +11 -0
  82. package/dist/event-list-item-details.js +2140 -0
  83. package/dist/event-list-item-details.mjs +19 -0
  84. package/dist/event-list-item-details.types-CMbXOrT-.d.ts +53 -0
  85. package/dist/event-list-item-details.types-CxWr4Qn1.d.ts +53 -0
  86. package/dist/event-list-item-details.types-DRi99PZq.d.mts +53 -0
  87. package/dist/event-list-item-details.types-DekJKeMD.d.mts +53 -0
  88. package/dist/event-list-item.d.mts +10 -0
  89. package/dist/event-list-item.d.ts +10 -0
  90. package/dist/event-list-item.js +2097 -0
  91. package/dist/event-list-item.mjs +17 -0
  92. package/dist/event-list-item.types-B1490EQm.d.mts +46 -0
  93. package/dist/event-list-item.types-B1490EQm.d.ts +46 -0
  94. package/dist/event-list-item.types-Y6IeJ4e4.d.mts +46 -0
  95. package/dist/event-list-item.types-Y6IeJ4e4.d.ts +46 -0
  96. package/dist/event-list.d.mts +9 -0
  97. package/dist/event-list.d.ts +9 -0
  98. package/dist/event-list.js +3151 -0
  99. package/dist/event-list.mjs +20 -0
  100. package/dist/event-list.types-Bpp6Vn-t.d.mts +13 -0
  101. package/dist/event-list.types-Bpp6Vn-t.d.ts +13 -0
  102. package/dist/event-list.types-CkAAUqwW.d.mts +13 -0
  103. package/dist/event-list.types-CkAAUqwW.d.ts +13 -0
  104. package/dist/event-market-page.d.mts +52 -0
  105. package/dist/event-market-page.d.ts +52 -0
  106. package/dist/event-market-page.js +5369 -0
  107. package/dist/event-market-page.mjs +29 -0
  108. package/dist/hello-world.d.mts +8 -0
  109. package/dist/hello-world.d.ts +8 -0
  110. package/dist/hello-world.js +80 -0
  111. package/dist/hello-world.mjs +8 -0
  112. package/dist/home-page.d.mts +51 -0
  113. package/dist/home-page.d.ts +51 -0
  114. package/dist/home-page.js +3415 -0
  115. package/dist/home-page.mjs +21 -0
  116. package/dist/icon.d.mts +123 -0
  117. package/dist/icon.d.ts +123 -0
  118. package/dist/icon.js +922 -0
  119. package/dist/icon.mjs +57 -0
  120. package/dist/index.d.mts +70 -0
  121. package/dist/index.d.ts +70 -0
  122. package/dist/index.js +8184 -0
  123. package/dist/index.mjs +307 -0
  124. package/dist/loading-icon.d.mts +14 -0
  125. package/dist/loading-icon.d.ts +14 -0
  126. package/dist/loading-icon.js +115 -0
  127. package/dist/loading-icon.mjs +8 -0
  128. package/dist/market-details.d.mts +73 -0
  129. package/dist/market-details.d.ts +73 -0
  130. package/dist/market-details.js +3923 -0
  131. package/dist/market-details.mjs +22 -0
  132. package/dist/modal.d.mts +66 -0
  133. package/dist/modal.d.ts +66 -0
  134. package/dist/modal.js +317 -0
  135. package/dist/modal.mjs +9 -0
  136. package/dist/number-value.d.mts +14 -0
  137. package/dist/number-value.d.ts +14 -0
  138. package/dist/number-value.js +67 -0
  139. package/dist/number-value.mjs +7 -0
  140. package/dist/onboarding-modal.d.mts +88 -0
  141. package/dist/onboarding-modal.d.ts +88 -0
  142. package/dist/onboarding-modal.js +2242 -0
  143. package/dist/onboarding-modal.mjs +24 -0
  144. package/dist/place-order.d.mts +20 -0
  145. package/dist/place-order.d.ts +20 -0
  146. package/dist/place-order.js +2916 -0
  147. package/dist/place-order.mjs +18 -0
  148. package/dist/registry-CVn79H3I.d.mts +106 -0
  149. package/dist/registry-CVn79H3I.d.ts +106 -0
  150. package/dist/search.d.mts +69 -0
  151. package/dist/search.d.ts +69 -0
  152. package/dist/search.js +1465 -0
  153. package/dist/search.mjs +12 -0
  154. package/dist/select.d.mts +19 -0
  155. package/dist/select.d.ts +19 -0
  156. package/dist/select.js +920 -0
  157. package/dist/select.mjs +11 -0
  158. package/dist/settlement.d.mts +16 -0
  159. package/dist/settlement.d.ts +16 -0
  160. package/dist/settlement.js +1769 -0
  161. package/dist/settlement.mjs +15 -0
  162. package/dist/skeleton.d.mts +22 -0
  163. package/dist/skeleton.d.ts +22 -0
  164. package/dist/skeleton.js +523 -0
  165. package/dist/skeleton.mjs +10 -0
  166. package/dist/styles.css +2 -0
  167. package/dist/switch-button.d.mts +21 -0
  168. package/dist/switch-button.d.ts +21 -0
  169. package/dist/switch-button.js +184 -0
  170. package/dist/switch-button.mjs +7 -0
  171. package/dist/tabs.d.mts +27 -0
  172. package/dist/tabs.d.ts +27 -0
  173. package/dist/tabs.js +1708 -0
  174. package/dist/tabs.mjs +12 -0
  175. package/dist/tailwind.css +2 -0
  176. package/dist/types-8VUuQVZq.d.mts +387 -0
  177. package/dist/types-8VUuQVZq.d.ts +387 -0
  178. package/dist/types-CayJ8tWA.d.mts +3 -0
  179. package/dist/types-CayJ8tWA.d.ts +3 -0
  180. package/dist/typography.d.mts +16 -0
  181. package/dist/typography.d.ts +16 -0
  182. package/dist/typography.js +62 -0
  183. package/dist/typography.mjs +7 -0
  184. package/dist/venue-logo.d.mts +12 -0
  185. package/dist/venue-logo.d.ts +12 -0
  186. package/dist/venue-logo.js +350 -0
  187. package/dist/venue-logo.mjs +10 -0
  188. package/dist/venue-logo.types-4hmCg3D3.d.ts +17 -0
  189. package/dist/venue-logo.types-B1iPJgiD.d.mts +17 -0
  190. package/dist/venue-logo.types-Bg8eXtGp.d.ts +17 -0
  191. package/dist/venue-logo.types-QNDwiQ77.d.mts +17 -0
  192. package/package.json +195 -0
@@ -0,0 +1,22 @@
1
+ import {
2
+ MarketDetails
3
+ } from "./chunk-7CD7GIZC.mjs";
4
+ import "./chunk-XDAEEJYR.mjs";
5
+ import "./chunk-QXFDXXDB.mjs";
6
+ import "./chunk-PAQ542ER.mjs";
7
+ import "./chunk-IY2AA3OL.mjs";
8
+ import "./chunk-NFYS557L.mjs";
9
+ import "./chunk-FZTAHWOS.mjs";
10
+ import "./chunk-LY6474C4.mjs";
11
+ import "./chunk-DA6KZWSK.mjs";
12
+ import "./chunk-VYNVBJK6.mjs";
13
+ import "./chunk-BNDFQPHF.mjs";
14
+ import "./chunk-C4OI72SM.mjs";
15
+ import "./chunk-DQ6XFBYJ.mjs";
16
+ import "./chunk-YUIZZ6XE.mjs";
17
+ import "./chunk-FACIYUNK.mjs";
18
+ import "./chunk-TTOR7JCT.mjs";
19
+ import "./chunk-GC3QIIH7.mjs";
20
+ export {
21
+ MarketDetails
22
+ };
@@ -0,0 +1,66 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ interface ModalProps {
4
+ open: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ children: ReactNode;
7
+ "aria-label"?: string;
8
+ "aria-labelledby"?: string;
9
+ }
10
+ interface ModalContainerClassNames {
11
+ container?: string;
12
+ overlay?: string;
13
+ content?: string;
14
+ }
15
+ interface ModalContainerProps {
16
+ children: ReactNode;
17
+ maxWidth?: string;
18
+ classNames?: ModalContainerClassNames;
19
+ "aria-label"?: string;
20
+ "aria-labelledby"?: string;
21
+ }
22
+ interface ModalHeaderClassNames {
23
+ root?: string;
24
+ container?: string;
25
+ title?: string;
26
+ titleContainer?: string;
27
+ subtitle?: string;
28
+ close?: string;
29
+ }
30
+ interface ModalHeaderProps {
31
+ title?: string;
32
+ subtitle?: string;
33
+ leftElement?: ReactNode;
34
+ rightElement?: ReactNode;
35
+ hideClose?: boolean;
36
+ closeIcon?: ReactNode;
37
+ classNames?: ModalHeaderClassNames;
38
+ children?: ReactNode;
39
+ hideBorder?: boolean;
40
+ }
41
+ interface ModalBodyClassNames {
42
+ root?: string;
43
+ }
44
+ interface ModalBodyProps {
45
+ children: ReactNode;
46
+ classNames?: ModalBodyClassNames;
47
+ }
48
+ interface ModalFooterClassNames {
49
+ root?: string;
50
+ }
51
+ interface ModalFooterProps {
52
+ children: ReactNode;
53
+ classNames?: ModalFooterClassNames;
54
+ hideBorder?: boolean;
55
+ }
56
+
57
+ declare const Modal: {
58
+ ({ open, onOpenChange, children, "aria-label": _ariaLabel, "aria-labelledby": _ariaLabelledBy, }: ModalProps): JSX.Element;
59
+ Container: ({ children, maxWidth, classNames, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: ModalContainerProps) => JSX.Element;
60
+ Header: ({ title, subtitle, leftElement, rightElement, hideClose, closeIcon, classNames, children, hideBorder, }: ModalHeaderProps) => JSX.Element;
61
+ Body: ({ children, classNames }: ModalBodyProps) => JSX.Element;
62
+ Footer: ({ children, classNames, hideBorder, }: ModalFooterProps) => JSX.Element;
63
+ displayName: string;
64
+ };
65
+
66
+ export { Modal, type ModalBodyClassNames, type ModalBodyProps, type ModalContainerClassNames, type ModalContainerProps, type ModalFooterClassNames, type ModalFooterProps, type ModalHeaderClassNames, type ModalHeaderProps, type ModalProps };
@@ -0,0 +1,66 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ interface ModalProps {
4
+ open: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ children: ReactNode;
7
+ "aria-label"?: string;
8
+ "aria-labelledby"?: string;
9
+ }
10
+ interface ModalContainerClassNames {
11
+ container?: string;
12
+ overlay?: string;
13
+ content?: string;
14
+ }
15
+ interface ModalContainerProps {
16
+ children: ReactNode;
17
+ maxWidth?: string;
18
+ classNames?: ModalContainerClassNames;
19
+ "aria-label"?: string;
20
+ "aria-labelledby"?: string;
21
+ }
22
+ interface ModalHeaderClassNames {
23
+ root?: string;
24
+ container?: string;
25
+ title?: string;
26
+ titleContainer?: string;
27
+ subtitle?: string;
28
+ close?: string;
29
+ }
30
+ interface ModalHeaderProps {
31
+ title?: string;
32
+ subtitle?: string;
33
+ leftElement?: ReactNode;
34
+ rightElement?: ReactNode;
35
+ hideClose?: boolean;
36
+ closeIcon?: ReactNode;
37
+ classNames?: ModalHeaderClassNames;
38
+ children?: ReactNode;
39
+ hideBorder?: boolean;
40
+ }
41
+ interface ModalBodyClassNames {
42
+ root?: string;
43
+ }
44
+ interface ModalBodyProps {
45
+ children: ReactNode;
46
+ classNames?: ModalBodyClassNames;
47
+ }
48
+ interface ModalFooterClassNames {
49
+ root?: string;
50
+ }
51
+ interface ModalFooterProps {
52
+ children: ReactNode;
53
+ classNames?: ModalFooterClassNames;
54
+ hideBorder?: boolean;
55
+ }
56
+
57
+ declare const Modal: {
58
+ ({ open, onOpenChange, children, "aria-label": _ariaLabel, "aria-labelledby": _ariaLabelledBy, }: ModalProps): JSX.Element;
59
+ Container: ({ children, maxWidth, classNames, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: ModalContainerProps) => JSX.Element;
60
+ Header: ({ title, subtitle, leftElement, rightElement, hideClose, closeIcon, classNames, children, hideBorder, }: ModalHeaderProps) => JSX.Element;
61
+ Body: ({ children, classNames }: ModalBodyProps) => JSX.Element;
62
+ Footer: ({ children, classNames, hideBorder, }: ModalFooterProps) => JSX.Element;
63
+ displayName: string;
64
+ };
65
+
66
+ export { Modal, type ModalBodyClassNames, type ModalBodyProps, type ModalContainerClassNames, type ModalContainerProps, type ModalFooterClassNames, type ModalFooterProps, type ModalHeaderClassNames, type ModalHeaderProps, type ModalProps };
package/dist/modal.js ADDED
@@ -0,0 +1,317 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/primitives/modal/index.tsx
60
+ var modal_exports = {};
61
+ __export(modal_exports, {
62
+ Modal: () => Modal
63
+ });
64
+ module.exports = __toCommonJS(modal_exports);
65
+ var Dialog = __toESM(require("@radix-ui/react-dialog"));
66
+ var import_hooks = require("@agg-market/hooks");
67
+
68
+ // src/constants.ts
69
+ var AGG_ROOT_CLASS_NAME = "agg-root";
70
+
71
+ // src/shared/utils.ts
72
+ var cn = (...values) => values.filter(Boolean).join(" ");
73
+ var getMotionClassName = (enabled, ...values) => {
74
+ if (!enabled)
75
+ return void 0;
76
+ return cn(...values);
77
+ };
78
+
79
+ // src/primitives/icon/types.ts
80
+ var getIconA11yProps = (title) => ({
81
+ role: title ? "img" : "presentation",
82
+ "aria-hidden": title ? void 0 : true
83
+ });
84
+
85
+ // src/primitives/icon/svg/close.tsx
86
+ var import_jsx_runtime = require("react/jsx-runtime");
87
+ var CloseIcon = (_a) => {
88
+ var _b = _a, { title, className } = _b, props = __objRest(_b, ["title", "className"]);
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
90
+ "svg",
91
+ __spreadProps(__spreadValues(__spreadValues({
92
+ width: "16",
93
+ height: "16",
94
+ viewBox: "0 0 16 16",
95
+ fill: "none",
96
+ xmlns: "http://www.w3.org/2000/svg",
97
+ className
98
+ }, getIconA11yProps(title)), props), {
99
+ children: [
100
+ title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: title }) : null,
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
+ "path",
103
+ {
104
+ d: "M12 4L4 12M4 4l8 8",
105
+ stroke: "currentColor",
106
+ strokeWidth: "2",
107
+ strokeLinecap: "round",
108
+ strokeLinejoin: "round"
109
+ }
110
+ )
111
+ ]
112
+ })
113
+ );
114
+ };
115
+ CloseIcon.displayName = "CloseIcon";
116
+
117
+ // src/primitives/modal/index.tsx
118
+ var import_jsx_runtime2 = require("react/jsx-runtime");
119
+ var Modal = ({
120
+ open,
121
+ onOpenChange,
122
+ children,
123
+ "aria-label": _ariaLabel,
124
+ "aria-labelledby": _ariaLabelledBy
125
+ }) => {
126
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Dialog.Root, { open, onOpenChange, children });
127
+ };
128
+ var ModalContainer = ({
129
+ children,
130
+ maxWidth = "600px",
131
+ classNames,
132
+ "aria-label": ariaLabel,
133
+ "aria-labelledby": ariaLabelledBy
134
+ }) => {
135
+ const { rootClassName, enableAnimations } = (0, import_hooks.useSdkUiConfig)();
136
+ const overlayAnimationClassName = enableAnimations ? "motion-safe:data-[state=open]:animate-agg-modal-overlay-in motion-safe:data-[state=closed]:animate-agg-modal-overlay-out motion-reduce:animate-none" : void 0;
137
+ const panelAnimationClassName = enableAnimations ? "motion-safe:data-[state=open]:animate-agg-modal-panel-in motion-safe:data-[state=closed]:animate-agg-modal-panel-out motion-reduce:animate-none" : void 0;
138
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Dialog.Portal, { children: [
139
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
140
+ Dialog.Overlay,
141
+ {
142
+ className: cn(
143
+ "fixed inset-0 z-agg-overlay bg-agg-overlay",
144
+ overlayAnimationClassName,
145
+ classNames == null ? void 0 : classNames.overlay
146
+ )
147
+ }
148
+ ),
149
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
150
+ Dialog.Content,
151
+ {
152
+ className: cn(
153
+ "fixed inset-0 z-agg-modal",
154
+ "flex items-center justify-center p-4",
155
+ "sm:p-5",
156
+ classNames == null ? void 0 : classNames.content
157
+ ),
158
+ "aria-label": ariaLabel,
159
+ "aria-labelledby": ariaLabelledBy,
160
+ onCloseAutoFocus: (event) => {
161
+ event.preventDefault();
162
+ },
163
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
164
+ "div",
165
+ {
166
+ className: cn(
167
+ AGG_ROOT_CLASS_NAME,
168
+ rootClassName,
169
+ "flex w-full max-h-[calc(100%-2rem)] flex-col font-agg-sans",
170
+ "rounded-agg-2xl border border-agg-separator",
171
+ "bg-agg-secondary text-agg-foreground shadow-agg-modal",
172
+ "origin-bottom overflow-hidden will-change-transform",
173
+ panelAnimationClassName,
174
+ classNames == null ? void 0 : classNames.container
175
+ ),
176
+ "data-agg-animations": enableAnimations ? "true" : "false",
177
+ style: { maxWidth },
178
+ children
179
+ }
180
+ )
181
+ }
182
+ )
183
+ ] });
184
+ };
185
+ Modal.Container = ModalContainer;
186
+ var ModalHeader = ({
187
+ title,
188
+ subtitle,
189
+ leftElement,
190
+ rightElement,
191
+ hideClose = false,
192
+ closeIcon,
193
+ classNames,
194
+ children,
195
+ hideBorder = false
196
+ }) => {
197
+ const { enableAnimations } = (0, import_hooks.useSdkUiConfig)();
198
+ const labels = (0, import_hooks.useLabels)();
199
+ const defaultCloseIcon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CloseIcon, { className: "h-6 w-6" });
200
+ const resolvedCloseIcon = closeIcon != null ? closeIcon : defaultCloseIcon;
201
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
202
+ "div",
203
+ {
204
+ className: cn(
205
+ "flex flex-col",
206
+ "sticky top-0 z-20",
207
+ "bg-agg-secondary",
208
+ hideBorder ? "border-0" : "border-b border-agg-separator",
209
+ subtitle ? "min-h-20" : "min-h-16",
210
+ classNames == null ? void 0 : classNames.root
211
+ ),
212
+ children: [
213
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
214
+ "div",
215
+ {
216
+ className: cn(
217
+ "flex items-center justify-between",
218
+ "px-4 py-4",
219
+ "sm:px-8 sm:py-6",
220
+ subtitle && "sm:py-4",
221
+ children ? "pb-3 sm:pb-4" : void 0,
222
+ classNames == null ? void 0 : classNames.container
223
+ ),
224
+ children: [
225
+ leftElement ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: leftElement }) : null,
226
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: cn("max-w-[calc(100%-1rem)] flex-1", classNames == null ? void 0 : classNames.titleContainer), children: [
227
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
228
+ Dialog.Title,
229
+ {
230
+ className: cn(
231
+ !title && "invisible",
232
+ "flex items-center text-agg-lg font-agg-bold leading-agg-6",
233
+ "sm:text-agg-2xl sm:leading-agg-8",
234
+ "text-ellipsis overflow-hidden whitespace-nowrap",
235
+ classNames == null ? void 0 : classNames.title
236
+ ),
237
+ children: title
238
+ }
239
+ ),
240
+ subtitle ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
241
+ "span",
242
+ {
243
+ className: cn(
244
+ "text-agg-sm leading-agg-4 text-agg-muted-foreground sm:leading-agg-5",
245
+ classNames == null ? void 0 : classNames.subtitle
246
+ ),
247
+ children: subtitle
248
+ }
249
+ ) : null
250
+ ] }),
251
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex flex-row gap-6 items-center justify-end", children: [
252
+ rightElement ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: rightElement }) : null,
253
+ !hideClose && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
254
+ Dialog.Close,
255
+ {
256
+ className: cn(
257
+ "outline-0 flex items-center hover:cursor-pointer justify-center text-agg-foreground hover:text-agg-foreground/80",
258
+ getMotionClassName(enableAnimations, "transition-colors"),
259
+ classNames == null ? void 0 : classNames.close
260
+ ),
261
+ "aria-label": labels.common.close,
262
+ children: resolvedCloseIcon
263
+ }
264
+ )
265
+ ] })
266
+ ]
267
+ }
268
+ ),
269
+ children ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children }) : null
270
+ ]
271
+ }
272
+ );
273
+ };
274
+ Modal.Header = ModalHeader;
275
+ var ModalBody = ({ children, classNames }) => {
276
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
277
+ "div",
278
+ {
279
+ className: cn(
280
+ "grow overflow-y-auto",
281
+ "px-4 py-6",
282
+ "sm:p-8",
283
+ "bg-agg-secondary text-agg-foreground",
284
+ classNames == null ? void 0 : classNames.root
285
+ ),
286
+ children
287
+ }
288
+ );
289
+ };
290
+ Modal.Body = ModalBody;
291
+ var ModalFooter = ({
292
+ children,
293
+ classNames,
294
+ hideBorder = false
295
+ }) => {
296
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
297
+ "div",
298
+ {
299
+ className: cn(
300
+ "sticky bottom-0",
301
+ "bg-agg-secondary",
302
+ "flex h-[73px] w-full flex-row items-center justify-between gap-3",
303
+ "border-agg-separator p-4",
304
+ "sm:h-20 sm:justify-end sm:px-8 sm:py-5",
305
+ hideBorder ? "border-0" : "border-t",
306
+ classNames == null ? void 0 : classNames.root
307
+ ),
308
+ children
309
+ }
310
+ );
311
+ };
312
+ Modal.Footer = ModalFooter;
313
+ Modal.displayName = "Modal";
314
+ // Annotate the CommonJS export names for ESM import in node:
315
+ 0 && (module.exports = {
316
+ Modal
317
+ });
package/dist/modal.mjs ADDED
@@ -0,0 +1,9 @@
1
+ import {
2
+ Modal
3
+ } from "./chunk-CKTAVEW2.mjs";
4
+ import "./chunk-VYNVBJK6.mjs";
5
+ import "./chunk-BNDFQPHF.mjs";
6
+ import "./chunk-GC3QIIH7.mjs";
7
+ export {
8
+ Modal
9
+ };
@@ -0,0 +1,14 @@
1
+ type NumberValueFormat = "number" | "percent" | "currency" | "compactCurrency" | "date";
2
+ type NumberValueProps = {
3
+ value?: number | Date | null;
4
+ format?: NumberValueFormat;
5
+ fallback?: string;
6
+ className?: string;
7
+ ariaLabel?: string;
8
+ };
9
+ declare const NumberValue: {
10
+ ({ value, format, fallback, className, ariaLabel, }: NumberValueProps): JSX.Element;
11
+ displayName: string;
12
+ };
13
+
14
+ export { NumberValue, type NumberValueFormat, type NumberValueProps };
@@ -0,0 +1,14 @@
1
+ type NumberValueFormat = "number" | "percent" | "currency" | "compactCurrency" | "date";
2
+ type NumberValueProps = {
3
+ value?: number | Date | null;
4
+ format?: NumberValueFormat;
5
+ fallback?: string;
6
+ className?: string;
7
+ ariaLabel?: string;
8
+ };
9
+ declare const NumberValue: {
10
+ ({ value, format, fallback, className, ariaLabel, }: NumberValueProps): JSX.Element;
11
+ displayName: string;
12
+ };
13
+
14
+ export { NumberValue, type NumberValueFormat, type NumberValueProps };
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/primitives/number-value.tsx
21
+ var number_value_exports = {};
22
+ __export(number_value_exports, {
23
+ NumberValue: () => NumberValue
24
+ });
25
+ module.exports = __toCommonJS(number_value_exports);
26
+ var import_react = require("react");
27
+ var import_hooks = require("@agg-market/hooks");
28
+
29
+ // src/shared/utils.ts
30
+ var cn = (...values) => values.filter(Boolean).join(" ");
31
+
32
+ // src/primitives/number-value.tsx
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var NumberValue = ({
35
+ value,
36
+ format = "number",
37
+ fallback = "\u2014",
38
+ className,
39
+ ariaLabel
40
+ }) => {
41
+ const config = (0, import_hooks.useSdkUiConfig)();
42
+ const formatted = (0, import_react.useMemo)(() => {
43
+ if (value == null)
44
+ return fallback;
45
+ if (format === "date") {
46
+ if (value instanceof Date)
47
+ return config.formatDate(value);
48
+ return fallback;
49
+ }
50
+ if (typeof value !== "number")
51
+ return fallback;
52
+ if (format === "percent")
53
+ return config.formatPercent(value);
54
+ if (format === "currency")
55
+ return config.formatCurrency(value);
56
+ if (format === "compactCurrency") {
57
+ return config.formatCompactCurrency(value);
58
+ }
59
+ return config.formatNumber(value);
60
+ }, [config, fallback, format, value]);
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: cn("font-agg-sans", className), "aria-label": ariaLabel, children: formatted });
62
+ };
63
+ NumberValue.displayName = "NumberValue";
64
+ // Annotate the CommonJS export names for ESM import in node:
65
+ 0 && (module.exports = {
66
+ NumberValue
67
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ NumberValue
3
+ } from "./chunk-JLLMIPIX.mjs";
4
+ import "./chunk-GC3QIIH7.mjs";
5
+ export {
6
+ NumberValue
7
+ };
@@ -0,0 +1,88 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ interface OnboardingProfileData {
4
+ username: string;
5
+ avatarFile?: File;
6
+ avatarPreview?: string;
7
+ }
8
+ interface HowItWorksIcons {
9
+ createAccount?: ReactNode;
10
+ linkAccounts?: ReactNode;
11
+ bestPrices?: ReactNode;
12
+ stayInControl?: ReactNode;
13
+ }
14
+ /** Connection state for a venue card. */
15
+ type ConnectionState = "idle" | "connecting" | "connected" | "error";
16
+ interface OnboardingModalProps {
17
+ open: boolean;
18
+ onOpenChange: (open: boolean) => void;
19
+ onProfileSubmit?: (data: OnboardingProfileData) => void;
20
+ /** Called when the user clicks "Connect" on the onchain card. Should resolve on success, reject/throw on failure. */
21
+ onConnectOnchain?: () => Promise<void>;
22
+ /** Called when the user submits Kalshi credentials. Should resolve on success, reject/throw on failure. */
23
+ onConnectKalshi?: (credentials: KalshiCredentials) => Promise<void>;
24
+ onComplete?: () => void;
25
+ howItWorksIcons?: HowItWorksIcons;
26
+ connectedOnchain?: boolean;
27
+ connectedKalshi?: boolean;
28
+ }
29
+ interface KalshiCredentials {
30
+ apiKeyId: string;
31
+ privateKey: string;
32
+ }
33
+ interface HowItWorksStepProps {
34
+ onContinue: () => void;
35
+ icons?: HowItWorksIcons;
36
+ }
37
+ interface ProfileSetupStepProps {
38
+ onContinue: (data: OnboardingProfileData) => void;
39
+ }
40
+ interface ConnectAccountsStepProps {
41
+ onConnectOnchain?: () => void;
42
+ onConnectKalshi?: () => void;
43
+ onContinue: () => void;
44
+ connectedOnchain?: boolean;
45
+ connectedKalshi?: boolean;
46
+ }
47
+ interface ConnectOnchainModalProps {
48
+ open: boolean;
49
+ onOpenChange: (open: boolean) => void;
50
+ onConnect: () => Promise<void>;
51
+ }
52
+ interface ConnectKalshiModalProps {
53
+ open: boolean;
54
+ onOpenChange: (open: boolean) => void;
55
+ onVerify: (credentials: KalshiCredentials) => Promise<void>;
56
+ }
57
+
58
+ declare const HowItWorksStep: {
59
+ ({ onContinue, icons }: HowItWorksStepProps): JSX.Element;
60
+ displayName: string;
61
+ };
62
+
63
+ declare const ProfileSetupStep: {
64
+ ({ onContinue }: ProfileSetupStepProps): JSX.Element;
65
+ displayName: string;
66
+ };
67
+
68
+ declare const ConnectAccountsStep: {
69
+ ({ onConnectOnchain, onConnectKalshi, onContinue, connectedOnchain, connectedKalshi, }: ConnectAccountsStepProps): JSX.Element;
70
+ displayName: string;
71
+ };
72
+
73
+ declare const ConnectKalshiModal: {
74
+ ({ open, onOpenChange, onVerify, }: ConnectKalshiModalProps): JSX.Element;
75
+ displayName: string;
76
+ };
77
+
78
+ declare const ConnectOnchainModal: {
79
+ ({ open, onOpenChange, onConnect, }: ConnectOnchainModalProps): JSX.Element;
80
+ displayName: string;
81
+ };
82
+
83
+ declare const OnboardingModal: {
84
+ ({ open, onOpenChange, onProfileSubmit, onConnectOnchain, onConnectKalshi, onComplete, howItWorksIcons, connectedOnchain, connectedKalshi, }: OnboardingModalProps): JSX.Element;
85
+ displayName: string;
86
+ };
87
+
88
+ export { ConnectAccountsStep, type ConnectAccountsStepProps, ConnectKalshiModal, type ConnectKalshiModalProps, ConnectOnchainModal, type ConnectOnchainModalProps, type ConnectionState, type HowItWorksIcons, HowItWorksStep, type HowItWorksStepProps, type KalshiCredentials, OnboardingModal, type OnboardingModalProps, type OnboardingProfileData, ProfileSetupStep, type ProfileSetupStepProps };