@fangxinyan/lumina 0.6.1 → 0.6.2

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.
Files changed (246) hide show
  1. package/dist/Alert.cjs +3 -3
  2. package/dist/Alert.js +2 -2
  3. package/dist/AutoComplete.cjs +5 -4
  4. package/dist/AutoComplete.d.cts +1 -1
  5. package/dist/AutoComplete.d.ts +1 -1
  6. package/dist/AutoComplete.js +4 -3
  7. package/dist/Badge-DPGLV3D3.css +22 -0
  8. package/dist/Badge.cjs +10 -0
  9. package/dist/Badge.d.cts +18 -0
  10. package/dist/Badge.d.ts +18 -0
  11. package/dist/Badge.js +1 -0
  12. package/dist/Button.cjs +3 -7
  13. package/dist/Button.d.cts +5 -10
  14. package/dist/Button.d.ts +5 -10
  15. package/dist/Button.js +2 -2
  16. package/dist/Calendar.cjs +3 -3
  17. package/dist/Calendar.js +2 -2
  18. package/dist/{Card-RG7ECXL2.css → Card-6RMVIHWX.css} +7 -13
  19. package/dist/Card.cjs +2 -6
  20. package/dist/Card.d.cts +7 -11
  21. package/dist/Card.d.ts +7 -11
  22. package/dist/Card.js +1 -1
  23. package/dist/{Cascader-VSYEKQCG.css → Cascader-C2DFSMKJ.css} +64 -0
  24. package/dist/Cascader.cjs +5 -3
  25. package/dist/Cascader.d.cts +18 -2
  26. package/dist/Cascader.d.ts +18 -2
  27. package/dist/Cascader.js +4 -2
  28. package/dist/{Checkbox-SKJATVSN.css → Checkbox-U5EUDSYS.css} +5 -35
  29. package/dist/Checkbox.cjs +3 -7
  30. package/dist/Checkbox.d.cts +1 -18
  31. package/dist/Checkbox.d.ts +1 -18
  32. package/dist/Checkbox.js +2 -2
  33. package/dist/Collapse-66U5YJFY.css +53 -0
  34. package/dist/Collapse.cjs +11 -0
  35. package/dist/Collapse.d.cts +32 -0
  36. package/dist/Collapse.d.ts +32 -0
  37. package/dist/Collapse.js +2 -0
  38. package/dist/CommandPalette.cjs +5 -4
  39. package/dist/CommandPalette.js +4 -3
  40. package/dist/Drawer.cjs +3 -3
  41. package/dist/Drawer.js +2 -2
  42. package/dist/Empty-DC2LPORC.css +28 -0
  43. package/dist/Empty.cjs +2 -10
  44. package/dist/Empty.d.cts +1 -62
  45. package/dist/Empty.d.ts +1 -62
  46. package/dist/Empty.js +1 -1
  47. package/dist/Form.d.cts +1 -1
  48. package/dist/Form.d.ts +1 -1
  49. package/dist/Icon.cjs +179 -3
  50. package/dist/Icon.d.cts +96 -3
  51. package/dist/Icon.d.ts +96 -3
  52. package/dist/Icon.js +1 -1
  53. package/dist/Image.cjs +4 -4
  54. package/dist/Image.js +2 -2
  55. package/dist/{Input-33CAH4O6.css → Input-3G4ONWNU.css} +15 -42
  56. package/dist/Input.cjs +6 -5
  57. package/dist/Input.d.cts +19 -23
  58. package/dist/Input.d.ts +19 -23
  59. package/dist/Input.js +3 -2
  60. package/dist/InputNumber.cjs +5 -4
  61. package/dist/InputNumber.d.cts +1 -1
  62. package/dist/InputNumber.d.ts +1 -1
  63. package/dist/InputNumber.js +4 -3
  64. package/dist/Message-2MZ3LFPU.css +45 -0
  65. package/dist/Message.cjs +23 -0
  66. package/dist/Message.d.cts +54 -0
  67. package/dist/Message.d.ts +54 -0
  68. package/dist/Message.js +2 -0
  69. package/dist/{Modal-XSDMU4XJ.css → Modal-2QNDW4SO.css} +27 -0
  70. package/dist/Modal.cjs +4 -4
  71. package/dist/Modal.d.cts +28 -4
  72. package/dist/Modal.d.ts +28 -4
  73. package/dist/Modal.js +3 -3
  74. package/dist/Pagination.cjs +7 -5
  75. package/dist/Pagination.js +6 -4
  76. package/dist/Popover.cjs +2 -2
  77. package/dist/Popover.d.cts +11 -3
  78. package/dist/Popover.d.ts +11 -3
  79. package/dist/Popover.js +1 -1
  80. package/dist/Radio-GVFDPAZM.css +97 -0
  81. package/dist/Radio.cjs +14 -0
  82. package/dist/Radio.d.cts +36 -0
  83. package/dist/Radio.d.ts +36 -0
  84. package/dist/Radio.js +1 -0
  85. package/dist/{Select-J3CCVFJ7.css → Select-JVBQAZBG.css} +7 -23
  86. package/dist/Select.cjs +6 -4
  87. package/dist/Select.d.cts +25 -4
  88. package/dist/Select.d.ts +25 -4
  89. package/dist/Select.js +5 -3
  90. package/dist/Skeleton-CVWH2VWN.css +40 -0
  91. package/dist/Skeleton.cjs +10 -0
  92. package/dist/Skeleton.d.cts +30 -0
  93. package/dist/Skeleton.d.ts +30 -0
  94. package/dist/Skeleton.js +1 -0
  95. package/dist/Spin-3GJNMSIH.css +94 -0
  96. package/dist/Spin.cjs +10 -0
  97. package/dist/Spin.d.cts +20 -0
  98. package/dist/Spin.d.ts +20 -0
  99. package/dist/Spin.js +1 -0
  100. package/dist/{Table-2LPTOUIR.css → Table-ATJJQLKU.css} +0 -53
  101. package/dist/Table.cjs +9 -11
  102. package/dist/Table.d.cts +2 -21
  103. package/dist/Table.d.ts +2 -21
  104. package/dist/Table.js +8 -6
  105. package/dist/TablePro-3XVHYLSL.css +45 -0
  106. package/dist/TablePro.cjs +19 -0
  107. package/dist/TablePro.d.cts +21 -0
  108. package/dist/TablePro.d.ts +21 -0
  109. package/dist/TablePro.js +10 -0
  110. package/dist/{Tabs-RHK6XAFF.css → Tabs-BLSNI2T5.css} +0 -34
  111. package/dist/Tabs.cjs +2 -6
  112. package/dist/Tabs.d.cts +1 -16
  113. package/dist/Tabs.d.ts +1 -16
  114. package/dist/Tabs.js +1 -1
  115. package/dist/Tag-LB3OOJAO.css +29 -0
  116. package/dist/Tag.cjs +3 -7
  117. package/dist/Tag.d.cts +1 -11
  118. package/dist/Tag.d.ts +1 -11
  119. package/dist/Tag.js +2 -2
  120. package/dist/Textarea-YNET7IBH.css +54 -0
  121. package/dist/Textarea.cjs +15 -0
  122. package/dist/Textarea.d.cts +25 -0
  123. package/dist/Textarea.d.ts +25 -0
  124. package/dist/Textarea.js +2 -0
  125. package/dist/{Timeline-RHZAZKZ7.css → Timeline-3ZHOHPXT.css} +2 -2
  126. package/dist/Timeline.cjs +3 -3
  127. package/dist/Timeline.d.cts +1 -1
  128. package/dist/Timeline.d.ts +1 -1
  129. package/dist/Timeline.js +2 -2
  130. package/dist/Tooltip.cjs +2 -2
  131. package/dist/Tooltip.d.cts +17 -4
  132. package/dist/Tooltip.d.ts +17 -4
  133. package/dist/Tooltip.js +1 -1
  134. package/dist/Typography.cjs +7 -7
  135. package/dist/Typography.js +2 -2
  136. package/dist/{chunk-6Y5WRCPW.js → chunk-33NCTOEB.js} +1 -1
  137. package/dist/{chunk-Q2KG6SQK.cjs → chunk-35ZGBAA3.cjs} +3 -3
  138. package/dist/{chunk-Y3ZSG3SJ.cjs → chunk-3AS5B7MQ.cjs} +11 -30
  139. package/dist/{chunk-X2U7EKCS.cjs → chunk-3YJU3D5S.cjs} +28 -5
  140. package/dist/chunk-45VJGBGN.js +25 -0
  141. package/dist/{chunk-3D77MQHO.js → chunk-46VXFTEC.js} +3 -3
  142. package/dist/{chunk-OFGDUCT7.cjs → chunk-4WTU5P3O.cjs} +3 -3
  143. package/dist/{chunk-5A3RT4KD.js → chunk-5TKC6IEN.js} +4 -55
  144. package/dist/{chunk-62GU4OHH.cjs → chunk-5WAXZJG5.cjs} +12 -19
  145. package/dist/chunk-6ACKL3WH.cjs +138 -0
  146. package/dist/{chunk-32HBMXXV.cjs → chunk-6LZ54NPO.cjs} +70 -74
  147. package/dist/{chunk-UXH5PH3S.js → chunk-7NGMQIST.js} +2 -2
  148. package/dist/{chunk-R6BIF3FF.js → chunk-AWXCSX6J.js} +5 -23
  149. package/dist/chunk-AXZ7ELMA.js +41 -0
  150. package/dist/{chunk-G2XK57I7.cjs → chunk-B2KEZQ6S.cjs} +5 -5
  151. package/dist/chunk-CEJ7VBR6.js +283 -0
  152. package/dist/{chunk-WRDKOSSM.js → chunk-CHMCL7AV.js} +1 -1
  153. package/dist/{chunk-EBNRZRWY.cjs → chunk-CUXV6QNN.cjs} +5 -5
  154. package/dist/{chunk-ULOJ5UEY.js → chunk-CXWEOAVU.js} +1 -1
  155. package/dist/{chunk-TWGQZX2R.js → chunk-DQTSTJ6O.js} +3 -18
  156. package/dist/chunk-EIY7KEJ3.cjs +132 -0
  157. package/dist/{chunk-OI3CWXT3.js → chunk-EJBHR2P5.js} +3 -3
  158. package/dist/chunk-ELNT3CFO.js +64 -0
  159. package/dist/{chunk-TGHBKKSS.js → chunk-EQEJTN3V.js} +3 -43
  160. package/dist/chunk-F6RYCBQG.js +25 -0
  161. package/dist/{chunk-N57NXCNC.cjs → chunk-FBVVRTX2.cjs} +3 -44
  162. package/dist/chunk-FFZ6OMZI.js +110 -0
  163. package/dist/{chunk-73RQBWWW.js → chunk-FJNWUELL.js} +2 -2
  164. package/dist/chunk-GENABQYA.cjs +47 -0
  165. package/dist/chunk-GMN74OEY.cjs +63 -0
  166. package/dist/chunk-GNEZQMKH.js +218 -0
  167. package/dist/{chunk-Y47YTYQ3.cjs → chunk-HPFQXYKG.cjs} +159 -8
  168. package/dist/{chunk-4WRE4HQP.js → chunk-HWFM4MAT.js} +18 -6
  169. package/dist/{chunk-GY3BSHHS.cjs → chunk-HZSIUOCN.cjs} +2 -55
  170. package/dist/{chunk-YRZGXXWA.js → chunk-JD7A6VM3.js} +11 -17
  171. package/dist/chunk-K2KYM7LW.cjs +28 -0
  172. package/dist/{chunk-PWW64ZWO.cjs → chunk-KD4YYIIO.cjs} +1 -32
  173. package/dist/chunk-KGSADAOD.cjs +170 -0
  174. package/dist/{chunk-6ODY6MGL.cjs → chunk-MQV2XN4B.cjs} +5 -5
  175. package/dist/{chunk-OVZTG5CP.cjs → chunk-MT7UWY6T.cjs} +2 -2
  176. package/dist/chunk-MUXP7ASL.js +26 -0
  177. package/dist/{chunk-EEMWQX3C.cjs → chunk-NTS5L4NQ.cjs} +3 -3
  178. package/dist/{chunk-WBK6XIDJ.js → chunk-OBEKX4VR.js} +2 -32
  179. package/dist/chunk-OF3SGLZY.js +385 -0
  180. package/dist/chunk-ON4DEDMI.js +113 -0
  181. package/dist/chunk-OQBDU5I2.cjs +104 -0
  182. package/dist/{chunk-FIO65XYG.cjs → chunk-OYMJVU66.cjs} +48 -37
  183. package/dist/{chunk-5M26OVVY.js → chunk-PH3YECMF.js} +1 -1
  184. package/dist/chunk-Q5SZIU7Z.cjs +47 -0
  185. package/dist/chunk-QGHYQCF3.cjs +240 -0
  186. package/dist/chunk-QKQHZIF3.cjs +86 -0
  187. package/dist/{chunk-KYEY2LIB.cjs → chunk-SKMP2A5O.cjs} +3 -3
  188. package/dist/{chunk-IW5LW6XS.js → chunk-TEEFR2FD.js} +28 -5
  189. package/dist/{chunk-GOBWKQCX.cjs → chunk-TEG7NJHS.cjs} +3 -3
  190. package/dist/{chunk-2MNAZRWE.cjs → chunk-TJII7BQ2.cjs} +261 -2
  191. package/dist/{chunk-3TWNBJFI.cjs → chunk-TZJH5HBT.cjs} +6 -6
  192. package/dist/{chunk-D46EM4EN.js → chunk-UMDGS4BP.js} +1 -1
  193. package/dist/chunk-USQ43DJ5.js +147 -0
  194. package/dist/{chunk-G2K6ETP4.cjs → chunk-UUHFKIWP.cjs} +18 -6
  195. package/dist/chunk-WGZ2KJTZ.js +81 -0
  196. package/dist/{chunk-RPFMQZA5.js → chunk-WKKSAGYH.js} +39 -28
  197. package/dist/{chunk-54YLXXS2.js → chunk-XD3JGL5O.js} +2 -2
  198. package/dist/{chunk-DPNDHNKK.js → chunk-XTIN5545.js} +68 -72
  199. package/dist/{chunk-LZU33BX6.cjs → chunk-ZIP7F4UF.cjs} +4 -20
  200. package/dist/index.cjs +312 -122
  201. package/dist/index.d.cts +23 -17
  202. package/dist/index.d.ts +23 -17
  203. package/dist/index.js +34 -28
  204. package/dist/styles.css +313 -192
  205. package/docs/llms/badge.md +3 -3
  206. package/docs/llms/button.md +7 -38
  207. package/docs/llms/card.md +6 -12
  208. package/docs/llms/cascader.md +19 -0
  209. package/docs/llms/{accordion.md → collapse.md} +13 -11
  210. package/docs/llms/drawer.md +1 -1
  211. package/docs/llms/form.md +1 -1
  212. package/docs/llms/input.md +25 -16
  213. package/docs/llms/message.md +63 -0
  214. package/docs/llms/modal.md +30 -0
  215. package/docs/llms/popover.md +18 -1
  216. package/docs/llms/radio.md +37 -1
  217. package/docs/llms/select.md +20 -0
  218. package/docs/llms/spin.md +59 -0
  219. package/docs/llms/table.md +3 -3
  220. package/docs/llms/tooltip.md +16 -3
  221. package/docs/llms.md +5 -5
  222. package/package.json +17 -52
  223. package/dist/Accordion-REMDCQUD.css +0 -44
  224. package/dist/Accordion.cjs +0 -11
  225. package/dist/Accordion.d.cts +0 -33
  226. package/dist/Accordion.d.ts +0 -33
  227. package/dist/Accordion.js +0 -2
  228. package/dist/Empty-NQ72W3D7.css +0 -160
  229. package/dist/Tag-FGDY3W7E.css +0 -51
  230. package/dist/Toast-YSACW3EM.css +0 -45
  231. package/dist/Toast.cjs +0 -15
  232. package/dist/Toast.d.cts +0 -26
  233. package/dist/Toast.d.ts +0 -26
  234. package/dist/Toast.js +0 -2
  235. package/dist/chunk-3XTHKAEY.js +0 -39
  236. package/dist/chunk-DOMYUGJY.js +0 -132
  237. package/dist/chunk-HBWO3QKW.js +0 -74
  238. package/dist/chunk-JVS5ZALZ.js +0 -123
  239. package/dist/chunk-LIGHV4RC.cjs +0 -121
  240. package/dist/chunk-MCTIA6RZ.js +0 -99
  241. package/dist/chunk-NC4YUEXM.cjs +0 -145
  242. package/dist/chunk-NJ6B22YJ.js +0 -170
  243. package/dist/chunk-W64ARHLJ.cjs +0 -62
  244. package/dist/chunk-ZFW6OYAO.cjs +0 -100
  245. package/docs/llms/spinner.md +0 -58
  246. package/docs/llms/toast.md +0 -51
@@ -1,145 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkYB3IWIOJ_cjs = require('./chunk-YB3IWIOJ.cjs');
4
- var chunk2MNAZRWE_cjs = require('./chunk-2MNAZRWE.cjs');
5
- require('./tokens-BIIUTPKN.css');
6
- require('./shared-NJHRNLRH.css');
7
- require('./Cascader-VSYEKQCG.css');
8
- var React = require('react');
9
- var reactDom = require('react-dom');
10
- var jsxRuntime = require('react/jsx-runtime');
11
-
12
- function _interopNamespace(e) {
13
- if (e && e.__esModule) return e;
14
- var n = Object.create(null);
15
- if (e) {
16
- Object.keys(e).forEach(function (k) {
17
- if (k !== 'default') {
18
- var d = Object.getOwnPropertyDescriptor(e, k);
19
- Object.defineProperty(n, k, d.get ? d : {
20
- enumerable: true,
21
- get: function () { return e[k]; }
22
- });
23
- }
24
- });
25
- }
26
- n.default = e;
27
- return Object.freeze(n);
28
- }
29
-
30
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
-
32
- var Cascader = React__namespace.forwardRef(({
33
- options,
34
- value,
35
- defaultValue = [],
36
- onChange,
37
- placeholder = "\u8BF7\u9009\u62E9",
38
- disabled,
39
- className = "",
40
- ...rest
41
- }, ref) => {
42
- const [inner, setInner] = React__namespace.useState(defaultValue);
43
- const isControlled = value !== void 0;
44
- const cur = isControlled ? value : inner;
45
- const [open, setOpen] = React__namespace.useState(false);
46
- const [path, setPath] = React__namespace.useState(cur);
47
- const panelRef = React__namespace.useRef(null);
48
- const { triggerRef, floatingStyle } = chunkYB3IWIOJ_cjs.useFloating({
49
- open,
50
- placement: "bottom",
51
- panelWidth: 520,
52
- panelHeight: 260
53
- });
54
- const setTriggerRef = React__namespace.useCallback(
55
- (node) => {
56
- triggerRef.current = node;
57
- if (typeof ref === "function") ref(node);
58
- else if (ref) ref.current = node;
59
- },
60
- [ref, triggerRef]
61
- );
62
- React__namespace.useEffect(() => {
63
- const h = (e) => {
64
- const t = e.target;
65
- if (triggerRef.current?.contains(t)) return;
66
- if (panelRef.current?.contains(t)) return;
67
- setOpen(false);
68
- };
69
- document.addEventListener("mousedown", h);
70
- return () => document.removeEventListener("mousedown", h);
71
- }, []);
72
- React__namespace.useEffect(() => {
73
- if (open) setPath(cur);
74
- }, [open, cur]);
75
- const columns = [options];
76
- let cursor = options;
77
- for (const v of path) {
78
- const match = cursor.find((o) => o.value === v);
79
- if (match && match.children) {
80
- cursor = match.children;
81
- columns.push(cursor);
82
- } else break;
83
- }
84
- const pick = (depth, val, hasChildren) => {
85
- const np = [...path.slice(0, depth), val];
86
- setPath(np);
87
- if (!hasChildren) {
88
- if (!isControlled) setInner(np);
89
- onChange?.(np);
90
- setOpen(false);
91
- }
92
- };
93
- const labels = [];
94
- let list = options;
95
- for (const v of cur) {
96
- const m = list.find((o) => o.value === v);
97
- if (!m) break;
98
- labels.push(m.label);
99
- if (!m.children) break;
100
- list = m.children;
101
- }
102
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: setTriggerRef, className: `cascader ${open ? "open" : ""} ${className}`, ...rest, children: [
103
- /* @__PURE__ */ jsxRuntime.jsxs(
104
- "button",
105
- {
106
- type: "button",
107
- className: `cascader-trigger ${labels.length === 0 ? "placeholder" : ""}`,
108
- disabled,
109
- onClick: () => !disabled && setOpen((o) => !o),
110
- children: [
111
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { flex: 1 }, children: labels.length ? labels.map((l, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
112
- i > 0 && " / ",
113
- l
114
- ] }, i)) : placeholder }),
115
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "absolute", right: 12, color: "var(--fg-subtle)" }, children: /* @__PURE__ */ jsxRuntime.jsx(chunk2MNAZRWE_cjs.Icon, { name: "chevDown", size: 14 }) })
116
- ]
117
- }
118
- ),
119
- open && typeof document !== "undefined" && reactDom.createPortal(
120
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: panelRef, className: "cascader-panel", style: floatingStyle, children: columns.map((col, depth) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cascader-col", children: col.map((o) => {
121
- const isActive = path[depth] === o.value;
122
- const hasChildren = !!(o.children && o.children.length);
123
- return /* @__PURE__ */ jsxRuntime.jsxs(
124
- "button",
125
- {
126
- type: "button",
127
- className: `cascader-item ${isActive ? "active" : ""}`,
128
- disabled: o.disabled,
129
- onClick: () => pick(depth, o.value, hasChildren),
130
- children: [
131
- o.icon && /* @__PURE__ */ jsxRuntime.jsx(chunk2MNAZRWE_cjs.Icon, { name: o.icon, size: 13 }),
132
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: o.label }),
133
- hasChildren && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chev", children: /* @__PURE__ */ jsxRuntime.jsx(chunk2MNAZRWE_cjs.Icon, { name: "chevRight", size: 12 }) })
134
- ]
135
- },
136
- o.value
137
- );
138
- }) }, depth)) }),
139
- document.body
140
- )
141
- ] });
142
- });
143
- Cascader.displayName = "Cascader";
144
-
145
- exports.Cascader = Cascader;
@@ -1,170 +0,0 @@
1
- import './tokens-BIIUTPKN.css';
2
- import './shared-NJHRNLRH.css';
3
- import * as React from 'react';
4
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
-
6
- // src/components/Icon/Icon.tsx
7
- var paths = {
8
- search: /* @__PURE__ */ jsxs(Fragment, { children: [
9
- /* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "7" }),
10
- /* @__PURE__ */ jsx("path", { d: "m20 20-3.5-3.5" })
11
- ] }),
12
- plus: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" }) }),
13
- minus: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M5 12h14" }) }),
14
- check: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "m4 12 5 5L20 6" }) }),
15
- x: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M6 6l12 12M18 6 6 18" }) }),
16
- chevDown: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }) }),
17
- chevRight: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "m9 6 6 6-6 6" }) }),
18
- chevLeft: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "m15 6-6 6 6 6" }) }),
19
- chevUp: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "m6 15 6-6 6 6" }) }),
20
- arrowRight: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M5 12h14M13 6l6 6-6 6" }) }),
21
- settings: /* @__PURE__ */ jsxs(Fragment, { children: [
22
- /* @__PURE__ */ jsx("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
23
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
24
- ] }),
25
- user: /* @__PURE__ */ jsxs(Fragment, { children: [
26
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "8", r: "4" }),
27
- /* @__PURE__ */ jsx("path", { d: "M4 21a8 8 0 0 1 16 0" })
28
- ] }),
29
- bell: /* @__PURE__ */ jsxs(Fragment, { children: [
30
- /* @__PURE__ */ jsx("path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" }),
31
- /* @__PURE__ */ jsx("path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0" })
32
- ] }),
33
- mail: /* @__PURE__ */ jsxs(Fragment, { children: [
34
- /* @__PURE__ */ jsx("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
35
- /* @__PURE__ */ jsx("path", { d: "m3 7 9 6 9-6" })
36
- ] }),
37
- heart: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" }) }),
38
- star: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" }) }),
39
- home: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "m3 10 9-7 9 7v10a2 2 0 0 1-2 2h-4v-7h-6v7H5a2 2 0 0 1-2-2z" }) }),
40
- folder: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M3 7a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }) }),
41
- file: /* @__PURE__ */ jsxs(Fragment, { children: [
42
- /* @__PURE__ */ jsx("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
43
- /* @__PURE__ */ jsx("path", { d: "M14 3v6h6" })
44
- ] }),
45
- image: /* @__PURE__ */ jsxs(Fragment, { children: [
46
- /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
47
- /* @__PURE__ */ jsx("circle", { cx: "9", cy: "9", r: "2" }),
48
- /* @__PURE__ */ jsx("path", { d: "m21 15-5-5L5 21" })
49
- ] }),
50
- play: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M7 5v14l11-7z", fill: "currentColor", stroke: "none" }) }),
51
- pause: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M6 4h4v16H6zM14 4h4v16h-4z", fill: "currentColor", stroke: "none" }) }),
52
- volume: /* @__PURE__ */ jsxs(Fragment, { children: [
53
- /* @__PURE__ */ jsx("path", { d: "M11 5 6 9H3v6h3l5 4z" }),
54
- /* @__PURE__ */ jsx("path", { d: "M17 8a5 5 0 0 1 0 8M20 5a9 9 0 0 1 0 14" })
55
- ] }),
56
- trash: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M5 6l1 14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-14" }) }),
57
- edit: /* @__PURE__ */ jsxs(Fragment, { children: [
58
- /* @__PURE__ */ jsx("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
59
- /* @__PURE__ */ jsx("path", { d: "M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4z" })
60
- ] }),
61
- copy: /* @__PURE__ */ jsxs(Fragment, { children: [
62
- /* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
63
- /* @__PURE__ */ jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
64
- ] }),
65
- download: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3" }) }),
66
- upload: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12" }) }),
67
- info: /* @__PURE__ */ jsxs(Fragment, { children: [
68
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
69
- /* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01" })
70
- ] }),
71
- alert: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM12 9v4M12 17h.01" }) }),
72
- check2: /* @__PURE__ */ jsxs(Fragment, { children: [
73
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
74
- /* @__PURE__ */ jsx("path", { d: "m9 12 2 2 4-4" })
75
- ] }),
76
- eye: /* @__PURE__ */ jsxs(Fragment, { children: [
77
- /* @__PURE__ */ jsx("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z" }),
78
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
79
- ] }),
80
- eyeOff: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-10-8-10-8a19 19 0 0 1 5.17-6M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 10 8 10 8a19 19 0 0 1-2.16 3.19M14.12 14.12a3 3 0 1 1-4.24-4.24M1 1l22 22" }) }),
81
- sparkle: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M12 3v4M12 17v4M3 12h4M17 12h4M5.6 5.6l2.8 2.8M15.6 15.6l2.8 2.8M5.6 18.4l2.8-2.8M15.6 8.4l2.8-2.8" }) }),
82
- moon: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z" }) }),
83
- sun: /* @__PURE__ */ jsxs(Fragment, { children: [
84
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4" }),
85
- /* @__PURE__ */ jsx("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" })
86
- ] }),
87
- palette: /* @__PURE__ */ jsxs(Fragment, { children: [
88
- /* @__PURE__ */ jsx("circle", { cx: "13.5", cy: "6.5", r: "1" }),
89
- /* @__PURE__ */ jsx("circle", { cx: "17.5", cy: "10.5", r: "1" }),
90
- /* @__PURE__ */ jsx("circle", { cx: "8.5", cy: "7.5", r: "1" }),
91
- /* @__PURE__ */ jsx("circle", { cx: "6.5", cy: "12.5", r: "1" }),
92
- /* @__PURE__ */ jsx("path", { d: "M12 2a10 10 0 1 0 0 20 3 3 0 0 0 0-6h-1a2 2 0 0 1 0-4h4a5 5 0 0 0 5-5 10 10 0 0 0-8-5z" })
93
- ] }),
94
- layers: /* @__PURE__ */ jsxs(Fragment, { children: [
95
- /* @__PURE__ */ jsx("path", { d: "m12 2 10 6-10 6L2 8z" }),
96
- /* @__PURE__ */ jsx("path", { d: "m2 17 10 6 10-6M2 12l10 6 10-6" })
97
- ] }),
98
- grid: /* @__PURE__ */ jsxs(Fragment, { children: [
99
- /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "7", height: "7" }),
100
- /* @__PURE__ */ jsx("rect", { x: "14", y: "3", width: "7", height: "7" }),
101
- /* @__PURE__ */ jsx("rect", { x: "3", y: "14", width: "7", height: "7" }),
102
- /* @__PURE__ */ jsx("rect", { x: "14", y: "14", width: "7", height: "7" })
103
- ] }),
104
- list: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" }) }),
105
- zap: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M13 2 3 14h9l-1 8 10-12h-9z" }) }),
106
- filter: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M22 3H2l8 9.46V19l4 2v-8.54z" }) }),
107
- mic: /* @__PURE__ */ jsxs(Fragment, { children: [
108
- /* @__PURE__ */ jsx("rect", { x: "9", y: "2", width: "6", height: "12", rx: "3" }),
109
- /* @__PURE__ */ jsx("path", { d: "M19 10v1a7 7 0 0 1-14 0v-1M12 18v4M8 22h8" })
110
- ] }),
111
- send: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "m22 2-7 20-4-9-9-4zM22 2 11 13" }) }),
112
- calendar: /* @__PURE__ */ jsxs(Fragment, { children: [
113
- /* @__PURE__ */ jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
114
- /* @__PURE__ */ jsx("path", { d: "M16 2v4M8 2v4M3 10h18" })
115
- ] }),
116
- clock: /* @__PURE__ */ jsxs(Fragment, { children: [
117
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
118
- /* @__PURE__ */ jsx("path", { d: "M12 6v6l4 2" })
119
- ] }),
120
- menu: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M3 6h18M3 12h18M3 18h18" }) }),
121
- more: /* @__PURE__ */ jsxs(Fragment, { children: [
122
- /* @__PURE__ */ jsx("circle", { cx: "5", cy: "12", r: "1" }),
123
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1" }),
124
- /* @__PURE__ */ jsx("circle", { cx: "19", cy: "12", r: "1" })
125
- ] }),
126
- sliders: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6" }) }),
127
- aim: /* @__PURE__ */ jsxs(Fragment, { children: [
128
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
129
- /* @__PURE__ */ jsx("line", { x1: "12", y1: "2", x2: "12", y2: "6" }),
130
- /* @__PURE__ */ jsx("line", { x1: "12", y1: "18", x2: "12", y2: "22" }),
131
- /* @__PURE__ */ jsx("line", { x1: "2", y1: "12", x2: "6", y2: "12" }),
132
- /* @__PURE__ */ jsx("line", { x1: "18", y1: "12", x2: "22", y2: "12" }),
133
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" })
134
- ] }),
135
- swap: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M3 8h18M17 4l4 4-4 4M21 16H3M7 20l-4-4 4-4" }) }),
136
- camera: /* @__PURE__ */ jsxs(Fragment, { children: [
137
- /* @__PURE__ */ jsx("path", { d: "M3 7h4l2-3h6l2 3h4a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1z" }),
138
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "13", r: "4" })
139
- ] }),
140
- qq: /* @__PURE__ */ jsxs(Fragment, { children: [
141
- /* @__PURE__ */ jsx("path", { d: "M12 2c-3 0-5 2.1-5 5 0 1.3.4 2.6.9 3.6-1.8 1-3.4 3-3.4 5.9 0 .8.7 1.5 1.5 1.5 0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2 .8 0 1.5-.7 1.5-1.5 0-2.9-1.6-4.9-3.4-5.9.5-1 .9-2.3.9-3.6 0-2.9-2-5-5-5z" }),
142
- /* @__PURE__ */ jsx("circle", { cx: "10", cy: "9", r: "0.8", fill: "currentColor", stroke: "none" }),
143
- /* @__PURE__ */ jsx("circle", { cx: "14", cy: "9", r: "0.8", fill: "currentColor", stroke: "none" })
144
- ] }),
145
- code: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "m16 18 6-6-6-6M8 6l-6 6 6 6" }) })
146
- };
147
- var Icon = React.forwardRef(
148
- ({ name, size = 16, stroke = 2, style, ...rest }, ref) => /* @__PURE__ */ jsx(
149
- "svg",
150
- {
151
- ref,
152
- width: size,
153
- height: size,
154
- viewBox: "0 0 24 24",
155
- fill: "none",
156
- stroke: "currentColor",
157
- strokeWidth: stroke,
158
- strokeLinecap: "round",
159
- strokeLinejoin: "round",
160
- overflow: "visible",
161
- style,
162
- ...rest,
163
- children: paths[name]
164
- }
165
- )
166
- );
167
- Icon.displayName = "Icon";
168
- var ICON_NAMES = ["search", "plus", "minus", "check", "x", "chevDown", "chevRight", "chevLeft", "chevUp", "arrowRight", "settings", "user", "bell", "mail", "heart", "star", "home", "folder", "file", "image", "play", "pause", "volume", "trash", "edit", "copy", "download", "upload", "info", "alert", "check2", "eye", "eyeOff", "sparkle", "moon", "sun", "palette", "layers", "grid", "list", "zap", "filter", "mic", "send", "calendar", "clock", "menu", "more", "sliders", "aim", "swap", "camera", "qq", "code"];
169
-
170
- export { ICON_NAMES, Icon };
@@ -1,62 +0,0 @@
1
- 'use strict';
2
-
3
- require('./tokens-BIIUTPKN.css');
4
- require('./shared-NJHRNLRH.css');
5
- require('./Card-RG7ECXL2.css');
6
- var React = require('react');
7
- var jsxRuntime = require('react/jsx-runtime');
8
-
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () { return e[k]; }
19
- });
20
- }
21
- });
22
- }
23
- n.default = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
-
29
- // src/components/Card/Card.tsx
30
- var Card = React__namespace.forwardRef(
31
- ({ variant = "raised", padding = "md", hoverable, className = "", children, ...rest }, ref) => {
32
- const cls = [
33
- "card",
34
- variant,
35
- padding !== "md" && `pad-${padding}`,
36
- hoverable && "hoverable",
37
- className
38
- ].filter(Boolean).join(" ");
39
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cls, ...rest, children });
40
- }
41
- );
42
- Card.displayName = "Card";
43
- var Panel = ({
44
- title,
45
- description,
46
- actions,
47
- children,
48
- className = "",
49
- ...rest
50
- }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `panel ${className}`, ...rest, children: [
51
- (title || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "panel-head", children: [
52
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "panel-titles", children: [
53
- title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "panel-title", children: title }),
54
- description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "panel-desc", children: description })
55
- ] }),
56
- actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "panel-actions", children: actions })
57
- ] }),
58
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "panel-body", children })
59
- ] });
60
-
61
- exports.Card = Card;
62
- exports.Panel = Panel;
@@ -1,100 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk2MNAZRWE_cjs = require('./chunk-2MNAZRWE.cjs');
4
- require('./tokens-BIIUTPKN.css');
5
- require('./shared-NJHRNLRH.css');
6
- require('./Toast-YSACW3EM.css');
7
- var React = require('react');
8
- var ReactDOM = require('react-dom');
9
- var jsxRuntime = require('react/jsx-runtime');
10
-
11
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
-
13
- function _interopNamespace(e) {
14
- if (e && e.__esModule) return e;
15
- var n = Object.create(null);
16
- if (e) {
17
- Object.keys(e).forEach(function (k) {
18
- if (k !== 'default') {
19
- var d = Object.getOwnPropertyDescriptor(e, k);
20
- Object.defineProperty(n, k, d.get ? d : {
21
- enumerable: true,
22
- get: function () { return e[k]; }
23
- });
24
- }
25
- });
26
- }
27
- n.default = e;
28
- return Object.freeze(n);
29
- }
30
-
31
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
- var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
33
-
34
- var listeners = /* @__PURE__ */ new Set();
35
- var items = [];
36
- var uid = 0;
37
- var autoMounted = false;
38
- function emit() {
39
- if (listeners.size === 0 && !autoMounted && typeof document !== "undefined") {
40
- autoMounted = true;
41
- const div = document.createElement("div");
42
- document.body.appendChild(div);
43
- const root = ReactDOM__default.default.createRoot ? ReactDOM__default.default.createRoot(div) : null;
44
- if (root) {
45
- root.render(React__namespace.createElement(ToastContainer));
46
- }
47
- }
48
- listeners.forEach((l) => l(items));
49
- }
50
- var toast = {
51
- show(t) {
52
- const id = ++uid;
53
- items = [...items, { ...t, id, duration: t.duration ?? 3200 }];
54
- emit();
55
- if (items[items.length - 1].duration > 0) {
56
- setTimeout(() => toast.dismiss(id), items[items.length - 1].duration);
57
- }
58
- return id;
59
- },
60
- info: (message, title) => toast.show({ type: "info", message, title }),
61
- success: (message, title) => toast.show({ type: "success", message, title }),
62
- warn: (message, title) => toast.show({ type: "warning", message, title }),
63
- error: (message, title) => toast.show({ type: "danger", message, title }),
64
- dismiss(id) {
65
- items = items.filter((i) => i.id !== id);
66
- emit();
67
- },
68
- clear() {
69
- items = [];
70
- emit();
71
- }
72
- };
73
- var ToastContainer = React__namespace.forwardRef(({ placement = "top-right", className = "", ...rest }, ref) => {
74
- const [list, setList] = React__namespace.useState(items);
75
- React__namespace.useEffect(() => {
76
- listeners.add(setList);
77
- return () => {
78
- listeners.delete(setList);
79
- };
80
- }, []);
81
- if (typeof document === "undefined") return null;
82
- return ReactDOM__default.default.createPortal(
83
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: `toast-container ${placement} ${className}`, ...rest, children: list.map((t) => {
84
- const iconName = t.type === "success" ? "check2" : t.type === "warning" ? "alert" : t.type === "danger" ? "alert" : "info";
85
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `toast ${t.type}`, role: "status", children: [
86
- /* @__PURE__ */ jsxRuntime.jsx(chunk2MNAZRWE_cjs.Icon, { name: iconName, size: 18, className: "toast-icon" }),
87
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "toast-body", children: [
88
- t.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "toast-title", children: t.title }),
89
- t.message && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "toast-msg", children: t.message })
90
- ] }),
91
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "toast-close", onClick: () => toast.dismiss(t.id), "aria-label": "Dismiss", children: /* @__PURE__ */ jsxRuntime.jsx(chunk2MNAZRWE_cjs.Icon, { name: "x", size: 14 }) })
92
- ] }, t.id);
93
- }) }),
94
- document.body
95
- );
96
- });
97
- ToastContainer.displayName = "ToastContainer";
98
-
99
- exports.ToastContainer = ToastContainer;
100
- exports.toast = toast;
@@ -1,58 +0,0 @@
1
- # Spinner 加载
2
-
3
- > 表示任务正在进行,提示用户等待。
4
-
5
- ## 导入
6
-
7
- ```tsx
8
- import { Spinner } from "@fangxinyan/lumina";
9
- ```
10
-
11
- ## 示例
12
-
13
- ### 基础
14
-
15
- ```tsx
16
- <Spinner />
17
- <Spinner size={28} />
18
- <Spinner size={40} />
19
- ```
20
-
21
- ### 色调
22
-
23
- ```tsx
24
- <Spinner tone="accent" />
25
- <Spinner tone="success" />
26
- <Spinner tone="warning" />
27
- <Spinner tone="danger" />
28
- ```
29
-
30
- ### Dots 变体
31
-
32
- ```tsx
33
- <Spinner variant="dots" />
34
- <Spinner variant="dots" size={24} />
35
- <Spinner variant="dots" size={32} />
36
- ```
37
-
38
- ### 带文案
39
-
40
- ```tsx
41
- <Spinner label="加载中…" />
42
- <Spinner variant="dots" tone="accent" label="正在同步" />
43
- ```
44
-
45
- ## API
46
-
47
- **Spinner**
48
-
49
- | Prop | 类型 | 默认 | 说明 |
50
- | --- | --- | --- | --- |
51
- | size | `number` | `20` | 尺寸 (px) |
52
- | tone | `"accent" | "success" | "warning" | "danger" | "current"` | `"accent"` | 色调 |
53
- | variant | `"ring" | "dots"` | `"ring"` | 样式 |
54
- | label | `ReactNode` | — | 文案 |
55
-
56
-
57
- ---
58
- [← 回到索引](../llms.md)
@@ -1,51 +0,0 @@
1
- # Toast 通知
2
-
3
- > 全局轻量提示,4 种语义。
4
-
5
- ## 导入
6
-
7
- ```tsx
8
- import { toast, ToastContainer } from "@fangxinyan/lumina";
9
- ```
10
-
11
- ## 示例
12
-
13
- ### 四种语义
14
-
15
- ```tsx
16
- toast.info("已保存到草稿");
17
- toast.success("操作完成");
18
- toast.warn("请注意");
19
- toast.error("发生错误");
20
- ```
21
-
22
- ### 带标题
23
-
24
- ```tsx
25
- toast.success("已上传 5 个文件", "上传完成");
26
- ```
27
-
28
- ## API
29
-
30
- **toast.***
31
-
32
- | Prop | 类型 | 默认 | 说明 |
33
- | --- | --- | --- | --- |
34
- | info(message, title?) | `(msg, title?) => id` | — | 信息提示 |
35
- | success(message, title?) | `(msg, title?) => id` | — | 成功 |
36
- | warn(message, title?) | `(msg, title?) => id` | — | 警告 |
37
- | error(message, title?) | `(msg, title?) => id` | — | 错误 |
38
- | show({ type, message, title?, duration? }) | `(item) => id` | — | 完整 API |
39
- | dismiss(id) | `(id: number) => void` | — | 关闭一条 |
40
- | clear() | `() => void` | — | 清空全部 |
41
-
42
-
43
- **ToastContainer**
44
-
45
- | Prop | 类型 | 默认 | 说明 |
46
- | --- | --- | --- | --- |
47
- | placement | `"top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center"` | `"top-right"` | 位置 |
48
-
49
-
50
- ---
51
- [← 回到索引](../llms.md)