@nulogy/components 15.2.1 → 15.2.3
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/README.md +3 -3
- package/dist/main.js +53108 -54055
- package/dist/main.module.js +8809 -9756
- package/dist/src/Alert/Alert.js +2 -14
- package/dist/src/Alert/Alert.story.d.ts +15 -19
- package/dist/src/Alert/Alert.story.js +25 -14
- package/dist/src/AppTag/components/LogoWrapper.d.ts +0 -1
- package/dist/src/AppTag/components/NulogyLogo.js +2 -14
- package/dist/src/AsyncSelect/AsyncSelect.graphql.story.js +4 -13
- package/dist/src/AsyncSelect/AsyncSelect.js +14 -16
- package/dist/src/AsyncSelect/AsyncSelectComponents.js +9 -21
- package/dist/src/AsyncSelect/fixtures.js +4 -13
- package/dist/src/Banner/Banner.js +1 -15
- package/dist/src/BottomSheet/BottomSheet.js +2 -15
- package/dist/src/BottomSheet/BottomSheet.parts.d.ts +2 -2
- package/dist/src/BottomSheet/BottomSheet.parts.js +8 -22
- package/dist/src/BottomSheet/BottomSheet.styled.d.ts +4 -5
- package/dist/src/Box/Box.d.ts +12 -4
- package/dist/src/BrandedNavBar/DesktopMenu.js +22 -36
- package/dist/src/BrandedNavBar/MenuTrigger.js +4 -16
- package/dist/src/BrandedNavBar/MenuTriggerButton.js +8 -22
- package/dist/src/BrandedNavBar/MobileMenu.js +28 -35
- package/dist/src/BrandedNavBar/NavBar.js +7 -21
- package/dist/src/BrandedNavBar/NavBar.story.d.ts +4 -6
- package/dist/src/BrandedNavBar/NavBar.story.js +12 -4
- package/dist/src/BrandedNavBar/NavBarBackground.d.ts +0 -1
- package/dist/src/BrandedNavBar/NavBarDropdownMenu.js +14 -8
- package/dist/src/BrandedNavBar/SmallNavBar.js +4 -16
- package/dist/src/BrandedNavBar/SmallNavBar.story.d.ts +5 -2
- package/dist/src/BrandedNavBar/SmallNavBar.story.js +27 -6
- package/dist/src/BrandedNavBar/SubMenuTrigger.js +4 -16
- package/dist/src/BrandedNavBar/SubMenuTriggerButton.js +2 -14
- package/dist/src/BrandedNavBar/renderSubMenuItems.js +7 -17
- package/dist/src/Branding/Branding.js +2 -14
- package/dist/src/Branding/BrandingText.d.ts +0 -1
- package/dist/src/Branding/LettermarkLogo.js +2 -14
- package/dist/src/Branding/WordmarkLogo.js +2 -14
- package/dist/src/Breadcrumbs/Breadcrumbs.js +2 -14
- package/dist/src/Breadcrumbs/BreadcrumbsList.d.ts +0 -1
- package/dist/src/Breadcrumbs/BreadcrumbsListItem.d.ts +0 -1
- package/dist/src/Button/Button.js +2 -14
- package/dist/src/Button/CloseButton.js +1 -1
- package/dist/src/Button/ControlIcon.js +2 -16
- package/dist/src/Button/DangerButton.d.ts +0 -1
- package/dist/src/Button/IconicButton.js +55 -73
- package/dist/src/Button/PrimaryButton.d.ts +0 -1
- package/dist/src/Button/QuietButton.d.ts +0 -1
- package/dist/src/ButtonGroup/ButtonGroup.d.ts +0 -1
- package/dist/src/ButtonGroup/ButtonGroup.js +8 -2
- package/dist/src/Card/Card.js +2 -14
- package/dist/src/Card/Card.story.js +1 -1
- package/dist/src/Card/CardSet.d.ts +0 -1
- package/dist/src/Checkbox/Checkbox.js +20 -6
- package/dist/src/Checkbox/Checkbox.story.js +4 -1
- package/dist/src/Checkbox/CheckboxGroup.js +4 -16
- package/dist/src/DatePickers/DatePicker.js +2 -14
- package/dist/src/DatePickers/MonthPicker.js +2 -14
- package/dist/src/DatePickers/WeekPicker.js +10 -17
- package/dist/src/DatePickers/custom/weekPickerStyles.d.ts +0 -1
- package/dist/src/DatePickers/shared/components/BasePicker.js +9 -15
- package/dist/src/DatePickers/shared/components/DatePickerInput.js +2 -13
- package/dist/src/DatePickers/shared/styles.d.ts +0 -1
- package/dist/src/DatePickers/shared/types.d.ts +0 -1
- package/dist/src/DatePickers/stories/DatePicker.story.d.ts +7 -3
- package/dist/src/DatePickers/stories/DatePicker.story.js +54 -22
- package/dist/src/DatePickers/stories/WeekPicker.story.js +1 -1
- package/dist/src/DateRange/DateRange.js +36 -22
- package/dist/src/DateRange/DateRangeStyles.d.ts +0 -1
- package/dist/src/DateRange/EndTime.d.ts +3 -4
- package/dist/src/DateRange/StartTime.d.ts +3 -4
- package/dist/src/Decorations/index.js +1 -1
- package/dist/src/DescriptionList/DescriptionList.js +1 -13
- package/dist/src/DescriptionList/DescriptionList.parts.d.ts +0 -1
- package/dist/src/DescriptionList/DescriptionList.parts.js +156 -77
- package/dist/src/DescriptionList/DescriptionListContext.js +1 -15
- package/dist/src/DescriptionList/lib/utils.js +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.column.story.js +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.d.ts +7 -8
- package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.js +15 -12
- package/dist/src/DescriptionList/stories/DescriptionList.layout.story.js +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.playground.story.d.ts +7 -8
- package/dist/src/DescriptionList/stories/DescriptionList.playground.story.js +203 -195
- package/dist/src/DescriptionList/stories/fixtures.d.ts +2 -2
- package/dist/src/Divider/Divider.d.ts +0 -1
- package/dist/src/DropdownMenu/DropdownItem.d.ts +0 -1
- package/dist/src/DropdownMenu/DropdownMenu.js +13 -17
- package/dist/src/DropdownMenu/DropdownMenu.story.js +2 -2
- package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +0 -1
- package/dist/src/DropdownMenu/DropdownMenuContainer.js +10 -1
- package/dist/src/DropdownMenu/DropdownText.d.ts +1 -2
- package/dist/src/FieldLabel/FieldLabel.js +2 -14
- package/dist/src/FieldLabel/HelpText.d.ts +1 -2
- package/dist/src/FieldLabel/LabelText.d.ts +0 -1
- package/dist/src/FieldLabel/MaybeFieldLabel.js +1 -15
- package/dist/src/FieldLabel/RequirementText.js +1 -1
- package/dist/src/Flex/Flex.d.ts +0 -1
- package/dist/src/Flex/Flex.story.js +3 -17
- package/dist/src/Form/Field.d.ts +0 -1
- package/dist/src/Form/Fieldset.d.ts +0 -1
- package/dist/src/Form/Form.js +3 -17
- package/dist/src/Form/FormSection.js +3 -17
- package/dist/src/Icon/Icon.js +9 -24
- package/dist/src/Icon/LoadingIcon.js +2 -14
- package/dist/src/Input/Input.js +3 -15
- package/dist/src/Input/InputField.js +4 -16
- package/dist/src/Input/Prefix.js +2 -16
- package/dist/src/Input/Suffix.js +2 -14
- package/dist/src/Layout/ApplicationFrame.js +2 -14
- package/dist/src/Layout/Header.d.ts +1 -1
- package/dist/src/Layout/Header.js +4 -17
- package/dist/src/Layout/Header.story.d.ts +10 -9
- package/dist/src/Layout/Header.story.js +9 -8
- package/dist/src/Layout/Page.js +5 -19
- package/dist/src/Layout/Sidebar.js +4 -18
- package/dist/src/Layout/Sidebar.story.d.ts +4 -1
- package/dist/src/Layout/Sidebar.story.js +24 -31
- package/dist/src/Link/Link.js +13 -21
- package/dist/src/List/List.d.ts +0 -1
- package/dist/src/Modal/Modal.story.d.ts +39 -61
- package/dist/src/Modal/Modal.story.js +110 -85
- package/dist/src/Modal/ModalCloseButton.d.ts +0 -1
- package/dist/src/Modal/ModalFooter.d.ts +0 -1
- package/dist/src/Modal/ModalHeader.d.ts +0 -1
- package/dist/src/NDSProvider/ComponentVariantContext.js +1 -1
- package/dist/src/NDSProvider/GlobalStyles.d.ts +0 -1
- package/dist/src/NDSProvider/ModalStyleOverride.d.ts +0 -1
- package/dist/src/NDSProvider/Reset.d.ts +0 -1
- package/dist/src/NDSProvider/renderWithNDSProvider.spec-utils.d.ts +3 -1
- package/dist/src/NDSProvider/renderWithNDSProvider.spec-utils.js +3 -1
- package/dist/src/NavBarSearch/NavBarSearch.js +2 -14
- package/dist/src/Navigation/Navigation.js +3 -16
- package/dist/src/Navigation/components/AppSwitcher/NulogyAppSwitcher.js +6 -3
- package/dist/src/Navigation/components/AppSwitcher/parts/Item.js +1 -15
- package/dist/src/Navigation/components/AppSwitcher/parts/Link.js +2 -16
- package/dist/src/Navigation/components/AppSwitcher/parts/index.d.ts +4 -5
- package/dist/src/Navigation/components/DesktopNav/DesktopNav.js +2 -2
- package/dist/src/Navigation/components/MenuSubItem/MenuSubItem.js +4 -5
- package/dist/src/Navigation/components/MenuSubItem/parts/styled.d.ts +0 -1
- package/dist/src/Navigation/components/MenuSubItem/parts/styled.js +49 -7
- package/dist/src/Navigation/components/MobileNav/MobileNav.js +2 -2
- package/dist/src/Navigation/components/MobileNav/parts/MobileMenuItem.js +12 -21
- package/dist/src/Navigation/components/MobileNav/parts/styled.d.ts +1 -2
- package/dist/src/Navigation/components/MobileNav/parts/styled.js +35 -4
- package/dist/src/Navigation/components/NulogyLogo/SvgNulogyLogo.js +1 -1
- package/dist/src/Navigation/components/UserMenu/UserMenu.d.ts +0 -1
- package/dist/src/Navigation/components/UserMenu/parts/Header.js +1 -1
- package/dist/src/Navigation/components/UserMenu/parts/Item.js +7 -16
- package/dist/src/Navigation/components/UserMenu/parts/MobileItem.js +7 -16
- package/dist/src/Navigation/components/UserMenu/parts/styled.d.ts +0 -1
- package/dist/src/Navigation/components/UserMenu/parts/styled.js +43 -18
- package/dist/src/Navigation/components/shared/NavigationLogo.js +4 -16
- package/dist/src/Navigation/components/shared/NavigationLogoLink.js +2 -14
- package/dist/src/Navigation/components/shared/NavigationMenuContent.d.ts +0 -1
- package/dist/src/Navigation/components/shared/NavigationMenuItem.js +10 -24
- package/dist/src/Navigation/components/shared/components.d.ts +0 -1
- package/dist/src/Navigation/components/shared/components.js +29 -5
- package/dist/src/Navigation/hooks/useResponsiveMenu.d.ts +0 -1
- package/dist/src/Navigation/stories/Navigation.mobileVisibility.story.js +21 -9
- package/dist/src/Navigation/stories/fixtures/logos/CustomLogo2.js +1 -1
- package/dist/src/Navigation/stories/fixtures/logos/CustomLogo3.js +1 -1
- package/dist/src/Navigation/stories/fixtures/logos/Customlogo1.js +1 -1
- package/dist/src/Overlay/Overlay.d.ts +0 -1
- package/dist/src/Pagination/PageNumber.d.ts +0 -1
- package/dist/src/Pagination/Pagination.js +3 -16
- package/dist/src/Pagination/PaginationButton.d.ts +0 -1
- package/dist/src/Popper/Popper.js +29 -6
- package/dist/src/Primitives/index.d.ts +0 -1
- package/dist/src/Radio/Radio.js +11 -18
- package/dist/src/Radio/Radio.story.d.ts +322 -32
- package/dist/src/Radio/Radio.story.js +36 -22
- package/dist/src/Radio/RadioGroup.js +4 -16
- package/dist/src/RangeContainer/RangeContainer.js +6 -15
- package/dist/src/Select/MenuList.js +14 -19
- package/dist/src/Select/Select.d.ts +2 -2
- package/dist/src/Select/Select.js +16 -17
- package/dist/src/Select/Select.spec-utils.js +1 -0
- package/dist/src/Select/Select.story.d.ts +5 -1
- package/dist/src/Select/Select.story.fixture.js +8 -30
- package/dist/src/Select/Select.story.js +107 -31
- package/dist/src/Select/SelectComponents.js +7 -7
- package/dist/src/Select/SelectOption.js +1 -1
- package/dist/src/Select/customReactSelectStyles.js +152 -44
- package/dist/src/Select/lib.js +1 -2
- package/dist/src/SortingTable/SortingTable.js +6 -15
- package/dist/src/StatusIndicator/StatusIndicator.d.ts +0 -1
- package/dist/src/StatusIndicator/StatusIndicator.js +16 -1
- package/dist/src/Summary/Summary.js +2 -14
- package/dist/src/Summary/SummaryDivider.js +1 -1
- package/dist/src/Summary/SummaryItem.js +2 -14
- package/dist/src/Switcher/Switch.js +23 -19
- package/dist/src/Switcher/Switcher.js +4 -16
- package/dist/src/Table/BaseTable.js +2 -14
- package/dist/src/Table/StatefulTable.d.ts +1 -1
- package/dist/src/Table/StatefulTable.js +17 -9
- package/dist/src/Table/StyledTh.d.ts +0 -1
- package/dist/src/Table/StyledTh.js +11 -2
- package/dist/src/Table/Table.js +2 -14
- package/dist/src/Table/Table.types.d.ts +0 -1
- package/dist/src/Table/TableBody.js +11 -11
- package/dist/src/Table/TableFoot.js +5 -8
- package/dist/src/Table/TableHead.js +1 -4
- package/dist/src/Table/addExpandableControl.js +5 -2
- package/dist/src/Table/addSelectableControl.js +5 -2
- package/dist/src/Table/stories/BaseTable.story.d.ts +11 -7
- package/dist/src/Table/stories/BaseTable.story.js +156 -34
- package/dist/src/Table/stories/SortingColumnHeader.story.d.ts +5 -2
- package/dist/src/Table/stories/SortingColumnHeader.story.js +20 -3
- package/dist/src/Table/stories/Table.story.d.ts +7 -14
- package/dist/src/Table/stories/Table.story.js +172 -127
- package/dist/src/Table/stories/TableWithCustomSorting.story.js +4 -1
- package/dist/src/Table/stories/TableWithFiltering.story.js +8 -2
- package/dist/src/Table/stories/TableWithServerSidePagination.story.js +4 -15
- package/dist/src/Tabs/Tab.js +11 -18
- package/dist/src/Tabs/TabContainer.d.ts +0 -1
- package/dist/src/Tabs/TabScrollIndicator.js +2 -14
- package/dist/src/Tabs/Tabs.js +5 -7
- package/dist/src/Textarea/Textarea.js +3 -15
- package/dist/src/TimePicker/TimePicker.js +2 -14
- package/dist/src/TimePicker/TimePickerDropdown.d.ts +0 -1
- package/dist/src/TimePicker/TimePickerInput.d.ts +0 -1
- package/dist/src/TimePicker/TimePickerInput.js +6 -4
- package/dist/src/TimeRange/TimeRange.js +20 -20
- package/dist/src/Toast/Toast.js +4 -16
- package/dist/src/ToastContainer/ToastContainer.js +4 -16
- package/dist/src/ToastContainer/ToastContainer.story.js +1 -1
- package/dist/src/ToastContainer/ToastFunction.js +7 -19
- package/dist/src/Toggle/Toggle.js +4 -17
- package/dist/src/Toggle/ToggleButton.js +2 -14
- package/dist/src/Tooltip/Tooltip.story.d.ts +15 -52
- package/dist/src/Tooltip/Tooltip.story.js +80 -72
- package/dist/src/Tooltip/TooltipContainer.d.ts +0 -1
- package/dist/src/Tooltip/TooltipContainer.js +16 -1
- package/dist/src/Tooltip/components/TooltipComponents.js +9 -24
- package/dist/src/TopBar/TopBar.styled.d.ts +14 -7
- package/dist/src/TopBar/components/BackLink.js +2 -14
- package/dist/src/TopBar/components/Menu.js +2 -15
- package/dist/src/TopBar/components/MenuItemLink.js +2 -14
- package/dist/src/TopBar/components/PageTitle.js +2 -14
- package/dist/src/TopBar/stories/TopBar.backButton.story.js +3 -3
- package/dist/src/TopBar/stories/TopBar.menu.story.js +9 -20
- package/dist/src/TopBar/stories/TopBar.story.js +3 -3
- package/dist/src/TruncatedText/TruncatedText.js +8 -16
- package/dist/src/TruncatedText/components/MaybeTooltip.d.ts +1 -1
- package/dist/src/TruncatedText/components/TruncatedTextFillWidth.js +3 -15
- package/dist/src/TruncatedText/components/TruncatedTextMaxCharacters.js +4 -16
- package/dist/src/Type/Headings.d.ts +4 -5
- package/dist/src/Type/Text.d.ts +0 -1
- package/dist/src/Validation/InlineValidation.js +2 -14
- package/dist/src/VerticalDivider/VerticalDivider.d.ts +0 -1
- package/dist/src/VisualTests/WithSpace.story.js +18 -18
- package/dist/src/hooks/useMediaQuery/useMediaQuery.js +1 -2
- package/dist/src/i18n.js +1 -1
- package/dist/src/locale.story.js +1 -1
- package/dist/src/testing/matchers/toHaveStyle.d.ts +15 -0
- package/dist/src/testing/matchers/toHaveStyle.js +50 -0
- package/dist/src/testing/matchers/toMatchDate.d.ts +1 -0
- package/dist/src/testing/matchers/toMatchDate.js +1 -1
- package/dist/src/theme/mergeThemes.util.js +7 -1
- package/dist/src/theme/useNDSTheme.js +9 -3
- package/dist/src/utils/ClickInputLabel.d.ts +0 -1
- package/dist/src/utils/DetectOutsideClick.d.ts +3 -0
- package/dist/src/utils/DetectOutsideClick.js +3 -0
- package/dist/src/utils/PopperArrow.js +5 -1
- package/dist/src/utils/ScrollIndicators.js +1 -1
- package/dist/src/utils/generateId.d.ts +5 -0
- package/dist/src/utils/generateId.js +5 -0
- package/dist/src/utils/index.d.ts +0 -1
- package/dist/src/utils/index.js +0 -1
- package/dist/src/utils/numberFromDimension/numberFromDimension.spec.js +1 -0
- package/dist/src/utils/story/code.d.ts +0 -1
- package/dist/src/utils/story/dashed.d.ts +2 -2
- package/dist/src/utils/story/placeholder.js +1 -1
- package/dist/src/utils/story/resizable.d.ts +2 -2
- package/dist/src/utils/story/resizable.js +1 -1
- package/dist/src/utils/story/simulatedAPIRequests.js +8 -19
- package/dist/src/utils/subPx.js +1 -1
- package/dist/src/utils/testing/useConditionalAutoClick.js +3 -3
- package/dist/src/utils/testing/useUrlProps.js +1 -1
- package/dist/src/utils/ts/FocusManager.js +1 -1
- package/dist/src/utils/useWindowDimension.story.d.ts +1 -1
- package/dist/src/utils/withMenuState.js +1 -1
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.js +11 -0
- package/package.json +45 -85
- package/dist/src/NDSProvider/mountWithNDSProvider.spec-utils.d.ts +0 -1
- package/dist/src/NDSProvider/mountWithNDSProvider.spec-utils.js +0 -4
- package/dist/src/utils/withWindowDimensions.d.ts +0 -3
- package/dist/src/utils/withWindowDimensions.js +0 -28
|
@@ -31,20 +31,20 @@ export default function useConditionalAutoClick({ selector, condition = {}, dela
|
|
|
31
31
|
console.log(`Clicking element matching selector: ${selector}`);
|
|
32
32
|
}
|
|
33
33
|
element.click();
|
|
34
|
-
onSuccess
|
|
34
|
+
onSuccess?.();
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
37
|
if (logging) {
|
|
38
38
|
console.warn(`Element with selector "${selector}" not found`);
|
|
39
39
|
}
|
|
40
|
-
onNotFound
|
|
40
|
+
onNotFound?.();
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
catch (error) {
|
|
44
44
|
if (logging) {
|
|
45
45
|
console.error(`Error clicking element with selector "${selector}":`, error);
|
|
46
46
|
}
|
|
47
|
-
onError
|
|
47
|
+
onError?.(error instanceof Error ? error : new Error(String(error)));
|
|
48
48
|
}
|
|
49
49
|
}, delay);
|
|
50
50
|
return () => clearTimeout(timeoutId);
|
|
@@ -12,7 +12,7 @@ export function useUrlProps(defaultProps) {
|
|
|
12
12
|
const encodedArgs = searchParams.get("args");
|
|
13
13
|
if (encodedArgs) {
|
|
14
14
|
const decodedProps = JSON.parse(decodeURIComponent(encodedArgs));
|
|
15
|
-
setProps((prev) => (
|
|
15
|
+
setProps((prev) => ({ ...prev, ...decodedProps }));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
catch (error) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
2
|
const FocusManager = ({ children, refs = undefined, defaultFocusedIndex, }) => {
|
|
3
|
-
const [focusedIndex, setFocusedIndex] = useState(defaultFocusedIndex
|
|
3
|
+
const [focusedIndex, setFocusedIndex] = useState(defaultFocusedIndex ?? 0);
|
|
4
4
|
const prevFocusedIndex = useRef(focusedIndex);
|
|
5
5
|
const focusPrevious = () => {
|
|
6
6
|
setFocusedIndex((prevFocusedIndex) => (prevFocusedIndex - 1 + refs.length) % refs.length);
|
|
@@ -71,6 +71,6 @@ class MenuState extends MenuStateInt {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
function withMenuState(MenuComponent) {
|
|
74
|
-
return (props) => (React.createElement(MenuState, { showDelay: props.showDelay, hideDelay: props.hideDelay, defaultOpen: props.defaultOpen }, (menuComponentProps) => React.createElement(MenuComponent,
|
|
74
|
+
return (props) => (React.createElement(MenuState, { showDelay: props.showDelay, hideDelay: props.hideDelay, defaultOpen: props.defaultOpen }, (menuComponentProps) => React.createElement(MenuComponent, { menuState: menuComponentProps, ...props })));
|
|
75
75
|
}
|
|
76
76
|
export default withMenuState;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { resolve } from "path";
|
|
2
|
+
import { defineConfig } from "vitest/config";
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
environment: "jsdom",
|
|
6
|
+
globals: false,
|
|
7
|
+
include: ["**/*.spec.tsx", "**/*.spec.ts"],
|
|
8
|
+
exclude: ["**/node_modules/**", "**/cypress/**", "**/dist/**"],
|
|
9
|
+
setupFiles: [resolve(__dirname, "spec/support/vitestAutoCleanup.ts")],
|
|
10
|
+
},
|
|
11
|
+
});
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulogy/components",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.3",
|
|
4
4
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"ci": "
|
|
11
|
-
"
|
|
12
|
-
"start
|
|
13
|
-
"start": "concurrently \"yarn build:watch\" \"yarn start:storybook\"",
|
|
10
|
+
"ci": "pnpm && pnpm build && pnpm test && pnpm run check",
|
|
11
|
+
"start-server": "pnpm build:storybook && pnpm http-server -p 9999 ./storybook-static",
|
|
12
|
+
"start": "concurrently \"pnpm build:watch\" \"pnpm start:storybook\"",
|
|
14
13
|
"start:cypress": "start-server-and-test start 9999 'cypress open'",
|
|
15
|
-
"start:storybook": "
|
|
14
|
+
"start:storybook": "storybook dev -p 9999",
|
|
16
15
|
"clean:storybook": "rm -rf node_modules/.cache/storybook && rm -rf ./storybook-static",
|
|
17
16
|
"build": "rollup -c",
|
|
18
17
|
"build:watch": "rollup -c --watch",
|
|
19
|
-
"build:storybook": "build
|
|
20
|
-
"warn:prepush": "echo \"Make sure you also run all the other CI steps before pushing by running '
|
|
21
|
-
"check": "
|
|
18
|
+
"build:storybook": "storybook build",
|
|
19
|
+
"warn:prepush": "echo \"Make sure you also run all the other CI steps before pushing by running 'pnpm ci'\"",
|
|
20
|
+
"check": "pnpm warn:prepush && pnpm check:types && pnpm check:lint && pnpm check:format",
|
|
22
21
|
"check:types": "tsc && cd cypress && tsc --noEmit",
|
|
23
22
|
"check:lint": "eslint --config ./.eslintrc .'*/**/*.{js,ts,tsx}'",
|
|
24
|
-
"check:format": "prettier -c
|
|
25
|
-
"fix": "
|
|
26
|
-
"fix:lint": "
|
|
23
|
+
"check:format": "prettier -c .",
|
|
24
|
+
"fix": "pnpm fix:lint && pnpm fix:format",
|
|
25
|
+
"fix:lint": "pnpm check:lint --fix",
|
|
27
26
|
"fix:format": "prettier -w .",
|
|
28
|
-
"test": "
|
|
29
|
-
"test:components": "
|
|
27
|
+
"test": "pnpm test:components && pnpm run test:cypress",
|
|
28
|
+
"test:components": "vitest run",
|
|
29
|
+
"test:components:watch": "vitest",
|
|
30
30
|
"test:cypress": "start-server-and-test start-server 9999 'cypress run'",
|
|
31
31
|
"test:visual": "npx chromatic --project-token $CHROMATIC_TOKEN --exit-zero-on-changes",
|
|
32
32
|
"prepare": "husky"
|
|
@@ -46,9 +46,6 @@
|
|
|
46
46
|
"components",
|
|
47
47
|
"component library"
|
|
48
48
|
],
|
|
49
|
-
"engines": {
|
|
50
|
-
"yarn": "^1.17.3"
|
|
51
|
-
},
|
|
52
49
|
"main": "dist/main.js",
|
|
53
50
|
"module": "dist/main.module.js",
|
|
54
51
|
"typings": "dist/src/index.d.ts",
|
|
@@ -64,13 +61,11 @@
|
|
|
64
61
|
},
|
|
65
62
|
"devDependencies": {
|
|
66
63
|
"@apollo/client": "^3.11.8",
|
|
67
|
-
"@babel/
|
|
68
|
-
"@babel/
|
|
69
|
-
"@babel/plugin-
|
|
70
|
-
"@babel/
|
|
71
|
-
"@babel/
|
|
72
|
-
"@babel/preset-env": "7.3.1",
|
|
73
|
-
"@babel/preset-typescript": "^7.10.4",
|
|
64
|
+
"@babel/cli": "^7.28.3",
|
|
65
|
+
"@babel/core": "^7.28.5",
|
|
66
|
+
"@babel/plugin-transform-runtime": "^7.28.5",
|
|
67
|
+
"@babel/preset-env": "^7.28.5",
|
|
68
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
74
69
|
"@nulogy/eslint-config-nulogy": "^1.0.0",
|
|
75
70
|
"@nulogy/icons": "^4.37.2",
|
|
76
71
|
"@rollup/plugin-babel": "^5.0.0",
|
|
@@ -81,75 +76,63 @@
|
|
|
81
76
|
"@semantic-release/github": "^8.0.7",
|
|
82
77
|
"@semantic-release/npm": "^9.0.0",
|
|
83
78
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
84
|
-
"@storybook/addon-a11y": "
|
|
85
|
-
"@storybook/addon-actions": "
|
|
86
|
-
"@storybook/addon-docs": "6.
|
|
87
|
-
"@storybook/addon-
|
|
88
|
-
"@storybook/addon-
|
|
89
|
-
"@storybook/addon-
|
|
90
|
-
"@storybook/
|
|
91
|
-
"@storybook/
|
|
92
|
-
"@storybook/react": "6.
|
|
93
|
-
"@storybook/theming": "
|
|
94
|
-
"@testing-library/jest-dom": "5.11.5",
|
|
79
|
+
"@storybook/addon-a11y": "7.6.20",
|
|
80
|
+
"@storybook/addon-actions": "7.6.20",
|
|
81
|
+
"@storybook/addon-docs": "7.6.20",
|
|
82
|
+
"@storybook/addon-storysource": "7.6.20",
|
|
83
|
+
"@storybook/addon-toolbars": "7.6.20",
|
|
84
|
+
"@storybook/addon-viewport": "7.6.20",
|
|
85
|
+
"@storybook/codemod": "7.6.20",
|
|
86
|
+
"@storybook/react": "7.6.20",
|
|
87
|
+
"@storybook/react-webpack5": "7.6.20",
|
|
88
|
+
"@storybook/theming": "7.6.20",
|
|
95
89
|
"@testing-library/react": "^12.1.5",
|
|
96
90
|
"@types/css-mediaquery": "^0.1.4",
|
|
97
91
|
"@types/deep-equal": "^1.0.4",
|
|
98
|
-
"@types/jest": "^29.5.1",
|
|
99
92
|
"@types/node": "^14.0.14",
|
|
100
93
|
"@types/react": "^17.0.39",
|
|
101
94
|
"@types/react-dom": "^17.0.20",
|
|
102
|
-
"@types/react-router-dom": "5.3.
|
|
95
|
+
"@types/react-router-dom": "^5.3.3",
|
|
103
96
|
"@typescript-eslint/eslint-plugin": "^4.0.0",
|
|
104
97
|
"@typescript-eslint/parser": "^5.30.5",
|
|
105
|
-
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
106
|
-
"awesome-typescript-loader": "^5.2.1",
|
|
107
98
|
"babel-eslint": "^10.0.3",
|
|
108
|
-
"babel-jest": "29.5.0",
|
|
109
99
|
"babel-loader": "8.0.6",
|
|
110
100
|
"babel-plugin-inline-json-import": "^0.3.2",
|
|
111
101
|
"babel-plugin-require-context-hook": "1.0.0",
|
|
112
|
-
"babel-plugin-styled-components": "2.1.
|
|
102
|
+
"babel-plugin-styled-components": "^2.1.4",
|
|
113
103
|
"babel-preset-react": "6.24.1",
|
|
114
|
-
"chromatic": "^
|
|
104
|
+
"chromatic": "^13.3.3",
|
|
115
105
|
"concurrently": "^9.2.0",
|
|
116
106
|
"css-mediaquery": "^0.1.2",
|
|
117
|
-
"cypress": "^13.
|
|
107
|
+
"cypress": "^13.17.0",
|
|
118
108
|
"cypress-enter-plugin": "^1.0.1",
|
|
119
109
|
"cypress-plugin-tab": "^1.0.1",
|
|
120
110
|
"cypress-real-events": "^1.14.0",
|
|
121
|
-
"enzyme": "3.11.0",
|
|
122
|
-
"enzyme-to-json": "3.4.4",
|
|
123
111
|
"eslint": "6.8.0",
|
|
124
112
|
"eslint-plugin-prettier": "^3.1.4",
|
|
125
113
|
"graphql": "15.8.0",
|
|
126
114
|
"http-server": "^14.0.0",
|
|
127
115
|
"husky": "^9.1.7",
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"jest-styled-components": "7",
|
|
131
|
-
"mockdate": "^3.0.2",
|
|
132
|
-
"plop": "^2.4.0",
|
|
116
|
+
"jsdom": "^27.2.0",
|
|
117
|
+
"mockdate": "^3.0.5",
|
|
133
118
|
"prettier": "^3.4.2",
|
|
134
119
|
"re-resizable": "^6.10.3",
|
|
135
120
|
"react": "17.0.2",
|
|
136
121
|
"react-color": "^2.18.1",
|
|
137
122
|
"react-dom": "17.0.2",
|
|
138
|
-
"react-router-dom": "^5.
|
|
139
|
-
"react-test-renderer": "^16.10",
|
|
123
|
+
"react-router-dom": "^5.3.3",
|
|
140
124
|
"rollup": "^2.7.3",
|
|
141
125
|
"rollup-plugin-babel": "^4.4.0",
|
|
142
126
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
143
127
|
"rollup-plugin-replace": "^2.2.0",
|
|
144
128
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
145
129
|
"semantic-release": "^24.2.5",
|
|
146
|
-
"source-map-loader": "^1.0.1",
|
|
147
130
|
"start-server-and-test": "^2.0.12",
|
|
148
|
-
"storybook
|
|
149
|
-
"styled-components": "^6.
|
|
131
|
+
"storybook": "7.6.20",
|
|
132
|
+
"styled-components": "^6.1.19",
|
|
150
133
|
"svg-sprite-loader": "^6.0.11",
|
|
151
|
-
"
|
|
152
|
-
"
|
|
134
|
+
"typescript": "^5.9.3",
|
|
135
|
+
"vitest": "^2.0.0",
|
|
153
136
|
"typescript-eslint": "^0.0.1-alpha.0"
|
|
154
137
|
},
|
|
155
138
|
"dependencies": {
|
|
@@ -180,36 +163,13 @@
|
|
|
180
163
|
"react-resize-detector": "^9.1.0",
|
|
181
164
|
"react-select": "^5.9.0",
|
|
182
165
|
"react-window": "^1.8.11",
|
|
183
|
-
"smoothscroll-polyfill": "^0.4.4",
|
|
184
166
|
"styled-system": "^5.1.4",
|
|
185
167
|
"stylis": "^4.0.0"
|
|
186
168
|
},
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
"
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
"^.+\\.ts?$": "babel-jest",
|
|
193
|
-
"^.+\\.tsx?$": "babel-jest"
|
|
194
|
-
},
|
|
195
|
-
"transformIgnorePatterns": [
|
|
196
|
-
"node_modules/(?!(@nulogy|storybook-addon-performance))"
|
|
197
|
-
],
|
|
198
|
-
"testPathIgnorePatterns": [
|
|
199
|
-
"<rootDir>/cypress"
|
|
200
|
-
],
|
|
201
|
-
"testMatch": [
|
|
202
|
-
"**/*.spec.tsx",
|
|
203
|
-
"**/*.spec.ts"
|
|
204
|
-
],
|
|
205
|
-
"setupFiles": [
|
|
206
|
-
"<rootDir>/spec/support/registerContext.js"
|
|
207
|
-
],
|
|
208
|
-
"setupFilesAfterEnv": [
|
|
209
|
-
"<rootDir>/spec/support/specHelper.js"
|
|
210
|
-
],
|
|
211
|
-
"snapshotSerializers": [
|
|
212
|
-
"enzyme-to-json/serializer"
|
|
213
|
-
]
|
|
169
|
+
"resolutions": {
|
|
170
|
+
"@emotion/serialize": "1.1.3",
|
|
171
|
+
"@types/react": "^17.0.0",
|
|
172
|
+
"@types/react-dom": "^17.0.0",
|
|
173
|
+
"csstype": "^3.2.3"
|
|
214
174
|
}
|
|
215
175
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const mountWithNDSProvider: (component: any, locale?: string) => any;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
class WindowDimensions extends React.Component {
|
|
3
|
-
constructor(props) {
|
|
4
|
-
super(props);
|
|
5
|
-
this.state = { width: 0, height: 0 };
|
|
6
|
-
this.updateWindowDimensions = this.updateWindowDimensions.bind(this);
|
|
7
|
-
}
|
|
8
|
-
componentDidMount() {
|
|
9
|
-
this.updateWindowDimensions();
|
|
10
|
-
window.addEventListener("resize", this.updateWindowDimensions);
|
|
11
|
-
}
|
|
12
|
-
componentWillUnmount() {
|
|
13
|
-
window.removeEventListener("resize", this.updateWindowDimensions);
|
|
14
|
-
}
|
|
15
|
-
updateWindowDimensions() {
|
|
16
|
-
this.setState({ width: window.innerWidth, height: window.innerHeight });
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
const { width, height } = this.state;
|
|
20
|
-
const { children: renderMenu } = this.props;
|
|
21
|
-
return renderMenu({
|
|
22
|
-
windowWidth: width,
|
|
23
|
-
windowHeight: height,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const withWindowDimensions = (Component) => (props) => (React.createElement(WindowDimensions, null, (windowDimensions) => React.createElement(Component, Object.assign({ windowDimensions: windowDimensions }, props))));
|
|
28
|
-
export default withWindowDimensions;
|