@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 CHANGED
@@ -38,7 +38,7 @@ declare function Button(props: ButtonProps): KTHTMLElement;
38
38
 
39
39
  interface CheckboxProps {
40
40
  value: string;
41
- text?: string | KTHTMLElement | HTMLElement;
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?: string;
131
+ value?: any;
132
132
  type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
133
133
  disabled?: boolean;
134
134
  required?: boolean;
@@ -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 = '', text = '', size = 'medium', 'mui:change': onChange = emptyFn$3, disabled = false, color = 'primary', indeterminate = false, } = props;
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] }), text && jsxRuntime.jsx("span", { class: "mui-checkbox-label", children: text })] }));
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 = '', text = '', size = 'medium', 'mui:change': onChange = emptyFn$3, disabled = false, color = 'primary', indeterminate = false, } = props;
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] }), text && jsx("span", { class: "mui-checkbox-label", children: text })] }));
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/mui",
3
- "version": "0.17.4",
3
+ "version": "0.17.6",
4
4
  "description": "Material-UI inspired components for kt.js - pre-styled UI components",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",