@haiyue/ui 0.2.1 → 0.3.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/CHANGELOG.md +46 -0
- package/LICENSE +27 -0
- package/README.md +707 -5
- package/dist/adapters/web/controls.js +28 -5
- package/dist/adapters/web/renderer.js +11 -10
- package/dist/adapters/web/styles.d.ts +2 -3
- package/dist/adapters/web/styles.js +42 -18
- package/dist/alert.d.ts +39 -0
- package/dist/alert.js +144 -0
- package/dist/anchor.d.ts +60 -0
- package/dist/anchor.js +274 -0
- package/dist/auto-complete.d.ts +83 -0
- package/dist/auto-complete.js +267 -0
- package/dist/avatar.d.ts +45 -0
- package/dist/avatar.js +135 -0
- package/dist/badge.js +5 -5
- package/dist/border-beam.js +1 -1
- package/dist/breadcrumb.js +5 -5
- package/dist/button-group.js +8 -8
- package/dist/button.js +10 -10
- package/dist/card.d.ts +29 -0
- package/dist/card.js +101 -0
- package/dist/carousel.d.ts +92 -0
- package/dist/carousel.js +509 -0
- package/dist/cascader.js +12 -12
- package/dist/checkbox.d.ts +12 -0
- package/dist/checkbox.js +22 -6
- package/dist/collapse.d.ts +13 -0
- package/dist/collapse.js +100 -13
- package/dist/context-menu.js +3 -3
- package/dist/core/types.d.ts +22 -3
- package/dist/core/validation.js +9 -4
- package/dist/date-picker.js +13 -13
- package/dist/descriptions.d.ts +44 -0
- package/dist/descriptions.js +169 -0
- package/dist/dialog.js +11 -11
- package/dist/divider.js +2 -2
- package/dist/draggable.js +1 -1
- package/dist/drawer.js +12 -12
- package/dist/dropdown.js +3 -3
- package/dist/empty.d.ts +20 -0
- package/dist/empty.js +58 -0
- package/dist/expandable.js +4 -4
- package/dist/form-item.d.ts +60 -0
- package/dist/form-item.js +212 -0
- package/dist/form.d.ts +41 -0
- package/dist/form.js +154 -0
- package/dist/history-controls.js +5 -5
- package/dist/image-preview.d.ts +22 -0
- package/dist/image-preview.js +38 -0
- package/dist/image.d.ts +52 -0
- package/dist/image.js +152 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.js +84 -0
- package/dist/input.d.ts +11 -0
- package/dist/input.js +29 -15
- package/dist/internal/anchored-popup.d.ts +19 -0
- package/dist/internal/anchored-popup.js +89 -0
- package/dist/internal/form-control.d.ts +22 -0
- package/dist/internal/form-control.js +52 -0
- package/dist/internal/image-viewer.d.ts +51 -0
- package/dist/internal/image-viewer.js +210 -0
- package/dist/internal/pagination.d.ts +35 -0
- package/dist/internal/pagination.js +169 -0
- package/dist/internal/popover-base.d.ts +87 -0
- package/dist/internal/popover-base.js +365 -0
- package/dist/internal/presentation.d.ts +2 -0
- package/dist/internal/presentation.js +28 -0
- package/dist/internal/qrcodegen.d.ts +94 -0
- package/dist/internal/qrcodegen.js +856 -0
- package/dist/masonry.d.ts +36 -0
- package/dist/masonry.js +171 -0
- package/dist/mentions.d.ts +115 -0
- package/dist/mentions.js +485 -0
- package/dist/menu-shared.d.ts +1 -1
- package/dist/menu-shared.js +3 -3
- package/dist/menu.d.ts +63 -0
- package/dist/menu.js +339 -0
- package/dist/modal.d.ts +73 -0
- package/dist/modal.js +361 -0
- package/dist/notification.js +9 -9
- package/dist/pagination.d.ts +34 -0
- package/dist/pagination.js +73 -0
- package/dist/popconfirm.d.ts +6 -0
- package/dist/popconfirm.js +7 -0
- package/dist/popover.d.ts +6 -0
- package/dist/popover.js +7 -0
- package/dist/portable/icons.d.ts +5 -0
- package/dist/portable/icons.js +24 -0
- package/dist/portable/index.d.ts +3 -0
- package/dist/portable/index.js +2 -0
- package/dist/portable/responsive.d.ts +20 -0
- package/dist/portable/responsive.js +15 -0
- package/dist/portable/theme.d.ts +6 -1
- package/dist/portable/theme.js +23 -3
- package/dist/progress.d.ts +30 -0
- package/dist/progress.js +102 -0
- package/dist/qr-code.d.ts +62 -0
- package/dist/qr-code.js +224 -0
- package/dist/radio.d.ts +10 -0
- package/dist/radio.js +18 -5
- package/dist/range.js +7 -7
- package/dist/rate.js +3 -3
- package/dist/resizable.js +4 -4
- package/dist/result.d.ts +22 -0
- package/dist/result.js +88 -0
- package/dist/ribbon.d.ts +19 -0
- package/dist/ribbon.js +106 -0
- package/dist/segmented.d.ts +39 -0
- package/dist/segmented.js +192 -0
- package/dist/select.d.ts +12 -0
- package/dist/select.js +31 -13
- package/dist/skeleton.js +10 -10
- package/dist/spin.d.ts +26 -0
- package/dist/spin.js +80 -0
- package/dist/steps.js +13 -13
- package/dist/switch.d.ts +44 -0
- package/dist/switch.js +104 -0
- package/dist/table.d.ts +0 -2
- package/dist/table.js +46 -87
- package/dist/tabs.js +7 -7
- package/dist/tag.js +8 -8
- package/dist/time-picker.js +10 -10
- package/dist/timeline.js +12 -12
- package/dist/toast.js +9 -9
- package/dist/tooltip.js +4 -4
- package/dist/tour.js +11 -11
- package/dist/tree-node.js +2 -2
- package/dist/tree-select.d.ts +94 -0
- package/dist/tree-select.js +398 -0
- package/dist/tree.js +6 -5
- package/dist/upload.d.ts +107 -0
- package/dist/upload.js +353 -0
- package/dist/virtual-keyboard.js +5 -5
- package/dist/virtual-list.js +4 -4
- package/dist/virtual-mouse.js +5 -5
- package/package.json +99 -1
- package/themes/haiyue-dark.css +51 -0
- package/themes/haiyue-light.css +51 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.3.0 - 2026-11-24
|
|
6
|
+
|
|
7
|
+
- 发布检查兼容 npm 11/12 的打包结果格式。
|
|
8
|
+
|
|
9
|
+
- 完善月白/夜阑皮肤的语义颜色、间距、字体、行高、圆角和控件尺寸 token,组件样式统一继承规范参数;新增设计规范示例和陶土皮肤。
|
|
10
|
+
|
|
11
|
+
- Table 与 Pagination 复用内部分页控件,统一页码渲染、条数选择、键盘/RTL 导航和基础样式;表格分页通过 `table-change` 输出筛选后的总数,切换每页条数时回到首页。
|
|
12
|
+
|
|
13
|
+
- 新增 `HYRibbon` / `<hy-ribbon>` 缎带组件,支持文字与富文本插槽、自定义配色、随 RTL 方向适配的起始侧/末尾侧位置和主题 token;提供独立入口、根注册及可调节的 Card 示例。
|
|
14
|
+
|
|
15
|
+
- 新增低优先级组件 `HYEmpty`、`HYResult`、`HYAvatar`、`HYCard` 和 `HYDescriptions`,支持空状态与结果展示、头像图片/文字回退、卡片插槽与保留正文的加载态、响应式属性详情与跨列;提供独立入口、显式注册、主题化交互示例及浏览器回归。
|
|
16
|
+
|
|
17
|
+
- 优化 example 页皮肤按钮的大小和居中对齐,增加以陶土为初始配置的自定义皮肤及独立设置入口;面板支持颜色、字体、间距、圆角、控件尺寸的实时预览、本地保存和恢复初始值,并适配移动端。
|
|
18
|
+
|
|
19
|
+
- 修复 Image 通过 CSS 指定组件尺寸时内部显示区域未跟随高度,导致 fit 效果不正确的问题;示例改用明显不同比例的原图和容器,补充五种 fit 模式说明及实际像素差异回归。
|
|
20
|
+
|
|
21
|
+
- 新增中优先级组件 `HYAutoComplete`、`HYMenu`、`HYPagination`、`HYTreeSelect`、`HYImage` 和 `HYImagePreview`,提供独立子路径、显式注册、主题化示例与浏览器契约测试;覆盖自由文本补全、层级导航、独立分页、树形单/多选、图片加载/回退及多图模态预览。
|
|
22
|
+
- AutoComplete/TreeSelect 支持原生表单提交、校验、禁用 fieldset 和重置;表单 `setValues()` 支持树选择与原生 select 的多值。共享内部浮层与图片预览实现,保持组件入口隔离和零运行时依赖。
|
|
23
|
+
|
|
24
|
+
- 新增独立入口及根注册的 `HYSwitch`、`HYProgress`、`HYSpin`、`HYPopover`、`HYPopconfirm`、`HYForm`、`HYFormItem` 和 `HYUpload`:覆盖设置开关、直线/圆环进度、延迟加载遮罩、可交互浮层与异步确认、表单与异步校验、文件选择/拖放/上传进度/重试/取消。
|
|
25
|
+
- Input、Select、Checkbox、Radio、Mentions 与新增 Switch、Upload 支持原生表单关联、FormData、禁用 fieldset 和重置;保留既有交互事件及按需导入边界。新增主题化参数示例、键盘/焦点/异步生命周期回归,并更新公开 API 和包体积基线。
|
|
26
|
+
|
|
27
|
+
- 新增 `HYMentions` / `<hy-mentions>` 及独立 `@haiyue/ui/mentions` 入口:支持多行提及输入、单个或多个触发前缀、候选过滤与禁用项、光标定位弹层、键盘选择、中文输入法、异步搜索与加载态;补齐主题变量、交互示例和浏览器回归。
|
|
28
|
+
|
|
29
|
+
## 0.2.3 - 2026-10-27
|
|
30
|
+
|
|
31
|
+
- 新增可按需导入的 `HYAnchor` / `<hy-anchor>`、`HYAlert` / `<hy-alert>` 与 `HYSegmented` / `<hy-segmented>`:分别提供滚动锚点导航与当前项跟踪、四种语义反馈及可取消关闭、可访问的分段单选与禁用项键盘导航;Anchor 在点击触发的平滑滚动期间会锁定目标高亮,避免途经区块造成闪烁;同步加入根导出、独立子路径、主题化示例和浏览器回归。
|
|
32
|
+
|
|
33
|
+
- Windows 下 API 隔离门禁改用目录 junction,避免普通 symlink 权限导致的间歇性 `EPERM`,不影响发布包内容或组件运行时。
|
|
34
|
+
|
|
35
|
+
## 0.2.2 - 2026-10-23
|
|
36
|
+
|
|
37
|
+
- 新增 `HYModal` / `<hy-modal>` 及独立 `@haiyue/ui/modal` 入口:支持原生模态层、标题/正文/页脚插槽、确认与取消按钮、可阻止的操作事件、异步确认加载态、独立遮罩/Esc/关闭按钮控制、受控状态、焦点恢复、滚动锁与隐藏内容卸载。
|
|
38
|
+
|
|
39
|
+
- 新增 `HYQRCode` / `<hy-qr-code>` 二维码组件及独立 `@haiyue/ui/qr-code` 入口,支持本地 SVG 编码、Unicode、尺寸/颜色/纠错等级、中央图片或 icon 插槽及留白配置;带图标时默认采用 H 级纠错,允许显式选择其他等级并限制遮挡面积,提供空值/超容量/图标加载失败状态。修复示例中带图标时纠错等级下拉框无法选择的问题。
|
|
40
|
+
|
|
41
|
+
- Collapse 新增 `animated` 与 `animation-duration` / `animationDuration`,支持可配置时长和缓动的展开/收起动画、快速反向切换、内容尺寸变化、减少动态效果偏好与断开清理;收起时立即同步无障碍状态,`destroyOnHidden` 延迟到动画完成后销毁内容。
|
|
42
|
+
|
|
43
|
+
- 新增 `HYCarousel` / `<hy-carousel>` 轮播组件及独立 `@haiyue/ui/carousel` 入口:支持自定义指示点样式/位置/渲染、自动播放与暂停、拖拽、循环、水平/垂直切换、键盘导航、非活动面板 inert、减少动态效果偏好与完整生命周期清理。
|
|
44
|
+
|
|
45
|
+
- 新增可按需导入的 `HYMasonry` / `<hy-masonry>` 瀑布流组件:支持最短列布局、自动或固定列数、最小列宽、间距、动态内容与容器尺寸响应、RTL、布局事件及断开清理;组件示例按类别内字母顺序排列。
|
|
46
|
+
|
|
47
|
+
- 扩展 portable/core 与 Web 适配器的呈现契约:按钮样式/尺寸/矢量图标、文字样式与色调、Tabs 分段模式、Select 呈现配置及字体缩放主题;新增 FormGroup 帮助文字、响应式布局辅助函数,并保持控件焦点、输入与选择状态。
|
|
48
|
+
|
|
3
49
|
## 0.2.1 - 2026-10-20
|
|
4
50
|
|
|
5
51
|
- 新增可按需导入的 `HYTag` / `<hy-tag>` 标签组件,支持语义与自定义配色、三种尺寸、文字或 icon 插槽、可取消的关闭事件、可选择状态、键盘操作和禁用状态;新增 `HYToast` / `<hy-toast>` 轻提示组件,支持五种状态、上/中/下位置、自动或持久显示、最大数量、手动关闭/清空、生命周期事件与完整计时器清理。
|
package/LICENSE
CHANGED
|
@@ -19,3 +19,30 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
Vendored QR Code encoder: src/internal/qrcodegen.ts
|
|
25
|
+
Source: https://github.com/nayuki/QR-Code-generator/blob/master/typescript-javascript/qrcodegen.ts
|
|
26
|
+
Upstream Git blob: c4191ac0b5f8a24d87fd9340ceaa2d3b07d0231a
|
|
27
|
+
Local changes: ES module export, strict indexed-access assertions, and formatting.
|
|
28
|
+
|
|
29
|
+
QR Code generator library (TypeScript)
|
|
30
|
+
|
|
31
|
+
Copyright (c) Project Nayuki. (MIT License)
|
|
32
|
+
https://www.nayuki.io/page/qr-code-generator-library
|
|
33
|
+
|
|
34
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
35
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
36
|
+
the Software without restriction, including without limitation the rights to
|
|
37
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
38
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
39
|
+
subject to the following conditions:
|
|
40
|
+
- The above copyright notice and this permission notice shall be included in
|
|
41
|
+
all copies or substantial portions of the Software.
|
|
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 the
|
|
48
|
+
Software.
|