jamespot-react-components 1.3.84 → 1.3.86

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 (98) hide show
  1. package/README.md +2 -116
  2. package/dist/jamespot-react-components.cjs +1085 -1106
  3. package/dist/jamespot-react-components.js +12980 -13079
  4. package/dist/src/components/404/JRC404.stories.d.ts +4 -0
  5. package/dist/src/components/Drives/Dropbox/DropboxDocuments.d.ts +1 -4
  6. package/dist/src/components/Drives/JRCDriveDropbox.d.ts +2 -5
  7. package/dist/src/components/Drives/JRCDriveMSGraph.d.ts +2 -5
  8. package/dist/src/components/Drives/MicrosoftGraph/MSGraphDocuments.d.ts +1 -4
  9. package/dist/src/components/Drives/MicrosoftGraph/MSGraphGroups.d.ts +2 -5
  10. package/dist/src/components/Drives/MicrosoftGraph/MSGraphTenants.d.ts +2 -5
  11. package/dist/src/components/Drives/components/DriveAccountHeader.d.ts +2 -5
  12. package/dist/src/components/Drives/hooks.d.ts +1 -5
  13. package/dist/src/components/Editors/components/EditorButtonToggle.stories.d.ts +7 -0
  14. package/dist/src/components/Editors/components/EditorImageUpload.d.ts +2 -5
  15. package/dist/src/components/Editors/components/EditorInputCheckbox.stories.d.ts +8 -0
  16. package/dist/src/components/Editors/components/EditorInputImage.d.ts +1 -4
  17. package/dist/src/components/Editors/components/EditorInputNumber.stories.d.ts +8 -0
  18. package/dist/src/components/Editors/components/EditorInputToggle.stories.d.ts +7 -0
  19. package/dist/src/components/Editors/components/EditorRichText.d.ts +1 -5
  20. package/dist/src/components/Editors/components/EditorRichTextDialog.d.ts +1 -5
  21. package/dist/src/components/Form/Input/JRCInputFile/JRCInputFile.d.ts +3 -3
  22. package/dist/src/components/Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw.d.ts +1 -7
  23. package/dist/src/components/Form/Input/JRCInputText/JRCInputPassword.stories.d.ts +10 -0
  24. package/dist/src/components/Form/Input/JRCInputTextRaw/JRCInputTextRaw.stories.d.ts +45 -0
  25. package/dist/src/components/Form/Input/JRCInputTinyMCE/JRCInputTinyMCE.d.ts +2 -5
  26. package/dist/src/components/Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw.d.ts +1 -4
  27. package/dist/src/components/Form/Input/JRCSelect/JRCInputAudience.d.ts +0 -4
  28. package/dist/src/components/JRCAlbum/JRCAlbum.d.ts +1 -1
  29. package/dist/src/components/JRCAlbum/types.d.ts +1 -4
  30. package/dist/src/components/JRCAttachments/JRCAttachments.d.ts +2 -5
  31. package/dist/src/components/JRCCalendar/JRCCalendar.d.ts +1 -1
  32. package/dist/src/components/JRCCalendar/JRCCalendarModal.d.ts +2 -8
  33. package/dist/src/components/JRCCalendar/types.d.ts +1 -9
  34. package/dist/src/components/JRCCommentsBloc/JRCComment.d.ts +2 -12
  35. package/dist/src/components/JRCCommentsBloc/JRCCommentsBloc.d.ts +2 -12
  36. package/dist/src/components/JRCCommentsBloc/components/EditComment.d.ts +2 -8
  37. package/dist/src/components/JRCCommentsBloc/components/NewComment.d.ts +2 -8
  38. package/dist/src/components/JRCConfirmationModal/JRCConfirmationModal.stories.d.ts +6 -0
  39. package/dist/src/components/JRCFileViewer/JRCFileViewerOpenWithOptions.stories.d.ts +7 -0
  40. package/dist/src/components/JRCHtml/JRCHtml.d.ts +7 -13
  41. package/dist/src/components/JRCList/JRCListMockData.stories.d.ts +7 -1
  42. package/dist/src/components/JRCProvider/JRCContext.d.ts +5 -0
  43. package/dist/src/components/JRCProvider/JRCProvider.d.ts +9 -0
  44. package/dist/src/components/JRCSkeleton/JRCSkeletonList.stories.d.ts +7 -0
  45. package/dist/src/components/JRCSocialActions/JRCSocialActions.d.ts +2 -5
  46. package/dist/src/components/JRCUserPopup/JRCUserPopup.d.ts +2 -5
  47. package/dist/src/components/JRCUserPopup/JRCUserPopup.stories.d.ts +5 -4
  48. package/dist/src/components/Templates/JRCTwoColumns.template.stories.d.ts +7 -0
  49. package/dist/src/components/Widgets/JRCWidgetAccessibility/JRCWidgetAccessibility.stories.d.ts +7 -0
  50. package/dist/src/components/Widgets/JRCWidgetAccessibility/JRCWidgetAccessibilityEditor.stories.d.ts +7 -0
  51. package/dist/src/components/Widgets/JRCWidgetArticleSlider/JRCWidgetArticleSliderEditor.d.ts +2 -5
  52. package/dist/src/components/Widgets/JRCWidgetArticleSlider/JRCWidgetArticleSliderEditorSlide.d.ts +2 -5
  53. package/dist/src/components/Widgets/JRCWidgetArticleSlider/JRCWidgetArticleSliderEditorSlideRemove.stories.d.ts +7 -0
  54. package/dist/src/components/Widgets/JRCWidgetArticleText/JRCWidgetArticleText.d.ts +2 -5
  55. package/dist/src/components/Widgets/JRCWidgetArticleTitle/JRCWidgetArticleTitle.stories.d.ts +8 -0
  56. package/dist/src/components/Widgets/JRCWidgetCalendarCalDav/JRCWidgetCalendarCalDav.stories.d.ts +7 -0
  57. package/dist/src/components/Widgets/JRCWidgetCalendarCalDav/JRCWidgetCalendarCalDavEditor.stories.d.ts +6 -0
  58. package/dist/src/components/Widgets/JRCWidgetCheckList/JRCWidgetCheckListEditor.d.ts +2 -5
  59. package/dist/src/components/Widgets/JRCWidgetCheckList/JRCWidgetCheckListImage.stories.d.ts +7 -0
  60. package/dist/src/components/Widgets/JRCWidgetCheckList/JRCWidgetCheckListItem.d.ts +1 -4
  61. package/dist/src/components/Widgets/JRCWidgetColor/JRCWidgetColor.stories.d.ts +8 -0
  62. package/dist/src/components/Widgets/JRCWidgetColor/JRCWidgetColorEditor.stories.d.ts +7 -0
  63. package/dist/src/components/Widgets/JRCWidgetContactCardDav/JRCWidgetContactCardDav.stories.d.ts +7 -0
  64. package/dist/src/components/Widgets/JRCWidgetContactCardDav/JRCWidgetContactCardDavEditor.stories.d.ts +6 -0
  65. package/dist/src/components/Widgets/JRCWidgetCover/JRCWidgetCoverEditor.d.ts +1 -1
  66. package/dist/src/components/Widgets/JRCWidgetEmailsImap/JRCWidgetEmailsImap.stories.d.ts +8 -0
  67. package/dist/src/components/Widgets/JRCWidgetEmailsImap/JRCWidgetEmailsImapEditor.stories.d.ts +6 -0
  68. package/dist/src/components/Widgets/JRCWidgetEmailsImap/JRCWidgetEmailsImapLevel2.stories.d.ts +8 -0
  69. package/dist/src/components/Widgets/JRCWidgetEmptyInplace.stories.d.ts +6 -0
  70. package/dist/src/components/Widgets/JRCWidgetExtension/JRCWidgetExtensionEditor.stories.d.ts +7 -0
  71. package/dist/src/components/Widgets/JRCWidgetIcon.stories.d.ts +8 -0
  72. package/dist/src/components/Widgets/JRCWidgetImage/JRCWidgetArticleImageEditor.d.ts +2 -5
  73. package/dist/src/components/Widgets/JRCWidgetLuccaAbsence/JRCWidgetLuccaAbsence.stories.d.ts +7 -0
  74. package/dist/src/components/Widgets/JRCWidgetLuccaAbsence/JRCWidgetLuccaAbsenceEditor.stories.d.ts +6 -0
  75. package/dist/src/components/Widgets/JRCWidgetPresence/JRCWidgetPresenceEditor.stories.d.ts +8 -0
  76. package/dist/src/components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurvey.d.ts +1 -1
  77. package/dist/src/components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurveyEditor.d.ts +2 -5
  78. package/dist/src/components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurveyEditorAddEntry.stories.d.ts +6 -0
  79. package/dist/src/components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurveyEditorEntries.d.ts +2 -5
  80. package/dist/src/components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurveyImage.stories.d.ts +7 -0
  81. package/dist/src/components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurveyItemWrapper.d.ts +1 -4
  82. package/dist/src/components/Widgets/JRCWidgetSlider/JRCWidgetSliderEditor.d.ts +2 -5
  83. package/dist/src/components/Widgets/JRCWidgetSlider/JRCWidgetSliderEditorSlide.d.ts +2 -5
  84. package/dist/src/components/Widgets/JRCWidgetSlider/components/CoverSliderSlide.stories.d.ts +6 -0
  85. package/dist/src/components/Widgets/JRCWidgetText/JRCWidgetText.stories.d.ts +8 -0
  86. package/dist/src/components/Widgets/JRCWidgetText/JRCWidgetTextEditor.d.ts +3 -6
  87. package/dist/src/hooks/UseImageLoader.stories.d.ts +7 -0
  88. package/dist/src/hooks/index.d.ts +2 -1
  89. package/dist/src/hooks/useApi.d.ts +2 -0
  90. package/dist/src/hooks/useRefSize.stories.d.ts +4 -0
  91. package/dist/src/index.d.ts +2 -2
  92. package/dist/src/types.d.ts +1 -1
  93. package/dist/src/utils/utils.html.d.ts +4 -0
  94. package/package.json +24 -49
  95. package/dist/src/components/JRCThemeProvider/JRCThemeProvider.d.ts +0 -10
  96. package/jamespot-react-components@1.3.14 +0 -0
  97. package/vite +0 -0
  98. /package/dist/src/components/404/{index.d.ts → JRC404.d.ts} +0 -0
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const LoadsImage: StoryObj;
5
+ export declare const LoadsImageWithMaxWidth: StoryObj;
6
+ export declare const HandlesError: StoryObj;
7
+ export declare const SkipsLoadWhenDelayIsZero: StoryObj;
@@ -1,4 +1,6 @@
1
+ export { useCalendarDate } from '../components/JRCCalendar/useCalendarDate';
1
2
  export { useAbortController } from './useAbortController';
3
+ export { useApi } from './useApi';
2
4
  export { useCancelOnUnmount } from './useCancelOnUnmount';
3
5
  export { useDebounce } from './UseDebounce';
4
6
  export { useDidMountEffect } from './UseDidMountEffect';
@@ -8,4 +10,3 @@ export { useRefSize } from './useRefSize';
8
10
  export { useThemeContext } from './useThemeContext';
9
11
  export { useTimeout } from './UseTimeout';
10
12
  export { useWindowSize } from './useWindowSize';
11
- export { useCalendarDate } from '../components/JRCCalendar/useCalendarDate';
@@ -0,0 +1,2 @@
1
+ import { JamespotUserApi } from 'jamespot-user-api';
2
+ export declare const useApi: () => JamespotUserApi;
@@ -0,0 +1,4 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const MeasuresElement: StoryObj;
@@ -4,12 +4,12 @@ declare global {
4
4
  export { default as Theme } from './styles/theme';
5
5
  export { default as Resources } from './translation';
6
6
  export * as components from './components';
7
- export { JRC404 } from './components/404';
7
+ export { JRC404 } from './components/404/JRC404';
8
8
  export { FocusVisibleOutline } from './components/Common/Outline';
9
9
  export { SkipToContent } from './components/Common/SkipToContent';
10
10
  export { SROnly } from './components/Common/SROnly';
11
11
  export { JTinyMCEExtensionsBuilders } from './components/Form/Input/JRCInputTinyMCERaw/extensions/JTinyMCEExtensions';
12
- export { JRCThemeProvider } from './components/JRCThemeProvider/JRCThemeProvider';
12
+ export { JRCProvider } from './components/JRCProvider/JRCProvider';
13
13
  export * from './hooks';
14
14
  export * from './types';
15
15
  export { getColor } from './styles/theme';
@@ -74,7 +74,7 @@ export type { JRCSkeletonLineProps } from './components/JRCSkeleton/JRCSkeletonL
74
74
  export type { JRCSkeletonSquareProps } from './components/JRCSkeleton/JRCSkeletonSquare';
75
75
  export type { ItemEntriesProps, JRCTabPanelProps, JRCTabsProps } from './components/JRCTabs/JRCTabs';
76
76
  export type { JRCTagProps } from './components/JRCTag/JRCTag';
77
- export type { JRCThemeProviderProps } from './components/JRCThemeProvider/JRCThemeProvider';
77
+ export type { JRCProviderProps } from './components/JRCProvider/JRCProvider';
78
78
  export type { JRCBaseTooltipProps } from './components/JRCTooltip/JRCBaseTooltip';
79
79
  export type { JRCTooltipProps } from './components/JRCTooltip/types';
80
80
  export type { JRCH1Props, JRCH2Props, JRCH3Props, JRCH4Props, JRCH5Props, JRCTextProps, } from './components/JRCTypo/JRCTypo';
@@ -1,3 +1,7 @@
1
1
  export declare function sanitizeHtml(dirtyHtml?: string): string;
2
+ export declare function truncateHtml(html: string, maxChars: number): {
3
+ html: string;
4
+ truncated: boolean;
5
+ };
2
6
  export declare const htmlDecodeSpecialChars: (str: string) => string;
3
7
  export declare function decodeHtml(html: string): string;
package/package.json CHANGED
@@ -1,35 +1,31 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.3.84",
3
+ "version": "1.3.86",
4
4
  "description": "",
5
5
  "main": "dist/jamespot-react-components.cjs",
6
6
  "module": "dist/jamespot-react-components.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "type": "module",
9
- "nyc": {
10
- "sourceMap": false,
11
- "instrument": false
12
- },
13
9
  "keywords": [],
14
10
  "author": "",
15
11
  "peerDependencies": {
16
12
  "@tanstack/react-table": "^8.21.3",
17
- "@types/react": "^19.2.9",
13
+ "@types/react": "^19.2.14",
18
14
  "@types/react-dom": "^19.2.3",
19
15
  "jamespot-front-business": "*",
20
16
  "jamespot-user-api": "*",
21
- "react": "^19.2.3",
17
+ "react": "^19.2.4",
22
18
  "react-dnd": "^14.0.5",
23
19
  "react-dnd-html5-backend": "^14.1.0",
24
- "react-dom": "^19.2.3",
25
- "react-hook-form": "^7.71.1",
20
+ "react-dom": "^19.2.4",
21
+ "react-hook-form": "^7.72.0",
26
22
  "react-intl": "^7.1.14",
27
23
  "react-router-dom": "^6.30.3",
28
- "styled-components": "^6.3.8",
24
+ "styled-components": "^6.3.12",
29
25
  "tinymce": "7.5.1"
30
26
  },
31
27
  "devDependencies": {
32
- "@chromatic-com/storybook": "^4.1.3",
28
+ "@chromatic-com/storybook": "^5.1.2",
33
29
  "@eslint/js": "^9.39.4",
34
30
  "@fullcalendar/core": "^6.1.20",
35
31
  "@fullcalendar/daygrid": "^6.1.20",
@@ -37,33 +33,21 @@
37
33
  "@fullcalendar/list": "^6.1.20",
38
34
  "@fullcalendar/react": "^6.1.20",
39
35
  "@fullcalendar/timegrid": "^6.1.20",
40
- "@istanbuljs/nyc-config-typescript": "^1.0.2",
41
- "@lcov-viewer/istanbul-report": "^1.4.0",
42
- "@storybook/addon-a11y": "9.1.16",
43
- "@storybook/addon-coverage": "^2.0.0",
44
- "@storybook/addon-docs": "9.1.16",
45
- "@storybook/addon-links": "9.1.16",
46
- "@storybook/react-vite": "9.1.16",
47
- "@storybook/test-runner": "^0.23.0",
36
+ "@storybook/addon-a11y": "10.3.6",
37
+ "@storybook/addon-links": "10.3.6",
38
+ "@storybook/addon-vitest": "10.3.6",
39
+ "@storybook/react-vite": "10.3.6",
48
40
  "@tanstack/react-table": "^8.21.3",
49
- "@testing-library/dom": "^8.20.1",
50
- "@testing-library/jest-dom": "^6.9.1",
51
- "@testing-library/react": "^14.3.1",
52
- "@testing-library/react-hooks": "^5.1.3",
53
- "@testing-library/user-event": "^13.5.0",
41
+ "@testing-library/dom": "^10.4.1",
42
+ "@testing-library/react": "^16.3.2",
54
43
  "@tinymce/tinymce-react": "^6.3.0",
55
- "@types/chroma-js": "^2.4.5",
56
- "@types/jest": "^30.0.0",
57
44
  "@types/node": "^24.12.0",
58
45
  "@types/react": "^19.2.14",
59
46
  "@types/react-dom": "^19.2.3",
60
- "@types/testing-library__jest-dom": "^5.14.9",
61
47
  "@types/uuid": "^10.0.0",
62
48
  "@vitejs/plugin-react": "^5.2.0",
63
- "chroma-js": "^3.2.0",
64
- "classnames": "^2.5.1",
65
- "concurrently": "^9.2.1",
66
- "cross-env": "^10.1.0",
49
+ "@vitest/browser-playwright": "^4.1.5",
50
+ "@vitest/coverage-v8": "^4.1.5",
67
51
  "date-fns": "^4.1.0",
68
52
  "dompurify": "^3.3.3",
69
53
  "eslint": "^9.39.4",
@@ -72,16 +56,14 @@
72
56
  "eslint-plugin-import": "^2.32.0",
73
57
  "eslint-plugin-react": "^7.37.5",
74
58
  "eslint-plugin-react-hooks": "^7.0.1",
75
- "eslint-plugin-storybook": "9.1.16",
59
+ "eslint-plugin-storybook": "10.3.6",
76
60
  "globals": "^16.5.0",
77
61
  "html2canvas": "^1.4.1",
78
- "jamespot-front-business": "^1.3.84",
79
- "jamespot-user-api": "^1.3.84",
80
- "jest": "^30.3.0",
81
- "jest-environment-jsdom": "^30.3.0",
62
+ "jamespot-front-business": "^1.3.86",
63
+ "jamespot-user-api": "^1.3.86",
64
+ "jsdom": "^26.1.0",
82
65
  "knip": "^5.88.1",
83
66
  "lint-staged": "^16.4.0",
84
- "nyc": "^17.1.0",
85
67
  "playwright": "^1.59.0",
86
68
  "prettier": "^3.8.1",
87
69
  "react": "^19.2.4",
@@ -97,18 +79,16 @@
97
79
  "react-router-dom": "^6.30.3",
98
80
  "react-tooltip": "^5.30.0",
99
81
  "react-transition-state": "^2.3.3",
100
- "storybook": "9.1.16",
82
+ "storybook": "10.3.6",
101
83
  "styled-components": "^6.3.12",
102
84
  "tinymce": "7.5.1",
103
- "ts-jest": "^29.4.6",
104
- "ts-node": "^10.9.2",
105
85
  "typescript": "^5.9.3",
106
86
  "typescript-eslint": "^8.58.0",
107
87
  "uuid": "^10.0.0",
108
88
  "vite": "^7.3.1",
109
89
  "vite-plugin-css-injected-by-js": "^3.5.2",
110
90
  "vite-plugin-dts": "^4.5.4",
111
- "wait-on": "^9.0.4"
91
+ "vitest": "^4.1.5"
112
92
  },
113
93
  "lint-staged": {
114
94
  "*.{js,jsx,ts,tsx}": [
@@ -131,13 +111,8 @@
131
111
  "lint": "eslint",
132
112
  "lint:fix": "eslint --fix",
133
113
  "storybook": "storybook dev -p 6006",
134
- "storybook:serve": "pnpm storybook --quiet --ci",
135
- "storybook:test": "wait-on tcp:6006 && pnpm test:storybook:standalone",
136
- "storybook-no-cache": "cross-env NODE_ENV=development STORYBOOK_MODE=true PUBLIC_PATH='' storybook dev -s ./.storybook/assets/ -c .storybook -p 3022 --no-manager-cache",
137
- "test": "pnpm test:jest && pnpm test:storybook",
138
- "test:clearJest": "jest --clearCache",
139
- "test:jest": "cross-env NODE_ENV=test jest --runInBand --detectOpenHandles --logHeapUsage",
140
- "test:storybook": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm storybook:serve\" \"pnpm storybook:test\"",
141
- "test:storybook:standalone": "test-storybook --maxWorkers=1 --coverage"
114
+ "test": "vitest run --coverage",
115
+ "test:unit": "vitest run --project=unit",
116
+ "test:storybook": "vitest run --project=storybook"
142
117
  }
143
118
  }
@@ -1,10 +0,0 @@
1
- import { ReactNode } from 'react';
2
- /**
3
- * Props Type for JRCThemeProviderProps
4
- * @member children : enclosed React component
5
- */
6
- export interface JRCThemeProviderProps {
7
- layout?: boolean;
8
- children: ReactNode;
9
- }
10
- export declare const JRCThemeProvider: ({ layout, children }: JRCThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
File without changes
package/vite DELETED
File without changes