@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.
- package/README.md +6 -15
- package/dist/index.d.ts +20903 -0
- package/dist/index.js +1104 -0
- package/package.json +41 -33
- package/dist/moser-labs-react.css +0 -1
- package/dist/moser-labs-react.d.ts +0 -2
- package/dist/moser-labs-react.js +0 -21137
- package/dist/package.json.d.ts +0 -84
- package/dist/src/_dev/App.d.ts +0 -1
- package/dist/src/_dev/components/DevDirectoryLink.d.ts +0 -27
- package/dist/src/_dev/components/DevLink.d.ts +0 -10
- package/dist/src/_dev/layouts/App.layout.d.ts +0 -1
- package/dist/src/_dev/lib/directory.d.ts +0 -29
- package/dist/src/_dev/lib/router.d.ts +0 -1
- package/dist/src/_dev/lib/routerContext.d.ts +0 -1
- package/dist/src/_dev/sandbox.d.ts +0 -0
- package/dist/src/_dev/utils/createDocsHeader.d.ts +0 -1
- package/dist/src/_dev/views/Base.view.d.ts +0 -2
- package/dist/src/_dev/views/FAQ.view.d.ts +0 -2
- package/dist/src/_dev/views/Inputs.view.d.ts +0 -205
- package/dist/src/_dev/views/Presentation.view.d.ts +0 -2
- package/dist/src/components/FieldContainer/FieldContainer.d.ts +0 -16
- package/dist/src/components/FieldContainer/FieldContainerHint.d.ts +0 -12
- package/dist/src/components/FieldContainer/FieldContainerInput.d.ts +0 -8
- package/dist/src/components/FieldContainer/FieldContainerLabel.d.ts +0 -9
- package/dist/src/components/FieldContainer/FieldContainerMessage.d.ts +0 -9
- package/dist/src/components/LabsAuthGate.d.ts +0 -6
- package/dist/src/components/LabsButton.d.ts +0 -10
- package/dist/src/components/LabsCalendar.d.ts +0 -8
- package/dist/src/components/LabsCheckbox.d.ts +0 -9
- package/dist/src/components/LabsCount.d.ts +0 -8
- package/dist/src/components/LabsDate.d.ts +0 -7
- package/dist/src/components/LabsEmpty.d.ts +0 -6
- package/dist/src/components/LabsLoader.d.ts +0 -6
- package/dist/src/components/LabsLogoutTimer.d.ts +0 -9
- package/dist/src/components/LabsMain.d.ts +0 -7
- package/dist/src/components/LabsMainDesktopNav.d.ts +0 -9
- package/dist/src/components/LabsMainHeaderActions.d.ts +0 -10
- package/dist/src/components/LabsMainMobileNav.d.ts +0 -9
- package/dist/src/components/LabsMenuNav.d.ts +0 -8
- package/dist/src/components/LabsMultiSelect.d.ts +0 -24
- package/dist/src/components/LabsSelect.d.ts +0 -21
- package/dist/src/components/LabsSelectCascade.d.ts +0 -23
- package/dist/src/components/LabsSpeedDialNav.d.ts +0 -8
- package/dist/src/components/LabsText.d.ts +0 -7
- package/dist/src/components/LabsTextCurrency.d.ts +0 -3
- package/dist/src/components/LabsTextSearch.d.ts +0 -3
- package/dist/src/components/LabsTextarea.d.ts +0 -7
- package/dist/src/components/LabsToggle.d.ts +0 -6
- package/dist/src/constants/app.d.ts +0 -1
- package/dist/src/hooks/useAnalytics.d.ts +0 -7
- package/dist/src/hooks/useAuth.d.ts +0 -1
- package/dist/src/hooks/useBreakpoints.d.ts +0 -4
- package/dist/src/hooks/useLabs.d.ts +0 -1
- package/dist/src/layouts/Base.layout.d.ts +0 -3
- package/dist/src/layouts/Centered.layout.d.ts +0 -3
- package/dist/src/layouts/Main.layout.d.ts +0 -18
- package/dist/src/lib/analytics/analyticsContext.d.ts +0 -9
- package/dist/src/lib/analytics/createAnalytics.d.ts +0 -8
- package/dist/src/lib/analytics/index.d.ts +0 -1
- package/dist/src/lib/auth/authContext.d.ts +0 -20
- package/dist/src/lib/auth/authUtils.d.ts +0 -110
- package/dist/src/lib/auth/index.d.ts +0 -4
- package/dist/src/lib/dayjs.d.ts +0 -2
- package/dist/src/lib/head/headContext.d.ts +0 -5
- package/dist/src/lib/head/index.d.ts +0 -1
- package/dist/src/lib/labs/index.d.ts +0 -1
- package/dist/src/lib/labs/labsContext.d.ts +0 -17
- package/dist/src/lib/prime/index.d.ts +0 -1
- package/dist/src/lib/prime/primeContext.d.ts +0 -5
- package/dist/src/main.d.ts +0 -42
- package/dist/src/types/DirectoryValue.type.d.ts +0 -6
- package/dist/src/types/ReactHookForm.type.d.ts +0 -6
- package/dist/src/utils/animations.d.ts +0 -90
- package/dist/src/utils/fieldHelpers.d.ts +0 -5
- package/dist/src/utils/forwardRefInferGenerics.d.ts +0 -2
- package/dist/src/utils/number.d.ts +0 -2
- package/dist/src/utils/pluralize.d.ts +0 -1
- 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}
|
|
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
|
-
|
|
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
|