@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
@@ -0,0 +1,15 @@
1
+ import 'react';
2
+ import './index-ac59cb10.js';
3
+ import './useKeyDown-38102ae7.js';
4
+ import './configs-91c86664.js';
5
+ import './useClickOutside-5183e396.js';
6
+ import './index-6ff23041.js';
7
+ export { S as default } from './index-5cea9a7d.js';
8
+ import './Scrollbar.js';
9
+ import './index-e0af0caf.js';
10
+ import './dateValidation-67caec66.js';
11
+ import './_commonjsHelpers-24198af3.js';
12
+ import 'react-dom';
13
+ import './style-inject.es-746bb8ed.js';
14
+ import './_rollupPluginBabelHelpers-e8fb2e5c.js';
15
+ import './globalStyling-9c60a159.js';
package/Switcher.js ADDED
@@ -0,0 +1,194 @@
1
+ import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import React__default, { forwardRef, useRef, useState, 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 { n as noop, i as interceptValue } from './index-ac59cb10.js';
7
+ import { u as useKeyDown } from './useKeyDown-38102ae7.js';
8
+ import './globalStyling-9c60a159.js';
9
+ import './checkboxRadioSwitcher-5b69d7bd.js';
10
+ import { s as styleInject } from './style-inject.es-746bb8ed.js';
11
+ import { g as guid } from './guid-8ddf77b3.js';
12
+ import './dateValidation-67caec66.js';
13
+ import './_commonjsHelpers-24198af3.js';
14
+ import 'react-dom';
15
+
16
+ var css_248z = "[data-gene-ui-version=\"2.11.0\"] .switcher-element{--size:1.8rem;align-items:center;background:rgba(var(--background-sc-rgb),.38);border:1px solid #0000;border-radius:2rem;color:var(--background);cursor:pointer;display:flex;font:600 .8rem/1rem var(--font-family);height:var(--size);justify-content:center;min-width:calc(var(--size)*2);padding-inline-end:.3rem;padding-inline-start:var(--size);position:relative;transition:color .2s,background .2s,border-color .2s,min-width .2s,height .2s}[data-gene-ui-version=\"2.11.0\"] .switcher-element small{background:var(--background);border-radius:1.4rem;box-shadow:0 .2rem .4rem 0 #00000029;height:calc(var(--size) - 4px);position:absolute;top:1px;transition:width .2s,left .2s,right .2s,transform .2s,background .2s,box-shadow .2s;width:calc(var(--size) - 4px)}html:not([dir=rtl]) .switcher-element small{left:1px}html[dir=rtl] .switcher-element small{right:1px}@media (hover:hover){[data-gene-ui-version=\"2.11.0\"] .crs-component .switcher-element:hover,[data-gene-ui-version=\"2.11.0\"] .crs-holder:focus-within .switcher-element,[data-gene-ui-version=\"2.11.0\"] .crs-label:hover~.crs-component .switcher-element{color:#0000}[data-gene-ui-version=\"2.11.0\"] .crs-component .switcher-element:hover small,[data-gene-ui-version=\"2.11.0\"] .crs-holder:focus-within .switcher-element small,[data-gene-ui-version=\"2.11.0\"] .crs-label:hover~.crs-component .switcher-element small{width:var(--size)}}[data-gene-ui-version=\"2.11.0\"] .switcher-element.active{background:var(--hero);color:var(--hero-sc);padding-inline-end:var(--size);padding-inline-start:.3rem}[data-gene-ui-version=\"2.11.0\"] .switcher-element.active small{background:var(--hero-sc);transform:translateX(-100%)}html:not([dir=rtl]) .switcher-element.active small{left:calc(100% - 1px)}html[dir=rtl] .switcher-element.active small{right:calc(100% - 1px);transform:translateX(100%)}[data-gene-ui-version=\"2.11.0\"] .switcher-element.s-big{--size:2rem}[data-gene-ui-version=\"2.11.0\"] .switcher-element.error-color{background:var(--danger);color:var(--danger-sc)}[data-gene-ui-version=\"2.11.0\"] .switcher-element.error-color small{background:var(--danger-sc)}[data-gene-ui-version=\"2.11.0\"] .switcher-element.read-only{background:none;border-color:rgba(var(--background-sc-rgb),.38);color:rgba(var(--background-sc-rgb),.38)}[data-gene-ui-version=\"2.11.0\"] .switcher-element.read-only small{background:rgba(var(--background-sc-rgb),.38);box-shadow:none}[data-gene-ui-version=\"2.11.0\"] .switcher-element.read-only.active{color:var(--hero)}[data-gene-ui-version=\"2.11.0\"] .switcher-element.read-only.active small{background:var(--hero)}";
17
+ styleInject(css_248z);
18
+
19
+ const Switcher = /*#__PURE__*/forwardRef((props, ref) => {
20
+ const {
21
+ onText,
22
+ offText,
23
+ size,
24
+ label,
25
+ labelPosition,
26
+ labelAlignment,
27
+ description,
28
+ readOnly,
29
+ disabled,
30
+ required,
31
+ isValid,
32
+ errorText,
33
+ defaultChecked,
34
+ onChange,
35
+ changeOnEnter,
36
+ value,
37
+ className,
38
+ ...restProps
39
+ } = props;
40
+ const containerRef = useRef(null);
41
+ const [checkedState, setCheckedState] = useState(defaultChecked);
42
+ const isControlled = ('checked' in props);
43
+ const checked = isControlled ? props.checked : checkedState;
44
+ const randomId = useMemo(guid, []);
45
+ const handleChange = e => {
46
+ const {
47
+ checked
48
+ } = e.target;
49
+ !isControlled && setCheckedState(checked);
50
+ onChange(interceptValue(e, value));
51
+ };
52
+ const hasError = !isValid;
53
+
54
+ /*
55
+ * Change value on Enter key down
56
+ */
57
+ useKeyDown(e => {
58
+ if (changeOnEnter) {
59
+ setCheckedState(checked => !checked);
60
+ onChange(interceptValue(e, value));
61
+ }
62
+ }, [value, onChange], containerRef, ['Enter']);
63
+ return /*#__PURE__*/React__default.createElement("div", {
64
+ ref: containerRef,
65
+ className: classnames('crs-holder', className, "lp-".concat(labelPosition), "la-".concat(labelAlignment), {
66
+ disabled,
67
+ error: hasError,
68
+ 'read-only': readOnly
69
+ })
70
+ }, /*#__PURE__*/React__default.createElement("div", {
71
+ className: classnames('label-holder', {
72
+ 'has-label': !!label
73
+ })
74
+ }, label && /*#__PURE__*/React__default.createElement("div", {
75
+ className: "crs-item crs-label"
76
+ }, /*#__PURE__*/React__default.createElement("label", {
77
+ className: "ellipsis-text",
78
+ htmlFor: randomId
79
+ }, required && "* ", label)), /*#__PURE__*/React__default.createElement("div", {
80
+ className: "crs-item crs-component"
81
+ }, /*#__PURE__*/React__default.createElement("input", _extends({
82
+ type: "checkbox",
83
+ onChange: handleChange,
84
+ checked: checked,
85
+ disabled: disabled,
86
+ value: value,
87
+ ref: ref,
88
+ id: randomId
89
+ }, restProps)), /*#__PURE__*/React__default.createElement("label", {
90
+ className: classnames('switcher-element', "s-".concat(size), {
91
+ active: checked,
92
+ 'error-color': !checked && !errorText && hasError,
93
+ 'read-only': readOnly
94
+ }),
95
+ htmlFor: randomId
96
+ }, /*#__PURE__*/React__default.createElement("span", null, checked ? onText : offText), /*#__PURE__*/React__default.createElement("small", null)))), hasError && errorText && /*#__PURE__*/React__default.createElement("div", {
97
+ className: "information-message color-danger"
98
+ }, errorText), description && /*#__PURE__*/React__default.createElement("div", {
99
+ className: "input-description"
100
+ }, description));
101
+ });
102
+ Switcher.propTypes = {
103
+ /**
104
+ * Text to be written when on
105
+ */
106
+ onText: propTypesExports.string,
107
+ /**
108
+ * Text to be written when off
109
+ */
110
+ offText: propTypesExports.string,
111
+ /**
112
+ * Control Switcher state with this prop. When component is controled it will not switch automatically
113
+ */
114
+ checked: propTypesExports.bool,
115
+ /**
116
+ * Switcher size
117
+ */
118
+ size: propTypesExports.oneOf(checkboxRadioSwitcherConfig.size),
119
+ /**
120
+ * Will add a label for switcher. Any valid React node
121
+ */
122
+ label: propTypesExports.node,
123
+ /**
124
+ * Specify label position
125
+ */
126
+ labelPosition: propTypesExports.oneOf(checkboxRadioSwitcherConfig.labelPosition),
127
+ /**
128
+ * Specify label alignment
129
+ */
130
+ labelAlignment: propTypesExports.oneOf(checkboxRadioSwitcherConfig.labelAlignment),
131
+ /**
132
+ * Will add a description for switcher. Any valid React node
133
+ */
134
+ description: propTypesExports.node,
135
+ /**
136
+ * Switcher will become readonly when set to "true"
137
+ */
138
+ readOnly: propTypesExports.bool,
139
+ /**
140
+ * Switcher will change when Enter key pressed (note: its will not work inside of form component)
141
+ */
142
+ changeOnEnter: propTypesExports.bool,
143
+ /**
144
+ * Switcher will become disabled when set to "true"
145
+ */
146
+ disabled: propTypesExports.bool,
147
+ /**
148
+ * Switcher will add an extra asterix to the "label". For more info see "ValidatableSwitcher"(integrated Radio with "Form" organism).
149
+ */
150
+ required: propTypesExports.bool,
151
+ /**
152
+ * Control Switcher validation. For more info see "ValidatableSwitcher"(integrated Radio with "Form" organism).
153
+ */
154
+ isValid: propTypesExports.bool,
155
+ /**
156
+ * Shows error text when "isValid" is set to "false".
157
+ */
158
+ errorText: propTypesExports.string,
159
+ /**
160
+ * This prop will only applied once as defaultState for "checked" when Swticher mounts.
161
+ * Note that specifing this prop is not mean controlling it.
162
+ */
163
+ defaultChecked: propTypesExports.bool,
164
+ /**
165
+ * Fires an event when Switcher changes checked state((event: Event) => void).
166
+ */
167
+ onChange: propTypesExports.func,
168
+ /**
169
+ * Pass a value to Switcher and get it back within "onChange" event
170
+ */
171
+ value: propTypesExports.any,
172
+ /**
173
+ * Additional className
174
+ */
175
+ className: propTypesExports.string
176
+ };
177
+ Switcher.defaultProps = {
178
+ onText: '',
179
+ offText: '',
180
+ size: checkboxRadioSwitcherConfig.size[0],
181
+ label: '',
182
+ labelPosition: checkboxRadioSwitcherConfig.labelPosition[0],
183
+ labelAlignment: checkboxRadioSwitcherConfig.labelAlignment[0],
184
+ description: '',
185
+ readOnly: false,
186
+ onChange: noop,
187
+ disabled: false,
188
+ required: false,
189
+ isValid: true,
190
+ errorText: '',
191
+ defaultChecked: false
192
+ };
193
+
194
+ export { Switcher as default };
package/Table.js ADDED
@@ -0,0 +1,102 @@
1
+ import './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import 'react';
3
+ export { T as default } from './index-67f4d4d1.js';
4
+ import './index-e0af0caf.js';
5
+ import './index-0cf65939.js';
6
+ import './CellMeasurerCache-c11cec83.js';
7
+ import './index-6ff23041.js';
8
+ import './index-ac59cb10.js';
9
+ import './useMount-6fef51a5.js';
10
+ import './configs-91c86664.js';
11
+ import './Empty.js';
12
+ import './Scrollbar.js';
13
+ import './BusyLoader.js';
14
+ import './globalStyling-9c60a159.js';
15
+ import './guid-8ddf77b3.js';
16
+ import './debounce-4419bc2f.js';
17
+ import './index-e8776f3d.js';
18
+ import './objectWithoutPropertiesLoose-299691d8.js';
19
+ import './Button.js';
20
+ import './Icon.js';
21
+ import './style-inject.es-746bb8ed.js';
22
+ import './SkeletonLoader.js';
23
+ import './_commonjsHelpers-24198af3.js';
24
+ import './Tooltip.js';
25
+ import './Popover-f4d1cac0.js';
26
+ import 'react-dom';
27
+ import './useDeviceType-dd51db38.js';
28
+ import './useWindowSize-80369d76.js';
29
+ import './GeneUIProvider.js';
30
+ import './dateValidation-67caec66.js';
31
+ import './Grid.js';
32
+ import './useWidth-9f4647f8.js';
33
+ import './Tabs.js';
34
+ import './Steps.js';
35
+ import './index-a4635754.js';
36
+ import './index-122432cd.js';
37
+ import './Portal.js';
38
+ import './Timeline.js';
39
+ import './RadioGroup.js';
40
+ import './Radio.js';
41
+ import './checkboxRadioSwitcher-5b69d7bd.js';
42
+ import './Checkbox.js';
43
+ import './Card.js';
44
+ import './MobilePopup.js';
45
+ import './useClickOutside-5183e396.js';
46
+ import './Menu.js';
47
+ import './Option.js';
48
+ import './useEllipsisDetection-ef536015.js';
49
+ import './KeyValue.js';
50
+ import './configs.js';
51
+ import './Tag.js';
52
+ import './Alert.js';
53
+ import './index-00fe8887.js';
54
+ import './rangeAndSlider-20599da4.js';
55
+ import './Slider.js';
56
+ import './ValidatableNumberInput.js';
57
+ import './ExtendedInput.js';
58
+ import './index-5cea9a7d.js';
59
+ import './useKeyDown-38102ae7.js';
60
+ import './Pagination.js';
61
+ import './Divider.js';
62
+ import './ValidatableTextInput.js';
63
+ import './Editor.js';
64
+ import './ValidatableUploader.js';
65
+ import './index-d9e8a888.js';
66
+ import './Image.js';
67
+ import './ValidatableRadio.js';
68
+ import './ValidatableCheckbox.js';
69
+ import './ValidatableSwitcher.js';
70
+ import './Switcher.js';
71
+ import './ValidatableDatePicker.js';
72
+ import './index-5e722d91.js';
73
+ import './index-702bf24a.js';
74
+ import './DatePicker.js';
75
+ import './localization-4ba17032.js';
76
+ import './checkTimeValidation-e56771be.js';
77
+ import './Notification.js';
78
+ import './Modal.js';
79
+ import './Collapse.js';
80
+ import './Status.js';
81
+ import './Progress.js';
82
+ import './MobileNavigation.js';
83
+ import './Badge.js';
84
+ import './Products.js';
85
+ import './Search.js';
86
+ import './Breadcrumb.js';
87
+ import './Section.js';
88
+ import './Title.js';
89
+ import './ColorPicker.js';
90
+ import './NavigationMenu.js';
91
+ import './Textarea.js';
92
+ import './AdvancedSearch.js';
93
+ import './index-b7a33c58.js';
94
+ import './LinkButton.js';
95
+ import './TextLink.js';
96
+ import './Label.js';
97
+ import './Paper.js';
98
+ import './Avatar.js';
99
+ import './Time.js';
100
+ import './QRCode.js';
101
+ import './clsx.m-2bb6df4b.js';
102
+ import './index-a59530cd.js';