superdesk-ui-framework 4.0.46 → 4.0.48
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.js +0 -1
- package/.eslintrc.json +2 -5
- package/.github/workflows/test.yml +22 -26
- package/.prettierignore +3 -0
- package/.prettierrc.js +9 -0
- package/.travis.yml +4 -4
- package/README.md +14 -1
- package/app/styles/form-elements/_forms-general.scss +0 -4
- package/app-typescript/components/Alert.tsx +12 -16
- package/app-typescript/components/Autocomplete.tsx +53 -42
- package/app-typescript/components/Badge.tsx +1 -1
- package/app-typescript/components/Button.tsx +5 -11
- package/app-typescript/components/ButtonGroup.tsx +15 -10
- package/app-typescript/components/Carousel.tsx +25 -26
- package/app-typescript/components/CheckButtonGroup.tsx +6 -10
- package/app-typescript/components/Checkbox.tsx +16 -10
- package/app-typescript/components/CheckboxButton.tsx +22 -13
- package/app-typescript/components/ContentDivider.tsx +6 -7
- package/app-typescript/components/CreateButton.tsx +8 -6
- package/app-typescript/components/DatePicker.tsx +59 -55
- package/app-typescript/components/DateTimePicker.tsx +175 -117
- package/app-typescript/components/Divider.tsx +2 -4
- package/app-typescript/components/DonutChart.tsx +11 -6
- package/app-typescript/components/DragHandle.tsx +10 -6
- package/app-typescript/components/DragHandleDots.tsx +1 -3
- package/app-typescript/components/DropZone.tsx +27 -25
- package/app-typescript/components/Dropdown.tsx +61 -102
- package/app-typescript/components/DropdownFirst.tsx +57 -69
- package/app-typescript/components/DurationInput.tsx +64 -54
- package/app-typescript/components/Editor/EditorButton.tsx +4 -3
- package/app-typescript/components/EmptyState.tsx +10 -14
- package/app-typescript/components/Form/FormGroup.tsx +9 -16
- package/app-typescript/components/Form/FormItem.tsx +1 -5
- package/app-typescript/components/Form/FormLabel.tsx +0 -1
- package/app-typescript/components/Form/FormRow.tsx +12 -19
- package/app-typescript/components/Form/FormRowNew.tsx +9 -16
- package/app-typescript/components/Form/FormText.tsx +1 -5
- package/app-typescript/components/Form/InputBase.tsx +12 -11
- package/app-typescript/components/Form/InputNew.tsx +11 -12
- package/app-typescript/components/Form/InputWrapper.tsx +9 -18
- package/app-typescript/components/Form/index.tsx +9 -9
- package/app-typescript/components/FormLabel.tsx +1 -5
- package/app-typescript/components/GridItem.tsx +38 -69
- package/app-typescript/components/GridList.tsx +2 -6
- package/app-typescript/components/HeadingText.tsx +4 -5
- package/app-typescript/components/IconButton.tsx +4 -10
- package/app-typescript/components/IconLabel.tsx +5 -5
- package/app-typescript/components/IconPicker.tsx +128 -126
- package/app-typescript/components/IllustrationButton.tsx +2 -8
- package/app-typescript/components/Input.tsx +2 -2
- package/app-typescript/components/Label.tsx +11 -7
- package/app-typescript/components/Layouts/AuthorinInnerSideBar.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringContainer.tsx +4 -6
- package/app-typescript/components/Layouts/AuthoringFrame.tsx +4 -20
- package/app-typescript/components/Layouts/AuthoringFrameContainer.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringFrameLeftBar.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringFrameMain.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringFrameNavBar.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringFrameOverlay.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringFrameRightBar.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringFrameSidePanel.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringFrameSidePanelOverlay.tsx +1 -3
- package/app-typescript/components/Layouts/AuthoringInnerBody.tsx +3 -6
- package/app-typescript/components/Layouts/AuthoringInnerHeader.tsx +5 -5
- package/app-typescript/components/Layouts/AuthoringMain.tsx +3 -4
- package/app-typescript/components/Layouts/AuthoringMainContainer.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringMainContent.tsx +1 -5
- package/app-typescript/components/Layouts/AuthoringMainToolBar.tsx +1 -6
- package/app-typescript/components/Layouts/BottomBarAction.tsx +8 -10
- package/app-typescript/components/Layouts/Container.tsx +13 -8
- package/app-typescript/components/Layouts/ContentSplitter.tsx +2 -6
- package/app-typescript/components/Layouts/CoreLayout.tsx +5 -12
- package/app-typescript/components/Layouts/CoreLayoutContainer.tsx +1 -1
- package/app-typescript/components/Layouts/CoreLayoutFooter.tsx +1 -5
- package/app-typescript/components/Layouts/CoreLayoutMain.tsx +4 -4
- package/app-typescript/components/Layouts/CoreLayoutOverlay.tsx +1 -5
- package/app-typescript/components/Layouts/CoreLayoutSlideInMenu.tsx +2 -4
- package/app-typescript/components/Layouts/CoreLayoutTopMenu.tsx +8 -9
- package/app-typescript/components/Layouts/HamburgerButton.tsx +13 -14
- package/app-typescript/components/Layouts/HeaderPanel.tsx +1 -5
- package/app-typescript/components/Layouts/Layout.tsx +10 -16
- package/app-typescript/components/Layouts/LayoutContainer.tsx +2 -7
- package/app-typescript/components/Layouts/LeftPanel.tsx +4 -11
- package/app-typescript/components/Layouts/MainMenu.tsx +18 -32
- package/app-typescript/components/Layouts/MainPanel.tsx +10 -11
- package/app-typescript/components/Layouts/NotificationPanel.tsx +20 -29
- package/app-typescript/components/Layouts/OverlayPanel.tsx +3 -5
- package/app-typescript/components/Layouts/PageLayout.tsx +4 -21
- package/app-typescript/components/Layouts/Panel.tsx +45 -81
- package/app-typescript/components/Layouts/index.tsx +39 -39
- package/app-typescript/components/LeftMenu.tsx +51 -53
- package/app-typescript/components/ListItemLoader.tsx +1 -1
- package/app-typescript/components/Lists/BoxedList.tsx +16 -41
- package/app-typescript/components/Lists/CalendarWeekDayItem.tsx +2 -10
- package/app-typescript/components/Lists/ContentList.tsx +68 -62
- package/app-typescript/components/Lists/SimpleList.tsx +13 -12
- package/app-typescript/components/Lists/TableList.tsx +169 -217
- package/app-typescript/components/Lists/index.tsx +2 -2
- package/app-typescript/components/Loader.tsx +1 -3
- package/app-typescript/components/Menu.tsx +2 -4
- package/app-typescript/components/Modal.tsx +21 -21
- package/app-typescript/components/MultiSelect.tsx +6 -6
- package/app-typescript/components/NavButton.tsx +10 -8
- package/app-typescript/components/Navigation/BottomNav.tsx +21 -17
- package/app-typescript/components/Navigation/QuickNavBar.tsx +40 -37
- package/app-typescript/components/Navigation/SideBarMenu.tsx +21 -17
- package/app-typescript/components/Navigation/SideBarTabs.tsx +13 -19
- package/app-typescript/components/Navigation/index.tsx +3 -3
- package/app-typescript/components/Popover.tsx +19 -21
- package/app-typescript/components/PropsList.tsx +2 -4
- package/app-typescript/components/RadioButtonGroup.tsx +48 -45
- package/app-typescript/components/RadioGroup.tsx +9 -8
- package/app-typescript/components/ResizablePanels.tsx +2 -3
- package/app-typescript/components/ResizeObserverComponent.tsx +1 -5
- package/app-typescript/components/SearchBar.tsx +53 -45
- package/app-typescript/components/Select.tsx +6 -8
- package/app-typescript/components/SelectGrid.tsx +32 -40
- package/app-typescript/components/SelectPreview.tsx +31 -25
- package/app-typescript/components/SelectWithTemplate.tsx +10 -11
- package/app-typescript/components/ShowPopup.tsx +30 -46
- package/app-typescript/components/SidebarMenu.tsx +19 -18
- package/app-typescript/components/Skeleton.tsx +12 -11
- package/app-typescript/components/SlidingToolbar.tsx +1 -6
- package/app-typescript/components/Spinner.tsx +2 -6
- package/app-typescript/components/StrechBar.tsx +1 -5
- package/app-typescript/components/SubNav.tsx +10 -8
- package/app-typescript/components/SvgIconIllustration.tsx +477 -105
- package/app-typescript/components/Switch.tsx +14 -12
- package/app-typescript/components/SwitchGroup.tsx +10 -10
- package/app-typescript/components/TabCustom.tsx +28 -35
- package/app-typescript/components/TabList.tsx +13 -10
- package/app-typescript/components/Tag.tsx +21 -24
- package/app-typescript/components/TagInput.tsx +4 -11
- package/app-typescript/components/Text/Heading.tsx +21 -41
- package/app-typescript/components/Text/Text.tsx +16 -12
- package/app-typescript/components/Text/Time.tsx +14 -10
- package/app-typescript/components/ThemeSelector.tsx +15 -14
- package/app-typescript/components/TimePicker.tsx +2 -2
- package/app-typescript/components/TimePickerV2.tsx +20 -20
- package/app-typescript/components/Toast.tsx +11 -7
- package/app-typescript/components/ToastMessage.tsx +3 -14
- package/app-typescript/components/ToastText.tsx +30 -32
- package/app-typescript/components/ToastWrapper.tsx +76 -74
- package/app-typescript/components/ToggleBox/CustomHeaderToggleBox.tsx +30 -45
- package/app-typescript/components/ToggleBox/SimpleToggleBox.tsx +31 -33
- package/app-typescript/components/ToggleBox/index.tsx +3 -7
- package/app-typescript/components/Tooltip.tsx +1 -1
- package/app-typescript/components/TreeMenu.tsx +72 -81
- package/app-typescript/components/TreeSelect/KeyboardNavigation.tsx +1 -5
- package/app-typescript/components/TreeSelect/TreeSelect.tsx +221 -238
- package/app-typescript/components/TreeSelect/TreeSelectItem.tsx +20 -24
- package/app-typescript/components/TreeSelect/TreeSelectPill.tsx +12 -15
- package/app-typescript/components/WithPagination.tsx +34 -39
- package/app-typescript/components/WithPopover.tsx +0 -1
- package/app-typescript/components/WithPortal.tsx +4 -7
- package/app-typescript/components/WithSizeObserver.tsx +2 -6
- package/app-typescript/components/_Positioner.tsx +26 -26
- package/app-typescript/components/avatar/avatar-action-add.tsx +1 -6
- package/app-typescript/components/avatar/avatar-group.tsx +49 -68
- package/app-typescript/components/avatar/avatar-image.tsx +18 -12
- package/app-typescript/components/avatar/avatar-placeholder.tsx +3 -15
- package/app-typescript/components/avatar/avatar-text.tsx +1 -4
- package/app-typescript/components/avatar/avatar-wrapper.tsx +18 -30
- package/app-typescript/components/avatar/avatar.tsx +5 -8
- package/app-typescript/components/with-pagination.spec.tsx +8 -27
- package/app-typescript/helpers.tsx +2 -2
- package/app-typescript/index.ts +111 -100
- package/declarations.d.ts +1 -1
- package/dist/components/Alerts.tsx +171 -78
- package/dist/components/Autocomplete.tsx +187 -78
- package/dist/components/Avatar.tsx +52 -112
- package/dist/components/Badges.tsx +111 -67
- package/dist/components/BigIconFont.tsx +29 -17
- package/dist/components/BoxedList.tsx +244 -114
- package/dist/components/ButtonGroups.tsx +213 -147
- package/dist/components/Buttons.tsx +409 -137
- package/dist/components/Card.tsx +6 -7
- package/dist/components/Carousel.tsx +126 -39
- package/dist/components/Checkboxs.tsx +446 -105
- package/dist/components/Container.tsx +95 -48
- package/dist/components/ContentDivider.tsx +110 -63
- package/dist/components/ContentList.tsx +577 -253
- package/dist/components/CreateButton.tsx +71 -21
- package/dist/components/DatePicker.tsx +102 -26
- package/dist/components/DateTimePicker.tsx +46 -10
- package/dist/components/DragHandleDocs.tsx +56 -26
- package/dist/components/DropZone.tsx +67 -29
- package/dist/components/Dropdowns.tsx +220 -131
- package/dist/components/DurationInput.tsx +92 -32
- package/dist/components/EmptyStates.tsx +61 -26
- package/dist/components/GridItem.tsx +190 -91
- package/dist/components/GridList.tsx +37 -17
- package/dist/components/Heading.tsx +81 -35
- package/dist/components/IconButtons.tsx +125 -32
- package/dist/components/IconFont.tsx +24 -12
- package/dist/components/IconLabels.tsx +146 -39
- package/dist/components/IconPicker.tsx +30 -13
- package/dist/components/IllustrationButton.tsx +40 -20
- package/dist/components/Index.tsx +128 -114
- package/dist/components/Inputs.tsx +153 -51
- package/dist/components/Labels.tsx +191 -117
- package/dist/components/LeftNavigations.tsx +327 -100
- package/dist/components/ListItems.tsx +8 -9
- package/dist/components/Loader.tsx +5 -4
- package/dist/components/Menu.tsx +48 -26
- package/dist/components/Modal.tsx +298 -104
- package/dist/components/MultiSelect.tsx +189 -53
- package/dist/components/NavButtons.tsx +86 -30
- package/dist/components/Panel.tsx +367 -120
- package/dist/components/Popover.tsx +37 -17
- package/dist/components/QuickNavigationBar.tsx +222 -86
- package/dist/components/RadioGroup.tsx +375 -137
- package/dist/components/ResizablePanels.tsx +8 -14
- package/dist/components/SelectGrid.tsx +79 -38
- package/dist/components/SelectWithTemplate.tsx +23 -14
- package/dist/components/Selects.tsx +94 -29
- package/dist/components/SimpleList.tsx +91 -41
- package/dist/components/SubNav.tsx +57 -37
- package/dist/components/Switch.tsx +168 -42
- package/dist/components/TableList.tsx +220 -66
- package/dist/components/Tabs.tsx +149 -64
- package/dist/components/TagInputDocs.tsx +73 -17
- package/dist/components/Tags.tsx +104 -73
- package/dist/components/Text.tsx +108 -58
- package/dist/components/TimePicker.tsx +74 -20
- package/dist/components/Toasts.tsx +162 -80
- package/dist/components/Togglebox.tsx +164 -62
- package/dist/components/Tooltips.tsx +27 -15
- package/dist/components/TreeMenu.tsx +95 -59
- package/dist/components/TreeSelect.tsx +297 -162
- package/dist/components/WithPaginationDocs.tsx +15 -16
- package/dist/components/WithSizeObserver.tsx +9 -9
- package/dist/components/tree-select/TreeSelect.tsx +126 -77
- package/dist/components/tree-select/example-1.tsx +8 -12
- package/dist/components/tree-select/example-2.tsx +2 -5
- package/dist/components/utilities/BorderRadiusUtilities.tsx +28 -13
- package/dist/components/utilities/BorderUtilities.tsx +31 -32
- package/dist/components/utilities/DisplayUtilities.tsx +4 -5
- package/dist/components/utilities/FlexAndGridUtilities.tsx +38 -38
- package/dist/components/utilities/ObjectFitUtilities.tsx +4 -6
- package/dist/components/utilities/ObjectPositionUtilities.tsx +3 -4
- package/dist/components/utilities/OpacityUtilities.tsx +4 -7
- package/dist/components/utilities/OverflowUtilities.tsx +4 -5
- package/dist/components/utilities/PositionUtilities.tsx +4 -5
- package/dist/components/utilities/ShadowUtilities.tsx +15 -16
- package/dist/components/utilities/SpacingUtilities.tsx +483 -178
- package/dist/components/utilities/TextUtilities.tsx +109 -60
- package/dist/design-patterns/Index.tsx +8 -11
- package/dist/design-patterns/ThreePaneLayoutPattern.tsx +92 -76
- package/dist/examples.bundle.css +1257 -1155
- package/dist/examples.bundle.js +6246 -5620
- package/dist/playgrounds/dummy-data/items.ts +9 -8
- package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +559 -277
- package/dist/playgrounds/react-playgrounds/EditorTest.tsx +387 -204
- package/dist/playgrounds/react-playgrounds/FirstPlayground.tsx +74 -52
- package/dist/playgrounds/react-playgrounds/Index.tsx +11 -11
- package/dist/playgrounds/react-playgrounds/Multiedit.tsx +294 -218
- package/dist/playgrounds/react-playgrounds/PageLayoutTest.tsx +151 -105
- package/dist/playgrounds/react-playgrounds/PersonalProfile.tsx +481 -261
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +261 -149
- package/dist/playgrounds/react-playgrounds/Rundowns.tsx +757 -395
- package/dist/playgrounds/react-playgrounds/SamsPlayground.tsx +173 -91
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +1364 -818
- package/dist/playgrounds/react-playgrounds/UiPlayground.tsx +178 -86
- package/dist/playgrounds/react-playgrounds/components/AuthoringContainer.tsx +6 -7
- package/dist/playgrounds/react-playgrounds/components/AuthoringContent.tsx +42 -42
- package/dist/playgrounds/react-playgrounds/components/ContentSplitter.tsx +5 -8
- package/dist/playgrounds/react-playgrounds/components/GraphicButton.tsx +11 -11
- package/dist/playgrounds/react-playgrounds/components/GraphicButtonsGroup.tsx +2 -6
- package/dist/playgrounds/react-playgrounds/components/HeaderPanel.tsx +1 -5
- package/dist/playgrounds/react-playgrounds/components/Index.tsx +19 -21
- package/dist/playgrounds/react-playgrounds/components/Layout.tsx +11 -17
- package/dist/playgrounds/react-playgrounds/components/LayoutContainer.tsx +1 -1
- package/dist/playgrounds/react-playgrounds/components/MainPanel.tsx +11 -12
- package/dist/playgrounds/react-playgrounds/components/OverlayPanel.tsx +3 -5
- package/dist/playgrounds/react-playgrounds/components/Panel.tsx +6 -7
- package/dist/playgrounds/react-playgrounds/components/PanelContent.tsx +1 -5
- package/dist/playgrounds/react-playgrounds/components/PanelContentBlock.tsx +1 -6
- package/dist/playgrounds/react-playgrounds/components/PanelHeader.tsx +3 -3
- package/dist/playgrounds/react-playgrounds/components/SearchBar.tsx +16 -12
- package/dist/playgrounds/react-playgrounds/components/SidebarMenu.tsx +23 -14
- package/dist/playgrounds/react-playgrounds/components/SubNav.tsx +1 -5
- package/dist/playgrounds/react-playgrounds/components/ThemeDropdown.tsx +14 -11
- package/dist/playgrounds/react-playgrounds/tsconfig.json +1 -1
- package/dist/superdesk-ui.bundle.css +0 -3
- package/dist/superdesk-ui.bundle.js +1791 -1865
- package/dist/vendor.bundle.js +2 -2
- package/examples/css/docs-page.css +1135 -1116
- package/examples/css/reset.css +124 -43
- package/examples/css/vendor.css +125 -125
- package/examples/index.js +138 -139
- package/examples/js/doc.js +41 -40
- package/examples/js/react.js +82 -48
- package/examples/pages/components/Alerts.tsx +171 -78
- package/examples/pages/components/Autocomplete.tsx +187 -78
- package/examples/pages/components/Avatar.tsx +52 -112
- package/examples/pages/components/Badges.tsx +111 -67
- package/examples/pages/components/BigIconFont.tsx +29 -17
- package/examples/pages/components/BoxedList.tsx +244 -114
- package/examples/pages/components/ButtonGroups.tsx +213 -147
- package/examples/pages/components/Buttons.tsx +409 -137
- package/examples/pages/components/Card.tsx +6 -7
- package/examples/pages/components/Carousel.tsx +126 -39
- package/examples/pages/components/Checkboxs.tsx +446 -105
- package/examples/pages/components/Container.tsx +95 -48
- package/examples/pages/components/ContentDivider.tsx +110 -63
- package/examples/pages/components/ContentList.tsx +577 -253
- package/examples/pages/components/CreateButton.tsx +71 -21
- package/examples/pages/components/DatePicker.tsx +102 -26
- package/examples/pages/components/DateTimePicker.tsx +46 -10
- package/examples/pages/components/DragHandleDocs.tsx +56 -26
- package/examples/pages/components/DropZone.tsx +67 -29
- package/examples/pages/components/Dropdowns.tsx +220 -131
- package/examples/pages/components/DurationInput.tsx +92 -32
- package/examples/pages/components/EmptyStates.tsx +61 -26
- package/examples/pages/components/GridItem.tsx +190 -91
- package/examples/pages/components/GridList.tsx +37 -17
- package/examples/pages/components/Heading.tsx +81 -35
- package/examples/pages/components/IconButtons.tsx +125 -32
- package/examples/pages/components/IconFont.tsx +24 -12
- package/examples/pages/components/IconLabels.tsx +146 -39
- package/examples/pages/components/IconPicker.tsx +30 -13
- package/examples/pages/components/IllustrationButton.tsx +40 -20
- package/examples/pages/components/Index.tsx +128 -114
- package/examples/pages/components/Inputs.tsx +153 -51
- package/examples/pages/components/Labels.tsx +191 -117
- package/examples/pages/components/LeftNavigations.tsx +327 -100
- package/examples/pages/components/ListItems.tsx +8 -9
- package/examples/pages/components/Loader.tsx +5 -4
- package/examples/pages/components/Menu.tsx +48 -26
- package/examples/pages/components/Modal.tsx +298 -104
- package/examples/pages/components/MultiSelect.tsx +189 -53
- package/examples/pages/components/NavButtons.tsx +86 -30
- package/examples/pages/components/Panel.tsx +367 -120
- package/examples/pages/components/Popover.tsx +37 -17
- package/examples/pages/components/QuickNavigationBar.tsx +222 -86
- package/examples/pages/components/RadioGroup.tsx +375 -137
- package/examples/pages/components/ResizablePanels.tsx +8 -14
- package/examples/pages/components/SelectGrid.tsx +79 -38
- package/examples/pages/components/SelectWithTemplate.tsx +23 -14
- package/examples/pages/components/Selects.tsx +94 -29
- package/examples/pages/components/SimpleList.tsx +91 -41
- package/examples/pages/components/SubNav.tsx +57 -37
- package/examples/pages/components/Switch.tsx +168 -42
- package/examples/pages/components/TableList.tsx +220 -66
- package/examples/pages/components/Tabs.tsx +149 -64
- package/examples/pages/components/TagInputDocs.tsx +73 -17
- package/examples/pages/components/Tags.tsx +104 -73
- package/examples/pages/components/Text.tsx +108 -58
- package/examples/pages/components/TimePicker.tsx +74 -20
- package/examples/pages/components/Toasts.tsx +162 -80
- package/examples/pages/components/Togglebox.tsx +164 -62
- package/examples/pages/components/Tooltips.tsx +27 -15
- package/examples/pages/components/TreeMenu.tsx +95 -59
- package/examples/pages/components/TreeSelect.tsx +297 -162
- package/examples/pages/components/WithPaginationDocs.tsx +15 -16
- package/examples/pages/components/WithSizeObserver.tsx +9 -9
- package/examples/pages/components/tree-select/TreeSelect.tsx +126 -77
- package/examples/pages/components/tree-select/example-1.tsx +8 -12
- package/examples/pages/components/tree-select/example-2.tsx +2 -5
- package/examples/pages/components/utilities/BorderRadiusUtilities.tsx +28 -13
- package/examples/pages/components/utilities/BorderUtilities.tsx +31 -32
- package/examples/pages/components/utilities/DisplayUtilities.tsx +4 -5
- package/examples/pages/components/utilities/FlexAndGridUtilities.tsx +38 -38
- package/examples/pages/components/utilities/ObjectFitUtilities.tsx +4 -6
- package/examples/pages/components/utilities/ObjectPositionUtilities.tsx +3 -4
- package/examples/pages/components/utilities/OpacityUtilities.tsx +4 -7
- package/examples/pages/components/utilities/OverflowUtilities.tsx +4 -5
- package/examples/pages/components/utilities/PositionUtilities.tsx +4 -5
- package/examples/pages/components/utilities/ShadowUtilities.tsx +15 -16
- package/examples/pages/components/utilities/SpacingUtilities.tsx +483 -178
- package/examples/pages/components/utilities/TextUtilities.tsx +109 -60
- package/examples/pages/design-patterns/Index.tsx +8 -11
- package/examples/pages/design-patterns/ThreePaneLayoutPattern.tsx +92 -76
- package/examples/pages/playgrounds/dummy-data/items.ts +9 -8
- package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +559 -277
- package/examples/pages/playgrounds/react-playgrounds/EditorTest.tsx +387 -204
- package/examples/pages/playgrounds/react-playgrounds/FirstPlayground.tsx +74 -52
- package/examples/pages/playgrounds/react-playgrounds/Index.tsx +11 -11
- package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +294 -218
- package/examples/pages/playgrounds/react-playgrounds/PageLayoutTest.tsx +151 -105
- package/examples/pages/playgrounds/react-playgrounds/PersonalProfile.tsx +481 -261
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +261 -149
- package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +757 -395
- package/examples/pages/playgrounds/react-playgrounds/SamsPlayground.tsx +173 -91
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +1364 -818
- package/examples/pages/playgrounds/react-playgrounds/UiPlayground.tsx +178 -86
- package/examples/pages/playgrounds/react-playgrounds/components/AuthoringContainer.tsx +6 -7
- package/examples/pages/playgrounds/react-playgrounds/components/AuthoringContent.tsx +42 -42
- package/examples/pages/playgrounds/react-playgrounds/components/ContentSplitter.tsx +5 -8
- package/examples/pages/playgrounds/react-playgrounds/components/GraphicButton.tsx +11 -11
- package/examples/pages/playgrounds/react-playgrounds/components/GraphicButtonsGroup.tsx +2 -6
- package/examples/pages/playgrounds/react-playgrounds/components/HeaderPanel.tsx +1 -5
- package/examples/pages/playgrounds/react-playgrounds/components/Index.tsx +19 -21
- package/examples/pages/playgrounds/react-playgrounds/components/Layout.tsx +11 -17
- package/examples/pages/playgrounds/react-playgrounds/components/LayoutContainer.tsx +1 -1
- package/examples/pages/playgrounds/react-playgrounds/components/MainPanel.tsx +11 -12
- package/examples/pages/playgrounds/react-playgrounds/components/OverlayPanel.tsx +3 -5
- package/examples/pages/playgrounds/react-playgrounds/components/Panel.tsx +6 -7
- package/examples/pages/playgrounds/react-playgrounds/components/PanelContent.tsx +1 -5
- package/examples/pages/playgrounds/react-playgrounds/components/PanelContentBlock.tsx +1 -6
- package/examples/pages/playgrounds/react-playgrounds/components/PanelHeader.tsx +3 -3
- package/examples/pages/playgrounds/react-playgrounds/components/SearchBar.tsx +16 -12
- package/examples/pages/playgrounds/react-playgrounds/components/SidebarMenu.tsx +23 -14
- package/examples/pages/playgrounds/react-playgrounds/components/SubNav.tsx +1 -5
- package/examples/pages/playgrounds/react-playgrounds/components/ThemeDropdown.tsx +14 -11
- package/examples/pages/playgrounds/react-playgrounds/tsconfig.json +1 -1
- package/globals.d.ts +1 -1
- package/mocha-setup.ts +3 -3
- package/package.json +119 -117
- package/react/components/Alert.js +6 -9
- package/react/components/Autocomplete.js +15 -23
- package/react/components/Badge.js +1 -1
- package/react/components/Button.js +4 -6
- package/react/components/ButtonGroup.js +1 -1
- package/react/components/Carousel.js +3 -3
- package/react/components/CheckButtonGroup.js +3 -6
- package/react/components/CheckboxButton.js +2 -4
- package/react/components/ContentDivider.js +1 -1
- package/react/components/DatePicker.js +29 -26
- package/react/components/DateTimePicker.d.ts +26 -4
- package/react/components/DateTimePicker.js +82 -27
- package/react/components/Divider.js +1 -1
- package/react/components/DonutChart.js +1 -1
- package/react/components/DragHandle.js +1 -1
- package/react/components/DragHandleDots.js +1 -1
- package/react/components/DropZone.js +6 -8
- package/react/components/Dropdown.d.ts +1 -1
- package/react/components/Dropdown.js +34 -38
- package/react/components/DropdownFirst.d.ts +11 -11
- package/react/components/DropdownFirst.js +20 -24
- package/react/components/DurationInput.js +37 -34
- package/react/components/EmptyState.js +5 -5
- package/react/components/Form/FormGroup.js +1 -1
- package/react/components/Form/FormItem.js +1 -1
- package/react/components/Form/FormRow.js +1 -1
- package/react/components/Form/FormRowNew.js +3 -3
- package/react/components/Form/FormText.js +1 -1
- package/react/components/Form/InputNew.js +3 -3
- package/react/components/Form/InputWrapper.js +7 -10
- package/react/components/GridItem.d.ts +1 -1
- package/react/components/GridItem.js +16 -16
- package/react/components/GridList.js +1 -1
- package/react/components/HeadingText.js +4 -5
- package/react/components/IconLabel.js +3 -5
- package/react/components/IconPicker.d.ts +1 -1
- package/react/components/IconPicker.js +111 -104
- package/react/components/IllustrationButton.js +1 -1
- package/react/components/Input.js +1 -1
- package/react/components/Layouts/AuthorinInnerSideBar.js +1 -1
- package/react/components/Layouts/AuthoringContainer.js +1 -1
- package/react/components/Layouts/AuthoringFrame.js +4 -4
- package/react/components/Layouts/AuthoringFrameContainer.js +1 -1
- package/react/components/Layouts/AuthoringFrameLeftBar.js +1 -1
- package/react/components/Layouts/AuthoringFrameMain.js +1 -1
- package/react/components/Layouts/AuthoringFrameNavBar.js +1 -1
- package/react/components/Layouts/AuthoringFrameOverlay.js +1 -1
- package/react/components/Layouts/AuthoringFrameRightBar.js +1 -1
- package/react/components/Layouts/AuthoringFrameSidePanel.js +1 -1
- package/react/components/Layouts/AuthoringFrameSidePanelOverlay.js +1 -1
- package/react/components/Layouts/AuthoringMainContainer.js +1 -1
- package/react/components/Layouts/AuthoringMainContent.js +1 -1
- package/react/components/Layouts/AuthoringMainToolBar.js +1 -1
- package/react/components/Layouts/BottomBarAction.js +2 -2
- package/react/components/Layouts/ContentSplitter.js +1 -1
- package/react/components/Layouts/CoreLayout.js +2 -2
- package/react/components/Layouts/CoreLayoutContainer.js +1 -1
- package/react/components/Layouts/CoreLayoutFooter.js +1 -1
- package/react/components/Layouts/CoreLayoutOverlay.js +1 -1
- package/react/components/Layouts/CoreLayoutSlideInMenu.js +2 -2
- package/react/components/Layouts/CoreLayoutTopMenu.js +3 -3
- package/react/components/Layouts/HamburgerButton.js +1 -1
- package/react/components/Layouts/HeaderPanel.js +1 -1
- package/react/components/Layouts/Layout.d.ts +1 -1
- package/react/components/Layouts/Layout.js +9 -9
- package/react/components/Layouts/LayoutContainer.js +1 -1
- package/react/components/Layouts/LeftPanel.js +1 -1
- package/react/components/Layouts/MainMenu.js +8 -10
- package/react/components/Layouts/MainPanel.js +1 -1
- package/react/components/Layouts/NotificationPanel.d.ts +1 -1
- package/react/components/Layouts/NotificationPanel.js +7 -7
- package/react/components/Layouts/OverlayPanel.js +3 -3
- package/react/components/Layouts/PageLayout.js +2 -2
- package/react/components/Layouts/Panel.d.ts +1 -1
- package/react/components/Layouts/Panel.js +12 -18
- package/react/components/LeftMenu.d.ts +3 -3
- package/react/components/LeftMenu.js +11 -13
- package/react/components/Lists/BoxedList.js +6 -6
- package/react/components/Lists/CalendarWeekDayItem.js +2 -2
- package/react/components/Lists/ContentList.js +24 -26
- package/react/components/Lists/TableList.d.ts +1 -1
- package/react/components/Lists/TableList.js +59 -79
- package/react/components/Loader.js +1 -1
- package/react/components/Menu.js +1 -1
- package/react/components/Modal.d.ts +1 -1
- package/react/components/MultiSelect.d.ts +1 -1
- package/react/components/MultiSelect.js +2 -2
- package/react/components/NavButton.js +2 -4
- package/react/components/Navigation/BottomNav.js +9 -8
- package/react/components/Navigation/QuickNavBar.js +17 -20
- package/react/components/Navigation/SideBarMenu.js +11 -9
- package/react/components/Navigation/SideBarTabs.js +9 -8
- package/react/components/Popover.js +1 -1
- package/react/components/RadioButtonGroup.js +15 -23
- package/react/components/ResizablePanels.js +1 -3
- package/react/components/ResizeObserverComponent.js +1 -3
- package/react/components/SearchBar.js +14 -16
- package/react/components/Select.js +3 -3
- package/react/components/SelectGrid.js +15 -20
- package/react/components/SelectPreview.js +13 -13
- package/react/components/SelectWithTemplate.js +3 -5
- package/react/components/ShowPopup.js +7 -10
- package/react/components/Skeleton.js +1 -1
- package/react/components/SlidingToolbar.js +1 -1
- package/react/components/Spinner.js +1 -1
- package/react/components/StrechBar.js +1 -1
- package/react/components/SubNav.js +1 -1
- package/react/components/Switch.js +4 -6
- package/react/components/SwitchGroup.js +1 -1
- package/react/components/TabCustom.js +6 -4
- package/react/components/TabList.js +4 -8
- package/react/components/Tag.js +13 -17
- package/react/components/TagInput.js +1 -1
- package/react/components/Text/Heading.js +6 -6
- package/react/components/ThemeSelector.js +1 -1
- package/react/components/TimePickerV2.js +17 -17
- package/react/components/Toast.js +3 -3
- package/react/components/ToastMessage.d.ts +1 -1
- package/react/components/ToastMessage.js +1 -1
- package/react/components/ToastText.js +5 -8
- package/react/components/ToastWrapper.js +3 -5
- package/react/components/ToggleBox/CustomHeaderToggleBox.d.ts +1 -1
- package/react/components/ToggleBox/CustomHeaderToggleBox.js +7 -7
- package/react/components/ToggleBox/SimpleToggleBox.d.ts +1 -1
- package/react/components/ToggleBox/SimpleToggleBox.js +5 -5
- package/react/components/ToggleBox/index.js +3 -3
- package/react/components/TreeMenu.d.ts +1 -1
- package/react/components/TreeMenu.js +38 -44
- package/react/components/TreeSelect/TreeSelect.d.ts +2 -2
- package/react/components/TreeSelect/TreeSelect.js +105 -127
- package/react/components/TreeSelect/TreeSelectItem.d.ts +1 -1
- package/react/components/TreeSelect/TreeSelectItem.js +10 -13
- package/react/components/TreeSelect/TreeSelectPill.d.ts +1 -1
- package/react/components/TreeSelect/TreeSelectPill.js +8 -9
- package/react/components/WithPagination.js +18 -21
- package/react/components/WithPortal.d.ts +1 -1
- package/react/components/WithPortal.js +2 -1
- package/react/components/WithSizeObserver.js +1 -3
- package/react/components/_Positioner.js +11 -11
- package/react/components/avatar/avatar-action-add.js +1 -1
- package/react/components/avatar/avatar-group.js +11 -14
- package/react/components/avatar/avatar-image.js +6 -4
- package/react/components/avatar/avatar-placeholder.js +1 -1
- package/react/components/avatar/avatar-wrapper.js +2 -4
- package/react/components/avatar/avatar.js +4 -3
- package/react/helpers.js +2 -2
- package/react/index.d.ts +1 -1
- package/tasks/webpack.dev.js +1 -1
- package/tasks/webpack.js +5 -5
- package/tasks/webpack.prod.js +1 -5
- package/tsconfig.json +2 -5
- package/tslint.json +6 -12
- package/webpack.config.js +2 -5
@@ -110,8 +110,7 @@ var TableList = /** @class */ (function (_super) {
|
|
110
110
|
this.setState({
|
111
111
|
items: items,
|
112
112
|
});
|
113
|
-
return this.props.onDrag ?
|
114
|
-
this.props.onDrag(result.source.index, result.destination.index) : null;
|
113
|
+
return this.props.onDrag ? this.props.onDrag(result.source.index, result.destination.index) : null;
|
115
114
|
};
|
116
115
|
TableList.prototype.dropDown = function () {
|
117
116
|
return (React.createElement(Dropdown_1.Dropdown, { items: this.props.itemsDropdown ? this.props.itemsDropdown() : [] },
|
@@ -126,48 +125,33 @@ var TableList = /** @class */ (function (_super) {
|
|
126
125
|
},
|
127
126
|
_a["".concat(this.props.className)] = this.props.className,
|
128
127
|
_a));
|
129
|
-
return
|
130
|
-
|
131
|
-
|
132
|
-
React.createElement(
|
133
|
-
|
134
|
-
|
135
|
-
|
128
|
+
return this.state.items.length > 0 ? (this.props.dragAndDrop ? (React.createElement(react_beautiful_dnd_1.DragDropContext, { onDragEnd: this.onDragEnd },
|
129
|
+
React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: "droppable" }, function (provided, _snapshot) { return (React.createElement("div", __assign({ role: "list", className: classes, ref: provided.innerRef }, provided.droppableProps),
|
130
|
+
_this.state.items.map(function (item, index) { return (React.createElement(react_beautiful_dnd_1.Draggable, { key: index, draggableId: "".concat(index), index: index }, function (provided2, snapshot) {
|
131
|
+
return _this.props.append ? (React.createElement(PortalItem, { provided: provided2, snapshot: snapshot, item: item, index: index, dragAndDrop: _this.props.dragAndDrop, showDragHandle: _this.props.showDragHandle, addItem: _this.props.addItem, onAddItem: function () {
|
132
|
+
return _this.props.onAddItem && _this.props.onAddItem(index, item);
|
133
|
+
}, itemsDropdown: function () {
|
134
|
+
return _this.props.itemsDropdown ? _this.props.itemsDropdown(index) : [];
|
135
|
+
} })) : (React.createElement("div", __assign({ ref: provided2.innerRef }, provided2.draggableProps, provided2.dragHandleProps),
|
136
|
+
React.createElement(TableListItem, { dragAndDrop: _this.props.dragAndDrop, start: item.start, center: item.center, end: item.end, action: item.action, selected: item.selected, onClick: item.onClick ? item.onClick : undefined, onDoubleClick: item.onDoubleClick ? item.onDoubleClick : undefined, addItem: _this.props.addItem, itemsDropdown: function () {
|
137
|
+
return _this.props.itemsDropdown
|
136
138
|
? _this.props.itemsDropdown(index)
|
137
|
-
: [];
|
138
|
-
:
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
this.state.items.map(function (item, index) { return (React.createElement(TableListItem, { key: index, start: item.start, center: item.center, end: item.end, action: item.action, selected: item.selected, onClick: item.onClick
|
154
|
-
? item.onClick
|
155
|
-
: undefined, onDoubleClick: item.onDoubleClick
|
156
|
-
? item.onDoubleClick
|
157
|
-
: undefined, addItem: _this.props.addItem, itemsDropdown: function () { return _this.props.itemsDropdown
|
158
|
-
? _this.props.itemsDropdown(index)
|
159
|
-
: []; }, hexColor: item.hexColor, locked: item.locked, positionLocked: item.positionLocked, onAddItem: function () { return _this.props.onAddItem
|
160
|
-
&& _this.props.onAddItem(index, item); } })); }),
|
161
|
-
(this.props.addItem && !this.props.readOnly)
|
162
|
-
&& React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
163
|
-
React.createElement(Tooltip_1.Tooltip, { text: 'Add item', flow: 'top' },
|
164
|
-
React.createElement("div", { className: 'table-list__add-item--container sd-margin-x--auto' }, this.dropDown()))))
|
165
|
-
: (this.props.addItem && !this.props.readOnly)
|
166
|
-
? React.createElement("div", { role: 'list', className: classes },
|
167
|
-
React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
168
|
-
React.createElement(Tooltip_1.Tooltip, { text: 'Add item', flow: 'top' },
|
169
|
-
React.createElement("div", { className: 'table-list__add-item--container sd-margin-x--auto' }, this.dropDown()))))
|
170
|
-
: null);
|
139
|
+
: [];
|
140
|
+
}, hexColor: item.hexColor, locked: item.locked, positionLocked: item.positionLocked, onAddItem: function () {
|
141
|
+
return _this.props.onAddItem && _this.props.onAddItem(index, item);
|
142
|
+
}, showDragHandle: _this.props.showDragHandle })));
|
143
|
+
})); }),
|
144
|
+
provided.placeholder,
|
145
|
+
_this.props.addItem && !_this.props.readOnly && (React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
146
|
+
React.createElement(Tooltip_1.Tooltip, { text: "Add item", flow: "top" },
|
147
|
+
React.createElement("div", { className: "table-list__add-item--container sd-margin-x--auto" }, _this.dropDown())))))); }))) : (React.createElement("div", { role: "list", className: classes },
|
148
|
+
this.state.items.map(function (item, index) { return (React.createElement(TableListItem, { key: index, start: item.start, center: item.center, end: item.end, action: item.action, selected: item.selected, onClick: item.onClick ? item.onClick : undefined, onDoubleClick: item.onDoubleClick ? item.onDoubleClick : undefined, addItem: _this.props.addItem, itemsDropdown: function () { return (_this.props.itemsDropdown ? _this.props.itemsDropdown(index) : []); }, hexColor: item.hexColor, locked: item.locked, positionLocked: item.positionLocked, onAddItem: function () { return _this.props.onAddItem && _this.props.onAddItem(index, item); } })); }),
|
149
|
+
this.props.addItem && !this.props.readOnly && (React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
150
|
+
React.createElement(Tooltip_1.Tooltip, { text: "Add item", flow: "top" },
|
151
|
+
React.createElement("div", { className: "table-list__add-item--container sd-margin-x--auto" }, this.dropDown()))))))) : this.props.addItem && !this.props.readOnly ? (React.createElement("div", { role: "list", className: classes },
|
152
|
+
React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
153
|
+
React.createElement(Tooltip_1.Tooltip, { text: "Add item", flow: "top" },
|
154
|
+
React.createElement("div", { className: "table-list__add-item--container sd-margin-x--auto" }, this.dropDown()))))) : null;
|
171
155
|
};
|
172
156
|
return TableList;
|
173
157
|
}(React.PureComponent));
|
@@ -198,7 +182,7 @@ var TableListItem = /** @class */ (function (_super) {
|
|
198
182
|
var Wrapper = this.props.addItem
|
199
183
|
? function (_a) {
|
200
184
|
var children = _a.children;
|
201
|
-
return
|
185
|
+
return React.createElement("div", { className: "table-list__item-container" }, children);
|
202
186
|
}
|
203
187
|
: function (_a) {
|
204
188
|
var children = _a.children;
|
@@ -206,39 +190,39 @@ var TableListItem = /** @class */ (function (_super) {
|
|
206
190
|
};
|
207
191
|
return (React.createElement(Wrapper, null,
|
208
192
|
React.createElement(React.Fragment, null,
|
209
|
-
React.createElement("div", { role:
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
if (_this.props.
|
214
|
-
_this.props.
|
215
|
-
}
|
216
|
-
else {
|
217
|
-
if (selection.toString().length < 1) {
|
193
|
+
React.createElement("div", { role: "listitem", className: classes, onClick: function (e) {
|
194
|
+
return _this.multiClickHandler(e, {
|
195
|
+
onSingleClick: function () {
|
196
|
+
var selection = window.getSelection();
|
197
|
+
if (_this.props.onClick && selection) {
|
198
|
+
if (_this.props.dragAndDrop) {
|
218
199
|
_this.props.onClick();
|
219
200
|
}
|
201
|
+
else {
|
202
|
+
if (selection.toString().length < 1) {
|
203
|
+
_this.props.onClick();
|
204
|
+
}
|
205
|
+
}
|
206
|
+
}
|
207
|
+
},
|
208
|
+
onDoubleClick: function () {
|
209
|
+
if (_this.props.onDoubleClick) {
|
210
|
+
_this.props.onDoubleClick();
|
220
211
|
}
|
221
|
-
}
|
222
|
-
}
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
},
|
228
|
-
|
229
|
-
React.createElement("div", { className:
|
230
|
-
|
231
|
-
|
232
|
-
React.createElement("div", { className:
|
233
|
-
|
234
|
-
|
235
|
-
&& React.createElement("div", { className: 'table-list__slide-in-actions', onClick: this.onActionMenuClick }, this.props.action)),
|
236
|
-
this.props.addItem
|
237
|
-
&& React.createElement("div", { className: 'table-list__add-bar-container' },
|
238
|
-
React.createElement(Tooltip_1.Tooltip, { text: 'Add item', flow: 'top' },
|
239
|
-
React.createElement("div", { className: 'table-list__add-bar' },
|
240
|
-
React.createElement(Dropdown_1.Dropdown, { onChange: this.props.onAddItem, items: this.props.itemsDropdown ? this.props.itemsDropdown() : [] },
|
241
|
-
React.createElement(Button_1.Button, { type: "primary", icon: "plus-large", text: "Add item", size: "small", shape: "round", iconOnly: true, onClick: function () { return false; } }))))))));
|
212
|
+
},
|
213
|
+
});
|
214
|
+
} },
|
215
|
+
React.createElement("div", { className: "table-list__item-border", style: { backgroundColor: this.props.hexColor } }),
|
216
|
+
React.createElement("div", { className: "table-list__item-content" },
|
217
|
+
React.createElement("div", { className: "table-list__item-content-block" }, this.props.start && this.props.start),
|
218
|
+
React.createElement("div", { className: "table-list__item-content-block table-list__item-content-block--center" }, this.props.center && this.props.center),
|
219
|
+
React.createElement("div", { className: "table-list__item-content-block" }, this.props.end && this.props.end)),
|
220
|
+
this.props.action && (React.createElement("div", { className: "table-list__slide-in-actions", onClick: this.onActionMenuClick }, this.props.action))),
|
221
|
+
this.props.addItem && (React.createElement("div", { className: "table-list__add-bar-container" },
|
222
|
+
React.createElement(Tooltip_1.Tooltip, { text: "Add item", flow: "top" },
|
223
|
+
React.createElement("div", { className: "table-list__add-bar" },
|
224
|
+
React.createElement(Dropdown_1.Dropdown, { onChange: this.props.onAddItem, items: this.props.itemsDropdown ? this.props.itemsDropdown() : [] },
|
225
|
+
React.createElement(Button_1.Button, { type: "primary", icon: "plus-large", text: "Add item", size: "small", shape: "round", iconOnly: true, onClick: function () { return false; } })))))))));
|
242
226
|
};
|
243
227
|
return TableListItem;
|
244
228
|
}(React.PureComponent));
|
@@ -254,11 +238,7 @@ var PortalItem = /** @class */ (function (_super) {
|
|
254
238
|
var snapshot = this.props.snapshot;
|
255
239
|
var usePortal = snapshot.isDragging;
|
256
240
|
var child = (React.createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps),
|
257
|
-
React.createElement(TableListItem, { dragAndDrop: this.props.dragAndDrop, start: this.props.item.start, center: this.props.item.center, end: this.props.item.end, action: this.props.item.action, onClick: this.props.item.onClick
|
258
|
-
? this.props.item.onClick
|
259
|
-
: undefined, onDoubleClick: this.props.item.onDoubleClick
|
260
|
-
? this.props.item.onDoubleClick
|
261
|
-
: undefined, addItem: this.props.addItem, itemsDropdown: this.props.itemsDropdown, hexColor: this.props.item.hexColor, locked: this.props.item.locked, positionLocked: this.props.item.positionLocked, onAddItem: function () { return _this.props.onAddItem; }, showDragHandle: this.props.showDragHandle })));
|
241
|
+
React.createElement(TableListItem, { dragAndDrop: this.props.dragAndDrop, start: this.props.item.start, center: this.props.item.center, end: this.props.item.end, action: this.props.item.action, onClick: this.props.item.onClick ? this.props.item.onClick : undefined, onDoubleClick: this.props.item.onDoubleClick ? this.props.item.onDoubleClick : undefined, addItem: this.props.addItem, itemsDropdown: this.props.itemsDropdown, hexColor: this.props.item.hexColor, locked: this.props.item.locked, positionLocked: this.props.item.positionLocked, onAddItem: function () { return _this.props.onAddItem; }, showDragHandle: this.props.showDragHandle })));
|
262
242
|
if (!usePortal) {
|
263
243
|
return child;
|
264
244
|
}
|
@@ -57,7 +57,7 @@ var Loader = /** @class */ (function (_super) {
|
|
57
57
|
}
|
58
58
|
Loader.prototype.render = function () {
|
59
59
|
if (this.props.overlay) {
|
60
|
-
return
|
60
|
+
return React.createElement("div", { className: "sd-loader", style: { backgroundColor: this.props.backgroundColor } });
|
61
61
|
}
|
62
62
|
else {
|
63
63
|
return (React.createElement("div", { className: "sd-loader--inline", style: {
|
package/react/components/Menu.js
CHANGED
@@ -130,7 +130,7 @@ var Menu = /** @class */ (function (_super) {
|
|
130
130
|
}
|
131
131
|
}
|
132
132
|
} },
|
133
|
-
React.createElement(tieredmenu_1.TieredMenu, { popup: true, model: this.toPrimeReactInterface(this.props.items), ref: function (el) { return _this.menu = el; }, appendTo: document.body, onShow: function () {
|
133
|
+
React.createElement(tieredmenu_1.TieredMenu, { popup: true, model: this.toPrimeReactInterface(this.props.items), ref: function (el) { return (_this.menu = el); }, appendTo: document.body, onShow: function () {
|
134
134
|
_this.focusedBefore = document.activeElement;
|
135
135
|
var firstMenuItem = document.querySelectorAll('.p-tieredmenu [role="menuitem"]')[0];
|
136
136
|
if (firstMenuItem instanceof HTMLElement) {
|
@@ -8,7 +8,7 @@ interface IProps {
|
|
8
8
|
contentBg?: 'default' | 'medium' | 'dark';
|
9
9
|
contentPadding?: 'none' | 'small' | 'medium' | 'large';
|
10
10
|
size?: 'small' | 'medium' | 'large' | 'x-large';
|
11
|
-
position?:
|
11
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
12
12
|
maximized?: boolean;
|
13
13
|
maximizable?: boolean;
|
14
14
|
headerTemplate?: JSX.Element | string;
|
@@ -76,8 +76,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
76
76
|
var _this = this;
|
77
77
|
var _a;
|
78
78
|
var classes = (0, classnames_1.default)({
|
79
|
-
|
80
|
-
|
79
|
+
showSelectAll: this.props.showSelectAll,
|
80
|
+
showFilter: this.props.filter,
|
81
81
|
});
|
82
82
|
if (this.props.preview) {
|
83
83
|
return (React.createElement(SelectPreview_1.SelectPreview, { kind: { mode: 'multi-select' }, items: this.state.value, valueTemplate: this.props.selectedItemTemplate, getLabel: this.props.optionLabel }));
|
@@ -72,11 +72,9 @@ var NavButton = /** @class */ (function (_super) {
|
|
72
72
|
_a));
|
73
73
|
var value = this.props.value === undefined ? 'button' : this.props.value;
|
74
74
|
return (React.createElement("button", { type: value, className: classes, tabIndex: 0, onClick: this.props.onClick, "aria-label": this.props.text, id: this.props.id },
|
75
|
-
this.props.badgeValue &&
|
76
|
-
React.createElement(Badge_1.Badge, { text: this.props.badgeValue, type: 'primary' }),
|
75
|
+
this.props.badgeValue && React.createElement(Badge_1.Badge, { text: this.props.badgeValue, type: "primary" }),
|
77
76
|
this.props.icon ? React.createElement(Icon_1.Icon, { name: this.props.icon, size: this.props.iconSize }) : null,
|
78
|
-
!this.props.icon && this.props.text ?
|
79
|
-
React.createElement("span", { className: "sd-navbtn__text" }, this.props.text) : null));
|
77
|
+
!this.props.icon && this.props.text ? (React.createElement("span", { className: "sd-navbtn__text" }, this.props.text)) : null));
|
80
78
|
};
|
81
79
|
return NavButton;
|
82
80
|
}(React.PureComponent));
|
@@ -85,19 +85,20 @@ var BottomNav = /** @class */ (function (_super) {
|
|
85
85
|
};
|
86
86
|
BottomNav.prototype.render = function () {
|
87
87
|
var _this = this;
|
88
|
-
return (React.createElement("ul", { className:
|
89
|
-
return (React.createElement("li", { key: index, className: 'sd-bottom-nav-list__item'
|
90
|
-
|
88
|
+
return (React.createElement("ul", { className: "sd-bottom-nav-list" }, this.props.items.map(function (item, index) {
|
89
|
+
return (React.createElement("li", { key: index, className: 'sd-bottom-nav-list__item' +
|
90
|
+
(item['active']
|
91
91
|
? ' sd-bottom-nav-list__item--active'
|
92
|
-
:
|
93
|
-
|
92
|
+
: index === _this.state.index
|
93
|
+
? ' sd-bottom-nav-list__item--active'
|
94
|
+
: '') },
|
95
|
+
React.createElement("a", { className: "sd-bottom-nav-list__item-title", onClick: function (event) {
|
94
96
|
_this.handleClick(index);
|
95
97
|
item.onClick(event);
|
96
98
|
} },
|
97
|
-
item['icon'] &&
|
98
|
-
React.createElement(Icon_1.Icon, { name: item['icon'] }),
|
99
|
+
item['icon'] && React.createElement(Icon_1.Icon, { name: item['icon'] }),
|
99
100
|
React.createElement("span", null, item.title)),
|
100
|
-
React.createElement(IconButton_1.IconButton, { size:
|
101
|
+
React.createElement(IconButton_1.IconButton, { size: "small", icon: "close-small", ariaValue: "Delete", onClick: function () { return item.onRemove(index); } })));
|
101
102
|
})));
|
102
103
|
};
|
103
104
|
return BottomNav;
|
@@ -88,8 +88,7 @@ var QuickNavBar = /** @class */ (function (_super) {
|
|
88
88
|
});
|
89
89
|
}
|
90
90
|
if (item.id && this.props.scrollSpy) {
|
91
|
-
return (_a = document
|
92
|
-
.getElementById(item.id)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
91
|
+
return (_a = document.getElementById(item.id)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
93
92
|
}
|
94
93
|
if (item.onClick) {
|
95
94
|
item.onClick(event);
|
@@ -103,29 +102,27 @@ var QuickNavBar = /** @class */ (function (_super) {
|
|
103
102
|
itemsArr = __spreadArray(__spreadArray([], itemsArr, true), ["".concat(item.id)], false);
|
104
103
|
}
|
105
104
|
});
|
106
|
-
return (React.createElement("div", { className:
|
107
|
-
|
108
|
-
React.createElement(react_scrollspy_1.default, { items: itemsArr, currentClassName: "sd-quickbar-menu__list-item--active", rootEl: this.props.scrollSpy, offset: this.props.offset || 0 }, this.props.items.map(function (item, index) {
|
109
|
-
if (item === 'divider') {
|
110
|
-
return (React.createElement("li", { key: index, className: 'sd-quickbar__spacer' }));
|
111
|
-
}
|
112
|
-
else {
|
113
|
-
return (React.createElement("li", { key: index, "data-sd-tooltip": item['tooltip'], "data-flow": 'right', className: "sd-quickbar-menu__list-item" },
|
114
|
-
React.createElement("a", { role: 'button', "aria-label": item['tooltip'], className: 'sd-quickbar__btn', onClick: function () { return _this.handleClick(item, index, event); } },
|
115
|
-
React.createElement(Icon_1.Icon, { size: 'small', name: item['icon'] }))));
|
116
|
-
}
|
117
|
-
})))
|
118
|
-
: React.createElement("ul", null, this.props.items.map(function (item, index) {
|
105
|
+
return (React.createElement("div", { className: "sd-quickbar-menu" }, this.props.scrollSpy ? (React.createElement("ul", null,
|
106
|
+
React.createElement(react_scrollspy_1.default, { items: itemsArr, currentClassName: "sd-quickbar-menu__list-item--active", rootEl: this.props.scrollSpy, offset: this.props.offset || 0 }, this.props.items.map(function (item, index) {
|
119
107
|
if (item === 'divider') {
|
120
|
-
return
|
108
|
+
return React.createElement("li", { key: index, className: "sd-quickbar__spacer" });
|
121
109
|
}
|
122
110
|
else {
|
123
|
-
return (React.createElement("li", { key: index, "data-sd-tooltip": item['tooltip'], "data-flow":
|
124
|
-
React.createElement("a", { role:
|
125
|
-
+ (index === _this.state.index ? ' sd-quickbar__btn--active' : ''), onClick: function () { return _this.handleClick(item, index, event); } },
|
111
|
+
return (React.createElement("li", { key: index, "data-sd-tooltip": item['tooltip'], "data-flow": "right", className: "sd-quickbar-menu__list-item" },
|
112
|
+
React.createElement("a", { role: "button", "aria-label": item['tooltip'], className: 'sd-quickbar__btn', onClick: function () { return _this.handleClick(item, index, event); } },
|
126
113
|
React.createElement(Icon_1.Icon, { size: 'small', name: item['icon'] }))));
|
127
114
|
}
|
128
|
-
}))))
|
115
|
+
})))) : (React.createElement("ul", null, this.props.items.map(function (item, index) {
|
116
|
+
if (item === 'divider') {
|
117
|
+
return React.createElement("li", { key: index, className: "sd-quickbar__spacer" });
|
118
|
+
}
|
119
|
+
else {
|
120
|
+
return (React.createElement("li", { key: index, "data-sd-tooltip": item['tooltip'], "data-flow": "right" },
|
121
|
+
React.createElement("a", { role: "button", "aria-label": item['tooltip'], className: 'sd-quickbar__btn' +
|
122
|
+
(index === _this.state.index ? ' sd-quickbar__btn--active' : ''), onClick: function () { return _this.handleClick(item, index, event); } },
|
123
|
+
React.createElement(Icon_1.Icon, { size: 'small', name: item['icon'] }))));
|
124
|
+
}
|
125
|
+
})))));
|
129
126
|
};
|
130
127
|
return QuickNavBar;
|
131
128
|
}(React.PureComponent));
|
@@ -81,18 +81,20 @@ var SideBarMenu = /** @class */ (function (_super) {
|
|
81
81
|
};
|
82
82
|
SideBarMenu.prototype.render = function () {
|
83
83
|
var _this = this;
|
84
|
-
return (React.createElement("div", { className:
|
84
|
+
return (React.createElement("div", { className: "sd-sidebar-menu sd-content-wrapper__left-tabs" },
|
85
85
|
React.createElement("ul", { className: 'authoring-active' }, this.props.items.map(function (item, index) {
|
86
86
|
if (item === 'divider') {
|
87
|
-
return
|
87
|
+
return React.createElement("li", { key: index, className: "sd-sidebar-menu__spacer" });
|
88
88
|
}
|
89
89
|
else {
|
90
|
-
return (React.createElement("li", { key: index, "data-sd-tooltip": item['tooltip'], "data-flow":
|
91
|
-
React.createElement("a", { className: 'sd-sidebar-menu__btn'
|
92
|
-
|
93
|
-
|
90
|
+
return (React.createElement("li", { key: index, "data-sd-tooltip": item['tooltip'], "data-flow": "right", className: item.hover ? 'authoring-active__item' : '' },
|
91
|
+
React.createElement("a", { className: 'sd-sidebar-menu__btn' +
|
92
|
+
(_this.state.hover ? ' sd-sidebar-menu__btn--closed ' : '') +
|
93
|
+
(item['active']
|
94
94
|
? ' sd-sidebar-menu__btn--active'
|
95
|
-
:
|
95
|
+
: index === _this.state.index
|
96
|
+
? ' sd-sidebar-menu__btn--active'
|
97
|
+
: ''), onClick: function () {
|
96
98
|
_this.handleClick(index);
|
97
99
|
if (item.hover) {
|
98
100
|
_this.handleArrows();
|
@@ -101,9 +103,9 @@ var SideBarMenu = /** @class */ (function (_super) {
|
|
101
103
|
}
|
102
104
|
}
|
103
105
|
} },
|
104
|
-
React.createElement("span", { className:
|
106
|
+
React.createElement("span", { className: "sd-sidebar-menu__main-icon " },
|
105
107
|
React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),
|
106
|
-
React.createElement("i", { className:
|
108
|
+
React.createElement("i", { className: "sd-sidebar-menu__helper-icon big-icon--chevron-left" }))));
|
107
109
|
}
|
108
110
|
}))));
|
109
111
|
};
|
@@ -80,19 +80,20 @@ var SideBarTabs = /** @class */ (function (_super) {
|
|
80
80
|
};
|
81
81
|
SideBarTabs.prototype.render = function () {
|
82
82
|
var _this = this;
|
83
|
-
return (React.createElement("div", { className:
|
83
|
+
return (React.createElement("div", { className: "sd-sidetab-menu sd-sidetab-menu--static", "data-test-id": this.props['data-test-id'] },
|
84
84
|
React.createElement("ul", null, this.props.items.map(function (item, index) {
|
85
85
|
if (item === 'divider') {
|
86
|
-
return
|
86
|
+
return React.createElement("li", { key: index, className: "sd-sidetab-menu__spacer" });
|
87
87
|
}
|
88
88
|
else {
|
89
|
-
return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow":
|
90
|
-
React.createElement("button", { disabled: _this.props.disabled, role:
|
91
|
-
|
92
|
-
|
93
|
-
React.createElement(
|
89
|
+
return (React.createElement("li", { key: index, "data-sd-tooltip": item.tooltip, "data-flow": "left" },
|
90
|
+
React.createElement("button", { disabled: _this.props.disabled, role: "button", "aria-label": item.tooltip, className: (0, classnames_1.default)('sd-sidetab-menu__btn', {
|
91
|
+
'sd-sidetab-menu__btn--active': item.id === _this.props.activeTab && _this.props.disabled !== true,
|
92
|
+
}), onClick: function () { return _this.handleClick(item); }, "data-test-id": "widget-icon", "data-test-value": item.id },
|
93
|
+
item.badgeValue != null && React.createElement(Badge_1.Badge, { text: item['badgeValue'], type: "primary" }),
|
94
|
+
React.createElement("span", { className: "sd-sidetab-menu__main-icon " },
|
94
95
|
React.createElement(Icon_1.Icon, { size: item['size'], name: item['icon'] })),
|
95
|
-
React.createElement("i", { className:
|
96
|
+
React.createElement("i", { className: "sd-sidetab-menu__helper-icon icon-close-small" }))));
|
96
97
|
}
|
97
98
|
}))));
|
98
99
|
};
|
@@ -61,7 +61,7 @@ var Popover = /** @class */ (function (_super) {
|
|
61
61
|
var _a, _b;
|
62
62
|
return (React.createElement(_Positioner_1.Positioner, { triggerSelector: this.props.triggerSelector, placement: (_a = this.props.placement) !== null && _a !== void 0 ? _a : 'auto', className: "sd-popover" },
|
63
63
|
React.createElement("div", { className: "sd-popover__header" },
|
64
|
-
React.createElement("h4", { className: "sd-popover__title", tabIndex: 0, id:
|
64
|
+
React.createElement("h4", { className: "sd-popover__title", tabIndex: 0, id: "popoverTitle" }, this.props.title),
|
65
65
|
((_b = this.props.displayCloseButton) !== null && _b !== void 0 ? _b : true) && (React.createElement("button", { className: "icn-btn icn-btn--small sd-popover__close", tabIndex: 0, "aria-label": 'Close dialog', onClick: function () {
|
66
66
|
var el = document.querySelector(_this.props.triggerSelector);
|
67
67
|
if (el instanceof HTMLElement) {
|
@@ -80,31 +80,23 @@ var RadioButtonGroup = /** @class */ (function (_super) {
|
|
80
80
|
_a["sd-check-button__group--grid"] = (_g = this.props.group) === null || _g === void 0 ? void 0 : _g.grid,
|
81
81
|
_a["sd-check-button__group--padded"] = ((_h = this.props.group) === null || _h === void 0 ? void 0 : _h.padded) === true,
|
82
82
|
_a));
|
83
|
-
var selectedOption = this.props.value == null
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
return value === _this.props.value;
|
88
|
-
});
|
83
|
+
var selectedOption = this.props.value == null ? undefined : this.props.options.find(function (_a) {
|
84
|
+
var value = _a.value;
|
85
|
+
return value === _this.props.value;
|
86
|
+
});
|
89
87
|
return (React.createElement(React.Fragment, null,
|
90
|
-
!((_j = this.props.group) === null || _j === void 0 ? void 0 : _j.groupLabel) ?
|
91
|
-
React.createElement("
|
92
|
-
|
93
|
-
React.createElement("
|
88
|
+
!((_j = this.props.group) === null || _j === void 0 ? void 0 : _j.groupLabel) ? (React.createElement("div", { role: "radiogroup", className: classes, "aria-labelledby": (_k = this.props.group) === null || _k === void 0 ? void 0 : _k.groupLabelledBy, "data-test-id": this.props['data-test-id'], "data-test-value": selectedOption == null ? undefined : selectedOption.label }, this.props.options.map(function (item, index) { return (React.createElement("span", { className: "sd-check-button sd-check-button--native", key: index, tabIndex: _this.props.tabindex === undefined ? undefined : -1 },
|
89
|
+
React.createElement("input", { type: "radio", className: "sd-check-button__input", id: _this.htmlId + index, tabIndex: _this.props.tabindex, name: _this.htmlId, onChange: function () { return _this.handleChange(item); }, disabled: _this.props.disabled || item.disabled, required: _this.props.required, checked: item.value === _this.props.value }),
|
90
|
+
React.createElement("label", { className: "sd-check-button__text-label", htmlFor: _this.htmlId + index, "aria-label": item.labelHidden ? item.label : undefined, "data-test-id": "item", "data-test-value": item.label },
|
91
|
+
item.icon ? React.createElement("i", { className: "icon-".concat(item.icon), "aria-hidden": "true" }) : null,
|
92
|
+
!item.labelHidden || !item.icon ? (React.createElement("span", { className: "sd-check-button__text-label-inner" }, item.label)) : null))); }))) : null,
|
93
|
+
((_l = this.props.group) === null || _l === void 0 ? void 0 : _l.groupLabel) ? (React.createElement("div", { className: "sd-check-button__group-wrapper", "data-test-id": this.props['data-test-id'], "data-test-value": selectedOption == null ? undefined : selectedOption.label },
|
94
|
+
React.createElement(FormLabel_1.FormLabel, { forId: this.htmlId + 'group', text: this.props.group.groupLabel }),
|
95
|
+
React.createElement("div", { role: "radiogroup", id: this.htmlId + 'group', className: classes }, this.props.options.map(function (item, index) { return (React.createElement("span", { className: "sd-check-button sd-check-button--native", key: index, tabIndex: -1 },
|
96
|
+
React.createElement("input", { type: "radio", className: "sd-check-button__input", id: _this.htmlId + index, tabIndex: 0, name: _this.htmlId, onChange: function () { return _this.handleChange(item); }, disabled: _this.props.disabled || item.disabled, required: _this.props.required, checked: item.value === _this.props.value }),
|
97
|
+
React.createElement("label", { className: "sd-check-button__text-label", htmlFor: _this.htmlId + index, "aria-label": item.labelHidden ? item.label : undefined },
|
94
98
|
item.icon ? React.createElement("i", { className: "icon-".concat(item.icon), "aria-hidden": "true" }) : null,
|
95
|
-
!item.labelHidden || !item.icon ?
|
96
|
-
React.createElement("span", { className: "sd-check-button__text-label-inner" }, item.label) : null))); }))
|
97
|
-
: null,
|
98
|
-
((_l = this.props.group) === null || _l === void 0 ? void 0 : _l.groupLabel) ?
|
99
|
-
React.createElement("div", { className: 'sd-check-button__group-wrapper', "data-test-id": this.props['data-test-id'], "data-test-value": selectedOption == null ? undefined : selectedOption.label },
|
100
|
-
React.createElement(FormLabel_1.FormLabel, { forId: this.htmlId + 'group', text: this.props.group.groupLabel }),
|
101
|
-
React.createElement("div", { role: "radiogroup", id: this.htmlId + 'group', className: classes }, this.props.options.map(function (item, index) { return (React.createElement("span", { className: "sd-check-button sd-check-button--native", key: index, tabIndex: -1 },
|
102
|
-
React.createElement("input", { type: "radio", className: "sd-check-button__input", id: _this.htmlId + index, tabIndex: 0, name: _this.htmlId, onChange: function () { return _this.handleChange(item); }, disabled: _this.props.disabled || item.disabled, required: _this.props.required, checked: item.value === _this.props.value }),
|
103
|
-
React.createElement("label", { className: "sd-check-button__text-label", htmlFor: _this.htmlId + index, "aria-label": item.labelHidden ? item.label : undefined },
|
104
|
-
item.icon ? React.createElement("i", { className: "icon-".concat(item.icon), "aria-hidden": "true" }) : null,
|
105
|
-
!item.labelHidden || !item.icon ?
|
106
|
-
React.createElement("span", { className: "sd-check-button__text-label-inner" }, item.label) : null))); })))
|
107
|
-
: null));
|
99
|
+
!item.labelHidden || !item.icon ? (React.createElement("span", { className: "sd-check-button__text-label-inner" }, item.label)) : null))); })))) : null));
|
108
100
|
};
|
109
101
|
return RadioButtonGroup;
|
110
102
|
}(React.Component));
|
@@ -81,9 +81,7 @@ var ResizablePanels = /** @class */ (function (_super) {
|
|
81
81
|
ResizablePanels.prototype.render = function () {
|
82
82
|
var _this = this;
|
83
83
|
var _a = this.props, direction = _a.direction, primarySize = _a.primarySize, secondarySize = _a.secondarySize, children = _a.children;
|
84
|
-
var separatorDimensions = direction === 'horizontal'
|
85
|
-
? { width: 3, height: '100%' }
|
86
|
-
: { height: 3, width: '100%' };
|
84
|
+
var separatorDimensions = direction === 'horizontal' ? { width: 3, height: '100%' } : { height: 3, width: '100%' };
|
87
85
|
// Sometimes second panel is conditional. Checking here is more convenient.
|
88
86
|
if (children.some(function (child) { return child === false || child == null; })) {
|
89
87
|
return children;
|
@@ -48,9 +48,7 @@ var ResizeObserverComponent = /** @class */ (function (_super) {
|
|
48
48
|
var dimensions = this.state.dimensions;
|
49
49
|
return (react_1.default.createElement("div", { ref: function (el) {
|
50
50
|
_this.el = el;
|
51
|
-
} }, dimensions === 'not-initialized'
|
52
|
-
? null
|
53
|
-
: this.props.children(dimensions)));
|
51
|
+
} }, dimensions === 'not-initialized' ? null : this.props.children(dimensions)));
|
54
52
|
};
|
55
53
|
return ResizeObserverComponent;
|
56
54
|
}(react_1.default.PureComponent));
|
@@ -60,7 +60,7 @@ var SearchBar = /** @class */ (function (_super) {
|
|
60
60
|
function SearchBar(props) {
|
61
61
|
var _this = _super.call(this, props) || this;
|
62
62
|
_this.componentDidMount = function () {
|
63
|
-
document.addEventListener(
|
63
|
+
document.addEventListener('mousedown', function (event) {
|
64
64
|
if (_this.inputRef.current && !_this.inputRef.current.contains(event.target)) {
|
65
65
|
_this.setState({ focused: false });
|
66
66
|
}
|
@@ -93,7 +93,7 @@ var SearchBar = /** @class */ (function (_super) {
|
|
93
93
|
return (React.createElement("div", { className: classes, ref: this.inputRef },
|
94
94
|
this.props.children,
|
95
95
|
React.createElement("label", { className: "sd-searchbar__icon" }),
|
96
|
-
React.createElement("input", { id: "search-input", ref: function (input) { return
|
96
|
+
React.createElement("input", { id: "search-input", ref: function (input) { return input && _this.props.focused && input.focus(); }, className: "sd-searchbar__input", type: "text", placeholder: this.props.placeholder, value: this.state.inputValue, onKeyPress: function (event) {
|
97
97
|
if (event.key === 'Enter') {
|
98
98
|
if (_this.props.onSubmit) {
|
99
99
|
_this.props.onSubmit(_this.state.inputValue);
|
@@ -105,23 +105,21 @@ var SearchBar = /** @class */ (function (_super) {
|
|
105
105
|
_this.setState({ keyDown: false });
|
106
106
|
}
|
107
107
|
}, onChange: function (event) { return _this.setState({ inputValue: event.target.value }); }, onFocus: function () { return _this.setState({ focused: true }); } }),
|
108
|
-
this.state.inputValue &&
|
109
|
-
|
110
|
-
|
111
|
-
setTimeout(function () {
|
112
|
-
if (_this.props.onSubmit) {
|
113
|
-
_this.props.onSubmit(_this.state.inputValue);
|
114
|
-
}
|
115
|
-
});
|
116
|
-
} },
|
117
|
-
React.createElement(Icon_1.Icon, { name: 'remove-sign' })),
|
118
|
-
this.state.inputValue &&
|
119
|
-
React.createElement("button", { id: "sd-searchbar__search-btn", className: "sd-searchbar__search-btn ".concat(this.state.keyDown ? 'sd-searchbar__search-btn--active' : ''), onClick: function () {
|
108
|
+
this.state.inputValue && (React.createElement("button", { className: "sd-searchbar__cancel", onClick: function () {
|
109
|
+
_this.setState({ inputValue: '' });
|
110
|
+
setTimeout(function () {
|
120
111
|
if (_this.props.onSubmit) {
|
121
112
|
_this.props.onSubmit(_this.state.inputValue);
|
122
113
|
}
|
123
|
-
}
|
124
|
-
|
114
|
+
});
|
115
|
+
} },
|
116
|
+
React.createElement(Icon_1.Icon, { name: "remove-sign" }))),
|
117
|
+
this.state.inputValue && (React.createElement("button", { id: "sd-searchbar__search-btn", className: "sd-searchbar__search-btn ".concat(this.state.keyDown ? 'sd-searchbar__search-btn--active' : ''), onClick: function () {
|
118
|
+
if (_this.props.onSubmit) {
|
119
|
+
_this.props.onSubmit(_this.state.inputValue);
|
120
|
+
}
|
121
|
+
} },
|
122
|
+
React.createElement(Icon_1.Icon, { name: "chevron-right-thin" })))));
|
125
123
|
};
|
126
124
|
return SearchBar;
|
127
125
|
}(React.PureComponent));
|
@@ -72,8 +72,8 @@ var Select = /** @class */ (function (_super) {
|
|
72
72
|
React.createElement("span", null, this.props.value)));
|
73
73
|
}
|
74
74
|
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, invalid: this.props.error != null, required: this.props.required, disabled: this.props.disabled, readonly: this.props.readonly, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex, inputWrapper: this.props.inputWrapper },
|
75
|
-
React.createElement("span", { className:
|
76
|
-
React.createElement("select", { className:
|
75
|
+
React.createElement("span", { className: "sd-input__select-caret-wrapper" },
|
76
|
+
React.createElement("select", { className: "sd-input__select", id: this.htmlId, value: this.props.value, "aria-describedby": this.htmlId + 'label', tabIndex: this.props.tabindex, onChange: this.handleChange, disabled: this.props.disabled || this.props.readonly, "data-test-id": this.props['data-test-id'] }, this.props.children))));
|
77
77
|
};
|
78
78
|
return Select;
|
79
79
|
}(React.Component));
|
@@ -84,7 +84,7 @@ var Option = /** @class */ (function (_super) {
|
|
84
84
|
return _super !== null && _super.apply(this, arguments) || this;
|
85
85
|
}
|
86
86
|
Option.prototype.render = function () {
|
87
|
-
return
|
87
|
+
return React.createElement("option", { value: this.props.value }, this.props.children);
|
88
88
|
};
|
89
89
|
return Option;
|
90
90
|
}(React.PureComponent));
|