@moser-inc/moser-labs-react 1.16.5 → 2.0.0
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 +29 -0
- package/dist/moser-labs-react.cjs +2018 -88
- package/dist/moser-labs-react.d.ts +1 -0
- package/dist/moser-labs-react.js +40342 -24604
- package/dist/src/_dev/components/DevDirectoryLink.d.ts +0 -1
- package/dist/src/_dev/components/DevLink.d.ts +1 -2
- package/dist/src/_dev/lib/directory.d.ts +0 -1
- package/dist/src/_dev/sandbox.d.ts +0 -1
- package/dist/src/_dev/views/Base.view.d.ts +0 -1
- package/dist/src/_dev/views/Inputs.view.d.ts +0 -1
- package/dist/src/_dev/views/Presentation.view.d.ts +0 -1
- package/dist/src/components/FieldContainer/FieldContainer.d.ts +0 -1
- package/dist/src/components/FieldContainer/FieldContainerInput.d.ts +0 -1
- package/dist/src/components/FieldContainer/FieldContainerLabel.d.ts +0 -1
- package/dist/src/components/FieldContainer/FieldContainerMessage.d.ts +0 -1
- package/dist/src/components/LabsAuthGate.d.ts +2 -3
- package/dist/src/components/LabsButton.d.ts +0 -1
- package/dist/src/components/LabsCalendar.d.ts +0 -1
- package/dist/src/components/LabsCheckbox.d.ts +1 -2
- package/dist/src/components/LabsCount.d.ts +0 -1
- package/dist/src/components/LabsDate.d.ts +3 -3
- package/dist/src/components/LabsIcon.d.ts +0 -1
- package/dist/src/components/LabsLoader.d.ts +0 -1
- package/dist/src/components/LabsLogoutTimer.d.ts +0 -1
- package/dist/src/components/LabsMain.d.ts +0 -1
- package/dist/src/components/LabsMainDesktopNav.d.ts +0 -1
- package/dist/src/components/LabsMainHeaderActions.d.ts +10 -0
- package/dist/src/components/LabsMainMobileNav.d.ts +0 -1
- package/dist/src/components/LabsMenuNav.d.ts +0 -1
- package/dist/src/components/LabsPlaceholder.d.ts +0 -1
- package/dist/src/components/LabsSelect.d.ts +1 -2
- package/dist/src/components/LabsSpeedDialNav.d.ts +0 -1
- package/dist/src/components/LabsText.d.ts +1 -2
- package/dist/src/components/LabsTextCurrency.d.ts +1 -2
- package/dist/src/components/LabsTextSearch.d.ts +1 -2
- package/dist/src/components/LabsTextarea.d.ts +1 -2
- package/dist/src/components/LabsToggle.d.ts +0 -1
- package/dist/src/components/LabsTypeahead.d.ts +2 -3
- package/dist/src/components/LabsUser.d.ts +0 -1
- package/dist/src/hooks/useAnalytics.d.ts +10 -11
- package/dist/src/hooks/useLabs.d.ts +1 -0
- package/dist/src/layouts/Base.layout.d.ts +2 -13
- package/dist/src/layouts/Centered.layout.d.ts +3 -4
- package/dist/src/layouts/Main.layout.d.ts +1 -11
- package/dist/src/lib/analytics/analyticsContext.d.ts +0 -1
- package/dist/src/lib/analytics/createAnalytics.d.ts +0 -1
- package/dist/src/lib/auth/authContext.d.ts +5 -5
- package/dist/src/lib/auth/authUtils.d.ts +30 -30
- package/dist/src/lib/auth/index.d.ts +0 -1
- package/dist/src/lib/dayjs.d.ts +0 -1
- package/dist/src/lib/labs/index.d.ts +1 -0
- package/dist/src/lib/labs/labsContext.d.ts +17 -0
- package/dist/src/main.d.ts +3 -1
- package/dist/src/types/DirectoryValue.type.d.ts +0 -1
- package/dist/src/types/ReactHookForm.type.d.ts +0 -1
- package/dist/src/utils/animations.d.ts +0 -1
- package/dist/src/utils/fieldHelpers.d.ts +0 -1
- package/dist/src/utils/forwardRefInferGenerics.d.ts +0 -1
- package/dist/style.css +1 -1
- package/package.json +36 -41
- package/dist/src/_dev/components/DevLabsUser.d.ts +0 -2
package/README.md
CHANGED
|
@@ -10,6 +10,35 @@ npm i primereact @moser-inc/moser-labs-react
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
+
### Setup
|
|
14
|
+
|
|
15
|
+
Wrap your application with the `LabsProvider` component to provide the app name, theme and favicon urls, and other potential configuration:
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
// App.tsx
|
|
19
|
+
import { LabsProvider } from '@moser-inc/moser-labs-react';
|
|
20
|
+
|
|
21
|
+
const FAVICONS = {
|
|
22
|
+
dark: 'favicon-dark.svg',
|
|
23
|
+
light: 'favicon-light.svg',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const THEMES = {
|
|
27
|
+
dark: 'theme-dark.css',
|
|
28
|
+
light: 'theme-light.css',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const App = () => {
|
|
32
|
+
return (
|
|
33
|
+
<LabsProvider appName="My App" favicons={FAVICONS} themes={THEMES}>
|
|
34
|
+
{/* Your app components */}
|
|
35
|
+
</LabsProvider>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Styles
|
|
41
|
+
|
|
13
42
|
Either load all component styles in your entry point, which may include unused styles:
|
|
14
43
|
|
|
15
44
|
```tsx
|