@edifice.io/react 2.0.0-develop-rc.22 → 2.0.0-develop-rc.23

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 (209) hide show
  1. package/dist/components/Alert/Alert.d.ts +3 -3
  2. package/dist/components/AppHeader/AppHeader.d.ts +1 -1
  3. package/dist/components/AppIcon/AppIcon.d.ts +6 -6
  4. package/dist/components/AppIcon/AppIcon.js +14 -14
  5. package/dist/components/Attachment/Attachment.d.ts +1 -1
  6. package/dist/components/Avatar/Avatar.d.ts +3 -3
  7. package/dist/components/Avatar/Avatar.js +2 -2
  8. package/dist/components/Badge/Badge.d.ts +8 -8
  9. package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  10. package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +1 -1
  11. package/dist/components/Button/Button.d.ts +5 -5
  12. package/dist/components/Button/IconButton.d.ts +1 -1
  13. package/dist/components/Button/SearchButton.d.ts +1 -1
  14. package/dist/components/Card/CardContext.d.ts +1 -1
  15. package/dist/components/ColorPicker/ColorPalette.d.ts +1 -1
  16. package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
  17. package/dist/components/Combobox/ComboboxTrigger.d.ts +1 -1
  18. package/dist/components/Dropdown/Dropdown.d.ts +1 -1
  19. package/dist/components/Dropdown/DropdownContext.d.ts +1 -1
  20. package/dist/components/Dropdown/DropdownItem.d.ts +1 -1
  21. package/dist/components/Dropdown/DropdownMenu.d.ts +2 -2
  22. package/dist/components/Dropdown/DropdownTrigger.d.ts +3 -3
  23. package/dist/components/Form/FormContext.d.ts +1 -1
  24. package/dist/components/Form/FormControl.d.ts +2 -2
  25. package/dist/components/Grid/Grid.d.ts +1 -1
  26. package/dist/components/Heading/Heading.d.ts +1 -1
  27. package/dist/components/Image/Image.d.ts +3 -3
  28. package/dist/components/Image/Image.js +2 -2
  29. package/dist/components/Input/Input.d.ts +2 -2
  30. package/dist/components/Label/Label.d.ts +2 -2
  31. package/dist/components/Layout/components/Main.d.ts +1 -1
  32. package/dist/components/Layout/components/NavItem.d.ts +1 -1
  33. package/dist/components/Layout/components/NavbarNav.d.ts +1 -1
  34. package/dist/components/Loading/Loading.d.ts +1 -1
  35. package/dist/components/LoadingScreen/LoadingScreen.js +3 -3
  36. package/dist/components/Menu/components/MenuButton.d.ts +1 -1
  37. package/dist/components/Menu/hooks/useMenu.d.ts +1 -1
  38. package/dist/components/Modal/Modal.d.ts +1 -1
  39. package/dist/components/SearchBar/SearchBar.d.ts +1 -1
  40. package/dist/components/Select/Select.d.ts +1 -1
  41. package/dist/components/TextArea/TextArea.d.ts +2 -2
  42. package/dist/components/Toolbar/Toolbar.d.ts +9 -9
  43. package/dist/components/Tooltip/Tooltip.d.ts +2 -2
  44. package/dist/components/Tree/types/index.d.ts +1 -1
  45. package/dist/hooks/index.d.ts +0 -1
  46. package/dist/hooks/useDate/useDate.js +4 -4
  47. package/dist/hooks/useUpload/useUpload.js +4 -4
  48. package/dist/index.js +66 -66
  49. package/dist/modules/audience/ReactionModal.Card.d.ts +1 -1
  50. package/dist/modules/comments/hooks/useComments.js +4 -4
  51. package/dist/modules/comments/types.d.ts +3 -3
  52. package/dist/modules/editor/components/Editor/Editor.d.ts +4 -4
  53. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.d.ts +1 -1
  54. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.d.ts +1 -1
  55. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.d.ts +1 -1
  56. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.d.ts +1 -1
  57. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.d.ts +1 -1
  58. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.d.ts +1 -1
  59. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +1 -1
  60. package/dist/modules/editor/components/Renderer/MediaRenderer.js +1 -4
  61. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +1 -1
  62. package/dist/modules/editor/hooks/useActionOptions.d.ts +1 -1
  63. package/dist/modules/icons/components/apps/IconAccount.js +1 -1
  64. package/dist/modules/icons/components/apps/IconActualites.js +1 -1
  65. package/dist/modules/icons/components/apps/IconAdmin.js +1 -1
  66. package/dist/modules/icons/components/apps/IconAdminPortal.js +1 -1
  67. package/dist/modules/icons/components/apps/IconAdmissionPostBac.js +1 -1
  68. package/dist/modules/icons/components/apps/IconAgenda.js +1 -1
  69. package/dist/modules/icons/components/apps/IconArchive.js +1 -1
  70. package/dist/modules/icons/components/apps/IconAssistance.js +1 -1
  71. package/dist/modules/icons/components/apps/IconAssr.js +1 -1
  72. package/dist/modules/icons/components/apps/IconAward.js +1 -1
  73. package/dist/modules/icons/components/apps/IconBanquesavoir.js +1 -1
  74. package/dist/modules/icons/components/apps/IconBcdi.js +1 -1
  75. package/dist/modules/icons/components/apps/IconBiblionisep.js +1 -1
  76. package/dist/modules/icons/components/apps/IconBlog.js +1 -1
  77. package/dist/modules/icons/components/apps/IconBookmarkEmpty.js +1 -1
  78. package/dist/modules/icons/components/apps/IconCahierDeTexte.js +1 -1
  79. package/dist/modules/icons/components/apps/IconCahierTextes.js +1 -1
  80. package/dist/modules/icons/components/apps/IconCalendar.js +1 -1
  81. package/dist/modules/icons/components/apps/IconCanalNumerique.js +1 -1
  82. package/dist/modules/icons/components/apps/IconCcn.js +1 -1
  83. package/dist/modules/icons/components/apps/IconCerise.js +1 -1
  84. package/dist/modules/icons/components/apps/IconCervoprint.js +1 -1
  85. package/dist/modules/icons/components/apps/IconCharlemagne.js +1 -1
  86. package/dist/modules/icons/components/apps/IconCharte.js +1 -1
  87. package/dist/modules/icons/components/apps/IconChat.js +1 -1
  88. package/dist/modules/icons/components/apps/IconCidj.js +1 -1
  89. package/dist/modules/icons/components/apps/IconCns.js +1 -1
  90. package/dist/modules/icons/components/apps/IconCollaborativeWall.js +1 -1
  91. package/dist/modules/icons/components/apps/IconCompetences.js +1 -1
  92. package/dist/modules/icons/components/apps/IconConnecteurGenerique1.js +1 -1
  93. package/dist/modules/icons/components/apps/IconConnecteurGenerique2.js +1 -1
  94. package/dist/modules/icons/components/apps/IconConversation.js +1 -1
  95. package/dist/modules/icons/components/apps/IconDirectory.js +1 -1
  96. package/dist/modules/icons/components/apps/IconEducagri.js +1 -1
  97. package/dist/modules/icons/components/apps/IconEdumedia.js +1 -1
  98. package/dist/modules/icons/components/apps/IconEdumoov.js +1 -1
  99. package/dist/modules/icons/components/apps/IconEdutheque.js +1 -1
  100. package/dist/modules/icons/components/apps/IconElectron.js +1 -1
  101. package/dist/modules/icons/components/apps/IconElyceepicardie.js +1 -1
  102. package/dist/modules/icons/components/apps/IconEsidoc.js +1 -1
  103. package/dist/modules/icons/components/apps/IconEuropress.js +1 -1
  104. package/dist/modules/icons/components/apps/IconExercizer.js +1 -1
  105. package/dist/modules/icons/components/apps/IconForum.js +1 -1
  106. package/dist/modules/icons/components/apps/IconGepi.js +1 -1
  107. package/dist/modules/icons/components/apps/IconGlpi.js +1 -1
  108. package/dist/modules/icons/components/apps/IconHiboutheque.js +1 -1
  109. package/dist/modules/icons/components/apps/IconItopstore.js +1 -1
  110. package/dist/modules/icons/components/apps/IconKne.js +1 -1
  111. package/dist/modules/icons/components/apps/IconLeSiteTv.js +1 -1
  112. package/dist/modules/icons/components/apps/IconLemonde.js +1 -1
  113. package/dist/modules/icons/components/apps/IconLesechos.js +1 -1
  114. package/dist/modules/icons/components/apps/IconLibrary.js +1 -1
  115. package/dist/modules/icons/components/apps/IconLsu.js +1 -1
  116. package/dist/modules/icons/components/apps/IconMadmagz.js +1 -1
  117. package/dist/modules/icons/components/apps/IconMatholycee.js +1 -1
  118. package/dist/modules/icons/components/apps/IconMaxicours.js +1 -1
  119. package/dist/modules/icons/components/apps/IconMediacentre.js +1 -1
  120. package/dist/modules/icons/components/apps/IconMindmap.js +1 -1
  121. package/dist/modules/icons/components/apps/IconMonorientationenligne.js +1 -1
  122. package/dist/modules/icons/components/apps/IconMonstageenligne.js +1 -1
  123. package/dist/modules/icons/components/apps/IconMoodle.js +1 -1
  124. package/dist/modules/icons/components/apps/IconMuseefrancaisphoto.js +1 -1
  125. package/dist/modules/icons/components/apps/IconMyNetwork.js +1 -1
  126. package/dist/modules/icons/components/apps/IconNetvibes.js +1 -1
  127. package/dist/modules/icons/components/apps/IconNote.js +1 -1
  128. package/dist/modules/icons/components/apps/IconNotebook.js +1 -1
  129. package/dist/modules/icons/components/apps/IconNotes.js +1 -1
  130. package/dist/modules/icons/components/apps/IconOnisep.js +1 -1
  131. package/dist/modules/icons/components/apps/IconOnisep2.js +1 -1
  132. package/dist/modules/icons/components/apps/IconPad.js +1 -1
  133. package/dist/modules/icons/components/apps/IconPages.js +1 -1
  134. package/dist/modules/icons/components/apps/IconParametrage.js +1 -1
  135. package/dist/modules/icons/components/apps/IconParametrages.js +1 -1
  136. package/dist/modules/icons/components/apps/IconParaschool.js +1 -1
  137. package/dist/modules/icons/components/apps/IconParcours.js +1 -1
  138. package/dist/modules/icons/components/apps/IconPearltrees.js +1 -1
  139. package/dist/modules/icons/components/apps/IconPicardieCursus.js +1 -1
  140. package/dist/modules/icons/components/apps/IconPoll.js +1 -1
  141. package/dist/modules/icons/components/apps/IconProeps.js +1 -1
  142. package/dist/modules/icons/components/apps/IconPronote.js +1 -1
  143. package/dist/modules/icons/components/apps/IconPublic.js +1 -1
  144. package/dist/modules/icons/components/apps/IconQwant.js +1 -1
  145. package/dist/modules/icons/components/apps/IconQwantJunior.js +1 -1
  146. package/dist/modules/icons/components/apps/IconRack.js +1 -1
  147. package/dist/modules/icons/components/apps/IconRbs.js +1 -1
  148. package/dist/modules/icons/components/apps/IconResidenceArtiste.js +1 -1
  149. package/dist/modules/icons/components/apps/IconRessourcesdepartementale91.js +1 -1
  150. package/dist/modules/icons/components/apps/IconSacoche.js +1 -1
  151. package/dist/modules/icons/components/apps/IconSchoolbook.js +1 -1
  152. package/dist/modules/icons/components/apps/IconScolinfo.js +1 -1
  153. package/dist/modules/icons/components/apps/IconScrapbook.js +1 -1
  154. package/dist/modules/icons/components/apps/IconSearchengine.js +1 -1
  155. package/dist/modules/icons/components/apps/IconSettingsClass.js +1 -1
  156. package/dist/modules/icons/components/apps/IconSharebigfiles.js +1 -1
  157. package/dist/modules/icons/components/apps/IconStatistics.js +1 -1
  158. package/dist/modules/icons/components/apps/IconStats.js +1 -1
  159. package/dist/modules/icons/components/apps/IconSuitcase.js +1 -1
  160. package/dist/modules/icons/components/apps/IconSupport.js +1 -1
  161. package/dist/modules/icons/components/apps/IconTimeline.js +1 -1
  162. package/dist/modules/icons/components/apps/IconTimelinegenerator.js +1 -1
  163. package/dist/modules/icons/components/apps/IconTurboself.js +1 -1
  164. package/dist/modules/icons/components/apps/IconUniversalis.js +1 -1
  165. package/dist/modules/icons/components/apps/IconUnstagepourtous.js +1 -1
  166. package/dist/modules/icons/components/apps/IconUserbook.js +1 -1
  167. package/dist/modules/icons/components/apps/IconVideo.js +1 -1
  168. package/dist/modules/icons/components/apps/IconVieScolaire.js +1 -1
  169. package/dist/modules/icons/components/apps/IconVisioconf.js +1 -1
  170. package/dist/modules/icons/components/apps/IconWebclasseur.js +1 -1
  171. package/dist/modules/icons/components/apps/IconWebsite.js +1 -1
  172. package/dist/modules/icons/components/apps/IconWiki.js +2 -2
  173. package/dist/modules/icons/components/apps/IconWorkspace.js +1 -1
  174. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +2 -3
  175. package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +3 -3
  176. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +2 -2
  177. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
  178. package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +8 -8
  179. package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +2 -2
  180. package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.d.ts +1 -1
  181. package/dist/modules/multimedia/ImageEditor/effects/blur.d.ts +1 -1
  182. package/dist/modules/multimedia/ImageEditor/effects/crop.d.ts +2 -2
  183. package/dist/modules/multimedia/ImageEditor/effects/misc.d.ts +1 -1
  184. package/dist/modules/multimedia/ImageEditor/effects/resize.d.ts +1 -1
  185. package/dist/modules/multimedia/ImageEditor/effects/rotate.d.ts +1 -1
  186. package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.d.ts +1 -1
  187. package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.d.ts +1 -1
  188. package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.d.ts +1 -1
  189. package/dist/modules/multimedia/ImagePicker/ImagePicker.d.ts +1 -1
  190. package/dist/modules/multimedia/Linker/ExternalLinker/ExternalLinker.d.ts +2 -2
  191. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +4 -4
  192. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +7 -7
  193. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -1
  194. package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.d.ts +2 -2
  195. package/dist/modules/multimedia/UploadCard/UploadCard.js +5 -5
  196. package/dist/modules/multimedia/VideoEmbed/VideoEmbed.d.ts +1 -1
  197. package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +3 -3
  198. package/dist/modules/multimedia/Workspace/Workspace.js +3 -3
  199. package/dist/providers/EdificeThemeProvider/EdificeThemeProvider.context.d.ts +1 -1
  200. package/dist/types/size.d.ts +1 -1
  201. package/dist/types/status.d.ts +1 -1
  202. package/dist/utilities/emptyscreen-mapping/emptyscreen-mapping.d.ts +6 -0
  203. package/dist/utilities/emptyscreen-mapping/emptyscreen-mapping.js +49 -0
  204. package/dist/utilities/emptyscreen-mapping/index.d.ts +1 -0
  205. package/dist/utilities/index.d.ts +1 -0
  206. package/package.json +15 -8
  207. package/dist/hooks/usePaths/index.d.ts +0 -1
  208. package/dist/hooks/usePaths/usePaths.d.ts +0 -1
  209. package/dist/hooks/usePaths/usePaths.js +0 -7
@@ -3,9 +3,9 @@ export interface AlertRef {
3
3
  show: () => void;
4
4
  hide: () => void;
5
5
  }
6
- export type AlertTypes = "success" | "warning" | "info" | "danger";
7
- export type AlertPosition = "none" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
8
- export interface AlertProps extends ComponentPropsWithRef<"div"> {
6
+ export type AlertTypes = 'success' | 'warning' | 'info' | 'danger';
7
+ export type AlertPosition = 'none' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
8
+ export interface AlertProps extends ComponentPropsWithRef<'div'> {
9
9
  /**
10
10
  * Type of alert
11
11
  */
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithRef, ReactNode } from 'react';
2
- export interface AppHeaderProps extends ComponentPropsWithRef<"div"> {
2
+ export interface AppHeaderProps extends ComponentPropsWithRef<'div'> {
3
3
  /**
4
4
  * Accept Breadcrumb Component
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { IWebApp } from '@edifice.io/ts-client';
2
- export type AppIconSize = "24" | "32" | "40" | "48" | "80" | "160";
2
+ export type AppIconSize = '24' | '32' | '40' | '48' | '80' | '160';
3
3
  export interface BaseProps {
4
4
  /**
5
5
  * Define icon size
@@ -14,13 +14,13 @@ export interface BaseProps {
14
14
  */
15
15
  className?: string;
16
16
  }
17
- type AppVariants = "square" | "circle" | "rounded";
18
- type SquareVariant = Extract<AppVariants, "square">;
17
+ type AppVariants = 'square' | 'circle' | 'rounded';
18
+ type SquareVariant = Extract<AppVariants, 'square'>;
19
19
  type SquareIcon = {
20
20
  /**
21
21
  * Show icon full width
22
22
  */
23
- iconFit?: "contain";
23
+ iconFit?: 'contain';
24
24
  /**
25
25
  * Square variant
26
26
  */
@@ -30,7 +30,7 @@ type VariantsIcon = {
30
30
  /**
31
31
  * Add padding around icon
32
32
  */
33
- iconFit: "ratio";
33
+ iconFit: 'ratio';
34
34
  /**
35
35
  * Rounded or Circle variant
36
36
  */
@@ -41,5 +41,5 @@ export type AppIconProps = BaseProps & Props;
41
41
  /**
42
42
  * Icon Component used to display the icon of an application
43
43
  */
44
- declare const AppIcon: import('react').ForwardRefExoticComponent<AppIconProps & import('react').RefAttributes<SVGSVGElement>>;
44
+ declare const AppIcon: import('react').ForwardRefExoticComponent<AppIconProps & import('react').RefAttributes<HTMLDivElement>>;
45
45
  export default AppIcon;
@@ -1,9 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
2
+ import { forwardRef, Suspense } from "react";
3
3
  import clsx from "clsx";
4
+ import * as iconsApps from "../../icons-apps.js";
4
5
  import Image from "../Image/Image.js";
6
+ import LoadingScreen from "../LoadingScreen/LoadingScreen.js";
5
7
  import useEdificeIcons from "../../hooks/useEdificeIcons/useEdificeIcons.js";
6
- import usePaths from "../../hooks/usePaths/usePaths.js";
7
8
  const AppIcon = /* @__PURE__ */ forwardRef(({
8
9
  app,
9
10
  size = "24",
@@ -14,7 +15,7 @@ const AppIcon = /* @__PURE__ */ forwardRef(({
14
15
  const {
15
16
  isIconUrl,
16
17
  getIconCode
17
- } = useEdificeIcons(), [, iconPath] = usePaths(), isSquare = variant === "square", isRounded = variant === "rounded", isCircle = variant === "circle", isContain = iconFit === "contain", isRatio = iconFit === "ratio", iconSizes = {
18
+ } = useEdificeIcons(), isSquare = variant === "square", isRounded = variant === "rounded", isCircle = variant === "circle", isContain = iconFit === "contain", isRatio = iconFit === "ratio", iconSizes = {
18
19
  "icon-xs": size === "24",
19
20
  "icon-sm": size === "40",
20
21
  "icon-md": size === "48",
@@ -27,24 +28,23 @@ const AppIcon = /* @__PURE__ */ forwardRef(({
27
28
  }, iconFits = {
28
29
  "icon-contain": isContain,
29
30
  "icon-ratio": isRatio
30
- }, icon = typeof app == "string" ? app : (app == null ? void 0 : app.icon) !== void 0 ? app.icon : "placeholder", displayName = typeof app != "string" && (app == null ? void 0 : app.displayName) !== void 0 ? app.displayName : "", code = app ? getIconCode(app) : "", isIconURL = isIconUrl(icon), appCode = code || "placeholder";
31
- if (isIconURL) {
32
- const classes2 = clsx("h-full", className);
33
- return /* @__PURE__ */ jsx(Image, { src: icon, alt: displayName, objectFit: "contain", width: size, height: size, className: classes2, style: {
34
- minWidth: size + "px"
35
- } });
36
- }
37
- const classes = clsx("app-icon", {
31
+ }, icon = typeof app == "string" ? app : (app == null ? void 0 : app.icon) !== void 0 ? app.icon : "placeholder", displayName = typeof app != "string" && (app == null ? void 0 : app.displayName) !== void 0 ? app.displayName : "", code = app ? getIconCode(app) : "", isIconURL = isIconUrl(icon), appCode = code || "placeholder", classes = clsx("app-icon", {
38
32
  ...iconSizes,
39
33
  ...iconVariant,
40
34
  ...iconFits,
41
35
  [`bg-light-${appCode}`]: appCode && !isContain,
42
36
  [`color-app-${appCode}`]: appCode
43
- }, className);
44
- return /* @__PURE__ */ jsx("div", { className: classes, style: {
37
+ }, className), IconComponent = iconsApps[`Icon${appCode.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("")}`];
38
+ if (console.log(`Icon${appCode.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("")}`), isIconURL) {
39
+ const classes2 = clsx("h-full", className);
40
+ return /* @__PURE__ */ jsx(Image, { src: icon, alt: displayName, objectFit: "contain", width: size, height: size, className: classes2, style: {
41
+ minWidth: size + "px"
42
+ } });
43
+ }
44
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingScreen, {}), children: /* @__PURE__ */ jsx("div", { ref, className: classes, style: {
45
45
  width: size + "px",
46
46
  height: size + "px"
47
- }, children: /* @__PURE__ */ jsx("svg", { ref, width: size, height: size, role: "img", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx("use", { xlinkHref: `${iconPath}/apps.svg#${appCode}` }) }) });
47
+ }, children: /* @__PURE__ */ jsx(IconComponent, { width: size, height: size }) }) });
48
48
  });
49
49
  export {
50
50
  AppIcon as default
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithRef, ReactNode } from 'react';
2
- export interface AttachmentProps extends ComponentPropsWithRef<"div"> {
2
+ export interface AttachmentProps extends ComponentPropsWithRef<'div'> {
3
3
  /**
4
4
  * Name of resource or Folder
5
5
  * */
@@ -1,6 +1,6 @@
1
- export type AvatarVariants = "square" | "rounded" | "circle";
2
- export type AvatarSizes = "xs" | "sm" | "md" | "lg" | "xl";
3
- export interface AvatarProps extends React.ComponentPropsWithRef<"img"> {
1
+ export type AvatarVariants = 'square' | 'rounded' | 'circle';
2
+ export type AvatarSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
+ export interface AvatarProps extends React.ComponentPropsWithRef<'img'> {
4
4
  /**
5
5
  * Shape of Avatar
6
6
  * `title`, `square`, `circle`
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import clsx from "clsx";
4
+ import noAvatar from "@edifice.io/bootstrap/dist/images/avatar/no-avatar.svg";
4
5
  import Image from "../Image/Image.js";
5
- import usePaths from "../../hooks/usePaths/usePaths.js";
6
6
  const Avatar = /* @__PURE__ */ forwardRef(({
7
7
  variant = "square",
8
8
  size = "md",
@@ -12,7 +12,7 @@ const Avatar = /* @__PURE__ */ forwardRef(({
12
12
  className,
13
13
  ...restProps
14
14
  }, ref) => {
15
- const [imagePath] = usePaths(), placeholder = imgPlaceholder || `${imagePath}/avatar/no-avatar.svg`, classes = clsx("avatar", {
15
+ const placeholder = imgPlaceholder || noAvatar, classes = clsx("avatar", {
16
16
  ...{
17
17
  "avatar-xs": size === "xs",
18
18
  "avatar-sm": size === "sm",
@@ -3,31 +3,31 @@ import { UserProfile } from '@edifice.io/ts-client';
3
3
  export type BadgeRef = HTMLSpanElement;
4
4
  /** Badge variant : notification */
5
5
  export type NotificationBadgeVariant = {
6
- type: "notification";
7
- level: "success" | "warning" | "danger" | "info";
6
+ type: 'notification';
7
+ level: 'success' | 'warning' | 'danger' | 'info';
8
8
  };
9
9
  /** Badge variant : content */
10
10
  export type ContentBadgeVariant = {
11
- type: "content";
12
- level: "success" | "warning" | "danger" | "info";
11
+ type: 'content';
12
+ level: 'success' | 'warning' | 'danger' | 'info';
13
13
  background?: boolean;
14
14
  };
15
15
  /** Badge variant : profile = teacher, student, relative or personnel, guest */
16
16
  export type ProfileBadgeVariant = {
17
- type: "user";
17
+ type: 'user';
18
18
  profile: UserProfile[number];
19
19
  background?: boolean;
20
20
  };
21
21
  /** Badge variant : chip */
22
22
  export type ChipBadgeVariant = {
23
- type: "chip";
23
+ type: 'chip';
24
24
  };
25
25
  /** Badge variant : link */
26
26
  export type LinkBadgeVariant = {
27
- type: "link";
27
+ type: 'link';
28
28
  };
29
29
  export type BadgeVariants = NotificationBadgeVariant | ContentBadgeVariant | ProfileBadgeVariant | ChipBadgeVariant | LinkBadgeVariant;
30
- export interface BadgeProps extends React.ComponentPropsWithRef<"span"> {
30
+ export interface BadgeProps extends React.ComponentPropsWithRef<'span'> {
31
31
  /**
32
32
  * Badge variant : notification, link or profile (Teacher|Student|Relative|Personnel)
33
33
  * Defaults to notification.
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export interface BreadcrumbItemProps extends React.ComponentPropsWithRef<"li"> {
2
+ export interface BreadcrumbItemProps extends React.ComponentPropsWithRef<'li'> {
3
3
  /**
4
4
  * Link or text to display
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { IWebApp } from '@edifice.io/ts-client';
3
- export interface BreadcrumbNavProps extends React.ComponentPropsWithRef<"nav"> {
3
+ export interface BreadcrumbNavProps extends React.ComponentPropsWithRef<'nav'> {
4
4
  /**
5
5
  * Pass all data about current application
6
6
  */
@@ -1,11 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { LoadingIcon, LoadingPosition } from '../Loading';
3
3
  export type ButtonRef = HTMLButtonElement;
4
- export type ButtonTypes = "button" | "submit" | "reset";
5
- export type ButtonColors = "primary" | "secondary" | "tertiary" | "danger";
6
- export type ButtonVariants = "filled" | "outline" | "ghost";
7
- export type ButtonSizes = "sm" | "md" | "lg";
8
- export interface ButtonProps extends React.ComponentPropsWithRef<"button"> {
4
+ export type ButtonTypes = 'button' | 'submit' | 'reset';
5
+ export type ButtonColors = 'primary' | 'secondary' | 'tertiary' | 'danger';
6
+ export type ButtonVariants = 'filled' | 'outline' | 'ghost';
7
+ export type ButtonSizes = 'sm' | 'md' | 'lg';
8
+ export interface ButtonProps extends React.ComponentPropsWithRef<'button'> {
9
9
  /**
10
10
  * `button`, `submit` or `reset`
11
11
  */
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ButtonProps } from './Button';
3
- type OmittedProps = "children" | "leftIcon" | "rightIcon";
3
+ type OmittedProps = 'children' | 'leftIcon' | 'rightIcon';
4
4
  export interface IconButtonProps extends Omit<ButtonProps, OmittedProps> {
5
5
  icon?: ReactNode;
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import { IconButtonProps } from './IconButton';
2
- type PickedProps = "type" | "icon" | "size";
2
+ type PickedProps = 'type' | 'icon' | 'size';
3
3
  export interface SearchButtonProps extends Pick<IconButtonProps, PickedProps> {
4
4
  /**
5
5
  * OnClick Handler
@@ -1,6 +1,6 @@
1
1
  import { IWebApp } from '@edifice.io/ts-client';
2
2
  import { CardProps } from './Card';
3
- export interface CardContextProps extends Omit<CardProps, "children" | "className"> {
3
+ export interface CardContextProps extends Omit<CardProps, 'children' | 'className'> {
4
4
  app?: IWebApp | undefined;
5
5
  appCode: string | undefined;
6
6
  isSelectable?: boolean;
@@ -12,7 +12,7 @@ export interface ColorPaletteItem {
12
12
  * Is it a dark or light color ?
13
13
  * When undefined, will be considered Dark.
14
14
  */
15
- hue?: "dark" | "light";
15
+ hue?: 'dark' | 'light';
16
16
  /**
17
17
  * Is it intended to be a reset color ?
18
18
  */
@@ -1,6 +1,6 @@
1
1
  import { ComponentPropsWithRef } from 'react';
2
2
  import { ColorPalette, ColorPaletteItem } from './ColorPalette';
3
- export interface ColorPickerProps extends ComponentPropsWithRef<"div"> {
3
+ export interface ColorPickerProps extends ComponentPropsWithRef<'div'> {
4
4
  /**
5
5
  * Palettes of pickable colors
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import { ChangeEvent } from 'react';
2
- export interface ComboboxTriggerProps extends React.ComponentPropsWithRef<"button"> {
2
+ export interface ComboboxTriggerProps extends React.ComponentPropsWithRef<'button'> {
3
3
  handleSearchInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
4
4
  value: string;
5
5
  searchMinLength?: number;
@@ -50,7 +50,7 @@ export type DropdownMenuOptions = {
50
50
  /**
51
51
  * Object type
52
52
  */
53
- type: "divider";
53
+ type: 'divider';
54
54
  };
55
55
  declare const Dropdown: {
56
56
  ({ children, block, overflow, placement, extraTriggerKeyDownHandler, onToggle, isTriggerHovered, }: DropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { UseDropdownProps } from '../../hooks/useDropdown/useDropdown';
2
- type OmittedProps = Omit<UseDropdownProps, "triggerRef" | "menuRef">;
2
+ type OmittedProps = Omit<UseDropdownProps, 'triggerRef' | 'menuRef'>;
3
3
  export interface DropdownContextProps extends OmittedProps {
4
4
  block?: boolean;
5
5
  }
@@ -3,7 +3,7 @@ export interface DropdownItemProps {
3
3
  /**
4
4
  * Object type
5
5
  */
6
- type?: "action" | "select";
6
+ type?: 'action' | 'select';
7
7
  /**
8
8
  * Icon component
9
9
  */
@@ -21,10 +21,10 @@ interface Divider {
21
21
  /**
22
22
  * Object type
23
23
  */
24
- type: "divider";
24
+ type: 'divider';
25
25
  }
26
26
  export type DropdownMenuOptions = Item | Divider;
27
- export interface DropdownMenuProps extends ComponentPropsWithRef<"div"> {
27
+ export interface DropdownMenuProps extends ComponentPropsWithRef<'div'> {
28
28
  children: ReactNode;
29
29
  /** Use whole width ? */
30
30
  block?: boolean;
@@ -1,4 +1,4 @@
1
- export interface DropdownTriggerProps extends React.ComponentPropsWithRef<"button"> {
1
+ export interface DropdownTriggerProps extends React.ComponentPropsWithRef<'button'> {
2
2
  /**
3
3
  * Dropdown trigger title
4
4
  */
@@ -14,11 +14,11 @@ export interface DropdownTriggerProps extends React.ComponentPropsWithRef<"butto
14
14
  /**
15
15
  * Set appearance
16
16
  */
17
- variant?: "ghost";
17
+ variant?: 'ghost';
18
18
  /**
19
19
  * Button size
20
20
  */
21
- size?: "sm" | "md" | "lg";
21
+ size?: 'sm' | 'md' | 'lg';
22
22
  /**
23
23
  * Disabled Trigger
24
24
  * */
@@ -1,5 +1,5 @@
1
1
  import { FormControlProps } from './FormControl';
2
- type Props = Omit<FormControlProps, "className" | "children">;
2
+ type Props = Omit<FormControlProps, 'className' | 'children'>;
3
3
  export type FormContextProps = Props;
4
4
  export declare const Context: import('react').Context<Props | null>;
5
5
  export declare const useFormControl: () => Props;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export interface FormControlProps extends React.ComponentPropsWithRef<"div"> {
2
+ export interface FormControlProps extends React.ComponentPropsWithRef<'div'> {
3
3
  /**
4
4
  * For accessibility
5
5
  */
@@ -27,7 +27,7 @@ export interface FormControlProps extends React.ComponentPropsWithRef<"div"> {
27
27
  /**
28
28
  * Status to handle Form Validation
29
29
  */
30
- status?: "valid" | "invalid";
30
+ status?: 'valid' | 'invalid';
31
31
  }
32
32
  declare const FormControl: import('react').ForwardRefExoticComponent<Omit<FormControlProps, "ref"> & import('react').RefAttributes<HTMLDivElement>> & {
33
33
  Label: import('react').ForwardRefExoticComponent<Omit<import('..').LabelProps, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
@@ -9,7 +9,7 @@ export interface GridProps {
9
9
  */
10
10
  className?: string;
11
11
  }
12
- export interface GridColProps extends React.ComponentPropsWithoutRef<"div"> {
12
+ export interface GridColProps extends React.ComponentPropsWithoutRef<'div'> {
13
13
  /**
14
14
  * Size on Mobile
15
15
  */
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export type HeadingElement = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
2
+ export type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
3
3
  export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
4
4
  /**
5
5
  * Level of Heading
@@ -1,4 +1,4 @@
1
- export interface ImageProps extends React.ComponentPropsWithRef<"img"> {
1
+ export interface ImageProps extends React.ComponentPropsWithRef<'img'> {
2
2
  /**
3
3
  * Image URL
4
4
  */
@@ -10,11 +10,11 @@ export interface ImageProps extends React.ComponentPropsWithRef<"img"> {
10
10
  /**
11
11
  * Image ratio
12
12
  */
13
- ratio?: "1" | "4" | "16" | "21";
13
+ ratio?: '1' | '4' | '16' | '21';
14
14
  /**
15
15
  * Object fit property
16
16
  */
17
- objectFit?: "contain" | "cover" | "fill" | "scale" | "none";
17
+ objectFit?: 'contain' | 'cover' | 'fill' | 'scale' | 'none';
18
18
  /**
19
19
  * Placeholder image as fallback
20
20
  */
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import clsx from "clsx";
4
+ import commonPlaceholder from "@edifice.io/bootstrap/dist/images/common/image-placeholder.png";
4
5
  import useImage from "../../hooks/useImage/useImage.js";
5
- import usePaths from "../../hooks/usePaths/usePaths.js";
6
6
  const Image = /* @__PURE__ */ forwardRef(({
7
7
  src,
8
8
  alt,
@@ -12,7 +12,7 @@ const Image = /* @__PURE__ */ forwardRef(({
12
12
  className,
13
13
  ...restProps
14
14
  }, ref) => {
15
- const [imagePath] = usePaths(), placeholder = imgPlaceholder ?? `${imagePath}/common/image-placeholder.png`, {
15
+ const placeholder = imgPlaceholder ?? commonPlaceholder, {
16
16
  imgSrc,
17
17
  onError
18
18
  } = useImage({
@@ -1,6 +1,6 @@
1
1
  import { Size } from '../../types';
2
- export type OmitInputProps = "disabled" | "required" | "size" | "id" | "readOnly";
3
- export interface InputProps extends Omit<React.ComponentPropsWithRef<"input">, OmitInputProps> {
2
+ export type OmitInputProps = 'disabled' | 'required' | 'size' | 'id' | 'readOnly';
3
+ export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, OmitInputProps> {
4
4
  /**
5
5
  * Control size of input
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- export type OmitLabelProps = "htmlFor";
3
- export interface LabelProps extends Omit<React.ComponentPropsWithRef<"label">, OmitLabelProps> {
2
+ export type OmitLabelProps = 'htmlFor';
3
+ export interface LabelProps extends Omit<React.ComponentPropsWithRef<'label'>, OmitLabelProps> {
4
4
  /**
5
5
  * Display Icon to the left
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- export interface MainProps extends ComponentPropsWithoutRef<"main"> {
2
+ export interface MainProps extends ComponentPropsWithoutRef<'main'> {
3
3
  /**
4
4
  * App content
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export interface NavItemProps extends React.ComponentPropsWithRef<"li"> {
2
+ export interface NavItemProps extends React.ComponentPropsWithRef<'li'> {
3
3
  children: ReactNode;
4
4
  className?: string;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export interface NavBarNavProps extends React.ComponentPropsWithoutRef<"ul"> {
2
+ export interface NavBarNavProps extends React.ComponentPropsWithoutRef<'ul'> {
3
3
  children: ReactNode;
4
4
  className?: string;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export type LoadingPosition = "left" | "right" | undefined;
2
+ export type LoadingPosition = 'left' | 'right' | undefined;
3
3
  export type LoadingIcon = JSX.Element | undefined;
4
4
  export interface LoadingProps {
5
5
  /**
@@ -1,12 +1,12 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
+ import loadingScreen from "@edifice.io/bootstrap/dist/images/loading/screen-loading.gif";
3
4
  import clsx from "clsx";
4
- import usePaths from "../../hooks/usePaths/usePaths.js";
5
5
  const LoadingScreen = /* @__PURE__ */ forwardRef(({
6
6
  position = !0,
7
7
  caption
8
8
  }, ref) => {
9
- const [imagePath] = usePaths(), image = `${imagePath}/loading/screen-loading.gif`, containerClasses = clsx("top-0 end-0 start-0 bottom-0 d-grid justify-content-center align-content-center align-items-center z-2000", {
9
+ const containerClasses = clsx("top-0 end-0 start-0 bottom-0 d-grid justify-content-center align-content-center align-items-center z-2000", {
10
10
  "position-fixed": !position,
11
11
  "position-static": position
12
12
  }), captionClasses = clsx("text-center pt-12", {
@@ -14,7 +14,7 @@ const LoadingScreen = /* @__PURE__ */ forwardRef(({
14
14
  });
15
15
  return /* @__PURE__ */ jsxs(Fragment, { children: [
16
16
  /* @__PURE__ */ jsxs("div", { ref, className: containerClasses, children: [
17
- /* @__PURE__ */ jsx("div", { className: "bg-white rounded-circle mx-auto w-25", children: /* @__PURE__ */ jsx("img", { src: image, alt: "loading" }) }),
17
+ /* @__PURE__ */ jsx("div", { className: "bg-white rounded-circle mx-auto w-25", children: /* @__PURE__ */ jsx("img", { src: loadingScreen, alt: "loading" }) }),
18
18
  caption && /* @__PURE__ */ jsx("div", { className: captionClasses, children: caption })
19
19
  ] }),
20
20
  !position && /* @__PURE__ */ jsx("div", { className: "modal-backdrop fade show" })
@@ -1,5 +1,5 @@
1
1
  import { ButtonProps } from '../../Button';
2
- export type MenuButtonProps = Pick<ButtonProps, "children" | "leftIcon" | "rightIcon" | "onClick"> & {
2
+ export type MenuButtonProps = Pick<ButtonProps, 'children' | 'leftIcon' | 'rightIcon' | 'onClick'> & {
3
3
  selected: boolean;
4
4
  };
5
5
  export declare const MenuButton: (props: Partial<MenuButtonProps>) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ export declare const useMenu: () => {
2
2
  menuRef: import('react').MutableRefObject<HTMLUListElement | null>;
3
3
  menuItems: Set<HTMLLIElement>;
4
4
  childProps: {
5
- "data-menubar-menuitem": string;
5
+ 'data-menubar-menuitem': string;
6
6
  role: string;
7
7
  };
8
8
  onKeyDown: (event: React.KeyboardEvent<HTMLUListElement>) => void;
@@ -1,5 +1,5 @@
1
1
  export type ModalElement = HTMLDivElement;
2
- export type ModalSize = "sm" | "md" | "lg";
2
+ export type ModalSize = 'sm' | 'md' | 'lg';
3
3
  export interface ModalProps {
4
4
  /**
5
5
  * Modal id (useful when multiple modal on the same page)
@@ -8,7 +8,7 @@ export interface BaseProps {
8
8
  /**
9
9
  * Control SearchBar size
10
10
  */
11
- size?: Exclude<Size, "sm">;
11
+ size?: Exclude<Size, 'sm'>;
12
12
  /**
13
13
  * Disabled status
14
14
  */
@@ -14,7 +14,7 @@ export interface OptionsType {
14
14
  */
15
15
  icon?: JSX.Element;
16
16
  }
17
- export interface SelectProps extends Omit<DropdownProps, "children">, Omit<DropdownTriggerProps, "badgeContent"> {
17
+ export interface SelectProps extends Omit<DropdownProps, 'children'>, Omit<DropdownTriggerProps, 'badgeContent'> {
18
18
  /**
19
19
  * Default select label
20
20
  */
@@ -1,6 +1,6 @@
1
1
  import { Size } from '../../types';
2
- export type OmitTextAreaProps = "disabled" | "required" | "size" | "id" | "readOnly";
3
- export interface TextAreaProps extends Omit<React.ComponentPropsWithRef<"textarea">, OmitTextAreaProps> {
2
+ export type OmitTextAreaProps = 'disabled' | 'required' | 'size' | 'id' | 'readOnly';
3
+ export interface TextAreaProps extends Omit<React.ComponentPropsWithRef<'textarea'>, OmitTextAreaProps> {
4
4
  /**
5
5
  * Control size of TextArea
6
6
  */