linear-react-components-ui 1.1.14-beta.0 → 1.1.14
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/.eslintcache +1 -0
- package/.eslintrc.json +45 -77
- package/.gitlab-ci.yml +13 -5
- package/.nvmrc +1 -0
- package/.vscode/settings.json +12 -3
- package/babel.config.json +4 -4
- package/lib/@types/SizePixels.d.ts +1 -1
- package/lib/alerts/AlertContainer.js +48 -57
- package/lib/alerts/AlertProvider.js +36 -54
- package/lib/alerts/BaseAlert.js +12 -19
- package/lib/alerts/Message.d.ts +1 -1
- package/lib/alerts/Message.js +78 -45
- package/lib/alerts/helpers.js +2 -3
- package/lib/alerts/index.js +3 -4
- package/lib/alerts/types.d.ts +1 -0
- package/lib/alerts/withAlert.js +10 -11
- package/lib/assets/styles/alerts.scss +4 -7
- package/lib/assets/styles/button.scss +11 -9
- package/lib/assets/styles/checkbox.scss +45 -38
- package/lib/assets/styles/colors.scss +3 -1
- package/lib/assets/styles/commons.scss +1 -0
- package/lib/assets/styles/dialog.scss +37 -20
- package/lib/assets/styles/drawers.scss +9 -6
- package/lib/assets/styles/error.scss +9 -0
- package/lib/assets/styles/fieldset.scss +3 -0
- package/lib/assets/styles/gridlayout.scss +0 -2
- package/lib/assets/styles/hint.scss +21 -0
- package/lib/assets/styles/icon.scss +31 -4
- package/lib/assets/styles/input.scss +7 -7
- package/lib/assets/styles/multiSelect.scss +6 -1
- package/lib/assets/styles/radio.scss +37 -35
- package/lib/assets/styles/select.scss +13 -7
- package/lib/assets/styles/table.scss +9 -1
- package/lib/assets/styles/tabs.scss +28 -18
- package/lib/assets/styles/textContent.scss +9 -0
- package/lib/avatar/index.js +41 -41
- package/lib/badge/index.js +12 -14
- package/lib/buttons/ActivateButton.js +6 -9
- package/lib/buttons/AddButton.js +9 -12
- package/lib/buttons/Button.js +11 -12
- package/lib/buttons/ButtonGroups.js +6 -5
- package/lib/buttons/CancelButton.js +10 -9
- package/lib/buttons/DangerButton.js +10 -9
- package/lib/buttons/DefaultButton.js +90 -90
- package/lib/buttons/DestroyButton.js +10 -9
- package/lib/buttons/EditButton.js +6 -9
- package/lib/buttons/InactivateButton.js +6 -9
- package/lib/buttons/InfoButton.js +10 -9
- package/lib/buttons/PrimaryButton.js +10 -9
- package/lib/buttons/RestoreButton.js +6 -9
- package/lib/buttons/SaveButton.js +10 -9
- package/lib/buttons/SuccessButton.js +10 -9
- package/lib/buttons/WarningButton.js +10 -9
- package/lib/buttons/button_container/index.js +17 -21
- package/lib/buttons/index.js +16 -17
- package/lib/buttons/split_button/index.js +22 -25
- package/lib/buttons/types.d.ts +1 -0
- package/lib/calendar/DangerCalendar.js +10 -9
- package/lib/calendar/InfoCalendar.js +10 -9
- package/lib/calendar/PrimaryCalendar.js +10 -9
- package/lib/calendar/SuccessCalendar.js +10 -9
- package/lib/calendar/WarningCalendar.js +10 -9
- package/lib/calendar/base/Day.js +13 -12
- package/lib/calendar/base/Month.js +13 -18
- package/lib/calendar/base/Week.js +13 -18
- package/lib/calendar/base/helpers.js +12 -12
- package/lib/calendar/base/index.js +30 -44
- package/lib/calendar/index.js +7 -8
- package/lib/checkbox/Label.js +20 -10
- package/lib/checkbox/index.d.ts +2 -2
- package/lib/checkbox/index.js +83 -97
- package/lib/checkbox/types.d.ts +2 -1
- package/lib/dialog/Alert.js +5 -6
- package/lib/dialog/Custom.js +16 -18
- package/lib/dialog/Error.js +5 -6
- package/lib/dialog/Information.js +5 -6
- package/lib/dialog/Question.js +13 -14
- package/lib/dialog/Warning.js +7 -7
- package/lib/dialog/base/Content.js +8 -6
- package/lib/dialog/base/Footer.js +5 -8
- package/lib/dialog/base/Header.js +29 -29
- package/lib/dialog/base/index.d.ts +8 -2
- package/lib/dialog/base/index.js +109 -105
- package/lib/dialog/base/style.js +7 -10
- package/lib/dialog/form/index.js +31 -34
- package/lib/dialog/index.js +8 -9
- package/lib/dialog/types.d.ts +8 -13
- package/lib/drawer/Content.js +12 -11
- package/lib/drawer/Drawer.js +74 -88
- package/lib/drawer/Header.js +34 -37
- package/lib/drawer/helpers.js +3 -4
- package/lib/drawer/index.js +4 -5
- package/lib/dropdown/Popup.d.ts +1 -1
- package/lib/dropdown/Popup.js +41 -42
- package/lib/dropdown/helper.js +3 -5
- package/lib/dropdown/types.d.ts +1 -0
- package/lib/dropdown/withDropdown.js +39 -60
- package/lib/fieldset/index.js +52 -58
- package/lib/fieldset/types.d.ts +2 -0
- package/lib/form/Field.d.ts +2 -0
- package/lib/form/Field.js +73 -79
- package/lib/form/FieldArray.d.ts +2 -0
- package/lib/form/FieldArray.js +70 -94
- package/lib/form/FieldNumber.d.ts +2 -0
- package/lib/form/FieldNumber.js +39 -48
- package/lib/form/FieldPeriod.d.ts +2 -0
- package/lib/form/FieldPeriod.js +48 -54
- package/lib/form/helpers.d.ts +2 -0
- package/lib/form/helpers.js +22 -27
- package/lib/form/index.d.ts +2 -0
- package/lib/form/index.js +114 -146
- package/lib/form/types.d.ts +6 -2
- package/lib/form/withFieldHOC.d.ts +2 -0
- package/lib/form/withFieldHOC.js +32 -39
- package/lib/form/withFormSecurity.d.ts +2 -0
- package/lib/form/withFormSecurity.js +27 -35
- package/lib/gridlayout/GridCol.js +14 -14
- package/lib/gridlayout/GridRow.js +18 -12
- package/lib/gridlayout/index.js +3 -4
- package/lib/gridlayout/types.d.ts +1 -1
- package/lib/hint/helpers.d.ts +3 -0
- package/lib/hint/helpers.js +21 -0
- package/lib/hint/index.d.ts +2 -1
- package/lib/hint/index.js +18 -29
- package/lib/hint/types.d.ts +3 -0
- package/lib/icons/helper.d.ts +4 -0
- package/lib/icons/helper.js +7 -4
- package/lib/icons/index.d.ts +3 -2
- package/lib/icons/index.js +43 -48
- package/lib/icons/types.d.ts +22 -9
- package/lib/index.d.ts +2 -1
- package/lib/index.js +10 -10
- package/lib/inputs/base/InputTextBase.d.ts +2 -0
- package/lib/inputs/base/InputTextBase.js +149 -113
- package/lib/inputs/base/Label.d.ts +14 -0
- package/lib/inputs/base/Label.js +35 -0
- package/lib/inputs/base/helpers.d.ts +3 -2
- package/lib/inputs/base/helpers.js +21 -26
- package/lib/inputs/base/types.d.ts +17 -2
- package/lib/inputs/color/index.js +29 -40
- package/lib/inputs/date/Dialog.d.ts +2 -0
- package/lib/inputs/date/Dialog.js +9 -10
- package/lib/inputs/date/Dropdown.d.ts +2 -0
- package/lib/inputs/date/Dropdown.js +12 -11
- package/lib/inputs/date/helpers.d.ts +2 -0
- package/lib/inputs/date/helpers.js +14 -14
- package/lib/inputs/date/index.d.ts +2 -0
- package/lib/inputs/date/index.js +127 -152
- package/lib/inputs/date/types.d.ts +4 -1
- package/lib/inputs/{mask/imaskHOC.d.ts → errorMessage/index.d.ts} +5 -7
- package/lib/inputs/errorMessage/index.js +26 -0
- package/lib/inputs/file/DefaultFile.d.ts +2 -0
- package/lib/inputs/file/DefaultFile.js +47 -74
- package/lib/inputs/file/DragDropFile.d.ts +2 -0
- package/lib/inputs/file/DragDropFile.js +97 -149
- package/lib/inputs/file/File.d.ts +3 -1
- package/lib/inputs/file/File.js +26 -32
- package/lib/inputs/file/FileButtonSettings.d.ts +2 -0
- package/lib/inputs/file/FileButtonSettings.js +13 -13
- package/lib/inputs/file/helpers.d.ts +2 -0
- package/lib/inputs/file/helpers.js +4 -6
- package/lib/inputs/file/index.d.ts +2 -0
- package/lib/inputs/file/index.js +4 -5
- package/lib/inputs/file/types.d.ts +2 -0
- package/lib/inputs/inputHOC.d.ts +2 -1
- package/lib/inputs/inputHOC.js +21 -34
- package/lib/inputs/mask/BaseMask.d.ts +4 -5
- package/lib/inputs/mask/BaseMask.js +125 -37
- package/lib/inputs/mask/Cnpj.d.ts +2 -0
- package/lib/inputs/mask/Cnpj.js +18 -31
- package/lib/inputs/mask/Cpf.d.ts +2 -0
- package/lib/inputs/mask/Cpf.js +20 -37
- package/lib/inputs/mask/Phone.d.ts +2 -0
- package/lib/inputs/mask/Phone.js +7 -6
- package/lib/inputs/mask/ZipCode.d.ts +2 -0
- package/lib/inputs/mask/ZipCode.js +6 -9
- package/lib/inputs/mask/helpers.d.ts +50 -12
- package/lib/inputs/mask/helpers.js +77 -37
- package/lib/inputs/mask/index.d.ts +4 -2
- package/lib/inputs/mask/index.js +6 -7
- package/lib/inputs/mask/types.d.ts +18 -17
- package/lib/inputs/multiSelect/ActionButtons.d.ts +2 -0
- package/lib/inputs/multiSelect/ActionButtons.js +23 -22
- package/lib/inputs/multiSelect/Dropdown.d.ts +2 -0
- package/lib/inputs/multiSelect/Dropdown.js +50 -67
- package/lib/inputs/multiSelect/helper.d.ts +2 -0
- package/lib/inputs/multiSelect/helper.js +8 -7
- package/lib/inputs/multiSelect/index.d.ts +2 -0
- package/lib/inputs/multiSelect/index.js +83 -135
- package/lib/inputs/multiSelect/types.d.ts +2 -0
- package/lib/inputs/number/BaseNumber.d.ts +2 -1
- package/lib/inputs/number/BaseNumber.js +25 -24
- package/lib/inputs/number/Currency.d.ts +2 -1
- package/lib/inputs/number/Currency.js +8 -8
- package/lib/inputs/number/Decimal.d.ts +2 -1
- package/lib/inputs/number/Decimal.js +3 -6
- package/lib/inputs/number/format_number.js +5 -5
- package/lib/inputs/number/index.d.ts +2 -1
- package/lib/inputs/number/index.js +20 -32
- package/lib/inputs/number/types.d.ts +2 -9
- package/lib/inputs/period/Dialog.d.ts +3 -1
- package/lib/inputs/period/Dialog.js +9 -10
- package/lib/inputs/period/Dropdown.d.ts +2 -0
- package/lib/inputs/period/Dropdown.js +8 -9
- package/lib/inputs/period/PeriodList.d.ts +2 -0
- package/lib/inputs/period/PeriodList.js +14 -13
- package/lib/inputs/period/helper.d.ts +2 -0
- package/lib/inputs/period/helper.js +34 -37
- package/lib/inputs/period/index.d.ts +2 -0
- package/lib/inputs/period/index.js +162 -196
- package/lib/inputs/period/types.d.ts +3 -1
- package/lib/inputs/search/index.d.ts +2 -1
- package/lib/inputs/search/index.js +45 -68
- package/lib/inputs/select/ActionButtons.d.ts +2 -1
- package/lib/inputs/select/ActionButtons.js +25 -35
- package/lib/inputs/select/Dropdown.d.ts +2 -1
- package/lib/inputs/select/Dropdown.js +41 -60
- package/lib/inputs/select/helper.d.ts +2 -1
- package/lib/inputs/select/helper.js +49 -43
- package/lib/inputs/select/index.d.ts +2 -0
- package/lib/inputs/select/index.js +13 -12
- package/lib/inputs/select/multiple/Selecteds.d.ts +3 -1
- package/lib/inputs/select/multiple/Selecteds.js +17 -22
- package/lib/inputs/select/multiple/index.d.ts +2 -0
- package/lib/inputs/select/multiple/index.js +125 -162
- package/lib/inputs/select/simple/index.d.ts +2 -0
- package/lib/inputs/select/simple/index.js +154 -179
- package/lib/inputs/select/types.d.ts +5 -2
- package/lib/inputs/text/index.js +3 -6
- package/lib/inputs/textarea/index.d.ts +2 -0
- package/lib/inputs/textarea/index.js +10 -10
- package/lib/inputs/textarea/types.d.ts +2 -0
- package/lib/inputs/types.d.ts +12 -9
- package/lib/internals/colorStyles.js +2 -3
- package/lib/internals/constants.js +2 -4
- package/lib/internals/types.d.ts +5 -2
- package/lib/internals/withTooltip.d.ts +3 -2
- package/lib/internals/withTooltip.js +76 -76
- package/lib/labelMessages/index.js +22 -42
- package/lib/labels/DangerLabel.js +10 -9
- package/lib/labels/DefaultLabel.js +26 -40
- package/lib/labels/InfoLabel.js +10 -9
- package/lib/labels/PrimaryLabel.js +10 -9
- package/lib/labels/SuccessLabel.js +10 -9
- package/lib/labels/WarningLabel.js +10 -9
- package/lib/labels/index.js +8 -9
- package/lib/labels/label_container/index.js +8 -8
- package/lib/list/Header.js +9 -8
- package/lib/list/Item.js +74 -70
- package/lib/list/Separator.js +5 -8
- package/lib/list/helpers.js +4 -6
- package/lib/list/index.js +74 -101
- package/lib/menus/float/MenuItem.js +19 -20
- package/lib/menus/float/SubMenuContainer.js +27 -33
- package/lib/menus/float/helpers.js +3 -4
- package/lib/menus/float/index.js +17 -18
- package/lib/menus/float/types.d.ts +1 -1
- package/lib/menus/index.js +2 -3
- package/lib/menus/sidenav/ExpandMenu.js +9 -8
- package/lib/menus/sidenav/MenuLink.js +10 -9
- package/lib/menus/sidenav/NavMenuGroup.js +12 -11
- package/lib/menus/sidenav/NavMenuItem.js +48 -62
- package/lib/menus/sidenav/NavSubMenuItem.js +20 -25
- package/lib/menus/sidenav/helpers.js +6 -9
- package/lib/menus/sidenav/index.js +85 -113
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +7 -7
- package/lib/menus/sidenav/popup_menu_search/index.js +64 -84
- package/lib/menus/sidenav/types.d.ts +1 -1
- package/lib/noPermission/index.js +14 -17
- package/lib/panel/Content.d.ts +1 -1
- package/lib/panel/Content.js +47 -60
- package/lib/panel/DangerPanel.d.ts +1 -1
- package/lib/panel/DangerPanel.js +6 -9
- package/lib/panel/Default.d.ts +1 -1
- package/lib/panel/Default.js +45 -60
- package/lib/panel/Header.d.ts +1 -1
- package/lib/panel/Header.js +32 -30
- package/lib/panel/InfoPanel.d.ts +1 -1
- package/lib/panel/InfoPanel.js +6 -9
- package/lib/panel/PrimaryPanel.d.ts +1 -1
- package/lib/panel/PrimaryPanel.js +6 -9
- package/lib/panel/SuccessPanel.d.ts +1 -1
- package/lib/panel/SuccessPanel.js +6 -9
- package/lib/panel/ToolBar.d.ts +1 -1
- package/lib/panel/ToolBar.js +6 -5
- package/lib/panel/WarningPanel.d.ts +1 -1
- package/lib/panel/WarningPanel.js +6 -9
- package/lib/panel/helpers.d.ts +7 -2
- package/lib/panel/helpers.js +12 -24
- package/lib/panel/index.d.ts +1 -1
- package/lib/panel/index.js +9 -10
- package/lib/panel/types.d.ts +46 -5
- package/lib/permissionValidations.js +24 -29
- package/lib/popover/PopoverText.js +6 -5
- package/lib/popover/PopoverTitle.js +6 -5
- package/lib/popover/index.js +15 -19
- package/lib/progress/Bar.js +31 -37
- package/lib/progress/index.js +18 -20
- package/lib/radio/index.js +36 -57
- package/lib/shortcuts/index.js +10 -9
- package/lib/skeleton/SkeletonContainer.js +10 -11
- package/lib/skeleton/index.js +27 -34
- package/lib/spinner/SpinnerLoading.js +7 -8
- package/lib/spinner/index.js +23 -37
- package/lib/split/Split.js +95 -112
- package/lib/split/SplitSide.js +20 -19
- package/lib/split/helpers.js +3 -4
- package/lib/split/index.js +3 -4
- package/lib/table/Body.js +42 -45
- package/lib/table/Header.js +29 -32
- package/lib/table/HeaderColumn.d.ts +1 -1
- package/lib/table/HeaderColumn.js +35 -22
- package/lib/table/Row.js +45 -48
- package/lib/table/RowColumn.js +38 -39
- package/lib/table/helpers.js +7 -13
- package/lib/table/index.js +82 -102
- package/lib/table/types.d.ts +3 -0
- package/lib/tabs/DropdownTabs.d.ts +11 -0
- package/lib/tabs/DropdownTabs.js +71 -0
- package/lib/tabs/Menu.d.ts +1 -1
- package/lib/tabs/Menu.js +35 -23
- package/lib/tabs/{DropdownItems.d.ts → MenuTabs.d.ts} +3 -3
- package/lib/tabs/MenuTabs.js +82 -0
- package/lib/tabs/Panel.d.ts +1 -1
- package/lib/tabs/Panel.js +70 -66
- package/lib/tabs/context.d.ts +12 -0
- package/lib/tabs/context.js +130 -0
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/index.js +46 -225
- package/lib/tabs/tabHelpers.d.ts +4 -15
- package/lib/tabs/tabHelpers.js +37 -42
- package/lib/tabs/types.d.ts +48 -15
- package/lib/tabs/useTabs.d.ts +11 -0
- package/lib/tabs/useTabs.js +11 -0
- package/lib/textContent/index.d.ts +8 -0
- package/lib/textContent/index.js +30 -0
- package/lib/toolbar/ButtonBar.js +39 -43
- package/lib/toolbar/LabelBar.js +36 -40
- package/lib/toolbar/Separator.js +5 -8
- package/lib/toolbar/ToolBarGroup.js +7 -7
- package/lib/toolbar/helpers.js +2 -3
- package/lib/toolbar/index.js +23 -25
- package/lib/toolbar/types.d.ts +1 -0
- package/lib/tooltip/index.js +28 -33
- package/lib/treetable/Body.js +21 -33
- package/lib/treetable/Header.js +11 -14
- package/lib/treetable/Row.js +90 -142
- package/lib/treetable/helpers.js +15 -24
- package/lib/treetable/index.js +11 -13
- package/lib/treeview/Header.js +8 -7
- package/lib/treeview/Node.js +96 -136
- package/lib/treeview/constants.js +2 -3
- package/lib/treeview/index.js +150 -216
- package/lib/uitour/helpers.js +4 -7
- package/lib/uitour/index.d.ts +2 -1
- package/lib/uitour/index.js +113 -100
- package/lib/uitour/types.d.ts +9 -1
- package/package.json +77 -82
- package/tsconfig.json +1 -0
- package/.tool-versions +0 -1
- package/lib/inputs/mask/imaskHOC.js +0 -224
- package/lib/tabs/DropdownItems.js +0 -65
- package/lib/tabs/MenuItems.d.ts +0 -11
- package/lib/tabs/MenuItems.js +0 -76
- package/lib/treeview_old/Header.js +0 -28
- package/lib/treeview_old/Node.js +0 -88
- package/lib/treeview_old/index.js +0 -42
- package/lib/types-c2a0f035.d.ts +0 -50
package/lib/index.js
CHANGED
|
@@ -5,55 +5,55 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "Button", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _buttons.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "Dialog", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _base.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "Icon", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _icons.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "Label", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _labels.default;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "List", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _list.default;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "Panel", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function
|
|
38
|
+
get: function () {
|
|
39
39
|
return _panel.default;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "Radio", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function
|
|
44
|
+
get: function () {
|
|
45
45
|
return _radio.default;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "Tab", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function
|
|
50
|
+
get: function () {
|
|
51
51
|
return _tabs.default;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "Toolbar", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function
|
|
56
|
+
get: function () {
|
|
57
57
|
return _toolbar.default;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -66,4 +66,4 @@ var _list = _interopRequireDefault(require("./list"));
|
|
|
66
66
|
var _radio = _interopRequireDefault(require("./radio"));
|
|
67
67
|
var _tabs = _interopRequireDefault(require("./tabs"));
|
|
68
68
|
var _base = _interopRequireDefault(require("./dialog/base"));
|
|
69
|
-
function _interopRequireDefault(
|
|
69
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../../@types/Align.js';
|
|
4
4
|
import '../../@types/Period.js';
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
|
+
import '../../internals/types.js';
|
|
7
|
+
import '../../@types/Position.js';
|
|
6
8
|
|
|
7
9
|
declare const _default: (props: IBaseProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -12,104 +12,99 @@ var helpers = _interopRequireWildcard(require("./helpers"));
|
|
|
12
12
|
var _withTooltip = _interopRequireDefault(require("../../internals/withTooltip"));
|
|
13
13
|
var _permissionValidations = require("../../permissionValidations");
|
|
14
14
|
var _hint = _interopRequireDefault(require("../../hint"));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
type =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
(0, _react.
|
|
15
|
+
var _errorMessage = require("../errorMessage");
|
|
16
|
+
var _Label = _interopRequireDefault(require("./Label"));
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
21
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
24
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
25
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
26
|
+
const InputTextBase = props => {
|
|
27
|
+
const {
|
|
28
|
+
textAlign = 'left',
|
|
29
|
+
value,
|
|
30
|
+
type = 'text',
|
|
31
|
+
readOnly = false,
|
|
32
|
+
placeHolder,
|
|
33
|
+
required,
|
|
34
|
+
leftElements,
|
|
35
|
+
rightElements,
|
|
36
|
+
children,
|
|
37
|
+
customClass,
|
|
38
|
+
customClassForInputContent,
|
|
39
|
+
customClassForLabel,
|
|
40
|
+
customClassForSideButtons,
|
|
41
|
+
inputRef,
|
|
42
|
+
inputBaseRef,
|
|
43
|
+
label,
|
|
44
|
+
labelUppercase,
|
|
45
|
+
hint,
|
|
46
|
+
errorMessages,
|
|
47
|
+
visible = true,
|
|
48
|
+
permissionAttr,
|
|
49
|
+
onDeniedActions,
|
|
50
|
+
handlerSetOnDenied,
|
|
51
|
+
targetRef,
|
|
52
|
+
skeletonize = false,
|
|
53
|
+
style,
|
|
54
|
+
styleForInputContent,
|
|
55
|
+
styleForWrapper,
|
|
56
|
+
styleForLabel,
|
|
57
|
+
styleForSideButtons,
|
|
58
|
+
disabled = false,
|
|
59
|
+
autoFocus,
|
|
60
|
+
maxLength,
|
|
61
|
+
name,
|
|
62
|
+
id,
|
|
63
|
+
multiple = false,
|
|
64
|
+
accept,
|
|
65
|
+
onChange,
|
|
66
|
+
onDragOver,
|
|
67
|
+
onDrop,
|
|
68
|
+
onDragLeave,
|
|
69
|
+
onClick,
|
|
70
|
+
readOnlyClass,
|
|
71
|
+
autoComplete = 'on'
|
|
72
|
+
} = props;
|
|
73
|
+
let propsInput;
|
|
74
|
+
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
75
|
+
const labelRef = (0, _react.useRef)(null);
|
|
76
|
+
const onDenied = onDeniedActions || (0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr);
|
|
77
|
+
const {
|
|
78
|
+
hideContent,
|
|
79
|
+
unvisible
|
|
80
|
+
} = onDenied;
|
|
81
|
+
const [showTooltip, setShowTooltip] = (0, _react.useState)(false);
|
|
82
|
+
(0, _react.useEffect)(() => {
|
|
82
83
|
if (handlerSetOnDenied) handlerSetOnDenied(onDenied);
|
|
83
84
|
}, []);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
};
|
|
90
|
-
var shouldBeReadOnly = function shouldBeReadOnly() {
|
|
91
|
-
return readOnly || onDenied.readOnly;
|
|
92
|
-
};
|
|
93
|
-
var inputProps = function inputProps() {
|
|
94
|
-
var disableCallbacks = shouldBeReadOnly() || shouldDisable() || hideContent;
|
|
85
|
+
const applyTabIndex = () => readOnly ? -1 : 0;
|
|
86
|
+
const shouldDisable = () => disabled || onDenied.disabled;
|
|
87
|
+
const shouldBeReadOnly = () => readOnly || onDenied.readOnly;
|
|
88
|
+
const inputProps = () => {
|
|
89
|
+
const disableCallbacks = shouldBeReadOnly() || shouldDisable() || hideContent;
|
|
95
90
|
propsInput = {
|
|
96
91
|
value: hideContent ? '' : value,
|
|
97
|
-
accept
|
|
98
|
-
type
|
|
92
|
+
accept,
|
|
93
|
+
type,
|
|
99
94
|
readOnly: shouldBeReadOnly(),
|
|
100
95
|
placeholder: placeHolder,
|
|
101
96
|
disabled: shouldDisable() || hideContent,
|
|
102
|
-
autoFocus
|
|
103
|
-
maxLength
|
|
104
|
-
name
|
|
105
|
-
id
|
|
106
|
-
multiple
|
|
97
|
+
autoFocus,
|
|
98
|
+
maxLength,
|
|
99
|
+
name,
|
|
100
|
+
id,
|
|
101
|
+
multiple,
|
|
107
102
|
className: helpers.getInputClass({
|
|
108
|
-
textAlign
|
|
109
|
-
readOnly
|
|
110
|
-
readOnlyClass
|
|
103
|
+
textAlign,
|
|
104
|
+
readOnly,
|
|
105
|
+
readOnlyClass
|
|
111
106
|
}),
|
|
112
|
-
ref:
|
|
107
|
+
ref: r => {
|
|
113
108
|
if (inputRef) {
|
|
114
109
|
if (!_lodash.default.isFunction(inputRef)) {
|
|
115
110
|
inputRef.current = r;
|
|
@@ -122,41 +117,74 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
122
117
|
};
|
|
123
118
|
if (!disableCallbacks) {
|
|
124
119
|
propsInput = _objectSpread(_objectSpread({}, propsInput), {}, {
|
|
125
|
-
onFocus:
|
|
120
|
+
onFocus: e => {
|
|
126
121
|
var _props$onInputReceive;
|
|
127
122
|
(_props$onInputReceive = props.onInputReceiveFocus) === null || _props$onInputReceive === void 0 ? void 0 : _props$onInputReceive.call(props);
|
|
128
123
|
if (props.onFocus) props.onFocus(e);
|
|
129
124
|
},
|
|
130
|
-
onBlur:
|
|
125
|
+
onBlur: e => {
|
|
131
126
|
var _props$onInputLostFoc;
|
|
132
127
|
(_props$onInputLostFoc = props.onInputLostFocus) === null || _props$onInputLostFoc === void 0 ? void 0 : _props$onInputLostFoc.call(props);
|
|
133
128
|
if (props.onBlur) props.onBlur(e);
|
|
134
129
|
},
|
|
135
|
-
onKeyDown:
|
|
130
|
+
onKeyDown: e => {
|
|
136
131
|
if (props.onKeyDown) props.onKeyDown(e);
|
|
137
132
|
},
|
|
138
|
-
onKeyPress:
|
|
133
|
+
onKeyPress: e => {
|
|
139
134
|
if (props.onKeyPress) props.onKeyPress(e);
|
|
140
135
|
},
|
|
141
|
-
onChange:
|
|
142
|
-
if (
|
|
136
|
+
onChange: e => {
|
|
137
|
+
if (onChange) onChange(e);
|
|
143
138
|
},
|
|
144
|
-
onDragOver:
|
|
145
|
-
if (
|
|
139
|
+
onDragOver: e => {
|
|
140
|
+
if (onDragOver) onDragOver(e);
|
|
146
141
|
},
|
|
147
|
-
onDrop:
|
|
148
|
-
if (
|
|
142
|
+
onDrop: e => {
|
|
143
|
+
if (onDrop) onDrop(e);
|
|
149
144
|
},
|
|
150
|
-
onDragLeave:
|
|
151
|
-
if (
|
|
145
|
+
onDragLeave: e => {
|
|
146
|
+
if (onDragLeave) onDragLeave(e);
|
|
152
147
|
},
|
|
153
|
-
onClick:
|
|
154
|
-
if (
|
|
148
|
+
onClick: e => {
|
|
149
|
+
if (onClick) onClick(e);
|
|
155
150
|
}
|
|
156
151
|
});
|
|
157
152
|
}
|
|
158
153
|
return propsInput;
|
|
159
154
|
};
|
|
155
|
+
const onHoverLabel = e => {
|
|
156
|
+
const target = e.target;
|
|
157
|
+
if (target.offsetWidth < target.scrollWidth) {
|
|
158
|
+
setShowTooltip(true);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
(0, _react.useEffect)(() => {
|
|
162
|
+
const resize = new ResizeObserver(_ref => {
|
|
163
|
+
let [element] = _ref;
|
|
164
|
+
const {
|
|
165
|
+
target
|
|
166
|
+
} = element;
|
|
167
|
+
setShowTooltip(prevState => {
|
|
168
|
+
var overflowing = target.clientWidth < target.scrollWidth;
|
|
169
|
+
return prevState === overflowing ? prevState : overflowing;
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
if (labelRef.current) {
|
|
173
|
+
resize.observe(labelRef.current);
|
|
174
|
+
}
|
|
175
|
+
return () => {
|
|
176
|
+
if (resize) {
|
|
177
|
+
resize.disconnect();
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}, []);
|
|
181
|
+
if (labelRef.current) {
|
|
182
|
+
const element = labelRef.current;
|
|
183
|
+
const overflowing = element.offsetWidth < element.scrollWidth;
|
|
184
|
+
if (overflowing && !showTooltip) {
|
|
185
|
+
setShowTooltip(true);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
160
188
|
if (!visible || unvisible) return null;
|
|
161
189
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
162
190
|
style: style,
|
|
@@ -167,12 +195,16 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
167
195
|
style: {
|
|
168
196
|
textAlign: textAlign === 'center' ? 'left' : textAlign
|
|
169
197
|
}
|
|
170
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
198
|
+
}, /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
199
|
+
labelRef: labelRef,
|
|
200
|
+
label: label,
|
|
201
|
+
required: required,
|
|
202
|
+
onHoverLabel: onHoverLabel,
|
|
203
|
+
customClassForLabel: customClassForLabel,
|
|
204
|
+
labelUppercase: labelUppercase,
|
|
205
|
+
tooltip: showTooltip ? label.toString() : undefined,
|
|
206
|
+
tooltipPosition: "top"
|
|
207
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
176
208
|
"data-testid": "testInputWrapper",
|
|
177
209
|
style: styleForWrapper,
|
|
178
210
|
className: helpers.getInputWrapperClass(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -189,12 +221,16 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
189
221
|
rows: props.rows,
|
|
190
222
|
cols: props.cols
|
|
191
223
|
}, inputProps())) : /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
192
|
-
|
|
224
|
+
autoComplete: autoComplete,
|
|
225
|
+
tabIndex: applyTabIndex(),
|
|
226
|
+
"data-testid": "teste-123"
|
|
193
227
|
}, inputProps())), children), helpers.getRightElements(errorMessages || [], skeletonize, rightElements)), /*#__PURE__*/_react.default.createElement(_hint.default, {
|
|
228
|
+
disabled: disabled,
|
|
194
229
|
visible: !!hint,
|
|
195
230
|
customClass: "hint",
|
|
196
231
|
description: hint
|
|
197
|
-
}),
|
|
232
|
+
}), /*#__PURE__*/_react.default.createElement(_errorMessage.ErrorMessage, {
|
|
233
|
+
messages: errorMessages
|
|
234
|
+
}));
|
|
198
235
|
};
|
|
199
|
-
var _default = (0, _inputHOC.default)((0, _withTooltip.default)(InputTextBase));
|
|
200
|
-
exports.default = _default;
|
|
236
|
+
var _default = exports.default = (0, _inputHOC.default)((0, _withTooltip.default)(InputTextBase));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputLabelProps } from './types.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '../../@types/Align.js';
|
|
4
|
+
import '../../@types/Period.js';
|
|
5
|
+
import '../../@types/PermissionAttr.js';
|
|
6
|
+
import '../../internals/types.js';
|
|
7
|
+
import '../../@types/Position.js';
|
|
8
|
+
|
|
9
|
+
declare const _default: {
|
|
10
|
+
(props: InputLabelProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { _default as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _withTooltip = _interopRequireDefault(require("../../internals/withTooltip"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const Label = props => {
|
|
11
|
+
const {
|
|
12
|
+
label,
|
|
13
|
+
styleForLabel,
|
|
14
|
+
customClassForLabel,
|
|
15
|
+
labelUppercase,
|
|
16
|
+
required,
|
|
17
|
+
targetRef,
|
|
18
|
+
labelRef,
|
|
19
|
+
onHoverLabel
|
|
20
|
+
} = props;
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
22
|
+
style: styleForLabel,
|
|
23
|
+
ref: ref => {
|
|
24
|
+
if (ref) {
|
|
25
|
+
if (labelRef) labelRef.current = ref;
|
|
26
|
+
if (targetRef) targetRef(ref);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
onMouseEnter: onHoverLabel,
|
|
30
|
+
className: "label ".concat(customClassForLabel, " ").concat(labelUppercase && ' -uppercase')
|
|
31
|
+
}, label, required && /*#__PURE__*/_react.default.createElement("span", {
|
|
32
|
+
className: "-requiredlabel"
|
|
33
|
+
}, "*"));
|
|
34
|
+
};
|
|
35
|
+
var _default = exports.default = (0, _withTooltip.default)(Label);
|
|
@@ -3,6 +3,8 @@ import { TextAlign } from '../../@types/Align.js';
|
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../../@types/Period.js';
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
|
+
import '../../internals/types.js';
|
|
7
|
+
import '../../@types/Position.js';
|
|
6
8
|
|
|
7
9
|
declare const getInputClass: ({ textAlign, readOnly, readOnlyClass, }: {
|
|
8
10
|
textAlign?: TextAlign | undefined;
|
|
@@ -10,7 +12,6 @@ declare const getInputClass: ({ textAlign, readOnly, readOnlyClass, }: {
|
|
|
10
12
|
readOnlyClass?: string | undefined;
|
|
11
13
|
}) => string;
|
|
12
14
|
declare const getInputWrapperClass: (props: IBaseProps) => string;
|
|
13
|
-
declare const getErrorMessages: (messages: string[]) => JSX.Element;
|
|
14
15
|
declare const getRightElements: (errorMessages: string[], skeletonize: boolean, rightElements?: JSX.Element | JSX.Element[]) => JSX.Element[] | null;
|
|
15
16
|
|
|
16
|
-
export {
|
|
17
|
+
export { getInputClass, getInputWrapperClass, getRightElements };
|
|
@@ -3,44 +3,39 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getRightElements = exports.getInputWrapperClass = exports.getInputClass =
|
|
6
|
+
exports.getRightElements = exports.getInputWrapperClass = exports.getInputClass = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const getInputClass = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
textAlign,
|
|
13
|
+
readOnly,
|
|
14
|
+
readOnlyClass
|
|
15
|
+
} = _ref;
|
|
14
16
|
return "textinput text-align-".concat(textAlign, " ").concat(readOnlyClass, " ").concat(readOnly ? ' -readonly' : '');
|
|
15
17
|
};
|
|
16
18
|
exports.getInputClass = getInputClass;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const getInputWrapperClass = props => {
|
|
20
|
+
const {
|
|
21
|
+
inputHasFocus,
|
|
22
|
+
customClassForWrapper,
|
|
23
|
+
rounded,
|
|
24
|
+
errorMessages,
|
|
25
|
+
disabled
|
|
26
|
+
} = props;
|
|
23
27
|
return "inputwrapper ".concat(inputHasFocus && ' -focusable', "\n ").concat(customClassForWrapper, "\n ").concat(errorMessages && errorMessages.length > 0 && ' -requirederror', "\n ").concat(rounded && ' -roundedborders', "\n ").concat(disabled && ' -disabled');
|
|
24
28
|
};
|
|
25
29
|
exports.getInputWrapperClass = getInputWrapperClass;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement("p", {
|
|
29
|
-
className: "errormessages"
|
|
30
|
-
}, messages.join(', '));
|
|
31
|
-
};
|
|
32
|
-
exports.getErrorMessages = getErrorMessages;
|
|
33
|
-
var getRightElements = function getRightElements(errorMessages, skeletonize, rightElements) {
|
|
34
|
-
var elements = rightElements || [];
|
|
30
|
+
const getRightElements = (errorMessages, skeletonize, rightElements) => {
|
|
31
|
+
let elements = rightElements || [];
|
|
35
32
|
if (skeletonize) return null;
|
|
36
33
|
if (!_lodash.default.isArray(elements)) {
|
|
37
34
|
elements = [elements];
|
|
38
35
|
}
|
|
39
|
-
elements = elements.map(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
});
|
|
43
|
-
});
|
|
36
|
+
elements = elements.map((element, index) => element && /*#__PURE__*/_react.default.cloneElement(element, {
|
|
37
|
+
key: "rightelement-".concat(index + 1)
|
|
38
|
+
}));
|
|
44
39
|
if (errorMessages) return elements;
|
|
45
40
|
return elements;
|
|
46
41
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { MouseEvent, KeyboardEvent, DragEvent,
|
|
1
|
+
import { MutableRefObject, MouseEvent, KeyboardEvent, DragEvent, RefObject, CSSProperties } from 'react';
|
|
2
2
|
import { TextAlign } from '../../@types/Align.js';
|
|
3
3
|
import { Period } from '../../@types/Period.js';
|
|
4
4
|
import { PermissionAttr, OnDenied } from '../../@types/PermissionAttr.js';
|
|
5
|
+
import { WithTooltipProps } from '../../internals/types.js';
|
|
6
|
+
import '../../@types/Position.js';
|
|
5
7
|
|
|
6
8
|
interface CustomInputEvent {
|
|
7
9
|
preventDefault?: () => void;
|
|
@@ -11,10 +13,22 @@ interface CustomInputEvent {
|
|
|
11
13
|
code?: number;
|
|
12
14
|
target: {
|
|
13
15
|
value: string;
|
|
16
|
+
maskedValue?: string;
|
|
17
|
+
typedValue?: number | Date | null;
|
|
14
18
|
name?: string;
|
|
15
19
|
files?: FileList | null;
|
|
16
20
|
};
|
|
17
21
|
}
|
|
22
|
+
interface InputLabelProps extends WithTooltipProps {
|
|
23
|
+
label?: string | string[];
|
|
24
|
+
customClassForLabel?: string;
|
|
25
|
+
styleForLabel?: object;
|
|
26
|
+
labelUppercase?: boolean;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
targetRef?: (ref: HTMLSpanElement | null) => void;
|
|
29
|
+
labelRef?: MutableRefObject<HTMLSpanElement | null>;
|
|
30
|
+
onHoverLabel?: React.MouseEventHandler<HTMLSpanElement>;
|
|
31
|
+
}
|
|
18
32
|
interface IBaseProps {
|
|
19
33
|
inputHasFocus?: boolean;
|
|
20
34
|
onInputReceiveFocus?: () => void;
|
|
@@ -77,6 +91,7 @@ interface IBaseProps {
|
|
|
77
91
|
accept?: string;
|
|
78
92
|
multiple?: boolean;
|
|
79
93
|
readOnlyClass?: string;
|
|
94
|
+
autoComplete?: 'on' | 'off';
|
|
80
95
|
}
|
|
81
96
|
|
|
82
|
-
export { CustomInputEvent, IBaseProps };
|
|
97
|
+
export { CustomInputEvent, IBaseProps, InputLabelProps };
|