@agg-build/ui 4.9.2 → 4.10.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/dist/{chunk-K6F2ZYNM.mjs → chunk-4HTE5IEZ.mjs} +32 -20
- package/dist/{chunk-TNNLRRHC.mjs → chunk-6EHT5OFU.mjs} +1 -1
- package/dist/{chunk-GVIS3YXU.mjs → chunk-H5LCCV2J.mjs} +22 -11
- package/dist/{chunk-GG57TRNE.mjs → chunk-I72YHWOI.mjs} +2 -2
- package/dist/{chunk-MVAOWNG3.mjs → chunk-SMQRUNMZ.mjs} +19 -10
- package/dist/{chunk-H7L4HDXS.mjs → chunk-TXQJUVRW.mjs} +3 -2
- package/dist/{chunk-NYL6A6AD.mjs → chunk-W7HQVQ22.mjs} +257 -195
- package/dist/events.js +753 -680
- package/dist/events.mjs +3 -3
- package/dist/index.js +2692 -2597
- package/dist/index.mjs +7 -7
- package/dist/modals.js +1352 -1289
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +2052 -1957
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +288 -226
- package/dist/primitives.mjs +1 -1
- package/dist/trading.js +834 -759
- package/dist/trading.mjs +4 -4
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +2 -0
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +2 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +2 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +2 -0
- package/dist/types/pages/event-market/sports-event-market-page.d.mts +1 -1
- package/dist/types/pages/event-market/sports-event-market-page.d.ts +1 -1
- package/dist/types/pages/user-profile/user-profile.types.d.mts +2 -0
- package/dist/types/pages/user-profile/user-profile.types.d.ts +2 -0
- package/dist/types/primitives/venue-logo/svg/logo-pred.d.mts +10 -0
- package/dist/types/primitives/venue-logo/svg/logo-pred.d.ts +10 -0
- package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +2 -1
- package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +2 -1
- package/dist/types/trading/place-order/index.place-order.types.d.mts +8 -0
- package/dist/types/trading/place-order/index.place-order.types.d.ts +8 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +1 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +1 -1
- package/package.json +3 -3
package/dist/primitives.js
CHANGED
|
@@ -5434,10 +5434,10 @@ var Footer = ({
|
|
|
5434
5434
|
Footer.displayName = "Footer";
|
|
5435
5435
|
|
|
5436
5436
|
// src/primitives/header/index.tsx
|
|
5437
|
-
var
|
|
5437
|
+
var import_hooks31 = require("@agg-build/hooks");
|
|
5438
5438
|
|
|
5439
5439
|
// src/primitives/search/index.tsx
|
|
5440
|
-
var
|
|
5440
|
+
var import_hooks30 = require("@agg-build/hooks");
|
|
5441
5441
|
var import_react10 = require("react");
|
|
5442
5442
|
|
|
5443
5443
|
// src/events/list/event-list.utils.ts
|
|
@@ -6196,7 +6196,7 @@ var Skeleton = ({
|
|
|
6196
6196
|
Skeleton.displayName = "Skeleton";
|
|
6197
6197
|
|
|
6198
6198
|
// src/primitives/venue-logo/index.tsx
|
|
6199
|
-
var
|
|
6199
|
+
var import_hooks28 = require("@agg-build/hooks");
|
|
6200
6200
|
|
|
6201
6201
|
// src/primitives/venue-logo/venue-logo.constants.ts
|
|
6202
6202
|
var import_sdk12 = require("@agg-build/sdk");
|
|
@@ -6582,11 +6582,11 @@ var LogoPolymarketIcon = (_a) => {
|
|
|
6582
6582
|
};
|
|
6583
6583
|
LogoPolymarketIcon.displayName = "LogoPolymarketIcon";
|
|
6584
6584
|
|
|
6585
|
-
// src/primitives/venue-logo/svg/logo-
|
|
6585
|
+
// src/primitives/venue-logo/svg/logo-pred.tsx
|
|
6586
6586
|
var import_hooks24 = require("@agg-build/hooks");
|
|
6587
|
-
var import_sdk9 = require("@agg-build/sdk");
|
|
6588
6587
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
6589
|
-
var
|
|
6588
|
+
var PRED_LOGO_COLORS = { light: "#120C06", dark: "#F4FB37" };
|
|
6589
|
+
var LogoPredIcon = (_a) => {
|
|
6590
6590
|
var _b = _a, {
|
|
6591
6591
|
title: title2,
|
|
6592
6592
|
className,
|
|
@@ -6598,26 +6598,80 @@ var LogoPredictIcon = (_a) => {
|
|
|
6598
6598
|
"isColor",
|
|
6599
6599
|
"color"
|
|
6600
6600
|
]);
|
|
6601
|
-
var _a2;
|
|
6602
6601
|
const {
|
|
6603
6602
|
general: { theme }
|
|
6604
6603
|
} = (0, import_hooks24.useAggUiConfig)();
|
|
6605
6604
|
const isDarkTheme = theme === "dark";
|
|
6606
6605
|
const primaryColor = resolveLogoPrimaryColor({
|
|
6607
|
-
brandColor:
|
|
6606
|
+
brandColor: PRED_LOGO_COLORS[isDarkTheme ? "dark" : "light"],
|
|
6608
6607
|
isColor,
|
|
6609
6608
|
color
|
|
6610
6609
|
});
|
|
6611
6610
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
6612
6611
|
"svg",
|
|
6613
6612
|
__spreadProps(__spreadValues(__spreadValues({
|
|
6614
|
-
viewBox: "0 0
|
|
6613
|
+
viewBox: "0 0 48 48",
|
|
6615
6614
|
className,
|
|
6616
6615
|
fill: "none"
|
|
6617
6616
|
}, getIconA11yProps(title2)), props), {
|
|
6618
6617
|
children: [
|
|
6619
6618
|
title2 ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("title", { children: title2 }) : null,
|
|
6620
6619
|
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
6620
|
+
"path",
|
|
6621
|
+
{
|
|
6622
|
+
d: "M13.2063 24.447L30.8869 21.6235L31.7298 19.898L4 10.4414L10.9436 16.4694L5.95218 41.9708L13.2063 24.447Z",
|
|
6623
|
+
fill: primaryColor
|
|
6624
|
+
}
|
|
6625
|
+
),
|
|
6626
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
6627
|
+
"path",
|
|
6628
|
+
{
|
|
6629
|
+
d: "M34.3927 24.0014L16.7121 26.8473L15.8691 28.5504L43.599 38.0294L36.6554 31.979L41.6468 6.5L34.3927 24.0014Z",
|
|
6630
|
+
fill: primaryColor
|
|
6631
|
+
}
|
|
6632
|
+
)
|
|
6633
|
+
]
|
|
6634
|
+
})
|
|
6635
|
+
);
|
|
6636
|
+
};
|
|
6637
|
+
LogoPredIcon.displayName = "LogoPredIcon";
|
|
6638
|
+
|
|
6639
|
+
// src/primitives/venue-logo/svg/logo-predict.tsx
|
|
6640
|
+
var import_hooks25 = require("@agg-build/hooks");
|
|
6641
|
+
var import_sdk9 = require("@agg-build/sdk");
|
|
6642
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
6643
|
+
var LogoPredictIcon = (_a) => {
|
|
6644
|
+
var _b = _a, {
|
|
6645
|
+
title: title2,
|
|
6646
|
+
className,
|
|
6647
|
+
isColor = true,
|
|
6648
|
+
color
|
|
6649
|
+
} = _b, props = __objRest(_b, [
|
|
6650
|
+
"title",
|
|
6651
|
+
"className",
|
|
6652
|
+
"isColor",
|
|
6653
|
+
"color"
|
|
6654
|
+
]);
|
|
6655
|
+
var _a2;
|
|
6656
|
+
const {
|
|
6657
|
+
general: { theme }
|
|
6658
|
+
} = (0, import_hooks25.useAggUiConfig)();
|
|
6659
|
+
const isDarkTheme = theme === "dark";
|
|
6660
|
+
const primaryColor = resolveLogoPrimaryColor({
|
|
6661
|
+
brandColor: (_a2 = resolveVenueLineColor(import_sdk9.Venue.predict, isDarkTheme)) != null ? _a2 : "#705bf6",
|
|
6662
|
+
isColor,
|
|
6663
|
+
color
|
|
6664
|
+
});
|
|
6665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
6666
|
+
"svg",
|
|
6667
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
6668
|
+
viewBox: "0 0 100 100",
|
|
6669
|
+
className,
|
|
6670
|
+
fill: "none"
|
|
6671
|
+
}, getIconA11yProps(title2)), props), {
|
|
6672
|
+
children: [
|
|
6673
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("title", { children: title2 }) : null,
|
|
6674
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
6621
6675
|
"path",
|
|
6622
6676
|
{
|
|
6623
6677
|
fillRule: "evenodd",
|
|
@@ -6633,9 +6687,9 @@ var LogoPredictIcon = (_a) => {
|
|
|
6633
6687
|
LogoPredictIcon.displayName = "LogoPredictIcon";
|
|
6634
6688
|
|
|
6635
6689
|
// src/primitives/venue-logo/svg/logo-probable.tsx
|
|
6636
|
-
var
|
|
6690
|
+
var import_hooks26 = require("@agg-build/hooks");
|
|
6637
6691
|
var import_sdk10 = require("@agg-build/sdk");
|
|
6638
|
-
var
|
|
6692
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
6639
6693
|
var LogoProbableIcon = (_a) => {
|
|
6640
6694
|
var _b = _a, {
|
|
6641
6695
|
title: title2,
|
|
@@ -6651,14 +6705,14 @@ var LogoProbableIcon = (_a) => {
|
|
|
6651
6705
|
var _a2;
|
|
6652
6706
|
const {
|
|
6653
6707
|
general: { theme }
|
|
6654
|
-
} = (0,
|
|
6708
|
+
} = (0, import_hooks26.useAggUiConfig)();
|
|
6655
6709
|
const isDarkTheme = theme === "dark";
|
|
6656
6710
|
const primaryColor = resolveLogoPrimaryColor({
|
|
6657
6711
|
brandColor: (_a2 = resolveVenueLineColor(import_sdk10.Venue.probable, isDarkTheme)) != null ? _a2 : "#EC4899",
|
|
6658
6712
|
isColor,
|
|
6659
6713
|
color
|
|
6660
6714
|
});
|
|
6661
|
-
return /* @__PURE__ */ (0,
|
|
6715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
6662
6716
|
"svg",
|
|
6663
6717
|
__spreadProps(__spreadValues(__spreadValues({
|
|
6664
6718
|
viewBox: "0 0 100 100",
|
|
@@ -6666,16 +6720,16 @@ var LogoProbableIcon = (_a) => {
|
|
|
6666
6720
|
fill: "none"
|
|
6667
6721
|
}, getIconA11yProps(title2)), props), {
|
|
6668
6722
|
children: [
|
|
6669
|
-
title2 ? /* @__PURE__ */ (0,
|
|
6670
|
-
/* @__PURE__ */ (0,
|
|
6723
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("title", { children: title2 }) : null,
|
|
6724
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
6671
6725
|
"path",
|
|
6672
6726
|
{
|
|
6673
6727
|
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",
|
|
6674
6728
|
fill: primaryColor
|
|
6675
6729
|
}
|
|
6676
6730
|
),
|
|
6677
|
-
/* @__PURE__ */ (0,
|
|
6678
|
-
/* @__PURE__ */ (0,
|
|
6731
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("path", { d: "M90.9329 15.4546V30.4546H8.90234V15.4546H90.9329Z", fill: primaryColor }),
|
|
6732
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
6679
6733
|
"path",
|
|
6680
6734
|
{
|
|
6681
6735
|
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",
|
|
@@ -6689,10 +6743,10 @@ var LogoProbableIcon = (_a) => {
|
|
|
6689
6743
|
LogoProbableIcon.displayName = "LogoProbableIcon";
|
|
6690
6744
|
|
|
6691
6745
|
// src/primitives/venue-logo/svg/logo-prophetx.tsx
|
|
6692
|
-
var
|
|
6746
|
+
var import_hooks27 = require("@agg-build/hooks");
|
|
6693
6747
|
var import_sdk11 = require("@agg-build/sdk");
|
|
6694
6748
|
var import_react9 = require("react");
|
|
6695
|
-
var
|
|
6749
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
6696
6750
|
var LogoProphetXIcon = (_a) => {
|
|
6697
6751
|
var _b = _a, {
|
|
6698
6752
|
title: title2,
|
|
@@ -6708,7 +6762,7 @@ var LogoProphetXIcon = (_a) => {
|
|
|
6708
6762
|
var _a2;
|
|
6709
6763
|
const {
|
|
6710
6764
|
general: { theme }
|
|
6711
|
-
} = (0,
|
|
6765
|
+
} = (0, import_hooks27.useAggUiConfig)();
|
|
6712
6766
|
const isDarkTheme = theme === "dark";
|
|
6713
6767
|
const uid = (0, import_react9.useId)();
|
|
6714
6768
|
const primaryColor = resolveLogoPrimaryColor({
|
|
@@ -6720,7 +6774,7 @@ var LogoProphetXIcon = (_a) => {
|
|
|
6720
6774
|
const isMonochrome = !isColor || Boolean(color == null ? void 0 : color.trim());
|
|
6721
6775
|
const gradientTransform = "matrix(2.750846, 0, 0, 2.750846, -1935.152964, 138.485876)";
|
|
6722
6776
|
const fillFor = (n) => isMonochrome ? primaryColor : `url(#${uid}-${n})`;
|
|
6723
|
-
return /* @__PURE__ */ (0,
|
|
6777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
6724
6778
|
"svg",
|
|
6725
6779
|
__spreadProps(__spreadValues(__spreadValues({
|
|
6726
6780
|
viewBox: "81.867 138.419 424.492 272.214",
|
|
@@ -6728,9 +6782,9 @@ var LogoProphetXIcon = (_a) => {
|
|
|
6728
6782
|
fill: "none"
|
|
6729
6783
|
}, getIconA11yProps(title2)), props), {
|
|
6730
6784
|
children: [
|
|
6731
|
-
title2 ? /* @__PURE__ */ (0,
|
|
6732
|
-
isMonochrome ? null : /* @__PURE__ */ (0,
|
|
6733
|
-
/* @__PURE__ */ (0,
|
|
6785
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("title", { children: title2 }) : null,
|
|
6786
|
+
isMonochrome ? null : /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("defs", { children: [
|
|
6787
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
6734
6788
|
"linearGradient",
|
|
6735
6789
|
{
|
|
6736
6790
|
id: `${uid}-0`,
|
|
@@ -6741,14 +6795,14 @@ var LogoProphetXIcon = (_a) => {
|
|
|
6741
6795
|
gradientUnits: "userSpaceOnUse",
|
|
6742
6796
|
gradientTransform,
|
|
6743
6797
|
children: [
|
|
6744
|
-
/* @__PURE__ */ (0,
|
|
6745
|
-
/* @__PURE__ */ (0,
|
|
6746
|
-
/* @__PURE__ */ (0,
|
|
6747
|
-
/* @__PURE__ */ (0,
|
|
6798
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { stopColor: "#1DC29A" }),
|
|
6799
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { offset: "0.1032", stopColor: "#19BE9D" }),
|
|
6800
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { offset: "0.6255", stopColor: "#06ADAA" }),
|
|
6801
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
|
|
6748
6802
|
]
|
|
6749
6803
|
}
|
|
6750
6804
|
),
|
|
6751
|
-
/* @__PURE__ */ (0,
|
|
6805
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
6752
6806
|
"linearGradient",
|
|
6753
6807
|
{
|
|
6754
6808
|
id: `${uid}-1`,
|
|
@@ -6759,12 +6813,12 @@ var LogoProphetXIcon = (_a) => {
|
|
|
6759
6813
|
gradientUnits: "userSpaceOnUse",
|
|
6760
6814
|
gradientTransform,
|
|
6761
6815
|
children: [
|
|
6762
|
-
/* @__PURE__ */ (0,
|
|
6763
|
-
/* @__PURE__ */ (0,
|
|
6816
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { stopColor: "#1DC29A" }),
|
|
6817
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
|
|
6764
6818
|
]
|
|
6765
6819
|
}
|
|
6766
6820
|
),
|
|
6767
|
-
/* @__PURE__ */ (0,
|
|
6821
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
6768
6822
|
"linearGradient",
|
|
6769
6823
|
{
|
|
6770
6824
|
id: `${uid}-2`,
|
|
@@ -6775,29 +6829,29 @@ var LogoProphetXIcon = (_a) => {
|
|
|
6775
6829
|
gradientUnits: "userSpaceOnUse",
|
|
6776
6830
|
gradientTransform,
|
|
6777
6831
|
children: [
|
|
6778
|
-
/* @__PURE__ */ (0,
|
|
6779
|
-
/* @__PURE__ */ (0,
|
|
6780
|
-
/* @__PURE__ */ (0,
|
|
6781
|
-
/* @__PURE__ */ (0,
|
|
6832
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { stopColor: "#1DC29A" }),
|
|
6833
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { offset: "0.3631", stopColor: "#18BD9E" }),
|
|
6834
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { offset: "0.802", stopColor: "#09AFA8" }),
|
|
6835
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
|
|
6782
6836
|
]
|
|
6783
6837
|
}
|
|
6784
6838
|
)
|
|
6785
6839
|
] }),
|
|
6786
|
-
/* @__PURE__ */ (0,
|
|
6840
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
6787
6841
|
"path",
|
|
6788
6842
|
{
|
|
6789
6843
|
d: "M 282.449 326.493 L 332.847 402.716 L 426.472 402.716 L 344.879 279.66 L 282.449 326.493 Z",
|
|
6790
6844
|
fill: fillFor(0)
|
|
6791
6845
|
}
|
|
6792
6846
|
),
|
|
6793
|
-
/* @__PURE__ */ (0,
|
|
6847
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
6794
6848
|
"path",
|
|
6795
6849
|
{
|
|
6796
6850
|
d: "M 379.966 146.995 L 389.569 161.125 L 313.636 218.145 L 307.055 222.927 L 244.624 269.759 L 238 274.873 L 162.069 331.56 L 152.804 317.473 L 87.353 402.71 L 209.197 402.71 L 199.888 388.287 L 275.818 331.56 L 282.443 326.488 L 344.873 279.655 L 351.456 274.832 L 427.388 218.145 L 436.694 232.232 L 502.101 146.995 L 379.966 146.995 Z",
|
|
6797
6851
|
fill: fillFor(1)
|
|
6798
6852
|
}
|
|
6799
6853
|
),
|
|
6800
|
-
/* @__PURE__ */ (0,
|
|
6854
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
6801
6855
|
"path",
|
|
6802
6856
|
{
|
|
6803
6857
|
d: "M 162.993 146.995 L 244.624 269.759 L 307.055 222.927 L 256.323 146.995 L 162.993 146.995 Z",
|
|
@@ -6816,6 +6870,7 @@ var venueLogoRegistry = {
|
|
|
6816
6870
|
[import_sdk12.Venue.limitless]: LogoLimitlessIcon,
|
|
6817
6871
|
[import_sdk12.Venue.opinion]: LogoOpinionIcon,
|
|
6818
6872
|
[import_sdk12.Venue.polymarket]: LogoPolymarketIcon,
|
|
6873
|
+
[import_sdk12.Venue.pred]: LogoPredIcon,
|
|
6819
6874
|
[import_sdk12.Venue.predict]: LogoPredictIcon,
|
|
6820
6875
|
[import_sdk12.Venue.probable]: LogoProbableIcon,
|
|
6821
6876
|
[import_sdk12.Venue.myriad]: LogoMyriadIcon,
|
|
@@ -6830,6 +6885,9 @@ var venueLogoUrlRegistry = {
|
|
|
6830
6885
|
[import_sdk12.Venue.limitless]: `${VENUE_LOGO_BASE_URL}/limitless.png`,
|
|
6831
6886
|
[import_sdk12.Venue.opinion]: `${VENUE_LOGO_BASE_URL}/opinion.png`,
|
|
6832
6887
|
[import_sdk12.Venue.polymarket]: `${VENUE_LOGO_BASE_URL}/polymarket.png`,
|
|
6888
|
+
// PRED does not yet have a mirrored Snag asset. Its official production
|
|
6889
|
+
// favicon is the same square brand mark used by the application itself.
|
|
6890
|
+
[import_sdk12.Venue.pred]: "https://mainnet-assets.pred.app/assets/vite-oruAfoK1.svg",
|
|
6833
6891
|
[import_sdk12.Venue.predict]: `${VENUE_LOGO_BASE_URL}/predict.png`,
|
|
6834
6892
|
[import_sdk12.Venue.probable]: `${VENUE_LOGO_BASE_URL}/probable.png`,
|
|
6835
6893
|
[import_sdk12.Venue.myriad]: `${VENUE_LOGO_BASE_URL}/myriad.png`,
|
|
@@ -6845,6 +6903,7 @@ var venueLogoLabels = {
|
|
|
6845
6903
|
[import_sdk12.Venue.limitless]: "Limitless",
|
|
6846
6904
|
[import_sdk12.Venue.opinion]: "Opinion",
|
|
6847
6905
|
[import_sdk12.Venue.polymarket]: "Polymarket",
|
|
6906
|
+
[import_sdk12.Venue.pred]: "PRED",
|
|
6848
6907
|
[import_sdk12.Venue.predict]: "Predict",
|
|
6849
6908
|
[import_sdk12.Venue.probable]: "Probable",
|
|
6850
6909
|
[import_sdk12.Venue.myriad]: "Myriad",
|
|
@@ -6865,6 +6924,8 @@ var lineColorByVenue = {
|
|
|
6865
6924
|
[import_sdk12.Venue.limitless]: "#C4FF00",
|
|
6866
6925
|
[import_sdk12.Venue.opinion]: "#000000",
|
|
6867
6926
|
[import_sdk12.Venue.polymarket]: "#2E5CFF",
|
|
6927
|
+
// On light surfaces use the dark half of PRED's official yellow/dark mark.
|
|
6928
|
+
[import_sdk12.Venue.pred]: PRED_LOGO_COLORS.light,
|
|
6868
6929
|
[import_sdk12.Venue.predict]: "#6D57F8",
|
|
6869
6930
|
[import_sdk12.Venue.probable]: "#F05923",
|
|
6870
6931
|
[import_sdk12.Venue.myriad]: "#000000",
|
|
@@ -6884,6 +6945,7 @@ var lineColorByVenue = {
|
|
|
6884
6945
|
[import_sdk12.Venue.limitless]: "#C4FF00",
|
|
6885
6946
|
[import_sdk12.Venue.opinion]: "#FFFFFF",
|
|
6886
6947
|
[import_sdk12.Venue.polymarket]: "#2E5CFF",
|
|
6948
|
+
[import_sdk12.Venue.pred]: PRED_LOGO_COLORS.dark,
|
|
6887
6949
|
[import_sdk12.Venue.predict]: "#6D57F8",
|
|
6888
6950
|
[import_sdk12.Venue.probable]: "#F05923",
|
|
6889
6951
|
[import_sdk12.Venue.myriad]: "#FFFFFF",
|
|
@@ -6915,7 +6977,7 @@ var resolveVenueLogoIsColor = ({
|
|
|
6915
6977
|
};
|
|
6916
6978
|
|
|
6917
6979
|
// src/primitives/venue-logo/index.tsx
|
|
6918
|
-
var
|
|
6980
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
6919
6981
|
var VenueLogo = ({
|
|
6920
6982
|
venue,
|
|
6921
6983
|
variant = "icon",
|
|
@@ -6928,7 +6990,7 @@ var VenueLogo = ({
|
|
|
6928
6990
|
title: title2
|
|
6929
6991
|
}) => {
|
|
6930
6992
|
var _a, _b;
|
|
6931
|
-
const labels = (0,
|
|
6993
|
+
const labels = (0, import_hooks28.useLabels)();
|
|
6932
6994
|
const sizeClass = sizeClasses2[size];
|
|
6933
6995
|
const resolvedLabel = resolveVenueLogoLabel({
|
|
6934
6996
|
ariaLabel,
|
|
@@ -6941,7 +7003,7 @@ var VenueLogo = ({
|
|
|
6941
7003
|
console.warn(`[AggUI] Unknown venue "${venue}" \u2014 using default logo`);
|
|
6942
7004
|
}
|
|
6943
7005
|
if (variant === "logo") {
|
|
6944
|
-
return /* @__PURE__ */ (0,
|
|
7006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
6945
7007
|
RemoteImage,
|
|
6946
7008
|
{
|
|
6947
7009
|
src: (_a = venueLogoUrlRegistry[venue]) != null ? _a : DEFAULT_VENUE_LOGO_URL,
|
|
@@ -6956,7 +7018,7 @@ var VenueLogo = ({
|
|
|
6956
7018
|
isColor,
|
|
6957
7019
|
isMonochromatic
|
|
6958
7020
|
});
|
|
6959
|
-
return /* @__PURE__ */ (0,
|
|
7021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
6960
7022
|
Component2,
|
|
6961
7023
|
{
|
|
6962
7024
|
className: cn("group/agg-venue-logo", "shrink-0", sizeClass, className),
|
|
@@ -7101,7 +7163,7 @@ var resolveEventHeading = ({
|
|
|
7101
7163
|
};
|
|
7102
7164
|
|
|
7103
7165
|
// src/events/item/event-list-item.utils.ts
|
|
7104
|
-
var
|
|
7166
|
+
var import_hooks29 = require("@agg-build/hooks");
|
|
7105
7167
|
|
|
7106
7168
|
// src/events/shared/venue-market-cluster.ts
|
|
7107
7169
|
var toNonEmptyString = (value) => {
|
|
@@ -7432,7 +7494,7 @@ var mapVenueEventToSearchResult = (event, labels, formatPercent, formatCompactCu
|
|
|
7432
7494
|
};
|
|
7433
7495
|
|
|
7434
7496
|
// src/primitives/search/index.tsx
|
|
7435
|
-
var
|
|
7497
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
7436
7498
|
var SearchResultRow = ({
|
|
7437
7499
|
item,
|
|
7438
7500
|
resultAria,
|
|
@@ -7446,7 +7508,7 @@ var SearchResultRow = ({
|
|
|
7446
7508
|
const handleResultPointerDown = (event) => {
|
|
7447
7509
|
event.preventDefault();
|
|
7448
7510
|
};
|
|
7449
|
-
return /* @__PURE__ */ (0,
|
|
7511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
7450
7512
|
"button",
|
|
7451
7513
|
{
|
|
7452
7514
|
type: "button",
|
|
@@ -7464,8 +7526,8 @@ var SearchResultRow = ({
|
|
|
7464
7526
|
onClick: handleResultClick,
|
|
7465
7527
|
"aria-label": resultAria(item.title),
|
|
7466
7528
|
children: [
|
|
7467
|
-
/* @__PURE__ */ (0,
|
|
7468
|
-
/* @__PURE__ */ (0,
|
|
7529
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "agg-search-result-content flex min-w-0 flex-1 items-center gap-4", children: [
|
|
7530
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7469
7531
|
RemoteImage,
|
|
7470
7532
|
{
|
|
7471
7533
|
src: item.thumbnailSrc,
|
|
@@ -7477,8 +7539,8 @@ var SearchResultRow = ({
|
|
|
7477
7539
|
)
|
|
7478
7540
|
}
|
|
7479
7541
|
),
|
|
7480
|
-
/* @__PURE__ */ (0,
|
|
7481
|
-
/* @__PURE__ */ (0,
|
|
7542
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
7543
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7482
7544
|
"p",
|
|
7483
7545
|
{
|
|
7484
7546
|
className: cn(
|
|
@@ -7489,8 +7551,8 @@ var SearchResultRow = ({
|
|
|
7489
7551
|
children: item.title
|
|
7490
7552
|
}
|
|
7491
7553
|
),
|
|
7492
|
-
/* @__PURE__ */ (0,
|
|
7493
|
-
/* @__PURE__ */ (0,
|
|
7554
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "agg-search-result-context flex min-w-0 items-center gap-2 text-agg-muted-foreground", children: [
|
|
7555
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7494
7556
|
"p",
|
|
7495
7557
|
{
|
|
7496
7558
|
className: cn(
|
|
@@ -7500,7 +7562,7 @@ var SearchResultRow = ({
|
|
|
7500
7562
|
children: item.marketSummaryLabel
|
|
7501
7563
|
}
|
|
7502
7564
|
),
|
|
7503
|
-
/* @__PURE__ */ (0,
|
|
7565
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "flex items-center gap-1", "aria-hidden": true, children: item.visibleVenues.map((venue) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7504
7566
|
VenueLogo,
|
|
7505
7567
|
{
|
|
7506
7568
|
venue,
|
|
@@ -7510,9 +7572,9 @@ var SearchResultRow = ({
|
|
|
7510
7572
|
},
|
|
7511
7573
|
`${item.id}-${venue}`
|
|
7512
7574
|
)) }),
|
|
7513
|
-
item.volumeLabel ? /* @__PURE__ */ (0,
|
|
7514
|
-
/* @__PURE__ */ (0,
|
|
7515
|
-
/* @__PURE__ */ (0,
|
|
7575
|
+
item.volumeLabel ? /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
7576
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "text-agg-muted-foreground", "aria-hidden": true, children: "\xB7" }),
|
|
7577
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7516
7578
|
"p",
|
|
7517
7579
|
{
|
|
7518
7580
|
className: cn(
|
|
@@ -7526,7 +7588,7 @@ var SearchResultRow = ({
|
|
|
7526
7588
|
] })
|
|
7527
7589
|
] })
|
|
7528
7590
|
] }),
|
|
7529
|
-
/* @__PURE__ */ (0,
|
|
7591
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
7530
7592
|
"div",
|
|
7531
7593
|
{
|
|
7532
7594
|
className: cn(
|
|
@@ -7534,9 +7596,9 @@ var SearchResultRow = ({
|
|
|
7534
7596
|
classNames == null ? void 0 : classNames.resultMeta
|
|
7535
7597
|
),
|
|
7536
7598
|
children: [
|
|
7537
|
-
/* @__PURE__ */ (0,
|
|
7538
|
-
/* @__PURE__ */ (0,
|
|
7539
|
-
item.isValueLoading ? /* @__PURE__ */ (0,
|
|
7599
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(VenueLogo, { venue: item.venue, size: "small" }),
|
|
7600
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
|
|
7601
|
+
item.isValueLoading ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7540
7602
|
"span",
|
|
7541
7603
|
{
|
|
7542
7604
|
"aria-hidden": "true",
|
|
@@ -7545,7 +7607,7 @@ var SearchResultRow = ({
|
|
|
7545
7607
|
"h-5 w-12 shrink-0 rounded-agg-sm bg-agg-separator animate-pulse"
|
|
7546
7608
|
)
|
|
7547
7609
|
}
|
|
7548
|
-
) : /* @__PURE__ */ (0,
|
|
7610
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7549
7611
|
"p",
|
|
7550
7612
|
{
|
|
7551
7613
|
className: cn(
|
|
@@ -7556,7 +7618,7 @@ var SearchResultRow = ({
|
|
|
7556
7618
|
children: item.valueLabel
|
|
7557
7619
|
}
|
|
7558
7620
|
),
|
|
7559
|
-
/* @__PURE__ */ (0,
|
|
7621
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7560
7622
|
"p",
|
|
7561
7623
|
{
|
|
7562
7624
|
className: cn(
|
|
@@ -7570,7 +7632,7 @@ var SearchResultRow = ({
|
|
|
7570
7632
|
]
|
|
7571
7633
|
}
|
|
7572
7634
|
),
|
|
7573
|
-
/* @__PURE__ */ (0,
|
|
7635
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7574
7636
|
Icon,
|
|
7575
7637
|
{
|
|
7576
7638
|
name: "chevron-right",
|
|
@@ -7593,7 +7655,7 @@ var SearchSeeAllResultsButton = ({
|
|
|
7593
7655
|
const handlePointerDown = (event) => {
|
|
7594
7656
|
event.preventDefault();
|
|
7595
7657
|
};
|
|
7596
|
-
return /* @__PURE__ */ (0,
|
|
7658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
7597
7659
|
"button",
|
|
7598
7660
|
{
|
|
7599
7661
|
type: "button",
|
|
@@ -7607,8 +7669,8 @@ var SearchSeeAllResultsButton = ({
|
|
|
7607
7669
|
onPointerDown: handlePointerDown,
|
|
7608
7670
|
onClick,
|
|
7609
7671
|
children: [
|
|
7610
|
-
/* @__PURE__ */ (0,
|
|
7611
|
-
/* @__PURE__ */ (0,
|
|
7672
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { children: label2 }),
|
|
7673
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { name: "chevron-right", size: "small", className: "size-[14px] text-agg-primary" })
|
|
7612
7674
|
]
|
|
7613
7675
|
}
|
|
7614
7676
|
);
|
|
@@ -7621,12 +7683,12 @@ var Search = ({
|
|
|
7621
7683
|
onSelectEvent,
|
|
7622
7684
|
onSeeAllEvents
|
|
7623
7685
|
}) => {
|
|
7624
|
-
const labels = (0,
|
|
7686
|
+
const labels = (0, import_hooks30.useLabels)();
|
|
7625
7687
|
const {
|
|
7626
7688
|
search: searchConfig,
|
|
7627
7689
|
features: { enableAnimations },
|
|
7628
7690
|
formatting: { formatCompactCurrency, formatPercent }
|
|
7629
|
-
} = (0,
|
|
7691
|
+
} = (0, import_hooks30.useSdkUiConfig)();
|
|
7630
7692
|
const resolvedValue = searchConfig.value;
|
|
7631
7693
|
const trimmedValue = resolvedValue.trim();
|
|
7632
7694
|
const [debouncedSearchValue, setDebouncedSearchValue] = (0, import_react10.useState)(() => {
|
|
@@ -7647,7 +7709,7 @@ var Search = ({
|
|
|
7647
7709
|
window.clearTimeout(timeoutId);
|
|
7648
7710
|
};
|
|
7649
7711
|
}, [shouldSearchValue, trimmedValue]);
|
|
7650
|
-
const { data: searchResults, isLoading } = (0,
|
|
7712
|
+
const { data: searchResults, isLoading } = (0, import_hooks30.useSearch)({
|
|
7651
7713
|
q: shouldFetchResults ? debouncedSearchValue : "",
|
|
7652
7714
|
type: "events",
|
|
7653
7715
|
categoryIds,
|
|
@@ -7656,7 +7718,7 @@ var Search = ({
|
|
|
7656
7718
|
// filterOpenEvents below then empties — rendering "no results" for
|
|
7657
7719
|
// markets that exist. filterOpenEvents stays as the residual guard for
|
|
7658
7720
|
// events with no open child markets, which the server doesn't check.
|
|
7659
|
-
status: [
|
|
7721
|
+
status: [import_hooks30.MarketStatus.open],
|
|
7660
7722
|
limit: limit != null ? limit : DEFAULT_SEARCH_LIMIT,
|
|
7661
7723
|
enabled: shouldFetchResults
|
|
7662
7724
|
});
|
|
@@ -7671,8 +7733,8 @@ var Search = ({
|
|
|
7671
7733
|
}),
|
|
7672
7734
|
[openEvents]
|
|
7673
7735
|
);
|
|
7674
|
-
const livePrices = (0,
|
|
7675
|
-
const midpointResult = (0,
|
|
7736
|
+
const livePrices = (0, import_hooks30.useLiveOutcomePrices)(visibleVenueMarkets);
|
|
7737
|
+
const midpointResult = (0, import_hooks30.useMidpoints)(visibleVenueMarkets);
|
|
7676
7738
|
const searchDisplayPrices = (0, import_react10.useMemo)(() => {
|
|
7677
7739
|
if (!midpointResult.bestMidpointsByOutcomeId.size) return livePrices;
|
|
7678
7740
|
if (!livePrices.size) return midpointResult.bestMidpointsByOutcomeId;
|
|
@@ -7777,14 +7839,14 @@ var Search = ({
|
|
|
7777
7839
|
event.preventDefault();
|
|
7778
7840
|
handleSeeAllResults();
|
|
7779
7841
|
};
|
|
7780
|
-
return /* @__PURE__ */ (0,
|
|
7842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
7781
7843
|
"div",
|
|
7782
7844
|
{
|
|
7783
7845
|
className: cn("group/agg-search", "relative flex w-full flex-col", classNames == null ? void 0 : classNames.root),
|
|
7784
7846
|
onFocusCapture: handleFocusWithin,
|
|
7785
7847
|
onBlurCapture: handleBlurWithin,
|
|
7786
7848
|
children: [
|
|
7787
|
-
/* @__PURE__ */ (0,
|
|
7849
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("label", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
7788
7850
|
"div",
|
|
7789
7851
|
{
|
|
7790
7852
|
className: cn(
|
|
@@ -7800,7 +7862,7 @@ var Search = ({
|
|
|
7800
7862
|
),
|
|
7801
7863
|
onClick: handleFocusWithin,
|
|
7802
7864
|
children: [
|
|
7803
|
-
/* @__PURE__ */ (0,
|
|
7865
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7804
7866
|
Icon,
|
|
7805
7867
|
{
|
|
7806
7868
|
name: "search",
|
|
@@ -7808,7 +7870,7 @@ var Search = ({
|
|
|
7808
7870
|
className: cn("text-agg-muted-foreground", classNames == null ? void 0 : classNames.searchIcon)
|
|
7809
7871
|
}
|
|
7810
7872
|
),
|
|
7811
|
-
/* @__PURE__ */ (0,
|
|
7873
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7812
7874
|
"input",
|
|
7813
7875
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
7814
7876
|
ref: inputRef,
|
|
@@ -7829,11 +7891,11 @@ var Search = ({
|
|
|
7829
7891
|
)
|
|
7830
7892
|
})
|
|
7831
7893
|
),
|
|
7832
|
-
shouldRenderShortcut ? /* @__PURE__ */ (0,
|
|
7894
|
+
shouldRenderShortcut ? /* @__PURE__ */ (0, import_jsx_runtime131.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_runtime131.jsx)("span", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-muted-foreground", children: "/" }) }) : null
|
|
7833
7895
|
]
|
|
7834
7896
|
}
|
|
7835
7897
|
) }),
|
|
7836
|
-
shouldRenderLoadingState ? /* @__PURE__ */ (0,
|
|
7898
|
+
shouldRenderLoadingState ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7837
7899
|
"div",
|
|
7838
7900
|
{
|
|
7839
7901
|
className: cn(
|
|
@@ -7843,10 +7905,10 @@ var Search = ({
|
|
|
7843
7905
|
"mt-1",
|
|
7844
7906
|
classNames == null ? void 0 : classNames.emptyState
|
|
7845
7907
|
),
|
|
7846
|
-
children: /* @__PURE__ */ (0,
|
|
7908
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Skeleton, { view: "search" })
|
|
7847
7909
|
}
|
|
7848
7910
|
) : null,
|
|
7849
|
-
shouldRenderResults ? /* @__PURE__ */ (0,
|
|
7911
|
+
shouldRenderResults ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7850
7912
|
"div",
|
|
7851
7913
|
{
|
|
7852
7914
|
className: cn(
|
|
@@ -7856,7 +7918,7 @@ var Search = ({
|
|
|
7856
7918
|
"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)]",
|
|
7857
7919
|
classNames == null ? void 0 : classNames.dropdown
|
|
7858
7920
|
),
|
|
7859
|
-
children: /* @__PURE__ */ (0,
|
|
7921
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
7860
7922
|
"ul",
|
|
7861
7923
|
{
|
|
7862
7924
|
className: cn(
|
|
@@ -7866,7 +7928,7 @@ var Search = ({
|
|
|
7866
7928
|
role: "listbox",
|
|
7867
7929
|
"aria-label": labels.search.resultsAria,
|
|
7868
7930
|
children: [
|
|
7869
|
-
validatedResults.map((item, index) => /* @__PURE__ */ (0,
|
|
7931
|
+
validatedResults.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7870
7932
|
"li",
|
|
7871
7933
|
{
|
|
7872
7934
|
role: "presentation",
|
|
@@ -7875,7 +7937,7 @@ var Search = ({
|
|
|
7875
7937
|
index > 0 && "border-t border-agg-separator",
|
|
7876
7938
|
classNames == null ? void 0 : classNames.resultItem
|
|
7877
7939
|
),
|
|
7878
|
-
children: /* @__PURE__ */ (0,
|
|
7940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7879
7941
|
SearchResultRow,
|
|
7880
7942
|
{
|
|
7881
7943
|
item,
|
|
@@ -7887,12 +7949,12 @@ var Search = ({
|
|
|
7887
7949
|
},
|
|
7888
7950
|
item.id
|
|
7889
7951
|
)),
|
|
7890
|
-
/* @__PURE__ */ (0,
|
|
7952
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7891
7953
|
"li",
|
|
7892
7954
|
{
|
|
7893
7955
|
role: "presentation",
|
|
7894
7956
|
className: "agg-search-result-item border-t border-agg-separator",
|
|
7895
|
-
children: /* @__PURE__ */ (0,
|
|
7957
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7896
7958
|
SearchSeeAllResultsButton,
|
|
7897
7959
|
{
|
|
7898
7960
|
label: labels.search.seeAllResults,
|
|
@@ -7906,7 +7968,7 @@ var Search = ({
|
|
|
7906
7968
|
)
|
|
7907
7969
|
}
|
|
7908
7970
|
) : null,
|
|
7909
|
-
shouldRenderNoResults ? /* @__PURE__ */ (0,
|
|
7971
|
+
shouldRenderNoResults ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7910
7972
|
"div",
|
|
7911
7973
|
{
|
|
7912
7974
|
className: cn(
|
|
@@ -7916,7 +7978,7 @@ var Search = ({
|
|
|
7916
7978
|
"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)]",
|
|
7917
7979
|
classNames == null ? void 0 : classNames.emptyState
|
|
7918
7980
|
),
|
|
7919
|
-
children: /* @__PURE__ */ (0,
|
|
7981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
7920
7982
|
"div",
|
|
7921
7983
|
{
|
|
7922
7984
|
className: cn(
|
|
@@ -7926,15 +7988,15 @@ var Search = ({
|
|
|
7926
7988
|
role: "status",
|
|
7927
7989
|
"aria-live": "polite",
|
|
7928
7990
|
children: [
|
|
7929
|
-
/* @__PURE__ */ (0,
|
|
7991
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7930
7992
|
SearchEmptyIcon,
|
|
7931
7993
|
{
|
|
7932
7994
|
className: cn("h-10 w-10 text-agg-muted-foreground", classNames == null ? void 0 : classNames.emptyStateIcon),
|
|
7933
7995
|
"aria-hidden": true
|
|
7934
7996
|
}
|
|
7935
7997
|
),
|
|
7936
|
-
/* @__PURE__ */ (0,
|
|
7937
|
-
/* @__PURE__ */ (0,
|
|
7998
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex flex-col items-center gap-1 text-center", children: [
|
|
7999
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7938
8000
|
"p",
|
|
7939
8001
|
{
|
|
7940
8002
|
className: cn(
|
|
@@ -7945,7 +8007,7 @@ var Search = ({
|
|
|
7945
8007
|
children: labels.search.noResultsTitle
|
|
7946
8008
|
}
|
|
7947
8009
|
),
|
|
7948
|
-
/* @__PURE__ */ (0,
|
|
8010
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
7949
8011
|
"p",
|
|
7950
8012
|
{
|
|
7951
8013
|
className: cn(
|
|
@@ -7995,7 +8057,7 @@ var resolveHeaderSearchContent = ({
|
|
|
7995
8057
|
};
|
|
7996
8058
|
|
|
7997
8059
|
// src/primitives/header/index.tsx
|
|
7998
|
-
var
|
|
8060
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
7999
8061
|
var Header = ({
|
|
8000
8062
|
logo,
|
|
8001
8063
|
logoHref,
|
|
@@ -8008,8 +8070,8 @@ var Header = ({
|
|
|
8008
8070
|
sticky = true,
|
|
8009
8071
|
"aria-label": ariaLabel
|
|
8010
8072
|
}) => {
|
|
8011
|
-
const labels = (0,
|
|
8012
|
-
const logoContent = isHeaderLogoProps(logo) ? /* @__PURE__ */ (0,
|
|
8073
|
+
const labels = (0, import_hooks31.useLabels)();
|
|
8074
|
+
const logoContent = isHeaderLogoProps(logo) ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8013
8075
|
"img",
|
|
8014
8076
|
{
|
|
8015
8077
|
src: logo.src,
|
|
@@ -8018,14 +8080,14 @@ var Header = ({
|
|
|
8018
8080
|
height: logo.height,
|
|
8019
8081
|
className: cn("block max-h-full", classNames == null ? void 0 : classNames.logoElement)
|
|
8020
8082
|
}
|
|
8021
|
-
) : logo !== void 0 ? /* @__PURE__ */ (0,
|
|
8083
|
+
) : logo !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: classNames == null ? void 0 : classNames.logoElement, children: logo }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8022
8084
|
AggLogo,
|
|
8023
8085
|
{
|
|
8024
8086
|
className: cn("h-6 w-auto text-agg-foreground", classNames == null ? void 0 : classNames.logoElement),
|
|
8025
8087
|
title: labels.header.logoAria
|
|
8026
8088
|
}
|
|
8027
8089
|
);
|
|
8028
|
-
const wrappedLogo = logoHref ? /* @__PURE__ */ (0,
|
|
8090
|
+
const wrappedLogo = logoHref ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8029
8091
|
"a",
|
|
8030
8092
|
{
|
|
8031
8093
|
href: logoHref,
|
|
@@ -8034,7 +8096,7 @@ var Header = ({
|
|
|
8034
8096
|
onClick: onLogoClick,
|
|
8035
8097
|
children: logoContent
|
|
8036
8098
|
}
|
|
8037
|
-
) : onLogoClick ? /* @__PURE__ */ (0,
|
|
8099
|
+
) : onLogoClick ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8038
8100
|
"button",
|
|
8039
8101
|
{
|
|
8040
8102
|
type: "button",
|
|
@@ -8046,13 +8108,13 @@ var Header = ({
|
|
|
8046
8108
|
onClick: onLogoClick,
|
|
8047
8109
|
children: logoContent
|
|
8048
8110
|
}
|
|
8049
|
-
) : /* @__PURE__ */ (0,
|
|
8111
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: classNames == null ? void 0 : classNames.logoWrapper, children: logoContent });
|
|
8050
8112
|
const searchContent = resolveHeaderSearchContent({
|
|
8051
8113
|
search,
|
|
8052
8114
|
searchProps,
|
|
8053
|
-
renderSearch: (nextSearchProps) => /* @__PURE__ */ (0,
|
|
8115
|
+
renderSearch: (nextSearchProps) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Search, __spreadValues({}, nextSearchProps))
|
|
8054
8116
|
});
|
|
8055
|
-
return /* @__PURE__ */ (0,
|
|
8117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_jsx_runtime132.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8056
8118
|
"header",
|
|
8057
8119
|
{
|
|
8058
8120
|
role: "banner",
|
|
@@ -8061,7 +8123,7 @@ var Header = ({
|
|
|
8061
8123
|
fallbackLabel: labels.header.bannerAria
|
|
8062
8124
|
}),
|
|
8063
8125
|
className: cn(baseHeaderClasses, sticky && stickyHeaderClasses, classNames == null ? void 0 : classNames.root),
|
|
8064
|
-
children: /* @__PURE__ */ (0,
|
|
8126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
8065
8127
|
"div",
|
|
8066
8128
|
{
|
|
8067
8129
|
className: cn(
|
|
@@ -8076,7 +8138,7 @@ var Header = ({
|
|
|
8076
8138
|
classNames == null ? void 0 : classNames.inner
|
|
8077
8139
|
),
|
|
8078
8140
|
children: [
|
|
8079
|
-
/* @__PURE__ */ (0,
|
|
8141
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
8080
8142
|
"div",
|
|
8081
8143
|
{
|
|
8082
8144
|
className: cn(
|
|
@@ -8092,7 +8154,7 @@ var Header = ({
|
|
|
8092
8154
|
]
|
|
8093
8155
|
}
|
|
8094
8156
|
),
|
|
8095
|
-
searchContent ? /* @__PURE__ */ (0,
|
|
8157
|
+
searchContent ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8096
8158
|
"div",
|
|
8097
8159
|
{
|
|
8098
8160
|
className: cn(
|
|
@@ -8103,7 +8165,7 @@ var Header = ({
|
|
|
8103
8165
|
children: searchContent
|
|
8104
8166
|
}
|
|
8105
8167
|
) : null,
|
|
8106
|
-
/* @__PURE__ */ (0,
|
|
8168
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8107
8169
|
"div",
|
|
8108
8170
|
{
|
|
8109
8171
|
className: cn(
|
|
@@ -8166,7 +8228,7 @@ var resolveInlineAlertHasAction = ({
|
|
|
8166
8228
|
};
|
|
8167
8229
|
|
|
8168
8230
|
// src/primitives/inline-alert/index.tsx
|
|
8169
|
-
var
|
|
8231
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
8170
8232
|
var InlineAlert = ({
|
|
8171
8233
|
tone = INLINE_ALERT_DEFAULT_TONE,
|
|
8172
8234
|
variant,
|
|
@@ -8180,7 +8242,7 @@ var InlineAlert = ({
|
|
|
8180
8242
|
const resolvedVariant = resolveInlineAlertVariant({ tone, variant });
|
|
8181
8243
|
const hasAction = resolveInlineAlertHasAction({ actionLabel, onAction });
|
|
8182
8244
|
const { ariaLive, role } = INLINE_ALERT_LIVE_REGION_CONFIG[tone];
|
|
8183
|
-
return /* @__PURE__ */ (0,
|
|
8245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
8184
8246
|
"div",
|
|
8185
8247
|
{
|
|
8186
8248
|
className: cn(
|
|
@@ -8192,7 +8254,7 @@ var InlineAlert = ({
|
|
|
8192
8254
|
"aria-live": ariaLive,
|
|
8193
8255
|
"aria-label": ariaLabel,
|
|
8194
8256
|
children: [
|
|
8195
|
-
/* @__PURE__ */ (0,
|
|
8257
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8196
8258
|
Icon,
|
|
8197
8259
|
{
|
|
8198
8260
|
name: INLINE_ALERT_TONE_ICON_NAME[tone],
|
|
@@ -8200,14 +8262,14 @@ var InlineAlert = ({
|
|
|
8200
8262
|
"aria-hidden": "true"
|
|
8201
8263
|
}
|
|
8202
8264
|
),
|
|
8203
|
-
/* @__PURE__ */ (0,
|
|
8265
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8204
8266
|
"div",
|
|
8205
8267
|
{
|
|
8206
8268
|
className: cn(
|
|
8207
8269
|
"min-w-0",
|
|
8208
8270
|
resolvedVariant === "plain" && !hasAction ? "flex-none text-center" : "flex-1"
|
|
8209
8271
|
),
|
|
8210
|
-
children: /* @__PURE__ */ (0,
|
|
8272
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
8211
8273
|
"div",
|
|
8212
8274
|
{
|
|
8213
8275
|
className: cn(
|
|
@@ -8216,14 +8278,14 @@ var InlineAlert = ({
|
|
|
8216
8278
|
resolvedVariant === "plain" && !hasAction ? "items-center" : null
|
|
8217
8279
|
),
|
|
8218
8280
|
children: [
|
|
8219
|
-
title2 ? /* @__PURE__ */ (0,
|
|
8220
|
-
/* @__PURE__ */ (0,
|
|
8281
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: title2 }) : null,
|
|
8282
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground wrap-break-word", children: message })
|
|
8221
8283
|
]
|
|
8222
8284
|
}
|
|
8223
8285
|
)
|
|
8224
8286
|
}
|
|
8225
8287
|
),
|
|
8226
|
-
hasAction ? /* @__PURE__ */ (0,
|
|
8288
|
+
hasAction ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8227
8289
|
"button",
|
|
8228
8290
|
{
|
|
8229
8291
|
type: "button",
|
|
@@ -8243,7 +8305,7 @@ var InlineAlert = ({
|
|
|
8243
8305
|
InlineAlert.displayName = "InlineAlert";
|
|
8244
8306
|
|
|
8245
8307
|
// src/primitives/loading-icon/index.tsx
|
|
8246
|
-
var
|
|
8308
|
+
var import_hooks32 = require("@agg-build/hooks");
|
|
8247
8309
|
|
|
8248
8310
|
// src/primitives/loading-icon/loading-icon.constants.ts
|
|
8249
8311
|
var LOADING_ICON_DEFAULT_SIZE = "medium";
|
|
@@ -8261,18 +8323,18 @@ var resolveLoadingIconAriaLabel = ({
|
|
|
8261
8323
|
};
|
|
8262
8324
|
|
|
8263
8325
|
// src/primitives/loading-icon/index.tsx
|
|
8264
|
-
var
|
|
8326
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
8265
8327
|
var LoadingIcon = ({
|
|
8266
8328
|
size = LOADING_ICON_DEFAULT_SIZE,
|
|
8267
8329
|
variant = "default",
|
|
8268
8330
|
className,
|
|
8269
8331
|
ariaLabel
|
|
8270
8332
|
}) => {
|
|
8271
|
-
const labels = (0,
|
|
8333
|
+
const labels = (0, import_hooks32.useLabels)();
|
|
8272
8334
|
const {
|
|
8273
8335
|
features: { enableAnimations }
|
|
8274
|
-
} = (0,
|
|
8275
|
-
return /* @__PURE__ */ (0,
|
|
8336
|
+
} = (0, import_hooks32.useSdkUiConfig)();
|
|
8337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8276
8338
|
"span",
|
|
8277
8339
|
{
|
|
8278
8340
|
role: "status",
|
|
@@ -8285,7 +8347,7 @@ var LoadingIcon = ({
|
|
|
8285
8347
|
"inline-grid place-items-center text-agg-primary will-change-transform",
|
|
8286
8348
|
className
|
|
8287
8349
|
),
|
|
8288
|
-
children: /* @__PURE__ */ (0,
|
|
8350
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "inline-grid place-items-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8289
8351
|
"svg",
|
|
8290
8352
|
{
|
|
8291
8353
|
viewBox: LOADING_ICON_SVG_VIEW_BOX,
|
|
@@ -8293,8 +8355,8 @@ var LoadingIcon = ({
|
|
|
8293
8355
|
"block",
|
|
8294
8356
|
variant === "prominent" ? LOADING_ICON_PROMINENT_FRAME_CLASS : iconSizeClasses[size]
|
|
8295
8357
|
),
|
|
8296
|
-
children: variant === "prominent" ? /* @__PURE__ */ (0,
|
|
8297
|
-
enableAnimations ? /* @__PURE__ */ (0,
|
|
8358
|
+
children: variant === "prominent" ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("g", { children: [
|
|
8359
|
+
enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8298
8360
|
"animateTransform",
|
|
8299
8361
|
{
|
|
8300
8362
|
attributeName: "transform",
|
|
@@ -8306,7 +8368,7 @@ var LoadingIcon = ({
|
|
|
8306
8368
|
repeatCount: "indefinite"
|
|
8307
8369
|
}
|
|
8308
8370
|
) : null,
|
|
8309
|
-
/* @__PURE__ */ (0,
|
|
8371
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8310
8372
|
"circle",
|
|
8311
8373
|
{
|
|
8312
8374
|
cx: "22",
|
|
@@ -8320,8 +8382,8 @@ var LoadingIcon = ({
|
|
|
8320
8382
|
strokeDasharray: LOADING_ICON_PROMINENT_DASHARRAY
|
|
8321
8383
|
}
|
|
8322
8384
|
)
|
|
8323
|
-
] }) : /* @__PURE__ */ (0,
|
|
8324
|
-
enableAnimations ? /* @__PURE__ */ (0,
|
|
8385
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("g", { children: [
|
|
8386
|
+
enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8325
8387
|
"animateTransform",
|
|
8326
8388
|
{
|
|
8327
8389
|
attributeName: "transform",
|
|
@@ -8333,7 +8395,7 @@ var LoadingIcon = ({
|
|
|
8333
8395
|
repeatCount: "indefinite"
|
|
8334
8396
|
}
|
|
8335
8397
|
) : null,
|
|
8336
|
-
/* @__PURE__ */ (0,
|
|
8398
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8337
8399
|
"circle",
|
|
8338
8400
|
{
|
|
8339
8401
|
cx: "22",
|
|
@@ -8345,8 +8407,8 @@ var LoadingIcon = ({
|
|
|
8345
8407
|
strokeLinecap: "round",
|
|
8346
8408
|
strokeDasharray: "60 100",
|
|
8347
8409
|
strokeDashoffset: "0",
|
|
8348
|
-
children: enableAnimations ? /* @__PURE__ */ (0,
|
|
8349
|
-
/* @__PURE__ */ (0,
|
|
8410
|
+
children: enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
|
|
8411
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8350
8412
|
"animate",
|
|
8351
8413
|
{
|
|
8352
8414
|
attributeName: "stroke-dasharray",
|
|
@@ -8355,7 +8417,7 @@ var LoadingIcon = ({
|
|
|
8355
8417
|
repeatCount: "indefinite"
|
|
8356
8418
|
}
|
|
8357
8419
|
),
|
|
8358
|
-
/* @__PURE__ */ (0,
|
|
8420
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8359
8421
|
"animate",
|
|
8360
8422
|
{
|
|
8361
8423
|
attributeName: "stroke-dashoffset",
|
|
@@ -8376,7 +8438,7 @@ var LoadingIcon = ({
|
|
|
8376
8438
|
LoadingIcon.displayName = "LoadingIcon";
|
|
8377
8439
|
|
|
8378
8440
|
// src/primitives/modal/index.tsx
|
|
8379
|
-
var
|
|
8441
|
+
var import_hooks33 = require("@agg-build/hooks");
|
|
8380
8442
|
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
8381
8443
|
|
|
8382
8444
|
// src/primitives/modal/modal.constants.ts
|
|
@@ -8400,7 +8462,7 @@ var resolveModalCloseIcon = ({
|
|
|
8400
8462
|
};
|
|
8401
8463
|
|
|
8402
8464
|
// src/primitives/modal/index.tsx
|
|
8403
|
-
var
|
|
8465
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
8404
8466
|
var Modal = ({
|
|
8405
8467
|
open,
|
|
8406
8468
|
onOpenChange,
|
|
@@ -8408,7 +8470,7 @@ var Modal = ({
|
|
|
8408
8470
|
"aria-label": _ariaLabel,
|
|
8409
8471
|
"aria-labelledby": _ariaLabelledBy
|
|
8410
8472
|
}) => {
|
|
8411
|
-
return /* @__PURE__ */ (0,
|
|
8473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Dialog.Root, { open, onOpenChange, children });
|
|
8412
8474
|
};
|
|
8413
8475
|
var ModalContainer = ({
|
|
8414
8476
|
children,
|
|
@@ -8420,11 +8482,11 @@ var ModalContainer = ({
|
|
|
8420
8482
|
const {
|
|
8421
8483
|
general: { rootClassName },
|
|
8422
8484
|
features: { enableAnimations }
|
|
8423
|
-
} = (0,
|
|
8485
|
+
} = (0, import_hooks33.useSdkUiConfig)();
|
|
8424
8486
|
const overlayAnimationClassName = resolveModalOverlayAnimationClassName(enableAnimations);
|
|
8425
8487
|
const panelAnimationClassName = resolveModalPanelAnimationClassName(enableAnimations);
|
|
8426
|
-
return /* @__PURE__ */ (0,
|
|
8427
|
-
/* @__PURE__ */ (0,
|
|
8488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Dialog.Portal, { children: [
|
|
8489
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8428
8490
|
Dialog.Overlay,
|
|
8429
8491
|
{
|
|
8430
8492
|
className: cn(
|
|
@@ -8435,7 +8497,7 @@ var ModalContainer = ({
|
|
|
8435
8497
|
)
|
|
8436
8498
|
}
|
|
8437
8499
|
),
|
|
8438
|
-
/* @__PURE__ */ (0,
|
|
8500
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8439
8501
|
Dialog.Content,
|
|
8440
8502
|
{
|
|
8441
8503
|
className: cn(
|
|
@@ -8461,7 +8523,7 @@ var ModalContainer = ({
|
|
|
8461
8523
|
event.preventDefault();
|
|
8462
8524
|
}
|
|
8463
8525
|
},
|
|
8464
|
-
children: /* @__PURE__ */ (0,
|
|
8526
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8465
8527
|
"div",
|
|
8466
8528
|
{
|
|
8467
8529
|
className: cn(
|
|
@@ -8470,7 +8532,7 @@ var ModalContainer = ({
|
|
|
8470
8532
|
"flex h-full min-h-0 w-full justify-center p-0 md:p-5",
|
|
8471
8533
|
classNames == null ? void 0 : classNames.center
|
|
8472
8534
|
),
|
|
8473
|
-
children: /* @__PURE__ */ (0,
|
|
8535
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8474
8536
|
"div",
|
|
8475
8537
|
{
|
|
8476
8538
|
className: cn(
|
|
@@ -8510,14 +8572,14 @@ var ModalHeader = ({
|
|
|
8510
8572
|
}) => {
|
|
8511
8573
|
const {
|
|
8512
8574
|
features: { enableAnimations }
|
|
8513
|
-
} = (0,
|
|
8514
|
-
const labels = (0,
|
|
8515
|
-
const defaultCloseIcon = /* @__PURE__ */ (0,
|
|
8575
|
+
} = (0, import_hooks33.useSdkUiConfig)();
|
|
8576
|
+
const labels = (0, import_hooks33.useLabels)();
|
|
8577
|
+
const defaultCloseIcon = /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CloseIcon, { className: "h-6 w-6" });
|
|
8516
8578
|
const resolvedCloseIcon = resolveModalCloseIcon({
|
|
8517
8579
|
closeIcon,
|
|
8518
8580
|
defaultCloseIcon
|
|
8519
8581
|
});
|
|
8520
|
-
return /* @__PURE__ */ (0,
|
|
8582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
8521
8583
|
"div",
|
|
8522
8584
|
{
|
|
8523
8585
|
className: cn(
|
|
@@ -8530,7 +8592,7 @@ var ModalHeader = ({
|
|
|
8530
8592
|
classNames == null ? void 0 : classNames.root
|
|
8531
8593
|
),
|
|
8532
8594
|
children: [
|
|
8533
|
-
/* @__PURE__ */ (0,
|
|
8595
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
8534
8596
|
"div",
|
|
8535
8597
|
{
|
|
8536
8598
|
className: cn(
|
|
@@ -8543,8 +8605,8 @@ var ModalHeader = ({
|
|
|
8543
8605
|
classNames == null ? void 0 : classNames.container
|
|
8544
8606
|
),
|
|
8545
8607
|
children: [
|
|
8546
|
-
leftElement ? /* @__PURE__ */ (0,
|
|
8547
|
-
/* @__PURE__ */ (0,
|
|
8608
|
+
leftElement ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, { children: leftElement }) : null,
|
|
8609
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
8548
8610
|
"div",
|
|
8549
8611
|
{
|
|
8550
8612
|
className: cn(
|
|
@@ -8553,7 +8615,7 @@ var ModalHeader = ({
|
|
|
8553
8615
|
classNames == null ? void 0 : classNames.titleContainer
|
|
8554
8616
|
),
|
|
8555
8617
|
children: [
|
|
8556
|
-
/* @__PURE__ */ (0,
|
|
8618
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8557
8619
|
Dialog.Title,
|
|
8558
8620
|
{
|
|
8559
8621
|
className: cn(
|
|
@@ -8567,7 +8629,7 @@ var ModalHeader = ({
|
|
|
8567
8629
|
children: title2
|
|
8568
8630
|
}
|
|
8569
8631
|
),
|
|
8570
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
8632
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8571
8633
|
"span",
|
|
8572
8634
|
{
|
|
8573
8635
|
className: cn(
|
|
@@ -8581,9 +8643,9 @@ var ModalHeader = ({
|
|
|
8581
8643
|
]
|
|
8582
8644
|
}
|
|
8583
8645
|
),
|
|
8584
|
-
/* @__PURE__ */ (0,
|
|
8585
|
-
rightElement ? /* @__PURE__ */ (0,
|
|
8586
|
-
!hideClose && /* @__PURE__ */ (0,
|
|
8646
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "agg-modal-header-actions flex flex-row items-center justify-end gap-6", children: [
|
|
8647
|
+
rightElement ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, { children: rightElement }) : null,
|
|
8648
|
+
!hideClose && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8587
8649
|
Dialog.Close,
|
|
8588
8650
|
{
|
|
8589
8651
|
className: cn(
|
|
@@ -8600,14 +8662,14 @@ var ModalHeader = ({
|
|
|
8600
8662
|
]
|
|
8601
8663
|
}
|
|
8602
8664
|
),
|
|
8603
|
-
children ? /* @__PURE__ */ (0,
|
|
8665
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "agg-modal-header-extra", children }) : null
|
|
8604
8666
|
]
|
|
8605
8667
|
}
|
|
8606
8668
|
);
|
|
8607
8669
|
};
|
|
8608
8670
|
Modal.Header = ModalHeader;
|
|
8609
8671
|
var ModalBody = ({ children, classNames }) => {
|
|
8610
|
-
return /* @__PURE__ */ (0,
|
|
8672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8611
8673
|
"div",
|
|
8612
8674
|
{
|
|
8613
8675
|
className: cn(
|
|
@@ -8628,7 +8690,7 @@ var ModalFooter = ({
|
|
|
8628
8690
|
classNames,
|
|
8629
8691
|
hideBorder = false
|
|
8630
8692
|
}) => {
|
|
8631
|
-
return /* @__PURE__ */ (0,
|
|
8693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8632
8694
|
"div",
|
|
8633
8695
|
{
|
|
8634
8696
|
className: cn(
|
|
@@ -8650,8 +8712,8 @@ Modal.displayName = "Modal";
|
|
|
8650
8712
|
|
|
8651
8713
|
// src/primitives/number-value.tsx
|
|
8652
8714
|
var import_react11 = require("react");
|
|
8653
|
-
var
|
|
8654
|
-
var
|
|
8715
|
+
var import_hooks34 = require("@agg-build/hooks");
|
|
8716
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
8655
8717
|
var NumberValue = ({
|
|
8656
8718
|
value,
|
|
8657
8719
|
format = "number",
|
|
@@ -8661,7 +8723,7 @@ var NumberValue = ({
|
|
|
8661
8723
|
}) => {
|
|
8662
8724
|
const {
|
|
8663
8725
|
formatting: { formatCompactCurrency, formatCurrency, formatDate, formatNumber, formatPercent }
|
|
8664
|
-
} = (0,
|
|
8726
|
+
} = (0, import_hooks34.useSdkUiConfig)();
|
|
8665
8727
|
const formatted = (0, import_react11.useMemo)(() => {
|
|
8666
8728
|
if (value == null) return fallback;
|
|
8667
8729
|
if (format === "date") {
|
|
@@ -8685,12 +8747,12 @@ var NumberValue = ({
|
|
|
8685
8747
|
formatPercent,
|
|
8686
8748
|
value
|
|
8687
8749
|
]);
|
|
8688
|
-
return /* @__PURE__ */ (0,
|
|
8750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { className: cn("font-agg-sans", className), "aria-label": ariaLabel, children: formatted });
|
|
8689
8751
|
};
|
|
8690
8752
|
NumberValue.displayName = "NumberValue";
|
|
8691
8753
|
|
|
8692
8754
|
// src/primitives/select/index.tsx
|
|
8693
|
-
var
|
|
8755
|
+
var import_hooks35 = require("@agg-build/hooks");
|
|
8694
8756
|
var import_react12 = require("react");
|
|
8695
8757
|
var import_react_dom = require("react-dom");
|
|
8696
8758
|
|
|
@@ -8712,7 +8774,7 @@ var resolveIsSelectDisabled = ({
|
|
|
8712
8774
|
};
|
|
8713
8775
|
|
|
8714
8776
|
// src/primitives/select/index.tsx
|
|
8715
|
-
var
|
|
8777
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
8716
8778
|
var SELECT_DROPDOWN_Z = 1e4;
|
|
8717
8779
|
function resolveSelectPortalContainer(triggerRoot) {
|
|
8718
8780
|
var _a, _b;
|
|
@@ -8735,11 +8797,11 @@ var Select = ({
|
|
|
8735
8797
|
contentSideOffset = 8
|
|
8736
8798
|
}) => {
|
|
8737
8799
|
var _a;
|
|
8738
|
-
const labels = (0,
|
|
8800
|
+
const labels = (0, import_hooks35.useLabels)();
|
|
8739
8801
|
const {
|
|
8740
8802
|
general: { rootClassName },
|
|
8741
8803
|
features: { enableAnimations }
|
|
8742
|
-
} = (0,
|
|
8804
|
+
} = (0, import_hooks35.useSdkUiConfig)();
|
|
8743
8805
|
const isDisabled = resolveIsSelectDisabled({ disabled, items });
|
|
8744
8806
|
const selectedItem = resolveSelectedItem(items, value);
|
|
8745
8807
|
const [isOpen, setIsOpen] = (0, import_react12.useState)(false);
|
|
@@ -8831,7 +8893,7 @@ var Select = ({
|
|
|
8831
8893
|
};
|
|
8832
8894
|
const isInline = variant === "inline";
|
|
8833
8895
|
const triggerRadiusClass = triggerClassName != null ? triggerClassName : isInline ? "rounded-agg-sm" : "rounded-agg-md";
|
|
8834
|
-
const listbox = menuRect ? /* @__PURE__ */ (0,
|
|
8896
|
+
const listbox = menuRect ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
8835
8897
|
"div",
|
|
8836
8898
|
{
|
|
8837
8899
|
ref: portalRef,
|
|
@@ -8859,7 +8921,7 @@ var Select = ({
|
|
|
8859
8921
|
const isSelected = item.value === value;
|
|
8860
8922
|
const isHidden = item.hidden === true;
|
|
8861
8923
|
if (isHidden) return null;
|
|
8862
|
-
return /* @__PURE__ */ (0,
|
|
8924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
8863
8925
|
"button",
|
|
8864
8926
|
{
|
|
8865
8927
|
type: "button",
|
|
@@ -8883,14 +8945,14 @@ var Select = ({
|
|
|
8883
8945
|
handleClose();
|
|
8884
8946
|
},
|
|
8885
8947
|
children: [
|
|
8886
|
-
isInline && isSelected ? /* @__PURE__ */ (0,
|
|
8948
|
+
isInline && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
8887
8949
|
"span",
|
|
8888
8950
|
{
|
|
8889
8951
|
className: "agg-select-item-indicator absolute bottom-2 left-0 top-2 w-1 bg-agg-primary",
|
|
8890
8952
|
"aria-hidden": true
|
|
8891
8953
|
}
|
|
8892
8954
|
) : null,
|
|
8893
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
8955
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
8894
8956
|
"span",
|
|
8895
8957
|
{
|
|
8896
8958
|
className: cn(
|
|
@@ -8899,7 +8961,7 @@ var Select = ({
|
|
|
8899
8961
|
),
|
|
8900
8962
|
children: item.icon
|
|
8901
8963
|
}
|
|
8902
|
-
) : item.iconUrl ? /* @__PURE__ */ (0,
|
|
8964
|
+
) : item.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
8903
8965
|
RemoteImage,
|
|
8904
8966
|
{
|
|
8905
8967
|
src: item.iconUrl,
|
|
@@ -8907,7 +8969,7 @@ var Select = ({
|
|
|
8907
8969
|
className: "agg-select-item-icon h-4 w-4 shrink-0 rounded-sm object-contain"
|
|
8908
8970
|
}
|
|
8909
8971
|
) : null,
|
|
8910
|
-
/* @__PURE__ */ (0,
|
|
8972
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "agg-select-item-label truncate", children: item.label })
|
|
8911
8973
|
]
|
|
8912
8974
|
},
|
|
8913
8975
|
item.value
|
|
@@ -8915,7 +8977,7 @@ var Select = ({
|
|
|
8915
8977
|
})
|
|
8916
8978
|
}
|
|
8917
8979
|
) : null;
|
|
8918
|
-
return /* @__PURE__ */ (0,
|
|
8980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
8919
8981
|
"div",
|
|
8920
8982
|
{
|
|
8921
8983
|
ref: containerRef,
|
|
@@ -8925,7 +8987,7 @@ var Select = ({
|
|
|
8925
8987
|
className
|
|
8926
8988
|
),
|
|
8927
8989
|
children: [
|
|
8928
|
-
/* @__PURE__ */ (0,
|
|
8990
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
8929
8991
|
"button",
|
|
8930
8992
|
{
|
|
8931
8993
|
type: "button",
|
|
@@ -8949,7 +9011,7 @@ var Select = ({
|
|
|
8949
9011
|
onPointerEnter: handlePointerEnter,
|
|
8950
9012
|
onPointerLeave: handlePointerLeave,
|
|
8951
9013
|
children: [
|
|
8952
|
-
(selectedItem == null ? void 0 : selectedItem.icon) ? /* @__PURE__ */ (0,
|
|
9014
|
+
(selectedItem == null ? void 0 : selectedItem.icon) ? /* @__PURE__ */ (0, import_jsx_runtime137.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_runtime137.jsx)(
|
|
8953
9015
|
RemoteImage,
|
|
8954
9016
|
{
|
|
8955
9017
|
src: selectedItem.iconUrl,
|
|
@@ -8957,18 +9019,18 @@ var Select = ({
|
|
|
8957
9019
|
className: "agg-select-icon h-4 w-4 shrink-0 rounded-sm object-contain"
|
|
8958
9020
|
}
|
|
8959
9021
|
) : null,
|
|
8960
|
-
/* @__PURE__ */ (0,
|
|
9022
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { className: "agg-select-value flex-1 truncate", children: (_a = selectedItem == null ? void 0 : selectedItem.label) != null ? _a : "" })
|
|
8961
9023
|
]
|
|
8962
9024
|
}
|
|
8963
9025
|
),
|
|
8964
|
-
/* @__PURE__ */ (0,
|
|
9026
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
8965
9027
|
"span",
|
|
8966
9028
|
{
|
|
8967
9029
|
className: cn(
|
|
8968
9030
|
"agg-select-chevron pointer-events-none absolute inset-y-0 inline-flex items-center justify-center",
|
|
8969
9031
|
isInline ? "right-2 text-agg-foreground" : "right-3 text-agg-muted-foreground"
|
|
8970
9032
|
),
|
|
8971
|
-
children: /* @__PURE__ */ (0,
|
|
9033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
8972
9034
|
Icon,
|
|
8973
9035
|
{
|
|
8974
9036
|
name: isOpen ? "chevron-up" : "chevron-down-thin",
|
|
@@ -8987,7 +9049,7 @@ Select.displayName = "Select";
|
|
|
8987
9049
|
|
|
8988
9050
|
// src/primitives/state-message/index.tsx
|
|
8989
9051
|
var import_react13 = require("react");
|
|
8990
|
-
var
|
|
9052
|
+
var import_hooks36 = require("@agg-build/hooks");
|
|
8991
9053
|
|
|
8992
9054
|
// src/primitives/typography/typography.constants.ts
|
|
8993
9055
|
var typographyVariants = [
|
|
@@ -9084,7 +9146,7 @@ var getTypographyClassName = ({
|
|
|
9084
9146
|
};
|
|
9085
9147
|
|
|
9086
9148
|
// src/primitives/typography/index.tsx
|
|
9087
|
-
var
|
|
9149
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
9088
9150
|
var Typography = ({
|
|
9089
9151
|
as: Component2 = "p",
|
|
9090
9152
|
variant = "body",
|
|
@@ -9092,7 +9154,7 @@ var Typography = ({
|
|
|
9092
9154
|
children,
|
|
9093
9155
|
"aria-label": ariaLabel
|
|
9094
9156
|
}) => {
|
|
9095
|
-
return /* @__PURE__ */ (0,
|
|
9157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Component2, { className: getTypographyClassName({ className, variant }), "aria-label": ariaLabel, children });
|
|
9096
9158
|
};
|
|
9097
9159
|
Typography.displayName = "Typography";
|
|
9098
9160
|
|
|
@@ -9105,7 +9167,7 @@ var resolveStateMessageHasAction = ({ onAction }) => {
|
|
|
9105
9167
|
};
|
|
9106
9168
|
|
|
9107
9169
|
// src/primitives/state-message/index.tsx
|
|
9108
|
-
var
|
|
9170
|
+
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
9109
9171
|
var StateMessage = (_a) => {
|
|
9110
9172
|
var _b = _a, {
|
|
9111
9173
|
icon,
|
|
@@ -9120,13 +9182,13 @@ var StateMessage = (_a) => {
|
|
|
9120
9182
|
"onAction",
|
|
9121
9183
|
"classNames"
|
|
9122
9184
|
]);
|
|
9123
|
-
const labels = (0,
|
|
9185
|
+
const labels = (0, import_hooks36.useLabels)();
|
|
9124
9186
|
const hasAction = resolveStateMessageHasAction({ onAction });
|
|
9125
9187
|
const resolvedIcon = (0, import_react13.cloneElement)(icon, {
|
|
9126
9188
|
className: cn(STATE_MESSAGE_ICON_CLASS_NAME, icon.props.className, classNames == null ? void 0 : classNames.icon),
|
|
9127
9189
|
"aria-hidden": true
|
|
9128
9190
|
});
|
|
9129
|
-
return /* @__PURE__ */ (0,
|
|
9191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
9130
9192
|
"div",
|
|
9131
9193
|
__spreadProps(__spreadValues({}, rest), {
|
|
9132
9194
|
className: cn(
|
|
@@ -9137,7 +9199,7 @@ var StateMessage = (_a) => {
|
|
|
9137
9199
|
role: "status",
|
|
9138
9200
|
"aria-live": "polite",
|
|
9139
9201
|
"aria-label": title2,
|
|
9140
|
-
children: /* @__PURE__ */ (0,
|
|
9202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
9141
9203
|
"div",
|
|
9142
9204
|
{
|
|
9143
9205
|
className: cn(
|
|
@@ -9146,7 +9208,7 @@ var StateMessage = (_a) => {
|
|
|
9146
9208
|
),
|
|
9147
9209
|
children: [
|
|
9148
9210
|
resolvedIcon,
|
|
9149
|
-
/* @__PURE__ */ (0,
|
|
9211
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
9150
9212
|
"div",
|
|
9151
9213
|
{
|
|
9152
9214
|
className: cn(
|
|
@@ -9154,8 +9216,8 @@ var StateMessage = (_a) => {
|
|
|
9154
9216
|
classNames == null ? void 0 : classNames.text
|
|
9155
9217
|
),
|
|
9156
9218
|
children: [
|
|
9157
|
-
/* @__PURE__ */ (0,
|
|
9158
|
-
description ? /* @__PURE__ */ (0,
|
|
9219
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Typography, { variant: "body-strong", className: classNames == null ? void 0 : classNames.title, children: title2 }),
|
|
9220
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
9159
9221
|
Typography,
|
|
9160
9222
|
{
|
|
9161
9223
|
variant: "label",
|
|
@@ -9166,7 +9228,7 @@ var StateMessage = (_a) => {
|
|
|
9166
9228
|
]
|
|
9167
9229
|
}
|
|
9168
9230
|
),
|
|
9169
|
-
hasAction ? /* @__PURE__ */ (0,
|
|
9231
|
+
hasAction ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
9170
9232
|
Button,
|
|
9171
9233
|
{
|
|
9172
9234
|
variant: "tertiary",
|
|
@@ -9193,7 +9255,7 @@ var StateMessage = (_a) => {
|
|
|
9193
9255
|
StateMessage.displayName = "StateMessage";
|
|
9194
9256
|
|
|
9195
9257
|
// src/primitives/tabs/index.tsx
|
|
9196
|
-
var
|
|
9258
|
+
var import_hooks37 = require("@agg-build/hooks");
|
|
9197
9259
|
var import_react15 = require("react");
|
|
9198
9260
|
|
|
9199
9261
|
// src/shared/use-horizontal-scroll-state.ts
|
|
@@ -9268,7 +9330,7 @@ var findEdgeEnabledIndex = (items, direction) => {
|
|
|
9268
9330
|
};
|
|
9269
9331
|
|
|
9270
9332
|
// src/primitives/tabs/index.tsx
|
|
9271
|
-
var
|
|
9333
|
+
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
9272
9334
|
var getTabButtonClassName = ({
|
|
9273
9335
|
enableAnimations,
|
|
9274
9336
|
isBarVariant,
|
|
@@ -9311,10 +9373,10 @@ var Tabs = ({
|
|
|
9311
9373
|
className,
|
|
9312
9374
|
classNames
|
|
9313
9375
|
}) => {
|
|
9314
|
-
const labels = (0,
|
|
9376
|
+
const labels = (0, import_hooks37.useLabels)();
|
|
9315
9377
|
const {
|
|
9316
9378
|
features: { enableAnimations }
|
|
9317
|
-
} = (0,
|
|
9379
|
+
} = (0, import_hooks37.useSdkUiConfig)();
|
|
9318
9380
|
const buttonRefs = (0, import_react15.useRef)([]);
|
|
9319
9381
|
const dragStateRef = (0, import_react15.useRef)({
|
|
9320
9382
|
isPointerDown: false,
|
|
@@ -9596,7 +9658,7 @@ var Tabs = ({
|
|
|
9596
9658
|
value
|
|
9597
9659
|
]);
|
|
9598
9660
|
if (shouldUseOverflowSelect) {
|
|
9599
|
-
return /* @__PURE__ */ (0,
|
|
9661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: cn("group/agg-tabs w-full", className, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9600
9662
|
Select,
|
|
9601
9663
|
{
|
|
9602
9664
|
ariaLabel,
|
|
@@ -9608,7 +9670,7 @@ var Tabs = ({
|
|
|
9608
9670
|
}
|
|
9609
9671
|
) });
|
|
9610
9672
|
}
|
|
9611
|
-
return /* @__PURE__ */ (0,
|
|
9673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
9612
9674
|
"div",
|
|
9613
9675
|
{
|
|
9614
9676
|
className: cn(
|
|
@@ -9619,7 +9681,7 @@ var Tabs = ({
|
|
|
9619
9681
|
classNames == null ? void 0 : classNames.root
|
|
9620
9682
|
),
|
|
9621
9683
|
children: [
|
|
9622
|
-
/* @__PURE__ */ (0,
|
|
9684
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
9623
9685
|
"div",
|
|
9624
9686
|
{
|
|
9625
9687
|
ref: tabListRef,
|
|
@@ -9633,7 +9695,7 @@ var Tabs = ({
|
|
|
9633
9695
|
onPointerUp: handleEndTabListDrag,
|
|
9634
9696
|
onWheel: handleTabListWheel,
|
|
9635
9697
|
children: [
|
|
9636
|
-
shouldUseOverflowScroll && !isBarVariant && hasOverflow ? /* @__PURE__ */ (0,
|
|
9698
|
+
shouldUseOverflowScroll && !isBarVariant && hasOverflow ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9637
9699
|
"span",
|
|
9638
9700
|
{
|
|
9639
9701
|
"aria-hidden": true,
|
|
@@ -9644,7 +9706,7 @@ var Tabs = ({
|
|
|
9644
9706
|
var _a;
|
|
9645
9707
|
const isActive = item.value === value;
|
|
9646
9708
|
const isComingSoon = (_a = item == null ? void 0 : item.isComingSoon) != null ? _a : false;
|
|
9647
|
-
return /* @__PURE__ */ (0,
|
|
9709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
9648
9710
|
"button",
|
|
9649
9711
|
{
|
|
9650
9712
|
ref: (buttonElement) => {
|
|
@@ -9680,7 +9742,7 @@ var Tabs = ({
|
|
|
9680
9742
|
),
|
|
9681
9743
|
children: [
|
|
9682
9744
|
item.icon ? item.icon : null,
|
|
9683
|
-
/* @__PURE__ */ (0,
|
|
9745
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
9684
9746
|
"span",
|
|
9685
9747
|
{
|
|
9686
9748
|
className: cn(
|
|
@@ -9698,7 +9760,7 @@ var Tabs = ({
|
|
|
9698
9760
|
item.value
|
|
9699
9761
|
);
|
|
9700
9762
|
}),
|
|
9701
|
-
!isBarVariant ? /* @__PURE__ */ (0,
|
|
9763
|
+
!isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9702
9764
|
"span",
|
|
9703
9765
|
{
|
|
9704
9766
|
"aria-hidden": true,
|
|
@@ -9717,8 +9779,8 @@ var Tabs = ({
|
|
|
9717
9779
|
]
|
|
9718
9780
|
}
|
|
9719
9781
|
),
|
|
9720
|
-
shouldUseOverflowScroll && !isBarVariant ? /* @__PURE__ */ (0,
|
|
9721
|
-
/* @__PURE__ */ (0,
|
|
9782
|
+
shouldUseOverflowScroll && !isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
|
|
9783
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9722
9784
|
"span",
|
|
9723
9785
|
{
|
|
9724
9786
|
"aria-hidden": true,
|
|
@@ -9730,7 +9792,7 @@ var Tabs = ({
|
|
|
9730
9792
|
)
|
|
9731
9793
|
}
|
|
9732
9794
|
),
|
|
9733
|
-
/* @__PURE__ */ (0,
|
|
9795
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9734
9796
|
"span",
|
|
9735
9797
|
{
|
|
9736
9798
|
"aria-hidden": true,
|
|
@@ -9743,8 +9805,8 @@ var Tabs = ({
|
|
|
9743
9805
|
}
|
|
9744
9806
|
)
|
|
9745
9807
|
] }) : null,
|
|
9746
|
-
shouldUseOverflowScroll && isBarVariant ? /* @__PURE__ */ (0,
|
|
9747
|
-
/* @__PURE__ */ (0,
|
|
9808
|
+
shouldUseOverflowScroll && isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
|
|
9809
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9748
9810
|
"button",
|
|
9749
9811
|
{
|
|
9750
9812
|
type: "button",
|
|
@@ -9766,10 +9828,10 @@ var Tabs = ({
|
|
|
9766
9828
|
behavior: getScrollBehavior(enableAnimations)
|
|
9767
9829
|
});
|
|
9768
9830
|
},
|
|
9769
|
-
children: /* @__PURE__ */ (0,
|
|
9831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Icon, { name: "chevron-left", size: "small", color: "currentColor" })
|
|
9770
9832
|
}
|
|
9771
9833
|
),
|
|
9772
|
-
/* @__PURE__ */ (0,
|
|
9834
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
9773
9835
|
"button",
|
|
9774
9836
|
{
|
|
9775
9837
|
type: "button",
|
|
@@ -9791,7 +9853,7 @@ var Tabs = ({
|
|
|
9791
9853
|
behavior: getScrollBehavior(enableAnimations)
|
|
9792
9854
|
});
|
|
9793
9855
|
},
|
|
9794
|
-
children: /* @__PURE__ */ (0,
|
|
9856
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Icon, { name: "chevron-right", size: "small", color: "currentColor" })
|
|
9795
9857
|
}
|
|
9796
9858
|
)
|
|
9797
9859
|
] }) : null
|
|
@@ -9804,7 +9866,7 @@ Tabs.displayName = "Tabs";
|
|
|
9804
9866
|
// src/primitives/toast/index.tsx
|
|
9805
9867
|
var RadixToast = __toESM(require("@radix-ui/react-toast"));
|
|
9806
9868
|
var import_react16 = require("react");
|
|
9807
|
-
var
|
|
9869
|
+
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
9808
9870
|
var DEFAULT_DURATION_MS = 5e3;
|
|
9809
9871
|
var EXIT_ANIMATION_MS = 350;
|
|
9810
9872
|
var TONE_ACCENT_CLASS = {
|
|
@@ -9853,9 +9915,9 @@ function ToastProvider({
|
|
|
9853
9915
|
},
|
|
9854
9916
|
[defaultDurationMs]
|
|
9855
9917
|
);
|
|
9856
|
-
return /* @__PURE__ */ (0,
|
|
9918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToastContext.Provider, { value: { toast, dismiss }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(RadixToast.Provider, { swipeDirection, swipeThreshold, children: [
|
|
9857
9919
|
children,
|
|
9858
|
-
toasts.map((entry) => /* @__PURE__ */ (0,
|
|
9920
|
+
toasts.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
9859
9921
|
ToastRow,
|
|
9860
9922
|
{
|
|
9861
9923
|
entry,
|
|
@@ -9865,7 +9927,7 @@ function ToastProvider({
|
|
|
9865
9927
|
},
|
|
9866
9928
|
entry.id
|
|
9867
9929
|
)),
|
|
9868
|
-
/* @__PURE__ */ (0,
|
|
9930
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
9869
9931
|
RadixToast.Viewport,
|
|
9870
9932
|
{
|
|
9871
9933
|
className: cn(
|
|
@@ -9945,7 +10007,7 @@ function ToastRow({ entry, onOpenChange }) {
|
|
|
9945
10007
|
clearCloseTimer();
|
|
9946
10008
|
};
|
|
9947
10009
|
}, [clearCloseTimer, clearDismissTimer, duration, startDismissTimer]);
|
|
9948
|
-
return /* @__PURE__ */ (0,
|
|
10010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
9949
10011
|
RadixToast.Root,
|
|
9950
10012
|
{
|
|
9951
10013
|
open: isOpen,
|
|
@@ -9966,7 +10028,7 @@ function ToastRow({ entry, onOpenChange }) {
|
|
|
9966
10028
|
TONE_ACCENT_CLASS[entry.tone]
|
|
9967
10029
|
),
|
|
9968
10030
|
children: [
|
|
9969
|
-
/* @__PURE__ */ (0,
|
|
10031
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
9970
10032
|
Icon,
|
|
9971
10033
|
{
|
|
9972
10034
|
name: TONE_ICON_NAME[entry.tone],
|
|
@@ -9974,25 +10036,25 @@ function ToastRow({ entry, onOpenChange }) {
|
|
|
9974
10036
|
"aria-hidden": "true"
|
|
9975
10037
|
}
|
|
9976
10038
|
),
|
|
9977
|
-
/* @__PURE__ */ (0,
|
|
9978
|
-
entry.title ? /* @__PURE__ */ (0,
|
|
9979
|
-
/* @__PURE__ */ (0,
|
|
9980
|
-
entry.detail ? /* @__PURE__ */ (0,
|
|
10039
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
10040
|
+
entry.title ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(RadixToast.Title, { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-foreground", children: entry.title }) : null,
|
|
10041
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.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 }),
|
|
10042
|
+
entry.detail ? /* @__PURE__ */ (0, import_jsx_runtime141.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
|
|
9981
10043
|
] }),
|
|
9982
|
-
/* @__PURE__ */ (0,
|
|
10044
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
9983
10045
|
RadixToast.Close,
|
|
9984
10046
|
{
|
|
9985
10047
|
"aria-label": "Dismiss",
|
|
9986
10048
|
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",
|
|
9987
|
-
children: /* @__PURE__ */ (0,
|
|
10049
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Icon, { name: "close", className: "h-4! w-4!", "aria-hidden": "true" })
|
|
9988
10050
|
}
|
|
9989
10051
|
),
|
|
9990
|
-
/* @__PURE__ */ (0,
|
|
10052
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
9991
10053
|
"div",
|
|
9992
10054
|
{
|
|
9993
10055
|
className: "absolute right-[-1px] bottom-[-1px] left-[-1px] h-1 bg-[color-mix(in_srgb,var(--agg-toast-accent)_30%,transparent)]",
|
|
9994
10056
|
"aria-hidden": "true",
|
|
9995
|
-
children: /* @__PURE__ */ (0,
|
|
10057
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
9996
10058
|
"div",
|
|
9997
10059
|
{
|
|
9998
10060
|
"data-testid": "agg-toast-progress",
|
|
@@ -10020,7 +10082,7 @@ function useOptionalToast() {
|
|
|
10020
10082
|
}
|
|
10021
10083
|
|
|
10022
10084
|
// src/primitives/tooltip/index.tsx
|
|
10023
|
-
var
|
|
10085
|
+
var import_hooks38 = require("@agg-build/hooks");
|
|
10024
10086
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
10025
10087
|
var import_react17 = require("react");
|
|
10026
10088
|
|
|
@@ -10054,7 +10116,7 @@ var resolveTooltipArrowDimensions = (size) => {
|
|
|
10054
10116
|
};
|
|
10055
10117
|
|
|
10056
10118
|
// src/primitives/tooltip/index.tsx
|
|
10057
|
-
var
|
|
10119
|
+
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
10058
10120
|
var Tooltip = ({
|
|
10059
10121
|
content,
|
|
10060
10122
|
children,
|
|
@@ -10069,25 +10131,25 @@ var Tooltip = ({
|
|
|
10069
10131
|
const {
|
|
10070
10132
|
general: { rootClassName },
|
|
10071
10133
|
features: { enableAnimations }
|
|
10072
|
-
} = (0,
|
|
10134
|
+
} = (0, import_hooks38.useSdkUiConfig)();
|
|
10073
10135
|
const trigger = (0, import_react17.useMemo)(() => {
|
|
10074
10136
|
if (children) return children;
|
|
10075
|
-
return /* @__PURE__ */ (0,
|
|
10137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
10076
10138
|
"button",
|
|
10077
10139
|
{
|
|
10078
10140
|
type: "button",
|
|
10079
10141
|
className: resolveTooltipTriggerClassName(classNames == null ? void 0 : classNames.trigger),
|
|
10080
10142
|
"aria-label": ariaLabel != null ? ariaLabel : defaultTooltipTriggerAriaLabel,
|
|
10081
|
-
children: /* @__PURE__ */ (0,
|
|
10143
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Icon, { name: "info", size: "small", className: cn(classNames == null ? void 0 : classNames.icon), "aria-hidden": true })
|
|
10082
10144
|
}
|
|
10083
10145
|
);
|
|
10084
10146
|
}, [children, classNames == null ? void 0 : classNames.trigger, classNames == null ? void 0 : classNames.icon, ariaLabel]);
|
|
10085
10147
|
const { width: arrowWidth, height: arrowHeight } = resolveTooltipArrowDimensions(size);
|
|
10086
10148
|
const arrowPoints = `0,0 ${arrowWidth},0 ${arrowWidth / 2},${arrowHeight}`;
|
|
10087
10149
|
const arrowBorderPath = `M0 0 L${arrowWidth / 2} ${arrowHeight} L${arrowWidth} 0`;
|
|
10088
|
-
return /* @__PURE__ */ (0,
|
|
10089
|
-
/* @__PURE__ */ (0,
|
|
10090
|
-
/* @__PURE__ */ (0,
|
|
10150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(TooltipPrimitive.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(TooltipPrimitive.Root, { children: [
|
|
10151
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: trigger }),
|
|
10152
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
|
|
10091
10153
|
TooltipPrimitive.Content,
|
|
10092
10154
|
{
|
|
10093
10155
|
side,
|
|
@@ -10111,7 +10173,7 @@ var Tooltip = ({
|
|
|
10111
10173
|
classNames == null ? void 0 : classNames.content
|
|
10112
10174
|
),
|
|
10113
10175
|
children: [
|
|
10114
|
-
/* @__PURE__ */ (0,
|
|
10176
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(TooltipPrimitive.Arrow, { asChild: true, width: arrowWidth, height: arrowHeight, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
|
|
10115
10177
|
"svg",
|
|
10116
10178
|
{
|
|
10117
10179
|
width: arrowWidth,
|
|
@@ -10120,8 +10182,8 @@ var Tooltip = ({
|
|
|
10120
10182
|
"aria-hidden": "true",
|
|
10121
10183
|
className: cn("overflow-visible", classNames == null ? void 0 : classNames.arrow),
|
|
10122
10184
|
children: [
|
|
10123
|
-
/* @__PURE__ */ (0,
|
|
10124
|
-
/* @__PURE__ */ (0,
|
|
10185
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("polygon", { points: arrowPoints, className: "fill-agg-secondary" }),
|
|
10186
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
10125
10187
|
"path",
|
|
10126
10188
|
{
|
|
10127
10189
|
d: arrowBorderPath,
|