@nulogy/components 11.0.0 → 11.1.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 +2432 -2316
- package/dist/main.module.js +2432 -2316
- package/dist/src/BottomSheet/BottomSheet.d.ts +23 -0
- package/dist/src/BottomSheet/BottomSheet.parts.d.ts +44 -0
- package/dist/src/BottomSheet/BottomSheet.styled.d.ts +38 -0
- package/dist/src/BottomSheet/BottomSheetProvider.d.ts +12 -0
- package/dist/src/BottomSheet/stories/BottomSheet.actions.story.d.ts +7 -0
- package/dist/src/BottomSheet/stories/BottomSheet.content.story.d.ts +7 -0
- package/dist/src/BottomSheet/stories/BottomSheet.features.story.d.ts +8 -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/Link/Link.d.ts +9 -1
- package/dist/src/Select/Select.story.d.ts +1 -0
- package/dist/src/StyledProps/index.d.ts +5 -1
- package/dist/src/utils/noop.d.ts +5 -0
- package/dist/src/utils/story/dashed.d.ts +9 -0
- package/dist/src/utils/story/placeholder.d.ts +7 -0
- package/package.json +2 -1
- package/dist/src/utils/DeprecatedComponent.d.ts +0 -2
- package/dist/src/utils/conditionallyRequiredProp.d.ts +0 -1
- package/dist/src/utils/dashed.d.ts +0 -9
- package/dist/src/utils/deprecatedProp.d.ts +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { WidthProps } from "styled-system";
|
|
3
|
+
interface Props {
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
"aria-label"?: string;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
title?: string;
|
|
8
|
+
helpText?: React.ReactNode;
|
|
9
|
+
closeButtonLabel?: string;
|
|
10
|
+
hideCloseButton?: boolean;
|
|
11
|
+
secondaryAction?: (props: {
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
}) => React.ReactElement;
|
|
14
|
+
primaryAction?: (props: {
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
}) => React.ReactElement;
|
|
17
|
+
disableCloseOnOverlayClick?: boolean;
|
|
18
|
+
sheetWidth?: WidthProps["width"];
|
|
19
|
+
contentWidth?: WidthProps["width"];
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export default function BottomSheet({ title, helpText, closeButtonLabel, secondaryAction, primaryAction, isOpen, onClose, sheetWidth, contentWidth, disableCloseOnOverlayClick, hideCloseButton, children, ...props }: Props): React.JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DialogContentProps, DialogOverlayProps } from "@reach/dialog";
|
|
2
|
+
import { AnimatePresenceProps } from "framer-motion";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { HeightProps, LayoutProps, MaxHeightProps, MaxWidthProps, SpaceProps, WidthProps } from "styled-system";
|
|
5
|
+
interface RootProps extends AnimatePresenceProps {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function Root({ isOpen, onClose, children, ...props }: RootProps): React.JSX.Element;
|
|
11
|
+
interface OverlayPartProps extends DialogOverlayProps {
|
|
12
|
+
closeOnClick?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare function OverlayPart({ closeOnClick, children, ...props }: OverlayPartProps): React.JSX.Element;
|
|
15
|
+
interface SheetPartProps extends DialogContentProps, WidthProps, MaxWidthProps, HeightProps, MaxHeightProps, SpaceProps, LayoutProps {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
"aria-label": string;
|
|
18
|
+
}
|
|
19
|
+
declare function SheetPart({ children, ...props }: SheetPartProps): React.JSX.Element;
|
|
20
|
+
export declare const BottomSheetParts: {
|
|
21
|
+
Root: typeof Root;
|
|
22
|
+
Overlay: typeof OverlayPart;
|
|
23
|
+
Sheet: typeof SheetPart;
|
|
24
|
+
ContentContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
25
|
+
Header: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
26
|
+
Title: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, React.HTMLAttributes<HTMLParagraphElement> & {
|
|
27
|
+
variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
|
|
28
|
+
inline?: boolean;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
|
|
31
|
+
fontSize?: string;
|
|
32
|
+
} & import("..").StyledProps & {
|
|
33
|
+
as: string;
|
|
34
|
+
}, "as">;
|
|
35
|
+
HelpText: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, React.HTMLAttributes<HTMLParagraphElement> & {
|
|
36
|
+
variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
|
|
37
|
+
inline?: boolean;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
|
|
40
|
+
fontSize?: string;
|
|
41
|
+
} & import("..").StyledProps, never>;
|
|
42
|
+
Footer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DialogContentProps } from "@reach/dialog";
|
|
3
|
+
import type { AnimationProps } from "framer-motion";
|
|
4
|
+
import type { HeightProps, LayoutProps, MaxHeightProps, MaxWidthProps, SpaceProps, WidthProps } from "styled-system";
|
|
5
|
+
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"> & {
|
|
6
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
7
|
+
}, import("@reach/dialog/dist/declarations/src").DialogOverlayProps & {
|
|
8
|
+
as?: "div";
|
|
9
|
+
}>>, import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
interface SheetProps extends DialogContentProps, AnimationProps, WidthProps, MaxWidthProps, HeightProps, MaxHeightProps, SpaceProps, LayoutProps {
|
|
11
|
+
}
|
|
12
|
+
declare const Sheet: 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"> & {
|
|
13
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
14
|
+
}, DialogContentProps & {
|
|
15
|
+
as?: "div";
|
|
16
|
+
}>>, import("styled-components").DefaultTheme, {
|
|
17
|
+
[x: string]: {};
|
|
18
|
+
} & SheetProps, never>;
|
|
19
|
+
declare const ContentContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
+
declare const Footer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
21
|
+
declare const Header: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
22
|
+
declare const Title: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
23
|
+
variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
|
|
24
|
+
inline?: boolean;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
|
|
27
|
+
fontSize?: string;
|
|
28
|
+
} & import("../StyledProps").StyledProps & {
|
|
29
|
+
as: string;
|
|
30
|
+
}, "as">;
|
|
31
|
+
declare const HelpText: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, import("react").HTMLAttributes<HTMLParagraphElement> & {
|
|
32
|
+
variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
|
|
33
|
+
inline?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
|
|
36
|
+
fontSize?: string;
|
|
37
|
+
} & import("../StyledProps").StyledProps, never>;
|
|
38
|
+
export { Overlay, Sheet, ContentContainer, Footer, Header, Title, HelpText };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface BottomSheetContextType {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare function useBottomSheet(): BottomSheetContextType;
|
|
7
|
+
declare function BottomSheetProvider({ isOpen, onClose, children, }: {
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
export { BottomSheetProvider, useBottomSheet };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const WithCustomWidths: () => React.JSX.Element;
|
|
7
|
+
export declare const DisableCloseOnOverlayClick: () => React.JSX.Element;
|
|
8
|
+
export declare const AdvancedUsage: () => React.JSX.Element;
|
package/dist/src/Link/Link.d.ts
CHANGED
|
@@ -8,5 +8,13 @@ export type LinkProps = React.ComponentPropsWithRef<"a"> & Partial<StyledProps>
|
|
|
8
8
|
to?: string;
|
|
9
9
|
as?: React.ElementType | string;
|
|
10
10
|
};
|
|
11
|
-
declare const Link:
|
|
11
|
+
declare const Link: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
12
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
13
|
+
} & Partial<StyledProps> & {
|
|
14
|
+
underline?: boolean;
|
|
15
|
+
hover?: string;
|
|
16
|
+
variant?: ComponentVariant;
|
|
17
|
+
to?: string;
|
|
18
|
+
as?: React.ElementType | string;
|
|
19
|
+
}, never>;
|
|
12
20
|
export default Link;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { styleFn, variant as styledSystemVariant } from "styled-system";
|
|
1
2
|
import type { SpaceProps, PaddingProps, MarginProps, WidthProps, FontSizeProps, FontFamilyProps, TextAlignProps, LineHeightProps, FontWeightProps, FontStyleProps, LetterSpacingProps, DisplayProps, MaxWidthProps, MinWidthProps, HeightProps, MaxHeightProps, MinHeightProps, SizeProps, VerticalAlignProps, AlignItemsProps, AlignContentProps, JustifyItemsProps, JustifyContentProps, FlexWrapProps, FlexBasisProps, FlexDirectionProps, FlexProps, JustifySelfProps, AlignSelfProps, OrderProps, GridGapProps, GridColumnGapProps, GridRowGapProps, GridColumnProps, GridRowProps, GridAutoFlowProps, GridAutoColumnsProps, GridAutoRowsProps, GridTemplateColumnsProps, GridTemplateRowsProps, GridTemplateAreasProps, GridAreaProps, BorderProps, BorderTopProps, BorderRightProps, BorderBottomProps, BorderLeftProps, BordersProps, BorderColorProps, BorderRadiusProps, BoxShadowProps, OpacityProps, OverflowProps, BackgroundProps, BackgroundImageProps, BackgroundPositionProps, BackgroundRepeatProps, BackgroundSizeProps, PositionProps, ZIndexProps, TopProps, RightProps, BottomProps, LeftProps, TextStyleProps, ColorStyleProps, ButtonStyleProps, FlexboxProps, GridProps, BackgroundColorProps, FlexGrowProps, TypographyProps, LayoutProps } from "styled-system";
|
|
2
3
|
import { CSSProperties } from "react";
|
|
3
|
-
export declare
|
|
4
|
+
export declare function getStyledPropNames(...styleFns: styleFn[]): string[];
|
|
5
|
+
export declare const excludeStyledProps: (...styleFns: styleFn[]) => (prop: string | number) => boolean;
|
|
6
|
+
export declare const variant: typeof styledSystemVariant;
|
|
7
|
+
export declare const addStyledProps: styleFn;
|
|
4
8
|
interface TransitionProps {
|
|
5
9
|
transition?: CSSProperties["transition"];
|
|
6
10
|
transitionDelay?: CSSProperties["transitionDelay"];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StyledComponent } from "styled-components";
|
|
2
|
+
import { ComponentType } from "react";
|
|
3
|
+
import { DefaultNDSThemeType } from "../../theme.type";
|
|
4
|
+
/**
|
|
5
|
+
* A styled utility that adds a dashed border around a component
|
|
6
|
+
* to highlight its boundaries. To be used in Storybook exclusively.
|
|
7
|
+
* Do not export for production.
|
|
8
|
+
*/
|
|
9
|
+
export declare const dashed: <P extends object>(component: ComponentType<P>) => StyledComponent<ComponentType<P>, DefaultNDSThemeType, {}, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BoxProps } from "../../Box";
|
|
3
|
+
/**
|
|
4
|
+
* A dialognaly striped and bordered rectangle that can be used as a placeholder for content.
|
|
5
|
+
* To be used in Storybook exclusively. Do not export for production.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Placeholder(props: BoxProps): React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulogy/components",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -145,6 +145,7 @@
|
|
|
145
145
|
"dependencies": {
|
|
146
146
|
"@babel/runtime": "^7.9.6",
|
|
147
147
|
"@nulogy/tokens": "^5.4.0",
|
|
148
|
+
"@reach/dialog": "0.17.0",
|
|
148
149
|
"@styled-system/prop-types": "^5.1.4",
|
|
149
150
|
"@styled-system/theme-get": "^5.1.2",
|
|
150
151
|
"@types/styled-system": "5.1.22",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function conditionallyRequiredProp(propType: any, dependsOnPropName: any): (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { StyledComponent } from "styled-components";
|
|
2
|
-
import { ComponentType } from "react";
|
|
3
|
-
import { DefaultNDSThemeType } from "../theme.type";
|
|
4
|
-
/**
|
|
5
|
-
* A styled utility that adds a dashed border around a component
|
|
6
|
-
* to highlight its boundaries. To be used in Storybook exclusively.
|
|
7
|
-
*/
|
|
8
|
-
declare const dashed: <P extends object>(component: ComponentType<P>) => StyledComponent<ComponentType<P>, DefaultNDSThemeType, {}, never>;
|
|
9
|
-
export default dashed;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function deprecatedProp(propType: any, newPropName: any): (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|