@agg-build/ui 4.0.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -16
- package/dist/{chunk-XIDQ2A6W.mjs → chunk-64BBTXFE.mjs} +1639 -909
- package/dist/{chunk-VR5ZRDQT.mjs → chunk-6STRIKUA.mjs} +1 -1
- package/dist/{chunk-KX3TQ7WC.mjs → chunk-734VTGCV.mjs} +1 -1
- package/dist/{chunk-KO6VTRV6.mjs → chunk-N7UPPT5J.mjs} +336 -232
- package/dist/{chunk-JTSLZARU.mjs → chunk-UCU2XCV5.mjs} +2 -2
- package/dist/{chunk-MKU5Q6PN.mjs → chunk-V5CRUO6S.mjs} +653 -379
- package/dist/{chunk-R362GNI2.mjs → chunk-WW5QKNIM.mjs} +278 -146
- package/dist/events.js +1241 -754
- package/dist/events.mjs +6 -4
- package/dist/index.js +4919 -3694
- package/dist/index.mjs +20 -8
- package/dist/modals.js +1321 -1260
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +4271 -3054
- package/dist/pages.mjs +10 -6
- package/dist/primitives.js +346 -265
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +2281 -1499
- package/dist/trading.mjs +10 -4
- package/dist/types/events/index.d.mts +1 -0
- package/dist/types/events/index.d.ts +1 -0
- package/dist/types/events/item-details/event-list-item-details-market-selector.d.mts +4 -1
- package/dist/types/events/item-details/event-list-item-details-market-selector.d.ts +4 -1
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +25 -1
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +25 -1
- package/dist/types/events/item-details/index.d.mts +1 -1
- package/dist/types/events/item-details/index.d.ts +1 -1
- package/dist/types/events/market-details/index.d.mts +1 -1
- package/dist/types/events/market-details/index.d.ts +1 -1
- package/dist/types/events/market-details/market-details.types.d.mts +4 -0
- package/dist/types/events/market-details/market-details.types.d.ts +4 -0
- package/dist/types/events/shared/format-event-title.d.mts +9 -1
- package/dist/types/events/shared/format-event-title.d.ts +9 -1
- package/dist/types/events/shared/format-sports-event-time.d.mts +2 -0
- package/dist/types/events/shared/format-sports-event-time.d.ts +2 -0
- package/dist/types/events/shared/sports-live-score.d.mts +10 -0
- package/dist/types/events/shared/sports-live-score.d.ts +10 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +4 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +4 -0
- package/dist/types/pages/event-market/index.d.mts +1 -0
- package/dist/types/pages/event-market/index.d.ts +1 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +5 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +5 -0
- package/dist/types/pages/user-profile/components/open-order-row.d.mts +1 -0
- package/dist/types/pages/user-profile/components/open-order-row.d.ts +1 -0
- package/dist/types/pages/user-profile/components/positions-activity.d.mts +1 -1
- package/dist/types/pages/user-profile/components/positions-activity.d.ts +1 -1
- package/dist/types/pages/user-profile/index.d.mts +1 -0
- package/dist/types/pages/user-profile/index.d.ts +1 -0
- package/dist/types/pages/user-profile/user-profile.types.d.mts +1 -1
- package/dist/types/pages/user-profile/user-profile.types.d.ts +1 -1
- package/dist/types/primitives/venue-logo/svg/logo-novig.d.mts +24 -0
- package/dist/types/primitives/venue-logo/svg/logo-novig.d.ts +24 -0
- package/dist/types/primitives/venue-logo/venue-logo.constants.d.mts +1 -1
- package/dist/types/primitives/venue-logo/venue-logo.constants.d.ts +1 -1
- package/dist/types/trading/place-order/index.d.mts +4 -1
- package/dist/types/trading/place-order/index.d.ts +4 -1
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +38 -73
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +38 -73
- package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +26 -0
- package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +26 -0
- package/dist/types/trading/place-order/index.place-order.types.d.mts +15 -0
- package/dist/types/trading/place-order/index.place-order.types.d.ts +15 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +14 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +14 -1
- package/package.json +3 -3
- /package/dist/{chunk-KHHFHXXD.mjs → chunk-JH4B3ZHQ.mjs} +0 -0
package/dist/primitives.js
CHANGED
|
@@ -5281,10 +5281,10 @@ var Footer = ({
|
|
|
5281
5281
|
Footer.displayName = "Footer";
|
|
5282
5282
|
|
|
5283
5283
|
// src/primitives/header/index.tsx
|
|
5284
|
-
var
|
|
5284
|
+
var import_hooks29 = require("@agg-build/hooks");
|
|
5285
5285
|
|
|
5286
5286
|
// src/primitives/search/index.tsx
|
|
5287
|
-
var
|
|
5287
|
+
var import_hooks28 = require("@agg-build/hooks");
|
|
5288
5288
|
var import_react9 = require("react");
|
|
5289
5289
|
|
|
5290
5290
|
// src/events/list/event-list.utils.ts
|
|
@@ -6043,10 +6043,10 @@ var Skeleton = ({
|
|
|
6043
6043
|
Skeleton.displayName = "Skeleton";
|
|
6044
6044
|
|
|
6045
6045
|
// src/primitives/venue-logo/index.tsx
|
|
6046
|
-
var
|
|
6046
|
+
var import_hooks26 = require("@agg-build/hooks");
|
|
6047
6047
|
|
|
6048
6048
|
// src/primitives/venue-logo/venue-logo.constants.ts
|
|
6049
|
-
var
|
|
6049
|
+
var import_sdk11 = require("@agg-build/sdk");
|
|
6050
6050
|
|
|
6051
6051
|
// src/primitives/venue-logo/logo-props.ts
|
|
6052
6052
|
var DEFAULT_MONOCHROME_COLOR = "currentColor";
|
|
@@ -6287,11 +6287,11 @@ var LogoMyriadIcon = (_a) => {
|
|
|
6287
6287
|
};
|
|
6288
6288
|
LogoMyriadIcon.displayName = "LogoMyriadIcon";
|
|
6289
6289
|
|
|
6290
|
-
// src/primitives/venue-logo/svg/logo-
|
|
6290
|
+
// src/primitives/venue-logo/svg/logo-novig.tsx
|
|
6291
6291
|
var import_hooks21 = require("@agg-build/hooks");
|
|
6292
6292
|
var import_sdk6 = require("@agg-build/sdk");
|
|
6293
6293
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
6294
|
-
var
|
|
6294
|
+
var LogoNovigIcon = (_a) => {
|
|
6295
6295
|
var _b = _a, {
|
|
6296
6296
|
title: title2,
|
|
6297
6297
|
className,
|
|
@@ -6309,7 +6309,7 @@ var LogoOpinionIcon = (_a) => {
|
|
|
6309
6309
|
} = (0, import_hooks21.useAggUiConfig)();
|
|
6310
6310
|
const isDarkTheme = theme === "dark";
|
|
6311
6311
|
const primaryColor = resolveLogoPrimaryColor({
|
|
6312
|
-
brandColor: (_a2 = resolveVenueLineColor(import_sdk6.Venue.
|
|
6312
|
+
brandColor: (_a2 = resolveVenueLineColor(import_sdk6.Venue.novig, isDarkTheme)) != null ? _a2 : "#179BE7",
|
|
6313
6313
|
isColor,
|
|
6314
6314
|
color
|
|
6315
6315
|
});
|
|
@@ -6322,24 +6322,22 @@ var LogoOpinionIcon = (_a) => {
|
|
|
6322
6322
|
}, getIconA11yProps(title2)), props), {
|
|
6323
6323
|
children: [
|
|
6324
6324
|
title2 ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("title", { children: title2 }) : null,
|
|
6325
|
-
/* @__PURE__ */ (0, import_jsx_runtime118.
|
|
6326
|
-
"path",
|
|
6327
|
-
{
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
}
|
|
6331
|
-
)
|
|
6325
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("g", { stroke: primaryColor, strokeWidth: 19.3, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
6326
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("path", { d: "M33.6 34.7L64.2 65.4" }),
|
|
6327
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("path", { d: "M64.2 34.7V65.4" })
|
|
6328
|
+
] }),
|
|
6329
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("circle", { cx: 32.2, cy: 65.5, r: 9.65, fill: primaryColor })
|
|
6332
6330
|
]
|
|
6333
6331
|
})
|
|
6334
6332
|
);
|
|
6335
6333
|
};
|
|
6336
|
-
|
|
6334
|
+
LogoNovigIcon.displayName = "LogoNovigIcon";
|
|
6337
6335
|
|
|
6338
|
-
// src/primitives/venue-logo/svg/logo-
|
|
6336
|
+
// src/primitives/venue-logo/svg/logo-opinion.tsx
|
|
6339
6337
|
var import_hooks22 = require("@agg-build/hooks");
|
|
6340
6338
|
var import_sdk7 = require("@agg-build/sdk");
|
|
6341
6339
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
6342
|
-
var
|
|
6340
|
+
var LogoOpinionIcon = (_a) => {
|
|
6343
6341
|
var _b = _a, {
|
|
6344
6342
|
title: title2,
|
|
6345
6343
|
className,
|
|
@@ -6357,7 +6355,7 @@ var LogoPolymarketIcon = (_a) => {
|
|
|
6357
6355
|
} = (0, import_hooks22.useAggUiConfig)();
|
|
6358
6356
|
const isDarkTheme = theme === "dark";
|
|
6359
6357
|
const primaryColor = resolveLogoPrimaryColor({
|
|
6360
|
-
brandColor: (_a2 = resolveVenueLineColor(import_sdk7.Venue.
|
|
6358
|
+
brandColor: (_a2 = resolveVenueLineColor(import_sdk7.Venue.opinion, isDarkTheme)) != null ? _a2 : "#ec5e26",
|
|
6361
6359
|
isColor,
|
|
6362
6360
|
color
|
|
6363
6361
|
});
|
|
@@ -6373,7 +6371,7 @@ var LogoPolymarketIcon = (_a) => {
|
|
|
6373
6371
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
6374
6372
|
"path",
|
|
6375
6373
|
{
|
|
6376
|
-
d: "
|
|
6374
|
+
d: "M51.8239 68.4603L56.9659 68.0094L58.8049 89.0576C61.1459 88.5314 63.4349 87.7952 65.6437 86.8578V68.1879H71.9955V83.4385C74.6496 81.6828 77.0863 79.619 79.2548 77.2898L80.0716 67.958L85.516 68.433C88.6185 62.4381 90.156 55.7558 89.9858 49.0072C89.8154 42.2584 87.9429 35.6623 84.542 29.8316L84.3394 32.1494L77.9876 31.5927L78.8042 22.2668C76.7468 20.1288 74.4594 18.225 71.9835 16.5902V31.9164H65.6317V13.1739C62.9224 12.0205 60.0929 11.173 57.1957 10.6473L59.0317 31.6441L53.8897 32.0949L51.9599 10.0482C51.3128 10.0179 50.6593 9.99976 50.006 9.99976C47.4581 9.99976 44.9161 10.2419 42.414 10.723L46.0438 31.3899L42.1297 32.0798L38.5304 11.6701C35.1755 12.6725 31.9677 14.1143 28.9905 15.9578L33.0435 31.0873L29.9705 31.9134L26.2018 17.8369C23.2938 19.9923 20.6902 22.5308 18.4615 25.3835L20.4246 30.7787L18.1833 31.5956L16.7707 27.7134C14.5111 31.0771 12.7772 34.7657 11.6287 38.652L12.2639 38.4221L20.4306 60.8471L18.1893 61.6641L10.8877 41.5963C9.21542 49.4012 9.91256 57.528 12.8896 64.9338C15.8667 72.3395 20.9879 78.6865 27.5961 83.1601L23.8031 68.9989L26.8762 68.1728L31.5162 85.4991C34.6952 87.1593 38.0844 88.3808 41.5914 89.1303L38.0132 68.7296L41.9301 68.0397L45.7684 89.8262C47.1811 89.9757 48.6007 90.0505 50.0212 90.0502C51.2583 90.0502 52.4863 89.9926 53.6963 89.8807L51.8239 68.4603ZM80.1017 37.8985L86.4385 38.4524L84.3605 62.2299L78.0087 61.6761L80.1017 37.8985ZM65.6528 38.1315H72.0046V61.9969H65.6528V38.1315ZM56.975 37.9501L59.053 61.7277L53.911 62.1785L51.8299 38.4009L56.975 37.9501ZM29.9976 62.003L23.8243 38.9486L26.8974 38.1255L33.0707 61.1649L29.9976 62.003ZM42.157 62.1603L38.0132 38.658L41.9301 37.9683L46.0709 61.4674L42.157 62.1603Z",
|
|
6377
6375
|
fill: primaryColor
|
|
6378
6376
|
}
|
|
6379
6377
|
)
|
|
@@ -6381,13 +6379,13 @@ var LogoPolymarketIcon = (_a) => {
|
|
|
6381
6379
|
})
|
|
6382
6380
|
);
|
|
6383
6381
|
};
|
|
6384
|
-
|
|
6382
|
+
LogoOpinionIcon.displayName = "LogoOpinionIcon";
|
|
6385
6383
|
|
|
6386
|
-
// src/primitives/venue-logo/svg/logo-
|
|
6384
|
+
// src/primitives/venue-logo/svg/logo-polymarket.tsx
|
|
6387
6385
|
var import_hooks23 = require("@agg-build/hooks");
|
|
6388
6386
|
var import_sdk8 = require("@agg-build/sdk");
|
|
6389
6387
|
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
6390
|
-
var
|
|
6388
|
+
var LogoPolymarketIcon = (_a) => {
|
|
6391
6389
|
var _b = _a, {
|
|
6392
6390
|
title: title2,
|
|
6393
6391
|
className,
|
|
@@ -6405,7 +6403,7 @@ var LogoPredictIcon = (_a) => {
|
|
|
6405
6403
|
} = (0, import_hooks23.useAggUiConfig)();
|
|
6406
6404
|
const isDarkTheme = theme === "dark";
|
|
6407
6405
|
const primaryColor = resolveLogoPrimaryColor({
|
|
6408
|
-
brandColor: (_a2 = resolveVenueLineColor(import_sdk8.Venue.
|
|
6406
|
+
brandColor: (_a2 = resolveVenueLineColor(import_sdk8.Venue.polymarket, isDarkTheme)) != null ? _a2 : "#2E5CFF",
|
|
6409
6407
|
isColor,
|
|
6410
6408
|
color
|
|
6411
6409
|
});
|
|
@@ -6421,9 +6419,7 @@ var LogoPredictIcon = (_a) => {
|
|
|
6421
6419
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
6422
6420
|
"path",
|
|
6423
6421
|
{
|
|
6424
|
-
|
|
6425
|
-
clipRule: "evenodd",
|
|
6426
|
-
d: "M75.2979 28.7579C76.4297 31.8263 77.0757 35.3709 77.0757 39.3906C77.0757 55.8415 65.8789 66.072 51.536 66.072C50.6567 66.072 49.836 65.9154 49.1715 65.7591C46.0451 65.485 45.0681 66.2871 45.0681 67.9695V69.3583C45.0681 71.4905 45.3809 72.3708 47.9602 73.5443C53.7443 76.322 51.8488 85.0855 44.6187 85.6919C39.6945 86.1027 33.7346 86.1027 28.6345 85.6919C21.893 85.144 19.6458 77.3979 24.9218 74.0138C27.4621 72.5077 28.4 70.4537 28.4195 66.0329C28.4977 53.5527 28.4977 50.6969 28.4782 39.9186C28.4586 33.9134 27.677 32.5246 24.2183 29.121C21.0527 25.9716 22.0884 21.2377 26.4069 18.7926C29.1621 17.2278 31.6633 16.054 34.6725 14.8608C37.5255 13.6871 39.8117 13.8437 41.414 14.9196C43.4267 16.1909 45.5177 16.3669 47.9992 15.4085C50.1486 14.5088 52.3569 14 54.7407 14C62.1263 14 69.7167 17.8763 73.871 25.5865C74.1788 26.1427 74.8952 27.5557 75.2979 28.7579ZM45.0681 45.9632C45.0681 50.599 47.667 53.4158 52.0246 53.4158C57.1639 53.4158 59.4696 49.6602 59.4696 41.7967C59.4696 32.7984 56.5971 28.006 51.536 28.006C47.5106 28.006 45.0681 31.077 45.0681 36.1825V45.9632Z",
|
|
6422
|
+
d: "M81.0904 84.2882C81.0904 87.9246 81.0904 89.7428 79.901 90.644C78.7119 91.5456 76.9613 91.0542 73.4603 90.0717L17.1975 74.2838C15.0881 73.6919 14.0332 73.3959 13.4233 72.5913C12.8135 71.7866 12.8135 70.6911 12.8135 68.5002V31.4998C12.8135 29.309 12.8135 28.2134 13.4233 27.4088C14.0332 26.6042 15.0881 26.3081 17.1975 25.7163L73.4603 9.92806C76.9613 8.94572 78.7119 8.45448 79.901 9.35587C81.0904 10.2573 81.0904 12.0755 81.0904 15.7119V84.2882ZM26.8451 69.1363L73.4308 82.2104V56.0637L26.8451 69.1363ZM20.4723 63.0711L67.0487 50L20.4723 36.929V63.0711ZM26.8446 30.8638L73.4308 43.9366V17.7896L26.8446 30.8638Z",
|
|
6427
6423
|
fill: primaryColor
|
|
6428
6424
|
}
|
|
6429
6425
|
)
|
|
@@ -6431,13 +6427,13 @@ var LogoPredictIcon = (_a) => {
|
|
|
6431
6427
|
})
|
|
6432
6428
|
);
|
|
6433
6429
|
};
|
|
6434
|
-
|
|
6430
|
+
LogoPolymarketIcon.displayName = "LogoPolymarketIcon";
|
|
6435
6431
|
|
|
6436
|
-
// src/primitives/venue-logo/svg/logo-
|
|
6432
|
+
// src/primitives/venue-logo/svg/logo-predict.tsx
|
|
6437
6433
|
var import_hooks24 = require("@agg-build/hooks");
|
|
6438
6434
|
var import_sdk9 = require("@agg-build/sdk");
|
|
6439
6435
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
6440
|
-
var
|
|
6436
|
+
var LogoPredictIcon = (_a) => {
|
|
6441
6437
|
var _b = _a, {
|
|
6442
6438
|
title: title2,
|
|
6443
6439
|
className,
|
|
@@ -6455,7 +6451,7 @@ var LogoProbableIcon = (_a) => {
|
|
|
6455
6451
|
} = (0, import_hooks24.useAggUiConfig)();
|
|
6456
6452
|
const isDarkTheme = theme === "dark";
|
|
6457
6453
|
const primaryColor = resolveLogoPrimaryColor({
|
|
6458
|
-
brandColor: (_a2 = resolveVenueLineColor(import_sdk9.Venue.
|
|
6454
|
+
brandColor: (_a2 = resolveVenueLineColor(import_sdk9.Venue.predict, isDarkTheme)) != null ? _a2 : "#705bf6",
|
|
6459
6455
|
isColor,
|
|
6460
6456
|
color
|
|
6461
6457
|
});
|
|
@@ -6469,14 +6465,64 @@ var LogoProbableIcon = (_a) => {
|
|
|
6469
6465
|
children: [
|
|
6470
6466
|
title2 ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("title", { children: title2 }) : null,
|
|
6471
6467
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
6468
|
+
"path",
|
|
6469
|
+
{
|
|
6470
|
+
fillRule: "evenodd",
|
|
6471
|
+
clipRule: "evenodd",
|
|
6472
|
+
d: "M75.2979 28.7579C76.4297 31.8263 77.0757 35.3709 77.0757 39.3906C77.0757 55.8415 65.8789 66.072 51.536 66.072C50.6567 66.072 49.836 65.9154 49.1715 65.7591C46.0451 65.485 45.0681 66.2871 45.0681 67.9695V69.3583C45.0681 71.4905 45.3809 72.3708 47.9602 73.5443C53.7443 76.322 51.8488 85.0855 44.6187 85.6919C39.6945 86.1027 33.7346 86.1027 28.6345 85.6919C21.893 85.144 19.6458 77.3979 24.9218 74.0138C27.4621 72.5077 28.4 70.4537 28.4195 66.0329C28.4977 53.5527 28.4977 50.6969 28.4782 39.9186C28.4586 33.9134 27.677 32.5246 24.2183 29.121C21.0527 25.9716 22.0884 21.2377 26.4069 18.7926C29.1621 17.2278 31.6633 16.054 34.6725 14.8608C37.5255 13.6871 39.8117 13.8437 41.414 14.9196C43.4267 16.1909 45.5177 16.3669 47.9992 15.4085C50.1486 14.5088 52.3569 14 54.7407 14C62.1263 14 69.7167 17.8763 73.871 25.5865C74.1788 26.1427 74.8952 27.5557 75.2979 28.7579ZM45.0681 45.9632C45.0681 50.599 47.667 53.4158 52.0246 53.4158C57.1639 53.4158 59.4696 49.6602 59.4696 41.7967C59.4696 32.7984 56.5971 28.006 51.536 28.006C47.5106 28.006 45.0681 31.077 45.0681 36.1825V45.9632Z",
|
|
6473
|
+
fill: primaryColor
|
|
6474
|
+
}
|
|
6475
|
+
)
|
|
6476
|
+
]
|
|
6477
|
+
})
|
|
6478
|
+
);
|
|
6479
|
+
};
|
|
6480
|
+
LogoPredictIcon.displayName = "LogoPredictIcon";
|
|
6481
|
+
|
|
6482
|
+
// src/primitives/venue-logo/svg/logo-probable.tsx
|
|
6483
|
+
var import_hooks25 = require("@agg-build/hooks");
|
|
6484
|
+
var import_sdk10 = require("@agg-build/sdk");
|
|
6485
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
6486
|
+
var LogoProbableIcon = (_a) => {
|
|
6487
|
+
var _b = _a, {
|
|
6488
|
+
title: title2,
|
|
6489
|
+
className,
|
|
6490
|
+
isColor = true,
|
|
6491
|
+
color
|
|
6492
|
+
} = _b, props = __objRest(_b, [
|
|
6493
|
+
"title",
|
|
6494
|
+
"className",
|
|
6495
|
+
"isColor",
|
|
6496
|
+
"color"
|
|
6497
|
+
]);
|
|
6498
|
+
var _a2;
|
|
6499
|
+
const {
|
|
6500
|
+
general: { theme }
|
|
6501
|
+
} = (0, import_hooks25.useAggUiConfig)();
|
|
6502
|
+
const isDarkTheme = theme === "dark";
|
|
6503
|
+
const primaryColor = resolveLogoPrimaryColor({
|
|
6504
|
+
brandColor: (_a2 = resolveVenueLineColor(import_sdk10.Venue.probable, isDarkTheme)) != null ? _a2 : "#EC4899",
|
|
6505
|
+
isColor,
|
|
6506
|
+
color
|
|
6507
|
+
});
|
|
6508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
6509
|
+
"svg",
|
|
6510
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
6511
|
+
viewBox: "0 0 100 100",
|
|
6512
|
+
className,
|
|
6513
|
+
fill: "none"
|
|
6514
|
+
}, getIconA11yProps(title2)), props), {
|
|
6515
|
+
children: [
|
|
6516
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("title", { children: title2 }) : null,
|
|
6517
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
6472
6518
|
"path",
|
|
6473
6519
|
{
|
|
6474
6520
|
d: "M75.625 59.3489C75.6247 53.7323 71.0719 49.1792 65.4551 49.179H33.9209C28.3039 49.179 23.7503 53.7321 23.75 59.3489C23.75 64.9659 28.3038 69.5198 33.9209 69.5198H65.4551C71.0719 69.5195 75.625 64.9658 75.625 59.3489ZM90.625 59.3489C90.625 73.2501 79.3562 84.5195 65.4551 84.5198H33.9209C20.0196 84.5198 8.75 73.2502 8.75 59.3489C8.75026 45.4477 20.0198 34.179 33.9209 34.179H65.4551C79.3559 34.1792 90.6247 45.4478 90.625 59.3489Z",
|
|
6475
6521
|
fill: primaryColor
|
|
6476
6522
|
}
|
|
6477
6523
|
),
|
|
6478
|
-
/* @__PURE__ */ (0,
|
|
6479
|
-
/* @__PURE__ */ (0,
|
|
6524
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("path", { d: "M90.9329 15.4546V30.4546H8.90234V15.4546H90.9329Z", fill: primaryColor }),
|
|
6525
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
6480
6526
|
"path",
|
|
6481
6527
|
{
|
|
6482
6528
|
d: "M64.5742 51.3496C68.9894 51.3496 72.5742 54.9344 72.5742 59.3496C72.5742 63.7648 68.9894 67.3496 64.5742 67.3496C60.159 67.3496 56.5742 63.7648 56.5742 59.3496C56.5742 54.9344 60.159 51.3496 64.5742 51.3496Z",
|
|
@@ -6491,38 +6537,41 @@ LogoProbableIcon.displayName = "LogoProbableIcon";
|
|
|
6491
6537
|
|
|
6492
6538
|
// src/primitives/venue-logo/venue-logo.constants.ts
|
|
6493
6539
|
var venueLogoRegistry = {
|
|
6494
|
-
[
|
|
6495
|
-
[
|
|
6496
|
-
[
|
|
6497
|
-
[
|
|
6498
|
-
[
|
|
6499
|
-
[
|
|
6500
|
-
[
|
|
6501
|
-
[
|
|
6540
|
+
[import_sdk11.Venue.kalshi]: LogoKalshiIcon,
|
|
6541
|
+
[import_sdk11.Venue.limitless]: LogoLimitlessIcon,
|
|
6542
|
+
[import_sdk11.Venue.opinion]: LogoOpinionIcon,
|
|
6543
|
+
[import_sdk11.Venue.polymarket]: LogoPolymarketIcon,
|
|
6544
|
+
[import_sdk11.Venue.predict]: LogoPredictIcon,
|
|
6545
|
+
[import_sdk11.Venue.probable]: LogoProbableIcon,
|
|
6546
|
+
[import_sdk11.Venue.myriad]: LogoMyriadIcon,
|
|
6547
|
+
[import_sdk11.Venue.hyperliquid]: LogoHyperliquidIcon,
|
|
6548
|
+
[import_sdk11.Venue.novig]: LogoNovigIcon
|
|
6502
6549
|
};
|
|
6503
6550
|
var VENUE_LOGO_BASE_URL = "https://assets.snagsolutions.io/public/prediction-markets/logos";
|
|
6551
|
+
var DEFAULT_VENUE_LOGO_URL = `${VENUE_LOGO_BASE_URL}/default.png`;
|
|
6504
6552
|
var venueLogoUrlRegistry = {
|
|
6505
|
-
[
|
|
6506
|
-
[
|
|
6507
|
-
[
|
|
6508
|
-
[
|
|
6509
|
-
[
|
|
6510
|
-
[
|
|
6511
|
-
[
|
|
6512
|
-
[
|
|
6553
|
+
[import_sdk11.Venue.kalshi]: `${VENUE_LOGO_BASE_URL}/kalshi.png`,
|
|
6554
|
+
[import_sdk11.Venue.limitless]: `${VENUE_LOGO_BASE_URL}/limitless.png`,
|
|
6555
|
+
[import_sdk11.Venue.opinion]: `${VENUE_LOGO_BASE_URL}/opinion.png`,
|
|
6556
|
+
[import_sdk11.Venue.polymarket]: `${VENUE_LOGO_BASE_URL}/polymarket.png`,
|
|
6557
|
+
[import_sdk11.Venue.predict]: `${VENUE_LOGO_BASE_URL}/predict.png`,
|
|
6558
|
+
[import_sdk11.Venue.probable]: `${VENUE_LOGO_BASE_URL}/probable.png`,
|
|
6559
|
+
[import_sdk11.Venue.myriad]: `${VENUE_LOGO_BASE_URL}/myriad.png`,
|
|
6560
|
+
[import_sdk11.Venue.hyperliquid]: `${VENUE_LOGO_BASE_URL}/hyperliquid.png`,
|
|
6561
|
+
[import_sdk11.Venue.novig]: `${VENUE_LOGO_BASE_URL}/novig.png`
|
|
6513
6562
|
};
|
|
6514
6563
|
var venueLogoLabels = {
|
|
6515
|
-
[
|
|
6516
|
-
[
|
|
6517
|
-
[
|
|
6518
|
-
[
|
|
6519
|
-
[
|
|
6520
|
-
[
|
|
6521
|
-
[
|
|
6522
|
-
[
|
|
6564
|
+
[import_sdk11.Venue.kalshi]: "Kalshi",
|
|
6565
|
+
[import_sdk11.Venue.limitless]: "Limitless",
|
|
6566
|
+
[import_sdk11.Venue.opinion]: "Opinion",
|
|
6567
|
+
[import_sdk11.Venue.polymarket]: "Polymarket",
|
|
6568
|
+
[import_sdk11.Venue.predict]: "Predict",
|
|
6569
|
+
[import_sdk11.Venue.probable]: "Probable",
|
|
6570
|
+
[import_sdk11.Venue.myriad]: "Myriad",
|
|
6571
|
+
[import_sdk11.Venue.hyperliquid]: "Hyperliquid",
|
|
6572
|
+
[import_sdk11.Venue.novig]: "Novig"
|
|
6523
6573
|
};
|
|
6524
6574
|
var DEFAULT_VENUE_LABEL = "Market";
|
|
6525
|
-
var DEFAULT_VENUE_LOGO_URL = `${VENUE_LOGO_BASE_URL}/default.png`;
|
|
6526
6575
|
var venueLogoNames = Object.keys(venueLogoRegistry);
|
|
6527
6576
|
var sizeClasses2 = {
|
|
6528
6577
|
small: "h-4 w-4",
|
|
@@ -6531,24 +6580,29 @@ var sizeClasses2 = {
|
|
|
6531
6580
|
};
|
|
6532
6581
|
var lineColorByVenue = {
|
|
6533
6582
|
light: {
|
|
6534
|
-
[
|
|
6535
|
-
[
|
|
6536
|
-
[
|
|
6537
|
-
[
|
|
6538
|
-
[
|
|
6539
|
-
[
|
|
6540
|
-
[
|
|
6541
|
-
[
|
|
6583
|
+
[import_sdk11.Venue.kalshi]: "#00D295",
|
|
6584
|
+
[import_sdk11.Venue.limitless]: "#C4FF00",
|
|
6585
|
+
[import_sdk11.Venue.opinion]: "#000000",
|
|
6586
|
+
[import_sdk11.Venue.polymarket]: "#2E5CFF",
|
|
6587
|
+
[import_sdk11.Venue.predict]: "#6D57F8",
|
|
6588
|
+
[import_sdk11.Venue.probable]: "#F05923",
|
|
6589
|
+
[import_sdk11.Venue.myriad]: "#000000",
|
|
6590
|
+
[import_sdk11.Venue.hyperliquid]: "#97FCE4",
|
|
6591
|
+
// Novig's own `<meta name="theme-color">`. Their logomark is monochrome
|
|
6592
|
+
// (cream on #050505, like Opinion/Myriad), but unlike those two this blue
|
|
6593
|
+
// reads on both themes, so it does not need the light/dark flip they use.
|
|
6594
|
+
[import_sdk11.Venue.novig]: "#179BE7"
|
|
6542
6595
|
},
|
|
6543
6596
|
dark: {
|
|
6544
|
-
[
|
|
6545
|
-
[
|
|
6546
|
-
[
|
|
6547
|
-
[
|
|
6548
|
-
[
|
|
6549
|
-
[
|
|
6550
|
-
[
|
|
6551
|
-
[
|
|
6597
|
+
[import_sdk11.Venue.kalshi]: "#00D295",
|
|
6598
|
+
[import_sdk11.Venue.limitless]: "#C4FF00",
|
|
6599
|
+
[import_sdk11.Venue.opinion]: "#FFFFFF",
|
|
6600
|
+
[import_sdk11.Venue.polymarket]: "#2E5CFF",
|
|
6601
|
+
[import_sdk11.Venue.predict]: "#6D57F8",
|
|
6602
|
+
[import_sdk11.Venue.probable]: "#F05923",
|
|
6603
|
+
[import_sdk11.Venue.myriad]: "#FFFFFF",
|
|
6604
|
+
[import_sdk11.Venue.hyperliquid]: "#97FCE4",
|
|
6605
|
+
[import_sdk11.Venue.novig]: "#179BE7"
|
|
6552
6606
|
}
|
|
6553
6607
|
};
|
|
6554
6608
|
var resolveVenueLineColor = (venue, isDarkTheme) => {
|
|
@@ -6574,7 +6628,7 @@ var resolveVenueLogoIsColor = ({
|
|
|
6574
6628
|
};
|
|
6575
6629
|
|
|
6576
6630
|
// src/primitives/venue-logo/index.tsx
|
|
6577
|
-
var
|
|
6631
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
6578
6632
|
var VenueLogo = ({
|
|
6579
6633
|
venue,
|
|
6580
6634
|
variant = "icon",
|
|
@@ -6587,7 +6641,7 @@ var VenueLogo = ({
|
|
|
6587
6641
|
title: title2
|
|
6588
6642
|
}) => {
|
|
6589
6643
|
var _a, _b;
|
|
6590
|
-
const labels = (0,
|
|
6644
|
+
const labels = (0, import_hooks26.useLabels)();
|
|
6591
6645
|
const sizeClass = sizeClasses2[size];
|
|
6592
6646
|
const resolvedLabel = resolveVenueLogoLabel({
|
|
6593
6647
|
ariaLabel,
|
|
@@ -6600,7 +6654,7 @@ var VenueLogo = ({
|
|
|
6600
6654
|
console.warn(`[AggUI] Unknown venue "${venue}" \u2014 using default logo`);
|
|
6601
6655
|
}
|
|
6602
6656
|
if (variant === "logo") {
|
|
6603
|
-
return /* @__PURE__ */ (0,
|
|
6657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
6604
6658
|
RemoteImage,
|
|
6605
6659
|
{
|
|
6606
6660
|
src: (_a = venueLogoUrlRegistry[venue]) != null ? _a : DEFAULT_VENUE_LOGO_URL,
|
|
@@ -6615,7 +6669,7 @@ var VenueLogo = ({
|
|
|
6615
6669
|
isColor,
|
|
6616
6670
|
isMonochromatic
|
|
6617
6671
|
});
|
|
6618
|
-
return /* @__PURE__ */ (0,
|
|
6672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
6619
6673
|
Component2,
|
|
6620
6674
|
{
|
|
6621
6675
|
className: cn("group/agg-venue-logo", "shrink-0", sizeClass, className),
|
|
@@ -6634,7 +6688,7 @@ var MIN_SEARCH_LENGTH = 3;
|
|
|
6634
6688
|
var SEARCH_DEBOUNCE_MS = 300;
|
|
6635
6689
|
|
|
6636
6690
|
// src/primitives/search/search.utils.ts
|
|
6637
|
-
var
|
|
6691
|
+
var import_sdk12 = require("@agg-build/sdk");
|
|
6638
6692
|
var import_dayjs3 = __toESM(require("dayjs"));
|
|
6639
6693
|
|
|
6640
6694
|
// src/events/shared/format-sports-event-time.ts
|
|
@@ -6655,6 +6709,14 @@ var formatSportsEventTimeEt = (value) => {
|
|
|
6655
6709
|
|
|
6656
6710
|
// src/events/shared/format-event-title.ts
|
|
6657
6711
|
var SPORT_CATEGORY_TOKENS = /* @__PURE__ */ new Set(["sport", "sports"]);
|
|
6712
|
+
var RECURRING_CRYPTO_TIMESTAMP_SUFFIX = /\s+-\s+(?:jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:t(?:ember)?)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)\b.*$/i;
|
|
6713
|
+
var RECURRING_CRYPTO_DURATION_SUFFIX = /\s+-\s+(?:5m(?:in)?|15m(?:in)?|1h|1d)$/i;
|
|
6714
|
+
var RECURRING_CRYPTO_DURATION_LABELS = {
|
|
6715
|
+
PT5M: "5min",
|
|
6716
|
+
PT15M: "15min",
|
|
6717
|
+
PT1H: "1h",
|
|
6718
|
+
P1D: "1d"
|
|
6719
|
+
};
|
|
6658
6720
|
var normalizeCategoryToken = (value) => {
|
|
6659
6721
|
if (typeof value !== "string") return null;
|
|
6660
6722
|
const normalizedValue = value.trim().toLowerCase();
|
|
@@ -6723,9 +6785,21 @@ var resolveEventHeading = ({
|
|
|
6723
6785
|
structureType,
|
|
6724
6786
|
gameStartTime,
|
|
6725
6787
|
endDate,
|
|
6726
|
-
venueMarkets
|
|
6788
|
+
venueMarkets,
|
|
6789
|
+
recurringCryptoWindowStart,
|
|
6790
|
+
recurringCryptoDuration
|
|
6727
6791
|
}) => {
|
|
6728
6792
|
const resolvedTitle = title2.trim();
|
|
6793
|
+
if (recurringCryptoWindowStart !== void 0) {
|
|
6794
|
+
const windowStartDate = recurringCryptoWindowStart == null ? null : new Date(recurringCryptoWindowStart);
|
|
6795
|
+
const timestampLabel = windowStartDate && !Number.isNaN(windowStartDate.getTime()) ? formatSportsEventTimeEt(windowStartDate.toISOString()) : null;
|
|
6796
|
+
const titleWithoutTimestamp = resolvedTitle.replace(RECURRING_CRYPTO_TIMESTAMP_SUFFIX, "").replace(RECURRING_CRYPTO_DURATION_SUFFIX, "").trim();
|
|
6797
|
+
const durationLabel = recurringCryptoDuration ? RECURRING_CRYPTO_DURATION_LABELS[recurringCryptoDuration] : null;
|
|
6798
|
+
return {
|
|
6799
|
+
title: durationLabel ? `${titleWithoutTimestamp} - ${durationLabel}` : titleWithoutTimestamp,
|
|
6800
|
+
timestampLabel
|
|
6801
|
+
};
|
|
6802
|
+
}
|
|
6729
6803
|
return {
|
|
6730
6804
|
title: resolvedTitle,
|
|
6731
6805
|
timestampLabel: resolveEventTimestampLabel({
|
|
@@ -6740,7 +6814,7 @@ var resolveEventHeading = ({
|
|
|
6740
6814
|
};
|
|
6741
6815
|
|
|
6742
6816
|
// src/events/item/event-list-item.utils.ts
|
|
6743
|
-
var
|
|
6817
|
+
var import_hooks27 = require("@agg-build/hooks");
|
|
6744
6818
|
|
|
6745
6819
|
// src/events/shared/venue-market-cluster.ts
|
|
6746
6820
|
var toNonEmptyString = (value) => {
|
|
@@ -7018,7 +7092,7 @@ var formatSearchContextLabel = (value) => {
|
|
|
7018
7092
|
if (!(0, import_dayjs3.default)(value).isValid()) return value;
|
|
7019
7093
|
return (0, import_dayjs3.default)(value).format("MMMM D, YYYY");
|
|
7020
7094
|
};
|
|
7021
|
-
var venueLogoNameSet = new Set(
|
|
7095
|
+
var venueLogoNameSet = new Set(import_sdk12.VENUES);
|
|
7022
7096
|
var toVenueLogoName = (value) => {
|
|
7023
7097
|
if (typeof value !== "string") return null;
|
|
7024
7098
|
if (!venueLogoNameSet.has(value)) return null;
|
|
@@ -7071,7 +7145,7 @@ var mapVenueEventToSearchResult = (event, labels, formatPercent, formatCompactCu
|
|
|
7071
7145
|
};
|
|
7072
7146
|
|
|
7073
7147
|
// src/primitives/search/index.tsx
|
|
7074
|
-
var
|
|
7148
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
7075
7149
|
var SearchResultRow = ({
|
|
7076
7150
|
item,
|
|
7077
7151
|
resultAria,
|
|
@@ -7085,7 +7159,7 @@ var SearchResultRow = ({
|
|
|
7085
7159
|
const handleResultPointerDown = (event) => {
|
|
7086
7160
|
event.preventDefault();
|
|
7087
7161
|
};
|
|
7088
|
-
return /* @__PURE__ */ (0,
|
|
7162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
7089
7163
|
"button",
|
|
7090
7164
|
{
|
|
7091
7165
|
type: "button",
|
|
@@ -7103,8 +7177,8 @@ var SearchResultRow = ({
|
|
|
7103
7177
|
onClick: handleResultClick,
|
|
7104
7178
|
"aria-label": resultAria(item.title),
|
|
7105
7179
|
children: [
|
|
7106
|
-
/* @__PURE__ */ (0,
|
|
7107
|
-
/* @__PURE__ */ (0,
|
|
7180
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "agg-search-result-content flex min-w-0 flex-1 items-center gap-4", children: [
|
|
7181
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7108
7182
|
RemoteImage,
|
|
7109
7183
|
{
|
|
7110
7184
|
src: item.thumbnailSrc,
|
|
@@ -7116,8 +7190,8 @@ var SearchResultRow = ({
|
|
|
7116
7190
|
)
|
|
7117
7191
|
}
|
|
7118
7192
|
),
|
|
7119
|
-
/* @__PURE__ */ (0,
|
|
7120
|
-
/* @__PURE__ */ (0,
|
|
7193
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
7194
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7121
7195
|
"p",
|
|
7122
7196
|
{
|
|
7123
7197
|
className: cn(
|
|
@@ -7128,8 +7202,8 @@ var SearchResultRow = ({
|
|
|
7128
7202
|
children: item.title
|
|
7129
7203
|
}
|
|
7130
7204
|
),
|
|
7131
|
-
/* @__PURE__ */ (0,
|
|
7132
|
-
/* @__PURE__ */ (0,
|
|
7205
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "agg-search-result-context flex min-w-0 items-center gap-2 text-agg-muted-foreground", children: [
|
|
7206
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7133
7207
|
"p",
|
|
7134
7208
|
{
|
|
7135
7209
|
className: cn(
|
|
@@ -7139,7 +7213,7 @@ var SearchResultRow = ({
|
|
|
7139
7213
|
children: item.marketSummaryLabel
|
|
7140
7214
|
}
|
|
7141
7215
|
),
|
|
7142
|
-
/* @__PURE__ */ (0,
|
|
7216
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "flex items-center gap-1", "aria-hidden": true, children: item.visibleVenues.map((venue) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7143
7217
|
VenueLogo,
|
|
7144
7218
|
{
|
|
7145
7219
|
venue,
|
|
@@ -7149,9 +7223,9 @@ var SearchResultRow = ({
|
|
|
7149
7223
|
},
|
|
7150
7224
|
`${item.id}-${venue}`
|
|
7151
7225
|
)) }),
|
|
7152
|
-
item.volumeLabel ? /* @__PURE__ */ (0,
|
|
7153
|
-
/* @__PURE__ */ (0,
|
|
7154
|
-
/* @__PURE__ */ (0,
|
|
7226
|
+
item.volumeLabel ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
7227
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "text-agg-muted-foreground", "aria-hidden": true, children: "\xB7" }),
|
|
7228
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7155
7229
|
"p",
|
|
7156
7230
|
{
|
|
7157
7231
|
className: cn(
|
|
@@ -7165,7 +7239,7 @@ var SearchResultRow = ({
|
|
|
7165
7239
|
] })
|
|
7166
7240
|
] })
|
|
7167
7241
|
] }),
|
|
7168
|
-
/* @__PURE__ */ (0,
|
|
7242
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
7169
7243
|
"div",
|
|
7170
7244
|
{
|
|
7171
7245
|
className: cn(
|
|
@@ -7173,9 +7247,9 @@ var SearchResultRow = ({
|
|
|
7173
7247
|
classNames == null ? void 0 : classNames.resultMeta
|
|
7174
7248
|
),
|
|
7175
7249
|
children: [
|
|
7176
|
-
/* @__PURE__ */ (0,
|
|
7177
|
-
/* @__PURE__ */ (0,
|
|
7178
|
-
item.isValueLoading ? /* @__PURE__ */ (0,
|
|
7250
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(VenueLogo, { venue: item.venue, size: "small" }),
|
|
7251
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
|
|
7252
|
+
item.isValueLoading ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7179
7253
|
"span",
|
|
7180
7254
|
{
|
|
7181
7255
|
"aria-hidden": "true",
|
|
@@ -7184,7 +7258,7 @@ var SearchResultRow = ({
|
|
|
7184
7258
|
"h-5 w-12 shrink-0 rounded-agg-sm bg-agg-separator animate-pulse"
|
|
7185
7259
|
)
|
|
7186
7260
|
}
|
|
7187
|
-
) : /* @__PURE__ */ (0,
|
|
7261
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7188
7262
|
"p",
|
|
7189
7263
|
{
|
|
7190
7264
|
className: cn(
|
|
@@ -7195,7 +7269,7 @@ var SearchResultRow = ({
|
|
|
7195
7269
|
children: item.valueLabel
|
|
7196
7270
|
}
|
|
7197
7271
|
),
|
|
7198
|
-
/* @__PURE__ */ (0,
|
|
7272
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7199
7273
|
"p",
|
|
7200
7274
|
{
|
|
7201
7275
|
className: cn(
|
|
@@ -7209,7 +7283,7 @@ var SearchResultRow = ({
|
|
|
7209
7283
|
]
|
|
7210
7284
|
}
|
|
7211
7285
|
),
|
|
7212
|
-
/* @__PURE__ */ (0,
|
|
7286
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7213
7287
|
Icon,
|
|
7214
7288
|
{
|
|
7215
7289
|
name: "chevron-right",
|
|
@@ -7232,7 +7306,7 @@ var SearchSeeAllResultsButton = ({
|
|
|
7232
7306
|
const handlePointerDown = (event) => {
|
|
7233
7307
|
event.preventDefault();
|
|
7234
7308
|
};
|
|
7235
|
-
return /* @__PURE__ */ (0,
|
|
7309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
7236
7310
|
"button",
|
|
7237
7311
|
{
|
|
7238
7312
|
type: "button",
|
|
@@ -7246,8 +7320,8 @@ var SearchSeeAllResultsButton = ({
|
|
|
7246
7320
|
onPointerDown: handlePointerDown,
|
|
7247
7321
|
onClick,
|
|
7248
7322
|
children: [
|
|
7249
|
-
/* @__PURE__ */ (0,
|
|
7250
|
-
/* @__PURE__ */ (0,
|
|
7323
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { children: label2 }),
|
|
7324
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Icon, { name: "chevron-right", size: "small", className: "size-[14px] text-agg-primary" })
|
|
7251
7325
|
]
|
|
7252
7326
|
}
|
|
7253
7327
|
);
|
|
@@ -7260,12 +7334,12 @@ var Search = ({
|
|
|
7260
7334
|
onSelectEvent,
|
|
7261
7335
|
onSeeAllEvents
|
|
7262
7336
|
}) => {
|
|
7263
|
-
const labels = (0,
|
|
7337
|
+
const labels = (0, import_hooks28.useLabels)();
|
|
7264
7338
|
const {
|
|
7265
7339
|
search: searchConfig,
|
|
7266
7340
|
features: { enableAnimations },
|
|
7267
7341
|
formatting: { formatCompactCurrency, formatPercent }
|
|
7268
|
-
} = (0,
|
|
7342
|
+
} = (0, import_hooks28.useSdkUiConfig)();
|
|
7269
7343
|
const resolvedValue = searchConfig.value;
|
|
7270
7344
|
const trimmedValue = resolvedValue.trim();
|
|
7271
7345
|
const [debouncedSearchValue, setDebouncedSearchValue] = (0, import_react9.useState)(() => {
|
|
@@ -7286,7 +7360,7 @@ var Search = ({
|
|
|
7286
7360
|
window.clearTimeout(timeoutId);
|
|
7287
7361
|
};
|
|
7288
7362
|
}, [shouldSearchValue, trimmedValue]);
|
|
7289
|
-
const { data: searchResults, isLoading } = (0,
|
|
7363
|
+
const { data: searchResults, isLoading } = (0, import_hooks28.useSearch)({
|
|
7290
7364
|
q: shouldFetchResults ? debouncedSearchValue : "",
|
|
7291
7365
|
type: "events",
|
|
7292
7366
|
categoryIds,
|
|
@@ -7295,7 +7369,7 @@ var Search = ({
|
|
|
7295
7369
|
// filterOpenEvents below then empties — rendering "no results" for
|
|
7296
7370
|
// markets that exist. filterOpenEvents stays as the residual guard for
|
|
7297
7371
|
// events with no open child markets, which the server doesn't check.
|
|
7298
|
-
status: [
|
|
7372
|
+
status: [import_hooks28.MarketStatus.open],
|
|
7299
7373
|
limit: limit != null ? limit : DEFAULT_SEARCH_LIMIT,
|
|
7300
7374
|
enabled: shouldFetchResults
|
|
7301
7375
|
});
|
|
@@ -7310,8 +7384,8 @@ var Search = ({
|
|
|
7310
7384
|
}),
|
|
7311
7385
|
[openEvents]
|
|
7312
7386
|
);
|
|
7313
|
-
const livePrices = (0,
|
|
7314
|
-
const midpointResult = (0,
|
|
7387
|
+
const livePrices = (0, import_hooks28.useLiveOutcomePrices)(visibleVenueMarkets);
|
|
7388
|
+
const midpointResult = (0, import_hooks28.useMidpoints)(visibleVenueMarkets);
|
|
7315
7389
|
const searchDisplayPrices = (0, import_react9.useMemo)(() => {
|
|
7316
7390
|
if (!midpointResult.bestMidpointsByOutcomeId.size) return livePrices;
|
|
7317
7391
|
if (!livePrices.size) return midpointResult.bestMidpointsByOutcomeId;
|
|
@@ -7416,14 +7490,14 @@ var Search = ({
|
|
|
7416
7490
|
event.preventDefault();
|
|
7417
7491
|
handleSeeAllResults();
|
|
7418
7492
|
};
|
|
7419
|
-
return /* @__PURE__ */ (0,
|
|
7493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
7420
7494
|
"div",
|
|
7421
7495
|
{
|
|
7422
7496
|
className: cn("group/agg-search", "relative flex w-full flex-col", classNames == null ? void 0 : classNames.root),
|
|
7423
7497
|
onFocusCapture: handleFocusWithin,
|
|
7424
7498
|
onBlurCapture: handleBlurWithin,
|
|
7425
7499
|
children: [
|
|
7426
|
-
/* @__PURE__ */ (0,
|
|
7500
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("label", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
7427
7501
|
"div",
|
|
7428
7502
|
{
|
|
7429
7503
|
className: cn(
|
|
@@ -7439,7 +7513,7 @@ var Search = ({
|
|
|
7439
7513
|
),
|
|
7440
7514
|
onClick: handleFocusWithin,
|
|
7441
7515
|
children: [
|
|
7442
|
-
/* @__PURE__ */ (0,
|
|
7516
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7443
7517
|
Icon,
|
|
7444
7518
|
{
|
|
7445
7519
|
name: "search",
|
|
@@ -7447,7 +7521,7 @@ var Search = ({
|
|
|
7447
7521
|
className: cn("text-agg-muted-foreground", classNames == null ? void 0 : classNames.searchIcon)
|
|
7448
7522
|
}
|
|
7449
7523
|
),
|
|
7450
|
-
/* @__PURE__ */ (0,
|
|
7524
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7451
7525
|
"input",
|
|
7452
7526
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
7453
7527
|
ref: inputRef,
|
|
@@ -7468,11 +7542,11 @@ var Search = ({
|
|
|
7468
7542
|
)
|
|
7469
7543
|
})
|
|
7470
7544
|
),
|
|
7471
|
-
shouldRenderShortcut ? /* @__PURE__ */ (0,
|
|
7545
|
+
shouldRenderShortcut ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "agg-search-shortcut hidden md:flex size-6 shrink-0 items-center justify-center rounded-[4px] bg-agg-secondary-hover", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-muted-foreground", children: "/" }) }) : null
|
|
7472
7546
|
]
|
|
7473
7547
|
}
|
|
7474
7548
|
) }),
|
|
7475
|
-
shouldRenderLoadingState ? /* @__PURE__ */ (0,
|
|
7549
|
+
shouldRenderLoadingState ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7476
7550
|
"div",
|
|
7477
7551
|
{
|
|
7478
7552
|
className: cn(
|
|
@@ -7482,10 +7556,10 @@ var Search = ({
|
|
|
7482
7556
|
"mt-1",
|
|
7483
7557
|
classNames == null ? void 0 : classNames.emptyState
|
|
7484
7558
|
),
|
|
7485
|
-
children: /* @__PURE__ */ (0,
|
|
7559
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Skeleton, { view: "search" })
|
|
7486
7560
|
}
|
|
7487
7561
|
) : null,
|
|
7488
|
-
shouldRenderResults ? /* @__PURE__ */ (0,
|
|
7562
|
+
shouldRenderResults ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7489
7563
|
"div",
|
|
7490
7564
|
{
|
|
7491
7565
|
className: cn(
|
|
@@ -7495,7 +7569,7 @@ var Search = ({
|
|
|
7495
7569
|
"mt-1 w-full overflow-hidden rounded-agg-xl border border-agg-separator bg-agg-secondary pt-2 shadow-[0px_8px_16px_0px_rgba(0,0,0,0.1)]",
|
|
7496
7570
|
classNames == null ? void 0 : classNames.dropdown
|
|
7497
7571
|
),
|
|
7498
|
-
children: /* @__PURE__ */ (0,
|
|
7572
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
7499
7573
|
"ul",
|
|
7500
7574
|
{
|
|
7501
7575
|
className: cn(
|
|
@@ -7505,7 +7579,7 @@ var Search = ({
|
|
|
7505
7579
|
role: "listbox",
|
|
7506
7580
|
"aria-label": labels.search.resultsAria,
|
|
7507
7581
|
children: [
|
|
7508
|
-
validatedResults.map((item, index) => /* @__PURE__ */ (0,
|
|
7582
|
+
validatedResults.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7509
7583
|
"li",
|
|
7510
7584
|
{
|
|
7511
7585
|
role: "presentation",
|
|
@@ -7514,7 +7588,7 @@ var Search = ({
|
|
|
7514
7588
|
index > 0 && "border-t border-agg-separator",
|
|
7515
7589
|
classNames == null ? void 0 : classNames.resultItem
|
|
7516
7590
|
),
|
|
7517
|
-
children: /* @__PURE__ */ (0,
|
|
7591
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7518
7592
|
SearchResultRow,
|
|
7519
7593
|
{
|
|
7520
7594
|
item,
|
|
@@ -7526,12 +7600,12 @@ var Search = ({
|
|
|
7526
7600
|
},
|
|
7527
7601
|
item.id
|
|
7528
7602
|
)),
|
|
7529
|
-
/* @__PURE__ */ (0,
|
|
7603
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7530
7604
|
"li",
|
|
7531
7605
|
{
|
|
7532
7606
|
role: "presentation",
|
|
7533
7607
|
className: "agg-search-result-item border-t border-agg-separator",
|
|
7534
|
-
children: /* @__PURE__ */ (0,
|
|
7608
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7535
7609
|
SearchSeeAllResultsButton,
|
|
7536
7610
|
{
|
|
7537
7611
|
label: labels.search.seeAllResults,
|
|
@@ -7545,7 +7619,7 @@ var Search = ({
|
|
|
7545
7619
|
)
|
|
7546
7620
|
}
|
|
7547
7621
|
) : null,
|
|
7548
|
-
shouldRenderNoResults ? /* @__PURE__ */ (0,
|
|
7622
|
+
shouldRenderNoResults ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7549
7623
|
"div",
|
|
7550
7624
|
{
|
|
7551
7625
|
className: cn(
|
|
@@ -7555,7 +7629,7 @@ var Search = ({
|
|
|
7555
7629
|
"mt-1 w-full overflow-hidden rounded-agg-xl border border-agg-separator bg-agg-secondary py-10 shadow-[0px_8px_16px_0px_rgba(0,0,0,0.1)]",
|
|
7556
7630
|
classNames == null ? void 0 : classNames.emptyState
|
|
7557
7631
|
),
|
|
7558
|
-
children: /* @__PURE__ */ (0,
|
|
7632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
7559
7633
|
"div",
|
|
7560
7634
|
{
|
|
7561
7635
|
className: cn(
|
|
@@ -7565,15 +7639,15 @@ var Search = ({
|
|
|
7565
7639
|
role: "status",
|
|
7566
7640
|
"aria-live": "polite",
|
|
7567
7641
|
children: [
|
|
7568
|
-
/* @__PURE__ */ (0,
|
|
7642
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7569
7643
|
SearchEmptyIcon,
|
|
7570
7644
|
{
|
|
7571
7645
|
className: cn("h-10 w-10 text-agg-muted-foreground", classNames == null ? void 0 : classNames.emptyStateIcon),
|
|
7572
7646
|
"aria-hidden": true
|
|
7573
7647
|
}
|
|
7574
7648
|
),
|
|
7575
|
-
/* @__PURE__ */ (0,
|
|
7576
|
-
/* @__PURE__ */ (0,
|
|
7649
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "flex flex-col items-center gap-1 text-center", children: [
|
|
7650
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7577
7651
|
"p",
|
|
7578
7652
|
{
|
|
7579
7653
|
className: cn(
|
|
@@ -7584,7 +7658,7 @@ var Search = ({
|
|
|
7584
7658
|
children: labels.search.noResultsTitle
|
|
7585
7659
|
}
|
|
7586
7660
|
),
|
|
7587
|
-
/* @__PURE__ */ (0,
|
|
7661
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
7588
7662
|
"p",
|
|
7589
7663
|
{
|
|
7590
7664
|
className: cn(
|
|
@@ -7634,7 +7708,7 @@ var resolveHeaderSearchContent = ({
|
|
|
7634
7708
|
};
|
|
7635
7709
|
|
|
7636
7710
|
// src/primitives/header/index.tsx
|
|
7637
|
-
var
|
|
7711
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
7638
7712
|
var Header = ({
|
|
7639
7713
|
logo,
|
|
7640
7714
|
logoHref,
|
|
@@ -7646,8 +7720,8 @@ var Header = ({
|
|
|
7646
7720
|
sticky = true,
|
|
7647
7721
|
"aria-label": ariaLabel
|
|
7648
7722
|
}) => {
|
|
7649
|
-
const labels = (0,
|
|
7650
|
-
const logoContent = isHeaderLogoProps(logo) ? /* @__PURE__ */ (0,
|
|
7723
|
+
const labels = (0, import_hooks29.useLabels)();
|
|
7724
|
+
const logoContent = isHeaderLogoProps(logo) ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
7651
7725
|
"img",
|
|
7652
7726
|
{
|
|
7653
7727
|
src: logo.src,
|
|
@@ -7656,14 +7730,14 @@ var Header = ({
|
|
|
7656
7730
|
height: logo.height,
|
|
7657
7731
|
className: cn("block max-h-full", classNames == null ? void 0 : classNames.logoElement)
|
|
7658
7732
|
}
|
|
7659
|
-
) : logo !== void 0 ? /* @__PURE__ */ (0,
|
|
7733
|
+
) : logo !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: classNames == null ? void 0 : classNames.logoElement, children: logo }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
7660
7734
|
AggLogo,
|
|
7661
7735
|
{
|
|
7662
7736
|
className: cn("h-6 w-auto text-agg-foreground", classNames == null ? void 0 : classNames.logoElement),
|
|
7663
7737
|
title: labels.header.logoAria
|
|
7664
7738
|
}
|
|
7665
7739
|
);
|
|
7666
|
-
const wrappedLogo = logoHref ? /* @__PURE__ */ (0,
|
|
7740
|
+
const wrappedLogo = logoHref ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
7667
7741
|
"a",
|
|
7668
7742
|
{
|
|
7669
7743
|
href: logoHref,
|
|
@@ -7672,7 +7746,7 @@ var Header = ({
|
|
|
7672
7746
|
onClick: onLogoClick,
|
|
7673
7747
|
children: logoContent
|
|
7674
7748
|
}
|
|
7675
|
-
) : onLogoClick ? /* @__PURE__ */ (0,
|
|
7749
|
+
) : onLogoClick ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
7676
7750
|
"button",
|
|
7677
7751
|
{
|
|
7678
7752
|
type: "button",
|
|
@@ -7684,13 +7758,13 @@ var Header = ({
|
|
|
7684
7758
|
onClick: onLogoClick,
|
|
7685
7759
|
children: logoContent
|
|
7686
7760
|
}
|
|
7687
|
-
) : /* @__PURE__ */ (0,
|
|
7761
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: classNames == null ? void 0 : classNames.logoWrapper, children: logoContent });
|
|
7688
7762
|
const searchContent = resolveHeaderSearchContent({
|
|
7689
7763
|
search,
|
|
7690
7764
|
searchProps,
|
|
7691
|
-
renderSearch: (nextSearchProps) => /* @__PURE__ */ (0,
|
|
7765
|
+
renderSearch: (nextSearchProps) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Search, __spreadValues({}, nextSearchProps))
|
|
7692
7766
|
});
|
|
7693
|
-
return /* @__PURE__ */ (0,
|
|
7767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_jsx_runtime125.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
7694
7768
|
"header",
|
|
7695
7769
|
{
|
|
7696
7770
|
role: "banner",
|
|
@@ -7699,7 +7773,7 @@ var Header = ({
|
|
|
7699
7773
|
fallbackLabel: labels.header.bannerAria
|
|
7700
7774
|
}),
|
|
7701
7775
|
className: cn(baseHeaderClasses, sticky && stickyHeaderClasses, classNames == null ? void 0 : classNames.root),
|
|
7702
|
-
children: /* @__PURE__ */ (0,
|
|
7776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
7703
7777
|
"div",
|
|
7704
7778
|
{
|
|
7705
7779
|
className: cn(
|
|
@@ -7707,7 +7781,7 @@ var Header = ({
|
|
|
7707
7781
|
classNames == null ? void 0 : classNames.inner
|
|
7708
7782
|
),
|
|
7709
7783
|
children: [
|
|
7710
|
-
/* @__PURE__ */ (0,
|
|
7784
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
7711
7785
|
"div",
|
|
7712
7786
|
{
|
|
7713
7787
|
className: cn(
|
|
@@ -7717,7 +7791,7 @@ var Header = ({
|
|
|
7717
7791
|
children: wrappedLogo
|
|
7718
7792
|
}
|
|
7719
7793
|
),
|
|
7720
|
-
searchContent ? /* @__PURE__ */ (0,
|
|
7794
|
+
searchContent ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
7721
7795
|
"div",
|
|
7722
7796
|
{
|
|
7723
7797
|
className: cn(
|
|
@@ -7728,7 +7802,7 @@ var Header = ({
|
|
|
7728
7802
|
children: searchContent
|
|
7729
7803
|
}
|
|
7730
7804
|
) : null,
|
|
7731
|
-
/* @__PURE__ */ (0,
|
|
7805
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
7732
7806
|
"div",
|
|
7733
7807
|
{
|
|
7734
7808
|
className: cn(
|
|
@@ -7791,7 +7865,7 @@ var resolveInlineAlertHasAction = ({
|
|
|
7791
7865
|
};
|
|
7792
7866
|
|
|
7793
7867
|
// src/primitives/inline-alert/index.tsx
|
|
7794
|
-
var
|
|
7868
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
7795
7869
|
var InlineAlert = ({
|
|
7796
7870
|
tone = INLINE_ALERT_DEFAULT_TONE,
|
|
7797
7871
|
variant,
|
|
@@ -7805,7 +7879,7 @@ var InlineAlert = ({
|
|
|
7805
7879
|
const resolvedVariant = resolveInlineAlertVariant({ tone, variant });
|
|
7806
7880
|
const hasAction = resolveInlineAlertHasAction({ actionLabel, onAction });
|
|
7807
7881
|
const { ariaLive, role } = INLINE_ALERT_LIVE_REGION_CONFIG[tone];
|
|
7808
|
-
return /* @__PURE__ */ (0,
|
|
7882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
7809
7883
|
"div",
|
|
7810
7884
|
{
|
|
7811
7885
|
className: cn(
|
|
@@ -7817,7 +7891,7 @@ var InlineAlert = ({
|
|
|
7817
7891
|
"aria-live": ariaLive,
|
|
7818
7892
|
"aria-label": ariaLabel,
|
|
7819
7893
|
children: [
|
|
7820
|
-
/* @__PURE__ */ (0,
|
|
7894
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
7821
7895
|
Icon,
|
|
7822
7896
|
{
|
|
7823
7897
|
name: INLINE_ALERT_TONE_ICON_NAME[tone],
|
|
@@ -7825,14 +7899,14 @@ var InlineAlert = ({
|
|
|
7825
7899
|
"aria-hidden": "true"
|
|
7826
7900
|
}
|
|
7827
7901
|
),
|
|
7828
|
-
/* @__PURE__ */ (0,
|
|
7902
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
7829
7903
|
"div",
|
|
7830
7904
|
{
|
|
7831
7905
|
className: cn(
|
|
7832
7906
|
"min-w-0",
|
|
7833
7907
|
resolvedVariant === "plain" && !hasAction ? "flex-none text-center" : "flex-1"
|
|
7834
7908
|
),
|
|
7835
|
-
children: /* @__PURE__ */ (0,
|
|
7909
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
7836
7910
|
"div",
|
|
7837
7911
|
{
|
|
7838
7912
|
className: cn(
|
|
@@ -7841,14 +7915,14 @@ var InlineAlert = ({
|
|
|
7841
7915
|
resolvedVariant === "plain" && !hasAction ? "items-center" : null
|
|
7842
7916
|
),
|
|
7843
7917
|
children: [
|
|
7844
|
-
title2 ? /* @__PURE__ */ (0,
|
|
7845
|
-
/* @__PURE__ */ (0,
|
|
7918
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: title2 }) : null,
|
|
7919
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground wrap-break-word", children: message })
|
|
7846
7920
|
]
|
|
7847
7921
|
}
|
|
7848
7922
|
)
|
|
7849
7923
|
}
|
|
7850
7924
|
),
|
|
7851
|
-
hasAction ? /* @__PURE__ */ (0,
|
|
7925
|
+
hasAction ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
7852
7926
|
"button",
|
|
7853
7927
|
{
|
|
7854
7928
|
type: "button",
|
|
@@ -7868,7 +7942,7 @@ var InlineAlert = ({
|
|
|
7868
7942
|
InlineAlert.displayName = "InlineAlert";
|
|
7869
7943
|
|
|
7870
7944
|
// src/primitives/loading-icon/index.tsx
|
|
7871
|
-
var
|
|
7945
|
+
var import_hooks30 = require("@agg-build/hooks");
|
|
7872
7946
|
|
|
7873
7947
|
// src/primitives/loading-icon/loading-icon.constants.ts
|
|
7874
7948
|
var LOADING_ICON_DEFAULT_SIZE = "medium";
|
|
@@ -7886,18 +7960,18 @@ var resolveLoadingIconAriaLabel = ({
|
|
|
7886
7960
|
};
|
|
7887
7961
|
|
|
7888
7962
|
// src/primitives/loading-icon/index.tsx
|
|
7889
|
-
var
|
|
7963
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
7890
7964
|
var LoadingIcon = ({
|
|
7891
7965
|
size = LOADING_ICON_DEFAULT_SIZE,
|
|
7892
7966
|
variant = "default",
|
|
7893
7967
|
className,
|
|
7894
7968
|
ariaLabel
|
|
7895
7969
|
}) => {
|
|
7896
|
-
const labels = (0,
|
|
7970
|
+
const labels = (0, import_hooks30.useLabels)();
|
|
7897
7971
|
const {
|
|
7898
7972
|
features: { enableAnimations }
|
|
7899
|
-
} = (0,
|
|
7900
|
-
return /* @__PURE__ */ (0,
|
|
7973
|
+
} = (0, import_hooks30.useSdkUiConfig)();
|
|
7974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
7901
7975
|
"span",
|
|
7902
7976
|
{
|
|
7903
7977
|
role: "status",
|
|
@@ -7910,7 +7984,7 @@ var LoadingIcon = ({
|
|
|
7910
7984
|
"inline-grid place-items-center text-agg-primary will-change-transform",
|
|
7911
7985
|
className
|
|
7912
7986
|
),
|
|
7913
|
-
children: /* @__PURE__ */ (0,
|
|
7987
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "inline-grid place-items-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
7914
7988
|
"svg",
|
|
7915
7989
|
{
|
|
7916
7990
|
viewBox: LOADING_ICON_SVG_VIEW_BOX,
|
|
@@ -7918,8 +7992,8 @@ var LoadingIcon = ({
|
|
|
7918
7992
|
"block",
|
|
7919
7993
|
variant === "prominent" ? LOADING_ICON_PROMINENT_FRAME_CLASS : iconSizeClasses[size]
|
|
7920
7994
|
),
|
|
7921
|
-
children: variant === "prominent" ? /* @__PURE__ */ (0,
|
|
7922
|
-
enableAnimations ? /* @__PURE__ */ (0,
|
|
7995
|
+
children: variant === "prominent" ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("g", { children: [
|
|
7996
|
+
enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
7923
7997
|
"animateTransform",
|
|
7924
7998
|
{
|
|
7925
7999
|
attributeName: "transform",
|
|
@@ -7931,7 +8005,7 @@ var LoadingIcon = ({
|
|
|
7931
8005
|
repeatCount: "indefinite"
|
|
7932
8006
|
}
|
|
7933
8007
|
) : null,
|
|
7934
|
-
/* @__PURE__ */ (0,
|
|
8008
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
7935
8009
|
"circle",
|
|
7936
8010
|
{
|
|
7937
8011
|
cx: "22",
|
|
@@ -7945,8 +8019,8 @@ var LoadingIcon = ({
|
|
|
7945
8019
|
strokeDasharray: LOADING_ICON_PROMINENT_DASHARRAY
|
|
7946
8020
|
}
|
|
7947
8021
|
)
|
|
7948
|
-
] }) : /* @__PURE__ */ (0,
|
|
7949
|
-
enableAnimations ? /* @__PURE__ */ (0,
|
|
8022
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("g", { children: [
|
|
8023
|
+
enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
7950
8024
|
"animateTransform",
|
|
7951
8025
|
{
|
|
7952
8026
|
attributeName: "transform",
|
|
@@ -7958,7 +8032,7 @@ var LoadingIcon = ({
|
|
|
7958
8032
|
repeatCount: "indefinite"
|
|
7959
8033
|
}
|
|
7960
8034
|
) : null,
|
|
7961
|
-
/* @__PURE__ */ (0,
|
|
8035
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
7962
8036
|
"circle",
|
|
7963
8037
|
{
|
|
7964
8038
|
cx: "22",
|
|
@@ -7970,8 +8044,8 @@ var LoadingIcon = ({
|
|
|
7970
8044
|
strokeLinecap: "round",
|
|
7971
8045
|
strokeDasharray: "60 100",
|
|
7972
8046
|
strokeDashoffset: "0",
|
|
7973
|
-
children: enableAnimations ? /* @__PURE__ */ (0,
|
|
7974
|
-
/* @__PURE__ */ (0,
|
|
8047
|
+
children: enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
|
|
8048
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
7975
8049
|
"animate",
|
|
7976
8050
|
{
|
|
7977
8051
|
attributeName: "stroke-dasharray",
|
|
@@ -7980,7 +8054,7 @@ var LoadingIcon = ({
|
|
|
7980
8054
|
repeatCount: "indefinite"
|
|
7981
8055
|
}
|
|
7982
8056
|
),
|
|
7983
|
-
/* @__PURE__ */ (0,
|
|
8057
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
7984
8058
|
"animate",
|
|
7985
8059
|
{
|
|
7986
8060
|
attributeName: "stroke-dashoffset",
|
|
@@ -8001,7 +8075,7 @@ var LoadingIcon = ({
|
|
|
8001
8075
|
LoadingIcon.displayName = "LoadingIcon";
|
|
8002
8076
|
|
|
8003
8077
|
// src/primitives/modal/index.tsx
|
|
8004
|
-
var
|
|
8078
|
+
var import_hooks31 = require("@agg-build/hooks");
|
|
8005
8079
|
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
8006
8080
|
|
|
8007
8081
|
// src/primitives/modal/modal.constants.ts
|
|
@@ -8025,7 +8099,7 @@ var resolveModalCloseIcon = ({
|
|
|
8025
8099
|
};
|
|
8026
8100
|
|
|
8027
8101
|
// src/primitives/modal/index.tsx
|
|
8028
|
-
var
|
|
8102
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
8029
8103
|
var Modal = ({
|
|
8030
8104
|
open,
|
|
8031
8105
|
onOpenChange,
|
|
@@ -8033,7 +8107,7 @@ var Modal = ({
|
|
|
8033
8107
|
"aria-label": _ariaLabel,
|
|
8034
8108
|
"aria-labelledby": _ariaLabelledBy
|
|
8035
8109
|
}) => {
|
|
8036
|
-
return /* @__PURE__ */ (0,
|
|
8110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Dialog.Root, { open, onOpenChange, children });
|
|
8037
8111
|
};
|
|
8038
8112
|
var ModalContainer = ({
|
|
8039
8113
|
children,
|
|
@@ -8045,11 +8119,11 @@ var ModalContainer = ({
|
|
|
8045
8119
|
const {
|
|
8046
8120
|
general: { rootClassName },
|
|
8047
8121
|
features: { enableAnimations }
|
|
8048
|
-
} = (0,
|
|
8122
|
+
} = (0, import_hooks31.useSdkUiConfig)();
|
|
8049
8123
|
const overlayAnimationClassName = resolveModalOverlayAnimationClassName(enableAnimations);
|
|
8050
8124
|
const panelAnimationClassName = resolveModalPanelAnimationClassName(enableAnimations);
|
|
8051
|
-
return /* @__PURE__ */ (0,
|
|
8052
|
-
/* @__PURE__ */ (0,
|
|
8125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Dialog.Portal, { children: [
|
|
8126
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8053
8127
|
Dialog.Overlay,
|
|
8054
8128
|
{
|
|
8055
8129
|
className: cn(
|
|
@@ -8060,7 +8134,7 @@ var ModalContainer = ({
|
|
|
8060
8134
|
)
|
|
8061
8135
|
}
|
|
8062
8136
|
),
|
|
8063
|
-
/* @__PURE__ */ (0,
|
|
8137
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8064
8138
|
Dialog.Content,
|
|
8065
8139
|
{
|
|
8066
8140
|
className: cn(
|
|
@@ -8086,7 +8160,7 @@ var ModalContainer = ({
|
|
|
8086
8160
|
event.preventDefault();
|
|
8087
8161
|
}
|
|
8088
8162
|
},
|
|
8089
|
-
children: /* @__PURE__ */ (0,
|
|
8163
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8090
8164
|
"div",
|
|
8091
8165
|
{
|
|
8092
8166
|
className: cn(
|
|
@@ -8094,7 +8168,7 @@ var ModalContainer = ({
|
|
|
8094
8168
|
"items-end md:items-center",
|
|
8095
8169
|
"flex h-full min-h-0 w-full justify-center p-0 md:p-5"
|
|
8096
8170
|
),
|
|
8097
|
-
children: /* @__PURE__ */ (0,
|
|
8171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8098
8172
|
"div",
|
|
8099
8173
|
{
|
|
8100
8174
|
className: cn(
|
|
@@ -8134,14 +8208,14 @@ var ModalHeader = ({
|
|
|
8134
8208
|
}) => {
|
|
8135
8209
|
const {
|
|
8136
8210
|
features: { enableAnimations }
|
|
8137
|
-
} = (0,
|
|
8138
|
-
const labels = (0,
|
|
8139
|
-
const defaultCloseIcon = /* @__PURE__ */ (0,
|
|
8211
|
+
} = (0, import_hooks31.useSdkUiConfig)();
|
|
8212
|
+
const labels = (0, import_hooks31.useLabels)();
|
|
8213
|
+
const defaultCloseIcon = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(CloseIcon, { className: "h-6 w-6" });
|
|
8140
8214
|
const resolvedCloseIcon = resolveModalCloseIcon({
|
|
8141
8215
|
closeIcon,
|
|
8142
8216
|
defaultCloseIcon
|
|
8143
8217
|
});
|
|
8144
|
-
return /* @__PURE__ */ (0,
|
|
8218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
8145
8219
|
"div",
|
|
8146
8220
|
{
|
|
8147
8221
|
className: cn(
|
|
@@ -8154,7 +8228,7 @@ var ModalHeader = ({
|
|
|
8154
8228
|
classNames == null ? void 0 : classNames.root
|
|
8155
8229
|
),
|
|
8156
8230
|
children: [
|
|
8157
|
-
/* @__PURE__ */ (0,
|
|
8231
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
8158
8232
|
"div",
|
|
8159
8233
|
{
|
|
8160
8234
|
className: cn(
|
|
@@ -8167,8 +8241,8 @@ var ModalHeader = ({
|
|
|
8167
8241
|
classNames == null ? void 0 : classNames.container
|
|
8168
8242
|
),
|
|
8169
8243
|
children: [
|
|
8170
|
-
leftElement ? /* @__PURE__ */ (0,
|
|
8171
|
-
/* @__PURE__ */ (0,
|
|
8244
|
+
leftElement ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_jsx_runtime128.Fragment, { children: leftElement }) : null,
|
|
8245
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
8172
8246
|
"div",
|
|
8173
8247
|
{
|
|
8174
8248
|
className: cn(
|
|
@@ -8177,7 +8251,7 @@ var ModalHeader = ({
|
|
|
8177
8251
|
classNames == null ? void 0 : classNames.titleContainer
|
|
8178
8252
|
),
|
|
8179
8253
|
children: [
|
|
8180
|
-
/* @__PURE__ */ (0,
|
|
8254
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8181
8255
|
Dialog.Title,
|
|
8182
8256
|
{
|
|
8183
8257
|
className: cn(
|
|
@@ -8191,7 +8265,7 @@ var ModalHeader = ({
|
|
|
8191
8265
|
children: title2
|
|
8192
8266
|
}
|
|
8193
8267
|
),
|
|
8194
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
8268
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8195
8269
|
"span",
|
|
8196
8270
|
{
|
|
8197
8271
|
className: cn(
|
|
@@ -8205,9 +8279,9 @@ var ModalHeader = ({
|
|
|
8205
8279
|
]
|
|
8206
8280
|
}
|
|
8207
8281
|
),
|
|
8208
|
-
/* @__PURE__ */ (0,
|
|
8209
|
-
rightElement ? /* @__PURE__ */ (0,
|
|
8210
|
-
!hideClose && /* @__PURE__ */ (0,
|
|
8282
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "agg-modal-header-actions flex flex-row items-center justify-end gap-6", children: [
|
|
8283
|
+
rightElement ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_jsx_runtime128.Fragment, { children: rightElement }) : null,
|
|
8284
|
+
!hideClose && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8211
8285
|
Dialog.Close,
|
|
8212
8286
|
{
|
|
8213
8287
|
className: cn(
|
|
@@ -8224,14 +8298,14 @@ var ModalHeader = ({
|
|
|
8224
8298
|
]
|
|
8225
8299
|
}
|
|
8226
8300
|
),
|
|
8227
|
-
children ? /* @__PURE__ */ (0,
|
|
8301
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "agg-modal-header-extra", children }) : null
|
|
8228
8302
|
]
|
|
8229
8303
|
}
|
|
8230
8304
|
);
|
|
8231
8305
|
};
|
|
8232
8306
|
Modal.Header = ModalHeader;
|
|
8233
8307
|
var ModalBody = ({ children, classNames }) => {
|
|
8234
|
-
return /* @__PURE__ */ (0,
|
|
8308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8235
8309
|
"div",
|
|
8236
8310
|
{
|
|
8237
8311
|
className: cn(
|
|
@@ -8252,7 +8326,7 @@ var ModalFooter = ({
|
|
|
8252
8326
|
classNames,
|
|
8253
8327
|
hideBorder = false
|
|
8254
8328
|
}) => {
|
|
8255
|
-
return /* @__PURE__ */ (0,
|
|
8329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
8256
8330
|
"div",
|
|
8257
8331
|
{
|
|
8258
8332
|
className: cn(
|
|
@@ -8274,8 +8348,8 @@ Modal.displayName = "Modal";
|
|
|
8274
8348
|
|
|
8275
8349
|
// src/primitives/number-value.tsx
|
|
8276
8350
|
var import_react10 = require("react");
|
|
8277
|
-
var
|
|
8278
|
-
var
|
|
8351
|
+
var import_hooks32 = require("@agg-build/hooks");
|
|
8352
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
8279
8353
|
var NumberValue = ({
|
|
8280
8354
|
value,
|
|
8281
8355
|
format = "number",
|
|
@@ -8285,7 +8359,7 @@ var NumberValue = ({
|
|
|
8285
8359
|
}) => {
|
|
8286
8360
|
const {
|
|
8287
8361
|
formatting: { formatCompactCurrency, formatCurrency, formatDate, formatNumber, formatPercent }
|
|
8288
|
-
} = (0,
|
|
8362
|
+
} = (0, import_hooks32.useSdkUiConfig)();
|
|
8289
8363
|
const formatted = (0, import_react10.useMemo)(() => {
|
|
8290
8364
|
if (value == null) return fallback;
|
|
8291
8365
|
if (format === "date") {
|
|
@@ -8309,12 +8383,12 @@ var NumberValue = ({
|
|
|
8309
8383
|
formatPercent,
|
|
8310
8384
|
value
|
|
8311
8385
|
]);
|
|
8312
|
-
return /* @__PURE__ */ (0,
|
|
8386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: cn("font-agg-sans", className), "aria-label": ariaLabel, children: formatted });
|
|
8313
8387
|
};
|
|
8314
8388
|
NumberValue.displayName = "NumberValue";
|
|
8315
8389
|
|
|
8316
8390
|
// src/primitives/select/index.tsx
|
|
8317
|
-
var
|
|
8391
|
+
var import_hooks33 = require("@agg-build/hooks");
|
|
8318
8392
|
var import_react11 = require("react");
|
|
8319
8393
|
var import_react_dom = require("react-dom");
|
|
8320
8394
|
|
|
@@ -8336,7 +8410,7 @@ var resolveIsSelectDisabled = ({
|
|
|
8336
8410
|
};
|
|
8337
8411
|
|
|
8338
8412
|
// src/primitives/select/index.tsx
|
|
8339
|
-
var
|
|
8413
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
8340
8414
|
var SELECT_DROPDOWN_Z = 1e4;
|
|
8341
8415
|
function resolveSelectPortalContainer(triggerRoot) {
|
|
8342
8416
|
var _a, _b;
|
|
@@ -8359,11 +8433,11 @@ var Select = ({
|
|
|
8359
8433
|
contentSideOffset = 8
|
|
8360
8434
|
}) => {
|
|
8361
8435
|
var _a;
|
|
8362
|
-
const labels = (0,
|
|
8436
|
+
const labels = (0, import_hooks33.useLabels)();
|
|
8363
8437
|
const {
|
|
8364
8438
|
general: { rootClassName },
|
|
8365
8439
|
features: { enableAnimations }
|
|
8366
|
-
} = (0,
|
|
8440
|
+
} = (0, import_hooks33.useSdkUiConfig)();
|
|
8367
8441
|
const isDisabled = resolveIsSelectDisabled({ disabled, items });
|
|
8368
8442
|
const selectedItem = resolveSelectedItem(items, value);
|
|
8369
8443
|
const [isOpen, setIsOpen] = (0, import_react11.useState)(false);
|
|
@@ -8455,7 +8529,7 @@ var Select = ({
|
|
|
8455
8529
|
};
|
|
8456
8530
|
const isInline = variant === "inline";
|
|
8457
8531
|
const triggerRadiusClass = triggerClassName != null ? triggerClassName : isInline ? "rounded-agg-sm" : "rounded-agg-md";
|
|
8458
|
-
const listbox = menuRect ? /* @__PURE__ */ (0,
|
|
8532
|
+
const listbox = menuRect ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
8459
8533
|
"div",
|
|
8460
8534
|
{
|
|
8461
8535
|
ref: portalRef,
|
|
@@ -8483,7 +8557,7 @@ var Select = ({
|
|
|
8483
8557
|
const isSelected = item.value === value;
|
|
8484
8558
|
const isHidden = item.hidden === true;
|
|
8485
8559
|
if (isHidden) return null;
|
|
8486
|
-
return /* @__PURE__ */ (0,
|
|
8560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
8487
8561
|
"button",
|
|
8488
8562
|
{
|
|
8489
8563
|
type: "button",
|
|
@@ -8507,14 +8581,14 @@ var Select = ({
|
|
|
8507
8581
|
handleClose();
|
|
8508
8582
|
},
|
|
8509
8583
|
children: [
|
|
8510
|
-
isInline && isSelected ? /* @__PURE__ */ (0,
|
|
8584
|
+
isInline && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
8511
8585
|
"span",
|
|
8512
8586
|
{
|
|
8513
8587
|
className: "agg-select-item-indicator absolute bottom-2 left-0 top-2 w-1 bg-agg-primary",
|
|
8514
8588
|
"aria-hidden": true
|
|
8515
8589
|
}
|
|
8516
8590
|
) : null,
|
|
8517
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
8591
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
8518
8592
|
"span",
|
|
8519
8593
|
{
|
|
8520
8594
|
className: cn(
|
|
@@ -8523,7 +8597,7 @@ var Select = ({
|
|
|
8523
8597
|
),
|
|
8524
8598
|
children: item.icon
|
|
8525
8599
|
}
|
|
8526
|
-
) : item.iconUrl ? /* @__PURE__ */ (0,
|
|
8600
|
+
) : item.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
8527
8601
|
RemoteImage,
|
|
8528
8602
|
{
|
|
8529
8603
|
src: item.iconUrl,
|
|
@@ -8531,7 +8605,7 @@ var Select = ({
|
|
|
8531
8605
|
className: "agg-select-item-icon h-4 w-4 shrink-0 rounded-sm object-contain"
|
|
8532
8606
|
}
|
|
8533
8607
|
) : null,
|
|
8534
|
-
/* @__PURE__ */ (0,
|
|
8608
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "agg-select-item-label truncate", children: item.label })
|
|
8535
8609
|
]
|
|
8536
8610
|
},
|
|
8537
8611
|
item.value
|
|
@@ -8539,7 +8613,7 @@ var Select = ({
|
|
|
8539
8613
|
})
|
|
8540
8614
|
}
|
|
8541
8615
|
) : null;
|
|
8542
|
-
return /* @__PURE__ */ (0,
|
|
8616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
8543
8617
|
"div",
|
|
8544
8618
|
{
|
|
8545
8619
|
ref: containerRef,
|
|
@@ -8549,7 +8623,7 @@ var Select = ({
|
|
|
8549
8623
|
className
|
|
8550
8624
|
),
|
|
8551
8625
|
children: [
|
|
8552
|
-
/* @__PURE__ */ (0,
|
|
8626
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
8553
8627
|
"button",
|
|
8554
8628
|
{
|
|
8555
8629
|
type: "button",
|
|
@@ -8573,7 +8647,7 @@ var Select = ({
|
|
|
8573
8647
|
onPointerEnter: handlePointerEnter,
|
|
8574
8648
|
onPointerLeave: handlePointerLeave,
|
|
8575
8649
|
children: [
|
|
8576
|
-
(selectedItem == null ? void 0 : selectedItem.icon) ? /* @__PURE__ */ (0,
|
|
8650
|
+
(selectedItem == null ? void 0 : selectedItem.icon) ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "h-4 w-4 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: selectedItem.icon }) : (selectedItem == null ? void 0 : selectedItem.iconUrl) ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
8577
8651
|
RemoteImage,
|
|
8578
8652
|
{
|
|
8579
8653
|
src: selectedItem.iconUrl,
|
|
@@ -8581,18 +8655,18 @@ var Select = ({
|
|
|
8581
8655
|
className: "agg-select-icon h-4 w-4 shrink-0 rounded-sm object-contain"
|
|
8582
8656
|
}
|
|
8583
8657
|
) : null,
|
|
8584
|
-
/* @__PURE__ */ (0,
|
|
8658
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "agg-select-value flex-1 truncate", children: (_a = selectedItem == null ? void 0 : selectedItem.label) != null ? _a : "" })
|
|
8585
8659
|
]
|
|
8586
8660
|
}
|
|
8587
8661
|
),
|
|
8588
|
-
/* @__PURE__ */ (0,
|
|
8662
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
8589
8663
|
"span",
|
|
8590
8664
|
{
|
|
8591
8665
|
className: cn(
|
|
8592
8666
|
"agg-select-chevron pointer-events-none absolute inset-y-0 inline-flex items-center justify-center",
|
|
8593
8667
|
isInline ? "right-2 text-agg-foreground" : "right-3 text-agg-muted-foreground"
|
|
8594
8668
|
),
|
|
8595
|
-
children: /* @__PURE__ */ (0,
|
|
8669
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
8596
8670
|
Icon,
|
|
8597
8671
|
{
|
|
8598
8672
|
name: isOpen ? "chevron-up" : "chevron-down-thin",
|
|
@@ -8611,7 +8685,7 @@ Select.displayName = "Select";
|
|
|
8611
8685
|
|
|
8612
8686
|
// src/primitives/state-message/index.tsx
|
|
8613
8687
|
var import_react12 = require("react");
|
|
8614
|
-
var
|
|
8688
|
+
var import_hooks34 = require("@agg-build/hooks");
|
|
8615
8689
|
|
|
8616
8690
|
// src/primitives/typography/typography.constants.ts
|
|
8617
8691
|
var typographyVariants = [
|
|
@@ -8708,7 +8782,7 @@ var getTypographyClassName = ({
|
|
|
8708
8782
|
};
|
|
8709
8783
|
|
|
8710
8784
|
// src/primitives/typography/index.tsx
|
|
8711
|
-
var
|
|
8785
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
8712
8786
|
var Typography = ({
|
|
8713
8787
|
as: Component2 = "p",
|
|
8714
8788
|
variant = "body",
|
|
@@ -8716,7 +8790,7 @@ var Typography = ({
|
|
|
8716
8790
|
children,
|
|
8717
8791
|
"aria-label": ariaLabel
|
|
8718
8792
|
}) => {
|
|
8719
|
-
return /* @__PURE__ */ (0,
|
|
8793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Component2, { className: getTypographyClassName({ className, variant }), "aria-label": ariaLabel, children });
|
|
8720
8794
|
};
|
|
8721
8795
|
Typography.displayName = "Typography";
|
|
8722
8796
|
|
|
@@ -8729,7 +8803,7 @@ var resolveStateMessageHasAction = ({ onAction }) => {
|
|
|
8729
8803
|
};
|
|
8730
8804
|
|
|
8731
8805
|
// src/primitives/state-message/index.tsx
|
|
8732
|
-
var
|
|
8806
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
8733
8807
|
var StateMessage = (_a) => {
|
|
8734
8808
|
var _b = _a, {
|
|
8735
8809
|
icon,
|
|
@@ -8744,13 +8818,13 @@ var StateMessage = (_a) => {
|
|
|
8744
8818
|
"onAction",
|
|
8745
8819
|
"classNames"
|
|
8746
8820
|
]);
|
|
8747
|
-
const labels = (0,
|
|
8821
|
+
const labels = (0, import_hooks34.useLabels)();
|
|
8748
8822
|
const hasAction = resolveStateMessageHasAction({ onAction });
|
|
8749
8823
|
const resolvedIcon = (0, import_react12.cloneElement)(icon, {
|
|
8750
8824
|
className: cn(STATE_MESSAGE_ICON_CLASS_NAME, icon.props.className, classNames == null ? void 0 : classNames.icon),
|
|
8751
8825
|
"aria-hidden": true
|
|
8752
8826
|
});
|
|
8753
|
-
return /* @__PURE__ */ (0,
|
|
8827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8754
8828
|
"div",
|
|
8755
8829
|
__spreadProps(__spreadValues({}, rest), {
|
|
8756
8830
|
className: cn(
|
|
@@ -8761,7 +8835,7 @@ var StateMessage = (_a) => {
|
|
|
8761
8835
|
role: "status",
|
|
8762
8836
|
"aria-live": "polite",
|
|
8763
8837
|
"aria-label": title2,
|
|
8764
|
-
children: /* @__PURE__ */ (0,
|
|
8838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
8765
8839
|
"div",
|
|
8766
8840
|
{
|
|
8767
8841
|
className: cn(
|
|
@@ -8770,7 +8844,7 @@ var StateMessage = (_a) => {
|
|
|
8770
8844
|
),
|
|
8771
8845
|
children: [
|
|
8772
8846
|
resolvedIcon,
|
|
8773
|
-
/* @__PURE__ */ (0,
|
|
8847
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
8774
8848
|
"div",
|
|
8775
8849
|
{
|
|
8776
8850
|
className: cn(
|
|
@@ -8778,8 +8852,8 @@ var StateMessage = (_a) => {
|
|
|
8778
8852
|
classNames == null ? void 0 : classNames.text
|
|
8779
8853
|
),
|
|
8780
8854
|
children: [
|
|
8781
|
-
/* @__PURE__ */ (0,
|
|
8782
|
-
description ? /* @__PURE__ */ (0,
|
|
8855
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Typography, { variant: "body-strong", className: classNames == null ? void 0 : classNames.title, children: title2 }),
|
|
8856
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8783
8857
|
Typography,
|
|
8784
8858
|
{
|
|
8785
8859
|
variant: "label",
|
|
@@ -8790,7 +8864,7 @@ var StateMessage = (_a) => {
|
|
|
8790
8864
|
]
|
|
8791
8865
|
}
|
|
8792
8866
|
),
|
|
8793
|
-
hasAction ? /* @__PURE__ */ (0,
|
|
8867
|
+
hasAction ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8794
8868
|
Button,
|
|
8795
8869
|
{
|
|
8796
8870
|
variant: "tertiary",
|
|
@@ -8817,7 +8891,7 @@ var StateMessage = (_a) => {
|
|
|
8817
8891
|
StateMessage.displayName = "StateMessage";
|
|
8818
8892
|
|
|
8819
8893
|
// src/primitives/tabs/index.tsx
|
|
8820
|
-
var
|
|
8894
|
+
var import_hooks35 = require("@agg-build/hooks");
|
|
8821
8895
|
var import_react14 = require("react");
|
|
8822
8896
|
|
|
8823
8897
|
// src/shared/use-horizontal-scroll-state.ts
|
|
@@ -8892,7 +8966,7 @@ var findEdgeEnabledIndex = (items, direction) => {
|
|
|
8892
8966
|
};
|
|
8893
8967
|
|
|
8894
8968
|
// src/primitives/tabs/index.tsx
|
|
8895
|
-
var
|
|
8969
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
8896
8970
|
var getTabButtonClassName = ({
|
|
8897
8971
|
enableAnimations,
|
|
8898
8972
|
isBarVariant,
|
|
@@ -8935,10 +9009,10 @@ var Tabs = ({
|
|
|
8935
9009
|
className,
|
|
8936
9010
|
classNames
|
|
8937
9011
|
}) => {
|
|
8938
|
-
const labels = (0,
|
|
9012
|
+
const labels = (0, import_hooks35.useLabels)();
|
|
8939
9013
|
const {
|
|
8940
9014
|
features: { enableAnimations }
|
|
8941
|
-
} = (0,
|
|
9015
|
+
} = (0, import_hooks35.useSdkUiConfig)();
|
|
8942
9016
|
const buttonRefs = (0, import_react14.useRef)([]);
|
|
8943
9017
|
const dragStateRef = (0, import_react14.useRef)({
|
|
8944
9018
|
isPointerDown: false,
|
|
@@ -9152,7 +9226,7 @@ var Tabs = ({
|
|
|
9152
9226
|
width: activeButton.offsetWidth,
|
|
9153
9227
|
opacity: 1
|
|
9154
9228
|
});
|
|
9155
|
-
}, [isBarVariant, renderedItems, value]);
|
|
9229
|
+
}, [isBarVariant, renderedItems, tabListRef, value]);
|
|
9156
9230
|
(0, import_react14.useLayoutEffect)(() => {
|
|
9157
9231
|
updateActiveUnderline();
|
|
9158
9232
|
}, [updateActiveUnderline]);
|
|
@@ -9211,9 +9285,16 @@ var Tabs = ({
|
|
|
9211
9285
|
requestAnimationFrame(() => {
|
|
9212
9286
|
updateScrollState();
|
|
9213
9287
|
});
|
|
9214
|
-
}, [
|
|
9288
|
+
}, [
|
|
9289
|
+
enableAnimations,
|
|
9290
|
+
renderedItems,
|
|
9291
|
+
shouldUseOverflowScroll,
|
|
9292
|
+
tabListRef,
|
|
9293
|
+
updateScrollState,
|
|
9294
|
+
value
|
|
9295
|
+
]);
|
|
9215
9296
|
if (shouldUseOverflowSelect) {
|
|
9216
|
-
return /* @__PURE__ */ (0,
|
|
9297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: cn("group/agg-tabs w-full", className, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9217
9298
|
Select,
|
|
9218
9299
|
{
|
|
9219
9300
|
ariaLabel,
|
|
@@ -9225,7 +9306,7 @@ var Tabs = ({
|
|
|
9225
9306
|
}
|
|
9226
9307
|
) });
|
|
9227
9308
|
}
|
|
9228
|
-
return /* @__PURE__ */ (0,
|
|
9309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
9229
9310
|
"div",
|
|
9230
9311
|
{
|
|
9231
9312
|
className: cn(
|
|
@@ -9236,7 +9317,7 @@ var Tabs = ({
|
|
|
9236
9317
|
classNames == null ? void 0 : classNames.root
|
|
9237
9318
|
),
|
|
9238
9319
|
children: [
|
|
9239
|
-
/* @__PURE__ */ (0,
|
|
9320
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
9240
9321
|
"div",
|
|
9241
9322
|
{
|
|
9242
9323
|
ref: tabListRef,
|
|
@@ -9250,7 +9331,7 @@ var Tabs = ({
|
|
|
9250
9331
|
onPointerUp: handleEndTabListDrag,
|
|
9251
9332
|
onWheel: handleTabListWheel,
|
|
9252
9333
|
children: [
|
|
9253
|
-
shouldUseOverflowScroll && !isBarVariant && hasOverflow ? /* @__PURE__ */ (0,
|
|
9334
|
+
shouldUseOverflowScroll && !isBarVariant && hasOverflow ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9254
9335
|
"span",
|
|
9255
9336
|
{
|
|
9256
9337
|
"aria-hidden": true,
|
|
@@ -9261,7 +9342,7 @@ var Tabs = ({
|
|
|
9261
9342
|
var _a;
|
|
9262
9343
|
const isActive = item.value === value;
|
|
9263
9344
|
const isComingSoon = (_a = item == null ? void 0 : item.isComingSoon) != null ? _a : false;
|
|
9264
|
-
return /* @__PURE__ */ (0,
|
|
9345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
9265
9346
|
"button",
|
|
9266
9347
|
{
|
|
9267
9348
|
ref: (buttonElement) => {
|
|
@@ -9297,7 +9378,7 @@ var Tabs = ({
|
|
|
9297
9378
|
),
|
|
9298
9379
|
children: [
|
|
9299
9380
|
item.icon ? item.icon : null,
|
|
9300
|
-
/* @__PURE__ */ (0,
|
|
9381
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
9301
9382
|
"span",
|
|
9302
9383
|
{
|
|
9303
9384
|
className: cn(
|
|
@@ -9315,7 +9396,7 @@ var Tabs = ({
|
|
|
9315
9396
|
item.value
|
|
9316
9397
|
);
|
|
9317
9398
|
}),
|
|
9318
|
-
!isBarVariant ? /* @__PURE__ */ (0,
|
|
9399
|
+
!isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9319
9400
|
"span",
|
|
9320
9401
|
{
|
|
9321
9402
|
"aria-hidden": true,
|
|
@@ -9334,8 +9415,8 @@ var Tabs = ({
|
|
|
9334
9415
|
]
|
|
9335
9416
|
}
|
|
9336
9417
|
),
|
|
9337
|
-
shouldUseOverflowScroll && !isBarVariant ? /* @__PURE__ */ (0,
|
|
9338
|
-
/* @__PURE__ */ (0,
|
|
9418
|
+
shouldUseOverflowScroll && !isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
|
|
9419
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9339
9420
|
"span",
|
|
9340
9421
|
{
|
|
9341
9422
|
"aria-hidden": true,
|
|
@@ -9347,7 +9428,7 @@ var Tabs = ({
|
|
|
9347
9428
|
)
|
|
9348
9429
|
}
|
|
9349
9430
|
),
|
|
9350
|
-
/* @__PURE__ */ (0,
|
|
9431
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9351
9432
|
"span",
|
|
9352
9433
|
{
|
|
9353
9434
|
"aria-hidden": true,
|
|
@@ -9360,8 +9441,8 @@ var Tabs = ({
|
|
|
9360
9441
|
}
|
|
9361
9442
|
)
|
|
9362
9443
|
] }) : null,
|
|
9363
|
-
shouldUseOverflowScroll && isBarVariant ? /* @__PURE__ */ (0,
|
|
9364
|
-
/* @__PURE__ */ (0,
|
|
9444
|
+
shouldUseOverflowScroll && isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
|
|
9445
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9365
9446
|
"button",
|
|
9366
9447
|
{
|
|
9367
9448
|
type: "button",
|
|
@@ -9383,10 +9464,10 @@ var Tabs = ({
|
|
|
9383
9464
|
behavior: getScrollBehavior(enableAnimations)
|
|
9384
9465
|
});
|
|
9385
9466
|
},
|
|
9386
|
-
children: /* @__PURE__ */ (0,
|
|
9467
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon, { name: "chevron-left", size: "small", color: "currentColor" })
|
|
9387
9468
|
}
|
|
9388
9469
|
),
|
|
9389
|
-
/* @__PURE__ */ (0,
|
|
9470
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
9390
9471
|
"button",
|
|
9391
9472
|
{
|
|
9392
9473
|
type: "button",
|
|
@@ -9408,7 +9489,7 @@ var Tabs = ({
|
|
|
9408
9489
|
behavior: getScrollBehavior(enableAnimations)
|
|
9409
9490
|
});
|
|
9410
9491
|
},
|
|
9411
|
-
children: /* @__PURE__ */ (0,
|
|
9492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon, { name: "chevron-right", size: "small", color: "currentColor" })
|
|
9412
9493
|
}
|
|
9413
9494
|
)
|
|
9414
9495
|
] }) : null
|
|
@@ -9421,7 +9502,7 @@ Tabs.displayName = "Tabs";
|
|
|
9421
9502
|
// src/primitives/toast/index.tsx
|
|
9422
9503
|
var RadixToast = __toESM(require("@radix-ui/react-toast"));
|
|
9423
9504
|
var import_react15 = require("react");
|
|
9424
|
-
var
|
|
9505
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
9425
9506
|
var DEFAULT_DURATION_MS = 5e3;
|
|
9426
9507
|
var EXIT_ANIMATION_MS = 350;
|
|
9427
9508
|
var TONE_ACCENT_CLASS = {
|
|
@@ -9470,9 +9551,9 @@ function ToastProvider({
|
|
|
9470
9551
|
},
|
|
9471
9552
|
[defaultDurationMs]
|
|
9472
9553
|
);
|
|
9473
|
-
return /* @__PURE__ */ (0,
|
|
9554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ToastContext.Provider, { value: { toast, dismiss }, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(RadixToast.Provider, { swipeDirection, swipeThreshold, children: [
|
|
9474
9555
|
children,
|
|
9475
|
-
toasts.map((entry) => /* @__PURE__ */ (0,
|
|
9556
|
+
toasts.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9476
9557
|
ToastRow,
|
|
9477
9558
|
{
|
|
9478
9559
|
entry,
|
|
@@ -9482,7 +9563,7 @@ function ToastProvider({
|
|
|
9482
9563
|
},
|
|
9483
9564
|
entry.id
|
|
9484
9565
|
)),
|
|
9485
|
-
/* @__PURE__ */ (0,
|
|
9566
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9486
9567
|
RadixToast.Viewport,
|
|
9487
9568
|
{
|
|
9488
9569
|
className: cn(
|
|
@@ -9562,7 +9643,7 @@ function ToastRow({ entry, onOpenChange }) {
|
|
|
9562
9643
|
clearCloseTimer();
|
|
9563
9644
|
};
|
|
9564
9645
|
}, [clearCloseTimer, clearDismissTimer, duration, startDismissTimer]);
|
|
9565
|
-
return /* @__PURE__ */ (0,
|
|
9646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
9566
9647
|
RadixToast.Root,
|
|
9567
9648
|
{
|
|
9568
9649
|
open: isOpen,
|
|
@@ -9583,7 +9664,7 @@ function ToastRow({ entry, onOpenChange }) {
|
|
|
9583
9664
|
TONE_ACCENT_CLASS[entry.tone]
|
|
9584
9665
|
),
|
|
9585
9666
|
children: [
|
|
9586
|
-
/* @__PURE__ */ (0,
|
|
9667
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9587
9668
|
Icon,
|
|
9588
9669
|
{
|
|
9589
9670
|
name: TONE_ICON_NAME[entry.tone],
|
|
@@ -9591,25 +9672,25 @@ function ToastRow({ entry, onOpenChange }) {
|
|
|
9591
9672
|
"aria-hidden": "true"
|
|
9592
9673
|
}
|
|
9593
9674
|
),
|
|
9594
|
-
/* @__PURE__ */ (0,
|
|
9595
|
-
entry.title ? /* @__PURE__ */ (0,
|
|
9596
|
-
/* @__PURE__ */ (0,
|
|
9597
|
-
entry.detail ? /* @__PURE__ */ (0,
|
|
9675
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
9676
|
+
entry.title ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(RadixToast.Title, { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-foreground", children: entry.title }) : null,
|
|
9677
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(RadixToast.Description, { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground wrap-break-word", children: entry.message }),
|
|
9678
|
+
entry.detail ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-muted-foreground wrap-break-word", children: entry.detail }) : null
|
|
9598
9679
|
] }),
|
|
9599
|
-
/* @__PURE__ */ (0,
|
|
9680
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9600
9681
|
RadixToast.Close,
|
|
9601
9682
|
{
|
|
9602
9683
|
"aria-label": "Dismiss",
|
|
9603
9684
|
className: "absolute top-4 right-4 cursor-pointer text-agg-foreground transition-opacity hover:opacity-70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
|
|
9604
|
-
children: /* @__PURE__ */ (0,
|
|
9685
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Icon, { name: "close", className: "h-4! w-4!", "aria-hidden": "true" })
|
|
9605
9686
|
}
|
|
9606
9687
|
),
|
|
9607
|
-
/* @__PURE__ */ (0,
|
|
9688
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9608
9689
|
"div",
|
|
9609
9690
|
{
|
|
9610
9691
|
className: "absolute right-[-1px] bottom-[-1px] left-[-1px] h-1 bg-[color-mix(in_srgb,var(--agg-toast-accent)_30%,transparent)]",
|
|
9611
9692
|
"aria-hidden": "true",
|
|
9612
|
-
children: /* @__PURE__ */ (0,
|
|
9693
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9613
9694
|
"div",
|
|
9614
9695
|
{
|
|
9615
9696
|
"data-testid": "agg-toast-progress",
|
|
@@ -9637,7 +9718,7 @@ function useOptionalToast() {
|
|
|
9637
9718
|
}
|
|
9638
9719
|
|
|
9639
9720
|
// src/primitives/tooltip/index.tsx
|
|
9640
|
-
var
|
|
9721
|
+
var import_hooks36 = require("@agg-build/hooks");
|
|
9641
9722
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
9642
9723
|
var import_react16 = require("react");
|
|
9643
9724
|
|
|
@@ -9671,7 +9752,7 @@ var resolveTooltipArrowDimensions = (size) => {
|
|
|
9671
9752
|
};
|
|
9672
9753
|
|
|
9673
9754
|
// src/primitives/tooltip/index.tsx
|
|
9674
|
-
var
|
|
9755
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
9675
9756
|
var Tooltip = ({
|
|
9676
9757
|
content,
|
|
9677
9758
|
children,
|
|
@@ -9686,25 +9767,25 @@ var Tooltip = ({
|
|
|
9686
9767
|
const {
|
|
9687
9768
|
general: { rootClassName },
|
|
9688
9769
|
features: { enableAnimations }
|
|
9689
|
-
} = (0,
|
|
9770
|
+
} = (0, import_hooks36.useSdkUiConfig)();
|
|
9690
9771
|
const trigger = (0, import_react16.useMemo)(() => {
|
|
9691
9772
|
if (children) return children;
|
|
9692
|
-
return /* @__PURE__ */ (0,
|
|
9773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
9693
9774
|
"button",
|
|
9694
9775
|
{
|
|
9695
9776
|
type: "button",
|
|
9696
9777
|
className: resolveTooltipTriggerClassName(classNames == null ? void 0 : classNames.trigger),
|
|
9697
9778
|
"aria-label": ariaLabel != null ? ariaLabel : defaultTooltipTriggerAriaLabel,
|
|
9698
|
-
children: /* @__PURE__ */ (0,
|
|
9779
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Icon, { name: "info", size: "small", className: cn(classNames == null ? void 0 : classNames.icon), "aria-hidden": true })
|
|
9699
9780
|
}
|
|
9700
9781
|
);
|
|
9701
9782
|
}, [children, classNames == null ? void 0 : classNames.trigger, classNames == null ? void 0 : classNames.icon, ariaLabel]);
|
|
9702
9783
|
const { width: arrowWidth, height: arrowHeight } = resolveTooltipArrowDimensions(size);
|
|
9703
9784
|
const arrowPoints = `0,0 ${arrowWidth},0 ${arrowWidth / 2},${arrowHeight}`;
|
|
9704
9785
|
const arrowBorderPath = `M0 0 L${arrowWidth / 2} ${arrowHeight} L${arrowWidth} 0`;
|
|
9705
|
-
return /* @__PURE__ */ (0,
|
|
9706
|
-
/* @__PURE__ */ (0,
|
|
9707
|
-
/* @__PURE__ */ (0,
|
|
9786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(TooltipPrimitive.Root, { children: [
|
|
9787
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: trigger }),
|
|
9788
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
9708
9789
|
TooltipPrimitive.Content,
|
|
9709
9790
|
{
|
|
9710
9791
|
side,
|
|
@@ -9728,7 +9809,7 @@ var Tooltip = ({
|
|
|
9728
9809
|
classNames == null ? void 0 : classNames.content
|
|
9729
9810
|
),
|
|
9730
9811
|
children: [
|
|
9731
|
-
/* @__PURE__ */ (0,
|
|
9812
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Arrow, { asChild: true, width: arrowWidth, height: arrowHeight, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
9732
9813
|
"svg",
|
|
9733
9814
|
{
|
|
9734
9815
|
width: arrowWidth,
|
|
@@ -9737,8 +9818,8 @@ var Tooltip = ({
|
|
|
9737
9818
|
"aria-hidden": "true",
|
|
9738
9819
|
className: cn("overflow-visible", classNames == null ? void 0 : classNames.arrow),
|
|
9739
9820
|
children: [
|
|
9740
|
-
/* @__PURE__ */ (0,
|
|
9741
|
-
/* @__PURE__ */ (0,
|
|
9821
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)("polygon", { points: arrowPoints, className: "fill-agg-secondary" }),
|
|
9822
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
9742
9823
|
"path",
|
|
9743
9824
|
{
|
|
9744
9825
|
d: arrowBorderPath,
|