norma-library 0.5.60 → 0.5.61
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/dist/esm/components/Card.js +4 -7
- package/dist/esm/components/Card.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Card.tsx +6 -12
- package/dist/Button/index.d.ts +0 -9
- package/dist/Button/types.d.ts +0 -18
- package/dist/Card/Card.d.ts +0 -3
- package/dist/Card/CardHeader.d.ts +0 -3
- package/dist/Card/index.d.ts +0 -4
- package/dist/Card/styles.d.ts +0 -546
- package/dist/Card/types.d.ts +0 -8
- package/dist/index.d.ts +0 -2
- package/dist/index.es.js +0 -6992
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -266
- package/dist/index.umd.js.map +0 -1
- package/dist/vite.svg +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign, __rest } from "tslib";
|
|
2
|
-
import React
|
|
3
|
-
import { Card as MuiCard
|
|
4
|
-
import { palette
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Card as MuiCard } from '@mui/material';
|
|
4
|
+
import { palette } from '../helpers';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
var colorMap = {
|
|
7
7
|
inherit: palette.inherit,
|
|
@@ -23,9 +23,6 @@ var CardStyled = styled(MuiCard)(function (_a) {
|
|
|
23
23
|
});
|
|
24
24
|
export var Card = function (_a) {
|
|
25
25
|
var children = _a.children, border = _a.border, _b = _a.color, color = _b === void 0 ? 'inherit' : _b, props = __rest(_a, ["children", "border", "color"]);
|
|
26
|
-
|
|
27
|
-
var theme = useMemo(function () { return (prefersDarkMode ? themes.light : themes.dark); }, [prefersDarkMode]);
|
|
28
|
-
return (React.createElement(ThemeProvider, { theme: theme },
|
|
29
|
-
React.createElement(CardStyled, __assign({ borderColor: border ? color : undefined }, props), children)));
|
|
26
|
+
return (React.createElement(CardStyled, __assign({ borderColor: border ? color : undefined }, props), children));
|
|
30
27
|
};
|
|
31
28
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,IAAM,QAAQ,GAAiC;IAC7C,OAAO,EAAE,OAAO,CAAC,OAAO;IACxB,OAAO,EAAE,OAAO,CAAC,OAAO;IACxB,SAAS,EAAE,OAAO,CAAC,SAAS;IAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,OAAO,EAAE,OAAO,CAAC,OAAO;IACxB,IAAI,EAAE,OAAO,CAAC,IAAI;IAClB,OAAO,EAAE,OAAO,CAAC,OAAO;CACzB,CAAC;AAEF,IAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,CAE/B,UAAC,EAAe;QAAb,WAAW,iBAAA;IAAO,OAAA,CAAC;QACvB,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,uBAAuB;QAClC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,oBAAa,QAAQ,CAAC,WAAW,CAAC,CAAE,CAAC,CAAC,CAAC,MAAM;KACxE,CAAC;AALsB,CAKtB,CAAC,CAAC;AAEJ,MAAM,CAAC,IAAM,IAAI,GAAG,UAAC,EAKwC;IAJ3D,IAAA,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,aAAiB,EAAjB,KAAK,mBAAG,SAAS,KAAA,EACd,KAAK,cAJW,+BAKpB,CADS;IAER,OAAO,CACL,oBAAC,UAAU,aAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,IAAM,KAAK,GAC3D,QAAQ,CACE,CACd,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "norma-library",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.61",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.",
|
|
6
6
|
"scripts": {
|
package/src/components/Card.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { Card as MuiCard
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Card as MuiCard } from '@mui/material';
|
|
3
3
|
import { CardBaseProps } from '../interfaces';
|
|
4
|
-
import { palette
|
|
4
|
+
import { palette } from '../helpers';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { ColorVariant } from '@/types';
|
|
7
7
|
|
|
@@ -30,15 +30,9 @@ export const Card = ({
|
|
|
30
30
|
color = 'inherit',
|
|
31
31
|
...props
|
|
32
32
|
}: CardBaseProps & { border?: boolean; color?: ColorVariant }) => {
|
|
33
|
-
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
|
|
34
|
-
|
|
35
|
-
const theme = useMemo(() => (prefersDarkMode ? themes.light : themes.dark), [prefersDarkMode]);
|
|
36
|
-
|
|
37
33
|
return (
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</CardStyled>
|
|
42
|
-
</ThemeProvider>
|
|
34
|
+
<CardStyled borderColor={border ? color : undefined} {...props}>
|
|
35
|
+
{children}
|
|
36
|
+
</CardStyled>
|
|
43
37
|
);
|
|
44
38
|
};
|
package/dist/Button/index.d.ts
DELETED
package/dist/Button/types.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Theme } from '@emotion/react';
|
|
3
|
-
import { Button } from './index';
|
|
4
|
-
import { ButtonPropsColorOverrides, ButtonPropsSizeOverrides, ButtonPropsVariantOverrides, ButtonProps as MuiButtonProps, SxProps } from '@mui/material';
|
|
5
|
-
import { OverridableStringUnion } from '@mui/types';
|
|
6
|
-
type MuiButtonBaseProps = Pick<MuiButtonProps, 'sx' | 'color' | 'size' | 'variant'>;
|
|
7
|
-
export interface ButtonBaseProps extends MuiButtonBaseProps {
|
|
8
|
-
label: string;
|
|
9
|
-
sx?: SxProps<Theme>;
|
|
10
|
-
children?: ReactNode;
|
|
11
|
-
onClick?: (event: React.MouseEvent | React.KeyboardEvent | React.TouchEvent) => void;
|
|
12
|
-
color?: OverridableStringUnion<'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning', ButtonPropsColorOverrides>;
|
|
13
|
-
size?: OverridableStringUnion<'small' | 'medium' | 'large', ButtonPropsSizeOverrides>;
|
|
14
|
-
variant?: OverridableStringUnion<'text' | 'outlined' | 'contained', ButtonPropsVariantOverrides>;
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
}
|
|
17
|
-
export type ButtonType = keyof typeof Button;
|
|
18
|
-
export {};
|
package/dist/Card/Card.d.ts
DELETED
package/dist/Card/index.d.ts
DELETED