@loadsmart/miranda-react 3.0.0-beta.27 → 3.0.0-beta.29
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,6 +1,6 @@
|
|
|
1
1
|
import { TextField as WCTextField } from '@loadsmart/miranda-wc';
|
|
2
2
|
import type { EventName, WebComponentProps } from '@lit/react';
|
|
3
|
-
import type { ReactNode, ComponentProps } from 'react';
|
|
3
|
+
import type { ReactNode, ComponentProps, InputHTMLAttributes } from 'react';
|
|
4
4
|
import type { MirandaChangeEvent } from '../../utils/types';
|
|
5
5
|
declare global {
|
|
6
6
|
namespace JSX {
|
|
@@ -14,7 +14,8 @@ declare const WiredTextField: import("@lit/react").ReactWebComponent<WCTextField
|
|
|
14
14
|
onChange: EventName<MirandaChangeEvent<WCTextField>>;
|
|
15
15
|
onClear: EventName<CustomEvent>;
|
|
16
16
|
}>;
|
|
17
|
-
export type TextFieldProps = ComponentProps<typeof WiredTextField> & {
|
|
17
|
+
export type TextFieldProps = Omit<ComponentProps<typeof WiredTextField>, 'value'> & {
|
|
18
|
+
value?: InputHTMLAttributes<HTMLInputElement>['value'];
|
|
18
19
|
leading?: ReactNode;
|
|
19
20
|
trailing?: ReactNode;
|
|
20
21
|
};
|
package/dist/index.js
CHANGED
|
@@ -1118,8 +1118,9 @@ const WiredTextField = createComponent({
|
|
|
1118
1118
|
},
|
|
1119
1119
|
displayName: 'TextField',
|
|
1120
1120
|
});
|
|
1121
|
-
const TextField = forwardRef(({ leading, trailing, ...rest }, ref) => {
|
|
1122
|
-
|
|
1121
|
+
const TextField = forwardRef(({ leading, trailing, value, ...rest }, ref) => {
|
|
1122
|
+
const normalizedValue = value !== undefined ? String(value) : '';
|
|
1123
|
+
return (jsxs(WiredTextField, { ...rest, value: normalizedValue, ref: ref, children: [leading != null && jsx("div", { slot: "leading", children: leading }), trailing != null && jsx("div", { slot: "trailing", children: trailing })] }));
|
|
1123
1124
|
});
|
|
1124
1125
|
|
|
1125
1126
|
const TimelineItem = createComponent({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loadsmart/miranda-react",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.29",
|
|
4
4
|
"description": "React component library based on Miranda Web Components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@loadsmart/miranda-tokens": "4.0.0-beta.
|
|
45
|
-
"@loadsmart/miranda-wc": "3.0.0-beta.
|
|
44
|
+
"@loadsmart/miranda-tokens": "4.0.0-beta.29",
|
|
45
|
+
"@loadsmart/miranda-wc": "3.0.0-beta.29",
|
|
46
46
|
"@lit/react": "^1.0.5",
|
|
47
47
|
"react-is": "^18.3.1"
|
|
48
48
|
},
|