@prismicio/editor-ui 0.1.0 → 0.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.
- package/README.md +9 -0
- package/dist/components/AnimatedList/AnimatedList.css.d.ts +8 -0
- package/dist/components/AnimatedList/AnimatedList.d.ts +11 -0
- package/dist/components/AnimatedList/AnimatedList.stories.d.ts +5 -0
- package/dist/components/AnimatedList/index.d.ts +1 -0
- package/dist/components/AppBackground.d.ts +2 -0
- package/dist/components/BaseInput/BaseInput.css.d.ts +1 -0
- package/dist/components/BaseInput/BaseInput.d.ts +11 -9
- package/dist/components/BaseInput/BaseInput.stories.d.ts +2 -28
- package/dist/components/BlankSlate/BlankSlate.d.ts +6 -7
- package/dist/components/Box/Box.d.ts +39 -0
- package/dist/components/Box/Box.stories.d.ts +5 -0
- package/dist/components/Box/index.d.ts +1 -0
- package/dist/components/Calendar/Calendar.css.d.ts +2 -0
- package/dist/components/Calendar/Calendar.d.ts +7 -0
- package/dist/components/Calendar/Calendar.stories.d.ts +12 -0
- package/dist/components/Calendar/CalendarCell.css.d.ts +6 -0
- package/dist/components/Calendar/CalendarCell.d.ts +8 -0
- package/dist/components/Calendar/CalendarGrid.css.d.ts +1 -0
- package/dist/components/Calendar/CalendarGrid.d.ts +7 -0
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +3 -4
- package/dist/components/Card/Card.stories.d.ts +2 -2
- package/dist/components/DateInput/DateInput.d.ts +11 -0
- package/dist/components/DateInput/DateInput.stories.d.ts +10 -0
- package/dist/components/DateInput/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.css.d.ts +0 -1
- package/dist/components/Dialog/Dialog.d.ts +9 -18
- package/dist/components/Dialog/Dialog.stories.d.ts +1 -0
- package/dist/components/{DialogOptions → Dialog/Options}/DialogOptions.d.ts +7 -7
- package/dist/components/Dialog/index.d.ts +2 -1
- package/dist/components/Field/Field.d.ts +4 -5
- package/dist/components/Field/Field.stories.d.ts +6 -4
- package/dist/components/Icon/Icon.css.d.ts +1 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.stories.d.ts +4 -4
- package/dist/components/Icon/iconNames.d.ts +1 -1
- package/dist/components/Link/Link.css.d.ts +1 -0
- package/dist/components/Link/Link.d.ts +7 -0
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/Masonry/MasonryMedia.css.d.ts +1 -0
- package/dist/components/Popover/LinkDescriptionPopover.css.d.ts +3 -0
- package/dist/components/Popover/LinkDescriptionPopover.d.ts +15 -0
- package/dist/components/Popover/Popover.css.d.ts +1 -0
- package/dist/components/Popover/Popover.d.ts +13 -0
- package/dist/components/Popover/Popover.stories.d.ts +6 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +18 -4
- package/dist/components/Select/Select.stories.d.ts +2 -16
- package/dist/components/Skeleton/Skeleton.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.stories.d.ts +4 -4
- package/dist/components/Text/Text.css.d.ts +3 -3
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.stories.d.ts +2 -2
- package/dist/components/TextInput/TextInput.d.ts +14 -11
- package/dist/components/TextInput/TextInput.stories.d.ts +2 -24
- package/dist/components/ThemeProvider.d.ts +2 -2
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +4 -4
- package/dist/index.d.ts +7 -2
- package/dist/index.es.js +9201 -5606
- package/dist/index.umd.js +97 -89
- package/dist/style.css +1 -1
- package/dist/theme/colors.d.ts +119 -0
- package/dist/theme/selectors.d.ts +48 -0
- package/dist/theme/sprinkles.css.d.ts +617 -506
- package/dist/theme/utils.d.ts +2 -0
- package/dist/theme/vars.css.d.ts +337 -337
- package/package.json +13 -17
- package/dist/components/DialogOptions/DialogOptions.stories.d.ts +0 -12
- package/dist/components/DialogOptions/index.d.ts +0 -1
- package/dist/components/List/List.css.d.ts +0 -2
- package/dist/components/List/List.d.ts +0 -8
- package/dist/components/List/index.d.ts +0 -1
- /package/dist/components/{DialogOptions → Dialog/Options}/DialogOptions.css.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# editor-ui
|
|
2
2
|
|
|
3
|
+
## radix-ui GOTCHAS
|
|
4
|
+
|
|
5
|
+
- When passing a React Node as children to a radix primitive that has the `asChild` prop, you must spread all unused props into that React Node, even if at the type level there doesn't seem to be any remaining props. This is because radix secretly set a lot of extra props on the React Node you gave it. For an example of this, see BaseInput's `otherProps`.
|
|
6
|
+
We favor using `asChild` to reduce the number of DOM nodes and make it easy to size children.
|
|
7
|
+
|
|
8
|
+
## vanilla-extract GOTCHAS
|
|
9
|
+
|
|
10
|
+
- You can not reference a parent selector that is made of ONLY `sprinkles` generated classNames. See Field.css.ts -> labelPosition to see a workaround: An empty object is passed to `styleVariant` which is equivalent to having an empty className generated with `style({})`.
|
|
11
|
+
|
|
3
12
|
## How to add a new SVG icon
|
|
4
13
|
|
|
5
14
|
1. Export the SVG icon from [Figma](https://www.figma.com/file/V5pub1BwPMJGY52YHmhTmX/Prismic---Design-System?node-id=46%3A2811). It should always be the variant with a viewbox of 24x24.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const container: string;
|
|
2
|
+
export declare const containerDirection: Record<"horizontal" | "vertical", string>;
|
|
3
|
+
export declare const item: string;
|
|
4
|
+
export declare const entering: string;
|
|
5
|
+
export declare const enteringDelay: string;
|
|
6
|
+
export declare const present: string;
|
|
7
|
+
export declare const exiting: string;
|
|
8
|
+
export declare const gaps: Record<"0px" | "4px" | "6px" | "10px" | "12px" | "2px" | "8px" | "16px" | "24px" | "48px", string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Key, ReactElement, ReactNode } from "react";
|
|
2
|
+
import * as styles from "./AnimatedList.css";
|
|
3
|
+
interface AnimatedListProps<ITEM> {
|
|
4
|
+
gap?: keyof typeof styles.gaps;
|
|
5
|
+
direction?: "horizontal" | "vertical";
|
|
6
|
+
items: readonly ITEM[];
|
|
7
|
+
getItemKey: (item: ITEM) => Key;
|
|
8
|
+
children: (item: ITEM, index: number) => ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function AnimatedList<ITEM>(props: AnimatedListProps<ITEM>): ReactElement;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
import { AnimatedList } from "./AnimatedList";
|
|
3
|
+
declare const _default: ComponentMeta<typeof AnimatedList>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: ComponentStoryFn<typeof AnimatedList>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AnimatedList } from "./AnimatedList";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const base: string;
|
|
2
2
|
export declare const root: string;
|
|
3
3
|
export declare const input: string;
|
|
4
|
+
export declare const inputColorVariant: Record<"normal" | "link", string>;
|
|
4
5
|
export declare const startAdornment: string;
|
|
5
6
|
export declare const endAdornment: string;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as styles from "./BaseInput.css";
|
|
3
|
+
export interface BaseInputProps {
|
|
3
4
|
autoComplete?: string;
|
|
4
5
|
className?: string;
|
|
5
|
-
endAdornment?: ReactNode;
|
|
6
6
|
id?: string;
|
|
7
7
|
inputMode?: "decimal" | "text";
|
|
8
8
|
name?: string;
|
|
9
|
-
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
10
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
9
|
placeholder?: string;
|
|
12
10
|
readOnly?: boolean;
|
|
13
11
|
startAdornment?: ReactNode;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
endAdornment?: ReactNode;
|
|
13
|
+
value: string;
|
|
14
|
+
variant?: keyof typeof styles.inputColorVariant;
|
|
15
|
+
onFocus?: () => void;
|
|
16
|
+
onBlur?: () => void;
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const BaseInput: import("react").ForwardRefExoticComponent<BaseInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,30 +1,4 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
-
declare const _default: ComponentMeta<import("react").
|
|
3
|
-
autoComplete?: string | undefined;
|
|
4
|
-
className?: string | undefined;
|
|
5
|
-
endAdornment?: import("react").ReactNode;
|
|
6
|
-
id?: string | undefined;
|
|
7
|
-
inputMode?: "text" | "decimal" | undefined;
|
|
8
|
-
name?: string | undefined;
|
|
9
|
-
onBlur?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
10
|
-
onChange?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
11
|
-
placeholder?: string | undefined;
|
|
12
|
-
readOnly?: boolean | undefined;
|
|
13
|
-
startAdornment?: import("react").ReactNode;
|
|
14
|
-
value?: string | undefined;
|
|
15
|
-
}>>>;
|
|
2
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<import("./BaseInput").BaseInputProps & import("react").RefAttributes<HTMLInputElement>>>;
|
|
16
3
|
export default _default;
|
|
17
|
-
export declare const Default: ComponentStoryFn<import("react").
|
|
18
|
-
autoComplete?: string | undefined;
|
|
19
|
-
className?: string | undefined;
|
|
20
|
-
endAdornment?: import("react").ReactNode;
|
|
21
|
-
id?: string | undefined;
|
|
22
|
-
inputMode?: "text" | "decimal" | undefined;
|
|
23
|
-
name?: string | undefined;
|
|
24
|
-
onBlur?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
25
|
-
onChange?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
26
|
-
placeholder?: string | undefined;
|
|
27
|
-
readOnly?: boolean | undefined;
|
|
28
|
-
startAdornment?: import("react").ReactNode;
|
|
29
|
-
value?: string | undefined;
|
|
30
|
-
}>>>;
|
|
4
|
+
export declare const Default: ComponentStoryFn<import("react").ForwardRefExoticComponent<import("./BaseInput").BaseInputProps & import("react").RefAttributes<HTMLInputElement>>>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CSSProperties, FC } from "react";
|
|
1
|
+
import type { CSSProperties, FC, PropsWithChildren } from "react";
|
|
3
2
|
import { type IconName } from "../Icon";
|
|
4
3
|
import * as styles from "./BlankSlate.css";
|
|
5
|
-
export interface BlankSlateProps extends
|
|
4
|
+
export interface BlankSlateProps extends PropsWithChildren {
|
|
6
5
|
style?: CSSProperties;
|
|
7
6
|
}
|
|
8
7
|
export declare const BlankSlate: FC<BlankSlateProps>;
|
|
@@ -10,11 +9,11 @@ declare type BlankSlateIconProps = Readonly<{
|
|
|
10
9
|
name: IconName;
|
|
11
10
|
}>;
|
|
12
11
|
export declare const BlankSlateIcon: FC<BlankSlateIconProps>;
|
|
13
|
-
export interface BlankSlateTitleProps extends
|
|
12
|
+
export interface BlankSlateTitleProps extends PropsWithChildren {
|
|
14
13
|
size?: keyof typeof styles.titleSizeVariant;
|
|
15
14
|
}
|
|
16
15
|
export declare const BlankSlateTitle: FC<BlankSlateTitleProps>;
|
|
17
|
-
export declare const BlankSlateDescription: FC<
|
|
18
|
-
export declare const BlankSlateImage: FC<
|
|
19
|
-
export declare const BlankSlateActions: FC<
|
|
16
|
+
export declare const BlankSlateDescription: FC<PropsWithChildren>;
|
|
17
|
+
export declare const BlankSlateImage: FC<PropsWithChildren>;
|
|
18
|
+
export declare const BlankSlateActions: FC<PropsWithChildren>;
|
|
20
19
|
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { type ThemeColor } from "../../theme/colors";
|
|
3
|
+
import { type Sprinkles } from "../../theme/sprinkles.css";
|
|
4
|
+
declare type Props = {
|
|
5
|
+
as?: "div" | "nav" | "ul" | "ol" | "article" | "header";
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
position?: "absolute" | "relative";
|
|
8
|
+
width?: Sprinkles["width"];
|
|
9
|
+
height?: Sprinkles["height"];
|
|
10
|
+
padding?: Padding;
|
|
11
|
+
border?: Border;
|
|
12
|
+
backgroundColor?: ThemeColor;
|
|
13
|
+
} & DisplayProps;
|
|
14
|
+
declare type DisplayProps = {
|
|
15
|
+
gap?: Sprinkles["gap"];
|
|
16
|
+
} & (GridDisplayProps | FlexDisplayProps);
|
|
17
|
+
declare type GridDisplayProps = {
|
|
18
|
+
display: "grid";
|
|
19
|
+
gridTemplateColumns?: string;
|
|
20
|
+
gridTemplateRows?: string;
|
|
21
|
+
};
|
|
22
|
+
declare type FlexDisplayProps = {
|
|
23
|
+
display?: "flex";
|
|
24
|
+
flexDirection?: "column" | "row";
|
|
25
|
+
};
|
|
26
|
+
declare type Padding = Sprinkles["padding"] | {
|
|
27
|
+
top?: Sprinkles["padding"];
|
|
28
|
+
bottom?: Sprinkles["padding"];
|
|
29
|
+
left?: Sprinkles["padding"];
|
|
30
|
+
right?: Sprinkles["padding"];
|
|
31
|
+
};
|
|
32
|
+
declare type Border = boolean | {
|
|
33
|
+
top?: boolean;
|
|
34
|
+
bottom?: boolean;
|
|
35
|
+
left?: boolean;
|
|
36
|
+
right?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare function Box(props: Props): ReactElement;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Box } from "./Box";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
declare const _default: ComponentMeta<(props: {
|
|
3
|
+
value: string;
|
|
4
|
+
onValueChange: (value: string) => void;
|
|
5
|
+
onFocusReady: (focus: () => void) => void;
|
|
6
|
+
}) => JSX.Element>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Default: ComponentStoryFn<(props: {
|
|
9
|
+
value: string;
|
|
10
|
+
onValueChange: (value: string) => void;
|
|
11
|
+
onFocusReady: (focus: () => void) => void;
|
|
12
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AriaCalendarCellProps } from "@react-aria/calendar";
|
|
2
|
+
import type { CalendarState } from "@react-stately/calendar";
|
|
3
|
+
declare type Props = {
|
|
4
|
+
state: CalendarState;
|
|
5
|
+
date: AriaCalendarCellProps["date"];
|
|
6
|
+
};
|
|
7
|
+
export declare const CalendarCell: ({ state, date }: Props) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const root: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AriaCalendarGridProps } from "@react-aria/calendar";
|
|
2
|
+
import type { CalendarState } from "@react-stately/calendar";
|
|
3
|
+
declare type Props = AriaCalendarGridProps & {
|
|
4
|
+
state: CalendarState;
|
|
5
|
+
};
|
|
6
|
+
export declare const CalendarGrid: ({ state, ...props }: Props) => JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Calendar } from "./Calendar";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CSSProperties, FC, ReactNode } from "react";
|
|
1
|
+
import type { CSSProperties, FC, PropsWithChildren, ReactNode } from "react";
|
|
3
2
|
import * as styles from "./Card.css";
|
|
4
3
|
declare type CardProps = Readonly<{
|
|
5
4
|
children?: ReactNode;
|
|
@@ -9,8 +8,8 @@ declare type CardProps = Readonly<{
|
|
|
9
8
|
variant?: keyof typeof styles.variant;
|
|
10
9
|
}>;
|
|
11
10
|
export declare const Card: FC<CardProps>;
|
|
12
|
-
export declare const CardHeader: FC<
|
|
13
|
-
export declare const CardHeaderTitle: FC<
|
|
11
|
+
export declare const CardHeader: FC<PropsWithChildren>;
|
|
12
|
+
export declare const CardHeaderTitle: FC<PropsWithChildren>;
|
|
14
13
|
declare type CardHeaderActionsProps = Readonly<{
|
|
15
14
|
children?: ReactNode;
|
|
16
15
|
style?: CSSProperties;
|
|
@@ -2,7 +2,7 @@ import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
|
2
2
|
declare const _default: ComponentMeta<import("react").FC<Readonly<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
4
|
className?: string | undefined;
|
|
5
|
-
color?: "
|
|
5
|
+
color?: "grey1" | "grey2" | "grey3" | undefined;
|
|
6
6
|
style?: import("react").CSSProperties | undefined;
|
|
7
7
|
variant?: "dashed" | "elevated" | "outlined" | undefined;
|
|
8
8
|
}>>>;
|
|
@@ -10,7 +10,7 @@ export default _default;
|
|
|
10
10
|
export declare const Default: ComponentStoryFn<import("react").FC<Readonly<{
|
|
11
11
|
children?: import("react").ReactNode;
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
color?: "
|
|
13
|
+
color?: "grey1" | "grey2" | "grey3" | undefined;
|
|
14
14
|
style?: import("react").CSSProperties | undefined;
|
|
15
15
|
variant?: "dashed" | "elevated" | "outlined" | undefined;
|
|
16
16
|
}>>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseInput } from "../BaseInput";
|
|
3
|
+
declare type Props = Pick<React.ComponentProps<typeof BaseInput>, "id" | "placeholder" | "readOnly" | "value"> & {
|
|
4
|
+
inField?: boolean;
|
|
5
|
+
onValueChange: (newValue?: string) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const DateInput: ({ id, placeholder, readOnly, value, onValueChange }: Props) => JSX.Element;
|
|
8
|
+
export declare const validDraft: (value: string) => string;
|
|
9
|
+
export declare const validDate: (draft: string) => string | null;
|
|
10
|
+
export declare const userDate: (validDate: string) => string | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
declare const _default: ComponentMeta<({ id, placeholder, readOnly, value, onValueChange }: Pick<import("../BaseInput/BaseInput").BaseInputProps & import("react").RefAttributes<HTMLInputElement>, "value" | "id" | "placeholder" | "readOnly"> & {
|
|
3
|
+
inField?: boolean | undefined;
|
|
4
|
+
onValueChange: (newValue?: string | undefined) => void;
|
|
5
|
+
}) => JSX.Element>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Default: ComponentStoryFn<({ id, placeholder, readOnly, value, onValueChange }: Pick<import("../BaseInput/BaseInput").BaseInputProps & import("react").RefAttributes<HTMLInputElement>, "value" | "id" | "placeholder" | "readOnly"> & {
|
|
8
|
+
inField?: boolean | undefined;
|
|
9
|
+
onValueChange: (newValue?: string | undefined) => void;
|
|
10
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DateInput } from "./DateInput";
|
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CSSProperties, FC, ReactNode } from "react";
|
|
1
|
+
import type { FC, PropsWithChildren, ReactNode } from "react";
|
|
3
2
|
import { type IconName } from "../Icon";
|
|
4
3
|
export interface DialogProps {
|
|
4
|
+
trigger?: ReactNode;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
open?: boolean;
|
|
7
7
|
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
onAnimationEnd?: () => void;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* A Dialog rendered in document.body.
|
|
11
|
-
* The first focusable
|
|
12
|
+
* The first focusable child will automatically be focused.
|
|
12
13
|
*/
|
|
13
14
|
export declare const Dialog: FC<DialogProps>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare const DialogHeader: FC<ChildrenProps>;
|
|
18
|
-
interface DialogHeaderIconProps {
|
|
19
|
-
name: IconName;
|
|
15
|
+
interface DialogHeaderProps {
|
|
16
|
+
icon: IconName;
|
|
17
|
+
title: string;
|
|
20
18
|
}
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const DialogMenu: FC<ChildrenProps>;
|
|
24
|
-
declare type DialogContentProps = Readonly<{
|
|
25
|
-
children?: ReactNode;
|
|
26
|
-
style?: CSSProperties;
|
|
27
|
-
}>;
|
|
28
|
-
export declare const DialogContent: FC<DialogContentProps>;
|
|
29
|
-
export declare const DialogTrigger: FC<ChildrenProps>;
|
|
19
|
+
export declare const DialogHeader: FC<DialogHeaderProps>;
|
|
20
|
+
export declare const DialogContent: FC<PropsWithChildren>;
|
|
30
21
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
export declare const DialogOptionsStory: ComponentStoryFn<({ value, onValueChange, children }: import("./Options/DialogOptions").DialogOptionsProps) => JSX.Element>;
|
|
2
3
|
declare const _default: ComponentMeta<import("react").FC<import("./Dialog").DialogProps>>;
|
|
3
4
|
export default _default;
|
|
4
5
|
export declare const Default: ComponentStoryFn<import("react").FC<import("./Dialog").DialogProps>>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import { IconName } from "
|
|
3
|
-
|
|
4
|
-
value
|
|
5
|
-
onValueChange
|
|
2
|
+
import { IconName } from "../../Icon";
|
|
3
|
+
export interface DialogOptionsProps {
|
|
4
|
+
value?: string;
|
|
5
|
+
onValueChange?: (newValue: string) => void;
|
|
6
6
|
children: ReactNode;
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
export declare const DialogOptions: ({ value, onValueChange, children }: DialogOptionsProps) => JSX.Element;
|
|
9
|
-
|
|
9
|
+
interface DialogOptionsItemProps {
|
|
10
10
|
value: string;
|
|
11
11
|
icon: IconName;
|
|
12
12
|
title: string;
|
|
13
13
|
subtitle: string;
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
export declare const DialogOptionsItem: ({ value, icon, title, subtitle }: DialogOptionsItemProps) => JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { Dialog,
|
|
1
|
+
export { Dialog, DialogContent, DialogHeader } from "./Dialog";
|
|
2
|
+
export { DialogOptions, DialogOptionsItem } from "./Options/DialogOptions";
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
2
|
import { type FC, type ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
declare type FieldProps = Readonly<{
|
|
3
|
+
export declare const Field: import("react").ForwardRefExoticComponent<Readonly<{
|
|
5
4
|
children?: ReactNode;
|
|
6
|
-
labelPosition?:
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
labelPosition?: "top" | "side" | undefined;
|
|
6
|
+
onMouseOverChange?: ((isMouseOver: boolean) => void) | undefined;
|
|
7
|
+
}> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
8
|
declare type FieldIconProps = Readonly<{
|
|
10
9
|
children?: ReactNode;
|
|
11
10
|
}>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
-
declare const _default: ComponentMeta<import("react").
|
|
2
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Readonly<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
4
|
labelPosition?: "top" | "side" | undefined;
|
|
5
|
-
|
|
5
|
+
onMouseOverChange?: ((isMouseOver: boolean) => void) | undefined;
|
|
6
|
+
}> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
7
|
export default _default;
|
|
7
|
-
export declare const Default: ComponentStoryFn<import("react").
|
|
8
|
+
export declare const Default: ComponentStoryFn<import("react").ForwardRefExoticComponent<Readonly<{
|
|
8
9
|
children?: import("react").ReactNode;
|
|
9
10
|
labelPosition?: "top" | "side" | undefined;
|
|
10
|
-
|
|
11
|
+
onMouseOverChange?: ((isMouseOver: boolean) => void) | undefined;
|
|
12
|
+
}> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -3,5 +3,5 @@ export declare const Icon: import("react").ForwardRefExoticComponent<Readonly<{
|
|
|
3
3
|
className?: string | undefined;
|
|
4
4
|
color?: "inherit" | "grey2" | "grey11" | undefined;
|
|
5
5
|
name: IconName;
|
|
6
|
-
size?: "medium" | "large" | "small" | undefined;
|
|
6
|
+
size?: "medium" | "large" | "small" | "xs" | undefined;
|
|
7
7
|
}> & import("react").RefAttributes<SVGSVGElement>>;
|
|
@@ -2,13 +2,13 @@ import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
|
2
2
|
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Readonly<{
|
|
3
3
|
className?: string | undefined;
|
|
4
4
|
color?: "inherit" | "grey2" | "grey11" | undefined;
|
|
5
|
-
name: "add" | "search" | "link" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "centerFocusWeak" | "check" | "close" | "cloudUpload" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "delete" | "desktopWindows" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "imageSearch" | "keyboardArrowDown" | "keyboardArrowUp" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "notes" | "phoneIphone" | "photo" | "pin" | "schedule" | "tabletMac" | "textFields" | "toggleOff" | "unfoldMore" | "viewDay" | "zoomOutMap";
|
|
6
|
-
size?: "medium" | "large" | "small" | undefined;
|
|
5
|
+
name: "add" | "search" | "link" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "calendarToday" | "centerFocusWeak" | "check" | "close" | "cloudUpload" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "dateRange" | "delete" | "desktopWindows" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "imageSearch" | "keyboardArrowDown" | "keyboardArrowUp" | "linkOff" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "notes" | "phoneIphone" | "photo" | "pin" | "public" | "schedule" | "tabletMac" | "textFields" | "toggleOff" | "unfoldMore" | "viewDay" | "zoomOutMap";
|
|
6
|
+
size?: "medium" | "large" | "small" | "xs" | undefined;
|
|
7
7
|
}> & import("react").RefAttributes<SVGSVGElement>>>;
|
|
8
8
|
export default _default;
|
|
9
9
|
export declare const Default: ComponentStoryFn<import("react").ForwardRefExoticComponent<Readonly<{
|
|
10
10
|
className?: string | undefined;
|
|
11
11
|
color?: "inherit" | "grey2" | "grey11" | undefined;
|
|
12
|
-
name: "add" | "search" | "link" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "centerFocusWeak" | "check" | "close" | "cloudUpload" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "delete" | "desktopWindows" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "imageSearch" | "keyboardArrowDown" | "keyboardArrowUp" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "notes" | "phoneIphone" | "photo" | "pin" | "schedule" | "tabletMac" | "textFields" | "toggleOff" | "unfoldMore" | "viewDay" | "zoomOutMap";
|
|
13
|
-
size?: "medium" | "large" | "small" | undefined;
|
|
12
|
+
name: "add" | "search" | "link" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "calendarToday" | "centerFocusWeak" | "check" | "close" | "cloudUpload" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "dateRange" | "delete" | "desktopWindows" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "imageSearch" | "keyboardArrowDown" | "keyboardArrowUp" | "linkOff" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "notes" | "phoneIphone" | "photo" | "pin" | "public" | "schedule" | "tabletMac" | "textFields" | "toggleOff" | "unfoldMore" | "viewDay" | "zoomOutMap";
|
|
13
|
+
size?: "medium" | "large" | "small" | "xs" | undefined;
|
|
14
14
|
}> & import("react").RefAttributes<SVGSVGElement>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const iconNames: readonly ["add", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "centerFocusWeak", "check", "close", "cloudUpload", "crop", "cropLandscape", "cropPortrait", "dataObject", "delete", "desktopWindows", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "imageSearch", "keyboardArrowDown", "keyboardArrowUp", "link", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "notes", "phoneIphone", "photo", "pin", "schedule", "search", "tabletMac", "textFields", "toggleOff", "unfoldMore", "viewDay", "zoomOutMap"];
|
|
1
|
+
export declare const iconNames: readonly ["add", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "calendarToday", "centerFocusWeak", "check", "close", "cloudUpload", "crop", "cropLandscape", "cropPortrait", "dataObject", "dateRange", "delete", "desktopWindows", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "imageSearch", "keyboardArrowDown", "keyboardArrowUp", "link", "linkOff", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "notes", "phoneIphone", "photo", "pin", "public", "schedule", "search", "tabletMac", "textFields", "toggleOff", "unfoldMore", "viewDay", "zoomOutMap"];
|
|
2
2
|
export declare type IconName = typeof iconNames[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const root: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Link } from "./Link";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import { PopoverProps } from "./Popover";
|
|
3
|
+
export interface LinkDescriptionPopoverProps {
|
|
4
|
+
url: URL | undefined;
|
|
5
|
+
title: string;
|
|
6
|
+
anchor: PopoverProps["anchor"];
|
|
7
|
+
align?: PopoverProps["align"];
|
|
8
|
+
sideOffset?: PopoverProps["sideOffset"];
|
|
9
|
+
open?: PopoverProps["open"];
|
|
10
|
+
openDelay?: PopoverProps["openDelay"];
|
|
11
|
+
closeDelay?: PopoverProps["closeDelay"];
|
|
12
|
+
onOpenChange?: PopoverProps["onOpenChange"];
|
|
13
|
+
onMouseOverChange?: PopoverProps["onMouseOverChange"];
|
|
14
|
+
}
|
|
15
|
+
export declare const LinkDescriptionPopover: FC<LinkDescriptionPopoverProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cardContent: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PopoverContentProps } from "@radix-ui/react-popover";
|
|
2
|
+
import type { FC, ReactNode } from "react";
|
|
3
|
+
export declare type PopoverProps = {
|
|
4
|
+
anchor: ReactNode;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
focusOnEnter?: boolean;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
openDelay?: number;
|
|
9
|
+
closeDelay?: number;
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
onMouseOverChange?: (isMouseOver: boolean) => void;
|
|
12
|
+
} & Pick<PopoverContentProps, "onInteractOutside" | "onEscapeKeyDown" | "align" | "sideOffset">;
|
|
13
|
+
export declare const Popover: FC<PopoverProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
import { LinkDescriptionPopover } from "./LinkDescriptionPopover";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").FC<import("./Popover").PopoverProps>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: ComponentStoryFn<import("react").FC<import("./Popover").PopoverProps>>;
|
|
6
|
+
export declare const LinkDescription: ComponentStoryFn<typeof LinkDescriptionPopover>;
|
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { SelectItemProps as RadixSelectItemProps, SelectProps as RadixSelectProps, SelectValueProps as RadixSelectValueProps } from "@radix-ui/react-select";
|
|
2
2
|
import { type FC, type ReactNode } from "react";
|
|
3
3
|
import type * as buttonStyles from "../Button/Button.css";
|
|
4
|
-
|
|
4
|
+
import { IconName } from "../Icon";
|
|
5
|
+
export interface SelectProps {
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
id?: string;
|
|
7
8
|
inField?: boolean;
|
|
8
9
|
size?: keyof typeof buttonStyles.size;
|
|
9
10
|
trigger?: ReactNode;
|
|
11
|
+
icon?: IconName;
|
|
10
12
|
variant?: keyof typeof buttonStyles.variant;
|
|
11
|
-
|
|
13
|
+
placeholder?: RadixSelectValueProps["placeholder"];
|
|
14
|
+
autoComplete?: RadixSelectProps["autoComplete"];
|
|
15
|
+
children?: RadixSelectProps["children"];
|
|
16
|
+
name?: RadixSelectProps["name"];
|
|
17
|
+
onValueChange?: RadixSelectProps["onValueChange"];
|
|
18
|
+
value?: RadixSelectProps["value"];
|
|
19
|
+
}
|
|
12
20
|
export declare const Select: FC<SelectProps>;
|
|
13
|
-
|
|
21
|
+
interface SelectItemProps {
|
|
22
|
+
icon?: IconName;
|
|
23
|
+
children?: RadixSelectItemProps["children"];
|
|
24
|
+
disabled?: RadixSelectItemProps["disabled"];
|
|
25
|
+
textValue?: RadixSelectItemProps["textValue"];
|
|
26
|
+
value: RadixSelectItemProps["value"];
|
|
27
|
+
}
|
|
14
28
|
export declare const SelectItem: FC<SelectItemProps>;
|
|
15
29
|
export {};
|