reactive-bulma 1.7.0 → 1.9.0

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 { BlockProps } from '../../../interfaces/atomProps';
3
+ declare const Block: React.FC<BlockProps>;
4
+ export default Block;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ProgressBarProps } from '../../../interfaces/atomProps';
3
+ declare const ProgressBar: React.FC<ProgressBarProps>;
4
+ export default ProgressBar;
@@ -1,2 +1,3 @@
1
1
  export { default as Button } from './Button';
2
2
  export { default as Column } from './Column';
3
+ export { default as ProgressBar } from './ProgressBar';
@@ -1,5 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { basicColorType, columnOffsetType, columnSizeType, sizeType } from '../types/styleTypes';
3
+ export interface ColumnProps extends React.ComponentPropsWithoutRef<'section'> {
4
+ size?: columnSizeType;
5
+ offset?: columnOffsetType;
6
+ isNarrow?: boolean;
7
+ }
3
8
  export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
4
9
  text?: string;
5
10
  style?: React.CSSProperties;
@@ -14,8 +19,14 @@ export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
14
19
  size?: sizeType;
15
20
  onClick?: () => void;
16
21
  }
17
- export interface ColumnProps extends React.ComponentPropsWithoutRef<'section'> {
18
- size?: columnSizeType;
19
- offset?: columnOffsetType;
20
- isNarrow?: boolean;
22
+ export interface ProgressBarProps extends React.ComponentPropsWithoutRef<'progress'> {
23
+ value?: number;
24
+ max?: number;
25
+ style?: React.CSSProperties;
26
+ color?: basicColorType;
27
+ size?: sizeType;
28
+ isLoading?: boolean;
29
+ }
30
+ export interface BlockProps extends React.ComponentPropsWithoutRef<'section'> {
31
+ testId?: string;
21
32
  }
package/dist/esm/index.js CHANGED
@@ -2840,7 +2840,7 @@ var React = /*@__PURE__*/getDefaultExportFromCjs(reactExports);
2840
2840
 
2841
2841
  const parseClasses = (_classes) => _classes.filter(_class => _class).join(' ');
2842
2842
 
2843
- const Button = ({ text = null, type = 'button', style = null, color = 'is-white', isLightColor = false, isInvertedColor = false, isOutlined = false, isRounded = false, isLoading = false, isDisabled = false, isStatic = false, size = null, onClick = null }) => {
2843
+ const Button = ({ text = null, type = 'button', style = null, color = 'is-primary', isLightColor = false, isInvertedColor = false, isOutlined = false, isRounded = false, isLoading = false, isDisabled = false, isStatic = false, size = null, onClick = null }) => {
2844
2844
  const buttonClasses = parseClasses([
2845
2845
  'button',
2846
2846
  color,
@@ -2865,5 +2865,11 @@ const Column = ({ size = null, offset = null, isNarrow = false, children = null
2865
2865
  return (React.createElement("section", { "data-testid": 'test-column', className: classes }, children));
2866
2866
  };
2867
2867
 
2868
- export { Button, Column };
2868
+ const ProgressBar = ({ value = 0, max = 100, style = null, color = 'is-primary', size = null, isLoading = false }) => {
2869
+ const progressClasses = parseClasses(['progress', color, size]);
2870
+ const fixedValue = value > max || value < 0 ? 0 : value;
2871
+ return (React.createElement("progress", { "data-testid": 'test-progress-bar', className: progressClasses, style: style !== null && style !== void 0 ? style : undefined, value: isLoading ? undefined : value, max: max }, `${isLoading ? 0 : fixedValue}%`));
2872
+ };
2873
+
2874
+ export { Button, Column, ProgressBar };
2869
2875
  //# sourceMappingURL=index.js.map