@agg-build/ui 4.17.0 → 4.17.3
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-D2BTU7QI.mjs → chunk-7E4UXCEX.mjs} +223 -169
- package/dist/{chunk-QGONLJLE.mjs → chunk-B5ALKYD5.mjs} +210 -184
- package/dist/{chunk-RR44PSKH.mjs → chunk-BBDFSTIA.mjs} +3 -1
- package/dist/{chunk-M6U2RKBD.mjs → chunk-DSQSQ4RG.mjs} +127 -62
- package/dist/{chunk-5SCDQSNA.mjs → chunk-JI5KV4QI.mjs} +2 -2
- package/dist/{chunk-NIRCF54M.mjs → chunk-RZLM3M5R.mjs} +2 -2
- package/dist/{chunk-HFMKCV4L.mjs → chunk-TK62UB5F.mjs} +27 -16
- package/dist/events.js +29 -16
- package/dist/events.mjs +3 -3
- package/dist/index.js +1060 -930
- package/dist/index.mjs +9 -38
- package/dist/modals.js +212 -184
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +841 -684
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +3 -1
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +535 -442
- package/dist/trading.mjs +4 -4
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.mts +0 -2
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.ts +0 -2
- package/dist/types/auth/connect-button-view/index.d.mts +1 -1
- package/dist/types/auth/connect-button-view/index.d.ts +1 -1
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +3 -1
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +3 -1
- package/dist/types/pages/user-profile/cost-basis-display.d.mts +29 -0
- package/dist/types/pages/user-profile/cost-basis-display.d.ts +29 -0
- package/dist/types/pages/user-profile/user-profile.types.d.mts +8 -0
- package/dist/types/pages/user-profile/user-profile.types.d.ts +8 -0
- package/dist/types/primitives/modal/index.d.mts +1 -1
- package/dist/types/primitives/modal/index.d.ts +1 -1
- package/dist/types/primitives/modal/modal.types.d.mts +6 -0
- package/dist/types/primitives/modal/modal.types.d.ts +6 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +12 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +12 -1
- package/package.json +3 -3
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
__spreadProps,
|
|
21
21
|
__spreadValues,
|
|
22
22
|
cn
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BBDFSTIA.mjs";
|
|
24
24
|
|
|
25
25
|
// src/geo-block-banner/index.tsx
|
|
26
26
|
import { useLabels } from "@agg-build/hooks";
|
|
@@ -628,6 +628,27 @@ var getSafeConnectionError = ({
|
|
|
628
628
|
error.message
|
|
629
629
|
).trim();
|
|
630
630
|
};
|
|
631
|
+
var CloseButton = ({
|
|
632
|
+
className,
|
|
633
|
+
disabled
|
|
634
|
+
}) => {
|
|
635
|
+
const labels = useLabels7();
|
|
636
|
+
return /* @__PURE__ */ jsx7(
|
|
637
|
+
Dialog3.Close,
|
|
638
|
+
{
|
|
639
|
+
"aria-label": labels.common.close,
|
|
640
|
+
disabled,
|
|
641
|
+
className: cn(
|
|
642
|
+
"z-30 flex size-6 cursor-pointer items-center justify-center rounded-agg-full",
|
|
643
|
+
"text-agg-foreground transition-colors hover:text-agg-foreground/80",
|
|
644
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-accent",
|
|
645
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
646
|
+
className
|
|
647
|
+
),
|
|
648
|
+
children: /* @__PURE__ */ jsx7(Icon, { name: "close", size: "medium", className: "!text-agg-foreground" })
|
|
649
|
+
}
|
|
650
|
+
);
|
|
651
|
+
};
|
|
631
652
|
var ConnectKalshiModal = ({
|
|
632
653
|
open,
|
|
633
654
|
onOpenChange,
|
|
@@ -658,12 +679,12 @@ var ConnectKalshiModal = ({
|
|
|
658
679
|
setError(void 0);
|
|
659
680
|
setIsVerifying(false);
|
|
660
681
|
setIsConnected(false);
|
|
661
|
-
const animationFrame = window.requestAnimationFrame(() => {
|
|
662
|
-
var _a;
|
|
663
|
-
return (_a = apiKeyInputRef.current) == null ? void 0 : _a.focus();
|
|
664
|
-
});
|
|
665
|
-
return () => window.cancelAnimationFrame(animationFrame);
|
|
666
682
|
}, [open]);
|
|
683
|
+
const handleOpenAutoFocus = useCallback4((event) => {
|
|
684
|
+
var _a;
|
|
685
|
+
event.preventDefault();
|
|
686
|
+
(_a = apiKeyInputRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
687
|
+
}, []);
|
|
667
688
|
const handleOpenChange = useCallback4(
|
|
668
689
|
(nextOpen) => {
|
|
669
690
|
if (isVerifying && !nextOpen) return;
|
|
@@ -706,207 +727,211 @@ var ConnectKalshiModal = ({
|
|
|
706
727
|
[handleVerify]
|
|
707
728
|
);
|
|
708
729
|
if (availabilityState === "hidden") return null;
|
|
709
|
-
return /* @__PURE__ */ jsx7(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */
|
|
730
|
+
return /* @__PURE__ */ jsx7(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsx7(
|
|
710
731
|
Modal.Container,
|
|
711
732
|
{
|
|
712
|
-
maxWidth: "600px",
|
|
733
|
+
maxWidth: isConnected ? "480px" : "600px",
|
|
713
734
|
"aria-label": labels.onboarding.connectKalshiModal.ariaLabel,
|
|
714
|
-
classNames: {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
disabled: isVerifying,
|
|
722
|
-
children: /* @__PURE__ */ jsx7(Icon, { name: "close", size: "medium" })
|
|
723
|
-
}
|
|
724
|
-
) }),
|
|
725
|
-
/* @__PURE__ */ jsx7(Modal.Body, { classNames: { root: "!px-5 !pb-12 !pt-0 sm:!px-10" }, children: isConnected ? /* @__PURE__ */ jsxs7(
|
|
735
|
+
classNames: {
|
|
736
|
+
container: "!rounded-t-agg-xl !rounded-b-none md:!rounded-agg-2xl"
|
|
737
|
+
},
|
|
738
|
+
onOpenAutoFocus: isConnected ? void 0 : handleOpenAutoFocus,
|
|
739
|
+
children: isConnected ? /* @__PURE__ */ jsxs7(Modal.Body, { classNames: { root: "relative !px-5 !py-8 md:!px-10 md:!py-12" }, children: [
|
|
740
|
+
/* @__PURE__ */ jsx7(CloseButton, { className: "absolute right-5 top-5 md:right-8 md:top-8" }),
|
|
741
|
+
/* @__PURE__ */ jsxs7(
|
|
726
742
|
"div",
|
|
727
743
|
{
|
|
728
|
-
className: "flex flex-col items-center gap-8
|
|
744
|
+
className: "flex flex-col items-center gap-8 text-center",
|
|
729
745
|
role: "status",
|
|
730
746
|
"aria-live": "polite",
|
|
731
747
|
children: [
|
|
732
|
-
/* @__PURE__ */ jsx7("div", { className: "flex size-[60px] items-center justify-center rounded-agg-full bg-agg-success", children: /* @__PURE__ */ jsx7(
|
|
733
|
-
|
|
734
|
-
{
|
|
735
|
-
name: "success-check",
|
|
736
|
-
className: "size-7 text-agg-on-primary",
|
|
737
|
-
"aria-hidden": "true"
|
|
738
|
-
}
|
|
739
|
-
) }),
|
|
740
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col items-center gap-4", children: [
|
|
748
|
+
/* @__PURE__ */ jsx7("div", { className: "flex size-[60px] items-center justify-center rounded-agg-full bg-agg-success/15", children: /* @__PURE__ */ jsx7(Icon, { name: "success-check", className: "size-6 text-agg-success", "aria-hidden": "true" }) }),
|
|
749
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col items-center gap-3", children: [
|
|
741
750
|
/* @__PURE__ */ jsx7(Dialog3.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.title }),
|
|
742
|
-
/* @__PURE__ */ jsx7(Dialog3.Description, { className: "
|
|
751
|
+
/* @__PURE__ */ jsx7(Dialog3.Description, { className: "text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.description })
|
|
743
752
|
] }),
|
|
744
|
-
/* @__PURE__ */ jsx7(
|
|
745
|
-
Button,
|
|
746
|
-
{
|
|
747
|
-
variant: "primary",
|
|
748
|
-
size: "large",
|
|
749
|
-
className: "min-w-[120px]",
|
|
750
|
-
onClick: () => handleOpenChange(false),
|
|
751
|
-
children: labels.onboarding.connectKalshiModal.success.done
|
|
752
|
-
}
|
|
753
|
-
)
|
|
753
|
+
/* @__PURE__ */ jsx7(Button, { variant: "secondary", size: "large", onClick: () => handleOpenChange(false), children: labels.onboarding.connectKalshiModal.success.done })
|
|
754
754
|
]
|
|
755
755
|
}
|
|
756
|
-
)
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
/* @__PURE__ */ jsx7("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
|
|
766
|
-
/* @__PURE__ */ jsx7("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
|
|
767
|
-
] }),
|
|
768
|
-
/* @__PURE__ */ jsxs7("div", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
769
|
-
/* @__PURE__ */ jsx7("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
|
|
770
|
-
/* @__PURE__ */ jsxs7("p", { children: [
|
|
771
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
|
|
772
|
-
" ",
|
|
773
|
-
/* @__PURE__ */ jsx7("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
|
|
774
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
|
|
775
|
-
" ",
|
|
756
|
+
)
|
|
757
|
+
] }) : /* @__PURE__ */ jsxs7("form", { className: "flex min-h-0 flex-1 flex-col", onSubmit: handleSubmit, children: [
|
|
758
|
+
/* @__PURE__ */ jsx7(
|
|
759
|
+
Modal.Body,
|
|
760
|
+
{
|
|
761
|
+
classNames: { root: "relative !px-5 !pb-6 !pt-5 md:!px-10 md:!pb-0 md:!pt-12" },
|
|
762
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-6 md:items-center md:gap-0", children: [
|
|
763
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex w-full flex-col md:contents", children: [
|
|
764
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-3 md:contents", children: [
|
|
776
765
|
/* @__PURE__ */ jsx7(
|
|
777
|
-
|
|
766
|
+
VenueLogo,
|
|
778
767
|
{
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
className: "
|
|
783
|
-
|
|
768
|
+
venue: Venue2.kalshi,
|
|
769
|
+
variant: "logo",
|
|
770
|
+
size: "large",
|
|
771
|
+
className: "!size-10 md:!mb-8 md:!size-[60px]"
|
|
772
|
+
}
|
|
773
|
+
),
|
|
774
|
+
/* @__PURE__ */ jsx7(Dialog3.Title, { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground md:mb-4 md:text-center md:text-agg-2xl md:leading-agg-8", children: labels.onboarding.connectKalshiModal.title }),
|
|
775
|
+
/* @__PURE__ */ jsx7(
|
|
776
|
+
CloseButton,
|
|
777
|
+
{
|
|
778
|
+
disabled: isVerifying,
|
|
779
|
+
className: "ml-auto shrink-0 md:absolute md:right-8 md:top-8 md:ml-0"
|
|
784
780
|
}
|
|
785
781
|
)
|
|
786
782
|
] }),
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
|
|
789
|
-
" ",
|
|
790
|
-
/* @__PURE__ */ jsx7("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
|
|
791
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
|
|
792
|
-
] }),
|
|
793
|
-
/* @__PURE__ */ jsxs7("p", { children: [
|
|
794
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
|
|
795
|
-
" ",
|
|
796
|
-
/* @__PURE__ */ jsx7("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
|
|
797
|
-
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
|
|
798
|
-
] }),
|
|
799
|
-
/* @__PURE__ */ jsx7("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
|
|
783
|
+
/* @__PURE__ */ jsx7(Dialog3.Description, { className: "mt-3 text-agg-sm leading-agg-5 text-agg-foreground md:mb-8 md:mt-0 md:text-center md:text-agg-base md:leading-agg-6", children: labels.onboarding.connectKalshiModal.description })
|
|
800
784
|
] }),
|
|
801
|
-
/* @__PURE__ */ jsxs7("
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
785
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex w-full flex-col gap-4", children: [
|
|
786
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
|
|
787
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-1", children: [
|
|
788
|
+
/* @__PURE__ */ jsx7("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
|
|
789
|
+
/* @__PURE__ */ jsx7("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
|
|
790
|
+
] }),
|
|
791
|
+
/* @__PURE__ */ jsxs7("div", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
792
|
+
/* @__PURE__ */ jsx7("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
|
|
793
|
+
/* @__PURE__ */ jsxs7("p", { children: [
|
|
794
|
+
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
|
|
795
|
+
" ",
|
|
796
|
+
/* @__PURE__ */ jsx7("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
|
|
797
|
+
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
|
|
798
|
+
" ",
|
|
799
|
+
/* @__PURE__ */ jsx7(
|
|
800
|
+
"a",
|
|
801
|
+
{
|
|
802
|
+
href: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl,
|
|
803
|
+
target: "_blank",
|
|
804
|
+
rel: "noreferrer",
|
|
805
|
+
className: "cursor-pointer underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
|
|
806
|
+
children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl
|
|
807
|
+
}
|
|
808
|
+
)
|
|
809
|
+
] }),
|
|
810
|
+
/* @__PURE__ */ jsxs7("p", { children: [
|
|
811
|
+
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
|
|
812
|
+
" ",
|
|
813
|
+
/* @__PURE__ */ jsx7("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
|
|
814
|
+
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
|
|
815
|
+
] }),
|
|
816
|
+
/* @__PURE__ */ jsxs7("p", { children: [
|
|
817
|
+
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
|
|
818
|
+
" ",
|
|
819
|
+
/* @__PURE__ */ jsx7("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
|
|
820
|
+
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
|
|
821
|
+
] }),
|
|
822
|
+
/* @__PURE__ */ jsx7("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
|
|
823
|
+
] }),
|
|
824
|
+
/* @__PURE__ */ jsxs7("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
825
|
+
labels.onboarding.connectKalshiModal.stepOne.footerLineOne,
|
|
826
|
+
/* @__PURE__ */ jsx7("br", {}),
|
|
827
|
+
labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
|
|
828
|
+
] })
|
|
829
|
+
] }),
|
|
830
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
|
|
831
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-1", children: [
|
|
832
|
+
/* @__PURE__ */ jsx7("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
|
|
833
|
+
/* @__PURE__ */ jsx7("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
|
|
834
|
+
] }),
|
|
835
|
+
/* @__PURE__ */ jsx7("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
|
|
836
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2", children: [
|
|
837
|
+
/* @__PURE__ */ jsx7(
|
|
838
|
+
"label",
|
|
839
|
+
{
|
|
840
|
+
htmlFor: "kalshi-api-key-id",
|
|
841
|
+
className: "text-agg-sm font-agg-bold text-agg-foreground",
|
|
842
|
+
children: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdLabel
|
|
843
|
+
}
|
|
844
|
+
),
|
|
845
|
+
/* @__PURE__ */ jsx7(
|
|
846
|
+
"input",
|
|
847
|
+
{
|
|
848
|
+
ref: apiKeyInputRef,
|
|
849
|
+
id: "kalshi-api-key-id",
|
|
850
|
+
type: "text",
|
|
851
|
+
autoComplete: "off",
|
|
852
|
+
value: apiKeyId,
|
|
853
|
+
onChange: (event) => setApiKeyId(event.target.value),
|
|
854
|
+
placeholder: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdPlaceholder,
|
|
855
|
+
disabled: isVerifying,
|
|
856
|
+
"aria-invalid": !!error,
|
|
857
|
+
"aria-describedby": error ? errorId : void 0,
|
|
858
|
+
className: cn(
|
|
859
|
+
"h-10 w-full rounded-agg-sm border border-agg-separator bg-agg-secondary px-3 py-2.5",
|
|
860
|
+
"text-agg-base text-agg-foreground placeholder:text-agg-muted-foreground",
|
|
861
|
+
"outline-none transition-colors focus:border-agg-primary focus:ring-1 focus:ring-agg-primary",
|
|
862
|
+
"disabled:cursor-not-allowed disabled:opacity-60"
|
|
863
|
+
)
|
|
864
|
+
}
|
|
840
865
|
)
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
866
|
+
] }),
|
|
867
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2", children: [
|
|
868
|
+
/* @__PURE__ */ jsx7(
|
|
869
|
+
"label",
|
|
870
|
+
{
|
|
871
|
+
htmlFor: "kalshi-private-key",
|
|
872
|
+
className: "text-agg-sm font-agg-bold text-agg-foreground",
|
|
873
|
+
children: labels.onboarding.connectKalshiModal.stepTwo.privateKeyLabel
|
|
874
|
+
}
|
|
875
|
+
),
|
|
876
|
+
/* @__PURE__ */ jsx7(
|
|
877
|
+
"textarea",
|
|
878
|
+
{
|
|
879
|
+
id: "kalshi-private-key",
|
|
880
|
+
autoComplete: "off",
|
|
881
|
+
value: privateKey,
|
|
882
|
+
onChange: (event) => setPrivateKey(event.target.value),
|
|
883
|
+
placeholder: labels.onboarding.connectKalshiModal.stepTwo.privateKeyPlaceholder,
|
|
884
|
+
rows: 3,
|
|
885
|
+
disabled: isVerifying,
|
|
886
|
+
"aria-invalid": !!error,
|
|
887
|
+
"aria-describedby": error ? errorId : void 0,
|
|
888
|
+
className: cn(
|
|
889
|
+
"w-full resize-none rounded-agg-sm border border-agg-separator bg-agg-secondary px-3 py-2.5",
|
|
890
|
+
"text-agg-base text-agg-foreground placeholder:text-agg-muted-foreground",
|
|
891
|
+
"outline-none transition-colors focus:border-agg-primary focus:ring-1 focus:ring-agg-primary",
|
|
892
|
+
"disabled:cursor-not-allowed disabled:opacity-60"
|
|
893
|
+
)
|
|
894
|
+
}
|
|
870
895
|
)
|
|
871
|
-
}
|
|
872
|
-
)
|
|
873
|
-
] })
|
|
874
|
-
] })
|
|
875
|
-
] }),
|
|
876
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex w-full items-center justify-between gap-4", children: [
|
|
877
|
-
/* @__PURE__ */ jsx7("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
|
|
878
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-3", children: [
|
|
879
|
-
/* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
|
|
880
|
-
/* @__PURE__ */ jsx7(Icon, { name: "document", size: "small", className: "size-4 text-agg-primary" }),
|
|
881
|
-
labels.onboarding.connectKalshiModal.help.docsLinkLabel
|
|
896
|
+
] })
|
|
897
|
+
] })
|
|
882
898
|
] }),
|
|
883
|
-
/* @__PURE__ */
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
899
|
+
error ? /* @__PURE__ */ jsxs7(
|
|
900
|
+
"div",
|
|
901
|
+
{
|
|
902
|
+
id: errorId,
|
|
903
|
+
className: "flex items-center gap-2 md:justify-center",
|
|
904
|
+
role: "alert",
|
|
905
|
+
"aria-live": "assertive",
|
|
906
|
+
children: [
|
|
907
|
+
/* @__PURE__ */ jsx7(Icon, { name: "warning", size: "small", className: "size-3.5 text-agg-error" }),
|
|
908
|
+
/* @__PURE__ */ jsx7("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
|
|
909
|
+
]
|
|
910
|
+
}
|
|
911
|
+
) : null
|
|
888
912
|
] })
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
913
|
+
}
|
|
914
|
+
),
|
|
915
|
+
/* @__PURE__ */ jsxs7(
|
|
916
|
+
Modal.Footer,
|
|
917
|
+
{
|
|
918
|
+
classNames: {
|
|
919
|
+
root: "relative !h-auto !gap-3 !p-4 md:!justify-center md:!border-0 md:!px-10 md:!pb-12 md:!pt-8"
|
|
920
|
+
},
|
|
921
|
+
children: [
|
|
922
|
+
/* @__PURE__ */ jsx7(
|
|
923
|
+
"div",
|
|
924
|
+
{
|
|
925
|
+
"aria-hidden": "true",
|
|
926
|
+
className: "pointer-events-none absolute inset-x-0 -top-[60px] h-[60px] bg-gradient-to-b from-transparent to-agg-secondary md:hidden"
|
|
927
|
+
}
|
|
928
|
+
),
|
|
905
929
|
/* @__PURE__ */ jsx7(
|
|
906
930
|
Button,
|
|
907
931
|
{
|
|
908
932
|
variant: "secondary",
|
|
909
933
|
size: "large",
|
|
934
|
+
className: "shrink-0",
|
|
910
935
|
onClick: () => handleOpenChange(false),
|
|
911
936
|
disabled: isVerifying,
|
|
912
937
|
children: labels.onboarding.connectKalshiModal.actions.cancel
|
|
@@ -918,15 +943,16 @@ var ConnectKalshiModal = ({
|
|
|
918
943
|
type: "submit",
|
|
919
944
|
variant: "primary",
|
|
920
945
|
size: "large",
|
|
946
|
+
className: "flex-1 md:flex-none",
|
|
921
947
|
disabled: !parsedCredentials.success || isVerifying,
|
|
922
948
|
isLoading: isVerifying,
|
|
923
949
|
children: labels.onboarding.connectKalshiModal.actions.verifyConnection
|
|
924
950
|
}
|
|
925
951
|
)
|
|
926
|
-
]
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
]
|
|
952
|
+
]
|
|
953
|
+
}
|
|
954
|
+
)
|
|
955
|
+
] })
|
|
930
956
|
}
|
|
931
957
|
) });
|
|
932
958
|
};
|
|
@@ -8727,7 +8727,8 @@ var ModalContainer = ({
|
|
|
8727
8727
|
maxWidth = "600px",
|
|
8728
8728
|
classNames,
|
|
8729
8729
|
"aria-label": ariaLabel,
|
|
8730
|
-
"aria-labelledby": ariaLabelledBy
|
|
8730
|
+
"aria-labelledby": ariaLabelledBy,
|
|
8731
|
+
onOpenAutoFocus
|
|
8731
8732
|
}) => {
|
|
8732
8733
|
const {
|
|
8733
8734
|
general: { rootClassName },
|
|
@@ -8758,6 +8759,7 @@ var ModalContainer = ({
|
|
|
8758
8759
|
),
|
|
8759
8760
|
"aria-label": ariaLabel,
|
|
8760
8761
|
"aria-labelledby": ariaLabelledBy,
|
|
8762
|
+
onOpenAutoFocus,
|
|
8761
8763
|
onCloseAutoFocus: (event) => {
|
|
8762
8764
|
event.preventDefault();
|
|
8763
8765
|
},
|