reactive-bulma 1.16.0 → 1.18.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 +21 -21
- package/README.md +192 -190
- package/dist/cjs/index.js +33 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/Button/Button.d.ts +4 -0
- package/dist/cjs/types/components/atoms/Delete/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/Select/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +2 -0
- package/dist/cjs/types/enums/styleEnums.d.ts +38 -0
- package/dist/cjs/types/functions/persers.d.ts +3 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +20 -0
- package/dist/esm/index.js +32 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/Button/Button.d.ts +4 -0
- package/dist/esm/types/components/atoms/Delete/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/Select/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +2 -0
- package/dist/esm/types/enums/styleEnums.d.ts +38 -0
- package/dist/esm/types/functions/persers.d.ts +3 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +20 -0
- package/dist/index.d.ts +25 -1
- package/package.json +106 -106
@@ -8,3 +8,5 @@ export { default as Title } from './Title';
|
|
8
8
|
export { default as Icon } from './Icon';
|
9
9
|
export { default as Input } from './Input';
|
10
10
|
export { default as TextArea } from './TextArea';
|
11
|
+
export { default as Delete } from './Delete';
|
12
|
+
export { default as Select } from './Select';
|
@@ -0,0 +1,38 @@
|
|
1
|
+
export declare enum columnSiteEnum {
|
2
|
+
'is-three-quarters' = 0,
|
3
|
+
'is-two-thirds' = 1,
|
4
|
+
'is-half' = 2,
|
5
|
+
'is-one-third' = 3,
|
6
|
+
'is-one-quarter' = 4,
|
7
|
+
'is-full' = 5,
|
8
|
+
'is-four-fifths' = 6,
|
9
|
+
'is-three-fifths' = 7,
|
10
|
+
'is-two-fifths' = 8,
|
11
|
+
'is-one-fifth' = 9,
|
12
|
+
'is-1' = 10,
|
13
|
+
'is-2' = 11,
|
14
|
+
'is-3' = 12,
|
15
|
+
'is-4' = 13,
|
16
|
+
'is-5' = 14,
|
17
|
+
'is-6' = 15,
|
18
|
+
'is-7' = 16,
|
19
|
+
'is-8' = 17,
|
20
|
+
'is-9' = 18,
|
21
|
+
'is-10' = 19,
|
22
|
+
'is-11' = 20,
|
23
|
+
'is-12' = 21
|
24
|
+
}
|
25
|
+
export declare enum columnOffsetEnum {
|
26
|
+
'is-offset-1' = 0,
|
27
|
+
'is-offset-2' = 1,
|
28
|
+
'is-offset-3' = 2,
|
29
|
+
'is-offset-4' = 3,
|
30
|
+
'is-offset-5' = 4,
|
31
|
+
'is-offset-6' = 5,
|
32
|
+
'is-offset-7' = 6,
|
33
|
+
'is-offset-8' = 7,
|
34
|
+
'is-offset-9' = 8,
|
35
|
+
'is-offset-10' = 9,
|
36
|
+
'is-offset-11' = 10,
|
37
|
+
'is-offset-12' = 11
|
38
|
+
}
|
@@ -90,4 +90,24 @@ export interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
|
90
90
|
rows?: number;
|
91
91
|
isFixedSize?: boolean;
|
92
92
|
}
|
93
|
+
export interface DeleteProps extends BasicProps {
|
94
|
+
size?: Exclude<basicSizeType, 'is-normal'>;
|
95
|
+
onClick?: () => void;
|
96
|
+
}
|
97
|
+
export interface SelectOption {
|
98
|
+
id: string | number;
|
99
|
+
name: string;
|
100
|
+
selected?: boolean;
|
101
|
+
}
|
102
|
+
export interface SelectProps extends BasicProps {
|
103
|
+
options?: SelectOption[];
|
104
|
+
showOptions?: number;
|
105
|
+
isMultiple?: boolean;
|
106
|
+
color?: basicColorType;
|
107
|
+
size?: basicSizeType;
|
108
|
+
isRounded?: boolean;
|
109
|
+
isHovered?: boolean;
|
110
|
+
isFocused?: boolean;
|
111
|
+
onClick?: () => void;
|
112
|
+
}
|
93
113
|
export {};
|
package/dist/esm/index.js
CHANGED
@@ -2921,21 +2921,21 @@ const Tag = ({ text, testId = null, style = null, color = null, isLight = null,
|
|
2921
2921
|
});
|
2922
2922
|
return withAddon ? (React.createElement("section", { "data-testid": _testId, style: style !== null && style !== void 0 ? style : undefined, className: tagsWrapperClasses },
|
2923
2923
|
React.createElement("span", { className: tagClasses }, text),
|
2924
|
-
withDelete ? (React.createElement("a", { "data-testid": `${_testId}-delete`, className: 'tag is-delete', onClick: onDeleteClick
|
2924
|
+
withDelete ? (React.createElement("a", { "data-testid": `${_testId}-delete`, className: 'tag is-delete', onClick: onDeleteClick !== null && onDeleteClick !== void 0 ? onDeleteClick : undefined })) : (React.createElement("span", { className: addonTagClasses }, addonText)))) : (React.createElement("span", { "data-testid": _testId, style: style !== null && style !== void 0 ? style : undefined, className: tagClasses },
|
2925
2925
|
text,
|
2926
|
-
withDelete ? (React.createElement("button", { "data-testid": `${_testId}-delete`, className: 'delete', onClick: onDeleteClick
|
2926
|
+
withDelete ? (React.createElement("button", { "data-testid": `${_testId}-delete`, className: 'delete', onClick: onDeleteClick !== null && onDeleteClick !== void 0 ? onDeleteClick : undefined })) : null));
|
2927
2927
|
};
|
2928
2928
|
|
2929
2929
|
const Box = ({ testId = 'test-box', style = null, children = null }) => children ? (React.createElement("section", { "data-testid": testId, className: 'box', style: style !== null && style !== void 0 ? style : undefined }, children)) : null;
|
2930
2930
|
|
2931
2931
|
const renderTitleSection = (section) => {
|
2932
|
-
var _a, _b;
|
2932
|
+
var _a, _b, _c;
|
2933
2933
|
const sectionClasses = parseClasses([
|
2934
2934
|
section === null || section === void 0 ? void 0 : section.prop,
|
2935
2935
|
(_a = section === null || section === void 0 ? void 0 : section.size) !== null && _a !== void 0 ? _a : 'is-6',
|
2936
2936
|
(section === null || section === void 0 ? void 0 : section.prop) === 'title' && (section === null || section === void 0 ? void 0 : section.isSpaced) ? 'is-spaced' : null
|
2937
2937
|
]);
|
2938
|
-
return section ? (React.createElement("p", { "data-testid": (_b = section === null || section === void 0 ? void 0 : section.testId) !== null && _b !== void 0 ? _b : `${section === null || section === void 0 ? void 0 : section.prop}-test`, className: sectionClasses, style: section.style
|
2938
|
+
return section ? (React.createElement("p", { "data-testid": (_b = section === null || section === void 0 ? void 0 : section.testId) !== null && _b !== void 0 ? _b : `${section === null || section === void 0 ? void 0 : section.prop}-test`, className: sectionClasses, style: (_c = section.style) !== null && _c !== void 0 ? _c : undefined }, section === null || section === void 0 ? void 0 : section.text)) : null;
|
2939
2939
|
};
|
2940
2940
|
const Title = ({ main, secondary }) => (React.createElement(React.Fragment, null,
|
2941
2941
|
renderTitleSection(main),
|
@@ -3036,5 +3036,32 @@ const TextArea = ({ testId = null, text = null, cols = null, rows = null, isDisa
|
|
3036
3036
|
return (React.createElement("textarea", { "data-testid": _testId, defaultValue: text !== null && text !== void 0 ? text : undefined, cols: cols !== null && cols !== void 0 ? cols : undefined, rows: rows !== null && rows !== void 0 ? rows : undefined, disabled: isDisabled, readOnly: isReadonly, style: style !== null && style !== void 0 ? style : undefined, className: textAreaClasses, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined, onChange: onChange !== null && onChange !== void 0 ? onChange : undefined }));
|
3037
3037
|
};
|
3038
3038
|
|
3039
|
-
|
3039
|
+
const Delete = ({ testId = null, style = null, size = null, onClick = null }) => {
|
3040
|
+
const deleteClasses = parseClasses(['delete', size]);
|
3041
|
+
const _testId = testId !== null && testId !== void 0 ? testId : parseTestId({
|
3042
|
+
tag: 'delete',
|
3043
|
+
parsedClasses: deleteClasses
|
3044
|
+
});
|
3045
|
+
return (React.createElement("button", { "data-testid": _testId, style: style !== null && style !== void 0 ? style : undefined, className: deleteClasses, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined }));
|
3046
|
+
};
|
3047
|
+
|
3048
|
+
const Select = ({ testId = null, showOptions = 1, options = [], isMultiple = false, color = null, size = null, isRounded = null, isHovered = null, isFocused = null, onClick = null }) => {
|
3049
|
+
const selectClasses = parseClasses([
|
3050
|
+
'select',
|
3051
|
+
color,
|
3052
|
+
size,
|
3053
|
+
isMultiple ? 'is-multiple' : null,
|
3054
|
+
isRounded ? 'is-rounded' : null,
|
3055
|
+
isHovered ? 'is-hovered' : null,
|
3056
|
+
isFocused ? 'is-focused' : null
|
3057
|
+
]);
|
3058
|
+
const selectTestId = testId !== null && testId !== void 0 ? testId : parseTestId({
|
3059
|
+
tag: 'select',
|
3060
|
+
parsedClasses: selectClasses
|
3061
|
+
});
|
3062
|
+
return (React.createElement("section", { "data-testid": `${selectTestId}-container`, className: selectClasses },
|
3063
|
+
React.createElement("select", { multiple: isMultiple, size: showOptions, "data-testid": selectTestId }, options.map(({ id, name, selected }, i) => (React.createElement("option", { "data-testid": `${selectTestId}-option-${i}`, key: id.toString(), selected: selected !== null && selected !== void 0 ? selected : false, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined }, name))))));
|
3064
|
+
};
|
3065
|
+
|
3066
|
+
export { Block, Box, Button, Column, Delete, Icon, Input, ProgressBar, Select, Tag, TextArea, Title };
|
3040
3067
|
//# sourceMappingURL=index.js.map
|