linear-react-components-ui 1.1.13 → 1.1.14-beta.0
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/.eslintrc.json +77 -45
- package/.gitlab-ci.yml +5 -13
- package/.tool-versions +1 -0
- package/.vscode/settings.json +3 -12
- package/babel.config.json +4 -4
- package/lib/@types/SizePixels.d.ts +1 -1
- package/lib/alerts/AlertContainer.js +56 -47
- package/lib/alerts/AlertProvider.js +51 -33
- package/lib/alerts/BaseAlert.js +18 -11
- package/lib/alerts/Message.d.ts +1 -1
- package/lib/alerts/Message.js +44 -77
- package/lib/alerts/helpers.js +3 -2
- package/lib/alerts/index.js +3 -2
- package/lib/alerts/types.d.ts +0 -1
- package/lib/alerts/withAlert.js +9 -8
- package/lib/assets/styles/alerts.scss +7 -4
- package/lib/assets/styles/button.scss +9 -11
- package/lib/assets/styles/checkbox.scss +38 -45
- package/lib/assets/styles/colors.scss +1 -3
- package/lib/assets/styles/commons.scss +0 -1
- package/lib/assets/styles/dialog.scss +20 -37
- package/lib/assets/styles/drawers.scss +6 -9
- package/lib/assets/styles/fieldset.scss +0 -3
- package/lib/assets/styles/gridlayout.scss +2 -0
- package/lib/assets/styles/hint.scss +0 -21
- package/lib/assets/styles/icon.scss +4 -31
- package/lib/assets/styles/input.scss +7 -7
- package/lib/assets/styles/multiSelect.scss +1 -6
- package/lib/assets/styles/radio.scss +35 -37
- package/lib/assets/styles/select.scss +7 -13
- package/lib/assets/styles/table.scss +1 -9
- package/lib/assets/styles/tabs.scss +18 -28
- package/lib/avatar/index.js +39 -39
- package/lib/badge/index.js +13 -11
- package/lib/buttons/ActivateButton.js +7 -4
- package/lib/buttons/AddButton.js +10 -7
- package/lib/buttons/Button.js +9 -8
- package/lib/buttons/ButtonGroups.js +4 -5
- package/lib/buttons/CancelButton.js +5 -6
- package/lib/buttons/DangerButton.js +5 -6
- package/lib/buttons/DefaultButton.js +85 -85
- package/lib/buttons/DestroyButton.js +5 -6
- package/lib/buttons/EditButton.js +7 -4
- package/lib/buttons/InactivateButton.js +7 -4
- package/lib/buttons/InfoButton.js +5 -6
- package/lib/buttons/PrimaryButton.js +5 -6
- package/lib/buttons/RestoreButton.js +7 -4
- package/lib/buttons/SaveButton.js +5 -6
- package/lib/buttons/SuccessButton.js +5 -6
- package/lib/buttons/WarningButton.js +5 -6
- package/lib/buttons/button_container/index.js +19 -15
- package/lib/buttons/index.js +16 -15
- package/lib/buttons/split_button/index.js +23 -20
- package/lib/buttons/types.d.ts +0 -1
- package/lib/calendar/DangerCalendar.js +5 -6
- package/lib/calendar/InfoCalendar.js +5 -6
- package/lib/calendar/PrimaryCalendar.js +5 -6
- package/lib/calendar/SuccessCalendar.js +5 -6
- package/lib/calendar/WarningCalendar.js +5 -6
- package/lib/calendar/base/Day.js +11 -12
- package/lib/calendar/base/Month.js +17 -12
- package/lib/calendar/base/Week.js +17 -12
- package/lib/calendar/base/helpers.js +11 -11
- package/lib/calendar/base/index.js +43 -29
- package/lib/calendar/index.js +7 -6
- package/lib/checkbox/Label.js +9 -19
- package/lib/checkbox/index.d.ts +2 -2
- package/lib/checkbox/index.js +95 -81
- package/lib/checkbox/types.d.ts +1 -2
- package/lib/dialog/Alert.js +4 -3
- package/lib/dialog/Custom.js +16 -14
- package/lib/dialog/Error.js +4 -3
- package/lib/dialog/Information.js +4 -3
- package/lib/dialog/Question.js +12 -11
- package/lib/dialog/Warning.js +5 -5
- package/lib/dialog/base/Content.js +5 -7
- package/lib/dialog/base/Footer.js +7 -4
- package/lib/dialog/base/Header.js +28 -28
- package/lib/dialog/base/index.d.ts +2 -8
- package/lib/dialog/base/index.js +104 -108
- package/lib/dialog/base/style.js +10 -7
- package/lib/dialog/form/index.js +35 -36
- package/lib/dialog/index.js +8 -7
- package/lib/dialog/types.d.ts +13 -8
- package/lib/drawer/Content.js +10 -11
- package/lib/drawer/Drawer.js +83 -69
- package/lib/drawer/Header.js +36 -33
- package/lib/drawer/helpers.js +3 -2
- package/lib/drawer/index.js +4 -3
- package/lib/dropdown/Popup.d.ts +1 -1
- package/lib/dropdown/Popup.js +39 -38
- package/lib/dropdown/helper.js +5 -3
- package/lib/dropdown/types.d.ts +0 -1
- package/lib/dropdown/withDropdown.js +58 -37
- package/lib/fieldset/index.js +56 -50
- package/lib/fieldset/types.d.ts +0 -2
- package/lib/form/Field.d.ts +0 -2
- package/lib/form/Field.js +74 -68
- package/lib/form/FieldArray.d.ts +0 -2
- package/lib/form/FieldArray.js +90 -66
- package/lib/form/FieldNumber.d.ts +0 -2
- package/lib/form/FieldNumber.js +53 -33
- package/lib/form/FieldPeriod.d.ts +0 -2
- package/lib/form/FieldPeriod.js +52 -46
- package/lib/form/helpers.d.ts +0 -2
- package/lib/form/helpers.js +26 -21
- package/lib/form/index.d.ts +0 -2
- package/lib/form/index.js +143 -111
- package/lib/form/types.d.ts +4 -7
- package/lib/form/withFieldHOC.d.ts +0 -2
- package/lib/form/withFieldHOC.js +38 -31
- package/lib/form/withFormSecurity.d.ts +0 -2
- package/lib/form/withFormSecurity.js +34 -26
- package/lib/gridlayout/GridCol.js +13 -13
- package/lib/gridlayout/GridRow.js +11 -17
- package/lib/gridlayout/index.js +3 -2
- package/lib/gridlayout/types.d.ts +1 -1
- package/lib/hint/index.d.ts +1 -2
- package/lib/hint/index.js +28 -17
- package/lib/hint/types.d.ts +0 -3
- package/lib/icons/helper.d.ts +0 -4
- package/lib/icons/helper.js +4 -7
- package/lib/icons/index.d.ts +2 -3
- package/lib/icons/index.js +47 -42
- package/lib/icons/types.d.ts +9 -22
- package/lib/index.d.ts +1 -2
- package/lib/index.js +9 -9
- package/lib/inputs/base/InputTextBase.d.ts +0 -2
- package/lib/inputs/base/InputTextBase.js +111 -143
- package/lib/inputs/base/helpers.d.ts +2 -3
- package/lib/inputs/base/helpers.js +25 -20
- package/lib/inputs/base/types.d.ts +3 -17
- package/lib/inputs/color/index.js +38 -27
- package/lib/inputs/date/Dialog.d.ts +0 -2
- package/lib/inputs/date/Dialog.js +9 -8
- package/lib/inputs/date/Dropdown.d.ts +0 -2
- package/lib/inputs/date/Dropdown.js +10 -11
- package/lib/inputs/date/helpers.d.ts +0 -2
- package/lib/inputs/date/helpers.js +13 -13
- package/lib/inputs/date/index.d.ts +0 -2
- package/lib/inputs/date/index.js +150 -125
- package/lib/inputs/date/types.d.ts +1 -4
- package/lib/inputs/file/DefaultFile.d.ts +0 -2
- package/lib/inputs/file/DefaultFile.js +72 -45
- package/lib/inputs/file/DragDropFile.d.ts +0 -2
- package/lib/inputs/file/DragDropFile.js +147 -95
- package/lib/inputs/file/File.d.ts +1 -3
- package/lib/inputs/file/File.js +28 -22
- package/lib/inputs/file/FileButtonSettings.d.ts +0 -2
- package/lib/inputs/file/FileButtonSettings.js +12 -12
- package/lib/inputs/file/helpers.d.ts +0 -2
- package/lib/inputs/file/helpers.js +6 -4
- package/lib/inputs/file/index.d.ts +0 -2
- package/lib/inputs/file/index.js +4 -3
- package/lib/inputs/file/types.d.ts +0 -2
- package/lib/inputs/inputHOC.d.ts +1 -2
- package/lib/inputs/inputHOC.js +32 -19
- package/lib/inputs/mask/BaseMask.d.ts +5 -4
- package/lib/inputs/mask/BaseMask.js +34 -121
- package/lib/inputs/mask/Cnpj.d.ts +0 -2
- package/lib/inputs/mask/Cnpj.js +29 -16
- package/lib/inputs/mask/Cpf.d.ts +0 -2
- package/lib/inputs/mask/Cpf.js +35 -18
- package/lib/inputs/mask/Phone.d.ts +0 -2
- package/lib/inputs/mask/Phone.js +4 -5
- package/lib/inputs/mask/ZipCode.d.ts +0 -2
- package/lib/inputs/mask/ZipCode.js +7 -4
- package/lib/inputs/mask/helpers.d.ts +12 -53
- package/lib/inputs/mask/helpers.js +36 -90
- package/lib/inputs/{errorMessage/index.d.ts → mask/imaskHOC.d.ts} +7 -5
- package/lib/inputs/mask/imaskHOC.js +224 -0
- package/lib/inputs/mask/index.d.ts +2 -4
- package/lib/inputs/mask/index.js +6 -5
- package/lib/inputs/mask/types.d.ts +18 -22
- package/lib/inputs/multiSelect/ActionButtons.d.ts +0 -2
- package/lib/inputs/multiSelect/ActionButtons.js +21 -22
- package/lib/inputs/multiSelect/Dropdown.d.ts +0 -2
- package/lib/inputs/multiSelect/Dropdown.js +65 -48
- package/lib/inputs/multiSelect/helper.d.ts +0 -2
- package/lib/inputs/multiSelect/helper.js +7 -8
- package/lib/inputs/multiSelect/index.d.ts +0 -2
- package/lib/inputs/multiSelect/index.js +132 -80
- package/lib/inputs/multiSelect/types.d.ts +0 -2
- package/lib/inputs/number/BaseNumber.d.ts +2 -3
- package/lib/inputs/number/BaseNumber.js +21 -22
- package/lib/inputs/number/Currency.d.ts +2 -3
- package/lib/inputs/number/Currency.js +6 -6
- package/lib/inputs/number/Decimal.d.ts +2 -3
- package/lib/inputs/number/Decimal.js +5 -2
- package/lib/inputs/number/format_number.js +5 -5
- package/lib/inputs/number/index.d.ts +2 -3
- package/lib/inputs/number/index.js +49 -18
- package/lib/inputs/number/types.d.ts +14 -15
- package/lib/inputs/period/Dialog.d.ts +1 -3
- package/lib/inputs/period/Dialog.js +9 -8
- package/lib/inputs/period/Dropdown.d.ts +0 -2
- package/lib/inputs/period/Dropdown.js +8 -7
- package/lib/inputs/period/PeriodList.d.ts +0 -2
- package/lib/inputs/period/PeriodList.js +12 -13
- package/lib/inputs/period/helper.d.ts +0 -2
- package/lib/inputs/period/helper.js +36 -33
- package/lib/inputs/period/index.d.ts +0 -2
- package/lib/inputs/period/index.js +194 -160
- package/lib/inputs/period/types.d.ts +1 -3
- package/lib/inputs/search/index.d.ts +1 -2
- package/lib/inputs/search/index.js +63 -40
- package/lib/inputs/select/ActionButtons.d.ts +1 -2
- package/lib/inputs/select/ActionButtons.js +34 -24
- package/lib/inputs/select/Dropdown.d.ts +1 -2
- package/lib/inputs/select/Dropdown.js +58 -39
- package/lib/inputs/select/helper.d.ts +1 -2
- package/lib/inputs/select/helper.js +43 -49
- package/lib/inputs/select/index.d.ts +0 -2
- package/lib/inputs/select/index.js +8 -9
- package/lib/inputs/select/multiple/Selecteds.d.ts +1 -3
- package/lib/inputs/select/multiple/Selecteds.js +21 -16
- package/lib/inputs/select/multiple/index.d.ts +0 -2
- package/lib/inputs/select/multiple/index.js +176 -128
- package/lib/inputs/select/simple/index.d.ts +0 -2
- package/lib/inputs/select/simple/index.js +179 -151
- package/lib/inputs/select/types.d.ts +2 -5
- package/lib/inputs/text/index.js +5 -2
- package/lib/inputs/textarea/index.d.ts +0 -2
- package/lib/inputs/textarea/index.js +9 -9
- package/lib/inputs/textarea/types.d.ts +0 -2
- package/lib/inputs/types.d.ts +7 -12
- package/lib/internals/colorStyles.js +3 -2
- package/lib/internals/constants.js +4 -2
- package/lib/internals/types.d.ts +2 -5
- package/lib/internals/withTooltip.d.ts +2 -3
- package/lib/internals/withTooltip.js +74 -74
- package/lib/labelMessages/index.js +41 -21
- package/lib/labels/DangerLabel.js +5 -6
- package/lib/labels/DefaultLabel.js +39 -25
- package/lib/labels/InfoLabel.js +5 -6
- package/lib/labels/PrimaryLabel.js +5 -6
- package/lib/labels/SuccessLabel.js +5 -6
- package/lib/labels/WarningLabel.js +5 -6
- package/lib/labels/index.js +8 -7
- package/lib/labels/label_container/index.js +7 -7
- package/lib/list/Header.js +7 -8
- package/lib/list/Item.js +68 -72
- package/lib/list/Separator.js +7 -4
- package/lib/list/helpers.js +5 -3
- package/lib/list/index.js +100 -73
- package/lib/menus/float/MenuItem.js +19 -18
- package/lib/menus/float/SubMenuContainer.js +32 -26
- package/lib/menus/float/helpers.js +3 -2
- package/lib/menus/float/index.js +17 -16
- package/lib/menus/float/types.d.ts +1 -1
- package/lib/menus/index.js +2 -1
- package/lib/menus/sidenav/ExpandMenu.js +7 -8
- package/lib/menus/sidenav/MenuLink.js +8 -9
- package/lib/menus/sidenav/NavMenuGroup.js +11 -12
- package/lib/menus/sidenav/NavMenuItem.js +60 -46
- package/lib/menus/sidenav/NavSubMenuItem.js +24 -19
- package/lib/menus/sidenav/helpers.js +8 -5
- package/lib/menus/sidenav/index.js +111 -83
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +6 -6
- package/lib/menus/sidenav/popup_menu_search/index.js +83 -63
- package/lib/menus/sidenav/types.d.ts +1 -1
- package/lib/noPermission/index.js +16 -13
- package/lib/panel/Content.d.ts +1 -1
- package/lib/panel/Content.js +56 -43
- package/lib/panel/DangerPanel.d.ts +1 -1
- package/lib/panel/DangerPanel.js +7 -4
- package/lib/panel/Default.d.ts +1 -1
- package/lib/panel/Default.js +56 -41
- package/lib/panel/Header.d.ts +1 -1
- package/lib/panel/Header.js +26 -28
- package/lib/panel/InfoPanel.d.ts +1 -1
- package/lib/panel/InfoPanel.js +7 -4
- package/lib/panel/PrimaryPanel.d.ts +1 -1
- package/lib/panel/PrimaryPanel.js +7 -4
- package/lib/panel/SuccessPanel.d.ts +1 -1
- package/lib/panel/SuccessPanel.js +7 -4
- package/lib/panel/ToolBar.d.ts +1 -1
- package/lib/panel/ToolBar.js +4 -5
- package/lib/panel/WarningPanel.d.ts +1 -1
- package/lib/panel/WarningPanel.js +7 -4
- package/lib/panel/helpers.d.ts +2 -7
- package/lib/panel/helpers.js +23 -11
- package/lib/panel/index.d.ts +1 -1
- package/lib/panel/index.js +9 -8
- package/lib/panel/types.d.ts +5 -46
- package/lib/permissionValidations.js +29 -24
- package/lib/popover/PopoverText.js +4 -5
- package/lib/popover/PopoverTitle.js +4 -5
- package/lib/popover/index.js +18 -14
- package/lib/progress/Bar.js +36 -30
- package/lib/progress/index.js +18 -16
- package/lib/radio/index.js +55 -34
- package/lib/shortcuts/index.js +8 -9
- package/lib/skeleton/SkeletonContainer.js +10 -9
- package/lib/skeleton/index.js +32 -25
- package/lib/spinner/SpinnerLoading.js +7 -6
- package/lib/spinner/index.js +36 -22
- package/lib/split/Split.js +110 -93
- package/lib/split/SplitSide.js +18 -19
- package/lib/split/helpers.js +3 -2
- package/lib/split/index.js +3 -2
- package/lib/table/Body.js +44 -41
- package/lib/table/Header.js +31 -28
- package/lib/table/HeaderColumn.d.ts +1 -1
- package/lib/table/HeaderColumn.js +21 -34
- package/lib/table/Row.js +47 -44
- package/lib/table/RowColumn.js +37 -36
- package/lib/table/helpers.js +12 -6
- package/lib/table/index.js +98 -78
- package/lib/table/types.d.ts +0 -3
- package/lib/tabs/{MenuTabs.d.ts → DropdownItems.d.ts} +3 -3
- package/lib/tabs/DropdownItems.js +65 -0
- package/lib/tabs/Menu.d.ts +1 -1
- package/lib/tabs/Menu.js +20 -32
- package/lib/tabs/MenuItems.d.ts +11 -0
- package/lib/tabs/MenuItems.js +76 -0
- package/lib/tabs/Panel.d.ts +1 -1
- package/lib/tabs/Panel.js +65 -69
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/index.js +221 -42
- package/lib/tabs/tabHelpers.d.ts +15 -4
- package/lib/tabs/tabHelpers.js +41 -36
- package/lib/tabs/types.d.ts +15 -48
- package/lib/toolbar/ButtonBar.js +39 -35
- package/lib/toolbar/LabelBar.js +36 -32
- package/lib/toolbar/Separator.js +7 -4
- package/lib/toolbar/ToolBarGroup.js +6 -6
- package/lib/toolbar/helpers.js +3 -2
- package/lib/toolbar/index.js +21 -19
- package/lib/toolbar/types.d.ts +0 -1
- package/lib/tooltip/index.js +32 -27
- package/lib/treetable/Body.js +32 -20
- package/lib/treetable/Header.js +14 -11
- package/lib/treetable/Row.js +137 -85
- package/lib/treetable/helpers.js +24 -15
- package/lib/treetable/index.js +10 -8
- package/lib/treeview/Header.js +6 -7
- package/lib/treeview/Node.js +132 -92
- package/lib/treeview/constants.js +2 -1
- package/lib/treeview/index.js +214 -148
- package/lib/treeview_old/Header.js +28 -0
- package/lib/treeview_old/Node.js +88 -0
- package/lib/treeview_old/index.js +42 -0
- package/lib/types-c2a0f035.d.ts +50 -0
- package/lib/uitour/helpers.js +7 -4
- package/lib/uitour/index.d.ts +1 -2
- package/lib/uitour/index.js +99 -112
- package/lib/uitour/types.d.ts +1 -9
- package/package.json +82 -77
- package/tsconfig.json +0 -1
- package/.eslintcache +0 -1
- package/.nvmrc +0 -1
- package/lib/assets/styles/error.scss +0 -9
- package/lib/assets/styles/textContent.scss +0 -9
- package/lib/hint/helpers.d.ts +0 -3
- package/lib/hint/helpers.js +0 -21
- package/lib/inputs/base/Label.d.ts +0 -14
- package/lib/inputs/base/Label.js +0 -35
- package/lib/inputs/errorMessage/index.js +0 -26
- package/lib/tabs/DropdownTabs.d.ts +0 -11
- package/lib/tabs/DropdownTabs.js +0 -71
- package/lib/tabs/MenuTabs.js +0 -82
- package/lib/tabs/context.d.ts +0 -12
- package/lib/tabs/context.js +0 -130
- package/lib/tabs/useTabs.d.ts +0 -11
- package/lib/tabs/useTabs.js +0 -11
- package/lib/textContent/index.d.ts +0 -8
- package/lib/textContent/index.js +0 -30
package/lib/tabs/types.d.ts
CHANGED
|
@@ -1,79 +1,47 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement, CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Size } from '../@types/Size.js';
|
|
3
3
|
import { Position } from '../@types/Position.js';
|
|
4
4
|
import { PermissionAttr } from '../@types/PermissionAttr.js';
|
|
5
5
|
import { IconNames } from '../@types/Icon.js';
|
|
6
6
|
import '../icons/helper.js';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
selectedTabId
|
|
13
|
-
|
|
14
|
-
updateTabs: (tabId: string | number) => void;
|
|
15
|
-
removeTab: (tabId: string | number) => void;
|
|
16
|
-
containerWidth: number;
|
|
17
|
-
tabsCount: number;
|
|
18
|
-
menuRef: RefObject<HTMLUListElement>;
|
|
19
|
-
};
|
|
20
|
-
interface TabsProviderProps {
|
|
21
|
-
children: React.ReactNode;
|
|
22
|
-
tabs: React.ReactNode;
|
|
23
|
-
container: RefObject<HTMLDivElement>;
|
|
24
|
-
tabsWidth: number | string;
|
|
25
|
-
selectedTab?: string | number | null;
|
|
26
|
-
onTabChange?: (tabId: string | number) => void;
|
|
27
|
-
onTabClose?: (tabId: string) => void;
|
|
28
|
-
firstTabIdent?: boolean;
|
|
8
|
+
interface PanelTypeAndProps extends ReactElement {
|
|
9
|
+
props: PanelProps;
|
|
10
|
+
}
|
|
11
|
+
interface TabsContextValues {
|
|
12
|
+
selectedTabId?: string;
|
|
13
|
+
contentHeight?: number;
|
|
29
14
|
}
|
|
30
15
|
interface ITabsPros {
|
|
31
16
|
style?: CSSProperties;
|
|
32
17
|
toolbar?: ReactElement;
|
|
33
|
-
toolBarRef?: (value: HTMLDivElement | null) => void;
|
|
34
18
|
children?: ReactNode;
|
|
35
|
-
selectedTab?: string
|
|
19
|
+
selectedTab?: string;
|
|
36
20
|
tabMenuSize?: Size;
|
|
37
21
|
tabMenuAlign?: Position;
|
|
38
22
|
firstTabIdent?: boolean;
|
|
39
23
|
tabMenuPosition?: Exclude<Position, 'center'>;
|
|
40
|
-
handlerTabClick?: (id?: string
|
|
24
|
+
handlerTabClick?: (id?: string) => void;
|
|
41
25
|
handlerCloseTab?: (id?: string, idx?: string) => void;
|
|
42
26
|
customClassForToolBar?: string;
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
interface TabProps {
|
|
46
|
-
id: string | number;
|
|
47
|
-
title: string;
|
|
48
|
-
iconAlign?: Extract<Position, 'left' | 'right'>;
|
|
49
|
-
iconName?: IconNames;
|
|
50
|
-
icon?: ReactElement;
|
|
51
|
-
disabled?: boolean;
|
|
52
|
-
permissionAttr?: PermissionAttr;
|
|
53
|
-
tabWidth?: string | number;
|
|
54
|
-
tabMenuSize?: Size;
|
|
55
|
-
tabMenuAlign?: Position;
|
|
56
|
-
tooltip?: string;
|
|
57
|
-
tooltipPosition?: Exclude<Position, 'center'>;
|
|
58
|
-
tooltipWidth?: string | number;
|
|
59
|
-
closeable?: boolean;
|
|
60
|
-
tabsLength?: number;
|
|
27
|
+
tabsWidthOnExceedCount?: number;
|
|
61
28
|
}
|
|
62
29
|
interface MenuProps {
|
|
63
30
|
toolbar?: ReactElement;
|
|
64
31
|
customClass?: string;
|
|
65
32
|
customClassForToolBar?: string;
|
|
33
|
+
menuRef?: (value: HTMLDivElement | null) => void;
|
|
34
|
+
toolBarRef?: (value: HTMLDivElement | null) => void;
|
|
66
35
|
tabWidth?: string | number;
|
|
67
36
|
tabMenuAlign?: Position;
|
|
68
37
|
selectedTabId?: string;
|
|
69
38
|
firstTabIdent?: boolean;
|
|
70
|
-
|
|
39
|
+
currentPanels?: Array<PanelTypeAndProps>;
|
|
71
40
|
tabMenuSize?: Size;
|
|
72
41
|
handlerClick?: (id?: string) => void;
|
|
42
|
+
dropdownPanels?: Array<PanelTypeAndProps>;
|
|
73
43
|
handlerRemovePanel?: (id?: string, idx?: number, bool?: boolean) => void;
|
|
74
44
|
}
|
|
75
|
-
interface DropdownProps extends MenuProps {
|
|
76
|
-
}
|
|
77
45
|
interface PanelProps {
|
|
78
46
|
id?: string;
|
|
79
47
|
icon?: ReactElement;
|
|
@@ -92,7 +60,6 @@ interface PanelProps {
|
|
|
92
60
|
permissionAttr?: PermissionAttr;
|
|
93
61
|
tooltipPosition?: Exclude<Position, 'center'>;
|
|
94
62
|
onEndReachedThreshold?: number;
|
|
95
|
-
style?: CSSProperties;
|
|
96
63
|
}
|
|
97
64
|
|
|
98
|
-
export {
|
|
65
|
+
export { ITabsPros, MenuProps, PanelProps, PanelTypeAndProps, TabsContextValues };
|
package/lib/toolbar/ButtonBar.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -7,45 +8,47 @@ exports.default = void 0;
|
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _buttons = _interopRequireWildcard(require("../buttons"));
|
|
9
10
|
var _helpers = _interopRequireDefault(require("./helpers"));
|
|
10
|
-
|
|
11
|
+
var _excluded = ["size", "icon", "onClick", "iconName", "transparent", "customClass", "type", "iconAlign", "label"];
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(
|
|
13
|
-
function _interopRequireWildcard(
|
|
14
|
-
function ownKeys(
|
|
15
|
-
function _objectSpread(
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
17
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
function _toPropertyKey(
|
|
18
|
-
function _toPrimitive(
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
20
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
20
21
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
var ButtonBar = function ButtonBar(_ref) {
|
|
23
|
+
var size = _ref.size,
|
|
24
|
+
icon = _ref.icon,
|
|
25
|
+
onClick = _ref.onClick,
|
|
26
|
+
iconName = _ref.iconName,
|
|
27
|
+
transparent = _ref.transparent,
|
|
28
|
+
customClass = _ref.customClass,
|
|
29
|
+
_ref$type = _ref.type,
|
|
30
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
31
|
+
_ref$iconAlign = _ref.iconAlign,
|
|
32
|
+
iconAlign = _ref$iconAlign === void 0 ? 'left' : _ref$iconAlign,
|
|
33
|
+
_ref$label = _ref.label,
|
|
34
|
+
label = _ref$label === void 0 ? '' : _ref$label,
|
|
33
35
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
|
|
35
|
-
skeletonize
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
var _useContext = (0, _react.useContext)(_helpers.default),
|
|
37
|
+
skeletonize = _useContext.skeletonize;
|
|
38
|
+
var getProps = function getProps() {
|
|
39
|
+
return _objectSpread(_objectSpread({}, props), {}, {
|
|
40
|
+
size: size,
|
|
41
|
+
icon: icon,
|
|
42
|
+
label: label,
|
|
43
|
+
onClick: onClick,
|
|
44
|
+
iconName: iconName,
|
|
45
|
+
iconAlign: iconAlign,
|
|
46
|
+
transparent: transparent,
|
|
47
|
+
skeletonize: skeletonize,
|
|
48
|
+
boxShadow: false,
|
|
49
|
+
customClass: "buttonbar ".concat(customClass)
|
|
50
|
+
});
|
|
51
|
+
};
|
|
49
52
|
return {
|
|
50
53
|
default: /*#__PURE__*/_react.default.createElement(_buttons.default, getProps()),
|
|
51
54
|
primary: /*#__PURE__*/_react.default.createElement(_buttons.PrimaryButton, getProps()),
|
|
@@ -63,4 +66,5 @@ const ButtonBar = _ref => {
|
|
|
63
66
|
restore: /*#__PURE__*/_react.default.createElement(_buttons.RestoreButton, getProps())
|
|
64
67
|
}[type];
|
|
65
68
|
};
|
|
66
|
-
var _default =
|
|
69
|
+
var _default = ButtonBar;
|
|
70
|
+
exports.default = _default;
|
package/lib/toolbar/LabelBar.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -7,45 +8,47 @@ exports.default = void 0;
|
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _labels = _interopRequireWildcard(require("../labels"));
|
|
9
10
|
var _helpers = _interopRequireDefault(require("./helpers"));
|
|
10
|
-
|
|
11
|
+
var _excluded = ["size", "icon", "children", "iconName", "style", "type", "bordered"];
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(
|
|
13
|
-
function _interopRequireWildcard(
|
|
14
|
-
function ownKeys(
|
|
15
|
-
function _objectSpread(
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
17
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
function _toPropertyKey(
|
|
18
|
-
function _toPrimitive(
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
20
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
20
21
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
var LabelBar = function LabelBar(_ref) {
|
|
23
|
+
var size = _ref.size,
|
|
24
|
+
icon = _ref.icon,
|
|
25
|
+
children = _ref.children,
|
|
26
|
+
iconName = _ref.iconName,
|
|
27
|
+
_ref$style = _ref.style,
|
|
28
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
29
|
+
_ref$type = _ref.type,
|
|
30
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
31
|
+
_ref$bordered = _ref.bordered,
|
|
32
|
+
bordered = _ref$bordered === void 0 ? false : _ref$bordered,
|
|
31
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
|
|
34
|
+
var styles = _objectSpread({
|
|
33
35
|
lineHeight: 'unset',
|
|
34
36
|
padding: '7px 10px 6px'
|
|
35
37
|
}, style);
|
|
36
|
-
|
|
37
|
-
skeletonize
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
var _useContext = (0, _react.useContext)(_helpers.default),
|
|
39
|
+
skeletonize = _useContext.skeletonize;
|
|
40
|
+
var getProps = function getProps() {
|
|
41
|
+
return _objectSpread(_objectSpread({}, props), {}, {
|
|
42
|
+
size: size,
|
|
43
|
+
icon: icon,
|
|
44
|
+
children: children,
|
|
45
|
+
iconName: iconName,
|
|
46
|
+
style: styles,
|
|
47
|
+
bordered: bordered,
|
|
48
|
+
skeletonize: skeletonize,
|
|
49
|
+
customClass: 'labelbar'
|
|
50
|
+
});
|
|
51
|
+
};
|
|
49
52
|
return {
|
|
50
53
|
default: /*#__PURE__*/_react.default.createElement(_labels.default, getProps()),
|
|
51
54
|
primary: /*#__PURE__*/_react.default.createElement(_labels.PrimaryLabel, getProps()),
|
|
@@ -55,4 +58,5 @@ const LabelBar = _ref => {
|
|
|
55
58
|
warning: /*#__PURE__*/_react.default.createElement(_labels.WarningLabel, getProps())
|
|
56
59
|
}[type];
|
|
57
60
|
};
|
|
58
|
-
var _default =
|
|
61
|
+
var _default = LabelBar;
|
|
62
|
+
exports.default = _default;
|
package/lib/toolbar/Separator.js
CHANGED
|
@@ -6,7 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
var Separator = function Separator() {
|
|
10
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
11
|
+
className: "separator"
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var _default = Separator;
|
|
15
|
+
exports.default = _default;
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
style = {}
|
|
13
|
-
} = _ref;
|
|
9
|
+
var ToolBarGroup = function ToolBarGroup(_ref) {
|
|
10
|
+
var children = _ref.children,
|
|
11
|
+
_ref$style = _ref.style,
|
|
12
|
+
style = _ref$style === void 0 ? {} : _ref$style;
|
|
14
13
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
15
14
|
className: "toolbar-group",
|
|
16
15
|
style: style
|
|
17
16
|
}, children);
|
|
18
17
|
};
|
|
19
|
-
var _default =
|
|
18
|
+
var _default = ToolBarGroup;
|
|
19
|
+
exports.default = _default;
|
package/lib/toolbar/helpers.js
CHANGED
|
@@ -5,5 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
|
|
9
|
-
var _default =
|
|
8
|
+
var ToolBarContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
9
|
+
var _default = ToolBarContext;
|
|
10
|
+
exports.default = _default;
|
package/lib/toolbar/index.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
Object.defineProperty(exports, "ButtonBar", {
|
|
7
8
|
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
+
get: function get() {
|
|
9
10
|
return _ButtonBar.default;
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
Object.defineProperty(exports, "LabelBar", {
|
|
13
14
|
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
+
get: function get() {
|
|
15
16
|
return _LabelBar.default;
|
|
16
17
|
}
|
|
17
18
|
});
|
|
18
19
|
Object.defineProperty(exports, "Separator", {
|
|
19
20
|
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
+
get: function get() {
|
|
21
22
|
return _Separator.default;
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
25
|
Object.defineProperty(exports, "ToolBarGroup", {
|
|
25
26
|
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
+
get: function get() {
|
|
27
28
|
return _ToolBarGroup.default;
|
|
28
29
|
}
|
|
29
30
|
});
|
|
@@ -35,25 +36,25 @@ var _ButtonBar = _interopRequireDefault(require("./ButtonBar"));
|
|
|
35
36
|
var _LabelBar = _interopRequireDefault(require("./LabelBar"));
|
|
36
37
|
require("../assets/styles/toolbar.scss");
|
|
37
38
|
var _helpers = _interopRequireDefault(require("./helpers"));
|
|
38
|
-
|
|
39
|
+
var _excluded = ["innerRef", "children", "style", "size", "customClass"];
|
|
39
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
40
|
-
function ownKeys(
|
|
41
|
-
function _objectSpread(
|
|
41
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
42
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
42
43
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
43
|
-
function _toPropertyKey(
|
|
44
|
-
function _toPrimitive(
|
|
44
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
45
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
45
46
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
46
47
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
var ToolBar = function ToolBar(_ref) {
|
|
49
|
+
var innerRef = _ref.innerRef,
|
|
50
|
+
children = _ref.children,
|
|
51
|
+
_ref$style = _ref.style,
|
|
52
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
53
|
+
size = _ref.size,
|
|
54
|
+
_ref$customClass = _ref.customClass,
|
|
55
|
+
customClass = _ref$customClass === void 0 ? '' : _ref$customClass,
|
|
55
56
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
56
|
-
|
|
57
|
+
var contextValues = _objectSpread({}, props);
|
|
57
58
|
return /*#__PURE__*/_react.default.createElement(_helpers.default.Provider, {
|
|
58
59
|
value: contextValues
|
|
59
60
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -62,4 +63,5 @@ const ToolBar = _ref => {
|
|
|
62
63
|
style: style
|
|
63
64
|
}, children));
|
|
64
65
|
};
|
|
65
|
-
var _default =
|
|
66
|
+
var _default = ToolBar;
|
|
67
|
+
exports.default = _default;
|
package/lib/toolbar/types.d.ts
CHANGED
package/lib/tooltip/index.js
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = void 0;
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
9
|
-
var
|
|
10
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
10
11
|
require("../assets/styles/tooltip.scss");
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(
|
|
13
|
-
function _interopRequireWildcard(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
style = '',
|
|
20
|
-
tooltipDimensions,
|
|
21
|
-
className =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(0, _react.
|
|
26
|
-
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
var Tooltip = function Tooltip(_ref) {
|
|
16
|
+
var text = _ref.text,
|
|
17
|
+
textError = _ref.textError,
|
|
18
|
+
tooltipRef = _ref.tooltipRef,
|
|
19
|
+
_ref$style = _ref.style,
|
|
20
|
+
style = _ref$style === void 0 ? '' : _ref$style,
|
|
21
|
+
tooltipDimensions = _ref.tooltipDimensions,
|
|
22
|
+
_ref$className = _ref.className,
|
|
23
|
+
className = _ref$className === void 0 ? 'bottom' : _ref$className,
|
|
24
|
+
_ref$handlerSetDimens = _ref.handlerSetDimensions,
|
|
25
|
+
handlerSetDimensions = _ref$handlerSetDimens === void 0 ? function () {} : _ref$handlerSetDimens;
|
|
26
|
+
var tooltipComponent = (0, _react.useRef)(document.createElement('div'));
|
|
27
|
+
(0, _react.useEffect)(function () {
|
|
28
|
+
tooltipComponent.current.id = "tooltip-".concat(_uuid.default.v1());
|
|
27
29
|
tooltipComponent.current.className = "tooltip-component ".concat(className, " ");
|
|
28
30
|
tooltipComponent.current.dataset.testid = 'tooltip-component';
|
|
29
31
|
tooltipComponent.current.style.cssText = style;
|
|
30
32
|
document.body.appendChild(tooltipComponent.current);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
var tooltipEl = document.querySelector("div#".concat(tooltipComponent.current.id));
|
|
34
|
+
var widthDimension = tooltipEl === null || tooltipEl === void 0 ? void 0 : tooltipEl.offsetWidth;
|
|
35
|
+
var heightDimension = tooltipEl === null || tooltipEl === void 0 ? void 0 : tooltipEl.offsetHeight;
|
|
34
36
|
if (tooltipDimensions && tooltipDimensions.width) {
|
|
35
37
|
widthDimension = tooltipDimensions.width;
|
|
36
38
|
}
|
|
@@ -42,22 +44,25 @@ const Tooltip = _ref => {
|
|
|
42
44
|
if (tooltipRef) {
|
|
43
45
|
tooltipRef.current = tooltipEl;
|
|
44
46
|
}
|
|
45
|
-
return ()
|
|
47
|
+
return function () {
|
|
46
48
|
document.body.removeChild(tooltipComponent.current);
|
|
47
49
|
};
|
|
48
50
|
}, []);
|
|
49
|
-
(0, _react.useEffect)(()
|
|
51
|
+
(0, _react.useEffect)(function () {
|
|
50
52
|
tooltipComponent.current.className = "tooltip-component ".concat(className, " ");
|
|
51
53
|
}, [className]);
|
|
52
|
-
(0, _react.useEffect)(()
|
|
54
|
+
(0, _react.useEffect)(function () {
|
|
53
55
|
tooltipComponent.current.style.cssText = style;
|
|
54
56
|
}, [style]);
|
|
55
|
-
(0, _react.useEffect)(()
|
|
57
|
+
(0, _react.useEffect)(function () {
|
|
56
58
|
tooltipComponent.current.className = textError ? "tooltip-error tooltip-component ".concat(className) : "tooltip-component ".concat(className);
|
|
57
59
|
}, [textError]);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
var getTooltipContent = function getTooltipContent() {
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
62
|
+
className: "tooltipcontent"
|
|
63
|
+
}, textError || text);
|
|
64
|
+
};
|
|
61
65
|
return /*#__PURE__*/_reactDom.default.createPortal(getTooltipContent(), tooltipComponent.current);
|
|
62
66
|
};
|
|
63
|
-
var _default =
|
|
67
|
+
var _default = Tooltip;
|
|
68
|
+
exports.default = _default;
|