reactive-bulma 1.9.0 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TagProps } from '../../../interfaces/atomProps';
3
+ declare const Tag: React.FC<TagProps>;
4
+ export default Tag;
@@ -1,3 +1,5 @@
1
1
  export { default as Button } from './Button';
2
2
  export { default as Column } from './Column';
3
3
  export { default as ProgressBar } from './ProgressBar';
4
+ export { default as Block } from './Block';
5
+ export { default as Tag } from './Tag';
@@ -1 +1,3 @@
1
+ import { ParseTestIdProps } from '../interfaces/functionProps';
1
2
  export declare const parseClasses: (_classes: Array<string | null>) => string;
3
+ export declare const parseTestId: (config: ParseTestIdProps) => string;
@@ -1,11 +1,15 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { basicColorType, columnOffsetType, columnSizeType, sizeType } from '../types/styleTypes';
3
- export interface ColumnProps extends React.ComponentPropsWithoutRef<'section'> {
3
+ interface BasicProps {
4
+ testId?: string;
5
+ style?: React.CSSProperties;
6
+ }
7
+ export interface ColumnProps extends BasicProps, React.ComponentPropsWithoutRef<'section'> {
4
8
  size?: columnSizeType;
5
9
  offset?: columnOffsetType;
6
10
  isNarrow?: boolean;
7
11
  }
8
- export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
12
+ export interface ButtonProps extends BasicProps, React.ComponentPropsWithoutRef<'button'> {
9
13
  text?: string;
10
14
  style?: React.CSSProperties;
11
15
  color?: basicColorType;
@@ -19,7 +23,7 @@ export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
19
23
  size?: sizeType;
20
24
  onClick?: () => void;
21
25
  }
22
- export interface ProgressBarProps extends React.ComponentPropsWithoutRef<'progress'> {
26
+ export interface ProgressBarProps extends BasicProps, React.ComponentPropsWithoutRef<'progress'> {
23
27
  value?: number;
24
28
  max?: number;
25
29
  style?: React.CSSProperties;
@@ -27,6 +31,19 @@ export interface ProgressBarProps extends React.ComponentPropsWithoutRef<'progre
27
31
  size?: sizeType;
28
32
  isLoading?: boolean;
29
33
  }
30
- export interface BlockProps extends React.ComponentPropsWithoutRef<'section'> {
34
+ export interface BlockProps extends BasicProps, React.ComponentPropsWithoutRef<'section'> {
31
35
  testId?: string;
32
36
  }
37
+ export interface TagProps extends BasicProps, React.ComponentPropsWithoutRef<'span'> {
38
+ text: string;
39
+ color?: basicColorType;
40
+ isLight?: boolean;
41
+ isRounded?: boolean;
42
+ size?: Exclude<sizeType, 'is-normal'>;
43
+ withDelete?: boolean;
44
+ withAddon?: boolean;
45
+ addonText?: string;
46
+ addonColor?: basicColorType;
47
+ onDeleteClick?: () => void;
48
+ }
49
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface ParseTestIdProps {
2
+ tag: string;
3
+ parsedClasses: string;
4
+ separator?: string;
5
+ }
package/dist/index.d.ts CHANGED
@@ -1,17 +1,20 @@
1
- /// <reference types="react" />
2
- import React$1 from 'react';
1
+ import React from 'react';
3
2
 
4
3
  type columnSizeType = 'is-three-quarters' | 'is-two-thirds' | 'is-half' | 'is-one-third' | 'is-one-quarter' | 'is-full' | 'is-four-fifths' | 'is-three-fifths' | 'is-two-fifths' | 'is-one-fifth' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8' | 'is-9' | 'is-10' | 'is-11' | 'is-12';
5
4
  type columnOffsetType = 'is-offset-1' | 'is-offset-2' | 'is-offset-3' | 'is-offset-4' | 'is-offset-5' | 'is-offset-6' | 'is-offset-7' | 'is-offset-8' | 'is-offset-9' | 'is-offset-10' | 'is-offset-11' | 'is-offset-12';
6
5
  type basicColorType = 'is-white' | 'is-light' | 'is-dark' | 'is-black' | 'is-text' | 'is-ghost' | 'is-primary' | 'is-link' | 'is-info' | 'is-success' | 'is-warning' | 'is-danger';
7
6
  type sizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
8
7
 
9
- interface ColumnProps extends React.ComponentPropsWithoutRef<'section'> {
8
+ interface BasicProps {
9
+ testId?: string;
10
+ style?: React.CSSProperties;
11
+ }
12
+ interface ColumnProps extends BasicProps, React.ComponentPropsWithoutRef<'section'> {
10
13
  size?: columnSizeType;
11
14
  offset?: columnOffsetType;
12
15
  isNarrow?: boolean;
13
16
  }
14
- interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
17
+ interface ButtonProps extends BasicProps, React.ComponentPropsWithoutRef<'button'> {
15
18
  text?: string;
16
19
  style?: React.CSSProperties;
17
20
  color?: basicColorType;
@@ -25,7 +28,7 @@ interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
25
28
  size?: sizeType;
26
29
  onClick?: () => void;
27
30
  }
28
- interface ProgressBarProps extends React.ComponentPropsWithoutRef<'progress'> {
31
+ interface ProgressBarProps extends BasicProps, React.ComponentPropsWithoutRef<'progress'> {
29
32
  value?: number;
30
33
  max?: number;
31
34
  style?: React.CSSProperties;
@@ -33,11 +36,30 @@ interface ProgressBarProps extends React.ComponentPropsWithoutRef<'progress'> {
33
36
  size?: sizeType;
34
37
  isLoading?: boolean;
35
38
  }
39
+ interface BlockProps extends BasicProps, React.ComponentPropsWithoutRef<'section'> {
40
+ testId?: string;
41
+ }
42
+ interface TagProps extends BasicProps, React.ComponentPropsWithoutRef<'span'> {
43
+ text: string;
44
+ color?: basicColorType;
45
+ isLight?: boolean;
46
+ isRounded?: boolean;
47
+ size?: Exclude<sizeType, 'is-normal'>;
48
+ withDelete?: boolean;
49
+ withAddon?: boolean;
50
+ addonText?: string;
51
+ addonColor?: basicColorType;
52
+ onDeleteClick?: () => void;
53
+ }
54
+
55
+ declare const Button: React.FC<ButtonProps>;
56
+
57
+ declare const Column: React.FC<ColumnProps>;
36
58
 
37
- declare const Button: React$1.FC<ButtonProps>;
59
+ declare const ProgressBar: React.FC<ProgressBarProps>;
38
60
 
39
- declare const Column: React$1.FC<ColumnProps>;
61
+ declare const Block: React.FC<BlockProps>;
40
62
 
41
- declare const ProgressBar: React$1.FC<ProgressBarProps>;
63
+ declare const Tag: React.FC<TagProps>;
42
64
 
43
- export { Button, Column, ProgressBar };
65
+ export { Block, Button, Column, ProgressBar, Tag };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactive-bulma",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "description": "A typescript-react-based component library based on bulma",
5
5
  "keywords": [
6
6
  "typescript",