jamespot-react-components 1.0.1 → 1.0.9
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/.github/workflows/increment-npm-version.yml +26 -0
- package/build/jamespot-react-components.js +247 -231
- package/build/jamespot-react-components.js.LICENSE.txt +0 -16
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Common/JRCConditionalWrapper.d.ts +4 -4
- package/build/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.d.ts +5 -2
- package/build/src/components/Form/Input/JRCInputDate/JRCInputDate.d.ts +11 -0
- package/build/src/components/Form/Input/JRCInputDate/JRCInputDate.stories.d.ts +5 -0
- package/build/src/components/Form/Input/JRCInputText/JRCInputText.d.ts +1 -1
- package/build/src/components/Form/Input/JRCInputTextarea/JRCInputTextarea.d.ts +15 -0
- package/build/src/components/Form/Input/JRCInputTextarea/JRCInputTextarea.stories.d.ts +5 -0
- package/build/src/components/JRCAppLeftColumn/JRCAppLeftColumn.d.ts +1 -1
- package/build/src/components/JRCButton/JRCButton.d.ts +25 -0
- package/build/src/components/JRCButton/JRCButtonConfig.d.ts +1 -2
- package/build/src/components/JRCEllipsis/JRCEllipsis.d.ts +5 -0
- package/build/src/components/JRCEllipsis/JRCEllipsis.stories.d.ts +5 -0
- package/build/src/components/JRCHref/JRCHref.d.ts +18 -10
- package/build/src/components/JRCImg/url.util.d.ts +3 -3
- package/build/src/components/JRCList/JRCList.d.ts +2 -0
- package/build/src/components/JRCModal/JRCModal.d.ts +5 -1
- package/build/src/components/JRCModal/JRCModal.styles.d.ts +0 -1
- package/build/src/components/JRCTag/JRCTag.d.ts +2 -0
- package/build/src/hooks/UseDidMountEffect.d.ts +1 -2
- package/build/src/index.d.ts +8 -7
- package/build/src/styles/theme.d.ts +1 -0
- package/build/src/types.d.ts +4 -0
- package/externals.d.ts +0 -1
- package/externals.json +2 -1
- package/package.json +5 -5
- package/src/components/Common/JRCConditionalWrapper.tsx +6 -13
- package/src/components/Form/Input/JRCFormColor/JRCFormColor.tsx +12 -12
- package/src/components/Form/Input/JRCFormEmail/JRCInputEmail.tsx +4 -8
- package/src/components/Form/Input/JRCFormSelect/JRCFormSelect.tsx +5 -1
- package/src/components/Form/Input/JRCFormSelect/JRCFormSelectTag.tsx +3 -1
- package/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.stories.tsx +1 -4
- package/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.tsx +12 -10
- package/src/components/Form/Input/JRCInputDate/JRCInputDate.stories.tsx +50 -0
- package/src/components/Form/Input/JRCInputDate/JRCInputDate.tsx +26 -0
- package/src/components/Form/Input/JRCInputText/JRCInputText.tsx +2 -2
- package/src/components/Form/Input/JRCInputTextarea/JRCInputTextarea.stories.tsx +52 -0
- package/src/components/Form/Input/JRCInputTextarea/JRCInputTextarea.tsx +36 -0
- package/src/components/Form/Input/JRCSelect/JRCInputSelect.tsx +1 -1
- package/src/components/JRCAppLeftColumn/JRCAppLeftColumn.tsx +1 -1
- package/src/components/JRCButton/JRCButton.stories.tsx +1 -1
- package/src/components/JRCButton/JRCButton.tsx +9 -3
- package/src/components/JRCButton/JRCButtonConfig.tsx +1 -1
- package/src/components/JRCButton/JRCValidationButton.tsx +10 -4
- package/src/components/JRCButtonDropdown/JRCButtonDropdown.tsx +2 -2
- package/src/components/JRCEllipsis/JRCEllipsis.stories.tsx +18 -0
- package/src/components/JRCEllipsis/JRCEllipsis.tsx +22 -0
- package/src/components/JRCHref/JRCHref.stories.tsx +2 -0
- package/src/components/JRCHref/JRCHref.tsx +42 -15
- package/src/components/JRCIcon/JRCIcon.tsx +1 -1
- package/src/components/JRCIconButton/JRCIconButton.tsx +1 -4
- package/src/components/JRCImg/JRCImg.tsx +4 -2
- package/src/components/JRCImg/url.util.ts +7 -6
- package/src/components/JRCImg/url.utils.test.ts +7 -1
- package/src/components/JRCList/JRCList.styles.tsx +16 -2
- package/src/components/JRCList/JRCList.tsx +5 -5
- package/src/components/JRCList/JRCListMockData.stories.tsx +1 -1
- package/src/components/JRCModal/JRCModal.styles.tsx +0 -6
- package/src/components/JRCModal/JRCModal.tsx +77 -62
- package/src/components/JRCTag/JRCTag.tsx +29 -9
- package/src/components/JRCThemeProvider/animation.css +19 -0
- package/src/components/JRCThemeProvider/gabarit.css +4 -0
- package/src/components/JRCTooltip/JRCTooltip.tsx +5 -2
- package/src/hooks/UseDidMountEffect.tsx +1 -3
- package/src/index.tsx +9 -10
- package/src/styles/theme.tsx +3 -2
- package/src/translation/lang.json +3 -2
- package/src/types.ts +4 -0
- package/tsconfig.json +1 -0
- package/build/src/components/Form/Input/JRCFormTextEditor/JRCFormTextEditor.d.ts +0 -10
- package/build/src/components/Form/Input/JRCFormTextEditor/JRCFormTextEditor.stories.d.ts +0 -5
- package/src/components/Form/Input/JRCFormTextEditor/JRCFormTextEditor.stories.tsx +0 -30
- package/src/components/Form/Input/JRCFormTextEditor/JRCFormTextEditor.tsx +0 -36
- package/src/variables.scss +0 -67
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { withReduxForm } from '../../../../storybook/decorators';
|
|
3
|
-
import { JRCWritableFormInputProps } from '../JRCFormFieldRender';
|
|
4
|
-
import { JRCFormTextEditorField } from './JRCFormTextEditor';
|
|
5
|
-
import { Meta, Story } from '@storybook/react';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Inputs/old',
|
|
9
|
-
component: JRCFormTextEditorField,
|
|
10
|
-
decorators: [withReduxForm],
|
|
11
|
-
} as Meta;
|
|
12
|
-
|
|
13
|
-
const Template: Story<JRCWritableFormInputProps> = (args) => (
|
|
14
|
-
<>
|
|
15
|
-
<h1>Deprecated: use RichTextEditor</h1>
|
|
16
|
-
<JRCFormTextEditorField {...args} />
|
|
17
|
-
</>
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
export const InputTextEditor = Template.bind({});
|
|
21
|
-
InputTextEditor.args = {
|
|
22
|
-
name: 'name-storybook',
|
|
23
|
-
label: 'Article',
|
|
24
|
-
description: 'Ecrivez un article captivant pour vos auditeurs, ni trop long, ni trop court, juste suffisant.',
|
|
25
|
-
placeholder: "Moi, j'aime les haricots",
|
|
26
|
-
helper: { description: 'Si vis pacem, para bellum', title: 'Indication' },
|
|
27
|
-
minLength: 3,
|
|
28
|
-
maxLength: 2500,
|
|
29
|
-
required: false,
|
|
30
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Field, WrappedFieldInputProps } from 'redux-form';
|
|
3
|
-
import JRCFormFieldRender, { JRCWritableFormInputProps } from '../JRCFormFieldRender';
|
|
4
|
-
import { useControls } from '../ReduxFormControls';
|
|
5
|
-
import ReactQuill from 'react-quill';
|
|
6
|
-
import 'react-quill/dist/quill.snow.css';
|
|
7
|
-
import { useIntl } from 'react-intl';
|
|
8
|
-
|
|
9
|
-
const renderInput = (input: WrappedFieldInputProps) => {
|
|
10
|
-
return <ReactQuill theme="snow" value={input.value} onChange={input.onChange} />;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated The component @link JRCFormRichTextField must be used to replace JRCFormTextEditorField
|
|
15
|
-
* Component used as a rich text editor
|
|
16
|
-
* @param props JRCWritableFormInputProps
|
|
17
|
-
* validation props: minValue, maxValue, required
|
|
18
|
-
* @returns JSX.Element
|
|
19
|
-
*/
|
|
20
|
-
export const JRCFormTextEditorField = (props: JRCWritableFormInputProps) => {
|
|
21
|
-
const validate = useControls({
|
|
22
|
-
intl: useIntl(),
|
|
23
|
-
minLength: props.minLength,
|
|
24
|
-
maxLength: props.maxLength,
|
|
25
|
-
required: props.required,
|
|
26
|
-
});
|
|
27
|
-
return (
|
|
28
|
-
<Field
|
|
29
|
-
component={JRCFormFieldRender}
|
|
30
|
-
renderInputFct={(input: WrappedFieldInputProps) => renderInput(input)}
|
|
31
|
-
validate={validate}
|
|
32
|
-
htmlFor={props.name}
|
|
33
|
-
{...props}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
};
|
package/src/variables.scss
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// COLORS //
|
|
2
|
-
|
|
3
|
-
// Primary Color
|
|
4
|
-
$linkColor: rgb(52, 230, 243);
|
|
5
|
-
|
|
6
|
-
// Originals colors
|
|
7
|
-
$grey: #a7a7a7;
|
|
8
|
-
$blue: #3ec3ef;
|
|
9
|
-
$blueDark: #0064cd;
|
|
10
|
-
$green: #4dbf96;
|
|
11
|
-
$red: #f67370;
|
|
12
|
-
$yellow: #f8d120;
|
|
13
|
-
$orange: #f89406;
|
|
14
|
-
$pink: #c3325f;
|
|
15
|
-
$purple: #7a43b6;
|
|
16
|
-
|
|
17
|
-
// black to white
|
|
18
|
-
$black: #000000;
|
|
19
|
-
$white: #ffffff;
|
|
20
|
-
|
|
21
|
-
// --------------------------------- //
|
|
22
|
-
|
|
23
|
-
// TEXT //
|
|
24
|
-
|
|
25
|
-
// Fonts
|
|
26
|
-
$sansSerif: sans-serif;
|
|
27
|
-
|
|
28
|
-
// Line height
|
|
29
|
-
$lineHeightBase: 18px;
|
|
30
|
-
|
|
31
|
-
// Text Color
|
|
32
|
-
$textColor: #3f3f3f;
|
|
33
|
-
$textColorBlur: #858585;
|
|
34
|
-
|
|
35
|
-
// Text Weights
|
|
36
|
-
$fontWeightLight: 300;
|
|
37
|
-
$fontWeightBase: 400;
|
|
38
|
-
$fontWeightBold: 700;
|
|
39
|
-
|
|
40
|
-
// Text Sizes
|
|
41
|
-
$fontSizeHeader: 22px;
|
|
42
|
-
$fontSizeTitle: 18px;
|
|
43
|
-
$fontSizeBase: 14.5px;
|
|
44
|
-
$fontSizeSmall: 12px;
|
|
45
|
-
|
|
46
|
-
// Text Modal Window
|
|
47
|
-
$fontSizeTitleModal: 18px;
|
|
48
|
-
|
|
49
|
-
// --------------------------------- //
|
|
50
|
-
|
|
51
|
-
// PADDINGS & MARGINS (En cours de réflexion) //
|
|
52
|
-
|
|
53
|
-
// Paddings
|
|
54
|
-
$paddingLight: 4px;
|
|
55
|
-
$paddingBase: 8px;
|
|
56
|
-
$paddingMedium: 16px;
|
|
57
|
-
$paddingBold: 24px;
|
|
58
|
-
$paddingExtraBold: 32px;
|
|
59
|
-
$paddingBlack: 48px;
|
|
60
|
-
|
|
61
|
-
// Margins
|
|
62
|
-
$marginLight: 4px;
|
|
63
|
-
$marginBase: 8px;
|
|
64
|
-
$marginMedium: 16px;
|
|
65
|
-
$marginBold: 24px;
|
|
66
|
-
$marginExtraBold: 32px;
|
|
67
|
-
$marginBlack: 48px;
|