linear-react-components-ui 1.1.14-beta.0 → 1.1.14-beta.1
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 +45 -77
- package/.gitlab-ci.yml +13 -5
- package/.nvmrc +1 -0
- package/.vscode/settings.json +12 -3
- package/babel.config.json +4 -4
- package/lib/@types/SizePixels.d.ts +1 -1
- package/lib/alerts/AlertContainer.js +48 -57
- package/lib/alerts/AlertProvider.js +36 -54
- package/lib/alerts/BaseAlert.js +12 -19
- package/lib/alerts/Message.d.ts +1 -1
- package/lib/alerts/Message.js +78 -45
- package/lib/alerts/helpers.js +2 -3
- package/lib/alerts/index.js +3 -4
- package/lib/alerts/types.d.ts +1 -0
- package/lib/alerts/withAlert.js +10 -11
- package/lib/assets/styles/alerts.scss +4 -7
- package/lib/assets/styles/button.scss +11 -9
- package/lib/assets/styles/checkbox.scss +45 -38
- package/lib/assets/styles/colors.scss +3 -1
- package/lib/assets/styles/commons.scss +1 -0
- package/lib/assets/styles/dialog.scss +37 -20
- package/lib/assets/styles/drawers.scss +9 -6
- package/lib/assets/styles/error.scss +9 -0
- package/lib/assets/styles/fieldset.scss +3 -0
- package/lib/assets/styles/gridlayout.scss +0 -2
- package/lib/assets/styles/hint.scss +21 -0
- package/lib/assets/styles/icon.scss +31 -4
- package/lib/assets/styles/input.scss +7 -7
- package/lib/assets/styles/multiSelect.scss +6 -1
- package/lib/assets/styles/radio.scss +37 -35
- package/lib/assets/styles/select.scss +13 -7
- package/lib/assets/styles/table.scss +9 -1
- package/lib/assets/styles/tabs.scss +28 -18
- package/lib/assets/styles/textContent.scss +9 -0
- package/lib/avatar/index.js +41 -41
- package/lib/badge/index.js +12 -14
- package/lib/buttons/ActivateButton.js +6 -9
- package/lib/buttons/AddButton.js +9 -12
- package/lib/buttons/Button.js +11 -12
- package/lib/buttons/ButtonGroups.js +6 -5
- package/lib/buttons/CancelButton.js +10 -9
- package/lib/buttons/DangerButton.js +10 -9
- package/lib/buttons/DefaultButton.js +90 -90
- package/lib/buttons/DestroyButton.js +10 -9
- package/lib/buttons/EditButton.js +6 -9
- package/lib/buttons/InactivateButton.js +6 -9
- package/lib/buttons/InfoButton.js +10 -9
- package/lib/buttons/PrimaryButton.js +10 -9
- package/lib/buttons/RestoreButton.js +6 -9
- package/lib/buttons/SaveButton.js +10 -9
- package/lib/buttons/SuccessButton.js +10 -9
- package/lib/buttons/WarningButton.js +10 -9
- package/lib/buttons/button_container/index.js +17 -21
- package/lib/buttons/index.js +16 -17
- package/lib/buttons/split_button/index.js +22 -25
- package/lib/buttons/types.d.ts +1 -0
- package/lib/calendar/DangerCalendar.js +10 -9
- package/lib/calendar/InfoCalendar.js +10 -9
- package/lib/calendar/PrimaryCalendar.js +10 -9
- package/lib/calendar/SuccessCalendar.js +10 -9
- package/lib/calendar/WarningCalendar.js +10 -9
- package/lib/calendar/base/Day.js +13 -12
- package/lib/calendar/base/Month.js +13 -18
- package/lib/calendar/base/Week.js +13 -18
- package/lib/calendar/base/helpers.js +12 -12
- package/lib/calendar/base/index.js +30 -44
- package/lib/calendar/index.js +7 -8
- package/lib/checkbox/Label.js +20 -10
- package/lib/checkbox/index.d.ts +2 -2
- package/lib/checkbox/index.js +83 -97
- package/lib/checkbox/types.d.ts +2 -1
- package/lib/dialog/Alert.js +5 -6
- package/lib/dialog/Custom.js +16 -18
- package/lib/dialog/Error.js +5 -6
- package/lib/dialog/Information.js +5 -6
- package/lib/dialog/Question.js +13 -14
- package/lib/dialog/Warning.js +7 -7
- package/lib/dialog/base/Content.js +8 -6
- package/lib/dialog/base/Footer.js +5 -8
- package/lib/dialog/base/Header.js +29 -29
- package/lib/dialog/base/index.d.ts +8 -2
- package/lib/dialog/base/index.js +109 -105
- package/lib/dialog/base/style.js +7 -10
- package/lib/dialog/form/index.js +31 -34
- package/lib/dialog/index.js +8 -9
- package/lib/dialog/types.d.ts +8 -13
- package/lib/drawer/Content.js +12 -11
- package/lib/drawer/Drawer.js +74 -88
- package/lib/drawer/Header.js +34 -37
- package/lib/drawer/helpers.js +3 -4
- package/lib/drawer/index.js +4 -5
- package/lib/dropdown/Popup.d.ts +1 -1
- package/lib/dropdown/Popup.js +41 -42
- package/lib/dropdown/helper.js +3 -5
- package/lib/dropdown/types.d.ts +1 -0
- package/lib/dropdown/withDropdown.js +39 -60
- package/lib/fieldset/index.js +52 -58
- package/lib/fieldset/types.d.ts +2 -0
- package/lib/form/Field.d.ts +2 -0
- package/lib/form/Field.js +73 -79
- package/lib/form/FieldArray.d.ts +2 -0
- package/lib/form/FieldArray.js +70 -94
- package/lib/form/FieldNumber.d.ts +2 -0
- package/lib/form/FieldNumber.js +39 -48
- package/lib/form/FieldPeriod.d.ts +2 -0
- package/lib/form/FieldPeriod.js +48 -54
- package/lib/form/helpers.d.ts +2 -0
- package/lib/form/helpers.js +22 -27
- package/lib/form/index.d.ts +2 -0
- package/lib/form/index.js +114 -146
- package/lib/form/types.d.ts +6 -2
- package/lib/form/withFieldHOC.d.ts +2 -0
- package/lib/form/withFieldHOC.js +32 -39
- package/lib/form/withFormSecurity.d.ts +2 -0
- package/lib/form/withFormSecurity.js +27 -35
- package/lib/gridlayout/GridCol.js +14 -14
- package/lib/gridlayout/GridRow.js +18 -12
- package/lib/gridlayout/index.js +3 -4
- package/lib/gridlayout/types.d.ts +1 -1
- package/lib/hint/helpers.d.ts +3 -0
- package/lib/hint/helpers.js +21 -0
- package/lib/hint/index.d.ts +2 -1
- package/lib/hint/index.js +18 -29
- package/lib/hint/types.d.ts +3 -0
- package/lib/icons/helper.d.ts +4 -0
- package/lib/icons/helper.js +7 -4
- package/lib/icons/index.d.ts +3 -2
- package/lib/icons/index.js +43 -48
- package/lib/icons/types.d.ts +22 -9
- package/lib/index.d.ts +2 -1
- package/lib/index.js +10 -10
- package/lib/inputs/base/InputTextBase.d.ts +2 -0
- package/lib/inputs/base/InputTextBase.js +149 -113
- package/lib/inputs/base/Label.d.ts +14 -0
- package/lib/inputs/base/Label.js +35 -0
- package/lib/inputs/base/helpers.d.ts +3 -2
- package/lib/inputs/base/helpers.js +21 -26
- package/lib/inputs/base/types.d.ts +17 -2
- package/lib/inputs/color/index.js +29 -40
- package/lib/inputs/date/Dialog.d.ts +2 -0
- package/lib/inputs/date/Dialog.js +9 -10
- package/lib/inputs/date/Dropdown.d.ts +2 -0
- package/lib/inputs/date/Dropdown.js +12 -11
- package/lib/inputs/date/helpers.d.ts +2 -0
- package/lib/inputs/date/helpers.js +14 -14
- package/lib/inputs/date/index.d.ts +2 -0
- package/lib/inputs/date/index.js +127 -152
- package/lib/inputs/date/types.d.ts +4 -1
- package/lib/inputs/{mask/imaskHOC.d.ts → errorMessage/index.d.ts} +5 -7
- package/lib/inputs/errorMessage/index.js +26 -0
- package/lib/inputs/file/DefaultFile.d.ts +2 -0
- package/lib/inputs/file/DefaultFile.js +47 -74
- package/lib/inputs/file/DragDropFile.d.ts +2 -0
- package/lib/inputs/file/DragDropFile.js +97 -149
- package/lib/inputs/file/File.d.ts +3 -1
- package/lib/inputs/file/File.js +26 -32
- package/lib/inputs/file/FileButtonSettings.d.ts +2 -0
- package/lib/inputs/file/FileButtonSettings.js +13 -13
- package/lib/inputs/file/helpers.d.ts +2 -0
- package/lib/inputs/file/helpers.js +4 -6
- package/lib/inputs/file/index.d.ts +2 -0
- package/lib/inputs/file/index.js +4 -5
- package/lib/inputs/file/types.d.ts +2 -0
- package/lib/inputs/inputHOC.d.ts +2 -1
- package/lib/inputs/inputHOC.js +21 -34
- package/lib/inputs/mask/BaseMask.d.ts +4 -5
- package/lib/inputs/mask/BaseMask.js +125 -37
- package/lib/inputs/mask/Cnpj.d.ts +2 -0
- package/lib/inputs/mask/Cnpj.js +18 -31
- package/lib/inputs/mask/Cpf.d.ts +2 -0
- package/lib/inputs/mask/Cpf.js +20 -37
- package/lib/inputs/mask/Phone.d.ts +2 -0
- package/lib/inputs/mask/Phone.js +7 -6
- package/lib/inputs/mask/ZipCode.d.ts +2 -0
- package/lib/inputs/mask/ZipCode.js +6 -9
- package/lib/inputs/mask/helpers.d.ts +50 -12
- package/lib/inputs/mask/helpers.js +77 -37
- package/lib/inputs/mask/index.d.ts +4 -2
- package/lib/inputs/mask/index.js +6 -7
- package/lib/inputs/mask/types.d.ts +18 -17
- package/lib/inputs/multiSelect/ActionButtons.d.ts +2 -0
- package/lib/inputs/multiSelect/ActionButtons.js +23 -22
- package/lib/inputs/multiSelect/Dropdown.d.ts +2 -0
- package/lib/inputs/multiSelect/Dropdown.js +50 -67
- package/lib/inputs/multiSelect/helper.d.ts +2 -0
- package/lib/inputs/multiSelect/helper.js +8 -7
- package/lib/inputs/multiSelect/index.d.ts +2 -0
- package/lib/inputs/multiSelect/index.js +83 -135
- package/lib/inputs/multiSelect/types.d.ts +2 -0
- package/lib/inputs/number/BaseNumber.d.ts +2 -1
- package/lib/inputs/number/BaseNumber.js +25 -24
- package/lib/inputs/number/Currency.d.ts +2 -1
- package/lib/inputs/number/Currency.js +8 -8
- package/lib/inputs/number/Decimal.d.ts +2 -1
- package/lib/inputs/number/Decimal.js +3 -6
- package/lib/inputs/number/format_number.js +5 -5
- package/lib/inputs/number/index.d.ts +2 -1
- package/lib/inputs/number/index.js +20 -32
- package/lib/inputs/number/types.d.ts +2 -9
- package/lib/inputs/period/Dialog.d.ts +3 -1
- package/lib/inputs/period/Dialog.js +9 -10
- package/lib/inputs/period/Dropdown.d.ts +2 -0
- package/lib/inputs/period/Dropdown.js +8 -9
- package/lib/inputs/period/PeriodList.d.ts +2 -0
- package/lib/inputs/period/PeriodList.js +14 -13
- package/lib/inputs/period/helper.d.ts +2 -0
- package/lib/inputs/period/helper.js +34 -37
- package/lib/inputs/period/index.d.ts +2 -0
- package/lib/inputs/period/index.js +162 -196
- package/lib/inputs/period/types.d.ts +3 -1
- package/lib/inputs/search/index.d.ts +2 -1
- package/lib/inputs/search/index.js +45 -68
- package/lib/inputs/select/ActionButtons.d.ts +2 -1
- package/lib/inputs/select/ActionButtons.js +25 -35
- package/lib/inputs/select/Dropdown.d.ts +2 -1
- package/lib/inputs/select/Dropdown.js +41 -60
- package/lib/inputs/select/helper.d.ts +2 -1
- package/lib/inputs/select/helper.js +49 -43
- package/lib/inputs/select/index.d.ts +2 -0
- package/lib/inputs/select/index.js +13 -12
- package/lib/inputs/select/multiple/Selecteds.d.ts +3 -1
- package/lib/inputs/select/multiple/Selecteds.js +17 -22
- package/lib/inputs/select/multiple/index.d.ts +2 -0
- package/lib/inputs/select/multiple/index.js +125 -162
- package/lib/inputs/select/simple/index.d.ts +2 -0
- package/lib/inputs/select/simple/index.js +154 -179
- package/lib/inputs/select/types.d.ts +5 -2
- package/lib/inputs/text/index.js +3 -6
- package/lib/inputs/textarea/index.d.ts +2 -0
- package/lib/inputs/textarea/index.js +10 -10
- package/lib/inputs/textarea/types.d.ts +2 -0
- package/lib/inputs/types.d.ts +12 -9
- package/lib/internals/colorStyles.js +2 -3
- package/lib/internals/constants.js +2 -4
- package/lib/internals/types.d.ts +5 -2
- package/lib/internals/withTooltip.d.ts +3 -2
- package/lib/internals/withTooltip.js +76 -76
- package/lib/labelMessages/index.js +22 -42
- package/lib/labels/DangerLabel.js +10 -9
- package/lib/labels/DefaultLabel.js +26 -40
- package/lib/labels/InfoLabel.js +10 -9
- package/lib/labels/PrimaryLabel.js +10 -9
- package/lib/labels/SuccessLabel.js +10 -9
- package/lib/labels/WarningLabel.js +10 -9
- package/lib/labels/index.js +8 -9
- package/lib/labels/label_container/index.js +8 -8
- package/lib/list/Header.js +9 -8
- package/lib/list/Item.js +74 -70
- package/lib/list/Separator.js +5 -8
- package/lib/list/helpers.js +4 -6
- package/lib/list/index.js +74 -101
- package/lib/menus/float/MenuItem.js +19 -20
- package/lib/menus/float/SubMenuContainer.js +27 -33
- package/lib/menus/float/helpers.js +3 -4
- package/lib/menus/float/index.js +17 -18
- package/lib/menus/float/types.d.ts +1 -1
- package/lib/menus/index.js +2 -3
- package/lib/menus/sidenav/ExpandMenu.js +9 -8
- package/lib/menus/sidenav/MenuLink.js +10 -9
- package/lib/menus/sidenav/NavMenuGroup.js +12 -11
- package/lib/menus/sidenav/NavMenuItem.js +48 -62
- package/lib/menus/sidenav/NavSubMenuItem.js +20 -25
- package/lib/menus/sidenav/helpers.js +6 -9
- package/lib/menus/sidenav/index.js +85 -113
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +7 -7
- package/lib/menus/sidenav/popup_menu_search/index.js +64 -84
- package/lib/menus/sidenav/types.d.ts +1 -1
- package/lib/noPermission/index.js +14 -17
- package/lib/panel/Content.d.ts +1 -1
- package/lib/panel/Content.js +47 -60
- package/lib/panel/DangerPanel.d.ts +1 -1
- package/lib/panel/DangerPanel.js +6 -9
- package/lib/panel/Default.d.ts +1 -1
- package/lib/panel/Default.js +45 -60
- package/lib/panel/Header.d.ts +1 -1
- package/lib/panel/Header.js +32 -30
- package/lib/panel/InfoPanel.d.ts +1 -1
- package/lib/panel/InfoPanel.js +6 -9
- package/lib/panel/PrimaryPanel.d.ts +1 -1
- package/lib/panel/PrimaryPanel.js +6 -9
- package/lib/panel/SuccessPanel.d.ts +1 -1
- package/lib/panel/SuccessPanel.js +6 -9
- package/lib/panel/ToolBar.d.ts +1 -1
- package/lib/panel/ToolBar.js +6 -5
- package/lib/panel/WarningPanel.d.ts +1 -1
- package/lib/panel/WarningPanel.js +6 -9
- package/lib/panel/helpers.d.ts +7 -2
- package/lib/panel/helpers.js +12 -24
- package/lib/panel/index.d.ts +1 -1
- package/lib/panel/index.js +9 -10
- package/lib/panel/types.d.ts +46 -5
- package/lib/permissionValidations.js +24 -29
- package/lib/popover/PopoverText.js +6 -5
- package/lib/popover/PopoverTitle.js +6 -5
- package/lib/popover/index.js +15 -19
- package/lib/progress/Bar.js +31 -37
- package/lib/progress/index.js +18 -20
- package/lib/radio/index.js +36 -57
- package/lib/shortcuts/index.js +10 -9
- package/lib/skeleton/SkeletonContainer.js +10 -11
- package/lib/skeleton/index.js +27 -34
- package/lib/spinner/SpinnerLoading.js +7 -8
- package/lib/spinner/index.js +23 -37
- package/lib/split/Split.js +95 -112
- package/lib/split/SplitSide.js +20 -19
- package/lib/split/helpers.js +3 -4
- package/lib/split/index.js +3 -4
- package/lib/table/Body.js +42 -45
- package/lib/table/Header.js +29 -32
- package/lib/table/HeaderColumn.d.ts +1 -1
- package/lib/table/HeaderColumn.js +35 -22
- package/lib/table/Row.js +45 -48
- package/lib/table/RowColumn.js +38 -39
- package/lib/table/helpers.js +7 -13
- package/lib/table/index.js +82 -102
- package/lib/table/types.d.ts +3 -0
- package/lib/tabs/DropdownTabs.d.ts +11 -0
- package/lib/tabs/DropdownTabs.js +71 -0
- package/lib/tabs/Menu.d.ts +1 -1
- package/lib/tabs/Menu.js +35 -23
- package/lib/tabs/{DropdownItems.d.ts → MenuTabs.d.ts} +3 -3
- package/lib/tabs/MenuTabs.js +82 -0
- package/lib/tabs/Panel.d.ts +1 -1
- package/lib/tabs/Panel.js +70 -66
- package/lib/tabs/context.d.ts +12 -0
- package/lib/tabs/context.js +130 -0
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/index.js +46 -225
- package/lib/tabs/tabHelpers.d.ts +4 -15
- package/lib/tabs/tabHelpers.js +37 -42
- package/lib/tabs/types.d.ts +48 -15
- package/lib/tabs/useTabs.d.ts +11 -0
- package/lib/tabs/useTabs.js +11 -0
- package/lib/textContent/index.d.ts +8 -0
- package/lib/textContent/index.js +30 -0
- package/lib/toolbar/ButtonBar.js +39 -43
- package/lib/toolbar/LabelBar.js +36 -40
- package/lib/toolbar/Separator.js +5 -8
- package/lib/toolbar/ToolBarGroup.js +7 -7
- package/lib/toolbar/helpers.js +2 -3
- package/lib/toolbar/index.js +23 -25
- package/lib/toolbar/types.d.ts +1 -0
- package/lib/tooltip/index.js +28 -33
- package/lib/treetable/Body.js +21 -33
- package/lib/treetable/Header.js +11 -14
- package/lib/treetable/Row.js +90 -142
- package/lib/treetable/helpers.js +15 -24
- package/lib/treetable/index.js +11 -13
- package/lib/treeview/Header.js +8 -7
- package/lib/treeview/Node.js +96 -136
- package/lib/treeview/constants.js +2 -3
- package/lib/treeview/index.js +150 -216
- package/lib/uitour/helpers.js +4 -7
- package/lib/uitour/index.d.ts +2 -1
- package/lib/uitour/index.js +113 -100
- package/lib/uitour/types.d.ts +9 -1
- package/package.json +77 -82
- package/tsconfig.json +1 -0
- package/.tool-versions +0 -1
- package/lib/inputs/mask/imaskHOC.js +0 -224
- package/lib/tabs/DropdownItems.js +0 -65
- package/lib/tabs/MenuItems.d.ts +0 -11
- package/lib/tabs/MenuItems.js +0 -76
- package/lib/treeview_old/Header.js +0 -28
- package/lib/treeview_old/Node.js +0 -88
- package/lib/treeview_old/index.js +0 -42
- package/lib/types-c2a0f035.d.ts +0 -50
package/lib/tabs/tabHelpers.d.ts
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React__default from 'react';
|
|
3
2
|
import { Position } from '../@types/Position.js';
|
|
4
|
-
import { PanelTypeAndProps, TabsContextValues } from './types.js';
|
|
5
|
-
import '../@types/Size.js';
|
|
6
|
-
import '../@types/PermissionAttr.js';
|
|
7
|
-
import '../@types/Icon.js';
|
|
8
|
-
import '../icons/helper.js';
|
|
9
3
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* Sometimes, when tabs were added dynamically, the children can came as array or Panels.
|
|
13
|
-
*/
|
|
14
|
-
declare function buildPanels(children: ReactNode | ReactNode, panels?: Array<ReactNode>): PanelTypeAndProps[];
|
|
4
|
+
declare function getCurrentThreshold(scrollableElement: HTMLDivElement, scrollThreshold: number): number;
|
|
5
|
+
declare const getTabs: (tabsProp: React__default.ReactNode) => any[];
|
|
15
6
|
declare function tabsClass(tabMenuPosition: Exclude<Position, 'center'>): string;
|
|
16
7
|
declare function menuStyles(tabMenuAlign: Position): {
|
|
17
8
|
justifyContent: string;
|
|
18
9
|
};
|
|
19
|
-
declare function numberAroundZeroAndOne(props: Array<object>, propName: number, componentName: string): Error | null;
|
|
20
10
|
declare const onDeniedOptions: string[];
|
|
21
|
-
declare const TabContext: React.Context<TabsContextValues>;
|
|
22
11
|
|
|
23
|
-
export {
|
|
12
|
+
export { getCurrentThreshold, getTabs, menuStyles, onDeniedOptions, tabsClass };
|
package/lib/tabs/tabHelpers.js
CHANGED
|
@@ -3,48 +3,56 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
6
|
+
exports.getCurrentThreshold = getCurrentThreshold;
|
|
7
|
+
exports.getTabs = void 0;
|
|
8
8
|
exports.menuStyles = menuStyles;
|
|
9
|
-
exports.numberAroundZeroAndOne = numberAroundZeroAndOne;
|
|
10
9
|
exports.onDeniedOptions = void 0;
|
|
11
10
|
exports.tabsClass = tabsClass;
|
|
12
|
-
var _react = require("react");
|
|
13
|
-
var _Panel = _interopRequireDefault(require("./Panel"));
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
14
12
|
var _permissionValidations = require("../permissionValidations");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
return panels;
|
|
13
|
+
const _excluded = ["children"];
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
17
|
+
function getCurrentThreshold(scrollableElement, scrollThreshold) {
|
|
18
|
+
const MIN_THRESHOLD = 0;
|
|
19
|
+
const MAX_THRESHOLD = 1;
|
|
20
|
+
if (scrollThreshold < MIN_THRESHOLD) return MIN_THRESHOLD;
|
|
21
|
+
if (scrollThreshold > MAX_THRESHOLD) return MAX_THRESHOLD;
|
|
22
|
+
const {
|
|
23
|
+
scrollHeight,
|
|
24
|
+
clientHeight
|
|
25
|
+
} = scrollableElement;
|
|
26
|
+
const offsetHeight = scrollHeight - clientHeight;
|
|
27
|
+
const calculatedScrollThreshold = Math.round(scrollHeight * scrollThreshold);
|
|
28
|
+
const maxScrollThreshold = Math.round(offsetHeight - offsetHeight * 0.3);
|
|
29
|
+
return Math.min(calculatedScrollThreshold, maxScrollThreshold);
|
|
35
30
|
}
|
|
31
|
+
const getTabs = tabsProp => {
|
|
32
|
+
const tabs = _react.default.Children.map(tabsProp, child => {
|
|
33
|
+
if (!child || ! /*#__PURE__*/_react.default.isValidElement(child)) return null;
|
|
34
|
+
const _child$props = child.props,
|
|
35
|
+
{
|
|
36
|
+
children: childrenProp
|
|
37
|
+
} = _child$props,
|
|
38
|
+
props = _objectWithoutProperties(_child$props, _excluded);
|
|
39
|
+
return props;
|
|
40
|
+
}) || [];
|
|
41
|
+
return tabs.filter(tab => !tab.hidden);
|
|
42
|
+
};
|
|
36
43
|
|
|
37
44
|
/**
|
|
38
45
|
* Get the css class according to the options passed to the Tabs Component
|
|
39
46
|
*/
|
|
40
|
-
|
|
47
|
+
exports.getTabs = getTabs;
|
|
48
|
+
const positionsMenuClass = {
|
|
41
49
|
top: '',
|
|
42
50
|
left: 'menu-left',
|
|
43
51
|
bottom: 'menu-bottom',
|
|
44
52
|
right: 'menu-right'
|
|
45
53
|
};
|
|
46
54
|
function tabsClass(tabMenuPosition) {
|
|
47
|
-
|
|
55
|
+
let cssClass = 'tabs-component ';
|
|
48
56
|
cssClass += positionsMenuClass[tabMenuPosition];
|
|
49
57
|
return cssClass;
|
|
50
58
|
}
|
|
@@ -52,7 +60,7 @@ function tabsClass(tabMenuPosition) {
|
|
|
52
60
|
/**
|
|
53
61
|
* Menu Styles for tab menus
|
|
54
62
|
*/
|
|
55
|
-
|
|
63
|
+
const flextJustifyContent = {
|
|
56
64
|
left: 'flex-start',
|
|
57
65
|
top: 'flex-start',
|
|
58
66
|
right: 'flex-end',
|
|
@@ -64,17 +72,4 @@ function menuStyles(tabMenuAlign) {
|
|
|
64
72
|
justifyContent: flextJustifyContent[tabMenuAlign]
|
|
65
73
|
};
|
|
66
74
|
}
|
|
67
|
-
|
|
68
|
-
if (props[propName]) {
|
|
69
|
-
var value = props[propName];
|
|
70
|
-
if (typeof value === 'number') {
|
|
71
|
-
return value >= 0 && value <= 1 ? null : new Error("invalid value of ".concat(propName, " in ").concat(componentName, " component, is not between 0 and 1"));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
var onDeniedOptions = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
77
|
-
exports.onDeniedOptions = onDeniedOptions;
|
|
78
|
-
var TabContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
79
|
-
var _default = TabContext;
|
|
80
|
-
exports.default = _default;
|
|
75
|
+
const onDeniedOptions = exports.onDeniedOptions = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
package/lib/tabs/types.d.ts
CHANGED
|
@@ -1,47 +1,79 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RefObject, CSSProperties, ReactElement, 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
|
-
|
|
8
|
+
type TabsContextType = {
|
|
9
|
+
tabs: TabProps[];
|
|
10
|
+
menuTabs: TabProps[];
|
|
11
|
+
dropdownTabs: TabProps[];
|
|
12
|
+
selectedTabId: string | number | null;
|
|
13
|
+
selectTab: (tabId: string | number) => void;
|
|
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;
|
|
14
29
|
}
|
|
15
30
|
interface ITabsPros {
|
|
16
31
|
style?: CSSProperties;
|
|
17
32
|
toolbar?: ReactElement;
|
|
33
|
+
toolBarRef?: (value: HTMLDivElement | null) => void;
|
|
18
34
|
children?: ReactNode;
|
|
19
|
-
selectedTab?: string;
|
|
35
|
+
selectedTab?: string | number;
|
|
20
36
|
tabMenuSize?: Size;
|
|
21
37
|
tabMenuAlign?: Position;
|
|
22
38
|
firstTabIdent?: boolean;
|
|
23
39
|
tabMenuPosition?: Exclude<Position, 'center'>;
|
|
24
|
-
handlerTabClick?: (id?: string) => void;
|
|
40
|
+
handlerTabClick?: (id?: string | number) => void;
|
|
25
41
|
handlerCloseTab?: (id?: string, idx?: string) => void;
|
|
26
42
|
customClassForToolBar?: string;
|
|
27
|
-
|
|
43
|
+
tabsWidth?: string | number;
|
|
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;
|
|
28
61
|
}
|
|
29
62
|
interface MenuProps {
|
|
30
63
|
toolbar?: ReactElement;
|
|
31
64
|
customClass?: string;
|
|
32
65
|
customClassForToolBar?: string;
|
|
33
|
-
menuRef?: (value: HTMLDivElement | null) => void;
|
|
34
|
-
toolBarRef?: (value: HTMLDivElement | null) => void;
|
|
35
66
|
tabWidth?: string | number;
|
|
36
67
|
tabMenuAlign?: Position;
|
|
37
68
|
selectedTabId?: string;
|
|
38
69
|
firstTabIdent?: boolean;
|
|
39
|
-
|
|
70
|
+
tabs?: TabProps[];
|
|
40
71
|
tabMenuSize?: Size;
|
|
41
72
|
handlerClick?: (id?: string) => void;
|
|
42
|
-
dropdownPanels?: Array<PanelTypeAndProps>;
|
|
43
73
|
handlerRemovePanel?: (id?: string, idx?: number, bool?: boolean) => void;
|
|
44
74
|
}
|
|
75
|
+
interface DropdownProps extends MenuProps {
|
|
76
|
+
}
|
|
45
77
|
interface PanelProps {
|
|
46
78
|
id?: string;
|
|
47
79
|
icon?: ReactElement;
|
|
@@ -60,6 +92,7 @@ interface PanelProps {
|
|
|
60
92
|
permissionAttr?: PermissionAttr;
|
|
61
93
|
tooltipPosition?: Exclude<Position, 'center'>;
|
|
62
94
|
onEndReachedThreshold?: number;
|
|
95
|
+
style?: CSSProperties;
|
|
63
96
|
}
|
|
64
97
|
|
|
65
|
-
export { ITabsPros, MenuProps, PanelProps,
|
|
98
|
+
export { DropdownProps, ITabsPros, MenuProps, PanelProps, TabProps, TabsContextType, TabsProviderProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TabsContextType } from './types.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '../@types/Size.js';
|
|
4
|
+
import '../@types/Position.js';
|
|
5
|
+
import '../@types/PermissionAttr.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
8
|
+
|
|
9
|
+
declare function useTabs(): TabsContextType;
|
|
10
|
+
|
|
11
|
+
export { useTabs };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useTabs = useTabs;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _context = require("./context");
|
|
9
|
+
function useTabs() {
|
|
10
|
+
return (0, _react.useContext)(_context.TabsContext);
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface TextContentProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
4
|
+
as?: 'span' | 'strong' | 'p';
|
|
5
|
+
}
|
|
6
|
+
declare const TextContent: React__default.ForwardRefExoticComponent<TextContentProps & React__default.RefAttributes<HTMLElement>>;
|
|
7
|
+
|
|
8
|
+
export { TextContent as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
require("../assets/styles/textContent.scss");
|
|
9
|
+
const _excluded = ["as", "children", "className"];
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
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; }
|
|
12
|
+
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); }
|
|
13
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
14
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
15
|
+
const TextContent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
16
|
+
let {
|
|
17
|
+
as: Comp = 'span',
|
|
18
|
+
children,
|
|
19
|
+
className
|
|
20
|
+
} = _ref,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
const typedRef = ref;
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(Comp, _extends({
|
|
24
|
+
ref: typedRef,
|
|
25
|
+
className: "text-content-component ".concat(className),
|
|
26
|
+
"data-textcontent": Comp
|
|
27
|
+
}, props), children);
|
|
28
|
+
});
|
|
29
|
+
TextContent.displayName = 'TextContent';
|
|
30
|
+
var _default = exports.default = TextContent;
|
package/lib/toolbar/ButtonBar.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,47 +7,45 @@ exports.default = void 0;
|
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _buttons = _interopRequireWildcard(require("../buttons"));
|
|
10
9
|
var _helpers = _interopRequireDefault(require("./helpers"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
15
|
-
function ownKeys(
|
|
16
|
-
function _objectSpread(
|
|
17
|
-
function _defineProperty(
|
|
18
|
-
function _toPropertyKey(
|
|
19
|
-
function _toPrimitive(
|
|
20
|
-
function _objectWithoutProperties(
|
|
21
|
-
function _objectWithoutPropertiesLoose(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
label = _ref$label === void 0 ? '' : _ref$label,
|
|
10
|
+
const _excluded = ["size", "icon", "onClick", "iconName", "transparent", "customClass", "type", "iconAlign", "label"];
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
20
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
21
|
+
const ButtonBar = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
size,
|
|
24
|
+
icon,
|
|
25
|
+
onClick,
|
|
26
|
+
iconName,
|
|
27
|
+
transparent,
|
|
28
|
+
customClass,
|
|
29
|
+
type = 'default',
|
|
30
|
+
iconAlign = 'left',
|
|
31
|
+
label = ''
|
|
32
|
+
} = _ref,
|
|
35
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
-
|
|
37
|
-
skeletonize
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
34
|
+
const {
|
|
35
|
+
skeletonize
|
|
36
|
+
} = (0, _react.useContext)(_helpers.default);
|
|
37
|
+
const getProps = () => _objectSpread(_objectSpread({}, props), {}, {
|
|
38
|
+
size,
|
|
39
|
+
icon,
|
|
40
|
+
label,
|
|
41
|
+
onClick,
|
|
42
|
+
iconName,
|
|
43
|
+
iconAlign,
|
|
44
|
+
transparent,
|
|
45
|
+
skeletonize,
|
|
46
|
+
boxShadow: false,
|
|
47
|
+
customClass: "buttonbar ".concat(customClass)
|
|
48
|
+
});
|
|
52
49
|
return {
|
|
53
50
|
default: /*#__PURE__*/_react.default.createElement(_buttons.default, getProps()),
|
|
54
51
|
primary: /*#__PURE__*/_react.default.createElement(_buttons.PrimaryButton, getProps()),
|
|
@@ -66,5 +63,4 @@ var ButtonBar = function ButtonBar(_ref) {
|
|
|
66
63
|
restore: /*#__PURE__*/_react.default.createElement(_buttons.RestoreButton, getProps())
|
|
67
64
|
}[type];
|
|
68
65
|
};
|
|
69
|
-
var _default = ButtonBar;
|
|
70
|
-
exports.default = _default;
|
|
66
|
+
var _default = exports.default = ButtonBar;
|
package/lib/toolbar/LabelBar.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,47 +7,45 @@ exports.default = void 0;
|
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _labels = _interopRequireWildcard(require("../labels"));
|
|
10
9
|
var _helpers = _interopRequireDefault(require("./helpers"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
15
|
-
function ownKeys(
|
|
16
|
-
function _objectSpread(
|
|
17
|
-
function _defineProperty(
|
|
18
|
-
function _toPropertyKey(
|
|
19
|
-
function _toPrimitive(
|
|
20
|
-
function _objectWithoutProperties(
|
|
21
|
-
function _objectWithoutPropertiesLoose(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
bordered = _ref$bordered === void 0 ? false : _ref$bordered,
|
|
10
|
+
const _excluded = ["size", "icon", "children", "iconName", "style", "type", "bordered"];
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
20
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
21
|
+
const LabelBar = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
size,
|
|
24
|
+
icon,
|
|
25
|
+
children,
|
|
26
|
+
iconName,
|
|
27
|
+
style = {},
|
|
28
|
+
type = 'default',
|
|
29
|
+
bordered = false
|
|
30
|
+
} = _ref,
|
|
33
31
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
|
|
32
|
+
const styles = _objectSpread({
|
|
35
33
|
lineHeight: 'unset',
|
|
36
34
|
padding: '7px 10px 6px'
|
|
37
35
|
}, style);
|
|
38
|
-
|
|
39
|
-
skeletonize
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
36
|
+
const {
|
|
37
|
+
skeletonize
|
|
38
|
+
} = (0, _react.useContext)(_helpers.default);
|
|
39
|
+
const getProps = () => _objectSpread(_objectSpread({}, props), {}, {
|
|
40
|
+
size,
|
|
41
|
+
icon,
|
|
42
|
+
children,
|
|
43
|
+
iconName,
|
|
44
|
+
style: styles,
|
|
45
|
+
bordered,
|
|
46
|
+
skeletonize,
|
|
47
|
+
customClass: 'labelbar'
|
|
48
|
+
});
|
|
52
49
|
return {
|
|
53
50
|
default: /*#__PURE__*/_react.default.createElement(_labels.default, getProps()),
|
|
54
51
|
primary: /*#__PURE__*/_react.default.createElement(_labels.PrimaryLabel, getProps()),
|
|
@@ -58,5 +55,4 @@ var LabelBar = function LabelBar(_ref) {
|
|
|
58
55
|
warning: /*#__PURE__*/_react.default.createElement(_labels.WarningLabel, getProps())
|
|
59
56
|
}[type];
|
|
60
57
|
};
|
|
61
|
-
var _default = LabelBar;
|
|
62
|
-
exports.default = _default;
|
|
58
|
+
var _default = exports.default = LabelBar;
|
package/lib/toolbar/Separator.js
CHANGED
|
@@ -5,11 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
function _interopRequireDefault(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
var _default = Separator;
|
|
15
|
-
exports.default = _default;
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const Separator = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
10
|
+
className: "separator"
|
|
11
|
+
});
|
|
12
|
+
var _default = exports.default = Separator;
|
|
@@ -5,15 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
function _interopRequireDefault(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
style =
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const ToolBarGroup = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children,
|
|
12
|
+
style = {}
|
|
13
|
+
} = _ref;
|
|
13
14
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
14
15
|
className: "toolbar-group",
|
|
15
16
|
style: style
|
|
16
17
|
}, children);
|
|
17
18
|
};
|
|
18
|
-
var _default = ToolBarGroup;
|
|
19
|
-
exports.default = _default;
|
|
19
|
+
var _default = exports.default = ToolBarGroup;
|
package/lib/toolbar/helpers.js
CHANGED
|
@@ -5,6 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
|
|
9
|
-
var _default = ToolBarContext;
|
|
10
|
-
exports.default = _default;
|
|
8
|
+
const ToolBarContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
9
|
+
var _default = exports.default = ToolBarContext;
|