musae 0.2.8 → 0.2.10
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/components/badge/badge.d.ts +4 -0
- package/dist/components/badge/badge.js +118 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/types.d.ts +34 -0
- package/dist/components/checkbox/group.js +1 -1
- package/dist/components/clock/clock.js +2 -1
- package/dist/components/dialog/dialog.d.ts +1 -1
- package/dist/components/dialog/dialog.js +2 -2
- package/dist/components/dialog/popup.d.ts +1 -1
- package/dist/components/dialog/popup.js +5 -5
- package/dist/components/dialog/types.d.ts +3 -3
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/drawer/drawer.js +2 -2
- package/dist/components/drawer/popup.d.ts +1 -1
- package/dist/components/drawer/popup.js +5 -5
- package/dist/components/drawer/types.d.ts +3 -3
- package/dist/components/highlight/highlight.d.ts +4 -0
- package/dist/components/highlight/index.d.ts +2 -0
- package/dist/components/highlight/types.d.ts +11 -0
- package/dist/components/image/preview/preview.js +1 -1
- package/dist/components/notification/notification.js +16 -4
- package/dist/components/otp-input/otp-input.js +6 -6
- package/dist/components/picker/picker.js +14 -14
- package/dist/components/picker/types.d.ts +1 -1
- package/dist/components/popconfirm/popconfirm.d.ts +4 -0
- package/dist/components/popconfirm/types.d.ts +9 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/popover.js +21 -10
- package/dist/components/popper/dropdown.d.ts +3 -2
- package/dist/components/popper/dropdown.js +24 -23
- package/dist/components/popper/popper.d.ts +1 -1
- package/dist/components/popper/popper.js +4 -4
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.js +37 -0
- package/dist/components/skeleton/types.d.ts +19 -0
- package/dist/components/theme/hooks.d.ts +2 -1
- package/dist/components/theme/hooks.js +12 -16
- package/dist/components/theme/types.d.ts +1 -1
- package/dist/components/tree/hooks.d.ts +8 -2
- package/dist/components/tree/hooks.js +11 -12
- package/dist/components/tree/node.js +8 -2
- package/dist/components/tree/tree.d.ts +1 -1
- package/dist/components/tree/tree.js +16 -4
- package/dist/components/tree/types.d.ts +36 -0
- package/dist/components/visually-hidden/index.d.ts +2 -0
- package/dist/components/visually-hidden/types.d.ts +12 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +4 -0
- package/dist/hooks/use-class-names.d.ts +11 -0
- package/dist/hooks/use-closable.d.ts +18 -0
- package/dist/hooks/{use-dismissable.js → use-closable.js} +20 -16
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/stylex.css +12 -0
- package/dist/utils/class-name.d.ts +37 -1
- package/dist/utils/class-name.js +29 -1
- package/package.json +2 -2
- package/dist/components/picker/hooks.d.ts +0 -12
- package/dist/components/picker/hooks.js +0 -23
- package/dist/hooks/use-dismissable.d.ts +0 -18
- /package/dist/node_modules/.pnpm/{@aiszlab_relax@1.2.59_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @aiszlab_relax@1.2.64_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@aiszlab/relax/dist/dom/contains.js +0 -0
package/dist/stylex.css
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:root{--musae-1vh8wei:1;--musae-11upij1:50;--musae-oqacdq:60;--musae-if0yew:990;--musae-9gpkaf:1080;--musae-80rspi:1080;--musae-ah5ngi:1080;--musae-ymrixl:1080;--musae-1tyqau6:1090;--musae-7fr0d6:1200;--musae-dlxqgz:9999;}
|
|
5
5
|
:root{--musae-1wblvyz:0px;--musae-dojqt2:1px;--musae-1h5s2h0:2px;--musae-qk2ac7:4px;--musae-h30iw9:6px;--musae-vk5id6:8px;--musae-1ncxh3n:12px;--musae-oohzsl:16px;--musae-1tzp6vk:24px;--musae-15cw4i4:32px;--musae-1n7xs5j:48px;--musae-68a8pz:auto;}
|
|
6
6
|
:root{--musae-gmufu8:none;--musae-15zostt:0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);--musae-1trg6py:0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);--musae-4poz8g:0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);--musae-1vq77kn:0px 2px 3px 0px rgba(0, 0, 0, 0.30), 0px 6px 10px 4px rgba(0, 0, 0, 0.15);--musae-1yt3x0a:0px 4px 4px 0px rgba(0, 0, 0, 0.30), 0px 8px 12px 6px rgba(0, 0, 0, 0.15);}
|
|
7
|
+
@keyframes musae-1928g5l-B{from{background-position:100% 50%;}100%{background-position:0 50%;}}
|
|
7
8
|
@keyframes musae-r5zuwi-B{from{stroke-dasharray:0 220;stroke-width:20px;stroke-dashoffset:-110;}12%{stroke-dasharray:0 220;stroke-width:20px;stroke-dashoffset:-110;}20%{stroke-dasharray:20 200;stroke-width:30px;stroke-dashoffset:-115;}40%{stroke-dasharray:20 200;stroke-width:30px;stroke-dashoffset:-195;}48%{stroke-dasharray:0 220;stroke-width:20px;stroke-dashoffset:-220;}62%{stroke-dasharray:0 220;stroke-width:20px;stroke-dashoffset:-220;}70%{stroke-dasharray:20 200;stroke-width:30px;stroke-dashoffset:-225;}90%{stroke-dasharray:20 200;stroke-width:30px;stroke-dashoffset:-305;}98%{stroke-dasharray:0 220;stroke-width:20px;stroke-dashoffset:-330;}to{stroke-dasharray:0 220;stroke-width:20px;stroke-dashoffset:-330;}}
|
|
8
9
|
@keyframes musae-f6d5zf-B{from{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:0;}8%{stroke-dasharray:40 400;stroke-width:30px;stroke-dashoffset:-5;}28%{stroke-dasharray:40 400;stroke-width:30px;stroke-dashoffset:-175;}36%{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:-220;}58%{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:-220;}66%{stroke-dasharray:40 400;stroke-width:30px;stroke-dashoffset:-225;}86%{stroke-dasharray:40 400;stroke-width:30px;stroke-dashoffset:-395;}94%{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:-440;}to{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:-440;}}
|
|
9
10
|
@keyframes musae-60a50w-B{from{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:0;}8%{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:0;}16%{stroke-dasharray:40 400;stroke-width:30px;stroke-dashoffset:-5;}36%{stroke-dasharray:40 400;stroke-width:30px;stroke-dashoffset:-175;}44%{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:-220;}50%{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:-220;}58%{stroke-dasharray:40 400;stroke-width:30px;stroke-dashoffset:-225;}78%{stroke-dasharray:40 400;stroke-width:30px;stroke-dashoffset:-395;}86%{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:-440;}to{stroke-dasharray:0 440;stroke-width:20px;stroke-dashoffset:-440;}}
|
|
@@ -91,12 +92,15 @@
|
|
|
91
92
|
.musae-1bdtpbn:not(#\#):not(#\#):not(#\#){align-items:var(--alignItems,revert)}
|
|
92
93
|
.musae-amitd3:not(#\#):not(#\#):not(#\#){align-self:center}
|
|
93
94
|
.musae-qcrz7y:not(#\#):not(#\#):not(#\#){align-self:flex-start}
|
|
95
|
+
.musae-mg6eyc:not(#\#):not(#\#):not(#\#){animation-duration:1.5s}
|
|
94
96
|
.musae-1c74tu6:not(#\#):not(#\#):not(#\#){animation-duration:2s}
|
|
95
97
|
.musae-a4qsjk:not(#\#):not(#\#):not(#\#){animation-iteration-count:infinite}
|
|
98
|
+
.musae-9q1e4u:not(#\#):not(#\#):not(#\#){animation-name:musae-1928g5l-B}
|
|
96
99
|
.musae-17fodkt:not(#\#):not(#\#):not(#\#){animation-name:musae-60a50w-B}
|
|
97
100
|
.musae-wowzen:not(#\#):not(#\#):not(#\#){animation-name:musae-f6d5zf-B}
|
|
98
101
|
.musae-1rxx6we:not(#\#):not(#\#):not(#\#){animation-name:musae-r5zuwi-B}
|
|
99
102
|
.musae-1fnjvy4:not(#\#):not(#\#):not(#\#){animation-name:musae-rw80zm-B}
|
|
103
|
+
.musae-1debuo4:not(#\#):not(#\#):not(#\#){animation-timing-function:ease}
|
|
100
104
|
.musae-1esw782:not(#\#):not(#\#):not(#\#){animation-timing-function:linear}
|
|
101
105
|
.musae-1plog1:not(#\#):not(#\#):not(#\#){aspect-ratio:1}
|
|
102
106
|
.musae-1u5qhrl:not(#\#):not(#\#):not(#\#){background-color:#808080}
|
|
@@ -116,6 +120,7 @@
|
|
|
116
120
|
.musae-1om1yv4:not(#\#):not(#\#):not(#\#){column-gap:var(--musae-h30iw9)}
|
|
117
121
|
.musae-1ef45qx:not(#\#):not(#\#):not(#\#){column-gap:var(--musae-qk2ac7)}
|
|
118
122
|
.musae-18jba3g:not(#\#):not(#\#):not(#\#){column-gap:var(--musae-vk5id6)}
|
|
123
|
+
.musae-t0e3qv:not(#\#):not(#\#):not(#\#){cursor:default}
|
|
119
124
|
.musae-mper1u:not(#\#):not(#\#):not(#\#){cursor:inherit}
|
|
120
125
|
.musae-1h6gzvc:not(#\#):not(#\#):not(#\#){cursor:not-allowed}
|
|
121
126
|
.musae-1ypdohk:not(#\#):not(#\#):not(#\#){cursor:pointer}
|
|
@@ -227,6 +232,10 @@ html[dir='rtl'] .musae-p4054r:not(#\#):not(#\#):not(#\#){text-align:left}
|
|
|
227
232
|
.musae-1158fpu:not(#\#):not(#\#):not(#\#){transform:rotate(45deg)}
|
|
228
233
|
.musae-1iffjtl:not(#\#):not(#\#):not(#\#){transform:rotate(90deg)}
|
|
229
234
|
.musae-11lhmoz:not(#\#):not(#\#):not(#\#){transform:translate(-50%,-50%)}
|
|
235
|
+
.musae-1i3z1r0:not(#\#):not(#\#):not(#\#){transform:translateX(-50%) translateY(-50%)}
|
|
236
|
+
.musae-itovws:not(#\#):not(#\#):not(#\#){transform:translateX(-50%) translateY(50%)}
|
|
237
|
+
.musae-rycbv3:not(#\#):not(#\#):not(#\#){transform:translateX(50%) translateY(-50%)}
|
|
238
|
+
.musae-1vfo23u:not(#\#):not(#\#):not(#\#){transform:translateX(50%) translateY(50%)}
|
|
230
239
|
.musae-1v0jg1i:not(#\#):not(#\#):not(#\#){transform:var(--transform,revert)}
|
|
231
240
|
.musae-1g2r6go:not(#\#):not(#\#):not(#\#){transition-duration:.1s}
|
|
232
241
|
.musae-13dflua:not(#\#):not(#\#):not(#\#){transition-duration:.2s}
|
|
@@ -301,6 +310,7 @@ html[dir='rtl'] .musae-p4054r:not(#\#):not(#\#):not(#\#){text-align:left}
|
|
|
301
310
|
.musae-1ajdkb8:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--musae-2h23ia)}
|
|
302
311
|
.musae-1cj5796:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--musae-70uu0v)}
|
|
303
312
|
.musae-7kkngq:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--musae-cftog7)}
|
|
313
|
+
.musae-1v3ox18:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--musae-fwu7zn)}
|
|
304
314
|
.musae-kzsoxx:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--musae-jdzqnm)}
|
|
305
315
|
.musae-was1v5:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--musae-laggmb)}
|
|
306
316
|
.musae-1gfonl1:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--musae-oohzsl)}
|
|
@@ -329,6 +339,7 @@ html[dir='rtl'] .musae-p4054r:not(#\#):not(#\#):not(#\#){text-align:left}
|
|
|
329
339
|
.musae-13to73x:not(#\#):not(#\#):not(#\#):not(#\#){min-width:var(--minWidth,revert)}
|
|
330
340
|
.musae-1fpxtso:not(#\#):not(#\#):not(#\#):not(#\#){min-width:var(--musae-11uhodo)}
|
|
331
341
|
.musae-yumy05:not(#\#):not(#\#):not(#\#):not(#\#){min-width:var(--musae-1aj7t22)}
|
|
342
|
+
.musae-70jws7:not(#\#):not(#\#):not(#\#):not(#\#){min-width:var(--musae-1l9c3uf)}
|
|
332
343
|
.musae-h2iun8:not(#\#):not(#\#):not(#\#):not(#\#){min-width:var(--musae-1spnrok)}
|
|
333
344
|
.musae-ba7gwn:not(#\#):not(#\#):not(#\#):not(#\#){min-width:var(--musae-cftog7)}
|
|
334
345
|
.musae-1049mhy:not(#\#):not(#\#):not(#\#):not(#\#){min-width:var(--musae-laggmb)}
|
|
@@ -366,6 +377,7 @@ html[dir='rtl'] .musae-p4054r:not(#\#):not(#\#):not(#\#){text-align:left}
|
|
|
366
377
|
.musae-fx4e2q:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--musae-2h23ia)}
|
|
367
378
|
.musae-1gn8jaj:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--musae-70uu0v)}
|
|
368
379
|
.musae-1sgo4cp:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--musae-cftog7)}
|
|
380
|
+
.musae-2jq81:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--musae-fwu7zn)}
|
|
369
381
|
.musae-1wmt73o:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--musae-laggmb)}
|
|
370
382
|
.musae-r8isjd:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--musae-oohzsl)}
|
|
371
383
|
.musae-145rzd9:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--musae-rlgvtq)}
|
|
@@ -48,7 +48,10 @@ export declare enum ComponentToken {
|
|
|
48
48
|
Loading = 36,
|
|
49
49
|
Collapse = 37,
|
|
50
50
|
Waterfall = 38,
|
|
51
|
-
Transfer = 39
|
|
51
|
+
Transfer = 39,
|
|
52
|
+
Badge = 40,
|
|
53
|
+
Skeleton = 41,
|
|
54
|
+
VisuallyHidden = 42
|
|
52
55
|
}
|
|
53
56
|
/**
|
|
54
57
|
* @description
|
|
@@ -285,6 +288,17 @@ export declare enum TransferClassToken {
|
|
|
285
288
|
Item = 5,
|
|
286
289
|
Operation = 6
|
|
287
290
|
}
|
|
291
|
+
export declare enum BadgeClassToken {
|
|
292
|
+
Badge = 0,
|
|
293
|
+
Tail = 1
|
|
294
|
+
}
|
|
295
|
+
export declare enum SkeletonClassToken {
|
|
296
|
+
Skeleton = 0,
|
|
297
|
+
Circular = 1
|
|
298
|
+
}
|
|
299
|
+
export declare enum VisuallyHiddenClassToken {
|
|
300
|
+
VisuallyHidden = 0
|
|
301
|
+
}
|
|
288
302
|
/**
|
|
289
303
|
* @description
|
|
290
304
|
* class name collection
|
|
@@ -522,6 +536,17 @@ export declare const CLASS_NAMES: {
|
|
|
522
536
|
2: string;
|
|
523
537
|
4: string;
|
|
524
538
|
};
|
|
539
|
+
40: {
|
|
540
|
+
0: string;
|
|
541
|
+
1: string;
|
|
542
|
+
};
|
|
543
|
+
41: {
|
|
544
|
+
0: string;
|
|
545
|
+
1: string;
|
|
546
|
+
};
|
|
547
|
+
42: {
|
|
548
|
+
0: string;
|
|
549
|
+
};
|
|
525
550
|
};
|
|
526
551
|
/**
|
|
527
552
|
* @description
|
|
@@ -762,4 +787,15 @@ export declare const DEFAULT_CLASS_NAMES: {
|
|
|
762
787
|
2: string;
|
|
763
788
|
4: string;
|
|
764
789
|
};
|
|
790
|
+
40: {
|
|
791
|
+
0: string;
|
|
792
|
+
1: string;
|
|
793
|
+
};
|
|
794
|
+
41: {
|
|
795
|
+
0: string;
|
|
796
|
+
1: string;
|
|
797
|
+
};
|
|
798
|
+
42: {
|
|
799
|
+
0: string;
|
|
800
|
+
};
|
|
765
801
|
};
|
package/dist/utils/class-name.js
CHANGED
|
@@ -58,6 +58,9 @@ var ComponentToken;
|
|
|
58
58
|
ComponentToken[ComponentToken["Collapse"] = 37] = "Collapse";
|
|
59
59
|
ComponentToken[ComponentToken["Waterfall"] = 38] = "Waterfall";
|
|
60
60
|
ComponentToken[ComponentToken["Transfer"] = 39] = "Transfer";
|
|
61
|
+
ComponentToken[ComponentToken["Badge"] = 40] = "Badge";
|
|
62
|
+
ComponentToken[ComponentToken["Skeleton"] = 41] = "Skeleton";
|
|
63
|
+
ComponentToken[ComponentToken["VisuallyHidden"] = 42] = "VisuallyHidden";
|
|
61
64
|
})(ComponentToken || (ComponentToken = {}));
|
|
62
65
|
/**
|
|
63
66
|
* @description
|
|
@@ -334,6 +337,20 @@ var TransferClassToken;
|
|
|
334
337
|
TransferClassToken[TransferClassToken["Item"] = 5] = "Item";
|
|
335
338
|
TransferClassToken[TransferClassToken["Operation"] = 6] = "Operation";
|
|
336
339
|
})(TransferClassToken || (TransferClassToken = {}));
|
|
340
|
+
var BadgeClassToken;
|
|
341
|
+
(function (BadgeClassToken) {
|
|
342
|
+
BadgeClassToken[BadgeClassToken["Badge"] = 0] = "Badge";
|
|
343
|
+
BadgeClassToken[BadgeClassToken["Tail"] = 1] = "Tail";
|
|
344
|
+
})(BadgeClassToken || (BadgeClassToken = {}));
|
|
345
|
+
var SkeletonClassToken;
|
|
346
|
+
(function (SkeletonClassToken) {
|
|
347
|
+
SkeletonClassToken[SkeletonClassToken["Skeleton"] = 0] = "Skeleton";
|
|
348
|
+
SkeletonClassToken[SkeletonClassToken["Circular"] = 1] = "Circular";
|
|
349
|
+
})(SkeletonClassToken || (SkeletonClassToken = {}));
|
|
350
|
+
var VisuallyHiddenClassToken;
|
|
351
|
+
(function (VisuallyHiddenClassToken) {
|
|
352
|
+
VisuallyHiddenClassToken[VisuallyHiddenClassToken["VisuallyHidden"] = 0] = "VisuallyHidden";
|
|
353
|
+
})(VisuallyHiddenClassToken || (VisuallyHiddenClassToken = {}));
|
|
337
354
|
/**
|
|
338
355
|
* @description
|
|
339
356
|
* class name collection
|
|
@@ -571,6 +588,17 @@ const CLASS_NAMES = {
|
|
|
571
588
|
[TransferClassToken.Header]: "transfer__list-header",
|
|
572
589
|
[TransferClassToken.Body]: "transfer__list-body",
|
|
573
590
|
},
|
|
591
|
+
[ComponentToken.Badge]: {
|
|
592
|
+
[BadgeClassToken.Badge]: "badge",
|
|
593
|
+
[BadgeClassToken.Tail]: "badge__tail",
|
|
594
|
+
},
|
|
595
|
+
[ComponentToken.Skeleton]: {
|
|
596
|
+
[SkeletonClassToken.Skeleton]: "skeleton",
|
|
597
|
+
[SkeletonClassToken.Circular]: "skeleton--circular",
|
|
598
|
+
},
|
|
599
|
+
[ComponentToken.VisuallyHidden]: {
|
|
600
|
+
[VisuallyHiddenClassToken.VisuallyHidden]: "visually-hidden",
|
|
601
|
+
},
|
|
574
602
|
};
|
|
575
603
|
/**
|
|
576
604
|
* @description
|
|
@@ -589,4 +617,4 @@ const addPrefix = (classNames, prefix) => {
|
|
|
589
617
|
*/
|
|
590
618
|
const DEFAULT_CLASS_NAMES = addPrefix(CLASS_NAMES, Token.Prefix);
|
|
591
619
|
|
|
592
|
-
export { AvatarClassToken, BreadcrumbClassToken, ButtonClassToken, CLASS_NAMES, CalendarClassToken, CascaderClassToken, CheckboxClassToken, ClockClassToken, CollapseClassToken, ComponentToken, DEFAULT_CLASS_NAMES, DatePickerClassToken, DateRangePickerClassToken, DialogClassToken, DividerClassToken, DrawerClassToken, EmptyClassToken, FormClassToken, GridClassToken, IconClassToken, InputClassToken, LoadingClassToken, MenuClassToken, NotificationClassToken, PaginationClassToken, PickerClassToken, PopoverClassToken, PopperClassToken, ProgressClassToken, RadioClassToken, RateClassToken, SelectClassToken, StepsClassToken, SwitchClassToken, TabsClassToken, TagClassToken, TimePickerClassToken, TimelineClassToken, TooltipClassToken, TourClassToken, TransferClassToken, TreeClassToken, WaterfallClassToken, addPrefix, withPrefix };
|
|
620
|
+
export { AvatarClassToken, BadgeClassToken, BreadcrumbClassToken, ButtonClassToken, CLASS_NAMES, CalendarClassToken, CascaderClassToken, CheckboxClassToken, ClockClassToken, CollapseClassToken, ComponentToken, DEFAULT_CLASS_NAMES, DatePickerClassToken, DateRangePickerClassToken, DialogClassToken, DividerClassToken, DrawerClassToken, EmptyClassToken, FormClassToken, GridClassToken, IconClassToken, InputClassToken, LoadingClassToken, MenuClassToken, NotificationClassToken, PaginationClassToken, PickerClassToken, PopoverClassToken, PopperClassToken, ProgressClassToken, RadioClassToken, RateClassToken, SelectClassToken, SkeletonClassToken, StepsClassToken, SwitchClassToken, TabsClassToken, TagClassToken, TimePickerClassToken, TimelineClassToken, TooltipClassToken, TourClassToken, TransferClassToken, TreeClassToken, VisuallyHiddenClassToken, WaterfallClassToken, addPrefix, withPrefix };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "musae",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "musae-ui",
|
|
5
5
|
"author": "tutu@fantufantu.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"pnpm": ">=9"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aiszlab/relax": "^1.2.
|
|
30
|
+
"@aiszlab/relax": "^1.2.64",
|
|
31
31
|
"@dnd-kit/core": "^6.1.0",
|
|
32
32
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
33
33
|
"@floating-ui/dom": "^1.6.5",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type FocusEventHandler, type MouseEventHandler } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* @description
|
|
4
|
-
* use events for input
|
|
5
|
-
*/
|
|
6
|
-
export declare const useEvents: ({ onBlur, onClick, }: {
|
|
7
|
-
onBlur: FocusEventHandler<HTMLDivElement>;
|
|
8
|
-
onClick: MouseEventHandler<HTMLDivElement>;
|
|
9
|
-
}) => {
|
|
10
|
-
blur: FocusEventHandler<HTMLDivElement>;
|
|
11
|
-
click: MouseEventHandler<HTMLDivElement>;
|
|
12
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @description
|
|
5
|
-
* use events for input
|
|
6
|
-
*/
|
|
7
|
-
const useEvents = ({ onBlur, onClick, }) => {
|
|
8
|
-
const blur = useCallback((e) => {
|
|
9
|
-
onBlur?.(e);
|
|
10
|
-
e.stopPropagation();
|
|
11
|
-
}, [onBlur]);
|
|
12
|
-
/// click handler
|
|
13
|
-
const click = useCallback((e) => {
|
|
14
|
-
onClick?.(e);
|
|
15
|
-
e.stopPropagation();
|
|
16
|
-
}, [onClick]);
|
|
17
|
-
return {
|
|
18
|
-
blur,
|
|
19
|
-
click,
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export { useEvents };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { KeyboardEvent } from "react";
|
|
2
|
-
export type Dismissable = "esc" | "overlay" | "close";
|
|
3
|
-
/**
|
|
4
|
-
* @description
|
|
5
|
-
* for dialog, dismiss means some events or some elements
|
|
6
|
-
* in musae, we use a hook to handle this
|
|
7
|
-
*
|
|
8
|
-
* by default, dismissable may be different type, like `false` | ['esc'] | undefined
|
|
9
|
-
* resolve these types, we convert to `Set<Dismissable>`
|
|
10
|
-
*/
|
|
11
|
-
export declare const useDismissable: (props: {
|
|
12
|
-
onClose?: VoidFunction;
|
|
13
|
-
dismissable: boolean | Dismissable[];
|
|
14
|
-
}) => {
|
|
15
|
-
closer: React.JSX.Element | null;
|
|
16
|
-
onOverlayClick: () => void;
|
|
17
|
-
onKeyDown: (e: KeyboardEvent<HTMLDivElement>) => void;
|
|
18
|
-
};
|