@ktjs/mui 0.17.2 → 0.17.3

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
@@ -109,10 +109,13 @@ interface TextFieldProps {
109
109
  'mui:blur'?: (value: string, event: Event) => void;
110
110
  'mui:focus'?: (value: string, event: Event) => void;
111
111
  }
112
+ type KTMuiTextField = KTHTMLElement & {
113
+ value: string;
114
+ };
112
115
  /**
113
116
  * TextField component - mimics MUI TextField appearance and behavior
114
117
  */
115
- declare function TextField(props: TextFieldProps): KTHTMLElement;
118
+ declare function TextField(props: TextFieldProps): KTMuiTextField;
116
119
 
117
120
  interface RadioProps {
118
121
  value: string;
@@ -280,6 +280,15 @@ var __ktjs_mui__ = (function (exports, jsxRuntime, kt_js) {
280
280
  const container = (jsxRuntime.jsxs("div", { class: 'mui-textfield-root ' + (props.class ? props.class : ''), style: props.style ? props.style : '', children: [jsxRuntime.jsxs("div", { class: "mui-textfield-wrapper", children: [jsxRuntime.jsxs("label", { "k-if": label, class: "mui-textfield-label", children: [label, required && jsxRuntime.jsx("span", { class: "mui-textfield-required", children: "*" })] }), jsxRuntime.jsx("div", { class: "mui-textfield-input-wrapper", children: inputElement }), jsxRuntime.jsx("fieldset", { class: "mui-textfield-fieldset", children: jsxRuntime.jsx("legend", { "k-if": label, class: "mui-textfield-legend", children: jsxRuntime.jsxs("span", { children: [label, required && '*'] }) }) })] }), helperText && jsxRuntime.jsx("p", { class: "mui-textfield-helper-text", children: helperText })] }));
281
281
  // Initialize classes
282
282
  setTimeout(() => updateClasses(), 0);
283
+ Object.defineProperty(container, 'value', {
284
+ get() {
285
+ return inputRef.value.value;
286
+ },
287
+ set(newValue) {
288
+ inputRef.value.value = newValue;
289
+ updateClasses();
290
+ },
291
+ });
283
292
  return container;
284
293
  }
285
294
 
package/dist/index.mjs CHANGED
@@ -280,6 +280,15 @@ function TextField(props) {
280
280
  const container = (jsxs("div", { class: 'mui-textfield-root ' + (props.class ? props.class : ''), style: props.style ? props.style : '', children: [jsxs("div", { class: "mui-textfield-wrapper", children: [jsxs("label", { "k-if": label, class: "mui-textfield-label", children: [label, required && jsx("span", { class: "mui-textfield-required", children: "*" })] }), jsx("div", { class: "mui-textfield-input-wrapper", children: inputElement }), jsx("fieldset", { class: "mui-textfield-fieldset", children: jsx("legend", { "k-if": label, class: "mui-textfield-legend", children: jsxs("span", { children: [label, required && '*'] }) }) })] }), helperText && jsx("p", { class: "mui-textfield-helper-text", children: helperText })] }));
281
281
  // Initialize classes
282
282
  setTimeout(() => updateClasses(), 0);
283
+ Object.defineProperty(container, 'value', {
284
+ get() {
285
+ return inputRef.value.value;
286
+ },
287
+ set(newValue) {
288
+ inputRef.value.value = newValue;
289
+ updateClasses();
290
+ },
291
+ });
283
292
  return container;
284
293
  }
285
294
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/mui",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "description": "Material-UI inspired components for kt.js - pre-styled UI components",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",