@fangxinyan/lumina 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Accordion-GSBY5T5U.css → Accordion-3TQPKNN3.css} +8 -1
- package/dist/Accordion.cjs +2 -2
- package/dist/Accordion.d.cts +12 -0
- package/dist/Accordion.d.ts +12 -0
- package/dist/Accordion.js +1 -1
- package/dist/{Alert-LSKBYDRI.css → Alert-JJ7GB3UU.css} +11 -0
- package/dist/Alert.cjs +2 -2
- package/dist/Alert.d.cts +4 -0
- package/dist/Alert.d.ts +4 -0
- package/dist/Alert.js +1 -1
- package/dist/{Avatar-OXDSG5Q6.css → Avatar-R5A4AFKZ.css} +4 -0
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.d.cts +2 -0
- package/dist/Avatar.d.ts +2 -0
- package/dist/Avatar.js +1 -1
- package/dist/{Button-5UI7QXGU.css → Button-SDQD25AG.css} +2 -0
- package/dist/Button.cjs +3 -3
- package/dist/Button.d.cts +2 -0
- package/dist/Button.d.ts +2 -0
- package/dist/Button.js +1 -1
- package/dist/Calendar.cjs +2 -2
- package/dist/Calendar.d.cts +8 -0
- package/dist/Calendar.d.ts +8 -0
- package/dist/Calendar.js +1 -1
- package/dist/{Card-2CHHFD4Y.css → Card-RG7ECXL2.css} +11 -0
- package/dist/Card.cjs +3 -3
- package/dist/Card.d.cts +2 -0
- package/dist/Card.d.ts +2 -0
- package/dist/Card.js +1 -1
- package/dist/{Divider-Z37INS5E.css → Divider-OEE4Q2KS.css} +31 -0
- package/dist/Divider.cjs +2 -2
- package/dist/Divider.d.cts +7 -0
- package/dist/Divider.d.ts +7 -0
- package/dist/Divider.js +1 -1
- package/dist/{Empty-VM23UNLQ.css → Empty-NQ72W3D7.css} +22 -0
- package/dist/Empty.cjs +4 -4
- package/dist/Empty.d.cts +42 -2
- package/dist/Empty.d.ts +42 -2
- package/dist/Empty.js +1 -1
- package/dist/Input-33CAH4O6.css +134 -0
- package/dist/Input.cjs +3 -3
- package/dist/Input.d.cts +17 -1
- package/dist/Input.d.ts +17 -1
- package/dist/Input.js +1 -1
- package/dist/Modal.cjs +3 -3
- package/dist/Modal.js +2 -2
- package/dist/{Pagination-6FFOI4NM.css → Pagination-YIRYJUXP.css} +33 -0
- package/dist/Pagination.cjs +5 -2
- package/dist/Pagination.d.cts +14 -0
- package/dist/Pagination.d.ts +14 -0
- package/dist/Pagination.js +4 -1
- package/dist/Select.cjs +3 -3
- package/dist/Select.js +2 -2
- package/dist/{Slider-RE4HZQKF.css → Slider-X4PVA65R.css} +51 -2
- package/dist/Slider.cjs +2 -2
- package/dist/Slider.d.cts +20 -5
- package/dist/Slider.d.ts +20 -5
- package/dist/Slider.js +1 -1
- package/dist/Switch-36KJNDXM.css +92 -0
- package/dist/Switch.cjs +2 -2
- package/dist/Switch.d.cts +4 -0
- package/dist/Switch.d.ts +4 -0
- package/dist/Switch.js +1 -1
- package/dist/Table-ADVN6LXP.css +295 -0
- package/dist/Table.cjs +7 -3
- package/dist/Table.d.cts +103 -7
- package/dist/Table.d.ts +103 -7
- package/dist/Table.js +5 -1
- package/dist/{Tabs-A27TSZOP.css → Tabs-RHK6XAFF.css} +7 -0
- package/dist/Tabs.cjs +3 -3
- package/dist/Tabs.d.cts +2 -0
- package/dist/Tabs.d.ts +2 -0
- package/dist/Tabs.js +1 -1
- package/dist/{Tag-EYOY3UWG.css → Tag-FGDY3W7E.css} +2 -0
- package/dist/Tag.cjs +3 -3
- package/dist/Tag.d.cts +5 -0
- package/dist/Tag.d.ts +5 -0
- package/dist/Tag.js +1 -1
- package/dist/chunk-437LB2V4.js +111 -0
- package/dist/chunk-437LB2V4.js.map +1 -0
- package/dist/chunk-4MR4GVTD.js +73 -0
- package/dist/chunk-4MR4GVTD.js.map +1 -0
- package/dist/{chunk-OXYFB2ZI.js → chunk-4U4OY5RA.js} +11 -5
- package/dist/chunk-4U4OY5RA.js.map +1 -0
- package/dist/chunk-55NTFU7Y.js +476 -0
- package/dist/chunk-55NTFU7Y.js.map +1 -0
- package/dist/{chunk-5EYI27B6.js → chunk-77BVQNAQ.js} +5 -3
- package/dist/chunk-77BVQNAQ.js.map +1 -0
- package/dist/{chunk-3QWHDCHJ.js → chunk-AJZKESHB.js} +13 -4
- package/dist/chunk-AJZKESHB.js.map +1 -0
- package/dist/{chunk-NZPJ7BUB.cjs → chunk-AXMEZGEG.cjs} +13 -4
- package/dist/chunk-AXMEZGEG.cjs.map +1 -0
- package/dist/{chunk-HTP6UEVR.js → chunk-BBPNQ44M.js} +22 -6
- package/dist/chunk-BBPNQ44M.js.map +1 -0
- package/dist/{chunk-QQXIWOI3.cjs → chunk-CCBHZYE6.cjs} +5 -5
- package/dist/{chunk-QQXIWOI3.cjs.map → chunk-CCBHZYE6.cjs.map} +1 -1
- package/dist/{chunk-KGYLUZOU.cjs → chunk-EPFYIR63.cjs} +5 -5
- package/dist/{chunk-KGYLUZOU.cjs.map → chunk-EPFYIR63.cjs.map} +1 -1
- package/dist/chunk-F7HW2PYR.cjs +119 -0
- package/dist/chunk-F7HW2PYR.cjs.map +1 -0
- package/dist/chunk-GIVMKGZN.js +39 -0
- package/dist/chunk-GIVMKGZN.js.map +1 -0
- package/dist/{chunk-FMG3ZPGK.js → chunk-H6FCIJOP.js} +5 -3
- package/dist/chunk-H6FCIJOP.js.map +1 -0
- package/dist/{chunk-ALFDP5WX.cjs → chunk-IDM6JJLP.cjs} +22 -6
- package/dist/chunk-IDM6JJLP.cjs.map +1 -0
- package/dist/chunk-IFERLHCL.cjs +499 -0
- package/dist/chunk-IFERLHCL.cjs.map +1 -0
- package/dist/{chunk-I2ERCHFV.cjs → chunk-JKLQOB2F.cjs} +11 -5
- package/dist/chunk-JKLQOB2F.cjs.map +1 -0
- package/dist/{chunk-IGHLSNXT.cjs → chunk-K7PVJLW4.cjs} +51 -4
- package/dist/chunk-K7PVJLW4.cjs.map +1 -0
- package/dist/chunk-LDENBYRC.cjs +210 -0
- package/dist/chunk-LDENBYRC.cjs.map +1 -0
- package/dist/{chunk-OOBSH7EL.js → chunk-LSLYY5FN.js} +3 -3
- package/dist/{chunk-OOBSH7EL.js.map → chunk-LSLYY5FN.js.map} +1 -1
- package/dist/chunk-NSUD5B22.js +187 -0
- package/dist/chunk-NSUD5B22.js.map +1 -0
- package/dist/{chunk-AAMYURWQ.cjs → chunk-OPTTHURA.cjs} +5 -3
- package/dist/chunk-OPTTHURA.cjs.map +1 -0
- package/dist/{chunk-F3NHM4GX.js → chunk-OYGFMXAA.js} +13 -4
- package/dist/chunk-OYGFMXAA.js.map +1 -0
- package/dist/chunk-PBBHUUXU.cjs +133 -0
- package/dist/chunk-PBBHUUXU.cjs.map +1 -0
- package/dist/chunk-RDLPX7RK.cjs +95 -0
- package/dist/chunk-RDLPX7RK.cjs.map +1 -0
- package/dist/{chunk-XFRP2MBR.js → chunk-TYQ5CN2C.js} +51 -4
- package/dist/chunk-TYQ5CN2C.js.map +1 -0
- package/dist/{chunk-7CKHWCEA.cjs → chunk-TZSWDH5T.cjs} +5 -3
- package/dist/chunk-TZSWDH5T.cjs.map +1 -0
- package/dist/{chunk-VMHNKD3N.cjs → chunk-URF6RBW6.cjs} +13 -4
- package/dist/chunk-URF6RBW6.cjs.map +1 -0
- package/dist/{chunk-G3UWXSNQ.js → chunk-V34OPWKZ.js} +5 -4
- package/dist/chunk-V34OPWKZ.js.map +1 -0
- package/dist/{chunk-ITGCHU3Y.cjs → chunk-VICGQC6G.cjs} +5 -4
- package/dist/chunk-VICGQC6G.cjs.map +1 -0
- package/dist/chunk-YEOARJKR.cjs +40 -0
- package/dist/chunk-YEOARJKR.cjs.map +1 -0
- package/dist/chunk-Z5X5AMLA.cjs +41 -0
- package/dist/chunk-Z5X5AMLA.cjs.map +1 -0
- package/dist/chunk-Z7P6QGMT.js +115 -0
- package/dist/chunk-Z7P6QGMT.js.map +1 -0
- package/dist/{chunk-OYH6A7IQ.js → chunk-ZVCMXDTP.js} +3 -3
- package/dist/{chunk-OYH6A7IQ.js.map → chunk-ZVCMXDTP.js.map} +1 -1
- package/dist/chunk-ZWP4LSS3.js +38 -0
- package/dist/chunk-ZWP4LSS3.js.map +1 -0
- package/dist/index.cjs +43 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/styles.css +455 -30
- package/package.json +1 -1
- package/dist/Input-Z526ARZP.css +0 -66
- package/dist/Switch-NP7KKJOX.css +0 -44
- package/dist/Table-ZDPGWLH3.css +0 -139
- package/dist/chunk-2VA2HSL4.cjs +0 -121
- package/dist/chunk-2VA2HSL4.cjs.map +0 -1
- package/dist/chunk-2W2AJUZW.js +0 -118
- package/dist/chunk-2W2AJUZW.js.map +0 -1
- package/dist/chunk-3QWHDCHJ.js.map +0 -1
- package/dist/chunk-4AA22BOG.js +0 -63
- package/dist/chunk-4AA22BOG.js.map +0 -1
- package/dist/chunk-5EYI27B6.js.map +0 -1
- package/dist/chunk-77NP67ML.cjs +0 -70
- package/dist/chunk-77NP67ML.cjs.map +0 -1
- package/dist/chunk-7CKHWCEA.cjs.map +0 -1
- package/dist/chunk-7NM5BRUX.js +0 -91
- package/dist/chunk-7NM5BRUX.js.map +0 -1
- package/dist/chunk-7UJI437T.js +0 -49
- package/dist/chunk-7UJI437T.js.map +0 -1
- package/dist/chunk-AAMYURWQ.cjs.map +0 -1
- package/dist/chunk-ALFDP5WX.cjs.map +0 -1
- package/dist/chunk-F3NHM4GX.js.map +0 -1
- package/dist/chunk-FMG3ZPGK.js.map +0 -1
- package/dist/chunk-G3UWXSNQ.js.map +0 -1
- package/dist/chunk-HTP6UEVR.js.map +0 -1
- package/dist/chunk-I2ERCHFV.cjs.map +0 -1
- package/dist/chunk-IBZAGURN.cjs +0 -71
- package/dist/chunk-IBZAGURN.cjs.map +0 -1
- package/dist/chunk-IGHLSNXT.cjs.map +0 -1
- package/dist/chunk-ITGCHU3Y.cjs.map +0 -1
- package/dist/chunk-JNFCTYJT.cjs +0 -31
- package/dist/chunk-JNFCTYJT.cjs.map +0 -1
- package/dist/chunk-JWFVSBVX.cjs +0 -30
- package/dist/chunk-JWFVSBVX.cjs.map +0 -1
- package/dist/chunk-K67KIKX4.cjs +0 -67
- package/dist/chunk-K67KIKX4.cjs.map +0 -1
- package/dist/chunk-M6OTFXZA.js +0 -48
- package/dist/chunk-M6OTFXZA.js.map +0 -1
- package/dist/chunk-NWJW5KLN.js +0 -29
- package/dist/chunk-NWJW5KLN.js.map +0 -1
- package/dist/chunk-NZPJ7BUB.cjs.map +0 -1
- package/dist/chunk-OXYFB2ZI.js.map +0 -1
- package/dist/chunk-QT7SJITQ.cjs +0 -114
- package/dist/chunk-QT7SJITQ.cjs.map +0 -1
- package/dist/chunk-VMHNKD3N.cjs.map +0 -1
- package/dist/chunk-VXITDXLW.js +0 -28
- package/dist/chunk-VXITDXLW.js.map +0 -1
- package/dist/chunk-XFRP2MBR.js.map +0 -1
package/dist/Empty.d.ts
CHANGED
|
@@ -23,15 +23,55 @@ interface SpinnerProps {
|
|
|
23
23
|
}
|
|
24
24
|
/** `Spinner` — loading indicator. */
|
|
25
25
|
declare const Spinner: React.FC<SpinnerProps>;
|
|
26
|
+
interface SkeletonAvatarConfig {
|
|
27
|
+
shape?: "circle" | "square";
|
|
28
|
+
size?: "sm" | "md" | "lg";
|
|
29
|
+
}
|
|
30
|
+
interface SkeletonTitleConfig {
|
|
31
|
+
width?: number | string;
|
|
32
|
+
}
|
|
33
|
+
interface SkeletonParagraphConfig {
|
|
34
|
+
rows?: number;
|
|
35
|
+
width?: (number | string)[];
|
|
36
|
+
}
|
|
26
37
|
interface SkeletonProps {
|
|
27
38
|
width?: number | string;
|
|
28
39
|
height?: number | string;
|
|
29
40
|
circle?: boolean;
|
|
30
41
|
/** `wave` is a shimmer sweep; `pulse` fades opacity; `none` disables animation. */
|
|
31
42
|
animation?: "wave" | "pulse" | "none";
|
|
43
|
+
/**
|
|
44
|
+
* Render an avatar skeleton on the left. `true` gives the defaults (circle, md).
|
|
45
|
+
* @example avatar
|
|
46
|
+
* @example avatar={{ shape: "square", size: "lg" }}
|
|
47
|
+
*/
|
|
48
|
+
avatar?: boolean | SkeletonAvatarConfig;
|
|
49
|
+
/**
|
|
50
|
+
* Render a title line skeleton. Defaults to `true` whenever the composite layout is active
|
|
51
|
+
* (any of `avatar` / `paragraph` / `title` is set).
|
|
52
|
+
*/
|
|
53
|
+
title?: boolean | SkeletonTitleConfig;
|
|
54
|
+
/**
|
|
55
|
+
* Render N paragraph lines. `true` gives 3 rows; passing `width` arrays lets you
|
|
56
|
+
* control per-row widths (last row defaults to 60%).
|
|
57
|
+
*/
|
|
58
|
+
paragraph?: boolean | SkeletonParagraphConfig;
|
|
32
59
|
className?: string;
|
|
33
60
|
}
|
|
34
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* `Skeleton` — content placeholder during loading.
|
|
63
|
+
*
|
|
64
|
+
* Two modes:
|
|
65
|
+
* - **Primitive** (no composite prop set): renders a single block using `width` / `height` / `circle`.
|
|
66
|
+
* - **Composite** (`avatar` / `title` / `paragraph`): renders the Ant-Design-style avatar + title + paragraph layout.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* // primitive
|
|
70
|
+
* <Skeleton height={14} width="60%" />
|
|
71
|
+
* @example
|
|
72
|
+
* // composite
|
|
73
|
+
* <Skeleton avatar title paragraph={{ rows: 4 }} />
|
|
74
|
+
*/
|
|
35
75
|
declare const Skeleton: React.FC<SkeletonProps>;
|
|
36
76
|
|
|
37
|
-
export { Empty, type EmptyProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps };
|
|
77
|
+
export { Empty, type EmptyProps, Skeleton, type SkeletonAvatarConfig, type SkeletonParagraphConfig, type SkeletonProps, type SkeletonTitleConfig, Spinner, type SpinnerProps };
|
package/dist/Empty.js
CHANGED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/* ============ Input / Textarea ============ */
|
|
2
|
+
.input-shell {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 4px;
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
.input-count {
|
|
9
|
+
font-size: 11px;
|
|
10
|
+
color: var(--fg-subtle);
|
|
11
|
+
font-variant-numeric: tabular-nums;
|
|
12
|
+
text-align: right;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.input-wrap {
|
|
16
|
+
position: relative;
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: var(--ctrl-h);
|
|
21
|
+
padding: 0 var(--ctrl-pad-x);
|
|
22
|
+
border-radius: var(--r-md);
|
|
23
|
+
background: var(--bg);
|
|
24
|
+
box-shadow: var(--neu-in-sm);
|
|
25
|
+
transition: box-shadow var(--dur) var(--ease);
|
|
26
|
+
gap: 8px;
|
|
27
|
+
}
|
|
28
|
+
.input-wrap.sm { height: 32px; padding: 0 12px; border-radius: var(--r-sm); gap: 6px; }
|
|
29
|
+
.input-wrap.lg { height: 48px; padding: 0 18px; border-radius: var(--r-lg); gap: 10px; }
|
|
30
|
+
.input-wrap:focus-within { box-shadow: var(--neu-in-sm), 0 0 0 2px var(--accent-glow); }
|
|
31
|
+
.input-wrap.invalid { box-shadow: var(--neu-in-sm), 0 0 0 2px color-mix(in oklch, var(--danger) 30%, transparent); }
|
|
32
|
+
.input-wrap.disabled { opacity: 0.6; cursor: not-allowed; }
|
|
33
|
+
|
|
34
|
+
.input-wrap .lead,
|
|
35
|
+
.input-wrap .trail {
|
|
36
|
+
color: var(--fg-subtle);
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
}
|
|
40
|
+
.input-wrap .lead.interactive,
|
|
41
|
+
.input-wrap .trail.interactive { cursor: pointer; pointer-events: auto; }
|
|
42
|
+
.input-wrap .trail:hover { color: var(--fg); }
|
|
43
|
+
.input-wrap .lead:not(.interactive),
|
|
44
|
+
.input-wrap .trail:not(.interactive) { pointer-events: none; }
|
|
45
|
+
|
|
46
|
+
.input-wrap .input-affix {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
color: var(--fg-muted);
|
|
50
|
+
font-size: 13px;
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
user-select: none;
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
}
|
|
55
|
+
.input-wrap.sm .input-affix { font-size: 12px; }
|
|
56
|
+
.input-wrap.lg .input-affix { font-size: 14px; }
|
|
57
|
+
|
|
58
|
+
.input-wrap .input-clear {
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
width: 18px;
|
|
63
|
+
height: 18px;
|
|
64
|
+
border-radius: 999px;
|
|
65
|
+
color: var(--fg-subtle);
|
|
66
|
+
background: transparent;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
|
|
70
|
+
}
|
|
71
|
+
.input-wrap .input-clear:hover {
|
|
72
|
+
color: var(--fg);
|
|
73
|
+
background: var(--bg-sunken);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.input-wrap > .input {
|
|
77
|
+
flex: 1;
|
|
78
|
+
min-width: 0;
|
|
79
|
+
width: 100%;
|
|
80
|
+
height: 100%;
|
|
81
|
+
padding: 0;
|
|
82
|
+
border: none;
|
|
83
|
+
background: transparent;
|
|
84
|
+
box-shadow: none;
|
|
85
|
+
color: var(--fg);
|
|
86
|
+
font-size: 13px;
|
|
87
|
+
font-family: inherit;
|
|
88
|
+
outline: none;
|
|
89
|
+
}
|
|
90
|
+
.input-wrap.sm > .input { font-size: 12px; }
|
|
91
|
+
.input-wrap.lg > .input { font-size: 14px; }
|
|
92
|
+
.input-wrap > .input::placeholder { color: var(--fg-subtle); }
|
|
93
|
+
.input-wrap.disabled > .input { cursor: not-allowed; }
|
|
94
|
+
|
|
95
|
+
.textarea-wrap { position: relative; width: 100%; }
|
|
96
|
+
.textarea-wrap .textarea-clear {
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 10px;
|
|
99
|
+
right: 10px;
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
width: 18px;
|
|
104
|
+
height: 18px;
|
|
105
|
+
border-radius: 999px;
|
|
106
|
+
color: var(--fg-subtle);
|
|
107
|
+
background: transparent;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
|
|
110
|
+
}
|
|
111
|
+
.textarea-wrap .textarea-clear:hover {
|
|
112
|
+
color: var(--fg);
|
|
113
|
+
background: var(--bg-sunken);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.textarea {
|
|
117
|
+
width: 100%;
|
|
118
|
+
min-height: 96px;
|
|
119
|
+
padding: 12px 14px;
|
|
120
|
+
border: none;
|
|
121
|
+
border-radius: var(--r-md);
|
|
122
|
+
background: var(--bg);
|
|
123
|
+
box-shadow: var(--neu-in-sm);
|
|
124
|
+
color: var(--fg);
|
|
125
|
+
font-size: 13px;
|
|
126
|
+
font-family: inherit;
|
|
127
|
+
line-height: 1.55;
|
|
128
|
+
resize: vertical;
|
|
129
|
+
outline: none;
|
|
130
|
+
transition: box-shadow var(--dur) var(--ease);
|
|
131
|
+
}
|
|
132
|
+
.textarea:focus { box-shadow: var(--neu-in-sm), 0 0 0 2px var(--accent-glow); }
|
|
133
|
+
.textarea.invalid { box-shadow: var(--neu-in-sm), 0 0 0 2px color-mix(in oklch, var(--danger) 30%, transparent); }
|
|
134
|
+
.textarea::placeholder { color: var(--fg-subtle); }
|
package/dist/Input.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLDENBYRC_cjs = require('./chunk-LDENBYRC.cjs');
|
|
4
4
|
require('./chunk-YVO7XO4W.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Input", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkLDENBYRC_cjs.Input; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "Textarea", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkLDENBYRC_cjs.Textarea; }
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=Input.cjs.map
|
|
17
17
|
//# sourceMappingURL=Input.cjs.map
|
package/dist/Input.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconName } from './Icon.cjs';
|
|
3
3
|
|
|
4
|
-
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
|
|
4
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "prefix"> {
|
|
5
5
|
value?: string;
|
|
6
6
|
defaultValue?: string;
|
|
7
7
|
onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -15,6 +15,16 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
15
15
|
size?: "sm" | "md" | "lg";
|
|
16
16
|
invalid?: boolean;
|
|
17
17
|
disabled?: boolean;
|
|
18
|
+
/** Show a × button inside the input to clear the value when non-empty. */
|
|
19
|
+
allowClear?: boolean;
|
|
20
|
+
/** Max length — forwarded to the native input. */
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
/** Render a "N / max" counter beneath the input (or just "N" if no maxLength). */
|
|
23
|
+
showCount?: boolean;
|
|
24
|
+
/** Inline content rendered inside the input on the left (after leadingIcon if both present). */
|
|
25
|
+
prefix?: React.ReactNode;
|
|
26
|
+
/** Inline content rendered inside the input on the right (before trailingIcon if both present). */
|
|
27
|
+
suffix?: React.ReactNode;
|
|
18
28
|
className?: string;
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
@@ -26,6 +36,12 @@ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
|
|
|
26
36
|
defaultValue?: string;
|
|
27
37
|
onChange?: (value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
28
38
|
invalid?: boolean;
|
|
39
|
+
/** Show a × button in the top-right corner to clear the value. */
|
|
40
|
+
allowClear?: boolean;
|
|
41
|
+
/** Max length — forwarded to the native textarea. */
|
|
42
|
+
maxLength?: number;
|
|
43
|
+
/** Render a "N / max" counter beneath the textarea. */
|
|
44
|
+
showCount?: boolean;
|
|
29
45
|
className?: string;
|
|
30
46
|
}
|
|
31
47
|
/**
|
package/dist/Input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconName } from './Icon.js';
|
|
3
3
|
|
|
4
|
-
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
|
|
4
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "prefix"> {
|
|
5
5
|
value?: string;
|
|
6
6
|
defaultValue?: string;
|
|
7
7
|
onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -15,6 +15,16 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
15
15
|
size?: "sm" | "md" | "lg";
|
|
16
16
|
invalid?: boolean;
|
|
17
17
|
disabled?: boolean;
|
|
18
|
+
/** Show a × button inside the input to clear the value when non-empty. */
|
|
19
|
+
allowClear?: boolean;
|
|
20
|
+
/** Max length — forwarded to the native input. */
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
/** Render a "N / max" counter beneath the input (or just "N" if no maxLength). */
|
|
23
|
+
showCount?: boolean;
|
|
24
|
+
/** Inline content rendered inside the input on the left (after leadingIcon if both present). */
|
|
25
|
+
prefix?: React.ReactNode;
|
|
26
|
+
/** Inline content rendered inside the input on the right (before trailingIcon if both present). */
|
|
27
|
+
suffix?: React.ReactNode;
|
|
18
28
|
className?: string;
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
@@ -26,6 +36,12 @@ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
|
|
|
26
36
|
defaultValue?: string;
|
|
27
37
|
onChange?: (value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
28
38
|
invalid?: boolean;
|
|
39
|
+
/** Show a × button in the top-right corner to clear the value. */
|
|
40
|
+
allowClear?: boolean;
|
|
41
|
+
/** Max length — forwarded to the native textarea. */
|
|
42
|
+
maxLength?: number;
|
|
43
|
+
/** Render a "N / max" counter beneath the textarea. */
|
|
44
|
+
showCount?: boolean;
|
|
29
45
|
className?: string;
|
|
30
46
|
}
|
|
31
47
|
/**
|
package/dist/Input.js
CHANGED
package/dist/Modal.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkCCBHZYE6_cjs = require('./chunk-CCBHZYE6.cjs');
|
|
4
|
+
require('./chunk-OPTTHURA.cjs');
|
|
5
5
|
require('./chunk-YVO7XO4W.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "Modal", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkCCBHZYE6_cjs.Modal; }
|
|
12
12
|
});
|
|
13
13
|
//# sourceMappingURL=Modal.cjs.map
|
|
14
14
|
//# sourceMappingURL=Modal.cjs.map
|
package/dist/Modal.js
CHANGED
|
@@ -33,3 +33,36 @@
|
|
|
33
33
|
}
|
|
34
34
|
.pagination .pg.disabled { color: var(--fg-subtle); cursor: not-allowed; box-shadow: var(--neu-flat); }
|
|
35
35
|
.pagination .ellipsis { padding: 0 4px; color: var(--fg-subtle); }
|
|
36
|
+
|
|
37
|
+
/* size changer — compact Select inline with the page buttons */
|
|
38
|
+
.pagination .pg-size-changer { margin-left: 8px; min-width: 108px; }
|
|
39
|
+
|
|
40
|
+
/* quick jumper */
|
|
41
|
+
.pagination .pg-jumper {
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 6px;
|
|
45
|
+
margin-left: 8px;
|
|
46
|
+
color: var(--fg-muted);
|
|
47
|
+
font-size: 12px;
|
|
48
|
+
}
|
|
49
|
+
.pagination .pg-jumper-label { color: var(--fg-muted); }
|
|
50
|
+
.pagination .pg-jumper-input {
|
|
51
|
+
width: 44px;
|
|
52
|
+
height: 28px;
|
|
53
|
+
padding: 0 8px;
|
|
54
|
+
border: none;
|
|
55
|
+
border-radius: var(--r-sm);
|
|
56
|
+
background: var(--bg);
|
|
57
|
+
box-shadow: var(--neu-in-sm);
|
|
58
|
+
color: var(--fg);
|
|
59
|
+
font-family: inherit;
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
font-variant-numeric: tabular-nums;
|
|
62
|
+
text-align: center;
|
|
63
|
+
outline: none;
|
|
64
|
+
transition: box-shadow var(--dur-fast) var(--ease);
|
|
65
|
+
}
|
|
66
|
+
.pagination .pg-jumper-input:focus-visible {
|
|
67
|
+
box-shadow: var(--neu-in-sm), 0 0 0 2px var(--accent-glow);
|
|
68
|
+
}
|
package/dist/Pagination.cjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkK7PVJLW4_cjs = require('./chunk-K7PVJLW4.cjs');
|
|
4
|
+
require('./chunk-EPFYIR63.cjs');
|
|
5
|
+
require('./chunk-URF6RBW6.cjs');
|
|
6
|
+
require('./chunk-RZ2E3XEU.cjs');
|
|
4
7
|
require('./chunk-YVO7XO4W.cjs');
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
Object.defineProperty(exports, "Pagination", {
|
|
9
12
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkK7PVJLW4_cjs.Pagination; }
|
|
11
14
|
});
|
|
12
15
|
//# sourceMappingURL=Pagination.cjs.map
|
|
13
16
|
//# sourceMappingURL=Pagination.cjs.map
|
package/dist/Pagination.d.cts
CHANGED
|
@@ -11,6 +11,20 @@ interface PaginationProps {
|
|
|
11
11
|
onChange?: (page: number) => void;
|
|
12
12
|
/** Max visible page buttons (before ellipsis logic). */
|
|
13
13
|
siblings?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Render a "跳至 N 页" input to the right of the page buttons. Enter key commits
|
|
16
|
+
* and clamps to `1..totalPages`.
|
|
17
|
+
*/
|
|
18
|
+
showQuickJumper?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Render a Select to let the user switch the page size. Resetting the size sends the
|
|
21
|
+
* user back to page 1 and calls both `onShowSizeChange` and `onChange(1)`.
|
|
22
|
+
*/
|
|
23
|
+
showSizeChanger?: boolean;
|
|
24
|
+
/** Page size choices for `showSizeChanger`. Defaults to `[10, 20, 50, 100]`. */
|
|
25
|
+
pageSizeOptions?: number[];
|
|
26
|
+
/** Fires when the user picks a new page size via the size changer. */
|
|
27
|
+
onShowSizeChange?: (current: number, size: number) => void;
|
|
14
28
|
className?: string;
|
|
15
29
|
}
|
|
16
30
|
/** `Pagination` — page number controls. */
|
package/dist/Pagination.d.ts
CHANGED
|
@@ -11,6 +11,20 @@ interface PaginationProps {
|
|
|
11
11
|
onChange?: (page: number) => void;
|
|
12
12
|
/** Max visible page buttons (before ellipsis logic). */
|
|
13
13
|
siblings?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Render a "跳至 N 页" input to the right of the page buttons. Enter key commits
|
|
16
|
+
* and clamps to `1..totalPages`.
|
|
17
|
+
*/
|
|
18
|
+
showQuickJumper?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Render a Select to let the user switch the page size. Resetting the size sends the
|
|
21
|
+
* user back to page 1 and calls both `onShowSizeChange` and `onChange(1)`.
|
|
22
|
+
*/
|
|
23
|
+
showSizeChanger?: boolean;
|
|
24
|
+
/** Page size choices for `showSizeChanger`. Defaults to `[10, 20, 50, 100]`. */
|
|
25
|
+
pageSizeOptions?: number[];
|
|
26
|
+
/** Fires when the user picks a new page size via the size changer. */
|
|
27
|
+
onShowSizeChange?: (current: number, size: number) => void;
|
|
14
28
|
className?: string;
|
|
15
29
|
}
|
|
16
30
|
/** `Pagination` — page number controls. */
|
package/dist/Pagination.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export { Pagination } from './chunk-
|
|
1
|
+
export { Pagination } from './chunk-TYQ5CN2C.js';
|
|
2
|
+
import './chunk-ZVCMXDTP.js';
|
|
3
|
+
import './chunk-AJZKESHB.js';
|
|
4
|
+
import './chunk-V2DIQ3RH.js';
|
|
2
5
|
import './chunk-GEYMWUW6.js';
|
|
3
6
|
//# sourceMappingURL=Pagination.js.map
|
|
4
7
|
//# sourceMappingURL=Pagination.js.map
|
package/dist/Select.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkEPFYIR63_cjs = require('./chunk-EPFYIR63.cjs');
|
|
4
|
+
require('./chunk-URF6RBW6.cjs');
|
|
5
5
|
require('./chunk-RZ2E3XEU.cjs');
|
|
6
6
|
require('./chunk-YVO7XO4W.cjs');
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ require('./chunk-YVO7XO4W.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "Select", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkEPFYIR63_cjs.Select; }
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=Select.cjs.map
|
|
15
15
|
//# sourceMappingURL=Select.cjs.map
|
package/dist/Select.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
}
|
|
10
|
+
.slider.has-marks { padding-bottom: 26px; }
|
|
10
11
|
.slider.disabled { opacity: 0.5; cursor: not-allowed; }
|
|
11
12
|
.slider-track {
|
|
12
13
|
position: relative;
|
|
@@ -19,11 +20,11 @@
|
|
|
19
20
|
}
|
|
20
21
|
.slider-fill {
|
|
21
22
|
position: absolute;
|
|
22
|
-
top: 0;
|
|
23
|
+
top: 0; bottom: 0;
|
|
23
24
|
background: linear-gradient(90deg, color-mix(in oklch, var(--accent) 70%, white), var(--accent));
|
|
24
25
|
box-shadow: 0 0 12px var(--accent-glow);
|
|
25
26
|
border-radius: 999px;
|
|
26
|
-
transition:
|
|
27
|
+
transition: left var(--dur-fast) var(--ease), right var(--dur-fast) var(--ease);
|
|
27
28
|
}
|
|
28
29
|
.slider-thumb {
|
|
29
30
|
position: absolute;
|
|
@@ -35,7 +36,10 @@
|
|
|
35
36
|
transform: translate(-50%, -50%);
|
|
36
37
|
transition: all var(--dur-fast) var(--ease);
|
|
37
38
|
display: grid; place-items: center;
|
|
39
|
+
pointer-events: none;
|
|
38
40
|
}
|
|
41
|
+
.slider.has-marks .slider-thumb { top: calc(50% - 13px); }
|
|
42
|
+
.slider.has-marks .slider-track { margin-top: -26px; }
|
|
39
43
|
.slider-thumb::after {
|
|
40
44
|
content: "";
|
|
41
45
|
width: 6px; height: 6px;
|
|
@@ -49,7 +53,13 @@
|
|
|
49
53
|
width: 100%; height: 100%;
|
|
50
54
|
opacity: 0;
|
|
51
55
|
cursor: inherit;
|
|
56
|
+
margin: 0;
|
|
57
|
+
pointer-events: auto;
|
|
52
58
|
}
|
|
59
|
+
/* In range mode (two stacked inputs), split the hit zones by half so the user can drag either thumb */
|
|
60
|
+
.slider input[type="range"]:nth-of-type(1):not(:only-of-type) { right: 50%; }
|
|
61
|
+
.slider input[type="range"]:nth-of-type(2) { left: 50%; }
|
|
62
|
+
.slider.has-marks input[type="range"] { height: calc(100% - 26px); }
|
|
53
63
|
.slider-value { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); margin-left: 10px; }
|
|
54
64
|
.slider.success .slider-fill { background: linear-gradient(90deg, color-mix(in oklch, var(--success) 70%, white), var(--success)); box-shadow: 0 0 10px color-mix(in oklch, var(--success) 35%, transparent); }
|
|
55
65
|
.slider.success .slider-thumb::after { background: var(--success); }
|
|
@@ -57,3 +67,42 @@
|
|
|
57
67
|
.slider.warning .slider-thumb::after { background: var(--warning); }
|
|
58
68
|
.slider.danger .slider-fill { background: linear-gradient(90deg, color-mix(in oklch, var(--danger) 70%, white), var(--danger)); box-shadow: 0 0 10px color-mix(in oklch, var(--danger) 35%, transparent); }
|
|
59
69
|
.slider.danger .slider-thumb::after { background: var(--danger); }
|
|
70
|
+
|
|
71
|
+
/* Marks */
|
|
72
|
+
.slider-marks {
|
|
73
|
+
position: absolute;
|
|
74
|
+
left: 0; right: 0;
|
|
75
|
+
bottom: 0;
|
|
76
|
+
height: 22px;
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
}
|
|
79
|
+
.slider-mark {
|
|
80
|
+
position: absolute;
|
|
81
|
+
transform: translateX(-50%);
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: 4px;
|
|
86
|
+
pointer-events: auto;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
color: var(--fg-subtle);
|
|
89
|
+
font-size: 11px;
|
|
90
|
+
user-select: none;
|
|
91
|
+
}
|
|
92
|
+
.slider-mark-dot {
|
|
93
|
+
width: 6px; height: 6px;
|
|
94
|
+
border-radius: 999px;
|
|
95
|
+
background: var(--bg);
|
|
96
|
+
box-shadow: var(--neu-in-sm);
|
|
97
|
+
margin-top: -18px;
|
|
98
|
+
position: relative;
|
|
99
|
+
z-index: 1;
|
|
100
|
+
}
|
|
101
|
+
.slider-mark.active .slider-mark-dot { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
|
|
102
|
+
.slider.success .slider-mark.active .slider-mark-dot { background: var(--success); box-shadow: 0 0 6px color-mix(in oklch, var(--success) 35%, transparent); }
|
|
103
|
+
.slider.warning .slider-mark.active .slider-mark-dot { background: var(--warning); box-shadow: 0 0 6px color-mix(in oklch, var(--warning) 35%, transparent); }
|
|
104
|
+
.slider.danger .slider-mark.active .slider-mark-dot { background: var(--danger); box-shadow: 0 0 6px color-mix(in oklch, var(--danger) 35%, transparent); }
|
|
105
|
+
.slider-mark-label { white-space: nowrap; }
|
|
106
|
+
.slider-mark.active .slider-mark-label { color: var(--accent-ink); font-weight: 500; }
|
|
107
|
+
.slider-mark:hover .slider-mark-label { color: var(--fg); }
|
|
108
|
+
.slider.disabled .slider-mark { pointer-events: none; }
|
package/dist/Slider.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPBBHUUXU_cjs = require('./chunk-PBBHUUXU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Slider", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkPBBHUUXU_cjs.Slider; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=Slider.cjs.map
|
|
12
12
|
//# sourceMappingURL=Slider.cjs.map
|
package/dist/Slider.d.cts
CHANGED
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type SliderSingleValue = number;
|
|
4
|
+
type SliderRangeValue = [number, number];
|
|
5
|
+
type SliderValue = SliderSingleValue | SliderRangeValue;
|
|
6
|
+
interface SliderBaseProps {
|
|
7
7
|
min?: number;
|
|
8
8
|
max?: number;
|
|
9
9
|
step?: number;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
showValue?: boolean;
|
|
12
12
|
tone?: "accent" | "success" | "warning" | "danger";
|
|
13
|
+
/** Tick marks with labels. Clicking a mark snaps to it. */
|
|
14
|
+
marks?: Record<number, React.ReactNode>;
|
|
13
15
|
className?: string;
|
|
14
16
|
}
|
|
17
|
+
interface SliderSingleProps extends SliderBaseProps {
|
|
18
|
+
range?: false;
|
|
19
|
+
value?: number;
|
|
20
|
+
defaultValue?: number;
|
|
21
|
+
onChange?: (value: number) => void;
|
|
22
|
+
}
|
|
23
|
+
interface SliderRangeProps extends SliderBaseProps {
|
|
24
|
+
range: true;
|
|
25
|
+
value?: SliderRangeValue;
|
|
26
|
+
defaultValue?: SliderRangeValue;
|
|
27
|
+
onChange?: (value: SliderRangeValue) => void;
|
|
28
|
+
}
|
|
29
|
+
type SliderProps = SliderSingleProps | SliderRangeProps;
|
|
15
30
|
/** `Slider` — neumorphic range input with grooved track. */
|
|
16
31
|
declare const Slider: React.FC<SliderProps>;
|
|
17
32
|
|
|
18
|
-
export { Slider, type SliderProps };
|
|
33
|
+
export { Slider, type SliderProps, type SliderRangeProps, type SliderRangeValue, type SliderSingleProps, type SliderSingleValue, type SliderValue };
|
package/dist/Slider.d.ts
CHANGED
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type SliderSingleValue = number;
|
|
4
|
+
type SliderRangeValue = [number, number];
|
|
5
|
+
type SliderValue = SliderSingleValue | SliderRangeValue;
|
|
6
|
+
interface SliderBaseProps {
|
|
7
7
|
min?: number;
|
|
8
8
|
max?: number;
|
|
9
9
|
step?: number;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
showValue?: boolean;
|
|
12
12
|
tone?: "accent" | "success" | "warning" | "danger";
|
|
13
|
+
/** Tick marks with labels. Clicking a mark snaps to it. */
|
|
14
|
+
marks?: Record<number, React.ReactNode>;
|
|
13
15
|
className?: string;
|
|
14
16
|
}
|
|
17
|
+
interface SliderSingleProps extends SliderBaseProps {
|
|
18
|
+
range?: false;
|
|
19
|
+
value?: number;
|
|
20
|
+
defaultValue?: number;
|
|
21
|
+
onChange?: (value: number) => void;
|
|
22
|
+
}
|
|
23
|
+
interface SliderRangeProps extends SliderBaseProps {
|
|
24
|
+
range: true;
|
|
25
|
+
value?: SliderRangeValue;
|
|
26
|
+
defaultValue?: SliderRangeValue;
|
|
27
|
+
onChange?: (value: SliderRangeValue) => void;
|
|
28
|
+
}
|
|
29
|
+
type SliderProps = SliderSingleProps | SliderRangeProps;
|
|
15
30
|
/** `Slider` — neumorphic range input with grooved track. */
|
|
16
31
|
declare const Slider: React.FC<SliderProps>;
|
|
17
32
|
|
|
18
|
-
export { Slider, type SliderProps };
|
|
33
|
+
export { Slider, type SliderProps, type SliderRangeProps, type SliderRangeValue, type SliderSingleProps, type SliderSingleValue, type SliderValue };
|
package/dist/Slider.js
CHANGED