@nulogy/components 11.1.0 → 11.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/main.js +4538 -1047
  2. package/dist/main.module.js +4583 -1095
  3. package/dist/src/BottomSheet/BottomSheet.d.ts +1 -2
  4. package/dist/src/BottomSheet/BottomSheet.parts.d.ts +2 -2
  5. package/dist/src/BottomSheet/BottomSheet.styled.d.ts +2 -2
  6. package/dist/src/BottomSheet/index.d.ts +3 -0
  7. package/dist/src/BottomSheet/stories/BottomSheet.actions.story.d.ts +6 -0
  8. package/dist/src/BottomSheet/stories/BottomSheet.content.story.d.ts +6 -0
  9. package/dist/src/BottomSheet/stories/BottomSheet.features.story.d.ts +6 -0
  10. package/dist/src/BottomSheet/stories/BottomSheet.parts.story.d.ts +6 -0
  11. package/dist/src/BottomSheet/stories/BottomSheet.story.d.ts +6 -0
  12. package/dist/src/BrandedNavBar/NavBarBackground.d.ts +1 -1
  13. package/dist/src/Button/Button.d.ts +3 -2
  14. package/dist/src/Button/ControlIcon.d.ts +2 -1
  15. package/dist/src/Button/IconicButton.d.ts +2 -1
  16. package/dist/src/Checkbox/Checkbox.d.ts +1 -1
  17. package/dist/src/DatePicker/DatePickerStyles.d.ts +1 -1
  18. package/dist/src/Divider/Divider.d.ts +4 -1
  19. package/dist/src/Divider/Divider.story.d.ts +2 -1
  20. package/dist/src/DropdownMenu/DropdownButton.d.ts +1 -1
  21. package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +1 -1
  22. package/dist/src/FieldLabel/FramedIcon.d.ts +2 -1
  23. package/dist/src/Icon/Icon.d.ts +2 -1
  24. package/dist/src/Input/InputField.d.ts +3 -2
  25. package/dist/src/Modal/ModalContent.d.ts +1 -1
  26. package/dist/src/Modal/ModalHeader.d.ts +1 -1
  27. package/dist/src/NDSProvider/ComponentVariantContext.d.ts +1 -1
  28. package/dist/src/NDSProvider/FeatureFlagsContext.d.ts +11 -0
  29. package/dist/src/NDSProvider/GlobalStyles.d.ts +1 -1
  30. package/dist/src/NDSProvider/GlobalStylesComposer.d.ts +1 -1
  31. package/dist/src/NDSProvider/NDSProvider.d.ts +4 -2
  32. package/dist/src/Select/customReactSelectStyles.d.ts +2 -2
  33. package/dist/src/Textarea/StyledTextarea.d.ts +1 -1
  34. package/dist/src/Toggle/Toggle.d.ts +1 -1
  35. package/dist/src/Toggle/ToggleButton.d.ts +1 -1
  36. package/dist/src/Tooltip/Tooltip.story.d.ts +1 -0
  37. package/dist/src/Tooltip/TooltipContainer.d.ts +1 -1
  38. package/dist/src/TopBar/TopBar.d.ts +16 -0
  39. package/dist/src/TopBar/TopBar.styled.d.ts +18 -0
  40. package/dist/src/TopBar/components/BackLink.d.ts +7 -0
  41. package/dist/src/TopBar/components/Menu.d.ts +6 -0
  42. package/dist/src/TopBar/components/MenuItem.d.ts +11 -0
  43. package/dist/src/TopBar/components/PageTitle.d.ts +3 -0
  44. package/dist/src/TopBar/constants.d.ts +3 -0
  45. package/dist/src/TopBar/stories/TopBar.backButton.story.d.ts +19 -0
  46. package/dist/src/TopBar/stories/TopBar.menu.story.d.ts +22 -0
  47. package/dist/src/TopBar/stories/TopBar.story.d.ts +19 -0
  48. package/dist/src/TopBar/stories/fixtures.d.ts +2 -0
  49. package/dist/src/hooks/useMediaQuery/useMediaQuery.d.ts +3 -1
  50. package/dist/src/index.d.ts +5 -2
  51. package/dist/src/theme/NDSThemeProvider.d.ts +5 -0
  52. package/dist/src/theme/index.d.ts +2 -0
  53. package/dist/src/{NDSProvider → theme}/mergeThemes.util.d.ts +1 -1
  54. package/dist/src/theme/theme.d.ts +5 -0
  55. package/dist/src/{theme.type.d.ts → theme/theme.type.d.ts} +16 -2
  56. package/dist/src/theme/useNDSTheme.d.ts +19 -0
  57. package/dist/src/utils/story/dashed.d.ts +1 -1
  58. package/package.json +8 -6
  59. package/dist/src/NDSProvider/useNDSTheme.d.ts +0 -12
  60. package/dist/src/VisualTests/KitchenSink.story.d.ts +0 -6
  61. package/dist/src/theme.d.ts +0 -5
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { WidthProps } from "styled-system";
3
- interface Props {
3
+ export interface Props {
4
4
  isOpen?: boolean;
5
5
  "aria-label"?: string;
6
6
  onClose?: () => void;
@@ -20,4 +20,3 @@ interface Props {
20
20
  children?: React.ReactNode;
21
21
  }
22
22
  export default function BottomSheet({ title, helpText, closeButtonLabel, secondaryAction, primaryAction, isOpen, onClose, sheetWidth, contentWidth, disableCloseOnOverlayClick, hideCloseButton, children, ...props }: Props): React.JSX.Element;
23
- export {};
@@ -27,7 +27,7 @@ export declare const BottomSheetParts: {
27
27
  variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
28
28
  inline?: boolean;
29
29
  disabled?: boolean;
30
- textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
30
+ textTransform?: "initial" | "-moz-initial" | "inherit" | "revert" | "unset" | "none" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase";
31
31
  fontSize?: string;
32
32
  } & import("..").StyledProps & {
33
33
  as: string;
@@ -36,7 +36,7 @@ export declare const BottomSheetParts: {
36
36
  variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
37
37
  inline?: boolean;
38
38
  disabled?: boolean;
39
- textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
39
+ textTransform?: "initial" | "-moz-initial" | "inherit" | "revert" | "unset" | "none" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase";
40
40
  fontSize?: string;
41
41
  } & import("..").StyledProps, never>;
42
42
  Footer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -23,7 +23,7 @@ declare const Title: import("styled-components").StyledComponent<"p", import("st
23
23
  variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
24
24
  inline?: boolean;
25
25
  disabled?: boolean;
26
- textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
26
+ textTransform?: "initial" | "inherit" | "-moz-initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
27
27
  fontSize?: string;
28
28
  } & import("../StyledProps").StyledProps & {
29
29
  as: string;
@@ -32,7 +32,7 @@ declare const HelpText: import("styled-components").StyledComponent<"p", import(
32
32
  variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
33
33
  inline?: boolean;
34
34
  disabled?: boolean;
35
- textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
35
+ textTransform?: "initial" | "inherit" | "-moz-initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
36
36
  fontSize?: string;
37
37
  } & import("../StyledProps").StyledProps, never>;
38
38
  export { Overlay, Sheet, ContentContainer, Footer, Header, Title, HelpText };
@@ -0,0 +1,3 @@
1
+ export { default as BottomSheet } from "./BottomSheet";
2
+ export { BottomSheetParts } from "./BottomSheet.parts";
3
+ export type { Props as BottomSheetProps } from "./BottomSheet";
@@ -1,6 +1,12 @@
1
1
  import React from "react";
2
2
  declare const _default: {
3
3
  title: string;
4
+ decorators: ((storyFn: any) => React.JSX.Element)[];
5
+ parameters: {
6
+ chromatic: {
7
+ delay: number;
8
+ };
9
+ };
4
10
  };
5
11
  export default _default;
6
12
  export declare const WithAHiddenCloseButton: () => React.JSX.Element;
@@ -1,6 +1,12 @@
1
1
  import React from "react";
2
2
  declare const _default: {
3
3
  title: string;
4
+ decorators: ((storyFn: any) => React.JSX.Element)[];
5
+ parameters: {
6
+ chromatic: {
7
+ delay: number;
8
+ };
9
+ };
4
10
  };
5
11
  export default _default;
6
12
  export declare const WithHelpText: () => React.JSX.Element;
@@ -1,6 +1,12 @@
1
1
  import React from "react";
2
2
  declare const _default: {
3
3
  title: string;
4
+ decorators: ((storyFn: any) => React.JSX.Element)[];
5
+ parameters: {
6
+ chromatic: {
7
+ delay: number;
8
+ };
9
+ };
4
10
  };
5
11
  export default _default;
6
12
  export declare const WithCustomWidths: () => React.JSX.Element;
@@ -1,6 +1,12 @@
1
1
  import React from "react";
2
2
  declare const _default: {
3
3
  title: string;
4
+ decorators: ((storyFn: any) => React.JSX.Element)[];
5
+ parameters: {
6
+ chromatic: {
7
+ delay: number;
8
+ };
9
+ };
4
10
  };
5
11
  export default _default;
6
12
  export declare const RenderedUsingCompositionalAPI: () => React.JSX.Element;
@@ -1,6 +1,12 @@
1
1
  import React from "react";
2
2
  declare const _default: {
3
3
  title: string;
4
+ decorators: ((storyFn: any) => React.JSX.Element)[];
5
+ parameters: {
6
+ chromatic: {
7
+ delay: number;
8
+ };
9
+ };
4
10
  };
5
11
  export default _default;
6
12
  export declare const BasicUsage: () => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { DefaultNDSThemeType } from "../theme.type";
1
+ import { DefaultNDSThemeType } from "../theme";
2
2
  import { StyledProps } from "../StyledProps";
3
3
  export type NavBarBackgroundProps = {
4
4
  theme?: DefaultNDSThemeType;
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
+ import type { IconName } from "@nulogy/icons";
2
3
  import { SpaceProps } from "styled-system";
3
- import { DefaultNDSThemeType } from "../theme.type";
4
+ import { DefaultNDSThemeType } from "../theme";
4
5
  import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
5
6
  export type ButtonProps = SpaceProps & React.ComponentPropsWithRef<"button"> & {
6
7
  className?: string;
7
- icon?: any;
8
+ icon?: IconName | "loading";
8
9
  iconSide?: "left" | "right";
9
10
  size?: "small" | "medium";
10
11
  variant?: ComponentVariant;
@@ -1,8 +1,9 @@
1
+ import type { IconName } from "@nulogy/icons";
1
2
  import React from "react";
2
3
  import { LayoutProps, SpaceProps } from "styled-system";
3
4
  type ControlIconProps = React.ComponentPropsWithRef<"button"> & SpaceProps & LayoutProps & {
4
5
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
5
- icon: string;
6
+ icon: IconName | "loading";
6
7
  toggled?: boolean;
7
8
  disabled?: boolean;
8
9
  size?: string;
@@ -1,11 +1,12 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
+ import { IconName } from "@nulogy/icons";
3
4
  import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
4
5
  interface BaseProps {
5
6
  variant?: ComponentVariant;
6
7
  color?: string;
7
8
  labelHidden?: boolean;
8
- icon?: string;
9
+ icon?: IconName | "loading";
9
10
  iconSize?: string;
10
11
  hoverBackgroundColor?: string;
11
12
  fontSize?: string;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
- import { DefaultNDSThemeType } from "../theme.type";
3
+ import { DefaultNDSThemeType } from "../theme";
4
4
  import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
5
5
  type NativeInputProps = Omit<React.ComponentPropsWithRef<"input">, "size">;
6
6
  type CheckboxProps = NativeInputProps & SpaceProps & {
@@ -1,4 +1,4 @@
1
- import { DefaultNDSThemeType } from "../theme.type";
1
+ import { DefaultNDSThemeType } from "../theme";
2
2
  export declare const DatePickerStyles: import("styled-components").GlobalStyleComponent<{
3
3
  theme: DefaultNDSThemeType;
4
4
  }, import("styled-components").DefaultTheme>;
@@ -1,3 +1,6 @@
1
1
  import { StyledProps } from "../StyledProps";
2
- declare const Divider: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledProps, never>;
2
+ export interface DividerProps extends StyledProps, React.HTMLAttributes<HTMLHRElement> {
3
+ secondary?: boolean;
4
+ }
5
+ declare const Divider: import("styled-components").StyledComponent<"hr", import("styled-components").DefaultTheme, DividerProps, never>;
3
6
  export default Divider;
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
2
  declare const _default: {
3
3
  title: string;
4
- component: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("..").StyledProps, never>;
4
+ component: import("styled-components").StyledComponent<"hr", import("styled-components").DefaultTheme, import("./Divider").DividerProps, never>;
5
5
  };
6
6
  export default _default;
7
7
  export declare const Default: () => React.JSX.Element;
8
+ export declare const Secondary: () => React.JSX.Element;
8
9
  export declare const WithCustomColourAndSpacing: () => React.JSX.Element;
9
10
  export declare const WithCustomProperties: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { DefaultNDSThemeType } from "../theme.type";
2
+ import { DefaultNDSThemeType } from "../theme";
3
3
  import { StyledProps } from "../StyledProps";
4
4
  import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
5
5
  declare const DropdownButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { DefaultNDSThemeType } from "../theme.type";
2
+ import { DefaultNDSThemeType } from "../theme";
3
3
  type DropdownMenuContainerProps = {
4
4
  id?: string;
5
5
  className?: string;
@@ -1,7 +1,8 @@
1
1
  import React, { ReactElement } from "react";
2
+ import { IconName } from "@nulogy/icons";
2
3
  interface FramedIconProps extends React.ComponentPropsWithoutRef<"svg"> {
3
4
  iconSize: string;
4
- icon: string;
5
+ icon: IconName | "loading";
5
6
  focusable?: boolean;
6
7
  maxWidth?: string;
7
8
  tooltip?: string | ReactElement;
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
+ import { IconName } from "@nulogy/icons";
3
4
  interface IconProps extends SpaceProps {
4
- icon: string;
5
+ icon: IconName | "loading";
5
6
  className?: string;
6
7
  size?: string;
7
8
  title?: string;
@@ -1,11 +1,12 @@
1
1
  import React from "react";
2
+ import { IconName } from "@nulogy/icons";
2
3
  import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
3
4
  type NativeInputProps = Omit<React.ComponentPropsWithRef<"input">, "size" | "height" | "width">;
4
5
  export interface InputFieldProps extends NativeInputProps {
5
6
  htmlSize?: number;
6
7
  variant?: ComponentVariant;
7
- iconRight?: string;
8
- iconLeft?: string;
8
+ iconRight?: IconName | "loading";
9
+ iconLeft?: IconName | "loading";
9
10
  iconRightSize?: string;
10
11
  iconLeftSize?: string;
11
12
  error?: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { DefaultNDSThemeType } from "../theme.type";
2
+ import { DefaultNDSThemeType } from "../theme";
3
3
  type ModalContentProps = React.ComponentPropsWithRef<"div"> & {
4
4
  hasFooter?: any;
5
5
  theme?: DefaultNDSThemeType;
@@ -1,4 +1,4 @@
1
- import { DefaultNDSThemeType } from "../theme.type";
1
+ import { DefaultNDSThemeType } from "../theme";
2
2
  declare const ModalHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
3
  hasCloseButton?: boolean;
4
4
  theme?: DefaultNDSThemeType;
@@ -4,7 +4,7 @@ type ComponentVariantContextValue = {
4
4
  variant: ComponentVariant;
5
5
  children?: React.ReactNode;
6
6
  };
7
- export default function ComponentVariantContextProvider({ variant, children }: ComponentVariantContextValue): React.JSX.Element;
8
7
  export declare const ComponentVariantContext: React.Context<ComponentVariantContextValue>;
8
+ export default function ComponentVariantContextProvider({ variant, children }: ComponentVariantContextValue): React.JSX.Element;
9
9
  export declare function useComponentVariant(selectedVariant?: ComponentVariant): ComponentVariant;
10
10
  export {};
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface FeatureFlags {
3
+ experimentalDesktopTypographyScale?: boolean;
4
+ }
5
+ export interface FeatureFlagsContextValue {
6
+ featureFlags: FeatureFlags;
7
+ children?: React.ReactNode;
8
+ }
9
+ export declare const FeatureFlagsContext: React.Context<FeatureFlagsContextValue>;
10
+ export default function FeatureFlagsProvider({ featureFlags, children }: FeatureFlagsContextValue): React.JSX.Element;
11
+ export declare function useFeatureFlags(): FeatureFlags;
@@ -1,4 +1,4 @@
1
- import { DefaultNDSThemeType } from "../theme.type";
1
+ import { DefaultNDSThemeType } from "../theme";
2
2
  export type GlobalStylesProps = {
3
3
  theme?: DefaultNDSThemeType;
4
4
  locale?: string;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { DefaultNDSThemeType } from "../theme.type";
2
+ import { DefaultNDSThemeType } from "../theme";
3
3
  type GlobalStylesComposerProps = {
4
4
  theme?: DefaultNDSThemeType;
5
5
  locale?: string;
@@ -1,12 +1,14 @@
1
1
  import React from "react";
2
- import { ThemeType } from "../theme.type";
2
+ import { ThemeType } from "../theme";
3
3
  import { ComponentVariant } from "./ComponentVariantContext";
4
+ import { FeatureFlags } from "./FeatureFlagsContext";
4
5
  type NDSProviderProps = {
5
6
  theme?: ThemeType;
6
7
  locale?: string;
7
8
  disableGlobalStyles?: boolean;
8
9
  children?: React.ReactNode;
9
10
  variant?: ComponentVariant;
11
+ featureFlags?: FeatureFlags;
10
12
  };
11
- declare function NDSProvider({ theme: customTheme, children, disableGlobalStyles, locale, variant, }: NDSProviderProps): React.JSX.Element;
13
+ declare function NDSProvider({ theme: customTheme, children, disableGlobalStyles, locale, variant, featureFlags, }: NDSProviderProps): React.JSX.Element;
12
14
  export default NDSProvider;
@@ -1,7 +1,7 @@
1
1
  import type { CSSObject } from "styled-components";
2
2
  import type { GroupBase, MenuPlacement, StylesConfig } from "react-select";
3
3
  import type { CSSProperties } from "react";
4
- import type { DefaultNDSThemeType } from "../theme.type";
4
+ import type { DefaultNDSThemeType } from "../theme";
5
5
  import type { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
6
6
  type Placement = "top" | "bottom";
7
7
  export declare function getControlBorderRadius({ border, isMenuOpen, menuLength, menuPlacement, theme, }: {
@@ -20,7 +20,7 @@ export declare function getMenuBorderRadius({ border, menuPlacement, theme, }: {
20
20
  style: CSSProperties["borderBottomStyle"];
21
21
  };
22
22
  type VariantConfig = {
23
- [key in ComponentVariant]: CSSObject;
23
+ [key in ComponentVariant]?: CSSObject;
24
24
  };
25
25
  export declare function stylesForVariant(config: VariantConfig, variant?: ComponentVariant): CSSObject;
26
26
  export declare function showIndicatorSeparator({ hasValue, isClearable, isMulti }: {
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
- import { DefaultNDSThemeType } from "../theme.type";
3
+ import { DefaultNDSThemeType } from "../theme";
4
4
  import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
5
5
  export type StyledTextareaProps = React.ComponentPropsWithRef<"textarea"> & SpaceProps & {
6
6
  variant?: ComponentVariant;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
3
  import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
4
- import { DefaultNDSThemeType } from "../theme.type";
4
+ import { DefaultNDSThemeType } from "../theme";
5
5
  declare const ToggleComponent: React.ForwardRefExoticComponent<SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
6
6
  onChange?: (...args: any[]) => any;
7
7
  variant?: ComponentVariant;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { DefaultNDSThemeType } from "../theme.type";
2
+ import { DefaultNDSThemeType } from "../theme";
3
3
  type ToggleButtonProps = React.ComponentPropsWithRef<"input"> & {
4
4
  defaultToggled?: boolean;
5
5
  toggled?: boolean;
@@ -64,3 +64,4 @@ export declare const OpenByDefault: {
64
64
  };
65
65
  };
66
66
  export declare const WithCustomComponent: () => React.JSX.Element;
67
+ export declare const WithRef: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { PositionProps } from "styled-system";
2
- import { DefaultNDSThemeType } from "../theme.type";
2
+ import { DefaultNDSThemeType } from "../theme";
3
3
  declare const TooltipContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Box").BoxProps & PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
4
4
  theme?: DefaultNDSThemeType;
5
5
  dataPlacement?: "top" | "bottom" | "left" | "right";
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { BackLink } from "./components/BackLink";
3
+ import { Menu } from "./components/Menu";
4
+ import { MenuItem } from "./components/MenuItem";
5
+ import { PageTitle } from "./components/PageTitle";
6
+ export interface TopBarProps {
7
+ children?: React.ReactNode;
8
+ }
9
+ export default function Root({ children }: TopBarProps): React.JSX.Element;
10
+ export declare const TopBar: {
11
+ Root: typeof Root;
12
+ PageTitle: typeof PageTitle;
13
+ BackLink: typeof BackLink;
14
+ Menu: typeof Menu;
15
+ MenuItem: typeof MenuItem;
16
+ };
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { StyledProps } from "../StyledProps";
3
+ declare const MenuItemList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
4
+ declare const Header: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {}, never>;
5
+ declare const Navigation: import("styled-components").StyledComponent<"nav", import("styled-components").DefaultTheme, {}, never>;
6
+ declare const StylelessButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, StyledProps, never>;
7
+ declare const MenuButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, StyledProps, never>;
8
+ declare const NavigationItemsList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
9
+ declare const StyledBackLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
10
+ declare const StyledPageTitle: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
11
+ declare const Overlay: import("styled-components").StyledComponent<import("framer-motion").CustomDomComponent<import("@reach/utils/dist/declarations/src/polymorphic").Merge<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
12
+ ref?: import("react").Ref<HTMLDivElement>;
13
+ }, import("@reach/dialog/dist/declarations/src").DialogOverlayProps & {
14
+ as?: "div";
15
+ }>>, import("styled-components").DefaultTheme, {}, never>;
16
+ declare const TileLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
17
+ declare const StyledMenuItem: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLLIElement, import("framer-motion").HTMLMotionProps<"li">>, import("styled-components").DefaultTheme, {}, never>;
18
+ export { Navigation, Header, NavigationItemsList, StyledBackLink, StyledPageTitle, Overlay, TileLink, StylelessButton, MenuItemList, MenuButton, StyledMenuItem, };
@@ -0,0 +1,7 @@
1
+ import React, { ComponentProps } from "react";
2
+ import { MaxWidthProps } from "styled-system";
3
+ import { StyledBackLink } from "../TopBar.styled";
4
+ interface BackLinkProps extends MaxWidthProps, ComponentProps<typeof StyledBackLink> {
5
+ }
6
+ export declare function BackLink({ children, maxWidth, ...props }: BackLinkProps): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export declare function Menu({ children, defaultOpened, ...props }: {
3
+ defaultOpened?: boolean;
4
+ children: React.ReactNode;
5
+ "aria-label"?: string;
6
+ }): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { IconName } from "@nulogy/icons";
2
+ import React, { ComponentProps } from "react";
3
+ import { TileLink } from "../TopBar.styled";
4
+ interface MenuItemProps extends ComponentProps<typeof TileLink> {
5
+ title: string;
6
+ description?: string;
7
+ icon: IconName;
8
+ }
9
+ export declare function MenuItem({ description, title, icon, ...props }: MenuItemProps): React.JSX.Element;
10
+ export type MenuItems = MenuItemProps[];
11
+ export {};
@@ -0,0 +1,3 @@
1
+ import React, { ComponentProps } from "react";
2
+ import { StyledPageTitle } from "../TopBar.styled";
3
+ export declare function PageTitle({ children, ...props }: ComponentProps<typeof StyledPageTitle>): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const TOPBAR: {
2
+ themedHeight: string;
3
+ };
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ declare const _default: {
3
+ parameters: {
4
+ layout: string;
5
+ chromatic: {
6
+ modes: {
7
+ locale: string;
8
+ desktopScale: string;
9
+ theme: string;
10
+ viewports: number[];
11
+ };
12
+ };
13
+ };
14
+ title: string;
15
+ };
16
+ export default _default;
17
+ export declare const WithNoLabel: () => React.JSX.Element;
18
+ export declare const WithACustomMaxWidth: () => React.JSX.Element;
19
+ export declare const WithARouterLink: () => React.JSX.Element;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ declare const _default: {
3
+ parameters: {
4
+ layout: string;
5
+ chromatic: {
6
+ delay: number;
7
+ modes: {
8
+ locale: string;
9
+ desktopScale: string;
10
+ theme: string;
11
+ viewports: number[];
12
+ };
13
+ };
14
+ };
15
+ title: string;
16
+ };
17
+ export default _default;
18
+ export declare const withDefaultOpenMenu: () => React.JSX.Element;
19
+ export declare const WithOneMenuItem: () => React.JSX.Element;
20
+ export declare const WithTwoItems: () => React.JSX.Element;
21
+ export declare const WithThreeItems: () => React.JSX.Element;
22
+ export declare const WithRouterLinks: () => React.JSX.Element;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ declare const _default: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ chromatic: {
7
+ modes: {
8
+ locale: string;
9
+ desktopScale: string;
10
+ theme: string;
11
+ viewports: number[];
12
+ };
13
+ };
14
+ };
15
+ };
16
+ export default _default;
17
+ export declare const Default: () => React.JSX.Element;
18
+ export declare const WithALongTitle: () => React.JSX.Element;
19
+ export declare const WithAnApplicationFrame: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { MenuItems } from "../components/MenuItem";
2
+ export declare const menuItems: MenuItems;
@@ -1,2 +1,4 @@
1
- declare function useMediaQuery(query: string): boolean;
1
+ import { Breakpoints } from "../../theme";
2
+ type Query = keyof Breakpoints | (string & {});
3
+ declare function useMediaQuery(q: Query): boolean;
2
4
  export default useMediaQuery;
@@ -2,6 +2,8 @@ export { Alert, NotificationTypes } from "./Alert";
2
2
  export type { NotificationType } from "./Alert";
3
3
  export { AsyncSelect } from "./AsyncSelect";
4
4
  export { Banner } from "./Banner";
5
+ export { BottomSheet, BottomSheetParts } from "./BottomSheet";
6
+ export type { BottomSheetProps } from "./BottomSheet";
5
7
  export { AnimatedBox, Box } from "./Box";
6
8
  export { BrandedNavBar, BrandLogoContainer, DesktopMenu, EnvironmentBanner, MenuTrigger, NavBarBackground, SmallNavBar, } from "./BrandedNavBar";
7
9
  export type { BrandLogoContainerProps, DesktopMenuProps, EnvironmentBannerProps, MenuTriggerProps, NavBarBackgroundProps, RenderMenuButtonProps, SmallNavBarProps, } from "./BrandedNavBar";
@@ -18,6 +20,7 @@ export { DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText
18
20
  export { FieldLabel, HelpText, RequirementText } from "./FieldLabel";
19
21
  export { Flex } from "./Flex";
20
22
  export { Field, Fieldset, Form, FormSection } from "./Form";
23
+ export { default as useMediaQuery } from "./hooks/useMediaQuery";
21
24
  export { Icon, InlineIcon } from "./Icon";
22
25
  export { Input } from "./Input";
23
26
  export { ApplicationFrame, Header, Page, Sidebar } from "./Layout";
@@ -43,11 +46,11 @@ export { Table } from "./Table";
43
46
  export type { TableCellInfoType, TableColumnType, TableProps, TableRowType } from "./Table";
44
47
  export { Tab, Tabs } from "./Tabs";
45
48
  export { Textarea } from "./Textarea";
46
- export type { ThemeType, DefaultNDSThemeType } from "./theme.type";
49
+ export type { DefaultNDSThemeType, ThemeType } from "./theme";
47
50
  export { TimePicker } from "./TimePicker";
48
51
  export { TimeRange } from "./TimeRange";
49
52
  export { Toast } from "./Toast";
50
- export { ToastContainer, toast } from "./ToastContainer";
53
+ export { toast, ToastContainer } from "./ToastContainer";
51
54
  export { Toggle } from "./Toggle";
52
55
  export { Tooltip } from "./Tooltip";
53
56
  export { TruncatedText } from "./TruncatedText";
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ export default function NDSThemeProvider({ customTheme, children }: {
3
+ customTheme: any;
4
+ children: any;
5
+ }): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { themes, phone, tablet, legacy as desktop } from "./theme";
2
+ export type { ThemeType, DefaultNDSThemeType, Breakpoints } from "./theme.type";
@@ -1,2 +1,2 @@
1
- import { DefaultNDSThemeType, ThemeType } from "../theme.type";
1
+ import { DefaultNDSThemeType, ThemeType } from "./theme.type";
2
2
  export declare const mergeThemes: (theme: DefaultNDSThemeType, customTheme: ThemeType) => DefaultNDSThemeType;
@@ -0,0 +1,5 @@
1
+ import { DefaultNDSThemeType } from "./theme.type";
2
+ type ThemeKey = "legacy" | "experimental" | "tablet" | "phone";
3
+ export declare const themes: Record<ThemeKey, DefaultNDSThemeType>;
4
+ export declare const legacy: DefaultNDSThemeType, experimental: DefaultNDSThemeType, tablet: DefaultNDSThemeType, phone: DefaultNDSThemeType;
5
+ export {};