@nulogy/components 15.2.2 → 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/dist/main.js +53133 -54186
- package/dist/main.module.js +5924 -6977
- package/dist/src/Alert/Alert.js +2 -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.js +1 -1
- 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.js +1 -1
- 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/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/stories/DescriptionList.playground.story.js +8 -5
- 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.js +4 -17
- package/dist/src/Layout/Page.js +5 -19
- package/dist/src/Layout/Sidebar.js +4 -18
- package/dist/src/Layout/Sidebar.story.js +16 -30
- package/dist/src/Link/Link.js +13 -21
- package/dist/src/List/List.d.ts +0 -1
- package/dist/src/Modal/Modal.story.js +1 -1
- 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 +2 -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 +135 -129
- package/dist/src/Radio/Radio.story.js +8 -8
- package/dist/src/Radio/RadioGroup.js +4 -16
- package/dist/src/RangeContainer/RangeContainer.js +6 -15
- package/dist/src/Select/MenuList.js +13 -18
- package/dist/src/Select/Select.d.ts +1 -1
- package/dist/src/Select/Select.js +16 -17
- package/dist/src/Select/Select.story.d.ts +2 -2
- package/dist/src/Select/Select.story.fixture.js +8 -30
- package/dist/src/Select/Select.story.js +14 -29
- 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/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.js +7 -7
- 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/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/PopperArrow.js +5 -1
- 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/package.json +24 -27
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { StyledProps } from "../StyledProps";
|
|
3
2
|
declare const MenuItemList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>> & string;
|
|
4
3
|
declare const Header: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
@@ -12,11 +11,11 @@ declare const StyledBackLink: import("styled-components/dist/types").IStyledComp
|
|
|
12
11
|
declare const StyledPageTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
|
|
13
12
|
declare const Overlay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
13
|
ref?: import("react").Ref<HTMLDivElement>;
|
|
15
|
-
}, "as" | keyof import("@reach/dialog
|
|
14
|
+
}, "as" | keyof import("@reach/dialog").DialogOverlayProps> & import("@reach/dialog").DialogOverlayProps & {
|
|
16
15
|
as?: "div";
|
|
17
16
|
} & import("framer-motion").MotionProps, "ref"> & import("react").RefAttributes<HTMLElement | SVGElement>, never>> & string & Omit<import("framer-motion").CustomDomComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
18
17
|
ref?: import("react").Ref<HTMLDivElement>;
|
|
19
|
-
}, "as" | keyof import("@reach/dialog
|
|
18
|
+
}, "as" | keyof import("@reach/dialog").DialogOverlayProps> & import("@reach/dialog").DialogOverlayProps & {
|
|
20
19
|
as?: "div";
|
|
21
20
|
}>, keyof import("react").Component<any, {}, any>>;
|
|
22
21
|
declare const TileLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
@@ -35,12 +34,14 @@ declare const StyledMenuItem: import("styled-components/dist/types").IStyledComp
|
|
|
35
34
|
suppressContentEditableWarning?: boolean;
|
|
36
35
|
suppressHydrationWarning?: boolean;
|
|
37
36
|
accessKey?: string;
|
|
37
|
+
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters";
|
|
38
38
|
autoFocus?: boolean;
|
|
39
39
|
className?: string;
|
|
40
40
|
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
41
41
|
contextMenu?: string;
|
|
42
42
|
dir?: string;
|
|
43
43
|
draggable?: boolean | "true" | "false";
|
|
44
|
+
enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send";
|
|
44
45
|
id?: string;
|
|
45
46
|
lang?: string;
|
|
46
47
|
nonce?: string;
|
|
@@ -58,7 +59,6 @@ declare const StyledMenuItem: import("styled-components/dist/types").IStyledComp
|
|
|
58
59
|
rev?: string;
|
|
59
60
|
typeof?: string;
|
|
60
61
|
vocab?: string;
|
|
61
|
-
autoCapitalize?: string;
|
|
62
62
|
autoCorrect?: string;
|
|
63
63
|
autoSave?: string;
|
|
64
64
|
itemProp?: string;
|
|
@@ -68,20 +68,26 @@ declare const StyledMenuItem: import("styled-components/dist/types").IStyledComp
|
|
|
68
68
|
itemRef?: string;
|
|
69
69
|
results?: number;
|
|
70
70
|
security?: string;
|
|
71
|
-
unselectable?: "
|
|
71
|
+
unselectable?: "off" | "on";
|
|
72
72
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
73
73
|
is?: string;
|
|
74
|
+
exportparts?: string;
|
|
75
|
+
part?: string;
|
|
74
76
|
"aria-activedescendant"?: string;
|
|
75
77
|
"aria-atomic"?: boolean | "true" | "false";
|
|
76
78
|
"aria-autocomplete"?: "none" | "list" | "inline" | "both";
|
|
79
|
+
"aria-braillelabel"?: string;
|
|
80
|
+
"aria-brailleroledescription"?: string;
|
|
77
81
|
"aria-busy"?: boolean | "true" | "false";
|
|
78
82
|
"aria-checked"?: boolean | "true" | "false" | "mixed";
|
|
79
83
|
"aria-colcount"?: number;
|
|
80
84
|
"aria-colindex"?: number;
|
|
85
|
+
"aria-colindextext"?: string;
|
|
81
86
|
"aria-colspan"?: number;
|
|
82
87
|
"aria-controls"?: string;
|
|
83
|
-
"aria-current"?: boolean | "time" | "
|
|
88
|
+
"aria-current"?: boolean | "time" | "page" | "true" | "false" | "step" | "location" | "date";
|
|
84
89
|
"aria-describedby"?: string;
|
|
90
|
+
"aria-description"?: string;
|
|
85
91
|
"aria-details"?: string;
|
|
86
92
|
"aria-disabled"?: boolean | "true" | "false";
|
|
87
93
|
"aria-dropeffect"?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
@@ -111,6 +117,7 @@ declare const StyledMenuItem: import("styled-components/dist/types").IStyledComp
|
|
|
111
117
|
"aria-roledescription"?: string;
|
|
112
118
|
"aria-rowcount"?: number;
|
|
113
119
|
"aria-rowindex"?: number;
|
|
120
|
+
"aria-rowindextext"?: string;
|
|
114
121
|
"aria-rowspan"?: number;
|
|
115
122
|
"aria-selected"?: boolean | "true" | "false";
|
|
116
123
|
"aria-setsize"?: number;
|
|
@@ -140,7 +147,7 @@ declare const StyledMenuItem: import("styled-components/dist/types").IStyledComp
|
|
|
140
147
|
onBlurCapture?: import("react").FocusEventHandler<HTMLLIElement>;
|
|
141
148
|
onChange?: import("react").FormEventHandler<HTMLLIElement>;
|
|
142
149
|
onChangeCapture?: import("react").FormEventHandler<HTMLLIElement>;
|
|
143
|
-
onBeforeInput?: import("react").
|
|
150
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLLIElement>;
|
|
144
151
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLLIElement>;
|
|
145
152
|
onInput?: import("react").FormEventHandler<HTMLLIElement>;
|
|
146
153
|
onInputCapture?: import("react").FormEventHandler<HTMLLIElement>;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import React from "react";
|
|
13
2
|
import { Box } from "../../Box";
|
|
14
3
|
import useMediaQuery from "../../hooks/useMediaQuery";
|
|
@@ -21,11 +10,10 @@ const BACK_LINK_MAX_WIDTH = {
|
|
|
21
10
|
tabletLandscape: "20ch",
|
|
22
11
|
laptop: "24ch",
|
|
23
12
|
};
|
|
24
|
-
export function BackLink(
|
|
25
|
-
var { children, maxWidth = BACK_LINK_MAX_WIDTH } = _a, props = __rest(_a, ["children", "maxWidth"]);
|
|
13
|
+
export function BackLink({ children, maxWidth = BACK_LINK_MAX_WIDTH, ...props }) {
|
|
26
14
|
const md = useMediaQuery("phoneLandscape");
|
|
27
15
|
return (React.createElement(Box, { as: "li", flex: "1 1" },
|
|
28
|
-
React.createElement(StyledBackLink,
|
|
16
|
+
React.createElement(StyledBackLink, { ...props, "data-testid": "topbar-back-link" },
|
|
29
17
|
React.createElement(Icon, { icon: "arrowBack" }),
|
|
30
18
|
md && (React.createElement(Text, { maxWidth: maxWidth, textOverflow: "ellipsis", overflow: "hidden", fontSize: "small" }, children)))));
|
|
31
19
|
}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import { DialogContent } from "@reach/dialog";
|
|
13
2
|
import { AnimatePresence } from "framer-motion";
|
|
14
3
|
import React from "react";
|
|
@@ -38,9 +27,7 @@ const blurVariants = {
|
|
|
38
27
|
},
|
|
39
28
|
},
|
|
40
29
|
};
|
|
41
|
-
export function Menu(
|
|
42
|
-
var _b;
|
|
43
|
-
var { children, defaultOpened = false } = _a, props = __rest(_a, ["children", "defaultOpened"]);
|
|
30
|
+
export function Menu({ children, defaultOpened = false, ...props }) {
|
|
44
31
|
const [showMenu, setShowMenu] = React.useState(defaultOpened);
|
|
45
32
|
const [animationComplete, setAnimationComplete] = React.useState(false);
|
|
46
33
|
const { t } = useTranslation();
|
|
@@ -62,6 +49,6 @@ export function Menu(_a) {
|
|
|
62
49
|
setAnimationComplete(true);
|
|
63
50
|
}
|
|
64
51
|
}, onDismiss: close },
|
|
65
|
-
React.createElement(DialogContent, { "data-testid": "topbar-menu", "data-visible": animationComplete ? true : undefined, "aria-label":
|
|
52
|
+
React.createElement(DialogContent, { "data-testid": "topbar-menu", "data-visible": animationComplete ? true : undefined, "aria-label": props["aria-label"] ?? t("menu options") },
|
|
66
53
|
React.createElement(MenuItemList, null, children)))))));
|
|
67
54
|
}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import { motion } from "framer-motion";
|
|
13
2
|
import React from "react";
|
|
14
3
|
import { Flex } from "../../Flex";
|
|
@@ -16,9 +5,8 @@ import { Icon } from "../../Icon";
|
|
|
16
5
|
import { Text } from "../../Type";
|
|
17
6
|
import { TileLink } from "../TopBar.styled";
|
|
18
7
|
const MotionText = motion(Text);
|
|
19
|
-
export function MenuItemLink(
|
|
20
|
-
|
|
21
|
-
return (React.createElement(TileLink, Object.assign({}, props),
|
|
8
|
+
export function MenuItemLink({ description, title, icon, ...props }) {
|
|
9
|
+
return (React.createElement(TileLink, { ...props },
|
|
22
10
|
React.createElement(Icon, { icon: icon, size: "x3" }),
|
|
23
11
|
React.createElement(Flex, { flexDirection: "column", justifyContent: "center" },
|
|
24
12
|
React.createElement(MotionText, { fontWeight: "medium", fontSize: "md", lineHeight: "base" }, title),
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import React from "react";
|
|
13
2
|
import { StyledPageTitle } from "../TopBar.styled";
|
|
14
|
-
export function PageTitle(
|
|
15
|
-
|
|
16
|
-
return (React.createElement(StyledPageTitle, Object.assign({ "data-testid": "topbar-page-title" }, props), children));
|
|
3
|
+
export function PageTitle({ children, ...props }) {
|
|
4
|
+
return (React.createElement(StyledPageTitle, { "data-testid": "topbar-page-title", ...props }, children));
|
|
17
5
|
}
|
|
@@ -21,7 +21,7 @@ export default {
|
|
|
21
21
|
export const WithNoLabel = () => (React.createElement(TopBar.Root, null,
|
|
22
22
|
React.createElement(TopBar.BackLink, { href: "/cycle-counts" }),
|
|
23
23
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
24
|
-
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem,
|
|
24
|
+
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title, ...props }))))));
|
|
25
25
|
export const WithACustomMaxWidth = () => (React.createElement(TopBar.Root, null,
|
|
26
26
|
React.createElement(TopBar.BackLink, { href: "/cycle-counts", maxWidth: {
|
|
27
27
|
small: "10ch",
|
|
@@ -31,10 +31,10 @@ export const WithACustomMaxWidth = () => (React.createElement(TopBar.Root, null,
|
|
|
31
31
|
} }, "Cycle counts"),
|
|
32
32
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
33
33
|
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
34
|
-
React.createElement(TopBar.MenuItemLink,
|
|
34
|
+
React.createElement(TopBar.MenuItemLink, { ...props })))))));
|
|
35
35
|
export const WithARouterLink = () => (React.createElement(BrowserRouter, null,
|
|
36
36
|
React.createElement(TopBar.Root, null,
|
|
37
37
|
React.createElement(Link, { component: TopBar.BackLink, to: "/cycle-counts" }, "Cycle counts"),
|
|
38
38
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
39
39
|
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
40
|
-
React.createElement(TopBar.MenuItemLink,
|
|
40
|
+
React.createElement(TopBar.MenuItemLink, { ...props }))))))));
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import React from "react";
|
|
13
2
|
import { Link, BrowserRouter } from "react-router-dom";
|
|
14
3
|
import { TopBar } from "../TopBar";
|
|
@@ -34,31 +23,31 @@ export const withDefaultOpenMenu = () => (React.createElement(TopBar.Root, null,
|
|
|
34
23
|
React.createElement(TopBar.BackLink, { href: "#" }, "Cycle counts"),
|
|
35
24
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
36
25
|
React.createElement(TopBar.Menu, { defaultOpened: true }, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
37
|
-
React.createElement(TopBar.MenuItemLink,
|
|
26
|
+
React.createElement(TopBar.MenuItemLink, { ...props })))))));
|
|
38
27
|
export const WithOneMenuItem = () => (React.createElement(TopBar.Root, null,
|
|
39
28
|
React.createElement(TopBar.BackLink, { href: "#" }, "Cycle counts"),
|
|
40
29
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
41
30
|
React.createElement(TopBar.Menu, { defaultOpened: true }, menuItems.slice(0, 1).map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
42
|
-
React.createElement(TopBar.MenuItemLink,
|
|
31
|
+
React.createElement(TopBar.MenuItemLink, { ...props })))))));
|
|
43
32
|
export const WithTwoItems = () => (React.createElement(TopBar.Root, null,
|
|
44
33
|
React.createElement(TopBar.BackLink, { href: "#" }, "Cycle counts"),
|
|
45
34
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
46
35
|
React.createElement(TopBar.Menu, { defaultOpened: true }, menuItems.slice(0, 2).map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
47
|
-
React.createElement(TopBar.MenuItemLink,
|
|
36
|
+
React.createElement(TopBar.MenuItemLink, { ...props })))))));
|
|
48
37
|
export const WithThreeItems = () => (React.createElement(TopBar.Root, null,
|
|
49
38
|
React.createElement(TopBar.BackLink, { href: "#" }, "Cycle counts"),
|
|
50
39
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
51
40
|
React.createElement(TopBar.Menu, { defaultOpened: true }, menuItems.slice(0, 3).map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
52
|
-
React.createElement(TopBar.MenuItemLink,
|
|
41
|
+
React.createElement(TopBar.MenuItemLink, { ...props })))))));
|
|
53
42
|
export const WithRouterLinks = () => {
|
|
54
|
-
const routerMenuItems = menuItems.map((
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
43
|
+
const routerMenuItems = menuItems.map(({ href, ...item }) => ({
|
|
44
|
+
...item,
|
|
45
|
+
to: href,
|
|
46
|
+
}));
|
|
58
47
|
return (React.createElement(TopBar.Root, null,
|
|
59
48
|
React.createElement(TopBar.BackLink, { href: "#" }, "Cycle counts"),
|
|
60
49
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
61
50
|
React.createElement(TopBar.Menu, { defaultOpened: true },
|
|
62
51
|
React.createElement(BrowserRouter, { basename: "/" }, routerMenuItems.map((item) => (React.createElement(TopBar.MenuItem, { key: item.title },
|
|
63
|
-
React.createElement(Link,
|
|
52
|
+
React.createElement(Link, { component: TopBar.MenuItemLink, ...item }))))))));
|
|
64
53
|
};
|
|
@@ -24,17 +24,17 @@ export const Default = () => (React.createElement(TopBar.Root, null,
|
|
|
24
24
|
React.createElement(TopBar.BackLink, { href: "/cycle-counts" }, "Cycle counts"),
|
|
25
25
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
26
26
|
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
27
|
-
React.createElement(TopBar.MenuItemLink,
|
|
27
|
+
React.createElement(TopBar.MenuItemLink, { ...props })))))));
|
|
28
28
|
export const WithALongTitle = () => (React.createElement(TopBar.Root, null,
|
|
29
29
|
React.createElement(TopBar.BackLink, { href: "/cycle-counts" }, "Previous page title"),
|
|
30
30
|
React.createElement(TopBar.PageTitle, null, "A long title that can not fit on smaller screens"),
|
|
31
31
|
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
32
|
-
React.createElement(TopBar.MenuItemLink,
|
|
32
|
+
React.createElement(TopBar.MenuItemLink, { ...props })))))));
|
|
33
33
|
export const WithAnApplicationFrame = () => (React.createElement(ApplicationFrame, { navBar: React.createElement(TopBar.Root, null,
|
|
34
34
|
React.createElement(TopBar.BackLink, { href: "/cycle-counts" }, "Cycle counts"),
|
|
35
35
|
React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
|
|
36
36
|
React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
|
|
37
|
-
React.createElement(TopBar.MenuItemLink,
|
|
37
|
+
React.createElement(TopBar.MenuItemLink, { ...props })))))) },
|
|
38
38
|
React.createElement(Page, { fullHeight: true },
|
|
39
39
|
React.createElement(FormSection, { title: "Personal Information" },
|
|
40
40
|
React.createElement(Input, { id: "name", labelText: "Name" }),
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import React from "react";
|
|
13
2
|
import { Text } from "../Type";
|
|
14
3
|
import TruncatedTextFillWidth from "./components/TruncatedTextFillWidth";
|
|
15
4
|
import TruncatedTextMaxCharacters from "./components/TruncatedTextMaxCharacters";
|
|
16
|
-
const TruncatedText = (
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
const TruncatedText = ({ indicator = "...", element = React.createElement(Text, null), maxCharacters = 20, fullWidth = false, showTooltip = true, "data-testid": dataTestId = "truncated-text", children, ...rest }) => {
|
|
6
|
+
const props = {
|
|
7
|
+
indicator,
|
|
19
8
|
element,
|
|
20
9
|
maxCharacters,
|
|
21
|
-
showTooltip,
|
|
22
|
-
|
|
10
|
+
showTooltip,
|
|
11
|
+
"data-testid": dataTestId,
|
|
12
|
+
...rest,
|
|
13
|
+
};
|
|
14
|
+
return fullWidth ? (React.createElement(TruncatedTextFillWidth, { ...props }, children)) : (React.createElement(TruncatedTextMaxCharacters, { ...props }, children));
|
|
23
15
|
};
|
|
24
16
|
export default TruncatedText;
|
|
@@ -19,6 +19,6 @@ export type MaybeTooltipProps = {
|
|
|
19
19
|
/** The trigger element(s) */
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
};
|
|
22
|
-
declare function MaybeTooltip({ tooltip, showTooltip, placement, defaultOpen, showDelay, maxWidth, supportMobileTap, // Note: supportMobileTap is handled internally by the new Tooltip
|
|
22
|
+
declare function MaybeTooltip({ tooltip, showTooltip, placement, defaultOpen, showDelay, maxWidth, supportMobileTap: _supportMobileTap, // Note: supportMobileTap is handled internally by the new Tooltip
|
|
23
23
|
className, children, }: MaybeTooltipProps): React.JSX.Element;
|
|
24
24
|
export default MaybeTooltip;
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import React, { useState } from "react";
|
|
13
2
|
import { Text } from "../../Type";
|
|
14
3
|
import MaybeTooltip from "./MaybeTooltip";
|
|
15
|
-
const TruncatedTextFillWidth = (
|
|
16
|
-
var { element, showTooltip, tooltipProps, children, "data-testid": testId } = _a, props = __rest(_a, ["element", "showTooltip", "tooltipProps", "children", "data-testid"]);
|
|
4
|
+
const TruncatedTextFillWidth = ({ element, showTooltip, tooltipProps, children, "data-testid": testId, ...props }) => {
|
|
17
5
|
const [hasOverflowText, setHasOverflowText] = useState(false);
|
|
18
6
|
const hasTooltip = showTooltip && hasOverflowText;
|
|
19
7
|
const updateOverflow = (e) => {
|
|
@@ -22,7 +10,7 @@ const TruncatedTextFillWidth = (_a) => {
|
|
|
22
10
|
setHasOverflowText(true);
|
|
23
11
|
}
|
|
24
12
|
};
|
|
25
|
-
return (React.createElement(MaybeTooltip,
|
|
26
|
-
React.createElement(Text,
|
|
13
|
+
return (React.createElement(MaybeTooltip, { showTooltip: hasTooltip, tooltip: children, defaultOpen: true, ...tooltipProps },
|
|
14
|
+
React.createElement(Text, { as: element.type, cursor: hasTooltip ? "pointer" : "initial", onMouseEnter: updateOverflow, width: "100%", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", "data-testid": testId, ...element.props, ...props }, children)));
|
|
27
15
|
};
|
|
28
16
|
export default TruncatedTextFillWidth;
|
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import React from "react";
|
|
13
2
|
import { Text } from "../../Type";
|
|
14
3
|
import MaybeTooltip from "./MaybeTooltip";
|
|
15
|
-
const TruncatedTextMaxCharacters = (
|
|
16
|
-
|
|
17
|
-
const innerText = children !== null && children !== void 0 ? children : "";
|
|
4
|
+
const TruncatedTextMaxCharacters = ({ children, element, indicator, maxCharacters, showTooltip, tooltipProps, "data-testid": testId, ...props }) => {
|
|
5
|
+
const innerText = children ?? "";
|
|
18
6
|
const requiresTruncation = innerText.length > maxCharacters;
|
|
19
7
|
const truncatedText = requiresTruncation ? innerText.slice(0, maxCharacters) + indicator : innerText;
|
|
20
8
|
const hasTooltip = showTooltip && requiresTruncation;
|
|
21
|
-
return (React.createElement(MaybeTooltip,
|
|
22
|
-
React.createElement(Text,
|
|
9
|
+
return (React.createElement(MaybeTooltip, { showTooltip: hasTooltip, tooltip: innerText, ...tooltipProps },
|
|
10
|
+
React.createElement(Text, { as: element.type, cursor: hasTooltip ? "pointer" : "initial", width: "fit-content", "data-testid": testId, ...element.props, ...props }, truncatedText)));
|
|
23
11
|
};
|
|
24
12
|
export default TruncatedTextMaxCharacters;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TextProps } from "./Text";
|
|
3
2
|
export declare const Heading1: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "textTransform" | "disabled" | keyof import("react").HTMLAttributes<HTMLParagraphElement> | "inline" | "compact" | keyof import("../StyledProps").StyledProps> & import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
4
3
|
variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
|
|
5
4
|
inline?: boolean;
|
|
6
5
|
compact?: boolean;
|
|
7
6
|
disabled?: boolean;
|
|
8
|
-
textTransform?: "
|
|
7
|
+
textTransform?: "none" | "inherit" | "initial" | "-moz-initial" | "revert" | "unset" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase" | undefined;
|
|
9
8
|
fontSize?: string;
|
|
10
9
|
} & import("../StyledProps").StyledProps, "ref"> & {
|
|
11
10
|
ref?: import("react").Ref<HTMLParagraphElement>;
|
|
@@ -17,7 +16,7 @@ export declare const Heading2: import("styled-components/dist/types").IStyledCom
|
|
|
17
16
|
inline?: boolean;
|
|
18
17
|
compact?: boolean;
|
|
19
18
|
disabled?: boolean;
|
|
20
|
-
textTransform?: "
|
|
19
|
+
textTransform?: "none" | "inherit" | "initial" | "-moz-initial" | "revert" | "unset" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase" | undefined;
|
|
21
20
|
fontSize?: string;
|
|
22
21
|
} & import("../StyledProps").StyledProps, "ref"> & {
|
|
23
22
|
ref?: import("react").Ref<HTMLParagraphElement>;
|
|
@@ -29,7 +28,7 @@ export declare const Heading3: import("styled-components/dist/types").IStyledCom
|
|
|
29
28
|
inline?: boolean;
|
|
30
29
|
compact?: boolean;
|
|
31
30
|
disabled?: boolean;
|
|
32
|
-
textTransform?: "
|
|
31
|
+
textTransform?: "none" | "inherit" | "initial" | "-moz-initial" | "revert" | "unset" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase" | undefined;
|
|
33
32
|
fontSize?: string;
|
|
34
33
|
} & import("../StyledProps").StyledProps, "ref"> & {
|
|
35
34
|
ref?: import("react").Ref<HTMLParagraphElement>;
|
|
@@ -41,7 +40,7 @@ export declare const Heading4: import("styled-components/dist/types").IStyledCom
|
|
|
41
40
|
inline?: boolean;
|
|
42
41
|
compact?: boolean;
|
|
43
42
|
disabled?: boolean;
|
|
44
|
-
textTransform?: "
|
|
43
|
+
textTransform?: "none" | "inherit" | "initial" | "-moz-initial" | "revert" | "unset" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase" | undefined;
|
|
45
44
|
fontSize?: string;
|
|
46
45
|
} & import("../StyledProps").StyledProps, "ref"> & {
|
|
47
46
|
ref?: import("react").Ref<HTMLParagraphElement>;
|
package/dist/src/Type/Text.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
1
|
import React from "react";
|
|
13
2
|
import styled from "styled-components";
|
|
14
3
|
import { Text } from "../Type";
|
|
@@ -23,9 +12,8 @@ const Wrapper = styled.div(({ theme }) => ({
|
|
|
23
12
|
marginBottom: 0,
|
|
24
13
|
},
|
|
25
14
|
}));
|
|
26
|
-
export default function InlineValidation(
|
|
27
|
-
|
|
28
|
-
return errorMessage || errorList ? (React.createElement(Flex, Object.assign({ className: className, color: "red" }, boxProps),
|
|
15
|
+
export default function InlineValidation({ className, errorMessage, errorList, children, ...boxProps }) {
|
|
16
|
+
return errorMessage || errorList ? (React.createElement(Flex, { className: className, color: "red", ...boxProps },
|
|
29
17
|
React.createElement(Icon, { icon: "error", mr: "x1" }),
|
|
30
18
|
React.createElement(Wrapper, null,
|
|
31
19
|
errorMessage && React.createElement(Text, null, errorMessage),
|
|
@@ -7,35 +7,35 @@ const spaceProps = {
|
|
|
7
7
|
p: "x1",
|
|
8
8
|
mt: "x5",
|
|
9
9
|
};
|
|
10
|
-
export const _Alert = () => React.createElement(Alert,
|
|
11
|
-
export const _AsyncSelect = () => (React.createElement(AsyncSelect,
|
|
12
|
-
export const _Breadcrumbs = () => (React.createElement(Breadcrumbs,
|
|
10
|
+
export const _Alert = () => React.createElement(Alert, { ...spaceProps }, "Danger alert");
|
|
11
|
+
export const _AsyncSelect = () => (React.createElement(AsyncSelect, { placeholder: "Filter Countries", className: "Select", classNamePrefix: "SelectTest", labelText: "Country", ...spaceProps }));
|
|
12
|
+
export const _Breadcrumbs = () => (React.createElement(Breadcrumbs, { ...spaceProps },
|
|
13
13
|
React.createElement(Link, { href: "/" }, "Home"),
|
|
14
14
|
React.createElement(Link, { href: "/Tenants" }, "Tenants"),
|
|
15
15
|
React.createElement(Text, null, "Current Tenant")));
|
|
16
|
-
export const _PrimaryButton = () => React.createElement(PrimaryButton,
|
|
17
|
-
export const _DatePicker = () => React.createElement(DatePicker,
|
|
18
|
-
export const _DropdownMenu = () => (React.createElement(DropdownMenu,
|
|
16
|
+
export const _PrimaryButton = () => React.createElement(PrimaryButton, { ...spaceProps }, "Create project");
|
|
17
|
+
export const _DatePicker = () => React.createElement(DatePicker, { ...spaceProps });
|
|
18
|
+
export const _DropdownMenu = () => (React.createElement(DropdownMenu, { defaultOpen: true, openAriaLabel: "open dropdown", closeAriaLabel: "close dropdown", ...spaceProps },
|
|
19
19
|
React.createElement(DropdownLink, { href: "/" }, "Dropdown Link"),
|
|
20
20
|
React.createElement(DropdownButton, { onClick: () => { } }, "Dropdown Button"),
|
|
21
21
|
React.createElement(DropdownItem, null,
|
|
22
22
|
React.createElement("a", { href: "/", style: { textDecoration: "none" } }, "Custom Link Component"))));
|
|
23
|
-
export const _FieldLabel = () => (React.createElement(FieldLabel,
|
|
23
|
+
export const _FieldLabel = () => (React.createElement(FieldLabel, { labelText: "Default label", helpText: "I am help text. I can give more details on the input below!", requirementText: "(Required)", ...spaceProps },
|
|
24
24
|
React.createElement(Input, { id: "birthplace", labelText: "Place of birth", requirementText: "(Optional)" })));
|
|
25
25
|
export const _Form = () => (React.createElement(Form, { mt: "x2", p: "x1" },
|
|
26
26
|
React.createElement(Input, { id: "name", labelText: "Name" }),
|
|
27
27
|
React.createElement(Input, { id: "birthdate", placeholder: "DD-MM-YYYY", labelText: "Date of birth", requirementText: "(Optional)", helpText: "Enter a date below" }),
|
|
28
28
|
React.createElement(Input, { id: "birthplace", labelText: "Place of birth", requirementText: "(Optional)" })));
|
|
29
29
|
export const _Link = () => (React.createElement(Link, { as: "button", mt: "x2", p: "x1" }, "Link"));
|
|
30
|
-
export const _List = () => (React.createElement(List,
|
|
30
|
+
export const _List = () => (React.createElement(List, { leftAlign: true, ...spaceProps },
|
|
31
31
|
React.createElement(ListItem, null, "List Item 1"),
|
|
32
32
|
React.createElement(ListItem, null, "List Item 2 that is really really really really really really really really really long"),
|
|
33
33
|
React.createElement(ListItem, { mt: "x1" }, "List Item 3")));
|
|
34
|
-
export const _Pagination = () => React.createElement(Pagination,
|
|
34
|
+
export const _Pagination = () => React.createElement(Pagination, { currentPage: 3, totalPages: 4, ...spaceProps });
|
|
35
35
|
export const _Radio = () => (React.createElement(React.Fragment, null,
|
|
36
|
-
React.createElement(Radio,
|
|
37
|
-
React.createElement(Radio,
|
|
38
|
-
export const _Select = () => (React.createElement(Select,
|
|
36
|
+
React.createElement(Radio, { id: "radio", error: true, labelText: "I am error", ...spaceProps }),
|
|
37
|
+
React.createElement(Radio, { id: "radio", defaultChecked: true, error: true, labelText: "I am error", ...spaceProps })));
|
|
38
|
+
export const _Select = () => (React.createElement(Select, { defaultValue: 2, placeholder: "Please select inventory status", options: [
|
|
39
39
|
{
|
|
40
40
|
label: "option 1",
|
|
41
41
|
value: 1,
|
|
@@ -48,7 +48,7 @@ export const _Select = () => (React.createElement(Select, Object.assign({ defaul
|
|
|
48
48
|
label: "option 3",
|
|
49
49
|
value: 3,
|
|
50
50
|
},
|
|
51
|
-
], labelText: "Inventory status"
|
|
51
|
+
], labelText: "Inventory status", ...spaceProps }));
|
|
52
52
|
const columns = [
|
|
53
53
|
{ label: "Date", dataKey: "date" },
|
|
54
54
|
{ label: "Expected Quantity", dataKey: "expectedQuantity" },
|
|
@@ -104,12 +104,12 @@ const rowData = [
|
|
|
104
104
|
id: "r9",
|
|
105
105
|
},
|
|
106
106
|
];
|
|
107
|
-
export const _Table = () => React.createElement(Table,
|
|
108
|
-
export const _Tabs = () => (React.createElement(Tabs,
|
|
107
|
+
export const _Table = () => React.createElement(Table, { columns: columns, rows: rowData, ...spaceProps });
|
|
108
|
+
export const _Tabs = () => (React.createElement(Tabs, { ...spaceProps },
|
|
109
109
|
React.createElement(Tab, { className: "Tab1", label: "Tab 1" }, "Tab 1 Content"),
|
|
110
110
|
React.createElement(Tab, { className: "Tab2", label: "Tab 2" }, "Tab 2 Content"),
|
|
111
111
|
React.createElement(Tab, { className: "Tab3", label: "Tab 3" }, "Tab 3 Content"),
|
|
112
112
|
React.createElement(Tab, { className: "Tab4", label: "Tab 4" }, "Tab 4 Content")));
|
|
113
|
-
export const _TimePicker = () => React.createElement(TimePicker,
|
|
114
|
-
export const _TruncatedText = () => (React.createElement(TruncatedText,
|
|
115
|
-
export const _InlineValidation = () => React.createElement(InlineValidation,
|
|
113
|
+
export const _TimePicker = () => React.createElement(TimePicker, { labelText: "End Time", defaultValue: "12:38 PM", ...spaceProps });
|
|
114
|
+
export const _TruncatedText = () => (React.createElement(TruncatedText, { ...spaceProps }, "Special instructions are provided for the shipment"));
|
|
115
|
+
export const _InlineValidation = () => React.createElement(InlineValidation, { errorMessage: "Something has gone wrong", ...spaceProps });
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ThemeContext } from "styled-components";
|
|
2
2
|
import React, { useCallback, useEffect, useState } from "react";
|
|
3
3
|
function useMediaQuery(q) {
|
|
4
|
-
var _a;
|
|
5
4
|
const isUnsupported = typeof window === "undefined" || typeof window.matchMedia === "undefined";
|
|
6
5
|
const theme = React.useContext(ThemeContext);
|
|
7
|
-
const query =
|
|
6
|
+
const query = theme?.breakpoints?.[q] ? `(min-width: ${theme.breakpoints[q]})` : q;
|
|
8
7
|
const getMatches = useCallback((query) => {
|
|
9
8
|
if (isUnsupported) {
|
|
10
9
|
return false;
|
package/dist/src/i18n.js
CHANGED
package/dist/src/locale.story.js
CHANGED
|
@@ -77,7 +77,7 @@ const getRows = () => {
|
|
|
77
77
|
const row = { key, id: key };
|
|
78
78
|
Object.keys(locales).forEach((locale) => {
|
|
79
79
|
const translations = locales[locale].keys;
|
|
80
|
-
row[locale] =
|
|
80
|
+
row[locale] = translations?.[key] || "-";
|
|
81
81
|
});
|
|
82
82
|
return row;
|
|
83
83
|
});
|