@blockle/blocks 0.16.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/momotaro.chunk.d.ts
CHANGED
|
@@ -663,12 +663,12 @@ declare const Button: react.ForwardRefExoticComponent<{
|
|
|
663
663
|
|
|
664
664
|
type CheckboxProps = {
|
|
665
665
|
name: string;
|
|
666
|
-
|
|
666
|
+
children?: react__default.ReactNode;
|
|
667
667
|
required?: boolean;
|
|
668
668
|
} & HTMLElementProps<HTMLInputElement>;
|
|
669
669
|
declare const Checkbox: react__default.ForwardRefExoticComponent<{
|
|
670
670
|
name: string;
|
|
671
|
-
|
|
671
|
+
children?: react__default.ReactNode;
|
|
672
672
|
required?: boolean;
|
|
673
673
|
} & HTMLElementProps<HTMLInputElement> & react__default.RefAttributes<HTMLInputElement>>;
|
|
674
674
|
|
|
@@ -27,7 +27,7 @@ const Label = ({
|
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
};
|
|
30
|
-
const Checkbox = react.forwardRef(function Checkbox2({ name,
|
|
30
|
+
const Checkbox = react.forwardRef(function Checkbox2({ name, children, required, className, ...restProps }, ref) {
|
|
31
31
|
const containerClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("checkbox", { base: true }, false);
|
|
32
32
|
const iconClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("checkbox", { icon: true }, false);
|
|
33
33
|
const labelClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles("checkbox", { label: true }, false);
|
|
@@ -35,12 +35,12 @@ const Checkbox = react.forwardRef(function Checkbox2({ name, label, required, cl
|
|
|
35
35
|
/* @__PURE__ */ jsxRuntime.jsx("input", { ref, type: "checkbox", name, className: styles_components_form_Checkbox_checkbox_css_cjs.input, ...restProps }),
|
|
36
36
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_components_display_Divider_Divider_cjs.classnames(styles_components_form_Checkbox_checkbox_css_cjs.icon, iconClassName), role: "presentation", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, {}) })
|
|
37
37
|
] });
|
|
38
|
-
if (!
|
|
38
|
+
if (!children) {
|
|
39
39
|
return input;
|
|
40
40
|
}
|
|
41
41
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: labelClassName, children: [
|
|
42
42
|
input,
|
|
43
|
-
|
|
43
|
+
children && /* @__PURE__ */ jsxRuntime.jsx(Label, { asSpan: true, required, children })
|
|
44
44
|
] });
|
|
45
45
|
});
|
|
46
46
|
const DefaultIcon = () => {
|
|
@@ -26,7 +26,7 @@ const Label = ({
|
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
};
|
|
29
|
-
const Checkbox = forwardRef(function Checkbox2({ name,
|
|
29
|
+
const Checkbox = forwardRef(function Checkbox2({ name, children, required, className, ...restProps }, ref) {
|
|
30
30
|
const containerClassName = useComponentStyles("checkbox", { base: true }, false);
|
|
31
31
|
const iconClassName = useComponentStyles("checkbox", { icon: true }, false);
|
|
32
32
|
const labelClassName = useComponentStyles("checkbox", { label: true }, false);
|
|
@@ -34,12 +34,12 @@ const Checkbox = forwardRef(function Checkbox2({ name, label, required, classNam
|
|
|
34
34
|
/* @__PURE__ */ jsx("input", { ref, type: "checkbox", name, className: input, ...restProps }),
|
|
35
35
|
/* @__PURE__ */ jsx("div", { className: classnames(icon, iconClassName), role: "presentation", "aria-hidden": true, children: /* @__PURE__ */ jsx(DefaultIcon, {}) })
|
|
36
36
|
] });
|
|
37
|
-
if (!
|
|
37
|
+
if (!children) {
|
|
38
38
|
return input$1;
|
|
39
39
|
}
|
|
40
40
|
return /* @__PURE__ */ jsxs("label", { className: labelClassName, children: [
|
|
41
41
|
input$1,
|
|
42
|
-
|
|
42
|
+
children && /* @__PURE__ */ jsx(Label, { asSpan: true, required, children })
|
|
43
43
|
] });
|
|
44
44
|
});
|
|
45
45
|
const DefaultIcon = () => {
|