fui-material 0.2.60 → 0.2.62

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 (282) hide show
  1. package/dist/bundle.css +1980 -0
  2. package/dist/bundle.esm.css +1980 -0
  3. package/dist/bundle.esm.js +1341 -0
  4. package/dist/bundle.js +1398 -0
  5. package/dist/function-elements/fAlert/fAlert.d.ts +8 -0
  6. package/dist/function-elements/fAlert/index.d.ts +1 -0
  7. package/dist/function-elements/fConfirm/fConfirm.d.ts +7 -0
  8. package/dist/function-elements/fConfirm/index.d.ts +1 -0
  9. package/dist/function-elements/fPrompt/fPrompt.d.ts +8 -0
  10. package/dist/function-elements/fPrompt/index.d.ts +1 -0
  11. package/dist/function-elements/index.d.ts +3 -0
  12. package/dist/icons/FArrowIcon/FArrowIcon.d.ts +13 -0
  13. package/dist/icons/FArrowIcon/index.d.ts +1 -0
  14. package/dist/icons/FCheckIcon/FCheckIcon.d.ts +12 -0
  15. package/dist/icons/FCheckIcon/index.d.ts +1 -0
  16. package/dist/icons/FCloseIcon/FCloseIcon.d.ts +12 -0
  17. package/dist/icons/FCloseIcon/index.d.ts +1 -0
  18. package/dist/icons/FCopyAddIcon/FCopyAdd.d.ts +12 -0
  19. package/dist/icons/FDownloadIcon/FDownloadIcon.d.ts +11 -0
  20. package/dist/icons/FDownloadIcon/index.d.ts +1 -0
  21. package/dist/icons/FFilterIcon/FFilterIcon.d.ts +11 -0
  22. package/dist/icons/FFilterIcon/index.d.ts +1 -0
  23. package/dist/icons/FListIcon/FListIcon.d.ts +12 -0
  24. package/dist/icons/FListIcon/index.d.ts +1 -0
  25. package/dist/icons/FLoadIcon/FLoadIcon.d.ts +12 -0
  26. package/dist/icons/FLoadIcon/index.d.ts +1 -0
  27. package/dist/icons/FPenIcon/FPenIcon.d.ts +12 -0
  28. package/dist/icons/FPenIcon/index.d.ts +1 -0
  29. package/dist/icons/FPlusIcon/FPlusIcon.d.ts +12 -0
  30. package/dist/icons/FPlusIcon/index.d.ts +1 -0
  31. package/dist/icons/FTrashIcon/FTrashIcon.d.ts +12 -0
  32. package/dist/icons/FTrashIcon/index.d.ts +1 -0
  33. package/dist/icons/FUnlinkIcon/FUnlinkIcon.d.ts +12 -0
  34. package/dist/icons/index.d.ts +12 -0
  35. package/dist/material/Dialog/FDialog/FDialog.d.ts +14 -0
  36. package/dist/material/Dialog/FDialog/index.d.ts +1 -0
  37. package/dist/material/Dialog/FDialogBody/FDialogBody.d.ts +8 -0
  38. package/dist/material/Dialog/FDialogBody/index.d.ts +1 -0
  39. package/dist/material/Dialog/FDialogFooter/FDialogFooter.d.ts +6 -0
  40. package/dist/material/Dialog/FDialogFooter/index.d.ts +1 -0
  41. package/dist/material/Dialog/FDialogHeader/FDialogHeader.d.ts +7 -0
  42. package/dist/material/Dialog/FDialogHeader/index.d.ts +1 -0
  43. package/dist/material/Dropdown/FDropdown/FDropdown.d.ts +15 -0
  44. package/dist/material/Dropdown/FDropdownItem/FDropdownItem.d.ts +11 -0
  45. package/dist/material/FAccordion/FAccordion.d.ts +13 -0
  46. package/dist/material/FAccordion/index.d.ts +1 -0
  47. package/dist/material/FAlert/FAlert.d.ts +18 -0
  48. package/dist/material/FAlert/index.d.ts +1 -0
  49. package/dist/material/FButton/FButton.d.ts +18 -0
  50. package/dist/material/FButton/index.d.ts +1 -0
  51. package/dist/material/FButtonFile/FButtonFile.d.ts +21 -0
  52. package/dist/material/FButtonFile/index.d.ts +1 -0
  53. package/dist/material/FCheckbox/FCheckbox.d.ts +14 -0
  54. package/dist/material/FCheckbox/index.d.ts +1 -0
  55. package/dist/material/FContainer/FContainer.d.ts +11 -0
  56. package/dist/material/FContainer/index.d.ts +1 -0
  57. package/dist/material/FFile/FFile.d.ts +10 -0
  58. package/dist/material/FFile/index.d.ts +1 -0
  59. package/dist/material/FFullDateField/FFullDateField.d.ts +24 -0
  60. package/dist/material/FFullDateField/index.d.ts +1 -0
  61. package/dist/material/FGrid/FGrid.d.ts +17 -0
  62. package/dist/material/FGrid/index.d.ts +1 -0
  63. package/dist/material/FInputFileForm/FInputFileForm.d.ts +20 -0
  64. package/dist/material/FInputFileForm/index.d.ts +1 -0
  65. package/dist/material/FNative/FNative.d.ts +19 -0
  66. package/dist/material/FNative/index.d.ts +1 -0
  67. package/dist/material/FOpenImgFull/FOpenImgFull.d.ts +14 -0
  68. package/dist/material/FOpenImgFull/index.d.ts +1 -0
  69. package/dist/material/FPagination/FPagination.d.ts +14 -0
  70. package/dist/material/FPagination/hooks/usePagination.d.ts +9 -0
  71. package/dist/material/FPagination/index.d.ts +1 -0
  72. package/dist/material/FPaper/FPaper.d.ts +18 -0
  73. package/dist/material/FPaper/index.d.ts +1 -0
  74. package/dist/material/FPreloader/FPreloader.d.ts +10 -0
  75. package/dist/material/FPreloader/index.d.ts +1 -0
  76. package/dist/material/FProgress/FProgress.d.ts +8 -0
  77. package/dist/material/FProgress/index.d.ts +1 -0
  78. package/dist/material/FRadioButton/FRadioButton.d.ts +13 -0
  79. package/dist/material/FRadioButton/index.d.ts +1 -0
  80. package/dist/material/FSearchBox/FSearchBox.d.ts +32 -0
  81. package/dist/material/FSelectSearchDb/FSelectSearchDb.d.ts +21 -0
  82. package/dist/material/FSelectSearchDb/index.d.ts +1 -0
  83. package/dist/material/FStack/FStack.d.ts +14 -0
  84. package/dist/material/FStack/index.d.ts +1 -0
  85. package/dist/material/FTextArea/FTextArea.d.ts +23 -0
  86. package/dist/material/FTextArea/index.d.ts +1 -0
  87. package/dist/material/FTextField/FTextField.d.ts +26 -0
  88. package/dist/material/FTextField/index.d.ts +1 -0
  89. package/dist/material/FTimelineComponents/FTimeline/FTimeline.d.ts +10 -0
  90. package/dist/material/FTimelineComponents/FTimeline/index.d.ts +1 -0
  91. package/dist/material/FTimelineComponents/FTimelineCard/FTimelineCard.d.ts +10 -0
  92. package/dist/material/FTimelineComponents/FTimelineCard/index.d.ts +1 -0
  93. package/dist/material/SelectComponents/FSelect/FSelect.d.ts +21 -0
  94. package/dist/material/SelectComponents/FSelect/index.d.ts +1 -0
  95. package/dist/material/SelectComponents/FSelectItem/FSelectItem.d.ts +13 -0
  96. package/dist/material/SelectComponents/FSelectItem/index.d.ts +1 -0
  97. package/dist/material/TableComponents/FTable/FTable.d.ts +12 -0
  98. package/dist/material/TableComponents/FTable/index.d.ts +1 -0
  99. package/dist/material/TableComponents/FTableBody/FTableBody.d.ts +10 -0
  100. package/dist/material/TableComponents/FTableBody/index.d.ts +1 -0
  101. package/dist/material/TableComponents/FTableDataCell/FTableDataCell.d.ts +14 -0
  102. package/dist/material/TableComponents/FTableDataCell/index.d.ts +1 -0
  103. package/dist/material/TableComponents/FTableFooter/FTableFooter.d.ts +10 -0
  104. package/dist/material/TableComponents/FTableFooter/index.d.ts +1 -0
  105. package/dist/material/TableComponents/FTableHead/FTableHead.d.ts +10 -0
  106. package/dist/material/TableComponents/FTableHead/index.d.ts +1 -0
  107. package/dist/material/TableComponents/FTableHeaderCell/FTableHeaderCell.d.ts +12 -0
  108. package/dist/material/TableComponents/FTableHeaderCell/index.d.ts +1 -0
  109. package/dist/material/TableComponents/FTableRow/FTableRow.d.ts +10 -0
  110. package/dist/material/TableComponents/FTableRow/index.d.ts +1 -0
  111. package/dist/material/Tabs/FTab/FTab.d.ts +13 -0
  112. package/dist/material/Tabs/FTabs/FTabs.d.ts +10 -0
  113. package/dist/material/index.d.ts +41 -0
  114. package/package.json +10 -3
  115. package/.storybook/main.ts +0 -19
  116. package/.storybook/preview.ts +0 -15
  117. package/bun.lockb +0 -0
  118. package/public/favicon.ico +0 -0
  119. package/public/index.html +0 -43
  120. package/public/logo192.png +0 -0
  121. package/public/logo512.png +0 -0
  122. package/public/manifest.json +0 -25
  123. package/public/robots.txt +0 -3
  124. package/rollup.config.js +0 -33
  125. package/src/function-elements/fAlert/fAlert.css +0 -99
  126. package/src/function-elements/fAlert/fAlert.ts +0 -66
  127. package/src/function-elements/fAlert/index.tsx +0 -1
  128. package/src/function-elements/fConfirm/fConfirm.css +0 -80
  129. package/src/function-elements/fConfirm/fConfirm.ts +0 -66
  130. package/src/function-elements/fConfirm/index.tsx +0 -1
  131. package/src/function-elements/fPrompt/fPrompt.css +0 -85
  132. package/src/function-elements/fPrompt/fPrompt.ts +0 -77
  133. package/src/function-elements/fPrompt/index.tsx +0 -1
  134. package/src/function-elements/index.ts +0 -3
  135. package/src/icons/FArrowIcon/FArrowIcon.tsx +0 -50
  136. package/src/icons/FArrowIcon/index.ts +0 -1
  137. package/src/icons/FCheckIcon/FCheckIcon.tsx +0 -37
  138. package/src/icons/FCheckIcon/index.ts +0 -1
  139. package/src/icons/FCloseIcon/FCloseIcon.tsx +0 -28
  140. package/src/icons/FCloseIcon/index.ts +0 -1
  141. package/src/icons/FCopyAddIcon/FCopyAdd.tsx +0 -30
  142. package/src/icons/FDownloadIcon/FDownloadIcon.tsx +0 -29
  143. package/src/icons/FDownloadIcon/index.ts +0 -1
  144. package/src/icons/FFilterIcon/FFilterIcon.tsx +0 -28
  145. package/src/icons/FFilterIcon/index.ts +0 -1
  146. package/src/icons/FListIcon/FListIcon.tsx +0 -38
  147. package/src/icons/FListIcon/index.ts +0 -1
  148. package/src/icons/FLoadIcon/FLoadIcon.tsx +0 -61
  149. package/src/icons/FLoadIcon/FLoadIconCss.css +0 -48
  150. package/src/icons/FLoadIcon/index.ts +0 -1
  151. package/src/icons/FPenIcon/FPenIcon.tsx +0 -29
  152. package/src/icons/FPenIcon/index.ts +0 -1
  153. package/src/icons/FPlusIcon/FPlusIcon.tsx +0 -39
  154. package/src/icons/FPlusIcon/index.ts +0 -1
  155. package/src/icons/FTrashIcon/FTrashIcon.tsx +0 -40
  156. package/src/icons/FTrashIcon/index.ts +0 -1
  157. package/src/icons/FUnlinkIcon/FUnlinkIcon.tsx +0 -38
  158. package/src/icons/index.ts +0 -12
  159. package/src/material/Dialog/FDialog/FDialog.tsx +0 -61
  160. package/src/material/Dialog/FDialog/index.ts +0 -1
  161. package/src/material/Dialog/FDialogBody/FDialogBody.tsx +0 -43
  162. package/src/material/Dialog/FDialogBody/index.ts +0 -1
  163. package/src/material/Dialog/FDialogFooter/FDialogFooter.tsx +0 -26
  164. package/src/material/Dialog/FDialogFooter/index.ts +0 -1
  165. package/src/material/Dialog/FDialogHeader/FDialogHeader.tsx +0 -40
  166. package/src/material/Dialog/FDialogHeader/index.ts +0 -1
  167. package/src/material/Dialog/style/style.css +0 -73
  168. package/src/material/Dropdown/FDropdown/FDropdown.tsx +0 -60
  169. package/src/material/Dropdown/FDropdownItem/FDropdownItem.tsx +0 -35
  170. package/src/material/Dropdown/statick/FDropdown.css +0 -68
  171. package/src/material/Dropdown/statick/down-arrow.png +0 -0
  172. package/src/material/FAccordion/FAccordion.css +0 -80
  173. package/src/material/FAccordion/FAccordion.tsx +0 -37
  174. package/src/material/FAccordion/index.ts +0 -1
  175. package/src/material/FAlert/FAlert.css +0 -153
  176. package/src/material/FAlert/FAlert.tsx +0 -226
  177. package/src/material/FAlert/index.ts +0 -1
  178. package/src/material/FButton/FButton.css +0 -50
  179. package/src/material/FButton/FButton.tsx +0 -69
  180. package/src/material/FButton/index.ts +0 -1
  181. package/src/material/FButtonFile/FButtonFile.css +0 -180
  182. package/src/material/FButtonFile/FButtonFile.tsx +0 -157
  183. package/src/material/FButtonFile/index.ts +0 -1
  184. package/src/material/FCheckbox/Checkbox.css +0 -57
  185. package/src/material/FCheckbox/FCheckbox.tsx +0 -45
  186. package/src/material/FCheckbox/index.ts +0 -1
  187. package/src/material/FContainer/FContainer.css +0 -165
  188. package/src/material/FContainer/FContainer.tsx +0 -33
  189. package/src/material/FContainer/index.ts +0 -1
  190. package/src/material/FFile/FFile.css +0 -0
  191. package/src/material/FFile/FFile.tsx +0 -46
  192. package/src/material/FFile/index.ts +0 -1
  193. package/src/material/FFullDateField/FFullDateField.tsx +0 -137
  194. package/src/material/FFullDateField/index.ts +0 -1
  195. package/src/material/FGrid/FGrid.css +0 -179
  196. package/src/material/FGrid/FGrid.tsx +0 -76
  197. package/src/material/FGrid/css/bootstrap-theme.css +0 -589
  198. package/src/material/FGrid/css/bootstrap-theme.min.css +0 -7
  199. package/src/material/FGrid/css/bootstrap.css +0 -1020
  200. package/src/material/FGrid/css/bootstrap.min.css +0 -7
  201. package/src/material/FGrid/index.ts +0 -1
  202. package/src/material/FInputFileForm/FInputFileForm.css +0 -95
  203. package/src/material/FInputFileForm/FInputFileForm.tsx +0 -147
  204. package/src/material/FInputFileForm/index.ts +0 -1
  205. package/src/material/FNative/FNative.css +0 -41
  206. package/src/material/FNative/FNative.tsx +0 -97
  207. package/src/material/FNative/index.ts +0 -1
  208. package/src/material/FOpenImgFull/FOpenImgFull.css +0 -10
  209. package/src/material/FOpenImgFull/FOpenImgFull.tsx +0 -109
  210. package/src/material/FOpenImgFull/index.ts +0 -1
  211. package/src/material/FOpenImgFull/statick/1.png +0 -0
  212. package/src/material/FOpenImgFull/statick/3.png +0 -0
  213. package/src/material/FOpenImgFull/statick/OKrG1rmJMps.jpg +0 -0
  214. package/src/material/FPagination/FPagination.css +0 -59
  215. package/src/material/FPagination/FPagination.tsx +0 -90
  216. package/src/material/FPagination/hooks/usePagination.tsx +0 -69
  217. package/src/material/FPagination/index.ts +0 -1
  218. package/src/material/FPaper/FPaper.css +0 -61
  219. package/src/material/FPaper/FPaper.tsx +0 -62
  220. package/src/material/FPaper/index.ts +0 -1
  221. package/src/material/FPreloader/FPreloader.css +0 -21
  222. package/src/material/FPreloader/FPreloader.tsx +0 -49
  223. package/src/material/FPreloader/index.ts +0 -1
  224. package/src/material/FProgress/FProgress.css +0 -9
  225. package/src/material/FProgress/FProgress.tsx +0 -41
  226. package/src/material/FProgress/index.ts +0 -1
  227. package/src/material/FRadioButton/FRadioButton.tsx +0 -43
  228. package/src/material/FRadioButton/RadioButton.css +0 -58
  229. package/src/material/FRadioButton/index.ts +0 -1
  230. package/src/material/FSearchBox/FSearchBox.css +0 -11
  231. package/src/material/FSearchBox/FSearchBox.tsx +0 -184
  232. package/src/material/FSelectSearchDb/FSelectSearchDb.css +0 -83
  233. package/src/material/FSelectSearchDb/FSelectSearchDb.tsx +0 -196
  234. package/src/material/FSelectSearchDb/index.ts +0 -1
  235. package/src/material/FStack/FStack.css +0 -3
  236. package/src/material/FStack/FStack.tsx +0 -55
  237. package/src/material/FStack/index.ts +0 -1
  238. package/src/material/FTextArea/FTextArea.tsx +0 -124
  239. package/src/material/FTextArea/index.ts +0 -1
  240. package/src/material/FTextField/FTextField.css +0 -95
  241. package/src/material/FTextField/FTextField.tsx +0 -163
  242. package/src/material/FTextField/index.ts +0 -1
  243. package/src/material/FTimelineComponents/FTimeline/FTimeline.css +0 -82
  244. package/src/material/FTimelineComponents/FTimeline/FTimeline.tsx +0 -28
  245. package/src/material/FTimelineComponents/FTimeline/index.ts +0 -1
  246. package/src/material/FTimelineComponents/FTimelineCard/FTimelineCard.tsx +0 -31
  247. package/src/material/FTimelineComponents/FTimelineCard/index.ts +0 -1
  248. package/src/material/SelectComponents/FSelect/FSelect.css +0 -0
  249. package/src/material/SelectComponents/FSelect/FSelect.tsx +0 -121
  250. package/src/material/SelectComponents/FSelect/index.ts +0 -1
  251. package/src/material/SelectComponents/FSelectItem/FSelectItem.tsx +0 -42
  252. package/src/material/SelectComponents/FSelectItem/index.ts +0 -1
  253. package/src/material/TableComponents/FTable/FTable.css +0 -62
  254. package/src/material/TableComponents/FTable/FTable.tsx +0 -39
  255. package/src/material/TableComponents/FTable/index.ts +0 -1
  256. package/src/material/TableComponents/FTableBody/FTableBody.tsx +0 -28
  257. package/src/material/TableComponents/FTableBody/index.ts +0 -1
  258. package/src/material/TableComponents/FTableDataCell/FTableDataCell.tsx +0 -45
  259. package/src/material/TableComponents/FTableDataCell/index.ts +0 -1
  260. package/src/material/TableComponents/FTableFooter/FTableFooter.tsx +0 -29
  261. package/src/material/TableComponents/FTableFooter/index.ts +0 -1
  262. package/src/material/TableComponents/FTableHead/FTableHead.tsx +0 -28
  263. package/src/material/TableComponents/FTableHead/index.ts +0 -1
  264. package/src/material/TableComponents/FTableHeaderCell/FTableHeaderCell.tsx +0 -39
  265. package/src/material/TableComponents/FTableHeaderCell/index.ts +0 -1
  266. package/src/material/TableComponents/FTableRow/FTableRow.tsx +0 -28
  267. package/src/material/TableComponents/FTableRow/index.ts +0 -1
  268. package/src/material/Tabs/FTab/FTab.tsx +0 -39
  269. package/src/material/Tabs/FTabs/FTabs.tsx +0 -27
  270. package/src/material/Tabs/styles/FTabs.css +0 -49
  271. package/src/material/index.ts +0 -60
  272. package/src/material/statick/Colors.css +0 -87
  273. package/src/material/statick/index.css +0 -7
  274. package/tsconfig.json +0 -21
  275. /package/{src/icons/FCopyAddIcon/index.ts → dist/icons/FCopyAddIcon/index.d.ts} +0 -0
  276. /package/{src/icons/FUnlinkIcon/index.ts → dist/icons/FUnlinkIcon/index.d.ts} +0 -0
  277. /package/{src/index.ts → dist/index.d.ts} +0 -0
  278. /package/{src/material/Dropdown/FDropdown/index.ts → dist/material/Dropdown/FDropdown/index.d.ts} +0 -0
  279. /package/{src/material/Dropdown/FDropdownItem/index.ts → dist/material/Dropdown/FDropdownItem/index.d.ts} +0 -0
  280. /package/{src/material/FSearchBox/index.ts → dist/material/FSearchBox/index.d.ts} +0 -0
  281. /package/{src/material/Tabs/FTab/index.ts → dist/material/Tabs/FTab/index.d.ts} +0 -0
  282. /package/{src/material/Tabs/FTabs/index.ts → dist/material/Tabs/FTabs/index.d.ts} +0 -0
@@ -1,184 +0,0 @@
1
- import React, {FC} from "react";
2
- import {FButton, FStack} from "../index";
3
- import './FSearchBox.css'
4
- import '../FTextField/FTextField.css'
5
- import FLoadIcon from "../../icons/FLoadIcon";
6
- import '../statick/index.css'
7
-
8
- export interface IFSearchBox {
9
- label?: string,
10
- st?: React.CSSProperties,
11
- value?: string | number | readonly string[] | undefined,
12
- onChange?: React.ChangeEventHandler<HTMLInputElement> | undefined,
13
- type?: 'text' | 'number' | 'email' | 'tel' | 'password',
14
- onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined,
15
- onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined,
16
- fullWidth?: boolean,
17
- disabled?: boolean,
18
- readOnly?: boolean | undefined,
19
- defaultValue?: string | number | readonly string[] | undefined,
20
- errText?: string[],
21
- helpText?: string,
22
- onInput?: React.FormEventHandler<HTMLInputElement> | undefined,
23
- id?: string,
24
- className?: string,
25
- load?: boolean,
26
- min?: number,
27
- max?: number,
28
- placeholder?: string | undefined,
29
-
30
-
31
- children?: React.ReactChild | React.ReactNode,
32
- variant?: 'contained' | 'default'
33
- color?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link'
34
- onClick?: React.MouseEventHandler<HTMLButtonElement> | undefined
35
- }
36
-
37
- const FSearchBox: FC<IFSearchBox> = ({
38
- label,
39
- value,
40
- onChange,
41
- type,
42
- onBlur,
43
- onFocus,
44
- fullWidth,
45
- disabled,
46
- readOnly,
47
- defaultValue,
48
- errText,
49
- helpText,
50
- onInput,
51
- st,
52
- id,
53
- className,
54
- load = false,
55
- min,
56
- max,
57
- placeholder,
58
-
59
- children,
60
- onClick,
61
- color,
62
- variant
63
- }) => {
64
-
65
- let style = {
66
- whiteSpace: 'nowrap',
67
- overflow: 'hidden',
68
- textOverflow: 'ellipsis',
69
- }
70
- st = Object.assign({}, st, style);
71
-
72
- if (fullWidth) {
73
- if (st === undefined) {
74
- st = {
75
- width: '100%'
76
- }
77
- } else {
78
- st.width = '100%'
79
- }
80
- } else {
81
- if (st === undefined) {
82
- st = {
83
- width: 'fit-content'
84
- }
85
- } else {
86
- st.width = 'fit-content'
87
- }
88
- }
89
-
90
- return (
91
- <React.Fragment>
92
- <div
93
- className={`f-search-box
94
- form-group`} style={st}>
95
- {label &&
96
- <label className="control-label with-offset" style={{
97
- whiteSpace: 'nowrap',
98
- overflow: 'hidden',
99
- textOverflow: 'ellipsis'
100
- }}>
101
- {label}
102
- </label>
103
- }
104
- <div className={'f-search-box-box'}>
105
- <div className={`${load ? 'ui left icon input loading' : ''}`} style={{width: '100%'}}>
106
- <input
107
- id={id}
108
- placeholder={placeholder}
109
- style={{
110
- borderColor: errText !== undefined && errText.length > 0 ? 'red' : '#C4C4C4'
111
- }}
112
- min={min}
113
- max={max}
114
- disabled={disabled}
115
- defaultValue={defaultValue}
116
- required
117
- onInput={onInput}
118
- readOnly={readOnly || load}
119
- value={value}
120
- //@ts-ignore
121
- onChange={onChange}
122
- type={type === undefined ? 'text' : type}
123
- className={`form-control f-search-box-inp ${className !== undefined ? className : ''}`}
124
- onBlur={onBlur}
125
- onFocus={onFocus}
126
- />
127
- {helpText !== undefined &&
128
- <span
129
- style={{
130
- whiteSpace: 'initial',
131
- color: '#a6a3a3',
132
- fontSize: '12px'
133
- }}
134
- >
135
- {helpText}
136
- </span>
137
- }
138
- {errText !== undefined && errText.length > 0 &&
139
- <FStack direction={'column'} st={{paddingLeft: '11px'}}>
140
- {
141
- errText?.map((opt, index) => {
142
- return (
143
- <span
144
- key={index}
145
- style={{
146
- whiteSpace: 'initial',
147
- color: 'red'
148
- }}
149
- >
150
- {opt}
151
- </span>
152
- )
153
- })
154
- }
155
- </FStack>
156
- }
157
- {load &&
158
- <div className={'input-load'}>
159
- <FLoadIcon size={10}/>
160
- </div>
161
- }
162
- </div>
163
- <FButton
164
- st={{
165
- borderTopLeftRadius: '0',
166
- borderBottomLeftRadius: '0',
167
- height: '34px',
168
- whiteSpace: 'nowrap',
169
- textAlign: 'center',
170
- }}
171
- disabled={disabled}
172
- onClick={onClick}
173
- color={color}
174
- variant={variant}
175
- >
176
- {children}
177
- </FButton>
178
- </div>
179
- </div>
180
- </React.Fragment>
181
- )
182
- }
183
-
184
- export default FSearchBox
@@ -1,83 +0,0 @@
1
- .select-search-db {
2
- position: relative;
3
- display: inline-block;
4
- padding-bottom: 16px;
5
- }
6
-
7
- .select-search-db-input-block {
8
- position: relative;
9
- }
10
-
11
- .select-search-db-input-arrow{
12
- position: absolute;
13
- cursor: pointer;
14
- top: 50%;
15
- transform: translateY(-50%);
16
- right: 1em;
17
- }
18
-
19
- .select-search-db-input-load {
20
- position: absolute;
21
- cursor: pointer;
22
- top: 60%;
23
- transform: translateY(-50%);
24
- left: 1em;
25
- }
26
-
27
- .select-search-db-dropdown {
28
- display: none;
29
- flex-direction: column;
30
- position: absolute;
31
- padding: 10px;
32
- box-shadow: 0px 0px 5px rgb(0 0 0 / 20%);
33
- border-radius: 10px;
34
- width: 100%;
35
- z-index: 6;
36
- margin-top: 2px;
37
- opacity: 0;
38
- background-color: white;
39
- overflow-y: auto;
40
- max-height: 300px;
41
- }
42
-
43
- .select-search-db:hover .select-search-db-dropdown {
44
- display: flex;
45
- opacity: 1;
46
- animation: fadeInFromNone 0.3s ease;
47
- }
48
-
49
- .select-search-db-dropdown li {
50
- padding: 8px;
51
- color: #656565;
52
- font-size: 14px;
53
- border-bottom: 1px solid #C4C4C4;
54
- cursor: pointer;
55
- list-style-type: none;
56
- }
57
-
58
- .select-search-db-dropdown li:last-child {
59
- border-bottom: 0;
60
- }
61
-
62
- .select-search-db-dropdown li:hover {
63
- background-color: rgb(47 128 237 / 21%);
64
- }
65
-
66
- @keyframes fadeInFromNone {
67
- 0% {
68
- display: none;
69
- opacity: 0;
70
- }
71
-
72
- 1% {
73
- display: flex;
74
- opacity: 0;
75
- transform: translateY(-10%);
76
- }
77
-
78
- 100% {
79
- display: flex;
80
- opacity: 1;
81
- transform: translateY(0);
82
- }
83
- }
@@ -1,196 +0,0 @@
1
- import React, {FC, useRef, useState} from "react";
2
- import {FStack} from "../index";
3
- import {FArrowIcon} from "../../icons";
4
- import './FSelectSearchDb.css'
5
- import FLoadIcon from "../../icons/FLoadIcon";
6
-
7
- export interface IFSelectSearchDb {
8
- fetchingFunc: (text: string) => Promise<any[]>,
9
- selectedElement: (e: any | undefined) => void,
10
- selectItem: any,
11
- label?: string
12
- st?: React.CSSProperties,
13
- id?: string,
14
- fullWidth?: boolean,
15
- className?: string,
16
- disabled?: boolean
17
- readOnly?: boolean,
18
- errText?: string[],
19
- helpText?: string,
20
- onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined,
21
- onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined,
22
- minLengthText?: number
23
- }
24
-
25
- const FSelectSearchDb: FC<IFSelectSearchDb> = ({
26
- fetchingFunc,
27
- selectedElement,
28
- selectItem,
29
- st,
30
- id,
31
- className,
32
- disabled,
33
- readOnly,
34
- fullWidth,
35
- label,
36
- onBlur,
37
- onFocus,
38
- errText,
39
- helpText,
40
- minLengthText
41
- }) => {
42
-
43
- const [valueInput, setValueInput] = useState<string>('')
44
-
45
- const [arrObject, setArrObject] = useState<any[]>([])
46
-
47
- const timerDebounceRef = useRef<number>();
48
-
49
- const [load, setLoad] = useState<boolean>(false)
50
-
51
- const handlerOnChange = (e: React.ChangeEvent<HTMLInputElement>) => {
52
-
53
- const text = e.target.value
54
-
55
- setValueInput(text)
56
-
57
- if (timerDebounceRef.current) {
58
- clearTimeout(timerDebounceRef.current);
59
- }
60
-
61
- if (text !== '') {
62
- if (minLengthText !== undefined && text.length === minLengthText) {
63
- timerDebounceRef.current = setTimeout(() => {
64
- setLoad(true)
65
- fetchingFunc(e.target.value).then(r => {
66
- setArrObject(r)
67
- setLoad(false)
68
- })
69
- }, 1000);
70
- } else {
71
- timerDebounceRef.current = setTimeout(() => {
72
- setLoad(true)
73
- fetchingFunc(e.target.value).then(r => {
74
- setArrObject(r)
75
- setLoad(false)
76
- })
77
- }, 1000);
78
- }
79
-
80
- } else {
81
- setArrObject([])
82
- setLoad(false)
83
- }
84
-
85
- }
86
-
87
- let style = {
88
- whiteSpace: 'nowrap',
89
- textOverflow: 'ellipsis',
90
- width: 'fit-content'
91
- }
92
-
93
- st = Object.assign({}, st, style);
94
-
95
- if (fullWidth) {
96
- st.width = '100%'
97
- }
98
-
99
- return (
100
- <React.Fragment>
101
- <div
102
- className={`select-search-db ${className !== undefined ? className : ''} ${load ? 'ui left icon input loading' : ''}`}
103
- style={st} id={id}>
104
- {label &&
105
- <label
106
- className="control-label with-offset"
107
- style={{
108
- whiteSpace: 'nowrap',
109
- textOverflow: 'ellipsis'
110
- }}
111
- >
112
- {label}
113
- </label>
114
- }
115
- <div className={'select-search-db-input-block'}>
116
- <input
117
- readOnly={readOnly}
118
- disabled={disabled || load}
119
- required={true}
120
- style={{
121
- borderColor: errText !== undefined && errText.length > 0 ? 'red' : '#C4C4C4'
122
- }}
123
- type={'text'}
124
- className="form-control select-search-db-input"
125
- value={valueInput}
126
- onChange={handlerOnChange}
127
- onFocus={onFocus}
128
- onBlur={onBlur}
129
- />
130
- {(!load && !disabled) &&
131
- <div className={'select-search-db-input-arrow'}>
132
- <FArrowIcon direction={'down'} size={15}/>
133
- </div>
134
- }
135
- {load &&
136
- <div className={'select-search-db-input-load'}>
137
- <FLoadIcon size={10}/>
138
- </div>
139
- }
140
- </div>
141
-
142
- {(!load && arrObject !== undefined && arrObject.length > 0) &&
143
- <div className={'select-search-db-dropdown'}>
144
- <FStack direction={'column'} st={{paddingLeft: '11px'}}>
145
- {arrObject.slice(0, 10).map((opt, index) => (
146
- <li
147
- key={index}
148
- onClick={(e) => {
149
- selectedElement(opt)
150
- //@ts-ignore
151
- setValueInput(e.target.textContent)
152
- }}
153
- >
154
- {selectItem(opt)}
155
- </li>
156
- ))
157
- }
158
- </FStack>
159
- </div>
160
- }
161
- {helpText !== undefined &&
162
- <span
163
- style={{
164
- whiteSpace: 'initial',
165
- color: '#a6a3a3',
166
- fontSize: '12px'
167
- }}
168
- >
169
- {helpText}
170
- </span>
171
- }
172
- {errText !== undefined && errText.length > 0 &&
173
- <FStack direction={'column'} st={{paddingLeft: '11px'}}>
174
- {
175
- errText?.map((opt, index) => {
176
- return (
177
- <span
178
- key={index}
179
- style={{
180
- whiteSpace: 'initial',
181
- color: 'red'
182
- }}
183
- >
184
- {opt}
185
- </span>
186
- )
187
- })
188
- }
189
- </FStack>
190
- }
191
- </div>
192
- </React.Fragment>
193
- )
194
- };
195
-
196
- export default FSelectSearchDb;
@@ -1 +0,0 @@
1
- export { default } from "./FSelectSearchDb";
@@ -1,3 +0,0 @@
1
- .margin-item {
2
- margin: 0 0 0 8px;
3
- }
@@ -1,55 +0,0 @@
1
- import React, {FC} from "react";
2
- import "./FStack.css"
3
-
4
- export interface IFStack {
5
- direction?: 'row' | "row-reverse" | 'column' | "column-reverse",
6
- alignItems?: "flex-start" | "center" | "flex-end" | "stretch" | "baseline",
7
- justifyContent?: "flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly",
8
- spacing?: number,
9
- children?: React.ReactChild | React.ReactNode,
10
- className?: string,
11
- st?: React.CSSProperties,
12
- id?: string
13
- }
14
-
15
- const FStack: FC<IFStack> = ({
16
- children,
17
- alignItems,
18
- justifyContent,
19
- direction = 'column',
20
- spacing = 0,
21
- className,
22
- st,
23
- id
24
- }) => {
25
-
26
- let style: React.CSSProperties = {
27
- gap: `${+spacing * 8}px`,
28
- display: 'flex',
29
- flexDirection: direction,
30
- // @ts-ignore
31
- WebkitBoxPack: justifyContent,
32
- justifyContent: justifyContent,
33
- // @ts-ignore
34
- WebkitBoxAlign: alignItems,
35
- alignItems: alignItems,
36
- }
37
-
38
- if (st !== undefined) {
39
- style = Object.assign(style, st);
40
- }
41
-
42
- return (
43
- <React.Fragment>
44
- <div
45
- className={className}
46
- style={style}
47
- id={id}
48
- >
49
- {children}
50
- </div>
51
- </React.Fragment>
52
- )
53
- }
54
-
55
- export default FStack
@@ -1 +0,0 @@
1
- export { default } from "./FStack";
@@ -1,124 +0,0 @@
1
- import React, {FC} from "react";
2
- import {FStack} from "../index";
3
- import FLoadIcon from "../../icons/FLoadIcon";
4
-
5
- export interface IFTextArea {
6
- label?: string
7
- st?: React.CSSProperties,
8
- value?: string | undefined
9
- cols?: number
10
- rows?: number
11
- placeholder?: string
12
- readOnly?: boolean
13
- disabled?: boolean
14
- autoComplete?: boolean,
15
- className?: string,
16
- id?: string,
17
- fullWidth?: boolean,
18
- onChange?: React.ChangeEventHandler<HTMLTextAreaElement> | undefined,
19
- onClick?: React.MouseEventHandler<HTMLTextAreaElement> | undefined
20
- onFocus?: React.FocusEventHandler<HTMLTextAreaElement> | undefined,
21
- errText?: string[],
22
- helpText?: string,
23
- load?: boolean,
24
- }
25
-
26
- const FTextArea: FC<IFTextArea> = (
27
- {
28
- label,
29
- st,
30
- value,
31
- cols,
32
- rows,
33
- placeholder,
34
- readOnly,
35
- disabled,
36
- autoComplete,
37
- className,
38
- id,
39
- fullWidth,
40
- onChange,
41
- onClick,
42
- onFocus,
43
- errText,
44
- helpText,
45
- load,
46
- }
47
- ) => {
48
-
49
- return (
50
- <React.Fragment>
51
- <div
52
- style={{
53
- width: fullWidth ? '100%' : 'fit-content'
54
- }}
55
- className={`control-group ${className !== undefined ? className : ''}`}
56
- id={id}
57
- >
58
- <div className={`${load ? 'ui left icon input loading' : ''} form-group`} style={st}>
59
- {label &&
60
- <label className="control-label with-offset required">
61
- {label}
62
- </label>
63
- }
64
- <textarea
65
- onClick={onClick}
66
- onFocus={onFocus}
67
- cols={cols}
68
- rows={rows}
69
- style={{
70
- borderColor: errText !== undefined && errText.length > 0 ? 'red' : '#C4C4C4'
71
- }}
72
- disabled={disabled || load}
73
- readOnly={readOnly}
74
- //@ts-ignore
75
- autoComplete={autoComplete}
76
- required
77
- value={load ? undefined : value}
78
- placeholder={placeholder}
79
- className="form-control"
80
- onChange={onChange}
81
- />
82
- {helpText !== undefined &&
83
- <span
84
- style={{
85
- whiteSpace: 'initial',
86
- color: '#a6a3a3',
87
- fontSize: '12px'
88
- }}
89
- >
90
- {helpText}
91
- </span>
92
- }
93
- {errText !== undefined && errText.length > 0 &&
94
- <FStack direction={'column'} st={{paddingLeft: '11px'}}>
95
- {
96
- errText?.map((opt, index) => {
97
- return (
98
- <span
99
- key={index}
100
- style={{
101
- whiteSpace: 'initial',
102
- color: 'red'
103
- }}
104
- >
105
- {opt}
106
- </span>
107
- )
108
- })
109
- }
110
- </FStack>
111
- }
112
- {load &&
113
- <div className={'input-load'}>
114
- <FLoadIcon size={10}/>
115
- </div>
116
- }
117
- </div>
118
- </div>
119
-
120
- </React.Fragment>
121
- )
122
- }
123
-
124
- export default FTextArea;
@@ -1 +0,0 @@
1
- export { default } from "./FTextArea";