@nulogy/components 11.1.0 → 11.2.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.
- package/dist/main.js +4469 -1016
- package/dist/main.module.js +4515 -1064
- package/dist/src/BottomSheet/BottomSheet.d.ts +1 -2
- package/dist/src/BottomSheet/BottomSheet.parts.d.ts +2 -2
- package/dist/src/BottomSheet/BottomSheet.styled.d.ts +2 -2
- package/dist/src/BottomSheet/index.d.ts +3 -0
- package/dist/src/BottomSheet/stories/BottomSheet.actions.story.d.ts +6 -0
- package/dist/src/BottomSheet/stories/BottomSheet.content.story.d.ts +6 -0
- package/dist/src/BottomSheet/stories/BottomSheet.features.story.d.ts +6 -0
- package/dist/src/BottomSheet/stories/BottomSheet.parts.story.d.ts +6 -0
- package/dist/src/BottomSheet/stories/BottomSheet.story.d.ts +6 -0
- package/dist/src/BrandedNavBar/NavBarBackground.d.ts +1 -1
- package/dist/src/Button/Button.d.ts +3 -2
- package/dist/src/Button/ControlIcon.d.ts +2 -1
- package/dist/src/Button/IconicButton.d.ts +2 -1
- package/dist/src/Checkbox/Checkbox.d.ts +1 -1
- package/dist/src/DatePicker/DatePickerStyles.d.ts +1 -1
- package/dist/src/Divider/Divider.d.ts +4 -1
- package/dist/src/Divider/Divider.story.d.ts +2 -1
- package/dist/src/DropdownMenu/DropdownButton.d.ts +1 -1
- package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +1 -1
- package/dist/src/FieldLabel/FramedIcon.d.ts +2 -1
- package/dist/src/Icon/Icon.d.ts +2 -1
- package/dist/src/Input/InputField.d.ts +3 -2
- package/dist/src/Modal/ModalContent.d.ts +1 -1
- package/dist/src/Modal/ModalHeader.d.ts +1 -1
- package/dist/src/NDSProvider/ComponentVariantContext.d.ts +1 -1
- package/dist/src/NDSProvider/FeatureFlagsContext.d.ts +11 -0
- package/dist/src/NDSProvider/GlobalStyles.d.ts +1 -1
- package/dist/src/NDSProvider/GlobalStylesComposer.d.ts +1 -1
- package/dist/src/NDSProvider/NDSProvider.d.ts +4 -2
- package/dist/src/Select/customReactSelectStyles.d.ts +2 -2
- package/dist/src/Textarea/StyledTextarea.d.ts +1 -1
- package/dist/src/Toggle/Toggle.d.ts +1 -1
- package/dist/src/Toggle/ToggleButton.d.ts +1 -1
- package/dist/src/Tooltip/Tooltip.story.d.ts +1 -0
- package/dist/src/Tooltip/TooltipContainer.d.ts +1 -1
- package/dist/src/index.d.ts +4 -2
- package/dist/src/theme/NDSThemeProvider.d.ts +5 -0
- package/dist/src/theme/index.d.ts +2 -0
- package/dist/src/{NDSProvider → theme}/mergeThemes.util.d.ts +1 -1
- package/dist/src/theme/theme.d.ts +5 -0
- package/dist/src/{theme.type.d.ts → theme/theme.type.d.ts} +10 -2
- package/dist/src/{NDSProvider → theme}/useNDSTheme.d.ts +4 -3
- package/dist/src/utils/story/dashed.d.ts +1 -1
- package/package.json +5 -4
- package/dist/src/VisualTests/KitchenSink.story.d.ts +0 -6
- 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?: "
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
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 };
|
|
@@ -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,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
|
|
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?:
|
|
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:
|
|
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?:
|
|
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
|
|
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
|
|
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
|
-
|
|
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<"
|
|
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
|
|
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,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:
|
|
5
|
+
icon: IconName | "loading";
|
|
5
6
|
focusable?: boolean;
|
|
6
7
|
maxWidth?: string;
|
|
7
8
|
tooltip?: string | ReactElement;
|
package/dist/src/Icon/Icon.d.ts
CHANGED
|
@@ -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?:
|
|
8
|
-
iconLeft?:
|
|
8
|
+
iconRight?: IconName | "loading";
|
|
9
|
+
iconLeft?: IconName | "loading";
|
|
9
10
|
iconRightSize?: string;
|
|
10
11
|
iconLeftSize?: string;
|
|
11
12
|
error?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultNDSThemeType } from "../theme
|
|
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,12 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ThemeType } from "../theme
|
|
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
|
|
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]
|
|
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
|
|
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
|
|
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 { PositionProps } from "styled-system";
|
|
2
|
-
import { DefaultNDSThemeType } from "../theme
|
|
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";
|
package/dist/src/index.d.ts
CHANGED
|
@@ -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";
|
|
@@ -43,11 +45,11 @@ export { Table } from "./Table";
|
|
|
43
45
|
export type { TableCellInfoType, TableColumnType, TableProps, TableRowType } from "./Table";
|
|
44
46
|
export { Tab, Tabs } from "./Tabs";
|
|
45
47
|
export { Textarea } from "./Textarea";
|
|
46
|
-
export type {
|
|
48
|
+
export type { DefaultNDSThemeType, ThemeType } from "./theme";
|
|
47
49
|
export { TimePicker } from "./TimePicker";
|
|
48
50
|
export { TimeRange } from "./TimeRange";
|
|
49
51
|
export { Toast } from "./Toast";
|
|
50
|
-
export {
|
|
52
|
+
export { toast, ToastContainer } from "./ToastContainer";
|
|
51
53
|
export { Toggle } from "./Toggle";
|
|
52
54
|
export { Tooltip } from "./Tooltip";
|
|
53
55
|
export { TruncatedText } from "./TruncatedText";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DefaultNDSThemeType, ThemeType } from "
|
|
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 {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RecursivePartial } from "
|
|
1
|
+
import { RecursivePartial } from "../utils/ts/recursivePartial";
|
|
2
2
|
interface Colors {
|
|
3
3
|
black: string;
|
|
4
4
|
blackBlue: string;
|
|
@@ -28,6 +28,7 @@ interface FontSizes {
|
|
|
28
28
|
smaller: string;
|
|
29
29
|
small: string;
|
|
30
30
|
medium: string;
|
|
31
|
+
base: string;
|
|
31
32
|
large: string;
|
|
32
33
|
larger: string;
|
|
33
34
|
largest: string;
|
|
@@ -35,6 +36,13 @@ interface FontSizes {
|
|
|
35
36
|
heading2: string;
|
|
36
37
|
heading3: string;
|
|
37
38
|
heading4: string;
|
|
39
|
+
xxs: string;
|
|
40
|
+
xs: string;
|
|
41
|
+
sm: string;
|
|
42
|
+
md: string;
|
|
43
|
+
lg: string;
|
|
44
|
+
xl: string;
|
|
45
|
+
xxl: string;
|
|
38
46
|
}
|
|
39
47
|
interface LineHeights {
|
|
40
48
|
base: string;
|
|
@@ -96,7 +104,7 @@ interface Radii {
|
|
|
96
104
|
medium: string;
|
|
97
105
|
large: string;
|
|
98
106
|
circle: string;
|
|
99
|
-
|
|
107
|
+
pill: string;
|
|
100
108
|
}
|
|
101
109
|
export interface Breakpoints {
|
|
102
110
|
extraSmall: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
2
|
+
import { FeatureFlags } from "../NDSProvider/FeatureFlagsContext";
|
|
3
|
+
import { Breakpoints, DefaultNDSThemeType, ThemeType } from "./theme.type";
|
|
3
4
|
export declare const buildBreakPoints: (breakpointsConfig: Readonly<Breakpoints>) => {
|
|
4
5
|
map: <T>(fn: (value: string) => T) => T[];
|
|
5
6
|
extraSmall: string;
|
|
@@ -8,5 +9,5 @@ export declare const buildBreakPoints: (breakpointsConfig: Readonly<Breakpoints>
|
|
|
8
9
|
large: string;
|
|
9
10
|
extraLarge: string;
|
|
10
11
|
};
|
|
11
|
-
export declare const getThemeByVariant: (variant: ComponentVariant, isTabletSize: boolean) => DefaultNDSThemeType;
|
|
12
|
+
export declare const getThemeByVariant: (variant: ComponentVariant, isTabletSize: boolean, featureFlags: FeatureFlags) => DefaultNDSThemeType;
|
|
12
13
|
export declare function useNDSTheme(variant?: ComponentVariant, customTheme?: ThemeType): DefaultNDSThemeType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyledComponent } from "styled-components";
|
|
2
2
|
import { ComponentType } from "react";
|
|
3
|
-
import { DefaultNDSThemeType } from "../../theme
|
|
3
|
+
import { DefaultNDSThemeType } from "../../theme";
|
|
4
4
|
/**
|
|
5
5
|
* A styled utility that adds a dashed border around a component
|
|
6
6
|
* to highlight its boundaries. To be used in Storybook exclusively.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulogy/components",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"ci": "yarn && yarn build && yarn test && yarn run check",
|
|
11
11
|
"new": "plop",
|
|
12
|
-
"generate:theme": "npx tsx src/scripts/generateTheme.ts && prettier -w src/theme.ts",
|
|
12
|
+
"generate:theme": "npx tsx src/scripts/generateTheme.ts && prettier -w src/theme/theme.ts",
|
|
13
13
|
"start": "concurrently \"yarn build --watch\" \"yarn start:storybook\"",
|
|
14
14
|
"start:cypress": "yarn concurrently --kill-others \"yarn start --ci\" \"yarn wait-on http://localhost:9999 && cypress open\"",
|
|
15
15
|
"start:storybook": "start-storybook -p 9999",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@babel/preset-env": "7.3.1",
|
|
69
69
|
"@babel/preset-typescript": "^7.10.4",
|
|
70
70
|
"@nulogy/eslint-config-nulogy": "^1.0.0",
|
|
71
|
-
"@nulogy/icons": "4.
|
|
71
|
+
"@nulogy/icons": "^4.36.0",
|
|
72
72
|
"@rollup/plugin-babel": "^5.0.0",
|
|
73
73
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
74
74
|
"@semantic-release/changelog": "^6.0.2",
|
|
@@ -82,7 +82,8 @@
|
|
|
82
82
|
"@storybook/addon-docs": "6.1.9",
|
|
83
83
|
"@storybook/addon-knobs": "^6.1.9",
|
|
84
84
|
"@storybook/addon-storysource": "^6.1.9",
|
|
85
|
-
"@storybook/addon-
|
|
85
|
+
"@storybook/addon-toolbars": "^6.1.9",
|
|
86
|
+
"@storybook/addon-viewport": "^6.1.9",
|
|
86
87
|
"@storybook/codemod": "^6.1.9",
|
|
87
88
|
"@storybook/react": "^6.3.12",
|
|
88
89
|
"@storybook/theming": "^6.1.9",
|
package/dist/src/theme.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DefaultNDSThemeType } from "./theme.type";
|
|
2
|
-
type ThemeKey = "desktop" | "tablet" | "phone";
|
|
3
|
-
export declare const themes: Record<ThemeKey, DefaultNDSThemeType>;
|
|
4
|
-
export declare const desktop: DefaultNDSThemeType, tablet: DefaultNDSThemeType, phone: DefaultNDSThemeType;
|
|
5
|
-
export {};
|