@geneui/components 3.0.0-next-06dadf3-29102024 → 3.0.0-next-63cb5e7-01112024

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 (247) hide show
  1. package/Avatar.js +63 -0
  2. package/Divider.js +23 -0
  3. package/{GeneUIProvider/index.js → GeneUIProvider.js} +51 -64
  4. package/HelperText.js +69 -0
  5. package/Info.js +64 -0
  6. package/Label.js +38 -0
  7. package/Loader.js +21 -0
  8. package/Pill.js +64 -0
  9. package/TextLink.js +20 -0
  10. package/{index-c7646e48.js → Tooltip.js} +101 -79
  11. package/{lib → components}/atoms/Avatar/Avatar.d.ts +7 -6
  12. package/components/atoms/Avatar/index.d.ts +1 -0
  13. package/{lib → components}/atoms/Divider/Divider.d.ts +5 -5
  14. package/components/atoms/Divider/index.d.ts +1 -0
  15. package/{lib → components}/atoms/HelperText/HelperText.d.ts +6 -5
  16. package/components/atoms/HelperText/index.d.ts +1 -0
  17. package/{lib → components}/atoms/Info/Info.d.ts +5 -5
  18. package/components/atoms/Info/index.d.ts +1 -0
  19. package/{lib → components}/atoms/Label/Label.d.ts +3 -3
  20. package/components/atoms/Label/index.d.ts +1 -0
  21. package/{lib → components}/atoms/Loader/Loader.d.ts +5 -5
  22. package/components/atoms/Loader/index.d.ts +1 -0
  23. package/{lib → components}/atoms/Pill/Pill.d.ts +7 -6
  24. package/components/atoms/Pill/index.d.ts +1 -0
  25. package/{lib → components}/atoms/TextLink/TextLink.d.ts +5 -5
  26. package/components/atoms/TextLink/index.d.ts +1 -0
  27. package/{lib → components}/molecules/Tooltip/Tooltip.d.ts +26 -21
  28. package/components/molecules/Tooltip/index.d.ts +1 -0
  29. package/components/providers/GeneUIProvider/GeneUIProvider.d.ts +30 -0
  30. package/components/providers/GeneUIProvider/index.d.ts +1 -0
  31. package/hooks/index.d.ts +2 -20
  32. package/hooks/useDebounceCallback/index.d.ts +1 -0
  33. package/hooks/useDebounceCallback/useDebounceCallback.d.ts +2 -0
  34. package/hooks/useEllipsisDetection/index.d.ts +1 -1
  35. package/hooks/useEllipsisDetection/useEllipsisDetection.d.ts +2 -2
  36. package/{index-031ff73c.js → index-ce02421b.js} +4 -4
  37. package/index.d.ts +11 -121
  38. package/index.js +12 -159
  39. package/package.json +24 -43
  40. package/tokens-0abb4e1b.js +6 -0
  41. package/types/index.d.ts +0 -3
  42. package/useEllipsisDetection-46d712b6.js +34 -0
  43. package/ActionableList/index.js +0 -1694
  44. package/AdvancedSearch/index.js +0 -892
  45. package/Alert/index.js +0 -98
  46. package/Avatar/index.js +0 -58
  47. package/Badge/index.js +0 -29
  48. package/Breadcrumb/index.js +0 -130
  49. package/BusyLoader/index.js +0 -31
  50. package/Button/index.js +0 -30
  51. package/Card/index.js +0 -502
  52. package/CardList/index.js +0 -662
  53. package/CellMeasurerCache-26f3693c.js +0 -229
  54. package/Charts/index.js +0 -17662
  55. package/Checkbox/index.js +0 -229
  56. package/CheckboxGroup/index.js +0 -203
  57. package/CheckboxGroupWithSearch/index.js +0 -280
  58. package/Collapse/index.js +0 -195
  59. package/ColorPicker/index.js +0 -210
  60. package/ComboBox/index.js +0 -524
  61. package/Copy/index.js +0 -56
  62. package/Counter/index.js +0 -312
  63. package/DateFilter/index.js +0 -183
  64. package/DatePicker/index.js +0 -1229
  65. package/DatePickerInput/index.js +0 -883
  66. package/Divider/index.js +0 -23
  67. package/Drawer/index.js +0 -261
  68. package/Dropdown/index.js +0 -43
  69. package/Editor/index.js +0 -22975
  70. package/Empty/index.js +0 -76
  71. package/ExtendedInput/index.js +0 -590
  72. package/Form/index.js +0 -85
  73. package/FormContainer/index.js +0 -189
  74. package/FormableCheckbox/index.js +0 -24
  75. package/FormableDatePicker/index.js +0 -43
  76. package/FormableDropdown/index.js +0 -50
  77. package/FormableEditor/index.js +0 -26
  78. package/FormableHOC-85f89a81.js +0 -83
  79. package/FormableMultiSelectDropdown/index.js +0 -50
  80. package/FormableNumberInput/index.js +0 -34
  81. package/FormableRadio/index.js +0 -22
  82. package/FormableSwitcher/index.js +0 -22
  83. package/FormableTextInput/index.js +0 -34
  84. package/FormableUploader/index.js +0 -44
  85. package/Grid/index.js +0 -167
  86. package/HelperText/index.js +0 -86
  87. package/Holder/index.js +0 -261
  88. package/Icon/index.js +0 -62
  89. package/Image/index.js +0 -45
  90. package/ImagePreview/index.js +0 -217
  91. package/Info/index.js +0 -41
  92. package/InfoOutline-dd2e89d9.js +0 -29
  93. package/InteractiveWidget/index.js +0 -78
  94. package/KeyValue/index.js +0 -22
  95. package/Label/index.js +0 -48
  96. package/LinkButton/index.js +0 -34
  97. package/Loader/index.js +0 -23
  98. package/Menu/index.js +0 -281
  99. package/MobileNavigation/index.js +0 -94
  100. package/MobilePopup/index.js +0 -182
  101. package/Modal/index.js +0 -251
  102. package/ModuleTitle/index.js +0 -141
  103. package/NavigationMenu/index.js +0 -222
  104. package/Notification/index.js +0 -120
  105. package/Option/index.js +0 -184
  106. package/Overlay/index.js +0 -187
  107. package/Overspread/index.js +0 -291
  108. package/Pagination/index.js +0 -261
  109. package/Paper/index.js +0 -96
  110. package/Pill/index.js +0 -67
  111. package/Popover/index.js +0 -725
  112. package/PopoverV2/index.js +0 -19
  113. package/Portal/index.js +0 -58
  114. package/Products/index.js +0 -115
  115. package/Profile/index.js +0 -589
  116. package/Progress/index.js +0 -200
  117. package/QRCode/index.js +0 -814
  118. package/Radio/index.js +0 -151
  119. package/RadioGroup/index.js +0 -104
  120. package/Range/index.js +0 -191
  121. package/Rating/index.js +0 -174
  122. package/RichEditor/index.js +0 -13
  123. package/RichEditor-6ca8346f.js +0 -228
  124. package/Scrollbar/index.js +0 -1585
  125. package/Search/index.js +0 -75
  126. package/SearchWithDropdown/index.js +0 -140
  127. package/Section/index.js +0 -61
  128. package/SkeletonLoader/index.js +0 -81
  129. package/Slider/index.js +0 -261
  130. package/Status/index.js +0 -97
  131. package/Steps/index.js +0 -314
  132. package/SuggestionList/index.js +0 -385
  133. package/Switcher/index.js +0 -193
  134. package/Table/index.js +0 -57
  135. package/TableCompositions/index.js +0 -16995
  136. package/Tabs/index.js +0 -235
  137. package/Tag/index.js +0 -102
  138. package/TextLink/index.js +0 -20
  139. package/Textarea/index.js +0 -242
  140. package/Time/index.js +0 -62
  141. package/TimePicker/index.js +0 -575
  142. package/Timeline/index.js +0 -113
  143. package/Title/index.js +0 -65
  144. package/Toaster/index.js +0 -116
  145. package/Tooltip/index.js +0 -6
  146. package/TransferList/index.js +0 -493
  147. package/Uploader/index.js +0 -992
  148. package/ValidatableCheckbox/index.js +0 -123
  149. package/ValidatableDatePicker/index.js +0 -316
  150. package/ValidatableDropdown/index.js +0 -141
  151. package/ValidatableElements/index.js +0 -67
  152. package/ValidatableMultiSelectDropdown/index.js +0 -152
  153. package/ValidatableNumberInput/index.js +0 -204
  154. package/ValidatableRadio/index.js +0 -116
  155. package/ValidatableSwitcher/index.js +0 -93
  156. package/ValidatableTextInput/index.js +0 -167
  157. package/ValidatableTimeInput/index.js +0 -174
  158. package/ValidatableUploader/index.js +0 -98
  159. package/Widget/index.js +0 -225
  160. package/_commonjsHelpers-24198af3.js +0 -35
  161. package/_rollupPluginBabelHelpers-a83240e1.js +0 -11
  162. package/callAfterDelay-7272faca.js +0 -12
  163. package/checkTimeValidation-e56771be.js +0 -16
  164. package/checkboxRadioSwitcher-5b69d7bd.js +0 -4
  165. package/clsx.m-2bb6df4b.js +0 -3
  166. package/config-1053d64d.js +0 -20
  167. package/configs-00612ce0.js +0 -103
  168. package/configs.js +0 -111
  169. package/dateValidation-67caec66.js +0 -225
  170. package/debounce-4419bc2f.js +0 -17
  171. package/guid-8ddf77b3.js +0 -16
  172. package/hooks/useBodyScroll.js +0 -16
  173. package/hooks/useClick.js +0 -18
  174. package/hooks/useClickOutside.js +0 -25
  175. package/hooks/useDebounce.js +0 -28
  176. package/hooks/useDeviceType.js +0 -17
  177. package/hooks/useDidMount.js +0 -15
  178. package/hooks/useForceUpdate.js +0 -8
  179. package/hooks/useHover.js +0 -20
  180. package/hooks/useImgDownload.js +0 -18
  181. package/hooks/useKeyDown.js +0 -21
  182. package/hooks/useMount.js +0 -13
  183. package/hooks/useMutationObserver.js +0 -21
  184. package/hooks/usePrevious.js +0 -10
  185. package/hooks/useThrottle.js +0 -16
  186. package/hooks/useToggle.js +0 -11
  187. package/hooks/useUpdatableRef.js +0 -14
  188. package/hooks/useUpdate.js +0 -10
  189. package/hooks/useWidth.js +0 -16
  190. package/hooks/useWindowSize.js +0 -40
  191. package/index-122432cd.js +0 -270
  192. package/index-262edd7a.js +0 -77
  193. package/index-3188e46e.js +0 -1940
  194. package/index-45eafea6.js +0 -90
  195. package/index-5f37f281.js +0 -168
  196. package/index-ce12e4a9.js +0 -10032
  197. package/index-d0ecb950.js +0 -6483
  198. package/index-fcbae78d.js +0 -4
  199. package/index.mobile.d.ts +0 -14
  200. package/lib/atoms/Avatar/index.d.ts +0 -1
  201. package/lib/atoms/Badge/Badge.d.ts +0 -36
  202. package/lib/atoms/Badge/index.d.ts +0 -1
  203. package/lib/atoms/BusyLoader/BusyLoader.d.ts +0 -32
  204. package/lib/atoms/BusyLoader/BusyLoaderHolderHOC.d.ts +0 -8
  205. package/lib/atoms/BusyLoader/index.d.ts +0 -1
  206. package/lib/atoms/Button/Button.d.ts +0 -70
  207. package/lib/atoms/Button/index.d.ts +0 -1
  208. package/lib/atoms/Divider/index.d.ts +0 -1
  209. package/lib/atoms/Empty/Empty.d.ts +0 -39
  210. package/lib/atoms/Empty/index.d.ts +0 -1
  211. package/lib/atoms/Empty/utils.d.ts +0 -9
  212. package/lib/atoms/HelperText/index.d.ts +0 -1
  213. package/lib/atoms/Image/Image.d.ts +0 -51
  214. package/lib/atoms/Image/index.d.ts +0 -1
  215. package/lib/atoms/ImagePreview/ImagePreview.d.ts +0 -56
  216. package/lib/atoms/ImagePreview/ImagePreviewHOC.d.ts +0 -4
  217. package/lib/atoms/ImagePreview/Magnifier.d.ts +0 -40
  218. package/lib/atoms/ImagePreview/index.d.ts +0 -1
  219. package/lib/atoms/Info/index.d.ts +0 -1
  220. package/lib/atoms/KeyValue/KeyValue.d.ts +0 -29
  221. package/lib/atoms/KeyValue/index.d.ts +0 -1
  222. package/lib/atoms/Label/index.d.ts +0 -1
  223. package/lib/atoms/LinkButton/LinkButton.d.ts +0 -46
  224. package/lib/atoms/LinkButton/index.d.ts +0 -1
  225. package/lib/atoms/Loader/index.d.ts +0 -1
  226. package/lib/atoms/Pill/index.d.ts +0 -1
  227. package/lib/atoms/Rating/DefaultSvg.d.ts +0 -3
  228. package/lib/atoms/Rating/Rating.d.ts +0 -49
  229. package/lib/atoms/Rating/index.d.ts +0 -1
  230. package/lib/atoms/TextLink/index.d.ts +0 -1
  231. package/lib/molecules/Copy/Copy.d.ts +0 -38
  232. package/lib/molecules/Copy/index.d.ts +0 -1
  233. package/lib/molecules/InteractiveWidget/InteractiveWidget.d.ts +0 -70
  234. package/lib/molecules/InteractiveWidget/InteractiveWidgetIcon.d.ts +0 -8
  235. package/lib/molecules/InteractiveWidget/index.d.ts +0 -1
  236. package/lib/molecules/Tooltip/index.d.ts +0 -1
  237. package/lib/providers/GeneUIProvider/GeneUIProvider.d.ts +0 -30
  238. package/lib/providers/GeneUIProvider/index.d.ts +0 -1
  239. package/localization-4ba17032.js +0 -46
  240. package/objectWithoutPropertiesLoose-e1596bdb.js +0 -62
  241. package/rangeAndSlider-740a236c.js +0 -8676
  242. package/react-beautiful-dnd.esm-8c7b5a83.js +0 -10116
  243. package/react-lifecycles-compat.es-6e1f3768.js +0 -158
  244. package/redux-e591c1b8.js +0 -536
  245. package/tokens-8ab1179c.js +0 -6
  246. package/tslib.es6-f211516f.js +0 -35
  247. package/useEllipsisDetection-c1c9ad94.js +0 -38
@@ -1,590 +0,0 @@
1
- import { _ as _extends } from '../_rollupPluginBabelHelpers-a83240e1.js';
2
- import React__default, { forwardRef, useRef, useState, useEffect, useCallback } from 'react';
3
- import { c as classnames } from '../index-031ff73c.js';
4
- import PropTypes from 'prop-types';
5
- import { i as inputConfig, s as screenTypes } from '../configs-00612ce0.js';
6
- import { n as noop, s as stopEvent } from '../index-5f37f281.js';
7
- import useDeviceType from '../hooks/useDeviceType.js';
8
- import { u as useEllipsisDetection } from '../useEllipsisDetection-c1c9ad94.js';
9
- import Icon from '../Icon/index.js';
10
- import SuggestionList from '../SuggestionList/index.js';
11
- import { T as Tooltip } from '../index-c7646e48.js';
12
- import { s as styleInject } from '../style-inject.es-746bb8ed.js';
13
- import '../dateValidation-67caec66.js';
14
- import '../_commonjsHelpers-24198af3.js';
15
- import 'react-dom';
16
- import '../hooks/useWindowSize.js';
17
- import '../hooks/useDebounce.js';
18
- import '../hooks/useKeyDown.js';
19
- import '../hooks/useClickOutside.js';
20
- import '../config-1053d64d.js';
21
- import '../Scrollbar/index.js';
22
- import '../callAfterDelay-7272faca.js';
23
- import '../tslib.es6-f211516f.js';
24
- import '../GeneUIProvider/index.js';
25
-
26
- var css_248z = "[data-gene-ui-version=\"2.16.4\"] .input-holder{--input-message-padding-side:2rem;--input-element-padding-side:0.5rem;--input-element-height:3.6rem;--textarea-height:21.5rem;--number-actions-holder-padding:0 0.5rem;--swap-label-color:inherit;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-width:100%;position:relative;transition:opacity .3s;-webkit-user-select:none;user-select:none}[data-gene-ui-version=\"2.16.4\"] .input-holder.disabled{opacity:.5}[data-gene-ui-version=\"2.16.4\"] .input-holder.read-only{cursor:inherit;-webkit-user-select:text;user-select:text}[data-gene-ui-version=\"2.16.4\"] .input-holder:not(.f-content-size){width:100%}[data-gene-ui-version=\"2.16.4\"] .input-holder.s-big{--input-element-height:4.2rem;--textarea-height:52rem}[data-gene-ui-version=\"2.16.4\"] .input-holder.s-small{--input-element-height:3.2rem;--textarea-height:14.8rem}[data-gene-ui-version=\"2.16.4\"] .input-holder.id-start .validation-icon{margin-inline-end:-.5rem}[data-gene-ui-version=\"2.16.4\"] .input-holder.id-end{--direction:row-reverse}[data-gene-ui-version=\"2.16.4\"] .input-holder.id-end .validation-icon{margin-inline-start:-.5rem}[data-gene-ui-version=\"2.16.4\"] .input-holder.cr-smooth-radius{--input-element-border-radius:0.4rem;--textarea-border-radius:0.4rem}[data-gene-ui-version=\"2.16.4\"] .input-holder .end-add-on{align-items:center;border-radius:0 var(--input-element-border-radius,4.2rem) var(--input-element-border-radius,4.2rem) 0;display:flex;font:600 1.4rem/1.5 var(--font-family);height:var(--input-element-height);justify-content:center;margin:1px 0;margin-inline-end:calc(var(--input-structure-padding, 1.5rem)*-1 + 1px);margin-inline-start:var(--input-structure-padding,1.5rem);padding:0 var(--input-structure-padding,1.5rem);transition:background .3s,border-color .3s,opacity .3s}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-outline{--input-element-border-color:rgba(var(--background-sc-rgb),0.2)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-outline:not(.t-textarea) .end-add-on{background:rgba(var(--background-sc-rgb),.03);border-inline-start:1px solid var(--input-element-border-color,#0000);height:calc(var(--input-element-height) - .2rem)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-outline.read-only{--input-element-border-color:rgba(var(--background-sc-rgb),0.05)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-outline.filled:not(:focus-within){--input-element-border-color:rgba(var(--background-sc-rgb),0.3)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-outline:not(.read-only):focus-within{--input-element-border-color:var(--hero);--swap-label-color:var(--hero)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-minimal{--input-element-background:rgba(var(--background-sc-rgb),0.02)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-minimal.read-only{--input-element-background:rgba(var(--background-sc-rgb),0.01)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-minimal.filled:not(:focus-within),[data-gene-ui-version=\"2.16.4\"] .input-holder.a-minimal:not(.read-only):focus-within{--input-element-background:rgba(var(--background-sc-rgb),0.03)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-minimal.s-small{--input-message-padding-side:0.7rem;--input-element-background:rgba(var(--background-sc-rgb),0.03);--input-element-padding-side:0.3rem;--number-actions-holder-padding:0;--input-structure-padding:0.4rem}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-minimal.s-small.read-only{--input-element-background:rgba(var(--background-sc-rgb),0.01)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-minimal.s-small.filled:not(:focus-within){--input-element-background:rgba(var(--background-sc-rgb),0.03)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-minimal.s-small:not(.read-only):focus-within{--input-element-background:#0000;--input-element-border-color:var(--hero);--swap-label-color:var(--hero)}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-light:not(.read-only):focus-within{--input-element-background:rgba(var(--background-sc-rgb),0.05)}@media (hover:hover){[data-gene-ui-version=\"2.16.4\"] .input-holder.a-light:hover{--input-element-background:rgba(var(--background-sc-rgb),0.05)}}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-light.popover-opened{--input-element-background:rgba(var(--background-sc-rgb),0.05)}[data-gene-ui-version=\"2.16.4\"] .input-holder.error-color,[data-gene-ui-version=\"2.16.4\"] .input-holder.success-color{--input-element-background:#0000!important}[data-gene-ui-version=\"2.16.4\"] .input-holder.error-color{--input-element-border-color:var(--danger)!important}[data-gene-ui-version=\"2.16.4\"] .input-holder.error-color:not(.read-only):focus-within{--swap-label-color:var(--danger)!important}[data-gene-ui-version=\"2.16.4\"] .input-holder.success-color{--input-element-border-color:var(--confirm)!important}[data-gene-ui-version=\"2.16.4\"] .input-holder.success-color:not(.read-only):focus-within{--swap-label-color:var(--confirm)!important}[data-gene-ui-version=\"2.16.4\"] .input-holder.t-textarea .end-add-on{align-self:flex-end}[data-gene-ui-version=\"2.16.4\"] .input-structure{align-items:center;display:flex;flex-direction:var(--direction,row);padding:0 var(--input-structure-padding,1.5rem);position:relative;width:100%}[data-gene-ui-version=\"2.16.4\"] .input-structure>*{flex-shrink:0}[data-gene-ui-version=\"2.16.4\"] .input-structure>:not(label){position:relative;z-index:1}[data-gene-ui-version=\"2.16.4\"] .input-holder.a-minimal.s-small .input-structure>:not(label){margin:0 .3rem}[data-gene-ui-version=\"2.16.4\"] .input-structure>:not(label).bc-icon-clear{border-radius:100%;transition:background .4s,color .4s}@media (hover:hover){[data-gene-ui-version=\"2.16.4\"] .input-structure>:not(label).bc-icon-clear:hover{background:rgba(var(--background-sc-rgb),.03);color:var(--hero)}}[data-gene-ui-version=\"2.16.4\"] .input-structure>label{cursor:inherit;display:block;flex:auto;overflow:hidden}[data-gene-ui-version=\"2.16.4\"] .input-structure .icon{align-items:center;display:flex;justify-content:center;transition:color .3s,background .3s;z-index:10}[data-gene-ui-version=\"2.16.4\"] .input-structure .icon-holder{order:-1;z-index:2}[data-gene-ui-version=\"2.16.4\"] .input-structure .icon-holder-disabled{pointer-events:none}[data-gene-ui-version=\"2.16.4\"] .input-element-back{background:var(--input-element-background,var(--background));border:1px solid var(--input-element-border-color,#0000);border-radius:var(--input-element-border-radius,4.2rem);bottom:0;height:100%;left:0;position:absolute;right:0;top:0;transition:background .3s,border-color .3s,opacity .3s;width:100%}[data-gene-ui-version=\"2.16.4\"] .t-textarea .input-element-back{border-radius:var(--textarea-border-radius,1rem)}[data-gene-ui-version=\"2.16.4\"] .read-only .input-element-back:empty{opacity:0}[data-gene-ui-version=\"2.16.4\"] .fit-content-hack{height:0;opacity:0;overflow:hidden;pointer-events:none}[data-gene-ui-version=\"2.16.4\"] .input-element-relative{position:relative;width:100%;z-index:1}[data-gene-ui-version=\"2.16.4\"] .input-element{color:rgba(var(--background-sc-rgb),.75);font:600 1.4rem var(--font-family);height:var(--input-element-height);overflow:hidden;padding:0 var(--input-element-padding-side);position:relative;resize:none;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap;width:100%}[data-gene-ui-version=\"2.16.4\"] .input-element:-webkit-autofill{-webkit-text-fill-color:var(--background-sc);-webkit-background-clip:text;background-clip:text}[data-gene-ui-version=\"2.16.4\"] .input-element:-webkit-autofill::selection{-webkit-text-fill-color:var(--hero)}[data-gene-ui-version=\"2.16.4\"] .input-element.hide{opacity:0}[data-gene-ui-version=\"2.16.4\"] .input-element::input-placeholder{color:rgba(var(--background-sc-rgb),.375);font-size:1.4rem;font-weight:600;transition:color .15s}[data-gene-ui-version=\"2.16.4\"] .input-element:placeholder{color:rgba(var(--background-sc-rgb),.375);font-size:1.4rem;font-weight:600;transition:color .15s}[data-gene-ui-version=\"2.16.4\"] .input-element::placeholder{color:rgba(var(--background-sc-rgb),.375);font-size:1.4rem;font-weight:600;transition:color .15s}[data-gene-ui-version=\"2.16.4\"] .input-element:input-placeholder{color:rgba(var(--background-sc-rgb),.375);font-size:1.4rem;font-weight:600;transition:color .15s}[data-gene-ui-version=\"2.16.4\"] .input-element.read-only:not(.textarea-element){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-gene-ui-version=\"2.16.4\"] .textarea-element,[data-gene-ui-version=\"2.16.4\"] textarea.input-element{border:1px solid #0000;cursor:auto;height:var(--textarea-height);overflow:auto;padding:1rem var(--input-element-padding-side);padding-right:70px!important;text-overflow:unset;white-space:normal}[data-gene-ui-version=\"2.16.4\"] .textarea-element.read-only,[data-gene-ui-version=\"2.16.4\"] textarea.input-element.read-only{height:auto}[data-gene-ui-version=\"2.16.4\"] .textarea-element::-webkit-scrollbar,[data-gene-ui-version=\"2.16.4\"] textarea.input-element::-webkit-scrollbar{height:1.6rem;width:1.6rem}[data-gene-ui-version=\"2.16.4\"] .textarea-element::-webkit-scrollbar-thumb,[data-gene-ui-version=\"2.16.4\"] textarea.input-element::-webkit-scrollbar-thumb{background:rgba(var(--background-sc-rgb),.05);border:.4rem solid var(--background);border-radius:1.6rem}[data-gene-ui-version=\"2.16.4\"] div.input-element{align-items:center;display:flex;justify-content:flex-start}[data-gene-ui-version=\"2.16.4\"] div.input-element:not([readonly]).placeholder{color:rgba(var(--background-sc-rgb),.375)}[data-gene-ui-version=\"2.16.4\"] div.input-element:not([readonly]).placeholder:focus{color:rgba(var(--background-sc-rgb),0)}[data-gene-ui-version=\"2.16.4\"] .input-element[readonly]{cursor:inherit}[data-gene-ui-version=\"2.16.4\"] .input-element[readonly]::selection{background:#0000;color:inherit}[data-gene-ui-version=\"2.16.4\"] .input-element[type=date],[data-gene-ui-version=\"2.16.4\"] .input-element[type=datetime-local],[data-gene-ui-version=\"2.16.4\"] .input-element[type=time]{line-height:var(--input-element-height)}[data-gene-ui-version=\"2.16.4\"] .input-fake-placeholder{align-items:center;color:rgba(var(--background-sc-rgb),.375);display:flex;font:600 1.4rem/1.8rem var(--font-family);height:100%;left:0;padding:0 var(--input-element-padding-side);pointer-events:none;position:absolute;top:0;transition:opacity .15s;-webkit-user-select:none;user-select:none;width:100%}[data-gene-ui-version=\"2.16.4\"] .input-fake-placeholder.hide{opacity:0}[data-gene-ui-version=\"2.16.4\"] .input-swap-label{display:flex;font:600 1rem/1.8rem var(--font-family);left:0;max-width:100%;padding:0 var(--input-message-padding-side);position:absolute;top:-.9rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;z-index:5}[data-gene-ui-version=\"2.16.4\"] .input-swap-label .icon{font-size:1.8rem;transition:none}[data-gene-ui-version=\"2.16.4\"] .input-swap{max-width:100%;overflow:hidden}[data-gene-ui-version=\"2.16.4\"] .input-swap-animate{align-items:center;background:var(--background);box-shadow:inset 0 -.8rem 0 var(--input-element-background);color:var(--swap-label-color);display:flex;max-width:100%;padding:0 .4rem;transition:transform .3s,opacity .3s .1s,color .3s}[data-gene-ui-version=\"2.16.4\"] .input-swap-animate>*+*{margin-inline-start:.5rem}[data-gene-ui-version=\"2.16.4\"] .input-swap-animate.hide{opacity:0;transform:translateY(100%)}[data-gene-ui-version=\"2.16.4\"] .number-actions-holder{padding:var(--number-actions-holder-padding)}[data-gene-ui-version=\"2.16.4\"] .number-actions-holder>ul{background:var(--background);border:1px solid rgba(var(--background-sc-rgb),.1);border-radius:.7rem;color:inherit;font-size:1rem;width:1.5rem}[data-gene-ui-version=\"2.16.4\"] .number-actions-holder>ul>li{cursor:pointer;transition:color .3s,background .3s,opacity .3s}[data-gene-ui-version=\"2.16.4\"] .number-actions-holder>ul>li:first-child{border-radius:.7rem .7rem 0 0}[data-gene-ui-version=\"2.16.4\"] .number-actions-holder>ul>li:last-child{border-radius:0 0 .7rem .7rem}[data-gene-ui-version=\"2.16.4\"] .number-actions-holder>ul>li.disabled{opacity:.5;pointer-events:none}@media (hover:hover){[data-gene-ui-version=\"2.16.4\"] .number-actions-holder>ul>li:hover{background:rgba(var(--background-sc-rgb),.03);color:var(--hero)}}[data-gene-ui-version=\"2.16.4\"] .information-message{cursor:default;font:600 1.2rem/1.42 var(--font-family);margin:.6rem 0 0;padding:0 var(--input-message-padding-side);width:100%}[data-gene-ui-version=\"2.16.4\"] .information-message:empty{display:none}[data-gene-ui-version=\"2.16.4\"] .input-description{cursor:default;font:600 1.4rem/2rem var(--font-family);margin:1rem 0 0;max-width:100%;opacity:.7}[data-gene-ui-version=\"2.16.4\"] .input-structure~.input-description{padding:0 1rem}[data-gene-ui-version=\"2.16.4\"] .input-title{align-items:center;cursor:default;display:flex;font:600 1.4rem/2rem var(--font-family);margin:0 0 .4rem;max-width:100%;opacity:.5;padding:0 var(--input-message-padding-side)}[data-gene-ui-version=\"2.16.4\"] .input-title>*+*{margin-inline-start:.5rem}";
27
- styleInject(css_248z);
28
-
29
- function replaceBetween(start, end, initial, what) {
30
- return initial.substring(0, start) + what + initial.substring(end);
31
- }
32
- function createCustomInputEvent(ref) {
33
- let value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
34
- const event = new Event('input', {
35
- bubbles: true
36
- });
37
- ref.value = String(value);
38
- ref.dispatchEvent(event);
39
- return event;
40
- }
41
- const ExtendedInput = /*#__PURE__*/forwardRef((props, ref) => {
42
- var _textareaRef$current;
43
- const {
44
- max,
45
- min,
46
- icon,
47
- type,
48
- step,
49
- value,
50
- label,
51
- onBlur,
52
- onFocus,
53
- onClear,
54
- isValid,
55
- onClick,
56
- canClear,
57
- disabled,
58
- onChange,
59
- required,
60
- readOnly,
61
- className,
62
- errorText,
63
- inputSize,
64
- maxLength,
65
- isDropdown,
66
- appearance,
67
- screenType,
68
- placeholder,
69
- flexibility,
70
- description,
71
- onIconClick,
72
- withInfoIcon,
73
- colorOnValid,
74
- defaultValue,
75
- cornerRadius,
76
- showErrorIcon,
77
- clickableIcon,
78
- infoIconTitle,
79
- writeProtected,
80
- showNumberIcon,
81
- itemsDirection,
82
- showIconOnValid,
83
- labelAppearance,
84
- colorBorderOnError,
85
- showRemainingLength,
86
- showErrorWithTooltip,
87
- showClickableTooltipOnError,
88
- startAdornment,
89
- tooltipText,
90
- endAdornment,
91
- suggestionData,
92
- ...restProps
93
- } = props;
94
- const {
95
- isMobile
96
- } = useDeviceType(screenType);
97
- const inputRef = useRef();
98
- const textareaRef = useRef();
99
- const iconRef = useRef();
100
- const [localValue, setLocalValue] = useState(defaultValue);
101
- const [focused, setFocused] = useState(false);
102
- const [isBlurInitiatorIcon, setIsBlurInitiatorIcon] = useState(false);
103
- const isControlled = 'value' in props && typeof value !== 'undefined';
104
- // non strict equality is needed for covering 'undefined' case also
105
- const inputValue = isControlled ? value != null ? value : '' : localValue;
106
- const [isTextTruncated, setIsTextTruncated] = useState(false);
107
- const isTruncated = useEllipsisDetection(inputRef, [inputValue]);
108
- useEffect(() => setIsTextTruncated(isTruncated), [isTruncated]);
109
- useEffect(() => {
110
- isControlled && value && value !== inputValue && setLocalValue(value);
111
- }, [value, isControlled, inputValue]);
112
- const hasError = !isValid;
113
- const showTooltip = tooltipText && isValid ? tooltipText : showErrorWithTooltip && hasError && errorText ? errorText : '';
114
- const handleChange = e => {
115
- const {
116
- value
117
- } = e.target;
118
- !isControlled && setLocalValue(value);
119
- onChange(e);
120
- };
121
- const handleFocus = useCallback(e => {
122
- if (isDropdown && (writeProtected || isMobile)) {
123
- var _inputRef$current;
124
- stopEvent(e, true);
125
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.blur();
126
- } else {
127
- setFocused(true);
128
- onFocus(e);
129
- }
130
- }, [onFocus, isTextTruncated, isMobile, value]);
131
- const handleIconClick = useCallback(e => {
132
- // We will remove this later, when get report who use this
133
- if (clickableIcon) {
134
- onClick(e);
135
- onIconClick(e, isBlurInitiatorIcon);
136
- if (isBlurInitiatorIcon) {
137
- iconRef.current.blur();
138
- setIsBlurInitiatorIcon(false);
139
- }
140
- }
141
- }, [clickableIcon, onClick, onIconClick, isBlurInitiatorIcon]);
142
- const handleBlur = useCallback(e => {
143
- setFocused(false);
144
- setIsBlurInitiatorIcon(iconRef.current === e.relatedTarget);
145
- onBlur(e);
146
- }, [onBlur]);
147
- const handleDropdownIconClick = useCallback(e => {
148
- if (isDropdown) {
149
- onClick(e);
150
- if (!readOnly) {
151
- focused ? inputRef.current.blur() : inputRef.current.focus();
152
- }
153
- }
154
- }, [isDropdown, onClick, focused, inputRef.current]);
155
- const handleStepUp = e => {
156
- const number = Math.floor(inputValue) + step;
157
- const nextValue = number < min ? min : number > max ? max : number;
158
- const event = createCustomInputEvent(inputRef.current, nextValue);
159
- handleChange(event);
160
- };
161
- const handleStepDown = e => {
162
- const number = Math.ceil(inputValue) - step;
163
- const nextValue = number < min ? min : number > max ? max : number;
164
- const event = createCustomInputEvent(inputRef.current, nextValue);
165
- handleChange(event);
166
- };
167
- const handleClear = () => {
168
- const event = createCustomInputEvent(type === 'textarea' ? textareaRef.current : inputRef.current);
169
- handleChange(event);
170
- onClear(event);
171
- };
172
- const handleRef = val => {
173
- if (ref) {
174
- ref.current = val;
175
- }
176
- if (type !== 'textarea') {
177
- inputRef.current = val;
178
- } else {
179
- textareaRef.current = val;
180
- }
181
- };
182
- const fieldStep = type === 'number' ? {
183
- step
184
- } : {};
185
- const numberedValue = Number(inputValue);
186
- const inputLabel = label || placeholder;
187
- const asterisk = required ? '* ' : '';
188
- const inputPlaceholder = !readOnly && placeholder ? "".concat(asterisk).concat(placeholder) : '';
189
- const hasFakePlaceholder = type === 'date' || type === 'time' || type === 'datetime-local';
190
- const sharedProps = {
191
- onClick,
192
- required,
193
- ref: handleRef,
194
- onBlur: handleBlur,
195
- onFocus: handleFocus,
196
- onChange: handleChange,
197
- disabled,
198
- maxLength,
199
- placeholder: inputPlaceholder,
200
- readOnly: readOnly || writeProtected,
201
- className: classnames('input-element', {
202
- 'read-only': readOnly,
203
- placeholder: !inputValue,
204
- 'write-protected': writeProtected,
205
- 'textarea-element': type === 'textarea',
206
- hide: !inputValue && hasFakePlaceholder
207
- }),
208
- ...restProps
209
- };
210
- const onChangeSuggestionData = useCallback(_ref => {
211
- let {
212
- from,
213
- to,
214
- data
215
- } = _ref;
216
- const {
217
- value
218
- } = data;
219
- const input = textareaRef.current;
220
- const lastValue = input.value;
221
- input.value = replaceBetween(from, to, inputValue, value);
222
- const event = new Event('input', {
223
- bubbles: true
224
- });
225
- const tracker = input._valueTracker;
226
- tracker && tracker.setValue(lastValue);
227
- input.dispatchEvent(event);
228
- }, [inputValue]);
229
- const onAddPlaceholder = useCallback(_ref2 => {
230
- let {
231
- from,
232
- to,
233
- data
234
- } = _ref2;
235
- const {
236
- value
237
- } = data;
238
- textareaRef.current.value = replaceBetween(from, to, inputValue, value);
239
- }, [inputValue]);
240
- const maxMinValidator = useCallback((num, type) => disabled || (num === null || num === void 0 ? void 0 : num.toString().length) && (Math.ceil(num) === 0 || Math.ceil(num)) && (type === 'max' ? numberedValue >= num : numberedValue <= num), [max, min, numberedValue]);
241
- return /*#__PURE__*/React__default.createElement(Tooltip, {
242
- position: "bottom",
243
- title: showTooltip,
244
- isVisible: !!showTooltip
245
- }, /*#__PURE__*/React__default.createElement("div", {
246
- className: classnames('input-holder', "a-".concat(appearance), "s-".concat(inputSize), "id-".concat(itemsDirection), "f-".concat(flexibility), "cr-".concat(cornerRadius), "t-".concat(type), className, {
247
- disabled,
248
- 'read-only': readOnly,
249
- 'error-color': hasError && colorBorderOnError,
250
- 'success-color': isValid && colorOnValid,
251
- filled: inputValue
252
- })
253
- }, type === 'textarea' && !readOnly && !isDropdown && !isMobile && suggestionData && Array.isArray(suggestionData) && /*#__PURE__*/React__default.createElement(SuggestionList, {
254
- elemRef: textareaRef,
255
- onChange: onChangeSuggestionData,
256
- onHover: onAddPlaceholder,
257
- data: suggestionData
258
- }), labelAppearance === inputConfig.labelAppearance[1] && /*#__PURE__*/React__default.createElement("div", {
259
- className: "input-title ellipsis-text"
260
- }, /*#__PURE__*/React__default.createElement(Tooltip, {
261
- position: "auto",
262
- title: "".concat(asterisk, " ").concat(inputLabel)
263
- }, /*#__PURE__*/React__default.createElement("span", {
264
- className: "ellipsis-text"
265
- }, asterisk, " ", inputLabel)), withInfoIcon && /*#__PURE__*/React__default.createElement(Tooltip, {
266
- position: "auto",
267
- title: infoIconTitle
268
- }, /*#__PURE__*/React__default.createElement(Icon, {
269
- type: "bc-icon-info"
270
- }))), /*#__PURE__*/React__default.createElement("div", {
271
- className: "input-structure"
272
- }, startAdornment, icon && /*#__PURE__*/React__default.createElement("span", {
273
- ref: iconRef,
274
- tabIndex: "0",
275
- className: classnames('icon-holder', {
276
- 'icon-holder-disabled': disabled
277
- })
278
- }, /*#__PURE__*/React__default.createElement(Icon, {
279
- type: icon,
280
- onClick: handleIconClick,
281
- onMouseDown: handleDropdownIconClick
282
- })), /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement("div", {
283
- className: "input-element-relative"
284
- }, readOnly || isDropdown && isMobile ? /*#__PURE__*/React__default.createElement("div", sharedProps, /*#__PURE__*/React__default.createElement("div", {
285
- className: type === 'textarea' ? 'textarea-element-content' : 'ellipsis-text'
286
- }, typeof inputValue === 'number' ? inputValue : inputValue || inputPlaceholder)) : type !== 'textarea' ? /*#__PURE__*/React__default.createElement("input", _extends({}, sharedProps, fieldStep, {
287
- max: max,
288
- min: min,
289
- type: type,
290
- size: flexibility === 'content-size' ? 1 : null,
291
- value: inputValue
292
- })) : /*#__PURE__*/React__default.createElement("textarea", _extends({}, sharedProps, {
293
- value: (_textareaRef$current = textareaRef.current) !== null && _textareaRef$current !== void 0 && _textareaRef$current.isSuggestionListOpen ? textareaRef.current.value : inputValue
294
- })), hasFakePlaceholder && /*#__PURE__*/React__default.createElement("div", {
295
- className: classnames('input-fake-placeholder', {
296
- hide: inputValue
297
- })
298
- }, inputPlaceholder && /*#__PURE__*/React__default.createElement("div", {
299
- className: "ellipsis-text"
300
- }, inputPlaceholder))), flexibility === 'content-size' && /*#__PURE__*/React__default.createElement("div", {
301
- className: "fit-content-hack"
302
- }, /*#__PURE__*/React__default.createElement("div", {
303
- className: "input-element"
304
- }, asterisk, " ", placeholder.length > "".concat(inputValue).length ? placeholder : inputValue)), /*#__PURE__*/React__default.createElement("div", {
305
- className: "input-element-back"
306
- }, labelAppearance === inputConfig.labelAppearance[2] && /*#__PURE__*/React__default.createElement("div", {
307
- className: "input-swap-label"
308
- }, /*#__PURE__*/React__default.createElement("div", {
309
- className: "input-swap"
310
- }, /*#__PURE__*/React__default.createElement("div", {
311
- className: classnames('input-swap-animate ellipsis-text', {
312
- hide: !inputValue && inputValue !== 0
313
- })
314
- }, /*#__PURE__*/React__default.createElement("span", {
315
- className: "ellipsis-text"
316
- }, asterisk, " ", inputLabel), withInfoIcon && /*#__PURE__*/React__default.createElement(Tooltip, {
317
- position: "auto",
318
- title: infoIconTitle
319
- }, /*#__PURE__*/React__default.createElement(Icon, {
320
- type: "bc-icon-info"
321
- }))))))), canClear && !!inputValue && !readOnly && /*#__PURE__*/React__default.createElement(Icon, {
322
- type: "bc-icon-clear",
323
- disabled: disabled,
324
- onClick: handleClear,
325
- className: "cursor-pointer"
326
- }), isDropdown && /*#__PURE__*/React__default.createElement(Icon, {
327
- type: "bc-icon-arrow-down",
328
- onMouseDown: handleDropdownIconClick
329
- }), type === 'number' && showNumberIcon && !readOnly && /*#__PURE__*/React__default.createElement("div", {
330
- className: "number-actions-holder"
331
- }, /*#__PURE__*/React__default.createElement("ul", null, /*#__PURE__*/React__default.createElement("li", {
332
- className: classnames('number-action', 'bc-icon-input-number-up', {
333
- disabled: maxMinValidator(max, 'max')
334
- }),
335
- onClick: handleStepUp
336
- }), /*#__PURE__*/React__default.createElement("li", {
337
- className: classnames('number-action', 'bc-icon-input-number-down', {
338
- disabled: maxMinValidator(min, 'min')
339
- }),
340
- onClick: handleStepDown
341
- }))), hasError && showErrorIcon && /*#__PURE__*/React__default.createElement(Icon, {
342
- className: "validation-icon pointer-events-none color-danger",
343
- type: "bc-icon-error-info"
344
- }), isValid && showIconOnValid && /*#__PURE__*/React__default.createElement(Icon, {
345
- className: "validation-icon pointer-events-none color-confirm",
346
- type: "bc-icon-validated"
347
- }), showRemainingLength && !!maxLength && /*#__PURE__*/React__default.createElement("div", {
348
- className: "end-add-on"
349
- }, maxLength - "".concat(inputValue).length), endAdornment), !showErrorWithTooltip && hasError && errorText && /*#__PURE__*/React__default.createElement("div", {
350
- className: "information-message color-danger"
351
- }, errorText), description && /*#__PURE__*/React__default.createElement("div", {
352
- className: "input-description"
353
- }, description)));
354
- });
355
- ExtendedInput.propTypes = {
356
- /**
357
- * Additional className
358
- */
359
- className: PropTypes.string,
360
- /**
361
- * Control ExtendedInput disabled state with this prop
362
- */
363
- disabled: PropTypes.bool,
364
- /**
365
- * Borders will be colored on when "isValid" and this props are set to "true"
366
- */
367
- colorBorderOnError: PropTypes.bool,
368
- /**
369
- * Shows an icon to clear ExtendedInput's value when set to "true"
370
- */
371
- showClearIcon: PropTypes.bool,
372
- /**
373
- * Use this props in combo with "icon" prop. This will fire on icon click when set to "true"
374
- */
375
- clickableIcon: PropTypes.bool,
376
- /**
377
- * Shows an error icon when "isValid" is set to "false" and this prop is set to "true"
378
- */
379
- showErrorIcon: PropTypes.bool,
380
- /**
381
- * Shows an "Icon" for number inputs, when "type" is set to "number" and this prop is et to "true"
382
- */
383
- showNumberIcon: PropTypes.bool,
384
- /**
385
- *.
386
- */
387
- showClickableTooltipOnError: PropTypes.bool,
388
- /**
389
- * ExtendedInput borders are colored when "isValid" and this props are set to "true"
390
- */
391
- colorOnValid: PropTypes.bool,
392
- /**
393
- * ExtendedInput will display an icon when "isValid" and this props are set to "true"
394
- */
395
- showIconOnValid: PropTypes.bool,
396
- /**
397
- * Shows the "errorText" value in "Tooltip" when set to "true"
398
- */
399
- showErrorWithTooltip: PropTypes.bool,
400
- /**
401
- * Control ExtendedInput validation. For more info see "ValidatableNumberInput", "ValidatableTextInput"(integrated ExtendedInputs with "Form" organism).
402
- */
403
- isValid: PropTypes.bool,
404
- /**
405
- * Use this prop to specify error message. This will be displayed when "isValid" is set to "false"
406
- */
407
- errorText: PropTypes.string,
408
- /**
409
- * Use this prop to specify tooltip message.
410
- */
411
- tooltipText: PropTypes.string,
412
- /**
413
- * Specify increment or decrement value, when arrow up or down are clicked
414
- */
415
- step: PropTypes.number,
416
- /**
417
- * Valid values are same as "Icon" type
418
- */
419
- icon: PropTypes.string,
420
- /**
421
- * ExtendedInput placeholder
422
- */
423
- placeholder: PropTypes.string,
424
- /**
425
- * Control items direction
426
- */
427
- itemsDirection: PropTypes.oneOf(inputConfig.itemsDirection),
428
- /**
429
- * Use this prop to control ExtendedInput state. Note that when you specify this prop, the ExtendedInput will not functionate itself
430
- */
431
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
432
- /**
433
- * ExtendedInput type
434
- */
435
- type: PropTypes.oneOf(inputConfig.type).isRequired,
436
- /**
437
- * ExtendedInput appearance
438
- */
439
- appearance: PropTypes.oneOf(inputConfig.appearance),
440
- /**
441
- * ExtendedInput size
442
- */
443
- inputSize: PropTypes.oneOf(inputConfig.size),
444
- /**
445
- * ExtendedInput corner radius
446
- */
447
- cornerRadius: PropTypes.oneOf(inputConfig.cornerRadius),
448
- /**
449
- * Will make ExtendedInput readonly when set to "true"
450
- */
451
- readOnly: PropTypes.bool,
452
- /**
453
- * How to display inscription in relation to it's parent in ExtendedInput
454
- */
455
- flexibility: PropTypes.oneOf(inputConfig.flexibility),
456
- /**
457
- * This prop will only applied once as defaultState for "value" when ExtendedInput mounts.
458
- * Note that specifying this prop is not mean controlling it.
459
- */
460
- defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
461
- /**
462
- * Shows an "Icon" to remove ExtendedInput's value
463
- */
464
- canClear: PropTypes.bool,
465
- /**
466
- * Fires an event on clear "Icon" click((element: Element) => void)
467
- */
468
- onClear: PropTypes.func,
469
- /**
470
- * Fires an event on ExtendedInput change((event: Event) => void)
471
- */
472
- onChange: PropTypes.func,
473
- /**
474
- * Specify a label for ExtendedInput
475
- */
476
- label: PropTypes.string,
477
- /**
478
- * Specify a "label" appearance
479
- */
480
- labelAppearance: PropTypes.oneOf(inputConfig.labelAppearance),
481
- /**
482
- * Will add an additional description field
483
- */
484
- description: PropTypes.node,
485
- /**
486
- * Property is needed for "Dropdown" organism usage
487
- */
488
- isDropdown: PropTypes.bool,
489
- /**
490
- * Fires an event on ExtendInput <input /> click((event: Event => void))
491
- */
492
- onClick: PropTypes.func,
493
- /**
494
- * Typing will be blocked when set to "true". Note design is different from "readonly" prop's design
495
- */
496
- writeProtected: PropTypes.bool,
497
- /**
498
- * Input field maximum value
499
- */
500
- max: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
501
- /**
502
- * Input field minimum value
503
- */
504
- min: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
505
- /**
506
- * Callback fires when input is focused
507
- */
508
- onFocus: PropTypes.func,
509
- /**
510
- * Callback fires when input loose focus
511
- */
512
- onBlur: PropTypes.func,
513
- /**
514
- * Callback fires when clicked the icon </br>
515
- * as a first parameter passed native event </br>
516
- * as a second parameter passed is blur function </br>
517
- * initiated by icon click
518
- */
519
- onIconClick: PropTypes.func,
520
- /**
521
- * Define is input required or no.
522
- */
523
- required: PropTypes.bool,
524
- /**
525
- * The switch between mobile and desktop version
526
- */
527
- screenType: PropTypes.oneOf(screenTypes),
528
- /**
529
- * Define is need input info icon required.
530
- */
531
- withInfoIcon: PropTypes.bool,
532
- /**
533
- * ExtendedInput info icon title.
534
- */
535
- infoIconTitle: PropTypes.string,
536
- /**
537
- * Max Length of input Value
538
- */
539
- maxLength: PropTypes.number,
540
- /**
541
- * Show Remaining Length of input value, works only with maxLength
542
- */
543
- showRemainingLength: PropTypes.bool,
544
- /**
545
- * Decoration that can be added to the inner input field at the start
546
- */
547
- startAdornment: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.number, PropTypes.node]),
548
- /**
549
- * Decoration that can be added to the inner input field at the end
550
- */
551
- endAdornment: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.number, PropTypes.node])
552
- };
553
- ExtendedInput.defaultProps = {
554
- step: 1,
555
- placeholder: '',
556
- itemsDirection: inputConfig.itemsDirection[0],
557
- type: inputConfig.type[0],
558
- appearance: inputConfig.appearance[0],
559
- inputSize: inputConfig.size[1],
560
- cornerRadius: inputConfig.cornerRadius[0],
561
- clickableIcon: false,
562
- readOnly: false,
563
- flexibility: inputConfig.flexibility[0],
564
- colorBorderOnError: true,
565
- showErrorIcon: false,
566
- showNumberIcon: true,
567
- showClickableTooltipOnError: true,
568
- showErrorWithTooltip: false,
569
- colorOnValid: false,
570
- showIconOnValid: false,
571
- canClear: false,
572
- isValid: true,
573
- onChange: noop,
574
- onClick: noop,
575
- onClear: noop,
576
- onFocus: noop,
577
- onBlur: noop,
578
- onIconClick: noop,
579
- withInfoIcon: false,
580
- infoIconTitle: '',
581
- label: '',
582
- labelAppearance: inputConfig.labelAppearance[0],
583
- description: '',
584
- isDropdown: false,
585
- writeProtected: false,
586
- defaultValue: '',
587
- screenType: screenTypes[0]
588
- };
589
-
590
- export { ExtendedInput as default };