@robert-stackflow/oneui 0.0.0-stage → 0.2.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 +18 -0
- package/README.md +72 -2
- package/assets/LUCIDE-LICENSE.txt +43 -0
- package/assets/character-metadata.json +1 -0
- package/assets/emoji.json +1 -0
- package/assets/icon-catalog.json +1 -0
- package/assets/symbols.json +1 -0
- package/components/Accessibility.module.css +8 -0
- package/components/Accordion.d.ts +7 -0
- package/components/Accordion.js +41 -0
- package/components/Accordion.module.css +38 -0
- package/components/Alert.d.ts +9 -0
- package/components/Alert.js +42 -0
- package/components/Alert.module.css +56 -0
- package/components/AppShell.d.ts +30 -0
- package/components/AppShell.js +152 -0
- package/components/AppShell.module.css +239 -0
- package/components/AppearanceSettings.d.ts +7 -0
- package/components/AppearanceSettings.js +201 -0
- package/components/AppearanceSettings.module.css +32 -0
- package/components/Avatar.d.ts +14 -0
- package/components/Avatar.js +69 -0
- package/components/Avatar.module.css +70 -0
- package/components/AvatarGroup.d.ts +15 -0
- package/components/AvatarGroup.js +115 -0
- package/components/AvatarGroup.module.css +54 -0
- package/components/Badge.d.ts +5 -0
- package/components/Badge.js +11 -0
- package/components/Badge.module.css +30 -0
- package/components/BlockedTab.d.ts +4 -0
- package/components/BlockedTab.js +10 -0
- package/components/Breadcrumb.d.ts +16 -0
- package/components/Breadcrumb.js +157 -0
- package/components/Breadcrumb.module.css +97 -0
- package/components/Button.d.ts +13 -0
- package/components/Button.js +52 -0
- package/components/Button.module.css +88 -0
- package/components/Calendar.d.ts +10 -0
- package/components/Calendar.js +260 -0
- package/components/Calendar.module.css +106 -0
- package/components/Card.d.ts +8 -0
- package/components/Card.js +29 -0
- package/components/Card.module.css +47 -0
- package/components/Cascader.d.ts +14 -0
- package/components/Cascader.js +296 -0
- package/components/CatalogIcon.d.ts +3 -0
- package/components/CatalogIcon.js +11 -0
- package/components/CharacterPicker.d.ts +15 -0
- package/components/CharacterPicker.js +200 -0
- package/components/Checkbox.d.ts +12 -0
- package/components/Checkbox.js +82 -0
- package/components/Checkbox.module.css +95 -0
- package/components/ColorField.d.ts +6 -0
- package/components/ColorField.js +61 -0
- package/components/ColorField.module.css +15 -0
- package/components/ColorPicker.d.ts +5 -0
- package/components/ColorPicker.js +188 -0
- package/components/ColorPicker.module.css +90 -0
- package/components/Combobox.d.ts +13 -0
- package/components/Combobox.js +338 -0
- package/components/Combobox.module.css +24 -0
- package/components/CommandPalette.d.ts +25 -0
- package/components/CommandPalette.js +269 -0
- package/components/CommandPalette.module.css +49 -0
- package/components/ContextMenu.d.ts +9 -0
- package/components/ContextMenu.js +363 -0
- package/components/ContextMenu.module.css +42 -0
- package/components/ContextMenuPanel.d.ts +22 -0
- package/components/ContextMenuPanel.js +155 -0
- package/components/ContributionCalendar.d.ts +18 -0
- package/components/ContributionCalendar.js +201 -0
- package/components/ContributionCalendar.module.css +114 -0
- package/components/ContributionCell.d.ts +11 -0
- package/components/ContributionCell.js +41 -0
- package/components/Control.module.css +86 -0
- package/components/DataTable.d.ts +49 -0
- package/components/DataTable.js +220 -0
- package/components/DataTable.module.css +112 -0
- package/components/DatePicker.d.ts +15 -0
- package/components/DatePicker.js +186 -0
- package/components/DatePicker.module.css +85 -0
- package/components/DateRangePicker.d.ts +9 -0
- package/components/DateRangePicker.js +168 -0
- package/components/Descriptions.d.ts +21 -0
- package/components/Descriptions.js +162 -0
- package/components/Descriptions.module.css +117 -0
- package/components/Dialog.d.ts +14 -0
- package/components/Dialog.js +125 -0
- package/components/Dialog.module.css +88 -0
- package/components/DialogVariants.d.ts +27 -0
- package/components/DialogVariants.js +161 -0
- package/components/DialogVariants.module.css +29 -0
- package/components/DisclosureChevron.d.ts +3 -0
- package/components/DisclosureChevron.js +17 -0
- package/components/DisclosureChevron.module.css +17 -0
- package/components/Divider.d.ts +5 -0
- package/components/Divider.js +24 -0
- package/components/Divider.module.css +19 -0
- package/components/Drawer.d.ts +18 -0
- package/components/Drawer.js +145 -0
- package/components/Drawer.module.css +109 -0
- package/components/EmojiPicker.d.ts +6 -0
- package/components/EmojiPicker.js +19 -0
- package/components/EmptyState.d.ts +8 -0
- package/components/EmptyState.js +20 -0
- package/components/EmptyState.module.css +30 -0
- package/components/FieldLabel.d.ts +8 -0
- package/components/FieldLabel.js +20 -0
- package/components/FieldMessages.d.ts +5 -0
- package/components/FieldMessages.js +15 -0
- package/components/FileDropOverlay.d.ts +5 -0
- package/components/FileDropOverlay.js +26 -0
- package/components/FileDropOverlay.module.css +55 -0
- package/components/FileDropZone.d.ts +15 -0
- package/components/FileDropZone.js +113 -0
- package/components/FileDropZone.module.css +6 -0
- package/components/FilePicker.d.ts +10 -0
- package/components/FilePicker.js +59 -0
- package/components/FileSelectionFeedback.d.ts +5 -0
- package/components/FileSelectionFeedback.js +23 -0
- package/components/FileSelectionFeedback.module.css +14 -0
- package/components/FileTree.d.ts +13 -0
- package/components/FileTree.js +125 -0
- package/components/FileTree.module.css +66 -0
- package/components/Form.d.ts +7 -0
- package/components/Form.js +26 -0
- package/components/Form.module.css +7 -0
- package/components/FormErrorSummary.d.ts +6 -0
- package/components/FormErrorSummary.js +27 -0
- package/components/FormErrorSummary.module.css +27 -0
- package/components/FormField.d.ts +9 -0
- package/components/FormField.js +59 -0
- package/components/FormField.module.css +85 -0
- package/components/FormGroup.d.ts +9 -0
- package/components/FormGroup.js +32 -0
- package/components/HierarchyPicker.module.css +181 -0
- package/components/IconButton.d.ts +7 -0
- package/components/IconButton.js +30 -0
- package/components/IconButton.module.css +42 -0
- package/components/IconPicker.d.ts +6 -0
- package/components/IconPicker.js +111 -0
- package/components/Indicator.d.ts +18 -0
- package/components/Indicator.js +97 -0
- package/components/Indicator.module.css +83 -0
- package/components/Input.d.ts +8 -0
- package/components/Input.js +37 -0
- package/components/Input.module.css +40 -0
- package/components/LoadingOverlay.d.ts +6 -0
- package/components/LoadingOverlay.js +16 -0
- package/components/LoadingOverlay.module.css +22 -0
- package/components/LoadingState.d.ts +7 -0
- package/components/LoadingState.js +40 -0
- package/components/LoadingState.module.css +17 -0
- package/components/Menu.d.ts +11 -0
- package/components/Menu.js +82 -0
- package/components/MenuItem.d.ts +15 -0
- package/components/MenuItem.js +51 -0
- package/components/MenuItem.module.css +172 -0
- package/components/MenuItemContent.d.ts +8 -0
- package/components/MenuItemContent.js +19 -0
- package/components/MultiSelect.d.ts +13 -0
- package/components/MultiSelect.js +225 -0
- package/components/MultiSelect.module.css +99 -0
- package/components/NumberInput.d.ts +12 -0
- package/components/NumberInput.js +114 -0
- package/components/NumberInput.module.css +33 -0
- package/components/OptionList.module.css +12 -0
- package/components/Page.d.ts +7 -0
- package/components/Page.js +22 -0
- package/components/Page.module.css +44 -0
- package/components/Pagination.d.ts +11 -0
- package/components/Pagination.js +160 -0
- package/components/Pagination.module.css +70 -0
- package/components/PasswordField.d.ts +9 -0
- package/components/PasswordField.js +102 -0
- package/components/PasswordField.module.css +64 -0
- package/components/Picker.module.css +52 -0
- package/components/PinInput.d.ts +13 -0
- package/components/PinInput.js +173 -0
- package/components/PinInput.module.css +72 -0
- package/components/Placeholder.d.ts +31 -0
- package/components/Placeholder.js +36 -0
- package/components/Popconfirm.d.ts +17 -0
- package/components/Popconfirm.js +159 -0
- package/components/Popconfirm.module.css +49 -0
- package/components/Popover.d.ts +16 -0
- package/components/Popover.js +156 -0
- package/components/Popover.module.css +19 -0
- package/components/Progress.d.ts +5 -0
- package/components/Progress.js +31 -0
- package/components/Progress.module.css +33 -0
- package/components/RadioGroup.d.ts +15 -0
- package/components/RadioGroup.js +73 -0
- package/components/RadioGroup.module.css +87 -0
- package/components/RangeSlider.d.ts +22 -0
- package/components/RangeSlider.js +278 -0
- package/components/RangeSlider.module.css +141 -0
- package/components/ResizablePanel.d.ts +21 -0
- package/components/ResizablePanel.js +219 -0
- package/components/ResizablePanel.module.css +101 -0
- package/components/SearchField.d.ts +11 -0
- package/components/SearchField.js +67 -0
- package/components/SearchField.module.css +37 -0
- package/components/Section.d.ts +6 -0
- package/components/Section.js +18 -0
- package/components/Section.module.css +14 -0
- package/components/Segmented.d.ts +11 -0
- package/components/Segmented.js +77 -0
- package/components/Segmented.module.css +82 -0
- package/components/Select.d.ts +11 -0
- package/components/Select.js +172 -0
- package/components/Select.module.css +24 -0
- package/components/SelectOptionContent.d.ts +5 -0
- package/components/SelectOptionContent.js +20 -0
- package/components/SelectOptionContent.module.css +7 -0
- package/components/SelectTrigger.d.ts +5 -0
- package/components/SelectTrigger.js +32 -0
- package/components/SelectTrigger.module.css +24 -0
- package/components/SelectionTag.d.ts +8 -0
- package/components/SelectionTag.js +39 -0
- package/components/SettingRow.d.ts +7 -0
- package/components/SettingRow.js +19 -0
- package/components/SettingRow.module.css +44 -0
- package/components/SettingsLayout.d.ts +11 -0
- package/components/SettingsLayout.js +61 -0
- package/components/SettingsLayout.module.css +68 -0
- package/components/ShortcutInput.d.ts +8 -0
- package/components/ShortcutInput.js +131 -0
- package/components/ShortcutInput.module.css +39 -0
- package/components/Skeleton.d.ts +5 -0
- package/components/Skeleton.js +19 -0
- package/components/Skeleton.module.css +27 -0
- package/components/SkeletonRows.d.ts +4 -0
- package/components/SkeletonRows.js +19 -0
- package/components/SkeletonRows.module.css +19 -0
- package/components/SkinTonePicker.d.ts +4 -0
- package/components/SkinTonePicker.js +43 -0
- package/components/SkinTonePicker.module.css +50 -0
- package/components/Slider.d.ts +10 -0
- package/components/Slider.js +40 -0
- package/components/Slider.module.css +19 -0
- package/components/Spinner.d.ts +6 -0
- package/components/Spinner.js +31 -0
- package/components/Spinner.module.css +57 -0
- package/components/SplitButton.d.ts +17 -0
- package/components/SplitButton.js +102 -0
- package/components/SplitButton.module.css +56 -0
- package/components/Statistic.d.ts +22 -0
- package/components/Statistic.js +102 -0
- package/components/Statistic.module.css +55 -0
- package/components/Steps.d.ts +19 -0
- package/components/Steps.js +102 -0
- package/components/Steps.module.css +176 -0
- package/components/Switch.d.ts +6 -0
- package/components/Switch.js +25 -0
- package/components/Switch.module.css +59 -0
- package/components/SymbolPicker.d.ts +6 -0
- package/components/SymbolPicker.js +18 -0
- package/components/Tab.module.css +145 -0
- package/components/TabList.d.ts +11 -0
- package/components/TabList.js +51 -0
- package/components/Table.d.ts +16 -0
- package/components/Table.js +30 -0
- package/components/Table.module.css +48 -0
- package/components/TableColumnFilter.d.ts +6 -0
- package/components/TableColumnFilter.js +76 -0
- package/components/TableColumnVisibility.d.ts +11 -0
- package/components/TableColumnVisibility.js +76 -0
- package/components/Tabs.d.ts +13 -0
- package/components/Tabs.js +49 -0
- package/components/Tabs.module.css +3 -0
- package/components/TagInput.d.ts +11 -0
- package/components/TagInput.js +142 -0
- package/components/TagInput.module.css +64 -0
- package/components/Textarea.d.ts +6 -0
- package/components/Textarea.js +24 -0
- package/components/Textarea.module.css +9 -0
- package/components/ThemePicker.d.ts +6 -0
- package/components/ThemePicker.js +78 -0
- package/components/ThemePicker.module.css +178 -0
- package/components/ThemeProvider.d.ts +11 -0
- package/components/ThemeProvider.js +94 -0
- package/components/ThemeStylePicker.d.ts +5 -0
- package/components/ThemeStylePicker.js +22 -0
- package/components/TimeColumns.d.ts +6 -0
- package/components/TimeColumns.js +55 -0
- package/components/TimeColumns.module.css +47 -0
- package/components/Timeline.d.ts +26 -0
- package/components/Timeline.js +131 -0
- package/components/Timeline.module.css +202 -0
- package/components/Toast.d.ts +6 -0
- package/components/Toast.js +181 -0
- package/components/Toast.module.css +175 -0
- package/components/ToastProvider.d.ts +35 -0
- package/components/ToastProvider.js +47 -0
- package/components/Tooltip.d.ts +10 -0
- package/components/Tooltip.js +169 -0
- package/components/Tooltip.module.css +53 -0
- package/components/TreeGuides.d.ts +9 -0
- package/components/TreeGuides.js +39 -0
- package/components/TreeGuides.module.css +45 -0
- package/components/TreeSelect.d.ts +26 -0
- package/components/TreeSelect.js +337 -0
- package/components/TreeTable.d.ts +15 -0
- package/components/TreeTable.js +151 -0
- package/components/TreeTable.module.css +53 -0
- package/components/UIProvider.d.ts +10 -0
- package/components/UIProvider.js +20 -0
- package/components/UnderlinedTab.d.ts +2 -0
- package/components/UnderlinedTab.js +8 -0
- package/components/Upload.d.ts +22 -0
- package/components/Upload.js +165 -0
- package/components/Upload.module.css +36 -0
- package/components/UploadList.d.ts +9 -0
- package/components/UploadList.js +14 -0
- package/components/UploadList.module.css +130 -0
- package/components/UploadListItem.d.ts +13 -0
- package/components/UploadListItem.js +122 -0
- package/components/VirtualPickerList.d.ts +25 -0
- package/components/VirtualPickerList.js +269 -0
- package/components/VirtualPickerList.module.css +93 -0
- package/components/appearance.d.ts +20 -0
- package/components/appearance.js +69 -0
- package/components/characterCatalog.d.ts +9 -0
- package/components/characterCatalog.js +55 -0
- package/components/color.d.ts +7 -0
- package/components/color.js +18 -0
- package/components/contribution.d.ts +57 -0
- package/components/contribution.js +86 -0
- package/components/dateConstraints.d.ts +13 -0
- package/components/dateConstraints.js +44 -0
- package/components/field.d.ts +58 -0
- package/components/field.js +57 -0
- package/components/fileSelection.d.ts +21 -0
- package/components/fileSelection.js +43 -0
- package/components/hierarchy.d.ts +23 -0
- package/components/hierarchy.js +33 -0
- package/components/iconCatalog.d.ts +13 -0
- package/components/iconCatalog.js +80 -0
- package/components/index.d.ts +152 -0
- package/components/index.js +225 -0
- package/components/menuFocus.d.ts +7 -0
- package/components/menuFocus.js +21 -0
- package/components/menuPointer.d.ts +6 -0
- package/components/menuPointer.js +13 -0
- package/components/menuTypes.d.ts +24 -0
- package/components/menuTypes.js +0 -0
- package/components/motion.d.ts +9 -0
- package/components/motion.js +82 -0
- package/components/rangeMath.d.ts +12 -0
- package/components/rangeMath.js +30 -0
- package/components/surfacePortal.d.ts +13 -0
- package/components/surfacePortal.js +22 -0
- package/components/tooltipState.d.ts +5 -0
- package/components/tooltipState.js +48 -0
- package/components/types.d.ts +9 -0
- package/components/types.js +0 -0
- package/components/uploadTypes.d.ts +21 -0
- package/components/uploadTypes.js +0 -0
- package/components/useFormState.d.ts +51 -0
- package/components/useFormState.js +218 -0
- package/components/useHierarchy.d.ts +8 -0
- package/components/useHierarchy.js +80 -0
- package/components/useMenuLayers.d.ts +17 -0
- package/components/useMenuLayers.js +23 -0
- package/components/useModalScrollLock.d.ts +1 -0
- package/components/useModalScrollLock.js +18 -0
- package/components/usePopover.d.ts +8 -0
- package/components/usePopover.js +22 -0
- package/components/useTabIndicator.d.ts +12 -0
- package/components/useTabIndicator.js +63 -0
- package/components/useUploadQueue.d.ts +20 -0
- package/components/useUploadQueue.js +175 -0
- package/package.json +810 -3
- package/styles/base.css +206 -0
- package/styles/blue.css +268 -0
- package/styles/desktop.css +2 -0
- package/styles/minimal.css +337 -0
- package/styles/themes.css +2 -0
- package/styles/web.css +2 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0 — 2026-10-28
|
|
4
|
+
|
|
5
|
+
- 新增 MessageDialog、ConfirmDialog、FormDialog 与统一 LoadingState,复用表单校验、异步提交、错误反馈和焦点管理。
|
|
6
|
+
- TreeSelect 新增 category 图标、数量、层级连线样式;保留 tree 风格,支持父子联动多选。
|
|
7
|
+
- 新增 TreeTable,复用 Table 列定义,支持受控展开、多级连线和键盘导航;列支持 align、width。
|
|
8
|
+
- Combobox 新增 mode="input" 触发框补全;保留弹层搜索,支持异步加载、取消、创建与失败重试。
|
|
9
|
+
- MultiSelect 新增 display="tags",与 TagInput 共用标签实现;保留摘要模式及选择限制。
|
|
10
|
+
- 蓝白主题采用 Moment 对应色板、输入 hover 混色和深色参数;修复默认色板迁移与选择器分类栏底色。
|
|
11
|
+
- 统一菜单项 1px 间距,修复快捷键右对齐、宿主 kbd 边框干扰、关闭的 Popover 被布局样式显示等问题。
|
|
12
|
+
- 树选择器底部清空/完成操作使用独立的 8px 按钮间距。
|
|
13
|
+
- 共享应用外壳与示例布局统一,修复图标尺寸、链接文字、动效示例、表单间距、弹层和移动布局。
|
|
14
|
+
- 发布构建使用干净输出并检查包内引用;增加独立 tarball 消费项目的类型、生产与交互验证。
|
|
15
|
+
|
|
16
|
+
## 0.1.0 — 2026-10-28
|
|
17
|
+
|
|
18
|
+
- 首次发布 React 组件、应用外壳、极简/蓝白主题与图标字符资源。
|
package/README.md
CHANGED
|
@@ -1,3 +1,73 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @robert-stackflow/oneui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React 组件、应用外壳和两套可互换的主题。无 Electron、React Router、账户 API 或持久化存储依赖。
|
|
4
|
+
|
|
5
|
+
## 使用
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install @robert-stackflow/oneui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { ThemeProvider, UIProvider, ToastProvider, Button } from '@robert-stackflow/oneui';
|
|
13
|
+
import '@robert-stackflow/oneui/styles/themes.css';
|
|
14
|
+
import '@robert-stackflow/oneui/styles/base.css';
|
|
15
|
+
|
|
16
|
+
export function App() {
|
|
17
|
+
return (
|
|
18
|
+
<ThemeProvider theme="minimal" mode="system">
|
|
19
|
+
<UIProvider>
|
|
20
|
+
<ToastProvider>
|
|
21
|
+
<Button variant="primary">继续</Button>
|
|
22
|
+
</ToastProvider>
|
|
23
|
+
</UIProvider>
|
|
24
|
+
</ThemeProvider>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`theme` 支持 `minimal`(极简)、`blue`(蓝白);`mode` 支持 `light`、`dark`、`system`。也可以给 `ThemeProvider` 传入由 `appearanceDefaults()`、`normalizeAppearance()` 产生的完整 `appearance`,与 `AppearanceSettings` 共同使用。外观配置的保存与恢复由应用负责。
|
|
30
|
+
|
|
31
|
+
`ThemeProvider` 管理当前文档的主题,应用根部放置一个即可。颜色模式、动效、字体、密度、圆角和自定义配色均由共享层应用。
|
|
32
|
+
|
|
33
|
+
蓝白默认色板取自 Moment 的 `admin/src/styles.css` 最终变量及 `admin/src/main.tsx` 的 victoria 色阶:浅色背景 `#F5F7FB`、面板 `#FFFFFF`、正文 `#25324A`、次级文字 `#8592A8`、边框 `#E3E8F1`。导航/焦点蓝为 `#5067B8`,主按钮为 `#4059AA`,开关为 `#526EDB`;深色同样使用 Moment 的对应值。各颜色用途分开配置,不再共用一种近似蓝。
|
|
34
|
+
|
|
35
|
+
`normalizeAppearance` 使用 `paletteVersion: 2` 兼容旧蓝白默认值;非默认自定义配色保留,已带版本的显式颜色也不会被迁移。Desktop 与 Web 共用该规范化函数。参考值和源码摘要保存在 `tests/fixtures/moment-palette.json`,验证不依赖 Moment 或 Mantine 安装。
|
|
36
|
+
|
|
37
|
+
蓝白输入与选择控件的 hover 边框复用 Moment 的混色规则:强调色 35% 与基础边框色混合。聚焦或展开时使用完整强调色,错误状态保持错误色;禁用、只读控件不响应 hover。图标、Emoji 和符号选择器的分类栏使用透明背景与主题选中块,不继承普通块状标签页的底板和投影。
|
|
38
|
+
|
|
39
|
+
## 边界
|
|
40
|
+
|
|
41
|
+
- `AppShell` 通过导航数据和 `onNavigate` 接入任何路由或状态机制。
|
|
42
|
+
- `headerActions`、`sidebarFooter`、`windowControls` 为应用能力插槽;`draggable` 仅标记 header 的拖动区域。
|
|
43
|
+
- `UIProvider` 配置 Toast 位置、Tooltip 位置和必填标记;组件不读取宿主设置。
|
|
44
|
+
- 普通组件也支持子路径导入,例如 `@robert-stackflow/oneui/Input`。
|
|
45
|
+
- 页面直接复用 Form / FormField / useFormState 的校验与提交状态、Alert 的错误反馈和 ConfirmDialog 的确认流程;避免另写原生表单、按钮样式或错误提示。
|
|
46
|
+
- Button 支持 `href`,渲染标准链接并沿用按钮样式;禁用或加载时阻止导航。Card 传入 `onClick` 后渲染可通过键盘激活的按钮卡片。导航与业务回调由消费应用提供。
|
|
47
|
+
- CSS Modules 随组件分发,由消费项目的构建工具处理。图标/字符目录通过标准 `new URL(..., import.meta.url)` 加载随包资源。
|
|
48
|
+
- React 和 React DOM 为 peer dependencies,不打入组件包。当前验证版本为 React 19.3.1,浏览器验证使用 Chromium。
|
|
49
|
+
|
|
50
|
+
## 弹窗与加载状态
|
|
51
|
+
|
|
52
|
+
`Dialog` 用于自定义内容,支持 small / medium / large。`MessageDialog` 提供纯文字消息与确认按钮,`ConfirmDialog` 提供普通、危险操作确认,`FormDialog` 提供有统一字段间距的表单及保存操作。三者均可从根入口或对应组件子路径导入。
|
|
53
|
+
|
|
54
|
+
确认与表单支持异步回调,等待期间禁止重复提交及关闭,失败时保留内容并显示错误;回调返回 `false` 可保留弹窗。`FormDialog` 接收共享 `useFormState` 的 controller,字段使用 `FormField`,`onSubmit` 接收校验后的 values,错误样式与普通 Form 一致。
|
|
55
|
+
|
|
56
|
+
`LoadingState` 复用 Spinner;`showLabel={false}` 仅显示动画,`fullPage` 用于页面内容区域。应用自行放置等待边界,保留路由外壳。
|
|
57
|
+
|
|
58
|
+
以上 API 从 0.2.0 起提供。
|
|
59
|
+
|
|
60
|
+
## 层级选择、补全与标签
|
|
61
|
+
|
|
62
|
+
- `TreeSelect variant="category"` 在原有树选择交互上增加图标底块、子项数量与层级连线;默认 `variant="tree"` 保留简洁样式。两种样式均支持搜索、父子联动、多选、禁用、异步加载及键盘操作。`HierarchyOption.count` 可单独提供数量。
|
|
63
|
+
- `TreeTable` 复用 `Table` 的列定义,接收 `rows`、`rowKey`、`getChildren`、`rowLabel`;通过 `expanded` / `onExpandedChange` 控制展开,或使用 `defaultExpanded` / `defaultExpandAll`。`treeColumn` 默认为第一列,支持多级连线、方向键导航及独立行操作。`Column.align`、`Column.width` 可用于对齐和列宽。
|
|
64
|
+
- `Combobox mode="input"` 直接在触发框输入并在下方显示候选,保留 `loadOptions`、`onCreate` 和键盘选择。输入中的文本只用于搜索;选择候选或创建成功才提交选项值,关闭时恢复已选标签。默认 `mode="panel"` 继续使用弹层内搜索。
|
|
65
|
+
- `MultiSelect display="tags"` 在触发框内展示可移除标签,复用 `TagInput` 的标签样式;默认 `display="summary"` 保留文字摘要。两种模式共享连续选择、搜索、数量限制和表单值。只读标签不可移除,禁用选项保持不可操作。
|
|
66
|
+
|
|
67
|
+
菜单项间距统一为 `--menu-item-spacing: 1px`,菜单快捷键为靠右的纯文字提示,不预留空的指示器位置。Desktop 与 Web 共用示例:`/pickers?view=hierarchy`、`/forms?view=advanced`、`/data?view=hierarchy`;层级表格中的增删改仅更新示例内存数据。以上扩展从 0.2.0 起提供。
|
|
68
|
+
|
|
69
|
+
## 构建与打包
|
|
70
|
+
|
|
71
|
+
在仓库根目录运行 `npm run pack:ui`。源码工作区供两端即时开发使用;发布内容单独生成到本目录 `dist`,含 ESM、TypeScript 声明、CSS 和资源。构建使用干净的临时目录并检查所有包内引用,成功后替换 dist,避免旧文件混入。`dist/package.json` 只导出生成内容。
|
|
72
|
+
|
|
73
|
+
发布内容已通过独立 Vite 消费项目验证。包的许可为 UNLICENSED;资源目录内保留图标许可文件。
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lucide Icons and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
The following Lucide icons are derived from the Feather project:
|
|
20
|
+
|
|
21
|
+
airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
|
|
22
|
+
|
|
23
|
+
The MIT License (MIT) (for the icons listed above)
|
|
24
|
+
|
|
25
|
+
Copyright (c) 2013-present Cole Bemis
|
|
26
|
+
|
|
27
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
29
|
+
in the Software without restriction, including without limitation the rights
|
|
30
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
31
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
32
|
+
furnished to do so, subject to the following conditions:
|
|
33
|
+
|
|
34
|
+
The above copyright notice and this permission notice shall be included in all
|
|
35
|
+
copies or substantial portions of the Software.
|
|
36
|
+
|
|
37
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
38
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
39
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
40
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
41
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
42
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
43
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"groups": {"Smileys & Emotion": ["笑脸与情感", "Smileys & Emotion"], "People & Body": ["人物与身体", "People & Body"], "Animals & Nature": ["动物与自然", "Animals & Nature"], "Food & Drink": ["食物与饮品", "Food & Drink"], "Travel & Places": ["旅行与地点", "Travel & Places"], "Activities": ["活动", "Activities"], "Objects": ["物品", "Objects"], "Symbols": ["标志", "Symbols"], "Flags": ["旗帜", "Flags"], "Currency": ["货币", "Currency"], "Superscripts": ["上下标", "Superscripts"], "Punctuation": ["标点", "Punctuation"], "CJK punctuation": ["中日韩标点", "CJK punctuation"], "Enclosed numbers": ["带圈字符", "Enclosed numbers"], "Miscellaneous": ["杂项", "Miscellaneous"], "Arrows": ["箭头", "Arrows"], "Math": ["数学", "Math"], "Extra arrows": ["扩展箭头", "Extra arrows"], "Supplemental arrows": ["补充箭头", "Supplemental arrows"], "Supplemental math": ["补充数学", "Supplemental math"], "Technical": ["技术符号", "Technical"], "Box drawing": ["制表与方块", "Box drawing"], "Geometric": ["几何形状", "Geometric"], "Dingbats": ["装饰符号", "Dingbats"], "Braille": ["盲文", "Braille"], "Greek": ["希腊字母", "Greek"], "Roman numerals": ["罗马数字", "Roman numerals"], "Control": ["控制字符", "Control"], "Digits": ["数字", "Digits"], "Uppercase": ["大写字母", "Uppercase"], "Lowercase": ["小写字母", "Lowercase"], "Letters": ["字母", "Letters"], "Other": ["其他", "Other"], "Red": ["红色", "Red"], "Orange": ["橙色", "Orange"], "Yellow": ["黄色", "Yellow"], "Green": ["绿色", "Green"], "Cyan": ["青色", "Cyan"], "Blue": ["蓝色", "Blue"], "Purple": ["紫色", "Purple"], "Pink": ["粉色", "Pink"], "Neutral": ["黑白灰", "Neutral"], "开心": ["开心", "Happy"], "喜欢": ["喜欢", "Love"], "惊讶": ["惊讶", "Surprised"], "难过": ["难过", "Sad"], "生气": ["生气", "Angry"], "动作": ["动作", "Actions"], "动物": ["动物", "Animals"], "application": ["应用与文件", "Application"], "audio": ["音频", "Audio"], "image": ["图像", "Image"], "video": ["视频", "Video"], "text": ["文本", "Text"], "font": ["字体", "Fonts"], "message": ["消息", "Message"], "model": ["模型", "Models"], "multipart": ["多部分内容", "Multipart"], "chemical": ["化学", "Chemical"], "example": ["示例", "Example"], "haptics": ["触觉", "Haptics"]}, "aliases": {"😀": "开心 smile", "😃": "笑脸 happy", "😊": "微笑 blush", "😂": "笑哭 joy", "🥹": "感动 touched", "😍": "喜欢 love", "🥰": "爱慕 hearts", "😎": "酷 cool", "🤔": "思考 thinking", "😴": "睡觉 sleep", "😭": "哭泣 cry", "😡": "生气 angry", "🥳": "庆祝 party", "🤩": "惊喜 star", "🫡": "敬礼 salute", "🙃": "倒脸 upside down", "👍": "赞 thumbs up", "👎": "踩 thumbs down", "👏": "鼓掌 clap", "🙌": "欢呼 raised hands", "👋": "挥手 wave", "🤝": "握手 handshake", "🙏": "感谢 pray", "✌️": "胜利 victory", "👌": "好的 ok", "💪": "加油 strong", "🐱": "猫 cat", "🐶": "狗 dog", "🦊": "狐狸 fox", "🐼": "熊猫 panda", "🐸": "青蛙 frog", "🦋": "蝴蝶 butterfly", "🌸": "花 blossom", "🌲": "树 tree", "🌱": "幼苗 seedling", "☀️": "太阳 sun", "🌙": "月亮 moon", "🌈": "彩虹 rainbow", "💡": "灵感 bulb", "📁": "文件夹 folder", "📌": "图钉 pin", "🎨": "绘画 art", "📷": "相机 camera", "💻": "电脑 computer", "📚": "书 books", "📝": "笔记 memo", "🔑": "钥匙 key", "🎁": "礼物 gift", "⚙️": "设置 gear", "🛠️": "工具 tools", "❤️": "爱心 heart", "💛": "黄心 yellow heart", "💚": "绿心 green heart", "💙": "蓝心 blue heart", "✨": "闪光 sparkles", "⭐": "星星 star", "🔥": "火 fire", "✅": "完成 check", "❌": "错误 cross", "⚠️": "警告 warning", "💯": "满分 hundred", "🎉": "庆祝 confetti", "★": "实心星 star", "☆": "空心星 star outline", "●": "圆 circle", "○": "空心圆", "■": "方块 square", "□": "空心方块", "◆": "菱形 diamond", "◇": "空心菱形", "✓": "勾 check", "✕": "叉 cross", "•": "圆点 bullet", "…": "省略号 ellipsis", "§": "章节 section", "¶": "段落 paragraph", "←": "左 left", "→": "右 right", "↑": "上 up", "↓": "下 down", "↔": "左右 horizontal", "↕": "上下 vertical", "↗": "右上", "↘": "右下", "↖": "左上", "↙": "左下", "⇒": "推出 implies", "⇔": "等价 equivalent", "⤴": "向上转弯", "↩": "返回 return", "±": "正负 plus minus", "×": "乘 multiply", "÷": "除 divide", "≠": "不等 not equal", "≈": "约等 approximate", "≤": "小于等于", "≥": "大于等于", "∞": "无穷 infinity", "√": "平方根 root", "∑": "求和 sum", "∫": "积分 integral", "π": "圆周率 pi", "∈": "属于", "∅": "空集", "∩": "交集", "∪": "并集", "¥": "人民币 yen yuan", "$": "美元 dollar", "€": "欧元 euro", "£": "英镑 pound", "₩": "韩元 won", "₹": "卢比 rupee", "₽": "卢布 ruble", "₿": "比特币 bitcoin", "©": "版权 copyright", "®": "注册 registered", "™": "商标 trademark", "°": "度 degree", "℃": "摄氏", "℉": "华氏", "α": "阿尔法 alpha", "β": "贝塔 beta", "γ": "伽马 gamma", "δ": "德尔塔 delta", "λ": "拉姆达 lambda", "Ω": "欧米伽 omega"}}
|