@moser-inc/moser-labs-react 6.8.1 → 7.0.1

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 (79) hide show
  1. package/README.md +6 -15
  2. package/dist/index.d.ts +20903 -0
  3. package/dist/index.js +1104 -0
  4. package/package.json +41 -33
  5. package/dist/moser-labs-react.css +0 -1
  6. package/dist/moser-labs-react.d.ts +0 -2
  7. package/dist/moser-labs-react.js +0 -21137
  8. package/dist/package.json.d.ts +0 -84
  9. package/dist/src/_dev/App.d.ts +0 -1
  10. package/dist/src/_dev/components/DevDirectoryLink.d.ts +0 -27
  11. package/dist/src/_dev/components/DevLink.d.ts +0 -10
  12. package/dist/src/_dev/layouts/App.layout.d.ts +0 -1
  13. package/dist/src/_dev/lib/directory.d.ts +0 -29
  14. package/dist/src/_dev/lib/router.d.ts +0 -1
  15. package/dist/src/_dev/lib/routerContext.d.ts +0 -1
  16. package/dist/src/_dev/sandbox.d.ts +0 -0
  17. package/dist/src/_dev/utils/createDocsHeader.d.ts +0 -1
  18. package/dist/src/_dev/views/Base.view.d.ts +0 -2
  19. package/dist/src/_dev/views/FAQ.view.d.ts +0 -2
  20. package/dist/src/_dev/views/Inputs.view.d.ts +0 -205
  21. package/dist/src/_dev/views/Presentation.view.d.ts +0 -2
  22. package/dist/src/components/FieldContainer/FieldContainer.d.ts +0 -16
  23. package/dist/src/components/FieldContainer/FieldContainerHint.d.ts +0 -12
  24. package/dist/src/components/FieldContainer/FieldContainerInput.d.ts +0 -8
  25. package/dist/src/components/FieldContainer/FieldContainerLabel.d.ts +0 -9
  26. package/dist/src/components/FieldContainer/FieldContainerMessage.d.ts +0 -9
  27. package/dist/src/components/LabsAuthGate.d.ts +0 -6
  28. package/dist/src/components/LabsButton.d.ts +0 -10
  29. package/dist/src/components/LabsCalendar.d.ts +0 -8
  30. package/dist/src/components/LabsCheckbox.d.ts +0 -9
  31. package/dist/src/components/LabsCount.d.ts +0 -8
  32. package/dist/src/components/LabsDate.d.ts +0 -7
  33. package/dist/src/components/LabsEmpty.d.ts +0 -6
  34. package/dist/src/components/LabsLoader.d.ts +0 -6
  35. package/dist/src/components/LabsLogoutTimer.d.ts +0 -9
  36. package/dist/src/components/LabsMain.d.ts +0 -7
  37. package/dist/src/components/LabsMainDesktopNav.d.ts +0 -9
  38. package/dist/src/components/LabsMainHeaderActions.d.ts +0 -10
  39. package/dist/src/components/LabsMainMobileNav.d.ts +0 -9
  40. package/dist/src/components/LabsMenuNav.d.ts +0 -8
  41. package/dist/src/components/LabsMultiSelect.d.ts +0 -24
  42. package/dist/src/components/LabsSelect.d.ts +0 -21
  43. package/dist/src/components/LabsSelectCascade.d.ts +0 -23
  44. package/dist/src/components/LabsSpeedDialNav.d.ts +0 -8
  45. package/dist/src/components/LabsText.d.ts +0 -7
  46. package/dist/src/components/LabsTextCurrency.d.ts +0 -3
  47. package/dist/src/components/LabsTextSearch.d.ts +0 -3
  48. package/dist/src/components/LabsTextarea.d.ts +0 -7
  49. package/dist/src/components/LabsToggle.d.ts +0 -6
  50. package/dist/src/constants/app.d.ts +0 -1
  51. package/dist/src/hooks/useAnalytics.d.ts +0 -7
  52. package/dist/src/hooks/useAuth.d.ts +0 -1
  53. package/dist/src/hooks/useBreakpoints.d.ts +0 -4
  54. package/dist/src/hooks/useLabs.d.ts +0 -1
  55. package/dist/src/layouts/Base.layout.d.ts +0 -3
  56. package/dist/src/layouts/Centered.layout.d.ts +0 -3
  57. package/dist/src/layouts/Main.layout.d.ts +0 -18
  58. package/dist/src/lib/analytics/analyticsContext.d.ts +0 -9
  59. package/dist/src/lib/analytics/createAnalytics.d.ts +0 -8
  60. package/dist/src/lib/analytics/index.d.ts +0 -1
  61. package/dist/src/lib/auth/authContext.d.ts +0 -20
  62. package/dist/src/lib/auth/authUtils.d.ts +0 -110
  63. package/dist/src/lib/auth/index.d.ts +0 -4
  64. package/dist/src/lib/dayjs.d.ts +0 -2
  65. package/dist/src/lib/head/headContext.d.ts +0 -5
  66. package/dist/src/lib/head/index.d.ts +0 -1
  67. package/dist/src/lib/labs/index.d.ts +0 -1
  68. package/dist/src/lib/labs/labsContext.d.ts +0 -17
  69. package/dist/src/lib/prime/index.d.ts +0 -1
  70. package/dist/src/lib/prime/primeContext.d.ts +0 -5
  71. package/dist/src/main.d.ts +0 -42
  72. package/dist/src/types/DirectoryValue.type.d.ts +0 -6
  73. package/dist/src/types/ReactHookForm.type.d.ts +0 -6
  74. package/dist/src/utils/animations.d.ts +0 -90
  75. package/dist/src/utils/fieldHelpers.d.ts +0 -5
  76. package/dist/src/utils/forwardRefInferGenerics.d.ts +0 -2
  77. package/dist/src/utils/number.d.ts +0 -2
  78. package/dist/src/utils/pluralize.d.ts +0 -1
  79. package/dist/src/utils/reactHookFormHelpers.d.ts +0 -89
package/README.md CHANGED
@@ -5,7 +5,7 @@ React components for the Moser Labs suite of applications. Build on top of [Prim
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm i primereact @moser-inc/moser-labs-react
8
+ npm i primereact @moser-inc/moser-labs-react @moser-inc/moser-labs-themes
9
9
  ```
10
10
 
11
11
  ## Usage
@@ -14,23 +14,21 @@ npm i primereact @moser-inc/moser-labs-react
14
14
 
15
15
  Wrap your application with the `LabsProvider` component to provide the app name, theme and favicon urls, and other potential configuration:
16
16
 
17
+ Note: passing the preset is currently on required and used for `@moser-inc/moser-labs-custom-elements`, but it will be used in the future when updating to PrimeReact 11+, so it's recommended to be included from the start.
18
+
17
19
  ```tsx
18
20
  // App.tsx
19
21
  import { LabsProvider } from '@moser-inc/moser-labs-react';
22
+ import Labs from '@moser-inc/moser-labs-themes/labs';
20
23
 
21
24
  const FAVICONS = {
22
25
  dark: 'favicon-dark.svg',
23
26
  light: 'favicon-light.svg',
24
27
  };
25
28
 
26
- const THEMES = {
27
- dark: 'theme-dark.css',
28
- light: 'theme-light.css',
29
- };
30
-
31
29
  const App = () => {
32
30
  return (
33
- <LabsProvider appName="My App" favicons={FAVICONS} themes={THEMES}>
31
+ <LabsProvider preset={Labs} appName="My App" favicons={FAVICONS}>
34
32
  {/* Your app components */}
35
33
  </LabsProvider>
36
34
  );
@@ -39,14 +37,7 @@ const App = () => {
39
37
 
40
38
  ### Styles
41
39
 
42
- Either load all component styles in your entry point, which may include unused styles:
43
-
44
- ```tsx
45
- // main.tsx
46
- import '@moser-inc/moser-labs-react/style.css';
47
- ```
48
-
49
- Or when using UnoCSS with a bundler like Vite, configure your content sources to include labs components to load only the styles that are used:
40
+ Use UnoCSS with a bundler like Vite, configure your content sources to include labs components to load only the styles that are used:
50
41
 
51
42
  ```ts
52
43
  // uno.config.ts