@ktjs/mui 0.17.4 → 0.17.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/dist/index.d.ts +2 -2
- package/dist/index.iife.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ declare function Button(props: ButtonProps): KTHTMLElement;
|
|
|
38
38
|
|
|
39
39
|
interface CheckboxProps {
|
|
40
40
|
value: string;
|
|
41
|
-
|
|
41
|
+
label?: string | KTHTMLElement | HTMLElement;
|
|
42
42
|
checked?: boolean;
|
|
43
43
|
size?: 'small' | 'medium';
|
|
44
44
|
'mui:change'?: (checked: boolean, value: string) => void;
|
|
@@ -128,7 +128,7 @@ interface TextFieldProps {
|
|
|
128
128
|
style?: string;
|
|
129
129
|
label?: string;
|
|
130
130
|
placeholder?: string;
|
|
131
|
-
value?:
|
|
131
|
+
value?: any;
|
|
132
132
|
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
|
|
133
133
|
disabled?: boolean;
|
|
134
134
|
required?: boolean;
|
package/dist/index.iife.js
CHANGED
|
@@ -120,7 +120,7 @@ var __ktjs_mui__ = (function (exports, jsxRuntime, kt_js) {
|
|
|
120
120
|
toggleIcon(checked, indeterminate);
|
|
121
121
|
onChange(checked, value);
|
|
122
122
|
};
|
|
123
|
-
let { checked = false, value = '',
|
|
123
|
+
let { checked = false, value = '', label = '', size = 'medium', 'mui:change': onChange = emptyFn$3, disabled = false, color = 'primary', indeterminate = false, } = props;
|
|
124
124
|
const inputRef = kt_js.ref();
|
|
125
125
|
// Unchecked icon
|
|
126
126
|
const uncheckedIcon = (jsxRuntime.jsx("span", { class: "mui-checkbox-icon-unchecked", children: jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", children: jsxRuntime.jsx("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }) }) }));
|
|
@@ -130,7 +130,7 @@ var __ktjs_mui__ = (function (exports, jsxRuntime, kt_js) {
|
|
|
130
130
|
const indeterminateIcon = (jsxRuntime.jsx("span", { class: "mui-checkbox-icon-indeterminate", children: jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", children: jsxRuntime.jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z" }) }) }));
|
|
131
131
|
// Initialize icon state
|
|
132
132
|
toggleIcon(checked, indeterminate);
|
|
133
|
-
const container = (jsxRuntime.jsxs("label", { class: `mui-checkbox-wrapper mui-checkbox-size-${size} ${disabled ? 'mui-checkbox-disabled' : ''} mui-checkbox-color-${color}`, children: [jsxRuntime.jsx("input", { ref: inputRef, type: "checkbox", class: "mui-checkbox-input", checked: checked, value: value, disabled: disabled, "on:change": handleChange }), jsxRuntime.jsxs("span", { class: "mui-checkbox-icon", children: [uncheckedIcon, checkedIcon, indeterminateIcon] }),
|
|
133
|
+
const container = (jsxRuntime.jsxs("label", { class: `mui-checkbox-wrapper mui-checkbox-size-${size} ${disabled ? 'mui-checkbox-disabled' : ''} mui-checkbox-color-${color}`, children: [jsxRuntime.jsx("input", { ref: inputRef, type: "checkbox", class: "mui-checkbox-input", checked: checked, value: value, disabled: disabled, "on:change": handleChange }), jsxRuntime.jsxs("span", { class: "mui-checkbox-icon", children: [uncheckedIcon, checkedIcon, indeterminateIcon] }), jsxRuntime.jsx("span", { "k-if": label, class: "mui-checkbox-label", children: label })] }));
|
|
134
134
|
Object.defineProperty(container, 'checked', {
|
|
135
135
|
get() {
|
|
136
136
|
return checked;
|
package/dist/index.mjs
CHANGED
|
@@ -120,7 +120,7 @@ function Checkbox(props) {
|
|
|
120
120
|
toggleIcon(checked, indeterminate);
|
|
121
121
|
onChange(checked, value);
|
|
122
122
|
};
|
|
123
|
-
let { checked = false, value = '',
|
|
123
|
+
let { checked = false, value = '', label = '', size = 'medium', 'mui:change': onChange = emptyFn$3, disabled = false, color = 'primary', indeterminate = false, } = props;
|
|
124
124
|
const inputRef = ref$1();
|
|
125
125
|
// Unchecked icon
|
|
126
126
|
const uncheckedIcon = (jsx("span", { class: "mui-checkbox-icon-unchecked", children: jsx("svg", { viewBox: "0 0 24 24", children: jsx("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }) }) }));
|
|
@@ -130,7 +130,7 @@ function Checkbox(props) {
|
|
|
130
130
|
const indeterminateIcon = (jsx("span", { class: "mui-checkbox-icon-indeterminate", children: jsx("svg", { viewBox: "0 0 24 24", children: jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z" }) }) }));
|
|
131
131
|
// Initialize icon state
|
|
132
132
|
toggleIcon(checked, indeterminate);
|
|
133
|
-
const container = (jsxs("label", { class: `mui-checkbox-wrapper mui-checkbox-size-${size} ${disabled ? 'mui-checkbox-disabled' : ''} mui-checkbox-color-${color}`, children: [jsx("input", { ref: inputRef, type: "checkbox", class: "mui-checkbox-input", checked: checked, value: value, disabled: disabled, "on:change": handleChange }), jsxs("span", { class: "mui-checkbox-icon", children: [uncheckedIcon, checkedIcon, indeterminateIcon] }),
|
|
133
|
+
const container = (jsxs("label", { class: `mui-checkbox-wrapper mui-checkbox-size-${size} ${disabled ? 'mui-checkbox-disabled' : ''} mui-checkbox-color-${color}`, children: [jsx("input", { ref: inputRef, type: "checkbox", class: "mui-checkbox-input", checked: checked, value: value, disabled: disabled, "on:change": handleChange }), jsxs("span", { class: "mui-checkbox-icon", children: [uncheckedIcon, checkedIcon, indeterminateIcon] }), jsx("span", { "k-if": label, class: "mui-checkbox-label", children: label })] }));
|
|
134
134
|
Object.defineProperty(container, 'checked', {
|
|
135
135
|
get() {
|
|
136
136
|
return checked;
|