@eluan/core 0.4.1 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{action-popover-DUJjIthU.js → action-popover-BVJQBuky.js} +1 -1
- package/dist/{action-popover-CCRZyXVl.cjs → action-popover-D6K9aVFk.cjs} +1 -1
- package/dist/action-popover.cjs +1 -1
- package/dist/action-popover.js +1 -1
- package/dist/{breadcrumb-Czu2XwgU.js → breadcrumb-Cm1nb9Xj.js} +1 -1
- package/dist/{breadcrumb-D6_IoicI.cjs → breadcrumb-NWXeCH5q.cjs} +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{calendar-Dd-Ud2zz.cjs → calendar-7LX5YGGT.cjs} +1 -1
- package/dist/{calendar-BUPsr0be.js → calendar-BpBsomy5.js} +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/{command-C3oAkkaa.cjs → command-BCl0seLL.cjs} +1 -1
- package/dist/{command-D1iTMmyh.js → command-Chs5VlBL.js} +1 -1
- package/dist/command.cjs +1 -1
- package/dist/command.js +1 -1
- package/dist/components/context-menu.d.ts +14 -2
- package/dist/components/dialog.d.ts +10 -0
- package/dist/components/dropdown-menu.d.ts +14 -2
- package/dist/components/hover-card.d.ts +14 -2
- package/dist/components/menubar.d.ts +14 -2
- package/dist/components/multi-select.d.ts +1 -1
- package/dist/components/popover.d.ts +10 -0
- package/dist/components/select.d.ts +10 -0
- package/dist/components/sheet.d.ts +10 -0
- package/dist/components/tooltip.d.ts +14 -2
- package/dist/components/tree-view.d.ts +5 -0
- package/dist/components/typography.d.ts +2 -2
- package/dist/context-menu-1WehRCpR.cjs +1 -0
- package/dist/{context-menu-BFvleIE-.js → context-menu-Bd6m1RYU.js} +40 -35
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{date-picker-K5GcZ_Li.cjs → date-picker-DGBsfZXx.cjs} +1 -1
- package/dist/{date-picker-CISIHHyU.js → date-picker-ni8td8Ru.js} +2 -2
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/{datetime-picker-CP_fhCA-.cjs → datetime-picker-C1d63MaA.cjs} +1 -1
- package/dist/{datetime-picker-zTrUj815.js → datetime-picker-DsnHYRK-.js} +2 -2
- package/dist/datetime-picker.cjs +1 -1
- package/dist/datetime-picker.js +1 -1
- package/dist/dialog-B8eWKqzS.js +64 -0
- package/dist/dialog-DWYtFhZl.cjs +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-_h_fqgvS.cjs +1 -0
- package/dist/dropdown-menu-p0NkOoTP.js +115 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/{fieldset-D-hGYILF.js → fieldset-5V8wx-KE.js} +1 -1
- package/dist/fieldset-C3aAINhi.cjs +1 -0
- package/dist/fieldset.cjs +1 -1
- package/dist/fieldset.js +1 -1
- package/dist/{header-BqNWcy93.js → header-CDOWlOAR.js} +1 -1
- package/dist/{header-Dg6y6pKR.cjs → header-CiZQY_7S.cjs} +1 -1
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hover-card-C5KsTSZR.cjs +1 -0
- package/dist/hover-card-C_FCzE41.js +21 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +540 -500
- package/dist/input-otp-DcZ7wyjs.cjs +1 -0
- package/dist/input-otp-DmEGB1nu.js +95 -0
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +1 -1
- package/dist/menubar-CKWQEl7c.cjs +1 -0
- package/dist/menubar-F1_bhmku.js +112 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.js +1 -1
- package/dist/multi-select-B6NBbDCW.js +85 -0
- package/dist/multi-select-kcoUbSwE.cjs +1 -0
- package/dist/multi-select.cjs +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-drawer-C99JVOby.js → navigation-drawer-BbeDYPhu.js} +1 -1
- package/dist/{navigation-drawer-CVxS6X5J.cjs → navigation-drawer-DOOHfbY3.cjs} +1 -1
- package/dist/navigation-drawer.cjs +1 -1
- package/dist/navigation-drawer.js +1 -1
- package/dist/{pagination-CVZk8eCM.cjs → pagination-4IuE_APs.cjs} +1 -1
- package/dist/{pagination-DhGezNeG.js → pagination-DTWRjiOm.js} +1 -1
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.js +1 -1
- package/dist/{phone-input-DXkhw_4A.cjs → phone-input-BQjZj5jI.cjs} +1 -1
- package/dist/{phone-input-COi21JIl.js → phone-input-CSBpGHvI.js} +1 -1
- package/dist/phone-input.cjs +1 -1
- package/dist/phone-input.js +1 -1
- package/dist/popover-DPc4rRsR.js +70 -0
- package/dist/popover-Db6VOysz.cjs +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +1 -1
- package/dist/portal-container-BOjF64TG.js +31 -0
- package/dist/portal-container-C0jBwG4U.cjs +1 -0
- package/dist/providers/eluan-provider.d.ts +11 -1
- package/dist/providers/portal-container.d.ts +29 -0
- package/dist/{rich-text-CuJJFeUV.js → rich-text-BZSyuYSo.js} +53 -53
- package/dist/rich-text-DerWxzdn.cjs +73 -0
- package/dist/rich-text.cjs +1 -1
- package/dist/rich-text.js +1 -1
- package/dist/{search-input-BRf6r110.cjs → search-input-Dmmo-BEL.cjs} +1 -1
- package/dist/{search-input-DrO3-p4h.js → search-input-bFNW6oiE.js} +35 -28
- package/dist/search-input.cjs +1 -1
- package/dist/search-input.js +1 -1
- package/dist/select-1Eb3NSrR.cjs +1 -0
- package/dist/{select-3GU6G3YF.js → select-DDSYjKtj.js} +65 -60
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/sheet-7NP1LuHy.cjs +1 -0
- package/dist/sheet-D5HWF66e.js +140 -0
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/styles.css +230 -46
- package/dist/tabs-C9NKBmH0.js +22 -0
- package/dist/tabs-DztJ2iVc.cjs +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tooltip-DZqn4wKl.js +23 -0
- package/dist/tooltip-faf1dIXp.cjs +1 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/tree-view-CNvEc1TT.cjs +1 -0
- package/dist/{tree-view-BE4eOyRw.js → tree-view-CyeJR7cW.js} +32 -31
- package/dist/tree-view.cjs +1 -1
- package/dist/tree-view.js +1 -1
- package/package.json +2 -2
- package/dist/context-menu-BZobMAds.cjs +0 -1
- package/dist/dialog-B8uNe51F.cjs +0 -1
- package/dist/dialog-BVe6-J_z.js +0 -59
- package/dist/dropdown-menu-BtU3Yhar.cjs +0 -1
- package/dist/dropdown-menu-CA2MpoMo.js +0 -110
- package/dist/fieldset-DAv2Ggd8.cjs +0 -1
- package/dist/hover-card-BN7Ew2Y1.js +0 -16
- package/dist/hover-card-Dft-08Ha.cjs +0 -1
- package/dist/input-otp-BWPRKJ4m.js +0 -95
- package/dist/input-otp-BYEy4XaO.cjs +0 -1
- package/dist/menubar-B82Hp9r0.cjs +0 -1
- package/dist/menubar-DMZxna8-.js +0 -107
- package/dist/multi-select-BM4Zxa3I.js +0 -76
- package/dist/multi-select-FXNBRmwx.cjs +0 -1
- package/dist/popover-B_Kfx06V.js +0 -65
- package/dist/popover-DJ5e6lwh.cjs +0 -1
- package/dist/rich-text-uAtn5CZk.cjs +0 -73
- package/dist/select-CGLm4HTg.cjs +0 -1
- package/dist/sheet-BX5CahuG.cjs +0 -1
- package/dist/sheet-C8A5eehq.js +0 -135
- package/dist/tabs-Bpm29QTI.cjs +0 -1
- package/dist/tabs-DNkc9RO6.js +0 -22
- package/dist/tooltip-BZYIVbFE.cjs +0 -1
- package/dist/tooltip-DTOC9Xwd.js +0 -18
- package/dist/tree-view-B6pPS7dg.cjs +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import * as e from "react";
|
|
4
|
+
const r = e.createContext(
|
|
5
|
+
void 0
|
|
6
|
+
);
|
|
7
|
+
function c(t) {
|
|
8
|
+
return typeof t == "object" && t !== null && "current" in t;
|
|
9
|
+
}
|
|
10
|
+
function u(t) {
|
|
11
|
+
if (t)
|
|
12
|
+
return (c(t) ? t.current : t) ?? void 0;
|
|
13
|
+
}
|
|
14
|
+
function a({
|
|
15
|
+
container: t,
|
|
16
|
+
children: n
|
|
17
|
+
}) {
|
|
18
|
+
const [, o] = e.useState(!1);
|
|
19
|
+
e.useEffect(() => {
|
|
20
|
+
o(!0);
|
|
21
|
+
}, []);
|
|
22
|
+
const i = u(t);
|
|
23
|
+
return /* @__PURE__ */ s(r.Provider, { value: i, children: n });
|
|
24
|
+
}
|
|
25
|
+
function C() {
|
|
26
|
+
return e.useContext(r);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
a as P,
|
|
30
|
+
C as u
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const i=require("react/jsx-runtime"),u=require("react");function s(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=s(u),c=o.createContext(void 0);function a(e){return typeof e=="object"&&e!==null&&"current"in e}function f(e){if(e)return(a(e)?e.current:e)??void 0}function l({container:e,children:n}){const[,t]=o.useState(!1);o.useEffect(()=>{t(!0)},[]);const r=f(e);return i.jsx(c.Provider,{value:r,children:n})}function d(){return o.useContext(c)}exports.PortalContainerProvider=l;exports.usePortalContainer=d;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type CurveScale, type Mode, type SpacingScale, type Theme, type TypesetViewport } from "@eluan/tokens";
|
|
3
3
|
import type { CustomTheme } from "./create-theme";
|
|
4
|
+
import { type PortalContainerValue } from "./portal-container";
|
|
4
5
|
/** Either a built-in theme name or a custom theme name (when registered). */
|
|
5
6
|
export type ThemeName = Theme | string;
|
|
6
7
|
/**
|
|
@@ -60,9 +61,18 @@ export interface EluanProviderProps {
|
|
|
60
61
|
* Pass `"body"` to target `<body>`, or any element ref.
|
|
61
62
|
*/
|
|
62
63
|
target?: "html" | "body" | HTMLElement | null;
|
|
64
|
+
/**
|
|
65
|
+
* Element that Eluan overlays (DropdownMenu, Popover, Select, ContextMenu,
|
|
66
|
+
* Tooltip, HoverCard, Dialog, Sheet, Menubar) portal into. Set this to the
|
|
67
|
+
* same element as
|
|
68
|
+
* `target` when scoping a theme to a subtree, so overlays inherit the scope
|
|
69
|
+
* instead of escaping to `document.body`. See `PortalContainerProvider` for
|
|
70
|
+
* the containing-block caveat.
|
|
71
|
+
*/
|
|
72
|
+
portalContainer?: PortalContainerValue;
|
|
63
73
|
children: React.ReactNode;
|
|
64
74
|
}
|
|
65
|
-
export declare function EluanProvider({ defaultTheme, defaultMode, defaultSpacing, defaultCurves, defaultTypeset, customThemes, persist, followSystemMode, target, children, }: EluanProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export declare function EluanProvider({ defaultTheme, defaultMode, defaultSpacing, defaultCurves, defaultTypeset, customThemes, persist, followSystemMode, target, portalContainer, children, }: EluanProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
66
76
|
/**
|
|
67
77
|
* Read and update the active Eluan theme axes from anywhere in the tree.
|
|
68
78
|
* Must be used inside a `<EluanProvider>`.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Accepted container shapes: a resolved element, `null`/`undefined` (fall back
|
|
4
|
+
* to `document.body`), or a ref object holding the element.
|
|
5
|
+
*/
|
|
6
|
+
export type PortalContainerValue = HTMLElement | null | undefined | React.RefObject<HTMLElement | null>;
|
|
7
|
+
export interface PortalContainerProviderProps {
|
|
8
|
+
/**
|
|
9
|
+
* Element every descendant overlay portals into. Pass `null`/`undefined` to
|
|
10
|
+
* keep Radix's default (`document.body`). A ref object is resolved after
|
|
11
|
+
* mount, so `<div ref={ref}>` wrappers work without extra state.
|
|
12
|
+
*/
|
|
13
|
+
container?: PortalContainerValue;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Scopes the portal target for every Eluan overlay below it (DropdownMenu,
|
|
18
|
+
* Popover, Select, ContextMenu, Dialog, Sheet, Menubar, Tooltip, HoverCard).
|
|
19
|
+
*
|
|
20
|
+
* See the containing-block caveat above: a `transform`, `filter`, `contain` or
|
|
21
|
+
* `perspective` on the container or one of its ancestors re-anchors the
|
|
22
|
+
* `position: fixed` popper to that element.
|
|
23
|
+
*/
|
|
24
|
+
export declare function PortalContainerProvider({ container, children, }: PortalContainerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the portal target from the nearest `PortalContainerProvider`, or
|
|
27
|
+
* `undefined` when there is none (Radix then portals to `document.body`).
|
|
28
|
+
*/
|
|
29
|
+
export declare function usePortalContainer(): HTMLElement | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import * as l from "react";
|
|
4
|
-
import { useEditor as u, EditorContent as
|
|
5
|
-
import
|
|
4
|
+
import { useEditor as u, EditorContent as v, useEditorState as p } from "@tiptap/react";
|
|
5
|
+
import f from "@tiptap/starter-kit";
|
|
6
6
|
import x from "@tiptap/extension-placeholder";
|
|
7
7
|
import { Bold as m, Italic as b, Strikethrough as k, Code as P, Heading1 as C, Heading2 as H, Heading3 as N, List as S, ListOrdered as B, Quote as M, Minus as y, Undo as L, Redo as z } from "lucide-react";
|
|
8
8
|
import { T as R } from "./toggle-Dv1VZ5Le.js";
|
|
@@ -12,78 +12,78 @@ const s = ({
|
|
|
12
12
|
pressed: i,
|
|
13
13
|
onPressedChange: a,
|
|
14
14
|
disabled: t,
|
|
15
|
-
children:
|
|
15
|
+
children: n,
|
|
16
16
|
tooltip: c
|
|
17
|
-
}) => /* @__PURE__ */ e(R, { pressed: i, onPressedChange: a, disabled: t, "aria-label": c, size: "iconSm", children:
|
|
17
|
+
}) => /* @__PURE__ */ e(R, { pressed: i, onPressedChange: a, disabled: t, "aria-label": c, size: "iconSm", children: n }), E = ({
|
|
18
18
|
editor: i,
|
|
19
19
|
disabled: a = !1
|
|
20
20
|
}) => {
|
|
21
21
|
const t = p({
|
|
22
22
|
editor: i,
|
|
23
23
|
selector: (c) => {
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
isEditable:
|
|
27
|
-
isBold:
|
|
28
|
-
canBold:
|
|
29
|
-
isItalic:
|
|
30
|
-
canItalic:
|
|
31
|
-
isStrike:
|
|
32
|
-
canStrike:
|
|
33
|
-
isCode:
|
|
34
|
-
canCode:
|
|
35
|
-
isH1:
|
|
24
|
+
const r = c.editor;
|
|
25
|
+
return r ? {
|
|
26
|
+
isEditable: r.isEditable,
|
|
27
|
+
isBold: r.isActive("bold"),
|
|
28
|
+
canBold: r.can().chain().focus().toggleBold().run(),
|
|
29
|
+
isItalic: r.isActive("italic"),
|
|
30
|
+
canItalic: r.can().chain().focus().toggleItalic().run(),
|
|
31
|
+
isStrike: r.isActive("strike"),
|
|
32
|
+
canStrike: r.can().chain().focus().toggleStrike().run(),
|
|
33
|
+
isCode: r.isActive("code"),
|
|
34
|
+
canCode: r.can().chain().focus().toggleCode().run(),
|
|
35
|
+
isH1: r.isActive("heading", {
|
|
36
36
|
level: 1
|
|
37
37
|
}),
|
|
38
|
-
isH2:
|
|
38
|
+
isH2: r.isActive("heading", {
|
|
39
39
|
level: 2
|
|
40
40
|
}),
|
|
41
|
-
isH3:
|
|
41
|
+
isH3: r.isActive("heading", {
|
|
42
42
|
level: 3
|
|
43
43
|
}),
|
|
44
|
-
isBulletList:
|
|
45
|
-
isOrderedList:
|
|
46
|
-
isBlockquote:
|
|
47
|
-
canUndo:
|
|
48
|
-
canRedo:
|
|
44
|
+
isBulletList: r.isActive("bulletList"),
|
|
45
|
+
isOrderedList: r.isActive("orderedList"),
|
|
46
|
+
isBlockquote: r.isActive("blockquote"),
|
|
47
|
+
canUndo: r.can().chain().focus().undo().run(),
|
|
48
|
+
canRedo: r.can().chain().focus().redo().run()
|
|
49
49
|
} : null;
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
if (!i || !t) return null;
|
|
53
|
-
const
|
|
54
|
-
return /* @__PURE__ */ g("div", { className: "x6s0dn4 x1cqd74s x2f4hm8 x1q0q8m5 xso031l x78zum5 x1a02dak x10ci2pi
|
|
55
|
-
/* @__PURE__ */ e(s, { pressed: t.isBold, onPressedChange: () => i.chain().focus().toggleBold().run(), disabled:
|
|
56
|
-
/* @__PURE__ */ e(s, { pressed: t.isItalic, onPressedChange: () => i.chain().focus().toggleItalic().run(), disabled:
|
|
57
|
-
/* @__PURE__ */ e(s, { pressed: t.isStrike, onPressedChange: () => i.chain().focus().toggleStrike().run(), disabled:
|
|
58
|
-
/* @__PURE__ */ e(s, { pressed: t.isCode, onPressedChange: () => i.chain().focus().toggleCode().run(), disabled:
|
|
53
|
+
const n = a || !t.isEditable;
|
|
54
|
+
return /* @__PURE__ */ g("div", { className: "x6s0dn4 x1cqd74s x2f4hm8 x1q0q8m5 xso031l x78zum5 x1a02dak x10ci2pi x1mae58o", children: [
|
|
55
|
+
/* @__PURE__ */ e(s, { pressed: t.isBold, onPressedChange: () => i.chain().focus().toggleBold().run(), disabled: n || !t.canBold, tooltip: "Bold", children: /* @__PURE__ */ e(m, { className: "xkive58 x1vfp87d" }) }),
|
|
56
|
+
/* @__PURE__ */ e(s, { pressed: t.isItalic, onPressedChange: () => i.chain().focus().toggleItalic().run(), disabled: n || !t.canItalic, tooltip: "Italic", children: /* @__PURE__ */ e(b, { className: "xkive58 x1vfp87d" }) }),
|
|
57
|
+
/* @__PURE__ */ e(s, { pressed: t.isStrike, onPressedChange: () => i.chain().focus().toggleStrike().run(), disabled: n || !t.canStrike, tooltip: "Strikethrough", children: /* @__PURE__ */ e(k, { className: "xkive58 x1vfp87d" }) }),
|
|
58
|
+
/* @__PURE__ */ e(s, { pressed: t.isCode, onPressedChange: () => i.chain().focus().toggleCode().run(), disabled: n || !t.canCode, tooltip: "Code", children: /* @__PURE__ */ e(P, { className: "xkive58 x1vfp87d" }) }),
|
|
59
59
|
/* @__PURE__ */ e(d, { orientation: "vertical", variant: "toolbar" }),
|
|
60
60
|
/* @__PURE__ */ e(s, { pressed: t.isH1, onPressedChange: () => i.chain().focus().toggleHeading({
|
|
61
61
|
level: 1
|
|
62
|
-
}).run(), disabled:
|
|
62
|
+
}).run(), disabled: n, tooltip: "Heading 1", children: /* @__PURE__ */ e(C, { className: "xkive58 x1vfp87d" }) }),
|
|
63
63
|
/* @__PURE__ */ e(s, { pressed: t.isH2, onPressedChange: () => i.chain().focus().toggleHeading({
|
|
64
64
|
level: 2
|
|
65
|
-
}).run(), disabled:
|
|
65
|
+
}).run(), disabled: n, tooltip: "Heading 2", children: /* @__PURE__ */ e(H, { className: "xkive58 x1vfp87d" }) }),
|
|
66
66
|
/* @__PURE__ */ e(s, { pressed: t.isH3, onPressedChange: () => i.chain().focus().toggleHeading({
|
|
67
67
|
level: 3
|
|
68
|
-
}).run(), disabled:
|
|
68
|
+
}).run(), disabled: n, tooltip: "Heading 3", children: /* @__PURE__ */ e(N, { className: "xkive58 x1vfp87d" }) }),
|
|
69
69
|
/* @__PURE__ */ e(d, { orientation: "vertical", variant: "toolbar" }),
|
|
70
|
-
/* @__PURE__ */ e(s, { pressed: t.isBulletList, onPressedChange: () => i.chain().focus().toggleBulletList().run(), disabled:
|
|
71
|
-
/* @__PURE__ */ e(s, { pressed: t.isOrderedList, onPressedChange: () => i.chain().focus().toggleOrderedList().run(), disabled:
|
|
72
|
-
/* @__PURE__ */ e(s, { pressed: t.isBlockquote, onPressedChange: () => i.chain().focus().toggleBlockquote().run(), disabled:
|
|
73
|
-
/* @__PURE__ */ e(s, { pressed: !1, onPressedChange: () => i.chain().focus().setHorizontalRule().run(), disabled:
|
|
70
|
+
/* @__PURE__ */ e(s, { pressed: t.isBulletList, onPressedChange: () => i.chain().focus().toggleBulletList().run(), disabled: n, tooltip: "Bullet List", children: /* @__PURE__ */ e(S, { className: "xkive58 x1vfp87d" }) }),
|
|
71
|
+
/* @__PURE__ */ e(s, { pressed: t.isOrderedList, onPressedChange: () => i.chain().focus().toggleOrderedList().run(), disabled: n, tooltip: "Ordered List", children: /* @__PURE__ */ e(B, { className: "xkive58 x1vfp87d" }) }),
|
|
72
|
+
/* @__PURE__ */ e(s, { pressed: t.isBlockquote, onPressedChange: () => i.chain().focus().toggleBlockquote().run(), disabled: n, tooltip: "Quote", children: /* @__PURE__ */ e(M, { className: "xkive58 x1vfp87d" }) }),
|
|
73
|
+
/* @__PURE__ */ e(s, { pressed: !1, onPressedChange: () => i.chain().focus().setHorizontalRule().run(), disabled: n, tooltip: "Horizontal Rule", children: /* @__PURE__ */ e(y, { className: "xkive58 x1vfp87d" }) }),
|
|
74
74
|
/* @__PURE__ */ e(d, { orientation: "vertical", variant: "toolbar" }),
|
|
75
|
-
/* @__PURE__ */ e(s, { pressed: !1, onPressedChange: () => i.chain().focus().undo().run(), disabled:
|
|
76
|
-
/* @__PURE__ */ e(s, { pressed: !1, onPressedChange: () => i.chain().focus().redo().run(), disabled:
|
|
75
|
+
/* @__PURE__ */ e(s, { pressed: !1, onPressedChange: () => i.chain().focus().undo().run(), disabled: n || !t.canUndo, tooltip: "Undo", children: /* @__PURE__ */ e(L, { className: "xkive58 x1vfp87d" }) }),
|
|
76
|
+
/* @__PURE__ */ e(s, { pressed: !1, onPressedChange: () => i.chain().focus().redo().run(), disabled: n || !t.canRedo, tooltip: "Redo", children: /* @__PURE__ */ e(z, { className: "xkive58 x1vfp87d" }) })
|
|
77
77
|
] });
|
|
78
78
|
}, q = l.forwardRef(({
|
|
79
79
|
value: i,
|
|
80
80
|
onValueChange: a,
|
|
81
81
|
placeholder: t = "Start typing...",
|
|
82
|
-
disabled:
|
|
82
|
+
disabled: n = !1,
|
|
83
83
|
minHeight: c = "150px"
|
|
84
|
-
},
|
|
84
|
+
}, r) => {
|
|
85
85
|
const o = u({
|
|
86
|
-
extensions: [
|
|
86
|
+
extensions: [f.configure({
|
|
87
87
|
heading: {
|
|
88
88
|
levels: [1, 2, 3]
|
|
89
89
|
}
|
|
@@ -91,7 +91,7 @@ const s = ({
|
|
|
91
91
|
placeholder: t
|
|
92
92
|
})],
|
|
93
93
|
content: i,
|
|
94
|
-
editable: !
|
|
94
|
+
editable: !n,
|
|
95
95
|
onUpdate: ({
|
|
96
96
|
editor: h
|
|
97
97
|
}) => {
|
|
@@ -101,19 +101,19 @@ const s = ({
|
|
|
101
101
|
return l.useEffect(() => {
|
|
102
102
|
o && i !== o.getHTML() && o.commands.setContent(i ?? "");
|
|
103
103
|
}, [i, o]), l.useEffect(() => {
|
|
104
|
-
o && o.setEditable(!
|
|
105
|
-
}, [
|
|
104
|
+
o && o.setEditable(!n);
|
|
105
|
+
}, [n, o]), l.useInsertionEffect(() => {
|
|
106
106
|
A("eluan-rich-text-styles", I);
|
|
107
|
-
}, []), /* @__PURE__ */ g("div", { ref:
|
|
107
|
+
}, []), /* @__PURE__ */ g("div", { ref: r, ...{
|
|
108
108
|
0: {
|
|
109
109
|
className: "x1gu80qv x1suburk x1brvnfc x1y0btm7 xmkeg23 xb3r6kr"
|
|
110
110
|
},
|
|
111
111
|
1: {
|
|
112
112
|
className: "x1suburk x1brvnfc x1y0btm7 xmkeg23 xb3r6kr x1ye9h41 x1vkukiw"
|
|
113
113
|
}
|
|
114
|
-
}[!!
|
|
115
|
-
/* @__PURE__ */ e(E, { editor: o, disabled:
|
|
116
|
-
/* @__PURE__ */ e(
|
|
114
|
+
}[!!n << 0], children: [
|
|
115
|
+
/* @__PURE__ */ e(E, { editor: o, disabled: n }),
|
|
116
|
+
/* @__PURE__ */ e(v, { editor: o, className: "eluan-rich-text-content", style: {
|
|
117
117
|
"--min-height": c
|
|
118
118
|
} })
|
|
119
119
|
] });
|
|
@@ -134,19 +134,19 @@ const I = `
|
|
|
134
134
|
.eluan-rich-text-content .ProseMirror h1 {
|
|
135
135
|
font-size: var(--font-size-3xl);
|
|
136
136
|
font-weight: 700;
|
|
137
|
-
line-height:
|
|
137
|
+
line-height: var(--line-height-step-4);
|
|
138
138
|
margin-block: var(--spacing-lg) var(--spacing-md);
|
|
139
139
|
}
|
|
140
140
|
.eluan-rich-text-content .ProseMirror h2 {
|
|
141
141
|
font-size: var(--font-size-2xl);
|
|
142
142
|
font-weight: 600;
|
|
143
|
-
line-height:
|
|
143
|
+
line-height: var(--line-height-step-3);
|
|
144
144
|
margin-block: var(--spacing-md) var(--spacing-sm);
|
|
145
145
|
}
|
|
146
146
|
.eluan-rich-text-content .ProseMirror h3 {
|
|
147
147
|
font-size: var(--font-size-xl);
|
|
148
148
|
font-weight: 600;
|
|
149
|
-
line-height:
|
|
149
|
+
line-height: var(--line-height-step-2);
|
|
150
150
|
margin-block: var(--spacing-md) var(--spacing-sm);
|
|
151
151
|
}
|
|
152
152
|
.eluan-rich-text-content .ProseMirror ul {
|
|
@@ -166,7 +166,7 @@ const I = `
|
|
|
166
166
|
margin-block: 0;
|
|
167
167
|
}
|
|
168
168
|
.eluan-rich-text-content .ProseMirror blockquote {
|
|
169
|
-
border-left:
|
|
169
|
+
border-left: var(--spacing-xs) solid var(--container-border-alt);
|
|
170
170
|
color: var(--interactive-fg-alt);
|
|
171
171
|
font-style: italic;
|
|
172
172
|
margin-block: var(--spacing-sm);
|
|
@@ -177,7 +177,7 @@ const I = `
|
|
|
177
177
|
border-radius: var(--curves-xs);
|
|
178
178
|
font-family: var(--font-mono);
|
|
179
179
|
font-size: var(--font-size-xs);
|
|
180
|
-
padding:
|
|
180
|
+
padding: var(--spacing-xxs) var(--spacing-xs);
|
|
181
181
|
}
|
|
182
182
|
.eluan-rich-text-content .ProseMirror hr {
|
|
183
183
|
border: 0;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client";"use strict";const e=require("react/jsx-runtime"),p=require("react"),u=require("@tiptap/react"),f=require("@tiptap/starter-kit"),m=require("@tiptap/extension-placeholder"),r=require("lucide-react"),b=require("./toggle-Bvh1v32T.cjs"),g=require("./separator-CBuhe8MC.cjs"),k=require("./inject-stylesheet-j6SkUo-d.cjs");function j(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(o,i,s.get?s:{enumerable:!0,get:()=>t[i]})}}return o.default=t,Object.freeze(o)}const d=j(p),a=({pressed:t,onPressedChange:o,disabled:i,children:s,tooltip:l})=>e.jsx(b.Toggle,{pressed:t,onPressedChange:o,disabled:i,"aria-label":l,size:"iconSm",children:s}),x=({editor:t,disabled:o=!1})=>{const i=u.useEditorState({editor:t,selector:l=>{const n=l.editor;return n?{isEditable:n.isEditable,isBold:n.isActive("bold"),canBold:n.can().chain().focus().toggleBold().run(),isItalic:n.isActive("italic"),canItalic:n.can().chain().focus().toggleItalic().run(),isStrike:n.isActive("strike"),canStrike:n.can().chain().focus().toggleStrike().run(),isCode:n.isActive("code"),canCode:n.can().chain().focus().toggleCode().run(),isH1:n.isActive("heading",{level:1}),isH2:n.isActive("heading",{level:2}),isH3:n.isActive("heading",{level:3}),isBulletList:n.isActive("bulletList"),isOrderedList:n.isActive("orderedList"),isBlockquote:n.isActive("blockquote"),canUndo:n.can().chain().focus().undo().run(),canRedo:n.can().chain().focus().redo().run()}:null}});if(!t||!i)return null;const s=o||!i.isEditable;return e.jsxs("div",{className:"x6s0dn4 x1cqd74s x2f4hm8 x1q0q8m5 xso031l x78zum5 x1a02dak x10ci2pi x1mae58o",children:[e.jsx(a,{pressed:i.isBold,onPressedChange:()=>t.chain().focus().toggleBold().run(),disabled:s||!i.canBold,tooltip:"Bold",children:e.jsx(r.Bold,{className:"xkive58 x1vfp87d"})}),e.jsx(a,{pressed:i.isItalic,onPressedChange:()=>t.chain().focus().toggleItalic().run(),disabled:s||!i.canItalic,tooltip:"Italic",children:e.jsx(r.Italic,{className:"xkive58 x1vfp87d"})}),e.jsx(a,{pressed:i.isStrike,onPressedChange:()=>t.chain().focus().toggleStrike().run(),disabled:s||!i.canStrike,tooltip:"Strikethrough",children:e.jsx(r.Strikethrough,{className:"xkive58 x1vfp87d"})}),e.jsx(a,{pressed:i.isCode,onPressedChange:()=>t.chain().focus().toggleCode().run(),disabled:s||!i.canCode,tooltip:"Code",children:e.jsx(r.Code,{className:"xkive58 x1vfp87d"})}),e.jsx(g.Separator,{orientation:"vertical",variant:"toolbar"}),e.jsx(a,{pressed:i.isH1,onPressedChange:()=>t.chain().focus().toggleHeading({level:1}).run(),disabled:s,tooltip:"Heading 1",children:e.jsx(r.Heading1,{className:"xkive58 x1vfp87d"})}),e.jsx(a,{pressed:i.isH2,onPressedChange:()=>t.chain().focus().toggleHeading({level:2}).run(),disabled:s,tooltip:"Heading 2",children:e.jsx(r.Heading2,{className:"xkive58 x1vfp87d"})}),e.jsx(a,{pressed:i.isH3,onPressedChange:()=>t.chain().focus().toggleHeading({level:3}).run(),disabled:s,tooltip:"Heading 3",children:e.jsx(r.Heading3,{className:"xkive58 x1vfp87d"})}),e.jsx(g.Separator,{orientation:"vertical",variant:"toolbar"}),e.jsx(a,{pressed:i.isBulletList,onPressedChange:()=>t.chain().focus().toggleBulletList().run(),disabled:s,tooltip:"Bullet List",children:e.jsx(r.List,{className:"xkive58 x1vfp87d"})}),e.jsx(a,{pressed:i.isOrderedList,onPressedChange:()=>t.chain().focus().toggleOrderedList().run(),disabled:s,tooltip:"Ordered List",children:e.jsx(r.ListOrdered,{className:"xkive58 x1vfp87d"})}),e.jsx(a,{pressed:i.isBlockquote,onPressedChange:()=>t.chain().focus().toggleBlockquote().run(),disabled:s,tooltip:"Quote",children:e.jsx(r.Quote,{className:"xkive58 x1vfp87d"})}),e.jsx(a,{pressed:!1,onPressedChange:()=>t.chain().focus().setHorizontalRule().run(),disabled:s,tooltip:"Horizontal Rule",children:e.jsx(r.Minus,{className:"xkive58 x1vfp87d"})}),e.jsx(g.Separator,{orientation:"vertical",variant:"toolbar"}),e.jsx(a,{pressed:!1,onPressedChange:()=>t.chain().focus().undo().run(),disabled:s||!i.canUndo,tooltip:"Undo",children:e.jsx(r.Undo,{className:"xkive58 x1vfp87d"})}),e.jsx(a,{pressed:!1,onPressedChange:()=>t.chain().focus().redo().run(),disabled:s||!i.canRedo,tooltip:"Redo",children:e.jsx(r.Redo,{className:"xkive58 x1vfp87d"})})]})},h=d.forwardRef(({value:t,onValueChange:o,placeholder:i="Start typing...",disabled:s=!1,minHeight:l="150px"},n)=>{const c=u.useEditor({extensions:[f.configure({heading:{levels:[1,2,3]}}),m.configure({placeholder:i})],content:t,editable:!s,onUpdate:({editor:v})=>{o==null||o(v.getHTML())}});return d.useEffect(()=>{c&&t!==c.getHTML()&&c.commands.setContent(t??"")},[t,c]),d.useEffect(()=>{c&&c.setEditable(!s)},[s,c]),d.useInsertionEffect(()=>{k.ensureStyleSheet("eluan-rich-text-styles",P)},[]),e.jsxs("div",{ref:n,...{0:{className:"x1gu80qv x1suburk x1brvnfc x1y0btm7 xmkeg23 xb3r6kr"},1:{className:"x1suburk x1brvnfc x1y0btm7 xmkeg23 xb3r6kr x1ye9h41 x1vkukiw"}}[!!s<<0],children:[e.jsx(x,{editor:c,disabled:s}),e.jsx(u.EditorContent,{editor:c,className:"eluan-rich-text-content",style:{"--min-height":l}})]})});h.displayName="RichText";const P=`
|
|
2
|
+
.eluan-rich-text-content {
|
|
3
|
+
max-width: none;
|
|
4
|
+
padding: var(--spacing-sm);
|
|
5
|
+
}
|
|
6
|
+
.eluan-rich-text-content:focus-within {
|
|
7
|
+
outline: none;
|
|
8
|
+
}
|
|
9
|
+
.eluan-rich-text-content .ProseMirror {
|
|
10
|
+
min-height: var(--min-height);
|
|
11
|
+
outline: none;
|
|
12
|
+
}
|
|
13
|
+
.eluan-rich-text-content .ProseMirror h1 {
|
|
14
|
+
font-size: var(--font-size-3xl);
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
line-height: var(--line-height-step-4);
|
|
17
|
+
margin-block: var(--spacing-lg) var(--spacing-md);
|
|
18
|
+
}
|
|
19
|
+
.eluan-rich-text-content .ProseMirror h2 {
|
|
20
|
+
font-size: var(--font-size-2xl);
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
line-height: var(--line-height-step-3);
|
|
23
|
+
margin-block: var(--spacing-md) var(--spacing-sm);
|
|
24
|
+
}
|
|
25
|
+
.eluan-rich-text-content .ProseMirror h3 {
|
|
26
|
+
font-size: var(--font-size-xl);
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
line-height: var(--line-height-step-2);
|
|
29
|
+
margin-block: var(--spacing-md) var(--spacing-sm);
|
|
30
|
+
}
|
|
31
|
+
.eluan-rich-text-content .ProseMirror ul {
|
|
32
|
+
list-style: disc;
|
|
33
|
+
margin-block: var(--spacing-sm);
|
|
34
|
+
padding-inline-start: var(--spacing-lg);
|
|
35
|
+
}
|
|
36
|
+
.eluan-rich-text-content .ProseMirror ol {
|
|
37
|
+
list-style: decimal;
|
|
38
|
+
margin-block: var(--spacing-sm);
|
|
39
|
+
padding-inline-start: var(--spacing-lg);
|
|
40
|
+
}
|
|
41
|
+
.eluan-rich-text-content .ProseMirror li {
|
|
42
|
+
margin-block: var(--spacing-xxs);
|
|
43
|
+
}
|
|
44
|
+
.eluan-rich-text-content .ProseMirror li p {
|
|
45
|
+
margin-block: 0;
|
|
46
|
+
}
|
|
47
|
+
.eluan-rich-text-content .ProseMirror blockquote {
|
|
48
|
+
border-left: var(--spacing-xs) solid var(--container-border-alt);
|
|
49
|
+
color: var(--interactive-fg-alt);
|
|
50
|
+
font-style: italic;
|
|
51
|
+
margin-block: var(--spacing-sm);
|
|
52
|
+
padding-left: var(--spacing-md);
|
|
53
|
+
}
|
|
54
|
+
.eluan-rich-text-content .ProseMirror code {
|
|
55
|
+
background-color: var(--interactive-bg-alt);
|
|
56
|
+
border-radius: var(--curves-xs);
|
|
57
|
+
font-family: var(--font-mono);
|
|
58
|
+
font-size: var(--font-size-xs);
|
|
59
|
+
padding: var(--spacing-xxs) var(--spacing-xs);
|
|
60
|
+
}
|
|
61
|
+
.eluan-rich-text-content .ProseMirror hr {
|
|
62
|
+
border: 0;
|
|
63
|
+
border-top: 1px solid var(--container-border-alt);
|
|
64
|
+
margin-block: var(--spacing-md);
|
|
65
|
+
}
|
|
66
|
+
.eluan-rich-text-content .ProseMirror p.is-editor-empty:first-child::before {
|
|
67
|
+
color: var(--interactive-fg-alt);
|
|
68
|
+
content: attr(data-placeholder);
|
|
69
|
+
float: left;
|
|
70
|
+
height: 0;
|
|
71
|
+
pointer-events: none;
|
|
72
|
+
}
|
|
73
|
+
`;exports.RichText=h;exports.RichTextToolbar=x;
|
package/dist/rich-text.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./rich-text-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./rich-text-DerWxzdn.cjs");exports.RichText=e.RichText;exports.RichTextToolbar=e.RichTextToolbar;
|
package/dist/rich-text.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const x=require("react/jsx-runtime"),ee=require("react"),
|
|
1
|
+
"use client";"use strict";const x=require("react/jsx-runtime"),ee=require("react"),z=require("lucide-react"),S=require("./input-BrGJn-D9.cjs"),M=require("./compose-refs-BjfKuXXE.cjs");function se(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const c=se(ee),P=c.forwardRef(({value:r,onValueChange:t,onSearch:n,onClear:a,loading:f=!1,showClearButton:j=!0,searchOnEnter:y=!0,debounceMs:m,disabled:b,...p},h)=>{const[q,g]=c.useState(r||""),o=c.useRef(null);c.useEffect(()=>{r!==void 0&&g(r)},[r]);const E=c.useCallback(()=>{g(""),t==null||t(""),a==null||a(),o.current&&clearTimeout(o.current)},[t,a]),v=l=>{const u=l.target.value;g(u),t==null||t(u),m&&n&&(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(u)},m))},k=l=>{l.key==="Enter"&&y&&n&&(l.preventDefault(),o.current&&clearTimeout(o.current),n(q)),l.key==="Escape"&&q&&E()};c.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]);const N=f?x.jsx(z.Loader2,{"aria-hidden":"true",className:"x1q3qbx4 x1s1fvk8 xa4qsjk xg0664w xpedhrg x1esw782 x1uuraw0 xkive58 x1vfp87d"}):j&&q&&!f?x.jsx("button",{type:"button",onClick:E,tabIndex:-1,"aria-label":"Clear search",className:"x6s0dn4 xjbqb8w xc342km x1kcekj6 x1ypdohk x3nfvp2 xwfmp28 xl56j7k x12czurs x1717udv xx6bhzk x15406qy xwwtwea x3wwfir",children:x.jsx(z.Delete,{"aria-hidden":"true",className:"x1uuraw0 xkive58 x1vfp87d"})}):void 0;return x.jsx(S.Input,{type:"search",ref:h,value:q,onChange:v,onKeyDown:k,disabled:b||f,trailing:N,...p})});P.displayName="SearchInput";const U=c.forwardRef(({shortcutKey:r="K",showShortcut:t=!0,onValueChange:n,...a},f)=>{const j=c.useRef(null);c.useEffect(()=>{const b=p=>{var h;(p.metaKey||p.ctrlKey)&&p.key.toLowerCase()===r.toLowerCase()&&(p.preventDefault(),(h=j.current)==null||h.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]);const y=M.composeRefs(j,f),m=t?x.jsxs("kbd",{className:"x6s0dn4 xtpsrvy x1suburk x1kcekj6 x1y0btm7 xmkeg23 x1uuraw0 x3nfvp2 xpw0y0u xgopj41 xk50ysn x10ci2pi xybwzzh x16ic5xr x47corl x87ps6o",children:[x.jsx("span",{className:"x51wmvv",children:"⌘"}),r]}):void 0;return x.jsx(S.Input,{type:"search",ref:y,trailing:m,...a})});U.displayName="CommandSearch";const xe=(r,t)=>{var a;const n=t.toLowerCase();return r.label.toLowerCase().includes(n)||r.value.toLowerCase().includes(n)||(((a=r.description)==null?void 0:a.toLowerCase().includes(n))??!1)},F=c.forwardRef(({value:r,onValueChange:t,options:n,onSelect:a,loading:f=!1,emptyMessage:j="No results found",filterFn:y=xe,minChars:m=0,maxResults:b=10,showAllOnFocus:p=!0,groupBy:h,disabled:q,placeholder:g="Search...",...o},E)=>{const[v,k]=c.useState(!1),[w,N]=c.useState(r||""),[l,u]=c.useState(-1),R=c.useRef(null),D=c.useRef(null),I=c.useRef(null),L=c.useId(),O=e=>`${L}-option-${e}`;c.useEffect(()=>{r!==void 0&&N(r)},[r]),c.useEffect(()=>{const e=s=>{R.current&&!R.current.contains(s.target)&&(k(!1),u(-1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const d=c.useMemo(()=>w.length<m&&!p?[]:(w.length>=m?n.filter(s=>y(s,w)):n).slice(0,b),[n,w,y,m,b,p]),T=c.useMemo(()=>{if(!h)return null;const e={};return d.forEach(s=>{const i=h(s);e[i]||(e[i]=[]),e[i].push(s)}),e},[d,h]),A=e=>{if(I.current){const i=I.current.querySelectorAll("[data-option]")[e];i&&i.scrollIntoView({block:"nearest"})}},H=e=>{const s=e.target.value;N(s),t==null||t(s),k(!0),u(-1)},Q=()=>{(p||w.length>=m)&&k(!0)},K=e=>{var s;e.disabled||(N(e.label),t==null||t(e.label),a==null||a(e),k(!1),u(-1),(s=D.current)==null||s.focus())},G=e=>{if(!v&&(e.key==="ArrowDown"||e.key==="ArrowUp")){k(!0);return}switch(e.key){case"ArrowDown":e.preventDefault(),u(s=>{const i=s<d.length-1?s+1:0;return A(i),i});break;case"ArrowUp":e.preventDefault(),u(s=>{const i=s>0?s-1:d.length-1;return A(i),i});break;case"Enter":e.preventDefault(),l>=0&&d[l]&&K(d[l]);break;case"Escape":k(!1),u(-1);break;case"Tab":k(!1),u(-1);break}},J=()=>{var e;N(""),t==null||t(""),k(!1),(e=D.current)==null||e.focus()},W=M.composeRefs(D,E),_=(e,s)=>x.jsxs("button",{type:"button","data-option":!0,id:O(s),role:"option","aria-selected":l===s,"aria-disabled":e.disabled||void 0,onClick:()=>K(e),onMouseEnter:()=>!e.disabled&&u(s),disabled:e.disabled,...{0:{className:"x6s0dn4 xjbqb8w xc342km x1kcekj6 x1sjp1m2 x78zum5 x1eqnyfr xpfqfdi xrtip4p x16pzmsl xdpxx8g xh8yej3"},4:{className:"x6s0dn4 xc342km x1kcekj6 x1sjp1m2 x78zum5 x1eqnyfr xpfqfdi xrtip4p x16pzmsl xdpxx8g xh8yej3 x1128fye"},2:{className:"x6s0dn4 xc342km x1kcekj6 x78zum5 x1eqnyfr xpfqfdi xrtip4p x16pzmsl xdpxx8g xh8yej3 x1ye9h41 x1vkukiw x1h6gzvc"},6:{className:"x6s0dn4 xc342km x1kcekj6 x78zum5 x1eqnyfr xpfqfdi xrtip4p x16pzmsl xdpxx8g xh8yej3 x1ye9h41 x1vkukiw x1h6gzvc"},1:{className:"x6s0dn4 xjbqb8w xc342km x1kcekj6 x1sjp1m2 x78zum5 x1eqnyfr xpfqfdi xrtip4p x16pzmsl xdpxx8g xh8yej3 x1ypdohk x3wwfir"},5:{className:"x6s0dn4 xc342km x1kcekj6 x1sjp1m2 x78zum5 x1eqnyfr xpfqfdi xrtip4p x16pzmsl xdpxx8g xh8yej3 x1128fye x1ypdohk x3wwfir"},3:{className:"x6s0dn4 xc342km x1kcekj6 x78zum5 x1eqnyfr xpfqfdi xrtip4p x16pzmsl xdpxx8g xh8yej3 x1ye9h41 x1vkukiw x1ypdohk x3wwfir"},7:{className:"x6s0dn4 xc342km x1kcekj6 x78zum5 x1eqnyfr xpfqfdi xrtip4p x16pzmsl xdpxx8g xh8yej3 x1ye9h41 x1vkukiw x1ypdohk x3wwfir"}}[(l===s)<<2|!!e.disabled<<1|!e.disabled<<0],children:[e.icon&&x.jsx("span",{"aria-hidden":"true",className:"x6s0dn4 x78zum5 x2lah0s xkive58 x1vfp87d",children:c.isValidElement(e.icon)?c.cloneElement(e.icon,{width:"100%",height:"100%"}):e.icon}),x.jsxs("div",{className:"x98rzlu xeuugli",children:[x.jsx("div",{className:"xk50ysn xb3r6kr xlyipyv xuxw1ft",children:e.label}),e.description&&x.jsx("div",{className:"x1uuraw0 x51wmvv xb3r6kr xlyipyv xuxw1ft",children:e.description})]})]},e.value),X=v&&(d.length>0||f||w.length>=m),Y=f?x.jsx(z.Loader2,{"aria-hidden":"true",className:"x1q3qbx4 x1s1fvk8 xa4qsjk xg0664w xpedhrg x1esw782 x1sjp1m2 xkive58 x1vfp87d"}):w?x.jsx("button",{type:"button",onClick:J,tabIndex:-1,"aria-label":"Clear search",className:"x6s0dn4 xjbqb8w xc342km x1kcekj6 x1ypdohk x3nfvp2 xwfmp28 xl56j7k x12czurs x1717udv xx6bhzk x15406qy xwwtwea x3wwfir",children:x.jsx(z.Delete,{"aria-hidden":"true",className:"x1sjp1m2 xkive58 x1vfp87d"})}):void 0,Z=v&&l>=0?O(l):void 0,B=v?f?"Loading results":d.length===0?j:`${d.length} result${d.length===1?"":"s"} available`:"";return x.jsxs("div",{ref:R,className:"x1n2onr6",children:[x.jsx(S.Input,{type:"text",icon:x.jsx(z.Search,{"aria-hidden":"true",className:"xkive58 x1vfp87d"}),trailing:Y,role:"combobox","aria-expanded":v,"aria-autocomplete":"list","aria-controls":L,"aria-activedescendant":Z,autoComplete:"off",ref:W,value:w,onChange:H,onFocus:Q,onKeyDown:G,disabled:q,placeholder:g,...o}),x.jsx("span",{role:"status","aria-live":"polite",className:"xc342km xzpqnlu xjm9jq1 xkdpibf xb3r6kr x1717udv x10l6tqk xuxw1ft x1i1rx1s",children:B}),X&&x.jsx("div",{id:L,role:"listbox","aria-label":"Suggestions",ref:I,className:"x1dyo0bm x10cbhzu x1brvnfc x1y0btm7 xmkeg23 x1g5awrf x6ixs0r xuyqlj2 x1odjw0f x10l6tqk xh8yej3 xa9119d",children:f?x.jsx("div",{className:"x6s0dn4 x78zum5 xl56j7k xv0kgt4",children:x.jsx(z.Loader2,{"aria-hidden":"true",className:"x1q3qbx4 x1s1fvk8 xa4qsjk xg0664w xpedhrg x1esw782 x1sjp1m2 xybwzzh x1gtyvus"})}):d.length===0?x.jsx("div",{className:"x1sjp1m2 x1eqnyfr x11omchh x2b8uid",children:j}):T?x.jsx("div",{className:"x2k5h2x",children:Object.entries(T).map(([e,s],i,C)=>x.jsxs("div",{children:[x.jsx("div",{...{0:{className:"xwa5xuj x51wmvv xo1l8bm x136oad8 x16pzmsl"},1:{className:"xwa5xuj x51wmvv xo1l8bm x136oad8 x16pzmsl x6ixs0r"}}[(i>0)<<0],children:e}),s.map($=>{const V=d.indexOf($);return _($,V)}),i<C.length-1&&x.jsx("div",{className:"x1dyd9yc x1q0q8m5 xso031l x16jkv7s"})]},e))}):x.jsx("div",{className:"x2k5h2x",children:d.map((e,s)=>_(e,s))})})]})});F.displayName="AutocompleteSearch";exports.AutocompleteSearch=F;exports.CommandSearch=U;exports.SearchInput=P;
|
|
@@ -13,16 +13,16 @@ const ee = t.forwardRef(({
|
|
|
13
13
|
showClearButton: v = !0,
|
|
14
14
|
searchOnEnter: j = !0,
|
|
15
15
|
debounceMs: k,
|
|
16
|
-
disabled:
|
|
16
|
+
disabled: b,
|
|
17
17
|
...m
|
|
18
|
-
},
|
|
18
|
+
}, h) => {
|
|
19
19
|
const [q, N] = t.useState(c || ""), o = t.useRef(null);
|
|
20
20
|
t.useEffect(() => {
|
|
21
21
|
c !== void 0 && N(c);
|
|
22
22
|
}, [c]);
|
|
23
23
|
const E = t.useCallback(() => {
|
|
24
24
|
N(""), r == null || r(""), i == null || i(), o.current && clearTimeout(o.current);
|
|
25
|
-
}, [r, i]),
|
|
25
|
+
}, [r, i]), y = (l) => {
|
|
26
26
|
const u = l.target.value;
|
|
27
27
|
N(u), r == null || r(u), k && n && (o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
28
28
|
n(u);
|
|
@@ -32,7 +32,7 @@ const ee = t.forwardRef(({
|
|
|
32
32
|
};
|
|
33
33
|
return t.useEffect(() => () => {
|
|
34
34
|
o.current && clearTimeout(o.current);
|
|
35
|
-
}, []), /* @__PURE__ */ s(O, { type: "search", ref:
|
|
35
|
+
}, []), /* @__PURE__ */ s(O, { type: "search", ref: h, value: q, onChange: y, onKeyDown: p, disabled: b || f, trailing: f ? /* @__PURE__ */ s(S, { "aria-hidden": "true", className: "x1q3qbx4 x1s1fvk8 xa4qsjk xg0664w xpedhrg x1esw782 x1uuraw0 xkive58 x1vfp87d" }) : v && q && !f ? /* @__PURE__ */ s("button", { type: "button", onClick: E, tabIndex: -1, "aria-label": "Clear search", className: "x6s0dn4 xjbqb8w xc342km x1kcekj6 x1ypdohk x3nfvp2 xwfmp28 xl56j7k x12czurs x1717udv xx6bhzk x15406qy xwwtwea x3wwfir", children: /* @__PURE__ */ s(F, { "aria-hidden": "true", className: "x1uuraw0 xkive58 x1vfp87d" }) }) : void 0, ...m });
|
|
36
36
|
});
|
|
37
37
|
ee.displayName = "SearchInput";
|
|
38
38
|
const xe = t.forwardRef(({
|
|
@@ -43,11 +43,11 @@ const xe = t.forwardRef(({
|
|
|
43
43
|
}, f) => {
|
|
44
44
|
const v = t.useRef(null);
|
|
45
45
|
t.useEffect(() => {
|
|
46
|
-
const
|
|
47
|
-
var
|
|
48
|
-
(m.metaKey || m.ctrlKey) && m.key.toLowerCase() === c.toLowerCase() && (m.preventDefault(), (
|
|
46
|
+
const b = (m) => {
|
|
47
|
+
var h;
|
|
48
|
+
(m.metaKey || m.ctrlKey) && m.key.toLowerCase() === c.toLowerCase() && (m.preventDefault(), (h = v.current) == null || h.focus());
|
|
49
49
|
};
|
|
50
|
-
return document.addEventListener("keydown",
|
|
50
|
+
return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
|
|
51
51
|
}, [c]);
|
|
52
52
|
const j = H(v, f);
|
|
53
53
|
return /* @__PURE__ */ s(O, { type: "search", ref: j, trailing: r ? /* @__PURE__ */ g("kbd", { className: "x6s0dn4 xtpsrvy x1suburk x1kcekj6 x1y0btm7 xmkeg23 x1uuraw0 x3nfvp2 xpw0y0u xgopj41 xk50ysn x10ci2pi xybwzzh x16ic5xr x47corl x87ps6o", children: [
|
|
@@ -69,32 +69,32 @@ const se = (c, r) => {
|
|
|
69
69
|
emptyMessage: v = "No results found",
|
|
70
70
|
filterFn: j = se,
|
|
71
71
|
minChars: k = 0,
|
|
72
|
-
maxResults:
|
|
72
|
+
maxResults: b = 10,
|
|
73
73
|
showAllOnFocus: m = !0,
|
|
74
|
-
groupBy:
|
|
74
|
+
groupBy: h,
|
|
75
75
|
disabled: q,
|
|
76
76
|
placeholder: N = "Search...",
|
|
77
77
|
...o
|
|
78
78
|
}, E) => {
|
|
79
|
-
const [
|
|
79
|
+
const [y, p] = t.useState(!1), [w, z] = t.useState(c || ""), [l, u] = t.useState(-1), R = t.useRef(null), D = t.useRef(null), I = t.useRef(null), L = t.useId(), T = (e) => `${L}-option-${e}`;
|
|
80
80
|
t.useEffect(() => {
|
|
81
81
|
c !== void 0 && z(c);
|
|
82
82
|
}, [c]), t.useEffect(() => {
|
|
83
83
|
const e = (x) => {
|
|
84
|
-
|
|
84
|
+
R.current && !R.current.contains(x.target) && (p(!1), u(-1));
|
|
85
85
|
};
|
|
86
86
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
87
87
|
}, []);
|
|
88
|
-
const d = t.useMemo(() =>
|
|
89
|
-
if (!
|
|
88
|
+
const d = t.useMemo(() => w.length < k && !m ? [] : (w.length >= k ? n.filter((x) => j(x, w)) : n).slice(0, b), [n, w, j, k, b, m]), A = t.useMemo(() => {
|
|
89
|
+
if (!h) return null;
|
|
90
90
|
const e = {};
|
|
91
91
|
return d.forEach((x) => {
|
|
92
|
-
const a =
|
|
92
|
+
const a = h(x);
|
|
93
93
|
e[a] || (e[a] = []), e[a].push(x);
|
|
94
94
|
}), e;
|
|
95
|
-
}, [d,
|
|
96
|
-
if (
|
|
97
|
-
const a =
|
|
95
|
+
}, [d, h]), K = (e) => {
|
|
96
|
+
if (I.current) {
|
|
97
|
+
const a = I.current.querySelectorAll("[data-option]")[e];
|
|
98
98
|
a && a.scrollIntoView({
|
|
99
99
|
block: "nearest"
|
|
100
100
|
});
|
|
@@ -103,12 +103,12 @@ const se = (c, r) => {
|
|
|
103
103
|
const x = e.target.value;
|
|
104
104
|
z(x), r == null || r(x), p(!0), u(-1);
|
|
105
105
|
}, _ = () => {
|
|
106
|
-
(m ||
|
|
106
|
+
(m || w.length >= k) && p(!0);
|
|
107
107
|
}, $ = (e) => {
|
|
108
108
|
var x;
|
|
109
|
-
e.disabled || (z(e.label), r == null || r(e.label), i == null || i(e), p(!1), u(-1), (x =
|
|
109
|
+
e.disabled || (z(e.label), r == null || r(e.label), i == null || i(e), p(!1), u(-1), (x = D.current) == null || x.focus());
|
|
110
110
|
}, G = (e) => {
|
|
111
|
-
if (!
|
|
111
|
+
if (!y && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
|
|
112
112
|
p(!0);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -137,8 +137,8 @@ const se = (c, r) => {
|
|
|
137
137
|
}
|
|
138
138
|
}, J = () => {
|
|
139
139
|
var e;
|
|
140
|
-
z(""), r == null || r(""), p(!1), (e =
|
|
141
|
-
}, P = H(
|
|
140
|
+
z(""), r == null || r(""), p(!1), (e = D.current) == null || e.focus();
|
|
141
|
+
}, P = H(D, E), M = (e, x) => /* @__PURE__ */ g("button", { type: "button", "data-option": !0, id: T(x), role: "option", "aria-selected": l === x, "aria-disabled": e.disabled || void 0, onClick: () => $(e), onMouseEnter: () => !e.disabled && u(x), disabled: e.disabled, ...{
|
|
142
142
|
0: {
|
|
143
143
|
className: "x6s0dn4 xjbqb8w xc342km x1kcekj6 x1sjp1m2 x78zum5 x1eqnyfr xpfqfdi xrtip4p x16pzmsl xdpxx8g xh8yej3"
|
|
144
144
|
},
|
|
@@ -172,12 +172,19 @@ const se = (c, r) => {
|
|
|
172
172
|
/* @__PURE__ */ s("div", { className: "xk50ysn xb3r6kr xlyipyv xuxw1ft", children: e.label }),
|
|
173
173
|
e.description && /* @__PURE__ */ s("div", { className: "x1uuraw0 x51wmvv xb3r6kr xlyipyv xuxw1ft", children: e.description })
|
|
174
174
|
] })
|
|
175
|
-
] }, e.value), W =
|
|
176
|
-
return /* @__PURE__ */ g("div", { ref:
|
|
177
|
-
/* @__PURE__ */ s(O, { type: "text", icon: /* @__PURE__ */ s(V, { "aria-hidden": "true", className: "xkive58 x1vfp87d" }), trailing: X, role: "combobox", "aria-expanded":
|
|
175
|
+
] }, e.value), W = y && (d.length > 0 || f || w.length >= k), X = f ? /* @__PURE__ */ s(S, { "aria-hidden": "true", className: "x1q3qbx4 x1s1fvk8 xa4qsjk xg0664w xpedhrg x1esw782 x1sjp1m2 xkive58 x1vfp87d" }) : w ? /* @__PURE__ */ s("button", { type: "button", onClick: J, tabIndex: -1, "aria-label": "Clear search", className: "x6s0dn4 xjbqb8w xc342km x1kcekj6 x1ypdohk x3nfvp2 xwfmp28 xl56j7k x12czurs x1717udv xx6bhzk x15406qy xwwtwea x3wwfir", children: /* @__PURE__ */ s(F, { "aria-hidden": "true", className: "x1sjp1m2 xkive58 x1vfp87d" }) }) : void 0, Y = y && l >= 0 ? T(l) : void 0, Z = y ? f ? "Loading results" : d.length === 0 ? v : `${d.length} result${d.length === 1 ? "" : "s"} available` : "";
|
|
176
|
+
return /* @__PURE__ */ g("div", { ref: R, className: "x1n2onr6", children: [
|
|
177
|
+
/* @__PURE__ */ s(O, { type: "text", icon: /* @__PURE__ */ s(V, { "aria-hidden": "true", className: "xkive58 x1vfp87d" }), trailing: X, role: "combobox", "aria-expanded": y, "aria-autocomplete": "list", "aria-controls": L, "aria-activedescendant": Y, autoComplete: "off", ref: P, value: w, onChange: Q, onFocus: _, onKeyDown: G, disabled: q, placeholder: N, ...o }),
|
|
178
178
|
/* @__PURE__ */ s("span", { role: "status", "aria-live": "polite", className: "xc342km xzpqnlu xjm9jq1 xkdpibf xb3r6kr x1717udv x10l6tqk xuxw1ft x1i1rx1s", children: Z }),
|
|
179
|
-
W && /* @__PURE__ */ s("div", { id: L, role: "listbox", "aria-label": "Suggestions", ref:
|
|
180
|
-
/* @__PURE__ */ s("div", {
|
|
179
|
+
W && /* @__PURE__ */ s("div", { id: L, role: "listbox", "aria-label": "Suggestions", ref: I, className: "x1dyo0bm x10cbhzu x1brvnfc x1y0btm7 xmkeg23 x1g5awrf x6ixs0r xuyqlj2 x1odjw0f x10l6tqk xh8yej3 xa9119d", children: f ? /* @__PURE__ */ s("div", { className: "x6s0dn4 x78zum5 xl56j7k xv0kgt4", children: /* @__PURE__ */ s(S, { "aria-hidden": "true", className: "x1q3qbx4 x1s1fvk8 xa4qsjk xg0664w xpedhrg x1esw782 x1sjp1m2 xybwzzh x1gtyvus" }) }) : d.length === 0 ? /* @__PURE__ */ s("div", { className: "x1sjp1m2 x1eqnyfr x11omchh x2b8uid", children: v }) : A ? /* @__PURE__ */ s("div", { className: "x2k5h2x", children: Object.entries(A).map(([e, x], a, B) => /* @__PURE__ */ g("div", { children: [
|
|
180
|
+
/* @__PURE__ */ s("div", { ...{
|
|
181
|
+
0: {
|
|
182
|
+
className: "xwa5xuj x51wmvv xo1l8bm x136oad8 x16pzmsl"
|
|
183
|
+
},
|
|
184
|
+
1: {
|
|
185
|
+
className: "xwa5xuj x51wmvv xo1l8bm x136oad8 x16pzmsl x6ixs0r"
|
|
186
|
+
}
|
|
187
|
+
}[(a > 0) << 0], children: e }),
|
|
181
188
|
x.map((U) => {
|
|
182
189
|
const C = d.indexOf(U);
|
|
183
190
|
return M(U, C);
|
package/dist/search-input.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./search-input-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./search-input-Dmmo-BEL.cjs");exports.AutocompleteSearch=e.AutocompleteSearch;exports.CommandSearch=e.CommandSearch;exports.SearchInput=e.SearchInput;
|
package/dist/search-input.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const a=require("react/jsx-runtime"),k=require("react"),j=require("@radix-ui/react-select"),l=require("lucide-react"),y=require("./portal-container-C0jBwG4U.cjs");function m(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const t=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const n=m(k),x=m(j),h=x.Root,N=x.Group,S=x.Value,d=n.forwardRef(({children:e,variant:r="default",...s},t)=>a.jsxs(x.Trigger,{ref:t,...s,...{0:{className:"x6s0dn4 x1gu80qv x1suburk x1brvnfc x1y0btm7 xmkeg23 x9f619 x1sjp1m2 x78zum5 x1eqnyfr x1h5pcsu x1qughib xrtip4p x16pzmsl xh8yej3 x1ha2oyl xhlp2gg x113pfim x9hpe06 x13iak60 x9v5kkp x4xl6zf xvp245x x1qg2s8m x1s07b3s"},2:{className:"x6s0dn4 x1gu80qv x1brvnfc x1y0btm7 xmkeg23 x9f619 x1sjp1m2 x78zum5 x1qughib xrtip4p xh8yej3 x1ha2oyl xhlp2gg x9hpe06 x13iak60 x4xl6zf xvp245x x1qg2s8m x1s07b3s x9r1u3d x1gnnqk1 x98rzlu x51wmvv xwfmp28 x16ic5xr x7yu9wt xi5y0ii"},1:{className:"x6s0dn4 x1gu80qv x1suburk x1brvnfc x1y0btm7 xmkeg23 x9f619 x1sjp1m2 x78zum5 x1eqnyfr x1h5pcsu x1qughib xrtip4p x16pzmsl x1ha2oyl xhlp2gg x113pfim x9hpe06 x13iak60 x9v5kkp x4xl6zf xvp245x x1qg2s8m x1s07b3s xjppbhk x1a2w583 x2lah0s x1o29ju6 x1kj6fz x14atkfc"},3:{className:"x6s0dn4 x1gu80qv x1brvnfc x1y0btm7 xmkeg23 x9f619 x1sjp1m2 x78zum5 x1qughib xrtip4p x1ha2oyl xhlp2gg x9hpe06 x13iak60 x4xl6zf xvp245x x1qg2s8m x1s07b3s x9r1u3d x1gnnqk1 x98rzlu x51wmvv xwfmp28 x16ic5xr x7yu9wt xi5y0ii xjppbhk x1a2w583 x2lah0s x1o29ju6 x1kj6fz x14atkfc"}}[(r==="calendarCaption")<<1|(r==="countryCode")<<0],children:[e,a.jsx(x.Icon,{asChild:!0,children:a.jsx(l.ChevronDown,{"aria-hidden":"true",className:"xkive58 xbyyjgo x1vfp87d"})})]}));d.displayName=x.Trigger.displayName;const c=n.forwardRef(({...e},r)=>a.jsx(x.ScrollUpButton,{ref:r,...e,className:"x6s0dn4 xt0e3qv x78zum5 xl56j7k x14aypoh",children:a.jsx(l.ChevronUp,{"aria-hidden":"true",className:"xkive58 x1vfp87d"})}));c.displayName=x.ScrollUpButton.displayName;const o=n.forwardRef(({...e},r)=>a.jsx(x.ScrollDownButton,{ref:r,...e,className:"x6s0dn4 xt0e3qv x78zum5 xl56j7k x14aypoh",children:a.jsx(l.ChevronDown,{"aria-hidden":"true",className:"xkive58 x1vfp87d"})}));o.displayName=x.ScrollDownButton.displayName;const i=n.forwardRef(({children:e,container:r,layout:s="default",position:t="popper",...b},v)=>{const g=y.usePortalContainer();return a.jsx(x.Portal,{container:r??g,children:a.jsxs(x.Content,{ref:v,position:t,...b,...{0:{className:"x1dyo0bm xsdfdjn x1brvnfc x1y0btm7 xmkeg23 x1g5awrf xa18zv3 x18fb9vk xzhy1st xb3r6kr x1n2onr6 xa9119d"},4:{className:"x1dyo0bm xsdfdjn x1brvnfc x1y0btm7 xmkeg23 x1g5awrf xa18zv3 x18fb9vk xzhy1st xb3r6kr x1n2onr6 xa9119d x11xol7u xjsop3c x1xzjbg5 xn7rg5v"},2:{className:"x1dyo0bm xsdfdjn x1brvnfc x1y0btm7 xmkeg23 x1g5awrf xa18zv3 x18fb9vk xb3r6kr x1n2onr6 xa9119d xeuugli x14atkfc"},6:{className:"x1dyo0bm xsdfdjn x1brvnfc x1y0btm7 xmkeg23 x1g5awrf xa18zv3 x18fb9vk xb3r6kr x1n2onr6 xa9119d x11xol7u xjsop3c x1xzjbg5 xn7rg5v xeuugli x14atkfc"},1:{className:"x1dyo0bm xsdfdjn x1brvnfc x1y0btm7 xmkeg23 x1g5awrf xa18zv3 x18fb9vk xb3r6kr x1n2onr6 xa9119d xidinl9"},5:{className:"x1dyo0bm xsdfdjn x1brvnfc x1y0btm7 xmkeg23 x1g5awrf xa18zv3 x18fb9vk xb3r6kr x1n2onr6 xa9119d x11xol7u xjsop3c x1xzjbg5 xn7rg5v xidinl9"},3:{className:"x1dyo0bm xsdfdjn x1brvnfc x1y0btm7 xmkeg23 x1g5awrf xa18zv3 x18fb9vk xb3r6kr x1n2onr6 xa9119d x14atkfc xidinl9"},7:{className:"x1dyo0bm xsdfdjn x1brvnfc x1y0btm7 xmkeg23 x1g5awrf xa18zv3 x18fb9vk xb3r6kr x1n2onr6 xa9119d x11xol7u xjsop3c x1xzjbg5 xn7rg5v x14atkfc xidinl9"}}[(t==="popper")<<2|(s==="auto")<<1|(s==="country")<<0],children:[a.jsx(c,{}),a.jsx(x.Viewport,{...{0:{className:"x2k5h2x"},1:{className:"x2k5h2x x1erd2hs xuuvo9b xh8yej3"}}[(t==="popper")<<0],children:e}),a.jsx(o,{})]})})});i.displayName=x.Content.displayName;const p=n.forwardRef(({...e},r)=>a.jsx(x.Label,{ref:r,...e,className:"xwa5xuj x51wmvv xo1l8bm x1vyo3qp x136oad8 xnir7hg x2sdl3f xtvhhri"}));p.displayName=x.Label.displayName;const f=n.forwardRef(({children:e,size:r="default",...s},t)=>a.jsxs(x.Item,{ref:t,...s,...{0:{className:"x6s0dn4 x1kcekj6 xt0e3qv x78zum5 x1eqnyfr x1t137rt x136oad8 xnir7hg xalxagl x1n2onr6 x87ps6o xh8yej3 xg8umi8 x1i4teta x1xttv3l x14e3mrv x7gqb9v"},1:{className:"x6s0dn4 x1kcekj6 xt0e3qv x78zum5 x1t137rt x136oad8 xnir7hg xalxagl x1n2onr6 x87ps6o xh8yej3 xg8umi8 x1i4teta x1xttv3l x14e3mrv x7gqb9v x51wmvv"}}[(r==="sm")<<0],children:[a.jsx("span",{className:"x6s0dn4 x1ey2m1c x78zum5 xl56j7k x10l6tqk xvmqb8b x13vifvy x1gtyvus",children:a.jsx(x.ItemIndicator,{children:a.jsx(l.Check,{"aria-hidden":"true",className:"xkive58 x1vfp87d"})})}),a.jsx(x.ItemText,{children:e})]}));f.displayName=x.Item.displayName;const u=n.forwardRef(({...e},r)=>a.jsx(x.Separator,{ref:r,...e,className:"x1cqd74s xjm9jq1 x16jkv7s x1gaabsz"}));u.displayName=x.Separator.displayName;exports.Select=h;exports.SelectContent=i;exports.SelectGroup=N;exports.SelectItem=f;exports.SelectLabel=p;exports.SelectScrollDownButton=o;exports.SelectScrollUpButton=c;exports.SelectSeparator=u;exports.SelectTrigger=d;exports.SelectValue=S;
|