@alveole/components 1.8.3 → 1.8.4
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/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/ui/FormControl/FormControlDateInput.d.ts.map +1 -1
- package/dist/ui/FormControl/FormControlDateInput.js +11 -1
- package/dist/ui/FormControl/FormControlNumberInput.d.ts.map +1 -1
- package/dist/ui/FormControl/FormControlNumberInput.js +11 -1
- package/dist/ui/SelectMultiple/SelectMultiple.web.d.ts.map +1 -1
- package/dist/ui/SelectMultiple/SelectMultiple.web.js +3 -0
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALVEOLE_COMPONENTS_VERSION: "1.8.
|
|
1
|
+
export declare const ALVEOLE_COMPONENTS_VERSION: "1.8.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ALVEOLE_COMPONENTS_VERSION = "1.8.
|
|
1
|
+
export const ALVEOLE_COMPONENTS_VERSION = "1.8.4";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControlDateInput.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/FormControlDateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,2BAA2B,GAAG,gBAAgB,CAAC;AAC3D,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAaF,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"FormControlDateInput.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/FormControlDateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,2BAA2B,GAAG,gBAAgB,CAAC;AAC3D,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAaF,eAAO,MAAM,oBAAoB,oGAwDhC,CAAC"}
|
|
@@ -18,6 +18,15 @@ function formatForInput(value, type) {
|
|
|
18
18
|
export const FormControlDateInput = React.forwardRef(function DateInput(props, ref) {
|
|
19
19
|
const { value, type, onChange, ...inputProps } = props;
|
|
20
20
|
const styles = useStyles();
|
|
21
|
+
const [focus, setFocus] = React.useState(false);
|
|
22
|
+
const handleFocus = () => {
|
|
23
|
+
if (!props.disabled && !props.readOnly)
|
|
24
|
+
setFocus(true);
|
|
25
|
+
};
|
|
26
|
+
const handleBlur = () => {
|
|
27
|
+
if (!props.disabled && !props.readOnly)
|
|
28
|
+
setFocus(false);
|
|
29
|
+
};
|
|
21
30
|
const parsed = React.useMemo(() => {
|
|
22
31
|
if (value == null)
|
|
23
32
|
return value;
|
|
@@ -37,10 +46,11 @@ export const FormControlDateInput = React.forwardRef(function DateInput(props, r
|
|
|
37
46
|
return (_jsx(Box, { tag: "form-control-date-input", style: styles.inputContainer, children: _jsx(Box, { tag: "form-control-date-input-inner", style: {
|
|
38
47
|
...styles.inputInner,
|
|
39
48
|
...(props.disabled ? styles.inputDisabled : {}),
|
|
49
|
+
...(focus ? styles.inputFocused : {}),
|
|
40
50
|
}, children: _jsx("input", { ref: ref, onChange: e => {
|
|
41
51
|
const newDate = e.target.value;
|
|
42
52
|
if (type === 'month')
|
|
43
53
|
return onChange?.(newDate + '-01');
|
|
44
54
|
return onChange?.(newDate);
|
|
45
|
-
}, autoComplete: undefined, style: { ...styles.input, ...styles.inputWeb }, type: type === 'datetime' ? 'datetime-local' : (type ?? 'date'), ...inputProps, value: parsed }) }) }));
|
|
55
|
+
}, autoComplete: undefined, style: { ...styles.input, ...styles.inputWeb }, type: type === 'datetime' ? 'datetime-local' : (type ?? 'date'), ...inputProps, value: parsed, onFocus: handleFocus, onBlur: handleBlur }) }) }));
|
|
46
56
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControlNumberInput.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/FormControlNumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAC7D,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACzD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"FormControlNumberInput.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/FormControlNumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAC7D,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACzD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,sBAAsB,sGAoDlC,CAAC"}
|
|
@@ -5,9 +5,19 @@ import { useStyles } from './FormControl.styles';
|
|
|
5
5
|
export const FormControlNumberInput = React.forwardRef(function DateInput(props, ref) {
|
|
6
6
|
const { value, onChange, startAdornment, endAdornment, ...inputProps } = props;
|
|
7
7
|
const styles = useStyles();
|
|
8
|
+
const [focus, setFocus] = React.useState(false);
|
|
9
|
+
const handleFocus = () => {
|
|
10
|
+
if (!props.disabled && !props.readOnly)
|
|
11
|
+
setFocus(true);
|
|
12
|
+
};
|
|
13
|
+
const handleBlur = () => {
|
|
14
|
+
if (!props.disabled && !props.readOnly)
|
|
15
|
+
setFocus(false);
|
|
16
|
+
};
|
|
8
17
|
return (_jsx(Box, { tag: "form-control-number-input", style: styles.inputContainer, children: _jsxs(Box, { tag: "form-control-number-input-inner", style: {
|
|
9
18
|
...styles.inputInner,
|
|
10
19
|
...(props.disabled ? styles.inputDisabled : {}),
|
|
20
|
+
...(focus ? styles.inputFocused : {}),
|
|
11
21
|
...(endAdornment ? { paddingRight: 0 } : {}),
|
|
12
22
|
...(startAdornment ? { paddingLeft: 0 } : {}),
|
|
13
23
|
}, children: [startAdornment, _jsx("input", { ref: ref, value: value ?? '', onChange: e => {
|
|
@@ -18,5 +28,5 @@ export const FormControlNumberInput = React.forwardRef(function DateInput(props,
|
|
|
18
28
|
...styles.inputWeb,
|
|
19
29
|
...(endAdornment && startAdornment ? { textAlign: 'center' } : {}),
|
|
20
30
|
...(endAdornment ? { minWidth: 0 } : {}),
|
|
21
|
-
}, ...inputProps }), endAdornment] }) }));
|
|
31
|
+
}, ...inputProps, onFocus: handleFocus, onBlur: handleBlur }), endAdornment] }) }));
|
|
22
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectMultiple.web.d.ts","sourceRoot":"","sources":["../../../src/ui/SelectMultiple/SelectMultiple.web.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,oBAAoB,EAAuB,MAAM,kBAAkB,CAAC;AAGlF,eAAO,MAAM,cAAc;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SelectMultiple.web.d.ts","sourceRoot":"","sources":["../../../src/ui/SelectMultiple/SelectMultiple.web.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,oBAAoB,EAAuB,MAAM,kBAAkB,CAAC;AAGlF,eAAO,MAAM,cAAc;;;;;;;;;;;;6BA6FzB,CAAC"}
|
|
@@ -13,6 +13,9 @@ export const SelectMultiple = React.forwardRef(function SelectMultiple(props, re
|
|
|
13
13
|
...s,
|
|
14
14
|
...styles.control,
|
|
15
15
|
...(p.isDisabled ? styles.controlDisabled : {}),
|
|
16
|
+
boxShadow: 'none',
|
|
17
|
+
outline: p.isFocused ? `2px solid ${color.light.system.focus}` : 'none',
|
|
18
|
+
outlineOffset: 2,
|
|
16
19
|
':hover': { borderColor: styles.control.borderColor },
|
|
17
20
|
}),
|
|
18
21
|
valueContainer: s => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alveole/components",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.4",
|
|
4
4
|
"description": "Shared UI components.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"react-markdown": "8.0.7",
|
|
72
|
-
"remark-gfm": "
|
|
72
|
+
"remark-gfm": "3.0.1",
|
|
73
73
|
"zod": "4.4.3"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|