@geneui/components 2.11.2 → 2.12.2

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.
Files changed (213) hide show
  1. package/{ActionableList.js → ActionableList/index.js} +83 -152
  2. package/{AdvancedSearch.js → AdvancedSearch/index.js} +290 -304
  3. package/Alert/index.js +97 -0
  4. package/Avatar/index.js +30 -0
  5. package/Badge/index.js +75 -0
  6. package/{Breadcrumb.js → Breadcrumb/index.js} +32 -31
  7. package/BusyLoader/index.js +68 -0
  8. package/Button/index.js +129 -0
  9. package/CHANGELOG.md +53 -0
  10. package/{Card.js → Card/index.js} +82 -94
  11. package/{CardList.js → CardList/index.js} +120 -165
  12. package/{CellMeasurerCache-b786dd93.js → CellMeasurerCache-3741d716.js} +2 -2
  13. package/{index-9164a86d.js → Charts/index.js} +17103 -30447
  14. package/{Checkbox.js → Checkbox/index.js} +37 -38
  15. package/{CheckboxGroup.js → CheckboxGroup/index.js} +41 -42
  16. package/{CheckboxGroupWithSearch.js → CheckboxGroupWithSearch/index.js} +64 -65
  17. package/{Collapse.js → Collapse/index.js} +28 -29
  18. package/{ColorPicker.js → ColorPicker/index.js} +16 -16
  19. package/ComboBox/index.js +525 -0
  20. package/Counter/index.js +310 -0
  21. package/{DateFilter.js → DateFilter/index.js} +45 -43
  22. package/{DatePicker.js → DatePicker/index.js} +106 -108
  23. package/{index-0199942c.js → DatePickerInput/index.js} +114 -100
  24. package/{Divider.js → Divider/index.js} +9 -10
  25. package/{Drawer.js → Drawer/index.js} +40 -41
  26. package/Dropdown/index.js +41 -0
  27. package/{Editor.js → Editor/index.js} +165 -164
  28. package/{Empty.js → Empty/index.js} +12 -13
  29. package/{ExtendedInput.js → ExtendedInput/index.js} +81 -71
  30. package/Form/index.js +83 -0
  31. package/{FormContainer.js → FormContainer/index.js} +25 -26
  32. package/FormableCheckbox/index.js +26 -0
  33. package/FormableDatePicker/index.js +41 -0
  34. package/FormableDropdown/index.js +48 -0
  35. package/FormableEditor/index.js +24 -0
  36. package/{FormableHOC-21051057.js → FormableHOC-55263162.js} +3 -3
  37. package/FormableMultiSelectDropdown/index.js +48 -0
  38. package/FormableNumberInput/index.js +32 -0
  39. package/FormableRadio/index.js +22 -0
  40. package/FormableSwitcher/index.js +22 -0
  41. package/FormableTextInput/index.js +32 -0
  42. package/FormableUploader/index.js +42 -0
  43. package/GeneUIProvider/index.js +282 -0
  44. package/{Grid.js → Grid/index.js} +27 -27
  45. package/Holder/index.js +261 -0
  46. package/{Icon.js → Icon/index.js} +9 -10
  47. package/Image/index.js +129 -0
  48. package/ImagePreview/index.js +481 -0
  49. package/{KeyValue.js → KeyValue/index.js} +11 -12
  50. package/LICENSE +21 -0
  51. package/Label/index.js +57 -0
  52. package/LinkButton/index.js +67 -0
  53. package/{Menu.js → Menu/index.js} +27 -28
  54. package/MobileNavigation/index.js +94 -0
  55. package/{MobilePopup.js → MobilePopup/index.js} +42 -41
  56. package/{Modal.js → Modal/index.js} +39 -40
  57. package/ModuleTitle/index.js +143 -0
  58. package/{NavigationMenu.js → NavigationMenu/index.js} +30 -29
  59. package/Notification/index.js +119 -0
  60. package/Option/index.js +184 -0
  61. package/Overlay/index.js +189 -0
  62. package/Overspread/index.js +289 -0
  63. package/{Pagination.js → Pagination/index.js} +35 -34
  64. package/Paper/index.js +96 -0
  65. package/{index-084588e9.js → Popover/index.js} +48 -58
  66. package/PopoverV2/index.js +18 -0
  67. package/{Portal.js → Portal/index.js} +7 -8
  68. package/{Products.js → Products/index.js} +20 -21
  69. package/Profile/index.js +585 -0
  70. package/Progress/index.js +199 -0
  71. package/{QRCode.js → QRCode/index.js} +4 -6
  72. package/{Radio.js → Radio/index.js} +25 -26
  73. package/{RadioGroup.js → RadioGroup/index.js} +17 -18
  74. package/{index-00fe8887.js → Range/index.js} +29 -32
  75. package/RichEditor/index.js +13 -0
  76. package/{RichEditor-98accead.js → RichEditor-8b0f7ccd.js} +18 -18
  77. package/{Scrollbar.js → Scrollbar/index.js} +15 -17
  78. package/{Search.js → Search/index.js} +25 -24
  79. package/SearchWithDropdown/index.js +138 -0
  80. package/Section/index.js +61 -0
  81. package/{SkeletonLoader.js → SkeletonLoader/index.js} +13 -14
  82. package/{Slider.js → Slider/index.js} +46 -43
  83. package/Status/index.js +103 -0
  84. package/Steps/index.js +313 -0
  85. package/{index-897d8240.js → SuggestionList/index.js} +15 -38
  86. package/{Switcher.js → Switcher/index.js} +30 -31
  87. package/Table/index.js +53 -0
  88. package/{TableCompositions.js → TableCompositions/index.js} +131 -168
  89. package/Tabs/index.js +235 -0
  90. package/Tag/index.js +102 -0
  91. package/{TextLink.js → TextLink/index.js} +3 -3
  92. package/{Textarea.js → Textarea/index.js} +66 -65
  93. package/{Time.js → Time/index.js} +13 -14
  94. package/TimePicker/index.js +555 -0
  95. package/Timeline/index.js +113 -0
  96. package/Title/index.js +65 -0
  97. package/{Toaster.js → Toaster/index.js} +19 -20
  98. package/{Tooltip.js → Tooltip/index.js} +27 -28
  99. package/{TransferList.js → TransferList/index.js} +44 -55
  100. package/{index-135b9d17.js → Uploader/index.js} +119 -116
  101. package/{ValidatableCheckbox.js → ValidatableCheckbox/index.js} +23 -24
  102. package/{ValidatableDatePicker.js → ValidatableDatePicker/index.js} +44 -42
  103. package/ValidatableDropdown/index.js +139 -0
  104. package/ValidatableElements/index.js +65 -0
  105. package/ValidatableMultiSelectDropdown/index.js +150 -0
  106. package/{ValidatableNumberInput.js → ValidatableNumberInput/index.js} +41 -33
  107. package/{ValidatableRadio.js → ValidatableRadio/index.js} +19 -20
  108. package/{ValidatableSwitcher.js → ValidatableSwitcher/index.js} +19 -20
  109. package/{ValidatableTextInput.js → ValidatableTextInput/index.js} +32 -31
  110. package/{ValidatableTimeInput.js → ValidatableTimeInput/index.js} +31 -30
  111. package/{ValidatableUploader.js → ValidatableUploader/index.js} +36 -34
  112. package/Widget/index.js +227 -0
  113. package/config-0ca92874.js +31 -0
  114. package/{configs-91c86664.js → configs-fed6ac34.js} +28 -1
  115. package/hooks/useBodyScroll.js +16 -0
  116. package/hooks/useClick.js +18 -0
  117. package/{useClickOutside-5183e396.js → hooks/useClickOutside.js} +1 -1
  118. package/hooks/useDebounceHook.js +16 -0
  119. package/{useDeviceType-dd51db38.js → hooks/useDeviceType.js} +4 -3
  120. package/hooks/useDidMount.js +15 -0
  121. package/{useEllipsisDetection-ef536015.js → hooks/useEllipsisDetection.js} +1 -1
  122. package/hooks/useForceUpdate.js +8 -0
  123. package/hooks/useImgDownload.js +18 -0
  124. package/{useKeyDown-38102ae7.js → hooks/useKeyDown.js} +1 -1
  125. package/hooks/useMount.js +13 -0
  126. package/hooks/useMutationObserver.js +21 -0
  127. package/hooks/usePrevious.js +10 -0
  128. package/hooks/useThrottle.js +16 -0
  129. package/hooks/useToggle.js +11 -0
  130. package/hooks/useUpdatableRef.js +14 -0
  131. package/hooks/useUpdate.js +10 -0
  132. package/{useWidth-9f4647f8.js → hooks/useWidth.js} +2 -2
  133. package/{useWindowSize-80369d76.js → hooks/useWindowSize.js} +1 -1
  134. package/{index-8c98317a.js → index-11eea761.js} +678 -752
  135. package/index-2ad83e03.js +4 -0
  136. package/index-34e47647.js +10054 -0
  137. package/index-45eafea6.js +90 -0
  138. package/{index-5e96cb4d.js → index-462461c0.js} +50 -48
  139. package/{index-ac59cb10.js → index-a0e4e333.js} +6 -6
  140. package/{index-e8776f3d.js → index-b1e429a7.js} +1 -1
  141. package/index.d.ts +115 -0
  142. package/index.js +137 -113
  143. package/index.mobile.d.ts +16 -0
  144. package/lib/atoms/Avatar/Avatar.d.ts +34 -0
  145. package/lib/atoms/Avatar/index.d.ts +1 -0
  146. package/lib/atoms/LinkButton/LinkButton.d.ts +46 -0
  147. package/lib/atoms/LinkButton/index.d.ts +1 -0
  148. package/{objectWithoutPropertiesLoose-299691d8.js → objectWithoutPropertiesLoose-d8a4a68c.js} +12 -12
  149. package/package.json +42 -22
  150. package/{rangeAndSlider-20599da4.js → rangeAndSlider-0301a458.js} +220 -375
  151. package/{react-beautiful-dnd.esm-38c37304.js → react-beautiful-dnd.esm-04c14563.js} +9 -9
  152. package/react-lifecycles-compat.es-6e1f3768.js +158 -0
  153. package/Alert.js +0 -98
  154. package/Avatar.js +0 -77
  155. package/Badge.js +0 -76
  156. package/BusyLoader.js +0 -69
  157. package/Button.js +0 -130
  158. package/Charts.js +0 -99
  159. package/ComboBox.js +0 -99
  160. package/Counter.js +0 -99
  161. package/DatePickerInput.js +0 -30
  162. package/Dropdown.js +0 -99
  163. package/Form.js +0 -116
  164. package/FormableCheckbox.js +0 -27
  165. package/FormableDatePicker.js +0 -39
  166. package/FormableDropdown.js +0 -105
  167. package/FormableEditor.js +0 -24
  168. package/FormableMultiSelectDropdown.js +0 -105
  169. package/FormableNumberInput.js +0 -31
  170. package/FormableRadio.js +0 -23
  171. package/FormableSwitcher.js +0 -23
  172. package/FormableTextInput.js +0 -31
  173. package/FormableUploader.js +0 -40
  174. package/GeneUIProvider.js +0 -256
  175. package/Holder.js +0 -99
  176. package/Image.js +0 -130
  177. package/ImagePreview.js +0 -99
  178. package/Label.js +0 -58
  179. package/LinkButton.js +0 -104
  180. package/MobileNavigation.js +0 -95
  181. package/ModuleTitle.js +0 -99
  182. package/Notification.js +0 -120
  183. package/Option.js +0 -186
  184. package/Overlay.js +0 -99
  185. package/Overspread.js +0 -343
  186. package/Paper.js +0 -97
  187. package/Popover.js +0 -20
  188. package/PopoverV2.js +0 -19
  189. package/Profile.js +0 -99
  190. package/Progress.js +0 -200
  191. package/Range.js +0 -14
  192. package/RichEditor.js +0 -13
  193. package/SearchWithDropdown.js +0 -195
  194. package/Section.js +0 -62
  195. package/Status.js +0 -104
  196. package/Steps.js +0 -312
  197. package/SuggestionList.js +0 -15
  198. package/Table.js +0 -102
  199. package/Tabs.js +0 -236
  200. package/Tag.js +0 -103
  201. package/TimePicker.js +0 -99
  202. package/Timeline.js +0 -114
  203. package/Title.js +0 -66
  204. package/Uploader.js +0 -32
  205. package/ValidatableDropdown.js +0 -99
  206. package/ValidatableElements.js +0 -99
  207. package/ValidatableMultiSelectDropdown.js +0 -99
  208. package/Widget.js +0 -99
  209. package/globalStyling-9c60a159.js +0 -4
  210. package/index-2030e31c.js +0 -4
  211. package/index-b7a33c58.js +0 -11
  212. package/index-e0af0caf.js +0 -1182
  213. package/useMount-6fef51a5.js +0 -9
package/Alert/index.js ADDED
@@ -0,0 +1,97 @@
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import React__default from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { c as classnames } from '../index-6ff23041.js';
5
+ import { s as screenTypes } from '../configs-fed6ac34.js';
6
+ import '../dateValidation-67caec66.js';
7
+ import 'react-dom';
8
+ import useDeviceType from '../hooks/useDeviceType.js';
9
+ import Icon from '../Icon/index.js';
10
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
11
+ import '../_commonjsHelpers-24198af3.js';
12
+ import '../hooks/useWindowSize.js';
13
+
14
+ var css_248z = "[data-gene-ui-version=\"2.12.2\"] .alert-holder{background:var(--background);border-radius:.6rem;width:100%;word-break:break-word}[data-gene-ui-version=\"2.12.2\"] .toaster-holder.top .alert-holder.mobile-view:first-child,[data-gene-ui-version=\"2.12.2\"] .toaster-holder.top .alert-holder.mobile-view:first-child .alert-box{border-top-left-radius:0;border-top-right-radius:0}[data-gene-ui-version=\"2.12.2\"] .toaster-holder.bottom .alert-holder.mobile-view:last-child,[data-gene-ui-version=\"2.12.2\"] .toaster-holder.bottom .alert-holder.mobile-view:last-child .alert-box{border-bottom-left-radius:0;border-bottom-right-radius:0}[data-gene-ui-version=\"2.12.2\"] .alert-box{background:rgba(var(--confirm-rgb),.1);border:1px solid var(--confirm);border-radius:.6rem;display:flex;min-height:4.2rem;padding:.8rem .7rem;width:100%}[data-gene-ui-version=\"2.12.2\"] .alert-box.type-info{--confirm:var(--hero);--confirm-hover:var(--hero-hover);--confirm-sc:var(--hero-sc);--confirm-rgb:var(--hero-rgb);--confirm-sc-rgb:var(--hero-sc-rgb)}[data-gene-ui-version=\"2.12.2\"] .alert-box.type-warning{--confirm:var(--warning);--confirm-hover:var(--warning-hover);--confirm-sc:var(--warning-sc);--confirm-rgb:var(--warning-rgb);--confirm-sc-rgb:var(--warning-sc-rgb)}[data-gene-ui-version=\"2.12.2\"] .alert-box.type-error{--confirm:var(--danger);--confirm-hover:var(--danger-hover);--confirm-sc:var(--danger-sc);--confirm-rgb:var(--danger-rgb);--confirm-sc-rgb:var(--danger-sc-rgb)}[data-gene-ui-version=\"2.12.2\"] .alert-box.type-note{--confirm:var(--note);--confirm-hover:var(--note-hover);--confirm-sc:var(--note-sc);--confirm-rgb:var(--note-rgb);--confirm-sc-rgb:var(--note-sc-rgb)}[data-gene-ui-version=\"2.12.2\"] .alert-box.type-message{--confirm:var(--message);--confirm-hover:var(--message-hover);--confirm-sc:var(--message-sc);--confirm-rgb:var(--message-rgb);--confirm-sc-rgb:var(--message-sc-rgb)}[data-gene-ui-version=\"2.12.2\"] .alert-holder.mobile-view .alert-box{border-bottom-color:rgba(var(--background-sc-rgb),.1);border-width:0 0 1px}[data-gene-ui-version=\"2.12.2\"] .toaster-holder:not(.top,.bottom,.center) .alert-holder.mobile-view .alert-box{border-radius:0}[data-gene-ui-version=\"2.12.2\"] .alert-box>li{flex-shrink:0;padding:0 .7rem}[data-gene-ui-version=\"2.12.2\"] .alert-box>li.ab-c-c{align-self:center;flex:auto;margin:.4rem 0}[data-gene-ui-version=\"2.12.2\"] .alert-box>li.ab-bc-icon-c{max-width:100%}[data-gene-ui-version=\"2.12.2\"] .alert-box>li a,[data-gene-ui-version=\"2.12.2\"] .alert-box>li.ab-bc-icon-c{color:var(--confirm)}[data-gene-ui-version=\"2.12.2\"] .alert-box .bc-icon-close{cursor:pointer}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .alert-box .bc-icon-close:hover{color:var(--confirm)}}[data-gene-ui-version=\"2.12.2\"] .alert-box a{color:var(--hero);font-weight:600}[data-gene-ui-version=\"2.12.2\"] .alert-box-title{font:600 1.4rem/1.8rem var(--font-family)}[data-gene-ui-version=\"2.12.2\"] .alert-text{font:600 1.2rem/1.42 var(--font-family);margin:.8rem 0 0}";
15
+ styleInject(css_248z);
16
+
17
+ const alertTypes = ['success', 'info', 'warning', 'error', 'note', 'message'];
18
+ function Alert(_ref) {
19
+ let {
20
+ type,
21
+ title,
22
+ onClose,
23
+ message,
24
+ screenType,
25
+ iconProps,
26
+ swapIcon,
27
+ className,
28
+ ...rest
29
+ } = _ref;
30
+ const {
31
+ isMobile
32
+ } = useDeviceType(screenType);
33
+ return /*#__PURE__*/React__default.createElement("div", _extends({
34
+ className: classnames('alert-holder', {
35
+ 'mobile-view': isMobile
36
+ }, className)
37
+ }, rest), /*#__PURE__*/React__default.createElement("ul", {
38
+ className: classnames('alert-box', "type-".concat(type))
39
+ }, (swapIcon || iconProps) && /*#__PURE__*/React__default.createElement("li", {
40
+ className: "ab-bc-icon-c"
41
+ }, swapIcon || /*#__PURE__*/React__default.createElement(Icon, {
42
+ type: "bc-icon-".concat(type === 'warning' ? 'info' : type).concat(iconProps.isFilled ? '-fill' : '')
43
+ })), /*#__PURE__*/React__default.createElement("li", {
44
+ className: "ab-c-c"
45
+ }, /*#__PURE__*/React__default.createElement("div", {
46
+ className: "alert-box-title"
47
+ }, title), message && /*#__PURE__*/React__default.createElement("div", {
48
+ className: "alert-text"
49
+ }, message)), !!onClose && /*#__PURE__*/React__default.createElement("li", {
50
+ className: "ab-action-c",
51
+ onClick: onClose
52
+ }, /*#__PURE__*/React__default.createElement(Icon, {
53
+ type: "bc-icon-close"
54
+ }))));
55
+ }
56
+ Alert.propTypes = {
57
+ /**
58
+ * Alert type is for specifying information message to be delivered. Also a corresponding "Icon" atom will be displayed
59
+ */
60
+ type: PropTypes.oneOf(alertTypes),
61
+ /**
62
+ * Main field to describe alert information. Any valid React node
63
+ */
64
+ title: PropTypes.node.isRequired,
65
+ /**
66
+ * Additional classname
67
+ */
68
+ className: PropTypes.string,
69
+ /**
70
+ * Use this field for describing information more verbose. Any valid React node
71
+ */
72
+ message: PropTypes.node,
73
+ /**
74
+ * The switch between mobile and desktop version of Alert will be applied automatically, when the prop is not specified.
75
+ * When the prop is present it must be changed from outside.
76
+ */
77
+ screenType: PropTypes.oneOf(screenTypes),
78
+ /**
79
+ * When function is passed an "Icon" atom("type": "bc-icon-close") will be displayed((event: Event) => void).
80
+ */
81
+ onClose: PropTypes.func,
82
+ /**
83
+ * Same as "Icon" atom props
84
+ */
85
+ iconProps: PropTypes.shape({
86
+ ...Icon.propTypes
87
+ }),
88
+ /**
89
+ * Use this prop for replace main "Icon". Note that when the prop is specified "type" prop will not work(will be overlooked).
90
+ */
91
+ swapIcon: PropTypes.node
92
+ };
93
+ Alert.defaultProps = {
94
+ type: 'info'
95
+ };
96
+
97
+ export { alertTypes, Alert as default };
@@ -0,0 +1,30 @@
1
+ import React__default from 'react';
2
+ import { c as classnames } from '../index-6ff23041.js';
3
+ import { r as getInitials, n as noop } from '../index-a0e4e333.js';
4
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
5
+ import 'prop-types';
6
+ import '../dateValidation-67caec66.js';
7
+ import '../_commonjsHelpers-24198af3.js';
8
+ import 'react-dom';
9
+
10
+ var css_248z = "[data-gene-ui-version=\"2.12.2\"] .user-avatar-c{--size:2.6rem;background:var(--background-sc) no-repeat 50% 50%/cover;border-radius:.3rem;box-shadow:0 0 0 0 rgba(var(--background-sc-rgb),.2);color:var(--background);font:600 calc(var(--size)/2.3)/var(--size) var(--font-family);height:var(--size);text-align:center;transition:box-shadow .3s;width:var(--size)}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c.clickable{cursor:pointer}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c.clickable:hover{box-shadow:0 0 0 .3rem rgba(var(--background-sc-rgb),.2)}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c:not(.color-default){background:var(--background) no-repeat 50% 50%/cover;box-shadow:0 0 0 0 rgba(var(--background-rgb),.2);color:var(--background-sc)}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c:not(.color-default).clickable:hover{box-shadow:0 0 0 .3rem rgba(var(--background-rgb),.2)}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c.color-green{--background:var(--confirm);--background-hover:var(--confirm-hover);--background-sc:var(--confirm-sc);--background-rgb:var(--confirm-rgb);--background-sc-rgb:var(--confirm-sc-rgb)}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c.color-red{--background:var(--danger);--background-hover:var(--danger-hover);--background-sc:var(--danger-sc);--background-rgb:var(--danger-rgb);--background-sc-rgb:var(--danger-sc-rgb)}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c.shape-circle{border-radius:100%}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c.text-small{font-size:calc(var(--size)/2.5)}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c[class*=bc-icon-]{font-size:calc(var(--size)/2);line-height:var(--size)}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c.size-small{--size:2.2rem}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c.size-medium{--size:3.6rem}[data-gene-ui-version=\"2.12.2\"] .user-avatar-c.size-big{--size:4.6rem}";
11
+ styleInject(css_248z);
12
+
13
+ const Avatar = ({ src, icon, size, color, shape, onClick, children }) => {
14
+ return (React__default.createElement("div", { className: classnames('user-avatar-c', {
15
+ [`size-${size}`]: size,
16
+ [`color-${color}`]: color,
17
+ [`shape-${shape}`]: shape,
18
+ [icon]: !src && icon,
19
+ 'text-small': typeof children === 'string' && children.length > 1,
20
+ clickable: !!onClick
21
+ }), style: { backgroundImage: src ? `url(${src})` : '' }, onClick: onClick }, !src && !icon && children && getInitials(children)));
22
+ };
23
+ Avatar.defaultProps = {
24
+ onClick: noop,
25
+ size: 'default',
26
+ color: 'default',
27
+ shape: 'circle'
28
+ };
29
+
30
+ export { Avatar as default };
package/Badge/index.js ADDED
@@ -0,0 +1,75 @@
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import React__default, { useMemo } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { c as classnames } from '../index-6ff23041.js';
5
+ import { b as badgeConfig } from '../configs-fed6ac34.js';
6
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
7
+
8
+ var css_248z = "[data-gene-ui-version=\"2.12.2\"] .badge{max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content;position:relative}[data-gene-ui-version=\"2.12.2\"] .badge__content{background:var(--danger);border-radius:3rem;color:var(--danger-sc);display:block;font:600 1rem/1.6rem var(--font-family);min-width:1.6rem;padding:0 .5rem;text-align:center}[data-gene-ui-version=\"2.12.2\"] .badge__content-children{position:absolute;top:-.8rem}html:not([dir=rtl]) .badge__content-children{right:-.8rem}html[dir=rtl] .badge__content-children{left:-.8rem}[data-gene-ui-version=\"2.12.2\"] .badge__content-dot{height:1rem;min-height:1rem;min-width:1rem;top:-.5rem;width:1rem}html:not([dir=rtl]) .badge__content-dot{right:-.5rem}html[dir=rtl] .badge__content-dot{left:-.5rem}[data-gene-ui-version=\"2.12.2\"] .badge__content-medium{line-height:1.8rem;min-height:1.8rem;min-width:1.8rem}[data-gene-ui-version=\"2.12.2\"] .badge__content-big{line-height:2.2rem;min-height:2.2rem;min-width:2.2rem}[data-gene-ui-version=\"2.12.2\"] .badge__content-huge{font-size:1.3rem;line-height:2.6rem;min-height:2.6rem;min-width:2.6rem}[data-gene-ui-version=\"2.12.2\"] .badge__content-big,[data-gene-ui-version=\"2.12.2\"] .badge__content-huge,[data-gene-ui-version=\"2.12.2\"] .badge__content-medium{top:-1rem}html:not([dir=rtl]) .badge__content-big,html:not([dir=rtl]) .badge__content-huge,html:not([dir=rtl]) .badge__content-medium{right:-1rem}html[dir=rtl] .badge__content-big,html[dir=rtl] .badge__content-huge,html[dir=rtl] .badge__content-medium{left:-1rem}[data-gene-ui-version=\"2.12.2\"] .badge__content-primary{background:var(--hero)}";
9
+ styleInject(css_248z);
10
+
11
+ const getShowValue = (count, maxCount) => {
12
+ if (count !== 0 && !count) return null;
13
+ if (!maxCount) return count;
14
+ return count > maxCount ? "".concat(maxCount, "+") : count;
15
+ };
16
+ function Badge(_ref) {
17
+ let {
18
+ children,
19
+ size,
20
+ color,
21
+ count,
22
+ dot,
23
+ maxCount,
24
+ className,
25
+ ...restProps
26
+ } = _ref;
27
+ const show = useMemo(() => dot ? '' : getShowValue(count, maxCount), [dot, count, maxCount]);
28
+ return /*#__PURE__*/React__default.createElement("div", _extends({
29
+ className: "badge"
30
+ }, restProps), show !== null && /*#__PURE__*/React__default.createElement("span", {
31
+ className: classnames('badge__content', className, {
32
+ ["badge__content-".concat(size)]: size,
33
+ ["badge__content-".concat(color)]: color,
34
+ ["badge__content-dot"]: dot,
35
+ ["badge__content-children"]: children
36
+ })
37
+ }, show), children);
38
+ }
39
+ Badge.propTypes = {
40
+ /**
41
+ * Any valid React node
42
+ */
43
+ children: PropTypes.node,
44
+ /**
45
+ * Any custom class name
46
+ */
47
+ className: PropTypes.string,
48
+ /**
49
+ * Badge size
50
+ */
51
+ size: PropTypes.oneOf(badgeConfig.size),
52
+ /**
53
+ * Badge color
54
+ */
55
+ color: PropTypes.oneOf(badgeConfig.color),
56
+ /**
57
+ * Shows the specified number on the badge
58
+ */
59
+ count: PropTypes.number,
60
+ /**
61
+ * Set this property to have only dot instead of number
62
+ */
63
+ dot: PropTypes.bool,
64
+ /**
65
+ * When the "count" is greater than "maxCount" Badge will show "maxCount" value and "+"
66
+ */
67
+ maxCount: PropTypes.number
68
+ };
69
+ Badge.defaultProps = {
70
+ dot: false,
71
+ size: badgeConfig.size[0],
72
+ color: badgeConfig.color[0]
73
+ };
74
+
75
+ export { Badge as default };
@@ -1,29 +1,30 @@
1
- import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
2
  import React__default, { useState, useCallback, Fragment } from 'react';
3
- import { p as propTypesExports } from './index-e0af0caf.js';
4
- import { c as classnames } from './index-6ff23041.js';
5
- import { n as noop } from './index-ac59cb10.js';
6
- import Button from './Button.js';
7
- import { P as Popover } from './index-084588e9.js';
8
- import Icon from './Icon.js';
9
- import Menu from './Menu.js';
10
- import './globalStyling-9c60a159.js';
11
- import { s as styleInject } from './style-inject.es-746bb8ed.js';
12
- import './dateValidation-67caec66.js';
13
- import './_commonjsHelpers-24198af3.js';
3
+ import PropTypes from 'prop-types';
4
+ import { c as classnames } from '../index-6ff23041.js';
5
+ import { n as noop } from '../index-a0e4e333.js';
6
+ import Button from '../Button/index.js';
7
+ import Popover from '../Popover/index.js';
8
+ import Icon from '../Icon/index.js';
9
+ import Menu from '../Menu/index.js';
10
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
11
+ import '../dateValidation-67caec66.js';
12
+ import '../_commonjsHelpers-24198af3.js';
14
13
  import 'react-dom';
15
- import './Popover-f4d1cac0.js';
16
- import './index-122432cd.js';
17
- import './useDeviceType-dd51db38.js';
18
- import './configs-91c86664.js';
19
- import './useWindowSize-80369d76.js';
20
- import './GeneUIProvider.js';
21
- import './Portal.js';
22
- import './Scrollbar.js';
23
- import './guid-8ddf77b3.js';
24
- import './Option.js';
25
- import './useEllipsisDetection-ef536015.js';
26
- import './Tooltip.js';
14
+ import '../Popover-f4d1cac0.js';
15
+ import '../index-122432cd.js';
16
+ import '../hooks/useDeviceType.js';
17
+ import '../configs-fed6ac34.js';
18
+ import '../hooks/useWindowSize.js';
19
+ import '../hooks/useUpdatableRef.js';
20
+ import '../hooks/useForceUpdate.js';
21
+ import '../GeneUIProvider/index.js';
22
+ import '../Portal/index.js';
23
+ import '../Scrollbar/index.js';
24
+ import '../guid-8ddf77b3.js';
25
+ import '../Option/index.js';
26
+ import '../hooks/useEllipsisDetection.js';
27
+ import '../Tooltip/index.js';
27
28
 
28
29
  function BreadcrumbItem(_ref) {
29
30
  let {
@@ -39,7 +40,7 @@ function BreadcrumbItem(_ref) {
39
40
  }, data.title);
40
41
  }
41
42
 
42
- var css_248z = "[data-gene-ui-version=\"1.0.0\"] .bread-crumbs-holder{align-items:center;display:flex;font-weight:600;justify-content:flex-start;min-height:3.6rem;width:100%}[data-gene-ui-version=\"1.0.0\"] .bread-crumbs-holder>*+:not(button){margin:0 0 0 1rem}html[dir=rtl] .bread-crumbs-holder>*+:not(button){margin:0 1rem 0 0}[data-gene-ui-version=\"1.0.0\"] .bread-crumbs-holder>button{margin:0 .4rem}[data-gene-ui-version=\"1.0.0\"] .bread-crumbs-holder>button+.icon,html[dir=rtl] .bread-crumbs-holder>button+.icon{margin:0}[data-gene-ui-version=\"1.0.0\"] .breadcrumbs-link{color:inherit;cursor:pointer}@media (hover:hover){[data-gene-ui-version=\"1.0.0\"] .breadcrumbs-link:hover{color:var(--hero)}}[data-gene-ui-version=\"1.0.0\"] .breadcrumbs-link.active{color:var(--hero)}";
43
+ var css_248z = "[data-gene-ui-version=\"2.12.2\"] .bread-crumbs-holder{align-items:center;display:flex;font-weight:600;justify-content:flex-start;min-height:3.6rem;width:100%}[data-gene-ui-version=\"2.12.2\"] .bread-crumbs-holder>*+:not(button){margin:0 0 0 1rem}html[dir=rtl] .bread-crumbs-holder>*+:not(button){margin:0 1rem 0 0}[data-gene-ui-version=\"2.12.2\"] .bread-crumbs-holder>button{margin:0 .4rem}[data-gene-ui-version=\"2.12.2\"] .bread-crumbs-holder>button+.icon,html[dir=rtl] .bread-crumbs-holder>button+.icon{margin:0}[data-gene-ui-version=\"2.12.2\"] .breadcrumbs-link{color:inherit;cursor:pointer}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .breadcrumbs-link:hover{color:var(--hero)}}[data-gene-ui-version=\"2.12.2\"] .breadcrumbs-link.active{color:var(--hero)}";
43
44
  styleInject(css_248z);
44
45
 
45
46
  function Breadcrumb(_ref) {
@@ -97,25 +98,25 @@ Breadcrumb.propTypes = {
97
98
  /**
98
99
  * Data items to display
99
100
  */
100
- data: propTypesExports.arrayOf(propTypesExports.shape({
101
- title: propTypesExports.node.isRequired
101
+ data: PropTypes.arrayOf(PropTypes.shape({
102
+ title: PropTypes.node.isRequired
102
103
  })).isRequired,
103
104
  /**
104
105
  * Additional className
105
106
  */
106
- className: propTypesExports.string,
107
+ className: PropTypes.string,
107
108
  /**
108
109
  * Breadcrumbs will render collapsed view when "data" length is greater than 4, when set to "true"
109
110
  */
110
- collapsed: propTypesExports.bool,
111
+ collapsed: PropTypes.bool,
111
112
  /**
112
113
  * Fires an event on breadcrumb item click((item: data[item] => void))
113
114
  */
114
- onClick: propTypesExports.func,
115
+ onClick: PropTypes.func,
115
116
  /**
116
117
  * Use this prop to define the middle component between breadcrumb items.
117
118
  */
118
- separator: propTypesExports.node
119
+ separator: PropTypes.node
119
120
  };
120
121
  Breadcrumb.defaultProps = {
121
122
  collapsed: false,
@@ -0,0 +1,68 @@
1
+ import React__default from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { c as classnames } from '../index-6ff23041.js';
4
+ import Icon from '../Icon/index.js';
5
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
6
+ import '../_rollupPluginBabelHelpers-e8fb2e5c.js';
7
+
8
+ var css_248z = "[data-gene-ui-version=\"2.12.2\"] .loader-holder{align-items:center;color:var(--hero);display:flex;flex-direction:column;margin:auto;position:relative;text-align:center}[data-gene-ui-version=\"2.12.2\"] .loader-holder.p-static{margin:6rem}[data-gene-ui-version=\"2.12.2\"] .loader-holder.p-absolute{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}[data-gene-ui-version=\"2.12.2\"] .loader-holder .s-medium{font-size:2.8rem}[data-gene-ui-version=\"2.12.2\"] .loader-holder .s-big{font-size:5.4rem}[data-gene-ui-version=\"2.12.2\"] .loader-text{font:600 1.6rem/2rem var(--font-family);margin:1rem 0 0}[data-gene-ui-version=\"2.12.2\"] .bubble-loader{animation:sk-rotate 2s linear infinite;height:6.6rem;position:relative;width:6.6rem}@keyframes sk-rotate{to{transform:rotate(1turn)}}[data-gene-ui-version=\"2.12.2\"] .bubble-loader .dot{animation:sk-bounce 2s ease-in-out infinite;background:var(--hero);border-radius:100%;height:60%;position:absolute;top:0;width:60%}@keyframes sk-bounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}[data-gene-ui-version=\"2.12.2\"] .bubble-loader .dot2{animation-delay:-1s;bottom:0;top:auto}[data-gene-ui-version=\"2.12.2\"] .bar-loader{height:.6rem;left:0;overflow:hidden;position:fixed;top:calc(var(--header-height, .6rem) - .6rem);width:100%}[data-gene-ui-version=\"2.12.2\"] .bar-loader:before{animation:bar-loader .8s linear infinite;background:linear-gradient(270deg,#7eb8ff 30%,#8d14e6 50%,#7eb8ff 70%) no-repeat 50% 50%/100vw .6rem;content:\"\";display:block;height:100%;left:50%;max-width:0;opacity:0;overflow:hidden;position:absolute;top:0;transform:translateX(-50%);width:100%}@keyframes bar-loader{0%,to{opacity:0}10%,90%{opacity:1}0%{max-width:0}to{max-width:100%}}";
9
+ styleInject(css_248z);
10
+
11
+ function BubbleLoader() {
12
+ return /*#__PURE__*/React__default.createElement("div", {
13
+ className: "bubble-loader"
14
+ }, /*#__PURE__*/React__default.createElement("div", {
15
+ className: "dot dot1"
16
+ }), /*#__PURE__*/React__default.createElement("div", {
17
+ className: "dot dot2"
18
+ }));
19
+ }
20
+ function BusyLoader(props) {
21
+ const {
22
+ type,
23
+ isBusy,
24
+ children,
25
+ className,
26
+ loadingText,
27
+ spinnerSize
28
+ } = props;
29
+ return type === 'bar' ? /*#__PURE__*/React__default.createElement("div", {
30
+ className: "bar-loader"
31
+ }) : isBusy ? /*#__PURE__*/React__default.createElement("div", {
32
+ className: classnames('loader-holder', className)
33
+ }, type === 'spinner' ? /*#__PURE__*/React__default.createElement(Icon, {
34
+ type: "bc-icon-loader s-".concat(spinnerSize)
35
+ }) : /*#__PURE__*/React__default.createElement(BubbleLoader, null), loadingText && /*#__PURE__*/React__default.createElement("div", {
36
+ className: "loader-text"
37
+ }, loadingText)) : children;
38
+ }
39
+ BusyLoader.propTypes = {
40
+ /**
41
+ * Show loader
42
+ */
43
+ isBusy: PropTypes.bool,
44
+ /**
45
+ * Any valid React node. Renders when "isBusy" is set to false
46
+ */
47
+ children: PropTypes.node,
48
+ /**
49
+ * Show some text when loading
50
+ */
51
+ loadingText: PropTypes.string,
52
+ /**
53
+ * Loader available type/style
54
+ */
55
+ type: PropTypes.oneOf(['spinner', 'bubbles', 'bar']),
56
+ /**
57
+ * Loader size
58
+ */
59
+ spinnerSize: PropTypes.oneOf(['small', 'medium', 'big'])
60
+ };
61
+ BusyLoader.defaultProps = {
62
+ isBusy: true,
63
+ children: null,
64
+ type: 'spinner',
65
+ spinnerSize: 'small'
66
+ };
67
+
68
+ export { BusyLoader as default };
@@ -0,0 +1,129 @@
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import React__default, { forwardRef } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { c as classnames } from '../index-6ff23041.js';
5
+ import Icon from '../Icon/index.js';
6
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
7
+
8
+ var css_248z = "[data-gene-ui-version=\"2.12.2\"] .btn{--size:3.6rem;align-items:center;border:1px solid #0000;border-radius:var(--button-external-border-radius,var(--button-external-size,var(--size)));color:inherit;cursor:pointer;display:flex;font:600 1.4rem/2rem var(--font-family);justify-content:center;min-height:var(--button-external-size,var(--size));min-width:var(--button-external-size,var(--size));position:relative;transition:color .3s,background .3s,opacity .2s;-webkit-user-select:none;user-select:none}[data-gene-ui-version=\"2.12.2\"] .btn:focus-visible{border-radius:var(--button-external-border-radius,var(--button-external-size,var(--size)));outline:.2rem var(--hero) solid}[data-gene-ui-version=\"2.12.2\"] .btn:disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.12.2\"] .btn.s-medium{--size:3.2rem;font-size:1.2rem}[data-gene-ui-version=\"2.12.2\"] .btn.s-big{--size:4.2rem}[data-gene-ui-version=\"2.12.2\"] .btn.cr-smooth{border-radius:var(--button-external-border-radius,.4rem)}[data-gene-ui-version=\"2.12.2\"] .btn>*+*{margin:0 0 0 .4rem}html[dir=rtl] .btn>*+*{margin:0 .4rem 0 0}[data-gene-ui-version=\"2.12.2\"] .btn.id-end{flex-direction:row-reverse}[data-gene-ui-version=\"2.12.2\"] .btn.id-end>*+*{margin:0 .7rem 0 0}html[dir=rtl] .btn.id-end>*+*{margin:0 0 0 .7rem}[data-gene-ui-version=\"2.12.2\"] .btn:not(.c-icon){padding:0 2rem}[data-gene-ui-version=\"2.12.2\"] .btn:not(.c-icon).f-content-size{padding:0 1.3rem}[data-gene-ui-version=\"2.12.2\"] .btn:not(.c-icon).f-default{min-width:10rem}[data-gene-ui-version=\"2.12.2\"] .btn:not(.c-icon).f-full-width{width:100%}[data-gene-ui-version=\"2.12.2\"] .btn:not(.c-icon).loading-padding{padding:0 .6rem}[data-gene-ui-version=\"2.12.2\"] .btn.c-confirm{--hero:var(--confirm);--hero-sc:var(--confirm-sc);--hero-hover:var(--confirm-hover)}[data-gene-ui-version=\"2.12.2\"] .btn.c-danger{--hero:var(--danger);--hero-sc:var(--danger-sc);--hero-hover:var(--danger-hover)}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-outline{border-color:var(--hero);color:var(--hero)}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-outline:hover{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-outline:active{background:var(--hero);color:var(--hero-sc)}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-minimal:not(.c-default){color:var(--hero)}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-minimal:hover{background:rgba(var(--background-sc-rgb),.03)}}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-minimal.active{background:rgba(var(--background-sc-rgb),.03)}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-grayscale:not(:disabled){background:rgba(var(--background-sc-rgb),.01)}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-grayscale:not(:disabled):hover{background:rgba(var(--background-sc-rgb),.03)}}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-grayscale:not(:disabled).active{background:rgba(var(--background-sc-rgb),.03)}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-grayscale:not(.c-default){color:var(--hero)}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-clean:not(.c-default){color:rgba(var(--background-sc-rgb),.6)}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-clean:not(:disabled){background:rgba(var(--hero-rgb),.1);color:var(--hero)}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-clean:not(:disabled):hover{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"2.12.2\"] .btn:not(.active).a-clean:not(:disabled).active{background:var(--hero);color:var(--hero-sc)}[data-gene-ui-version=\"2.12.2\"] .btn:not(.a-grayscale).with-shadow{box-shadow:0 .2rem .4rem 0 #0000001a}[data-gene-ui-version=\"2.12.2\"] .btn.a-grayscale:not(:disabled){box-shadow:0 1px 0 0 #00000029}[data-gene-ui-version=\"2.12.2\"] .btn.a-default,[data-gene-ui-version=\"2.12.2\"] .btn.active{background:var(--hero);color:var(--hero-sc)}@media (hover:hover){[data-gene-ui-version=\"2.12.2\"] .btn.a-default:hover,[data-gene-ui-version=\"2.12.2\"] .btn.active:hover{background:var(--hero-hover)}}[data-gene-ui-version=\"2.12.2\"] .btn.loading-state>:not(.btn-loader-holder){color:#0000!important}[data-gene-ui-version=\"2.12.2\"] .btn .btn-loader-holder{left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%)}";
9
+ styleInject(css_248z);
10
+
11
+ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
12
+ let {
13
+ children,
14
+ appearance,
15
+ size,
16
+ flexibility,
17
+ color,
18
+ itemsDirection,
19
+ cornerRadius,
20
+ icon,
21
+ active,
22
+ className,
23
+ withShadow,
24
+ loading,
25
+ ariaLabel,
26
+ ...restProps
27
+ } = _ref;
28
+ const noChildren = !children && children !== 0;
29
+ return /*#__PURE__*/React__default.createElement("button", _extends({
30
+ className: classnames('btn', className, "a-".concat(appearance), "s-".concat(size), "f-".concat(flexibility), "c-".concat(color), "id-".concat(itemsDirection), "cr-".concat(cornerRadius), {
31
+ active,
32
+ 'c-icon': !!icon && noChildren,
33
+ 'with-shadow': withShadow,
34
+ 'loading-padding': !noChildren && !icon && loading
35
+ }),
36
+ ref: ref
37
+ }, ariaLabel ? {
38
+ 'aria-label': ariaLabel
39
+ } : {}, restProps), icon && (loading ? /*#__PURE__*/React__default.createElement(Icon, {
40
+ type: "bc-icon-loader"
41
+ }) : /*#__PURE__*/React__default.createElement(Icon, {
42
+ type: icon
43
+ })), !noChildren && (!icon && loading ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, {
44
+ type: "bc-icon-loader"
45
+ }), /*#__PURE__*/React__default.createElement("span", null, children)) : /*#__PURE__*/React__default.createElement("span", {
46
+ className: "ellipsis-text"
47
+ }, children)), loading && noChildren && /*#__PURE__*/React__default.createElement("div", {
48
+ className: "btn-loader-holder"
49
+ }, /*#__PURE__*/React__default.createElement(Icon, {
50
+ type: "bc-icon-loader"
51
+ })));
52
+ });
53
+ const ButtonConfig = {
54
+ appearance: ['default', 'outline', 'minimal', 'grayscale', 'clean'],
55
+ size: ['default', 'medium', 'big'],
56
+ color: ['primary', 'confirm', 'danger', 'default'],
57
+ flexibility: ['default', 'content-size', 'full-width'],
58
+ itemsDirection: ['start', 'end'],
59
+ cornerRadius: ['round', 'smooth']
60
+ };
61
+ Button.propTypes = {
62
+ /**
63
+ * Any valid React node
64
+ */
65
+ children: PropTypes.node,
66
+ /**
67
+ * The way how the Button should be displayed
68
+ */
69
+ appearance: PropTypes.oneOf(ButtonConfig.appearance),
70
+ /**
71
+ * Button size
72
+ */
73
+ size: PropTypes.oneOf(ButtonConfig.size),
74
+ /**
75
+ * How to display inscription in relation to it's parent in Button
76
+ */
77
+ flexibility: PropTypes.oneOf(ButtonConfig.flexibility),
78
+ /**
79
+ * Button color
80
+ */
81
+ color: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf(ButtonConfig.color)]),
82
+ /**
83
+ * Button children direction either from the start, or from the end
84
+ */
85
+ itemsDirection: PropTypes.oneOf(ButtonConfig.itemsDirection),
86
+ /**
87
+ * Button corner radius
88
+ */
89
+ cornerRadius: PropTypes.oneOf(ButtonConfig.cornerRadius),
90
+ /**
91
+ * The property will add an "Icon" as Button child. The valid values can be found in "Icon" atom
92
+ */
93
+ icon: PropTypes.string,
94
+ /**
95
+ * Button disabled state
96
+ */
97
+ disabled: PropTypes.bool,
98
+ /**
99
+ * Button active state
100
+ */
101
+ active: PropTypes.bool,
102
+ /**
103
+ * Adding shadow to button
104
+ */
105
+ withShadow: PropTypes.bool,
106
+ /**
107
+ * Button additianl className
108
+ */
109
+ className: PropTypes.string,
110
+ /**
111
+ * Button text transforms to spinner
112
+ */
113
+ loading: PropTypes.bool,
114
+ /**
115
+ * aria-label for button.
116
+ */
117
+ ariaLabel: PropTypes.string
118
+ };
119
+ Button.defaultProps = {
120
+ appearance: ButtonConfig.appearance[0],
121
+ size: ButtonConfig.size[0],
122
+ flexibility: ButtonConfig.flexibility[0],
123
+ color: ButtonConfig.color[0],
124
+ itemsDirection: ButtonConfig.itemsDirection[0],
125
+ cornerRadius: ButtonConfig.cornerRadius[0]
126
+ };
127
+ Button.displayName = 'Button';
128
+
129
+ export { Button as default };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.12.2](https://github.com/softconstruct/gene-ui-components/compare/v2.12.1...v2.12.2) (2024-02-02)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **Dropdown:** default value falsy case ([f3167e8](https://github.com/softconstruct/gene-ui-components/commit/f3167e8461f07efb6aceda393930eda25057baaf))
9
+ * **Dropdown:** fix value dynamicly changing on clearable state" ([fa4f53b](https://github.com/softconstruct/gene-ui-components/commit/fa4f53b7d9806df655382532cbe8c8f8ef942fa6))
10
+ * **ExtendedInput:** focus event logic ([#56](https://github.com/softconstruct/gene-ui-components/issues/56)) ([681c9e3](https://github.com/softconstruct/gene-ui-components/commit/681c9e3990a2bf70575903c376427b4226784290))
11
+ * **MapChart:** fix lint error ([32695c6](https://github.com/softconstruct/gene-ui-components/commit/32695c6748a24bc90c577612fd6389b2da9ef33f))
12
+ * **PopoverV2:** move to up container parent ref definition ([#58](https://github.com/softconstruct/gene-ui-components/issues/58)) ([5d73395](https://github.com/softconstruct/gene-ui-components/commit/5d73395a4f33c3d10677314460e32e8972623250))
13
+ * **ValidatableNumberInput:** clear bad values of input ([#59](https://github.com/softconstruct/gene-ui-components/issues/59)) ([f3a10a9](https://github.com/softconstruct/gene-ui-components/commit/f3a10a965c1af2f1228d00efc8f64f20881bb4d1))
14
+ * **Widget:** add support headerActions prop functional for compact type ([#57](https://github.com/softconstruct/gene-ui-components/issues/57)) ([4210d35](https://github.com/softconstruct/gene-ui-components/commit/4210d3539a8fc45444b61970eb46a9235496a1ce))
15
+
16
+ # [2.12.1](https://github.com/softconstruct/gene-ui-components/compare/v2.11.2...v2.12.1) (2024-01-11)
17
+
18
+ ### Bug Fixes
19
+
20
+ - **CommitMessage:** disable scope lowercase functional in the git-cz package
21
+ ([#46](https://github.com/softconstruct/gene-ui-components/issues/46))
22
+ ([120bebe](https://github.com/softconstruct/gene-ui-components/commit/120bebe883430c04ebd8b0aea09408809a3f8e3a))
23
+ - **Component-stage:** fix and improve component-stage
24
+ ([b244edb](https://github.com/softconstruct/gene-ui-components/commit/b244edbdaca3d1d3415df8c59a15cef51d7dbbbe))
25
+ - **DatePickerInput:** close picker popover after value selection
26
+ ([#48](https://github.com/softconstruct/gene-ui-components/issues/48))
27
+ ([e58be53](https://github.com/softconstruct/gene-ui-components/commit/e58be53709630eb00cacf089c767c91aa3021675))
28
+ - **Dropdown:** input truncated text blinking fix
29
+ ([#37](https://github.com/softconstruct/gene-ui-components/issues/37))
30
+ ([19f4e54](https://github.com/softconstruct/gene-ui-components/commit/19f4e54bb3fb37d6acefd7e55480ea82dba9c5a7))
31
+ - **Dropdown:** open by tab key will autofocus to searhc input
32
+ ([d2a130b](https://github.com/softconstruct/gene-ui-components/commit/d2a130bbf65dfa8b47337fd4df8f91ec44ec7efa))
33
+ - **Dropdown:** remove Dropdown search input autofocus
34
+ ([be5b4e6](https://github.com/softconstruct/gene-ui-components/commit/be5b4e6802a31545f6fca86b2bfcd1959e1cf003))
35
+ - **Module:** remove undefined modules exports from the library entry point
36
+ ([c2d32c2](https://github.com/softconstruct/gene-ui-components/commit/c2d32c2c68924477957f8016c79a67522d623b9c))
37
+ - **Stories:** import and export changes
38
+ ([896ce5c](https://github.com/softconstruct/gene-ui-components/commit/896ce5c2484c03a5fd020991f0c5757e0203dae1))
39
+ - **Theming:** dark and light mode fix
40
+ ([a7c3c24](https://github.com/softconstruct/gene-ui-components/commit/a7c3c2461614e6f810d67eee13e0b50ec6de969e))
41
+ - **Version-select:** version select container fix
42
+ ([e57c363](https://github.com/softconstruct/gene-ui-components/commit/e57c3635ee8d0d3422c9db82f6bb6d151e040a10))
43
+
44
+ ### Features
45
+
46
+ - **Addon-jest:** add test addon to storybook
47
+ ([d3849b2](https://github.com/softconstruct/gene-ui-components/commit/d3849b20375b17d803e3bf6ee3163352bce84d81))
48
+ - **Table:** add copied tooltip text for table col element
49
+ ([#36](https://github.com/softconstruct/gene-ui-components/issues/36))
50
+ ([356b35a](https://github.com/softconstruct/gene-ui-components/commit/356b35ae66b419bea53b4826a8df6197ecfa3074))
51
+ - **Test:** add jest, enzyme and setup testing env
52
+ ([c91f9d9](https://github.com/softconstruct/gene-ui-components/commit/c91f9d94949ea61ec246760e8588e339fe2b2188))
53
+ - **Typescript:** add ts support, remove some redundant modules, change tree shake logic
54
+ ([58838da](https://github.com/softconstruct/gene-ui-components/commit/58838da2b3c2ad8effaf64649d97cbb4444dfd44))
55
+
3
56
  # 2.11.2 (2023-11-25)
4
57
 
5
58
  ### Bug Fixes