@dsh-plugin/dsh-ui-components-vue 0.0.0-stage → 0.1.0-dev.44009856440
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/NOTICE +57 -0
- package/README.md +66 -2
- package/README.zh_CN.md +67 -0
- package/dist/icons.js +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +2682 -0
- package/dist/style.css +1 -0
- package/dist/vue/arco.d.ts +8 -0
- package/dist/vue/basic.d.ts +3629 -0
- package/dist/vue/button.d.ts +78 -0
- package/dist/vue/color-model.d.ts +2 -0
- package/dist/vue/color.d.ts +3 -0
- package/dist/vue/components.d.ts +48 -0
- package/dist/vue/date-input.d.ts +35 -0
- package/dist/vue/icons.d.ts +2 -0
- package/dist/vue/overlays.d.ts +33 -0
- package/dist/vue/picker-model.d.ts +37 -0
- package/dist/vue/picker.d.ts +1290 -0
- package/dist/vue/popup.d.ts +28 -0
- package/dist/vue/primitives.d.ts +288 -0
- package/dist/vue/progress.d.ts +104 -0
- package/dist/vue/provider.d.ts +90 -0
- package/dist/vue/selection-model.d.ts +22 -0
- package/dist/vue/selection.d.ts +186 -0
- package/dist/vue/toast-layout.d.ts +2 -0
- package/docs/vue-coverage.md +75 -0
- package/licenses/HeroUI-Apache-2.0.txt +199 -0
- package/package.json +74 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, dsh-ui-components contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Vue 发布产物依赖 Arco Design Vue 与 Vue,样式参考 HeroUI 的语义层级。
|
|
2
|
+
|
|
3
|
+
Arco Design Vue(含随包发布的基础样式):https://github.com/arco-design/arco-design-vue
|
|
4
|
+
|
|
5
|
+
MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2021 Bytedance, Inc. and its affiliates.
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
Vue:https://github.com/vuejs/core
|
|
27
|
+
|
|
28
|
+
The MIT License (MIT)
|
|
29
|
+
|
|
30
|
+
Copyright (c) 2018-present, Yuxi (Evan) You
|
|
31
|
+
|
|
32
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
33
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
34
|
+
in the Software without restriction, including without limitation the rights
|
|
35
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
36
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
37
|
+
furnished to do so, subject to the following conditions:
|
|
38
|
+
|
|
39
|
+
The above copyright notice and this permission notice shall be included in
|
|
40
|
+
all copies or substantial portions of the Software.
|
|
41
|
+
|
|
42
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
43
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
44
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
45
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
46
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
47
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
48
|
+
THE SOFTWARE.
|
|
49
|
+
|
|
50
|
+
HeroUI 3.2.7 第三方声明
|
|
51
|
+
|
|
52
|
+
本包的主题令牌、组件视觉规则和 SVG 图形改编自 @heroui/styles 与 @heroui/react 3.2.7。
|
|
53
|
+
原项目:https://github.com/heroui-inc/heroui
|
|
54
|
+
Copyright 2025 NextUI Inc.
|
|
55
|
+
许可:Apache License, Version 2.0,全文随包提供于 licenses/HeroUI-Apache-2.0.txt。
|
|
56
|
+
|
|
57
|
+
改编内容包括:将官方主题变量限定于 DshProvider,将组件选择器映射到 Arco Design 的公开渲染结构,以及通过公开图标与面板插槽复用官方图形和视觉布局。
|
package/README.md
CHANGED
|
@@ -1,3 +1,67 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Vue 组件库
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@dsh-plugin/dsh-ui-components-vue` 在 `vue` 分支提供基于 Arco Design Vue 的组件库,使用 HeroUI 风格的表面、圆角、阴影、焦点环与交互状态。
|
|
4
|
+
|
|
5
|
+
验收基线为 `@arco-design/web-vue` 全部组件及子组件。组件参数、事件、`v-model` 和插槽沿用 Arco Vue;与 HeroUI 的逐项视觉对应、额外组件和迁移差异见 [组件对照](docs/vue-coverage.md)。React 版本使用独立的 `react` 分支及包名 `@dsh-plugin/dsh-ui-components`。
|
|
6
|
+
|
|
7
|
+
## 使用
|
|
8
|
+
|
|
9
|
+
本地构建后可通过 `npm pack` 生成安装包。发布名称为 `@dsh-plugin/dsh-ui-components-vue`;当前工作区修改不代表已发布到 npm。
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { ref } from 'vue'
|
|
14
|
+
import { DshProvider, Button, Input, FormItem, Select, Modal } from '@dsh-plugin/dsh-ui-components-vue'
|
|
15
|
+
import '@dsh-plugin/dsh-ui-components-vue/style.css'
|
|
16
|
+
|
|
17
|
+
const name = ref('')
|
|
18
|
+
const mode = ref('standard')
|
|
19
|
+
const visible = ref(false)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<DshProvider theme="auto" radius="md">
|
|
24
|
+
<FormItem label="名称">
|
|
25
|
+
<Input v-model="name" />
|
|
26
|
+
</FormItem>
|
|
27
|
+
<Select v-model="mode" :options="['standard', 'custom']" />
|
|
28
|
+
<Button variant="primary" @click="visible = true">打开</Button>
|
|
29
|
+
<Modal v-model:visible="visible" title="设置">
|
|
30
|
+
{{ name }}
|
|
31
|
+
</Modal>
|
|
32
|
+
</DshProvider>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 主题与浮层
|
|
37
|
+
|
|
38
|
+
`DshProvider` 支持 `theme="auto|light|dark"`、`radius="none|sm|md|lg|full"`、`reducedMotion`、`locale` 与 `rtl`。`auto` 优先读取 DSH/Arco 宿主主题,再使用系统偏好;动画默认遵循系统的减少动画设置。
|
|
39
|
+
|
|
40
|
+
在 Provider 的 `style` 中覆盖 `--dsh-accent`、`--dsh-surface`、`--dsh-radius` 等变量即可调整局部主题。每个 Provider 拥有独立 body 浮层容器,复制根元素的最终 CSS 变量,并在卸载时回收。
|
|
41
|
+
|
|
42
|
+
所有带浮层的组件应置于 Provider 内。Modal、Drawer 和 AlertDialog 的顶部和底部各保留 120px,内容使用 Arco Vue Scrollbar。弹窗支持 Escape、焦点限制、关闭后焦点恢复和 `trigger/header/footer` 插槽。Vue 运行环境直接复用 Arco Vue 滚动条。
|
|
43
|
+
|
|
44
|
+
命令式消息优先在 Provider 后代的 `setup` 中调用 `useFeedback()`,取得作用域内的 `message` 与 `notification`;`useToast()` 提供简化短提示。原生 `Message`、`Notification` 导出保留 Arco 全局语义,局部主题使用作用域接口。
|
|
45
|
+
|
|
46
|
+
## 公开入口
|
|
47
|
+
|
|
48
|
+
- 根入口包含全部 Arco Vue 组件及子组件,以及 HeroUI 风格的 Button、ProgressBar、ProgressCircle、Meter、TextField、SearchField、InputOTP、ListBox、ToggleButton、Toolbar 等补充组件。
|
|
49
|
+
- `Arco` 命名空间保留原始 Arco Vue 的全部参数和组件,适合需要原生 Button、Link、InputGroup API 的调用方。局部主题浮层优先使用根入口包装组件。
|
|
50
|
+
- `useDialog()` 返回当前 Provider 内的 `modal`、`drawer` 命令式接口,支持 `open`、`confirm`、`close` 与 `update`,用来替代原始静态弹窗调用。
|
|
51
|
+
- `Button` 支持 `primary/secondary/tertiary/outline/ghost/danger/danger-soft` 变体与 `sm/md/lg` 尺寸;其余 Arco 控件保留 Arco 的尺寸命名。
|
|
52
|
+
- 图标通过 `@dsh-plugin/dsh-ui-components-vue/icons` 以 Arco Vue 图标名导入,构建器可移除未使用图标。
|
|
53
|
+
- 样式单独通过 `style.css` 导入;Vue 和 Arco 的 JavaScript 作为共享依赖,包中不包含 React 或 dsh-loader。
|
|
54
|
+
|
|
55
|
+
## 开发与验证
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
npm install
|
|
59
|
+
npm run typecheck
|
|
60
|
+
npm run build
|
|
61
|
+
npm test
|
|
62
|
+
npm run verify:arco
|
|
63
|
+
npm run preview:build
|
|
64
|
+
npm run preview
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
预览入口位于 `docs/preview/App.vue`,组件源码位于 `src/vue/`,根出口位于 `src/index.ts`。`verify:arco` 根据安装版本的官方声明核对发布入口,新增依赖组件时会同步进入核对范围。单元测试针对选择状态、验证码处理和进度归一化等自研规则;交互与视觉在预览中验收。
|
package/README.zh_CN.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# DSH Vue 组件库
|
|
2
|
+
|
|
3
|
+
`@dsh-plugin/dsh-ui-components-vue` 在 `vue` 分支提供基于 Arco Design Vue 的组件库,使用 HeroUI 风格的表面、圆角、阴影、焦点环与交互状态。
|
|
4
|
+
|
|
5
|
+
验收基线为 `@arco-design/web-vue` 全部组件及子组件。组件参数、事件、`v-model` 和插槽沿用 Arco Vue;与 HeroUI 的逐项视觉对应、额外组件和迁移差异见 [组件对照](docs/vue-coverage.md)。React 版本使用独立的 `react` 分支及包名 `@dsh-plugin/dsh-ui-components`。
|
|
6
|
+
|
|
7
|
+
## 使用
|
|
8
|
+
|
|
9
|
+
本地构建后可通过 `npm pack` 生成安装包。发布名称为 `@dsh-plugin/dsh-ui-components-vue`;当前工作区修改不代表已发布到 npm。
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { ref } from 'vue'
|
|
14
|
+
import { DshProvider, Button, Input, FormItem, Select, Modal } from '@dsh-plugin/dsh-ui-components-vue'
|
|
15
|
+
import '@dsh-plugin/dsh-ui-components-vue/style.css'
|
|
16
|
+
|
|
17
|
+
const name = ref('')
|
|
18
|
+
const mode = ref('standard')
|
|
19
|
+
const visible = ref(false)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<DshProvider theme="auto" radius="md">
|
|
24
|
+
<FormItem label="名称">
|
|
25
|
+
<Input v-model="name" />
|
|
26
|
+
</FormItem>
|
|
27
|
+
<Select v-model="mode" :options="['standard', 'custom']" />
|
|
28
|
+
<Button variant="primary" @click="visible = true">打开</Button>
|
|
29
|
+
<Modal v-model:visible="visible" title="设置">
|
|
30
|
+
{{ name }}
|
|
31
|
+
</Modal>
|
|
32
|
+
</DshProvider>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 主题与浮层
|
|
37
|
+
|
|
38
|
+
`DshProvider` 支持 `theme="auto|light|dark"`、`radius="none|sm|md|lg|full"`、`reducedMotion`、`locale` 与 `rtl`。`auto` 优先读取 DSH/Arco 宿主主题,再使用系统偏好;动画默认遵循系统的减少动画设置。
|
|
39
|
+
|
|
40
|
+
在 Provider 的 `style` 中覆盖 `--dsh-accent`、`--dsh-surface`、`--dsh-radius` 等变量即可调整局部主题。每个 Provider 拥有独立 body 浮层容器,复制根元素的最终 CSS 变量,并在卸载时回收。
|
|
41
|
+
|
|
42
|
+
所有带浮层的组件应置于 Provider 内。Modal、Drawer 和 AlertDialog 的顶部和底部各保留 120px,内容使用 Arco Vue Scrollbar。弹窗支持 Escape、焦点限制、关闭后焦点恢复和 `trigger/header/footer` 插槽。Vue 运行环境直接复用 Arco Vue 滚动条。
|
|
43
|
+
|
|
44
|
+
命令式消息优先在 Provider 后代的 `setup` 中调用 `useFeedback()`,取得作用域内的 `message` 与 `notification`;`useToast()` 提供简化短提示。原生 `Message`、`Notification` 导出保留 Arco 全局语义,局部主题使用作用域接口。
|
|
45
|
+
|
|
46
|
+
## 公开入口
|
|
47
|
+
|
|
48
|
+
- 根入口包含全部 Arco Vue 组件及子组件,以及 HeroUI 风格的 Button、ProgressBar、ProgressCircle、Meter、TextField、SearchField、InputOTP、ListBox、ToggleButton、Toolbar 等补充组件。
|
|
49
|
+
- `Arco` 命名空间保留原始 Arco Vue 的全部参数和组件,适合需要原生 Button、Link、InputGroup API 的调用方。局部主题浮层优先使用根入口包装组件。
|
|
50
|
+
- `useDialog()` 返回当前 Provider 内的 `modal`、`drawer` 命令式接口,支持 `open`、`confirm`、`close` 与 `update`,用来替代原始静态弹窗调用。
|
|
51
|
+
- `Button` 支持 `primary/secondary/tertiary/outline/ghost/danger/danger-soft` 变体与 `sm/md/lg` 尺寸;其余 Arco 控件保留 Arco 的尺寸命名。
|
|
52
|
+
- 图标通过 `@dsh-plugin/dsh-ui-components-vue/icons` 以 Arco Vue 图标名导入,构建器可移除未使用图标。
|
|
53
|
+
- 样式单独通过 `style.css` 导入;Vue 和 Arco 的 JavaScript 作为共享依赖,包中不包含 React 或 dsh-loader。
|
|
54
|
+
|
|
55
|
+
## 开发与验证
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
npm install
|
|
59
|
+
npm run typecheck
|
|
60
|
+
npm run build
|
|
61
|
+
npm test
|
|
62
|
+
npm run verify:arco
|
|
63
|
+
npm run preview:build
|
|
64
|
+
npm run preview
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
预览入口位于 `docs/preview/App.vue`,组件源码位于 `src/vue/`,根出口位于 `src/index.ts`。`verify:arco` 根据安装版本的官方声明核对发布入口,新增依赖组件时会同步进入核对范围。单元测试针对选择状态、验证码处理和进度归一化等自研规则;交互与视觉在预览中验收。
|
package/dist/icons.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@arco-design/web-vue/es/icon/index.js";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Vue 分支入口:Arco 交互组件、HeroUI 风格主题与 DSH 组合组件。 */
|
|
2
|
+
export * as Arco from './vue/arco.js';
|
|
3
|
+
export * from './vue/components.js';
|
|
4
|
+
export * from './vue/button.js';
|
|
5
|
+
export * from './vue/progress.js';
|
|
6
|
+
export * from './vue/provider.js';
|
|
7
|
+
export * from './vue/overlays.js';
|
|
8
|
+
export * from './vue/primitives.js';
|
|
9
|
+
export * from './vue/selection.js';
|
|
10
|
+
export { Button, CloseButton } from './vue/button.js';
|
|
11
|
+
export { Alert, Progress, Spin, InputNumber, InputTag, Tag, Result } from './vue/basic.js';
|
|
12
|
+
export type { ButtonProps } from './vue/button.js';
|
|
13
|
+
export { Link, InputGroup } from './vue/primitives.js';
|
|
14
|
+
export { Modal, Drawer } from './vue/overlays.js';
|
|
15
|
+
export { AutoComplete, Autocomplete, Cascader, MonthPicker, QuarterPicker, WeekPicker, YearPicker, Dropdown, Dsubmenu, DropdownButton, Select, TreeSelect, TimePicker, Tooltip, Popover, Popconfirm, Trigger, Mention } from './vue/popup.js';
|
|
16
|
+
export { ColorPicker } from './vue/color.js';
|
|
17
|
+
export { DatePicker, RangePicker, DateRangePicker, Calendar } from './vue/picker.js';
|
|
18
|
+
export { Menu, Image, ImagePreview, ImagePreviewGroup } from './vue/popup.js';
|
|
19
|
+
export { Tree } from './vue/basic.js';
|