reactive-bulma 2.3.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/README.md +27 -3
  2. package/dist/cjs/index.js +153 -38
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/atoms/BreadcrumbItem/index.d.ts +4 -0
  5. package/dist/cjs/types/components/atoms/DropdownItem/index.d.ts +4 -0
  6. package/dist/cjs/types/components/atoms/DropdownTrigger/index.d.ts +4 -0
  7. package/dist/cjs/types/components/atoms/index.d.ts +3 -0
  8. package/dist/cjs/types/components/molecules/Breadcrumbs/index.d.ts +4 -0
  9. package/dist/cjs/types/components/molecules/Dropdown/index.d.ts +4 -0
  10. package/dist/cjs/types/components/molecules/index.d.ts +2 -0
  11. package/dist/cjs/types/interfaces/atomProps.d.ts +26 -14
  12. package/dist/cjs/types/interfaces/commonProps.d.ts +4 -0
  13. package/dist/cjs/types/interfaces/moleculeProps.d.ts +21 -3
  14. package/dist/cjs/types/types/domTypes.d.ts +1 -0
  15. package/dist/cjs/types/types/styleTypes.d.ts +2 -0
  16. package/dist/esm/index.js +149 -39
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/types/components/atoms/BreadcrumbItem/index.d.ts +4 -0
  19. package/dist/esm/types/components/atoms/DropdownItem/index.d.ts +4 -0
  20. package/dist/esm/types/components/atoms/DropdownTrigger/index.d.ts +4 -0
  21. package/dist/esm/types/components/atoms/index.d.ts +3 -0
  22. package/dist/esm/types/components/molecules/Breadcrumbs/index.d.ts +4 -0
  23. package/dist/esm/types/components/molecules/Dropdown/index.d.ts +4 -0
  24. package/dist/esm/types/components/molecules/index.d.ts +2 -0
  25. package/dist/esm/types/interfaces/atomProps.d.ts +26 -14
  26. package/dist/esm/types/interfaces/commonProps.d.ts +4 -0
  27. package/dist/esm/types/interfaces/moleculeProps.d.ts +21 -3
  28. package/dist/esm/types/types/domTypes.d.ts +1 -0
  29. package/dist/esm/types/types/styleTypes.d.ts +2 -0
  30. package/dist/index.d.ts +60 -13
  31. package/package.json +30 -27
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { BreadcrumbItemProps } from '../../../interfaces/atomProps';
3
+ declare const BreadcrumbItem: React.FC<BreadcrumbItemProps>;
4
+ export default BreadcrumbItem;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DropdownItemProps } from '../../../interfaces/atomProps';
3
+ declare const DropdownItem: React.FC<DropdownItemProps>;
4
+ export default DropdownItem;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DropdownTriggerProps } from '../../../interfaces/atomProps';
3
+ declare const DropdownTrigger: React.FC<DropdownTriggerProps>;
4
+ export default DropdownTrigger;
@@ -13,3 +13,6 @@ export { default as Select } from './Select';
13
13
  export { default as File } from './File';
14
14
  export { default as Checkbox } from './Checkbox';
15
15
  export { default as RadioButton } from './RadioButton';
16
+ export { default as BreadcrumbItem } from './BreadcrumbItem';
17
+ export { default as DropdownTrigger } from './DropdownTrigger';
18
+ export { default as DropdownItem } from './DropdownItem';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { BreadcrumbsProps } from '../../../interfaces/moleculeProps';
3
+ declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
4
+ export default Breadcrumbs;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DropdownProps } from '../../../interfaces/moleculeProps';
3
+ declare const Dropdown: React.FC<DropdownProps>;
4
+ export default Dropdown;
@@ -1,3 +1,5 @@
1
1
  export { default as ButtonGroup } from './ButtonGroup';
2
2
  export { default as ColumnGroup } from './ColumnGroup';
3
3
  export { default as Notification } from './Notification';
4
+ export { default as Breadcrumbs } from './Breadcrumbs';
5
+ export { default as Dropdown } from './Dropdown';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { ElementProps, ComposedElementProps } from './commonProps';
2
+ import { ElementProps, ComposedElementProps, ClickeableProps } from './commonProps';
3
3
  import { basicColorType, columnOffsetType, columnSizeType, fixedImageSizeType, iconColorModeType, basicSizeType, textColorType, titleSizeType } from '../types/styleTypes';
4
- import { inputTypes } from '../types/domTypes';
4
+ import { DropdownItemType, inputTypes } from '../types/domTypes';
5
5
  export interface ColumnProps extends ElementProps, React.ComponentPropsWithoutRef<'section'> {
6
6
  /** `Attribute` Reffers to the component or array of components that will be shown inside the column */
7
7
  children?: string | React.ReactElement | React.ReactElement[];
@@ -118,7 +118,7 @@ export interface IconProps extends ComposedElementProps {
118
118
  /** `Styling` Animates the icon spinning 360° */
119
119
  isSpinning?: boolean;
120
120
  }
121
- export interface InputProps extends ElementProps {
121
+ export interface InputProps extends ElementProps, ClickeableProps {
122
122
  /** `Attribute` `Required` What type of input will be used */
123
123
  type: inputTypes;
124
124
  /** `Attribute` The value that will be shown on the input */
@@ -137,8 +137,6 @@ export interface InputProps extends ElementProps {
137
137
  isHovered?: boolean;
138
138
  /** `Styling` Will add a specific border when the input is focused by the user */
139
139
  isFocused?: boolean;
140
- /** `Function` Click function. Alone does not nothing, but can be reused for other components */
141
- onClick?: () => void;
142
140
  /** `Function` Reffers to each time the user press a key. Alone does not nothing, but can be reused for other components */
143
141
  onChange?: () => void;
144
142
  }
@@ -150,18 +148,16 @@ export interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
150
148
  /** `Styling` Will disable characteristic sizable property by removing its control on bottom-right corner */
151
149
  isFixedSize?: boolean;
152
150
  }
153
- export interface DeleteProps extends ElementProps {
151
+ export interface DeleteProps extends ElementProps, ClickeableProps {
154
152
  /** `Styling` Set icons's size */
155
153
  size?: Exclude<basicSizeType, 'is-normal'>;
156
- /** `Function` Click function. Alone does not nothing, but can be reused for other components */
157
- onClick?: () => void;
158
154
  }
159
155
  export interface SelectOption {
160
156
  id: string | number;
161
157
  name: string;
162
158
  selected?: boolean;
163
159
  }
164
- export interface SelectProps extends ComposedElementProps {
160
+ export interface SelectProps extends ComposedElementProps, ClickeableProps {
165
161
  /** `Attribute` Indicates the options contained on the select */
166
162
  options?: SelectOption[];
167
163
  /** `Attribute` Indicates how many options will be shown at first glance (before looking for the whole list */
@@ -178,10 +174,8 @@ export interface SelectProps extends ComposedElementProps {
178
174
  isHovered?: boolean;
179
175
  /** `Styling`Will add a specific border when the input is focused by the user */
180
176
  isFocused?: boolean;
181
- /** `Function` Click function. Alone does not nothing, but can be reused for other components */
182
- onClick?: () => void;
183
177
  }
184
- export interface FileProps extends ComposedElementProps {
178
+ export interface FileProps extends ComposedElementProps, ClickeableProps {
185
179
  /** `Attribute` The name of the file to be uploaded */
186
180
  fileName?: string;
187
181
  /** `Attribute` The icon displayed in file's button" */
@@ -198,8 +192,6 @@ export interface FileProps extends ComposedElementProps {
198
192
  color?: basicColorType;
199
193
  /** `Styling` Set button's size */
200
194
  size?: basicSizeType;
201
- /** `Function` Click function, alone does not nothing, but can be reused for other components */
202
- onClick?: () => void;
203
195
  }
204
196
  export interface CheckBoxProps extends ComposedElementProps {
205
197
  /** `Attribute` Sets checkbox's text that will be shown next to its control */
@@ -229,3 +221,23 @@ export interface RadioButtonProps extends ComposedElementProps {
229
221
  /** `Function` Click function, alone does not nothing, but can be reused for other components */
230
222
  onChange?: () => void;
231
223
  }
224
+ export interface BreadcrumbItemProps extends ComposedElementProps, ClickeableProps {
225
+ /** `Attribute` `Required` Indicates item text that will be shown */
226
+ text: string;
227
+ /** `Styling` Marks the item as the one where user is located (based on breadcrumb hierarchy) */
228
+ isActiveItem?: boolean;
229
+ }
230
+ export interface DropdownTriggerProps extends ComposedElementProps, ClickeableProps {
231
+ /** `Attribute` `Required` Sets the name will be shown on the dropdown input */
232
+ menuText: string;
233
+ /** `Attribute` Sets a relationship between trigger's button and dropdown's menu to toggle display */
234
+ dropdownPointer?: string;
235
+ }
236
+ export interface DropdownItemProps extends ElementProps, ClickeableProps {
237
+ /** `Attribute` `Required` Sets the name will be shown on the item */
238
+ itemText: string;
239
+ /** `Attribute` Changes item's composition into a `<hr>`, a `<a>` or a `<div>` depending its type */
240
+ type?: DropdownItemType;
241
+ /** `Styling` Marks the item as the one where user is located (based on dropdown hierarchy) */
242
+ isActiveItem?: boolean;
243
+ }
@@ -17,3 +17,7 @@ export interface ElementProps {
17
17
  }
18
18
  export interface ComposedElementProps extends ElementProps, ContainerProps {
19
19
  }
20
+ export interface ClickeableProps {
21
+ /** `Function` Click function, alone does not nothing, but can be reused for other components */
22
+ onClick?: () => void;
23
+ }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { ElementProps } from './commonProps';
3
- import { ButtonProps, ColumnProps, DeleteProps } from './atomProps';
4
- import { basicColorType, columnGapType } from '../types/styleTypes';
2
+ import { ComposedElementProps, ElementProps } from './commonProps';
3
+ import { BreadcrumbItemProps, ButtonProps, ColumnProps, DeleteProps, DropdownItemProps } from './atomProps';
4
+ import { basicColorType, basicSizeType, breadcrumbAlignType, breadcrumbSeparatorType, columnGapType } from '../types/styleTypes';
5
5
  export interface ButtonGroupProps extends ElementProps {
6
6
  /** `Atribute` `Required` Array of `Button` objects that will be shown */
7
7
  buttonList: ButtonProps[];
@@ -34,3 +34,21 @@ export interface NotificationProps extends ElementProps {
34
34
  /** `Styling` Will adjust the selected color with a ligther style */
35
35
  isLightColor?: boolean;
36
36
  }
37
+ export interface BreadcrumbsProps extends ComposedElementProps {
38
+ /** `Atribute` `Required` Array of `BreadcrumbItems` objects that will be shown */
39
+ items: BreadcrumbItemProps[];
40
+ /** `Styling` Will adjust element position on screen */
41
+ alignment?: breadcrumbAlignType | null;
42
+ /** `Styling` Will adjust element position on screen */
43
+ separator?: breadcrumbSeparatorType | null;
44
+ /** `Styling` Set button's size on bulma's size tokens */
45
+ size?: Exclude<basicSizeType, 'is-normal'>;
46
+ }
47
+ export interface DropdownProps extends ElementProps {
48
+ /** `Atribute` `Required` Sets the name will be shown on the dropdown input */
49
+ inputText: string;
50
+ /** `Attribute` Sets a relationship between dropdown trigger's button and dropdown's menu to toggle display */
51
+ dropdownPointer?: string;
52
+ /** `Atribute` `Required` Array of `DropdownItem` objects that will be shown on its menu */
53
+ listOfItems: DropdownItemProps[];
54
+ }
@@ -1,2 +1,3 @@
1
1
  export type buttonType = 'submit' | 'reset' | 'button';
2
2
  export type inputTypes = 'text' | 'password' | 'email' | 'tel';
3
+ export type DropdownItemType = 'item' | 'link' | 'divider';
@@ -7,3 +7,5 @@ export type fixedImageSizeType = 'is-16x16' | 'is-24x24' | 'is-32x32' | 'is-48x4
7
7
  export type basicSizeType = 'is-small' | 'is-normal' | 'is-medium' | 'is-large';
8
8
  export type iconColorModeType = 'light' | 'dark';
9
9
  export type columnGapType = 'is-0' | 'is-1' | 'is-2' | 'is-3' | 'is-4' | 'is-5' | 'is-6' | 'is-7' | 'is-8';
10
+ export type breadcrumbAlignType = 'is-centered' | 'is-right';
11
+ export type breadcrumbSeparatorType = 'has-arrow-separator' | 'has-bullet-separator' | 'has-dot-separator' | 'has-succeeds-separator';