@asabot/panel-ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +39 -2
- package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/assets/noto-sans-sc-100-wght-normal-DluiXYzi.woff2 +0 -0
- package/dist/assets/noto-sans-sc-101-wght-normal-CPkZHnw0.woff2 +0 -0
- package/dist/assets/noto-sans-sc-102-wght-normal-gzIulUH6.woff2 +0 -0
- package/dist/assets/noto-sans-sc-103-wght-normal-CJfSBxFo.woff2 +0 -0
- package/dist/assets/noto-sans-sc-104-wght-normal-B3QMglgE.woff2 +0 -0
- package/dist/assets/noto-sans-sc-105-wght-normal-xXh_OMfk.woff2 +0 -0
- package/dist/assets/noto-sans-sc-106-wght-normal-B9n3jMjP.woff2 +0 -0
- package/dist/assets/noto-sans-sc-107-wght-normal-D7fvVprN.woff2 +0 -0
- package/dist/assets/noto-sans-sc-108-wght-normal-J0_LhxVo.woff2 +0 -0
- package/dist/assets/noto-sans-sc-109-wght-normal-Dsp-De_0.woff2 +0 -0
- package/dist/assets/noto-sans-sc-110-wght-normal-DE_6NUrb.woff2 +0 -0
- package/dist/assets/noto-sans-sc-111-wght-normal-C4S-TlTn.woff2 +0 -0
- package/dist/assets/noto-sans-sc-112-wght-normal-BcFuP3w6.woff2 +0 -0
- package/dist/assets/noto-sans-sc-113-wght-normal-Dk932kmj.woff2 +0 -0
- package/dist/assets/noto-sans-sc-114-wght-normal-CO_5Xo-i.woff2 +0 -0
- package/dist/assets/noto-sans-sc-115-wght-normal-BWy07H14.woff2 +0 -0
- package/dist/assets/noto-sans-sc-116-wght-normal-B4HVAfHo.woff2 +0 -0
- package/dist/assets/noto-sans-sc-117-wght-normal-siZzFqgK.woff2 +0 -0
- package/dist/assets/noto-sans-sc-118-wght-normal-xhBB7f6V.woff2 +0 -0
- package/dist/assets/noto-sans-sc-119-wght-normal-Ck_g2FGz.woff2 +0 -0
- package/dist/assets/noto-sans-sc-21-wght-normal-D0x9-yBt.woff2 +0 -0
- package/dist/assets/noto-sans-sc-22-wght-normal-BBUVTShg.woff2 +0 -0
- package/dist/assets/noto-sans-sc-23-wght-normal-Du1oYWkE.woff2 +0 -0
- package/dist/assets/noto-sans-sc-24-wght-normal-CmWjJ0gt.woff2 +0 -0
- package/dist/assets/noto-sans-sc-25-wght-normal-BFHiqilg.woff2 +0 -0
- package/dist/assets/noto-sans-sc-26-wght-normal-C0sF2Z2f.woff2 +0 -0
- package/dist/assets/noto-sans-sc-27-wght-normal-COFdrquJ.woff2 +0 -0
- package/dist/assets/noto-sans-sc-28-wght-normal-DMgdNu1o.woff2 +0 -0
- package/dist/assets/noto-sans-sc-29-wght-normal-Cmq8em30.woff2 +0 -0
- package/dist/assets/noto-sans-sc-30-wght-normal-CZWqZ3yU.woff2 +0 -0
- package/dist/assets/noto-sans-sc-31-wght-normal-Wfi_lutW.woff2 +0 -0
- package/dist/assets/noto-sans-sc-32-wght-normal-BRJQ4PY5.woff2 +0 -0
- package/dist/assets/noto-sans-sc-33-wght-normal-CUVQXNAJ.woff2 +0 -0
- package/dist/assets/noto-sans-sc-34-wght-normal-Bspba0wC.woff2 +0 -0
- package/dist/assets/noto-sans-sc-35-wght-normal-K8fX_YPG.woff2 +0 -0
- package/dist/assets/noto-sans-sc-36-wght-normal-CkITyjoT.woff2 +0 -0
- package/dist/assets/noto-sans-sc-37-wght-normal-WCZ2zfEe.woff2 +0 -0
- package/dist/assets/noto-sans-sc-38-wght-normal-DeM7CUce.woff2 +0 -0
- package/dist/assets/noto-sans-sc-39-wght-normal-BMZNLWQU.woff2 +0 -0
- package/dist/assets/noto-sans-sc-4-wght-normal-AR5bdDjz.woff2 +0 -0
- package/dist/assets/noto-sans-sc-40-wght-normal-BQ5xpS5j.woff2 +0 -0
- package/dist/assets/noto-sans-sc-41-wght-normal-Hthm7FFi.woff2 +0 -0
- package/dist/assets/noto-sans-sc-42-wght-normal-eaS2gKds.woff2 +0 -0
- package/dist/assets/noto-sans-sc-43-wght-normal-o-T53XXV.woff2 +0 -0
- package/dist/assets/noto-sans-sc-44-wght-normal-BJH5J4Ez.woff2 +0 -0
- package/dist/assets/noto-sans-sc-45-wght-normal-BKuxSCOJ.woff2 +0 -0
- package/dist/assets/noto-sans-sc-46-wght-normal-BR_5Mu6e.woff2 +0 -0
- package/dist/assets/noto-sans-sc-47-wght-normal-CyY7gKNX.woff2 +0 -0
- package/dist/assets/noto-sans-sc-48-wght-normal-BNMfTR6k.woff2 +0 -0
- package/dist/assets/noto-sans-sc-49-wght-normal-DX-0y7wg.woff2 +0 -0
- package/dist/assets/noto-sans-sc-5-wght-normal-CfWugllB.woff2 +0 -0
- package/dist/assets/noto-sans-sc-50-wght-normal-DAOGW-Dr.woff2 +0 -0
- package/dist/assets/noto-sans-sc-51-wght-normal-BlFLOjcP.woff2 +0 -0
- package/dist/assets/noto-sans-sc-52-wght-normal-OZjrybnw.woff2 +0 -0
- package/dist/assets/noto-sans-sc-53-wght-normal-CwyWNT6x.woff2 +0 -0
- package/dist/assets/noto-sans-sc-54-wght-normal-DM0nRe18.woff2 +0 -0
- package/dist/assets/noto-sans-sc-55-wght-normal-DBK2wUOR.woff2 +0 -0
- package/dist/assets/noto-sans-sc-56-wght-normal-C-VKK1LS.woff2 +0 -0
- package/dist/assets/noto-sans-sc-57-wght-normal-Cdbfh5kq.woff2 +0 -0
- package/dist/assets/noto-sans-sc-58-wght-normal-CflMKARZ.woff2 +0 -0
- package/dist/assets/noto-sans-sc-59-wght-normal-BS4Kwzxx.woff2 +0 -0
- package/dist/assets/noto-sans-sc-6-wght-normal-ChnZIQfQ.woff2 +0 -0
- package/dist/assets/noto-sans-sc-60-wght-normal-B7QOYsXJ.woff2 +0 -0
- package/dist/assets/noto-sans-sc-61-wght-normal-C8JjQS7w.woff2 +0 -0
- package/dist/assets/noto-sans-sc-62-wght-normal-bS4wq1Gg.woff2 +0 -0
- package/dist/assets/noto-sans-sc-63-wght-normal-BJr8P-OB.woff2 +0 -0
- package/dist/assets/noto-sans-sc-64-wght-normal-DVB11t7j.woff2 +0 -0
- package/dist/assets/noto-sans-sc-65-wght-normal-DMPCXBvK.woff2 +0 -0
- package/dist/assets/noto-sans-sc-66-wght-normal-BobaG10V.woff2 +0 -0
- package/dist/assets/noto-sans-sc-67-wght-normal-Dzk7WhCR.woff2 +0 -0
- package/dist/assets/noto-sans-sc-68-wght-normal-DGbCD9xu.woff2 +0 -0
- package/dist/assets/noto-sans-sc-69-wght-normal-Ctrv1EqA.woff2 +0 -0
- package/dist/assets/noto-sans-sc-70-wght-normal-RgTO941D.woff2 +0 -0
- package/dist/assets/noto-sans-sc-71-wght-normal-D9sG-CWv.woff2 +0 -0
- package/dist/assets/noto-sans-sc-72-wght-normal-C4oWy3ul.woff2 +0 -0
- package/dist/assets/noto-sans-sc-73-wght-normal-B1ZoOTgM.woff2 +0 -0
- package/dist/assets/noto-sans-sc-74-wght-normal-F7dH_rZJ.woff2 +0 -0
- package/dist/assets/noto-sans-sc-75-wght-normal-Cp2wp4si.woff2 +0 -0
- package/dist/assets/noto-sans-sc-76-wght-normal-B494D7xS.woff2 +0 -0
- package/dist/assets/noto-sans-sc-77-wght-normal-B3MVY9Ax.woff2 +0 -0
- package/dist/assets/noto-sans-sc-78-wght-normal-5jX7iNMC.woff2 +0 -0
- package/dist/assets/noto-sans-sc-79-wght-normal-BIoZy8fr.woff2 +0 -0
- package/dist/assets/noto-sans-sc-80-wght-normal-Bje1Fxy1.woff2 +0 -0
- package/dist/assets/noto-sans-sc-81-wght-normal-B2NN7Qi3.woff2 +0 -0
- package/dist/assets/noto-sans-sc-82-wght-normal-CUggNZi4.woff2 +0 -0
- package/dist/assets/noto-sans-sc-83-wght-normal-99rD8YO-.woff2 +0 -0
- package/dist/assets/noto-sans-sc-84-wght-normal-zMBmUocm.woff2 +0 -0
- package/dist/assets/noto-sans-sc-85-wght-normal-CjI3qdxG.woff2 +0 -0
- package/dist/assets/noto-sans-sc-86-wght-normal-BHY8TVEH.woff2 +0 -0
- package/dist/assets/noto-sans-sc-87-wght-normal-DioZSHnU.woff2 +0 -0
- package/dist/assets/noto-sans-sc-88-wght-normal-BXYxwf2t.woff2 +0 -0
- package/dist/assets/noto-sans-sc-89-wght-normal-ClMFrFaL.woff2 +0 -0
- package/dist/assets/noto-sans-sc-90-wght-normal-BnOlPreP.woff2 +0 -0
- package/dist/assets/noto-sans-sc-91-wght-normal-DTr9RQcS.woff2 +0 -0
- package/dist/assets/noto-sans-sc-97-wght-normal-9u6Aiav-.woff2 +0 -0
- package/dist/assets/noto-sans-sc-98-wght-normal-BR-H2C0V.woff2 +0 -0
- package/dist/assets/noto-sans-sc-99-wght-normal-BI6XPoxp.woff2 +0 -0
- package/dist/assets/noto-sans-sc-cyrillic-wght-normal-BGmsQlw-.woff2 +0 -0
- package/dist/assets/noto-sans-sc-latin-ext-wght-normal-DuJTpTg_.woff2 +0 -0
- package/dist/assets/noto-sans-sc-latin-wght-normal-DDW8mKAR.woff2 +0 -0
- package/dist/assets/noto-sans-sc-vietnamese-wght-normal-Bi3ATJ76.woff2 +0 -0
- package/dist/avatar.d.ts +11 -0
- package/dist/avatar.js +25 -0
- package/dist/compatibility-info.d.ts +11 -0
- package/dist/compatibility-info.js +12 -0
- package/dist/delivery-failure.d.ts +4 -0
- package/dist/delivery-failure.js +10 -0
- package/dist/fonts.css +1 -0
- package/dist/format.d.ts +25 -0
- package/dist/format.js +33 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +20 -0
- package/dist/licenses/geist-mono.txt +93 -0
- package/dist/licenses/geist.txt +93 -0
- package/dist/licenses/noto-sans-sc.txt +93 -0
- package/dist/logo.d.ts +3 -0
- package/dist/logo.js +8 -0
- package/dist/markdown.d.ts +4 -0
- package/dist/markdown.js +25 -0
- package/dist/message-chart.d.ts +6 -0
- package/dist/message-chart.js +103 -0
- package/dist/motion.d.ts +45 -0
- package/dist/motion.js +22 -0
- package/dist/plugin-page-layout.d.ts +7 -0
- package/dist/plugin-page-layout.js +6 -0
- package/dist/provider.d.ts +4 -0
- package/dist/provider.js +6 -0
- package/dist/schema-form.d.ts +26 -0
- package/dist/schema-form.js +227 -0
- package/dist/segments.d.ts +10 -0
- package/dist/segments.js +81 -0
- package/dist/styles.css +2 -0
- package/dist/trace-view.d.ts +6 -0
- package/dist/trace-view.js +58 -0
- package/dist/types.d.ts +79 -0
- package/dist/types.js +1 -0
- package/dist/ui/button.d.ts +25 -0
- package/dist/ui/button.js +24 -0
- package/dist/ui/dialog.d.ts +20 -0
- package/dist/ui/dialog.js +17 -0
- package/dist/ui/input.d.ts +14 -0
- package/dist/ui/input.js +15 -0
- package/dist/ui/misc.d.ts +62 -0
- package/dist/ui/misc.js +53 -0
- package/dist/ui/primitives.d.ts +59 -0
- package/dist/ui/primitives.js +51 -0
- package/dist/ui/select.d.ts +14 -0
- package/dist/ui/select.js +7 -0
- package/dist/ui/switch.d.ts +8 -0
- package/dist/ui/switch.js +8 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +5 -0
- package/package.json +67 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface SelectOption<V extends string> {
|
|
3
|
+
value: V;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function Select<V extends string>({ value, onValueChange, options, placeholder, className, disabled, 'aria-label': ariaLabel, }: {
|
|
7
|
+
value: V | undefined;
|
|
8
|
+
onValueChange: (value: V) => void;
|
|
9
|
+
options: SelectOption<V>[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
'aria-label'?: string;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
+
import { Check, ChevronDown } from 'lucide-react';
|
|
4
|
+
import { cn } from '../utils.js';
|
|
5
|
+
export function Select({ value, onValueChange, options, placeholder, className, disabled, 'aria-label': ariaLabel, }) {
|
|
6
|
+
return (_jsxs(SelectPrimitive.Root, { disabled: disabled, value: value ?? '', onValueChange: (next) => onValueChange(next), children: [_jsxs(SelectPrimitive.Trigger, { "aria-label": ariaLabel, className: cn('inline-flex h-9 min-w-32 cursor-pointer items-center justify-between gap-2 rounded-[10px] border border-border bg-surface px-3 text-[13.5px] text-fg shadow-card outline-none transition-[border-color,box-shadow] hover:border-border-strong focus-visible:border-accent focus-visible:shadow-[0_0_0_3px_var(--ring)] data-[placeholder]:text-fg-3 disabled:cursor-not-allowed disabled:opacity-60', className), children: [_jsx(SelectPrimitive.Value, { placeholder: placeholder }), _jsx(SelectPrimitive.Icon, { children: _jsx(ChevronDown, { className: "size-3.5 text-fg-3" }) })] }), _jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Content, { position: "popper", sideOffset: 6, className: "z-50 max-h-72 min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-xl border border-border bg-surface p-1 shadow-pop data-[state=open]:animate-[pop-in_160ms_cubic-bezier(0.16,1,0.3,1)]", children: _jsx(SelectPrimitive.Viewport, { children: options.map((option) => (_jsxs(SelectPrimitive.Item, { value: option.value, className: "relative flex h-8 cursor-pointer items-center rounded-lg pr-8 pl-2.5 text-[13px] text-fg-2 outline-none select-none data-[highlighted]:bg-surface-2 data-[highlighted]:text-fg data-[state=checked]:text-fg", children: [_jsx(SelectPrimitive.ItemText, { children: option.label }), _jsx(SelectPrimitive.ItemIndicator, { className: "absolute right-2.5", children: _jsx(Check, { className: "size-3.5 text-accent", strokeWidth: 2.5 }) })] }, option.value))) }) }) })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function Switch({ id, checked, onCheckedChange, disabled, className, 'aria-label': ariaLabel, }: {
|
|
2
|
+
id?: string;
|
|
3
|
+
checked: boolean;
|
|
4
|
+
onCheckedChange: (checked: boolean) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
'aria-label'?: string;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
import { motion } from 'motion/react';
|
|
4
|
+
import { snappy } from '../motion.js';
|
|
5
|
+
import { cn } from '../utils.js';
|
|
6
|
+
export function Switch({ id, checked, onCheckedChange, disabled, className, 'aria-label': ariaLabel, }) {
|
|
7
|
+
return (_jsx(SwitchPrimitive.Root, { id: id, checked: checked, onCheckedChange: onCheckedChange, disabled: disabled, "aria-label": ariaLabel, className: cn('relative inline-flex h-[22px] w-[38px] shrink-0 cursor-pointer items-center rounded-full p-[2px] transition-colors duration-200', 'disabled:cursor-not-allowed disabled:opacity-50', checked ? 'bg-accent' : 'bg-surface-3 shadow-[inset_0_0_0_1px_var(--border-strong)]', className), children: _jsx(SwitchPrimitive.Thumb, { asChild: true, children: _jsx(motion.span, { layout: true, transition: snappy, className: cn('block size-[18px] rounded-full bg-white shadow-[0_1px_3px_rgb(0_0_0/0.25),0_0_0_0.5px_rgb(0_0_0/0.04)]', checked ? 'ml-auto' : 'ml-0') }) }) }));
|
|
8
|
+
}
|
package/dist/utils.d.ts
ADDED
package/dist/utils.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asabot/panel-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "AsaBot 控制台和插件页面共用的 React 组件与主题",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/isyuah/AsaBot.git",
|
|
10
|
+
"directory": "packages/panel-ui"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./markdown": {
|
|
18
|
+
"types": "./dist/markdown.d.ts",
|
|
19
|
+
"default": "./dist/markdown.js"
|
|
20
|
+
},
|
|
21
|
+
"./styles.css": "./dist/styles.css",
|
|
22
|
+
"./fonts.css": "./dist/fonts.css"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"sideEffects": [
|
|
33
|
+
"**/*.css"
|
|
34
|
+
],
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": "^19.0.0",
|
|
37
|
+
"react-dom": "^19.0.0"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@radix-ui/react-dialog": "^1.3.1",
|
|
41
|
+
"@radix-ui/react-dropdown-menu": "^2.2.1",
|
|
42
|
+
"@radix-ui/react-select": "^2.4.1",
|
|
43
|
+
"@radix-ui/react-switch": "^1.4.1",
|
|
44
|
+
"@radix-ui/react-tabs": "^1.2.1",
|
|
45
|
+
"@radix-ui/react-tooltip": "^1.4.1",
|
|
46
|
+
"clsx": "^2.1.1",
|
|
47
|
+
"lucide-react": "^1.71.0",
|
|
48
|
+
"motion": "^14.12.0",
|
|
49
|
+
"react-markdown": "^10.1.0",
|
|
50
|
+
"remark-gfm": "^4.0.1",
|
|
51
|
+
"tailwind-merge": "^3.7.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@fontsource-variable/geist": "^5.3.0",
|
|
55
|
+
"@fontsource-variable/geist-mono": "^5.3.0",
|
|
56
|
+
"@fontsource-variable/noto-sans-sc": "^5.3.1",
|
|
57
|
+
"@tailwindcss/vite": "^4.3.5",
|
|
58
|
+
"@types/react": "^19.3.0",
|
|
59
|
+
"@types/react-dom": "^19.3.0",
|
|
60
|
+
"react": "^19.3.1",
|
|
61
|
+
"react-dom": "^19.3.1",
|
|
62
|
+
"tailwindcss": "^4.3.5",
|
|
63
|
+
"typescript": "^7.0.2",
|
|
64
|
+
"vite": "^8.3.8"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "vite build && tsc -p tsconfig.json",
|
|
68
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
69
|
+
}
|
|
6
70
|
}
|