@udixio/ui-react 2.9.15 → 2.9.17
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/CHANGELOG.md +28 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +461 -458
- package/dist/lib/components/FabMenu.d.ts.map +1 -1
- package/dist/lib/components/TextField.d.ts +1 -0
- package/dist/lib/components/TextField.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/lib/components/FabMenu.tsx +13 -10
- package/src/lib/components/TextField.tsx +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FabMenu.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FabMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAShD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,GAAI,+IAerB,UAAU,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"FabMenu.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FabMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAShD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,GAAI,+IAerB,UAAU,CAAC,gBAAgB,CAAC,4CAuM9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/lib/components/TextField.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/lib/components/TextField.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,GAAI,6PAuBvB,UAAU,CAAC,kBAAkB,CAAC,4CAuUhC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@udixio/ui-react",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"react": "^19.1.1",
|
|
39
39
|
"react-dom": "^19.1.1",
|
|
40
|
-
"@udixio/
|
|
41
|
-
"@udixio/
|
|
40
|
+
"@udixio/theme": "2.1.13",
|
|
41
|
+
"@udixio/tailwind": "2.4.13"
|
|
42
42
|
},
|
|
43
43
|
"repository": {
|
|
44
44
|
"type": "git",
|
|
@@ -151,15 +151,18 @@ export const FabMenu = ({
|
|
|
151
151
|
shape: 'rounded',
|
|
152
152
|
variant: 'filled',
|
|
153
153
|
className: () => ({
|
|
154
|
-
button: classNames(
|
|
155
|
-
'
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
154
|
+
button: classNames(
|
|
155
|
+
'max-w-full overflow-hidden text-nowrap',
|
|
156
|
+
{
|
|
157
|
+
'px-0': !open,
|
|
158
|
+
'bg-primary-container text-on-primary-container ':
|
|
159
|
+
variant === 'primary',
|
|
160
|
+
'bg-secondary-container text-on-secondary-container':
|
|
161
|
+
variant === 'secondary',
|
|
162
|
+
'bg-tertiary-container text-on-tertiary-container':
|
|
163
|
+
variant === 'tertiary',
|
|
164
|
+
},
|
|
165
|
+
),
|
|
163
166
|
stateLayer: classNames({
|
|
164
167
|
'state-on-primary-container': variant === 'primary',
|
|
165
168
|
'state-on-secondary-container':
|
|
@@ -195,7 +198,7 @@ export const FabMenu = ({
|
|
|
195
198
|
layoutId={'fab-menu' + id}
|
|
196
199
|
variant={'filled'}
|
|
197
200
|
className={() => ({
|
|
198
|
-
iconButton: classNames(
|
|
201
|
+
iconButton: classNames({
|
|
199
202
|
'bg-primary text-on-primary': variant === 'primary',
|
|
200
203
|
'bg-secondary text-on-secondary': variant === 'secondary',
|
|
201
204
|
'bg-tertiary text-on-tertiary': variant === 'tertiary',
|
|
@@ -13,6 +13,7 @@ import { useTextFieldStyle } from '../styles/text-field.style';
|
|
|
13
13
|
import { classNames } from '../utils';
|
|
14
14
|
import { ReactProps } from '../utils/component';
|
|
15
15
|
import { AnchorPositioner } from './AnchorPositioner';
|
|
16
|
+
import { TextFieldInterface } from '../interfaces';
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Text fields let users enter text into a UI
|
|
@@ -78,9 +79,12 @@ export const TextField = ({
|
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
81
|
|
|
81
|
-
const handleOnFocus = (
|
|
82
|
+
const handleOnFocus = (
|
|
83
|
+
e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>,
|
|
84
|
+
) => {
|
|
82
85
|
setIsFocused(true);
|
|
83
86
|
setShowErrorIcon(false);
|
|
87
|
+
restProps.onFocus?.(e);
|
|
84
88
|
};
|
|
85
89
|
|
|
86
90
|
const handleChange = (
|
|
@@ -99,11 +103,14 @@ export const TextField = ({
|
|
|
99
103
|
}
|
|
100
104
|
};
|
|
101
105
|
|
|
102
|
-
const handleBlur = (
|
|
106
|
+
const handleBlur = (
|
|
107
|
+
e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>,
|
|
108
|
+
) => {
|
|
103
109
|
setIsFocused(false);
|
|
104
110
|
if (errorText?.length) {
|
|
105
111
|
setShowErrorIcon(true);
|
|
106
112
|
}
|
|
113
|
+
restProps.onBlur?.(e);
|
|
107
114
|
};
|
|
108
115
|
|
|
109
116
|
// Date Picker Logic
|
|
@@ -257,6 +264,7 @@ export const TextField = ({
|
|
|
257
264
|
)}
|
|
258
265
|
|
|
259
266
|
<TextComponent
|
|
267
|
+
{...(restProps as any)}
|
|
260
268
|
ref={inputRef as any}
|
|
261
269
|
value={value}
|
|
262
270
|
onChange={handleChange}
|
|
@@ -264,21 +272,13 @@ export const TextField = ({
|
|
|
264
272
|
id={id}
|
|
265
273
|
name={name}
|
|
266
274
|
placeholder={isFocused ? (placeholder ?? undefined) : ''}
|
|
267
|
-
onFocus={
|
|
268
|
-
handleOnFocus();
|
|
269
|
-
if (isDateInput) {
|
|
270
|
-
// Maybe open picker on focus? User preference.
|
|
271
|
-
// Often better on click/icon click.
|
|
272
|
-
// But let's stick to icon click for now or explicit open.
|
|
273
|
-
}
|
|
274
|
-
}}
|
|
275
|
+
onFocus={handleOnFocus}
|
|
275
276
|
onBlur={handleBlur}
|
|
276
277
|
disabled={disabled}
|
|
277
278
|
autoComplete={autoComplete}
|
|
278
279
|
aria-invalid={!!errorText?.length}
|
|
279
280
|
aria-describedby={hasSupportingText ? helperTextId : undefined}
|
|
280
281
|
{...textComponentProps}
|
|
281
|
-
{...(restProps as any)}
|
|
282
282
|
/>
|
|
283
283
|
</div>
|
|
284
284
|
|