reactive-bulma 2.5.0 → 2.6.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.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { MessageProps } from '../../../interfaces/moleculeProps';
3
+ declare const Message: React.FC<MessageProps>;
4
+ export default Message;
@@ -3,3 +3,4 @@ export { default as ColumnGroup } from './ColumnGroup';
3
3
  export { default as Notification } from './Notification';
4
4
  export { default as Breadcrumbs } from './Breadcrumbs';
5
5
  export { default as Dropdown } from './Dropdown';
6
+ export { default as Message } from './Message';
@@ -52,3 +52,15 @@ export interface DropdownProps extends ElementProps {
52
52
  /** `Atribute` `Required` Array of `DropdownItem` objects that will be shown on its menu */
53
53
  listOfItems: DropdownItemProps[];
54
54
  }
55
+ export interface MessageProps extends ElementProps {
56
+ /** `Atribute` Sets the header's text that will be shown on message's darker zone */
57
+ headerText?: string;
58
+ /** `Atribute` `Required` Sets the body's text that will be shown on message's lighter zone */
59
+ bodyText: string;
60
+ /** `Atribute` Includes a `Delete` config object that will be shown */
61
+ deleteButton?: DeleteProps;
62
+ /** `Styling` Color based on bulma's color tokens */
63
+ color?: basicColorType;
64
+ /** `Styling` Set button's size on bulma's size tokens */
65
+ size?: Exclude<basicSizeType, 'is-normal'>;
66
+ }
package/dist/esm/index.js CHANGED
@@ -3335,7 +3335,7 @@ const Breadcrumbs = ({ testId = 'breadcrumbs', containerTestId = null, cssClasse
3335
3335
 
3336
3336
  const renderDropdownMenu = (items) => (React.createElement("section", { className: 'dropdown-content' }, items.map((dropdownItemConfig, i) => {
3337
3337
  const isFirstItemInMenu = items.length > 1 && i === 0;
3338
- return isFirstItemInMenu ? (React.createElement(DropdownItem, Object.assign({ key: `dropdown-item-${i}` }, dropdownItemConfig))) : (React.createElement(React.Fragment, null,
3338
+ return isFirstItemInMenu ? (React.createElement(DropdownItem, Object.assign({ key: `dropdown-item-${i}` }, dropdownItemConfig))) : (React.createElement("section", { key: `dropdown-item-${i}-section` },
3339
3339
  React.createElement(DropdownItem, { key: `dropdown-item-${i}-divider`, type: 'divider', itemText: 'divider' }),
3340
3340
  React.createElement(DropdownItem, Object.assign({ key: `dropdown-item-${i}` }, dropdownItemConfig))));
3341
3341
  })));
@@ -3354,5 +3354,15 @@ const Dropdown = ({ testId = null, cssClasses = null, style = null, inputText, d
3354
3354
  React.createElement("section", { className: 'dropdown-menu', id: dropdownPointer, role: 'menu' }, renderDropdownMenu(listOfItems))));
3355
3355
  };
3356
3356
 
3357
- export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, Icon, Input, Notification, ProgressBar, RadioButton, Select, Tag, TextArea, Title };
3357
+ const Message = ({ testId = null, cssClasses = null, style = null, headerText = null, bodyText, deleteButton = null, color = null, size = null }) => {
3358
+ const messageClasses = parseClasses(['message', color, size, cssClasses]);
3359
+ const messageTestId = testId !== null && testId !== void 0 ? testId : parseTestId({ tag: 'message', parsedClasses: messageClasses });
3360
+ return (React.createElement("article", { "data-testid": messageTestId, className: messageClasses, style: style !== null && style !== void 0 ? style : undefined },
3361
+ headerText && (React.createElement("section", { "data-testid": `${messageTestId}-header`, className: 'message-header' },
3362
+ React.createElement("p", null, headerText),
3363
+ deleteButton ? React.createElement(Delete, Object.assign({}, deleteButton)) : null)),
3364
+ React.createElement("section", { "data-testid": `${messageTestId}-body`, className: 'message-body' }, bodyText)));
3365
+ };
3366
+
3367
+ export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, Icon, Input, Message, Notification, ProgressBar, RadioButton, Select, Tag, TextArea, Title };
3358
3368
  //# sourceMappingURL=index.js.map