linear-react-components-ui 1.1.24-beta.1 → 1.1.24-beta.11
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/lib/BaseMask-0c14ef51.d.ts +24 -0
- package/lib/Cnpj-bde01dd0.d.ts +18 -0
- package/lib/Cpf-3fa496ad.d.ts +18 -0
- package/lib/Phone-2bb0b397.d.ts +18 -0
- package/lib/ZipCode-09460e18.d.ts +13 -0
- package/lib/alerts/AlertProvider.js +1 -2
- package/lib/alerts/BaseAlert.js +1 -1
- package/lib/alerts/Message.js +2 -3
- package/lib/alerts/withAlert.js +1 -2
- package/lib/assets/styles/button.scss +1 -1
- package/lib/assets/styles/calendar.scss +137 -32
- package/lib/assets/styles/datepicker2.scss +8 -10
- package/lib/assets/styles/dialog.scss +1 -1
- package/lib/assets/styles/fieldset.scss +1 -1
- package/lib/assets/styles/file.scss +8 -0
- package/lib/assets/styles/filefield.scss +42 -0
- package/lib/assets/styles/gridlayout.scss +20 -19
- package/lib/assets/styles/multiSelect.scss +6 -6
- package/lib/assets/styles/numberfield.scss +18 -0
- package/lib/assets/styles/radiofield.scss +185 -0
- package/lib/assets/styles/selectfield.scss +6 -4
- package/lib/assets/styles/table.scss +6 -0
- package/lib/assets/styles/tabs.scss +6 -2
- package/lib/assets/styles/textfield.scss +66 -28
- package/lib/avatar/index.js +9 -11
- package/lib/badge/index.js +4 -4
- package/lib/buttons/Button.js +1 -2
- package/lib/buttons/DangerButton.js +1 -1
- package/lib/buttons/DefaultButton.js +6 -15
- package/lib/buttons/InfoButton.js +1 -1
- package/lib/buttons/PrimaryButton.js +1 -1
- package/lib/buttons/SuccessButton.js +1 -1
- package/lib/buttons/WarningButton.js +1 -1
- package/lib/buttons/button_container/index.js +1 -1
- package/lib/buttons/split_button/index.js +2 -2
- package/lib/calendar/base/helpers.js +2 -2
- package/lib/calendar/base/index.js +123 -44
- package/lib/checkbox/index.js +2 -3
- package/lib/dialog/Custom.js +2 -3
- package/lib/dialog/Question.js +5 -4
- package/lib/dialog/base/Content.js +5 -6
- package/lib/dialog/base/Header.js +3 -4
- package/lib/dialog/base/index.js +33 -23
- package/lib/dialog/form/index.js +52 -12
- package/lib/dialog/types.d.ts +4 -0
- package/lib/dialog/wizard/index.js +1 -2
- package/lib/dialog/wizard/progressbar.js +1 -1
- package/lib/dialog/wizard/step.js +1 -1
- package/lib/dialog/wizard/useWizard.js +1 -2
- package/lib/drawer/Content.js +1 -2
- package/lib/drawer/Drawer.js +6 -7
- package/lib/drawer/Header.js +2 -3
- package/lib/dropdown/Popup.js +7 -7
- package/lib/dropdown/helper.js +1 -1
- package/lib/dropdown/withDropdown.js +3 -4
- package/lib/fieldset/index.js +8 -9
- package/lib/form/Field.js +2 -3
- package/lib/form/FieldArray.js +2 -3
- package/lib/form/FieldNumber.js +4 -5
- package/lib/form/FieldPeriod.js +3 -4
- package/lib/form/index.js +3 -4
- package/lib/form/withFieldHOC.js +1 -2
- package/lib/form/withFormSecurity.js +1 -2
- package/lib/form2/helpers.js +1 -1
- package/lib/form2/index.d.ts +1 -1
- package/lib/form2/types.d.ts +7 -3
- package/lib/form2/useForm/index.js +22 -15
- package/lib/gridlayout/GridCol.js +5 -5
- package/lib/gridlayout/GridRow.js +1 -4
- package/lib/hint/index.js +1 -7
- package/lib/icons/helper.d.ts +16 -0
- package/lib/icons/helper.js +16 -0
- package/lib/icons/index.js +9 -9
- package/lib/index-19761a50.d.ts +26 -0
- package/lib/index-208e7f62.d.ts +44 -0
- package/lib/index-35ba9ed8.d.ts +15 -0
- package/lib/index-3b70931d.d.ts +44 -0
- package/lib/index-7dfa8924.d.ts +22 -0
- package/lib/index-9e576346.d.ts +23 -0
- package/lib/index-ecafc8c6.d.ts +30 -0
- package/lib/index-efe0a0e4.d.ts +41 -0
- package/lib/inputs/base/InputTextBase.js +9 -8
- package/lib/inputs/base/helpers.js +3 -7
- package/lib/inputs/base/types.d.ts +1 -1
- package/lib/inputs/color/index.js +2 -3
- package/lib/inputs/date/Dropdown.js +6 -4
- package/lib/inputs/date/index.js +31 -19
- package/lib/inputs/errorMessage/index.js +2 -3
- package/lib/inputs/file/DefaultFile.js +31 -31
- package/lib/inputs/file/DragDropFile.js +18 -17
- package/lib/inputs/file/File.js +6 -5
- package/lib/inputs/file/FileButtonSettings.js +0 -1
- package/lib/inputs/file/index.js +0 -1
- package/lib/inputs/inputHOC.js +1 -2
- package/lib/inputs/mask/BaseMask.js +1 -2
- package/lib/inputs/mask/Cnpj.js +1 -2
- package/lib/inputs/mask/Cpf.js +1 -2
- package/lib/inputs/multiSelect/ActionButtons.js +1 -2
- package/lib/inputs/multiSelect/Dropdown.js +12 -12
- package/lib/inputs/multiSelect/helper.js +2 -1
- package/lib/inputs/multiSelect/index.js +28 -11
- package/lib/inputs/number/BaseNumber.js +1 -1
- package/lib/inputs/number/index.js +3 -3
- package/lib/inputs/period/Dropdown.js +7 -4
- package/lib/inputs/period/PeriodList.js +1 -1
- package/lib/inputs/period/helper.js +1 -3
- package/lib/inputs/period/index.js +66 -40
- package/lib/inputs/period/types.d.ts +4 -1
- package/lib/inputs/search/index.js +8 -5
- package/lib/inputs/select/ActionButtons.js +1 -1
- package/lib/inputs/select/Dropdown.js +3 -4
- package/lib/inputs/select/helper.js +13 -10
- package/lib/inputs/select/multiple/Selecteds.js +2 -2
- package/lib/inputs/select/multiple/index.js +14 -11
- package/lib/inputs/select/simple/index.js +19 -13
- package/lib/inputs/textarea/index.js +1 -1
- package/lib/inputs/types.d.ts +1 -0
- package/lib/inputs2/checkboxfield/index.d.ts +1 -1
- package/lib/inputs2/checkboxfield/index.js +18 -15
- package/lib/inputs2/colorfield/index.d.ts +2 -2
- package/lib/inputs2/colorfield/index.js +5 -5
- package/lib/inputs2/date/base/constants.js +2 -1
- package/lib/inputs2/date/base/index.js +6 -8
- package/lib/inputs2/date/datefield/calendarbox.d.ts +1 -1
- package/lib/inputs2/date/datefield/calendarbox.js +3 -2
- package/lib/inputs2/date/datefield/context.d.ts +1 -0
- package/lib/inputs2/date/datefield/index.d.ts +1 -0
- package/lib/inputs2/date/datefield/index.js +44 -33
- package/lib/inputs2/date/datefield/triggers.js +1 -2
- package/lib/inputs2/date/datefield/types.d.ts +2 -0
- package/lib/inputs2/date/dateperiodfield/calendarbox.d.ts +1 -1
- package/lib/inputs2/date/dateperiodfield/calendarbox.js +8 -6
- package/lib/inputs2/date/dateperiodfield/context.d.ts +1 -0
- package/lib/inputs2/date/dateperiodfield/index.d.ts +1 -0
- package/lib/inputs2/date/dateperiodfield/index.js +66 -48
- package/lib/inputs2/date/dateperiodfield/triggers.js +19 -14
- package/lib/inputs2/date/dateperiodfield/types.d.ts +2 -0
- package/lib/inputs2/date/helpers.d.ts +1 -0
- package/lib/inputs2/date/types.d.ts +2 -1
- package/lib/inputs2/{number/Number.d.ts → filefield/index.d.ts} +2 -2
- package/lib/inputs2/filefield/index.js +174 -0
- package/lib/inputs2/index.d.ts +20 -14
- package/lib/inputs2/index.js +10 -11
- package/lib/inputs2/mask/BaseMask.d.ts +2 -2
- package/lib/inputs2/mask/BaseMask.js +7 -7
- package/lib/inputs2/mask/Cnpj.d.ts +3 -3
- package/lib/inputs2/mask/Cnpj.js +4 -5
- package/lib/inputs2/mask/Cpf.d.ts +3 -3
- package/lib/inputs2/mask/Cpf.js +4 -5
- package/lib/inputs2/mask/Phone.d.ts +3 -3
- package/lib/inputs2/mask/Phone.js +1 -2
- package/lib/inputs2/mask/ZipCode.d.ts +3 -3
- package/lib/inputs2/mask/ZipCode.js +1 -2
- package/lib/inputs2/numberfield/currency.d.ts +13 -0
- package/lib/inputs2/numberfield/currency.js +91 -0
- package/lib/inputs2/numberfield/decimal.d.ts +13 -0
- package/lib/inputs2/{number/BaseNumber.js → numberfield/decimal.js} +57 -58
- package/lib/inputs2/numberfield/helpers.d.ts +30 -0
- package/lib/inputs2/numberfield/helpers.js +53 -0
- package/lib/inputs2/numberfield/index.d.ts +12 -0
- package/lib/inputs2/numberfield/index.js +104 -0
- package/lib/inputs2/numberfield/types.d.ts +36 -0
- package/lib/inputs2/numberfield/types.js +5 -0
- package/lib/inputs2/{number/BaseNumber.d.ts → radiofield/index.d.ts} +4 -5
- package/lib/inputs2/radiofield/index.js +144 -0
- package/lib/inputs2/radiofield/types.d.ts +33 -0
- package/lib/inputs2/radiofield/types.js +5 -0
- package/lib/inputs2/selectfield/context.d.ts +1 -0
- package/lib/inputs2/selectfield/index.d.ts +2 -1
- package/lib/inputs2/selectfield/index.js +118 -58
- package/lib/inputs2/selectfield/item.d.ts +2 -1
- package/lib/inputs2/selectfield/item.js +8 -4
- package/lib/inputs2/selectfield/listbox.d.ts +1 -1
- package/lib/inputs2/selectfield/listbox.js +24 -10
- package/lib/inputs2/selectfield/options.d.ts +9 -0
- package/lib/inputs2/selectfield/options.js +26 -0
- package/lib/inputs2/selectfield/search.d.ts +1 -1
- package/lib/inputs2/selectfield/search.js +3 -4
- package/lib/inputs2/selectfield/selections.d.ts +1 -1
- package/lib/inputs2/selectfield/selections.js +3 -2
- package/lib/inputs2/selectfield/triggers.js +17 -8
- package/lib/inputs2/selectfield/types.d.ts +0 -1
- package/lib/inputs2/slot/index.d.ts +2 -2
- package/lib/inputs2/{number/Decimal.d.ts → textareafield/index.d.ts} +2 -5
- package/lib/inputs2/textareafield/index.js +194 -0
- package/lib/inputs2/textfield/index.d.ts +1 -1
- package/lib/inputs2/textfield/index.js +18 -17
- package/lib/labelMessages/index.js +4 -6
- package/lib/labels/DefaultLabel.js +2 -6
- package/lib/labels/label_container/index.js +1 -1
- package/lib/list/Header.js +1 -1
- package/lib/list/Item.js +10 -12
- package/lib/list/index.js +2 -4
- package/lib/menus/float/MenuItem.js +3 -4
- package/lib/menus/float/SubMenuContainer.js +2 -3
- package/lib/menus/float/index.js +1 -1
- package/lib/menus/sidenav/ExpandMenu.js +1 -1
- package/lib/menus/sidenav/MenuLink.js +1 -2
- package/lib/menus/sidenav/NavMenuGroup.js +2 -3
- package/lib/menus/sidenav/NavMenuItem.js +10 -9
- package/lib/menus/sidenav/NavSubMenuItem.js +2 -3
- package/lib/menus/sidenav/helpers.js +1 -1
- package/lib/menus/sidenav/index.js +6 -7
- package/lib/menus/sidenav/popup_menu_search/index.js +1 -2
- package/lib/panel/Content.js +9 -8
- package/lib/panel/Default.js +3 -4
- package/lib/panel/Header.js +4 -5
- package/lib/permissionValidations.js +1 -1
- package/lib/popover/PopoverText.js +1 -2
- package/lib/popover/index.js +1 -1
- package/lib/progress/Bar.js +6 -6
- package/lib/radio/index.js +3 -4
- package/lib/shortcuts/index.js +1 -1
- package/lib/skeleton/SkeletonContainer.js +1 -2
- package/lib/skeleton/index.js +1 -4
- package/lib/spinner/index.js +3 -4
- package/lib/split/Split.js +2 -3
- package/lib/split/SplitSide.js +4 -5
- package/lib/table/Body.js +4 -5
- package/lib/table/Header.js +9 -7
- package/lib/table/HeaderColumn.js +2 -3
- package/lib/table/Row.js +4 -5
- package/lib/table/RowColumn.js +2 -3
- package/lib/table/index.js +20 -16
- package/lib/table/types.d.ts +1 -0
- package/lib/tabs/DropdownTabs.js +2 -3
- package/lib/tabs/Menu.js +1 -1
- package/lib/tabs/MenuTabs.js +4 -9
- package/lib/tabs/Panel.js +8 -7
- package/lib/tabs/context.js +7 -5
- package/lib/tabs/index.js +3 -4
- package/lib/textContent/index.js +2 -3
- package/lib/toolbar/ButtonBar.js +2 -3
- package/lib/toolbar/LabelBar.js +1 -2
- package/lib/toolbar/index.js +1 -1
- package/lib/tooltip/TooltipContent.js +8 -9
- package/lib/tooltip/useTooltip.js +8 -8
- package/lib/treetable/Body.js +2 -3
- package/lib/treetable/Header.js +3 -4
- package/lib/treetable/Row.js +9 -10
- package/lib/treeview/Header.js +1 -1
- package/lib/treeview/Node.js +5 -6
- package/lib/treeview/index.js +5 -6
- package/lib/uitour/index.js +9 -8
- package/package.json +1 -1
- package/lib/BaseMask-04df8f20.d.ts +0 -24
- package/lib/BaseNumber-c609c5a0.d.ts +0 -23
- package/lib/Cnpj-5471cb1f.d.ts +0 -18
- package/lib/Cpf-71c4f0f4.d.ts +0 -18
- package/lib/Currency-38d14ff7.d.ts +0 -18
- package/lib/Decimal-85d45244.d.ts +0 -13
- package/lib/Number-db3c092d.d.ts +0 -20
- package/lib/Phone-4c4142e4.d.ts +0 -18
- package/lib/ZipCode-dc7dd4da.d.ts +0 -13
- package/lib/calendar/base/Day.d.ts +0 -8
- package/lib/calendar/base/Day.js +0 -36
- package/lib/calendar/base/Month.d.ts +0 -8
- package/lib/calendar/base/Month.js +0 -39
- package/lib/calendar/base/Week.d.ts +0 -8
- package/lib/calendar/base/Week.js +0 -35
- package/lib/index-379b7504.d.ts +0 -44
- package/lib/index-7cb5e8b3.d.ts +0 -41
- package/lib/index-809a7899.d.ts +0 -23
- package/lib/index-de21a05e.d.ts +0 -23
- package/lib/inputs2/number/Currency.d.ts +0 -11
- package/lib/inputs2/number/Currency.js +0 -47
- package/lib/inputs2/number/Decimal.js +0 -36
- package/lib/inputs2/number/Number.js +0 -49
- package/lib/inputs2/number/format_number.d.ts +0 -5
- package/lib/inputs2/number/format_number.js +0 -29
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { TextAlign } from './@types/Align.js';
|
|
3
|
+
import { ColorTheme } from './@types/ColorStyles.js';
|
|
4
|
+
import { HintPosition, Position } from './@types/Position.js';
|
|
5
|
+
import { PermissionAttr, OnDenied } from './@types/PermissionAttr.js';
|
|
6
|
+
import { LeftSlot, RightSlot } from './inputs2/slot/index.js';
|
|
7
|
+
import { ITooltipCommonProps } from './tooltip/types.js';
|
|
8
|
+
|
|
9
|
+
interface TextFieldInputProps extends React__default.ComponentPropsWithoutRef<'input'>, ITooltipCommonProps {
|
|
10
|
+
hint?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
errors?: string[];
|
|
13
|
+
gridLayout?: string;
|
|
14
|
+
customClass?: string;
|
|
15
|
+
customClassLabel?: string;
|
|
16
|
+
customClassWrapper?: string;
|
|
17
|
+
customClassInputContainer?: string;
|
|
18
|
+
rounded?: boolean;
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
skeletonize?: boolean;
|
|
21
|
+
labelUppercase?: boolean;
|
|
22
|
+
textAlign?: TextAlign;
|
|
23
|
+
hintPosition?: HintPosition;
|
|
24
|
+
themePopover?: ColorTheme;
|
|
25
|
+
popoverAlign?: Extract<Position, 'left' | 'right'>;
|
|
26
|
+
permissionAttr?: PermissionAttr;
|
|
27
|
+
onDeniedActions?: OnDenied;
|
|
28
|
+
}
|
|
29
|
+
declare const Input: React__default.ForwardRefExoticComponent<TextFieldInputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
30
|
+
|
|
31
|
+
declare const index_Input: typeof Input;
|
|
32
|
+
declare const index_LeftSlot: typeof LeftSlot;
|
|
33
|
+
declare const index_RightSlot: typeof RightSlot;
|
|
34
|
+
type index_TextFieldInputProps = TextFieldInputProps;
|
|
35
|
+
declare namespace index {
|
|
36
|
+
export {
|
|
37
|
+
index_Input as Input,
|
|
38
|
+
index_LeftSlot as LeftSlot,
|
|
39
|
+
index_RightSlot as RightSlot,
|
|
40
|
+
index_TextFieldInputProps as TextFieldInputProps,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { Input as I, TextFieldInputProps as T, index as i };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { T as TextFieldInputProps } from './index-3b70931d.js';
|
|
3
|
+
|
|
4
|
+
interface FileFieldInputProps extends Omit<TextFieldInputProps, 'type'> {
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
accept?: string;
|
|
7
|
+
maxSize?: number;
|
|
8
|
+
gridLayout?: string;
|
|
9
|
+
showClearButton?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Input: React__default.ForwardRefExoticComponent<FileFieldInputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
12
|
+
|
|
13
|
+
type index_FileFieldInputProps = FileFieldInputProps;
|
|
14
|
+
declare const index_Input: typeof Input;
|
|
15
|
+
declare namespace index {
|
|
16
|
+
export {
|
|
17
|
+
index_FileFieldInputProps as FileFieldInputProps,
|
|
18
|
+
index_Input as Input,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { FileFieldInputProps as F, Input as I, index as i };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { LeftSlot, RightSlot } from './inputs2/slot/index.js';
|
|
3
|
+
import { T as TextFieldInputProps } from './index-3b70931d.js';
|
|
4
|
+
|
|
5
|
+
interface ColorFieldInputProps extends TextFieldInputProps {
|
|
6
|
+
isTypeText?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Input: React__default.ForwardRefExoticComponent<ColorFieldInputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
9
|
+
|
|
10
|
+
type index_ColorFieldInputProps = ColorFieldInputProps;
|
|
11
|
+
declare const index_Input: typeof Input;
|
|
12
|
+
declare const index_LeftSlot: typeof LeftSlot;
|
|
13
|
+
declare const index_RightSlot: typeof RightSlot;
|
|
14
|
+
declare namespace index {
|
|
15
|
+
export {
|
|
16
|
+
index_ColorFieldInputProps as ColorFieldInputProps,
|
|
17
|
+
index_Input as Input,
|
|
18
|
+
index_LeftSlot as LeftSlot,
|
|
19
|
+
index_RightSlot as RightSlot,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { ColorFieldInputProps as C, Input as I, index as i };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { LeftSlot, RightSlot } from './inputs2/slot/index.js';
|
|
3
|
+
import { Decimal } from './inputs2/numberfield/decimal.js';
|
|
4
|
+
import { Currency } from './inputs2/numberfield/currency.js';
|
|
5
|
+
import { NumberFieldInputProps, CurrencyFieldInputProps, DecimalFieldInputProps } from './inputs2/numberfield/types.js';
|
|
6
|
+
|
|
7
|
+
declare const Input: React__default.ForwardRefExoticComponent<NumberFieldInputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
8
|
+
|
|
9
|
+
declare const index_Currency: typeof Currency;
|
|
10
|
+
declare const index_CurrencyFieldInputProps: typeof CurrencyFieldInputProps;
|
|
11
|
+
declare const index_Decimal: typeof Decimal;
|
|
12
|
+
declare const index_DecimalFieldInputProps: typeof DecimalFieldInputProps;
|
|
13
|
+
declare const index_Input: typeof Input;
|
|
14
|
+
declare const index_LeftSlot: typeof LeftSlot;
|
|
15
|
+
declare const index_NumberFieldInputProps: typeof NumberFieldInputProps;
|
|
16
|
+
declare const index_RightSlot: typeof RightSlot;
|
|
17
|
+
declare namespace index {
|
|
18
|
+
export {
|
|
19
|
+
index_Currency as Currency,
|
|
20
|
+
index_CurrencyFieldInputProps as CurrencyFieldInputProps,
|
|
21
|
+
index_Decimal as Decimal,
|
|
22
|
+
index_DecimalFieldInputProps as DecimalFieldInputProps,
|
|
23
|
+
index_Input as Input,
|
|
24
|
+
index_LeftSlot as LeftSlot,
|
|
25
|
+
index_NumberFieldInputProps as NumberFieldInputProps,
|
|
26
|
+
index_RightSlot as RightSlot,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { Input as I, index as i };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { Size } from './@types/Size.js';
|
|
3
|
+
import { ColorTheme } from './@types/ColorStyles.js';
|
|
4
|
+
import { ITooltipCommonProps } from './tooltip/types.js';
|
|
5
|
+
import { HintPosition, Position } from './@types/Position.js';
|
|
6
|
+
import { PermissionAttr, OnDenied } from './@types/PermissionAttr.js';
|
|
7
|
+
|
|
8
|
+
type InputHTMLProps = Omit<React__default.ComponentProps<'input'>, 'size' | 'type'>;
|
|
9
|
+
interface CheckboxFieldInputProps extends InputHTMLProps, ITooltipCommonProps {
|
|
10
|
+
hint?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
size?: Exclude<Size, 'mini'>;
|
|
13
|
+
variant?: 'default' | 'secondary';
|
|
14
|
+
errors?: string[];
|
|
15
|
+
gridLayout?: string;
|
|
16
|
+
customClass?: string;
|
|
17
|
+
customClassLabel?: string;
|
|
18
|
+
customClassWrapper?: string;
|
|
19
|
+
customClassInputContainer?: string;
|
|
20
|
+
rounded?: boolean;
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
skeletonize?: boolean;
|
|
23
|
+
labelUppercase?: boolean;
|
|
24
|
+
hintPosition?: HintPosition;
|
|
25
|
+
themePopover?: ColorTheme;
|
|
26
|
+
popoverAlign?: Extract<Position, 'left' | 'right'>;
|
|
27
|
+
permissionAttr?: PermissionAttr;
|
|
28
|
+
onDeniedActions?: OnDenied;
|
|
29
|
+
}
|
|
30
|
+
declare const Input: React__default.ForwardRefExoticComponent<Pick<CheckboxFieldInputProps, "form" | "label" | "slot" | "style" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "align" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "customClass" | "permissionAttr" | "size" | "skeletonize" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "tooltip" | "tooltipWidth" | "tooltipPosition" | "checked" | "required" | "labelUppercase" | "hint" | "hintPosition" | "themePopover" | "popoverAlign" | "width" | "height" | "multiple" | "readOnly" | "list" | "step" | "maxLength" | "rounded" | "onDeniedActions" | "gridLayout" | "accept" | "autoComplete" | "max" | "min" | "src" | "alt" | "errors" | "capture" | "crossOrigin" | "enterKeyHint" | "minLength" | "customClassLabel" | "customClassWrapper" | "customClassInputContainer" | "variant"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
31
|
+
|
|
32
|
+
type index_CheckboxFieldInputProps = CheckboxFieldInputProps;
|
|
33
|
+
declare const index_Input: typeof Input;
|
|
34
|
+
declare namespace index {
|
|
35
|
+
export {
|
|
36
|
+
index_CheckboxFieldInputProps as CheckboxFieldInputProps,
|
|
37
|
+
index_Input as Input,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { CheckboxFieldInputProps as C, Input as I, index as i };
|
|
@@ -16,8 +16,7 @@ var _textContent = _interopRequireDefault(require("../../textContent"));
|
|
|
16
16
|
var _popover = _interopRequireWildcard(require("../../popover"));
|
|
17
17
|
var _tooltip = require("../../tooltip");
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
-
function
|
|
20
|
-
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; }
|
|
19
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
21
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); }
|
|
22
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; }
|
|
23
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; }
|
|
@@ -131,11 +130,13 @@ const InputTextBase = props => {
|
|
|
131
130
|
if (!disableCallbacks) {
|
|
132
131
|
propsInput = _objectSpread(_objectSpread({}, propsInput), {}, {
|
|
133
132
|
onFocus: e => {
|
|
134
|
-
|
|
133
|
+
var _props$onInputReceive;
|
|
134
|
+
(_props$onInputReceive = props.onInputReceiveFocus) === null || _props$onInputReceive === void 0 ? void 0 : _props$onInputReceive.call(props);
|
|
135
135
|
if (props.onFocus) props.onFocus(e);
|
|
136
136
|
},
|
|
137
137
|
onBlur: e => {
|
|
138
|
-
|
|
138
|
+
var _props$onInputLostFoc;
|
|
139
|
+
(_props$onInputLostFoc = props.onInputLostFocus) === null || _props$onInputLostFoc === void 0 ? void 0 : _props$onInputLostFoc.call(props);
|
|
139
140
|
if (props.onBlur) props.onBlur(e);
|
|
140
141
|
},
|
|
141
142
|
onKeyDown: e => {
|
|
@@ -199,7 +200,7 @@ const InputTextBase = props => {
|
|
|
199
200
|
if (!visible || unvisible) return null;
|
|
200
201
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
201
202
|
style: style,
|
|
202
|
-
className:
|
|
203
|
+
className: "input-base-component ".concat(skeletonize ? '-skeletonized' : '', " ").concat(customClass),
|
|
203
204
|
ref: inputBaseRef
|
|
204
205
|
}, label && /*#__PURE__*/_react.default.createElement("div", {
|
|
205
206
|
className: "labelcontainer",
|
|
@@ -221,7 +222,7 @@ const InputTextBase = props => {
|
|
|
221
222
|
display: 'flex'
|
|
222
223
|
}
|
|
223
224
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
224
|
-
className:
|
|
225
|
+
className: "label ".concat(customClassForLabel, " ").concat(labelUppercase && ' -uppercase'),
|
|
225
226
|
style: {
|
|
226
227
|
alignSelf: 'center'
|
|
227
228
|
}
|
|
@@ -247,11 +248,11 @@ const InputTextBase = props => {
|
|
|
247
248
|
}))
|
|
248
249
|
}, leftElements && /*#__PURE__*/_react.default.createElement("div", {
|
|
249
250
|
style: styleForSideButtons,
|
|
250
|
-
className:
|
|
251
|
+
className: "sidebuttons ".concat(customClassForSideButtons)
|
|
251
252
|
}, leftElements), /*#__PURE__*/_react.default.createElement("div", {
|
|
252
253
|
"data-testid": "testInputContent",
|
|
253
254
|
style: styleForInputContent,
|
|
254
|
-
className:
|
|
255
|
+
className: "inputcontent ".concat(customClassForInputContent)
|
|
255
256
|
}, type === 'textarea' ? /*#__PURE__*/_react.default.createElement("textarea", _extends({
|
|
256
257
|
rows: props.rows,
|
|
257
258
|
cols: props.cols,
|
|
@@ -13,7 +13,7 @@ const getInputClass = _ref => {
|
|
|
13
13
|
readOnly,
|
|
14
14
|
readOnlyClass
|
|
15
15
|
} = _ref;
|
|
16
|
-
return
|
|
16
|
+
return "textinput text-align-".concat(textAlign, " ").concat(readOnlyClass, " ").concat(readOnly ? ' -readonly' : '');
|
|
17
17
|
};
|
|
18
18
|
exports.getInputClass = getInputClass;
|
|
19
19
|
const getInputWrapperClass = props => {
|
|
@@ -24,11 +24,7 @@ const getInputWrapperClass = props => {
|
|
|
24
24
|
errorMessages,
|
|
25
25
|
disabled
|
|
26
26
|
} = props;
|
|
27
|
-
return
|
|
28
|
-
${customClassForWrapper}
|
|
29
|
-
${errorMessages && errorMessages.length > 0 && ' -requirederror'}
|
|
30
|
-
${rounded && ' -roundedborders'}
|
|
31
|
-
${disabled && ' -disabled'}`;
|
|
27
|
+
return "inputwrapper ".concat(inputHasFocus && ' -focusable', "\n ").concat(customClassForWrapper, "\n ").concat(errorMessages && errorMessages.length > 0 && ' -requirederror', "\n ").concat(rounded && ' -roundedborders', "\n ").concat(disabled && ' -disabled');
|
|
32
28
|
};
|
|
33
29
|
exports.getInputWrapperClass = getInputWrapperClass;
|
|
34
30
|
const getRightElements = (errorMessages, skeletonize, rightElements) => {
|
|
@@ -38,7 +34,7 @@ const getRightElements = (errorMessages, skeletonize, rightElements) => {
|
|
|
38
34
|
elements = [elements];
|
|
39
35
|
}
|
|
40
36
|
elements = elements.map((element, index) => element && /*#__PURE__*/_react.default.cloneElement(element, {
|
|
41
|
-
key:
|
|
37
|
+
key: "rightelement-".concat(index + 1)
|
|
42
38
|
}));
|
|
43
39
|
if (errorMessages) return elements;
|
|
44
40
|
return elements;
|
|
@@ -54,7 +54,7 @@ interface IBaseProps extends ITooltipCommonProps {
|
|
|
54
54
|
onDragLeave?: (e: DragEvent) => void;
|
|
55
55
|
leftElements?: JSX.Element | JSX.Element[];
|
|
56
56
|
rightElements?: JSX.Element | JSX.Element[];
|
|
57
|
-
children?:
|
|
57
|
+
children?: React.ReactNode;
|
|
58
58
|
customClass?: string;
|
|
59
59
|
customClassForWrapper?: string;
|
|
60
60
|
customClassForInputContent?: string;
|
|
@@ -10,8 +10,7 @@ var _text = _interopRequireDefault(require("../text"));
|
|
|
10
10
|
var _buttons = _interopRequireDefault(require("../../buttons"));
|
|
11
11
|
require("../../assets/styles/colorpicker.scss");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
function
|
|
14
|
-
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; }
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
14
|
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); }
|
|
16
15
|
const ColorPicker = props => {
|
|
17
16
|
const {
|
|
@@ -71,7 +70,7 @@ const ColorPicker = props => {
|
|
|
71
70
|
ref: inputRef,
|
|
72
71
|
type: "color",
|
|
73
72
|
defaultValue: color,
|
|
74
|
-
name: name,
|
|
73
|
+
name: "".concat(name, "-hidden"),
|
|
75
74
|
onClick: e => onButtonClick ? onButtonClick(e) : undefined,
|
|
76
75
|
onInput: onInputChangeDefault
|
|
77
76
|
})],
|
|
@@ -20,18 +20,20 @@ const Dropdown = props => {
|
|
|
20
20
|
const elementRef = (0, _react.useRef)(document.createElement('div'));
|
|
21
21
|
const width = inputDimensions && inputDimensions.width + (showButtonOpen ? CALENDAR_BUTTON_WIDTH : 0) + 4 || CALENDAR_MIN_WIDTH;
|
|
22
22
|
(0, _react.useEffect)(() => {
|
|
23
|
+
var _containerRef$current;
|
|
23
24
|
elementRef.current.className = 'datepicker-component';
|
|
24
25
|
elementRef.current.style.width = String(width).concat('px');
|
|
25
|
-
elementRef.current.style.top = String(inputDimensions
|
|
26
|
-
containerRef.current
|
|
26
|
+
elementRef.current.style.top = String(inputDimensions === null || inputDimensions === void 0 ? void 0 : inputDimensions.bottom).concat('px');
|
|
27
|
+
(_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.appendChild(elementRef.current);
|
|
27
28
|
dropdownRef(elementRef.current);
|
|
28
29
|
return () => {
|
|
29
|
-
|
|
30
|
+
var _containerRef$current2;
|
|
31
|
+
(_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.removeChild(elementRef.current);
|
|
30
32
|
};
|
|
31
33
|
}, []);
|
|
32
34
|
(0, _react.useEffect)(() => {
|
|
33
35
|
elementRef.current.style.width = String(width).concat('px');
|
|
34
|
-
elementRef.current.style.top = String(inputDimensions
|
|
36
|
+
elementRef.current.style.top = String(inputDimensions === null || inputDimensions === void 0 ? void 0 : inputDimensions.bottom).concat('px');
|
|
35
37
|
}, [props]);
|
|
36
38
|
return /*#__PURE__*/_reactDom.default.createPortal(children, elementRef.current);
|
|
37
39
|
};
|
package/lib/inputs/date/index.js
CHANGED
|
@@ -15,8 +15,7 @@ var _helpers = require("./helpers");
|
|
|
15
15
|
require("../../assets/styles/datepicker.scss");
|
|
16
16
|
var _BaseMask = _interopRequireDefault(require("../mask/BaseMask"));
|
|
17
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
-
function
|
|
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; }
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
20
19
|
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
20
|
const DatePicker = props => {
|
|
22
21
|
const {
|
|
@@ -59,32 +58,37 @@ const DatePicker = props => {
|
|
|
59
58
|
const calendarContainerRef = (0, _react.useRef)(null);
|
|
60
59
|
const datePickerContainerRef = (0, _react.useRef)(null);
|
|
61
60
|
const onScreenResize = () => {
|
|
62
|
-
|
|
61
|
+
var _inputDateRef$current;
|
|
62
|
+
setInputDimensions(inputDateRef === null || inputDateRef === void 0 ? void 0 : (_inputDateRef$current = inputDateRef.current) === null || _inputDateRef$current === void 0 ? void 0 : _inputDateRef$current.getBoundingClientRect());
|
|
63
63
|
};
|
|
64
64
|
const onCloseDateDialog = () => {
|
|
65
65
|
setShowCalendar(false);
|
|
66
66
|
if (showCalendarInDialog) {
|
|
67
67
|
setTimeout(() => {
|
|
68
|
+
var _inputDateRef$current2;
|
|
68
69
|
setCalendarOnDialog(false);
|
|
69
|
-
inputDateRef.current
|
|
70
|
+
(_inputDateRef$current2 = inputDateRef.current) === null || _inputDateRef$current2 === void 0 ? void 0 : _inputDateRef$current2.focus();
|
|
70
71
|
}, 100);
|
|
71
72
|
}
|
|
72
73
|
};
|
|
73
74
|
const onCloseWithoutBlur = event => {
|
|
74
|
-
|
|
75
|
+
var _datePickerContainerR;
|
|
76
|
+
const focusOnAnotherField = !((_datePickerContainerR = datePickerContainerRef.current) !== null && _datePickerContainerR !== void 0 && _datePickerContainerR.contains(event.relatedTarget));
|
|
75
77
|
if (!showCalendarInDialog && showCalendar && focusOnAnotherField) {
|
|
76
78
|
setShowCalendar(false);
|
|
77
79
|
}
|
|
78
80
|
};
|
|
79
81
|
const onKeyDownPress = event => {
|
|
80
82
|
if (shouldCloseOnEsc && showCalendar && event && event.key && event.key === 'Escape') {
|
|
83
|
+
var _inputDateRef$current3;
|
|
81
84
|
event.preventDefault();
|
|
82
85
|
setShowCalendar(false);
|
|
83
|
-
inputDateRef.current
|
|
86
|
+
(_inputDateRef$current3 = inputDateRef.current) === null || _inputDateRef$current3 === void 0 ? void 0 : _inputDateRef$current3.focus();
|
|
84
87
|
}
|
|
85
88
|
if (showCalendar && showCalendarInDialog && event && event.key && event.key === 'Tab') {
|
|
86
|
-
|
|
87
|
-
const
|
|
89
|
+
var _calendarContainerRef, _calendarContainerRef2;
|
|
90
|
+
const buttonForNavigateCalendar = (_calendarContainerRef = calendarContainerRef.current) === null || _calendarContainerRef === void 0 ? void 0 : _calendarContainerRef.getElementsByClassName('navbutton');
|
|
91
|
+
const datePicked = (_calendarContainerRef2 = calendarContainerRef.current) === null || _calendarContainerRef2 === void 0 ? void 0 : _calendarContainerRef2.getElementsByClassName('-selectedday');
|
|
88
92
|
const buttonDatePicked = datePicked[0].firstChild;
|
|
89
93
|
const buttonsForFocus = Array.from([...buttonForNavigateCalendar, buttonDatePicked]);
|
|
90
94
|
const firstElement = buttonsForFocus[0];
|
|
@@ -100,7 +104,8 @@ const DatePicker = props => {
|
|
|
100
104
|
event.stopPropagation();
|
|
101
105
|
};
|
|
102
106
|
const keepPositionCalendarByScroll = () => {
|
|
103
|
-
|
|
107
|
+
var _inputDateRef$current4;
|
|
108
|
+
const inputDateDimensions = (_inputDateRef$current4 = inputDateRef.current) === null || _inputDateRef$current4 === void 0 ? void 0 : _inputDateRef$current4.getBoundingClientRect();
|
|
104
109
|
const positionTop = inputDateDimensions && inputDateDimensions.bottom;
|
|
105
110
|
if (dropdownContainer && dropdownContainer.current && inputDateDimensions) {
|
|
106
111
|
dropdownContainer.current.style.top = String(positionTop).concat('px');
|
|
@@ -109,12 +114,14 @@ const DatePicker = props => {
|
|
|
109
114
|
const openCalendar = () => {
|
|
110
115
|
setShowCalendar(true);
|
|
111
116
|
if (inputDateRef.current) {
|
|
117
|
+
var _inputDateRef$current5;
|
|
112
118
|
inputDateRef.current.focus();
|
|
113
|
-
setInputDimensions(inputDateRef.current
|
|
119
|
+
setInputDimensions((_inputDateRef$current5 = inputDateRef.current) === null || _inputDateRef$current5 === void 0 ? void 0 : _inputDateRef$current5.getBoundingClientRect());
|
|
114
120
|
}
|
|
115
121
|
if (showCalendarInDialog) {
|
|
116
122
|
setTimeout(() => {
|
|
117
|
-
|
|
123
|
+
var _currentDateButtonRef;
|
|
124
|
+
(_currentDateButtonRef = currentDateButtonRef.current) === null || _currentDateButtonRef === void 0 ? void 0 : _currentDateButtonRef.focus();
|
|
118
125
|
}, 100);
|
|
119
126
|
}
|
|
120
127
|
};
|
|
@@ -138,7 +145,8 @@ const DatePicker = props => {
|
|
|
138
145
|
const onInputChange = function (event) {
|
|
139
146
|
let valueInput = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
140
147
|
if (typeof valueInput === 'string') {
|
|
141
|
-
|
|
148
|
+
var _event$target$value;
|
|
149
|
+
const date = (_event$target$value = event.target.value) !== null && _event$target$value !== void 0 ? _event$target$value : '';
|
|
142
150
|
if (props.onChange) {
|
|
143
151
|
if (isValidDate(date)) {
|
|
144
152
|
const newValue = (0, _moment.default)(date, brFormatter).format(usFormatter);
|
|
@@ -164,11 +172,12 @@ const DatePicker = props => {
|
|
|
164
172
|
}
|
|
165
173
|
};
|
|
166
174
|
const setValue = (valueParam, e) => {
|
|
167
|
-
|
|
175
|
+
var _inputDateRef$current6;
|
|
176
|
+
if (showCalendar && setFocusOnSelect) (_inputDateRef$current6 = inputDateRef.current) === null || _inputDateRef$current6 === void 0 ? void 0 : _inputDateRef$current6.focus();
|
|
168
177
|
if (props.onComplete) props.onComplete(e, valueParam);
|
|
169
178
|
if (props.onChange) onInputChange({
|
|
170
179
|
target: {
|
|
171
|
-
value: valueParam
|
|
180
|
+
value: valueParam !== null && valueParam !== void 0 ? valueParam : '',
|
|
172
181
|
name
|
|
173
182
|
}
|
|
174
183
|
}, valueParam);
|
|
@@ -213,7 +222,7 @@ const DatePicker = props => {
|
|
|
213
222
|
return /*#__PURE__*/_react.default.createElement(_Dialog.default, {
|
|
214
223
|
dialogSize: dialogSize,
|
|
215
224
|
handlerClose: onCloseDateDialog
|
|
216
|
-
}, getCalendar(valueState, props
|
|
225
|
+
}, getCalendar(valueState, props === null || props === void 0 ? void 0 : props.calendarColorStyle));
|
|
217
226
|
}
|
|
218
227
|
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
|
|
219
228
|
showButtonOpen: showButtonOpen,
|
|
@@ -222,7 +231,7 @@ const DatePicker = props => {
|
|
|
222
231
|
dropdownRef: el => {
|
|
223
232
|
dropdownContainer.current = el;
|
|
224
233
|
}
|
|
225
|
-
}, getCalendar(valueState, props
|
|
234
|
+
}, getCalendar(valueState, props === null || props === void 0 ? void 0 : props.calendarColorStyle));
|
|
226
235
|
};
|
|
227
236
|
(0, _react.useEffect)(() => {
|
|
228
237
|
if (value && (0, _moment.default)(value, usFormatter).format() !== 'Invalid date' && (0, _moment.default)(valueFromProps, usFormatter).format() !== (0, _moment.default)(value, usFormatter).format()) {
|
|
@@ -244,11 +253,13 @@ const DatePicker = props => {
|
|
|
244
253
|
};
|
|
245
254
|
}, [inputDateRef.current, showCalendar]);
|
|
246
255
|
(0, _react.useEffect)(() => {
|
|
256
|
+
var _document$getElementB;
|
|
247
257
|
document.addEventListener('scroll', keepPositionCalendarByScroll);
|
|
248
|
-
document.getElementById('modal-dialog-content')
|
|
258
|
+
(_document$getElementB = document.getElementById('modal-dialog-content')) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.addEventListener('scroll', keepPositionCalendarByScroll);
|
|
249
259
|
return () => {
|
|
260
|
+
var _document$getElementB2;
|
|
250
261
|
document.removeEventListener('scroll', keepPositionCalendarByScroll);
|
|
251
|
-
document.getElementById('modal-dialog-content')
|
|
262
|
+
(_document$getElementB2 = document.getElementById('modal-dialog-content')) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.removeEventListener('scroll', keepPositionCalendarByScroll);
|
|
252
263
|
};
|
|
253
264
|
}, []);
|
|
254
265
|
if (onDenied && onDenied.unvisible) return null;
|
|
@@ -265,7 +276,8 @@ const DatePicker = props => {
|
|
|
265
276
|
blocks: !isDateTimeField ? {} : _helpers.blocksDateTimeFormat,
|
|
266
277
|
onComplete: e => {
|
|
267
278
|
if (e) {
|
|
268
|
-
|
|
279
|
+
var _e$target;
|
|
280
|
+
setValue((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.maskedValue, e);
|
|
269
281
|
}
|
|
270
282
|
},
|
|
271
283
|
onBlur: onInputBlur,
|
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.ErrorMessage = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
require("../../assets/styles/error.scss");
|
|
9
|
-
function
|
|
10
|
-
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; }
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
10
|
const ErrorMessage = exports.ErrorMessage = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
12
11
|
let {
|
|
13
12
|
customClass = '',
|
|
@@ -19,7 +18,7 @@ const ErrorMessage = exports.ErrorMessage = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
19
18
|
return /*#__PURE__*/_react.default.createElement("p", {
|
|
20
19
|
ref: ref,
|
|
21
20
|
style: style,
|
|
22
|
-
className:
|
|
21
|
+
className: "errormessages-component ".concat(customClass)
|
|
23
22
|
}, messages.join(', '));
|
|
24
23
|
});
|
|
25
24
|
ErrorMessage.displayName = 'ErrorMessage';
|
|
@@ -13,8 +13,7 @@ var _buttons = _interopRequireDefault(require("../../buttons"));
|
|
|
13
13
|
var _icons = _interopRequireDefault(require("../../icons"));
|
|
14
14
|
var _popover = _interopRequireWildcard(require("../../popover"));
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
function
|
|
17
|
-
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; }
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
17
|
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); }
|
|
19
18
|
const DefaultFile = props => {
|
|
20
19
|
const {
|
|
@@ -25,22 +24,45 @@ const DefaultFile = props => {
|
|
|
25
24
|
inputRef,
|
|
26
25
|
defaultFiles,
|
|
27
26
|
hint = '',
|
|
27
|
+
multiple,
|
|
28
28
|
onChange
|
|
29
29
|
} = props;
|
|
30
|
-
const getFilesList = files => !files
|
|
30
|
+
const getFilesList = files => !(files !== null && files !== void 0 && files.length) ? [] : _lodash.default.map(files, file => file);
|
|
31
31
|
const [fileList, setFileList] = (0, _react.useState)(defaultFiles);
|
|
32
32
|
const ifExistFiles = fileList instanceof Array && fileList.length > 0;
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
const handleChange = e => {
|
|
34
|
+
var _e$preventDefault;
|
|
35
|
+
(_e$preventDefault = e.preventDefault) === null || _e$preventDefault === void 0 ? void 0 : _e$preventDefault.call(e);
|
|
36
|
+
const files = getFilesList(e.target.files);
|
|
37
|
+
setFileList(files);
|
|
38
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(files, e);
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: "input-simple-file-container"
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_InputTextBase.default, _extends({}, props, {
|
|
43
|
+
hint: hint,
|
|
44
|
+
readOnlyClass: "-disabledVisualApply",
|
|
45
|
+
customClassForWrapper: "file-wrapper",
|
|
46
|
+
customClassForInputContent: "file-content -absolute -pointEventDisabled -disabledVisualApply",
|
|
47
|
+
type: "file",
|
|
48
|
+
id: id,
|
|
49
|
+
accept: accept,
|
|
50
|
+
inputRef: inputRef,
|
|
51
|
+
onChange: handleChange,
|
|
52
|
+
rightElements: /*#__PURE__*/_react.default.createElement(_FileButtonSettings.default, {
|
|
53
|
+
id: id,
|
|
54
|
+
onBtnClickInsert: () => onBtnClickInsert()
|
|
55
|
+
})
|
|
56
|
+
}), multiple && /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
+
className: "size-position-icon ".concat(!ifExistFiles ? '-disabled-popover' : '')
|
|
35
58
|
}, /*#__PURE__*/_react.default.createElement(_popover.default, {
|
|
36
59
|
iconSize: 16
|
|
37
60
|
}, /*#__PURE__*/_react.default.createElement(_popover.PopoverText, null, /*#__PURE__*/_react.default.createElement("strong", null, "Arquivos"), /*#__PURE__*/_react.default.createElement("br", null), ifExistFiles && fileList.map(file => /*#__PURE__*/_react.default.createElement("div", {
|
|
38
61
|
className: "list-simple-file",
|
|
39
|
-
key:
|
|
62
|
+
key: "".concat(file.name).concat(file.size)
|
|
40
63
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
41
64
|
className: "file-name"
|
|
42
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, file.name)))))))
|
|
43
|
-
const buttonRemoveFile = () => /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, file.name))))))), /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
44
66
|
disabled: !ifExistFiles,
|
|
45
67
|
className: "-pointerEventsRemove",
|
|
46
68
|
transparent: true,
|
|
@@ -53,28 +75,6 @@ const DefaultFile = props => {
|
|
|
53
75
|
customClass: "colorIconUpload",
|
|
54
76
|
name: "close"
|
|
55
77
|
})
|
|
56
|
-
});
|
|
57
|
-
const handleChange = e => {
|
|
58
|
-
e.preventDefault?.();
|
|
59
|
-
const files = getFilesList(e.target.files);
|
|
60
|
-
setFileList(files);
|
|
61
|
-
onChange?.(files, e);
|
|
62
|
-
};
|
|
63
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
-
className: "input-simple-file-container"
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(_InputTextBase.default, _extends({}, props, {
|
|
66
|
-
hint: hint,
|
|
67
|
-
readOnlyClass: "-disabledVisualApply",
|
|
68
|
-
customClassForInputContent: "-absolute -pointEventDisabled -disabledVisualApply",
|
|
69
|
-
type: "file",
|
|
70
|
-
id: id,
|
|
71
|
-
accept: accept,
|
|
72
|
-
inputRef: inputRef,
|
|
73
|
-
onChange: handleChange,
|
|
74
|
-
rightElements: /*#__PURE__*/_react.default.createElement(_FileButtonSettings.default, {
|
|
75
|
-
id: id,
|
|
76
|
-
onBtnClickInsert: onBtnClickInsert
|
|
77
|
-
})
|
|
78
|
-
}), popUpDescription(), buttonRemoveFile()));
|
|
78
|
+
})));
|
|
79
79
|
};
|
|
80
80
|
var _default = exports.default = DefaultFile;
|