@sigx/daisyui 0.1.6
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/LICENSE +21 -0
- package/README.md +235 -0
- package/dist/buttons/Button.d.ts +18 -0
- package/dist/buttons/Button.d.ts.map +1 -0
- package/dist/buttons/ButtonGroup.d.ts +18 -0
- package/dist/buttons/ButtonGroup.d.ts.map +1 -0
- package/dist/buttons/index.d.ts +5 -0
- package/dist/buttons/index.d.ts.map +1 -0
- package/dist/buttons/index.js +2 -0
- package/dist/buttons-Dtj_5Uc3.js +61 -0
- package/dist/buttons-Dtj_5Uc3.js.map +1 -0
- package/dist/data/Table.d.ts +92 -0
- package/dist/data/Table.d.ts.map +1 -0
- package/dist/data/index.d.ts +3 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data-wxNpnX83.js +153 -0
- package/dist/data-wxNpnX83.js.map +1 -0
- package/dist/feedback/Accordion.d.ts +87 -0
- package/dist/feedback/Accordion.d.ts.map +1 -0
- package/dist/feedback/Badge.d.ts +73 -0
- package/dist/feedback/Badge.d.ts.map +1 -0
- package/dist/feedback/Countdown.d.ts +33 -0
- package/dist/feedback/Countdown.d.ts.map +1 -0
- package/dist/feedback/Diff.d.ts +43 -0
- package/dist/feedback/Diff.d.ts.map +1 -0
- package/dist/feedback/FileInput.d.ts +28 -0
- package/dist/feedback/FileInput.d.ts.map +1 -0
- package/dist/feedback/Indicator.d.ts +47 -0
- package/dist/feedback/Indicator.d.ts.map +1 -0
- package/dist/feedback/Kbd.d.ts +31 -0
- package/dist/feedback/Kbd.d.ts.map +1 -0
- package/dist/feedback/Modal.d.ts +51 -0
- package/dist/feedback/Modal.d.ts.map +1 -0
- package/dist/feedback/RadialProgress.d.ts +35 -0
- package/dist/feedback/RadialProgress.d.ts.map +1 -0
- package/dist/feedback/Rating.d.ts +34 -0
- package/dist/feedback/Rating.d.ts.map +1 -0
- package/dist/feedback/Skeleton.d.ts +24 -0
- package/dist/feedback/Skeleton.d.ts.map +1 -0
- package/dist/feedback/Steps.d.ts +60 -0
- package/dist/feedback/Steps.d.ts.map +1 -0
- package/dist/feedback/Swap.d.ts +53 -0
- package/dist/feedback/Swap.d.ts.map +1 -0
- package/dist/feedback/Timeline.d.ts +76 -0
- package/dist/feedback/Timeline.d.ts.map +1 -0
- package/dist/feedback/Toast.d.ts +30 -0
- package/dist/feedback/Toast.d.ts.map +1 -0
- package/dist/feedback/index.d.ts +31 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/feedback/index.js +2 -0
- package/dist/feedback-DFutN-Kz.js +817 -0
- package/dist/feedback-DFutN-Kz.js.map +1 -0
- package/dist/forms/Checkbox.d.ts +15 -0
- package/dist/forms/Checkbox.d.ts.map +1 -0
- package/dist/forms/FormField.d.ts +16 -0
- package/dist/forms/FormField.d.ts.map +1 -0
- package/dist/forms/Input.d.ts +19 -0
- package/dist/forms/Input.d.ts.map +1 -0
- package/dist/forms/Radio.d.ts +78 -0
- package/dist/forms/Radio.d.ts.map +1 -0
- package/dist/forms/Range.d.ts +15 -0
- package/dist/forms/Range.d.ts.map +1 -0
- package/dist/forms/Select.d.ts +28 -0
- package/dist/forms/Select.d.ts.map +1 -0
- package/dist/forms/Textarea.d.ts +17 -0
- package/dist/forms/Textarea.d.ts.map +1 -0
- package/dist/forms/Toggle.d.ts +15 -0
- package/dist/forms/Toggle.d.ts.map +1 -0
- package/dist/forms/index.d.ts +17 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +2 -0
- package/dist/forms-CuvlRMro.js +362 -0
- package/dist/forms-CuvlRMro.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/layout/Card.d.ts +65 -0
- package/dist/layout/Card.d.ts.map +1 -0
- package/dist/layout/Carousel.d.ts +56 -0
- package/dist/layout/Carousel.d.ts.map +1 -0
- package/dist/layout/Chat.d.ts +54 -0
- package/dist/layout/Chat.d.ts.map +1 -0
- package/dist/layout/Container.d.ts +17 -0
- package/dist/layout/Container.d.ts.map +1 -0
- package/dist/layout/Divider.d.ts +22 -0
- package/dist/layout/Divider.d.ts.map +1 -0
- package/dist/layout/Flex.d.ts +59 -0
- package/dist/layout/Flex.d.ts.map +1 -0
- package/dist/layout/Footer.d.ts +25 -0
- package/dist/layout/Footer.d.ts.map +1 -0
- package/dist/layout/Hero.d.ts +52 -0
- package/dist/layout/Hero.d.ts.map +1 -0
- package/dist/layout/Join.d.ts +40 -0
- package/dist/layout/Join.d.ts.map +1 -0
- package/dist/layout/Link.d.ts +20 -0
- package/dist/layout/Link.d.ts.map +1 -0
- package/dist/layout/Mask.d.ts +26 -0
- package/dist/layout/Mask.d.ts.map +1 -0
- package/dist/layout/Mockup.d.ts +95 -0
- package/dist/layout/Mockup.d.ts.map +1 -0
- package/dist/layout/Stack.d.ts +45 -0
- package/dist/layout/Stack.d.ts.map +1 -0
- package/dist/layout/index.d.ts +46 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +2 -0
- package/dist/layout-0aaJX4B2.js +554 -0
- package/dist/layout-0aaJX4B2.js.map +1 -0
- package/dist/navigation/Breadcrumbs.d.ts +22 -0
- package/dist/navigation/Breadcrumbs.d.ts.map +1 -0
- package/dist/navigation/Drawer.d.ts +25 -0
- package/dist/navigation/Drawer.d.ts.map +1 -0
- package/dist/navigation/Dropdown.d.ts +40 -0
- package/dist/navigation/Dropdown.d.ts.map +1 -0
- package/dist/navigation/MenuComponent.d.ts +54 -0
- package/dist/navigation/MenuComponent.d.ts.map +1 -0
- package/dist/navigation/Navbar.d.ts +23 -0
- package/dist/navigation/Navbar.d.ts.map +1 -0
- package/dist/navigation/Pagination.d.ts +12 -0
- package/dist/navigation/Pagination.d.ts.map +1 -0
- package/dist/navigation/Tabs.d.ts +35 -0
- package/dist/navigation/Tabs.d.ts.map +1 -0
- package/dist/navigation/index.d.ts +15 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation-4cwyfLvr.js +285 -0
- package/dist/navigation-4cwyfLvr.js.map +1 -0
- package/dist/shared/styles.d.ts +79 -0
- package/dist/shared/styles.d.ts.map +1 -0
- package/dist/styles-DFkMxi90.js +126 -0
- package/dist/styles-DFkMxi90.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +73 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme-D9CUMvuT.js +118 -0
- package/dist/theme-D9CUMvuT.js.map +1 -0
- package/dist/typography/Text.d.ts +47 -0
- package/dist/typography/Text.d.ts.map +1 -0
- package/dist/typography/index.d.ts +3 -0
- package/dist/typography/index.d.ts.map +1 -0
- package/dist/typography/index.js +2 -0
- package/dist/typography-CU1RMGKA.js +112 -0
- package/dist/typography-CU1RMGKA.js.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { component, compound, defineInjectable, defineProvide } from "sigx";
|
|
2
|
+
import { jsx, jsxs } from "sigx/jsx-runtime";
|
|
3
|
+
var inputSizeClasses = {
|
|
4
|
+
xs: "input-xs",
|
|
5
|
+
sm: "input-sm",
|
|
6
|
+
md: "",
|
|
7
|
+
lg: "input-lg"
|
|
8
|
+
};
|
|
9
|
+
var inputColorClasses = {
|
|
10
|
+
primary: "input-primary",
|
|
11
|
+
secondary: "input-secondary",
|
|
12
|
+
accent: "input-accent",
|
|
13
|
+
info: "input-info",
|
|
14
|
+
success: "input-success",
|
|
15
|
+
warning: "input-warning",
|
|
16
|
+
error: "input-error"
|
|
17
|
+
};
|
|
18
|
+
const Input = component(({ props, emit }) => {
|
|
19
|
+
function getClasses() {
|
|
20
|
+
const classes = ["input", "w-full"];
|
|
21
|
+
if (props.size) {
|
|
22
|
+
const sizeClass = inputSizeClasses[props.size];
|
|
23
|
+
if (sizeClass) classes.push(sizeClass);
|
|
24
|
+
}
|
|
25
|
+
if (props.variant === "bordered") classes.push("input-bordered");
|
|
26
|
+
if (props.variant === "ghost") classes.push("input-ghost");
|
|
27
|
+
if (props.color) classes.push(inputColorClasses[props.color]);
|
|
28
|
+
if (props.class) classes.push(props.class);
|
|
29
|
+
return classes.join(" ");
|
|
30
|
+
}
|
|
31
|
+
return () => {
|
|
32
|
+
return /* @__PURE__ */ jsx("input", {
|
|
33
|
+
type: props.type ?? "text",
|
|
34
|
+
class: getClasses(),
|
|
35
|
+
value: props.model?.value != null ? String(props.model.value) : "",
|
|
36
|
+
placeholder: props.placeholder,
|
|
37
|
+
disabled: props.disabled,
|
|
38
|
+
readOnly: props.readOnly,
|
|
39
|
+
maxLength: props.maxLength,
|
|
40
|
+
onInput: (e) => {
|
|
41
|
+
const value = e.target.value;
|
|
42
|
+
if (props.model) props.model.value = value;
|
|
43
|
+
emit("input", e);
|
|
44
|
+
},
|
|
45
|
+
onChange: (e) => emit("change", e),
|
|
46
|
+
onFocus: (e) => emit("focus", e),
|
|
47
|
+
onBlur: (e) => emit("blur", e)
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
const Textarea = component(({ props, emit }) => {
|
|
52
|
+
function getClasses() {
|
|
53
|
+
const classes = ["textarea", "w-full"];
|
|
54
|
+
if (props.size === "xs") classes.push("textarea-xs");
|
|
55
|
+
if (props.size === "sm") classes.push("textarea-sm");
|
|
56
|
+
if (props.size === "lg") classes.push("textarea-lg");
|
|
57
|
+
if (props.variant === "bordered") classes.push("textarea-bordered");
|
|
58
|
+
if (props.variant === "ghost") classes.push("textarea-ghost");
|
|
59
|
+
if (props.color) classes.push(`textarea-${props.color}`);
|
|
60
|
+
if (props.class) classes.push(props.class);
|
|
61
|
+
return classes.join(" ");
|
|
62
|
+
}
|
|
63
|
+
return () => {
|
|
64
|
+
const modelProps = props.model ? { model: [props.model.binding[0], props.model.binding[1]] } : {};
|
|
65
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
66
|
+
class: getClasses(),
|
|
67
|
+
rows: props.rows ?? 3,
|
|
68
|
+
placeholder: props.placeholder,
|
|
69
|
+
disabled: props.disabled,
|
|
70
|
+
...modelProps,
|
|
71
|
+
onInput: (e) => emit("input", e.target.value),
|
|
72
|
+
onChange: (e) => emit("change", e.target.value)
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
var selectSizeClasses = {
|
|
77
|
+
xs: "select-xs",
|
|
78
|
+
sm: "select-sm",
|
|
79
|
+
md: "",
|
|
80
|
+
lg: "select-lg"
|
|
81
|
+
};
|
|
82
|
+
var selectColorClasses = {
|
|
83
|
+
primary: "select-primary",
|
|
84
|
+
secondary: "select-secondary",
|
|
85
|
+
accent: "select-accent",
|
|
86
|
+
info: "select-info",
|
|
87
|
+
success: "select-success",
|
|
88
|
+
warning: "select-warning",
|
|
89
|
+
error: "select-error"
|
|
90
|
+
};
|
|
91
|
+
const Select = component(({ props, slots, emit }) => {
|
|
92
|
+
function getClasses() {
|
|
93
|
+
const classes = ["select", "w-full"];
|
|
94
|
+
if (props.size) {
|
|
95
|
+
const sizeClass = selectSizeClasses[props.size];
|
|
96
|
+
if (sizeClass) classes.push(sizeClass);
|
|
97
|
+
}
|
|
98
|
+
if (props.variant === "bordered") classes.push("select-bordered");
|
|
99
|
+
if (props.variant === "ghost") classes.push("select-ghost");
|
|
100
|
+
if (props.color) classes.push(selectColorClasses[props.color]);
|
|
101
|
+
if (props.class) classes.push(props.class);
|
|
102
|
+
return classes.join(" ");
|
|
103
|
+
}
|
|
104
|
+
return () => {
|
|
105
|
+
const modelProps = props.model ? { model: [props.model.binding[0], props.model.binding[1]] } : {};
|
|
106
|
+
return /* @__PURE__ */ jsxs("select", {
|
|
107
|
+
class: getClasses(),
|
|
108
|
+
disabled: props.disabled,
|
|
109
|
+
...modelProps,
|
|
110
|
+
onChange: (e) => emit("change", e.target.value),
|
|
111
|
+
children: [
|
|
112
|
+
props.placeholder && /* @__PURE__ */ jsx("option", {
|
|
113
|
+
value: "",
|
|
114
|
+
disabled: true,
|
|
115
|
+
children: props.placeholder
|
|
116
|
+
}),
|
|
117
|
+
props.options?.map((opt) => /* @__PURE__ */ jsx("option", {
|
|
118
|
+
value: opt.value,
|
|
119
|
+
disabled: opt.disabled,
|
|
120
|
+
children: opt.label
|
|
121
|
+
})),
|
|
122
|
+
slots.default?.()
|
|
123
|
+
]
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
const FormField = component(({ props, slots }) => {
|
|
128
|
+
return () => /* @__PURE__ */ jsxs("div", {
|
|
129
|
+
class: `form-control w-full ${props.class ?? ""}`,
|
|
130
|
+
children: [
|
|
131
|
+
props.label && /* @__PURE__ */ jsx("label", {
|
|
132
|
+
class: "label",
|
|
133
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
134
|
+
class: "label-text",
|
|
135
|
+
children: [props.label, props.required && /* @__PURE__ */ jsx("span", {
|
|
136
|
+
class: "text-error ml-1",
|
|
137
|
+
children: "*"
|
|
138
|
+
})]
|
|
139
|
+
})
|
|
140
|
+
}),
|
|
141
|
+
slots.default?.(),
|
|
142
|
+
(props.error || props.hint) && /* @__PURE__ */ jsx("label", {
|
|
143
|
+
class: "label",
|
|
144
|
+
children: props.error ? /* @__PURE__ */ jsx("span", {
|
|
145
|
+
class: "label-text-alt text-error",
|
|
146
|
+
children: props.error
|
|
147
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
148
|
+
class: "label-text-alt",
|
|
149
|
+
children: props.hint
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
var toggleSizeClasses = {
|
|
156
|
+
xs: "toggle-xs",
|
|
157
|
+
sm: "toggle-sm",
|
|
158
|
+
md: "",
|
|
159
|
+
lg: "toggle-lg"
|
|
160
|
+
};
|
|
161
|
+
var toggleColorClasses = {
|
|
162
|
+
primary: "toggle-primary",
|
|
163
|
+
secondary: "toggle-secondary",
|
|
164
|
+
accent: "toggle-accent",
|
|
165
|
+
info: "toggle-info",
|
|
166
|
+
success: "toggle-success",
|
|
167
|
+
warning: "toggle-warning",
|
|
168
|
+
error: "toggle-error"
|
|
169
|
+
};
|
|
170
|
+
const Toggle = component(({ props, emit }) => {
|
|
171
|
+
function handleChange(e) {
|
|
172
|
+
const checked = e.target.checked;
|
|
173
|
+
if (props.model) props.model.value = checked;
|
|
174
|
+
emit("change", checked);
|
|
175
|
+
}
|
|
176
|
+
return () => {
|
|
177
|
+
const sizeClass = toggleSizeClasses[props.size ?? "md"];
|
|
178
|
+
const colorClass = props.color ? toggleColorClasses[props.color] : "";
|
|
179
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
180
|
+
class: `flex items-center gap-2 cursor-pointer ${props.class ?? ""}`,
|
|
181
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
182
|
+
type: "checkbox",
|
|
183
|
+
class: `toggle ${sizeClass} ${colorClass}`,
|
|
184
|
+
checked: props.model?.value ?? false,
|
|
185
|
+
disabled: props.disabled,
|
|
186
|
+
onChange: handleChange
|
|
187
|
+
}), props.label && /* @__PURE__ */ jsx("span", {
|
|
188
|
+
class: "label-text",
|
|
189
|
+
children: props.label
|
|
190
|
+
})]
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
var checkboxSizeClasses = {
|
|
195
|
+
xs: "checkbox-xs",
|
|
196
|
+
sm: "checkbox-sm",
|
|
197
|
+
md: "",
|
|
198
|
+
lg: "checkbox-lg"
|
|
199
|
+
};
|
|
200
|
+
var checkboxColorClasses = {
|
|
201
|
+
primary: "checkbox-primary",
|
|
202
|
+
secondary: "checkbox-secondary",
|
|
203
|
+
accent: "checkbox-accent",
|
|
204
|
+
info: "checkbox-info",
|
|
205
|
+
success: "checkbox-success",
|
|
206
|
+
warning: "checkbox-warning",
|
|
207
|
+
error: "checkbox-error"
|
|
208
|
+
};
|
|
209
|
+
const Checkbox = component(({ props, emit }) => {
|
|
210
|
+
function handleChange(e) {
|
|
211
|
+
const checked = e.target.checked;
|
|
212
|
+
if (props.model) props.model.value = checked;
|
|
213
|
+
emit("change", checked);
|
|
214
|
+
}
|
|
215
|
+
return () => {
|
|
216
|
+
const sizeClass = checkboxSizeClasses[props.size ?? "md"];
|
|
217
|
+
const colorClass = props.color ? checkboxColorClasses[props.color] : "";
|
|
218
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
219
|
+
class: `flex items-center gap-2 cursor-pointer ${props.class ?? ""}`,
|
|
220
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
221
|
+
type: "checkbox",
|
|
222
|
+
class: `checkbox ${sizeClass} ${colorClass}`,
|
|
223
|
+
checked: props.model?.value ?? false,
|
|
224
|
+
disabled: props.disabled,
|
|
225
|
+
onChange: handleChange
|
|
226
|
+
}), props.label && /* @__PURE__ */ jsx("span", {
|
|
227
|
+
class: "label-text",
|
|
228
|
+
children: props.label
|
|
229
|
+
})]
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
});
|
|
233
|
+
var radioSizeClasses = {
|
|
234
|
+
xs: "radio-xs",
|
|
235
|
+
sm: "radio-sm",
|
|
236
|
+
md: "",
|
|
237
|
+
lg: "radio-lg"
|
|
238
|
+
};
|
|
239
|
+
var radioColorClasses = {
|
|
240
|
+
primary: "radio-primary",
|
|
241
|
+
secondary: "radio-secondary",
|
|
242
|
+
accent: "radio-accent",
|
|
243
|
+
info: "radio-info",
|
|
244
|
+
success: "radio-success",
|
|
245
|
+
warning: "radio-warning",
|
|
246
|
+
error: "radio-error"
|
|
247
|
+
};
|
|
248
|
+
var useRadioGroup = defineInjectable(() => null);
|
|
249
|
+
const Radio = compound(component(({ props, slots, emit }) => {
|
|
250
|
+
defineProvide(useRadioGroup, () => ({
|
|
251
|
+
name: props.name,
|
|
252
|
+
value: () => props.model?.value,
|
|
253
|
+
size: props.size,
|
|
254
|
+
color: props.color,
|
|
255
|
+
disabled: props.disabled,
|
|
256
|
+
onChange: (value) => {
|
|
257
|
+
if (props.model) props.model.value = value;
|
|
258
|
+
emit("change", value);
|
|
259
|
+
}
|
|
260
|
+
}));
|
|
261
|
+
return () => {
|
|
262
|
+
return /* @__PURE__ */ jsx("div", {
|
|
263
|
+
class: `${props.direction === "horizontal" ? "flex flex-row gap-4" : "flex flex-col gap-2"} ${props.class ?? ""}`,
|
|
264
|
+
children: slots.default?.()
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
}), {
|
|
268
|
+
Item: component(({ props }) => {
|
|
269
|
+
const context = useRadioGroup();
|
|
270
|
+
function handleChange() {
|
|
271
|
+
if (context && !props.disabled && !context.disabled) context.onChange(props.value);
|
|
272
|
+
}
|
|
273
|
+
return () => {
|
|
274
|
+
if (!context) {
|
|
275
|
+
console.warn("Radio.Item must be used within a Radio component");
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
const sizeClass = radioSizeClasses[context.size ?? "md"];
|
|
279
|
+
const colorClass = context.color ? radioColorClasses[context.color] : "";
|
|
280
|
+
const isDisabled = props.disabled || context.disabled;
|
|
281
|
+
const isChecked = context.value() === props.value;
|
|
282
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
283
|
+
class: `flex items-center gap-2 cursor-pointer ${props.class ?? ""}`,
|
|
284
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
285
|
+
type: "radio",
|
|
286
|
+
name: context.name,
|
|
287
|
+
value: props.value,
|
|
288
|
+
class: `radio ${sizeClass} ${colorClass}`,
|
|
289
|
+
checked: isChecked,
|
|
290
|
+
disabled: isDisabled,
|
|
291
|
+
onChange: handleChange
|
|
292
|
+
}), props.label && /* @__PURE__ */ jsx("span", {
|
|
293
|
+
class: "label-text",
|
|
294
|
+
children: props.label
|
|
295
|
+
})]
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
}),
|
|
299
|
+
Standalone: component(({ props, emit }) => {
|
|
300
|
+
function handleChange(e) {
|
|
301
|
+
const value = e.target.value;
|
|
302
|
+
emit("change", value);
|
|
303
|
+
}
|
|
304
|
+
return () => {
|
|
305
|
+
const sizeClass = radioSizeClasses[props.size ?? "md"];
|
|
306
|
+
const colorClass = props.color ? radioColorClasses[props.color] : "";
|
|
307
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
308
|
+
class: `flex items-center gap-2 cursor-pointer ${props.class ?? ""}`,
|
|
309
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
310
|
+
type: "radio",
|
|
311
|
+
name: props.name,
|
|
312
|
+
value: props.value,
|
|
313
|
+
class: `radio ${sizeClass} ${colorClass}`,
|
|
314
|
+
checked: props.checked ?? false,
|
|
315
|
+
disabled: props.disabled,
|
|
316
|
+
onChange: handleChange
|
|
317
|
+
}), props.label && /* @__PURE__ */ jsx("span", {
|
|
318
|
+
class: "label-text",
|
|
319
|
+
children: props.label
|
|
320
|
+
})]
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
})
|
|
324
|
+
});
|
|
325
|
+
var rangeSizeClasses = {
|
|
326
|
+
xs: "range-xs",
|
|
327
|
+
sm: "range-sm",
|
|
328
|
+
md: "",
|
|
329
|
+
lg: "range-lg"
|
|
330
|
+
};
|
|
331
|
+
var rangeColorClasses = {
|
|
332
|
+
primary: "range-primary",
|
|
333
|
+
secondary: "range-secondary",
|
|
334
|
+
accent: "range-accent",
|
|
335
|
+
info: "range-info",
|
|
336
|
+
success: "range-success",
|
|
337
|
+
warning: "range-warning",
|
|
338
|
+
error: "range-error"
|
|
339
|
+
};
|
|
340
|
+
const Range = component(({ props, emit }) => {
|
|
341
|
+
function handleInput(e) {
|
|
342
|
+
const value = parseFloat(e.target.value);
|
|
343
|
+
if (props.model) props.model.value = value;
|
|
344
|
+
emit("change", value);
|
|
345
|
+
}
|
|
346
|
+
return () => {
|
|
347
|
+
const sizeClass = rangeSizeClasses[props.size ?? "md"];
|
|
348
|
+
return /* @__PURE__ */ jsx("input", {
|
|
349
|
+
type: "range",
|
|
350
|
+
class: `range ${sizeClass} ${props.color ? rangeColorClasses[props.color] : ""} ${props.class ?? ""}`,
|
|
351
|
+
min: props.min ?? 0,
|
|
352
|
+
max: props.max ?? 100,
|
|
353
|
+
step: props.step ?? 1,
|
|
354
|
+
value: String(props.model?.value ?? 0),
|
|
355
|
+
disabled: props.disabled,
|
|
356
|
+
onInput: handleInput
|
|
357
|
+
});
|
|
358
|
+
};
|
|
359
|
+
});
|
|
360
|
+
export { FormField as a, Input as c, Toggle as i, Radio as n, Select as o, Checkbox as r, Textarea as s, Range as t };
|
|
361
|
+
|
|
362
|
+
//# sourceMappingURL=forms-CuvlRMro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms-CuvlRMro.js","names":[],"sources":["../src/forms/Input.tsx","../src/forms/Textarea.tsx","../src/forms/Select.tsx","../src/forms/FormField.tsx","../src/forms/Toggle.tsx","../src/forms/Checkbox.tsx","../src/forms/Radio.tsx","../src/forms/Range.tsx"],"sourcesContent":["import { component, DefineProp, DefineEvent, DefineModel } from \"sigx\";\r\n\r\n// ============================================\r\n// Input Component\r\n// ============================================\r\n\r\nexport type InputSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\r\nexport type InputVariant = \"bordered\" | \"ghost\";\r\nexport type InputColor = \"primary\" | \"secondary\" | \"accent\" | \"info\" | \"success\" | \"warning\" | \"error\";\r\n\r\n// Support both model binding and manual value+onInput\r\n// Using string | number to support both text inputs and number inputs\r\nexport type InputProps =\r\n & DefineModel<string | number>\r\n & DefineProp<\"placeholder\", string, false>\r\n & DefineProp<\"type\", \"text\" | \"password\" | \"email\" | \"number\" | \"search\" | \"url\", false>\r\n & DefineProp<\"size\", InputSize, false>\r\n & DefineProp<\"variant\", InputVariant, false>\r\n & DefineProp<\"color\", InputColor, false>\r\n & DefineProp<\"disabled\", boolean, false>\r\n & DefineProp<\"readOnly\", boolean, false>\r\n & DefineProp<\"maxLength\", number, false>\r\n & DefineProp<\"class\", string, false>\r\n & DefineEvent<\"input\", InputEvent>\r\n & DefineEvent<\"change\", Event>\r\n & DefineEvent<\"focus\", FocusEvent>\r\n & DefineEvent<\"blur\", FocusEvent>;\r\n\r\nconst inputSizeClasses: Record<InputSize, string> = {\r\n xs: \"input-xs\",\r\n sm: \"input-sm\",\r\n md: \"\",\r\n lg: \"input-lg\"\r\n};\r\n\r\nconst inputColorClasses: Record<InputColor, string> = {\r\n primary: \"input-primary\",\r\n secondary: \"input-secondary\",\r\n accent: \"input-accent\",\r\n info: \"input-info\",\r\n success: \"input-success\",\r\n warning: \"input-warning\",\r\n error: \"input-error\"\r\n};\r\n\r\n/**\r\n * Input component with DaisyUI styling.\r\n * \r\n * Uses the new model binding architecture for efficient two-way binding.\r\n * The model tuple is forwarded directly to the native input element.\r\n * \r\n * @example\r\n * ```tsx\r\n * const form = signal({ name: \"\" });\r\n * <Input model={() => form.name} placeholder=\"Enter your name\" variant=\"bordered\" />\r\n * ```\r\n */\r\nexport const Input = component<InputProps>(({ props, emit }) => {\r\n function getClasses() {\r\n const classes = [\"input\", \"w-full\"];\r\n\r\n if (props.size) {\r\n const sizeClass = inputSizeClasses[props.size];\r\n if (sizeClass) classes.push(sizeClass);\r\n }\r\n\r\n if (props.variant === \"bordered\") classes.push(\"input-bordered\");\r\n if (props.variant === \"ghost\") classes.push(\"input-ghost\");\r\n\r\n if (props.color) classes.push(inputColorClasses[props.color]);\r\n if (props.class) classes.push(props.class);\r\n\r\n return classes.join(\" \");\r\n }\r\n\r\n return () => {\r\n return (\r\n <input\r\n type={props.type ?? \"text\"}\r\n class={getClasses()}\r\n value={props.model?.value != null ? String(props.model.value) : \"\"}\r\n placeholder={props.placeholder}\r\n disabled={props.disabled}\r\n readOnly={props.readOnly}\r\n maxLength={props.maxLength}\r\n onInput={(e) => {\r\n const value = (e.target as HTMLInputElement).value;\r\n if (props.model) {\r\n props.model.value = value;\r\n }\r\n emit(\"input\", e);\r\n }}\r\n onChange={(e) => emit(\"change\", e)}\r\n onFocus={(e) => emit(\"focus\", e)}\r\n onBlur={(e) => emit(\"blur\", e)}\r\n />\r\n );\r\n };\r\n});\r\n","import { component, DefineProp, DefineEvent, DefineModel } from \"sigx\";\r\nimport type { InputSize, InputVariant, InputColor } from \"./Input\";\r\n\r\n// ============================================\r\n// Textarea Component\r\n// ============================================\r\n\r\nexport type TextareaProps = \r\n & DefineModel<string> // modelValue + onUpdate:modelValue for model binding\r\n & DefineProp<\"placeholder\", string, false>\r\n & DefineProp<\"rows\", number, false>\r\n & DefineProp<\"size\", InputSize, false>\r\n & DefineProp<\"variant\", InputVariant, false>\r\n & DefineProp<\"color\", InputColor, false>\r\n & DefineProp<\"disabled\", boolean, false>\r\n & DefineProp<\"class\", string, false>\r\n & DefineEvent<\"input\", string>\r\n & DefineEvent<\"change\", string>;\r\n\r\n/**\r\n * Textarea component with DaisyUI styling.\r\n * \r\n * Uses the new model binding architecture for efficient two-way binding.\r\n * The model tuple is forwarded directly to the native textarea element.\r\n * \r\n * @example\r\n * ```tsx\r\n * const form = signal({ bio: \"\" });\r\n * <Textarea model={() => form.bio} placeholder=\"Tell us about yourself\" rows={5} />\r\n * ```\r\n */\r\nexport const Textarea = component<TextareaProps>(({ props, emit }) => {\r\n function getClasses() {\r\n const classes = [\"textarea\", \"w-full\"];\r\n \r\n if (props.size === \"xs\") classes.push(\"textarea-xs\");\r\n if (props.size === \"sm\") classes.push(\"textarea-sm\");\r\n if (props.size === \"lg\") classes.push(\"textarea-lg\");\r\n \r\n if (props.variant === \"bordered\") classes.push(\"textarea-bordered\");\r\n if (props.variant === \"ghost\") classes.push(\"textarea-ghost\");\r\n \r\n if (props.color) classes.push(`textarea-${props.color}`);\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(\" \");\r\n }\r\n\r\n return () => {\r\n // Only include model prop if a model binding exists\r\n // Native elements expect [obj, key] tuple, so we extract just the first two elements\r\n const modelProps = props.model \r\n ? { model: [props.model.binding[0], props.model.binding[1]] as [object, string] } \r\n : {};\r\n \r\n return (\r\n <textarea\r\n class={getClasses()}\r\n rows={props.rows ?? 3}\r\n placeholder={props.placeholder}\r\n disabled={props.disabled}\r\n {...modelProps}\r\n onInput={(e) => emit(\"input\", (e.target as HTMLTextAreaElement).value)}\r\n onChange={(e) => emit(\"change\", (e.target as HTMLTextAreaElement).value)}\r\n />\r\n );\r\n };\r\n});\r\n","import { component, DefineProp, DefineSlot, DefineEvent, DefineModel } from \"sigx\";\r\nimport type { InputSize, InputVariant, InputColor } from \"./Input\";\r\n\r\n// ============================================\r\n// Select Component\r\n// ============================================\r\n\r\nexport interface SelectOption {\r\n value: string;\r\n label: string;\r\n disabled?: boolean;\r\n}\r\n\r\nexport type SelectProps = \r\n & DefineModel<string> // modelValue + onUpdate:modelValue for model binding\r\n & DefineProp<\"options\", SelectOption[], false>\r\n & DefineProp<\"placeholder\", string, false>\r\n & DefineProp<\"size\", InputSize, false>\r\n & DefineProp<\"variant\", InputVariant, false>\r\n & DefineProp<\"color\", InputColor, false>\r\n & DefineProp<\"disabled\", boolean, false>\r\n & DefineProp<\"class\", string, false>\r\n & DefineSlot<\"default\"> // Allow custom options via slot\r\n & DefineEvent<\"change\", string>;\r\n\r\nconst selectSizeClasses: Record<InputSize, string> = {\r\n xs: \"select-xs\",\r\n sm: \"select-sm\",\r\n md: \"\",\r\n lg: \"select-lg\"\r\n};\r\n\r\nconst selectColorClasses: Record<InputColor, string> = {\r\n primary: \"select-primary\",\r\n secondary: \"select-secondary\",\r\n accent: \"select-accent\",\r\n info: \"select-info\",\r\n success: \"select-success\",\r\n warning: \"select-warning\",\r\n error: \"select-error\"\r\n};\r\n\r\n/**\r\n * Select component with DaisyUI styling and model binding support.\r\n * \r\n * Uses the new model binding architecture for efficient two-way binding.\r\n * The model tuple is forwarded directly to the native select element.\r\n * \r\n * @example\r\n * ```tsx\r\n * const form = signal({ choice: \"\" });\r\n * const options = [\r\n * { value: \"a\", label: \"Option A\" },\r\n * { value: \"b\", label: \"Option B\" }\r\n * ];\r\n * <Select model={() => form.choice} options={options} placeholder=\"Select an option\" />\r\n * ```\r\n */\r\nexport const Select = component<SelectProps>(({ props, slots, emit }) => {\r\n function getClasses() {\r\n const classes = [\"select\", \"w-full\"];\r\n \r\n if (props.size) {\r\n const sizeClass = selectSizeClasses[props.size];\r\n if (sizeClass) classes.push(sizeClass);\r\n }\r\n \r\n if (props.variant === \"bordered\") classes.push(\"select-bordered\");\r\n if (props.variant === \"ghost\") classes.push(\"select-ghost\");\r\n \r\n if (props.color) classes.push(selectColorClasses[props.color]);\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(\" \");\r\n }\r\n\r\n return () => {\r\n // Only include model prop if a model binding exists\r\n // Native elements expect [obj, key] tuple, so we extract just the first two elements\r\n const modelProps = props.model \r\n ? { model: [props.model.binding[0], props.model.binding[1]] as [object, string] } \r\n : {};\r\n \r\n return (\r\n <select\r\n class={getClasses()}\r\n disabled={props.disabled}\r\n {...modelProps}\r\n onChange={(e) => emit(\"change\", (e.target as HTMLSelectElement).value)}\r\n >\r\n {props.placeholder && (\r\n <option value=\"\" disabled>\r\n {props.placeholder}\r\n </option>\r\n )}\r\n {props.options?.map(opt => (\r\n <option \r\n value={opt.value} \r\n disabled={opt.disabled}\r\n >\r\n {opt.label}\r\n </option>\r\n ))}\r\n {slots.default?.()}\r\n </select>\r\n );\r\n };\r\n});\r\n","import { component, DefineProp, DefineSlot } from \"sigx\";\r\n\r\n// ============================================\r\n// FormField Component (Label + Input wrapper)\r\n// ============================================\r\n\r\nexport type FormFieldProps = \r\n & DefineProp<\"label\", string, false>\r\n & DefineProp<\"error\", string, false>\r\n & DefineProp<\"hint\", string, false>\r\n & DefineProp<\"required\", boolean, false>\r\n & DefineProp<\"class\", string, false>\r\n & DefineSlot<\"default\">;\r\n\r\n/**\r\n * FormField wrapper component that provides label, error, and hint support.\r\n * \r\n * @example\r\n * ```tsx\r\n * <FormField label=\"Email\" error={emailError} required>\r\n * <Input sync={email} type=\"email\" />\r\n * </FormField>\r\n * ```\r\n */\r\nexport const FormField = component<FormFieldProps>(({ props, slots }) => {\r\n return () => (\r\n <div class={`form-control w-full ${props.class ?? \"\"}`}>\r\n {props.label && (\r\n <label class=\"label\">\r\n <span class=\"label-text\">\r\n {props.label}\r\n {props.required && <span class=\"text-error ml-1\">*</span>}\r\n </span>\r\n </label>\r\n )}\r\n {slots.default?.()}\r\n {(props.error || props.hint) && (\r\n <label class=\"label\">\r\n {props.error ? (\r\n <span class=\"label-text-alt text-error\">{props.error}</span>\r\n ) : (\r\n <span class=\"label-text-alt\">{props.hint}</span>\r\n )}\r\n </label>\r\n )}\r\n </div>\r\n );\r\n});\r\n","import { component, DefineProp, DefineEvent, DefineModel } from \"sigx\";\r\n\r\n// ============================================\r\n// Toggle Component\r\n// ============================================\r\n\r\nexport type ToggleSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\r\nexport type ToggleColor = \"primary\" | \"secondary\" | \"accent\" | \"info\" | \"success\" | \"warning\" | \"error\";\r\n\r\nexport type ToggleProps =\r\n & DefineModel<boolean>\r\n & DefineProp<\"size\", ToggleSize, false>\r\n & DefineProp<\"color\", ToggleColor, false>\r\n & DefineProp<\"disabled\", boolean, false>\r\n & DefineProp<\"class\", string, false>\r\n & DefineProp<\"label\", string, false>\r\n & DefineEvent<\"change\", boolean>;\r\n\r\nconst toggleSizeClasses: Record<ToggleSize, string> = {\r\n xs: \"toggle-xs\",\r\n sm: \"toggle-sm\",\r\n md: \"\",\r\n lg: \"toggle-lg\"\r\n};\r\n\r\nconst toggleColorClasses: Record<ToggleColor, string> = {\r\n primary: \"toggle-primary\",\r\n secondary: \"toggle-secondary\",\r\n accent: \"toggle-accent\",\r\n info: \"toggle-info\",\r\n success: \"toggle-success\",\r\n warning: \"toggle-warning\",\r\n error: \"toggle-error\"\r\n};\r\n\r\n/**\r\n * Toggle/switch component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * const enabled = signal(false);\r\n * <Toggle model={enabled} label=\"Enable notifications\" color=\"primary\" />\r\n * ```\r\n */\r\nexport const Toggle = component<ToggleProps>(({ props, emit }) => {\r\n function handleChange(e: Event) {\r\n const checked = (e.target as HTMLInputElement).checked;\r\n if (props.model) props.model.value = checked;\r\n emit(\"change\", checked);\r\n }\r\n\r\n return () => {\r\n const sizeClass = toggleSizeClasses[props.size ?? \"md\"];\r\n const colorClass = props.color ? toggleColorClasses[props.color] : \"\";\r\n\r\n return (\r\n <label class={`flex items-center gap-2 cursor-pointer ${props.class ?? \"\"}`}>\r\n <input\r\n type=\"checkbox\"\r\n class={`toggle ${sizeClass} ${colorClass}`}\r\n checked={props.model?.value ?? false}\r\n disabled={props.disabled}\r\n onChange={handleChange}\r\n />\r\n {props.label && <span class=\"label-text\">{props.label}</span>}\r\n </label>\r\n );\r\n };\r\n});\r\n","import { component, DefineProp, DefineEvent, DefineModel } from \"sigx\";\r\n\r\n// ============================================\r\n// Checkbox Component\r\n// ============================================\r\n\r\nexport type CheckboxSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\r\nexport type CheckboxColor = \"primary\" | \"secondary\" | \"accent\" | \"info\" | \"success\" | \"warning\" | \"error\";\r\n\r\nexport type CheckboxProps =\r\n & DefineModel<boolean>\r\n & DefineProp<\"size\", CheckboxSize, false>\r\n & DefineProp<\"color\", CheckboxColor, false>\r\n & DefineProp<\"disabled\", boolean, false>\r\n & DefineProp<\"class\", string, false>\r\n & DefineProp<\"label\", string, false>\r\n & DefineEvent<\"change\", boolean>;\r\n\r\nconst checkboxSizeClasses: Record<CheckboxSize, string> = {\r\n xs: \"checkbox-xs\",\r\n sm: \"checkbox-sm\",\r\n md: \"\",\r\n lg: \"checkbox-lg\"\r\n};\r\n\r\nconst checkboxColorClasses: Record<CheckboxColor, string> = {\r\n primary: \"checkbox-primary\",\r\n secondary: \"checkbox-secondary\",\r\n accent: \"checkbox-accent\",\r\n info: \"checkbox-info\",\r\n success: \"checkbox-success\",\r\n warning: \"checkbox-warning\",\r\n error: \"checkbox-error\"\r\n};\r\n\r\n/**\r\n * Checkbox component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * const agreed = signal(false);\r\n * <Checkbox model={agreed} label=\"I agree to the terms\" color=\"primary\" />\r\n * ```\r\n */\r\nexport const Checkbox = component<CheckboxProps>(({ props, emit }) => {\r\n function handleChange(e: Event) {\r\n const checked = (e.target as HTMLInputElement).checked;\r\n if (props.model) props.model.value = checked;\r\n emit(\"change\", checked);\r\n }\r\n\r\n return () => {\r\n const sizeClass = checkboxSizeClasses[props.size ?? \"md\"];\r\n const colorClass = props.color ? checkboxColorClasses[props.color] : \"\";\r\n\r\n return (\r\n <label class={`flex items-center gap-2 cursor-pointer ${props.class ?? \"\"}`}>\r\n <input\r\n type=\"checkbox\"\r\n class={`checkbox ${sizeClass} ${colorClass}`}\r\n checked={props.model?.value ?? false}\r\n disabled={props.disabled}\r\n onChange={handleChange}\r\n />\r\n {props.label && <span class=\"label-text\">{props.label}</span>}\r\n </label>\r\n );\r\n };\r\n});\r\n","import { component, compound, DefineProp, DefineSlot, DefineEvent, DefineModel, defineProvide, defineInjectable } from \"sigx\";\r\n\r\n// ============================================\r\n// Radio Component Types\r\n// ============================================\r\n\r\nexport type RadioSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\r\nexport type RadioColor = \"primary\" | \"secondary\" | \"accent\" | \"info\" | \"success\" | \"warning\" | \"error\";\r\n\r\nconst radioSizeClasses: Record<RadioSize, string> = {\r\n xs: \"radio-xs\",\r\n sm: \"radio-sm\",\r\n md: \"\",\r\n lg: \"radio-lg\"\r\n};\r\n\r\nconst radioColorClasses: Record<RadioColor, string> = {\r\n primary: \"radio-primary\",\r\n secondary: \"radio-secondary\",\r\n accent: \"radio-accent\",\r\n info: \"radio-info\",\r\n success: \"radio-success\",\r\n warning: \"radio-warning\",\r\n error: \"radio-error\"\r\n};\r\n\r\n// ============================================\r\n// RadioGroup Context\r\n// ============================================\r\n\r\ninterface RadioGroupContext {\r\n name: string;\r\n value: () => string | undefined;\r\n size?: RadioSize;\r\n color?: RadioColor;\r\n disabled?: boolean;\r\n onChange: (value: string) => void;\r\n}\r\n\r\nconst useRadioGroup = defineInjectable<RadioGroupContext | null>(() => null);\r\n\r\n// ============================================\r\n// RadioGroup Component\r\n// ============================================\r\n\r\nexport type RadioGroupProps =\r\n & DefineModel<string>\r\n & DefineProp<\"name\", string> // Required\r\n & DefineProp<\"size\", RadioSize, false>\r\n & DefineProp<\"color\", RadioColor, false>\r\n & DefineProp<\"disabled\", boolean, false>\r\n & DefineProp<\"class\", string, false>\r\n & DefineProp<\"direction\", \"horizontal\" | \"vertical\", false>\r\n & DefineSlot<\"default\">\r\n & DefineEvent<\"change\", string>;\r\n\r\n/**\r\n * RadioGroup component that manages a group of Radio buttons.\r\n * Provides context to child Radio.Item components.\r\n * \r\n * @example\r\n * ```tsx\r\n * const color = signal(\"red\");\r\n * <Radio model={color} name=\"color\">\r\n * <Radio.Item value=\"red\" label=\"Red\" />\r\n * <Radio.Item value=\"blue\" label=\"Blue\" />\r\n * <Radio.Item value=\"green\" label=\"Green\" />\r\n * </Radio>\r\n * ```\r\n */\r\nconst _RadioGroup = component<RadioGroupProps>(({ props, slots, emit }) => {\r\n // Provide context to child Radio.Item components\r\n defineProvide(useRadioGroup, () => ({\r\n name: props.name!, // name is required\r\n value: () => props.model?.value,\r\n size: props.size,\r\n color: props.color,\r\n disabled: props.disabled,\r\n onChange: (value: string) => {\r\n if (props.model) props.model.value = value;\r\n emit(\"change\", value);\r\n }\r\n }));\r\n\r\n return () => {\r\n const directionClass = props.direction === \"horizontal\" \r\n ? \"flex flex-row gap-4\" \r\n : \"flex flex-col gap-2\";\r\n\r\n return (\r\n <div class={`${directionClass} ${props.class ?? \"\"}`}>\r\n {slots.default?.()}\r\n </div>\r\n );\r\n };\r\n});\r\n\r\n// ============================================\r\n// RadioItem Component\r\n// ============================================\r\n\r\nexport type RadioItemProps =\r\n & DefineProp<\"value\", string> // Required\r\n & DefineProp<\"label\", string, false>\r\n & DefineProp<\"disabled\", boolean, false>\r\n & DefineProp<\"class\", string, false>;\r\n\r\n/**\r\n * Individual radio button item. Must be used within a Radio (RadioGroup) component.\r\n */\r\nconst RadioItem = component<RadioItemProps>(({ props }) => {\r\n const context = useRadioGroup();\r\n\r\n function handleChange() {\r\n if (context && !props.disabled && !context.disabled) {\r\n context.onChange(props.value!); // value is required\r\n }\r\n }\r\n\r\n return () => {\r\n if (!context) {\r\n console.warn(\"Radio.Item must be used within a Radio component\");\r\n return null;\r\n }\r\n\r\n const sizeClass = radioSizeClasses[context.size ?? \"md\"];\r\n const colorClass = context.color ? radioColorClasses[context.color] : \"\";\r\n const isDisabled = props.disabled || context.disabled;\r\n const isChecked = context.value() === props.value;\r\n\r\n return (\r\n <label class={`flex items-center gap-2 cursor-pointer ${props.class ?? \"\"}`}>\r\n <input\r\n type=\"radio\"\r\n name={context.name}\r\n value={props.value}\r\n class={`radio ${sizeClass} ${colorClass}`}\r\n checked={isChecked}\r\n disabled={isDisabled}\r\n onChange={handleChange}\r\n />\r\n {props.label && <span class=\"label-text\">{props.label}</span>}\r\n </label>\r\n );\r\n };\r\n});\r\n\r\n// ============================================\r\n// Standalone Radio Component (without group)\r\n// ============================================\r\n\r\nexport type StandaloneRadioProps =\r\n & DefineProp<\"checked\", boolean, false>\r\n & DefineProp<\"name\", string>\r\n & DefineProp<\"value\", string>\r\n & DefineProp<\"size\", RadioSize, false>\r\n & DefineProp<\"color\", RadioColor, false>\r\n & DefineProp<\"disabled\", boolean, false>\r\n & DefineProp<\"class\", string, false>\r\n & DefineProp<\"label\", string, false>\r\n & DefineEvent<\"change\", string>;\r\n\r\n/**\r\n * Standalone Radio button component (for use without RadioGroup).\r\n */\r\nconst StandaloneRadio = component<StandaloneRadioProps>(({ props, emit }) => {\r\n function handleChange(e: Event) {\r\n const value = (e.target as HTMLInputElement).value;\r\n emit(\"change\", value);\r\n }\r\n\r\n return () => {\r\n const sizeClass = radioSizeClasses[props.size ?? \"md\"];\r\n const colorClass = props.color ? radioColorClasses[props.color] : \"\";\r\n\r\n return (\r\n <label class={`flex items-center gap-2 cursor-pointer ${props.class ?? \"\"}`}>\r\n <input\r\n type=\"radio\"\r\n name={props.name}\r\n value={props.value}\r\n class={`radio ${sizeClass} ${colorClass}`}\r\n checked={props.checked ?? false}\r\n disabled={props.disabled}\r\n onChange={handleChange}\r\n />\r\n {props.label && <span class=\"label-text\">{props.label}</span>}\r\n </label>\r\n );\r\n };\r\n});\r\n\r\n// ============================================\r\n// Compound Export\r\n// ============================================\r\n\r\n/**\r\n * Radio compound component with Item sub-component for grouped radio buttons.\r\n * \r\n * @example Using compound pattern (recommended):\r\n * ```tsx\r\n * const color = signal(\"red\");\r\n * <Radio model={color} name=\"color\">\r\n * <Radio.Item value=\"red\" label=\"Red\" />\r\n * <Radio.Item value=\"blue\" label=\"Blue\" />\r\n * </Radio>\r\n * ```\r\n * \r\n * @example Using standalone Radio buttons:\r\n * ```tsx\r\n * <Radio.Standalone name=\"color\" value=\"red\" label=\"Red\" checked={color === \"red\"} onChange={setColor} />\r\n * <Radio.Standalone name=\"color\" value=\"blue\" label=\"Blue\" checked={color === \"blue\"} onChange={setColor} />\r\n * ```\r\n */\r\nexport const Radio = compound(_RadioGroup, {\r\n Item: RadioItem,\r\n Standalone: StandaloneRadio,\r\n});\r\n","import { component, DefineProp, DefineEvent, DefineModel } from \"sigx\";\r\n\r\n// ============================================\r\n// Range Component\r\n// ============================================\r\n\r\nexport type RangeSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\r\nexport type RangeColor = \"primary\" | \"secondary\" | \"accent\" | \"info\" | \"success\" | \"warning\" | \"error\";\r\n\r\nexport type RangeProps =\r\n & DefineModel<number>\r\n & DefineProp<\"min\", number, false>\r\n & DefineProp<\"max\", number, false>\r\n & DefineProp<\"step\", number, false>\r\n & DefineProp<\"size\", RangeSize, false>\r\n & DefineProp<\"color\", RangeColor, false>\r\n & DefineProp<\"disabled\", boolean, false>\r\n & DefineProp<\"class\", string, false>\r\n & DefineEvent<\"change\", number>;\r\n\r\nconst rangeSizeClasses: Record<RangeSize, string> = {\r\n xs: \"range-xs\",\r\n sm: \"range-sm\",\r\n md: \"\",\r\n lg: \"range-lg\"\r\n};\r\n\r\nconst rangeColorClasses: Record<RangeColor, string> = {\r\n primary: \"range-primary\",\r\n secondary: \"range-secondary\",\r\n accent: \"range-accent\",\r\n info: \"range-info\",\r\n success: \"range-success\",\r\n warning: \"range-warning\",\r\n error: \"range-error\"\r\n};\r\n\r\n/**\r\n * Range slider component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * const volume = signal(50);\r\n * <Range model={volume} min={0} max={100} step={1} color=\"primary\" />\r\n * ```\r\n */\r\nexport const Range = component<RangeProps>(({ props, emit }) => {\r\n function handleInput(e: Event) {\r\n const value = parseFloat((e.target as HTMLInputElement).value);\r\n if (props.model) props.model.value = value;\r\n emit(\"change\", value);\r\n }\r\n\r\n return () => {\r\n const sizeClass = rangeSizeClasses[props.size ?? \"md\"];\r\n const colorClass = props.color ? rangeColorClasses[props.color] : \"\";\r\n\r\n return (\r\n <input\r\n type=\"range\"\r\n class={`range ${sizeClass} ${colorClass} ${props.class ?? \"\"}`}\r\n min={props.min ?? 0}\r\n max={props.max ?? 100}\r\n step={props.step ?? 1}\r\n value={String(props.model?.value ?? 0)}\r\n disabled={props.disabled}\r\n onInput={handleInput}\r\n />\r\n );\r\n };\r\n});\r\n"],"mappings":";;AA4BA,IAAM,mBAA8C;CAChD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACP;AAED,IAAM,oBAAgD;CAClD,SAAS;CACT,WAAW;CACX,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;CACV;AAcD,MAAa,QAAQ,WAAuB,EAAE,OAAO,WAAW;CAC5D,SAAS,aAAa;EAClB,MAAM,UAAU,CAAC,SAAS,SAAS;AAEnC,MAAI,MAAM,MAAM;GAC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ACI,qBAAC,SAAA;IAAM,OAAO,0CAA0C,MAAM,SAAS;eACnE,oBAAC,SAAA;KACG,MAAK;KACL,MAAM,MAAM;KACZ,OAAO,MAAM;KACb,OAAO,SAAS,UAAU,GAAG;KAC7B,SAAS,MAAM,WAAW;KAC1B,UAAU,MAAM;KAChB,UAAU;MACZ,EACD,MAAM,SAAS,oBAAC,QAAA;KAAK,OAAM;eAAc,MAAM;MAAa,CAAA;KACzD;;GAGlB;CA2BD,CAAC;ACrMF,IAAM,mBAA8C;CAChD,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACP;AAED,IAAM,oBAAgD;CAClD,SAAS;CACT,WAAW;CACX,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;CACV;AAWD,MAAa,QAAQ,WAAuB,EAAE,OAAO,WAAW;CAC5D,SAAS,YAAY,GAAU;EAC3B,MAAM,QAAQ,WAAY,EAAE,OAA4B,MAAM;AAC9D,MAAI,MAAM,MAAO,OAAM,MAAM,QAAQ;AACrC,OAAK,UAAU,MAAM;;AAGzB,cAAa;EACT,MAAM,YAAY,iBAAiB,MAAM,QAAQ;AAGjD,SACI,oBAAC,SAAA;GACG,MAAK;GACL,OAAO,SAAS,UAAU,GALf,MAAM,QAAQ,kBAAkB,MAAM,SAAS,GAKlB,GAAG,MAAM,SAAS;GAC1D,KAAK,MAAM,OAAO;GAClB,KAAK,MAAM,OAAO;GAClB,MAAM,MAAM,QAAQ;GACpB,OAAO,OAAO,MAAM,OAAO,SAAS,EAAE;GACtC,UAAU,MAAM;GAChB,SAAS;IACX;;EAGZ"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @sigx/daisyui - DaisyUI component library for SignalX
|
|
3
|
+
*
|
|
4
|
+
* Beautiful, accessible UI components with full theme support.
|
|
5
|
+
* Built with SignalX reactivity and DaisyUI styling.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* import { Button, Card, ThemeProvider } from '@sigx/daisyui';
|
|
10
|
+
*
|
|
11
|
+
* const App = () => (
|
|
12
|
+
* <ThemeProvider defaultTheme="cupcake" darkMode>
|
|
13
|
+
* <Card>
|
|
14
|
+
* <Card.Body>
|
|
15
|
+
* <Button variant="primary">Click me</Button>
|
|
16
|
+
* </Card.Body>
|
|
17
|
+
* </Card>
|
|
18
|
+
* </ThemeProvider>
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export { ThemeProvider, ThemeSelector, ThemeToggle, getCurrentTheme, setTheme, getPreferredTheme, initializeTheme, toggleDarkMode } from './theme';
|
|
23
|
+
export type { DaisyTheme, ThemeConfig, ThemeProviderProps, ThemeSelectorProps, ThemeToggleProps } from './theme';
|
|
24
|
+
export { Button, ButtonGroup } from './buttons';
|
|
25
|
+
export type { ButtonProps, ButtonVariant, ButtonSize, ButtonGroupProps } from './buttons';
|
|
26
|
+
export { Input, Textarea, Select, FormField, Toggle, Checkbox, Radio, Range } from './forms';
|
|
27
|
+
export type { InputProps, InputSize, InputVariant, InputColor, TextareaProps, SelectProps, SelectOption, FormFieldProps, ToggleProps, ToggleSize, ToggleColor, CheckboxProps, CheckboxSize, CheckboxColor, RadioGroupProps, RadioItemProps, RadioSize, RadioColor, StandaloneRadioProps, RangeProps, RangeSize, RangeColor } from './forms';
|
|
28
|
+
export { Container, Card, Stack, Flex, Row, Col, Divider, Hero, HeroContent, Footer, Join, JoinItem, Link, Chat, ChatImage, ChatHeader, ChatBubble, ChatFooter, Artboard, Mockup, MockupBrowser, MockupCode, MockupPhone, MockupWindow, Carousel, CarouselItem, Mask } from './layout';
|
|
29
|
+
export type { ContainerProps, ContainerSize, CardProps, CardVariant, CardBodyProps, CardTitleProps, CardActionsProps, CardImageProps, StackProps, StackDirection, FlexProps, RowProps, ColProps, FlexSpacing, FlexAlign, FlexJustify, DividerProps, HeroProps, HeroContentProps, FooterProps, JoinProps, JoinItemProps, LinkProps, LinkColor, ChatProps, ChatImageProps, ChatHeaderProps, ChatBubbleProps, ChatBubbleColor, ChatFooterProps, ArtboardProps, ArtboardSize, MockupBrowserProps, MockupCodeProps, CodeLine, MockupPhoneProps, MockupWindowProps, CarouselProps, CarouselItemProps, CarouselItemData, MaskProps, MaskShape } from './layout';
|
|
30
|
+
export { Modal, Badge, Loading, Alert, Progress, Tooltip, Accordion, FileInput, Rating, Skeleton, Steps, Timeline, Toast, Kbd, RadialProgress, Countdown, Diff, Swap, Indicator } from './feedback';
|
|
31
|
+
export type { ModalProps, ModalHeaderProps, ModalBodyProps, ModalActionsProps, BadgeProps, BadgeVariant, BadgeSize, LoadingProps, LoadingSize, LoadingType, AlertProps, AlertVariant, ProgressProps, ProgressColor, TooltipProps, TooltipPosition, TooltipColor, AccordionProps, AccordionVariant, AccordionType, AccordionItemProps, CollapseProps, FileInputProps, FileInputSize, FileInputColor, RatingProps, RatingSize, RatingMask, RatingColor, SkeletonProps, StepsProps, StepItem, StepProps, StepColor, TimelineProps, TimelineItem, TimelineColor, ToastProps, ToastPosition, KbdProps, KbdSize, RadialProgressProps, RadialProgressColor, CountdownProps, DiffProps, SwapProps, IndicatorProps, IndicatorPosition } from './feedback';
|
|
32
|
+
export { Tabs, Menu, Dropdown, Drawer, Breadcrumbs, Navbar, Pagination } from './navigation';
|
|
33
|
+
export type { TabsProps, Tab, TabsVariant, TabsSize, TabsPosition, MenuProps, MenuItemProps, MenuTitleProps, MenuSize, DropdownProps, DropdownPosition, DrawerProps, BreadcrumbsProps, BreadcrumbItem, NavbarProps, PaginationProps } from './navigation';
|
|
34
|
+
export { Table, Thead, Tbody, Tr, Th, Td, Avatar, Stat, Stats } from './data';
|
|
35
|
+
export type { TableProps, TableSize, TheadProps, TbodyProps, TrProps, ThProps, TdProps, AvatarProps, AvatarSize, AvatarShape, StatProps, StatsProps } from './data';
|
|
36
|
+
export { Text, Heading } from './typography';
|
|
37
|
+
export type { TextProps, TextSize, TextWeight, TextColor, TextAlign, TextElement, HeadingProps, HeadingLevel, } from './typography';
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EACH,aAAa,EACb,aAAa,EACb,WAAW,EACX,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,cAAc,EACjB,MAAM,SAAS,CAAC;AACjB,YAAY,EACR,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACnB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG1F,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC7F,YAAY,EACR,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAC/C,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EACxD,WAAW,EAAE,UAAU,EAAE,WAAW,EACpC,aAAa,EAAE,YAAY,EAAE,aAAa,EAC1C,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,oBAAoB,EAC5E,UAAU,EAAE,SAAS,EAAE,UAAU,EACpC,MAAM,SAAS,CAAC;AAGjB,OAAO,EACH,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAC/C,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAC/C,IAAI,EAAE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AE,SAAS,EAAE,WAAW,EAClE,YAAY,EAAE,YAAY,GAC7B,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { a as getPreferredTheme, c as toggleDarkMode, i as getCurrentTheme, n as ThemeSelector, o as initializeTheme, r as ThemeToggle, s as setTheme, t as ThemeProvider } from "./theme-D9CUMvuT.js";
|
|
2
|
+
import { n as Button, t as ButtonGroup } from "./buttons-Dtj_5Uc3.js";
|
|
3
|
+
import { a as FormField, c as Input, i as Toggle, n as Radio, o as Select, r as Checkbox, s as Textarea, t as Range } from "./forms-CuvlRMro.js";
|
|
4
|
+
import { C as Container, D as Hero, E as Join, S as Card, T as Chat, _ as Divider, a as ChatImage, b as Row, c as Mask, d as MockupBrowser, f as MockupCode, g as Footer, h as Link, i as ChatHeader, l as Artboard, m as MockupWindow, n as ChatBubble, o as HeroContent, p as MockupPhone, r as ChatFooter, s as JoinItem, t as CarouselItem, u as Mockup, v as Col, w as Carousel, x as Stack, y as Flex } from "./layout-0aaJX4B2.js";
|
|
5
|
+
import { _ as Progress, a as RadialProgress, c as Timeline, d as Rating, f as FileInput, g as Loading, h as Badge, i as Countdown, l as Steps, m as Alert, n as Swap, o as Kbd, p as Accordion, r as Diff, s as Toast, t as Indicator, u as Skeleton, v as Tooltip, y as Modal } from "./feedback-DFutN-Kz.js";
|
|
6
|
+
import { a as Dropdown, i as Drawer, n as Navbar, o as Menu, r as Breadcrumbs, s as Tabs, t as Pagination } from "./navigation-4cwyfLvr.js";
|
|
7
|
+
import { a as Tbody, c as Thead, i as Table, l as Tr, n as Stat, o as Td, r as Stats, s as Th, t as Avatar } from "./data-wxNpnX83.js";
|
|
8
|
+
import { n as Text, t as Heading } from "./typography-CU1RMGKA.js";
|
|
9
|
+
export { Accordion, Alert, Artboard, Avatar, Badge, Breadcrumbs, Button, ButtonGroup, Card, Carousel, CarouselItem, Chat, ChatBubble, ChatFooter, ChatHeader, ChatImage, Checkbox, Col, Container, Countdown, Diff, Divider, Drawer, Dropdown, FileInput, Flex, Footer, FormField, Heading, Hero, HeroContent, Indicator, Input, Join, JoinItem, Kbd, Link, Loading, Mask, Menu, Mockup, MockupBrowser, MockupCode, MockupPhone, MockupWindow, Modal, Navbar, Pagination, Progress, RadialProgress, Radio, Range, Rating, Row, Select, Skeleton, Stack, Stat, Stats, Steps, Swap, Table, Tabs, Tbody, Td, Text, Textarea, Th, Thead, ThemeProvider, ThemeSelector, ThemeToggle, Timeline, Toast, Toggle, Tooltip, Tr, getCurrentTheme, getPreferredTheme, initializeTheme, setTheme, toggleDarkMode };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { DefineProp, DefineSlot } from 'sigx';
|
|
2
|
+
export type CardVariant = 'normal' | 'compact' | 'side' | 'bordered' | 'image-full';
|
|
3
|
+
export type CardProps = DefineProp<'variant', CardVariant, false> & DefineProp<'shadow', boolean | 'sm' | 'md' | 'lg' | 'xl', false> & DefineProp<'bordered', boolean, false> & DefineProp<'glass', boolean, false> & DefineProp<'imageFull', boolean, false> & DefineProp<'bgColor', string, false> & DefineProp<'class', string, false> & DefineSlot<'default'>;
|
|
4
|
+
export type CardBodyProps = DefineProp<'center', boolean, false> & DefineProp<'class', string, false> & DefineSlot<'default'>;
|
|
5
|
+
export type CardTitleProps = DefineProp<'class', string, false> & DefineSlot<'default'>;
|
|
6
|
+
export type CardActionsProps = DefineProp<'justify', 'start' | 'center' | 'end', false> & DefineProp<'class', string, false> & DefineSlot<'default'>;
|
|
7
|
+
export type CardImageProps = DefineProp<'src', string> & DefineProp<'alt', string, false> & DefineProp<'class', string, false>;
|
|
8
|
+
/**
|
|
9
|
+
* Card compound component with Body, Title, Actions, and Image sub-components.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Card: ((props: {
|
|
12
|
+
class?: string | undefined;
|
|
13
|
+
variant?: CardVariant | undefined;
|
|
14
|
+
bordered?: boolean | undefined;
|
|
15
|
+
shadow?: boolean | "sm" | "md" | "lg" | "xl" | undefined;
|
|
16
|
+
glass?: boolean | undefined;
|
|
17
|
+
imageFull?: boolean | undefined;
|
|
18
|
+
bgColor?: string | undefined;
|
|
19
|
+
} & {} & {
|
|
20
|
+
slots?: Partial<{
|
|
21
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
22
|
+
}> | undefined;
|
|
23
|
+
} & {} & JSX.IntrinsicAttributes & import("@sigx/runtime-core").ComponentAttributeExtensions & {
|
|
24
|
+
ref?: import("@sigx/runtime-core").Ref<void> | undefined;
|
|
25
|
+
children?: any;
|
|
26
|
+
}) => import("@sigx/runtime-core").JSXElement) & {
|
|
27
|
+
__setup: import("@sigx/runtime-core").SetupFn<{
|
|
28
|
+
variant?: CardVariant | undefined;
|
|
29
|
+
shadow?: boolean | "sm" | "md" | "lg" | "xl" | undefined;
|
|
30
|
+
bordered?: boolean | undefined;
|
|
31
|
+
glass?: boolean | undefined;
|
|
32
|
+
imageFull?: boolean | undefined;
|
|
33
|
+
bgColor?: string | undefined;
|
|
34
|
+
class?: string | undefined;
|
|
35
|
+
}, CardProps, void, {
|
|
36
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
37
|
+
}>;
|
|
38
|
+
__name?: string;
|
|
39
|
+
__props: {
|
|
40
|
+
variant?: CardVariant | undefined;
|
|
41
|
+
shadow?: boolean | "sm" | "md" | "lg" | "xl" | undefined;
|
|
42
|
+
bordered?: boolean | undefined;
|
|
43
|
+
glass?: boolean | undefined;
|
|
44
|
+
imageFull?: boolean | undefined;
|
|
45
|
+
bgColor?: string | undefined;
|
|
46
|
+
class?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
__events: CardProps;
|
|
49
|
+
__ref: void;
|
|
50
|
+
__slots: {
|
|
51
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
52
|
+
};
|
|
53
|
+
} & {
|
|
54
|
+
Body: import("@sigx/runtime-core").ComponentFactory<CardBodyProps, void, {
|
|
55
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
56
|
+
}>;
|
|
57
|
+
Title: import("@sigx/runtime-core").ComponentFactory<CardTitleProps, void, {
|
|
58
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
59
|
+
}>;
|
|
60
|
+
Actions: import("@sigx/runtime-core").ComponentFactory<CardActionsProps, void, {
|
|
61
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
62
|
+
}>;
|
|
63
|
+
Image: import("@sigx/runtime-core").ComponentFactory<CardImageProps, void, {}>;
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/layout/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,UAAU,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEnE,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,CAAC;AAEpF,MAAM,MAAM,SAAS,GACf,UAAU,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,GACzC,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,KAAK,CAAC,GAChE,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,GACnC,UAAU,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,GACvC,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,SAAS,CAAC,CAAC;AAwD5B,MAAM,MAAM,aAAa,GACnB,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,SAAS,CAAC,CAAC;AA0B5B,MAAM,MAAM,cAAc,GACpB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,SAAS,CAAC,CAAC;AAoB5B,MAAM,MAAM,gBAAgB,GACtB,UAAU,CAAC,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,EAAE,KAAK,CAAC,GACxD,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,SAAS,CAAC,CAAC;AA0B5B,MAAM,MAAM,cAAc,GACpB,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GACzB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAChC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAazC;;GAEG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKf,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DefineProp, DefineSlot, DefineEvent } from 'sigx';
|
|
2
|
+
export interface CarouselItemData {
|
|
3
|
+
id: string;
|
|
4
|
+
content: () => any;
|
|
5
|
+
}
|
|
6
|
+
export type CarouselProps = DefineProp<'items', CarouselItemData[], false> & DefineProp<'center', boolean, false> & DefineProp<'vertical', boolean, false> & DefineProp<'fullWidth', boolean, false> & DefineProp<'snap', 'start' | 'center' | 'end', false> & DefineProp<'class', string, false> & DefineSlot<'default'>;
|
|
7
|
+
export type CarouselItemProps = DefineProp<'id', string, false> & DefineProp<'fullWidth', boolean, false> & DefineProp<'class', string, false> & DefineSlot<'default'> & DefineEvent<'click', MouseEvent>;
|
|
8
|
+
/**
|
|
9
|
+
* Carousel compound component with Item sub-component.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Carousel: ((props: {
|
|
12
|
+
class?: string | undefined;
|
|
13
|
+
vertical?: boolean | undefined;
|
|
14
|
+
items?: CarouselItemData[] | undefined;
|
|
15
|
+
center?: boolean | undefined;
|
|
16
|
+
fullWidth?: boolean | undefined;
|
|
17
|
+
snap?: "start" | "end" | "center" | undefined;
|
|
18
|
+
} & {} & {
|
|
19
|
+
slots?: Partial<{
|
|
20
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
21
|
+
}> | undefined;
|
|
22
|
+
} & {} & JSX.IntrinsicAttributes & import("@sigx/runtime-core").ComponentAttributeExtensions & {
|
|
23
|
+
ref?: import("@sigx/runtime-core").Ref<void> | undefined;
|
|
24
|
+
children?: any;
|
|
25
|
+
}) => import("@sigx/runtime-core").JSXElement) & {
|
|
26
|
+
__setup: import("@sigx/runtime-core").SetupFn<{
|
|
27
|
+
items?: CarouselItemData[] | undefined;
|
|
28
|
+
center?: boolean | undefined;
|
|
29
|
+
vertical?: boolean | undefined;
|
|
30
|
+
fullWidth?: boolean | undefined;
|
|
31
|
+
snap?: "start" | "end" | "center" | undefined;
|
|
32
|
+
class?: string | undefined;
|
|
33
|
+
}, CarouselProps, void, {
|
|
34
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
35
|
+
}>;
|
|
36
|
+
__name?: string;
|
|
37
|
+
__props: {
|
|
38
|
+
items?: CarouselItemData[] | undefined;
|
|
39
|
+
center?: boolean | undefined;
|
|
40
|
+
vertical?: boolean | undefined;
|
|
41
|
+
fullWidth?: boolean | undefined;
|
|
42
|
+
snap?: "start" | "end" | "center" | undefined;
|
|
43
|
+
class?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
__events: CarouselProps;
|
|
46
|
+
__ref: void;
|
|
47
|
+
__slots: {
|
|
48
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
49
|
+
};
|
|
50
|
+
} & {
|
|
51
|
+
Item: import("@sigx/runtime-core").ComponentFactory<CarouselItemProps, void, {
|
|
52
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
export type { CarouselItemProps as CarouselItemCompProps };
|
|
56
|
+
//# sourceMappingURL=Carousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/layout/Carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAMhF,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GACnB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,KAAK,CAAC,GAC9C,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,GACvC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,EAAE,KAAK,CAAC,GACrD,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,SAAS,CAAC,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GACvB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,GAC/B,UAAU,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,GACvC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,SAAS,CAAC,GACrB,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAuFvC;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEnB,CAAC;AAEH,YAAY,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,CAAC"}
|