norma-library 0.3.2 → 0.3.3

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,31 @@
1
+ import { ReactNode } from 'react'
2
+ import { Theme } from '@emotion/react'
3
+ import { Button } from './index'
4
+
5
+ import {
6
+ ButtonPropsColorOverrides,
7
+ ButtonPropsSizeOverrides,
8
+ ButtonPropsVariantOverrides,
9
+ ButtonProps as MuiButtonProps,
10
+ SxProps,
11
+ } from '@mui/material'
12
+
13
+ import { OverridableStringUnion } from '@mui/types'
14
+
15
+ type MuiButtonBaseProps = Pick<MuiButtonProps, 'sx' | 'color' | 'size' | 'variant'>
16
+
17
+ export interface ButtonBaseProps extends MuiButtonBaseProps {
18
+ label: string
19
+ sx?: SxProps<Theme>
20
+ children?: ReactNode
21
+ onClick?: (event: React.MouseEvent | React.KeyboardEvent | React.TouchEvent) => void
22
+ color?: OverridableStringUnion<
23
+ 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning',
24
+ ButtonPropsColorOverrides
25
+ >
26
+ size?: OverridableStringUnion<'small' | 'medium' | 'large', ButtonPropsSizeOverrides>
27
+ variant?: OverridableStringUnion<'text' | 'outlined' | 'contained', ButtonPropsVariantOverrides>
28
+ style?: React.CSSProperties
29
+ }
30
+
31
+ export type ButtonType = keyof typeof Button
@@ -1,9 +1,2 @@
1
- import { ButtonBaseProps } from './types';
2
- export declare const Button: {
3
- ({ label, ...rest }: ButtonBaseProps): import("react/jsx-runtime").JSX.Element;
4
- defaultProps: {
5
- variant: string;
6
- size: string;
7
- color: string;
8
- };
9
- };
1
+ export { default } from './Button'
2
+ export * from './Button'
@@ -1,3 +1,9 @@
1
- import { CardBaseProps } from './types';
2
- declare const Card: ({ children, title }: CardBaseProps) => import("react/jsx-runtime").JSX.Element;
3
- export default Card;
1
+ import { CardProps, SxProps } from '@mui/material'
2
+ import { Theme } from '@emotion/react'
3
+
4
+ export type CardBaseProps = Pick<CardProps, 'sx'> & {
5
+ sx?: SxProps<Theme>
6
+ raised?: boolean
7
+ title?: string
8
+ children?: React.ReactNode
9
+ }
@@ -1,2 +1,2 @@
1
- export * from './Card';
2
- export { default as Card } from './Card';
1
+ export * from './Card'
2
+ export { default } from './Card'
package/dist/index.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- export * from './Button';
2
- export * from './Card';
1
+ export * from './Button'
2
+ export { default as Button } from './Button'
3
+
4
+ export * from './Card'
5
+ export { default as Card } from './Card'