@geneui/components 3.0.0-next-9ffcb93-16102024 → 3.0.0-next-48d0ef7-31102024

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 (248) hide show
  1. package/Avatar.js +63 -0
  2. package/CHANGELOG.md +7 -0
  3. package/Divider.js +23 -0
  4. package/{GeneUIProvider/index.js → GeneUIProvider.js} +52 -65
  5. package/HelperText.js +69 -0
  6. package/Info.js +64 -0
  7. package/Label.js +38 -0
  8. package/Loader.js +21 -0
  9. package/Pill.js +64 -0
  10. package/TextLink.js +20 -0
  11. package/{index-65217440.js → Tooltip.js} +104 -80
  12. package/{lib → components}/atoms/Avatar/Avatar.d.ts +7 -6
  13. package/components/atoms/Avatar/index.d.ts +1 -0
  14. package/{lib → components}/atoms/Divider/Divider.d.ts +5 -5
  15. package/components/atoms/Divider/index.d.ts +1 -0
  16. package/{lib → components}/atoms/HelperText/HelperText.d.ts +6 -5
  17. package/components/atoms/HelperText/index.d.ts +1 -0
  18. package/{lib → components}/atoms/Info/Info.d.ts +5 -5
  19. package/components/atoms/Info/index.d.ts +1 -0
  20. package/{lib → components}/atoms/Label/Label.d.ts +3 -3
  21. package/components/atoms/Label/index.d.ts +1 -0
  22. package/{lib → components}/atoms/Loader/Loader.d.ts +5 -5
  23. package/components/atoms/Loader/index.d.ts +1 -0
  24. package/{lib → components}/atoms/Pill/Pill.d.ts +7 -6
  25. package/components/atoms/Pill/index.d.ts +1 -0
  26. package/{lib → components}/atoms/TextLink/TextLink.d.ts +5 -5
  27. package/components/atoms/TextLink/index.d.ts +1 -0
  28. package/{lib → components}/molecules/Tooltip/Tooltip.d.ts +26 -21
  29. package/components/molecules/Tooltip/index.d.ts +1 -0
  30. package/components/providers/GeneUIProvider/GeneUIProvider.d.ts +30 -0
  31. package/components/providers/GeneUIProvider/index.d.ts +1 -0
  32. package/hooks/index.d.ts +2 -20
  33. package/hooks/useDebounceCallback/index.d.ts +1 -0
  34. package/hooks/useDebounceCallback/useDebounceCallback.d.ts +2 -0
  35. package/hooks/useEllipsisDetection/index.d.ts +1 -1
  36. package/hooks/useEllipsisDetection/useEllipsisDetection.d.ts +2 -2
  37. package/{index-031ff73c.js → index-ce02421b.js} +4 -4
  38. package/index.d.ts +11 -121
  39. package/index.js +12 -159
  40. package/package.json +24 -43
  41. package/tokens-0abb4e1b.js +6 -0
  42. package/types/index.d.ts +0 -3
  43. package/useEllipsisDetection-46d712b6.js +34 -0
  44. package/ActionableList/index.js +0 -1694
  45. package/AdvancedSearch/index.js +0 -892
  46. package/Alert/index.js +0 -98
  47. package/Avatar/index.js +0 -58
  48. package/Badge/index.js +0 -29
  49. package/Breadcrumb/index.js +0 -130
  50. package/BusyLoader/index.js +0 -31
  51. package/Button/index.js +0 -30
  52. package/Card/index.js +0 -502
  53. package/CardList/index.js +0 -662
  54. package/CellMeasurerCache-80be385d.js +0 -229
  55. package/Charts/index.js +0 -17662
  56. package/Checkbox/index.js +0 -229
  57. package/CheckboxGroup/index.js +0 -203
  58. package/CheckboxGroupWithSearch/index.js +0 -280
  59. package/Collapse/index.js +0 -195
  60. package/ColorPicker/index.js +0 -210
  61. package/ComboBox/index.js +0 -524
  62. package/Copy/index.js +0 -56
  63. package/Counter/index.js +0 -312
  64. package/DateFilter/index.js +0 -183
  65. package/DatePicker/index.js +0 -1229
  66. package/DatePickerInput/index.js +0 -883
  67. package/Divider/index.js +0 -23
  68. package/Drawer/index.js +0 -261
  69. package/Dropdown/index.js +0 -43
  70. package/Editor/index.js +0 -22975
  71. package/Empty/index.js +0 -76
  72. package/ExtendedInput/index.js +0 -590
  73. package/Form/index.js +0 -85
  74. package/FormContainer/index.js +0 -189
  75. package/FormableCheckbox/index.js +0 -24
  76. package/FormableDatePicker/index.js +0 -43
  77. package/FormableDropdown/index.js +0 -50
  78. package/FormableEditor/index.js +0 -26
  79. package/FormableHOC-85f89a81.js +0 -83
  80. package/FormableMultiSelectDropdown/index.js +0 -50
  81. package/FormableNumberInput/index.js +0 -34
  82. package/FormableRadio/index.js +0 -22
  83. package/FormableSwitcher/index.js +0 -22
  84. package/FormableTextInput/index.js +0 -34
  85. package/FormableUploader/index.js +0 -44
  86. package/Grid/index.js +0 -167
  87. package/HelperText/index.js +0 -86
  88. package/Holder/index.js +0 -261
  89. package/Icon/index.js +0 -62
  90. package/Image/index.js +0 -45
  91. package/ImagePreview/index.js +0 -217
  92. package/Info/index.js +0 -41
  93. package/InfoOutline-dd2e89d9.js +0 -29
  94. package/InteractiveWidget/index.js +0 -78
  95. package/KeyValue/index.js +0 -22
  96. package/Label/index.js +0 -48
  97. package/LinkButton/index.js +0 -34
  98. package/Loader/index.js +0 -23
  99. package/Menu/index.js +0 -281
  100. package/MobileNavigation/index.js +0 -94
  101. package/MobilePopup/index.js +0 -182
  102. package/Modal/index.js +0 -251
  103. package/ModuleTitle/index.js +0 -141
  104. package/NavigationMenu/index.js +0 -222
  105. package/Notification/index.js +0 -120
  106. package/Option/index.js +0 -184
  107. package/Overlay/index.js +0 -187
  108. package/Overspread/index.js +0 -291
  109. package/Pagination/index.js +0 -261
  110. package/Paper/index.js +0 -96
  111. package/Pill/index.js +0 -67
  112. package/Popover/index.js +0 -725
  113. package/PopoverV2/index.js +0 -19
  114. package/Portal/index.js +0 -58
  115. package/Products/index.js +0 -115
  116. package/Profile/index.js +0 -589
  117. package/Progress/index.js +0 -200
  118. package/QRCode/index.js +0 -814
  119. package/Radio/index.js +0 -151
  120. package/RadioGroup/index.js +0 -104
  121. package/Range/index.js +0 -191
  122. package/Rating/index.js +0 -174
  123. package/RichEditor/index.js +0 -13
  124. package/RichEditor-78c2617e.js +0 -228
  125. package/Scrollbar/index.js +0 -1585
  126. package/Search/index.js +0 -75
  127. package/SearchWithDropdown/index.js +0 -140
  128. package/Section/index.js +0 -61
  129. package/SkeletonLoader/index.js +0 -81
  130. package/Slider/index.js +0 -261
  131. package/Status/index.js +0 -97
  132. package/Steps/index.js +0 -314
  133. package/SuggestionList/index.js +0 -385
  134. package/Switcher/index.js +0 -193
  135. package/Table/index.js +0 -57
  136. package/TableCompositions/index.js +0 -16995
  137. package/Tabs/index.js +0 -235
  138. package/Tag/index.js +0 -102
  139. package/TextLink/index.js +0 -20
  140. package/Textarea/index.js +0 -242
  141. package/Time/index.js +0 -62
  142. package/TimePicker/index.js +0 -575
  143. package/Timeline/index.js +0 -113
  144. package/Title/index.js +0 -65
  145. package/Toaster/index.js +0 -116
  146. package/Tooltip/index.js +0 -6
  147. package/TransferList/index.js +0 -493
  148. package/Uploader/index.js +0 -992
  149. package/ValidatableCheckbox/index.js +0 -123
  150. package/ValidatableDatePicker/index.js +0 -316
  151. package/ValidatableDropdown/index.js +0 -141
  152. package/ValidatableElements/index.js +0 -67
  153. package/ValidatableMultiSelectDropdown/index.js +0 -152
  154. package/ValidatableNumberInput/index.js +0 -204
  155. package/ValidatableRadio/index.js +0 -116
  156. package/ValidatableSwitcher/index.js +0 -93
  157. package/ValidatableTextInput/index.js +0 -167
  158. package/ValidatableTimeInput/index.js +0 -174
  159. package/ValidatableUploader/index.js +0 -98
  160. package/Widget/index.js +0 -225
  161. package/_commonjsHelpers-24198af3.js +0 -35
  162. package/_rollupPluginBabelHelpers-a83240e1.js +0 -11
  163. package/callAfterDelay-7272faca.js +0 -12
  164. package/checkTimeValidation-e56771be.js +0 -16
  165. package/checkboxRadioSwitcher-5b69d7bd.js +0 -4
  166. package/clsx.m-2bb6df4b.js +0 -3
  167. package/config-1053d64d.js +0 -20
  168. package/configs-00612ce0.js +0 -103
  169. package/configs.js +0 -111
  170. package/dateValidation-67caec66.js +0 -225
  171. package/debounce-4419bc2f.js +0 -17
  172. package/guid-8ddf77b3.js +0 -16
  173. package/hooks/useBodyScroll.js +0 -16
  174. package/hooks/useClick.js +0 -18
  175. package/hooks/useClickOutside.js +0 -25
  176. package/hooks/useDebounce.js +0 -28
  177. package/hooks/useDeviceType.js +0 -17
  178. package/hooks/useDidMount.js +0 -15
  179. package/hooks/useForceUpdate.js +0 -8
  180. package/hooks/useHover.js +0 -20
  181. package/hooks/useImgDownload.js +0 -18
  182. package/hooks/useKeyDown.js +0 -21
  183. package/hooks/useMount.js +0 -13
  184. package/hooks/useMutationObserver.js +0 -21
  185. package/hooks/usePrevious.js +0 -10
  186. package/hooks/useThrottle.js +0 -16
  187. package/hooks/useToggle.js +0 -11
  188. package/hooks/useUpdatableRef.js +0 -14
  189. package/hooks/useUpdate.js +0 -10
  190. package/hooks/useWidth.js +0 -16
  191. package/hooks/useWindowSize.js +0 -40
  192. package/index-122432cd.js +0 -270
  193. package/index-262edd7a.js +0 -77
  194. package/index-2f5aa51e.js +0 -6483
  195. package/index-370f9acd.js +0 -4
  196. package/index-45eafea6.js +0 -90
  197. package/index-480fd7d9.js +0 -10032
  198. package/index-5f37f281.js +0 -168
  199. package/index-73aaa093.js +0 -1940
  200. package/index.mobile.d.ts +0 -14
  201. package/lib/atoms/Avatar/index.d.ts +0 -1
  202. package/lib/atoms/Badge/Badge.d.ts +0 -36
  203. package/lib/atoms/Badge/index.d.ts +0 -1
  204. package/lib/atoms/BusyLoader/BusyLoader.d.ts +0 -32
  205. package/lib/atoms/BusyLoader/BusyLoaderHolderHOC.d.ts +0 -8
  206. package/lib/atoms/BusyLoader/index.d.ts +0 -1
  207. package/lib/atoms/Button/Button.d.ts +0 -70
  208. package/lib/atoms/Button/index.d.ts +0 -1
  209. package/lib/atoms/Divider/index.d.ts +0 -1
  210. package/lib/atoms/Empty/Empty.d.ts +0 -39
  211. package/lib/atoms/Empty/index.d.ts +0 -1
  212. package/lib/atoms/Empty/utils.d.ts +0 -9
  213. package/lib/atoms/HelperText/index.d.ts +0 -1
  214. package/lib/atoms/Image/Image.d.ts +0 -51
  215. package/lib/atoms/Image/index.d.ts +0 -1
  216. package/lib/atoms/ImagePreview/ImagePreview.d.ts +0 -56
  217. package/lib/atoms/ImagePreview/ImagePreviewHOC.d.ts +0 -4
  218. package/lib/atoms/ImagePreview/Magnifier.d.ts +0 -40
  219. package/lib/atoms/ImagePreview/index.d.ts +0 -1
  220. package/lib/atoms/Info/index.d.ts +0 -1
  221. package/lib/atoms/KeyValue/KeyValue.d.ts +0 -29
  222. package/lib/atoms/KeyValue/index.d.ts +0 -1
  223. package/lib/atoms/Label/index.d.ts +0 -1
  224. package/lib/atoms/LinkButton/LinkButton.d.ts +0 -46
  225. package/lib/atoms/LinkButton/index.d.ts +0 -1
  226. package/lib/atoms/Loader/index.d.ts +0 -1
  227. package/lib/atoms/Pill/index.d.ts +0 -1
  228. package/lib/atoms/Rating/DefaultSvg.d.ts +0 -3
  229. package/lib/atoms/Rating/Rating.d.ts +0 -49
  230. package/lib/atoms/Rating/index.d.ts +0 -1
  231. package/lib/atoms/TextLink/index.d.ts +0 -1
  232. package/lib/molecules/Copy/Copy.d.ts +0 -38
  233. package/lib/molecules/Copy/index.d.ts +0 -1
  234. package/lib/molecules/InteractiveWidget/InteractiveWidget.d.ts +0 -70
  235. package/lib/molecules/InteractiveWidget/InteractiveWidgetIcon.d.ts +0 -8
  236. package/lib/molecules/InteractiveWidget/index.d.ts +0 -1
  237. package/lib/molecules/Tooltip/index.d.ts +0 -1
  238. package/lib/providers/GeneUIProvider/GeneUIProvider.d.ts +0 -30
  239. package/lib/providers/GeneUIProvider/index.d.ts +0 -1
  240. package/localization-4ba17032.js +0 -46
  241. package/objectWithoutPropertiesLoose-e1596bdb.js +0 -62
  242. package/rangeAndSlider-693a3d41.js +0 -8684
  243. package/react-beautiful-dnd.esm-b637016a.js +0 -10116
  244. package/react-lifecycles-compat.es-6e1f3768.js +0 -158
  245. package/redux-e591c1b8.js +0 -536
  246. package/tokens-8ab1179c.js +0 -6
  247. package/tslib.es6-f211516f.js +0 -35
  248. package/useEllipsisDetection-c1c9ad94.js +0 -38
@@ -1,44 +0,0 @@
1
- import { F as Formable } from '../FormableHOC-85f89a81.js';
2
- import UploaderField from '../ValidatableUploader/index.js';
3
- import '../_rollupPluginBabelHelpers-a83240e1.js';
4
- import 'react';
5
- import '../index-5f37f281.js';
6
- import 'prop-types';
7
- import '../dateValidation-67caec66.js';
8
- import '../_commonjsHelpers-24198af3.js';
9
- import 'react-dom';
10
- import '../hooks/useMount.js';
11
- import '../configs-00612ce0.js';
12
- import '../index-262edd7a.js';
13
- import '../guid-8ddf77b3.js';
14
- import '../Uploader/index.js';
15
- import '../index-031ff73c.js';
16
- import '../Button/index.js';
17
- import '../tslib.es6-f211516f.js';
18
- import '../Icon/index.js';
19
- import '../style-inject.es-746bb8ed.js';
20
- import '../ExtendedInput/index.js';
21
- import '../hooks/useDeviceType.js';
22
- import '../hooks/useWindowSize.js';
23
- import '../hooks/useDebounce.js';
24
- import '../useEllipsisDetection-c1c9ad94.js';
25
- import '../SuggestionList/index.js';
26
- import '../hooks/useKeyDown.js';
27
- import '../hooks/useClickOutside.js';
28
- import '../config-1053d64d.js';
29
- import '../Scrollbar/index.js';
30
- import '../callAfterDelay-7272faca.js';
31
- import '../index-65217440.js';
32
- import '../GeneUIProvider/index.js';
33
- import '../Grid/index.js';
34
- import '../hooks/useWidth.js';
35
- import '../hooks/useImgDownload.js';
36
- import '../BusyLoader/index.js';
37
- import '../Image/index.js';
38
- import '../Empty/index.js';
39
- import '../Checkbox/index.js';
40
- import '../checkboxRadioSwitcher-5b69d7bd.js';
41
-
42
- var FormableUploader = Formable(UploaderField);
43
-
44
- export { FormableUploader as default };
package/Grid/index.js DELETED
@@ -1,167 +0,0 @@
1
- import React__default, { useRef } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { c as classnames } from '../index-031ff73c.js';
4
- import useWidth from '../hooks/useWidth.js';
5
- import '../dateValidation-67caec66.js';
6
- import 'react-dom';
7
- import { k as breakPoints } from '../configs-00612ce0.js';
8
- import { _ as _extends } from '../_rollupPluginBabelHelpers-a83240e1.js';
9
- import { s as styleInject } from '../style-inject.es-746bb8ed.js';
10
- import '../hooks/useWindowSize.js';
11
- import '../hooks/useDebounce.js';
12
- import '../_commonjsHelpers-24198af3.js';
13
-
14
- /* Recognizing screen size by configuration.
15
- * Now we have 5 supported screen sizes.
16
- */
17
-
18
- const getPartsByWindowSize = (size, options) => {
19
- let screenKey = 'xxl';
20
- let screenSize = options[screenKey];
21
- for (const key in options) {
22
- const value = options[key];
23
- // find value closest to our window size
24
- if (size <= value && value < screenSize) {
25
- screenKey = key;
26
- screenSize = value;
27
- }
28
- }
29
- return screenKey;
30
- };
31
-
32
- function Col(props) {
33
- const {
34
- __count,
35
- __gutter,
36
- __padding,
37
- __parentWidth,
38
- children,
39
- size,
40
- className,
41
- style = {},
42
- ...rest
43
- } = props;
44
- const styles = {
45
- padding: "".concat(__padding / 20, "rem ").concat(__gutter / 20, "rem"),
46
- ...style
47
- };
48
- const fit = size || rest[getPartsByWindowSize(__parentWidth, breakPoints)];
49
- styles.width = "".concat(fit / __count * 100, "%");
50
- return /*#__PURE__*/React__default.createElement("div", _extends({
51
- className: classnames('grid-child', className),
52
- style: styles
53
- }, rest), children);
54
- }
55
- Col.propTypes = {
56
- /**
57
- * Component will calculate width based on this props
58
- */
59
- __parentWidth: PropTypes.number,
60
- /**
61
- * The space between elements vertically
62
- */
63
- __padding: PropTypes.number,
64
- /**
65
- * The space between elements horizontally
66
- */
67
- __gutter: PropTypes.number,
68
- /**
69
- * Defines the number of grids the component is going to use
70
- */
71
- __count: PropTypes.number,
72
- /**
73
- * The CSS class name of the element.
74
- */
75
- className: PropTypes.string,
76
- /**
77
- * Custom stylings
78
- */
79
- style: PropTypes.object,
80
- /**
81
- * Defines the size of grids the component is going to use.
82
- */
83
- xs: PropTypes.number,
84
- /**
85
- * Defines the size of grids the component is going to use.
86
- */
87
- md: PropTypes.number,
88
- /**
89
- * Defines the size of grids the component is going to use.
90
- */
91
- lg: PropTypes.number,
92
- /**
93
- * Defines the size of grids the component is going to use.
94
- */
95
- xl: PropTypes.number,
96
- /**
97
- * Defines the size of grids the component is going to use.
98
- */
99
- xxl: PropTypes.number,
100
- /**
101
- * Custom size for element
102
- */
103
- size: PropTypes.number,
104
- /**
105
- * Any valid react node
106
- */
107
- children: PropTypes.node
108
- };
109
- Col.defaultProps = {
110
- __parentWidth: 0,
111
- __padding: 20,
112
- __gutter: 20,
113
- __count: 12,
114
- xs: 1,
115
- md: 1,
116
- lg: 1,
117
- xl: 1,
118
- xxl: 1
119
- };
120
-
121
- var css_248z = "[data-gene-ui-version=\"2.16.3\"] .grid-holder{width:100%}[data-gene-ui-version=\"2.16.3\"] .grid-items-group{display:flex;flex-wrap:wrap;width:100%}[data-gene-ui-version=\"2.16.3\"] .grid-child{display:flex}";
122
- styleInject(css_248z);
123
-
124
- function Row(props) {
125
- const ref = useRef();
126
- const width = useWidth(ref);
127
- return /*#__PURE__*/React__default.createElement("div", {
128
- ref: ref,
129
- className: classnames('grid-holder', props.className)
130
- }, /*#__PURE__*/React__default.createElement("div", {
131
- className: "grid-items-group",
132
- style: {
133
- width: "calc(100% + ".concat(props.gutter / 10, "rem)"),
134
- margin: "-".concat(props.padding / 20, "rem -").concat(props.gutter / 20, "rem")
135
- }
136
- }, React__default.Children.map(props.children, child => /*#__PURE__*/React__default.isValidElement(child) && /*#__PURE__*/React__default.cloneElement(child, {
137
- __count: props.span,
138
- __parentWidth: width,
139
- __padding: props.padding,
140
- __gutter: props.gutter
141
- }))));
142
- }
143
- Row.propTypes = {
144
- /**
145
- * Defines the space between horizontally
146
- */
147
- gutter: PropTypes.number,
148
- /**
149
- * Defines the number of grids the component is going to use
150
- */
151
- span: PropTypes.number,
152
- /**
153
- * Defines the space between vertically
154
- */
155
- padding: PropTypes.number,
156
- /**
157
- * The content of the component.
158
- */
159
- children: PropTypes.oneOfType([PropTypes.bool, PropTypes.node, PropTypes.element, PropTypes.instanceOf(Col)])
160
- };
161
- Row.defaultProps = {
162
- gutter: 20,
163
- padding: 20,
164
- span: 12
165
- };
166
-
167
- export { Col, Row };
@@ -1,86 +0,0 @@
1
- import React__default, { useRef, cloneElement } from 'react';
2
- import { _ as _objectWithoutProperties, a as _extends } from '../ArrowLeft-b88e2ba8.js';
3
- import { c as classnames } from '../index-031ff73c.js';
4
- import 'prop-types';
5
- import '../dateValidation-67caec66.js';
6
- import 'react-dom';
7
- import '../configs-00612ce0.js';
8
- import { u as useEllipsisDetection } from '../useEllipsisDetection-c1c9ad94.js';
9
- import { T as Tooltip } from '../index-65217440.js';
10
- import { s as styleInject } from '../style-inject.es-746bb8ed.js';
11
- import '../_commonjsHelpers-24198af3.js';
12
- import '../hooks/useDebounce.js';
13
- import '../tslib.es6-f211516f.js';
14
- import '../GeneUIProvider/index.js';
15
-
16
- var _excluded$1 = ["size", "color"];
17
- var SvgErrorAlertFill = function SvgErrorAlertFill(_ref) {
18
- var _ref$size = _ref.size,
19
- size = _ref$size === void 0 ? 24 : _ref$size,
20
- _ref$color = _ref.color,
21
- color = _ref$color === void 0 ? "currentColor" : _ref$color,
22
- props = _objectWithoutProperties(_ref, _excluded$1);
23
- return /*#__PURE__*/React__default.createElement("svg", _extends({
24
- width: size,
25
- height: size,
26
- viewBox: "0 0 24 24",
27
- fill: color,
28
- xmlns: "http://www.w3.org/2000/svg"
29
- }, props), /*#__PURE__*/React__default.createElement("path", {
30
- d: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-.75 5.758a.75.75 0 1 1 1.5 0v5.243a.75.75 0 1 1-1.5 0v-5.243Zm.75 9.235a.915.915 0 1 1 0-1.83.915.915 0 0 1 0 1.83Z",
31
- fill: color
32
- }));
33
- };
34
-
35
- var _excluded = ["size", "color"];
36
- var SvgWarningFill = function SvgWarningFill(_ref) {
37
- var _ref$size = _ref.size,
38
- size = _ref$size === void 0 ? 24 : _ref$size,
39
- _ref$color = _ref.color,
40
- color = _ref$color === void 0 ? "currentColor" : _ref$color,
41
- props = _objectWithoutProperties(_ref, _excluded);
42
- return /*#__PURE__*/React__default.createElement("svg", _extends({
43
- width: size,
44
- height: size,
45
- viewBox: "0 0 24 24",
46
- fill: color,
47
- xmlns: "http://www.w3.org/2000/svg"
48
- }, props), /*#__PURE__*/React__default.createElement("path", {
49
- fillRule: "evenodd",
50
- clipRule: "evenodd",
51
- d: "m2.13 19.503 9.075-15.997a1 1 0 0 1 1.375-.368 1 1 0 0 1 .365.375l8.928 15.996a1.004 1.004 0 0 1-.375 1.358.997.997 0 0 1-.497.133h-18.002a.997.997 0 0 1-.999-.997c0-.175.044-.348.13-.5Zm9.33-5.035a.748.748 0 0 0 1.278-.531v-5.254a.753.753 0 0 0-.749-.751.748.748 0 0 0-.749.751v5.254c0 .199.08.39.22.531Zm1.442 2.552a.915.915 0 0 1-.913.917.915.915 0 0 1-.914-.917.915.915 0 1 1 1.827 0Z",
52
- fill: color
53
- }));
54
- };
55
-
56
- var css_248z = "[data-gene-ui-version=\"2.16.3\"] .helperText{align-items:center;display:inline-flex;gap:var(--guit-ref-spacing-3xsmall);max-width:100%}[data-gene-ui-version=\"2.16.3\"] .helperText_size_medium .helperText__text{font-family:var(--guit-sem-font-label-medium-default-semibold-font-family);font-size:var(--guit-sem-font-label-medium-default-semibold-font-size);font-weight:var(--guit-sem-font-label-medium-default-medium-font-weight);line-height:var(--guit-sem-font-label-medium-default-semibold-line-height)}[data-gene-ui-version=\"2.16.3\"] .helperText_size_medium .helperText__icon{height:var(--guit-sem-sizing-height-small-nudge);width:var(--guit-sem-sizing-width-small-nudge)}[data-gene-ui-version=\"2.16.3\"] .helperText_size_small .helperText__text{font-family:var(--guit-sem-font-label-small-default-medium-font-family);font-size:var(--guit-sem-font-label-small-default-medium-font-size);font-weight:var(--guit-sem-font-label-small-default-medium-font-weight);line-height:var(--guit-sem-font-label-small-default-medium-line-height)}[data-gene-ui-version=\"2.16.3\"] .helperText_size_small .helperText__icon{height:var(--guit-sem-sizing-height-xs);width:var(--guit-sem-sizing-width-xs)}[data-gene-ui-version=\"2.16.3\"] .helperText_type_rest{color:var(--guit-sem-color-foreground-neutral-2)}[data-gene-ui-version=\"2.16.3\"] .helperText_type_danger{color:var(--guit-sem-color-foreground-error)}[data-gene-ui-version=\"2.16.3\"] .helperText_type_warning .helperText__icon{color:var(--guit-sem-color-foreground-warning)}[data-gene-ui-version=\"2.16.3\"] .helperText__icon{align-items:center;display:flex;flex:0 0 auto}[data-gene-ui-version=\"2.16.3\"] .helperText_disabled,[data-gene-ui-version=\"2.16.3\"] .helperText_disabled .helperText__icon{color:var(--guit-sem-color-foreground-disabled)}";
57
- styleInject(css_248z);
58
-
59
- /**
60
- * The Helper Text provides users with additional information or guidance related to a specific input field in a form. This text helps users understand the expected format, requirements, or purpose of the input, thereby improving form completion accuracy and user confidence.
61
- */
62
- const HelperText = ({ size = 'medium', type = 'rest', text, Icon, isDisabled, isLoading, className }) => {
63
- const textRef = useRef(null);
64
- const isTruncated = useEllipsisDetection(textRef);
65
- const iconSize = {
66
- small: 16,
67
- medium: 20
68
- };
69
- const iconMap = {
70
- danger: React__default.createElement(SvgErrorAlertFill, { size: iconSize[size] }),
71
- warning: React__default.createElement(SvgWarningFill, { size: iconSize[size] })
72
- };
73
- const iconMock = iconMap[type] ||
74
- (Icon &&
75
- cloneElement(Icon, {
76
- size: iconSize[size]
77
- }));
78
- return (React__default.createElement("div", { className: classnames(`helperText helperText_type_${type} helperText_size_${size}`, className, {
79
- helperText_disabled: isDisabled
80
- }) }, isLoading ? ('skeleton') : (React__default.createElement(React__default.Fragment, null,
81
- iconMock && React__default.createElement("div", { className: "helperText__icon" }, iconMock),
82
- React__default.createElement(Tooltip, { text: text, isVisible: isTruncated },
83
- React__default.createElement("p", { className: "helperText__text ellipsis-text", ref: textRef }, text))))));
84
- };
85
-
86
- export { HelperText as default };
package/Holder/index.js DELETED
@@ -1,261 +0,0 @@
1
- import { _ as _extends } from '../_rollupPluginBabelHelpers-a83240e1.js';
2
- import React__default, { useRef, useState } from 'react';
3
- import PropTypes from 'prop-types';
4
- import { c as classnames } from '../index-031ff73c.js';
5
- import { n as noop } from '../index-5f37f281.js';
6
- import { p as popoverV2Config } from '../configs-00612ce0.js';
7
- import Icon from '../Icon/index.js';
8
- import Button from '../Button/index.js';
9
- import Portal from '../Portal/index.js';
10
- import CustomScrollbar from '../Scrollbar/index.js';
11
- import ModuleTitle from '../ModuleTitle/index.js';
12
- import { T as Tooltip } from '../index-65217440.js';
13
- import { s as styleInject } from '../style-inject.es-746bb8ed.js';
14
- import '../dateValidation-67caec66.js';
15
- import '../_commonjsHelpers-24198af3.js';
16
- import 'react-dom';
17
- import '../tslib.es6-f211516f.js';
18
- import '../GeneUIProvider/index.js';
19
-
20
- var css_248z = "[data-gene-ui-version=\"2.16.3\"] .holder{--delay:200ms;--width:1.9rem;--opened-width:39.9rem;background:var(--background);height:100%;position:relative;top:0;transition:width .4s var(--delay);width:var(--width);z-index:200}[data-gene-ui-version=\"2.16.3\"] .holder.disabled{pointer-events:none}[data-gene-ui-version=\"2.16.3\"] .holder.disabled .holder-toggle .icon{opacity:.5}[data-gene-ui-version=\"2.16.3\"] .holder.pinned{--width:var(--opened-width);--delay:0ms}[data-gene-ui-version=\"2.16.3\"] .holder.pinned.opened .layer-1{transform:scale(1)}[data-gene-ui-version=\"2.16.3\"] .holder.opened{--delay:400ms}[data-gene-ui-version=\"2.16.3\"] .holder.opened .holder-wrapper{opacity:1;width:var(--opened-width)}[data-gene-ui-version=\"2.16.3\"] .holder:not(.pinned).opened .layer-3,[data-gene-ui-version=\"2.16.3\"] .holder:not(.pinned):not(.opened) .layer-2{transform:scale(1)}[data-gene-ui-version=\"2.16.3\"] .holder-c-wrapper{background:var(--background);height:100%;min-width:100%;position:absolute;top:0}[data-gene-ui-version=\"2.16.3\"] .holder-toggle{padding:.5rem;position:absolute;top:1rem}[data-gene-ui-version=\"2.16.3\"] .holder-toggle button{background:var(--background);border-radius:100%;box-shadow:0 0 .2rem rgba(var(--background-sc-rgb),.16);color:var(--hero);cursor:pointer;height:3rem;position:relative;transition:color .25s,background .25s;width:3rem}@media (hover:hover){[data-gene-ui-version=\"2.16.3\"] .holder-toggle button:hover{background:var(--hero);color:var(--hero-sc)}}[data-gene-ui-version=\"2.16.3\"] .holder-toggle button.active{background:var(--hero);color:var(--hero-sc)}@media (hover:hover){[data-gene-ui-version=\"2.16.3\"] .holder-toggle button.active:hover{background:var(--hero-hover)}}[data-gene-ui-version=\"2.16.3\"] .holder-toggle .icon{left:0;padding:.3rem;position:absolute;top:0;transform:scale(0);transition:transform .4s,opacity .4s}[data-gene-ui-version=\"2.16.3\"] .holder-wrapper{height:100%;opacity:0;overflow:hidden;position:relative;transition:opacity .15s var(--delay),width .4s var(--delay);width:var(--width)}html:not([dir=rtl]) .holder-left{left:0}html[dir=rtl] .holder-left{right:0}[data-gene-ui-version=\"2.16.3\"] .holder-left .holder-c-wrapper{border-inline-end:1px solid rgba(var(--background-sc-rgb),.1)}html:not([dir=rtl]) .holder-left .holder-c-wrapper{left:0}html[dir=rtl] .holder-left .holder-c-wrapper{right:0}html:not([dir=rtl]) .holder-left .module-header{padding-right:1.5rem}html[dir=rtl] .holder-left .module-header{padding-left:1.5rem}html:not([dir=rtl]) .holder-left .holder-toggle{right:-2rem}html[dir=rtl] .holder-left .holder-toggle{left:-2rem}html:not([dir=rtl]) .holder-right{right:0}html[dir=rtl] .holder-right{left:0}[data-gene-ui-version=\"2.16.3\"] .holder-right .holder-c-wrapper{border-inline-start:1px solid rgba(var(--background-sc-rgb),.1)}html:not([dir=rtl]) .holder-right .holder-c-wrapper{right:0}html[dir=rtl] .holder-right .holder-c-wrapper{left:0}html:not([dir=rtl]) .holder-right .holder-toggle{left:-2rem}html[dir=rtl] .holder-right .holder-toggle{right:-2rem}[data-gene-ui-version=\"2.16.3\"] .opened .holder-content{width:var(--opened-width)}[data-gene-ui-version=\"2.16.3\"] .holder-content{display:grid;grid-template-areas:\"head\" \"body\" \"footer\";grid-template-columns:100%;grid-template-rows:auto 1fr auto;height:100%;overflow:hidden}[data-gene-ui-version=\"2.16.3\"] .holder-content-disable{pointer-events:none}[data-gene-ui-version=\"2.16.3\"] .holder-content .module-header{grid-area:head}[data-gene-ui-version=\"2.16.3\"] .holder-content .holder-body{grid-area:body}[data-gene-ui-version=\"2.16.3\"] .holder-footer{border-top:1px solid rgba(var(--background-sc-rgb),.1);display:flex;grid-area:footer;padding:2rem}[data-gene-ui-version=\"2.16.3\"] .holder-footer:empty{display:none}[data-gene-ui-version=\"2.16.3\"] .holder-body-c{display:flex;flex-wrap:wrap;padding:1rem}[data-gene-ui-version=\"2.16.3\"] .holder-body-c>*{margin:1rem}[data-gene-ui-version=\"2.16.3\"] .holder-body-c .holder-title{font:600 1.6rem/2rem var(--font-family);margin-bottom:.5rem;padding:0 1rem;width:100%}[data-gene-ui-version=\"2.16.3\"] .holder-body-c .col-6{width:50%}";
21
- styleInject(css_248z);
22
-
23
- function Holder(_ref) {
24
- let {
25
- title,
26
- footer,
27
- disabled,
28
- children,
29
- position,
30
- onChange,
31
- resetText,
32
- applyText,
33
- withPortal,
34
- className,
35
- onReset,
36
- onApply,
37
- applyDisabled,
38
- resetDisabled,
39
- defaultOpened,
40
- expandText,
41
- collapseText,
42
- portalContainer,
43
- rightIconType,
44
- leftIconType,
45
- filterIconType,
46
- openedWidth,
47
- disableOnHover,
48
- ...restProps
49
- } = _ref;
50
- const parentContainer = useRef(null);
51
- const isControlled = ('opened' in restProps);
52
- const [holderOpened, setHolderOpened] = useState(defaultOpened);
53
- const [holderHovered, setHolderHovered] = useState(false);
54
- const isOpened = isControlled ? restProps.opened : holderOpened;
55
- const handleEvent = open => {
56
- if (!isControlled) {
57
- setHolderOpened(open);
58
- !open && holderHovered && setHolderHovered(false);
59
- }
60
- onChange(open, holderHovered);
61
- };
62
-
63
- // Will open later
64
- const handleHover = hovered => {
65
- if (!disableOnHover && hovered !== holderHovered) {
66
- !isControlled && setHolderHovered(!holderOpened ? hovered : false);
67
- onChange(holderOpened, hovered);
68
- }
69
- };
70
- const Content = /*#__PURE__*/React__default.createElement("div", _extends({
71
- className: classnames('holder', className, "holder-".concat(position), {
72
- pinned: isOpened,
73
- opened: holderHovered || isOpened,
74
- disabled
75
- }),
76
- style: {
77
- '--opened-width': openedWidth
78
- },
79
- onMouseLeave: () => {
80
- if (!document.documentElement.classList.contains(popoverV2Config.onOpenClassName)) {
81
- handleHover(false);
82
- }
83
- }
84
- }, restProps), /*#__PURE__*/React__default.createElement("div", {
85
- className: "holder-c-wrapper",
86
- ref: parentContainer
87
- }, /*#__PURE__*/React__default.createElement("div", {
88
- className: "holder-wrapper",
89
- onMouseEnter: () => handleHover(true)
90
- }, /*#__PURE__*/React__default.createElement("div", {
91
- className: classnames('holder-content', {
92
- 'holder-content-disable': !holderOpened && disableOnHover
93
- })
94
- }, title && /*#__PURE__*/React__default.createElement(ModuleTitle, {
95
- title: title,
96
- size: "extra-big"
97
- }), /*#__PURE__*/React__default.createElement("div", {
98
- className: "holder-body"
99
- }, /*#__PURE__*/React__default.createElement(CustomScrollbar, null, /*#__PURE__*/React__default.createElement("div", {
100
- className: "holder-body-c"
101
- }, children))), /*#__PURE__*/React__default.createElement("div", {
102
- className: "holder-footer"
103
- }, footer !== undefined ? footer : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Button, {
104
- flexibility: "full-width",
105
- appearance: "minimal",
106
- color: "default",
107
- disabled: resetDisabled,
108
- onClick: onReset
109
- }, resetText), /*#__PURE__*/React__default.createElement(Button, {
110
- flexibility: "full-width",
111
- color: "confirm",
112
- disabled: applyDisabled,
113
- onClick: onApply
114
- }, applyText))))), /*#__PURE__*/React__default.createElement("div", {
115
- className: "holder-toggle"
116
- }, /*#__PURE__*/React__default.createElement("button", {
117
- className: classnames({
118
- active: isOpened
119
- })
120
- }, /*#__PURE__*/React__default.createElement(Tooltip, {
121
- title: isOpened ? collapseText : expandText,
122
- position: "right"
123
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Icon, {
124
- type: leftIconType,
125
- className: "layer-1",
126
- onClick: () => handleEvent(false)
127
- }), /*#__PURE__*/React__default.createElement(Icon, {
128
- type: filterIconType,
129
- className: "layer-2",
130
- onClick: () => handleEvent(true)
131
- }))), /*#__PURE__*/React__default.createElement(Icon, {
132
- type: rightIconType,
133
- className: "layer-3",
134
- onClick: () => handleEvent(true)
135
- })))));
136
- return withPortal ? /*#__PURE__*/React__default.createElement(Portal, {
137
- isOpen: true,
138
- container: portalContainer
139
- }, Content) : Content;
140
- }
141
- Holder.propTypes = {
142
- /**
143
- * Custom footer,
144
- * Any valid React element
145
- */
146
- footer: PropTypes.node,
147
- /**
148
- * It prevents the user from changing the state(opened/closed) of holder
149
- */
150
- disabled: PropTypes.bool,
151
- /**
152
- * Content of holder,
153
- * Valid React element
154
- */
155
- children: PropTypes.node,
156
- /**
157
- * Fires event when user changes state(opened/closed) of holder
158
- * (holderOpened: Boolean) => void
159
- */
160
- onChange: PropTypes.func,
161
- /**
162
- * Wraps component with Portal component if [true]
163
- */
164
- withPortal: PropTypes.bool,
165
- /**
166
- * Custom text for reset button
167
- */
168
- resetText: PropTypes.string,
169
- /**
170
- * Custom text for apply button
171
- */
172
- applyText: PropTypes.string,
173
- /**
174
- * The CSS class name of the wrapper element.
175
- */
176
- className: PropTypes.string,
177
- /**
178
- * Fires event when user clicks on reset button
179
- * (event: Event) -=> void
180
- */
181
- onReset: PropTypes.func,
182
- /**
183
- * Fires event when user clicks on apply button
184
- * (event: Event) -=> void
185
- */
186
- onApply: PropTypes.func,
187
- /**
188
- * Initial state(opened/closed) for holder, I
189
- * If true holder will be opened
190
- */
191
- defaultOpened: PropTypes.bool,
192
- /**
193
- * Controlled value or state(opened/closed) for holder, I
194
- * If true holder will be opened
195
- */
196
- opened: PropTypes.bool,
197
- /**
198
- * Is any valid DOM node, regardless of its location in the DOM.
199
- */
200
- portalContainer: PropTypes.any,
201
- /**
202
- * Controls holder position
203
- */
204
- position: PropTypes.oneOf(['left', 'right']),
205
- /**
206
- * Title for component
207
- */
208
- title: PropTypes.string.isRequired,
209
- /**
210
- * Disabled state for "apply" button
211
- */
212
- applyDisabled: PropTypes.bool,
213
- /**
214
- * Disabled state for "reset" button
215
- */
216
- resetDisabled: PropTypes.bool,
217
- /**
218
- * Tooltip text for expanding icon
219
- */
220
- expandText: PropTypes.string.isRequired,
221
- /**
222
- * Tooltip text for collapsing icon
223
- */
224
- collapseText: PropTypes.string.isRequired,
225
- /**
226
- * Width for holder opened state (write with px)
227
- */
228
- openedWidth: PropTypes.string,
229
- /**
230
- * Left custom icon name, default is 'bc-icon-arrow-left'
231
- */
232
- leftIconType: PropTypes.string,
233
- /**
234
- * Right custom icon name, default is 'bc-icon-arrow-right'
235
- */
236
- rightIconType: PropTypes.string,
237
- /**
238
- * Filter custom icon name, default is 'bc-icon-arrow-filter'
239
- */
240
- filterIconType: PropTypes.string,
241
- /**
242
- * Disabled hover event which opening Holder component.
243
- */
244
- disableOnHover: PropTypes.bool
245
- };
246
- Holder.defaultProps = {
247
- disabled: false,
248
- applyText: 'Apply',
249
- withPortal: false,
250
- resetText: 'Reset',
251
- defaultOpened: false,
252
- position: 'left',
253
- applyDisabled: false,
254
- onChange: noop,
255
- leftIconType: 'bc-icon-arrow-left',
256
- rightIconType: 'bc-icon-arrow-right',
257
- filterIconType: 'bc-icon-filter',
258
- disableOnHover: false
259
- };
260
-
261
- export { Holder as default };
package/Icon/index.js DELETED
@@ -1,62 +0,0 @@
1
- import { _ as _extends } from '../_rollupPluginBabelHelpers-a83240e1.js';
2
- import React__default from 'react';
3
- import { c as classnames } from '../index-031ff73c.js';
4
- import PropTypes from 'prop-types';
5
- import { s as styleInject } from '../style-inject.es-746bb8ed.js';
6
-
7
- var css_248z = "[data-gene-ui-version=\"2.16.3\"] .icon{display:block;font-size:2.4rem}[data-gene-ui-version=\"2.16.3\"] .icon.disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.16.3\"] .icon.bc-icon-loader{overflow:hidden}[data-gene-ui-version=\"2.16.3\"] .icon.bc-icon-loader:before{animation:loader-icon .3s linear infinite;display:block}@keyframes loader-icon{to{transform:rotate(1turn)}}[data-gene-ui-version=\"2.16.3\"] [dir=rtl] .bc-icon-arrow-right-nav:before{content:\"\\e906\"}[data-gene-ui-version=\"2.16.3\"] [dir=rtl] .bc-icon-arrow-left-nav:before{content:\"\\e90a\"}[data-gene-ui-version=\"2.16.3\"] [dir=rtl] .bc-icon-arrow-right:before{content:\"\\e907\"}[data-gene-ui-version=\"2.16.3\"] [dir=rtl] .bc-icon-arrow-left:before{content:\"\\e90b\"}[data-gene-ui-version=\"2.16.3\"] [dir=rtl] .bc-icon-arrow-forward:before{content:\"\\e901\"}[data-gene-ui-version=\"2.16.3\"] [dir=rtl] .bc-icon-left-outline:before{content:\"\\e959\"}[data-gene-ui-version=\"2.16.3\"] [dir=rtl] .bc-icon-right-outline:before{content:\"\\e955\"}[data-gene-ui-version=\"2.16.3\"] [dir=rtl] .bc-icon-forwards:before{content:\"\\e95b\"}[data-gene-ui-version=\"2.16.3\"] [dir=rtl] .bc-icon-backwards:before{content:\"\\e95a\"}";
8
- styleInject(css_248z);
9
-
10
- // This this because in production we need to replace 'nonames.com' with host
11
- // but in development mode we need to put 'nonames.com'
12
- function getMainHost() {
13
- const parts = window.location.host.split('.');
14
- if (parts.length < 2) return 'nonamens.com';
15
- return "".concat(parts[parts.length - 2], ".").concat(parts[parts.length - 1]);
16
- }
17
- const host = process.env.REACT_APP_ICON_URL || process.env.REACT_APP_NODE === 'production' ? getMainHost() : 'nonamens.com';
18
- if (process.env.REACT_APP_CUSTOM_ICON_URL) {
19
- document.head.appendChild(document.createElement('style')).textContent = "@import url('".concat(window.location.protocol, "//").concat(window.location.host, "/core-icons/import.css?v=").concat(Math.floor(Math.random() * 666) + 1);
20
- } else {
21
- document.head.appendChild(document.createElement('style')).textContent = "@import url('https://sharedassets.".concat(host, "/core-icons/import.css?v=").concat(Math.floor(Math.random() * 666) + 1);
22
- }
23
- function Icon(_ref) {
24
- let {
25
- type,
26
- disabled,
27
- className,
28
- isFilled,
29
- ...restProps
30
- } = _ref;
31
- return /*#__PURE__*/React__default.createElement("i", _extends({}, restProps, {
32
- className: classnames('icon', className, {
33
- [type]: !!type,
34
- disabled
35
- })
36
- }));
37
- }
38
- Icon.propTypes = {
39
- /**
40
- * Type is the exact icon. You can find valid "type" values in the documentation example
41
- */
42
- type: PropTypes.string,
43
- /**
44
- * Additional className
45
- */
46
- className: PropTypes.string,
47
- /**
48
- * Icon disabled state
49
- */
50
- disabled: PropTypes.bool,
51
- /**
52
- * Will fill the icon when set to "true"
53
- */
54
- isFilled: PropTypes.bool
55
- };
56
- Icon.defaultProps = {
57
- disabled: false,
58
- isFilled: false,
59
- type: ''
60
- };
61
-
62
- export { Icon as default };
package/Image/index.js DELETED
@@ -1,45 +0,0 @@
1
- import { _ as __rest } from '../tslib.es6-f211516f.js';
2
- import React__default from 'react';
3
- import { c as classnames } from '../index-031ff73c.js';
4
- import Empty from '../Empty/index.js';
5
- import { T as Tooltip } from '../index-65217440.js';
6
- import Checkbox from '../Checkbox/index.js';
7
- import { s as styleInject } from '../style-inject.es-746bb8ed.js';
8
- import 'react-dom';
9
- import '../GeneUIProvider/index.js';
10
- import '../_rollupPluginBabelHelpers-a83240e1.js';
11
- import 'prop-types';
12
- import '../configs-00612ce0.js';
13
- import '../index-5f37f281.js';
14
- import '../dateValidation-67caec66.js';
15
- import '../_commonjsHelpers-24198af3.js';
16
- import '../checkboxRadioSwitcher-5b69d7bd.js';
17
- import '../guid-8ddf77b3.js';
18
-
19
- var css_248z = "[data-gene-ui-version=\"2.16.3\"] .image-holder{--image-border-radius:1rem;padding:100% 0 0;position:relative;transition:box-shadow .4s;-webkit-user-select:none;user-select:none;width:100%}[data-gene-ui-version=\"2.16.3\"] .image-holder.with-border{--distance:0.8rem;--image-border-radius:0.6rem;border-radius:1rem;box-shadow:inset 0 0 0 1px rgba(var(--background-sc-rgb),.2)}[data-gene-ui-version=\"2.16.3\"] .image-holder.with-border:hover{box-shadow:inset 0 0 0 1px rgba(var(--background-sc-rgb),.5)}[data-gene-ui-version=\"2.16.3\"] .image-holder.with-border.error{box-shadow:inset 0 0 0 1px rgba(var(--danger-rgb),.5)}[data-gene-ui-version=\"2.16.3\"] .image-holder.with-border.error:hover{box-shadow:inset 0 0 0 1px var(--danger)}[data-gene-ui-version=\"2.16.3\"] .image-content{bottom:var(--distance,0);left:var(--distance,0);position:absolute;right:var(--distance,0);top:var(--distance,0)}[data-gene-ui-version=\"2.16.3\"] .image-content img{border-radius:var(--image-border-radius);display:block;height:100%;object-fit:cover;width:100%}[data-gene-ui-version=\"2.16.3\"] .image-label-holder{background:#0003;border-radius:var(--image-border-radius);cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.16.3\"] .image-heading{align-items:center;display:flex;left:0;padding:0 .7rem;position:absolute;top:1.2rem;width:100%}[data-gene-ui-version=\"2.16.3\"] .image-heading>li{margin:0 .5rem}[data-gene-ui-version=\"2.16.3\"] .image-heading>li.image-cra{background:#fff;border-radius:.3rem;flex-shrink:0}[data-gene-ui-version=\"2.16.3\"] .image-heading>li.image-title{color:#fff;flex:auto;font:700 1.2rem/2rem var(--font-family)}[data-gene-ui-version=\"2.16.3\"] .image-actions-holder{align-items:center;background:#0009;border-radius:var(--image-border-radius);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;transition:opacity .4s,visibility .4s;width:100%}[data-gene-ui-version=\"2.16.3\"] .image-holder:not(:hover) .image-actions-holder{opacity:0;visibility:hidden}[data-gene-ui-version=\"2.16.3\"] .image-actions{align-items:center;display:flex}[data-gene-ui-version=\"2.16.3\"] .image-actions>*{box-shadow:inset 0 0 0 5rem #ffffffe6}html:not([dir=rtl]) .image-actions>*+*{margin-left:.5rem}html[dir=rtl] .image-actions>*+*{margin-right:.5rem}[data-gene-ui-version=\"2.16.3\"] .image-empty-state-holder{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}";
20
- styleInject(css_248z);
21
-
22
- const Image = (_a) => {
23
- var { src, withBorder = false, selectMode = false, actions, title, imageProps, checkboxProps, className, isValid = true, tooltipTitle, emptyText = 'No image to display' } = _a, restProps = __rest(_a, ["src", "withBorder", "selectMode", "actions", "title", "imageProps", "checkboxProps", "className", "isValid", "tooltipTitle", "emptyText"]);
24
- return (
25
- /*@ts-ignore */
26
- React__default.createElement(Tooltip, { title: tooltipTitle },
27
- React__default.createElement("div", Object.assign({ className: classnames('image-holder', className, {
28
- 'with-border': withBorder,
29
- error: !isValid
30
- }) }, restProps), src ? (React__default.createElement("div", { className: "image-content" },
31
- React__default.createElement("img", Object.assign({ src: src, alt: title }, imageProps)),
32
- selectMode && (React__default.createElement("label", { className: "image-label-holder" },
33
- React__default.createElement("ul", { className: "image-heading" },
34
- React__default.createElement("li", { className: "image-cra" },
35
- React__default.createElement(Checkbox, Object.assign({ size: "big" }, checkboxProps))),
36
- title && React__default.createElement("li", { className: "image-title ellipsis-text" }, title)))),
37
- actions && !selectMode && (React__default.createElement("div", { className: "image-actions-holder" },
38
- title && (React__default.createElement("ul", { className: "image-heading" },
39
- React__default.createElement("li", { className: "image-title ellipsis-text" }, title))),
40
- React__default.createElement("div", { className: "image-actions" }, actions))))) : (
41
- /*@ts-ignore */
42
- React__default.createElement(Empty, { type: "data", title: emptyText, className: "image-empty-state-holder" })))));
43
- };
44
-
45
- export { Image as default };