@alveole/components 2.0.0-alpha.20 → 2.0.0-alpha.21
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/FormControl.stories.d.ts.map +1 -1
- package/dist/ui/FormControl/FormControl.stories.js +4 -5
- package/dist/ui/FormControl/FormControl.stories.sources.d.ts.map +1 -1
- package/dist/ui/FormControl/FormControl.stories.sources.js +4 -4
- package/dist/ui/FormControl/TextInput.d.ts +1 -0
- package/dist/ui/FormControl/TextInput.d.ts.map +1 -1
- package/dist/ui/FormControl/TextInput.stories.d.ts +1 -0
- package/dist/ui/FormControl/TextInput.stories.d.ts.map +1 -1
- package/dist/ui/FormControl/TextInput.types.d.ts +2 -0
- package/dist/ui/FormControl/TextInput.types.d.ts.map +1 -1
- package/dist/ui/FormControl/TextInputInline.d.ts +1 -0
- package/dist/ui/FormControl/TextInputInline.d.ts.map +1 -1
- package/dist/ui/FormControl/TextInputInline.js +2 -2
- package/dist/ui/FormControl/TextInputMirror.d.ts +1 -0
- package/dist/ui/FormControl/TextInputMirror.d.ts.map +1 -1
- package/dist/ui/FormControl/TextInputModal.d.ts +1 -0
- package/dist/ui/FormControl/TextInputModal.d.ts.map +1 -1
- package/dist/ui/FormControl/TextInputPassword.d.ts +1 -0
- package/dist/ui/FormControl/TextInputPassword.d.ts.map +1 -1
- package/dist/ui/FormControl/textInputStyles.d.ts +2 -1
- package/dist/ui/FormControl/textInputStyles.d.ts.map +1 -1
- package/dist/ui/FormControl/textInputStyles.js +2 -1
- package/dist/ui/Header/Header.styles.js +1 -1
- package/dist/ui/LucideIcon/catalogueLucide.d.ts +312 -0
- package/dist/ui/LucideIcon/catalogueLucide.d.ts.map +1 -1
- package/dist/ui/LucideIcon/vendor/lab.js +1 -1
- package/dist/ui/LucideIcon/vendor/lucide.d.ts +5318 -4083
- package/dist/ui/LucideIcon/vendor/lucide.js +3 -3
- package/dist/ui/Sidebar/Sidebar.styles.js +1 -1
- package/dist/ui/TextareaInput/TextareaInput.d.ts +1 -0
- package/dist/ui/TextareaInput/TextareaInput.d.ts.map +1 -1
- package/dist/ui/TextareaInput/TextareaInput.stories.d.ts +2 -0
- package/dist/ui/TextareaInput/TextareaInput.stories.d.ts.map +1 -1
- package/dist/ui/TextareaInput/TextareaInput.stories.js +3 -5
- package/dist/ui/TextareaInput/TextareaInput.stories.sources.d.ts +2 -0
- package/dist/ui/TextareaInput/TextareaInput.stories.sources.d.ts.map +1 -1
- package/dist/ui/TextareaInput/TextareaInput.stories.sources.js +3 -1
- package/package.json +10 -10
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALVEOLE_COMPONENTS_VERSION: "2.0.0-alpha.
|
|
1
|
+
export declare const ALVEOLE_COMPONENTS_VERSION: "2.0.0-alpha.21";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ALVEOLE_COMPONENTS_VERSION = "2.0.0-alpha.
|
|
1
|
+
export const ALVEOLE_COMPONENTS_VERSION = "2.0.0-alpha.21";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControl.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/FormControl.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"FormControl.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/FormControl.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wBAOkB;AAElB,eAAO,MAAM,aAAa,mCAIzB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAIrB,CAAC;AAEF,eAAO,MAAM,WAAW,mCAIvB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAMjB,CAAC;AAEF,eAAO,MAAM,OAAO,mCAKnB,CAAC;AAEF,eAAO,MAAM,IAAI,mCAKhB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAejB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAiBrB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC"}
|
|
@@ -4,7 +4,6 @@ import { Box } from '../../core/Box';
|
|
|
4
4
|
import { Typography } from '../../core/Typography';
|
|
5
5
|
import { Button } from '../Button';
|
|
6
6
|
import { DateInput as DateInputControl } from '../DateInput';
|
|
7
|
-
import { InputHeading } from '../InputHeading';
|
|
8
7
|
import { TimeInput } from '../TimeInput';
|
|
9
8
|
import { FormControl } from './FormControl';
|
|
10
9
|
import { useStyles } from './FormControl.styles';
|
|
@@ -21,9 +20,9 @@ export default {
|
|
|
21
20
|
component: FormControl,
|
|
22
21
|
styleFn: useStyles,
|
|
23
22
|
};
|
|
24
|
-
export const WithTextInput = () => (
|
|
25
|
-
export const WithError = () => (
|
|
26
|
-
export const WithSuccess = () => (
|
|
23
|
+
export const WithTextInput = () => (_jsx(FormControl, { label: "Adresse email", hint: "Votre email professionnel", required: true, children: _jsx(TextInput, { type: "email", placeholder: "jean@exemple.fr" }) }));
|
|
24
|
+
export const WithError = () => (_jsx(FormControl, { label: "Adresse email", error: "Format invalide", children: _jsx(TextInput, { type: "email", placeholder: "jean@exemple.fr", error: "Format invalide" }) }));
|
|
25
|
+
export const WithSuccess = () => (_jsx(FormControl, { label: "Adresse email", success: "Email valide", children: _jsx(TextInput, { type: "email", placeholder: "jean@exemple.fr", success: "Email valide" }) }));
|
|
27
26
|
export const Label = () => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "3W", children: [_jsx(FormControlLabel, { label: "Label par defaut" }), _jsx(FormControlLabel, { label: "Desactive", disabled: true }), _jsx(FormControlLabel, { label: "Avec badge", labelRight: _jsx(Typography, { children: "Optionnel" }) })] }));
|
|
28
27
|
export const Caption = () => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "3W", children: [_jsx(FormControlCaption, { error: "Champ requis" }), _jsx(FormControlCaption, { success: "Valeur correcte" })] }));
|
|
29
28
|
export const Hint = () => (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "3W", children: [_jsx(FormControlHint, { hint: "Texte descriptif du champ" }), _jsx(FormControlHint, { hint: "Texte desactive", disabled: true })] }));
|
|
@@ -35,6 +34,6 @@ export const DateInput = () => {
|
|
|
35
34
|
const [date, setDate] = useState('');
|
|
36
35
|
const [time, setTime] = useState('');
|
|
37
36
|
const [month, setMonth] = useState('');
|
|
38
|
-
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "3V", children: [
|
|
37
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "3V", children: [_jsx(FormControl, { label: "Date", children: _jsx(DateInputControl, { type: "date", value: date, onChange: setDate }) }), _jsx(FormControl, { label: "Heure", children: _jsx(TimeInput, { value: time, onChange: setTime }) }), _jsx(FormControl, { label: "Mois", children: _jsx(DateInputControl, { type: "month", value: month, onChange: setMonth }) })] }));
|
|
39
38
|
};
|
|
40
39
|
export * as Sources from './FormControl.stories.sources';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControl.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/FormControl.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"FormControl.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/FormControl.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,cAA4N,CAAC;AAEvP,eAAO,MAAM,SAAS,cAAgO,CAAC;AAEvP,eAAO,MAAM,WAAW,cAAgO,CAAC;AAEzP,eAAO,MAAM,KAAK,cAA8T,CAAC;AAEjV,eAAO,MAAM,OAAO,cAAgO,CAAC;AAErP,eAAO,MAAM,IAAI,cAAyO,CAAC;AAE3P,eAAO,MAAM,KAAK,cAA2f,CAAC;AAE9gB,eAAO,MAAM,SAAS,cAA2oB,CAAC;AAElqB,eAAO,MAAM,YAAY;;;;;;;;;CASf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// This file is generated. Do not edit manually.
|
|
2
2
|
// Source: src/ui/FormControl/FormControl.stories.tsx
|
|
3
|
-
export const WithTextInput = () => "export const WithTextInput = () => (\n <FormControl
|
|
4
|
-
export const WithError = () => "export const WithError = () => (\n <FormControl
|
|
5
|
-
export const WithSuccess = () => "export const WithSuccess = () => (\n <FormControl
|
|
3
|
+
export const WithTextInput = () => "export const WithTextInput = () => (\n <FormControl label=\"Adresse email\" hint=\"Votre email professionnel\" required>\n <TextInput type=\"email\" placeholder=\"jean@exemple.fr\" />\n </FormControl>\n);";
|
|
4
|
+
export const WithError = () => "export const WithError = () => (\n <FormControl label=\"Adresse email\" error=\"Format invalide\">\n <TextInput type=\"email\" placeholder=\"jean@exemple.fr\" error=\"Format invalide\" />\n </FormControl>\n);";
|
|
5
|
+
export const WithSuccess = () => "export const WithSuccess = () => (\n <FormControl label=\"Adresse email\" success=\"Email valide\">\n <TextInput type=\"email\" placeholder=\"jean@exemple.fr\" success=\"Email valide\" />\n </FormControl>\n);";
|
|
6
6
|
export const Label = () => "export const Label = () => (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"3W\">\n <FormControlLabel label=\"Label par defaut\" />\n <FormControlLabel label=\"Desactive\" disabled />\n <FormControlLabel label=\"Avec badge\" labelRight={<Typography>Optionnel</Typography>} />\n </Box>\n);";
|
|
7
7
|
export const Caption = () => "export const Caption = () => (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"3W\">\n <FormControlCaption error=\"Champ requis\" />\n <FormControlCaption success=\"Valeur correcte\" />\n </Box>\n);";
|
|
8
8
|
export const Hint = () => "export const Hint = () => (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"3W\">\n <FormControlHint hint=\"Texte descriptif du champ\" />\n <FormControlHint hint=\"Texte desactive\" disabled />\n </Box>\n);";
|
|
9
9
|
export const Modal = () => "export const Modal = () => {\n const [open, setOpen] = useState(false);\n return (\n <Box>\n <Button variant=\"secondary\" title=\"Ouvrir la modale\" onPress={() => setOpen(true)} />\n <FormControlModal\n open={open}\n onClose={() => setOpen(false)}\n submitLabel=\"Valider\"\n onSubmit={() => setOpen(false)}\n >\n <TextInput placeholder=\"Saisir un texte...\" multiline numberOfLines={6} />\n </FormControlModal>\n </Box>\n );\n};";
|
|
10
|
-
export const DateInput = () => "export const DateInput = () => {\n const [date, setDate] = useState('');\n const [time, setTime] = useState('');\n const [month, setMonth] = useState('');\n return (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"3V\">\n <FormControl
|
|
10
|
+
export const DateInput = () => "export const DateInput = () => {\n const [date, setDate] = useState('');\n const [time, setTime] = useState('');\n const [month, setMonth] = useState('');\n return (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"3V\">\n <FormControl label=\"Date\">\n <DateInputControl type=\"date\" value={date} onChange={setDate} />\n </FormControl>\n <FormControl label=\"Heure\">\n <TimeInput value={time} onChange={setTime} />\n </FormControl>\n <FormControl label=\"Mois\">\n <DateInputControl type=\"month\" value={month} onChange={setMonth} />\n </FormControl>\n </Box>\n );\n};";
|
|
11
11
|
export const storySources = {
|
|
12
12
|
WithTextInput,
|
|
13
13
|
WithError,
|
|
@@ -15,5 +15,6 @@ export declare const TextInput: React.ForwardRefExoticComponent<Omit<import("rea
|
|
|
15
15
|
openModal?: boolean;
|
|
16
16
|
modalSubmitLabel?: string;
|
|
17
17
|
onModalSubmit?: () => void;
|
|
18
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
18
19
|
} & React.RefAttributes<TextInputElement>>;
|
|
19
20
|
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKrE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKrE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;0CAgBpB,CAAC"}
|
|
@@ -13,6 +13,7 @@ declare const _default: {
|
|
|
13
13
|
openModal?: boolean;
|
|
14
14
|
modalSubmitLabel?: string;
|
|
15
15
|
onModalSubmit?: () => void;
|
|
16
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
16
17
|
} & import("react").RefAttributes<import("./TextInput.types").TextInputElement>>;
|
|
17
18
|
styleFn: () => {
|
|
18
19
|
caption: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInput.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInput.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInput.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAQkB;AAElB,eAAO,MAAM,OAAO,mCAInB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAIjB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAIrB,CAAC;AAEF,eAAO,MAAM,UAAU,mCAItB,CAAC;AAEF,eAAO,MAAM,aAAa,mCAIzB,CAAC;AAEF,eAAO,MAAM,SAAS,mCAIrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAc9B,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC"}
|
|
@@ -12,5 +12,7 @@ export type TextInputProps = Omit<ReactNativeTextInputProps, 'style'> & {
|
|
|
12
12
|
openModal?: boolean;
|
|
13
13
|
modalSubmitLabel?: string;
|
|
14
14
|
onModalSubmit?: () => void;
|
|
15
|
+
/** Poignee de redimensionnement du champ multiligne, web uniquement : ignoree sur natif. */
|
|
16
|
+
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=TextInput.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.types.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,IAAI,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAI9F,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;CAAG;AAE9D,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,yBAAyB,EAAE,OAAO,CAAC,GAAG;IAEtE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAInB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInput.types.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,IAAI,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAI9F,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;CAAG;AAE9D,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,yBAAyB,EAAE,OAAO,CAAC,GAAG;IAEtE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAInB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,4FAA4F;IAC5F,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;CACtD,CAAC"}
|
|
@@ -14,5 +14,6 @@ export declare const TextInputInline: React.ForwardRefExoticComponent<Omit<impor
|
|
|
14
14
|
openModal?: boolean;
|
|
15
15
|
modalSubmitLabel?: string;
|
|
16
16
|
onModalSubmit?: () => void;
|
|
17
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
17
18
|
} & React.RefAttributes<TextInputElement>>;
|
|
18
19
|
//# sourceMappingURL=TextInputInline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputInline.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInputInline.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAgCrE;;;GAGG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"TextInputInline.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInputInline.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAgCrE;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;0CA2D1B,CAAC"}
|
|
@@ -36,7 +36,7 @@ const desactivationDe = (disabled) => disabled !== true ? null : Platform.OS ===
|
|
|
36
36
|
* laisse a la plateforme, parce que le contour se dessine sur le cadre et non sur le champ.
|
|
37
37
|
*/
|
|
38
38
|
export const TextInputInline = React.forwardRef(function TextInputInline(props, ref) {
|
|
39
|
-
const { type, disabled: ownDisabled, readOnly, editable, error, success, startAdornment, endAdornment, onFocus, onBlur, onPressIn, ...inputProps } = props;
|
|
39
|
+
const { type, disabled: ownDisabled, readOnly, editable, error, success, startAdornment, endAdornment, onFocus, onBlur, onPressIn, resize, ...inputProps } = props;
|
|
40
40
|
const { color } = useTheme();
|
|
41
41
|
const styles = useStyles();
|
|
42
42
|
const fieldId = useFieldId();
|
|
@@ -51,5 +51,5 @@ export const TextInputInline = React.forwardRef(function TextInputInline(props,
|
|
|
51
51
|
startAdornment,
|
|
52
52
|
endAdornment,
|
|
53
53
|
multiline: inputProps.multiline,
|
|
54
|
-
}), children: [startAdornment, _jsx(ReactNativeTextInput, { ref: ref, id: inputProps.id ?? fieldId, "aria-required": required, style: inputTextStyle(styles, { startAdornment, endAdornment }), readOnly: readOnly === true, editable: editable, onFocus: champ.handleFocus, onBlur: champ.handleBlur, onPressIn: onPressIn, placeholderTextColor: color.text.inverse.muted, ...reglagesDuType(type), ...inputProps, ...desactivationDe(disabled) }), endAdornment] }));
|
|
54
|
+
}), children: [startAdornment, _jsx(ReactNativeTextInput, { ref: ref, id: inputProps.id ?? fieldId, "aria-required": required, style: inputTextStyle(styles, { startAdornment, endAdornment, resize }), readOnly: readOnly === true, editable: editable, onFocus: champ.handleFocus, onBlur: champ.handleBlur, onPressIn: onPressIn, placeholderTextColor: color.text.inverse.muted, ...reglagesDuType(type), ...inputProps, ...desactivationDe(disabled) }), endAdornment] }));
|
|
55
55
|
});
|
|
@@ -15,6 +15,7 @@ export declare const TextInputMirror: React.ForwardRefExoticComponent<Omit<impor
|
|
|
15
15
|
openModal?: boolean;
|
|
16
16
|
modalSubmitLabel?: string;
|
|
17
17
|
onModalSubmit?: () => void;
|
|
18
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
18
19
|
} & {
|
|
19
20
|
isOpen: boolean;
|
|
20
21
|
onOpen: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputMirror.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInputMirror.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAKrE;;;;GAIG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"TextInputMirror.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInputMirror.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAKrE;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;YAP2B,OAAO;YAAU,MAAM,IAAI;0CAsDjF,CAAC"}
|
|
@@ -16,5 +16,6 @@ export declare const TextInputModal: React.ForwardRefExoticComponent<Omit<import
|
|
|
16
16
|
openModal?: boolean;
|
|
17
17
|
modalSubmitLabel?: string;
|
|
18
18
|
onModalSubmit?: () => void;
|
|
19
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
19
20
|
} & React.RefAttributes<TextInputElement>>;
|
|
20
21
|
//# sourceMappingURL=TextInputModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputModal.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInputModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAIrE;;;;;GAKG;AACH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"TextInputModal.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInputModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAIrE;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;0CAgDzB,CAAC"}
|
|
@@ -11,5 +11,6 @@ export declare const TextInputPassword: React.ForwardRefExoticComponent<Omit<imp
|
|
|
11
11
|
openModal?: boolean;
|
|
12
12
|
modalSubmitLabel?: string;
|
|
13
13
|
onModalSubmit?: () => void;
|
|
14
|
+
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
14
15
|
} & React.RefAttributes<TextInputElement>>;
|
|
15
16
|
//# sourceMappingURL=TextInputPassword.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputPassword.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInputPassword.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAYrE,qFAAqF;AACrF,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"TextInputPassword.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/TextInputPassword.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAYrE,qFAAqF;AACrF,eAAO,MAAM,iBAAiB;;;;;;;;;;;0CAyB7B,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { StyleProp, TextStyle } from 'react-native';
|
|
3
3
|
import { FieldBorderState } from './fieldBorderState';
|
|
4
4
|
import { useStyles } from './FormControl.styles';
|
|
5
|
+
import { TextInputProps } from './TextInput.types';
|
|
5
6
|
type Styles = ReturnType<typeof useStyles>;
|
|
6
7
|
export type InputFrameState = FieldBorderState & {
|
|
7
8
|
focus: boolean;
|
|
@@ -91,6 +92,6 @@ export declare const inputFrameStyle: (styles: Styles, state: InputFrameState) =
|
|
|
91
92
|
minHeight: number;
|
|
92
93
|
};
|
|
93
94
|
/** Centrer le texte n'a de sens qu'encadre des deux cotes, sinon il fuit vers l'ornement. */
|
|
94
|
-
export declare const inputTextStyle: (styles: Styles, { startAdornment, endAdornment }: Pick<InputFrameState, "startAdornment" | "endAdornment">) => StyleProp<TextStyle>;
|
|
95
|
+
export declare const inputTextStyle: (styles: Styles, { startAdornment, endAdornment, resize, }: Pick<InputFrameState, "startAdornment" | "endAdornment"> & Pick<TextInputProps, "resize">) => StyleProp<TextStyle>;
|
|
95
96
|
export {};
|
|
96
97
|
//# sourceMappingURL=textInputStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInputStyles.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/textInputStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAoB,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"textInputStyles.d.ts","sourceRoot":"","sources":["../../../src/ui/FormControl/textInputStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAoB,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG;IAE/C,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,EAAE,OAAO,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpE,CAAC;AAEH,6FAA6F;AAC7F,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,EACd,2CAIG,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,cAAc,CAAC,GAAG,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,yBAM1F,CAAC"}
|
|
@@ -21,7 +21,8 @@ export const inputFrameStyle = (styles, state) => ({
|
|
|
21
21
|
...(state.multiline ? { paddingTop: 8 } : {}),
|
|
22
22
|
});
|
|
23
23
|
/** Centrer le texte n'a de sens qu'encadre des deux cotes, sinon il fuit vers l'ornement. */
|
|
24
|
-
export const inputTextStyle = (styles, { startAdornment, endAdornment }) => versStyleNatif({
|
|
24
|
+
export const inputTextStyle = (styles, { startAdornment, endAdornment, resize, }) => versStyleNatif({
|
|
25
25
|
...styles.input,
|
|
26
26
|
...(startAdornment && endAdornment ? { textAlign: 'center' } : {}),
|
|
27
|
+
...(resize ? { resize } : {}),
|
|
27
28
|
});
|
|
@@ -5,7 +5,7 @@ export const useStyles = makeStyles(({ color, text, spacing, spacingValue, radiu
|
|
|
5
5
|
// Barre blanche, séparée du contenu par la seule hairline : c'est ce que font Primer
|
|
6
6
|
// et Atlassian. Un fond gris sur une page blanche ajoute un second séparateur au
|
|
7
7
|
// filet, et écrase tout ce qu'on pose dessus.
|
|
8
|
-
backgroundColor: color.light.background['
|
|
8
|
+
backgroundColor: color.light.background['alt-grey'],
|
|
9
9
|
borderBottomWidth: 1,
|
|
10
10
|
borderBottomColor: color.light.border['default-grey'],
|
|
11
11
|
position: Platform.OS === 'web' ? 'sticky' : 'relative',
|