@availity/theme-provider 0.3.0 → 0.4.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/CHANGELOG.md +10 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +4 -4
- package/src/lib/theme-provider.tsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
-
## [0.
|
|
5
|
+
## [0.4.0](https://github.com/Availity/element/compare/@availity/theme-provider@0.3.1...@availity/theme-provider@0.4.0) (2023-11-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
6
9
|
|
|
10
|
+
* **mui-datepicker:** add datepicker component ([2efdbf5](https://github.com/Availity/element/commit/2efdbf5112583c4322d588823f0ce0b7227fde6f))
|
|
11
|
+
|
|
12
|
+
## [0.3.1](https://github.com/Availity/element/compare/@availity/theme-provider@0.3.0...@availity/theme-provider@0.3.1) (2023-10-06)
|
|
13
|
+
|
|
14
|
+
## [0.3.0](https://github.com/Availity/element/compare/@availity/theme-provider@0.2.4...@availity/theme-provider@0.3.0) (2023-08-28)
|
|
7
15
|
|
|
8
16
|
### Features
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
- **theme-provider:** add predefined themes, remove custom theme ability ([b44d734](https://github.com/Availity/element/commit/b44d73424a344a3eb871bf27acd3dd53241b39a4))
|
|
11
19
|
|
|
12
20
|
## [0.2.4](https://github.com/Availity/element/compare/@availity/theme-provider@0.2.3...@availity/theme-provider@0.2.4) (2023-08-23)
|
|
13
21
|
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
34
34
|
var import_theme = require("@availity/theme");
|
|
35
35
|
var import_styles = require("@mui/material/styles");
|
|
36
36
|
var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"));
|
|
37
|
-
var
|
|
37
|
+
var import_AdapterDayjs = require("@mui/x-date-pickers/AdapterDayjs");
|
|
38
38
|
var import_x_date_pickers = require("@mui/x-date-pickers");
|
|
39
39
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
40
|
var lightTheme = (0, import_styles.createTheme)(import_theme.lightTheme);
|
|
@@ -45,7 +45,7 @@ var themes = {
|
|
|
45
45
|
};
|
|
46
46
|
function ThemeProvider({ children, theme = "lightTheme" }) {
|
|
47
47
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_x_date_pickers.LocalizationProvider, {
|
|
48
|
-
dateAdapter:
|
|
48
|
+
dateAdapter: import_AdapterDayjs.AdapterDayjs,
|
|
49
49
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.ThemeProvider, {
|
|
50
50
|
theme: themes[theme],
|
|
51
51
|
children: [
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { lightTheme as lightThemeOptions, legacyTheme as legacyThemeOptions } from "@availity/theme";
|
|
3
3
|
import { ThemeProvider as MuiThemeProvider, createTheme } from "@mui/material/styles";
|
|
4
4
|
import CssBaseline from "@mui/material/CssBaseline";
|
|
5
|
-
import {
|
|
5
|
+
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
6
6
|
import { LocalizationProvider } from "@mui/x-date-pickers";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
var lightTheme = createTheme(lightThemeOptions);
|
|
@@ -13,7 +13,7 @@ var themes = {
|
|
|
13
13
|
};
|
|
14
14
|
function ThemeProvider({ children, theme = "lightTheme" }) {
|
|
15
15
|
return /* @__PURE__ */ jsx(LocalizationProvider, {
|
|
16
|
-
dateAdapter:
|
|
16
|
+
dateAdapter: AdapterDayjs,
|
|
17
17
|
children: /* @__PURE__ */ jsxs(MuiThemeProvider, {
|
|
18
18
|
theme: themes[theme],
|
|
19
19
|
children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/theme-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Theme provider for the Element design system",
|
|
5
5
|
"browser": "./dist/index.js",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@availity/theme": "0.
|
|
18
|
+
"@availity/theme": "0.24.0",
|
|
19
19
|
"@emotion/react": "^11.10.5",
|
|
20
20
|
"@emotion/styled": "^11.10.5",
|
|
21
|
-
"@mui/material": "^5.
|
|
21
|
+
"@mui/material": "^5.14.12",
|
|
22
22
|
"@mui/x-date-pickers": "^5.0.15",
|
|
23
|
-
"
|
|
23
|
+
"dayjs": "^1.11.9"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"react": "18.2.0",
|
|
@@ -2,7 +2,7 @@ import { lightTheme as lightThemeOptions, legacyTheme as legacyThemeOptions } fr
|
|
|
2
2
|
import { ThemeProvider as MuiThemeProvider, createTheme } from '@mui/material/styles';
|
|
3
3
|
import type { Theme, ThemeOptions } from '@mui/material/styles';
|
|
4
4
|
import CssBaseline from '@mui/material/CssBaseline';
|
|
5
|
-
import {
|
|
5
|
+
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
6
6
|
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
7
7
|
|
|
8
8
|
const lightTheme = createTheme(lightThemeOptions as ThemeOptions);
|
|
@@ -20,7 +20,7 @@ const themes: Record<string, Theme> = {
|
|
|
20
20
|
|
|
21
21
|
export function ThemeProvider({ children, theme = 'lightTheme' }: ThemeProviderProps) {
|
|
22
22
|
return (
|
|
23
|
-
<LocalizationProvider dateAdapter={
|
|
23
|
+
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
24
24
|
<MuiThemeProvider theme={themes[theme]}>
|
|
25
25
|
<CssBaseline />
|
|
26
26
|
{children}
|