asterui 0.11.0 → 0.12.1
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/README.md +1 -103
- package/dist/components/Anchor.d.ts +45 -0
- package/dist/components/Diff.d.ts +12 -0
- package/dist/components/Form.d.ts +27 -2
- package/dist/components/Kbd.d.ts +8 -0
- package/dist/components/Radio.d.ts +7 -1
- package/dist/components/Status.d.ts +18 -0
- package/dist/components/TextRotate.d.ts +13 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.js +210 -200
- package/dist/index.js.map +1 -1
- package/dist/index10.js +92 -30
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +8 -5
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +12 -41
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +31 -2
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +17 -6
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +10788 -147
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +5 -30
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +39 -27
- package/dist/index106.js.map +1 -1
- package/dist/index108.js +6 -71
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +147 -34
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +28 -263
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +28 -24
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +28 -19
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +2 -24
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +71 -19
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +33 -94
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +24 -358
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +19 -23
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +22 -71
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +17 -13
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +91 -57
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +259 -89
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +357 -141
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +25 -2
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +70 -53
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +16 -2
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +66 -2
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +144 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -2
- package/dist/index127.js +56 -2
- package/dist/index127.js.map +1 -1
- package/dist/index13.js +90 -153
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +2 -32
- package/dist/index130.js.map +1 -1
- package/dist/index132.js +2 -8
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +2 -2
- package/dist/index134.js +2 -2
- package/dist/index135.js +2 -21
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +32 -2
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +2 -24
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +7 -70
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +2 -21
- package/dist/index139.js.map +1 -1
- package/dist/index14.js +154 -146
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +2 -34
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +20 -69
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +2 -2
- package/dist/index143.js +24 -2
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +70 -21
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +21 -2
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +34 -2
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +70 -2
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +2 -2
- package/dist/index149.js +21 -3
- package/dist/index149.js.map +1 -1
- package/dist/index15.js +150 -5
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +5 -0
- package/dist/index150.js.map +1 -0
- package/dist/index151.js +5 -0
- package/dist/index151.js.map +1 -0
- package/dist/index152.js +5 -0
- package/dist/index152.js.map +1 -0
- package/dist/index153.js +5 -0
- package/dist/index153.js.map +1 -0
- package/dist/index154.js +7 -0
- package/dist/index154.js.map +1 -0
- package/dist/index16.js +5 -71
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +71 -17
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +15 -96
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +89 -105
- package/dist/index19.js.map +1 -1
- package/dist/index20.js +107 -177
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +181 -107
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +107 -29
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +19 -41
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +31 -11
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +41 -33
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +12 -63
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +33 -80
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +63 -18
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +78 -159
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +96 -27
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +16 -1080
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +218 -16
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +1081 -121
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +17 -39
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +121 -190
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +37 -94
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +186 -157
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +89 -138
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +161 -14
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +146 -21
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +26 -99
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +12 -116
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +18 -13
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +21 -35
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +117 -114
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +13 -176
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +34 -146
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +116 -12
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +176 -22
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +147 -14
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +10 -5
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +100 -60
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +21 -265
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +10 -13
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +7 -122
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +262 -106
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +14 -167
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +121 -31
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +107 -119
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +161 -77
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +31 -19
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +117 -69
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +61 -130
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +82 -53
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +19 -44
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +70 -48
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +55 -60
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +39 -101
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +52 -41
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +58 -64
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +105 -19
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +41 -46
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +63 -129
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +130 -11
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +19 -50
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +46 -22
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +134 -22
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +51 -328
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +19 -53
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +31 -40
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +22 -95
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +311 -112
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +52 -157
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +40 -65
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +11 -70
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +23 -35
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +88 -227
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +130 -34
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +153 -202
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +61 -209
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +34 -294
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +228 -172
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +32 -256
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +208 -12
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +209 -29
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +69 -91
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +294 -5
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +176 -12
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +256 -44
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +13 -12
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +32 -14
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +5 -7
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +13 -12
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +42 -27
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +11 -16
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +12 -10790
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,205 +1,215 @@
|
|
|
1
1
|
import { Affix as e } from "./index2.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
2
|
+
import { Anchor as p } from "./index3.js";
|
|
3
|
+
import { Alert as f } from "./index4.js";
|
|
4
|
+
import { Autocomplete as a } from "./index5.js";
|
|
5
|
+
import { Avatar as n, AvatarGroup as s } from "./index6.js";
|
|
6
|
+
import { Badge as l } from "./index7.js";
|
|
7
|
+
import { Breadcrumb as c } from "./index8.js";
|
|
8
|
+
import { Button as T } from "./index9.js";
|
|
9
|
+
import { Checkbox as P } from "./index10.js";
|
|
10
|
+
import { Chat as b } from "./index11.js";
|
|
11
|
+
import { ColorPicker as h } from "./index12.js";
|
|
12
|
+
import { Card as y } from "./index13.js";
|
|
13
|
+
import { Cascader as R } from "./index14.js";
|
|
14
|
+
import { Chart as F } from "./index15.js";
|
|
15
|
+
import { Carousel as A } from "./index16.js";
|
|
16
|
+
import { Collapse as L } from "./index17.js";
|
|
17
|
+
import { Container as H } from "./index18.js";
|
|
18
|
+
import { ContextMenu as G } from "./index19.js";
|
|
19
|
+
import { Countdown as O } from "./index20.js";
|
|
20
|
+
import { DatePicker as z } from "./index21.js";
|
|
21
|
+
import { Descriptions as J } from "./index22.js";
|
|
22
|
+
import { Diff as U } from "./index23.js";
|
|
23
|
+
import { Divider as q } from "./index24.js";
|
|
24
|
+
import { Drawer as X } from "./index25.js";
|
|
25
|
+
import { Fieldset as Z } from "./index26.js";
|
|
26
|
+
import { FileInput as $ } from "./index27.js";
|
|
27
|
+
import { Flex as ro } from "./index28.js";
|
|
28
|
+
import { FloatButton as to } from "./index29.js";
|
|
29
|
+
import { Footer as mo } from "./index30.js";
|
|
30
|
+
import { Form as xo, useFormInstance as ao } from "./index31.js";
|
|
31
|
+
import { Col as no, Grid as so, Row as uo } from "./index32.js";
|
|
32
|
+
import { Hero as co } from "./index33.js";
|
|
33
|
+
import { Image as To } from "./index34.js";
|
|
34
|
+
import { Indicator as Po } from "./index35.js";
|
|
35
|
+
import { Dropdown as bo } from "./index36.js";
|
|
36
|
+
import { Empty as ho } from "./index37.js";
|
|
37
|
+
import { Input as yo } from "./index38.js";
|
|
38
|
+
import { InputNumber as Ro } from "./index39.js";
|
|
39
|
+
import { Join as Fo } from "./index40.js";
|
|
40
|
+
import { Kbd as Ao } from "./index41.js";
|
|
41
|
+
import { Label as Lo } from "./index42.js";
|
|
42
|
+
import { Layout as Ho, useSiderContext as Ko } from "./index43.js";
|
|
43
|
+
import { List as No } from "./index44.js";
|
|
44
|
+
import { Loading as Wo } from "./index45.js";
|
|
45
|
+
import { Masonry as Eo } from "./index46.js";
|
|
46
|
+
import { Mention as Qo } from "./index47.js";
|
|
47
|
+
import { Menu as jo } from "./index48.js";
|
|
48
|
+
import { Browser as Vo } from "./index49.js";
|
|
49
|
+
import { Code as Yo } from "./index50.js";
|
|
50
|
+
import { Phone as _o } from "./index51.js";
|
|
51
|
+
import { Window as or } from "./index52.js";
|
|
52
|
+
import { Modal as er } from "./index53.js";
|
|
53
|
+
import { Navbar as pr } from "./index54.js";
|
|
54
|
+
import { notification as fr } from "./index55.js";
|
|
55
|
+
import { OTPInput as ar } from "./index56.js";
|
|
56
|
+
import { Pagination as nr } from "./index57.js";
|
|
57
|
+
import { PageLayout as ur } from "./index58.js";
|
|
58
|
+
import { Popconfirm as dr } from "./index59.js";
|
|
59
|
+
import { Popover as Cr } from "./index60.js";
|
|
60
|
+
import { Progress as gr } from "./index61.js";
|
|
61
|
+
import { QRCode as Sr } from "./index62.js";
|
|
62
|
+
import { Radio as kr } from "./index63.js";
|
|
63
|
+
import { RadialProgress as wr } from "./index64.js";
|
|
64
|
+
import { Range as Dr } from "./index65.js";
|
|
65
|
+
import { Rating as vr } from "./index66.js";
|
|
66
|
+
import { Result as Ir } from "./index67.js";
|
|
67
|
+
import { Select as Br } from "./index68.js";
|
|
68
|
+
import { Segmented as Mr } from "./index69.js";
|
|
69
|
+
import { Skeleton as Kr } from "./index70.js";
|
|
70
|
+
import { Space as Nr } from "./index71.js";
|
|
71
|
+
import { Splitter as Wr } from "./index72.js";
|
|
72
|
+
import { Stack as Er } from "./index73.js";
|
|
73
|
+
import { Stats as Qr } from "./index74.js";
|
|
74
|
+
import { Status as jr } from "./index75.js";
|
|
75
|
+
import { Steps as Vr } from "./index76.js";
|
|
76
|
+
import { Table as Yr } from "./index77.js";
|
|
77
|
+
import { Tabs as _r } from "./index78.js";
|
|
78
|
+
import { Textarea as oe } from "./index79.js";
|
|
79
|
+
import { TextRotate as ee } from "./index80.js";
|
|
80
|
+
import { CheckableTag as pe, Tag as me } from "./index81.js";
|
|
81
|
+
import { ThemeController as xe } from "./index82.js";
|
|
82
|
+
import { TimePicker as ie } from "./index83.js";
|
|
83
|
+
import { Timeline as se } from "./index84.js";
|
|
84
|
+
import { Toggle as le } from "./index85.js";
|
|
85
|
+
import { Tour as ce } from "./index86.js";
|
|
86
|
+
import { Tooltip as Te } from "./index87.js";
|
|
87
|
+
import { Transfer as Pe } from "./index88.js";
|
|
88
|
+
import { Tree as be } from "./index89.js";
|
|
89
|
+
import { TreeSelect as he } from "./index90.js";
|
|
90
|
+
import { Typography as ye } from "./index91.js";
|
|
91
|
+
import { Upload as Re } from "./index92.js";
|
|
92
|
+
import { Hide as Fe, Show as Ie } from "./index93.js";
|
|
93
|
+
import { useBreakpoint as Be } from "./index94.js";
|
|
94
|
+
import { useDisclosure as Me } from "./index95.js";
|
|
95
|
+
import { useClipboard as Ke } from "./index96.js";
|
|
96
|
+
import { useLocalStorage as Ne } from "./index97.js";
|
|
97
|
+
import { useDebounce as We } from "./index98.js";
|
|
98
|
+
import { useClickOutside as Ee } from "./index99.js";
|
|
99
|
+
import { usePrevious as Qe } from "./index100.js";
|
|
100
|
+
import { useHover as je } from "./index101.js";
|
|
101
|
+
import { useKeyPress as Ve, useKeyPressCallback as Xe } from "./index102.js";
|
|
102
|
+
import { useWindowSize as Ze } from "./index103.js";
|
|
98
103
|
export {
|
|
99
104
|
e as Affix,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
a as
|
|
103
|
-
|
|
104
|
-
s as
|
|
105
|
-
l as
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
H as
|
|
121
|
-
|
|
122
|
-
O as
|
|
123
|
-
z as
|
|
124
|
-
J as
|
|
125
|
-
U as
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
Z as
|
|
131
|
-
$ as
|
|
132
|
-
ro as
|
|
133
|
-
to as
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
yo as
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
No as
|
|
148
|
-
Wo as
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
pr as
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
nr as
|
|
157
|
-
|
|
158
|
-
dr as
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
Sr as
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
Nr as
|
|
173
|
-
Wr as
|
|
174
|
-
Er as
|
|
175
|
-
Qr as
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
ie as
|
|
185
|
-
se as
|
|
186
|
-
le as
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
105
|
+
f as Alert,
|
|
106
|
+
p as Anchor,
|
|
107
|
+
a as Autocomplete,
|
|
108
|
+
n as Avatar,
|
|
109
|
+
s as AvatarGroup,
|
|
110
|
+
l as Badge,
|
|
111
|
+
c as Breadcrumb,
|
|
112
|
+
Vo as Browser,
|
|
113
|
+
T as Button,
|
|
114
|
+
y as Card,
|
|
115
|
+
A as Carousel,
|
|
116
|
+
R as Cascader,
|
|
117
|
+
F as Chart,
|
|
118
|
+
b as Chat,
|
|
119
|
+
pe as CheckableTag,
|
|
120
|
+
P as Checkbox,
|
|
121
|
+
Yo as Code,
|
|
122
|
+
no as Col,
|
|
123
|
+
L as Collapse,
|
|
124
|
+
h as ColorPicker,
|
|
125
|
+
H as Container,
|
|
126
|
+
G as ContextMenu,
|
|
127
|
+
O as Countdown,
|
|
128
|
+
z as DatePicker,
|
|
129
|
+
J as Descriptions,
|
|
130
|
+
U as Diff,
|
|
131
|
+
q as Divider,
|
|
132
|
+
X as Drawer,
|
|
133
|
+
bo as Dropdown,
|
|
134
|
+
ho as Empty,
|
|
135
|
+
Z as Fieldset,
|
|
136
|
+
$ as FileInput,
|
|
137
|
+
ro as Flex,
|
|
138
|
+
to as FloatButton,
|
|
139
|
+
mo as Footer,
|
|
140
|
+
xo as Form,
|
|
141
|
+
so as Grid,
|
|
142
|
+
co as Hero,
|
|
143
|
+
Fe as Hide,
|
|
144
|
+
To as Image,
|
|
145
|
+
Po as Indicator,
|
|
146
|
+
yo as Input,
|
|
147
|
+
Ro as InputNumber,
|
|
148
|
+
Fo as Join,
|
|
149
|
+
Ao as Kbd,
|
|
150
|
+
Lo as Label,
|
|
151
|
+
Ho as Layout,
|
|
152
|
+
No as List,
|
|
153
|
+
Wo as Loading,
|
|
154
|
+
Eo as Masonry,
|
|
155
|
+
Qo as Mention,
|
|
156
|
+
jo as Menu,
|
|
157
|
+
er as Modal,
|
|
158
|
+
pr as Navbar,
|
|
159
|
+
ar as OTPInput,
|
|
160
|
+
ur as PageLayout,
|
|
161
|
+
nr as Pagination,
|
|
162
|
+
_o as Phone,
|
|
163
|
+
dr as Popconfirm,
|
|
164
|
+
Cr as Popover,
|
|
165
|
+
gr as Progress,
|
|
166
|
+
Sr as QRCode,
|
|
167
|
+
wr as RadialProgress,
|
|
168
|
+
kr as Radio,
|
|
169
|
+
Dr as Range,
|
|
170
|
+
vr as Rating,
|
|
171
|
+
Ir as Result,
|
|
172
|
+
uo as Row,
|
|
173
|
+
Mr as Segmented,
|
|
174
|
+
Br as Select,
|
|
175
|
+
Ie as Show,
|
|
176
|
+
Kr as Skeleton,
|
|
177
|
+
Nr as Space,
|
|
178
|
+
Wr as Splitter,
|
|
179
|
+
Er as Stack,
|
|
180
|
+
Qr as Stats,
|
|
181
|
+
jr as Status,
|
|
182
|
+
Vr as Steps,
|
|
183
|
+
Yr as Table,
|
|
184
|
+
_r as Tabs,
|
|
185
|
+
me as Tag,
|
|
186
|
+
ee as TextRotate,
|
|
187
|
+
oe as Textarea,
|
|
188
|
+
xe as ThemeController,
|
|
189
|
+
ie as TimePicker,
|
|
190
|
+
se as Timeline,
|
|
191
|
+
le as Toggle,
|
|
192
|
+
Te as Tooltip,
|
|
193
|
+
ce as Tour,
|
|
194
|
+
Pe as Transfer,
|
|
195
|
+
be as Tree,
|
|
196
|
+
he as TreeSelect,
|
|
197
|
+
ye as Typography,
|
|
198
|
+
Re as Upload,
|
|
199
|
+
or as Window,
|
|
200
|
+
fr as notification,
|
|
201
|
+
Be as useBreakpoint,
|
|
202
|
+
Ee as useClickOutside,
|
|
203
|
+
Ke as useClipboard,
|
|
204
|
+
We as useDebounce,
|
|
205
|
+
Me as useDisclosure,
|
|
206
|
+
ao as useFormInstance,
|
|
207
|
+
je as useHover,
|
|
208
|
+
Ve as useKeyPress,
|
|
209
|
+
Xe as useKeyPressCallback,
|
|
210
|
+
Ne as useLocalStorage,
|
|
211
|
+
Qe as usePrevious,
|
|
212
|
+
Ko as useSiderContext,
|
|
213
|
+
Ze as useWindowSize
|
|
204
214
|
};
|
|
205
215
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index10.js
CHANGED
|
@@ -1,33 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { jsx as s, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import j, { forwardRef as R, useContext as V, createContext as G } from "react";
|
|
3
|
+
const g = G(null);
|
|
4
|
+
function S({
|
|
5
|
+
children: i,
|
|
6
|
+
value: n,
|
|
7
|
+
defaultValue: b,
|
|
8
|
+
onChange: o,
|
|
9
|
+
disabled: f = !1,
|
|
10
|
+
options: c,
|
|
11
|
+
className: h = ""
|
|
12
|
+
}) {
|
|
13
|
+
const [k, m] = j.useState(b || []), l = n !== void 0 ? n : k, t = {
|
|
14
|
+
value: l,
|
|
15
|
+
onChange: (e, p) => {
|
|
16
|
+
const d = p ? [...l, e] : l.filter((x) => x !== e);
|
|
17
|
+
n === void 0 && m(d), o?.(d);
|
|
18
|
+
},
|
|
19
|
+
disabled: f
|
|
20
|
+
};
|
|
21
|
+
return c ? /* @__PURE__ */ s(g.Provider, { value: t, children: /* @__PURE__ */ s("div", { className: h, children: c.map((e) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ C("label", { className: "label cursor-pointer justify-start gap-2", children: [
|
|
22
|
+
/* @__PURE__ */ s(u, { value: e }),
|
|
23
|
+
/* @__PURE__ */ s("span", { className: "label-text", children: e })
|
|
24
|
+
] }, e) : /* @__PURE__ */ C("label", { className: "label cursor-pointer justify-start gap-2", children: [
|
|
25
|
+
/* @__PURE__ */ s(u, { value: e.value, disabled: e.disabled }),
|
|
26
|
+
/* @__PURE__ */ s("span", { className: "label-text", children: e.label })
|
|
27
|
+
] }, e.value)) }) }) : /* @__PURE__ */ s(g.Provider, { value: t, children: /* @__PURE__ */ s("div", { className: h, children: i }) });
|
|
28
|
+
}
|
|
29
|
+
const u = R(
|
|
30
|
+
({
|
|
31
|
+
children: i,
|
|
32
|
+
size: n,
|
|
33
|
+
color: b,
|
|
34
|
+
indeterminate: o = !1,
|
|
35
|
+
className: f = "",
|
|
36
|
+
value: c,
|
|
37
|
+
checked: h,
|
|
38
|
+
onChange: k,
|
|
39
|
+
disabled: m,
|
|
40
|
+
...l
|
|
41
|
+
}, r) => {
|
|
42
|
+
const t = V(g), e = {
|
|
43
|
+
xs: "checkbox-xs",
|
|
44
|
+
sm: "checkbox-sm",
|
|
45
|
+
md: "checkbox-md",
|
|
46
|
+
lg: "checkbox-lg",
|
|
47
|
+
xl: "checkbox-xl"
|
|
48
|
+
}, p = {
|
|
49
|
+
primary: "checkbox-primary",
|
|
50
|
+
secondary: "checkbox-secondary",
|
|
51
|
+
accent: "checkbox-accent",
|
|
52
|
+
neutral: "checkbox-neutral",
|
|
53
|
+
success: "checkbox-success",
|
|
54
|
+
warning: "checkbox-warning",
|
|
55
|
+
info: "checkbox-info",
|
|
56
|
+
error: "checkbox-error"
|
|
57
|
+
}, d = [
|
|
58
|
+
"checkbox",
|
|
59
|
+
n && e[n],
|
|
60
|
+
b && p[b]
|
|
61
|
+
].filter(Boolean).join(" "), x = t && c !== void 0 && (typeof c == "string" || typeof c == "number") ? t.value?.includes(c) ?? !1 : h, N = t?.disabled || m, v = (a) => {
|
|
62
|
+
t && c !== void 0 && (typeof c == "string" || typeof c == "number") && t.onChange?.(c, a.target.checked), k?.(a);
|
|
63
|
+
}, w = j.useCallback(
|
|
64
|
+
(a) => {
|
|
65
|
+
a && (a.indeterminate = o), typeof r == "function" ? r(a) : r && (r.current = a);
|
|
66
|
+
},
|
|
67
|
+
[o, r]
|
|
68
|
+
), y = /* @__PURE__ */ s(
|
|
69
|
+
"input",
|
|
70
|
+
{
|
|
71
|
+
ref: w,
|
|
72
|
+
type: "checkbox",
|
|
73
|
+
className: d,
|
|
74
|
+
value: c,
|
|
75
|
+
checked: x,
|
|
76
|
+
onChange: v,
|
|
77
|
+
disabled: N,
|
|
78
|
+
"data-state": o ? "indeterminate" : x ? "checked" : "unchecked",
|
|
79
|
+
...l
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
return i ? /* @__PURE__ */ C("label", { className: `label cursor-pointer justify-start gap-2 ${f}`, children: [
|
|
83
|
+
y,
|
|
84
|
+
/* @__PURE__ */ s("span", { className: "label-text", children: i })
|
|
85
|
+
] }) : y;
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
u.displayName = "Checkbox";
|
|
89
|
+
const D = Object.assign(u, {
|
|
90
|
+
Group: S
|
|
91
|
+
});
|
|
30
92
|
export {
|
|
31
|
-
|
|
93
|
+
D as Checkbox
|
|
32
94
|
};
|
|
33
95
|
//# sourceMappingURL=index10.js.map
|
package/dist/index10.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index10.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index10.js","sources":["../src/components/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, createContext, useContext } from 'react'\n\nexport interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {\n children?: React.ReactNode\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n color?: 'primary' | 'secondary' | 'accent' | 'neutral' | 'success' | 'warning' | 'info' | 'error'\n indeterminate?: boolean\n className?: string\n}\n\nexport interface CheckboxOptionType {\n label: React.ReactNode\n value: string | number\n disabled?: boolean\n}\n\nexport interface CheckboxGroupProps {\n children?: React.ReactNode\n value?: (string | number)[]\n defaultValue?: (string | number)[]\n onChange?: (values: (string | number)[]) => void\n disabled?: boolean\n options?: (string | number | CheckboxOptionType)[]\n className?: string\n}\n\ninterface CheckboxGroupContextValue {\n value?: (string | number)[]\n onChange?: (checkedValue: string | number, checked: boolean) => void\n disabled?: boolean\n}\n\nconst CheckboxGroupContext = createContext<CheckboxGroupContextValue | null>(null)\n\nfunction CheckboxGroup({\n children,\n value,\n defaultValue,\n onChange,\n disabled = false,\n options,\n className = ''\n}: CheckboxGroupProps) {\n const [internalValue, setInternalValue] = React.useState<(string | number)[]>(defaultValue || [])\n const currentValue = value !== undefined ? value : internalValue\n\n const handleChange = (checkedValue: string | number, checked: boolean) => {\n const newValue = checked\n ? [...currentValue, checkedValue]\n : currentValue.filter((v) => v !== checkedValue)\n\n if (value === undefined) {\n setInternalValue(newValue)\n }\n onChange?.(newValue)\n }\n\n const contextValue: CheckboxGroupContextValue = {\n value: currentValue,\n onChange: handleChange,\n disabled,\n }\n\n // If options are provided, render checkboxes automatically\n if (options) {\n return (\n <CheckboxGroupContext.Provider value={contextValue}>\n <div className={className}>\n {options.map((option) => {\n if (typeof option === 'string' || typeof option === 'number') {\n return (\n <label key={option} className=\"label cursor-pointer justify-start gap-2\">\n <CheckboxRoot value={option} />\n <span className=\"label-text\">{option}</span>\n </label>\n )\n } else {\n return (\n <label key={option.value} className=\"label cursor-pointer justify-start gap-2\">\n <CheckboxRoot value={option.value} disabled={option.disabled} />\n <span className=\"label-text\">{option.label}</span>\n </label>\n )\n }\n })}\n </div>\n </CheckboxGroupContext.Provider>\n )\n }\n\n return (\n <CheckboxGroupContext.Provider value={contextValue}>\n <div className={className}>{children}</div>\n </CheckboxGroupContext.Provider>\n )\n}\n\nconst CheckboxRoot = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n children,\n size,\n color,\n indeterminate = false,\n className = '',\n value,\n checked,\n onChange,\n disabled: disabledProp,\n ...props\n },\n ref\n ) => {\n const groupContext = useContext(CheckboxGroupContext)\n\n const sizeClasses = {\n xs: 'checkbox-xs',\n sm: 'checkbox-sm',\n md: 'checkbox-md',\n lg: 'checkbox-lg',\n xl: 'checkbox-xl',\n }\n\n const colorClasses = {\n primary: 'checkbox-primary',\n secondary: 'checkbox-secondary',\n accent: 'checkbox-accent',\n neutral: 'checkbox-neutral',\n success: 'checkbox-success',\n warning: 'checkbox-warning',\n info: 'checkbox-info',\n error: 'checkbox-error',\n }\n\n const checkboxClasses = [\n 'checkbox',\n size && sizeClasses[size],\n color && colorClasses[color],\n ]\n .filter(Boolean)\n .join(' ')\n\n // If in a group, use group's value to determine checked state\n const isChecked = groupContext && value !== undefined && (typeof value === 'string' || typeof value === 'number')\n ? groupContext.value?.includes(value) ?? false\n : checked\n\n const isDisabled = groupContext?.disabled || disabledProp\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (groupContext && value !== undefined && (typeof value === 'string' || typeof value === 'number')) {\n groupContext.onChange?.(value, e.target.checked)\n }\n onChange?.(e)\n }\n\n // Handle indeterminate state\n const checkboxRef = React.useCallback(\n (node: HTMLInputElement | null) => {\n if (node) {\n node.indeterminate = indeterminate\n }\n if (typeof ref === 'function') {\n ref(node)\n } else if (ref) {\n ref.current = node\n }\n },\n [indeterminate, ref]\n )\n\n const dataState = indeterminate ? 'indeterminate' : isChecked ? 'checked' : 'unchecked'\n\n const checkboxInput = (\n <input\n ref={checkboxRef}\n type=\"checkbox\"\n className={checkboxClasses}\n value={value}\n checked={isChecked}\n onChange={handleChange}\n disabled={isDisabled}\n data-state={dataState}\n {...props}\n />\n )\n\n // If children provided, wrap in label\n if (children) {\n return (\n <label className={`label cursor-pointer justify-start gap-2 ${className}`}>\n {checkboxInput}\n <span className=\"label-text\">{children}</span>\n </label>\n )\n }\n\n return checkboxInput\n }\n)\n\nCheckboxRoot.displayName = 'Checkbox'\n\nexport const Checkbox = Object.assign(CheckboxRoot, {\n Group: CheckboxGroup,\n})\n"],"names":["CheckboxGroupContext","createContext","CheckboxGroup","children","value","defaultValue","onChange","disabled","options","className","internalValue","setInternalValue","React","currentValue","contextValue","checkedValue","checked","newValue","v","jsx","option","jsxs","CheckboxRoot","forwardRef","size","color","indeterminate","disabledProp","props","ref","groupContext","useContext","sizeClasses","colorClasses","checkboxClasses","isChecked","isDisabled","handleChange","e","checkboxRef","node","checkboxInput","Checkbox"],"mappings":"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"}
|
package/dist/index100.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useRef as t, useEffect as o } from "react";
|
|
2
|
+
function f(r) {
|
|
3
|
+
const e = t(void 0);
|
|
4
|
+
return o(() => {
|
|
5
|
+
e.current = r;
|
|
6
|
+
}, [r]), e.current;
|
|
7
|
+
}
|
|
5
8
|
export {
|
|
6
|
-
|
|
9
|
+
f as usePrevious
|
|
7
10
|
};
|
|
8
11
|
//# sourceMappingURL=index100.js.map
|
package/dist/index100.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index100.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index100.js","sources":["../src/hooks/usePrevious.ts"],"sourcesContent":["import { useRef, useEffect } from 'react'\n\n/**\n * Hook that returns the previous value of a variable.\n * Useful for comparing current and previous values in effects.\n *\n * @param value - Current value\n * @returns Previous value (undefined on first render)\n *\n * @example\n * const [count, setCount] = useState(0)\n * const prevCount = usePrevious(count)\n *\n * // prevCount is the value from previous render\n * console.log(`Changed from ${prevCount} to ${count}`)\n */\nexport function usePrevious<T>(value: T): T | undefined {\n const ref = useRef<T | undefined>(undefined)\n\n useEffect(() => {\n ref.current = value\n }, [value])\n\n return ref.current\n}\n"],"names":["usePrevious","value","ref","useRef","useEffect"],"mappings":";AAgBO,SAASA,EAAeC,GAAyB;AACtD,QAAMC,IAAMC,EAAsB,MAAS;AAE3C,SAAAC,EAAU,MAAM;AACd,IAAAF,EAAI,UAAUD;AAAA,EAChB,GAAG,CAACA,CAAK,CAAC,GAEHC,EAAI;AACb;"}
|