lingee-ui 0.0.7 → 0.0.9
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/dist/button/index.css +1 -1
- package/dist/button/index.d.mts +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/{chunk-FQRDHJQZ.mjs → chunk-6M7ESUQX.mjs} +1 -1
- package/dist/chunk-C5BDJQIO.js +2 -0
- package/dist/chunk-H7GT6UT4.mjs +1 -0
- package/dist/chunk-IE7TAOTL.mjs +2 -0
- package/dist/{chunk-T5QR25R6.js → chunk-QIMQMSJB.js} +1 -1
- package/dist/chunk-WAYZVZQB.js +1 -0
- package/dist/{chunk-RM4W5RV7.mjs → chunk-XG3DE76O.mjs} +1 -1
- package/dist/{chunk-KT3HSLBA.js → chunk-ZXUYGVWB.js} +1 -1
- package/dist/{index-BVXwKHfX.d.mts → index-7pb5YOcq.d.mts} +1 -1
- package/dist/{index-BVXwKHfX.d.ts → index-7pb5YOcq.d.ts} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.mts +677 -62
- package/dist/index.d.ts +677 -62
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/input/index.css +1 -1
- package/dist/input/index.js +1 -1
- package/dist/input/index.mjs +1 -1
- package/dist/tabs/index.css +1 -1
- package/dist/tabs/index.d.mts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/textarea/index.css +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast/index.mjs +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tree/index.css +1 -0
- package/dist/tree/index.d.mts +229 -0
- package/dist/tree/index.d.ts +229 -0
- package/dist/tree/index.js +1 -0
- package/dist/tree/index.mjs +1 -0
- package/package.json +7 -2
- package/skill/AGENTS-SNIPPET.md +21 -19
- package/skill/SKILL.md +19 -15
- package/skill/VERSION.json +3 -3
- package/skill/references/components/dropdown.md +35 -2
- package/skill/references/components/ellipsis-tooltip.md +44 -0
- package/skill/references/components/empty.md +28 -2
- package/skill/references/components/sidebar.md +53 -27
- package/skill/references/components/tree.md +118 -0
- package/skill/references/components/upload.md +4 -1
- package/skill/references/setup.md +2 -1
- package/skill/references/tokens.md +16 -16
- package/CHANGELOG.md +0 -119
- package/dist/chunk-KQ733636.mjs +0 -1
- package/dist/chunk-PQVYDWUK.js +0 -1
package/CHANGELOG.md
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to `lingee-ui` will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
-
|
|
7
|
-
## [0.0.7] - 2026-08-11
|
|
8
|
-
|
|
9
|
-
### Added
|
|
10
|
-
|
|
11
|
-
- Tabs 新增 `rounded` variant、`glassy`(滑块高光)、`transparent`(去容器灰底)
|
|
12
|
-
- Dropdown 菜单项支持 `description` 副标题,面板新增 `borderless`
|
|
13
|
-
- DropdownButton 新增 `variant`、`size`、`selectedVariant`
|
|
14
|
-
- Dialog.confirm 新增 `okProps` / `cancelProps` / `contentRender`
|
|
15
|
-
- DatePicker / RangePicker 新增年月快速选择面板,支持 `minDate` / `maxDate` 禁用
|
|
16
|
-
- TimePicker 时间列表末项支持滚动置顶
|
|
17
|
-
- Tag 新增 `gradient`(渐变浅底)与 `glow`(渐变底 + 光斑)变体,支持 `icon` 前缀图标与扩展色板
|
|
18
|
-
- Tooltip 新增 `scrollable`,长内容超出视口时限高滚动,默认开启
|
|
19
|
-
- Input 新增 `collapsed` 折叠态,折叠为正方形仅保留单个插槽(受控)
|
|
20
|
-
- 新增 AI 技能包(`skill/`),随包发布供消费方 AI 编码助手使用
|
|
21
|
-
- 补充 Flex 组件文档
|
|
22
|
-
|
|
23
|
-
### i18n
|
|
24
|
-
|
|
25
|
-
组件内建文案此前存在多处硬编码,切换 `LingeeProvider` 的 `locale` 无法完全生效,本次补齐:
|
|
26
|
-
|
|
27
|
-
- 语言包新增 `Dropdown`、`Tabs`、`Form` 三组文案
|
|
28
|
-
- DropdownButton 清除按钮、Tabs 滚动箭头的 `aria-label` 接入语言包
|
|
29
|
-
- Form.Item 必填校验提示接入语言包(原为硬编码「不能为空」拼接)
|
|
30
|
-
- **DatePicker / RangePicker 日历面板跟随 `locale` 切换**:周几表头、日期 `aria-label`、月份名此前固定中文,因其由 `date-fns` 语言包驱动、不经过组件文案表
|
|
31
|
-
|
|
32
|
-
### Changed
|
|
33
|
-
|
|
34
|
-
- Table 滚动重构为 ScrollArea + CSS sticky 表头
|
|
35
|
-
- Dropdown / Select / TimePicker 下拉滚动统一由 ScrollArea 管理
|
|
36
|
-
- **Select 面板默认 `maxHeight` 由 256 改为 346**,如需保持原高度请显式传 `maxHeight={256}`
|
|
37
|
-
- Button 尺寸 Token 按档位拆分,`lg` 圆角改为 12px
|
|
38
|
-
- 背景色全局调整;新增 `transition.duration` / `transition.timing` Token
|
|
39
|
-
|
|
40
|
-
### Fixed
|
|
41
|
-
|
|
42
|
-
- Tabs `transparent` 模式滑块偏移、滑块描边被裁切
|
|
43
|
-
- Table `scroll.x` 宽屏留白、背景色异常
|
|
44
|
-
- Pagination 文字折行
|
|
45
|
-
- Dropdown 菜单项间距
|
|
46
|
-
- `-webkit-scrollbar` 导致的纵向空隙
|
|
47
|
-
- Toast 在 `unstyled` 模式下居中失效、长文案被容器宽度提前截断换行
|
|
48
|
-
- 修正 Dropdown / Tabs 中未定义的组件层颜色 Token
|
|
49
|
-
|
|
50
|
-
### Docs
|
|
51
|
-
|
|
52
|
-
- 文档站新增「AI 技能包」与「AIBadge」页,快速开始补充样式引入 / 语义 Token / 主题切换章节
|
|
53
|
-
- 补充 Table、Dropdown、Tabs、Empty 组件示例
|
|
54
|
-
- 补充 Tag 变体文档与示例、Tooltip 长内容说明
|
|
55
|
-
- **组件文档新增英文版**(`README.en.mdx`),文档站支持中英切换,缺失英文时回退中文
|
|
56
|
-
- demo 示例数据统一改为英文,中英文档共用同一份 demo
|
|
57
|
-
|
|
58
|
-
### Experimental
|
|
59
|
-
|
|
60
|
-
- 新增 `Sidebar` 侧边栏复合组件(`Sidebar.Root` / `NavItem` / `ListItem` / `SkeletonItem` / `Footer` 等),**处于测试阶段,API 与样式可能在后续版本调整,暂不建议在生产使用**
|
|
61
|
-
|
|
62
|
-
### Note
|
|
63
|
-
|
|
64
|
-
- 建议同步升级 `lingee-icon` 至 `1.0.16` 及以上
|
|
65
|
-
|
|
66
|
-
## [0.0.6] - 2026-07-29
|
|
67
|
-
|
|
68
|
-
### Added
|
|
69
|
-
|
|
70
|
-
- Button 新增 `std`(32px)尺寸
|
|
71
|
-
- 新增 DropdownButton 组件,Dropdown 支持禁用
|
|
72
|
-
|
|
73
|
-
### Changed
|
|
74
|
-
|
|
75
|
-
- 文档方案由 Storybook 替换为 Vite 文档站
|
|
76
|
-
|
|
77
|
-
### Fixed
|
|
78
|
-
|
|
79
|
-
- Dropdown item 高度与分隔线对齐设计稿,浮层高度自适应视口
|
|
80
|
-
- RangePicker 样式缺失
|
|
81
|
-
|
|
82
|
-
## [0.0.5] - 2026-07-22
|
|
83
|
-
|
|
84
|
-
### Added
|
|
85
|
-
|
|
86
|
-
- Design Token 体系替换为 Figma JSON 自动生成,支持语义层 Light / Dark
|
|
87
|
-
- Tabs 新增 `scrollable` 模式,Dialog 支持 Props 透传,Tooltip 新增 `disabled`
|
|
88
|
-
|
|
89
|
-
### Fixed
|
|
90
|
-
|
|
91
|
-
- 组件 Token 引用错误、Tabs 缩放时 slider 偏移
|
|
92
|
-
- Checkbox 无法点击及意外触发滚动
|
|
93
|
-
- Image 宽度、Spin 尺寸(16 / 24 / 32)
|
|
94
|
-
|
|
95
|
-
## [0.0.4] - 2026-06-30
|
|
96
|
-
|
|
97
|
-
### Reverted
|
|
98
|
-
|
|
99
|
-
- 还原 0.0.3 中 Design Token 体系升级(色板 461 色 + 语义层 112 变量 + 暗色模式),恢复线上稳定版本
|
|
100
|
-
- 还原 0.0.3 中 Button 组件颜色改动,恢复 opacity 方案
|
|
101
|
-
- 还原 0.0.3 中 popover / select 组件样式改动
|
|
102
|
-
|
|
103
|
-
### Note
|
|
104
|
-
|
|
105
|
-
- 0.0.3 版本 Token 体系调整导致线上样式异常,本版本回退到 0.0.2 的稳定状态
|
|
106
|
-
- 消费方升级到 0.0.4 即可恢复正常,无需锁定版本号
|
|
107
|
-
|
|
108
|
-
## [0.0.1] - 2025-06-24
|
|
109
|
-
|
|
110
|
-
### Added
|
|
111
|
-
|
|
112
|
-
- Button 组件(primary / secondary / ghost / danger / text 变体,支持 size、loading、icon)
|
|
113
|
-
- Tabs 组件(CapsuleTabs / PillTabs 页签切换)
|
|
114
|
-
- Toast 组件(命令式全局提示,info / success / warning / error)
|
|
115
|
-
- Tooltip 组件(基于 Radix 的文字提示)
|
|
116
|
-
- Switch 组件(开关切换)
|
|
117
|
-
- Input 组件(输入框,支持前后缀、清除)
|
|
118
|
-
- Textarea 组件(多行输入)
|
|
119
|
-
- Design Tokens(primitives 色板 + 语义色 fg-color / border-color / bg-color)
|
package/dist/chunk-KQ733636.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-DN2VKVCV.mjs';import E,{createContext,useContext}from'react';import {Toaster,toast}from'sonner';import {ExclamationTriangle,ExclamationCircle,Check2Circle,Information1,XLg}from'lingee-icon';import {jsx,jsxs}from'react/jsx-runtime';var y={locale:"zh-CN",Button:{},Breadcrumb:{more:"\u66F4\u591A",back:"\u8FD4\u56DE"},Select:{loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",notFound:"\u641C\u7D22\u65E0\u7ED3\u679C",clear:"\u6E05\u7A7A"},Dropdown:{clear:"\u6E05\u9664"},Tabs:{scrollLeft:"\u5411\u5DE6\u6EDA\u52A8",scrollRight:"\u5411\u53F3\u6EDA\u52A8"},Form:{required:"{label}\u4E0D\u80FD\u4E3A\u7A7A",requiredNoLabel:"\u6B64\u9879\u4E0D\u80FD\u4E3A\u7A7A"},Tag:{close:"\u5173\u95ED"},Upload:{retry:"\u91CD\u65B0\u4E0A\u4F20",remove:"\u79FB\u9664\u6587\u4EF6",removeShort:"\u79FB\u9664",dragText:"\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216",clickUpload:"\u70B9\u51FB\u4E0A\u4F20"},ColorPicker:{placeholder:"\u8BF7\u9009\u62E9\u989C\u8272"},DatePicker:{placeholder:"\u5E74/\u6708/\u65E5",today:"\u4ECA\u5929",prevYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",prevMonth:"\u4E0A\u4E00\u6708",nextMonth:"\u4E0B\u4E00\u6708",prevDecade:"\u4E0A\u4E00\u7EC4\u5E74\u4EFD",nextDecade:"\u4E0B\u4E00\u7EC4\u5E74\u4EFD",months:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],yearFormat:"{year}\u5E74",monthFormat:"{month}\u6708"},RangePicker:{startPlaceholder:"\u5E74/\u6708/\u65E5",endPlaceholder:"\u5E74/\u6708/\u65E5"},TimePicker:{now:"\u73B0\u5728",confirm:"\u786E\u5B9A",placeholder:"\u65F6:\u5206",placeholderFull:"\u65F6:\u5206:\u79D2"},Table:{empty:"\u6682\u65E0\u6570\u636E"},Pagination:{total:"\u5171 {total} \u6761",prevPage:"\u4E0A\u4E00\u9875",nextPage:"\u4E0B\u4E00\u9875",itemsPerPage:"{size}\u6761/\u9875",jumpTo:"\u8DF3\u81F3",page:"\u9875"},Dialog:{close:"\u5173\u95ED"},Drawer:{close:"\u5173\u95ED"},Input:{clear:"\u6E05\u7A7A",expand:"\u5C55\u5F00\u8F93\u5165\u6846"},Alert:{close:"\u5173\u95ED"},Toast:{close:"\u5173\u95ED\u6D88\u606F"},Spin:{loading:"\u52A0\u8F7D\u4E2D"}},l=y;var T={locale:"en-US",Button:{},Breadcrumb:{more:"More",back:"Back"},Select:{loading:"Loading",loadError:"Failed to load, please retry",notFound:"No results found",clear:"Clear"},Dropdown:{clear:"Clear"},Tabs:{scrollLeft:"Scroll left",scrollRight:"Scroll right"},Form:{required:"{label} is required",requiredNoLabel:"This field is required"},Tag:{close:"Close"},Upload:{retry:"Retry upload",remove:"Remove file",removeShort:"Remove",dragText:"Drag files here, or ",clickUpload:"click to upload"},ColorPicker:{placeholder:"Select a color"},DatePicker:{placeholder:"YYYY/MM/DD",today:"Today",prevYear:"Previous year",nextYear:"Next year",prevMonth:"Previous month",nextMonth:"Next month",prevDecade:"Previous decade",nextDecade:"Next decade",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Start date",endPlaceholder:"End date"},TimePicker:{now:"Now",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{empty:"No data"},Pagination:{total:"{total} items",prevPage:"Previous page",nextPage:"Next page",itemsPerPage:"{size} / page",jumpTo:"Go to",page:""},Dialog:{close:"Close"},Drawer:{close:"Close"},Input:{clear:"Clear",expand:"Expand input"},Alert:{close:"Close"},Toast:{close:"Close message"},Spin:{loading:"Loading"}},C=T;var u=createContext(l);function w({locale:o=l,children:e}){return jsxs(u.Provider,{value:o,children:[e,jsx(g,{})]})}w.displayName="LingeeProvider";function N(){return useContext(u)}function m(o){return N()[o]}var I={info:jsx(Information1,{size:20}),success:jsx(Check2Circle,{size:20}),warning:jsx(ExclamationCircle,{size:20}),error:jsx(ExclamationTriangle,{size:20})};function f({type:o,content:e,icon:t,closable:i,className:c,onClose:d}){let h=m("Toast"),b=()=>{if(t===null)return null;let v=t!==void 0?t:I[o];return jsx("span",{className:"lg-toast__icon",children:v})};return jsxs("div",{className:a$1("lg-toast",`lg-toast--${o}`,c),children:[b(),jsx("span",{className:"lg-toast__content",children:e}),i&&jsx("button",{className:"lg-toast__close",onClick:d,"aria-label":h.close,type:"button",children:jsx(XLg,{size:16})})]})}var a={};function g(){let o=a.top??16;return jsx(Toaster,{position:"top-center",offset:o,gap:8,closeButton:false,toastOptions:{unstyled:true,className:"lg-toast-wrapper"},style:{"--width":"560px"}})}function A(o){let e=o[0];return typeof e=="object"&&e!==null&&!E.isValidElement(e)?e:{content:e,duration:o[1],onClose:o[2]}}function U(o,e){let t=e.duration!==void 0?e.duration<0?a.duration??3e3:e.duration:a.duration??3e3,i=t===0?1/0:t,c=toast.custom(d=>jsx(f,{type:o,content:e.content,icon:e.icon,closable:e.closable,className:e.className,onClose:()=>toast.dismiss(d)}),{...e.key!==void 0&&{id:e.key},duration:i,onAutoClose:()=>e.onClose?.(),onDismiss:()=>e.onClose?.()});return ()=>toast.dismiss(c)}function n(o){return (...e)=>{let t=A(e);return U(o,t)}}var se={info:n("info"),success:n("success"),warning:n("warning"),error:n("error"),destroy:()=>toast.dismiss(),config:o=>{a={...a,...o};}};export{g as a,se as b,l as c,C as d,w as e,N as f,m as g};
|
package/dist/chunk-PQVYDWUK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkDCDWEVW4_js=require('./chunk-DCDWEVW4.js'),E=require('react'),sonner=require('sonner'),lingeeIcon=require('lingee-icon'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var E__default=/*#__PURE__*/_interopDefault(E);var y={locale:"zh-CN",Button:{},Breadcrumb:{more:"\u66F4\u591A",back:"\u8FD4\u56DE"},Select:{loading:"\u52A0\u8F7D\u4E2D",loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",notFound:"\u641C\u7D22\u65E0\u7ED3\u679C",clear:"\u6E05\u7A7A"},Dropdown:{clear:"\u6E05\u9664"},Tabs:{scrollLeft:"\u5411\u5DE6\u6EDA\u52A8",scrollRight:"\u5411\u53F3\u6EDA\u52A8"},Form:{required:"{label}\u4E0D\u80FD\u4E3A\u7A7A",requiredNoLabel:"\u6B64\u9879\u4E0D\u80FD\u4E3A\u7A7A"},Tag:{close:"\u5173\u95ED"},Upload:{retry:"\u91CD\u65B0\u4E0A\u4F20",remove:"\u79FB\u9664\u6587\u4EF6",removeShort:"\u79FB\u9664",dragText:"\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216",clickUpload:"\u70B9\u51FB\u4E0A\u4F20"},ColorPicker:{placeholder:"\u8BF7\u9009\u62E9\u989C\u8272"},DatePicker:{placeholder:"\u5E74/\u6708/\u65E5",today:"\u4ECA\u5929",prevYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",prevMonth:"\u4E0A\u4E00\u6708",nextMonth:"\u4E0B\u4E00\u6708",prevDecade:"\u4E0A\u4E00\u7EC4\u5E74\u4EFD",nextDecade:"\u4E0B\u4E00\u7EC4\u5E74\u4EFD",months:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],yearFormat:"{year}\u5E74",monthFormat:"{month}\u6708"},RangePicker:{startPlaceholder:"\u5E74/\u6708/\u65E5",endPlaceholder:"\u5E74/\u6708/\u65E5"},TimePicker:{now:"\u73B0\u5728",confirm:"\u786E\u5B9A",placeholder:"\u65F6:\u5206",placeholderFull:"\u65F6:\u5206:\u79D2"},Table:{empty:"\u6682\u65E0\u6570\u636E"},Pagination:{total:"\u5171 {total} \u6761",prevPage:"\u4E0A\u4E00\u9875",nextPage:"\u4E0B\u4E00\u9875",itemsPerPage:"{size}\u6761/\u9875",jumpTo:"\u8DF3\u81F3",page:"\u9875"},Dialog:{close:"\u5173\u95ED"},Drawer:{close:"\u5173\u95ED"},Input:{clear:"\u6E05\u7A7A",expand:"\u5C55\u5F00\u8F93\u5165\u6846"},Alert:{close:"\u5173\u95ED"},Toast:{close:"\u5173\u95ED\u6D88\u606F"},Spin:{loading:"\u52A0\u8F7D\u4E2D"}},l=y;var T={locale:"en-US",Button:{},Breadcrumb:{more:"More",back:"Back"},Select:{loading:"Loading",loadError:"Failed to load, please retry",notFound:"No results found",clear:"Clear"},Dropdown:{clear:"Clear"},Tabs:{scrollLeft:"Scroll left",scrollRight:"Scroll right"},Form:{required:"{label} is required",requiredNoLabel:"This field is required"},Tag:{close:"Close"},Upload:{retry:"Retry upload",remove:"Remove file",removeShort:"Remove",dragText:"Drag files here, or ",clickUpload:"click to upload"},ColorPicker:{placeholder:"Select a color"},DatePicker:{placeholder:"YYYY/MM/DD",today:"Today",prevYear:"Previous year",nextYear:"Next year",prevMonth:"Previous month",nextMonth:"Next month",prevDecade:"Previous decade",nextDecade:"Next decade",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yearFormat:"{year}",monthFormat:"{month}"},RangePicker:{startPlaceholder:"Start date",endPlaceholder:"End date"},TimePicker:{now:"Now",confirm:"OK",placeholder:"HH:mm",placeholderFull:"HH:mm:ss"},Table:{empty:"No data"},Pagination:{total:"{total} items",prevPage:"Previous page",nextPage:"Next page",itemsPerPage:"{size} / page",jumpTo:"Go to",page:""},Dialog:{close:"Close"},Drawer:{close:"Close"},Input:{clear:"Clear",expand:"Expand input"},Alert:{close:"Close"},Toast:{close:"Close message"},Spin:{loading:"Loading"}},C=T;var u=E.createContext(l);function w({locale:o=l,children:e}){return jsxRuntime.jsxs(u.Provider,{value:o,children:[e,jsxRuntime.jsx(g,{})]})}w.displayName="LingeeProvider";function N(){return E.useContext(u)}function m(o){return N()[o]}var I={info:jsxRuntime.jsx(lingeeIcon.Information1,{size:20}),success:jsxRuntime.jsx(lingeeIcon.Check2Circle,{size:20}),warning:jsxRuntime.jsx(lingeeIcon.ExclamationCircle,{size:20}),error:jsxRuntime.jsx(lingeeIcon.ExclamationTriangle,{size:20})};function f({type:o,content:e,icon:t,closable:i,className:c,onClose:d}){let h=m("Toast"),b=()=>{if(t===null)return null;let v=t!==void 0?t:I[o];return jsxRuntime.jsx("span",{className:"lg-toast__icon",children:v})};return jsxRuntime.jsxs("div",{className:chunkDCDWEVW4_js.a("lg-toast",`lg-toast--${o}`,c),children:[b(),jsxRuntime.jsx("span",{className:"lg-toast__content",children:e}),i&&jsxRuntime.jsx("button",{className:"lg-toast__close",onClick:d,"aria-label":h.close,type:"button",children:jsxRuntime.jsx(lingeeIcon.XLg,{size:16})})]})}var a={};function g(){let o=a.top??16;return jsxRuntime.jsx(sonner.Toaster,{position:"top-center",offset:o,gap:8,closeButton:false,toastOptions:{unstyled:true,className:"lg-toast-wrapper"},style:{"--width":"560px"}})}function A(o){let e=o[0];return typeof e=="object"&&e!==null&&!E__default.default.isValidElement(e)?e:{content:e,duration:o[1],onClose:o[2]}}function U(o,e){let t=e.duration!==void 0?e.duration<0?a.duration??3e3:e.duration:a.duration??3e3,i=t===0?1/0:t,c=sonner.toast.custom(d=>jsxRuntime.jsx(f,{type:o,content:e.content,icon:e.icon,closable:e.closable,className:e.className,onClose:()=>sonner.toast.dismiss(d)}),{...e.key!==void 0&&{id:e.key},duration:i,onAutoClose:()=>e.onClose?.(),onDismiss:()=>e.onClose?.()});return ()=>sonner.toast.dismiss(c)}function n(o){return (...e)=>{let t=A(e);return U(o,t)}}var se={info:n("info"),success:n("success"),warning:n("warning"),error:n("error"),destroy:()=>sonner.toast.dismiss(),config:o=>{a={...a,...o};}};exports.a=g;exports.b=se;exports.c=l;exports.d=C;exports.e=w;exports.f=N;exports.g=m;
|