@geneui/components 2.11.1

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 (154) hide show
  1. package/ActionableList.js +1761 -0
  2. package/AdvancedSearch.js +872 -0
  3. package/Alert.js +98 -0
  4. package/Avatar.js +77 -0
  5. package/Badge.js +76 -0
  6. package/Breadcrumb.js +128 -0
  7. package/BusyLoader.js +69 -0
  8. package/Button.js +130 -0
  9. package/CHANGELOG.md +424 -0
  10. package/Card.js +513 -0
  11. package/CardList.js +705 -0
  12. package/CellMeasurerCache-c11cec83.js +229 -0
  13. package/Charts.js +99 -0
  14. package/Checkbox.js +232 -0
  15. package/CheckboxGroup.js +206 -0
  16. package/CheckboxGroupWithSearch.js +279 -0
  17. package/Collapse.js +196 -0
  18. package/ColorPicker.js +210 -0
  19. package/ComboBox.js +99 -0
  20. package/Counter.js +99 -0
  21. package/DateFilter.js +179 -0
  22. package/DatePicker.js +1231 -0
  23. package/DatePickerInput.js +30 -0
  24. package/Divider.js +56 -0
  25. package/Drawer.js +264 -0
  26. package/Dropdown.js +99 -0
  27. package/Editor.js +22965 -0
  28. package/Empty.js +132 -0
  29. package/ExtendedInput.js +578 -0
  30. package/Form.js +116 -0
  31. package/FormContainer.js +189 -0
  32. package/FormableCheckbox.js +27 -0
  33. package/FormableDatePicker.js +39 -0
  34. package/FormableDropdown.js +105 -0
  35. package/FormableEditor.js +24 -0
  36. package/FormableHOC-21051057.js +83 -0
  37. package/FormableMultiSelectDropdown.js +105 -0
  38. package/FormableNumberInput.js +31 -0
  39. package/FormableRadio.js +23 -0
  40. package/FormableSwitcher.js +23 -0
  41. package/FormableTextInput.js +31 -0
  42. package/FormableUploader.js +40 -0
  43. package/GeneUIProvider.js +256 -0
  44. package/Grid.js +166 -0
  45. package/Holder.js +99 -0
  46. package/Icon.js +63 -0
  47. package/Image.js +130 -0
  48. package/ImagePreview.js +99 -0
  49. package/KeyValue.js +63 -0
  50. package/Label.js +58 -0
  51. package/LinkButton.js +104 -0
  52. package/Menu.js +277 -0
  53. package/MobileNavigation.js +95 -0
  54. package/MobilePopup.js +180 -0
  55. package/Modal.js +251 -0
  56. package/ModuleTitle.js +99 -0
  57. package/NavigationMenu.js +212 -0
  58. package/Notification.js +120 -0
  59. package/Option.js +186 -0
  60. package/Overlay.js +99 -0
  61. package/Overspread.js +343 -0
  62. package/Pagination.js +258 -0
  63. package/Paper.js +97 -0
  64. package/Popover-f4d1cac0.js +411 -0
  65. package/Popover.js +20 -0
  66. package/PopoverV2.js +19 -0
  67. package/Portal.js +58 -0
  68. package/Products.js +115 -0
  69. package/Profile.js +99 -0
  70. package/Progress.js +200 -0
  71. package/QRCode.js +816 -0
  72. package/README.md +90 -0
  73. package/Radio.js +152 -0
  74. package/RadioGroup.js +105 -0
  75. package/Range.js +14 -0
  76. package/RichEditor-b7928765.js +228 -0
  77. package/RichEditor.js +13 -0
  78. package/Scrollbar.js +1587 -0
  79. package/Search.js +72 -0
  80. package/SearchWithDropdown.js +195 -0
  81. package/Section.js +62 -0
  82. package/SkeletonLoader.js +82 -0
  83. package/Slider.js +256 -0
  84. package/Status.js +104 -0
  85. package/Steps.js +312 -0
  86. package/SuggestionList.js +15 -0
  87. package/Switcher.js +194 -0
  88. package/Table.js +102 -0
  89. package/TableCompositions.js +17028 -0
  90. package/Tabs.js +236 -0
  91. package/Tag.js +103 -0
  92. package/TextLink.js +22 -0
  93. package/Textarea.js +239 -0
  94. package/Time.js +63 -0
  95. package/TimePicker.js +99 -0
  96. package/Timeline.js +114 -0
  97. package/Title.js +66 -0
  98. package/Toaster.js +116 -0
  99. package/Tooltip.js +157 -0
  100. package/TransferList.js +502 -0
  101. package/Uploader.js +32 -0
  102. package/ValidatableCheckbox.js +126 -0
  103. package/ValidatableDatePicker.js +312 -0
  104. package/ValidatableDropdown.js +99 -0
  105. package/ValidatableElements.js +99 -0
  106. package/ValidatableMultiSelectDropdown.js +99 -0
  107. package/ValidatableNumberInput.js +194 -0
  108. package/ValidatableRadio.js +117 -0
  109. package/ValidatableSwitcher.js +94 -0
  110. package/ValidatableTextInput.js +164 -0
  111. package/ValidatableTimeInput.js +171 -0
  112. package/ValidatableUploader.js +94 -0
  113. package/Widget.js +99 -0
  114. package/_commonjsHelpers-24198af3.js +35 -0
  115. package/_rollupPluginBabelHelpers-e8fb2e5c.js +16 -0
  116. package/checkTimeValidation-e56771be.js +16 -0
  117. package/checkboxRadioSwitcher-5b69d7bd.js +4 -0
  118. package/clsx.m-2bb6df4b.js +3 -0
  119. package/configs-91c86664.js +96 -0
  120. package/configs.js +131 -0
  121. package/dateValidation-67caec66.js +225 -0
  122. package/debounce-4419bc2f.js +17 -0
  123. package/globalStyling-9c60a159.js +4 -0
  124. package/guid-8ddf77b3.js +16 -0
  125. package/index-00fe8887.js +193 -0
  126. package/index-0cf65939.js +30991 -0
  127. package/index-122432cd.js +270 -0
  128. package/index-262edd7a.js +77 -0
  129. package/index-5cea9a7d.js +407 -0
  130. package/index-5e722d91.js +867 -0
  131. package/index-67f4d4d1.js +6568 -0
  132. package/index-6ff23041.js +66 -0
  133. package/index-702bf24a.js +1938 -0
  134. package/index-a4635754.js +329 -0
  135. package/index-a59530cd.js +4 -0
  136. package/index-ac59cb10.js +169 -0
  137. package/index-b7a33c58.js +11 -0
  138. package/index-d9e8a888.js +987 -0
  139. package/index-e0af0caf.js +1182 -0
  140. package/index-e8776f3d.js +807 -0
  141. package/index.js +128 -0
  142. package/localization-4ba17032.js +46 -0
  143. package/objectWithoutPropertiesLoose-299691d8.js +78 -0
  144. package/package.json +190 -0
  145. package/rangeAndSlider-20599da4.js +8839 -0
  146. package/react-beautiful-dnd.esm-38c37304.js +10117 -0
  147. package/style-inject.es-746bb8ed.js +28 -0
  148. package/useClickOutside-5183e396.js +25 -0
  149. package/useDeviceType-dd51db38.js +15 -0
  150. package/useEllipsisDetection-ef536015.js +23 -0
  151. package/useKeyDown-38102ae7.js +21 -0
  152. package/useMount-6fef51a5.js +9 -0
  153. package/useWidth-9f4647f8.js +15 -0
  154. package/useWindowSize-80369d76.js +33 -0
package/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # Gene UI components
2
+
3
+ > The design system to democratize a UI unification process of BI tools.
4
+
5
+ [![NPM registry](https://img.shields.io/npm/v/@geneui/components?style=for-the-badge&color=red)](https://www.npmjs.com/package/@geneui/components)
6
+ [![License](https://img.shields.io/badge/license-mit-green.svg?style=for-the-badge)](https://github.com/softconstruct/gene-ui-components/blob/main/LICENSE)
7
+
8
+ ## Table of Contents
9
+
10
+ - [Installation](#-installation)
11
+ - [Usage](#-usage)
12
+ - [Importing Components](#importing-components)
13
+ - [Example](#example)
14
+ - [Documentation](#-documentation)
15
+ - [API Reference](#api-reference)
16
+ - [Contributing](#-contributing)
17
+ - [Changelog](#-changelog)
18
+ - [License](#%EF%B8%8F-license)
19
+
20
+ ## ⚙️ Installation
21
+
22
+ You can install Gene UI components using npm or yarn:
23
+
24
+ ```bash
25
+ # Yarn
26
+ yarn add @geneui/components
27
+
28
+ # NPM
29
+ npm install --save @geneui/components
30
+ ```
31
+
32
+ ## 👀 Usage
33
+
34
+ ### Importing Components
35
+
36
+ To use a component in your project, first you need to import the provider in your main component e.g. in the App.js file
37
+
38
+ ```js
39
+ import GeneUIProvider from '@geneui/components/GeneUIProvider';
40
+ ```
41
+
42
+ Then you need to wrap your main component with provider
43
+
44
+ ```js
45
+ <GeneUIProvider>
46
+ <App />
47
+ </GeneUIProvider>
48
+ ```
49
+
50
+ ### Example
51
+
52
+ Now you can start use any components available in the package
53
+
54
+ ```js
55
+ import { Button } from '@geneui/components';
56
+
57
+ function App() {
58
+ return (
59
+ <div>
60
+ <Button>Do action</Button>
61
+ </div>
62
+ );
63
+ }
64
+ ```
65
+
66
+ ## 📝 Documentation
67
+
68
+ Explore in-depth documentation to make the most out of Gene UI components.
69
+
70
+ ### API Reference
71
+
72
+ Visit our [API Reference](https://geneui.softconstruct.com/) for detailed information on each component, including props
73
+ and usage examples.
74
+
75
+ ## 👍 Contributing
76
+
77
+ We welcome contributions from the community! Here's how you can get involved:
78
+
79
+ > 👉 See the [contributing docs](https://github.com/softconstruct/gene-ui-components/blob/main/CONTRIBUTING.md) for more
80
+ > info on code style, testing, coverage, and troubleshooting.
81
+
82
+ ## 📜 Changelog
83
+
84
+ Stay up-to-date with the latest changes and improvements by checking our
85
+ [Changelog](https://github.com/softconstruct/gene-ui-components/blob/main/CHANGELOG.md).
86
+
87
+ ## ⚖️ License
88
+
89
+ The Gene UI design system is licensed under the
90
+ [MIT Licensed](https://github.com/softconstruct/gene-ui-components/blob/main/LICENSE)
package/Radio.js ADDED
@@ -0,0 +1,152 @@
1
+ import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import React__default, { forwardRef, useMemo } from 'react';
3
+ import { p as propTypesExports } from './index-e0af0caf.js';
4
+ import { c as classnames } from './index-6ff23041.js';
5
+ import { c as checkboxRadioSwitcherConfig } from './configs-91c86664.js';
6
+ import { i as interceptValue } from './index-ac59cb10.js';
7
+ import './globalStyling-9c60a159.js';
8
+ import './checkboxRadioSwitcher-5b69d7bd.js';
9
+ import { g as guid } from './guid-8ddf77b3.js';
10
+ import './dateValidation-67caec66.js';
11
+ import './_commonjsHelpers-24198af3.js';
12
+ import 'react-dom';
13
+ import './style-inject.es-746bb8ed.js';
14
+
15
+ const Radio = /*#__PURE__*/forwardRef((_ref, ref) => {
16
+ let {
17
+ size,
18
+ label,
19
+ labelPosition,
20
+ labelAlignment,
21
+ description,
22
+ readOnly,
23
+ disabled,
24
+ required,
25
+ isValid,
26
+ errorText,
27
+ value,
28
+ onChange,
29
+ checked,
30
+ className,
31
+ type,
32
+ ...restProps
33
+ } = _ref;
34
+ const randomId = useMemo(guid, []);
35
+ const handleChange = e => {
36
+ onChange && onChange(interceptValue(e, value));
37
+ };
38
+ const hasError = !isValid;
39
+ return /*#__PURE__*/React__default.createElement("div", {
40
+ className: classnames('crs-holder', className, "lp-".concat(labelPosition), "la-".concat(labelAlignment), "t-".concat(type), {
41
+ disabled,
42
+ error: hasError,
43
+ 'read-only': readOnly,
44
+ 'input-active': checked
45
+ })
46
+ }, /*#__PURE__*/React__default.createElement("div", {
47
+ className: classnames('label-holder', {
48
+ 'has-label': !!label
49
+ })
50
+ }, label && /*#__PURE__*/React__default.createElement("div", {
51
+ className: "crs-item crs-label"
52
+ }, /*#__PURE__*/React__default.createElement("label", {
53
+ className: "ellipsis-text",
54
+ htmlFor: randomId
55
+ }, required && "* ", label)), /*#__PURE__*/React__default.createElement("div", {
56
+ className: "crs-item crs-component"
57
+ }, /*#__PURE__*/React__default.createElement("input", _extends({
58
+ type: "radio",
59
+ onChange: handleChange,
60
+ ref: ref,
61
+ id: randomId,
62
+ checked: checked
63
+ }, restProps)), /*#__PURE__*/React__default.createElement("label", {
64
+ className: classnames('radio', 'cr-element', "s-".concat(size), {
65
+ active: checked,
66
+ 'error-color': !checked && !errorText && hasError
67
+ }),
68
+ htmlFor: randomId
69
+ }))), hasError && errorText && /*#__PURE__*/React__default.createElement("div", {
70
+ className: "information-message color-danger"
71
+ }, errorText), description && type !== 'tab' && /*#__PURE__*/React__default.createElement("div", {
72
+ className: "input-description"
73
+ }, description));
74
+ });
75
+ Radio.propTypes = {
76
+ /**
77
+ * Radio size
78
+ */
79
+ size: propTypesExports.oneOf(checkboxRadioSwitcherConfig.size),
80
+ /**
81
+ * A label will be added to the Radio
82
+ */
83
+ label: propTypesExports.string,
84
+ /**
85
+ * Specify the label position
86
+ */
87
+ labelPosition: propTypesExports.oneOf(checkboxRadioSwitcherConfig.labelPosition),
88
+ /**
89
+ * Specify the label alignment
90
+ */
91
+ labelAlignment: propTypesExports.oneOf(checkboxRadioSwitcherConfig.labelAlignment),
92
+ /**
93
+ * Optional description field
94
+ */
95
+ description: propTypesExports.string,
96
+ /**
97
+ * Will make Radio readonly when set to "true"
98
+ */
99
+ readOnly: propTypesExports.bool,
100
+ /**
101
+ * Will make Radio disabled when set to "true"
102
+ */
103
+ disabled: propTypesExports.bool,
104
+ /**
105
+ * Radio will add an extra asterix to the "label". For more info see "ValidatableRadio"(integrated Radio with "Form" organism).
106
+ */
107
+ required: propTypesExports.bool,
108
+ /**
109
+ * Control Radio validation. For more info see "ValidatableRadio"(integrated Radio with "Form" organism).
110
+ */
111
+ isValid: propTypesExports.bool,
112
+ /**
113
+ * Shows error text when "isValid" is set to "false".
114
+ */
115
+ errorText: propTypesExports.string,
116
+ /**
117
+ * Use this prop to get specified value when "onChange" is fired
118
+ */
119
+ value: propTypesExports.any,
120
+ /**
121
+ * Fires an event when Radio is clicked((event: Event) => void).
122
+ */
123
+ onChange: propTypesExports.func,
124
+ /**
125
+ * Specifies does the Radio checked or not.
126
+ */
127
+ checked: propTypesExports.bool,
128
+ /**
129
+ * Needed for "RadioGroup" molecule
130
+ */
131
+ name: propTypesExports.string,
132
+ /**
133
+ * Type defines the appearance of the radio
134
+ */
135
+ type: propTypesExports.oneOf(['default', 'tab'])
136
+ };
137
+ Radio.defaultProps = {
138
+ size: checkboxRadioSwitcherConfig.size[0],
139
+ label: '',
140
+ labelPosition: checkboxRadioSwitcherConfig.labelPosition[0],
141
+ labelAlignment: checkboxRadioSwitcherConfig.labelAlignment[0],
142
+ description: '',
143
+ readOnly: false,
144
+ disabled: false,
145
+ required: false,
146
+ isValid: true,
147
+ errorText: '',
148
+ checked: false,
149
+ type: 'default'
150
+ };
151
+
152
+ export { Radio as default };
package/RadioGroup.js ADDED
@@ -0,0 +1,105 @@
1
+ import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import React__default, { useState, useCallback } from 'react';
3
+ import { p as propTypesExports } from './index-e0af0caf.js';
4
+ import { c as classnames } from './index-6ff23041.js';
5
+ import { c as childrenOf } from './index-ac59cb10.js';
6
+ import Radio from './Radio.js';
7
+ import './globalStyling-9c60a159.js';
8
+ import './dateValidation-67caec66.js';
9
+ import './_commonjsHelpers-24198af3.js';
10
+ import 'react-dom';
11
+ import './configs-91c86664.js';
12
+ import './checkboxRadioSwitcher-5b69d7bd.js';
13
+ import './style-inject.es-746bb8ed.js';
14
+ import './guid-8ddf77b3.js';
15
+
16
+ function RadioGroup(props) {
17
+ const {
18
+ defaultValue,
19
+ name,
20
+ options,
21
+ descriptionKey,
22
+ disabled,
23
+ onChange,
24
+ required,
25
+ type,
26
+ ...restProps
27
+ } = props;
28
+ const [valueState, setValueState] = useState(defaultValue);
29
+ const isControlled = !!props.value;
30
+ const value = isControlled ? props.value : valueState;
31
+ const handleChange = useCallback(e => {
32
+ !isControlled && setValueState(e.target.value);
33
+ onChange && onChange(e);
34
+ }, [isControlled, onChange]);
35
+ return /*#__PURE__*/React__default.createElement("div", {
36
+ className: classnames('cha-ra-group', "t-".concat(type))
37
+ }, options.map(option => {
38
+ const isOptionsString = typeof option === 'string';
39
+ const optionValue = isOptionsString ? option : option.value;
40
+ const label = isOptionsString ? option : option.label;
41
+ return /*#__PURE__*/React__default.createElement(Radio, _extends({
42
+ key: optionValue,
43
+ name: name,
44
+ label: label,
45
+ description: option[descriptionKey],
46
+ disabled: disabled || option.disabled,
47
+ checked: optionValue === value,
48
+ onChange: handleChange
49
+ }, restProps, {
50
+ value: optionValue,
51
+ type: type
52
+ }));
53
+ }));
54
+ }
55
+ RadioGroup.propTypes = {
56
+ /**
57
+ * Disabled state
58
+ */
59
+ disabled: propTypesExports.bool,
60
+ /**
61
+ * Validation state
62
+ */
63
+ required: propTypesExports.bool,
64
+ /**
65
+ * Options/items for radio group
66
+ */
67
+ options: propTypesExports.arrayOf(propTypesExports.oneOfType([childrenOf([Radio]), propTypesExports.shape({
68
+ label: Radio.propTypes.label,
69
+ value: Radio.propTypes.value,
70
+ disabled: Radio.propTypes.disabled
71
+ })])),
72
+ /**
73
+ * Initial value.
74
+ */
75
+ defaultValue: Radio.propTypes.value,
76
+ /**
77
+ * Name of appropriate radio group
78
+ */
79
+ name: Radio.propTypes.name.isRequired,
80
+ /**
81
+ * Selected option's value
82
+ */
83
+ value: Radio.propTypes.value,
84
+ /**
85
+ * Fires an event on change((event: Event) => void)
86
+ */
87
+ onChange: propTypesExports.func,
88
+ /**
89
+ * Type defines the appearance of the radio
90
+ */
91
+ type: propTypesExports.oneOf(['default', 'tab']),
92
+ /**
93
+ * Description definer: one of keys from your object
94
+ */
95
+ descriptionKey: propTypesExports.string
96
+ };
97
+ RadioGroup.defaultProps = {
98
+ disabled: false,
99
+ required: false,
100
+ options: [],
101
+ type: 'default',
102
+ descriptionKey: 'description'
103
+ };
104
+
105
+ export { RadioGroup as default };
package/Range.js ADDED
@@ -0,0 +1,14 @@
1
+ import './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import 'react';
3
+ import './index-e0af0caf.js';
4
+ import './index-6ff23041.js';
5
+ import './rangeAndSlider-20599da4.js';
6
+ import './useWidth-9f4647f8.js';
7
+ import './dateValidation-67caec66.js';
8
+ import 'react-dom';
9
+ export { R as default } from './index-00fe8887.js';
10
+ import './configs-91c86664.js';
11
+ import './globalStyling-9c60a159.js';
12
+ import './_commonjsHelpers-24198af3.js';
13
+ import './style-inject.es-746bb8ed.js';
14
+ import './useWindowSize-80369d76.js';