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.
Files changed (77) hide show
  1. package/.github/workflows/increment-npm-version.yml +26 -0
  2. package/build/jamespot-react-components.js +247 -231
  3. package/build/jamespot-react-components.js.LICENSE.txt +0 -16
  4. package/build/jamespot-react-components.js.map +1 -1
  5. package/build/src/components/Common/JRCConditionalWrapper.d.ts +4 -4
  6. package/build/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.d.ts +5 -2
  7. package/build/src/components/Form/Input/JRCInputDate/JRCInputDate.d.ts +11 -0
  8. package/build/src/components/Form/Input/JRCInputDate/JRCInputDate.stories.d.ts +5 -0
  9. package/build/src/components/Form/Input/JRCInputText/JRCInputText.d.ts +1 -1
  10. package/build/src/components/Form/Input/JRCInputTextarea/JRCInputTextarea.d.ts +15 -0
  11. package/build/src/components/Form/Input/JRCInputTextarea/JRCInputTextarea.stories.d.ts +5 -0
  12. package/build/src/components/JRCAppLeftColumn/JRCAppLeftColumn.d.ts +1 -1
  13. package/build/src/components/JRCButton/JRCButton.d.ts +25 -0
  14. package/build/src/components/JRCButton/JRCButtonConfig.d.ts +1 -2
  15. package/build/src/components/JRCEllipsis/JRCEllipsis.d.ts +5 -0
  16. package/build/src/components/JRCEllipsis/JRCEllipsis.stories.d.ts +5 -0
  17. package/build/src/components/JRCHref/JRCHref.d.ts +18 -10
  18. package/build/src/components/JRCImg/url.util.d.ts +3 -3
  19. package/build/src/components/JRCList/JRCList.d.ts +2 -0
  20. package/build/src/components/JRCModal/JRCModal.d.ts +5 -1
  21. package/build/src/components/JRCModal/JRCModal.styles.d.ts +0 -1
  22. package/build/src/components/JRCTag/JRCTag.d.ts +2 -0
  23. package/build/src/hooks/UseDidMountEffect.d.ts +1 -2
  24. package/build/src/index.d.ts +8 -7
  25. package/build/src/styles/theme.d.ts +1 -0
  26. package/build/src/types.d.ts +4 -0
  27. package/externals.d.ts +0 -1
  28. package/externals.json +2 -1
  29. package/package.json +5 -5
  30. package/src/components/Common/JRCConditionalWrapper.tsx +6 -13
  31. package/src/components/Form/Input/JRCFormColor/JRCFormColor.tsx +12 -12
  32. package/src/components/Form/Input/JRCFormEmail/JRCInputEmail.tsx +4 -8
  33. package/src/components/Form/Input/JRCFormSelect/JRCFormSelect.tsx +5 -1
  34. package/src/components/Form/Input/JRCFormSelect/JRCFormSelectTag.tsx +3 -1
  35. package/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.stories.tsx +1 -4
  36. package/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.tsx +12 -10
  37. package/src/components/Form/Input/JRCInputDate/JRCInputDate.stories.tsx +50 -0
  38. package/src/components/Form/Input/JRCInputDate/JRCInputDate.tsx +26 -0
  39. package/src/components/Form/Input/JRCInputText/JRCInputText.tsx +2 -2
  40. package/src/components/Form/Input/JRCInputTextarea/JRCInputTextarea.stories.tsx +52 -0
  41. package/src/components/Form/Input/JRCInputTextarea/JRCInputTextarea.tsx +36 -0
  42. package/src/components/Form/Input/JRCSelect/JRCInputSelect.tsx +1 -1
  43. package/src/components/JRCAppLeftColumn/JRCAppLeftColumn.tsx +1 -1
  44. package/src/components/JRCButton/JRCButton.stories.tsx +1 -1
  45. package/src/components/JRCButton/JRCButton.tsx +9 -3
  46. package/src/components/JRCButton/JRCButtonConfig.tsx +1 -1
  47. package/src/components/JRCButton/JRCValidationButton.tsx +10 -4
  48. package/src/components/JRCButtonDropdown/JRCButtonDropdown.tsx +2 -2
  49. package/src/components/JRCEllipsis/JRCEllipsis.stories.tsx +18 -0
  50. package/src/components/JRCEllipsis/JRCEllipsis.tsx +22 -0
  51. package/src/components/JRCHref/JRCHref.stories.tsx +2 -0
  52. package/src/components/JRCHref/JRCHref.tsx +42 -15
  53. package/src/components/JRCIcon/JRCIcon.tsx +1 -1
  54. package/src/components/JRCIconButton/JRCIconButton.tsx +1 -4
  55. package/src/components/JRCImg/JRCImg.tsx +4 -2
  56. package/src/components/JRCImg/url.util.ts +7 -6
  57. package/src/components/JRCImg/url.utils.test.ts +7 -1
  58. package/src/components/JRCList/JRCList.styles.tsx +16 -2
  59. package/src/components/JRCList/JRCList.tsx +5 -5
  60. package/src/components/JRCList/JRCListMockData.stories.tsx +1 -1
  61. package/src/components/JRCModal/JRCModal.styles.tsx +0 -6
  62. package/src/components/JRCModal/JRCModal.tsx +77 -62
  63. package/src/components/JRCTag/JRCTag.tsx +29 -9
  64. package/src/components/JRCThemeProvider/animation.css +19 -0
  65. package/src/components/JRCThemeProvider/gabarit.css +4 -0
  66. package/src/components/JRCTooltip/JRCTooltip.tsx +5 -2
  67. package/src/hooks/UseDidMountEffect.tsx +1 -3
  68. package/src/index.tsx +9 -10
  69. package/src/styles/theme.tsx +3 -2
  70. package/src/translation/lang.json +3 -2
  71. package/src/types.ts +4 -0
  72. package/tsconfig.json +1 -0
  73. package/build/src/components/Form/Input/JRCFormTextEditor/JRCFormTextEditor.d.ts +0 -10
  74. package/build/src/components/Form/Input/JRCFormTextEditor/JRCFormTextEditor.stories.d.ts +0 -5
  75. package/src/components/Form/Input/JRCFormTextEditor/JRCFormTextEditor.stories.tsx +0 -30
  76. package/src/components/Form/Input/JRCFormTextEditor/JRCFormTextEditor.tsx +0 -36
  77. 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
- };
@@ -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;