@fangxinyan/lumina 0.6.1 → 0.6.3
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 +2 -1
- package/dist/{Alert-JJ7GB3UU.css → Alert-QBKIDY5H.css} +7 -0
- package/dist/Alert.cjs +3 -3
- package/dist/Alert.d.cts +3 -2
- package/dist/Alert.d.ts +3 -2
- package/dist/Alert.js +2 -2
- package/dist/AutoComplete.cjs +5 -4
- package/dist/AutoComplete.d.cts +1 -1
- package/dist/AutoComplete.d.ts +1 -1
- package/dist/AutoComplete.js +4 -3
- package/dist/Badge-DPGLV3D3.css +22 -0
- package/dist/Badge.cjs +10 -0
- package/dist/Badge.d.cts +19 -0
- package/dist/Badge.d.ts +19 -0
- package/dist/Badge.js +1 -0
- package/dist/{Button-SDQD25AG.css → Button-4Z3Q6KII.css} +56 -36
- package/dist/Button.cjs +3 -7
- package/dist/Button.d.cts +11 -15
- package/dist/Button.d.ts +11 -15
- package/dist/Button.js +2 -2
- package/dist/Calendar.cjs +3 -3
- package/dist/Calendar.js +2 -2
- package/dist/{Card-RG7ECXL2.css → Card-6RMVIHWX.css} +7 -13
- package/dist/Card.cjs +2 -6
- package/dist/Card.d.cts +7 -11
- package/dist/Card.d.ts +7 -11
- package/dist/Card.js +1 -1
- package/dist/{Cascader-VSYEKQCG.css → Cascader-3BLLA7EN.css} +77 -0
- package/dist/Cascader.cjs +5 -3
- package/dist/Cascader.d.cts +22 -4
- package/dist/Cascader.d.ts +22 -4
- package/dist/Cascader.js +4 -2
- package/dist/{Checkbox-SKJATVSN.css → Checkbox-U5EUDSYS.css} +5 -35
- package/dist/Checkbox.cjs +3 -7
- package/dist/Checkbox.d.cts +1 -18
- package/dist/Checkbox.d.ts +1 -18
- package/dist/Checkbox.js +2 -2
- package/dist/Collapse-66U5YJFY.css +53 -0
- package/dist/Collapse.cjs +11 -0
- package/dist/Collapse.d.cts +32 -0
- package/dist/Collapse.d.ts +32 -0
- package/dist/Collapse.js +2 -0
- package/dist/CommandPalette.cjs +5 -4
- package/dist/CommandPalette.js +4 -3
- package/dist/Drawer.cjs +3 -3
- package/dist/Drawer.js +2 -2
- package/dist/Empty-DC2LPORC.css +28 -0
- package/dist/Empty.cjs +2 -10
- package/dist/Empty.d.cts +1 -62
- package/dist/Empty.d.ts +1 -62
- package/dist/Empty.js +1 -1
- package/dist/Form.d.cts +1 -1
- package/dist/Form.d.ts +1 -1
- package/dist/Icon.cjs +187 -3
- package/dist/Icon.d.cts +104 -3
- package/dist/Icon.d.ts +104 -3
- package/dist/Icon.js +1 -1
- package/dist/{Image-4MN34O6P.css → Image-MRYQCRQ5.css} +78 -0
- package/dist/Image.cjs +12 -4
- package/dist/Image.d.cts +79 -6
- package/dist/Image.d.ts +79 -6
- package/dist/Image.js +2 -2
- package/dist/{Input-33CAH4O6.css → Input-HUBJ55OH.css} +25 -42
- package/dist/Input.cjs +6 -5
- package/dist/Input.d.cts +23 -26
- package/dist/Input.d.ts +23 -26
- package/dist/Input.js +3 -2
- package/dist/InputNumber.cjs +5 -4
- package/dist/InputNumber.d.cts +1 -1
- package/dist/InputNumber.d.ts +1 -1
- package/dist/InputNumber.js +4 -3
- package/dist/Message-2MZ3LFPU.css +45 -0
- package/dist/Message.cjs +23 -0
- package/dist/Message.d.cts +54 -0
- package/dist/Message.d.ts +54 -0
- package/dist/Message.js +2 -0
- package/dist/{Modal-XSDMU4XJ.css → Modal-2QNDW4SO.css} +27 -0
- package/dist/Modal.cjs +4 -4
- package/dist/Modal.d.cts +29 -4
- package/dist/Modal.d.ts +29 -4
- package/dist/Modal.js +3 -3
- package/dist/Pagination.cjs +7 -5
- package/dist/Pagination.js +6 -4
- package/dist/Popover.cjs +2 -2
- package/dist/Popover.d.cts +11 -3
- package/dist/Popover.d.ts +11 -3
- package/dist/Popover.js +1 -1
- package/dist/Radio-GVFDPAZM.css +97 -0
- package/dist/Radio.cjs +14 -0
- package/dist/Radio.d.cts +36 -0
- package/dist/Radio.d.ts +36 -0
- package/dist/Radio.js +1 -0
- package/dist/{Select-J3CCVFJ7.css → Select-Z5VYPEEY.css} +33 -24
- package/dist/Select.cjs +6 -4
- package/dist/Select.d.cts +29 -7
- package/dist/Select.d.ts +29 -7
- package/dist/Select.js +5 -3
- package/dist/Skeleton-CVWH2VWN.css +40 -0
- package/dist/Skeleton.cjs +10 -0
- package/dist/Skeleton.d.cts +30 -0
- package/dist/Skeleton.d.ts +30 -0
- package/dist/Skeleton.js +1 -0
- package/dist/Spin-3GJNMSIH.css +94 -0
- package/dist/Spin.cjs +10 -0
- package/dist/Spin.d.cts +20 -0
- package/dist/Spin.d.ts +20 -0
- package/dist/Spin.js +1 -0
- package/dist/{Table-2LPTOUIR.css → Table-ATJJQLKU.css} +0 -53
- package/dist/Table.cjs +9 -11
- package/dist/Table.d.cts +2 -21
- package/dist/Table.d.ts +2 -21
- package/dist/Table.js +8 -6
- package/dist/TablePro-3XVHYLSL.css +45 -0
- package/dist/TablePro.cjs +19 -0
- package/dist/TablePro.d.cts +21 -0
- package/dist/TablePro.d.ts +21 -0
- package/dist/TablePro.js +10 -0
- package/dist/{Tabs-RHK6XAFF.css → Tabs-BLSNI2T5.css} +0 -34
- package/dist/Tabs.cjs +2 -6
- package/dist/Tabs.d.cts +1 -16
- package/dist/Tabs.d.ts +1 -16
- package/dist/Tabs.js +1 -1
- package/dist/Tag-HDYCDPFS.css +42 -0
- package/dist/Tag.cjs +3 -7
- package/dist/Tag.d.cts +5 -14
- package/dist/Tag.d.ts +5 -14
- package/dist/Tag.js +2 -2
- package/dist/Textarea-YNET7IBH.css +54 -0
- package/dist/Textarea.cjs +15 -0
- package/dist/Textarea.d.cts +25 -0
- package/dist/Textarea.d.ts +25 -0
- package/dist/Textarea.js +2 -0
- package/dist/Theme.cjs +14 -10
- package/dist/Theme.d.cts +29 -6
- package/dist/Theme.d.ts +29 -6
- package/dist/Theme.js +1 -1
- package/dist/{Timeline-RHZAZKZ7.css → Timeline-3ZHOHPXT.css} +2 -2
- package/dist/Timeline.cjs +3 -3
- package/dist/Timeline.d.cts +1 -1
- package/dist/Timeline.d.ts +1 -1
- package/dist/Timeline.js +2 -2
- package/dist/Tooltip.cjs +2 -2
- package/dist/Tooltip.d.cts +17 -4
- package/dist/Tooltip.d.ts +17 -4
- package/dist/Tooltip.js +1 -1
- package/dist/Typography.cjs +7 -7
- package/dist/Typography.d.cts +1 -0
- package/dist/Typography.d.ts +1 -0
- package/dist/Typography.js +2 -2
- package/dist/{chunk-OVZTG5CP.cjs → chunk-2HQCUBA7.cjs} +2 -2
- package/dist/{chunk-X2U7EKCS.cjs → chunk-3YJU3D5S.cjs} +28 -5
- package/dist/chunk-45VJGBGN.js +25 -0
- package/dist/{chunk-3D77MQHO.js → chunk-46VXFTEC.js} +3 -3
- package/dist/chunk-47VG2P34.js +393 -0
- package/dist/{chunk-LZU33BX6.cjs → chunk-5DKRY67M.cjs} +4 -20
- package/dist/{chunk-TWGQZX2R.js → chunk-5H5YP2TB.js} +4 -19
- package/dist/chunk-5MN3PMF4.cjs +240 -0
- package/dist/{chunk-5A3RT4KD.js → chunk-5TKC6IEN.js} +4 -55
- package/dist/{chunk-N57NXCNC.cjs → chunk-6HMTV6P4.cjs} +3 -44
- package/dist/{chunk-RF2EY5JS.cjs → chunk-6ZXQJRAT.cjs} +153 -34
- package/dist/{chunk-OFGDUCT7.cjs → chunk-7AG524YZ.cjs} +3 -3
- package/dist/chunk-7IYKKLV3.js +283 -0
- package/dist/{chunk-73RQBWWW.js → chunk-AAGF7K3L.js} +2 -2
- package/dist/chunk-AXZ7ELMA.js +41 -0
- package/dist/{chunk-R6BIF3FF.js → chunk-BPOOVO5T.js} +5 -23
- package/dist/{chunk-OI3CWXT3.js → chunk-BVQ77VRY.js} +3 -3
- package/dist/{chunk-UXH5PH3S.js → chunk-CETNCRZ4.js} +2 -2
- package/dist/chunk-DG5VQ6BO.cjs +28 -0
- package/dist/chunk-DWAN57G4.js +243 -0
- package/dist/chunk-ELNT3CFO.js +64 -0
- package/dist/{chunk-ULOJ5UEY.js → chunk-ET6DYQVZ.js} +1 -1
- package/dist/chunk-F6RYCBQG.js +25 -0
- package/dist/{chunk-RPFMQZA5.js → chunk-FBYUZOZP.js} +42 -31
- package/dist/chunk-FGW5GJ22.cjs +132 -0
- package/dist/{chunk-6Y5WRCPW.js → chunk-FWPBORRB.js} +1 -1
- package/dist/chunk-GENABQYA.cjs +47 -0
- package/dist/{chunk-TGHBKKSS.js → chunk-GIZU3H6H.js} +3 -43
- package/dist/chunk-GMN74OEY.cjs +63 -0
- package/dist/{chunk-Y47YTYQ3.cjs → chunk-H4LGWZMH.cjs} +159 -8
- package/dist/chunk-HKF2V5MM.cjs +214 -0
- package/dist/chunk-HLFH5HWR.js +81 -0
- package/dist/{chunk-4WRE4HQP.js → chunk-HWFM4MAT.js} +18 -6
- package/dist/{chunk-GY3BSHHS.cjs → chunk-HZSIUOCN.cjs} +2 -55
- package/dist/{chunk-D46EM4EN.js → chunk-I5WTQ5Y3.js} +4 -4
- package/dist/chunk-J2HZTJO6.js +26 -0
- package/dist/{chunk-NN25YMOL.js → chunk-J5ZGYQZK.js} +153 -35
- package/dist/{chunk-WRDKOSSM.js → chunk-JCEHZ336.js} +1 -1
- package/dist/chunk-JVUVOR6S.js +110 -0
- package/dist/chunk-K5IGFBDR.js +113 -0
- package/dist/{chunk-Q2KG6SQK.cjs → chunk-K7FV7W6U.cjs} +5 -5
- package/dist/{chunk-PWW64ZWO.cjs → chunk-KD4YYIIO.cjs} +1 -32
- package/dist/chunk-KGSADAOD.cjs +170 -0
- package/dist/{chunk-54YLXXS2.js → chunk-ME5BZ2WA.js} +2 -2
- package/dist/chunk-MPVCYU2K.cjs +104 -0
- package/dist/{chunk-EEMWQX3C.cjs → chunk-NTS5L4NQ.cjs} +3 -3
- package/dist/{chunk-WBK6XIDJ.js → chunk-OBEKX4VR.js} +2 -32
- package/dist/{chunk-EBNRZRWY.cjs → chunk-P6EZG2R7.cjs} +5 -5
- package/dist/{chunk-KYEY2LIB.cjs → chunk-P6P4DGLF.cjs} +3 -3
- package/dist/{chunk-GOBWKQCX.cjs → chunk-PULGVK2I.cjs} +3 -3
- package/dist/chunk-Q5SZIU7Z.cjs +47 -0
- package/dist/chunk-QKQHZIF3.cjs +86 -0
- package/dist/{chunk-3TWNBJFI.cjs → chunk-QP3VCSRY.cjs} +6 -6
- package/dist/{chunk-6ODY6MGL.cjs → chunk-R2TEDH2F.cjs} +5 -5
- package/dist/{chunk-YRZGXXWA.js → chunk-SQGPSMSK.js} +14 -20
- package/dist/{chunk-IW5LW6XS.js → chunk-TEEFR2FD.js} +28 -5
- package/dist/chunk-TGL5BGMR.js +218 -0
- package/dist/{chunk-62GU4OHH.cjs → chunk-TP567B3L.cjs} +13 -20
- package/dist/chunk-UKS23N3L.js +191 -0
- package/dist/chunk-USQ43DJ5.js +147 -0
- package/dist/{chunk-G2K6ETP4.cjs → chunk-UUHFKIWP.cjs} +18 -6
- package/dist/{chunk-2MNAZRWE.cjs → chunk-V272XR3F.cjs} +271 -2
- package/dist/chunk-VFFIE2VO.cjs +271 -0
- package/dist/{chunk-FIO65XYG.cjs → chunk-X5GCOMC3.cjs} +49 -38
- package/dist/{chunk-Y3ZSG3SJ.cjs → chunk-XSN4TLN5.cjs} +11 -30
- package/dist/chunk-ZKE73UQF.cjs +138 -0
- package/dist/index.cjs +342 -132
- package/dist/index.d.cts +26 -20
- package/dist/index.d.ts +26 -20
- package/dist/index.js +35 -29
- package/dist/styles.css +515 -230
- package/docs/llms/alert.md +4 -3
- package/docs/llms/badge.md +3 -3
- package/docs/llms/button.md +11 -41
- package/docs/llms/card.md +6 -12
- package/docs/llms/cascader.md +22 -0
- package/docs/llms/{accordion.md → collapse.md} +13 -11
- package/docs/llms/drawer.md +1 -1
- package/docs/llms/form.md +1 -1
- package/docs/llms/image.md +72 -1
- package/docs/llms/input.md +28 -18
- package/docs/llms/message.md +63 -0
- package/docs/llms/modal.md +30 -0
- package/docs/llms/popover.md +18 -1
- package/docs/llms/radio.md +37 -1
- package/docs/llms/select.md +22 -2
- package/docs/llms/spin.md +59 -0
- package/docs/llms/table.md +3 -3
- package/docs/llms/tag.md +3 -2
- package/docs/llms/theme.md +41 -4
- package/docs/llms/tooltip.md +16 -3
- package/docs/llms.md +8 -8
- package/package.json +32 -52
- package/dist/Accordion-REMDCQUD.css +0 -44
- package/dist/Accordion.cjs +0 -11
- package/dist/Accordion.d.cts +0 -33
- package/dist/Accordion.d.ts +0 -33
- package/dist/Accordion.js +0 -2
- package/dist/Empty-NQ72W3D7.css +0 -160
- package/dist/Tag-FGDY3W7E.css +0 -51
- package/dist/Toast-YSACW3EM.css +0 -45
- package/dist/Toast.cjs +0 -15
- package/dist/Toast.d.cts +0 -26
- package/dist/Toast.d.ts +0 -26
- package/dist/Toast.js +0 -2
- package/dist/chunk-32HBMXXV.cjs +0 -208
- package/dist/chunk-3XTHKAEY.js +0 -39
- package/dist/chunk-5M26OVVY.js +0 -90
- package/dist/chunk-DOMYUGJY.js +0 -132
- package/dist/chunk-DPNDHNKK.js +0 -185
- package/dist/chunk-G2XK57I7.cjs +0 -116
- package/dist/chunk-HBWO3QKW.js +0 -74
- package/dist/chunk-JVS5ZALZ.js +0 -123
- package/dist/chunk-LIGHV4RC.cjs +0 -121
- package/dist/chunk-MCTIA6RZ.js +0 -99
- package/dist/chunk-NC4YUEXM.cjs +0 -145
- package/dist/chunk-NJ6B22YJ.js +0 -170
- package/dist/chunk-W64ARHLJ.cjs +0 -62
- package/dist/chunk-ZFW6OYAO.cjs +0 -100
- package/docs/llms/spinner.md +0 -58
- package/docs/llms/toast.md +0 -51
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type MessageType = "info" | "success" | "warning" | "error";
|
|
4
|
+
interface MessageConfig {
|
|
5
|
+
/** Message body. */
|
|
6
|
+
content?: React.ReactNode;
|
|
7
|
+
/** Alias for callers that pass `{ message }` instead of `{ content }`. */
|
|
8
|
+
message?: React.ReactNode;
|
|
9
|
+
/** Optional title shown above the body. */
|
|
10
|
+
title?: React.ReactNode;
|
|
11
|
+
type?: MessageType;
|
|
12
|
+
/** Auto-dismiss delay in ms. `0` keeps it until manually closed. */
|
|
13
|
+
duration?: number;
|
|
14
|
+
/** Stable key; opening another message with the same key updates it. */
|
|
15
|
+
key?: React.Key;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
}
|
|
18
|
+
interface MessageItem {
|
|
19
|
+
id: number;
|
|
20
|
+
key?: React.Key;
|
|
21
|
+
type: MessageType;
|
|
22
|
+
title?: React.ReactNode;
|
|
23
|
+
content?: React.ReactNode;
|
|
24
|
+
duration?: number;
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
}
|
|
27
|
+
type MessageMethod = (configOrContent: MessageConfig | React.ReactNode, durationOrTitle?: number | React.ReactNode, onClose?: () => void) => number;
|
|
28
|
+
interface MessageApi {
|
|
29
|
+
open(config: MessageConfig): number;
|
|
30
|
+
show(config: MessageConfig): number;
|
|
31
|
+
info: MessageMethod;
|
|
32
|
+
success: MessageMethod;
|
|
33
|
+
warning: MessageMethod;
|
|
34
|
+
warn: MessageMethod;
|
|
35
|
+
error: MessageMethod;
|
|
36
|
+
dismiss(idOrKey: number | React.Key): void;
|
|
37
|
+
destroy(idOrKey?: number | React.Key): void;
|
|
38
|
+
clear(): void;
|
|
39
|
+
}
|
|
40
|
+
declare const message: MessageApi;
|
|
41
|
+
interface MessageContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
42
|
+
placement?: "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center";
|
|
43
|
+
}
|
|
44
|
+
/** `MessageContainer` — optional app-root mount point for `message.*` calls. */
|
|
45
|
+
declare const MessageContainer: React.ForwardRefExoticComponent<MessageContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
type ToastType = MessageType;
|
|
47
|
+
type ToastItem = MessageItem;
|
|
48
|
+
type ToastContainerProps = MessageContainerProps;
|
|
49
|
+
/** @deprecated Use `message` instead. */
|
|
50
|
+
declare const toast: MessageApi;
|
|
51
|
+
/** @deprecated Use `MessageContainer` instead. */
|
|
52
|
+
declare const ToastContainer: React.ForwardRefExoticComponent<MessageContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
|
|
54
|
+
export { type MessageApi, type MessageConfig, MessageContainer, type MessageContainerProps, type MessageItem, type MessageMethod, type MessageType, ToastContainer, type ToastContainerProps, type ToastItem, type ToastType, message, toast };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type MessageType = "info" | "success" | "warning" | "error";
|
|
4
|
+
interface MessageConfig {
|
|
5
|
+
/** Message body. */
|
|
6
|
+
content?: React.ReactNode;
|
|
7
|
+
/** Alias for callers that pass `{ message }` instead of `{ content }`. */
|
|
8
|
+
message?: React.ReactNode;
|
|
9
|
+
/** Optional title shown above the body. */
|
|
10
|
+
title?: React.ReactNode;
|
|
11
|
+
type?: MessageType;
|
|
12
|
+
/** Auto-dismiss delay in ms. `0` keeps it until manually closed. */
|
|
13
|
+
duration?: number;
|
|
14
|
+
/** Stable key; opening another message with the same key updates it. */
|
|
15
|
+
key?: React.Key;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
}
|
|
18
|
+
interface MessageItem {
|
|
19
|
+
id: number;
|
|
20
|
+
key?: React.Key;
|
|
21
|
+
type: MessageType;
|
|
22
|
+
title?: React.ReactNode;
|
|
23
|
+
content?: React.ReactNode;
|
|
24
|
+
duration?: number;
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
}
|
|
27
|
+
type MessageMethod = (configOrContent: MessageConfig | React.ReactNode, durationOrTitle?: number | React.ReactNode, onClose?: () => void) => number;
|
|
28
|
+
interface MessageApi {
|
|
29
|
+
open(config: MessageConfig): number;
|
|
30
|
+
show(config: MessageConfig): number;
|
|
31
|
+
info: MessageMethod;
|
|
32
|
+
success: MessageMethod;
|
|
33
|
+
warning: MessageMethod;
|
|
34
|
+
warn: MessageMethod;
|
|
35
|
+
error: MessageMethod;
|
|
36
|
+
dismiss(idOrKey: number | React.Key): void;
|
|
37
|
+
destroy(idOrKey?: number | React.Key): void;
|
|
38
|
+
clear(): void;
|
|
39
|
+
}
|
|
40
|
+
declare const message: MessageApi;
|
|
41
|
+
interface MessageContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
42
|
+
placement?: "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center";
|
|
43
|
+
}
|
|
44
|
+
/** `MessageContainer` — optional app-root mount point for `message.*` calls. */
|
|
45
|
+
declare const MessageContainer: React.ForwardRefExoticComponent<MessageContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
type ToastType = MessageType;
|
|
47
|
+
type ToastItem = MessageItem;
|
|
48
|
+
type ToastContainerProps = MessageContainerProps;
|
|
49
|
+
/** @deprecated Use `message` instead. */
|
|
50
|
+
declare const toast: MessageApi;
|
|
51
|
+
/** @deprecated Use `MessageContainer` instead. */
|
|
52
|
+
declare const ToastContainer: React.ForwardRefExoticComponent<MessageContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
|
|
54
|
+
export { type MessageApi, type MessageConfig, MessageContainer, type MessageContainerProps, type MessageItem, type MessageMethod, type MessageType, ToastContainer, type ToastContainerProps, type ToastItem, type ToastType, message, toast };
|
package/dist/Message.js
ADDED
|
@@ -70,3 +70,30 @@
|
|
|
70
70
|
background: var(--bg);
|
|
71
71
|
box-shadow: var(--neu-flat);
|
|
72
72
|
}
|
|
73
|
+
|
|
74
|
+
.modal-static-body {
|
|
75
|
+
display: flex;
|
|
76
|
+
gap: var(--gap-3);
|
|
77
|
+
align-items: flex-start;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.modal-static-icon {
|
|
81
|
+
width: 34px;
|
|
82
|
+
height: 34px;
|
|
83
|
+
border-radius: var(--r-md);
|
|
84
|
+
display: inline-grid;
|
|
85
|
+
place-items: center;
|
|
86
|
+
flex-shrink: 0;
|
|
87
|
+
background: var(--bg);
|
|
88
|
+
box-shadow: var(--neu-in-sm);
|
|
89
|
+
color: var(--accent);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.modal-static-icon.success { color: var(--success); }
|
|
93
|
+
.modal-static-icon.warning { color: var(--warning); }
|
|
94
|
+
.modal-static-icon.error { color: var(--danger); }
|
|
95
|
+
|
|
96
|
+
.modal-static-content {
|
|
97
|
+
min-width: 0;
|
|
98
|
+
color: var(--fg-muted);
|
|
99
|
+
}
|
package/dist/Modal.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkH4LGWZMH_cjs = require('./chunk-H4LGWZMH.cjs');
|
|
4
|
+
require('./chunk-TP567B3L.cjs');
|
|
5
|
+
require('./chunk-V272XR3F.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 chunkH4LGWZMH_cjs.Modal; }
|
|
12
12
|
});
|
package/dist/Modal.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from './Button.cjs';
|
|
3
3
|
import './Icon.cjs';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
4
5
|
|
|
5
6
|
interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "children" | "onClose"> {
|
|
6
7
|
/** Whether the modal is visible. */
|
|
@@ -41,7 +42,7 @@ interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"
|
|
|
41
42
|
/**
|
|
42
43
|
* When true the modal's children are unmounted every time it closes.
|
|
43
44
|
* Default `false` — children stay mounted so internal state survives
|
|
44
|
-
* reopens
|
|
45
|
+
* reopens.
|
|
45
46
|
*/
|
|
46
47
|
destroyOnClose?: boolean;
|
|
47
48
|
/** Fires after the open/close animation finishes. */
|
|
@@ -50,7 +51,31 @@ interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"
|
|
|
50
51
|
zIndex?: number;
|
|
51
52
|
className?: string;
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
type ModalStaticKind = "confirm" | "info" | "success" | "warning" | "error";
|
|
55
|
+
interface ModalStaticConfig extends Omit<ModalProps, "open" | "onClose" | "onOk" | "onCancel" | "children" | "afterOpenChange" | "content"> {
|
|
56
|
+
content?: React.ReactNode;
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
/** Override the semantic icon. Pass `false` to hide it. */
|
|
59
|
+
icon?: React.ReactNode | false;
|
|
60
|
+
/** Whether to show Cancel + OK. Defaults to true for confirm, false for the other static methods. */
|
|
61
|
+
okCancel?: boolean;
|
|
62
|
+
onOk?: () => void | boolean | Promise<void | boolean>;
|
|
63
|
+
onCancel?: () => void;
|
|
64
|
+
}
|
|
65
|
+
interface ModalStaticHandle {
|
|
66
|
+
destroy: () => void;
|
|
67
|
+
update: (config: Partial<ModalStaticConfig> | ((prev: ModalStaticConfig) => Partial<ModalStaticConfig>)) => void;
|
|
68
|
+
}
|
|
69
|
+
interface ModalStaticFunctions {
|
|
70
|
+
confirm: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
71
|
+
info: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
72
|
+
success: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
73
|
+
warning: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
74
|
+
warn: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
75
|
+
error: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
76
|
+
destroyAll: () => void;
|
|
77
|
+
}
|
|
78
|
+
type ModalComponent = React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>> & ModalStaticFunctions;
|
|
79
|
+
declare const Modal: ModalComponent;
|
|
55
80
|
|
|
56
|
-
export { Modal, type ModalProps };
|
|
81
|
+
export { Modal, type ModalComponent, type ModalProps, type ModalStaticConfig, type ModalStaticFunctions, type ModalStaticHandle, type ModalStaticKind };
|
package/dist/Modal.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from './Button.js';
|
|
3
3
|
import './Icon.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
4
5
|
|
|
5
6
|
interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "children" | "onClose"> {
|
|
6
7
|
/** Whether the modal is visible. */
|
|
@@ -41,7 +42,7 @@ interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"
|
|
|
41
42
|
/**
|
|
42
43
|
* When true the modal's children are unmounted every time it closes.
|
|
43
44
|
* Default `false` — children stay mounted so internal state survives
|
|
44
|
-
* reopens
|
|
45
|
+
* reopens.
|
|
45
46
|
*/
|
|
46
47
|
destroyOnClose?: boolean;
|
|
47
48
|
/** Fires after the open/close animation finishes. */
|
|
@@ -50,7 +51,31 @@ interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"
|
|
|
50
51
|
zIndex?: number;
|
|
51
52
|
className?: string;
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
type ModalStaticKind = "confirm" | "info" | "success" | "warning" | "error";
|
|
55
|
+
interface ModalStaticConfig extends Omit<ModalProps, "open" | "onClose" | "onOk" | "onCancel" | "children" | "afterOpenChange" | "content"> {
|
|
56
|
+
content?: React.ReactNode;
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
/** Override the semantic icon. Pass `false` to hide it. */
|
|
59
|
+
icon?: React.ReactNode | false;
|
|
60
|
+
/** Whether to show Cancel + OK. Defaults to true for confirm, false for the other static methods. */
|
|
61
|
+
okCancel?: boolean;
|
|
62
|
+
onOk?: () => void | boolean | Promise<void | boolean>;
|
|
63
|
+
onCancel?: () => void;
|
|
64
|
+
}
|
|
65
|
+
interface ModalStaticHandle {
|
|
66
|
+
destroy: () => void;
|
|
67
|
+
update: (config: Partial<ModalStaticConfig> | ((prev: ModalStaticConfig) => Partial<ModalStaticConfig>)) => void;
|
|
68
|
+
}
|
|
69
|
+
interface ModalStaticFunctions {
|
|
70
|
+
confirm: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
71
|
+
info: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
72
|
+
success: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
73
|
+
warning: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
74
|
+
warn: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
75
|
+
error: (config: ModalStaticConfig) => ModalStaticHandle;
|
|
76
|
+
destroyAll: () => void;
|
|
77
|
+
}
|
|
78
|
+
type ModalComponent = React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>> & ModalStaticFunctions;
|
|
79
|
+
declare const Modal: ModalComponent;
|
|
55
80
|
|
|
56
|
-
export { Modal, type ModalProps };
|
|
81
|
+
export { Modal, type ModalComponent, type ModalProps, type ModalStaticConfig, type ModalStaticFunctions, type ModalStaticHandle, type ModalStaticKind };
|
package/dist/Modal.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Modal } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { Modal } from './chunk-7IYKKLV3.js';
|
|
2
|
+
import './chunk-SQGPSMSK.js';
|
|
3
|
+
import './chunk-47VG2P34.js';
|
package/dist/Pagination.cjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkP6EZG2R7_cjs = require('./chunk-P6EZG2R7.cjs');
|
|
4
|
+
require('./chunk-X5GCOMC3.cjs');
|
|
5
|
+
require('./chunk-5DKRY67M.cjs');
|
|
6
6
|
require('./chunk-YB3IWIOJ.cjs');
|
|
7
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-HKF2V5MM.cjs');
|
|
8
|
+
require('./chunk-MPVCYU2K.cjs');
|
|
9
|
+
require('./chunk-V272XR3F.cjs');
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
Object.defineProperty(exports, "Pagination", {
|
|
12
14
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkP6EZG2R7_cjs.Pagination; }
|
|
14
16
|
});
|
package/dist/Pagination.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export { Pagination } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { Pagination } from './chunk-CETNCRZ4.js';
|
|
2
|
+
import './chunk-FBYUZOZP.js';
|
|
3
|
+
import './chunk-5H5YP2TB.js';
|
|
4
4
|
import './chunk-DUFRASGO.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-UKS23N3L.js';
|
|
6
|
+
import './chunk-HLFH5HWR.js';
|
|
7
|
+
import './chunk-47VG2P34.js';
|
package/dist/Popover.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUUHFKIWP_cjs = require('./chunk-UUHFKIWP.cjs');
|
|
4
4
|
require('./chunk-YB3IWIOJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Popover", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkUUHFKIWP_cjs.Popover; }
|
|
11
11
|
});
|
package/dist/Popover.d.cts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
type PopoverPlacement = "top" | "bottom" | "left" | "right" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
3
4
|
interface PopoverProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "title" | "children" | "content"> {
|
|
4
5
|
/** Popover body content. */
|
|
5
|
-
content
|
|
6
|
+
content?: React.ReactNode;
|
|
6
7
|
/** Optional title rendered above content. */
|
|
7
8
|
title?: React.ReactNode;
|
|
8
9
|
/** Preferred placement relative to the trigger. */
|
|
9
|
-
placement?:
|
|
10
|
+
placement?: PopoverPlacement;
|
|
10
11
|
/** How the popover is triggered. */
|
|
11
12
|
trigger?: "click" | "hover";
|
|
12
13
|
/** Show a small arrow pointing at the trigger. */
|
|
@@ -19,11 +20,18 @@ interface PopoverProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "titl
|
|
|
19
20
|
defaultOpen?: boolean;
|
|
20
21
|
/** Controlled open state. */
|
|
21
22
|
open?: boolean;
|
|
23
|
+
/** Controlled visibility alias. */
|
|
24
|
+
visible?: boolean;
|
|
22
25
|
/** Callback when visibility changes. */
|
|
23
26
|
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
onVisibleChange?: (visible: boolean) => void;
|
|
24
28
|
/** Trigger element. */
|
|
25
29
|
children: React.ReactElement;
|
|
26
30
|
className?: string;
|
|
31
|
+
/** Class for the popped-out panel. */
|
|
32
|
+
overlayClassName?: string;
|
|
33
|
+
/** Alias used by some popup APIs. */
|
|
34
|
+
popupClassName?: string;
|
|
27
35
|
}
|
|
28
36
|
/**
|
|
29
37
|
* `Popover` — rich content bubble with optional title, arrow, and close button.
|
|
@@ -35,4 +43,4 @@ interface PopoverProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "titl
|
|
|
35
43
|
*/
|
|
36
44
|
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLSpanElement>>;
|
|
37
45
|
|
|
38
|
-
export { Popover, type PopoverProps };
|
|
46
|
+
export { Popover, type PopoverPlacement, type PopoverProps };
|
package/dist/Popover.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
type PopoverPlacement = "top" | "bottom" | "left" | "right" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
3
4
|
interface PopoverProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "title" | "children" | "content"> {
|
|
4
5
|
/** Popover body content. */
|
|
5
|
-
content
|
|
6
|
+
content?: React.ReactNode;
|
|
6
7
|
/** Optional title rendered above content. */
|
|
7
8
|
title?: React.ReactNode;
|
|
8
9
|
/** Preferred placement relative to the trigger. */
|
|
9
|
-
placement?:
|
|
10
|
+
placement?: PopoverPlacement;
|
|
10
11
|
/** How the popover is triggered. */
|
|
11
12
|
trigger?: "click" | "hover";
|
|
12
13
|
/** Show a small arrow pointing at the trigger. */
|
|
@@ -19,11 +20,18 @@ interface PopoverProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "titl
|
|
|
19
20
|
defaultOpen?: boolean;
|
|
20
21
|
/** Controlled open state. */
|
|
21
22
|
open?: boolean;
|
|
23
|
+
/** Controlled visibility alias. */
|
|
24
|
+
visible?: boolean;
|
|
22
25
|
/** Callback when visibility changes. */
|
|
23
26
|
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
onVisibleChange?: (visible: boolean) => void;
|
|
24
28
|
/** Trigger element. */
|
|
25
29
|
children: React.ReactElement;
|
|
26
30
|
className?: string;
|
|
31
|
+
/** Class for the popped-out panel. */
|
|
32
|
+
overlayClassName?: string;
|
|
33
|
+
/** Alias used by some popup APIs. */
|
|
34
|
+
popupClassName?: string;
|
|
27
35
|
}
|
|
28
36
|
/**
|
|
29
37
|
* `Popover` — rich content bubble with optional title, arrow, and close button.
|
|
@@ -35,4 +43,4 @@ interface PopoverProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "titl
|
|
|
35
43
|
*/
|
|
36
44
|
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLSpanElement>>;
|
|
37
45
|
|
|
38
|
-
export { Popover, type PopoverProps };
|
|
46
|
+
export { Popover, type PopoverPlacement, type PopoverProps };
|
package/dist/Popover.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Popover } from './chunk-
|
|
1
|
+
export { Popover } from './chunk-HWFM4MAT.js';
|
|
2
2
|
import './chunk-DUFRASGO.js';
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* ============ Radio ============ */
|
|
2
|
+
.radio {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 10px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
user-select: none;
|
|
8
|
+
font-size: 13px;
|
|
9
|
+
color: var(--fg);
|
|
10
|
+
}
|
|
11
|
+
.radio.disabled { opacity: 0.5; cursor: not-allowed; }
|
|
12
|
+
|
|
13
|
+
.radio-dot {
|
|
14
|
+
width: 20px; height: 20px;
|
|
15
|
+
border: none;
|
|
16
|
+
padding: 0;
|
|
17
|
+
border-radius: 999px;
|
|
18
|
+
background: var(--bg);
|
|
19
|
+
box-shadow: var(--neu-in-sm);
|
|
20
|
+
cursor: inherit;
|
|
21
|
+
position: relative;
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
transition: all var(--dur) var(--ease);
|
|
24
|
+
}
|
|
25
|
+
.radio.checked .radio-dot {
|
|
26
|
+
background: var(--accent);
|
|
27
|
+
box-shadow: var(--neu-out-sm), 0 2px 8px var(--accent-glow);
|
|
28
|
+
}
|
|
29
|
+
.radio.checked .radio-dot::after {
|
|
30
|
+
content: "";
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 50%; left: 50%;
|
|
33
|
+
transform: translate(-50%, -50%);
|
|
34
|
+
width: 8px; height: 8px;
|
|
35
|
+
border-radius: 999px;
|
|
36
|
+
background: var(--bg);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.radio-group { display: flex; gap: 14px; }
|
|
40
|
+
.radio-group.vertical { flex-direction: column; gap: 10px; }
|
|
41
|
+
.radio-group.horizontal { flex-direction: row; flex-wrap: wrap; }
|
|
42
|
+
|
|
43
|
+
.radio-group.segmented {
|
|
44
|
+
position: relative;
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
padding: 4px;
|
|
47
|
+
border-radius: var(--r-md);
|
|
48
|
+
background: var(--bg);
|
|
49
|
+
box-shadow: var(--neu-in-sm);
|
|
50
|
+
gap: 2px;
|
|
51
|
+
flex-wrap: nowrap;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.radio-group.segmented .radio {
|
|
55
|
+
position: relative;
|
|
56
|
+
z-index: 1;
|
|
57
|
+
height: 32px;
|
|
58
|
+
padding: 6px 14px;
|
|
59
|
+
border-radius: calc(var(--r-md) - 4px);
|
|
60
|
+
color: var(--fg-muted);
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
gap: 6px;
|
|
63
|
+
transition: all var(--dur-fast) var(--ease);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.radio-group.segmented .radio:hover { color: var(--fg); }
|
|
67
|
+
.radio-group.segmented .radio.checked {
|
|
68
|
+
color: var(--accent-ink);
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
}
|
|
71
|
+
.radio-group.segmented .radio-dot { display: none; }
|
|
72
|
+
.radio-group.segmented .radio-label { line-height: 1; }
|
|
73
|
+
.radio-group.segmented .radio.disabled { opacity: 0.4; }
|
|
74
|
+
.radio-group.segmented.sm .radio { height: 26px; padding: 4px 10px; font-size: 11px; }
|
|
75
|
+
.radio-group.segmented.lg .radio { height: 38px; padding: 8px 18px; font-size: 13px; }
|
|
76
|
+
|
|
77
|
+
.radio-segment-thumb {
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: 4px;
|
|
80
|
+
bottom: 4px;
|
|
81
|
+
left: 0;
|
|
82
|
+
border-radius: calc(var(--r-md) - 4px);
|
|
83
|
+
background: var(--bg);
|
|
84
|
+
box-shadow: var(--neu-out-sm);
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
transition:
|
|
87
|
+
transform var(--dur-slow) var(--ease),
|
|
88
|
+
width var(--dur-slow) var(--ease),
|
|
89
|
+
opacity var(--dur-fast) var(--ease);
|
|
90
|
+
will-change: transform, width;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@media (prefers-reduced-motion: reduce) {
|
|
94
|
+
.radio-segment-thumb {
|
|
95
|
+
transition: none;
|
|
96
|
+
}
|
|
97
|
+
}
|
package/dist/Radio.cjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKGSADAOD_cjs = require('./chunk-KGSADAOD.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "Radio", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkKGSADAOD_cjs.Radio; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "RadioGroup", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkKGSADAOD_cjs.RadioGroup; }
|
|
14
|
+
});
|
package/dist/Radio.d.cts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface RadioProps extends Omit<React.LabelHTMLAttributes<HTMLLabelElement>, "onChange" | "children" | "id"> {
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
onChange?: (checked: boolean) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const RadioRoot: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLLabelElement>>;
|
|
13
|
+
interface RadioOption<T extends string | number = string> {
|
|
14
|
+
value: T;
|
|
15
|
+
label: React.ReactNode;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface RadioGroupProps<T extends string | number = string> extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
19
|
+
options: RadioOption<T>[];
|
|
20
|
+
value?: T;
|
|
21
|
+
defaultValue?: T;
|
|
22
|
+
onChange?: (value: T) => void;
|
|
23
|
+
name?: string;
|
|
24
|
+
direction?: "vertical" | "horizontal";
|
|
25
|
+
variant?: "default" | "segmented";
|
|
26
|
+
size?: "sm" | "md" | "lg";
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
type RadioGroupComponent = <T extends string | number = string>(props: RadioGroupProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
30
|
+
/** `RadioGroup` — mutually exclusive options. */
|
|
31
|
+
declare const RadioGroup: RadioGroupComponent;
|
|
32
|
+
declare const Radio: typeof RadioRoot & {
|
|
33
|
+
Group: typeof RadioGroup;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { Radio, RadioGroup, type RadioGroupProps, type RadioOption, type RadioProps };
|
package/dist/Radio.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface RadioProps extends Omit<React.LabelHTMLAttributes<HTMLLabelElement>, "onChange" | "children" | "id"> {
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
onChange?: (checked: boolean) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const RadioRoot: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLLabelElement>>;
|
|
13
|
+
interface RadioOption<T extends string | number = string> {
|
|
14
|
+
value: T;
|
|
15
|
+
label: React.ReactNode;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface RadioGroupProps<T extends string | number = string> extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
19
|
+
options: RadioOption<T>[];
|
|
20
|
+
value?: T;
|
|
21
|
+
defaultValue?: T;
|
|
22
|
+
onChange?: (value: T) => void;
|
|
23
|
+
name?: string;
|
|
24
|
+
direction?: "vertical" | "horizontal";
|
|
25
|
+
variant?: "default" | "segmented";
|
|
26
|
+
size?: "sm" | "md" | "lg";
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
type RadioGroupComponent = <T extends string | number = string>(props: RadioGroupProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
30
|
+
/** `RadioGroup` — mutually exclusive options. */
|
|
31
|
+
declare const RadioGroup: RadioGroupComponent;
|
|
32
|
+
declare const Radio: typeof RadioRoot & {
|
|
33
|
+
Group: typeof RadioGroup;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { Radio, RadioGroup, type RadioGroupProps, type RadioOption, type RadioProps };
|
package/dist/Radio.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Radio, RadioGroup } from './chunk-USQ43DJ5.js';
|