@cakemail-org/ui-components-v2 2.0.94 → 2.0.95

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.
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TLink } from "./types";
3
+ export declare function Link({ color, ...props }: TLink): React.JSX.Element;
4
+ export default Link;
@@ -0,0 +1,5 @@
1
+ import { LinkProps } from "@mui/material/Link";
2
+ import { TColors } from "../../types/generic";
3
+ export interface TLink extends LinkProps {
4
+ color?: TColors;
5
+ }
@@ -0,0 +1,95 @@
1
+ import { Theme } from "@mui/material";
2
+ declare module "@mui/material/styles" {
3
+ interface LinkVariants {
4
+ h1L: React.CSSProperties;
5
+ h1S: React.CSSProperties;
6
+ displayL: React.CSSProperties;
7
+ display: React.CSSProperties;
8
+ displayS: React.CSSProperties;
9
+ h2L: React.CSSProperties;
10
+ h2S: React.CSSProperties;
11
+ headlineL: React.CSSProperties;
12
+ headline: React.CSSProperties;
13
+ headlineS: React.CSSProperties;
14
+ h3L: React.CSSProperties;
15
+ h3S: React.CSSProperties;
16
+ titleL: React.CSSProperties;
17
+ title: React.CSSProperties;
18
+ titleS: React.CSSProperties;
19
+ body1L: React.CSSProperties;
20
+ body1S: React.CSSProperties;
21
+ body2L: React.CSSProperties;
22
+ body2S: React.CSSProperties;
23
+ linkS: React.CSSProperties;
24
+ link: React.CSSProperties;
25
+ linkL: React.CSSProperties;
26
+ }
27
+ interface LinkVariantsOptions {
28
+ h1L: React.CSSProperties;
29
+ h1S: React.CSSProperties;
30
+ displayL: React.CSSProperties;
31
+ display: React.CSSProperties;
32
+ displayS: React.CSSProperties;
33
+ h2L: React.CSSProperties;
34
+ h2S: React.CSSProperties;
35
+ headlineL: React.CSSProperties;
36
+ headline: React.CSSProperties;
37
+ headlineS: React.CSSProperties;
38
+ h3L: React.CSSProperties;
39
+ h3S: React.CSSProperties;
40
+ titleL: React.CSSProperties;
41
+ title: React.CSSProperties;
42
+ titleS: React.CSSProperties;
43
+ body1L: React.CSSProperties;
44
+ body1S: React.CSSProperties;
45
+ body2L: React.CSSProperties;
46
+ body2S: React.CSSProperties;
47
+ linkS: React.CSSProperties;
48
+ link: React.CSSProperties;
49
+ linkL: React.CSSProperties;
50
+ }
51
+ }
52
+ declare module '@mui/material/Link' {
53
+ interface TypographyPropsVariantOverrides {
54
+ h1L: true;
55
+ h1S: true;
56
+ displayL: true;
57
+ display: true;
58
+ displayS: true;
59
+ h2L: true;
60
+ h2S: true;
61
+ headlineL: true;
62
+ headline: true;
63
+ headlineS: true;
64
+ h3L: true;
65
+ h3S: true;
66
+ titleL: true;
67
+ title: true;
68
+ titleS: true;
69
+ body1L: true;
70
+ body1S: true;
71
+ body2L: true;
72
+ body2S: true;
73
+ linkS: true;
74
+ link: true;
75
+ linkL: true;
76
+ }
77
+ }
78
+ export default function getMuiLink(theme: Theme): {
79
+ styleOverrides: {
80
+ root: {
81
+ cursor: string;
82
+ textDecoration: string;
83
+ "&:hover": {
84
+ color: string;
85
+ };
86
+ "&:active": {
87
+ color: string;
88
+ };
89
+ };
90
+ };
91
+ defaultProps: {
92
+ color: string;
93
+ variant: string;
94
+ };
95
+ };
package/dist/cjs/index.js CHANGED
@@ -6152,6 +6152,28 @@ function getMuiLinearProgress(theme) {
6152
6152
  };
6153
6153
  }
6154
6154
 
6155
+ function getMuiLink(theme) {
6156
+ return {
6157
+ styleOverrides: {
6158
+ root: {
6159
+ cursor: "pointer",
6160
+ textDecoration: "underline",
6161
+ "&:hover": {
6162
+ color: theme.palette.text.primary,
6163
+ },
6164
+ "&:active": {
6165
+ color: theme.palette.primary.main,
6166
+ }
6167
+ },
6168
+ },
6169
+ //variants: [],
6170
+ defaultProps: {
6171
+ color: "secondary",
6172
+ variant: "link",
6173
+ },
6174
+ };
6175
+ }
6176
+
6155
6177
  function getMuiMenu(theme) {
6156
6178
  return {
6157
6179
  styleOverrides: {
@@ -7375,42 +7397,7 @@ function buildMUITheme(_a) {
7375
7397
  MuiFab: {},
7376
7398
  MuiTextField: getMuiTextField(theme),
7377
7399
  MuiToolbar: {},
7378
- MuiLink: {
7379
- styleOverrides: {
7380
- root: {
7381
- fontFamily: bodyFont,
7382
- fontWeight: 400,
7383
- fontSize: "1rem",
7384
- letterSpacing: "0px",
7385
- textDecoration: "underline",
7386
- color: theme.palette.secondary.main,
7387
- "&:hover": {
7388
- color: theme.palette.secondary.dark,
7389
- }
7390
- },
7391
- },
7392
- variants: [
7393
- //These new variants can specify what styles the component should have when that specific variant prop value is applied.
7394
- {
7395
- props: { color: "text.secondary" },
7396
- style: {
7397
- color: theme.palette.text.secondary,
7398
- "&:hover": {
7399
- color: theme.palette.text.primary,
7400
- }
7401
- },
7402
- },
7403
- {
7404
- props: { color: "primary" },
7405
- style: {
7406
- color: theme.palette.primary.main,
7407
- "&:hover": {
7408
- color: theme.palette.primary.dark,
7409
- }
7410
- },
7411
- }
7412
- ],
7413
- },
7400
+ MuiLink: getMuiLink(theme),
7414
7401
  MuiTypography: {
7415
7402
  defaultProps: {
7416
7403
  variantMapping: {
@@ -8833,6 +8820,11 @@ function FileUpload(_a) {
8833
8820
  }), value: dropdown.value }));
8834
8821
  }
8835
8822
 
8823
+ function Link(_a) {
8824
+ var color = _a.color, props = __rest(_a, ["color"]);
8825
+ return React.createElement(material.Link, __assign({}, props, { color: color }));
8826
+ }
8827
+
8836
8828
  var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n background-color: var(--cloud, #F4F4F4);\n}\n.subNav-component-v2 button.text span {\n color: var(--silver, #9B9B9B);\n}\n.subNav-component-v2 button.text:hover, .subNav-component-v2 button.text.selected {\n background: none;\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.text:hover span, .subNav-component-v2 button.text.selected span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}";
8837
8829
  styleInject(css_248z$b);
8838
8830
 
@@ -9007,7 +8999,7 @@ function FilterBar(_a) {
9007
8999
  React.createElement(DropMenu, { inlineMenu: true, options: dropMenuOptions }),
9008
9000
  currentAction && React.createElement(Button, { color: "cloud", onClick: currentAction.onClick }, currentAction.text)))),
9009
9001
  !showSearch &&
9010
- React.createElement(material.Link, { color: "secondary", onClick: handleShowSearch, alignItems: "center", justifyContent: "center", display: "flex", gap: 3 },
9002
+ React.createElement(Link, { color: "secondary", onClick: handleShowSearch, alignItems: "center", justifyContent: "center", display: "flex", gap: 3 },
9011
9003
  React.createElement(Icon, { name: "Add18", color: "secondary" }),
9012
9004
  " ",
9013
9005
  addFilterTxt)),
@@ -9022,9 +9014,9 @@ function FilterBar(_a) {
9022
9014
  }).reverse()),
9023
9015
  cFilterTerms.length > 0 &&
9024
9016
  React.createElement(material.Stack, { direction: "row", className: "actionContainer", alignItems: "center", justifyContent: "center", gap: 3 },
9025
- onSave && React.createElement(material.Link, { onClick: handleOnSave },
9017
+ onSave && React.createElement(Link, { onClick: handleOnSave },
9026
9018
  React.createElement(Typography, { variant: "body2" }, saveTxt)),
9027
- React.createElement(material.Link, { onClick: handleOnClear },
9019
+ React.createElement(Link, { onClick: handleOnClear },
9028
9020
  React.createElement(Typography, { variant: "body2" }, clearTxt))));
9029
9021
  }
9030
9022
 
@@ -15898,7 +15890,7 @@ function SideMenuItem(_a) {
15898
15890
  var mainClasses = classNames("sideMenuItem-component-v2", className, item.className, variant);
15899
15891
  return React.createElement(Box, { className: mainClasses },
15900
15892
  variant === "" || variant === "soloItem" ?
15901
- React.createElement(material.Link, { href: item.path, "data-name": item.name, onClick: menuItemClick },
15893
+ React.createElement(Link, { href: item.path, "data-name": item.name, onClick: menuItemClick },
15902
15894
  item.prefix && React.cloneElement(item.prefix, { key: 'sideMenuItemPrefix' }),
15903
15895
  item.icon && React.createElement(Icon, { name: item.icon }),
15904
15896
  React.createElement(material.Stack, { alignItems: "flex-start", justifyContent: "center", flex: 1 },
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TLink } from "./types";
3
+ export declare function Link({ color, ...props }: TLink): React.JSX.Element;
4
+ export default Link;
@@ -0,0 +1,5 @@
1
+ import { LinkProps } from "@mui/material/Link";
2
+ import { TColors } from "../../types/generic";
3
+ export interface TLink extends LinkProps {
4
+ color?: TColors;
5
+ }
@@ -0,0 +1,95 @@
1
+ import { Theme } from "@mui/material";
2
+ declare module "@mui/material/styles" {
3
+ interface LinkVariants {
4
+ h1L: React.CSSProperties;
5
+ h1S: React.CSSProperties;
6
+ displayL: React.CSSProperties;
7
+ display: React.CSSProperties;
8
+ displayS: React.CSSProperties;
9
+ h2L: React.CSSProperties;
10
+ h2S: React.CSSProperties;
11
+ headlineL: React.CSSProperties;
12
+ headline: React.CSSProperties;
13
+ headlineS: React.CSSProperties;
14
+ h3L: React.CSSProperties;
15
+ h3S: React.CSSProperties;
16
+ titleL: React.CSSProperties;
17
+ title: React.CSSProperties;
18
+ titleS: React.CSSProperties;
19
+ body1L: React.CSSProperties;
20
+ body1S: React.CSSProperties;
21
+ body2L: React.CSSProperties;
22
+ body2S: React.CSSProperties;
23
+ linkS: React.CSSProperties;
24
+ link: React.CSSProperties;
25
+ linkL: React.CSSProperties;
26
+ }
27
+ interface LinkVariantsOptions {
28
+ h1L: React.CSSProperties;
29
+ h1S: React.CSSProperties;
30
+ displayL: React.CSSProperties;
31
+ display: React.CSSProperties;
32
+ displayS: React.CSSProperties;
33
+ h2L: React.CSSProperties;
34
+ h2S: React.CSSProperties;
35
+ headlineL: React.CSSProperties;
36
+ headline: React.CSSProperties;
37
+ headlineS: React.CSSProperties;
38
+ h3L: React.CSSProperties;
39
+ h3S: React.CSSProperties;
40
+ titleL: React.CSSProperties;
41
+ title: React.CSSProperties;
42
+ titleS: React.CSSProperties;
43
+ body1L: React.CSSProperties;
44
+ body1S: React.CSSProperties;
45
+ body2L: React.CSSProperties;
46
+ body2S: React.CSSProperties;
47
+ linkS: React.CSSProperties;
48
+ link: React.CSSProperties;
49
+ linkL: React.CSSProperties;
50
+ }
51
+ }
52
+ declare module '@mui/material/Link' {
53
+ interface TypographyPropsVariantOverrides {
54
+ h1L: true;
55
+ h1S: true;
56
+ displayL: true;
57
+ display: true;
58
+ displayS: true;
59
+ h2L: true;
60
+ h2S: true;
61
+ headlineL: true;
62
+ headline: true;
63
+ headlineS: true;
64
+ h3L: true;
65
+ h3S: true;
66
+ titleL: true;
67
+ title: true;
68
+ titleS: true;
69
+ body1L: true;
70
+ body1S: true;
71
+ body2L: true;
72
+ body2S: true;
73
+ linkS: true;
74
+ link: true;
75
+ linkL: true;
76
+ }
77
+ }
78
+ export default function getMuiLink(theme: Theme): {
79
+ styleOverrides: {
80
+ root: {
81
+ cursor: string;
82
+ textDecoration: string;
83
+ "&:hover": {
84
+ color: string;
85
+ };
86
+ "&:active": {
87
+ color: string;
88
+ };
89
+ };
90
+ };
91
+ defaultProps: {
92
+ color: string;
93
+ variant: string;
94
+ };
95
+ };
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Stack as Stack$1, Box, CircularProgress as CircularProgress$1, LinearProgress as LinearProgress$1, Tooltip, Typography as Typography$1, Badge, Avatar as Avatar$1, lighten, Dialog as Dialog$1, DialogContent, Checkbox as Checkbox$1, Paper, Chip as Chip$1, ClickAwayListener, useTheme as useTheme$2, FormControl, InputLabel, Link, Radio as Radio$1, InputAdornment, Select as Select$1, MenuItem as MenuItem$1 } from '@mui/material';
1
+ import { Stack as Stack$1, Box, CircularProgress as CircularProgress$1, LinearProgress as LinearProgress$1, Tooltip, Typography as Typography$1, Badge, Avatar as Avatar$1, lighten, Dialog as Dialog$1, DialogContent, Checkbox as Checkbox$1, Paper, Chip as Chip$1, ClickAwayListener, useTheme as useTheme$2, FormControl, InputLabel, Link as Link$1, Radio as Radio$1, InputAdornment, Select as Select$1, MenuItem as MenuItem$1 } from '@mui/material';
2
2
  import classNames from 'classnames';
3
3
  import * as React from 'react';
4
4
  import React__default, { forwardRef, useRef, useState, useEffect, useLayoutEffect, useImperativeHandle, Component, useCallback, createContext } from 'react';
@@ -6132,6 +6132,28 @@ function getMuiLinearProgress(theme) {
6132
6132
  };
6133
6133
  }
6134
6134
 
6135
+ function getMuiLink(theme) {
6136
+ return {
6137
+ styleOverrides: {
6138
+ root: {
6139
+ cursor: "pointer",
6140
+ textDecoration: "underline",
6141
+ "&:hover": {
6142
+ color: theme.palette.text.primary,
6143
+ },
6144
+ "&:active": {
6145
+ color: theme.palette.primary.main,
6146
+ }
6147
+ },
6148
+ },
6149
+ //variants: [],
6150
+ defaultProps: {
6151
+ color: "secondary",
6152
+ variant: "link",
6153
+ },
6154
+ };
6155
+ }
6156
+
6135
6157
  function getMuiMenu(theme) {
6136
6158
  return {
6137
6159
  styleOverrides: {
@@ -7355,42 +7377,7 @@ function buildMUITheme(_a) {
7355
7377
  MuiFab: {},
7356
7378
  MuiTextField: getMuiTextField(theme),
7357
7379
  MuiToolbar: {},
7358
- MuiLink: {
7359
- styleOverrides: {
7360
- root: {
7361
- fontFamily: bodyFont,
7362
- fontWeight: 400,
7363
- fontSize: "1rem",
7364
- letterSpacing: "0px",
7365
- textDecoration: "underline",
7366
- color: theme.palette.secondary.main,
7367
- "&:hover": {
7368
- color: theme.palette.secondary.dark,
7369
- }
7370
- },
7371
- },
7372
- variants: [
7373
- //These new variants can specify what styles the component should have when that specific variant prop value is applied.
7374
- {
7375
- props: { color: "text.secondary" },
7376
- style: {
7377
- color: theme.palette.text.secondary,
7378
- "&:hover": {
7379
- color: theme.palette.text.primary,
7380
- }
7381
- },
7382
- },
7383
- {
7384
- props: { color: "primary" },
7385
- style: {
7386
- color: theme.palette.primary.main,
7387
- "&:hover": {
7388
- color: theme.palette.primary.dark,
7389
- }
7390
- },
7391
- }
7392
- ],
7393
- },
7380
+ MuiLink: getMuiLink(theme),
7394
7381
  MuiTypography: {
7395
7382
  defaultProps: {
7396
7383
  variantMapping: {
@@ -8813,6 +8800,11 @@ function FileUpload(_a) {
8813
8800
  }), value: dropdown.value }));
8814
8801
  }
8815
8802
 
8803
+ function Link(_a) {
8804
+ var color = _a.color, props = __rest(_a, ["color"]);
8805
+ return React__default.createElement(Link$1, __assign({}, props, { color: color }));
8806
+ }
8807
+
8816
8808
  var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n background-color: var(--cloud, #F4F4F4);\n}\n.subNav-component-v2 button.text span {\n color: var(--silver, #9B9B9B);\n}\n.subNav-component-v2 button.text:hover, .subNav-component-v2 button.text.selected {\n background: none;\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.text:hover span, .subNav-component-v2 button.text.selected span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}";
8817
8809
  styleInject(css_248z$b);
8818
8810
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.0.94",
3
+ "version": "2.0.95",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",