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.
- package/README.md +7 -5
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/Block/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/ProgressBar/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +1 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +15 -4
- package/dist/esm/index.js +8 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/Block/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/ProgressBar/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +1 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +15 -4
- package/dist/index.d.ts +15 -5
- package/package.json +1 -1
@@ -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
|
18
|
-
|
19
|
-
|
20
|
-
|
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-
|
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
|
-
|
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
|