@devalok/shilp-sutra 0.8.3 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/avatar.js +50 -0
- package/dist/_chunks/button.js +95 -0
- package/dist/_chunks/card.js +40 -0
- package/dist/_chunks/checkbox.js +14 -0
- package/dist/_chunks/form.js +27 -0
- package/dist/_chunks/primitives.js +6965 -0
- package/dist/_chunks/sidebar.js +592 -0
- package/dist/_chunks/spinner.js +34 -0
- package/dist/_chunks/tiptap.js +15254 -0
- package/dist/_chunks/tooltip.js +13 -0
- package/dist/_chunks/tree-view.js +304 -0
- package/dist/_chunks/use-calendar.js +990 -0
- package/dist/_chunks/utils.js +15 -0
- package/dist/_chunks/vendor.js +5823 -0
- package/dist/composed/avatar-group.js +20 -20
- package/dist/composed/command-palette.js +1 -1
- package/dist/composed/confirm-dialog.js +5 -5
- package/dist/composed/content-card.d.ts +1 -1
- package/dist/composed/content-card.js +6 -6
- package/dist/composed/date-picker/index.js +13 -0
- package/dist/composed/empty-state.js +10 -10
- package/dist/composed/error-boundary.js +2 -2
- package/dist/composed/global-loading.js +4 -4
- package/dist/composed/index.js +45 -53
- package/dist/composed/loading-skeleton.js +2 -2
- package/dist/composed/member-picker.js +5 -5
- package/dist/composed/page-header.js +4 -4
- package/dist/composed/page-skeletons.js +1 -1
- package/dist/composed/priority-indicator.js +6 -6
- package/dist/composed/rich-text-editor.js +422 -209
- package/dist/composed/schedule-view.js +1 -1
- package/dist/composed/simple-tooltip.js +6 -6
- package/dist/composed/status-badge.d.ts +1 -1
- package/dist/composed/status-badge.js +2 -2
- package/dist/shell/bottom-navbar.js +1 -1
- package/dist/shell/notification-center.js +2 -2
- package/dist/shell/notification-preferences.js +32 -33
- package/dist/shell/sidebar.js +24 -24
- package/dist/shell/top-bar.js +22 -22
- package/dist/ui/accordion.js +17 -17
- package/dist/ui/alert-dialog.js +29 -29
- package/dist/ui/alert.d.ts +2 -2
- package/dist/ui/alert.js +65 -44
- package/dist/ui/aspect-ratio.js +1 -1
- package/dist/ui/autocomplete.js +11 -11
- package/dist/ui/avatar.d.ts +1 -1
- package/dist/ui/avatar.js +67 -25
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/badge.js +115 -91
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.js +5 -5
- package/dist/ui/breadcrumb.js +14 -14
- package/dist/ui/button-group.js +30 -15
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.js +114 -71
- package/dist/ui/card.js +66 -22
- package/dist/ui/charts/index.js +1221 -18
- package/dist/ui/checkbox.js +25 -5
- package/dist/ui/chip.d.ts +4 -4
- package/dist/ui/chip.js +2 -2
- package/dist/ui/code.js +1 -1
- package/dist/ui/collapsible.js +5 -5
- package/dist/ui/color-input.js +11 -11
- package/dist/ui/combobox.js +12 -12
- package/dist/ui/container.js +4 -4
- package/dist/ui/context-menu.js +37 -37
- package/dist/ui/data-table-toolbar.js +18 -18
- package/dist/ui/data-table.js +2 -2
- package/dist/ui/dialog.js +33 -33
- package/dist/ui/dropdown-menu.js +60 -60
- package/dist/ui/file-upload.js +1 -1
- package/dist/ui/form.js +36 -15
- package/dist/ui/hover-card.js +7 -7
- package/dist/ui/icon-button.js +9 -9
- package/dist/ui/index.js +523 -325
- package/dist/ui/input-otp.d.ts +2 -2
- package/dist/ui/input-otp.js +14 -14
- package/dist/ui/input.js +56 -28
- package/dist/ui/label.js +18 -4
- package/dist/ui/lib/utils.js +4 -5
- package/dist/ui/link.js +9 -9
- package/dist/ui/menubar.js +81 -81
- package/dist/ui/navigation-menu.js +42 -42
- package/dist/ui/number-input.js +13 -13
- package/dist/ui/pagination.js +5 -5
- package/dist/ui/popover.js +9 -9
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/progress.js +15 -15
- package/dist/ui/radio.js +10 -10
- package/dist/ui/search-input.js +5 -5
- package/dist/ui/segmented-control.js +91 -83
- package/dist/ui/select.js +52 -52
- package/dist/ui/separator.js +20 -5
- package/dist/ui/sheet.js +28 -28
- package/dist/ui/sidebar.js +36 -560
- package/dist/ui/skeleton.d.ts +1 -1
- package/dist/ui/skeleton.js +9 -9
- package/dist/ui/slider.js +11 -11
- package/dist/ui/spinner.js +37 -2
- package/dist/ui/stack.js +1 -1
- package/dist/ui/stat-card.js +1 -1
- package/dist/ui/stepper.js +15 -15
- package/dist/ui/switch.js +22 -3
- package/dist/ui/table.js +1 -1
- package/dist/ui/tabs.js +59 -32
- package/dist/ui/text.js +2 -2
- package/dist/ui/textarea.js +7 -7
- package/dist/ui/toast.d.ts +1 -1
- package/dist/ui/toast.js +28 -28
- package/dist/ui/toggle-group.js +11 -11
- package/dist/ui/toggle.js +9 -9
- package/dist/ui/tooltip.js +17 -6
- package/dist/ui/transitions.js +68 -58
- package/dist/ui/tree-view/index.js +7 -0
- package/dist/ui/visually-hidden.js +3 -3
- package/llms-full.txt +1 -1
- package/llms.txt +7 -0
- package/package.json +656 -701
- package/dist/_virtual/client.js +0 -5
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/react-dom-client.development.js +0 -5
- package/dist/_virtual/react-dom-client.production.js +0 -5
- package/dist/_virtual/scheduler.development.js +0 -5
- package/dist/_virtual/scheduler.production.js +0 -5
- package/dist/composed/date-picker/calendar-grid.js +0 -194
- package/dist/composed/date-picker/date-picker.js +0 -124
- package/dist/composed/date-picker/date-range-picker.js +0 -167
- package/dist/composed/date-picker/date-time-picker.js +0 -193
- package/dist/composed/date-picker/month-picker.js +0 -53
- package/dist/composed/date-picker/presets.js +0 -84
- package/dist/composed/date-picker/time-picker.js +0 -181
- package/dist/composed/date-picker/use-calendar.js +0 -17
- package/dist/composed/date-picker/year-picker.js +0 -45
- package/dist/composed/extensions/emoji-suggestion.js +0 -119
- package/dist/composed/extensions/file-attachment.js +0 -55
- package/dist/composed/extensions/mention-suggestion.js +0 -79
- package/dist/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.js +0 -40141
- package/dist/node_modules/.pnpm/@emoji-mart_react@1.1.1_emoji-mart@5.6.0_react@19.2.4/node_modules/@emoji-mart/react/dist/module.js +0 -17
- package/dist/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.js +0 -2958
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js +0 -17062
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js +0 -9790
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +0 -20
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +0 -237
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +0 -234
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js +0 -11
- package/dist/primitives/_internal/number.js +0 -6
- package/dist/primitives/_internal/primitive.js +0 -9
- package/dist/primitives/_internal/react-arrow.js +0 -13
- package/dist/primitives/_internal/react-collection.js +0 -48
- package/dist/primitives/_internal/react-compose-refs.js +0 -29
- package/dist/primitives/_internal/react-context.js +0 -76
- package/dist/primitives/_internal/react-direction.js +0 -10
- package/dist/primitives/_internal/react-dismissable-layer.js +0 -103
- package/dist/primitives/_internal/react-focus-guards.js +0 -17
- package/dist/primitives/_internal/react-focus-scope.js +0 -137
- package/dist/primitives/_internal/react-id.js +0 -14
- package/dist/primitives/_internal/react-popper.js +0 -137
- package/dist/primitives/_internal/react-portal.js +0 -16
- package/dist/primitives/_internal/react-presence.js +0 -71
- package/dist/primitives/_internal/react-primitive.js +0 -36
- package/dist/primitives/_internal/react-use-callback-ref.js +0 -13
- package/dist/primitives/_internal/react-use-controllable-state.js +0 -44
- package/dist/primitives/_internal/react-use-escape-keydown.js +0 -14
- package/dist/primitives/_internal/react-use-is-hydrated.js +0 -15
- package/dist/primitives/_internal/react-use-layout-effect.js +0 -6
- package/dist/primitives/_internal/react-use-previous.js +0 -8
- package/dist/primitives/_internal/react-use-size.js +0 -27
- package/dist/primitives/react-accordion.js +0 -239
- package/dist/primitives/react-alert-dialog.js +0 -127
- package/dist/primitives/react-aspect-ratio.js +0 -43
- package/dist/primitives/react-avatar.js +0 -75
- package/dist/primitives/react-checkbox.js +0 -251
- package/dist/primitives/react-collapsible.js +0 -120
- package/dist/primitives/react-context-menu.js +0 -240
- package/dist/primitives/react-dialog.js +0 -262
- package/dist/primitives/react-dropdown-menu.js +0 -227
- package/dist/primitives/react-hover-card.js +0 -187
- package/dist/primitives/react-label.js +0 -20
- package/dist/primitives/react-menu.js +0 -652
- package/dist/primitives/react-menubar.js +0 -355
- package/dist/primitives/react-navigation-menu.js +0 -607
- package/dist/primitives/react-popover.js +0 -243
- package/dist/primitives/react-progress.js +0 -84
- package/dist/primitives/react-radio-group.js +0 -238
- package/dist/primitives/react-roving-focus.js +0 -183
- package/dist/primitives/react-select.js +0 -862
- package/dist/primitives/react-separator.js +0 -24
- package/dist/primitives/react-slider.js +0 -437
- package/dist/primitives/react-slot.js +0 -70
- package/dist/primitives/react-switch.js +0 -132
- package/dist/primitives/react-tabs.js +0 -163
- package/dist/primitives/react-toast.js +0 -446
- package/dist/primitives/react-toggle-group.js +0 -137
- package/dist/primitives/react-toggle.js +0 -33
- package/dist/primitives/react-tooltip.js +0 -338
- package/dist/primitives/react-visually-hidden.js +0 -32
- package/dist/ui/charts/_internal/animation.js +0 -18
- package/dist/ui/charts/_internal/axes.js +0 -42
- package/dist/ui/charts/_internal/colors.js +0 -21
- package/dist/ui/charts/_internal/grid-lines.js +0 -43
- package/dist/ui/charts/_internal/legend.js +0 -29
- package/dist/ui/charts/_internal/tooltip.js +0 -39
- package/dist/ui/charts/_internal/types.js +0 -10
- package/dist/ui/charts/area-chart.js +0 -245
- package/dist/ui/charts/bar-chart.js +0 -153
- package/dist/ui/charts/chart-container.js +0 -27
- package/dist/ui/charts/gauge-chart.js +0 -72
- package/dist/ui/charts/line-chart.js +0 -163
- package/dist/ui/charts/pie-chart.js +0 -132
- package/dist/ui/charts/radar-chart.js +0 -223
- package/dist/ui/charts/sparkline.js +0 -124
- package/dist/ui/lib/motion.js +0 -32
- package/dist/ui/lib/use-reduced-motion.js +0 -15
- package/dist/ui/lib/use-ripple.js +0 -14
- package/dist/ui/tree-view/tree-item.js +0 -139
- package/dist/ui/tree-view/tree-view.js +0 -140
- package/dist/ui/tree-view/use-tree.js +0 -38
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as d, jsxs as u } from "react/jsx-runtime";
|
|
3
|
-
import { Extension as m } from "@tiptap/core";
|
|
4
|
-
import f from "@tiptap/suggestion";
|
|
5
|
-
import * as a from "react";
|
|
6
|
-
import { c as x } from "../../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js";
|
|
7
|
-
import { cn as y } from "../../ui/lib/utils.js";
|
|
8
|
-
let s = null;
|
|
9
|
-
async function g() {
|
|
10
|
-
if (s) return s;
|
|
11
|
-
const e = await import("../../node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.js"), t = e.default ?? e;
|
|
12
|
-
return s = Object.values(t.emojis).map((r) => {
|
|
13
|
-
var n;
|
|
14
|
-
return {
|
|
15
|
-
id: r.id,
|
|
16
|
-
name: r.name,
|
|
17
|
-
native: ((n = r.skins[0]) == null ? void 0 : n.native) ?? ""
|
|
18
|
-
};
|
|
19
|
-
}), s;
|
|
20
|
-
}
|
|
21
|
-
const c = a.forwardRef(
|
|
22
|
-
({ items: e, command: t }, r) => {
|
|
23
|
-
const [n, l] = a.useState(0);
|
|
24
|
-
return a.useEffect(() => l(0), [e]), a.useImperativeHandle(r, () => ({
|
|
25
|
-
onKeyDown: ({ event: o }) => o.key === "ArrowUp" ? (l((i) => (i + e.length - 1) % e.length), !0) : o.key === "ArrowDown" ? (l((i) => (i + 1) % e.length), !0) : o.key === "Enter" ? (e[n] && t(e[n]), !0) : !1
|
|
26
|
-
})), e.length ? /* @__PURE__ */ d("div", { role: "listbox", "aria-label": "Emoji suggestions", className: "z-popover max-h-[200px] overflow-x-hidden overflow-y-auto rounded-ds-md border border-border bg-layer-01 shadow-02", children: e.map((o, i) => /* @__PURE__ */ u(
|
|
27
|
-
"button",
|
|
28
|
-
{
|
|
29
|
-
type: "button",
|
|
30
|
-
role: "option",
|
|
31
|
-
"aria-selected": i === n,
|
|
32
|
-
onClick: () => t(o),
|
|
33
|
-
className: y(
|
|
34
|
-
"flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm",
|
|
35
|
-
i === n ? "bg-layer-02 text-text-primary" : "text-text-secondary hover:bg-layer-02"
|
|
36
|
-
),
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ d("span", { className: "text-ds-base", children: o.native }),
|
|
39
|
-
/* @__PURE__ */ u("span", { className: "truncate", children: [
|
|
40
|
-
":",
|
|
41
|
-
o.id,
|
|
42
|
-
":"
|
|
43
|
-
] })
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
o.id
|
|
47
|
-
)) }) : null;
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
c.displayName = "EmojiList";
|
|
51
|
-
function b() {
|
|
52
|
-
return () => {
|
|
53
|
-
let e = null, t = null, r = null;
|
|
54
|
-
return {
|
|
55
|
-
onStart: (n) => {
|
|
56
|
-
var o;
|
|
57
|
-
t = document.createElement("div"), t.style.position = "absolute", t.style.zIndex = "1400";
|
|
58
|
-
const l = (o = n.clientRect) == null ? void 0 : o.call(n);
|
|
59
|
-
l && (t.style.left = `${l.left}px`, t.style.top = `${l.bottom + 4}px`), document.body.appendChild(t), e = x.createRoot(t), e.render(
|
|
60
|
-
/* @__PURE__ */ d(
|
|
61
|
-
c,
|
|
62
|
-
{
|
|
63
|
-
ref: (i) => {
|
|
64
|
-
r = i;
|
|
65
|
-
},
|
|
66
|
-
items: n.items,
|
|
67
|
-
command: (i) => n.command(i)
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
);
|
|
71
|
-
},
|
|
72
|
-
onUpdate: (n) => {
|
|
73
|
-
var o;
|
|
74
|
-
if (!e || !t) return;
|
|
75
|
-
const l = (o = n.clientRect) == null ? void 0 : o.call(n);
|
|
76
|
-
l && (t.style.left = `${l.left}px`, t.style.top = `${l.bottom + 4}px`), e.render(
|
|
77
|
-
/* @__PURE__ */ d(
|
|
78
|
-
c,
|
|
79
|
-
{
|
|
80
|
-
ref: (i) => {
|
|
81
|
-
r = i;
|
|
82
|
-
},
|
|
83
|
-
items: n.items,
|
|
84
|
-
command: (i) => n.command(i)
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
);
|
|
88
|
-
},
|
|
89
|
-
onKeyDown: (n) => n.event.key === "Escape" ? (t && (e == null || e.unmount(), t.remove(), t = null, e = null), !0) : (r == null ? void 0 : r.onKeyDown(n)) ?? !1,
|
|
90
|
-
onExit: () => {
|
|
91
|
-
t && (e == null || e.unmount(), t.remove(), t = null, e = null);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
const p = m.create({
|
|
97
|
-
name: "emojiSuggestion",
|
|
98
|
-
addProseMirrorPlugins() {
|
|
99
|
-
return [
|
|
100
|
-
f({
|
|
101
|
-
editor: this.editor,
|
|
102
|
-
char: ":",
|
|
103
|
-
items: async ({ query: e }) => {
|
|
104
|
-
const t = await g();
|
|
105
|
-
return e ? t.filter(
|
|
106
|
-
(r) => r.id.includes(e.toLowerCase()) || r.name.toLowerCase().includes(e.toLowerCase())
|
|
107
|
-
).slice(0, 8) : t.slice(0, 8);
|
|
108
|
-
},
|
|
109
|
-
command: ({ editor: e, range: t, props: r }) => {
|
|
110
|
-
e.chain().focus().deleteRange(t).insertContent(r.native).run();
|
|
111
|
-
},
|
|
112
|
-
render: b()
|
|
113
|
-
})
|
|
114
|
-
];
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
export {
|
|
118
|
-
p as EmojiSuggestion
|
|
119
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
3
|
-
import { Node as n, mergeAttributes as i } from "@tiptap/core";
|
|
4
|
-
import { ReactNodeViewRenderer as o, NodeViewWrapper as s } from "@tiptap/react";
|
|
5
|
-
import { IconFile as l, IconDownload as d } from "@tabler/icons-react";
|
|
6
|
-
function c(e) {
|
|
7
|
-
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
8
|
-
}
|
|
9
|
-
function m({ node: e }) {
|
|
10
|
-
const a = /^https?:\/\//.test(e.attrs.url) ? e.attrs.url : "#";
|
|
11
|
-
return /* @__PURE__ */ t(s, { className: "my-ds-02", children: /* @__PURE__ */ r(
|
|
12
|
-
"a",
|
|
13
|
-
{
|
|
14
|
-
href: a,
|
|
15
|
-
target: "_blank",
|
|
16
|
-
rel: "noopener noreferrer",
|
|
17
|
-
className: "inline-flex items-center gap-ds-03 rounded-ds-md border border-border bg-layer-02 px-ds-04 py-ds-03 text-ds-sm text-text-primary transition-colors hover:border-border-strong hover:bg-layer-03",
|
|
18
|
-
contentEditable: !1,
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ t(l, { className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder" }),
|
|
21
|
-
/* @__PURE__ */ t("span", { className: "truncate", children: e.attrs.name }),
|
|
22
|
-
/* @__PURE__ */ r("span", { className: "shrink-0 text-text-placeholder", children: [
|
|
23
|
-
"(",
|
|
24
|
-
c(e.attrs.size),
|
|
25
|
-
")"
|
|
26
|
-
] }),
|
|
27
|
-
/* @__PURE__ */ t(d, { className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder" })
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
) });
|
|
31
|
-
}
|
|
32
|
-
const x = n.create({
|
|
33
|
-
name: "fileAttachment",
|
|
34
|
-
group: "block",
|
|
35
|
-
atom: !0,
|
|
36
|
-
addAttributes() {
|
|
37
|
-
return {
|
|
38
|
-
url: { default: null },
|
|
39
|
-
name: { default: "Untitled" },
|
|
40
|
-
size: { default: 0 }
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
parseHTML() {
|
|
44
|
-
return [{ tag: "div[data-file-attachment]" }];
|
|
45
|
-
},
|
|
46
|
-
renderHTML({ HTMLAttributes: e }) {
|
|
47
|
-
return ["div", i({ "data-file-attachment": "" }, e)];
|
|
48
|
-
},
|
|
49
|
-
addNodeView() {
|
|
50
|
-
return o(m);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
export {
|
|
54
|
-
x as FileAttachment
|
|
55
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as d, jsxs as s } from "react/jsx-runtime";
|
|
3
|
-
import * as i from "react";
|
|
4
|
-
import { c as u } from "../../node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js";
|
|
5
|
-
import { cn as f } from "../../ui/lib/utils.js";
|
|
6
|
-
const c = i.forwardRef(
|
|
7
|
-
({ items: e, command: t }, a) => {
|
|
8
|
-
const [n, o] = i.useState(0);
|
|
9
|
-
return i.useEffect(() => o(0), [e]), i.useImperativeHandle(a, () => ({
|
|
10
|
-
onKeyDown: ({ event: l }) => l.key === "ArrowUp" ? (o((r) => (r + e.length - 1) % e.length), !0) : l.key === "ArrowDown" ? (o((r) => (r + 1) % e.length), !0) : l.key === "Enter" ? (e[n] && t(e[n]), !0) : !1
|
|
11
|
-
})), e.length ? /* @__PURE__ */ d("div", { role: "listbox", "aria-label": "Mention suggestions", className: "z-popover overflow-hidden rounded-ds-md border border-border bg-layer-01 shadow-02", children: e.map((l, r) => /* @__PURE__ */ s(
|
|
12
|
-
"button",
|
|
13
|
-
{
|
|
14
|
-
type: "button",
|
|
15
|
-
role: "option",
|
|
16
|
-
"aria-selected": r === n,
|
|
17
|
-
onClick: () => t(l),
|
|
18
|
-
className: f(
|
|
19
|
-
"flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm",
|
|
20
|
-
r === n ? "bg-layer-02 text-text-primary" : "text-text-secondary hover:bg-layer-02"
|
|
21
|
-
),
|
|
22
|
-
children: [
|
|
23
|
-
l.avatar ? /* @__PURE__ */ d("img", { src: l.avatar, alt: "", className: "h-ico-md w-ico-md rounded-ds-full object-cover" }) : /* @__PURE__ */ d("span", { className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-interactive/10 text-[10px] font-semibold text-interactive", children: l.label.charAt(0).toUpperCase() }),
|
|
24
|
-
/* @__PURE__ */ d("span", { children: l.label })
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
l.id
|
|
28
|
-
)) }) : null;
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
c.displayName = "MentionList";
|
|
32
|
-
function y() {
|
|
33
|
-
return () => {
|
|
34
|
-
let e = null, t = null, a = null;
|
|
35
|
-
return {
|
|
36
|
-
onStart: (n) => {
|
|
37
|
-
var l;
|
|
38
|
-
t = document.createElement("div"), t.style.position = "absolute", t.style.zIndex = "1400";
|
|
39
|
-
const o = (l = n.clientRect) == null ? void 0 : l.call(n);
|
|
40
|
-
o && (t.style.left = `${o.left}px`, t.style.top = `${o.bottom + 4}px`), document.body.appendChild(t), e = u.createRoot(t), e.render(
|
|
41
|
-
/* @__PURE__ */ d(
|
|
42
|
-
c,
|
|
43
|
-
{
|
|
44
|
-
ref: (r) => {
|
|
45
|
-
a = r;
|
|
46
|
-
},
|
|
47
|
-
items: n.items,
|
|
48
|
-
command: (r) => n.command({ id: r.id, label: r.label })
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
);
|
|
52
|
-
},
|
|
53
|
-
onUpdate: (n) => {
|
|
54
|
-
var l;
|
|
55
|
-
if (!e || !t) return;
|
|
56
|
-
const o = (l = n.clientRect) == null ? void 0 : l.call(n);
|
|
57
|
-
o && (t.style.left = `${o.left}px`, t.style.top = `${o.bottom + 4}px`), e.render(
|
|
58
|
-
/* @__PURE__ */ d(
|
|
59
|
-
c,
|
|
60
|
-
{
|
|
61
|
-
ref: (r) => {
|
|
62
|
-
a = r;
|
|
63
|
-
},
|
|
64
|
-
items: n.items,
|
|
65
|
-
command: (r) => n.command({ id: r.id, label: r.label })
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
);
|
|
69
|
-
},
|
|
70
|
-
onKeyDown: (n) => n.event.key === "Escape" ? (t && (e == null || e.unmount(), t.remove(), t = null, e = null), !0) : (a == null ? void 0 : a.onKeyDown(n)) ?? !1,
|
|
71
|
-
onExit: () => {
|
|
72
|
-
t && (e == null || e.unmount(), t.remove(), t = null, e = null);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
export {
|
|
78
|
-
y as createSuggestionRenderer
|
|
79
|
-
};
|