@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.
Files changed (116) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +43 -12
  3. package/dist/index.cjs +3136 -0
  4. package/dist/index.d.ts +1 -27
  5. package/dist/index.mjs +3136 -0
  6. package/dist/reset.css.cjs +5 -0
  7. package/dist/reset.css.d.ts +295 -0
  8. package/dist/reset.css.mjs +4 -0
  9. package/dist/side-effects/lib/css/atoms/atoms.cjs +2 -0
  10. package/dist/side-effects/lib/css/atoms/atoms.mjs +1 -0
  11. package/dist/side-effects/themes/momotaro/index.cjs +2 -0
  12. package/dist/side-effects/themes/momotaro/index.mjs +1 -0
  13. package/dist/styles/lib/css/atoms/atomicProperties.cjs +69 -0
  14. package/dist/styles/lib/css/atoms/atomicProperties.mjs +70 -0
  15. package/dist/styles/lib/css/atoms/breakpoints.cjs +11 -0
  16. package/dist/styles/lib/css/atoms/breakpoints.mjs +12 -0
  17. package/dist/styles/lib/css/atoms/sprinkles.css.cjs +45 -0
  18. package/dist/styles/lib/css/atoms/sprinkles.css.mjs +46 -0
  19. package/dist/styles/lib/css/reset/reset.css.cjs +36 -0
  20. package/dist/styles/lib/css/reset/reset.css.mjs +35 -0
  21. package/dist/styles/lib/css/theme/makeTheme.cjs +10 -0
  22. package/dist/styles/lib/css/theme/makeTheme.mjs +11 -0
  23. package/dist/styles/lib/css/theme/makeVanillaTheme.cjs +15 -0
  24. package/dist/styles/lib/css/theme/makeVanillaTheme.mjs +16 -0
  25. package/dist/styles/lib/css/theme/tokens.cjs +70 -0
  26. package/dist/styles/lib/css/theme/tokens.mjs +71 -0
  27. package/dist/styles/lib/css/theme/vars.css.cjs +9 -0
  28. package/dist/styles/lib/css/theme/vars.css.mjs +10 -0
  29. package/dist/styles/themes/momotaro/momotaroTheme.css.cjs +11 -0
  30. package/dist/styles/themes/momotaro/momotaroTheme.css.mjs +12 -0
  31. package/dist/styles/themes/momotaro/tokens.cjs +70 -0
  32. package/dist/styles/themes/momotaro/tokens.mjs +71 -0
  33. package/dist/themes/momotaro.cjs +4 -0
  34. package/dist/themes/momotaro.d.ts +1 -0
  35. package/dist/themes/momotaro.mjs +4 -0
  36. package/package.json +57 -79
  37. package/reset.css/index.d.ts +1 -0
  38. package/reset.css/package.json +5 -0
  39. package/themes/momotaro/index.d.ts +1 -0
  40. package/themes/momotaro/package.json +5 -0
  41. package/dist/Badge/Badge.d.ts +0 -7
  42. package/dist/Badge/Badge.spec.d.ts +0 -1
  43. package/dist/Badge/Badge.stories.d.ts +0 -1
  44. package/dist/Badge/index.d.ts +0 -1
  45. package/dist/Box/Box.d.ts +0 -10
  46. package/dist/Box/index.d.ts +0 -1
  47. package/dist/Button/Button.d.ts +0 -13
  48. package/dist/Button/Button.spec.d.ts +0 -1
  49. package/dist/Button/Button.stories.d.ts +0 -1
  50. package/dist/Button/index.d.ts +0 -1
  51. package/dist/Card/Card.d.ts +0 -11
  52. package/dist/Card/Card.spec.d.ts +0 -1
  53. package/dist/Card/Card.stories.d.ts +0 -1
  54. package/dist/Card/index.d.ts +0 -1
  55. package/dist/Dialog/Dialog.d.ts +0 -13
  56. package/dist/Dialog/index.d.ts +0 -1
  57. package/dist/Divider/Divider.d.ts +0 -4
  58. package/dist/Divider/index.d.ts +0 -1
  59. package/dist/Drawer/Drawer.d.ts +0 -10
  60. package/dist/Drawer/index.d.ts +0 -1
  61. package/dist/Dropdown/Dropdown.d.ts +0 -17
  62. package/dist/Dropdown/index.d.ts +0 -1
  63. package/dist/FlatButton/FlatButton.d.ts +0 -15
  64. package/dist/FlatButton/index.d.ts +0 -1
  65. package/dist/Grid/Grid.d.ts +0 -10
  66. package/dist/Grid/index.d.ts +0 -1
  67. package/dist/Icon/Icon.d.ts +0 -26
  68. package/dist/Icon/Icon.spec.d.ts +0 -1
  69. package/dist/Icon/index.d.ts +0 -1
  70. package/dist/IconButton/IconButton.d.ts +0 -12
  71. package/dist/IconButton/index.d.ts +0 -1
  72. package/dist/Inline/Inline.d.ts +0 -8
  73. package/dist/Inline/index.d.ts +0 -1
  74. package/dist/Link/Link.d.ts +0 -9
  75. package/dist/Link/index.d.ts +0 -1
  76. package/dist/Loader/Loader.d.ts +0 -4
  77. package/dist/Loader/index.d.ts +0 -1
  78. package/dist/OutlineButton/OutlineButton.d.ts +0 -12
  79. package/dist/OutlineButton/index.d.ts +0 -1
  80. package/dist/Panel/Panel.d.ts +0 -10
  81. package/dist/Panel/index.d.ts +0 -1
  82. package/dist/Paper/Paper.d.ts +0 -14
  83. package/dist/Paper/Paper.spec.d.ts +0 -1
  84. package/dist/Paper/index.d.ts +0 -1
  85. package/dist/RippleBox/RippleBox.d.ts +0 -8
  86. package/dist/RippleBox/createRipple.d.ts +0 -2
  87. package/dist/RippleBox/index.d.ts +0 -1
  88. package/dist/Stack/Stack.d.ts +0 -13
  89. package/dist/Stack/index.d.ts +0 -1
  90. package/dist/Tag/Tag.d.ts +0 -8
  91. package/dist/Tag/index.d.ts +0 -1
  92. package/dist/Text/Text.d.ts +0 -10
  93. package/dist/Text/Text.spec.d.ts +0 -1
  94. package/dist/Text/index.d.ts +0 -1
  95. package/dist/TextField/TextField.d.ts +0 -22
  96. package/dist/TextField/TextField.stories.d.ts +0 -1
  97. package/dist/TextField/index.d.ts +0 -1
  98. package/dist/blockle-blocks.esm.js +0 -807
  99. package/dist/blockle-blocks.js +0 -842
  100. package/dist/blocks.css +0 -2553
  101. package/dist/blocks.css.map +0 -1
  102. package/dist/cx.d.ts +0 -3
  103. package/dist/hooks/index.d.ts +0 -2
  104. package/dist/hooks/useAnimationState.d.ts +0 -6
  105. package/dist/hooks/useLayer.d.ts +0 -1
  106. package/dist/setupTests.d.ts +0 -1
  107. package/dist/useFlip/animate.d.ts +0 -14
  108. package/dist/useFlip/index.d.ts +0 -1
  109. package/dist/useFlip/useFlip.d.ts +0 -8
  110. package/dist/useStyles/blocks.d.ts +0 -34
  111. package/dist/useStyles/index.d.ts +0 -2
  112. package/dist/useStyles/useStyles.d.ts +0 -3
  113. package/dist/utils/animate/animateCss.d.ts +0 -11
  114. package/dist/utils/animate/index.d.ts +0 -1
  115. package/dist/utils/getEventPosition.d.ts +0 -6
  116. 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;
@@ -1 +0,0 @@
1
- export { default as Box } from './Box';
@@ -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 {};
@@ -1 +0,0 @@
1
- export { default as Button } from './Button';
@@ -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;
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom/extend-expect';
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export { default as Card } from './Card';
@@ -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 {};
@@ -1 +0,0 @@
1
- export { Dialog } from './Dialog';
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import './divider.css';
3
- declare const Divider: () => JSX.Element;
4
- export default Divider;
@@ -1 +0,0 @@
1
- export { default as Divider } from './Divider';
@@ -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;
@@ -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;
@@ -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';
@@ -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;
@@ -1 +0,0 @@
1
- export { default as Grid } from './Grid';
@@ -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;
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom/extend-expect';
@@ -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';
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { StyleProps } from '../useStyles';
3
- interface Props {
4
- children: React.ReactNode;
5
- spacing: StyleProps['padding'];
6
- }
7
- declare const Inline: ({ children, spacing }: Props) => JSX.Element;
8
- export default Inline;
@@ -1 +0,0 @@
1
- export { default as Inline } from './Inline';
@@ -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;
@@ -1 +0,0 @@
1
- export { default as Link } from './Link';
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import './loader.css';
3
- declare const Loader: () => JSX.Element;
4
- export default Loader;
@@ -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';
@@ -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;
@@ -1 +0,0 @@
1
- export { default as Panel } from './Panel';
@@ -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';
@@ -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,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function createRipple(event: React.MouseEvent | React.TouchEvent): void;
@@ -1 +0,0 @@
1
- export { default as RippleBox } from './RippleBox';
@@ -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;
@@ -1 +0,0 @@
1
- export { default as Stack } from './Stack';
package/dist/Tag/Tag.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import './tag.css';
3
- interface Props {
4
- children: React.ReactNode;
5
- onClick: () => void;
6
- }
7
- declare const Tag: ({ children, onClick }: Props) => JSX.Element;
8
- export default Tag;
@@ -1 +0,0 @@
1
- export { default as Tag } from './Tag';
@@ -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;
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom/extend-expect';
@@ -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';