casino-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +213 -0
- package/dist/assets/assets/card-back.svg +43 -0
- package/dist/assets/assets/card-shoe-overlay.svg +14 -0
- package/dist/assets/card-back.svg +43 -0
- package/dist/assets/card-shoe-overlay.svg +14 -0
- package/dist/casino-ui.css +2 -0
- package/dist/components/bet-panel.d.ts +41 -0
- package/dist/components/bet-panel.d.ts.map +1 -0
- package/dist/components/bet-panel.js +37 -0
- package/dist/components/bet-panel.js.map +1 -0
- package/dist/components/button.d.ts +15 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +27 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card-score-badge.d.ts +9 -0
- package/dist/components/card-score-badge.d.ts.map +1 -0
- package/dist/components/card-score-badge.js +20 -0
- package/dist/components/card-score-badge.js.map +1 -0
- package/dist/components/card-shoe.d.ts +6 -0
- package/dist/components/card-shoe.d.ts.map +1 -0
- package/dist/components/card-shoe.js +14 -0
- package/dist/components/card-shoe.js.map +1 -0
- package/dist/components/card-table.d.ts +7 -0
- package/dist/components/card-table.d.ts.map +1 -0
- package/dist/components/card-table.js +6 -0
- package/dist/components/card-table.js.map +1 -0
- package/dist/components/chip-rack.d.ts +6 -0
- package/dist/components/chip-rack.d.ts.map +1 -0
- package/dist/components/chip-rack.js +13 -0
- package/dist/components/chip-rack.js.map +1 -0
- package/dist/components/chip.d.ts +49 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +81 -0
- package/dist/components/chip.js.map +1 -0
- package/dist/components/game-footer.d.ts +29 -0
- package/dist/components/game-footer.d.ts.map +1 -0
- package/dist/components/game-footer.js +72 -0
- package/dist/components/game-footer.js.map +1 -0
- package/dist/components/game-info-dialog.d.ts +23 -0
- package/dist/components/game-info-dialog.d.ts.map +1 -0
- package/dist/components/game-info-dialog.js +26 -0
- package/dist/components/game-info-dialog.js.map +1 -0
- package/dist/components/icon.d.ts +10 -0
- package/dist/components/icon.d.ts.map +1 -0
- package/dist/components/icon.js +59 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/poker-card.d.ts +15 -0
- package/dist/components/poker-card.d.ts.map +1 -0
- package/dist/components/poker-card.js +77 -0
- package/dist/components/poker-card.js.map +1 -0
- package/dist/components/result-badge.d.ts +14 -0
- package/dist/components/result-badge.d.ts.map +1 -0
- package/dist/components/result-badge.js +71 -0
- package/dist/components/result-badge.js.map +1 -0
- package/dist/components/switch-table-dialog.d.ts +10 -0
- package/dist/components/switch-table-dialog.d.ts.map +1 -0
- package/dist/components/switch-table-dialog.js +51 -0
- package/dist/components/switch-table-dialog.js.map +1 -0
- package/dist/components/toast-container.d.ts +8 -0
- package/dist/components/toast-container.d.ts.map +1 -0
- package/dist/components/toast-container.js +8 -0
- package/dist/components/toast-container.js.map +1 -0
- package/dist/components/toast-helpers.d.ts +22 -0
- package/dist/components/toast-helpers.d.ts.map +1 -0
- package/dist/components/toast-helpers.js +47 -0
- package/dist/components/toast-helpers.js.map +1 -0
- package/dist/components/toast.d.ts +26 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +49 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +14 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +35 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +14 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +35 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +39 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/stories/BetPanel.stories.d.ts +10 -0
- package/dist/stories/BetPanel.stories.d.ts.map +1 -0
- package/dist/stories/BetPanel.stories.js +34 -0
- package/dist/stories/BetPanel.stories.js.map +1 -0
- package/dist/stories/Button.stories.d.ts +13 -0
- package/dist/stories/Button.stories.d.ts.map +1 -0
- package/dist/stories/Button.stories.js +39 -0
- package/dist/stories/Button.stories.js.map +1 -0
- package/dist/stories/CardScoreBadge.stories.d.ts +8 -0
- package/dist/stories/CardScoreBadge.stories.d.ts.map +1 -0
- package/dist/stories/CardScoreBadge.stories.js +21 -0
- package/dist/stories/CardScoreBadge.stories.js.map +1 -0
- package/dist/stories/CardShoe.stories.d.ts +7 -0
- package/dist/stories/CardShoe.stories.d.ts.map +1 -0
- package/dist/stories/CardShoe.stories.js +8 -0
- package/dist/stories/CardShoe.stories.js.map +1 -0
- package/dist/stories/CardTable.stories.d.ts +7 -0
- package/dist/stories/CardTable.stories.d.ts.map +1 -0
- package/dist/stories/CardTable.stories.js +15 -0
- package/dist/stories/CardTable.stories.js.map +1 -0
- package/dist/stories/Chip.stories.d.ts +11 -0
- package/dist/stories/Chip.stories.d.ts.map +1 -0
- package/dist/stories/Chip.stories.js +32 -0
- package/dist/stories/Chip.stories.js.map +1 -0
- package/dist/stories/ChipRack.stories.d.ts +7 -0
- package/dist/stories/ChipRack.stories.d.ts.map +1 -0
- package/dist/stories/ChipRack.stories.js +8 -0
- package/dist/stories/ChipRack.stories.js.map +1 -0
- package/dist/stories/Dialog.stories.d.ts +6 -0
- package/dist/stories/Dialog.stories.d.ts.map +1 -0
- package/dist/stories/Dialog.stories.js +15 -0
- package/dist/stories/Dialog.stories.js.map +1 -0
- package/dist/stories/GameFooter.stories.d.ts +7 -0
- package/dist/stories/GameFooter.stories.d.ts.map +1 -0
- package/dist/stories/GameFooter.stories.js +37 -0
- package/dist/stories/GameFooter.stories.js.map +1 -0
- package/dist/stories/Icon.stories.d.ts +9 -0
- package/dist/stories/Icon.stories.d.ts.map +1 -0
- package/dist/stories/Icon.stories.js +27 -0
- package/dist/stories/Icon.stories.js.map +1 -0
- package/dist/stories/PokerCard.stories.d.ts +14 -0
- package/dist/stories/PokerCard.stories.d.ts.map +1 -0
- package/dist/stories/PokerCard.stories.js +40 -0
- package/dist/stories/PokerCard.stories.js.map +1 -0
- package/dist/stories/ResultBadge.stories.d.ts +11 -0
- package/dist/stories/ResultBadge.stories.d.ts.map +1 -0
- package/dist/stories/ResultBadge.stories.js +32 -0
- package/dist/stories/ResultBadge.stories.js.map +1 -0
- package/dist/stories/Toast.stories.d.ts +10 -0
- package/dist/stories/Toast.stories.d.ts.map +1 -0
- package/dist/stories/Toast.stories.js +34 -0
- package/dist/stories/Toast.stories.js.map +1 -0
- package/dist/styles/casino-ui-base.css +310 -0
- package/dist/styles/styles/casino-ui-base.css +310 -0
- package/dist/styles/styles/toast.css +52 -0
- package/dist/styles/toast.css +52 -0
- package/dist/toast.css +52 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/format-amount.d.ts +2 -0
- package/dist/utils/format-amount.d.ts.map +1 -0
- package/dist/utils/format-amount.js +31 -0
- package/dist/utils/format-amount.js.map +1 -0
- package/package.json +58 -0
- package/src/assets/card-back.svg +43 -0
- package/src/assets/card-shoe-overlay.svg +14 -0
- package/src/components/bet-panel.tsx +275 -0
- package/src/components/button.tsx +80 -0
- package/src/components/card-score-badge.tsx +61 -0
- package/src/components/card-shoe.tsx +52 -0
- package/src/components/card-table.tsx +182 -0
- package/src/components/chip-rack.tsx +55 -0
- package/src/components/chip.tsx +203 -0
- package/src/components/game-footer.tsx +356 -0
- package/src/components/game-info-dialog.tsx +245 -0
- package/src/components/icon.tsx +94 -0
- package/src/components/poker-card.tsx +192 -0
- package/src/components/result-badge.tsx +157 -0
- package/src/components/switch-table-dialog.tsx +211 -0
- package/src/components/toast-container.tsx +25 -0
- package/src/components/toast-helpers.ts +79 -0
- package/src/components/toast.tsx +282 -0
- package/src/components/ui/dialog.tsx +134 -0
- package/src/components/ui/drawer.tsx +132 -0
- package/src/components/ui/dropdown-menu.tsx +210 -0
- package/src/env.d.ts +6 -0
- package/src/index.ts +88 -0
- package/src/lib/utils.ts +6 -0
- package/src/stories/BetPanel.stories.tsx +113 -0
- package/src/stories/Button.stories.tsx +55 -0
- package/src/stories/CardScoreBadge.stories.tsx +34 -0
- package/src/stories/CardShoe.stories.tsx +12 -0
- package/src/stories/Chip.stories.tsx +51 -0
- package/src/stories/ChipRack.stories.tsx +12 -0
- package/src/stories/Dialog.stories.tsx +45 -0
- package/src/stories/GameFooter.stories.tsx +45 -0
- package/src/stories/Icon.stories.tsx +49 -0
- package/src/stories/PokerCard.stories.tsx +72 -0
- package/src/stories/ResultBadge.stories.tsx +51 -0
- package/src/stories/Toast.stories.tsx +71 -0
- package/src/styles/casino-ui-base.css +310 -0
- package/src/styles/toast.css +52 -0
- package/src/types.ts +11 -0
- package/src/utils/format-amount.ts +35 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { PokerCard } from "./poker-card";
|
|
4
|
+
import cardShoeOverlay from "../assets/card-shoe-overlay.svg";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const CARD_COUNT = 4;
|
|
7
|
+
const CARD_OFFSET_Y = 2.5; // px vertical offset between stacked cards
|
|
8
|
+
export const CardShoe = forwardRef(({ className }, ref) => {
|
|
9
|
+
return (_jsxs("div", { className: cn("relative w-12.5 h-28.5 border-[2.4px] rounded-t-[3.6px] rounded-b-[9.6px] overflow-hidden", "bg-card-shoe-bg border-card-shoe-border shadow-[0px_2px_0px_0px_#122741]", className), children: [_jsx("div", { ref: ref, className: "absolute bottom-[4px] left-1/2 -translate-x-1/2", children: Array.from({ length: CARD_COUNT }).map((_, i) => (_jsx("div", { className: "absolute left-1/2 -translate-x-1/2 select-none", style: {
|
|
10
|
+
bottom: `${i * CARD_OFFSET_Y}px`,
|
|
11
|
+
}, children: _jsx(PokerCard, { side: "back", showShadow: false }) }, i))) }), _jsx("img", { src: cardShoeOverlay, alt: "", className: "absolute top-0 left-0 pointer-events-none w-12.5" })] }));
|
|
12
|
+
});
|
|
13
|
+
CardShoe.displayName = "CardShoe";
|
|
14
|
+
//# sourceMappingURL=card-shoe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-shoe.js","sourceRoot":"","sources":["../../src/components/card-shoe.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAMlC,MAAM,UAAU,GAAG,CAAC,CAAC;AACrB,MAAM,aAAa,GAAG,GAAG,CAAC,CAAC,2CAA2C;AAEtE,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,CAAC,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE;IACrB,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,2FAA2F,EAC3F,0EAA0E,EAC1E,SAAS,CACV,aAGD,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,iDAAiD,YAE1D,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAChD,cAEE,SAAS,EAAC,gDAAgD,EAC1D,KAAK,EAAE;wBACL,MAAM,EAAE,GAAG,CAAC,GAAG,aAAa,IAAI;qBACjC,YAED,KAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,UAAU,EAAE,KAAK,GAAI,IANvC,CAAC,CAOF,CACP,CAAC,GACE,EAGN,cACE,GAAG,EAAE,eAAe,EACpB,GAAG,EAAC,EAAE,EACN,SAAS,EAAC,kDAAkD,GAC5D,IACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
|
2
|
+
interface ICardTableProp {
|
|
3
|
+
className?: DivProps["className"];
|
|
4
|
+
}
|
|
5
|
+
declare const CardTable: ({ className }: ICardTableProp) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default CardTable;
|
|
7
|
+
//# sourceMappingURL=card-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-table.d.ts","sourceRoot":"","sources":["../../src/components/card-table.tsx"],"names":[],"mappings":"AAAA,KAAK,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAErD,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;CACnC;AAED,QAAA,MAAM,SAAS,GAAI,eAAe,cAAc,4CA6K/C,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const CardTable = ({ className }) => {
|
|
3
|
+
return (_jsx("div", { className: className, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1114", height: "521", viewBox: "0 0 1114 521", fill: "none", children: [_jsxs("g", { filter: "url(#filter0_din_6221_41932)", children: [_jsx("mask", { id: "path-1-inside-1_6221_41932", fill: "white", children: _jsx("path", { d: "M4 17C4 7.61116 11.6112 0 21 0H1093C1102.39 0 1110 7.61116 1110 17V113C1110 333.914 930.914 513 710 513H404C183.086 513 4 333.914 4 113V17Z" }) }), _jsx("path", { d: "M4 17C4 7.61116 11.6112 0 21 0H1093C1102.39 0 1110 7.61116 1110 17V113C1110 333.914 930.914 513 710 513H404C183.086 513 4 333.914 4 113V17Z", fill: "url(#paint0_linear_6221_41932)" }), _jsx("path", { d: "M4 17C4 7.61116 11.6112 0 21 0H1093C1102.39 0 1110 7.61116 1110 17V113C1110 333.914 930.914 513 710 513H404C183.086 513 4 333.914 4 113V17Z", stroke: "url(#paint1_linear_6221_41932)", strokeWidth: "50", mask: "url(#path-1-inside-1_6221_41932)" })] }), _jsxs("defs", { children: [_jsxs("filter", { id: "filter0_din_6221_41932", x: "0", y: "0", width: "1114", height: "521", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [_jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), _jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), _jsx("feOffset", { dy: "4" }), _jsx("feGaussianBlur", { stdDeviation: "2" }), _jsx("feComposite", { in2: "hardAlpha", operator: "out" }), _jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0" }), _jsx("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_6221_41932" }), _jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }), _jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), _jsx("feMorphology", { radius: "35", operator: "erode", in: "SourceAlpha", result: "effect2_innerShadow_6221_41932" }), _jsx("feOffset", { dy: "4" }), _jsx("feGaussianBlur", { stdDeviation: "5.45" }), _jsx("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }), _jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.35 0" }), _jsx("feBlend", { mode: "normal", in2: "shape", result: "effect2_innerShadow_6221_41932" }), _jsx("feTurbulence", { type: "fractalNoise", baseFrequency: "0.5 0.5", stitchTiles: "stitch", numOctaves: "3", result: "noise", seed: "9045" }), _jsx("feColorMatrix", { in: "noise", type: "luminanceToAlpha", result: "alphaNoise" }), _jsx("feComponentTransfer", { in: "alphaNoise", result: "coloredNoise1", children: _jsx("feFuncA", { type: "discrete", tableValues: "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 " }) }), _jsx("feComposite", { operator: "in", in2: "effect2_innerShadow_6221_41932", in: "coloredNoise1", result: "noise1Clipped" }), _jsx("feComponentTransfer", { in: "alphaNoise", result: "coloredNoise2", children: _jsx("feFuncA", { type: "discrete", tableValues: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 " }) }), _jsx("feComposite", { operator: "in", in2: "effect2_innerShadow_6221_41932", in: "coloredNoise2", result: "noise2Clipped" }), _jsx("feFlood", { floodColor: "rgba(0, 0, 0, 0.05)", result: "color1Flood" }), _jsx("feComposite", { operator: "in", in2: "noise1Clipped", in: "color1Flood", result: "color1" }), _jsx("feFlood", { floodColor: "rgba(255, 255, 255, 0)", result: "color2Flood" }), _jsx("feComposite", { operator: "in", in2: "noise2Clipped", in: "color2Flood", result: "color2" }), _jsxs("feMerge", { result: "effect3_noise_6221_41932", children: [_jsx("feMergeNode", { in: "effect2_innerShadow_6221_41932" }), _jsx("feMergeNode", { in: "color1" }), _jsx("feMergeNode", { in: "color2" })] }), _jsx("feBlend", { mode: "normal", in: "effect3_noise_6221_41932", in2: "effect1_dropShadow_6221_41932", result: "effect3_noise_6221_41932" })] }), _jsxs("linearGradient", { id: "paint0_linear_6221_41932", x1: "557", y1: "0", x2: "557", y2: "513", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#0B3E2C" }), _jsx("stop", { offset: "1", stopColor: "#14945B" })] }), _jsxs("linearGradient", { id: "paint1_linear_6221_41932", x1: "557", y1: "0", x2: "557", y2: "513", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#271709" }), _jsx("stop", { offset: "1", stopColor: "#311D0B" })] })] })] }) }));
|
|
4
|
+
};
|
|
5
|
+
export default CardTable;
|
|
6
|
+
//# sourceMappingURL=card-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-table.js","sourceRoot":"","sources":["../../src/components/card-table.tsx"],"names":[],"mappings":";AAMA,MAAM,SAAS,GAAG,CAAC,EAAE,SAAS,EAAkB,EAAE,EAAE;IAClD,OAAO,CACL,cAAK,SAAS,EAAE,SAAS,YACvB,eACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,KAAK,EACZ,OAAO,EAAC,cAAc,EACtB,IAAI,EAAC,MAAM,aAEX,aAAG,MAAM,EAAC,8BAA8B,aACtC,eAAM,EAAE,EAAC,4BAA4B,EAAC,IAAI,EAAC,OAAO,YAChD,eAAM,CAAC,EAAC,6IAA6I,GAAG,GACnJ,EACP,eACE,CAAC,EAAC,6IAA6I,EAC/I,IAAI,EAAC,gCAAgC,GACrC,EACF,eACE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ACf,EACF,mBAAS,MAAM,EAAC,0BAA0B,aACxC,sBAAa,EAAE,EAAC,gCAAgC,GAAG,EACnD,sBAAa,EAAE,EAAC,QAAQ,GAAG,EAC3B,sBAAa,EAAE,EAAC,QAAQ,GAAG,IACnB,EACV,kBACE,IAAI,EAAC,QAAQ,EACb,EAAE,EAAC,0BAA0B,EAC7B,GAAG,EAAC,+BAA+B,EACnC,MAAM,EAAC,0BAA0B,GACjC,IACK,EACT,0BACE,EAAE,EAAC,0BAA0B,EAC7B,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,aAAa,EAAC,gBAAgB,aAE9B,eAAM,SAAS,EAAC,SAAS,GAAG,EAC5B,eAAM,MAAM,EAAC,GAAG,EAAC,SAAS,EAAC,SAAS,GAAG,IACxB,EACjB,0BACE,EAAE,EAAC,0BAA0B,EAC7B,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,aAAa,EAAC,gBAAgB,aAE9B,eAAM,SAAS,EAAC,SAAS,GAAG,EAC5B,eAAM,MAAM,EAAC,GAAG,EAAC,SAAS,EAAC,SAAS,GAAG,IACxB,IACZ,IACH,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip-rack.d.ts","sourceRoot":"","sources":["../../src/components/chip-rack.tsx"],"names":[],"mappings":"AAOA,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,0GA2CpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
import Chip, { CHIP_DENOMINATIONS } from "./chip";
|
|
5
|
+
const ROW_MARGINS = ["mt-[15px]", "mt-[10px]", "mt-[5px]", "mt-0"];
|
|
6
|
+
const NUM_ROWS = 4;
|
|
7
|
+
export const ChipRack = forwardRef(function ChipRack({ className }, ref) {
|
|
8
|
+
return (_jsxs("div", { ref: ref, className: cn("relative bg-card-shoe-bg border-3 w-76 h-20 border-card-shoe-border rounded-lg shadow-[0px_2.392px_0px_0px_#333] pt-4 pb-2.5 px-1.5", className), children: [_jsx("div", { className: "inline-grid", children: Array.from({ length: NUM_ROWS }).map((_, rowIdx) => (_jsx("div", { "data-row": rowIdx, className: cn("flex gap-2 [grid-area:1/1]", ROW_MARGINS[rowIdx]), children: CHIP_DENOMINATIONS.map((denom) => (_jsx("div", { "data-denomination": denom, children: _jsx(Chip, { denomination: denom, wrapperClass: `w-8.5 h-8.5 p-0`, chipClass: `w-full h-full`, showText: false }) }, denom))) }, rowIdx))) }), _jsx("div", { className: "absolute -top-[3px] left-[-3px] w-76 h-11 bg-card-shoe-bg/60 border-3 border-card-shoe-border rounded-lg z-10 backdrop-blur-[3px]", style: {
|
|
9
|
+
backdropFilter: "blur(3px)",
|
|
10
|
+
WebkitBackdropFilter: "blur(3px)",
|
|
11
|
+
} })] }));
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=chip-rack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip-rack.js","sourceRoot":"","sources":["../../src/components/chip-rack.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,IAAI,EAAE,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAElD,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;AACnE,MAAM,QAAQ,GAAG,CAAC,CAAC;AAMnB,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,EAAE,GAAG;IAClC,OAAO,CACL,eACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,qIAAqI,EACrI,SAAS,CACV,aAGD,cAAK,SAAS,EAAC,aAAa,YACzB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CACnD,0BAEY,MAAM,EAChB,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,YAE/D,kBAAkB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACjC,mCAAoC,KAAK,YACvC,KAAC,IAAI,IACH,YAAY,EAAE,KAAK,EACnB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,KAAK,GACf,IANM,KAAK,CAOT,CACP,CAAC,IAbG,MAAM,CAcP,CACP,CAAC,GACE,EAGN,cACE,SAAS,EAAC,mIAAmI,EAC7I,KAAK,EAAE;oBACL,cAAc,EAAE,WAAW;oBAC3B,oBAAoB,EAAE,WAAW;iBAClC,GACD,IACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
2
|
+
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
interface IChipProps {
|
|
4
|
+
denomination?: number;
|
|
5
|
+
amount?: number;
|
|
6
|
+
wrapperClass?: ButtonProps["className"] | DivProps["className"];
|
|
7
|
+
chipClass?: DivProps["className"];
|
|
8
|
+
textClass?: React.HTMLAttributes<HTMLSpanElement>["className"];
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
showText?: boolean;
|
|
11
|
+
isButton?: boolean;
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const CHIP_PRESETS: {
|
|
15
|
+
readonly 1: {
|
|
16
|
+
readonly color: "#999999";
|
|
17
|
+
readonly shadowColor: "#474747";
|
|
18
|
+
};
|
|
19
|
+
readonly 5: {
|
|
20
|
+
readonly color: "#DB375E";
|
|
21
|
+
readonly shadowColor: "#63171D";
|
|
22
|
+
};
|
|
23
|
+
readonly 10: {
|
|
24
|
+
readonly color: "#037A4C";
|
|
25
|
+
readonly shadowColor: "#06503F";
|
|
26
|
+
};
|
|
27
|
+
readonly 25: {
|
|
28
|
+
readonly color: "#F57FE0";
|
|
29
|
+
readonly shadowColor: "#951F9D";
|
|
30
|
+
};
|
|
31
|
+
readonly 50: {
|
|
32
|
+
readonly color: "#623CEA";
|
|
33
|
+
readonly shadowColor: "#2D268B";
|
|
34
|
+
};
|
|
35
|
+
readonly 100: {
|
|
36
|
+
readonly color: "#E3B800";
|
|
37
|
+
readonly shadowColor: "#816B0C";
|
|
38
|
+
};
|
|
39
|
+
readonly 500: {
|
|
40
|
+
readonly color: "#9727B0";
|
|
41
|
+
readonly shadowColor: "#5B187D";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type ChipDenomination = keyof typeof CHIP_PRESETS;
|
|
45
|
+
export declare const CHIP_DENOMINATIONS: ChipDenomination[];
|
|
46
|
+
export declare function getChipDenominationForAmount(amount: number): ChipDenomination;
|
|
47
|
+
declare const Chip: ({ denomination, amount, wrapperClass, chipClass, textClass, onClick, showText, isButton, selected, }: IChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export default Chip;
|
|
49
|
+
//# sourceMappingURL=chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../src/components/chip.tsx"],"names":[],"mappings":"AAGA,KAAK,WAAW,GAAG,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AACjE,KAAK,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAErD,UAAU,UAAU;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAChE,SAAS,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,WAAW,CAAC,CAAC;IAC/D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwBD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQf,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,YAAY,CAAC;AAEzD,eAAO,MAAM,kBAAkB,EAE1B,gBAAgB,EAAE,CAAC;AAExB,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAS7E;AA2FD,QAAA,MAAM,IAAI,GAAI,sGAUX,UAAU,4CAkCZ,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
import { formatAmountDirect } from "../utils/format-amount";
|
|
4
|
+
const hoverEffect = `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 48 49" fill="none">
|
|
5
|
+
<g filter="url(#filter0_d_6722_40653)">
|
|
6
|
+
<ellipse cx="24" cy="23" rx="22" ry="23" fill="#C7FE51" fill-opacity="0.4" shape-rendering="crispEdges"/>
|
|
7
|
+
</g>
|
|
8
|
+
<defs>
|
|
9
|
+
<filter id="filter0_d_6722_40653" x="0" y="0" width="48" height="50" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
10
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
11
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
12
|
+
<feOffset dy="2"/>
|
|
13
|
+
<feGaussianBlur stdDeviation="1"/>
|
|
14
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
15
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0.780392 0 0 0 0 0.996078 0 0 0 0 0.317647 0 0 0 0.6 0"/>
|
|
16
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6722_40653"/>
|
|
17
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_6722_40653" result="shape"/>
|
|
18
|
+
</filter>
|
|
19
|
+
</defs>
|
|
20
|
+
</svg>`;
|
|
21
|
+
const selectedEffect = `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 46 48" fill="none">
|
|
22
|
+
<ellipse cx="23" cy="24" rx="23" ry="24" fill="#C7FE51"/>
|
|
23
|
+
</svg>`;
|
|
24
|
+
export const CHIP_PRESETS = {
|
|
25
|
+
1: { color: "#999999", shadowColor: "#474747" },
|
|
26
|
+
5: { color: "#DB375E", shadowColor: "#63171D" },
|
|
27
|
+
10: { color: "#037A4C", shadowColor: "#06503F" },
|
|
28
|
+
25: { color: "#F57FE0", shadowColor: "#951F9D" },
|
|
29
|
+
50: { color: "#623CEA", shadowColor: "#2D268B" },
|
|
30
|
+
100: { color: "#E3B800", shadowColor: "#816B0C" },
|
|
31
|
+
500: { color: "#9727B0", shadowColor: "#5B187D" },
|
|
32
|
+
};
|
|
33
|
+
export const CHIP_DENOMINATIONS = Object.keys(CHIP_PRESETS).map(Number);
|
|
34
|
+
export function getChipDenominationForAmount(amount) {
|
|
35
|
+
const absAmount = Math.abs(amount);
|
|
36
|
+
if (absAmount >= 500)
|
|
37
|
+
return 500;
|
|
38
|
+
if (absAmount >= 100)
|
|
39
|
+
return 100;
|
|
40
|
+
if (absAmount >= 50)
|
|
41
|
+
return 50;
|
|
42
|
+
if (absAmount >= 25)
|
|
43
|
+
return 25;
|
|
44
|
+
if (absAmount >= 10)
|
|
45
|
+
return 10;
|
|
46
|
+
if (absAmount >= 5)
|
|
47
|
+
return 5;
|
|
48
|
+
return 1;
|
|
49
|
+
}
|
|
50
|
+
function normalizeDenomination(denomination) {
|
|
51
|
+
if (typeof denomination === "number" &&
|
|
52
|
+
CHIP_DENOMINATIONS.includes(denomination)) {
|
|
53
|
+
return denomination;
|
|
54
|
+
}
|
|
55
|
+
return 1;
|
|
56
|
+
}
|
|
57
|
+
const ChipBody = ({ denomination, amount, chipClass = "w-11 h-11", textClass, showText = true, isButton = false, selected = false, }) => {
|
|
58
|
+
const resolvedDenomination = typeof amount === "number"
|
|
59
|
+
? getChipDenominationForAmount(amount)
|
|
60
|
+
: normalizeDenomination(denomination);
|
|
61
|
+
const chipText = typeof amount === "number"
|
|
62
|
+
? formatAmountDirect(Math.round(amount * 100) / 100)
|
|
63
|
+
: resolvedDenomination;
|
|
64
|
+
const resolvedTextClass = typeof amount === "number"
|
|
65
|
+
? "leading-none tracking-tighter text-[10px]"
|
|
66
|
+
: "leading-5.5 text-[10px] md:leading-7.5 md:text-[12.865px]";
|
|
67
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: cn("relative rounded-[50%] aspect-square overflow-clip chip-body p-[4.566px] z-2", chipClass), style: {
|
|
68
|
+
backgroundColor: CHIP_PRESETS[resolvedDenomination].color,
|
|
69
|
+
boxShadow: `0px 3px 0px 0px ${CHIP_PRESETS[resolvedDenomination].shadowColor}`,
|
|
70
|
+
}, children: _jsx("div", { className: "relative z-1 w-full h-full rounded-[50%] flex items-center justify-center select-none", style: {
|
|
71
|
+
backgroundColor: CHIP_PRESETS[resolvedDenomination].color,
|
|
72
|
+
}, children: showText && (_jsx("span", { "data-slot": "chip-text", className: cn("font-semibold md:font-bold text-center text-white", resolvedTextClass, textClass), children: chipText })) }) }), isButton && (_jsxs(_Fragment, { children: [_jsx("div", { className: cn("absolute inset-0 opacity-0 ease-in-out duration-300 w-9 h-9.5 md:w-11.5 md:h-12", !selected && "group-hover:opacity-100"), dangerouslySetInnerHTML: { __html: hoverEffect } }), _jsx("div", { className: cn("absolute top-0 left-1/2 -translate-x-1/2 ease-in-out duration-300 w-9 h-9.5 md:w-11.5 md:h-12", selected ? "opacity-100" : "group-active:opacity-100 opacity-0"), dangerouslySetInnerHTML: { __html: selectedEffect } })] }))] }));
|
|
73
|
+
};
|
|
74
|
+
const Chip = ({ denomination, amount, wrapperClass, chipClass = "w-11 h-11", textClass, onClick, showText = true, isButton = false, selected = false, }) => {
|
|
75
|
+
if (!isButton) {
|
|
76
|
+
return (_jsx("div", { className: cn("relative px-0.5 pb-1 group", wrapperClass), children: _jsx(ChipBody, { denomination: denomination, amount: amount, chipClass: chipClass, textClass: textClass, showText: showText, isButton: isButton, selected: selected }) }));
|
|
77
|
+
}
|
|
78
|
+
return (_jsx("button", { type: "button", onClick: onClick, className: cn("relative px-0.5 pb-1 group cursor-pointer", wrapperClass), children: _jsx(ChipBody, { denomination: denomination, amount: amount, chipClass: chipClass, textClass: textClass, showText: showText, isButton: isButton, selected: selected }) }));
|
|
79
|
+
};
|
|
80
|
+
export default Chip;
|
|
81
|
+
//# sourceMappingURL=chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../src/components/chip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wB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AS,EACpB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,GACK,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CoinInfo } from "../types";
|
|
2
|
+
interface GameFooterProps {
|
|
3
|
+
tableId: string;
|
|
4
|
+
shareBaseUrl: string | null;
|
|
5
|
+
badges: {
|
|
6
|
+
houseEdge: string;
|
|
7
|
+
minBet: string;
|
|
8
|
+
coinInfo?: CoinInfo;
|
|
9
|
+
};
|
|
10
|
+
tabsContents: {
|
|
11
|
+
table: React.ReactNode;
|
|
12
|
+
howToPlay: React.ReactNode;
|
|
13
|
+
balance: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
volumeSlider: {
|
|
16
|
+
globalVolume: number;
|
|
17
|
+
setGlobalVolume: (volume: number) => void;
|
|
18
|
+
setPrevVolume: (volume: number) => void;
|
|
19
|
+
};
|
|
20
|
+
onToggleMute: () => void;
|
|
21
|
+
onJoin: (tableIdOrLink: string) => void;
|
|
22
|
+
isMobile?: boolean;
|
|
23
|
+
gameTitle?: string;
|
|
24
|
+
gameDescription?: string;
|
|
25
|
+
centerLogoUrl?: string;
|
|
26
|
+
}
|
|
27
|
+
declare function GameFooter({ tableId, shareBaseUrl, badges, tabsContents, onJoin, onToggleMute, isMobile, volumeSlider, gameTitle, gameDescription, centerLogoUrl, }: GameFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export { GameFooter };
|
|
29
|
+
//# sourceMappingURL=game-footer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-footer.d.ts","sourceRoot":"","sources":["../../src/components/game-footer.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;KACrB,CAAC;IACF,YAAY,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;QAC3B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;KAC1B,CAAC;IACF,YAAY,EAAE;QACZ,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;QAC1C,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;KACzC,CAAC;IACF,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAmQD,iBAAS,UAAU,CAAC,EAClB,OAAO,EACP,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,QAAgB,EAChB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,aAAa,GACd,EAAE,eAAe,2CA6CjB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useMemo, useCallback, useRef, useEffect } from "react";
|
|
3
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, } from "./ui/dropdown-menu";
|
|
4
|
+
import { Icon } from "./icon";
|
|
5
|
+
import GameInfoDialog from "./game-info-dialog";
|
|
6
|
+
import SwitchTableDialog from "./switch-table-dialog";
|
|
7
|
+
import { Button } from "./button";
|
|
8
|
+
import { cn } from "../lib/utils";
|
|
9
|
+
function VolumeSlider({ globalVolume, setGlobalVolume, setPrevVolume, onToggleMute, }) {
|
|
10
|
+
const sliderRef = useRef(null);
|
|
11
|
+
const handleChange = useCallback((e) => {
|
|
12
|
+
const val = parseFloat(e.target.value);
|
|
13
|
+
if (val > 0)
|
|
14
|
+
setPrevVolume(val);
|
|
15
|
+
setGlobalVolume(val);
|
|
16
|
+
}, [setGlobalVolume, setPrevVolume]);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const el = sliderRef.current;
|
|
19
|
+
if (!el)
|
|
20
|
+
return;
|
|
21
|
+
const pct = globalVolume * 100;
|
|
22
|
+
el.style.background = `linear-gradient(to right, var(--color-accent-success) ${pct}%, var(--color-surface-250) ${pct}%)`;
|
|
23
|
+
}, [globalVolume]);
|
|
24
|
+
return (_jsxs("div", { className: "flex items-center gap-2 px-2 py-3", children: [_jsx(Icon, { icon: "sound", className: "size-4 text-text-secondary", onClick: () => onToggleMute() }), _jsx("input", { ref: sliderRef, type: "range", min: 0, max: 1, step: 0.01, value: globalVolume, onChange: handleChange, className: "volume-slider flex-1" })] }));
|
|
25
|
+
}
|
|
26
|
+
function SettingsDropdown({ onJoin, volumeSlider, onToggleMute, isMobile = false, tableId, className, }) {
|
|
27
|
+
const [switchTableOpen, setSwitchTableOpen] = useState(false);
|
|
28
|
+
return (_jsxs(_Fragment, { children: [_jsxs(DropdownMenu, { children: [_jsxs(DropdownMenuTrigger, { type: "button", className: cn("flex cursor-pointer items-center gap-1 h-5 text-base font-semibold text-text-secondary hover:text-white active:text-white tracking-tight ease-in-out duration-300", className), children: [_jsx(Icon, { icon: "settings", className: "size-4" }), _jsx("span", { className: "hidden lg:inline-block", children: "Settings" })] }), _jsxs(DropdownMenuContent, { side: "top", align: "start", sideOffset: 12, className: "w-[220px] rounded-lg border border-surface-300 bg-surface-450 p-2 shadow-[0px_6px_22px_0px_rgba(0,0,0,0.3)]", onCloseAutoFocus: (e) => e.preventDefault(), children: [_jsx(VolumeSlider, { globalVolume: volumeSlider.globalVolume, setGlobalVolume: volumeSlider.setGlobalVolume, setPrevVolume: volumeSlider.setPrevVolume, onToggleMute: onToggleMute }), _jsxs("button", { type: "button", onClick: () => setSwitchTableOpen(true), className: "flex w-full items-center gap-2 rounded-xl px-2 py-3 transition-colors hover:bg-surface-300", children: [_jsx(Icon, { icon: "logout", className: "size-4 text-text-secondary" }), _jsx("span", { className: "text-sm font-semibold text-white", children: "Switch Table" })] })] })] }), _jsx(SwitchTableDialog, { open: switchTableOpen, onOpenChange: setSwitchTableOpen, currentTableId: tableId, onJoin: onJoin, isMobile: isMobile })] }));
|
|
29
|
+
}
|
|
30
|
+
function InviteFriendsButton({ tableId, shareBaseUrl, className, }) {
|
|
31
|
+
const [copied, setCopied] = useState(false);
|
|
32
|
+
const shareUrl = useMemo(() => {
|
|
33
|
+
if (!shareBaseUrl || !tableId)
|
|
34
|
+
return null;
|
|
35
|
+
return `${shareBaseUrl}?tableId=${tableId}`;
|
|
36
|
+
}, [shareBaseUrl, tableId]);
|
|
37
|
+
const roomDisplay = useMemo(() => {
|
|
38
|
+
if (!shareUrl)
|
|
39
|
+
return null;
|
|
40
|
+
try {
|
|
41
|
+
const url = new URL(shareUrl);
|
|
42
|
+
return `${url.host}${url.pathname}${url.search}`;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return shareUrl;
|
|
46
|
+
}
|
|
47
|
+
}, [shareUrl]);
|
|
48
|
+
const handleCopy = useCallback(async () => {
|
|
49
|
+
if (!shareUrl)
|
|
50
|
+
return;
|
|
51
|
+
try {
|
|
52
|
+
await navigator.clipboard.writeText(shareUrl);
|
|
53
|
+
setCopied(true);
|
|
54
|
+
setTimeout(() => setCopied(false), 2000);
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
console.error("Failed to copy:", err);
|
|
58
|
+
}
|
|
59
|
+
}, [shareUrl]);
|
|
60
|
+
if (!shareBaseUrl)
|
|
61
|
+
return null;
|
|
62
|
+
return (_jsxs("div", { className: cn("flex flex-col lg:items-end", className), children: [_jsx("button", { type: "button", onClick: handleCopy, className: "flex cursor-pointer h-5 items-center gap-1 text-base font-semibold tracking-tight group", children: copied ? (_jsxs(_Fragment, { children: [_jsx(Icon, { icon: "check", className: "size-4 text-accent-success" }), _jsx("span", { className: "text-accent-success", children: "Table Link Copied" })] })) : (_jsxs(_Fragment, { children: [_jsx(Icon, { icon: "share", className: "size-4" }), _jsx("span", { className: "text-text-secondary! group-active:text-white", children: "Invite Friends" })] })) }), roomDisplay && (_jsxs("p", { className: "text-[10px] leading-3.5 text-text-tertiary h-3.5 truncate lg:w-fit w-50", children: ["Table Id: ", tableId] }))] }));
|
|
63
|
+
}
|
|
64
|
+
function GameInfoButton({ badges, tabsContents, isMobile, className, gameTitle = "Blackjack", gameDescription = "Classic Blackjack. Play solo or join a multiplayer table in real time.", }) {
|
|
65
|
+
const [open, setOpen] = useState(false);
|
|
66
|
+
return (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", onClick: () => setOpen(true), className: cn("flex cursor-pointer items-center gap-1 text-base font-semibold text-text-secondary hover:text-white active:text-white tracking-tight ease-in-out duration-300", className), children: [_jsx(Icon, { icon: "rules", className: "size-4" }), _jsx("span", { className: "hidden lg:inline-block", children: "Game Info" })] }), _jsx(GameInfoDialog, { open: open, onOpenChange: setOpen, title: gameTitle, description: gameDescription, badges: badges, tabsContents: tabsContents, footer: _jsx(Button, { variant: "primary", type: "button", onClick: () => setOpen(false), className: "w-full h-10 rounded-xl", children: "Start Playing" }), isMobile: isMobile })] }));
|
|
67
|
+
}
|
|
68
|
+
function GameFooter({ tableId, shareBaseUrl, badges, tabsContents, onJoin, onToggleMute, isMobile = false, volumeSlider, gameTitle, gameDescription, centerLogoUrl, }) {
|
|
69
|
+
return (_jsxs("div", { className: "relative w-full h-16.5 overflow-clip rounded-b-xl border-t-[5px] border-surface-450 bg-surface-500 p-4 lg:px-7 lg:py-4 flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-7 order-2 lg:order-1", children: [_jsx(SettingsDropdown, { onJoin: onJoin, volumeSlider: volumeSlider, onToggleMute: onToggleMute, isMobile: isMobile, tableId: tableId, className: "order-2 lg:order-1" }), _jsx(GameInfoButton, { badges: badges, tabsContents: tabsContents, isMobile: isMobile, className: "order-1 lg:order-2", gameTitle: gameTitle, gameDescription: gameDescription })] }), centerLogoUrl && (_jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 hidden lg:block", children: _jsx("img", { src: centerLogoUrl, alt: "Center Logo", className: "h-16 w-40 opacity-50", draggable: false }) })), _jsx(InviteFriendsButton, { tableId: tableId, shareBaseUrl: shareBaseUrl, className: "order-1 lg:order-2" })] }));
|
|
70
|
+
}
|
|
71
|
+
export { GameFooter };
|
|
72
|
+
//# sourceMappingURL=game-footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-footer.js","sourceRoot":"","sources":["../../src/components/game-footer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAoClC,SAAS,YAAY,CAAC,EACpB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,GACM;IAClB,MAAM,SAAS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,8BAG3B,EAEX,QAAQ,EAAE,QAAQ,GAClB,IACD,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAClB,OAAO,EACP,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,aAAa,GACG;IAChB,OAAO,CACL,eAAK,SAAS,EAAC,0JAA0J,aAEvK,eAAK,SAAS,EAAC,4CAA4C,aACzD,KAAC,gBAAgB,IACf,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,oBAAoB,GAC9B,EAEF,KAAC,cAAc,IACb,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAC,oBAAoB,EAC9B,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,GAChC,IACE,EAGL,aAAa,IAAI,CAChB,cAAK,SAAS,EAAC,6EAA6E,YAC1F,cACE,GAAG,EAAE,aAAa,EAClB,GAAG,EAAC,aAAa,EACjB,SAAS,EAAC,sBAAsB,EAChC,SAAS,EAAE,KAAK,GAChB,GACE,CACP,EAID,KAAC,mBAAmB,IAClB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAC,oBAAoB,GAC9B,IACE,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "../styles/casino-ui-base.css";
|
|
2
|
+
import type { CoinInfo } from "../types";
|
|
3
|
+
interface GameInfoDialogProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
badges: {
|
|
9
|
+
houseEdge: string;
|
|
10
|
+
minBet: string;
|
|
11
|
+
coinInfo?: CoinInfo;
|
|
12
|
+
};
|
|
13
|
+
tabsContents: {
|
|
14
|
+
table: React.ReactNode;
|
|
15
|
+
howToPlay: React.ReactNode;
|
|
16
|
+
balance: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
footer?: React.ReactNode;
|
|
19
|
+
isMobile?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare function GameInfoDialog({ open, onOpenChange, title, description, badges, tabsContents, footer, isMobile, }: GameInfoDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default GameInfoDialog;
|
|
23
|
+
//# sourceMappingURL=game-info-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-info-dialog.d.ts","sourceRoot":"","sources":["../../src/components/game-info-dialog.tsx"],"names":[],"mappings":"AAoBA,OAAO,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAoIzC,UAAU,mBAAmB;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;KACrB,CAAC;IACF,YAAY,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;QAC3B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;KAC1B,CAAC;IACF,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,MAAM,EACN,YAAY,EACZ,MAAM,EACN,QAAgB,GACjB,EAAE,mBAAmB,2CA4DrB;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "./ui/dialog";
|
|
3
|
+
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, } from "./ui/drawer";
|
|
4
|
+
import { Icon } from "./icon";
|
|
5
|
+
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
6
|
+
import "../styles/casino-ui-base.css";
|
|
7
|
+
import { cn } from "../lib/utils";
|
|
8
|
+
function TabTrigger({ className, ...props }) {
|
|
9
|
+
return (_jsx(TabsPrimitive.Trigger, { className: cn("flex-1 rounded-xl px-3 py-2 text-sm font-semibold text-text-tertiary transition-all", "data-[state=active]:bg-surface-300 data-[state=active]:text-white data-[state=active]:shadow", className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function GameInfoBadges({ badges }) {
|
|
12
|
+
const coinInfo = badges.coinInfo;
|
|
13
|
+
const isUSD = coinInfo?.coinType?.toLowerCase().includes("usd") ?? false;
|
|
14
|
+
return (_jsxs("div", { className: "flex gap-2 items-center h-8", children: [_jsxs("div", { className: "h-full flex gap-1 items-center rounded-lg bg-surface-400 p-2", children: [_jsx("span", { className: "text-xs text-text-secondary text-nowrap", children: "House Edge" }), _jsxs("span", { className: "text-xs lg:text-sm font-semibold text-white", children: [badges.houseEdge, "%"] })] }), _jsxs("div", { className: "h-full flex gap-1 items-center rounded-lg bg-surface-400 p-2", children: [_jsx("span", { className: "text-xs text-text-secondary text-nowrap", children: "Min Bet:" }), _jsx("span", { className: "text-xs lg:text-sm font-semibold text-white", children: badges.minBet })] }), _jsxs("div", { className: "h-full flex gap-1 items-center rounded-lg bg-surface-400 p-2", children: [_jsx("span", { className: "text-xs text-text-secondary text-nowrap", children: "Game Coin:" }), isUSD ? (_jsx("span", { className: "text-xs lg:text-sm font-semibold text-white", children: "$" })) : coinInfo?.image ? (typeof coinInfo.image === "string" ? (_jsx("img", { src: coinInfo.image, alt: coinInfo.symbol, className: "size-3 lg:size-4 object-contain rounded-[50%]" })) : (_jsx("div", { className: "size-3 lg:size-4 object-contain rounded-[50%]", children: coinInfo.image }))) : (_jsx("span", { className: "text-xs lg:text-sm font-semibold text-white", children: coinInfo?.symbol ?? "-" }))] })] }));
|
|
15
|
+
}
|
|
16
|
+
function GameInfoContent({ tabsContents }) {
|
|
17
|
+
return (_jsxs(TabsPrimitive.Root, { defaultValue: "table", className: "flex flex-col flex-1 max-h-118 lg:max-h-102.5 p-3 lg:py-5 lg:px-6 bg-surface-400", children: [_jsxs(TabsPrimitive.List, { className: "w-full flex gap-1 rounded-xl bg-surface-500 p-1 mb-5", children: [_jsx(TabTrigger, { className: "rounded-lg text-xs lg:text-sm text-nowrap", value: "table", children: "Table" }), _jsx(TabTrigger, { className: "rounded-lg text-xs lg:text-sm text-nowrap", value: "how-to-play", children: "How to Play" }), _jsx(TabTrigger, { className: "rounded-lg text-xs lg:text-sm text-nowrap", value: "balance", children: "Balance" })] }), _jsx(TabsPrimitive.Content, { value: "table", className: "flex-1 overflow-y-auto hide-scrollbar pb-24", children: tabsContents.table }), _jsx(TabsPrimitive.Content, { value: "how-to-play", className: "flex-1 overflow-y-auto hide-scrollbar pb-24", children: tabsContents.howToPlay }), _jsx(TabsPrimitive.Content, { value: "balance", className: "flex-1 overflow-y-auto hide-scrollbar pb-24", children: tabsContents.balance })] }));
|
|
18
|
+
}
|
|
19
|
+
function GameInfoDialog({ open, onOpenChange, title, description, badges, tabsContents, footer, isMobile = false, }) {
|
|
20
|
+
if (isMobile) {
|
|
21
|
+
return (_jsx(Drawer, { open: open, onOpenChange: onOpenChange, children: _jsxs(DrawerContent, { className: "bg-surface-600 overflow-clip border-none max-h-[90vh]!", children: [_jsxs(DrawerHeader, { className: "w-full flex flex-col gap-3 px-4 pt-5 pb-3", children: [_jsxs("div", { className: "w-full flex gap-6 items-start", children: [_jsxs("div", { className: "w-full flex flex-col gap-1", children: [_jsx(DrawerTitle, { className: "text-2xl font-bold text-left", children: title }), _jsx(DrawerDescription, { className: "text-left text-text-secondary font-semibold", children: description })] }), _jsx(DrawerClose, { className: "min-w-6 cursor-pointer opacity-70 transition-opacity hover:opacity-100", children: _jsx(Icon, { icon: "x", className: "size-6" }) })] }), _jsx(GameInfoBadges, { badges: badges })] }), _jsx(GameInfoContent, { tabsContents: tabsContents }), footer && (_jsx(DrawerFooter, { className: "sticky bottom-0 border-t border-surface-300 bg-surface-450 px-5 pt-5 pb-6", children: footer }))] }) }));
|
|
22
|
+
}
|
|
23
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "w-125 rounded-xl overflow-clip bg-surface-600", children: [_jsxs(DialogHeader, { className: "flex flex-col gap-3 p-6", children: [_jsxs("div", { className: "w-full flex gap-6 items-start", children: [_jsxs("div", { className: "w-full flex flex-col gap-1", children: [_jsx(DialogTitle, { className: "text-2xl font-bold", children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogClose, { className: "min-w-6 cursor-pointer opacity-70 transition-opacity hover:opacity-100", children: _jsx(Icon, { icon: "x", className: "size-6" }) })] }), _jsx(GameInfoBadges, { badges: badges })] }), _jsx(GameInfoContent, { tabsContents: tabsContents }), footer && (_jsx(DialogFooter, { className: "border-t border-surface-300 bg-surface-450 px-5 pt-5 pb-6", children: footer }))] }) }));
|
|
24
|
+
}
|
|
25
|
+
export default GameInfoDialog;
|
|
26
|
+
//# sourceMappingURL=game-info-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-info-dialog.js","sourceRoot":"","sources":["../../src/components/game-info-dialog.tsx"],"names":[],"mappings":";A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,YAAE,KAAK,GAAe,EACjE,KAAC,iBAAiB,cAAE,WAAW,GAAqB,IAChD,EACN,KAAC,WAAW,IAAC,SAAS,EAAC,wEAAwE,YAC7F,KAAC,IAAI,IAAC,IAAI,EAAC,GAAG,EAAC,SAAS,EAAC,QAAQ,GAAG,GACxB,IACV,EACN,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,IACrB,EAEf,KAAC,eAAe,IAAC,YAAY,EAAE,YAAY,GAAI,EAE9C,MAAM,IAAI,CACT,KAAC,YAAY,IAAC,SAAS,EAAC,2DAA2D,YAChF,MAAM,GACM,CAChB,IACa,GACT,CACV,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type IconProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
icon: string;
|
|
4
|
+
width?: string | number;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
color?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const Icon: React.FC<IconProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/components/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiC1B,KAAK,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAIF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAmDpC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
const ICONS = {
|
|
4
|
+
settings: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.0912 6.79037L13.2 6.48125C13.0893 6.10173 12.9379 5.73693 12.7485 5.39165L13.8525 3.81821C13.9417 3.69117 13.9264 3.51805 13.8166 3.40797L12.5721 2.16413C12.4611 2.05341 12.2864 2.03901 12.159 2.13085L10.6093 3.24477C10.2608 3.05213 9.89278 2.89917 9.51102 2.78813L9.1811 0.904608C9.15422 0.751648 9.02142 0.639648 8.8659 0.639648H7.1059C6.9491 0.639648 6.81534 0.753248 6.79006 0.908128L6.48414 2.78141C6.10014 2.89181 5.73151 3.04317 5.38431 3.23325L3.83871 2.12925C3.71103 2.03805 3.53726 2.05277 3.42622 2.16317L2.18238 3.40701C2.07262 3.51677 2.05727 3.68957 2.14655 3.81661L3.23423 5.37277C3.04063 5.72317 2.88638 6.09405 2.77406 6.47997L0.908145 6.79069C0.753905 6.81629 0.640625 6.95005 0.640625 7.10621V8.86621C0.640625 9.02141 0.751985 9.15421 0.904625 9.18141L2.77054 9.51229C2.88222 9.89725 3.03646 10.2681 3.2307 10.6195L2.12958 12.1596C2.0387 12.2867 2.0531 12.4611 2.1635 12.5721L3.40767 13.8172C3.51743 13.927 3.69055 13.9424 3.81759 13.8531L5.37598 12.7616C5.72574 12.9539 6.09534 13.1065 6.47838 13.2172L6.7907 15.0928C6.81598 15.2467 6.94942 15.3596 7.1059 15.3596H8.8659C9.0211 15.3596 9.1539 15.2483 9.18078 15.0956L9.51518 13.2108C9.89886 13.0979 10.2665 12.9443 10.6128 12.7516L12.1824 13.8528C12.3097 13.9427 12.4825 13.927 12.5926 13.8172L13.8368 12.5721C13.9475 12.4611 13.9619 12.286 13.8701 12.1587L12.7507 10.6044C12.9405 10.2588 13.0912 9.89341 13.2009 9.51389L15.0947 9.18141C15.248 9.15453 15.3593 9.02141 15.3593 8.86621V7.10621C15.3597 6.94941 15.2461 6.81565 15.0912 6.79037ZM7.99998 10.2396C6.76286 10.2396 5.75998 9.23677 5.75998 7.99965C5.75998 6.76253 6.76286 5.75965 7.99998 5.75965C9.2371 5.75965 10.24 6.76253 10.24 7.99965C10.24 9.23677 9.2371 10.2396 7.99998 10.2396Z" fill="currentColor"/></svg>`,
|
|
5
|
+
share: ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 13.3333 13.138" fill="none"><path d="M9.80469 0L8.86198 0.942708L10.3906 2.47135H10C5.95773 2.47135 2.66667 5.76242 2.66667 9.80469V10.4714H4V9.80469C4 6.48296 6.67827 3.80469 10 3.80469H10.3906L8.86198 5.33333L9.80469 6.27604L12.9427 3.13802L9.80469 0ZM0 3.80469V4.47135V11.138C0 12.2347 0.903353 13.138 2 13.138H11.3333C12.43 13.138 13.3333 12.2347 13.3333 11.138V10.4714V9.80469H12V10.4714V11.138C12 11.5147 11.71 11.8047 11.3333 11.8047H2C1.62331 11.8047 1.33333 11.5147 1.33333 11.138V4.47135V3.80469H0Z" fill="currentColor" /></svg>`,
|
|
6
|
+
sit: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16.6667 16.6667" fill="none"><path d="M8.33333 0C3.73083 0 0 3.73083 0 8.33333C0 12.9358 3.73083 16.6667 8.33333 16.6667C12.9358 16.6667 16.6667 12.9358 16.6667 8.33333C16.6667 3.73083 12.9358 0 8.33333 0ZM12.5 9.16667H7.01167L8.9225 11.0775L7.74417 12.2558L3.82167 8.33333L7.74417 4.41083L8.9225 5.58917L7.01167 7.5H12.5V9.16667Z" fill="currentColor"/></svg>`,
|
|
7
|
+
"switch-seat": `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16.6667 15" fill="none"><path d="M13.3333 0V2.5H0V4.16667H13.3333V6.66667L16.6667 3.33333L13.3333 0ZM3.33333 8.33333L0 11.6667L3.33333 15V12.5H16.6667V10.8333H3.33333V8.33333Z" fill="currentColor"/></svg>`,
|
|
8
|
+
crown: `<svg xmlns="http://www.w3.org/2000/svg" width="12" height="11" viewBox="0 0 12 11" fill="none"><path d="M1.8 11V9.77778H10.2V11H1.8ZM1.8 8.86111L1.035 3.95694C1.015 3.95694 0.9925 3.95949 0.9675 3.96458C0.9425 3.96968 0.92 3.97222 0.9 3.97222C0.65 3.97222 0.4375 3.8831 0.2625 3.70486C0.0875 3.52662 0 3.31019 0 3.05556C0 2.80093 0.0875 2.58449 0.2625 2.40625C0.4375 2.22801 0.65 2.13889 0.9 2.13889C1.15 2.13889 1.3625 2.22801 1.5375 2.40625C1.7125 2.58449 1.8 2.80093 1.8 3.05556C1.8 3.12685 1.7925 3.19306 1.7775 3.25417C1.7625 3.31528 1.745 3.3713 1.725 3.42222L3.6 4.27778L5.475 1.66528C5.365 1.5838 5.275 1.47685 5.205 1.34444C5.135 1.21204 5.1 1.06944 5.1 0.916667C5.1 0.662037 5.1875 0.445602 5.3625 0.267361C5.5375 0.0891204 5.75 0 6 0C6.25 0 6.4625 0.0891204 6.6375 0.267361C6.8125 0.445602 6.9 0.662037 6.9 0.916667C6.9 1.06944 6.865 1.21204 6.795 1.34444C6.725 1.47685 6.635 1.5838 6.525 1.66528L8.4 4.27778L10.275 3.42222C10.255 3.3713 10.2375 3.31528 10.2225 3.25417C10.2075 3.19306 10.2 3.12685 10.2 3.05556C10.2 2.80093 10.2875 2.58449 10.4625 2.40625C10.6375 2.22801 10.85 2.13889 11.1 2.13889C11.35 2.13889 11.5625 2.22801 11.7375 2.40625C11.9125 2.58449 12 2.80093 12 3.05556C12 3.31019 11.9125 3.52662 11.7375 3.70486C11.5625 3.8831 11.35 3.97222 11.1 3.97222C11.08 3.97222 11.0575 3.96968 11.0325 3.96458C11.0075 3.95949 10.985 3.95694 10.965 3.95694L10.2 8.86111H1.8ZM2.82 7.63889H9.18L9.57 5.0875L7.995 5.79028L6 2.99444L4.005 5.79028L2.43 5.0875L2.82 7.63889Z" fill="currentColor"/></svg>`,
|
|
9
|
+
"check-circle": `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M9.99984 1.66699C5.39984 1.66699 1.6665 5.40033 1.6665 10.0003C1.6665 14.6003 5.39984 18.3337 9.99984 18.3337C14.5998 18.3337 18.3332 14.6003 18.3332 10.0003C18.3332 5.40033 14.5998 1.66699 9.99984 1.66699ZM9.99984 16.667C6.32484 16.667 3.33317 13.6753 3.33317 10.0003C3.33317 6.32533 6.32484 3.33366 9.99984 3.33366C13.6748 3.33366 16.6665 6.32533 16.6665 10.0003C16.6665 13.6753 13.6748 16.667 9.99984 16.667ZM13.8248 6.31699L8.33317 11.8087L6.17484 9.65866L4.99984 10.8337L8.33317 14.167L14.9998 7.50033L13.8248 6.31699Z" fill="currentColor"/></svg>`,
|
|
10
|
+
loader: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M12 2a10 10 0 0 1 10 10h-3a7 7 0 0 0-7-7V2z" fill="currentColor"/></svg>`,
|
|
11
|
+
surrender: `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18.0001 18.0279" fill="none"><path d="M0.984475 1.27201e-05C0.7196 0.00415314 0.467188 0.113213 0.282637 0.303257C0.0980854 0.493301 -0.00352729 0.748802 0.000100007 1.01368V11.0137V17.0137C-0.00177404 17.1462 0.0227073 17.2778 0.072121 17.4007C0.121535 17.5237 0.194895 17.6356 0.28794 17.73C0.380984 17.8244 0.491857 17.8993 0.614114 17.9504C0.736371 18.0016 0.867575 18.0279 1.0001 18.0279C1.13263 18.0279 1.26383 18.0016 1.38609 17.9504C1.50834 17.8993 1.61922 17.8244 1.71226 17.73C1.8053 17.6356 1.87867 17.5237 1.92808 17.4007C1.97749 17.2778 2.00197 17.1462 2.0001 17.0137V11.0137H8.76377C9.14277 11.0137 9.4883 11.2274 9.6583 11.5664L10.1056 12.4609C10.2746 12.7999 10.6211 13.0137 11.0001 13.0137H17.0001C17.5521 13.0137 18.0001 12.5657 18.0001 12.0137V3.01368C18.0001 2.46168 17.5521 2.01368 17.0001 2.01368H12.2364C11.8574 2.01368 11.5119 1.79995 11.3419 1.46095L10.8946 0.566419C10.7256 0.227419 10.3791 0.0136846 10.0001 0.0136846H1.1544C1.09825 0.00429949 1.0414 -0.000274395 0.984475 1.27201e-05Z" fill="currentColor"/></svg>`,
|
|
12
|
+
split: `<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15" fill="none"><path d="M14.6567 7.3375L14.244 6.91559L12.1895 4.86109C11.9591 4.63065 11.5853 4.63065 11.3549 4.86109C11.1244 5.09154 11.1244 5.46529 11.3549 5.69573L12.4188 6.7505L9.08024 6.7505L9.08024 -2.43757e-07L7.90624 -2.95074e-07L7.90624 14.675L9.08024 14.675L9.08024 7.9245L12.4005 7.9245L11.3549 8.97009C11.1244 9.20054 11.1244 9.57429 11.3549 9.80474C11.5853 10.0352 11.9591 10.0352 12.1895 9.80474L14.6567 7.3375ZM6.73224 -3.46391e-07L5.55824 -3.97708e-07L5.55824 6.7505L2.23802 6.7505L3.30196 5.69573C3.42922 5.57191 3.49342 5.3965 3.47622 5.2188C3.45673 4.98835 3.3054 4.79116 3.08756 4.71434C2.86973 4.63638 2.62668 4.69485 2.46732 4.86109L0.412816 6.91559L8.16953e-05 7.3375L2.46732 9.80473C2.69776 10.0352 3.07151 10.0352 3.30196 9.80473C3.5324 9.57429 3.5324 9.20054 3.30196 8.97009L2.25636 7.9245L5.55824 7.9245L5.55824 14.675L6.73224 14.675L6.73224 -3.46391e-07Z" fill="currentColor"/></svg>`,
|
|
13
|
+
double: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M7.99986 13.1201C8.04486 13.1201 8.08736 13.1089 8.12986 13.0901L15.1699 9.89012C15.2836 9.83887 15.3599 9.72512 15.3599 9.60012L15.3599 7.68012C15.3599 7.57137 15.3011 7.46887 15.2099 7.41012C15.1186 7.35137 15.0086 7.34512 14.9099 7.39012L7.99986 10.5301L1.08986 7.39012C1.04736 7.37012 1.00486 7.36012 0.959863 7.36012C0.899863 7.36012 0.842363 7.37637 0.789863 7.41012C0.698614 7.46887 0.639863 7.57137 0.639863 7.68012L0.639864 9.60012C0.639864 9.72512 0.714863 9.83887 0.829863 9.89012L7.86986 13.0901C7.91236 13.1089 7.95486 13.1201 7.99986 13.1201ZM7.99986 8.64012C8.04486 8.64012 8.08736 8.62887 8.12986 8.61012L15.1699 5.41012C15.2836 5.35887 15.3599 5.24637 15.3599 5.12012L15.3599 3.20012C15.3599 3.09137 15.3011 2.98887 15.2099 2.93012C15.1186 2.87137 15.0086 2.86387 14.9099 2.91012L7.99986 6.05012L1.08986 2.91012C1.04736 2.89012 1.00486 2.88012 0.959863 2.88012C0.899862 2.88012 0.842362 2.89637 0.789863 2.93012C0.698613 2.98887 0.639863 3.09137 0.639863 3.20012L0.639863 5.12012C0.639863 5.24637 0.714863 5.35887 0.829863 5.41012L7.86986 8.61012C7.91236 8.62887 7.95486 8.64012 7.99986 8.64012Z" fill="currentColor"/></svg>`,
|
|
14
|
+
stand: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 12.2667 13.8667" fill="none"><path d="M7.2 0C6.7584 0 6.4 0.3584 6.4 0.8V5.86667H5.86667V1.86667C5.86667 1.42507 5.50827 1.06667 5.06667 1.06667C4.62507 1.06667 4.26667 1.42507 4.26667 1.86667V5.86667V7.46667V9.48021C4.26667 9.48021 2.73062 8.48653 1.95729 8.15C1.74182 8.05613 1.51681 8 1.28854 8C0.095475 8 0 9.06667 0 9.06667L2.13333 10.6667L3.84062 12.7156C4.44862 13.4452 5.34962 13.8667 6.29896 13.8667H10.1333C11.3115 13.8667 12.2667 12.9115 12.2667 11.7333V5.86667V3.46667C12.2667 3.02507 11.9083 2.66667 11.4667 2.66667C11.0251 2.66667 10.6667 3.02507 10.6667 3.46667V5.86667H10.1333V1.86667C10.1333 1.42507 9.77493 1.06667 9.33333 1.06667C8.89173 1.06667 8.53333 1.42507 8.53333 1.86667V5.86667H8V0.8C8 0.3584 7.6416 0 7.2 0Z" fill="currentColor"/></svg>`,
|
|
15
|
+
hit: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 11 14" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.912 7.25265C11.0293 7.09767 11.0293 6.90233 10.912 6.74735L5.98391 0.235724C5.87228 0.0885616 5.67346 -0.000647622 5.45834 3.54045e-06C5.24404 0.000654703 5.04522 0.0911663 4.93522 0.238329L0.0861683 6.74995C-0.0287228 6.90428 -0.0287228 7.09572 0.0861683 7.25005L4.93522 13.7617C5.04522 13.9088 5.24404 13.9993 5.45834 14C5.67346 14.0006 5.87228 13.9114 5.98391 13.7643L10.912 7.25265Z" fill="currentColor"/></svg>`,
|
|
16
|
+
x: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3.13802 2.19531L2.19531 3.13802L7.05729 8L2.19531 12.862L3.13802 13.8047L8 8.94271L12.862 13.8047L13.8047 12.862L8.94271 8L13.8047 3.13802L12.862 2.19531L8 7.05729L3.13802 2.19531Z" fill="currentColor"/></svg>`,
|
|
17
|
+
check: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M13.4201 2.76046C13.2076 2.76796 13.0126 2.88046 12.9001 3.06046L6.88006 12.2705L2.98006 8.90046C2.81256 8.72671 2.56131 8.66171 2.33006 8.73421C2.10006 8.80546 1.92881 9.00046 1.88881 9.23796C1.84881 9.47671 1.94506 9.71671 2.14006 9.86046L6.60006 13.7205C6.74006 13.8392 6.92506 13.8917 7.10631 13.8655C7.28881 13.838 7.45006 13.7342 7.55006 13.5805L13.9801 3.76046C14.1176 3.55921 14.1288 3.29921 14.0101 3.08671C13.8913 2.87546 13.6626 2.74921 13.4201 2.76046Z" fill="currentColor"/></svg>`,
|
|
18
|
+
logout: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M5.33333 1.33301C4.59667 1.33301 4 1.92967 4 2.66634V13.333C4 14.0697 4.59667 14.6663 5.33333 14.6663H10.6667C11.4033 14.6663 12 14.0697 12 13.333V8.66634H7.33333V7.33301H12V2.66634C12 1.92967 11.4033 1.33301 10.6667 1.33301H5.33333ZM12 7.33301V8.66634H13.3333V10.6663L16 7.99967L13.3333 5.33301V7.33301H12Z" fill="currentColor"/></svg>`,
|
|
19
|
+
sound: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M9.16829 2.5L4.16829 7.5H2.50163C1.58079 7.5 0.834961 8.24583 0.834961 9.16667V10.8333C0.834961 11.7542 1.58079 12.5 2.50163 12.5H4.16829L9.16829 17.5V2.5ZM13.8818 5.28646L12.7035 6.46484C14.6634 8.42477 14.6632 11.5761 12.7035 13.5352L13.8818 14.7135C16.4788 12.1176 16.4786 7.8832 13.8818 5.28646ZM11.5251 7.64323L10.3467 8.82162C11.0051 9.48002 11.0051 10.52 10.3467 11.1784L11.5251 12.3584C12.82 11.0635 12.82 8.93815 11.5251 7.64323Z" fill="currentColor"/></svg>`,
|
|
20
|
+
eye: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M11.9999 4C5.14188 4 1.88558 9.87864 1.09558 11.5566C0.963582 11.8366 0.963582 12.1614 1.09558 12.4414C1.88558 14.1204 5.14188 20 11.9999 20C18.8339 20 22.0924 14.1629 22.8964 12.4609C23.0344 12.1679 23.0344 11.8321 22.8964 11.5391C22.0924 9.83706 18.8339 4 11.9999 4ZM11.9999 7C14.7609 7 16.9999 9.239 16.9999 12C16.9999 14.761 14.7609 17 11.9999 17C9.23888 17 6.99988 14.761 6.99988 12C6.99988 9.239 9.23888 7 11.9999 7ZM11.9999 9C11.2042 9 10.4412 9.31607 9.87856 9.87868C9.31595 10.4413 8.99988 11.2044 8.99988 12C8.99988 12.7956 9.31595 13.5587 9.87856 14.1213C10.4412 14.6839 11.2042 15 11.9999 15C12.7955 15 13.5586 14.6839 14.1212 14.1213C14.6838 13.5587 14.9999 12.7956 14.9999 12C14.9999 11.2044 14.6838 10.4413 14.1212 9.87868C13.5586 9.31607 12.7955 9 11.9999 9Z" fill="currentColor"/></svg>`,
|
|
21
|
+
rules: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3.33325 2C2.23661 2 1.33325 2.90335 1.33325 4V6H3.33325V12C3.33325 13.0966 4.23661 14 5.33325 14H12.6666C13.7632 14 14.6666 13.0966 14.6666 12V10H11.9999V4C11.9999 2.90335 11.0966 2 9.99992 2H3.33325ZM3.33325 3.33333H8.27726C8.18591 3.56134 7.99992 3.7411 7.99992 4V4.66667H2.66659V4C2.66659 3.62331 2.95657 3.33333 3.33325 3.33333ZM5.33325 7.33333H9.99992V8.66667H5.33325V7.33333ZM5.33325 10H9.99992V11.3333H5.33325V10ZM11.9999 11.3333H13.3333V12C13.3333 12.3767 13.0433 12.6667 12.6666 12.6667C12.2899 12.6667 11.9999 12.3767 11.9999 12V11.3333Z" fill="currentColor"/></svg>`,
|
|
22
|
+
copy: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 1C3.44772 1 3 1.44772 3 2V11C3 11.5523 3.44772 12 4 12H12C12.5523 12 13 11.5523 13 11V2C13 1.44772 12.5523 1 12 1H4ZM4 2.5H12V11H4V2.5ZM1 5V14C1 14.5523 1.44772 15 2 15H11V13.5H2.5V5H1Z" fill="currentColor"/></svg>`,
|
|
23
|
+
info: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1ZM8 2.5C11.0376 2.5 13.5 4.96243 13.5 8C13.5 11.0376 11.0376 13.5 8 13.5C4.96243 13.5 2.5 11.0376 2.5 8C2.5 4.96243 4.96243 2.5 8 2.5ZM7.25 4.5V6H8.75V4.5H7.25ZM7.25 7V11.5H8.75V7H7.25Z" fill="currentColor"/></svg>`,
|
|
24
|
+
user: `<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C6.477 2 2 6.477 2 12C2 17.523 6.477 22 12 22C17.523 22 22 17.523 22 12C22 6.477 17.523 2 12 2ZM12 4.75C13.795 4.75 15.25 6.205 15.25 8C15.25 9.795 13.795 11.25 12 11.25C10.205 11.25 8.75 9.795 8.75 8C8.75 6.205 10.205 4.75 12 4.75ZM12 20C9.23 20 6.79 18.592 5.354 16.453C6.475 14.823 10.046 14 12 14C13.954 14 17.525 14.823 18.646 16.453C17.21 18.592 14.77 20 12 20Z" fill="currentColor"/></svg>`,
|
|
25
|
+
wallet: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 2C2.90335 2 2 2.90335 2 4V12.6667C2 13.4033 2.59667 14 3.33333 14H12.6667C13.4033 14 14 13.4033 14 12.6667V6C14 5.26333 13.4033 4.66667 12.6667 4.66667H5.33333H4C3.62331 4.66667 3.33333 4.37669 3.33333 4C3.33333 3.62331 3.62331 3.33333 4 3.33333H13.3333V2H4ZM12 8.66667C12.368 8.66667 12.6667 8.96533 12.6667 9.33333C12.6667 9.70133 12.368 10 12 10C11.632 10 11.3333 9.70133 11.3333 9.33333C11.3333 8.96533 11.632 8.66667 12 8.66667Z" fill="currentColor"/></svg>`,
|
|
26
|
+
"chevron-down": `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4.23552 5L3 6.18885L8 11L13 6.18885L11.7645 5L8 8.62229L4.23552 5Z" fill="currentColor"/></svg>`,
|
|
27
|
+
};
|
|
28
|
+
const getCustomIcon = (iconName) => {
|
|
29
|
+
return ICONS[iconName];
|
|
30
|
+
};
|
|
31
|
+
const PRESERVE_COLORS_ICONS = new Set([""]);
|
|
32
|
+
export const Icon = ({ icon, className = "", width, height, color, ...props }) => {
|
|
33
|
+
const customSvg = getCustomIcon(icon);
|
|
34
|
+
if (customSvg) {
|
|
35
|
+
const shouldPreserveColors = PRESERVE_COLORS_ICONS.has(icon);
|
|
36
|
+
let processedSvg = customSvg
|
|
37
|
+
.replace(/\swidth="[^"]*"/g, ' width="100%"')
|
|
38
|
+
.replace(/\sheight="[^"]*"/g, ' height="100%"')
|
|
39
|
+
.replace(/\sclass="[^"]*"/g, "")
|
|
40
|
+
.replace(/\sstyle="[^"]*"/g, "");
|
|
41
|
+
if (!shouldPreserveColors) {
|
|
42
|
+
processedSvg = processedSvg
|
|
43
|
+
.replace(/fill="(?!none|url\(|currentColor)[^"]*"/g, 'fill="currentColor"')
|
|
44
|
+
.replace(/stroke="(?!none|url\(|currentColor)[^"]*"/g, 'stroke="currentColor"');
|
|
45
|
+
}
|
|
46
|
+
return (_jsx("div", { className: cn(className), style: {
|
|
47
|
+
display: "inline-flex",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
justifyContent: "center",
|
|
50
|
+
minWidth: width,
|
|
51
|
+
minHeight: height,
|
|
52
|
+
width,
|
|
53
|
+
height,
|
|
54
|
+
...(color && { color }),
|
|
55
|
+
}, dangerouslySetInnerHTML: { __html: processedSvg }, ...props }));
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/components/icon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,KAAK,GAA2B;IACpC,QAAQ,EAAE,0zDAA0zD;IACp0D,K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AE,gBAAgB,CAAC;aAC9C,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;aAC/B,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;QAEnC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC1B,YAAY,GAAG,YAAY;iBACxB,OAAO,CACN,0CAA0C,EAC1C,qBAAqB,CACtB;iBACA,OAAO,CACN,4CAA4C,EAC5C,uBAAuB,CACxB,CAAC;QACN,CAAC;QAED,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EACxB,KAAK,EAAE;gBACL,OAAO,EAAE,aAAa;gBACtB,UAAU,EAAE,QAAQ;gBACpB,cAAc,EAAE,QAAQ;gBACxB,QAAQ,EAAE,KAAK;gBACf,SAAS,EAAE,MAAM;gBACjB,KAAK;gBACL,MAAM;gBACN,GAAG,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC;aACxB,EACD,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,KAC7C,KAAK,GACT,CACH,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type Suit = "club" | "diamond" | "heart" | "spade";
|
|
2
|
+
export type Rank = "A" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "J" | "Q" | "K";
|
|
3
|
+
interface PokerCardProps {
|
|
4
|
+
suit?: Suit;
|
|
5
|
+
rank?: Rank;
|
|
6
|
+
side?: "front" | "back";
|
|
7
|
+
backImage?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
showShadow?: boolean;
|
|
10
|
+
size?: "xs" | "sm" | "md" | "lg";
|
|
11
|
+
type?: "default" | "win" | "lose" | "bust" | "blackjack" | "push" | "even" | "surrender";
|
|
12
|
+
}
|
|
13
|
+
export declare function PokerCard({ suit, rank, side, backImage, className, showShadow, size, type, }: PokerCardProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=poker-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poker-card.d.ts","sourceRoot":"","sources":["../../src/components/poker-card.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAC1D,MAAM,MAAM,IAAI,GACZ,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,GAAG,GACH,GAAG,GACH,GAAG,CAAC;AAaR,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAClC,IAAI,CAAC,EACH,SAAS,GACT,KAAK,GACL,MAAM,GACN,MAAM,GACN,WAAW,GACX,MAAM,GACN,MAAM,GACN,WAAW,CAAC;CACf;AA4CD,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAI,EACJ,IAAc,EACd,SAAS,EACT,SAAS,EACT,UAAiB,EACjB,IAAW,EACX,IAAgB,GACjB,EAAE,cAAc,kDA2FhB"}
|