math-main-components 0.0.211 → 0.0.213
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.
@@ -1,9 +1,9 @@
|
|
1
|
-
import React, { ChangeEvent, ReactNode } from 'react';
|
2
|
-
export declare function Checkbox({ id, name, checked, defaultChecked, onInput, children }: {
|
1
|
+
import React, { ChangeEvent, HTMLAttributes, ReactNode } from 'react';
|
2
|
+
export declare function Checkbox({ id, name, checked, defaultChecked, onInput, children, ...props }: {
|
3
3
|
id?: string;
|
4
4
|
name: string;
|
5
5
|
checked?: boolean;
|
6
6
|
onInput?: (event: ChangeEvent<HTMLInputElement>) => void;
|
7
7
|
defaultChecked?: boolean;
|
8
8
|
children: ReactNode;
|
9
|
-
}): React.JSX.Element;
|
9
|
+
} & HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
@@ -7,7 +7,7 @@ declare const meta: {
|
|
7
7
|
options: Dropdown<Type>[];
|
8
8
|
onInput?: ((value: Type) => void) | undefined;
|
9
9
|
unit?: string | undefined;
|
10
|
-
} & import("react").
|
10
|
+
} & import("react").HTMLAttributes<HTMLSelectElement>) => import("react").JSX.Element;
|
11
11
|
parameters: {
|
12
12
|
layout: string;
|
13
13
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
2
2
|
export type Dropdown<Type> = {
|
3
3
|
value: Type;
|
4
4
|
label: string;
|
@@ -7,4 +7,4 @@ export declare const Dropdown: <Type extends string>({ options, unit, onInput, .
|
|
7
7
|
options: Dropdown<Type>[];
|
8
8
|
onInput?: ((value: Type) => void) | undefined;
|
9
9
|
unit?: string | undefined;
|
10
|
-
} & React.
|
10
|
+
} & React.HTMLAttributes<HTMLSelectElement>) => React.JSX.Element;
|
package/dist/index.cjs.js
CHANGED
@@ -9471,12 +9471,12 @@ function CardButton({ id, children, iconName, onClick, ...props }) {
|
|
9471
9471
|
React__default["default"].createElement("h2", null, children)));
|
9472
9472
|
}
|
9473
9473
|
|
9474
|
-
var css_248z$u = ".styles-module_container__gCCnD {\n margin-bottom: 20px;\n
|
9474
|
+
var css_248z$u = ".styles-module_container__gCCnD {\n margin-bottom: 20px;\n color: var(--foreground-3);\n}\n.styles-module_container__gCCnD [type=checkbox] {\n position: relative;\n left: 15px;\n top: -4px;\n z-index: 0;\n appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n margin-left: -3.5px;\n}\n.styles-module_container__gCCnD [type=checkbox] + label {\n position: absolute;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n}\n.styles-module_container__gCCnD [type=checkbox] + label::before {\n width: 17px;\n height: 17px;\n border-radius: 5px;\n border: 2px solid var(--border-2);\n display: block;\n content: \"\";\n float: left;\n margin-right: 8px;\n z-index: 5;\n position: relative;\n transition: 0.2s ease-in-out;\n}\n.styles-module_container__gCCnD [type=checkbox] ~ span {\n position: absolute;\n opacity: 1;\n color: var(--background-2);\n z-index: 100;\n user-select: none;\n pointer-events: none;\n -webkit-user-select: none;\n font-weight: 500;\n}\n.styles-module_container__gCCnD [type=checkbox]:checked + label::before {\n background-color: var(--primary-1);\n border-color: var(--primary-1);\n}\n.styles-module_container__gCCnD [type=checkbox]:hover:not(:checked) + label::before {\n background-color: var(--background-4);\n border-color: var(--background-2);\n}";
|
9475
9475
|
var styles$u = {"container":"styles-module_container__gCCnD"};
|
9476
9476
|
styleInject(css_248z$u);
|
9477
9477
|
|
9478
|
-
function Checkbox({ id, name, checked, defaultChecked = false, onInput = () => { }, children }) {
|
9479
|
-
return (React__default["default"].createElement("div", { className: styles$u.container },
|
9478
|
+
function Checkbox({ id, name, checked, defaultChecked = false, onInput = () => { }, children, ...props }) {
|
9479
|
+
return (React__default["default"].createElement("div", { className: styles$u.container, ...props },
|
9480
9480
|
React__default["default"].createElement("input", { type: "checkbox", onInput: onInput, name: name, checked: checked, defaultChecked: defaultChecked, id: id || name }),
|
9481
9481
|
React__default["default"].createElement("label", { htmlFor: id || name }, children),
|
9482
9482
|
React__default["default"].createElement(SvgIcon, { iconName: "done", size: "21px" })));
|
package/dist/index.esm.js
CHANGED
@@ -9445,12 +9445,12 @@ function CardButton({ id, children, iconName, onClick, ...props }) {
|
|
9445
9445
|
React__default.createElement("h2", null, children)));
|
9446
9446
|
}
|
9447
9447
|
|
9448
|
-
var css_248z$u = ".styles-module_container__gCCnD {\n margin-bottom: 20px;\n
|
9448
|
+
var css_248z$u = ".styles-module_container__gCCnD {\n margin-bottom: 20px;\n color: var(--foreground-3);\n}\n.styles-module_container__gCCnD [type=checkbox] {\n position: relative;\n left: 15px;\n top: -4px;\n z-index: 0;\n appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n margin-left: -3.5px;\n}\n.styles-module_container__gCCnD [type=checkbox] + label {\n position: absolute;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n}\n.styles-module_container__gCCnD [type=checkbox] + label::before {\n width: 17px;\n height: 17px;\n border-radius: 5px;\n border: 2px solid var(--border-2);\n display: block;\n content: \"\";\n float: left;\n margin-right: 8px;\n z-index: 5;\n position: relative;\n transition: 0.2s ease-in-out;\n}\n.styles-module_container__gCCnD [type=checkbox] ~ span {\n position: absolute;\n opacity: 1;\n color: var(--background-2);\n z-index: 100;\n user-select: none;\n pointer-events: none;\n -webkit-user-select: none;\n font-weight: 500;\n}\n.styles-module_container__gCCnD [type=checkbox]:checked + label::before {\n background-color: var(--primary-1);\n border-color: var(--primary-1);\n}\n.styles-module_container__gCCnD [type=checkbox]:hover:not(:checked) + label::before {\n background-color: var(--background-4);\n border-color: var(--background-2);\n}";
|
9449
9449
|
var styles$u = {"container":"styles-module_container__gCCnD"};
|
9450
9450
|
styleInject(css_248z$u);
|
9451
9451
|
|
9452
|
-
function Checkbox({ id, name, checked, defaultChecked = false, onInput = () => { }, children }) {
|
9453
|
-
return (React__default.createElement("div", { className: styles$u.container },
|
9452
|
+
function Checkbox({ id, name, checked, defaultChecked = false, onInput = () => { }, children, ...props }) {
|
9453
|
+
return (React__default.createElement("div", { className: styles$u.container, ...props },
|
9454
9454
|
React__default.createElement("input", { type: "checkbox", onInput: onInput, name: name, checked: checked, defaultChecked: defaultChecked, id: id || name }),
|
9455
9455
|
React__default.createElement("label", { htmlFor: id || name }, children),
|
9456
9456
|
React__default.createElement(SvgIcon, { iconName: "done", size: "21px" })));
|