@rpcbase/ui 0.49.0 → 0.51.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.
Files changed (33) hide show
  1. package/dist/components/AddressAutocompleteInput/index.d.ts +16 -0
  2. package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -0
  3. package/dist/components/ApplePayButton/index.d.ts +5 -0
  4. package/dist/components/ApplePayButton/index.d.ts.map +1 -0
  5. package/dist/components/Checkbox/index.d.ts +15 -0
  6. package/dist/components/Checkbox/index.d.ts.map +1 -0
  7. package/dist/components/Dialog/index.d.ts +17 -0
  8. package/dist/components/Dialog/index.d.ts.map +1 -0
  9. package/dist/components/Image/index.d.ts +7 -0
  10. package/dist/components/Image/index.d.ts.map +1 -0
  11. package/dist/components/Input/index.d.ts +8 -0
  12. package/dist/components/Input/index.d.ts.map +1 -0
  13. package/dist/components/header/MenuPopover/index.d.ts +12 -0
  14. package/dist/components/header/MenuPopover/index.d.ts.map +1 -0
  15. package/dist/components/header/index.d.ts +13 -0
  16. package/dist/components/header/index.d.ts.map +1 -0
  17. package/dist/components/index.d.ts +8 -0
  18. package/dist/components/index.d.ts.map +1 -0
  19. package/dist/favicon.svg +3 -0
  20. package/dist/helpers/index.d.ts +2 -0
  21. package/dist/helpers/index.d.ts.map +1 -0
  22. package/dist/helpers/isMobileDevice.d.ts +2 -0
  23. package/dist/helpers/isMobileDevice.d.ts.map +1 -0
  24. package/dist/helpers/useMapsLibrary.d.ts +2 -0
  25. package/dist/helpers/useMapsLibrary.d.ts.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +975 -0
  29. package/dist/lib/utils.d.ts +3 -0
  30. package/dist/lib/utils.d.ts.map +1 -0
  31. package/dist/vite.svg +15 -0
  32. package/index.d.ts +1 -1
  33. package/package.json +20 -12
@@ -0,0 +1,16 @@
1
+ export declare const DEFAULT_ADDRESS_BOUNDING_BOX: google.maps.LatLngBoundsLiteral;
2
+ export declare const AddressAutocompleteInput: ({ id, label, placeholder, value, onValueChange, disabled, name, className, autofillShimName, googleMapsApiKey, boundingBox, allowedTypes, }: {
3
+ id: string;
4
+ label: string;
5
+ placeholder: string;
6
+ value: string | undefined;
7
+ onValueChange: (value: string) => void;
8
+ disabled?: boolean;
9
+ name?: string;
10
+ className?: string;
11
+ autofillShimName?: string;
12
+ googleMapsApiKey?: string;
13
+ boundingBox: google.maps.LatLngBoundsLiteral | google.maps.LatLngBounds;
14
+ allowedTypes?: Iterable<string>;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/AddressAutocompleteInput/index.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,IAAI,CAAC,mBAKtD,CAAA;AA8ID,eAAO,MAAM,wBAAwB,GAAI,6IAatC;IACD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAA;IACvE,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;CAChC,4CAwRA,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { ComponentPropsWithoutRef } from "react";
2
+ type ApplePayButtonProps = ComponentPropsWithoutRef<"button">;
3
+ export declare const ApplePayButton: ({ className, onClick, children, ...buttonProps }: ApplePayButtonProps) => import("react/jsx-runtime").JSX.Element;
4
+ export {};
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/ApplePayButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAA;AAIrD,KAAK,mBAAmB,GAAG,wBAAwB,CAAC,QAAQ,CAAC,CAAA;AAG7D,eAAO,MAAM,cAAc,GAAI,kDAK5B,mBAAmB,4CAiBrB,CAAA"}
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ declare const colorVariants: {
3
+ red: string;
4
+ sky: string;
5
+ };
6
+ interface CheckboxProps extends Partial<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type">> {
7
+ id: string;
8
+ name: string;
9
+ checked: boolean;
10
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
11
+ color: keyof typeof colorVariants;
12
+ }
13
+ export declare const Checkbox: ({ id, name, defaultValue, defaultChecked, checked, onChange, color, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,QAAA,MAAM,aAAa;;;CAGlB,CAAA;AAED,UAAU,aACR,SAAQ,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAC;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC/D,KAAK,EAAE,MAAM,OAAO,aAAa,CAAC;CACnC;AAED,eAAO,MAAM,QAAQ,GAAI,gFAStB,aAAa,4CAyCf,CAAA"}
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement> & {
9
+ showCloseButton?: boolean;
10
+ showCloseButtonOutside?: boolean;
11
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
14
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
15
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
16
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Dialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAMzD,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnD;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAEtD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAErD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEpD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAWtD;AAED,QAAA,MAAM,aAAa;sBAGG,OAAO;6BACA,OAAO;gDAgClC,CAAA;AAGF,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQpD;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
@@ -0,0 +1,7 @@
1
+ export declare const Image: ({ src, hash, alt, className, }: {
2
+ src: string;
3
+ hash: [number, number, string];
4
+ alt?: string;
5
+ className?: string;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Image/index.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,GAAI,gCAKnB;IACD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,4CAyFA,CAAA"}
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ type InputProps = React.ComponentProps<"input">;
3
+ export declare function Input(props: InputProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare namespace Input {
5
+ var displayName: string;
6
+ }
7
+ export {};
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;AAE/C,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,2CAYtC;yBAZe,KAAK"}
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from "react";
2
+ export declare const MenuPopover: ({ href, labelClassName, labelActiveClassName, labelElement, isActive, children, }: {
3
+ href: string;
4
+ labelClassName: string;
5
+ labelActiveClassName: string;
6
+ labelElement: ReactNode;
7
+ isActive: boolean;
8
+ children: (props: {
9
+ setIsOpen: (isOpen: boolean) => void;
10
+ }) => ReactNode;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/header/MenuPopover/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAA;AAI9D,eAAO,MAAM,WAAW,GAAI,mFAOzB;IACD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,SAAS,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,KAAK,SAAS,CAAA;CACzE,4CAkEA,CAAA"}
@@ -0,0 +1,13 @@
1
+ export declare const Header: {
2
+ MenuPopover: ({ href, labelClassName, labelActiveClassName, labelElement, isActive, children, }: {
3
+ href: string;
4
+ labelClassName: string;
5
+ labelActiveClassName: string;
6
+ labelElement: import("react").ReactNode;
7
+ isActive: boolean;
8
+ children: (props: {
9
+ setIsOpen: (isOpen: boolean) => void;
10
+ }) => import("react").ReactNode;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/header/index.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;;;;;;;;CAElB,CAAA"}
@@ -0,0 +1,8 @@
1
+ export * from "./AddressAutocompleteInput";
2
+ export * from "./ApplePayButton";
3
+ export * from "./Checkbox";
4
+ export * from "./Dialog";
5
+ export * from "./Image";
6
+ export * from "./Input";
7
+ export * from "./header";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA"}
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <rect width="64" height="64" fill="oklch(57.7% 0.245 27.325)" />
3
+ </svg>
@@ -0,0 +1,2 @@
1
+ export * from "./isMobileDevice";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const isMobileDevice: () => boolean;
2
+ //# sourceMappingURL=isMobileDevice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMobileDevice.d.ts","sourceRoot":"","sources":["../../lib/helpers/isMobileDevice.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,eAG1B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const useMapsLibrary: (_: "places", apiKey?: string) => "loaded" | null;
2
+ //# sourceMappingURL=useMapsLibrary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMapsLibrary.d.ts","sourceRoot":"","sources":["../../lib/helpers/useMapsLibrary.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,cAAc,GAAI,GAAG,QAAQ,EAAE,SAAS,MAAM,oBAoB1D,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from "./helpers";
2
+ export * from "./components";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,975 @@
1
+ import * as ve from "react";
2
+ import _e, { useState as I, useEffect as $, useRef as C, useMemo as ye } from "react";
3
+ import ie, { clsx as xe } from "clsx";
4
+ import * as N from "@radix-ui/react-dialog";
5
+ import { XIcon as Ee } from "lucide-react";
6
+ import { Link as we } from "react-router";
7
+ const dt = () => typeof navigator > "u" ? !1 : /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
8
+ var ee = { exports: {} }, X = {};
9
+ /**
10
+ * @license React
11
+ * react-jsx-runtime.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+ var ue;
19
+ function Te() {
20
+ if (ue) return X;
21
+ ue = 1;
22
+ var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
23
+ function o(n, a, c) {
24
+ var d = null;
25
+ if (c !== void 0 && (d = "" + c), a.key !== void 0 && (d = "" + a.key), "key" in a) {
26
+ c = {};
27
+ for (var m in a)
28
+ m !== "key" && (c[m] = a[m]);
29
+ } else c = a;
30
+ return a = c.ref, {
31
+ $$typeof: e,
32
+ type: n,
33
+ key: d,
34
+ ref: a !== void 0 ? a : null,
35
+ props: c
36
+ };
37
+ }
38
+ return X.Fragment = r, X.jsx = o, X.jsxs = o, X;
39
+ }
40
+ var H = {};
41
+ /**
42
+ * @license React
43
+ * react-jsx-runtime.development.js
44
+ *
45
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
46
+ *
47
+ * This source code is licensed under the MIT license found in the
48
+ * LICENSE file in the root directory of this source tree.
49
+ */
50
+ var de;
51
+ function ke() {
52
+ return de || (de = 1, process.env.NODE_ENV !== "production" && (function() {
53
+ function e(t) {
54
+ if (t == null) return null;
55
+ if (typeof t == "function")
56
+ return t.$$typeof === Z ? null : t.displayName || t.name || null;
57
+ if (typeof t == "string") return t;
58
+ switch (t) {
59
+ case k:
60
+ return "Fragment";
61
+ case D:
62
+ return "Profiler";
63
+ case x:
64
+ return "StrictMode";
65
+ case O:
66
+ return "Suspense";
67
+ case F:
68
+ return "SuspenseList";
69
+ case W:
70
+ return "Activity";
71
+ }
72
+ if (typeof t == "object")
73
+ switch (typeof t.tag == "number" && console.error(
74
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
75
+ ), t.$$typeof) {
76
+ case v:
77
+ return "Portal";
78
+ case R:
79
+ return t.displayName || "Context";
80
+ case j:
81
+ return (t._context.displayName || "Context") + ".Consumer";
82
+ case A:
83
+ var i = t.render;
84
+ return t = t.displayName, t || (t = i.displayName || i.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
85
+ case P:
86
+ return i = t.displayName || null, i !== null ? i : e(t.type) || "Memo";
87
+ case Y:
88
+ i = t._payload, t = t._init;
89
+ try {
90
+ return e(t(i));
91
+ } catch {
92
+ }
93
+ }
94
+ return null;
95
+ }
96
+ function r(t) {
97
+ return "" + t;
98
+ }
99
+ function o(t) {
100
+ try {
101
+ r(t);
102
+ var i = !1;
103
+ } catch {
104
+ i = !0;
105
+ }
106
+ if (i) {
107
+ i = console;
108
+ var g = i.error, h = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
109
+ return g.call(
110
+ i,
111
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
112
+ h
113
+ ), r(t);
114
+ }
115
+ }
116
+ function n(t) {
117
+ if (t === k) return "<>";
118
+ if (typeof t == "object" && t !== null && t.$$typeof === Y)
119
+ return "<...>";
120
+ try {
121
+ var i = e(t);
122
+ return i ? "<" + i + ">" : "<...>";
123
+ } catch {
124
+ return "<...>";
125
+ }
126
+ }
127
+ function a() {
128
+ var t = U.A;
129
+ return t === null ? null : t.getOwner();
130
+ }
131
+ function c() {
132
+ return Error("react-stack-top-frame");
133
+ }
134
+ function d(t) {
135
+ if (q.call(t, "key")) {
136
+ var i = Object.getOwnPropertyDescriptor(t, "key").get;
137
+ if (i && i.isReactWarning) return !1;
138
+ }
139
+ return t.key !== void 0;
140
+ }
141
+ function m(t, i) {
142
+ function g() {
143
+ Q || (Q = !0, console.error(
144
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
145
+ i
146
+ ));
147
+ }
148
+ g.isReactWarning = !0, Object.defineProperty(t, "key", {
149
+ get: g,
150
+ configurable: !0
151
+ });
152
+ }
153
+ function p() {
154
+ var t = e(this.type);
155
+ return V[t] || (V[t] = !0, console.error(
156
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
157
+ )), t = this.props.ref, t !== void 0 ? t : null;
158
+ }
159
+ function y(t, i, g, h, G, S) {
160
+ var _ = g.ref;
161
+ return t = {
162
+ $$typeof: w,
163
+ type: t,
164
+ key: i,
165
+ props: g,
166
+ _owner: h
167
+ }, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(t, "ref", {
168
+ enumerable: !1,
169
+ get: p
170
+ }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
171
+ configurable: !1,
172
+ enumerable: !1,
173
+ writable: !0,
174
+ value: 0
175
+ }), Object.defineProperty(t, "_debugInfo", {
176
+ configurable: !1,
177
+ enumerable: !1,
178
+ writable: !0,
179
+ value: null
180
+ }), Object.defineProperty(t, "_debugStack", {
181
+ configurable: !1,
182
+ enumerable: !1,
183
+ writable: !0,
184
+ value: G
185
+ }), Object.defineProperty(t, "_debugTask", {
186
+ configurable: !1,
187
+ enumerable: !1,
188
+ writable: !0,
189
+ value: S
190
+ }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
191
+ }
192
+ function b(t, i, g, h, G, S) {
193
+ var _ = i.children;
194
+ if (_ !== void 0)
195
+ if (h)
196
+ if (te(_)) {
197
+ for (h = 0; h < _.length; h++)
198
+ l(_[h]);
199
+ Object.freeze && Object.freeze(_);
200
+ } else
201
+ console.error(
202
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
203
+ );
204
+ else l(_);
205
+ if (q.call(i, "key")) {
206
+ _ = e(t);
207
+ var L = Object.keys(i).filter(function(be) {
208
+ return be !== "key";
209
+ });
210
+ h = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", J[_ + h] || (L = 0 < L.length ? "{" + L.join(": ..., ") + ": ...}" : "{}", console.error(
211
+ `A props object containing a "key" prop is being spread into JSX:
212
+ let props = %s;
213
+ <%s {...props} />
214
+ React keys must be passed directly to JSX without using spread:
215
+ let props = %s;
216
+ <%s key={someKey} {...props} />`,
217
+ h,
218
+ _,
219
+ L,
220
+ _
221
+ ), J[_ + h] = !0);
222
+ }
223
+ if (_ = null, g !== void 0 && (o(g), _ = "" + g), d(i) && (o(i.key), _ = "" + i.key), "key" in i) {
224
+ g = {};
225
+ for (var z in i)
226
+ z !== "key" && (g[z] = i[z]);
227
+ } else g = i;
228
+ return _ && m(
229
+ g,
230
+ typeof t == "function" ? t.displayName || t.name || "Unknown" : t
231
+ ), y(
232
+ t,
233
+ _,
234
+ g,
235
+ a(),
236
+ G,
237
+ S
238
+ );
239
+ }
240
+ function l(t) {
241
+ f(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === Y && (t._payload.status === "fulfilled" ? f(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
242
+ }
243
+ function f(t) {
244
+ return typeof t == "object" && t !== null && t.$$typeof === w;
245
+ }
246
+ var T = _e, w = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), R = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), U = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, q = Object.prototype.hasOwnProperty, te = Array.isArray, B = console.createTask ? console.createTask : function() {
247
+ return null;
248
+ };
249
+ T = {
250
+ react_stack_bottom_frame: function(t) {
251
+ return t();
252
+ }
253
+ };
254
+ var Q, V = {}, u = T.react_stack_bottom_frame.bind(
255
+ T,
256
+ c
257
+ )(), E = B(n(c)), J = {};
258
+ H.Fragment = k, H.jsx = function(t, i, g) {
259
+ var h = 1e4 > U.recentlyCreatedOwnerStacks++;
260
+ return b(
261
+ t,
262
+ i,
263
+ g,
264
+ !1,
265
+ h ? Error("react-stack-top-frame") : u,
266
+ h ? B(n(t)) : E
267
+ );
268
+ }, H.jsxs = function(t, i, g) {
269
+ var h = 1e4 > U.recentlyCreatedOwnerStacks++;
270
+ return b(
271
+ t,
272
+ i,
273
+ g,
274
+ !0,
275
+ h ? Error("react-stack-top-frame") : u,
276
+ h ? B(n(t)) : E
277
+ );
278
+ };
279
+ })()), H;
280
+ }
281
+ var fe;
282
+ function je() {
283
+ return fe || (fe = 1, process.env.NODE_ENV === "production" ? ee.exports = Te() : ee.exports = ke()), ee.exports;
284
+ }
285
+ var s = je();
286
+ function Re(e, r) {
287
+ e.src = r;
288
+ }
289
+ const Pe = (e) => {
290
+ var r, o, n, a = "The Google Maps JavaScript API", c = "google", d = "importLibrary", m = "__ib__", p = document, y = window, b = y[c] || (y[c] = {}), l = b.maps || (b.maps = {}), f = /* @__PURE__ */ new Set(), T = new URLSearchParams(), w = () => r || (r = new Promise(async (v, k) => {
291
+ await (o = p.createElement("script")), T.set("libraries", [...f] + "");
292
+ for (n in e)
293
+ T.set(n.replace(/[A-Z]/g, (x) => "_" + x[0].toLowerCase()), e[n]);
294
+ T.set("callback", c + ".maps." + m), Re(o, "https://maps.googleapis.com/maps/api/js?" + T), l[m] = v, o.onerror = () => r = k(Error(a + " could not load.")), o.nonce = p.querySelector("script[nonce]")?.nonce || "", p.head.append(o);
295
+ }));
296
+ l[d] ? console.warn(a + " only loads once. Ignoring:", e) : l[d] = (v, ...k) => f.add(v) && w().then(() => l[d](v, ...k));
297
+ }, Ne = (e) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`, Ae = (e) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`, Oe = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", Se = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", ge = process.env.NODE_ENV !== "production", le = ge ? (e) => {
298
+ console.warn(`[@googlemaps/js-api-loader] ${e}`);
299
+ } : () => {
300
+ }, Ie = ge ? (e) => {
301
+ console.info(`[@googlemaps/js-api-loader] ${e}`);
302
+ } : () => {
303
+ }, Me = process.env.NODE_ENV !== "production";
304
+ let ae = !1;
305
+ function De(e) {
306
+ if (ae) {
307
+ le(Ne(e));
308
+ return;
309
+ }
310
+ Ce(e), ae = !0;
311
+ }
312
+ async function Le(e) {
313
+ if (ae || le(Oe), !window?.google?.maps?.importLibrary)
314
+ throw new Error("google.maps.importLibrary is not installed.");
315
+ return await google.maps.importLibrary(e);
316
+ }
317
+ function Ce(e) {
318
+ const r = !!window.google?.maps?.importLibrary;
319
+ r ? Ie(Ae(e)) : Me && document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]') && le(Se), r || Pe(e);
320
+ }
321
+ let re = null, pe = null;
322
+ const $e = (e) => {
323
+ const o = e ?? void 0;
324
+ if (!o) {
325
+ const n = new Error("useMapsLibrary: missing Google Maps API key");
326
+ return console.error(n.message), Promise.reject(n);
327
+ }
328
+ return re ? pe !== o && console.warn(
329
+ "useMapsLibrary: ignoring attempt to re-initialize Google Maps with a different API key than the one already in use."
330
+ ) : (pe = o, De({
331
+ key: o,
332
+ v: "weekly"
333
+ }), re = Le("core").then(() => {
334
+ })), re;
335
+ }, ze = (e, r) => {
336
+ const [o, n] = I(!1);
337
+ return $(() => {
338
+ let a = !1;
339
+ return $e(r).then(() => {
340
+ a || n(!0);
341
+ }).catch((c) => {
342
+ console.error("Failed to init Google Maps JS", c);
343
+ }), () => {
344
+ a = !0;
345
+ };
346
+ }, [r]), o ? "loaded" : null;
347
+ };
348
+ function M(...e) {
349
+ return xe(e);
350
+ }
351
+ function he(e) {
352
+ const { className: r, type: o, ...n } = e;
353
+ return /* @__PURE__ */ s.jsx(
354
+ "input",
355
+ {
356
+ type: o,
357
+ className: M(
358
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
359
+ r
360
+ ),
361
+ ...n
362
+ }
363
+ );
364
+ }
365
+ he.displayName = "Input";
366
+ const ft = {
367
+ north: 48.17277,
368
+ south: 46.948101,
369
+ east: 2.580919,
370
+ west: -2.216823
371
+ }, Fe = /* @__PURE__ */ new Set([
372
+ "street_address",
373
+ "route",
374
+ "premise",
375
+ "subpremise",
376
+ "intersection",
377
+ "sublocality",
378
+ "sublocality_level_1",
379
+ "sublocality_level_2",
380
+ "sublocality_level_3",
381
+ "sublocality_level_4",
382
+ "sublocality_level_5",
383
+ "administrative_area_level_1",
384
+ "administrative_area_level_2",
385
+ "administrative_area_level_3",
386
+ "administrative_area_level_4",
387
+ "administrative_area_level_5",
388
+ "administrative_area_level_6",
389
+ "administrative_area_level_7",
390
+ "postal_code",
391
+ "locality",
392
+ "country",
393
+ "geocode",
394
+ "plus_code",
395
+ "political",
396
+ "neighborhood",
397
+ "colloquial_area",
398
+ "lodging",
399
+ "train_station",
400
+ "transit_station"
401
+ ]), ce = (e) => (e.text?.text ?? "").replace(/, France$/, "").trim(), Ye = ({ prediction: e }) => {
402
+ const r = ce(e), o = e.text?.text ?? "", n = e.text?.matches ?? [], a = r.length < o.length;
403
+ if (n.length === 0)
404
+ return /* @__PURE__ */ s.jsx(s.Fragment, { children: r });
405
+ const c = [];
406
+ let d = 0;
407
+ return n.forEach((m, p) => {
408
+ if (a && m.startOffset >= r.length)
409
+ return;
410
+ const y = m.startOffset, b = Math.min(m.endOffset, r.length);
411
+ if (y > d && c.push(r.substring(d, y)), b > y) {
412
+ const l = r.substring(y, b);
413
+ c.push(/* @__PURE__ */ s.jsx("strong", { children: l }, p));
414
+ }
415
+ d = Math.max(d, b);
416
+ }), d < r.length && c.push(r.substring(d)), c.length === 0 ? /* @__PURE__ */ s.jsx(s.Fragment, { children: r }) : /* @__PURE__ */ s.jsx(s.Fragment, { children: c });
417
+ }, Ue = (e, r) => !e.types || e.types.length === 0 || !r || r.size === 0 ? !0 : e.types.some((o) => r.has(o)), Ge = (e, r) => e.placeId || `${e.text?.text ?? "prediction"}-${r}`, We = (e) => {
418
+ const r = /* @__PURE__ */ new Map();
419
+ return e.forEach((o) => {
420
+ const n = o.placeId;
421
+ n && (r.has(n) || r.set(n, o));
422
+ }), Array.from(r.values());
423
+ }, qe = (e, r) => e.filter((o) => Ue(o, r)), Be = (e) => e.sort((r, o) => {
424
+ const n = r.distanceMeters ?? Number.POSITIVE_INFINITY, a = o.distanceMeters ?? Number.POSITIVE_INFINITY;
425
+ return n - a;
426
+ }), Ve = (e, r) => Be(qe(We(e), r)), Je = (e, r) => ce(e).toLowerCase() === r.trim().toLowerCase(), pt = ({
427
+ id: e,
428
+ label: r,
429
+ placeholder: o,
430
+ value: n,
431
+ onValueChange: a,
432
+ disabled: c,
433
+ name: d,
434
+ className: m,
435
+ autofillShimName: p,
436
+ googleMapsApiKey: y,
437
+ boundingBox: b,
438
+ allowedTypes: l
439
+ }) => {
440
+ const [f, T] = I(n ?? ""), [w, v] = I([]), [k, x] = I(!1), [D, j] = I(-1), R = C(null), A = C(null), O = C(!1), F = C(!1), P = C(null), Y = ze("places", y), [W, Z] = I(null), U = ye(() => {
441
+ if (!l)
442
+ return Fe;
443
+ const u = /* @__PURE__ */ new Set();
444
+ for (const E of l)
445
+ u.add(E);
446
+ return u;
447
+ }, [l]);
448
+ $(() => {
449
+ T(n ?? ""), F.current = !1;
450
+ }, [n]), $(() => {
451
+ if (!Y || typeof google > "u" || !google.maps?.importLibrary)
452
+ return;
453
+ let u = !0;
454
+ return google.maps.importLibrary("places").then((E) => {
455
+ u && Z(E);
456
+ }).catch(() => {
457
+ u && (console.error("AddressAutocompleteInput: failed to load places library"), Z(null));
458
+ }), () => {
459
+ u = !1;
460
+ };
461
+ }, [Y]), $(() => {
462
+ if (O.current) {
463
+ O.current = !1;
464
+ return;
465
+ }
466
+ let u = !0;
467
+ const E = setTimeout(() => {
468
+ if (!u)
469
+ return;
470
+ if (f.trim() === "") {
471
+ v([]), x(!1), P.current = null, n !== "" && a("");
472
+ return;
473
+ }
474
+ if (!W) return;
475
+ const { AutocompleteSuggestion: t, AutocompleteSessionToken: i } = W;
476
+ if (!t || !i) {
477
+ console.error("AddressAutocompleteInput: missing AutocompleteSuggestion or AutocompleteSessionToken exports"), v([]), x(!1);
478
+ return;
479
+ }
480
+ P.current || (P.current = new i());
481
+ const g = {
482
+ input: f,
483
+ sessionToken: P.current ?? void 0,
484
+ locationRestriction: b,
485
+ includedRegionCodes: ["fr"]
486
+ };
487
+ t.fetchAutocompleteSuggestions(g).then((h) => {
488
+ if (!u)
489
+ return;
490
+ const G = h.suggestions.map((z) => z.placePrediction).filter((z) => !!z), S = Ve(G, U), _ = S[0], L = _ && S.length === 1 && Je(_, f);
491
+ if (!F.current && L) {
492
+ v(S), x(!1);
493
+ return;
494
+ }
495
+ S.length > 0 ? (v(S), F.current && x(!0), j(-1)) : (v([]), x(!1));
496
+ }).catch((h) => {
497
+ u && (console.error("AddressAutocompleteInput: suggestion fetch failed", h), v([]), x(!1));
498
+ });
499
+ }, 300);
500
+ return () => {
501
+ u = !1, clearTimeout(E);
502
+ };
503
+ }, [f, W, a, n, b, U]), $(() => {
504
+ const u = (E) => {
505
+ R.current && !R.current.contains(E.target) && A.current && !A.current.contains(E.target) && x(!1);
506
+ };
507
+ return document.addEventListener("mousedown", u), () => {
508
+ document.removeEventListener("mousedown", u);
509
+ };
510
+ }, []);
511
+ const q = (u) => {
512
+ O.current = !0;
513
+ const E = ce(u);
514
+ T(E), a(E), v([]), x(!1), P.current = null;
515
+ }, te = (u) => {
516
+ F.current = !0, T(u.target.value);
517
+ }, B = (u) => {
518
+ if (!k || w.length === 0) {
519
+ u.key === "Enter" && (u.preventDefault(), a(f), x(!1), P.current = null);
520
+ return;
521
+ }
522
+ u.key === "ArrowDown" ? (u.preventDefault(), j((E) => (E + 1) % w.length)) : u.key === "ArrowUp" ? (u.preventDefault(), j((E) => (E - 1 + w.length) % w.length)) : u.key === "Enter" ? (u.preventDefault(), D > -1 && w[D] ? q(w[D]) : (a(f), x(!1), P.current = null)) : u.key === "Escape" && x(!1);
523
+ }, Q = () => {
524
+ x(!1), n !== f && a(f), P.current = null;
525
+ }, V = p ?? (d ? `${d}_shim` : void 0);
526
+ return /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
527
+ V && /* @__PURE__ */ s.jsx(
528
+ "input",
529
+ {
530
+ tabIndex: -1,
531
+ autoComplete: "street-address",
532
+ name: V,
533
+ "aria-hidden": "true",
534
+ className: "pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0"
535
+ }
536
+ ),
537
+ /* @__PURE__ */ s.jsx("label", { htmlFor: e, className: "text-left block text-sm font-medium text-gray-700 mb-1", children: r }),
538
+ /* @__PURE__ */ s.jsx(
539
+ he,
540
+ {
541
+ ref: R,
542
+ id: e,
543
+ type: "text",
544
+ placeholder: o,
545
+ name: d ?? `${e}_input`,
546
+ value: f,
547
+ onChange: te,
548
+ onKeyDown: B,
549
+ onFocus: () => {
550
+ w.length > 0 && f && x(!0);
551
+ },
552
+ onBlur: Q,
553
+ disabled: c,
554
+ autoComplete: "off",
555
+ className: M("w-full", m)
556
+ }
557
+ ),
558
+ k && w.length > 0 && /* @__PURE__ */ s.jsx(
559
+ "ul",
560
+ {
561
+ ref: A,
562
+ className: "absolute z-10 w-full mt-1 bg-white border border-gray-200 rounded-md shadow-lg text-left",
563
+ children: w.map((u, E) => /* @__PURE__ */ s.jsx(
564
+ "li",
565
+ {
566
+ className: ie(
567
+ "px-3 py-2 cursor-pointer text-sm text-gray-700 hover:bg-gray-100",
568
+ { "bg-gray-100": D === E }
569
+ ),
570
+ onMouseDown: (J) => {
571
+ J.preventDefault(), q(u);
572
+ },
573
+ children: /* @__PURE__ */ s.jsx(Ye, { prediction: u })
574
+ },
575
+ Ge(u, E)
576
+ ))
577
+ }
578
+ )
579
+ ] });
580
+ }, mt = ({
581
+ className: e,
582
+ onClick: r,
583
+ children: o,
584
+ ...n
585
+ }) => /* @__PURE__ */ s.jsxs(
586
+ "button",
587
+ {
588
+ type: "button",
589
+ onClick: r,
590
+ className: ie(
591
+ "flex w-full items-center justify-center rounded-md border border-transparent bg-black py-2 text-white hover:bg-gray-800 focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:outline-hidden",
592
+ e
593
+ ),
594
+ ...n,
595
+ children: [
596
+ o ?? /* @__PURE__ */ s.jsx("span", { className: "sr-only", children: "Pay with Apple Pay" }),
597
+ /* @__PURE__ */ s.jsx("svg", { fill: "currentColor", viewBox: "0 0 50 20", className: "h-5 w-auto", children: /* @__PURE__ */ s.jsx("path", { d: "M9.536 2.579c-.571.675-1.485 1.208-2.4 1.132-.113-.914.334-1.884.858-2.484C8.565.533 9.564.038 10.374 0c.095.951-.276 1.884-.838 2.579zm.829 1.313c-1.324-.077-2.457.751-3.085.751-.638 0-1.6-.713-2.647-.694-1.362.019-2.628.79-3.323 2.017-1.429 2.455-.372 6.09 1.009 8.087.676.99 1.485 2.075 2.552 2.036 1.009-.038 1.409-.656 2.628-.656 1.228 0 1.58.656 2.647.637 1.104-.019 1.8-.99 2.475-1.979.771-1.122 1.086-2.217 1.105-2.274-.02-.019-2.133-.828-2.152-3.263-.02-2.036 1.666-3.007 1.742-3.064-.952-1.408-2.437-1.56-2.951-1.598zm7.645-2.76v14.834h2.305v-5.072h3.19c2.913 0 4.96-1.998 4.96-4.89 0-2.893-2.01-4.872-4.885-4.872h-5.57zm2.305 1.941h2.656c2 0 3.142 1.066 3.142 2.94 0 1.875-1.142 2.95-3.151 2.95h-2.647v-5.89zM32.673 16.08c1.448 0 2.79-.733 3.4-1.893h.047v1.779h2.133V8.582c0-2.14-1.714-3.52-4.351-3.52-2.447 0-4.256 1.399-4.323 3.32h2.076c.171-.913 1.018-1.512 2.18-1.512 1.41 0 2.2.656 2.2 1.865v.818l-2.876.171c-2.675.162-4.123 1.256-4.123 3.159 0 1.922 1.495 3.197 3.637 3.197zm.62-1.76c-1.229 0-2.01-.59-2.01-1.494 0-.933.752-1.475 2.19-1.56l2.562-.162v.837c0 1.39-1.181 2.379-2.743 2.379zM41.1 20c2.247 0 3.304-.856 4.227-3.454l4.047-11.341h-2.342l-2.714 8.763h-.047l-2.714-8.763h-2.409l3.904 10.799-.21.656c-.352 1.114-.923 1.542-1.942 1.542-.18 0-.533-.02-.676-.038v1.779c.133.038.705.057.876.057z" }) })
598
+ ]
599
+ }
600
+ ), Xe = {
601
+ red: "checked:border-red-700 checked:bg-red-700 indeterminate:border-red-700 indeterminate:bg-red-700 focus-visible:outline-red-700",
602
+ sky: "checked:border-sky-600 checked:bg-sky-600 indeterminate:border-sky-600 indeterminate:bg-sky-600 focus-visible:outline-sky-600"
603
+ }, gt = ({
604
+ id: e,
605
+ name: r,
606
+ defaultValue: o,
607
+ defaultChecked: n,
608
+ checked: a,
609
+ onChange: c,
610
+ color: d = "sky",
611
+ ...m
612
+ }) => {
613
+ const p = Xe[d];
614
+ return /* @__PURE__ */ s.jsx("div", { className: "flex h-6 shrink-0 items-center", children: /* @__PURE__ */ s.jsxs("div", { className: "group grid size-4 grid-cols-1", children: [
615
+ /* @__PURE__ */ s.jsx(
616
+ "input",
617
+ {
618
+ ...m,
619
+ id: e,
620
+ name: r,
621
+ type: "checkbox",
622
+ defaultValue: o,
623
+ defaultChecked: n,
624
+ checked: a,
625
+ onChange: c,
626
+ className: `col-start-1 row-start-1 appearance-none cursor-pointer rounded-sm border border-gray-300 bg-white focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border-gray-300 disabled:bg-gray-100 disabled:checked:bg-gray-100 forced-colors:appearance-auto ${p}`
627
+ }
628
+ ),
629
+ /* @__PURE__ */ s.jsxs(
630
+ "svg",
631
+ {
632
+ fill: "none",
633
+ viewBox: "0 0 14 14",
634
+ className: "pointer-events-none col-start-1 row-start-1 size-3.5 self-center justify-self-center stroke-white group-has-disabled:stroke-gray-950/25",
635
+ children: [
636
+ /* @__PURE__ */ s.jsx(
637
+ "path",
638
+ {
639
+ d: "M3 8L6 11L11 3.5",
640
+ strokeWidth: 2,
641
+ strokeLinecap: "round",
642
+ strokeLinejoin: "round",
643
+ className: "opacity-0 group-has-checked:opacity-100"
644
+ }
645
+ ),
646
+ /* @__PURE__ */ s.jsx(
647
+ "path",
648
+ {
649
+ d: "M3 7H11",
650
+ strokeWidth: 2,
651
+ strokeLinecap: "round",
652
+ strokeLinejoin: "round",
653
+ className: "opacity-0 group-has-indeterminate:opacity-100"
654
+ }
655
+ )
656
+ ]
657
+ }
658
+ )
659
+ ] }) });
660
+ };
661
+ function ht({
662
+ ...e
663
+ }) {
664
+ return /* @__PURE__ */ s.jsx(N.Root, { "data-slot": "dialog", ...e });
665
+ }
666
+ function bt({
667
+ ...e
668
+ }) {
669
+ return /* @__PURE__ */ s.jsx(N.Trigger, { "data-slot": "dialog-trigger", ...e });
670
+ }
671
+ function He({
672
+ ...e
673
+ }) {
674
+ return /* @__PURE__ */ s.jsx(N.Portal, { "data-slot": "dialog-portal", ...e });
675
+ }
676
+ function vt({
677
+ ...e
678
+ }) {
679
+ return /* @__PURE__ */ s.jsx(N.Close, { "data-slot": "dialog-close", ...e });
680
+ }
681
+ function Ke({
682
+ className: e,
683
+ ...r
684
+ }) {
685
+ return /* @__PURE__ */ s.jsx(
686
+ N.Overlay,
687
+ {
688
+ "data-slot": "dialog-overlay",
689
+ className: M(
690
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
691
+ e
692
+ ),
693
+ ...r
694
+ }
695
+ );
696
+ }
697
+ const Ze = ve.forwardRef(({ className: e, children: r, showCloseButton: o = !0, showCloseButtonOutside: n = !1, ...a }, c) => /* @__PURE__ */ s.jsx(He, { "data-slot": "dialog-portal", children: /* @__PURE__ */ s.jsx(Ke, { children: /* @__PURE__ */ s.jsxs(
698
+ N.Content,
699
+ {
700
+ ref: c,
701
+ "data-slot": "dialog-content",
702
+ className: M(
703
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
704
+ e
705
+ ),
706
+ ...a,
707
+ children: [
708
+ r,
709
+ o && /* @__PURE__ */ s.jsxs(
710
+ N.Close,
711
+ {
712
+ "data-slot": "dialog-close",
713
+ className: M(
714
+ "absolute ring-offset-background focus:ring-ring transition-opacity focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
715
+ n ? "-top-3 -right-3 z-[51] rounded-full border bg-background p-1 opacity-100 hover:bg-accent [&_svg]:size-5" : "top-4 right-4 rounded-xs opacity-70 hover:opacity-100 data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4"
716
+ ),
717
+ children: [
718
+ /* @__PURE__ */ s.jsx(Ee, {}),
719
+ /* @__PURE__ */ s.jsx("span", { className: "sr-only", children: "Close" })
720
+ ]
721
+ }
722
+ )
723
+ ]
724
+ }
725
+ ) }) }));
726
+ Ze.displayName = N.Content.displayName;
727
+ function _t({ className: e, ...r }) {
728
+ return /* @__PURE__ */ s.jsx(
729
+ "div",
730
+ {
731
+ "data-slot": "dialog-header",
732
+ className: M("flex flex-col gap-2 text-center sm:text-left", e),
733
+ ...r
734
+ }
735
+ );
736
+ }
737
+ function yt({ className: e, ...r }) {
738
+ return /* @__PURE__ */ s.jsx(
739
+ "div",
740
+ {
741
+ "data-slot": "dialog-footer",
742
+ className: M("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
743
+ ...r
744
+ }
745
+ );
746
+ }
747
+ function xt({
748
+ className: e,
749
+ ...r
750
+ }) {
751
+ return /* @__PURE__ */ s.jsx(
752
+ N.Title,
753
+ {
754
+ "data-slot": "dialog-title",
755
+ className: M("text-lg leading-none font-semibold", e),
756
+ ...r
757
+ }
758
+ );
759
+ }
760
+ function Et({
761
+ className: e,
762
+ ...r
763
+ }) {
764
+ return /* @__PURE__ */ s.jsx(
765
+ N.Description,
766
+ {
767
+ "data-slot": "dialog-description",
768
+ className: M("text-muted-foreground text-sm", e),
769
+ ...r
770
+ }
771
+ );
772
+ }
773
+ var Qe = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "#", "$", "%", "*", "+", ",", "-", ".", ":", ";", "=", "?", "@", "[", "]", "^", "_", "{", "|", "}", "~"], K = (e) => {
774
+ let r = 0;
775
+ for (let o = 0; o < e.length; o++) {
776
+ let n = e[o], a = Qe.indexOf(n);
777
+ r = r * 83 + a;
778
+ }
779
+ return r;
780
+ }, oe = (e) => {
781
+ let r = e / 255;
782
+ return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
783
+ }, ne = (e) => {
784
+ let r = Math.max(0, Math.min(1, e));
785
+ return r <= 31308e-7 ? Math.trunc(r * 12.92 * 255 + 0.5) : Math.trunc((1.055 * Math.pow(r, 0.4166666666666667) - 0.055) * 255 + 0.5);
786
+ }, et = (e) => e < 0 ? -1 : 1, se = (e, r) => et(e) * Math.pow(Math.abs(e), r), me = class extends Error {
787
+ constructor(e) {
788
+ super(e), this.name = "ValidationError", this.message = e;
789
+ }
790
+ }, tt = (e) => {
791
+ if (!e || e.length < 6) throw new me("The blurhash string must be at least 6 characters");
792
+ let r = K(e[0]), o = Math.floor(r / 9) + 1, n = r % 9 + 1;
793
+ if (e.length !== 4 + 2 * n * o) throw new me(`blurhash length mismatch: length is ${e.length} but it should be ${4 + 2 * n * o}`);
794
+ }, rt = (e) => {
795
+ let r = e >> 16, o = e >> 8 & 255, n = e & 255;
796
+ return [oe(r), oe(o), oe(n)];
797
+ }, ot = (e, r) => {
798
+ let o = Math.floor(e / 361), n = Math.floor(e / 19) % 19, a = e % 19;
799
+ return [se((o - 9) / 9, 2) * r, se((n - 9) / 9, 2) * r, se((a - 9) / 9, 2) * r];
800
+ }, nt = (e, r, o, n) => {
801
+ tt(e), n = n | 1;
802
+ let a = K(e[0]), c = Math.floor(a / 9) + 1, d = a % 9 + 1, m = (K(e[1]) + 1) / 166, p = new Array(d * c);
803
+ for (let l = 0; l < p.length; l++) if (l === 0) {
804
+ let f = K(e.substring(2, 6));
805
+ p[l] = rt(f);
806
+ } else {
807
+ let f = K(e.substring(4 + l * 2, 6 + l * 2));
808
+ p[l] = ot(f, m * n);
809
+ }
810
+ let y = r * 4, b = new Uint8ClampedArray(y * o);
811
+ for (let l = 0; l < o; l++) for (let f = 0; f < r; f++) {
812
+ let T = 0, w = 0, v = 0;
813
+ for (let j = 0; j < c; j++) for (let R = 0; R < d; R++) {
814
+ let A = Math.cos(Math.PI * f * R / r) * Math.cos(Math.PI * l * j / o), O = p[R + j * d];
815
+ T += O[0] * A, w += O[1] * A, v += O[2] * A;
816
+ }
817
+ let k = ne(T), x = ne(w), D = ne(v);
818
+ b[4 * f + 0 + l * y] = k, b[4 * f + 1 + l * y] = x, b[4 * f + 2 + l * y] = D, b[4 * f + 3 + l * y] = 255;
819
+ }
820
+ return b;
821
+ }, st = nt;
822
+ const wt = ({
823
+ src: e,
824
+ hash: r,
825
+ alt: o = "",
826
+ className: n
827
+ }) => {
828
+ const [a, c] = I(!1), [d, m] = I(null), p = C(null);
829
+ $(() => {
830
+ if (!r) return;
831
+ const [l, f, T] = r, w = st(T, l, f), v = document.createElement("canvas"), k = v.getContext("2d");
832
+ if (k) {
833
+ v.width = l, v.height = f;
834
+ const x = new ImageData(
835
+ new Uint8ClampedArray(w),
836
+ l,
837
+ f
838
+ );
839
+ k.putImageData(x, 0, 0), m(v.toDataURL());
840
+ }
841
+ }, [r]), $(() => {
842
+ p.current && p.current.complete && c(!0);
843
+ }, [e]);
844
+ const y = () => {
845
+ }, b = () => {
846
+ };
847
+ return /* @__PURE__ */ s.jsxs(
848
+ "div",
849
+ {
850
+ style: { position: "relative", overflow: "hidden" },
851
+ className: n,
852
+ onMouseEnter: y,
853
+ onMouseLeave: b,
854
+ children: [
855
+ d && !a && /* @__PURE__ */ s.jsx(
856
+ "img",
857
+ {
858
+ src: d,
859
+ style: {
860
+ position: "absolute",
861
+ top: 0,
862
+ left: 0,
863
+ width: "100%",
864
+ height: "100%",
865
+ objectFit: "cover"
866
+ }
867
+ }
868
+ ),
869
+ /* @__PURE__ */ s.jsx(
870
+ "img",
871
+ {
872
+ ref: p,
873
+ src: e,
874
+ alt: o,
875
+ style: {
876
+ width: "100%",
877
+ height: "100%",
878
+ objectFit: "cover",
879
+ display: a ? "block" : "none",
880
+ position: "absolute",
881
+ top: 0,
882
+ left: 0
883
+ },
884
+ onLoad: () => {
885
+ c(!0);
886
+ },
887
+ onError: (l) => console.error("Image failed to load:", e, l)
888
+ }
889
+ )
890
+ ]
891
+ }
892
+ );
893
+ }, at = ({
894
+ href: e,
895
+ labelClassName: r,
896
+ labelActiveClassName: o,
897
+ labelElement: n,
898
+ isActive: a,
899
+ children: c
900
+ }) => {
901
+ const [d, m] = I(!1), p = C(null), y = C(null), b = () => {
902
+ p.current && clearTimeout(p.current), m(!0);
903
+ }, l = () => {
904
+ p.current = setTimeout(() => {
905
+ m(!1);
906
+ }, 120);
907
+ };
908
+ return $(() => () => {
909
+ p.current && clearTimeout(p.current);
910
+ }, []), /* @__PURE__ */ s.jsxs(
911
+ "div",
912
+ {
913
+ className: "flex",
914
+ ref: y,
915
+ onMouseEnter: b,
916
+ onMouseLeave: l,
917
+ children: [
918
+ /* @__PURE__ */ s.jsx("div", { className: "relative flex", children: /* @__PURE__ */ s.jsx(
919
+ we,
920
+ {
921
+ to: e,
922
+ onClick: () => {
923
+ m(!1);
924
+ },
925
+ className: ie(
926
+ "relative z-10 -mb-px flex items-center border-b-2 pt-px text-sm font-medium text-gray-700 cursor-pointer transition-colors duration-200 ease-out hover:text-gray-800",
927
+ r,
928
+ d || a ? o : "border-transparent"
929
+ ),
930
+ children: n
931
+ }
932
+ ) }),
933
+ d && /* @__PURE__ */ s.jsxs(
934
+ "div",
935
+ {
936
+ className: "absolute left-0 right-0 top-full z-20 text-gray-500 sm:text-sm",
937
+ style: { width: "100vw", left: "50%", transform: "translateX(-50%)" },
938
+ children: [
939
+ /* @__PURE__ */ s.jsx(
940
+ "div",
941
+ {
942
+ "aria-hidden": "true",
943
+ className: "absolute inset-0 top-1/2 bg-white shadow-sm"
944
+ }
945
+ ),
946
+ /* @__PURE__ */ s.jsx("div", { className: "relative bg-white", children: c({ setIsOpen: m }) })
947
+ ]
948
+ }
949
+ )
950
+ ]
951
+ }
952
+ );
953
+ }, Tt = {
954
+ MenuPopover: at
955
+ };
956
+ export {
957
+ pt as AddressAutocompleteInput,
958
+ mt as ApplePayButton,
959
+ gt as Checkbox,
960
+ ft as DEFAULT_ADDRESS_BOUNDING_BOX,
961
+ ht as Dialog,
962
+ vt as DialogClose,
963
+ Ze as DialogContent,
964
+ Et as DialogDescription,
965
+ yt as DialogFooter,
966
+ _t as DialogHeader,
967
+ Ke as DialogOverlay,
968
+ He as DialogPortal,
969
+ xt as DialogTitle,
970
+ bt as DialogTrigger,
971
+ Tt as Header,
972
+ wt as Image,
973
+ he as Input,
974
+ dt as isMobileDevice
975
+ };
@@ -0,0 +1,3 @@
1
+ import type { ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAItC,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
package/dist/vite.svg ADDED
@@ -0,0 +1,15 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 257">
2
+ <defs>
3
+ <linearGradient id="vite-icon-a" x1="6.0003%" x2="78.1699%" y1="12.9133%" y2="79.8288%">
4
+ <stop offset="0%" stop-color="#41D1FF"/>
5
+ <stop offset="100%" stop-color="#BD34FE"/>
6
+ </linearGradient>
7
+ <linearGradient id="vite-icon-b" x1="43.376%" x2="50.315%" y1="2.241%" y2="89.03%">
8
+ <stop offset="0%" stop-color="#FFEA83"/>
9
+ <stop offset="8.333%" stop-color="#FFDD35"/>
10
+ <stop offset="100%" stop-color="#FFA800"/>
11
+ </linearGradient>
12
+ </defs>
13
+ <path fill="url(#vite-icon-a)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.047L.875 37.958c-2.746-4.712 1.371-10.447 6.821-9.4l120.385 22.872a6.535 6.535 0 0 0 2.357-.004l117.89-22.829c5.438-1.053 9.574 4.657 6.856 9.377Z"/>
14
+ <path fill="url(#vite-icon-b)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.288l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.353 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.37-.72 4.645 1.36 4.147 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.946 2.437l1.313-2.028 72.516-144.72c1.215-2.421-.88-5.186-3.55-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.11Z"/>
15
+ </svg>
package/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./lib/index"
1
+ export * from "./dist/index"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/ui",
3
- "version": "0.49.0",
3
+ "version": "0.51.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "files": [
@@ -19,12 +19,28 @@
19
19
  },
20
20
  "scripts": {
21
21
  "dev": "wireit",
22
- "build": "vite build && tsc --project tsconfig.build.json",
22
+ "build": "wireit",
23
23
  "build-watch": "wireit",
24
24
  "test": "tsc --noEmit && playwright test",
25
25
  "release": "wireit"
26
26
  },
27
27
  "wireit": {
28
+ "build": {
29
+ "command": "vite build && tsc --project tsconfig.build.json",
30
+ "files": [
31
+ "package.json",
32
+ "lib/**/*",
33
+ "src/**/*",
34
+ "index.d.ts",
35
+ "playwright.config.ts",
36
+ "tsconfig.json",
37
+ "tsconfig.build.json",
38
+ "vite.config.ts"
39
+ ],
40
+ "output": [
41
+ "dist/"
42
+ ]
43
+ },
28
44
  "build-watch": {
29
45
  "command": "NO_COLOR=1 vite build --watch",
30
46
  "service": {
@@ -46,16 +62,8 @@
46
62
  },
47
63
  "release": {
48
64
  "command": "../../scripts/publish.js",
49
- "dependencies": [],
50
- "files": [
51
- "package.json",
52
- "lib/**/*",
53
- "src/**/*",
54
- "index.d.ts",
55
- "playwright.config.ts",
56
- "tsconfig.json",
57
- "tsconfig.build.json",
58
- "vite.config.ts"
65
+ "dependencies": [
66
+ "build"
59
67
  ],
60
68
  "output": [],
61
69
  "env": {