asterui 0.12.15 → 0.12.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/Checkbox.d.ts +3 -1
- package/dist/components/Form.d.ts +7 -1
- package/dist/components/HoverGallery.d.ts +10 -0
- package/dist/components/Input.d.ts +10 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +40 -40
- package/dist/index10.js +70 -65
- package/dist/index10.js.map +1 -1
- package/dist/index21.js +1 -1
- package/dist/index34.js +198 -158
- package/dist/index34.js.map +1 -1
- package/dist/index37.js +15 -120
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +119 -37
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +40 -398
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +390 -89
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +90 -215
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +249 -145
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +155 -15
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +15 -17
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +17 -21
- package/dist/index45.js.map +1 -1
- package/dist/index86.js +1 -1
- package/package.json +1 -1
- package/dist/components/Label.d.ts +0 -15
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ export default function App() {
|
|
|
86
86
|
</Form.Item>
|
|
87
87
|
<Link size="sm">Forgot password?</Link>
|
|
88
88
|
</Space>
|
|
89
|
-
<Button
|
|
89
|
+
<Button color="primary" htmlType="submit" shape="block">
|
|
90
90
|
Sign In
|
|
91
91
|
</Button>
|
|
92
92
|
<Divider>or</Divider>
|
|
@@ -28,9 +28,11 @@ export interface CheckboxGroupProps {
|
|
|
28
28
|
onChange?: (values: (string | number)[]) => void;
|
|
29
29
|
disabled?: boolean;
|
|
30
30
|
options?: (string | number | CheckboxOptionType)[];
|
|
31
|
+
/** Layout direction for options */
|
|
32
|
+
direction?: 'horizontal' | 'vertical';
|
|
31
33
|
className?: string;
|
|
32
34
|
}
|
|
33
|
-
declare function CheckboxGroup({ children, value, defaultValue, onChange, disabled, options, className }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
declare function CheckboxGroup({ children, value, defaultValue, onChange, disabled, options, direction, className }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
34
36
|
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>> & {
|
|
35
37
|
Group: typeof CheckboxGroup;
|
|
36
38
|
};
|
|
@@ -42,6 +42,8 @@ export type ValidateTrigger = 'onChange' | 'onBlur' | 'onSubmit' | ('onChange' |
|
|
|
42
42
|
export interface FormItemProps {
|
|
43
43
|
name?: string | string[];
|
|
44
44
|
label?: string;
|
|
45
|
+
/** Floating label text (alternative to label, uses DaisyUI floating-label) */
|
|
46
|
+
floatingLabel?: string;
|
|
45
47
|
help?: string;
|
|
46
48
|
required?: boolean;
|
|
47
49
|
rules?: FormRule | FormRule[];
|
|
@@ -63,6 +65,10 @@ export interface FormItemProps {
|
|
|
63
65
|
initialValue?: any;
|
|
64
66
|
/** Hide this field (still validates and submits) */
|
|
65
67
|
hidden?: boolean;
|
|
68
|
+
/** Text/element before input (outside, using DaisyUI label) */
|
|
69
|
+
addonBefore?: React.ReactNode;
|
|
70
|
+
/** Text/element after input (outside, using DaisyUI label) */
|
|
71
|
+
addonAfter?: React.ReactNode;
|
|
66
72
|
}
|
|
67
73
|
export interface FormListProps<TFieldValues extends FieldValues = FieldValues> {
|
|
68
74
|
name: FieldArrayPath<TFieldValues>;
|
|
@@ -73,7 +79,7 @@ export interface FormListProps<TFieldValues extends FieldValues = FieldValues> {
|
|
|
73
79
|
}) => React.ReactNode;
|
|
74
80
|
}
|
|
75
81
|
declare function FormRoot<TFieldValues extends FieldValues = FieldValues>({ form: externalForm, onFinish, onFinishFailed, initialValues, layout, labelWidth, size, disabled, children, className, noValidate, ...props }: FormProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
76
|
-
declare function FormItem({ name, label, help, required, rules, valuePropName, inline, className, children, tooltip, extra, hasFeedback, dependencies, validateTrigger, initialValue, hidden, }: FormItemProps): import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
declare function FormItem({ name, label, floatingLabel, help, required, rules, valuePropName, inline, className, children, tooltip, extra, hasFeedback, dependencies, validateTrigger, initialValue, hidden, addonBefore, addonAfter, }: FormItemProps): import("react/jsx-runtime").JSX.Element;
|
|
77
83
|
declare function FormList<TFieldValues extends FieldValues = FieldValues>({ name, children, }: FormListProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
78
84
|
export declare function useFormInstance<TFieldValues extends FieldValues = FieldValues>(): UseFormReturn<TFieldValues, any, TFieldValues> & {
|
|
79
85
|
setFieldValue: import('react-hook-form').UseFormSetValue<TFieldValues>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface HoverGalleryProps {
|
|
3
|
+
/** Image sources (2-10 images) */
|
|
4
|
+
images: string[];
|
|
5
|
+
/** Alt text for images (optional, uses index if not provided) */
|
|
6
|
+
alts?: string[];
|
|
7
|
+
/** Additional CSS classes */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const HoverGallery: React.FC<HoverGalleryProps>;
|
|
@@ -18,11 +18,19 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
18
18
|
};
|
|
19
19
|
/** Callback when clear button is clicked */
|
|
20
20
|
onClear?: () => void;
|
|
21
|
-
/** Prefix icon or element */
|
|
21
|
+
/** Prefix icon or element (inside input) */
|
|
22
22
|
prefix?: React.ReactNode;
|
|
23
|
-
/** Suffix icon or element */
|
|
23
|
+
/** Suffix icon or element (inside input) */
|
|
24
24
|
suffix?: React.ReactNode;
|
|
25
|
+
/** Text/element before input (outside, using DaisyUI label) */
|
|
26
|
+
addonBefore?: React.ReactNode;
|
|
27
|
+
/** Text/element after input (outside, using DaisyUI label) */
|
|
28
|
+
addonAfter?: React.ReactNode;
|
|
29
|
+
/** Floating label text (uses DaisyUI floating-label) */
|
|
30
|
+
floatingLabel?: string;
|
|
25
31
|
/** ID for error message element (for aria-describedby) */
|
|
26
32
|
errorId?: string;
|
|
33
|
+
/** Render as unstyled input (for use inside styled wrappers) */
|
|
34
|
+
unstyled?: boolean;
|
|
27
35
|
}
|
|
28
36
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ export { Grid, Row, Col } from './components/Grid';
|
|
|
68
68
|
export type { RowProps, ColProps } from './components/Grid';
|
|
69
69
|
export { Hero } from './components/Hero';
|
|
70
70
|
export type { HeroProps } from './components/Hero';
|
|
71
|
+
export { HoverGallery } from './components/HoverGallery';
|
|
72
|
+
export type { HoverGalleryProps } from './components/HoverGallery';
|
|
71
73
|
export { Image } from './components/Image';
|
|
72
74
|
export type { ImageProps } from './components/Image';
|
|
73
75
|
export { Indicator } from './components/Indicator';
|
|
@@ -84,8 +86,6 @@ export { Join } from './components/Join';
|
|
|
84
86
|
export type { JoinProps } from './components/Join';
|
|
85
87
|
export { Kbd } from './components/Kbd';
|
|
86
88
|
export type { KbdProps } from './components/Kbd';
|
|
87
|
-
export { Label } from './components/Label';
|
|
88
|
-
export type { LabelProps, FloatingLabelProps } from './components/Label';
|
|
89
89
|
export { Layout, useSiderContext } from './components/Layout';
|
|
90
90
|
export type { LayoutProps, LayoutHeaderProps, LayoutFooterProps, LayoutContentProps, LayoutSiderProps } from './components/Layout';
|
|
91
91
|
export { List } from './components/List';
|
package/dist/index.js
CHANGED
|
@@ -10,12 +10,12 @@ import { Checkbox as P } from "./index10.js";
|
|
|
10
10
|
import { Chat as b } from "./index11.js";
|
|
11
11
|
import { ColorPicker as D } from "./index12.js";
|
|
12
12
|
import { Card as w } from "./index13.js";
|
|
13
|
-
import { Cascader as
|
|
14
|
-
import { Chart as
|
|
13
|
+
import { Cascader as v } from "./index14.js";
|
|
14
|
+
import { Chart as R } from "./index15.js";
|
|
15
15
|
import { Carousel as A } from "./index16.js";
|
|
16
|
-
import { Collapse as
|
|
16
|
+
import { Collapse as M } from "./index17.js";
|
|
17
17
|
import { Container as H } from "./index18.js";
|
|
18
|
-
import { ContextMenu as
|
|
18
|
+
import { ContextMenu as K } from "./index19.js";
|
|
19
19
|
import { Countdown as O } from "./index20.js";
|
|
20
20
|
import { DatePicker as z } from "./index21.js";
|
|
21
21
|
import { Descriptions as J } from "./index22.js";
|
|
@@ -33,15 +33,15 @@ import { Footer as so } from "./index33.js";
|
|
|
33
33
|
import { Form as lo, useFormInstance as co } from "./index34.js";
|
|
34
34
|
import { Col as To, Grid as go, Row as Po } from "./index35.js";
|
|
35
35
|
import { Hero as bo } from "./index36.js";
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
36
|
+
import { HoverGallery as Do } from "./index37.js";
|
|
37
|
+
import { Image as wo } from "./index38.js";
|
|
38
|
+
import { Indicator as vo } from "./index39.js";
|
|
39
|
+
import { Dropdown as Ro } from "./index40.js";
|
|
40
|
+
import { Empty as Ao } from "./index41.js";
|
|
41
|
+
import { Input as Mo } from "./index42.js";
|
|
42
|
+
import { InputNumber as Ho } from "./index43.js";
|
|
43
|
+
import { Join as Ko } from "./index44.js";
|
|
44
|
+
import { Kbd as Oo } from "./index45.js";
|
|
45
45
|
import { Layout as zo, useSiderContext as Eo } from "./index46.js";
|
|
46
46
|
import { List as Qo } from "./index47.js";
|
|
47
47
|
import { Loading as jo } from "./index48.js";
|
|
@@ -62,11 +62,11 @@ import { PageLayout as Sr } from "./index62.js";
|
|
|
62
62
|
import { Popconfirm as kr } from "./index63.js";
|
|
63
63
|
import { Popover as hr } from "./index64.js";
|
|
64
64
|
import { Progress as yr } from "./index65.js";
|
|
65
|
-
import { QRCode as
|
|
65
|
+
import { QRCode as Fr } from "./index66.js";
|
|
66
66
|
import { Radio as Ir } from "./index67.js";
|
|
67
67
|
import { RadialProgress as Br } from "./index68.js";
|
|
68
|
-
import { Range as
|
|
69
|
-
import { Rating as
|
|
68
|
+
import { Range as Lr } from "./index69.js";
|
|
69
|
+
import { Rating as Gr } from "./index70.js";
|
|
70
70
|
import { Result as Nr } from "./index71.js";
|
|
71
71
|
import { Select as Wr } from "./index72.js";
|
|
72
72
|
import { Segmented as Er } from "./index73.js";
|
|
@@ -88,11 +88,11 @@ import { Toggle as Pe } from "./index88.js";
|
|
|
88
88
|
import { Tour as be } from "./index89.js";
|
|
89
89
|
import { Tooltip as De } from "./index90.js";
|
|
90
90
|
import { Transfer as we } from "./index91.js";
|
|
91
|
-
import { Tree as
|
|
92
|
-
import { TreeSelect as
|
|
91
|
+
import { Tree as ve } from "./index92.js";
|
|
92
|
+
import { TreeSelect as Re } from "./index93.js";
|
|
93
93
|
import { Typography as Ae } from "./index94.js";
|
|
94
|
-
import { Upload as
|
|
95
|
-
import { Hide as He, Show as
|
|
94
|
+
import { Upload as Me } from "./index95.js";
|
|
95
|
+
import { Hide as He, Show as Ge } from "./index96.js";
|
|
96
96
|
import { useBreakpoint as Ne } from "./index97.js";
|
|
97
97
|
import { useDisclosure as We } from "./index98.js";
|
|
98
98
|
import { useClipboard as Ee } from "./index99.js";
|
|
@@ -116,17 +116,17 @@ export {
|
|
|
116
116
|
T as Button,
|
|
117
117
|
w as Card,
|
|
118
118
|
A as Carousel,
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
v as Cascader,
|
|
120
|
+
R as Chart,
|
|
121
121
|
b as Chat,
|
|
122
122
|
ne as CheckableTag,
|
|
123
123
|
P as Checkbox,
|
|
124
124
|
pr as Code,
|
|
125
125
|
To as Col,
|
|
126
|
-
|
|
126
|
+
M as Collapse,
|
|
127
127
|
D as ColorPicker,
|
|
128
128
|
H as Container,
|
|
129
|
-
|
|
129
|
+
K as ContextMenu,
|
|
130
130
|
O as Countdown,
|
|
131
131
|
z as DatePicker,
|
|
132
132
|
J as Descriptions,
|
|
@@ -134,8 +134,8 @@ export {
|
|
|
134
134
|
X as Divider,
|
|
135
135
|
q as Dock,
|
|
136
136
|
Z as Drawer,
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
Ro as Dropdown,
|
|
138
|
+
Ao as Empty,
|
|
139
139
|
ro as Fieldset,
|
|
140
140
|
to as FileInput,
|
|
141
141
|
mo as Filter,
|
|
@@ -146,13 +146,13 @@ export {
|
|
|
146
146
|
go as Grid,
|
|
147
147
|
bo as Hero,
|
|
148
148
|
He as Hide,
|
|
149
|
-
Do as
|
|
150
|
-
wo as
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
Ho as
|
|
154
|
-
|
|
155
|
-
Oo as
|
|
149
|
+
Do as HoverGallery,
|
|
150
|
+
wo as Image,
|
|
151
|
+
vo as Indicator,
|
|
152
|
+
Mo as Input,
|
|
153
|
+
Ho as InputNumber,
|
|
154
|
+
Ko as Join,
|
|
155
|
+
Oo as Kbd,
|
|
156
156
|
zo as Layout,
|
|
157
157
|
Qo as List,
|
|
158
158
|
jo as Loading,
|
|
@@ -169,16 +169,16 @@ export {
|
|
|
169
169
|
kr as Popconfirm,
|
|
170
170
|
hr as Popover,
|
|
171
171
|
yr as Progress,
|
|
172
|
-
|
|
172
|
+
Fr as QRCode,
|
|
173
173
|
Br as RadialProgress,
|
|
174
174
|
Ir as Radio,
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
Lr as Range,
|
|
176
|
+
Gr as Rating,
|
|
177
177
|
Nr as Result,
|
|
178
178
|
Po as Row,
|
|
179
179
|
Er as Segmented,
|
|
180
180
|
Wr as Select,
|
|
181
|
-
|
|
181
|
+
Ge as Show,
|
|
182
182
|
$ as SidebarDrawer,
|
|
183
183
|
Qr as Skeleton,
|
|
184
184
|
jr as Space,
|
|
@@ -198,10 +198,10 @@ export {
|
|
|
198
198
|
De as Tooltip,
|
|
199
199
|
be as Tour,
|
|
200
200
|
we as Transfer,
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
ve as Tree,
|
|
202
|
+
Re as TreeSelect,
|
|
203
203
|
Ae as Typography,
|
|
204
|
-
|
|
204
|
+
Me as Upload,
|
|
205
205
|
ar as Window,
|
|
206
206
|
dr as notification,
|
|
207
207
|
Ne as useBreakpoint,
|
package/dist/index10.js
CHANGED
|
@@ -1,52 +1,57 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import R, { forwardRef as G, useContext as
|
|
3
|
-
const y =
|
|
4
|
-
function
|
|
5
|
-
children:
|
|
6
|
-
value:
|
|
7
|
-
defaultValue:
|
|
8
|
-
onChange:
|
|
1
|
+
import { jsxs as p, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import R, { forwardRef as G, useContext as $, createContext as B } from "react";
|
|
3
|
+
const y = B(null);
|
|
4
|
+
function I({
|
|
5
|
+
children: f,
|
|
6
|
+
value: o,
|
|
7
|
+
defaultValue: x,
|
|
8
|
+
onChange: h,
|
|
9
9
|
disabled: n = !1,
|
|
10
|
-
options:
|
|
11
|
-
|
|
10
|
+
options: d,
|
|
11
|
+
direction: a = "vertical",
|
|
12
|
+
className: u = ""
|
|
12
13
|
}) {
|
|
13
|
-
const [
|
|
14
|
-
value:
|
|
15
|
-
onChange: (
|
|
16
|
-
const
|
|
17
|
-
|
|
14
|
+
const [C, g] = R.useState(x || []), r = o !== void 0 ? o : C, t = {
|
|
15
|
+
value: r,
|
|
16
|
+
onChange: (i, e) => {
|
|
17
|
+
const k = e ? [...r, i] : r.filter((b) => b !== i);
|
|
18
|
+
o === void 0 && g(k), h?.(k);
|
|
18
19
|
},
|
|
19
20
|
disabled: n
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/* @__PURE__ */ c("
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
22
|
+
if (d) {
|
|
23
|
+
const i = a === "horizontal" ? "flex flex-row flex-wrap gap-4" : "flex flex-col";
|
|
24
|
+
return /* @__PURE__ */ c(y.Provider, { value: t, children: /* @__PURE__ */ c("div", { className: `${i} ${u}`.trim(), children: d.map((e) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ p("label", { className: "label cursor-pointer justify-start gap-2", children: [
|
|
25
|
+
/* @__PURE__ */ c(m, { value: e }),
|
|
26
|
+
/* @__PURE__ */ c("span", { className: "label-text", children: e })
|
|
27
|
+
] }, e) : /* @__PURE__ */ p("label", { className: "label cursor-pointer justify-start gap-2", children: [
|
|
28
|
+
/* @__PURE__ */ c(m, { value: e.value, disabled: e.disabled }),
|
|
29
|
+
/* @__PURE__ */ c("span", { className: "label-text", children: e.label })
|
|
30
|
+
] }, e.value)) }) });
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ c(y.Provider, { value: t, children: /* @__PURE__ */ c("div", { className: u, children: f }) });
|
|
28
33
|
}
|
|
29
|
-
const
|
|
34
|
+
const m = G(
|
|
30
35
|
({
|
|
31
|
-
children:
|
|
32
|
-
size:
|
|
33
|
-
color:
|
|
34
|
-
indeterminate:
|
|
36
|
+
children: f,
|
|
37
|
+
size: o,
|
|
38
|
+
color: x,
|
|
39
|
+
indeterminate: h = !1,
|
|
35
40
|
swap: n,
|
|
36
|
-
className:
|
|
37
|
-
value:
|
|
38
|
-
checked:
|
|
39
|
-
onChange:
|
|
40
|
-
disabled:
|
|
41
|
-
...
|
|
42
|
-
},
|
|
43
|
-
const
|
|
41
|
+
className: d = "",
|
|
42
|
+
value: a,
|
|
43
|
+
checked: u,
|
|
44
|
+
onChange: C,
|
|
45
|
+
disabled: g,
|
|
46
|
+
...r
|
|
47
|
+
}, l) => {
|
|
48
|
+
const t = $(y), i = {
|
|
44
49
|
xs: "checkbox-xs",
|
|
45
50
|
sm: "checkbox-sm",
|
|
46
51
|
md: "checkbox-md",
|
|
47
52
|
lg: "checkbox-lg",
|
|
48
53
|
xl: "checkbox-xl"
|
|
49
|
-
},
|
|
54
|
+
}, e = {
|
|
50
55
|
primary: "checkbox-primary",
|
|
51
56
|
secondary: "checkbox-secondary",
|
|
52
57
|
accent: "checkbox-accent",
|
|
@@ -55,36 +60,36 @@ const u = G(
|
|
|
55
60
|
warning: "checkbox-warning",
|
|
56
61
|
info: "checkbox-info",
|
|
57
62
|
error: "checkbox-error"
|
|
58
|
-
},
|
|
63
|
+
}, k = [
|
|
59
64
|
"checkbox",
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
].filter(Boolean).join(" "),
|
|
63
|
-
|
|
65
|
+
o && i[o],
|
|
66
|
+
x && e[x]
|
|
67
|
+
].filter(Boolean).join(" "), b = t && a !== void 0 && (typeof a == "string" || typeof a == "number") ? t.value?.includes(a) ?? !1 : u, N = t?.disabled || g, v = (s) => {
|
|
68
|
+
t && a !== void 0 && (typeof a == "string" || typeof a == "number") && t.onChange?.(a, s.target.checked), C?.(s);
|
|
64
69
|
}, V = R.useCallback(
|
|
65
|
-
(
|
|
66
|
-
|
|
70
|
+
(s) => {
|
|
71
|
+
s && (s.indeterminate = h), typeof l == "function" ? l(s) : l && (l.current = s);
|
|
67
72
|
},
|
|
68
|
-
[
|
|
69
|
-
),
|
|
73
|
+
[h, l]
|
|
74
|
+
), j = h ? "indeterminate" : b ? "checked" : "unchecked";
|
|
70
75
|
if (n) {
|
|
71
|
-
const
|
|
76
|
+
const s = [
|
|
72
77
|
"swap",
|
|
73
78
|
n.effect === "rotate" && "swap-rotate",
|
|
74
79
|
n.effect === "flip" && "swap-flip",
|
|
75
|
-
|
|
80
|
+
d
|
|
76
81
|
].filter(Boolean).join(" ");
|
|
77
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ p("label", { className: s, children: [
|
|
78
83
|
/* @__PURE__ */ c(
|
|
79
84
|
"input",
|
|
80
85
|
{
|
|
81
|
-
ref:
|
|
86
|
+
ref: l,
|
|
82
87
|
type: "checkbox",
|
|
83
|
-
checked:
|
|
84
|
-
onChange:
|
|
88
|
+
checked: b,
|
|
89
|
+
onChange: v,
|
|
85
90
|
disabled: N,
|
|
86
|
-
"data-state":
|
|
87
|
-
...
|
|
91
|
+
"data-state": j,
|
|
92
|
+
...r
|
|
88
93
|
}
|
|
89
94
|
),
|
|
90
95
|
/* @__PURE__ */ c("div", { className: "swap-on", children: n.on }),
|
|
@@ -96,26 +101,26 @@ const u = G(
|
|
|
96
101
|
{
|
|
97
102
|
ref: V,
|
|
98
103
|
type: "checkbox",
|
|
99
|
-
className:
|
|
100
|
-
value:
|
|
101
|
-
checked:
|
|
102
|
-
onChange:
|
|
104
|
+
className: k,
|
|
105
|
+
value: a,
|
|
106
|
+
checked: b,
|
|
107
|
+
onChange: v,
|
|
103
108
|
disabled: N,
|
|
104
|
-
"data-state":
|
|
105
|
-
...
|
|
109
|
+
"data-state": j,
|
|
110
|
+
...r
|
|
106
111
|
}
|
|
107
112
|
);
|
|
108
|
-
return
|
|
113
|
+
return f ? /* @__PURE__ */ p("label", { className: `label cursor-pointer justify-start gap-2 ${d}`, children: [
|
|
109
114
|
w,
|
|
110
|
-
/* @__PURE__ */ c("span", { className: "label-text", children:
|
|
115
|
+
/* @__PURE__ */ c("span", { className: "label-text", children: f })
|
|
111
116
|
] }) : w;
|
|
112
117
|
}
|
|
113
118
|
);
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
Group:
|
|
119
|
+
m.displayName = "Checkbox";
|
|
120
|
+
const z = Object.assign(m, {
|
|
121
|
+
Group: I
|
|
117
122
|
});
|
|
118
123
|
export {
|
|
119
|
-
|
|
124
|
+
z as Checkbox
|
|
120
125
|
};
|
|
121
126
|
//# sourceMappingURL=index10.js.map
|
package/dist/index10.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index10.js","sources":["../src/components/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, createContext, useContext } from 'react'\n\nexport interface CheckboxSwapConfig {\n /** Content shown when checked */\n on: React.ReactNode\n /** Content shown when unchecked */\n off: React.ReactNode\n /** Animation effect for the swap transition */\n effect?: 'rotate' | 'flip'\n}\n\nexport interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {\n children?: React.ReactNode\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n color?: 'primary' | 'secondary' | 'accent' | 'neutral' | 'success' | 'warning' | 'info' | 'error'\n indeterminate?: boolean\n /** Swap mode: toggle between two visual states instead of showing a checkbox */\n swap?: CheckboxSwapConfig\n className?: string\n}\n\nexport interface CheckboxOptionType {\n label: React.ReactNode\n value: string | number\n disabled?: boolean\n}\n\nexport interface CheckboxGroupProps {\n children?: React.ReactNode\n value?: (string | number)[]\n defaultValue?: (string | number)[]\n onChange?: (values: (string | number)[]) => void\n disabled?: boolean\n options?: (string | number | CheckboxOptionType)[]\n className?: string\n}\n\ninterface CheckboxGroupContextValue {\n value?: (string | number)[]\n onChange?: (checkedValue: string | number, checked: boolean) => void\n disabled?: boolean\n}\n\nconst CheckboxGroupContext = createContext<CheckboxGroupContextValue | null>(null)\n\nfunction CheckboxGroup({\n children,\n value,\n defaultValue,\n onChange,\n disabled = false,\n options,\n className = ''\n}: CheckboxGroupProps) {\n const [internalValue, setInternalValue] = React.useState<(string | number)[]>(defaultValue || [])\n const currentValue = value !== undefined ? value : internalValue\n\n const handleChange = (checkedValue: string | number, checked: boolean) => {\n const newValue = checked\n ? [...currentValue, checkedValue]\n : currentValue.filter((v) => v !== checkedValue)\n\n if (value === undefined) {\n setInternalValue(newValue)\n }\n onChange?.(newValue)\n }\n\n const contextValue: CheckboxGroupContextValue = {\n value: currentValue,\n onChange: handleChange,\n disabled,\n }\n\n // If options are provided, render checkboxes automatically\n if (options) {\n return (\n <CheckboxGroupContext.Provider value={contextValue}>\n <div className={className}>\n {options.map((option) => {\n if (typeof option === 'string' || typeof option === 'number') {\n return (\n <label key={option} className=\"label cursor-pointer justify-start gap-2\">\n <CheckboxRoot value={option} />\n <span className=\"label-text\">{option}</span>\n </label>\n )\n } else {\n return (\n <label key={option.value} className=\"label cursor-pointer justify-start gap-2\">\n <CheckboxRoot value={option.value} disabled={option.disabled} />\n <span className=\"label-text\">{option.label}</span>\n </label>\n )\n }\n })}\n </div>\n </CheckboxGroupContext.Provider>\n )\n }\n\n return (\n <CheckboxGroupContext.Provider value={contextValue}>\n <div className={className}>{children}</div>\n </CheckboxGroupContext.Provider>\n )\n}\n\nconst CheckboxRoot = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n children,\n size,\n color,\n indeterminate = false,\n swap,\n className = '',\n value,\n checked,\n onChange,\n disabled: disabledProp,\n ...props\n },\n ref\n ) => {\n const groupContext = useContext(CheckboxGroupContext)\n\n const sizeClasses = {\n xs: 'checkbox-xs',\n sm: 'checkbox-sm',\n md: 'checkbox-md',\n lg: 'checkbox-lg',\n xl: 'checkbox-xl',\n }\n\n const colorClasses = {\n primary: 'checkbox-primary',\n secondary: 'checkbox-secondary',\n accent: 'checkbox-accent',\n neutral: 'checkbox-neutral',\n success: 'checkbox-success',\n warning: 'checkbox-warning',\n info: 'checkbox-info',\n error: 'checkbox-error',\n }\n\n const checkboxClasses = [\n 'checkbox',\n size && sizeClasses[size],\n color && colorClasses[color],\n ]\n .filter(Boolean)\n .join(' ')\n\n // If in a group, use group's value to determine checked state\n const isChecked = groupContext && value !== undefined && (typeof value === 'string' || typeof value === 'number')\n ? groupContext.value?.includes(value) ?? false\n : checked\n\n const isDisabled = groupContext?.disabled || disabledProp\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (groupContext && value !== undefined && (typeof value === 'string' || typeof value === 'number')) {\n groupContext.onChange?.(value, e.target.checked)\n }\n onChange?.(e)\n }\n\n // Handle indeterminate state\n const checkboxRef = React.useCallback(\n (node: HTMLInputElement | null) => {\n if (node) {\n node.indeterminate = indeterminate\n }\n if (typeof ref === 'function') {\n ref(node)\n } else if (ref) {\n ref.current = node\n }\n },\n [indeterminate, ref]\n )\n\n const dataState = indeterminate ? 'indeterminate' : isChecked ? 'checked' : 'unchecked'\n\n // Swap mode: render as a swap toggle instead of checkbox\n if (swap) {\n const swapClasses = [\n 'swap',\n swap.effect === 'rotate' && 'swap-rotate',\n swap.effect === 'flip' && 'swap-flip',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return (\n <label className={swapClasses}>\n <input\n ref={ref}\n type=\"checkbox\"\n checked={isChecked}\n onChange={handleChange}\n disabled={isDisabled}\n data-state={dataState}\n {...props}\n />\n <div className=\"swap-on\">{swap.on}</div>\n <div className=\"swap-off\">{swap.off}</div>\n </label>\n )\n }\n\n const checkboxInput = (\n <input\n ref={checkboxRef}\n type=\"checkbox\"\n className={checkboxClasses}\n value={value}\n checked={isChecked}\n onChange={handleChange}\n disabled={isDisabled}\n data-state={dataState}\n {...props}\n />\n )\n\n // If children provided, wrap in label\n if (children) {\n return (\n <label className={`label cursor-pointer justify-start gap-2 ${className}`}>\n {checkboxInput}\n <span className=\"label-text\">{children}</span>\n </label>\n )\n }\n\n return checkboxInput\n }\n)\n\nCheckboxRoot.displayName = 'Checkbox'\n\nexport const Checkbox = Object.assign(CheckboxRoot, {\n Group: CheckboxGroup,\n})\n"],"names":["CheckboxGroupContext","createContext","CheckboxGroup","children","value","defaultValue","onChange","disabled","options","className","internalValue","setInternalValue","React","currentValue","contextValue","checkedValue","checked","newValue","v","jsx","option","jsxs","CheckboxRoot","forwardRef","size","color","indeterminate","swap","disabledProp","props","ref","groupContext","useContext","sizeClasses","colorClasses","checkboxClasses","isChecked","isDisabled","handleChange","e","checkboxRef","node","dataState","swapClasses","checkboxInput","Checkbox"],"mappings":";;AA2CA,MAAMA,IAAuBC,EAAgD,IAAI;AAEjF,SAASC,EAAc;AAAA,EACrB,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,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"index10.js","sources":["../src/components/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, createContext, useContext } from 'react'\n\nexport interface CheckboxSwapConfig {\n /** Content shown when checked */\n on: React.ReactNode\n /** Content shown when unchecked */\n off: React.ReactNode\n /** Animation effect for the swap transition */\n effect?: 'rotate' | 'flip'\n}\n\nexport interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {\n children?: React.ReactNode\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n color?: 'primary' | 'secondary' | 'accent' | 'neutral' | 'success' | 'warning' | 'info' | 'error'\n indeterminate?: boolean\n /** Swap mode: toggle between two visual states instead of showing a checkbox */\n swap?: CheckboxSwapConfig\n className?: string\n}\n\nexport interface CheckboxOptionType {\n label: React.ReactNode\n value: string | number\n disabled?: boolean\n}\n\nexport interface CheckboxGroupProps {\n children?: React.ReactNode\n value?: (string | number)[]\n defaultValue?: (string | number)[]\n onChange?: (values: (string | number)[]) => void\n disabled?: boolean\n options?: (string | number | CheckboxOptionType)[]\n /** Layout direction for options */\n direction?: 'horizontal' | 'vertical'\n className?: string\n}\n\ninterface CheckboxGroupContextValue {\n value?: (string | number)[]\n onChange?: (checkedValue: string | number, checked: boolean) => void\n disabled?: boolean\n}\n\nconst CheckboxGroupContext = createContext<CheckboxGroupContextValue | null>(null)\n\nfunction CheckboxGroup({\n children,\n value,\n defaultValue,\n onChange,\n disabled = false,\n options,\n direction = 'vertical',\n className = ''\n}: CheckboxGroupProps) {\n const [internalValue, setInternalValue] = React.useState<(string | number)[]>(defaultValue || [])\n const currentValue = value !== undefined ? value : internalValue\n\n const handleChange = (checkedValue: string | number, checked: boolean) => {\n const newValue = checked\n ? [...currentValue, checkedValue]\n : currentValue.filter((v) => v !== checkedValue)\n\n if (value === undefined) {\n setInternalValue(newValue)\n }\n onChange?.(newValue)\n }\n\n const contextValue: CheckboxGroupContextValue = {\n value: currentValue,\n onChange: handleChange,\n disabled,\n }\n\n // If options are provided, render checkboxes automatically\n if (options) {\n const directionClasses = direction === 'horizontal' ? 'flex flex-row flex-wrap gap-4' : 'flex flex-col'\n return (\n <CheckboxGroupContext.Provider value={contextValue}>\n <div className={`${directionClasses} ${className}`.trim()}>\n {options.map((option) => {\n if (typeof option === 'string' || typeof option === 'number') {\n return (\n <label key={option} className=\"label cursor-pointer justify-start gap-2\">\n <CheckboxRoot value={option} />\n <span className=\"label-text\">{option}</span>\n </label>\n )\n } else {\n return (\n <label key={option.value} className=\"label cursor-pointer justify-start gap-2\">\n <CheckboxRoot value={option.value} disabled={option.disabled} />\n <span className=\"label-text\">{option.label}</span>\n </label>\n )\n }\n })}\n </div>\n </CheckboxGroupContext.Provider>\n )\n }\n\n return (\n <CheckboxGroupContext.Provider value={contextValue}>\n <div className={className}>{children}</div>\n </CheckboxGroupContext.Provider>\n )\n}\n\nconst CheckboxRoot = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n children,\n size,\n color,\n indeterminate = false,\n swap,\n className = '',\n value,\n checked,\n onChange,\n disabled: disabledProp,\n ...props\n },\n ref\n ) => {\n const groupContext = useContext(CheckboxGroupContext)\n\n const sizeClasses = {\n xs: 'checkbox-xs',\n sm: 'checkbox-sm',\n md: 'checkbox-md',\n lg: 'checkbox-lg',\n xl: 'checkbox-xl',\n }\n\n const colorClasses = {\n primary: 'checkbox-primary',\n secondary: 'checkbox-secondary',\n accent: 'checkbox-accent',\n neutral: 'checkbox-neutral',\n success: 'checkbox-success',\n warning: 'checkbox-warning',\n info: 'checkbox-info',\n error: 'checkbox-error',\n }\n\n const checkboxClasses = [\n 'checkbox',\n size && sizeClasses[size],\n color && colorClasses[color],\n ]\n .filter(Boolean)\n .join(' ')\n\n // If in a group, use group's value to determine checked state\n const isChecked = groupContext && value !== undefined && (typeof value === 'string' || typeof value === 'number')\n ? groupContext.value?.includes(value) ?? false\n : checked\n\n const isDisabled = groupContext?.disabled || disabledProp\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (groupContext && value !== undefined && (typeof value === 'string' || typeof value === 'number')) {\n groupContext.onChange?.(value, e.target.checked)\n }\n onChange?.(e)\n }\n\n // Handle indeterminate state\n const checkboxRef = React.useCallback(\n (node: HTMLInputElement | null) => {\n if (node) {\n node.indeterminate = indeterminate\n }\n if (typeof ref === 'function') {\n ref(node)\n } else if (ref) {\n ref.current = node\n }\n },\n [indeterminate, ref]\n )\n\n const dataState = indeterminate ? 'indeterminate' : isChecked ? 'checked' : 'unchecked'\n\n // Swap mode: render as a swap toggle instead of checkbox\n if (swap) {\n const swapClasses = [\n 'swap',\n swap.effect === 'rotate' && 'swap-rotate',\n swap.effect === 'flip' && 'swap-flip',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return (\n <label className={swapClasses}>\n <input\n ref={ref}\n type=\"checkbox\"\n checked={isChecked}\n onChange={handleChange}\n disabled={isDisabled}\n data-state={dataState}\n {...props}\n />\n <div className=\"swap-on\">{swap.on}</div>\n <div className=\"swap-off\">{swap.off}</div>\n </label>\n )\n }\n\n const checkboxInput = (\n <input\n ref={checkboxRef}\n type=\"checkbox\"\n className={checkboxClasses}\n value={value}\n checked={isChecked}\n onChange={handleChange}\n disabled={isDisabled}\n data-state={dataState}\n {...props}\n />\n )\n\n // If children provided, wrap in label\n if (children) {\n return (\n <label className={`label cursor-pointer justify-start gap-2 ${className}`}>\n {checkboxInput}\n <span className=\"label-text\">{children}</span>\n </label>\n )\n }\n\n return checkboxInput\n }\n)\n\nCheckboxRoot.displayName = 'Checkbox'\n\nexport const Checkbox = Object.assign(CheckboxRoot, {\n Group: CheckboxGroup,\n})\n"],"names":["CheckboxGroupContext","createContext","CheckboxGroup","children","value","defaultValue","onChange","disabled","options","direction","className","internalValue","setInternalValue","React","currentValue","contextValue","checkedValue","checked","newValue","v","directionClasses","option","jsxs","jsx","CheckboxRoot","forwardRef","size","color","indeterminate","swap","disabledProp","props","ref","groupContext","useContext","sizeClasses","colorClasses","checkboxClasses","isChecked","isDisabled","handleCh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B,IAEA,gBAAAmB,EAAC,SAAA,EAAM,WAAW,4CAA4CZ,CAAS,IACpE,UAAA;AAAA,MAAAoC;AAAA,MACD,gBAAAvB,EAAC,QAAA,EAAK,WAAU,cAAc,UAAApB,EAAA,CAAS;AAAA,IAAA,GACzC,IAIG2C;AAAA,EACT;AACF;AAEAtB,EAAa,cAAc;AAEpB,MAAMuB,IAAW,OAAO,OAAOvB,GAAc;AAAA,EAClD,OAAOtB;AACT,CAAC;"}
|
package/dist/index21.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useState as h, useRef as j, useEffect as y } from "react";
|
|
3
|
-
import { Input as T } from "./
|
|
3
|
+
import { Input as T } from "./index42.js";
|
|
4
4
|
const $ = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], I = [
|
|
5
5
|
"January",
|
|
6
6
|
"February",
|