@blockle/blocks 0.0.6 → 0.2.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/LICENSE +1 -1
- package/README.md +43 -12
- package/dist/index.cjs +3136 -0
- package/dist/index.d.ts +1 -27
- package/dist/index.mjs +3136 -0
- package/dist/reset.css.cjs +5 -0
- package/dist/reset.css.d.ts +295 -0
- package/dist/reset.css.mjs +4 -0
- package/dist/side-effects/lib/css/atoms/atoms.cjs +2 -0
- package/dist/side-effects/lib/css/atoms/atoms.mjs +1 -0
- package/dist/side-effects/themes/momotaro/index.cjs +2 -0
- package/dist/side-effects/themes/momotaro/index.mjs +1 -0
- package/dist/styles/lib/css/atoms/atomicProperties.cjs +69 -0
- package/dist/styles/lib/css/atoms/atomicProperties.mjs +70 -0
- package/dist/styles/lib/css/atoms/breakpoints.cjs +11 -0
- package/dist/styles/lib/css/atoms/breakpoints.mjs +12 -0
- package/dist/styles/lib/css/atoms/sprinkles.css.cjs +45 -0
- package/dist/styles/lib/css/atoms/sprinkles.css.mjs +46 -0
- package/dist/styles/lib/css/reset/reset.css.cjs +36 -0
- package/dist/styles/lib/css/reset/reset.css.mjs +35 -0
- package/dist/styles/lib/css/theme/makeTheme.cjs +10 -0
- package/dist/styles/lib/css/theme/makeTheme.mjs +11 -0
- package/dist/styles/lib/css/theme/makeVanillaTheme.cjs +15 -0
- package/dist/styles/lib/css/theme/makeVanillaTheme.mjs +16 -0
- package/dist/styles/lib/css/theme/tokens.cjs +70 -0
- package/dist/styles/lib/css/theme/tokens.mjs +71 -0
- package/dist/styles/lib/css/theme/vars.css.cjs +9 -0
- package/dist/styles/lib/css/theme/vars.css.mjs +10 -0
- package/dist/styles/themes/momotaro/momotaroTheme.css.cjs +11 -0
- package/dist/styles/themes/momotaro/momotaroTheme.css.mjs +12 -0
- package/dist/styles/themes/momotaro/tokens.cjs +70 -0
- package/dist/styles/themes/momotaro/tokens.mjs +71 -0
- package/dist/themes/momotaro.cjs +4 -0
- package/dist/themes/momotaro.d.ts +1 -0
- package/dist/themes/momotaro.mjs +4 -0
- package/package.json +57 -79
- package/reset.css/index.d.ts +1 -0
- package/reset.css/package.json +5 -0
- package/themes/momotaro/index.d.ts +1 -0
- package/themes/momotaro/package.json +5 -0
- package/dist/Badge/Badge.d.ts +0 -7
- package/dist/Badge/Badge.spec.d.ts +0 -1
- package/dist/Badge/Badge.stories.d.ts +0 -1
- package/dist/Badge/index.d.ts +0 -1
- package/dist/Box/Box.d.ts +0 -10
- package/dist/Box/index.d.ts +0 -1
- package/dist/Button/Button.d.ts +0 -13
- package/dist/Button/Button.spec.d.ts +0 -1
- package/dist/Button/Button.stories.d.ts +0 -1
- package/dist/Button/index.d.ts +0 -1
- package/dist/Card/Card.d.ts +0 -11
- package/dist/Card/Card.spec.d.ts +0 -1
- package/dist/Card/Card.stories.d.ts +0 -1
- package/dist/Card/index.d.ts +0 -1
- package/dist/Dialog/Dialog.d.ts +0 -13
- package/dist/Dialog/index.d.ts +0 -1
- package/dist/Divider/Divider.d.ts +0 -4
- package/dist/Divider/index.d.ts +0 -1
- package/dist/Drawer/Drawer.d.ts +0 -10
- package/dist/Drawer/index.d.ts +0 -1
- package/dist/Dropdown/Dropdown.d.ts +0 -17
- package/dist/Dropdown/index.d.ts +0 -1
- package/dist/FlatButton/FlatButton.d.ts +0 -15
- package/dist/FlatButton/index.d.ts +0 -1
- package/dist/Grid/Grid.d.ts +0 -10
- package/dist/Grid/index.d.ts +0 -1
- package/dist/Icon/Icon.d.ts +0 -26
- package/dist/Icon/Icon.spec.d.ts +0 -1
- package/dist/Icon/index.d.ts +0 -1
- package/dist/IconButton/IconButton.d.ts +0 -12
- package/dist/IconButton/index.d.ts +0 -1
- package/dist/Inline/Inline.d.ts +0 -8
- package/dist/Inline/index.d.ts +0 -1
- package/dist/Link/Link.d.ts +0 -9
- package/dist/Link/index.d.ts +0 -1
- package/dist/Loader/Loader.d.ts +0 -4
- package/dist/Loader/index.d.ts +0 -1
- package/dist/OutlineButton/OutlineButton.d.ts +0 -12
- package/dist/OutlineButton/index.d.ts +0 -1
- package/dist/Panel/Panel.d.ts +0 -10
- package/dist/Panel/index.d.ts +0 -1
- package/dist/Paper/Paper.d.ts +0 -14
- package/dist/Paper/Paper.spec.d.ts +0 -1
- package/dist/Paper/index.d.ts +0 -1
- package/dist/RippleBox/RippleBox.d.ts +0 -8
- package/dist/RippleBox/createRipple.d.ts +0 -2
- package/dist/RippleBox/index.d.ts +0 -1
- package/dist/Stack/Stack.d.ts +0 -13
- package/dist/Stack/index.d.ts +0 -1
- package/dist/Tag/Tag.d.ts +0 -8
- package/dist/Tag/index.d.ts +0 -1
- package/dist/Text/Text.d.ts +0 -10
- package/dist/Text/Text.spec.d.ts +0 -1
- package/dist/Text/index.d.ts +0 -1
- package/dist/TextField/TextField.d.ts +0 -22
- package/dist/TextField/TextField.stories.d.ts +0 -1
- package/dist/TextField/index.d.ts +0 -1
- package/dist/blockle-blocks.esm.js +0 -807
- package/dist/blockle-blocks.js +0 -842
- package/dist/blocks.css +0 -2553
- package/dist/blocks.css.map +0 -1
- package/dist/cx.d.ts +0 -3
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/useAnimationState.d.ts +0 -6
- package/dist/hooks/useLayer.d.ts +0 -1
- package/dist/setupTests.d.ts +0 -1
- package/dist/useFlip/animate.d.ts +0 -14
- package/dist/useFlip/index.d.ts +0 -1
- package/dist/useFlip/useFlip.d.ts +0 -8
- package/dist/useStyles/blocks.d.ts +0 -34
- package/dist/useStyles/index.d.ts +0 -2
- package/dist/useStyles/useStyles.d.ts +0 -3
- package/dist/utils/animate/animateCss.d.ts +0 -11
- package/dist/utils/animate/index.d.ts +0 -1
- package/dist/utils/getEventPosition.d.ts +0 -6
- package/dist/utils/index.d.ts +0 -1
package/dist/Box/Box.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AllHTMLAttributes, ElementType, ReactNode } from 'react';
|
|
2
|
-
import { StyleProps } from '../useStyles';
|
|
3
|
-
interface Props extends StyleProps, Omit<AllHTMLAttributes<HTMLElement>, 'color' | 'width' | 'height'> {
|
|
4
|
-
className?: string;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
component?: ElementType;
|
|
7
|
-
htmlFor?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const Box: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<unknown>>;
|
|
10
|
-
export default Box;
|
package/dist/Box/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Box } from './Box';
|
package/dist/Button/Button.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PickStyleProps } from '../useStyles';
|
|
3
|
-
import './button.css';
|
|
4
|
-
interface Props extends PickStyleProps<'width'> {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
-
type?: 'button' | 'submit';
|
|
9
|
-
className?: string;
|
|
10
|
-
secondary?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const Button: ({ children, className, disabled, onClick, type, width, secondary, }: Props) => JSX.Element;
|
|
13
|
-
export default Button;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/Button/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
package/dist/Card/Card.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PickStyleProps } from '../useStyles';
|
|
3
|
-
import './card.css';
|
|
4
|
-
interface Props extends PickStyleProps<'backgroundColor' | 'color' | 'padding' | 'display' | 'flexDirection' | 'alignItems' | 'justifyContent'> {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
shadow?: 1 | 2 | 3;
|
|
9
|
-
}
|
|
10
|
-
declare const Card: ({ backgroundColor, children, className, onClick, shadow, ...boxProps }: Props) => JSX.Element;
|
|
11
|
-
export default Card;
|
package/dist/Card/Card.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/Card/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Card } from './Card';
|
package/dist/Dialog/Dialog.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './dialog.css';
|
|
3
|
-
declare type Props = {
|
|
4
|
-
actions?: React.ReactNode;
|
|
5
|
-
full?: boolean;
|
|
6
|
-
onRequestClose: () => void;
|
|
7
|
-
open?: boolean;
|
|
8
|
-
render: () => JSX.Element | string;
|
|
9
|
-
title?: React.ReactNode;
|
|
10
|
-
minHeight?: number;
|
|
11
|
-
};
|
|
12
|
-
export declare const Dialog: ({ actions, full, onRequestClose, open, render, title, minHeight, }: Props) => JSX.Element | null;
|
|
13
|
-
export {};
|
package/dist/Dialog/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Dialog } from './Dialog';
|
package/dist/Divider/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Divider } from './Divider';
|
package/dist/Drawer/Drawer.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './drawer.css';
|
|
3
|
-
declare type Props = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
onRequestClose: () => void;
|
|
6
|
-
open: boolean;
|
|
7
|
-
position?: 'left' | 'right';
|
|
8
|
-
};
|
|
9
|
-
declare const Drawer: ({ children, onRequestClose, open, position }: Props) => JSX.Element;
|
|
10
|
-
export default Drawer;
|
package/dist/Drawer/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Drawer } from './Drawer';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FieldProps } from '@blockle/form';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import './dropdown.css';
|
|
4
|
-
declare type Props = FieldProps<string> & {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
onChange?: (value: string) => void;
|
|
8
|
-
errorMessages?: {
|
|
9
|
-
[key in ErrorCodes]?: React.ReactNode;
|
|
10
|
-
};
|
|
11
|
-
} & ValidationOptions;
|
|
12
|
-
declare type ErrorCodes = 'required' | 'patternMismatch' | 'minLength' | 'maxLength';
|
|
13
|
-
declare type ValidationOptions = {
|
|
14
|
-
required?: boolean;
|
|
15
|
-
};
|
|
16
|
-
declare const Dropdown: ({ name, onChange, placeholder, required, value, errorMessages, children, }: Props) => JSX.Element;
|
|
17
|
-
export default Dropdown;
|
package/dist/Dropdown/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Dropdown } from './Dropdown';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PickStyleProps } from '../useStyles';
|
|
3
|
-
import './flat-button.css';
|
|
4
|
-
interface Props extends PickStyleProps<'width'> {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
9
|
-
secondary?: boolean;
|
|
10
|
-
type?: 'button' | 'submit';
|
|
11
|
-
id?: string;
|
|
12
|
-
role?: string;
|
|
13
|
-
}
|
|
14
|
-
declare const FlatButton: ({ children, className, disabled, onClick, secondary, type, width, ...props }: Props) => JSX.Element;
|
|
15
|
-
export default FlatButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as FlatButton } from './FlatButton';
|
package/dist/Grid/Grid.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleProps } from '../useStyles';
|
|
3
|
-
interface Props {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
columns: 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
-
spacing: StyleProps['gridGap'];
|
|
8
|
-
}
|
|
9
|
-
declare const Grid: ({ children, className, spacing, columns }: Props) => JSX.Element;
|
|
10
|
-
export default Grid;
|
package/dist/Grid/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Grid } from './Grid';
|
package/dist/Icon/Icon.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PickStyleProps } from '../useStyles';
|
|
3
|
-
import './icon.css';
|
|
4
|
-
declare const ICON_MAP: {
|
|
5
|
-
arrowBack: any;
|
|
6
|
-
arrowLeft: any;
|
|
7
|
-
arrowRight: any;
|
|
8
|
-
briefcase: any;
|
|
9
|
-
calendar: any;
|
|
10
|
-
check: any;
|
|
11
|
-
clipboard: any;
|
|
12
|
-
cog: any;
|
|
13
|
-
cross: any;
|
|
14
|
-
exclamation: any;
|
|
15
|
-
plus: any;
|
|
16
|
-
selector: any;
|
|
17
|
-
};
|
|
18
|
-
export declare type IconNames = keyof typeof ICON_MAP;
|
|
19
|
-
export interface Props extends PickStyleProps<'color'> {
|
|
20
|
-
className?: string;
|
|
21
|
-
label: string;
|
|
22
|
-
name: IconNames;
|
|
23
|
-
size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
24
|
-
}
|
|
25
|
-
declare const Icon: ({ className, label, name, size, color }: Props) => JSX.Element | null;
|
|
26
|
-
export default Icon;
|
package/dist/Icon/Icon.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom/extend-expect';
|
package/dist/Icon/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Icon, IconNames } from './Icon';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IconNames } from '../Icon';
|
|
3
|
-
import './icon-button.css';
|
|
4
|
-
declare type Props = {
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
label: string;
|
|
7
|
-
name: IconNames;
|
|
8
|
-
onClick?(): void;
|
|
9
|
-
secondary?: boolean;
|
|
10
|
-
};
|
|
11
|
-
declare const IconButton: ({ disabled, label, name, onClick, secondary }: Props) => JSX.Element;
|
|
12
|
-
export default IconButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as IconButton } from './IconButton';
|
package/dist/Inline/Inline.d.ts
DELETED
package/dist/Inline/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Inline } from './Inline';
|
package/dist/Link/Link.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PickStyleProps } from '../useStyles';
|
|
3
|
-
import './link.css';
|
|
4
|
-
interface Props extends PickStyleProps<'fontSize'> {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
to: string;
|
|
7
|
-
}
|
|
8
|
-
declare const Link: ({ children, to, fontSize }: Props) => JSX.Element;
|
|
9
|
-
export default Link;
|
package/dist/Link/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Link } from './Link';
|
package/dist/Loader/Loader.d.ts
DELETED
package/dist/Loader/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Loader } from './Loader';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PickStyleProps } from '../useStyles';
|
|
3
|
-
import './outline-button.css';
|
|
4
|
-
interface Props extends PickStyleProps<'width'> {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
9
|
-
type?: 'button' | 'submit';
|
|
10
|
-
}
|
|
11
|
-
declare const OutlineButton: ({ children, className, disabled, onClick, type, width, }: Props) => JSX.Element;
|
|
12
|
-
export default OutlineButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as OutlineButton } from './OutlineButton';
|
package/dist/Panel/Panel.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './panel.css';
|
|
3
|
-
interface Props {
|
|
4
|
-
className?: string;
|
|
5
|
-
onRequestClose: () => void;
|
|
6
|
-
open?: boolean;
|
|
7
|
-
render: () => JSX.Element | string;
|
|
8
|
-
}
|
|
9
|
-
declare const Panel: ({ className, onRequestClose, open, render }: Props) => JSX.Element | null;
|
|
10
|
-
export default Panel;
|
package/dist/Panel/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Panel } from './Panel';
|
package/dist/Paper/Paper.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './paper.css';
|
|
3
|
-
export declare type Effects = 'fade' | 'slideUp';
|
|
4
|
-
declare type Props = {
|
|
5
|
-
className?: string;
|
|
6
|
-
effect?: Effects;
|
|
7
|
-
fit?: boolean;
|
|
8
|
-
open?: boolean;
|
|
9
|
-
render: () => JSX.Element | string;
|
|
10
|
-
shadow?: boolean;
|
|
11
|
-
transparent?: boolean;
|
|
12
|
-
};
|
|
13
|
-
declare const Paper: ({ open, effect, className, transparent, shadow, render, fit, }: Props) => JSX.Element | null;
|
|
14
|
-
export default Paper;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom/extend-expect';
|
package/dist/Paper/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Paper, Effects as PaperEffects } from './Paper';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React, { AllHTMLAttributes, ElementType } from 'react';
|
|
2
|
-
import { StyleProps } from '..';
|
|
3
|
-
interface Props extends StyleProps, Omit<AllHTMLAttributes<HTMLElement>, 'color' | 'width' | 'height'> {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
component?: ElementType;
|
|
6
|
-
}
|
|
7
|
-
declare const RippleBox: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
8
|
-
export default RippleBox;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as RippleBox } from './RippleBox';
|
package/dist/Stack/Stack.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { PickStyleProps, ResponsiveStyleProp, StyleProps } from '../useStyles';
|
|
3
|
-
import './Stack.css';
|
|
4
|
-
interface Props extends PickStyleProps<'padding' | 'paddingX' | 'paddingY' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft'> {
|
|
5
|
-
align?: ResponsiveStyleProp<'flex-start' | 'center' | 'flex-end'>;
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
component?: 'div' | 'ol' | 'ul';
|
|
8
|
-
horizontal?: boolean;
|
|
9
|
-
spacing: StyleProps['padding'];
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
declare const Stack: ({ align, children, component, spacing, horizontal, className, }: Props) => JSX.Element;
|
|
13
|
-
export default Stack;
|
package/dist/Stack/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Stack } from './Stack';
|
package/dist/Tag/Tag.d.ts
DELETED
package/dist/Tag/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Tag } from './Tag';
|
package/dist/Text/Text.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PickStyleProps } from '../useStyles';
|
|
3
|
-
import './text.css';
|
|
4
|
-
interface Props extends PickStyleProps<'textAlign' | 'fontSize' | 'fontWeight' | 'color' | 'fontStyle'> {
|
|
5
|
-
component?: 'span' | 'p' | 'strong' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const Text: ({ component, children, textAlign, fontSize, fontWeight, color, fontStyle, className, }: Props) => JSX.Element;
|
|
10
|
-
export default Text;
|
package/dist/Text/Text.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom/extend-expect';
|
package/dist/Text/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Text } from './Text';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { FieldProps } from '@blockle/form';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import './text-field.css';
|
|
4
|
-
declare type Props = FieldProps<string> & {
|
|
5
|
-
label: string;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
onChange?: (value: string) => void;
|
|
8
|
-
type?: 'text' | 'password' | 'email' | 'tel';
|
|
9
|
-
errorMessages?: {
|
|
10
|
-
[key in ErrorCodes]?: React.ReactNode;
|
|
11
|
-
};
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
} & ValidationOptions;
|
|
14
|
-
declare type ErrorCodes = 'required' | 'patternMismatch' | 'minLength' | 'maxLength';
|
|
15
|
-
declare type ValidationOptions = {
|
|
16
|
-
required?: boolean;
|
|
17
|
-
pattern?: RegExp;
|
|
18
|
-
minLength?: number;
|
|
19
|
-
maxLength?: number;
|
|
20
|
-
};
|
|
21
|
-
declare const TextField: ({ label, name, onChange, pattern, placeholder, required, type, value, errorMessages, minLength, maxLength, disabled, }: Props) => JSX.Element;
|
|
22
|
-
export default TextField;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TextField } from './TextField';
|