@availity/mui-tabs 0.1.7 → 0.1.9

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 CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.1.9](https://github.com/Availity/element/compare/@availity/mui-tabs@0.1.8...@availity/mui-tabs@0.1.9) (2024-04-19)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `mui-divider` updated to version `0.1.8`
10
+ ## [0.1.8](https://github.com/Availity/element/compare/@availity/mui-tabs@0.1.7...@availity/mui-tabs@0.1.8) (2024-04-04)
11
+
12
+ ### Dependency Updates
13
+
14
+ * `mui-divider` updated to version `0.3.6`
15
+
16
+ ### Performance Improvements
17
+
18
+ * **mui-tabs:** use path imports for material deps ([708de9f](https://github.com/Availity/element/commit/708de9f03b089bb3e4a4d4a5c66ab63a3304e399))
19
+
5
20
  ## [0.1.7](https://github.com/Availity/element/compare/@availity/mui-tabs@0.1.6...@availity/mui-tabs@0.1.7) (2024-02-20)
6
21
 
7
22
  ### Dependency Updates
@@ -0,0 +1,30 @@
1
+ import { TabProps as TabProps$1 } from '@mui/material/Tab';
2
+ import { TabContextProps as TabContextProps$1 } from '@mui/lab/TabContext';
3
+ import { TabListProps as TabListProps$1 } from '@mui/lab/TabList';
4
+ import { TabPanelProps as TabPanelProps$1 } from '@mui/lab/TabPanel';
5
+ import { TabsProps as TabsProps$1 } from '@mui/material/Tabs';
6
+
7
+ type TabProps = Omit<TabProps$1, 'centerRipple' | 'disableFocusRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'icon' | 'iconPosition' | 'TouchRippleProps'>;
8
+ declare const Tab: (props: TabProps) => JSX.Element;
9
+
10
+ interface TabContextProps extends TabContextProps$1 {
11
+ children?: React.ReactNode;
12
+ }
13
+ declare const TabContext: ({ children, ...rest }: TabContextProps) => JSX.Element;
14
+
15
+ interface TabListProps extends Omit<TabListProps$1, 'centered' | 'centerRipple' | 'focusRipple' | 'orientation' | 'TouchRippleProps' | 'touchRippleRef'> {
16
+ children?: React.ReactNode;
17
+ }
18
+ declare const TabList: ({ children, ...rest }: TabListProps) => JSX.Element;
19
+
20
+ interface TabPanelProps extends TabPanelProps$1 {
21
+ children?: React.ReactNode;
22
+ }
23
+ declare const TabPanel: ({ children, ...rest }: TabPanelProps) => JSX.Element;
24
+
25
+ interface TabsProps extends Omit<TabsProps$1, 'centered' | 'centerRipple' | 'focusRipple' | 'orientation' | 'TouchRippleProps' | 'touchRippleRef'> {
26
+ children?: React.ReactNode;
27
+ }
28
+ declare const Tabs: ({ children, ...rest }: TabsProps) => JSX.Element;
29
+
30
+ export { Tab, TabContext, type TabContextProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
- import { TabProps as TabProps$1, TabsProps as TabsProps$1 } from '@mui/material';
2
- import { TabContextProps as TabContextProps$1, TabListProps as TabListProps$1, TabPanelProps as TabPanelProps$1 } from '@mui/lab';
1
+ import { TabProps as TabProps$1 } from '@mui/material/Tab';
2
+ import { TabContextProps as TabContextProps$1 } from '@mui/lab/TabContext';
3
+ import { TabListProps as TabListProps$1 } from '@mui/lab/TabList';
4
+ import { TabPanelProps as TabPanelProps$1 } from '@mui/lab/TabPanel';
5
+ import { TabsProps as TabsProps$1 } from '@mui/material/Tabs';
3
6
 
4
7
  type TabProps = Omit<TabProps$1, 'centerRipple' | 'disableFocusRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'icon' | 'iconPosition' | 'TouchRippleProps'>;
5
8
  declare const Tab: (props: TabProps) => JSX.Element;
@@ -24,4 +27,4 @@ interface TabsProps extends Omit<TabsProps$1, 'centered' | 'centerRipple' | 'foc
24
27
  }
25
28
  declare const Tabs: ({ children, ...rest }: TabsProps) => JSX.Element;
26
29
 
27
- export { Tab, TabContext, TabContextProps, TabList, TabListProps, TabPanel, TabPanelProps, TabProps, Tabs, TabsProps };
30
+ export { Tab, TabContext, type TabContextProps, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps };
package/dist/index.js CHANGED
@@ -1,8 +1,39 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
3
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
5
10
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
6
37
  var __export = (target, all) => {
7
38
  for (var name in all)
8
39
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,6 +46,14 @@ var __copyProps = (to, from, except, desc) => {
15
46
  }
16
47
  return to;
17
48
  };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
18
57
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
58
 
20
59
  // src/index.ts
@@ -29,59 +68,42 @@ __export(src_exports, {
29
68
  module.exports = __toCommonJS(src_exports);
30
69
 
31
70
  // src/lib/Tab.tsx
32
- var import_material = require("@mui/material");
71
+ var import_Tab = __toESM(require("@mui/material/Tab"));
33
72
  var import_jsx_runtime = require("react/jsx-runtime");
34
73
  var Tab = (props) => {
35
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Tab, {
36
- ...props,
37
- disableRipple: true,
38
- disableFocusRipple: true,
39
- disableTouchRipple: true
40
- });
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tab.default, __spreadProps(__spreadValues({}, props), { disableRipple: true, disableFocusRipple: true, disableTouchRipple: true }));
41
75
  };
42
76
 
43
77
  // src/lib/TabContext.tsx
44
- var import_lab = require("@mui/lab");
45
- var import_jsx_runtime = require("react/jsx-runtime");
46
- var TabContext = ({ children, ...rest }) => {
47
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lab.TabContext, {
48
- ...rest,
49
- children
50
- });
78
+ var import_TabContext = __toESM(require("@mui/lab/TabContext"));
79
+ var import_jsx_runtime2 = require("react/jsx-runtime");
80
+ var TabContext = (_a) => {
81
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
82
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_TabContext.default, __spreadProps(__spreadValues({}, rest), { children }));
51
83
  };
52
84
 
53
85
  // src/lib/TabList.tsx
54
- var import_lab2 = require("@mui/lab");
55
- var import_jsx_runtime = require("react/jsx-runtime");
56
- var TabList = ({ children, ...rest }) => {
57
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lab2.TabList, {
58
- ...rest,
59
- orientation: "horizontal",
60
- centered: false,
61
- children
62
- });
86
+ var import_TabList = __toESM(require("@mui/lab/TabList"));
87
+ var import_jsx_runtime3 = require("react/jsx-runtime");
88
+ var TabList = (_a) => {
89
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
90
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_TabList.default, __spreadProps(__spreadValues({}, rest), { orientation: "horizontal", centered: false, children }));
63
91
  };
64
92
 
65
93
  // src/lib/TabPanel.tsx
66
- var import_lab3 = require("@mui/lab");
67
- var import_jsx_runtime = require("react/jsx-runtime");
68
- var TabPanel = ({ children, ...rest }) => {
69
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lab3.TabPanel, {
70
- ...rest,
71
- children
72
- });
94
+ var import_TabPanel = __toESM(require("@mui/lab/TabPanel"));
95
+ var import_jsx_runtime4 = require("react/jsx-runtime");
96
+ var TabPanel = (_a) => {
97
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
98
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_TabPanel.default, __spreadProps(__spreadValues({}, rest), { children }));
73
99
  };
74
100
 
75
101
  // src/lib/Tabs.tsx
76
- var import_material2 = require("@mui/material");
77
- var import_jsx_runtime = require("react/jsx-runtime");
78
- var Tabs = ({ children, ...rest }) => {
79
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material2.Tabs, {
80
- ...rest,
81
- orientation: "horizontal",
82
- centered: false,
83
- children
84
- });
102
+ var import_Tabs = __toESM(require("@mui/material/Tabs"));
103
+ var import_jsx_runtime5 = require("react/jsx-runtime");
104
+ var Tabs = (_a) => {
105
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
106
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Tabs.default, __spreadProps(__spreadValues({}, rest), { orientation: "horizontal", centered: false, children }));
85
107
  };
86
108
  // Annotate the CommonJS export names for ESM import in node:
87
109
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -1,57 +1,72 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
1
33
  // src/lib/Tab.tsx
2
- import { Tab as MuiTab } from "@mui/material";
34
+ import { default as MuiTab } from "@mui/material/Tab";
3
35
  import { jsx } from "react/jsx-runtime";
4
36
  var Tab = (props) => {
5
- return /* @__PURE__ */ jsx(MuiTab, {
6
- ...props,
7
- disableRipple: true,
8
- disableFocusRipple: true,
9
- disableTouchRipple: true
10
- });
37
+ return /* @__PURE__ */ jsx(MuiTab, __spreadProps(__spreadValues({}, props), { disableRipple: true, disableFocusRipple: true, disableTouchRipple: true }));
11
38
  };
12
39
 
13
40
  // src/lib/TabContext.tsx
14
- import { TabContext as MuiTabContext } from "@mui/lab";
41
+ import { default as MuiTabContext } from "@mui/lab/TabContext";
15
42
  import { jsx as jsx2 } from "react/jsx-runtime";
16
- var TabContext = ({ children, ...rest }) => {
17
- return /* @__PURE__ */ jsx2(MuiTabContext, {
18
- ...rest,
19
- children
20
- });
43
+ var TabContext = (_a) => {
44
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
45
+ return /* @__PURE__ */ jsx2(MuiTabContext, __spreadProps(__spreadValues({}, rest), { children }));
21
46
  };
22
47
 
23
48
  // src/lib/TabList.tsx
24
- import { TabList as MuiTabList } from "@mui/lab";
49
+ import { default as MuiTabList } from "@mui/lab/TabList";
25
50
  import { jsx as jsx3 } from "react/jsx-runtime";
26
- var TabList = ({ children, ...rest }) => {
27
- return /* @__PURE__ */ jsx3(MuiTabList, {
28
- ...rest,
29
- orientation: "horizontal",
30
- centered: false,
31
- children
32
- });
51
+ var TabList = (_a) => {
52
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
53
+ return /* @__PURE__ */ jsx3(MuiTabList, __spreadProps(__spreadValues({}, rest), { orientation: "horizontal", centered: false, children }));
33
54
  };
34
55
 
35
56
  // src/lib/TabPanel.tsx
36
- import { TabPanel as MuiTabPanel } from "@mui/lab";
57
+ import { default as MuiTabPanel } from "@mui/lab/TabPanel";
37
58
  import { jsx as jsx4 } from "react/jsx-runtime";
38
- var TabPanel = ({ children, ...rest }) => {
39
- return /* @__PURE__ */ jsx4(MuiTabPanel, {
40
- ...rest,
41
- children
42
- });
59
+ var TabPanel = (_a) => {
60
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
61
+ return /* @__PURE__ */ jsx4(MuiTabPanel, __spreadProps(__spreadValues({}, rest), { children }));
43
62
  };
44
63
 
45
64
  // src/lib/Tabs.tsx
46
- import { Tabs as MuiTabs } from "@mui/material";
65
+ import { default as MuiTabs } from "@mui/material/Tabs";
47
66
  import { jsx as jsx5 } from "react/jsx-runtime";
48
- var Tabs = ({ children, ...rest }) => {
49
- return /* @__PURE__ */ jsx5(MuiTabs, {
50
- ...rest,
51
- orientation: "horizontal",
52
- centered: false,
53
- children
54
- });
67
+ var Tabs = (_a) => {
68
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
69
+ return /* @__PURE__ */ jsx5(MuiTabs, __spreadProps(__spreadValues({}, rest), { orientation: "horizontal", centered: false, children }));
55
70
  };
56
71
  export {
57
72
  Tab,
package/jest.config.js CHANGED
@@ -4,4 +4,14 @@ module.exports = {
4
4
  ...global,
5
5
  displayName: 'tabs',
6
6
  coverageDirectory: '../../coverage/tabs',
7
+ /* TODO: Update to latest Jest snapshotFormat
8
+ * By default Nx has kept the older style of Jest Snapshot formats
9
+ * to prevent breaking of any existing tests with snapshots.
10
+ * It's recommend you update to the latest format.
11
+ * You can do this by removing snapshotFormat property
12
+ * and running tests with --update-snapshot flag.
13
+ * Example: From within the project directory, run "nx test --update-snapshot"
14
+ * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
15
+ */
16
+ snapshotFormat: { escapeString: true, printBasicPrototype: true },
7
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-tabs",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Availity MUI Tabs Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -35,12 +35,12 @@
35
35
  "@mui/lab": "^5.0.0-alpha.147"
36
36
  },
37
37
  "devDependencies": {
38
- "@availity/mui-divider": "^0.3.5",
39
- "@mui/material": "^5.14.12",
38
+ "@availity/mui-divider": "^0.3.7",
39
+ "@mui/material": "^5.15.15",
40
40
  "react": "18.2.0",
41
41
  "react-dom": "18.2.0",
42
- "tsup": "^5.12.7",
43
- "typescript": "^4.6.4"
42
+ "tsup": "^8.0.2",
43
+ "typescript": "^5.4.5"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@mui/material": "^5.11.9",
package/project.json CHANGED
@@ -6,10 +6,9 @@
6
6
  "tags": [],
7
7
  "targets": {
8
8
  "lint": {
9
- "executor": "@nrwl/linter:eslint",
9
+ "executor": "@nx/eslint:lint",
10
10
  "options": {
11
11
  "eslintConfig": ".eslintrc.json",
12
- "lintFilePatterns": ["packages/tabs/**/*.{js,ts}"],
13
12
  "silent": false,
14
13
  "fix": false,
15
14
  "cache": true,
@@ -22,20 +21,20 @@
22
21
  }
23
22
  },
24
23
  "test": {
25
- "executor": "@nrwl/jest:jest",
26
- "outputs": ["coverage/tabs"],
24
+ "executor": "@nx/jest:jest",
25
+ "outputs": ["{workspaceRoot}/coverage/tabs"],
27
26
  "options": {
28
- "jestConfig": "packages/tabs/jest.config.js",
29
- "passWithNoTests": true
27
+ "jestConfig": "packages/tabs/jest.config.js"
30
28
  }
31
29
  },
32
30
  "version": {
33
31
  "executor": "@jscutlery/semver:version",
34
32
  "options": {
35
33
  "preset": "conventional",
36
- "commitMessageFormat": "chore(${projectName}): release version ${version} [skip ci]",
37
- "tagPrefix": "@availity/${projectName}@",
38
- "trackDeps": true
34
+ "commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
35
+ "tagPrefix": "@availity/{projectName}@",
36
+ "trackDeps": true,
37
+ "skipCommitTypes": ["docs"]
39
38
  }
40
39
  }
41
40
  }
@@ -2,7 +2,8 @@
2
2
 
3
3
  import { useState } from 'react';
4
4
  import type { Meta, StoryObj } from '@storybook/react';
5
- import { Box, Typography } from '@mui/material';
5
+ import Box from '@mui/material/Box';
6
+ import Typography from '@mui/material/Typography';
6
7
  import { Tabs } from './Tabs';
7
8
  import { Tab, TabProps } from './Tab';
8
9
 
package/src/lib/Tab.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { Tab as MuiTab, TabProps as MuiTabProps } from '@mui/material';
1
+ import { default as MuiTab, TabProps as MuiTabProps } from '@mui/material/Tab';
2
2
 
3
3
  export type TabProps = Omit<
4
4
  MuiTabProps,
@@ -1,4 +1,4 @@
1
- import { TabContext as MuiTabContext, TabContextProps as MuiTabContextProps } from '@mui/lab';
1
+ import { default as MuiTabContext, TabContextProps as MuiTabContextProps } from '@mui/lab/TabContext';
2
2
 
3
3
  export interface TabContextProps extends MuiTabContextProps {
4
4
  children?: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import { TabList as MuiTabList, TabListProps as MuiTabListProps } from '@mui/lab';
1
+ import { default as MuiTabList, TabListProps as MuiTabListProps } from '@mui/lab/TabList';
2
2
 
3
3
  export interface TabListProps
4
4
  extends Omit<
@@ -1,4 +1,4 @@
1
- import { TabPanel as MuiTabPanel, TabPanelProps as MuiTabPanelProps } from '@mui/lab';
1
+ import { default as MuiTabPanel, TabPanelProps as MuiTabPanelProps } from '@mui/lab/TabPanel';
2
2
 
3
3
  export interface TabPanelProps extends MuiTabPanelProps {
4
4
  children?: React.ReactNode;
@@ -2,7 +2,8 @@
2
2
 
3
3
  import { useState } from 'react';
4
4
  import type { Meta, StoryObj } from '@storybook/react';
5
- import { Box, Typography } from '@mui/material';
5
+ import Box from '@mui/material/Box';
6
+ import Typography from '@mui/material/Typography';
6
7
  import { Tabs, TabsProps } from './Tabs';
7
8
  import { Tab } from './Tab';
8
9
 
package/src/lib/Tabs.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { Tabs as MuiTabs, TabsProps as MuiTabsProps } from '@mui/material';
1
+ import { default as MuiTabs, TabsProps as MuiTabsProps } from '@mui/material/Tabs';
2
2
 
3
3
  export interface TabsProps
4
4
  extends Omit<