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.
- package/dist/bundle.css +1980 -0
- package/dist/bundle.esm.css +1980 -0
- package/dist/bundle.esm.js +1341 -0
- package/dist/bundle.js +1398 -0
- package/dist/function-elements/fAlert/fAlert.d.ts +8 -0
- package/dist/function-elements/fAlert/index.d.ts +1 -0
- package/dist/function-elements/fConfirm/fConfirm.d.ts +7 -0
- package/dist/function-elements/fConfirm/index.d.ts +1 -0
- package/dist/function-elements/fPrompt/fPrompt.d.ts +8 -0
- package/dist/function-elements/fPrompt/index.d.ts +1 -0
- package/dist/function-elements/index.d.ts +3 -0
- package/dist/icons/FArrowIcon/FArrowIcon.d.ts +13 -0
- package/dist/icons/FArrowIcon/index.d.ts +1 -0
- package/dist/icons/FCheckIcon/FCheckIcon.d.ts +12 -0
- package/dist/icons/FCheckIcon/index.d.ts +1 -0
- package/dist/icons/FCloseIcon/FCloseIcon.d.ts +12 -0
- package/dist/icons/FCloseIcon/index.d.ts +1 -0
- package/dist/icons/FCopyAddIcon/FCopyAdd.d.ts +12 -0
- package/dist/icons/FDownloadIcon/FDownloadIcon.d.ts +11 -0
- package/dist/icons/FDownloadIcon/index.d.ts +1 -0
- package/dist/icons/FFilterIcon/FFilterIcon.d.ts +11 -0
- package/dist/icons/FFilterIcon/index.d.ts +1 -0
- package/dist/icons/FListIcon/FListIcon.d.ts +12 -0
- package/dist/icons/FListIcon/index.d.ts +1 -0
- package/dist/icons/FLoadIcon/FLoadIcon.d.ts +12 -0
- package/dist/icons/FLoadIcon/index.d.ts +1 -0
- package/dist/icons/FPenIcon/FPenIcon.d.ts +12 -0
- package/dist/icons/FPenIcon/index.d.ts +1 -0
- package/dist/icons/FPlusIcon/FPlusIcon.d.ts +12 -0
- package/dist/icons/FPlusIcon/index.d.ts +1 -0
- package/dist/icons/FTrashIcon/FTrashIcon.d.ts +12 -0
- package/dist/icons/FTrashIcon/index.d.ts +1 -0
- package/dist/icons/FUnlinkIcon/FUnlinkIcon.d.ts +12 -0
- package/dist/icons/index.d.ts +12 -0
- package/dist/material/Dialog/FDialog/FDialog.d.ts +14 -0
- package/dist/material/Dialog/FDialog/index.d.ts +1 -0
- package/dist/material/Dialog/FDialogBody/FDialogBody.d.ts +8 -0
- package/dist/material/Dialog/FDialogBody/index.d.ts +1 -0
- package/dist/material/Dialog/FDialogFooter/FDialogFooter.d.ts +6 -0
- package/dist/material/Dialog/FDialogFooter/index.d.ts +1 -0
- package/dist/material/Dialog/FDialogHeader/FDialogHeader.d.ts +7 -0
- package/dist/material/Dialog/FDialogHeader/index.d.ts +1 -0
- package/dist/material/Dropdown/FDropdown/FDropdown.d.ts +15 -0
- package/dist/material/Dropdown/FDropdownItem/FDropdownItem.d.ts +11 -0
- package/dist/material/FAccordion/FAccordion.d.ts +13 -0
- package/dist/material/FAccordion/index.d.ts +1 -0
- package/dist/material/FAlert/FAlert.d.ts +18 -0
- package/dist/material/FAlert/index.d.ts +1 -0
- package/dist/material/FButton/FButton.d.ts +18 -0
- package/dist/material/FButton/index.d.ts +1 -0
- package/dist/material/FButtonFile/FButtonFile.d.ts +21 -0
- package/dist/material/FButtonFile/index.d.ts +1 -0
- package/dist/material/FCheckbox/FCheckbox.d.ts +14 -0
- package/dist/material/FCheckbox/index.d.ts +1 -0
- package/dist/material/FContainer/FContainer.d.ts +11 -0
- package/dist/material/FContainer/index.d.ts +1 -0
- package/dist/material/FFile/FFile.d.ts +10 -0
- package/dist/material/FFile/index.d.ts +1 -0
- package/dist/material/FFullDateField/FFullDateField.d.ts +24 -0
- package/dist/material/FFullDateField/index.d.ts +1 -0
- package/dist/material/FGrid/FGrid.d.ts +17 -0
- package/dist/material/FGrid/index.d.ts +1 -0
- package/dist/material/FInputFileForm/FInputFileForm.d.ts +20 -0
- package/dist/material/FInputFileForm/index.d.ts +1 -0
- package/dist/material/FNative/FNative.d.ts +19 -0
- package/dist/material/FNative/index.d.ts +1 -0
- package/dist/material/FOpenImgFull/FOpenImgFull.d.ts +14 -0
- package/dist/material/FOpenImgFull/index.d.ts +1 -0
- package/dist/material/FPagination/FPagination.d.ts +14 -0
- package/dist/material/FPagination/hooks/usePagination.d.ts +9 -0
- package/dist/material/FPagination/index.d.ts +1 -0
- package/dist/material/FPaper/FPaper.d.ts +18 -0
- package/dist/material/FPaper/index.d.ts +1 -0
- package/dist/material/FPreloader/FPreloader.d.ts +10 -0
- package/dist/material/FPreloader/index.d.ts +1 -0
- package/dist/material/FProgress/FProgress.d.ts +8 -0
- package/dist/material/FProgress/index.d.ts +1 -0
- package/dist/material/FRadioButton/FRadioButton.d.ts +13 -0
- package/dist/material/FRadioButton/index.d.ts +1 -0
- package/dist/material/FSearchBox/FSearchBox.d.ts +32 -0
- package/dist/material/FSelectSearchDb/FSelectSearchDb.d.ts +21 -0
- package/dist/material/FSelectSearchDb/index.d.ts +1 -0
- package/dist/material/FStack/FStack.d.ts +14 -0
- package/dist/material/FStack/index.d.ts +1 -0
- package/dist/material/FTextArea/FTextArea.d.ts +23 -0
- package/dist/material/FTextArea/index.d.ts +1 -0
- package/dist/material/FTextField/FTextField.d.ts +26 -0
- package/dist/material/FTextField/index.d.ts +1 -0
- package/dist/material/FTimelineComponents/FTimeline/FTimeline.d.ts +10 -0
- package/dist/material/FTimelineComponents/FTimeline/index.d.ts +1 -0
- package/dist/material/FTimelineComponents/FTimelineCard/FTimelineCard.d.ts +10 -0
- package/dist/material/FTimelineComponents/FTimelineCard/index.d.ts +1 -0
- package/dist/material/SelectComponents/FSelect/FSelect.d.ts +21 -0
- package/dist/material/SelectComponents/FSelect/index.d.ts +1 -0
- package/dist/material/SelectComponents/FSelectItem/FSelectItem.d.ts +13 -0
- package/dist/material/SelectComponents/FSelectItem/index.d.ts +1 -0
- package/dist/material/TableComponents/FTable/FTable.d.ts +12 -0
- package/dist/material/TableComponents/FTable/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableBody/FTableBody.d.ts +10 -0
- package/dist/material/TableComponents/FTableBody/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableDataCell/FTableDataCell.d.ts +14 -0
- package/dist/material/TableComponents/FTableDataCell/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableFooter/FTableFooter.d.ts +10 -0
- package/dist/material/TableComponents/FTableFooter/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableHead/FTableHead.d.ts +10 -0
- package/dist/material/TableComponents/FTableHead/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableHeaderCell/FTableHeaderCell.d.ts +12 -0
- package/dist/material/TableComponents/FTableHeaderCell/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableRow/FTableRow.d.ts +10 -0
- package/dist/material/TableComponents/FTableRow/index.d.ts +1 -0
- package/dist/material/Tabs/FTab/FTab.d.ts +13 -0
- package/dist/material/Tabs/FTabs/FTabs.d.ts +10 -0
- package/dist/material/index.d.ts +41 -0
- package/package.json +10 -3
- package/.storybook/main.ts +0 -19
- package/.storybook/preview.ts +0 -15
- package/bun.lockb +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/rollup.config.js +0 -33
- package/src/function-elements/fAlert/fAlert.css +0 -99
- package/src/function-elements/fAlert/fAlert.ts +0 -66
- package/src/function-elements/fAlert/index.tsx +0 -1
- package/src/function-elements/fConfirm/fConfirm.css +0 -80
- package/src/function-elements/fConfirm/fConfirm.ts +0 -66
- package/src/function-elements/fConfirm/index.tsx +0 -1
- package/src/function-elements/fPrompt/fPrompt.css +0 -85
- package/src/function-elements/fPrompt/fPrompt.ts +0 -77
- package/src/function-elements/fPrompt/index.tsx +0 -1
- package/src/function-elements/index.ts +0 -3
- package/src/icons/FArrowIcon/FArrowIcon.tsx +0 -50
- package/src/icons/FArrowIcon/index.ts +0 -1
- package/src/icons/FCheckIcon/FCheckIcon.tsx +0 -37
- package/src/icons/FCheckIcon/index.ts +0 -1
- package/src/icons/FCloseIcon/FCloseIcon.tsx +0 -28
- package/src/icons/FCloseIcon/index.ts +0 -1
- package/src/icons/FCopyAddIcon/FCopyAdd.tsx +0 -30
- package/src/icons/FDownloadIcon/FDownloadIcon.tsx +0 -29
- package/src/icons/FDownloadIcon/index.ts +0 -1
- package/src/icons/FFilterIcon/FFilterIcon.tsx +0 -28
- package/src/icons/FFilterIcon/index.ts +0 -1
- package/src/icons/FListIcon/FListIcon.tsx +0 -38
- package/src/icons/FListIcon/index.ts +0 -1
- package/src/icons/FLoadIcon/FLoadIcon.tsx +0 -61
- package/src/icons/FLoadIcon/FLoadIconCss.css +0 -48
- package/src/icons/FLoadIcon/index.ts +0 -1
- package/src/icons/FPenIcon/FPenIcon.tsx +0 -29
- package/src/icons/FPenIcon/index.ts +0 -1
- package/src/icons/FPlusIcon/FPlusIcon.tsx +0 -39
- package/src/icons/FPlusIcon/index.ts +0 -1
- package/src/icons/FTrashIcon/FTrashIcon.tsx +0 -40
- package/src/icons/FTrashIcon/index.ts +0 -1
- package/src/icons/FUnlinkIcon/FUnlinkIcon.tsx +0 -38
- package/src/icons/index.ts +0 -12
- package/src/material/Dialog/FDialog/FDialog.tsx +0 -61
- package/src/material/Dialog/FDialog/index.ts +0 -1
- package/src/material/Dialog/FDialogBody/FDialogBody.tsx +0 -43
- package/src/material/Dialog/FDialogBody/index.ts +0 -1
- package/src/material/Dialog/FDialogFooter/FDialogFooter.tsx +0 -26
- package/src/material/Dialog/FDialogFooter/index.ts +0 -1
- package/src/material/Dialog/FDialogHeader/FDialogHeader.tsx +0 -40
- package/src/material/Dialog/FDialogHeader/index.ts +0 -1
- package/src/material/Dialog/style/style.css +0 -73
- package/src/material/Dropdown/FDropdown/FDropdown.tsx +0 -60
- package/src/material/Dropdown/FDropdownItem/FDropdownItem.tsx +0 -35
- package/src/material/Dropdown/statick/FDropdown.css +0 -68
- package/src/material/Dropdown/statick/down-arrow.png +0 -0
- package/src/material/FAccordion/FAccordion.css +0 -80
- package/src/material/FAccordion/FAccordion.tsx +0 -37
- package/src/material/FAccordion/index.ts +0 -1
- package/src/material/FAlert/FAlert.css +0 -153
- package/src/material/FAlert/FAlert.tsx +0 -226
- package/src/material/FAlert/index.ts +0 -1
- package/src/material/FButton/FButton.css +0 -50
- package/src/material/FButton/FButton.tsx +0 -69
- package/src/material/FButton/index.ts +0 -1
- package/src/material/FButtonFile/FButtonFile.css +0 -180
- package/src/material/FButtonFile/FButtonFile.tsx +0 -157
- package/src/material/FButtonFile/index.ts +0 -1
- package/src/material/FCheckbox/Checkbox.css +0 -57
- package/src/material/FCheckbox/FCheckbox.tsx +0 -45
- package/src/material/FCheckbox/index.ts +0 -1
- package/src/material/FContainer/FContainer.css +0 -165
- package/src/material/FContainer/FContainer.tsx +0 -33
- package/src/material/FContainer/index.ts +0 -1
- package/src/material/FFile/FFile.css +0 -0
- package/src/material/FFile/FFile.tsx +0 -46
- package/src/material/FFile/index.ts +0 -1
- package/src/material/FFullDateField/FFullDateField.tsx +0 -137
- package/src/material/FFullDateField/index.ts +0 -1
- package/src/material/FGrid/FGrid.css +0 -179
- package/src/material/FGrid/FGrid.tsx +0 -76
- package/src/material/FGrid/css/bootstrap-theme.css +0 -589
- package/src/material/FGrid/css/bootstrap-theme.min.css +0 -7
- package/src/material/FGrid/css/bootstrap.css +0 -1020
- package/src/material/FGrid/css/bootstrap.min.css +0 -7
- package/src/material/FGrid/index.ts +0 -1
- package/src/material/FInputFileForm/FInputFileForm.css +0 -95
- package/src/material/FInputFileForm/FInputFileForm.tsx +0 -147
- package/src/material/FInputFileForm/index.ts +0 -1
- package/src/material/FNative/FNative.css +0 -41
- package/src/material/FNative/FNative.tsx +0 -97
- package/src/material/FNative/index.ts +0 -1
- package/src/material/FOpenImgFull/FOpenImgFull.css +0 -10
- package/src/material/FOpenImgFull/FOpenImgFull.tsx +0 -109
- package/src/material/FOpenImgFull/index.ts +0 -1
- package/src/material/FOpenImgFull/statick/1.png +0 -0
- package/src/material/FOpenImgFull/statick/3.png +0 -0
- package/src/material/FOpenImgFull/statick/OKrG1rmJMps.jpg +0 -0
- package/src/material/FPagination/FPagination.css +0 -59
- package/src/material/FPagination/FPagination.tsx +0 -90
- package/src/material/FPagination/hooks/usePagination.tsx +0 -69
- package/src/material/FPagination/index.ts +0 -1
- package/src/material/FPaper/FPaper.css +0 -61
- package/src/material/FPaper/FPaper.tsx +0 -62
- package/src/material/FPaper/index.ts +0 -1
- package/src/material/FPreloader/FPreloader.css +0 -21
- package/src/material/FPreloader/FPreloader.tsx +0 -49
- package/src/material/FPreloader/index.ts +0 -1
- package/src/material/FProgress/FProgress.css +0 -9
- package/src/material/FProgress/FProgress.tsx +0 -41
- package/src/material/FProgress/index.ts +0 -1
- package/src/material/FRadioButton/FRadioButton.tsx +0 -43
- package/src/material/FRadioButton/RadioButton.css +0 -58
- package/src/material/FRadioButton/index.ts +0 -1
- package/src/material/FSearchBox/FSearchBox.css +0 -11
- package/src/material/FSearchBox/FSearchBox.tsx +0 -184
- package/src/material/FSelectSearchDb/FSelectSearchDb.css +0 -83
- package/src/material/FSelectSearchDb/FSelectSearchDb.tsx +0 -196
- package/src/material/FSelectSearchDb/index.ts +0 -1
- package/src/material/FStack/FStack.css +0 -3
- package/src/material/FStack/FStack.tsx +0 -55
- package/src/material/FStack/index.ts +0 -1
- package/src/material/FTextArea/FTextArea.tsx +0 -124
- package/src/material/FTextArea/index.ts +0 -1
- package/src/material/FTextField/FTextField.css +0 -95
- package/src/material/FTextField/FTextField.tsx +0 -163
- package/src/material/FTextField/index.ts +0 -1
- package/src/material/FTimelineComponents/FTimeline/FTimeline.css +0 -82
- package/src/material/FTimelineComponents/FTimeline/FTimeline.tsx +0 -28
- package/src/material/FTimelineComponents/FTimeline/index.ts +0 -1
- package/src/material/FTimelineComponents/FTimelineCard/FTimelineCard.tsx +0 -31
- package/src/material/FTimelineComponents/FTimelineCard/index.ts +0 -1
- package/src/material/SelectComponents/FSelect/FSelect.css +0 -0
- package/src/material/SelectComponents/FSelect/FSelect.tsx +0 -121
- package/src/material/SelectComponents/FSelect/index.ts +0 -1
- package/src/material/SelectComponents/FSelectItem/FSelectItem.tsx +0 -42
- package/src/material/SelectComponents/FSelectItem/index.ts +0 -1
- package/src/material/TableComponents/FTable/FTable.css +0 -62
- package/src/material/TableComponents/FTable/FTable.tsx +0 -39
- package/src/material/TableComponents/FTable/index.ts +0 -1
- package/src/material/TableComponents/FTableBody/FTableBody.tsx +0 -28
- package/src/material/TableComponents/FTableBody/index.ts +0 -1
- package/src/material/TableComponents/FTableDataCell/FTableDataCell.tsx +0 -45
- package/src/material/TableComponents/FTableDataCell/index.ts +0 -1
- package/src/material/TableComponents/FTableFooter/FTableFooter.tsx +0 -29
- package/src/material/TableComponents/FTableFooter/index.ts +0 -1
- package/src/material/TableComponents/FTableHead/FTableHead.tsx +0 -28
- package/src/material/TableComponents/FTableHead/index.ts +0 -1
- package/src/material/TableComponents/FTableHeaderCell/FTableHeaderCell.tsx +0 -39
- package/src/material/TableComponents/FTableHeaderCell/index.ts +0 -1
- package/src/material/TableComponents/FTableRow/FTableRow.tsx +0 -28
- package/src/material/TableComponents/FTableRow/index.ts +0 -1
- package/src/material/Tabs/FTab/FTab.tsx +0 -39
- package/src/material/Tabs/FTabs/FTabs.tsx +0 -27
- package/src/material/Tabs/styles/FTabs.css +0 -49
- package/src/material/index.ts +0 -60
- package/src/material/statick/Colors.css +0 -87
- package/src/material/statick/index.css +0 -7
- package/tsconfig.json +0 -21
- /package/{src/icons/FCopyAddIcon/index.ts → dist/icons/FCopyAddIcon/index.d.ts} +0 -0
- /package/{src/icons/FUnlinkIcon/index.ts → dist/icons/FUnlinkIcon/index.d.ts} +0 -0
- /package/{src/index.ts → dist/index.d.ts} +0 -0
- /package/{src/material/Dropdown/FDropdown/index.ts → dist/material/Dropdown/FDropdown/index.d.ts} +0 -0
- /package/{src/material/Dropdown/FDropdownItem/index.ts → dist/material/Dropdown/FDropdownItem/index.d.ts} +0 -0
- /package/{src/material/FSearchBox/index.ts → dist/material/FSearchBox/index.d.ts} +0 -0
- /package/{src/material/Tabs/FTab/index.ts → dist/material/Tabs/FTab/index.d.ts} +0 -0
- /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,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";
|