@lec-space/liquidglass 0.0.0-stage → 1.0.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 +22 -0
- package/README.md +58 -2
- package/dist/button-BCSOcrTI.cjs +1 -0
- package/dist/button-SXD_7EGY.js +970 -0
- package/dist/index.cjs +2 -0
- package/dist/index.js +4440 -0
- package/dist/styles.css +3804 -0
- package/dist/types/activity-calendar.d.ts +18 -0
- package/dist/types/alert.d.ts +18 -0
- package/dist/types/avatar.d.ts +12 -0
- package/dist/types/badge.d.ts +13 -0
- package/dist/types/button.d.ts +16 -0
- package/dist/types/card.d.ts +10 -0
- package/dist/types/checkbox.d.ts +9 -0
- package/dist/types/command-palette.d.ts +22 -0
- package/dist/types/config-provider.d.ts +62 -0
- package/dist/types/context-menu.d.ts +17 -0
- package/dist/types/data-table.d.ts +32 -0
- package/dist/types/date-range-picker.d.ts +23 -0
- package/dist/types/descriptions.d.ts +13 -0
- package/dist/types/dialog.d.ts +19 -0
- package/dist/types/drawer.d.ts +7 -0
- package/dist/types/empty.d.ts +8 -0
- package/dist/types/filter-bar.d.ts +9 -0
- package/dist/types/form-field.d.ts +19 -0
- package/dist/types/glass-group.d.ts +10 -0
- package/dist/types/glass.d.ts +3 -0
- package/dist/types/import-wizard.d.ts +11 -0
- package/dist/types/index.d.ts +53 -0
- package/dist/types/input.d.ts +11 -0
- package/dist/types/internal/bend.d.ts +15 -0
- package/dist/types/internal/calendar-day.d.ts +13 -0
- package/dist/types/internal/chevron.d.ts +6 -0
- package/dist/types/internal/contour.d.ts +10 -0
- package/dist/types/internal/controllable.d.ts +1 -0
- package/dist/types/internal/cx.d.ts +1 -0
- package/dist/types/internal/date-only.d.ts +4 -0
- package/dist/types/internal/field-error.d.ts +6 -0
- package/dist/types/internal/floating.d.ts +15 -0
- package/dist/types/internal/form-reset.d.ts +3 -0
- package/dist/types/internal/hold.d.ts +8 -0
- package/dist/types/internal/href.d.ts +7 -0
- package/dist/types/internal/jelly.d.ts +22 -0
- package/dist/types/internal/modal.d.ts +11 -0
- package/dist/types/internal/placement.d.ts +33 -0
- package/dist/types/internal/press.d.ts +2 -0
- package/dist/types/internal/range-calendar-navigation.d.ts +6 -0
- package/dist/types/internal/range-calendar.d.ts +11 -0
- package/dist/types/internal/refraction.d.ts +20 -0
- package/dist/types/internal/scroller.d.ts +2 -0
- package/dist/types/internal/sheet-drag.d.ts +17 -0
- package/dist/types/internal/spring.d.ts +13 -0
- package/dist/types/internal/styles.d.ts +5 -0
- package/dist/types/internal/tab-motion.d.ts +2 -0
- package/dist/types/internal/tree-branch.d.ts +13 -0
- package/dist/types/member-picker.d.ts +15 -0
- package/dist/types/menu.d.ts +61 -0
- package/dist/types/message.d.ts +12 -0
- package/dist/types/multi-select.d.ts +25 -0
- package/dist/types/navigation-bar.d.ts +25 -0
- package/dist/types/page-control.d.ts +13 -0
- package/dist/types/pagination.d.ts +12 -0
- package/dist/types/popover.d.ts +20 -0
- package/dist/types/progress.d.ts +10 -0
- package/dist/types/radio.d.ts +8 -0
- package/dist/types/search-field.d.ts +5 -0
- package/dist/types/segmented-control.d.ts +14 -0
- package/dist/types/select.d.ts +20 -0
- package/dist/types/sheet.d.ts +14 -0
- package/dist/types/skeleton.d.ts +9 -0
- package/dist/types/slider.d.ts +10 -0
- package/dist/types/statistic.d.ts +11 -0
- package/dist/types/stepper.d.ts +12 -0
- package/dist/types/style-entry.d.ts +1 -0
- package/dist/types/switch.d.ts +7 -0
- package/dist/types/tab-bar.d.ts +23 -0
- package/dist/types/table.d.ts +22 -0
- package/dist/types/tabs.d.ts +19 -0
- package/dist/types/tag.d.ts +10 -0
- package/dist/types/text-area.d.ts +13 -0
- package/dist/types/toast.d.ts +35 -0
- package/dist/types/toolbar.d.ts +13 -0
- package/dist/types/tooltip.d.ts +16 -0
- package/dist/types/tree.d.ts +18 -0
- package/dist/types/typography.d.ts +11 -0
- package/dist/types/upload.d.ts +15 -0
- package/dist/types/workspace.d.ts +22 -0
- package/dist/workspace.cjs +1 -0
- package/dist/workspace.js +42 -0
- package/package.json +65 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 文件选择与拖放入口,校验大小、数量和类型,网络上传由接入项目处理。 */
|
|
2
|
+
import { type JSX } from "react";
|
|
3
|
+
export interface UploadProps {
|
|
4
|
+
value?: readonly File[];
|
|
5
|
+
defaultValue?: readonly File[];
|
|
6
|
+
onValueChange?: (files: File[]) => void;
|
|
7
|
+
accept?: string;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
maxFiles?: number;
|
|
10
|
+
maxBytes?: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
progress?: number;
|
|
13
|
+
"aria-label": string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Upload({ value, defaultValue, onValueChange, accept, multiple, maxFiles, maxBytes, disabled, progress, "aria-label": label, }: UploadProps): JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** 可选分栏工作区,复用项目已有的面板引擎;从独立 workspace 入口按需加载。 */
|
|
2
|
+
import "./style-entry.js";
|
|
3
|
+
import { type JSX, type ReactNode } from "react";
|
|
4
|
+
import { type Layout, type PanelProps } from "react-resizable-panels";
|
|
5
|
+
export interface WorkspacePanel {
|
|
6
|
+
id: string;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
content: ReactNode;
|
|
9
|
+
defaultSize?: PanelProps["defaultSize"];
|
|
10
|
+
minSize?: PanelProps["minSize"];
|
|
11
|
+
maxSize?: PanelProps["maxSize"];
|
|
12
|
+
collapsible?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ResizableWorkspaceProps {
|
|
15
|
+
panels: readonly WorkspacePanel[];
|
|
16
|
+
direction?: "horizontal" | "vertical";
|
|
17
|
+
defaultLayout?: Layout;
|
|
18
|
+
onLayoutChange?: (layout: Layout) => void;
|
|
19
|
+
onReset?: () => void;
|
|
20
|
+
"aria-label": string;
|
|
21
|
+
}
|
|
22
|
+
export declare function ResizableWorkspace({ panels, direction, defaultLayout, onLayoutChange, onReset, "aria-label": label, }: ResizableWorkspaceProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./button-BCSOcrTI.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("react-resizable-panels");function i({panels:i,direction:a=`horizontal`,defaultLayout:o,onLayoutChange:s,onReset:c,"aria-label":l}){return(0,n.jsxs)(`div`,{className:`lg-workspace`,"aria-label":l,children:[c&&(0,n.jsx)(`div`,{className:`lg-workspace-tools`,children:(0,n.jsx)(e.t,{size:`small`,onClick:c,children:`重置布局`})}),(0,n.jsx)(r.Group,{style:{flex:1,minHeight:0},orientation:a,defaultLayout:o,onLayoutChanged:e=>s?.(e),children:i.map((e,i)=>(0,n.jsxs)(t.Fragment,{children:[i>0&&(0,n.jsx)(r.Separator,{className:`lg-workspace-separator`,"aria-label":`调整分栏`}),(0,n.jsx)(r.Panel,{id:e.id,defaultSize:e.defaultSize,minSize:e.minSize,maxSize:e.maxSize,collapsible:e.collapsible,children:(0,n.jsxs)(`section`,{className:`lg-workspace-panel`,children:[(0,n.jsx)(`header`,{children:e.title}),(0,n.jsx)(`div`,{children:e.content})]})})]},e.id))})]})}exports.ResizableWorkspace=i;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { t as e } from "./button-SXD_7EGY.js";
|
|
2
|
+
import { Fragment as t } from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Group as i, Panel as a, Separator as o } from "react-resizable-panels";
|
|
5
|
+
// src/workspace.tsx
|
|
6
|
+
function s({ panels: s, direction: c = "horizontal", defaultLayout: l, onLayoutChange: u, onReset: d, "aria-label": f }) {
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
className: "lg-workspace",
|
|
9
|
+
"aria-label": f,
|
|
10
|
+
children: [d && /* @__PURE__ */ n("div", {
|
|
11
|
+
className: "lg-workspace-tools",
|
|
12
|
+
children: /* @__PURE__ */ n(e, {
|
|
13
|
+
size: "small",
|
|
14
|
+
onClick: d,
|
|
15
|
+
children: "重置布局"
|
|
16
|
+
})
|
|
17
|
+
}), /* @__PURE__ */ n(i, {
|
|
18
|
+
style: {
|
|
19
|
+
flex: 1,
|
|
20
|
+
minHeight: 0
|
|
21
|
+
},
|
|
22
|
+
orientation: c,
|
|
23
|
+
defaultLayout: l,
|
|
24
|
+
onLayoutChanged: (e) => u?.(e),
|
|
25
|
+
children: s.map((e, i) => /* @__PURE__ */ r(t, { children: [i > 0 && /* @__PURE__ */ n(o, {
|
|
26
|
+
className: "lg-workspace-separator",
|
|
27
|
+
"aria-label": "调整分栏"
|
|
28
|
+
}), /* @__PURE__ */ n(a, {
|
|
29
|
+
id: e.id,
|
|
30
|
+
defaultSize: e.defaultSize,
|
|
31
|
+
minSize: e.minSize,
|
|
32
|
+
maxSize: e.maxSize,
|
|
33
|
+
collapsible: e.collapsible,
|
|
34
|
+
children: /* @__PURE__ */ r("section", {
|
|
35
|
+
className: "lg-workspace-panel",
|
|
36
|
+
children: [/* @__PURE__ */ n("header", { children: e.title }), /* @__PURE__ */ n("div", { children: e.content })]
|
|
37
|
+
})
|
|
38
|
+
})] }, e.id))
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export { s as ResizableWorkspace };
|
package/package.json
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lec-space/liquidglass",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"./src/style-entry.ts",
|
|
8
|
+
"./src/index.ts",
|
|
9
|
+
"./src/workspace.tsx",
|
|
10
|
+
"./dist/*.js",
|
|
11
|
+
"./dist/*.cjs",
|
|
12
|
+
"**/*.css"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/types/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"require": "./dist/index.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./workspace": {
|
|
21
|
+
"types": "./dist/types/workspace.d.ts",
|
|
22
|
+
"import": "./dist/workspace.js",
|
|
23
|
+
"require": "./dist/workspace.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./styles.css": "./dist/styles.css"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"react": ">=18",
|
|
29
|
+
"react-dom": ">=18",
|
|
30
|
+
"react-resizable-panels": "^4.21.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/react": "19.3.0",
|
|
34
|
+
"@types/react-dom": "19.3.0",
|
|
35
|
+
"typescript": "5.9.3",
|
|
36
|
+
"vite": "8.3.7",
|
|
37
|
+
"react-resizable-panels": "4.21.0"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"LICENSE",
|
|
42
|
+
"README.md"
|
|
43
|
+
],
|
|
44
|
+
"peerDependenciesMeta": {
|
|
45
|
+
"react-resizable-panels": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public",
|
|
51
|
+
"registry": "https://registry.npmjs.org"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@daypicker/react": "10.0.2"
|
|
55
|
+
},
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "git+https://github.com/lec-org/liquidglass.git"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://lec-org.github.io/liquidglass/",
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/lec-org/liquidglass/issues"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"typecheck": "tsc --noEmit",
|
|
66
|
+
"build": "vite build && tsc -p tsconfig.build.json && node scripts/finalize-build.mjs"
|
|
67
|
+
}
|
|
6
68
|
}
|