@prismicio/editor-ui 0.2.0 → 0.3.1
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 +1 -1
- package/dist/components/Alert/Alert.css.d.ts +4 -0
- package/dist/components/Alert/Alert.d.ts +11 -0
- package/dist/components/Alert/Alert.stories.d.ts +5 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/{AnimatedList/AnimatedList.stories.d.ts → Animated/Animated.stories.d.ts} +2 -0
- package/dist/components/Animated/AnimatedElement.d.ts +17 -0
- package/dist/components/Animated/AnimatedList.css.d.ts +8 -0
- package/dist/components/{AnimatedList → Animated}/AnimatedList.d.ts +2 -2
- package/dist/components/Animated/index.d.ts +2 -0
- package/dist/components/AppBackground.d.ts +6 -0
- package/dist/components/BaseInput/BaseInput.css.d.ts +1 -1
- package/dist/components/Box/Box.d.ts +49 -0
- package/dist/components/Box/Box.stories.d.ts +80 -0
- package/dist/components/Box/index.d.ts +1 -0
- package/dist/components/Button/Button.css.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.stories.d.ts +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +2 -2
- package/dist/components/Calendar/Calendar.d.ts +4 -3
- package/dist/components/Calendar/Calendar.stories.d.ts +5 -6
- package/dist/components/Calendar/index.d.ts +1 -1
- package/dist/components/Card/Card.stories.d.ts +2 -2
- package/dist/components/Cropper/Cropper.stories.d.ts +2 -2
- package/dist/components/DateInput/DateInput.css.d.ts +2 -0
- package/dist/components/DateInput/DateInput.d.ts +8 -9
- package/dist/components/DateInput/DateInput.stories.d.ts +12 -6
- package/dist/components/DateInput/DateSegments.css.d.ts +7 -0
- package/dist/components/DateInput/DateSegments.d.ts +3 -0
- package/dist/components/DocumentStatusDot/DocumentStatusDot.css.d.ts +1 -0
- package/dist/components/DocumentStatusDot/DocumentStatusDot.d.ts +5 -0
- package/dist/components/DocumentStatusDot/DocumentStatusDot.stories.d.ts +8 -0
- package/dist/components/DocumentStatusDot/index.d.ts +1 -0
- package/dist/components/DragCard/DragCard.css.d.ts +3 -0
- package/dist/components/Embed/EmbedPreview.css.d.ts +4 -0
- package/dist/components/Embed/EmbedPreview.d.ts +12 -0
- package/dist/components/Embed/EmbedPreview.stories.d.ts +22 -0
- package/dist/components/Embed/EmptyEmbed.d.ts +5 -0
- package/dist/components/Embed/EmptyEmbed.stories.d.ts +8 -0
- package/dist/components/Embed/Icon.d.ts +5 -0
- package/dist/components/Embed/index.d.ts +2 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +9 -6
- package/dist/components/Field/Field.css.d.ts +1 -0
- package/dist/components/Field/Field.d.ts +4 -2
- package/dist/components/Field/Field.stories.d.ts +2 -0
- package/dist/components/Field/index.d.ts +1 -1
- package/dist/components/FieldSet/FieldSet.css.d.ts +4 -0
- package/dist/components/FieldSet/FieldSet.d.ts +4 -2
- package/dist/components/FieldSet/FieldSet.stories.d.ts +4 -0
- package/dist/components/Form/Form.css.d.ts +1 -0
- package/dist/components/Form/Form.d.ts +8 -0
- package/dist/components/Form/Form.stories.d.ts +5 -0
- package/dist/components/Form/FormInput.css.d.ts +3 -0
- package/dist/components/Form/FormInput.d.ts +8 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Icon/Icon.css.d.ts +0 -5
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.stories.d.ts +6 -6
- package/dist/components/Icon/PrismicLogo.css.d.ts +1 -0
- package/dist/components/Icon/PrismicLogo.d.ts +5 -0
- package/dist/components/Icon/iconNames.d.ts +1 -1
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/IconButton/IconButton.css.d.ts +4 -1
- package/dist/components/IconButton/IconButton.d.ts +8 -7
- package/dist/components/IconButton/IconButton.stories.d.ts +2 -12
- package/dist/components/Image/Image.css.d.ts +5 -1
- package/dist/components/Image/Image.d.ts +1 -0
- package/dist/components/Image/Image.stories.d.ts +4 -2
- package/dist/components/Skeleton/Skeleton.css.d.ts +9 -2
- package/dist/components/Skeleton/Skeleton.d.ts +4 -3
- package/dist/components/Skeleton/Skeleton.stories.d.ts +4 -4
- package/dist/components/SliceCard/SliceCard.css.d.ts +9 -0
- package/dist/components/SliceCard/SliceCard.d.ts +12 -0
- package/dist/components/SliceCard/SliceCard.stories.d.ts +5 -0
- package/dist/components/SliceCard/index.d.ts +1 -0
- package/dist/components/Switch/Switch.css.d.ts +1 -1
- package/dist/components/Switch/Switch.stories.d.ts +4 -4
- package/dist/components/Tab/Tab.css.d.ts +5 -0
- package/dist/components/Tab/Tab.d.ts +7 -0
- package/dist/components/Tab/Tab.stories.d.ts +5 -0
- package/dist/components/Tab/index.d.ts +1 -0
- package/dist/components/Text/Text.css.d.ts +1 -26
- package/dist/components/Text/Text.d.ts +4 -5
- package/dist/components/Text/Text.stories.d.ts +6 -8
- package/dist/components/TextLink/TextLink.css.d.ts +1 -0
- package/dist/components/TextLink/TextLink.d.ts +9 -0
- package/dist/components/TextLink/TextLink.stories.d.ts +4 -0
- package/dist/components/TextLink/index.d.ts +1 -0
- package/dist/components/Toast/Toast.css.d.ts +4 -0
- package/dist/components/Toast/Toast.d.ts +16 -0
- package/dist/components/Toast/Toast.stories.d.ts +27 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +8 -8
- package/dist/components/Toolbar/Toolbar.stories.d.ts +2 -2
- package/dist/index.d.ts +13 -4
- package/dist/index.es.js +11959 -8256
- package/dist/index.umd.js +109 -97
- package/dist/style.css +1 -1
- package/dist/theme/colors.d.ts +171 -0
- package/dist/theme/selectors.d.ts +48 -0
- package/dist/theme/sprinkles.css.d.ts +2099 -799
- package/dist/theme/vars.css.d.ts +183 -206
- package/package.json +14 -20
- package/dist/components/AnimatedList/AnimatedList.css.d.ts +0 -7
- package/dist/components/AnimatedList/index.d.ts +0 -1
- package/dist/components/Link/Link.d.ts +0 -7
- package/dist/components/Link/index.d.ts +0 -1
- package/dist/theme/utils.d.ts +0 -2
- /package/dist/components/{Link/Link.css.d.ts → Embed/EmptyEmbed.css.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
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.
|
|
15
15
|
2. Move the file to `src/icons` and rename it with the official Material name: https://fonts.google.com/icons but with a lower camel case name.
|
|
16
16
|
3. You can repeat 1. and 2. as many times as needed.
|
|
17
|
-
4. Run `deno task update-icons
|
|
17
|
+
4. Run `deno task update-icons` (it does not matter where in the monorepo you run this from)
|
|
18
18
|
5. Check that your icon is visible in Storybook.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare type Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle?: string;
|
|
4
|
+
buttons?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function Alert({ title, subtitle, buttons }: Props): JSX.Element;
|
|
7
|
+
export declare const AlertButton: ({ title, onClick }: {
|
|
8
|
+
title: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert, AlertButton } from "./Alert";
|
package/dist/components/{AnimatedList/AnimatedList.stories.d.ts → Animated/Animated.stories.d.ts}
RENAMED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
import { AnimatedElement } from "./AnimatedElement";
|
|
2
3
|
import { AnimatedList } from "./AnimatedList";
|
|
3
4
|
declare const _default: ComponentMeta<typeof AnimatedList>;
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare const Default: ComponentStoryFn<typeof AnimatedList>;
|
|
7
|
+
export declare const AnimatedElementTemplateStory: ComponentStoryFn<typeof AnimatedElement>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
children: OnlyChild;
|
|
4
|
+
animationDuration?: "standard" | "tabChangeTransition";
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Animates a single element in & out based on whether it's currently rendered.
|
|
8
|
+
* An exit then enter animation will also play sequentially if the element's key changes.
|
|
9
|
+
* Unlike React CSSTransition(Group), this is based on CSS animations rather than a bunch of transition classes
|
|
10
|
+
* and the element doesn't have to be evaluated/rendered at all if it's not currently shown.
|
|
11
|
+
*
|
|
12
|
+
* If you only need to animate a single element's entrance (and not exit/swap), you don't need this component:
|
|
13
|
+
* you can just set a CSS animation on the element styles.
|
|
14
|
+
*/
|
|
15
|
+
export declare function AnimatedElement({ children, animationDuration }: Props): JSX.Element;
|
|
16
|
+
declare type OnlyChild = ReactElement | null | undefined | false | 0;
|
|
17
|
+
export {};
|
|
@@ -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: Record<"tabChangeTransition" | "standard", string>;
|
|
5
|
+
export declare const enteringDelay: string;
|
|
6
|
+
export declare const present: string;
|
|
7
|
+
export declare const exiting: Record<"tabChangeTransition" | "standard", string>;
|
|
8
|
+
export declare const gaps: Record<0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80, string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Key, ReactElement, ReactNode } from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as styles from "./AnimatedList.css";
|
|
3
3
|
interface AnimatedListProps<ITEM> {
|
|
4
|
-
gap?: keyof typeof gaps;
|
|
4
|
+
gap?: keyof typeof styles.gaps;
|
|
5
5
|
direction?: "horizontal" | "vertical";
|
|
6
6
|
items: readonly ITEM[];
|
|
7
7
|
getItemKey: (item: ITEM) => Key;
|
|
@@ -1,6 +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<"
|
|
4
|
+
export declare const inputColorVariant: Record<"normal" | "link", string>;
|
|
5
5
|
export declare const startAdornment: string;
|
|
6
6
|
export declare const endAdornment: string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { type ThemeColor } from "../../theme/colors";
|
|
3
|
+
import { type Sprinkles } from "../../theme/sprinkles.css";
|
|
4
|
+
declare type BoxProps = {
|
|
5
|
+
as?: "div" | "nav" | "ul" | "ol" | "article" | "header";
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
position?: "absolute" | "relative" | "sticky" | "fixed";
|
|
8
|
+
top?: Sprinkles["top"];
|
|
9
|
+
right?: Sprinkles["right"];
|
|
10
|
+
bottom?: Sprinkles["bottom"];
|
|
11
|
+
width?: Sprinkles["width"] | number;
|
|
12
|
+
maxWidth?: Sprinkles["maxWidth"] | number;
|
|
13
|
+
height?: Sprinkles["height"] | number;
|
|
14
|
+
maxHeight?: Sprinkles["maxHeight"] | number | string;
|
|
15
|
+
padding?: Padding;
|
|
16
|
+
border?: Border;
|
|
17
|
+
backgroundColor?: ThemeColor;
|
|
18
|
+
overflowY?: "auto";
|
|
19
|
+
} & DisplayProps;
|
|
20
|
+
declare type DisplayProps = {
|
|
21
|
+
gap?: Sprinkles["gap"];
|
|
22
|
+
alignItems?: Sprinkles["alignItems"];
|
|
23
|
+
justifyContent?: Sprinkles["justifyContent"];
|
|
24
|
+
} & (GridDisplayProps | FlexDisplayProps);
|
|
25
|
+
declare type GridDisplayProps = {
|
|
26
|
+
display: "grid";
|
|
27
|
+
gridTemplateColumns?: string;
|
|
28
|
+
gridTemplateRows?: string;
|
|
29
|
+
};
|
|
30
|
+
declare type FlexDisplayProps = {
|
|
31
|
+
display?: "flex";
|
|
32
|
+
flexDirection?: "column" | "row";
|
|
33
|
+
};
|
|
34
|
+
declare type Padding = Sprinkles["padding"] | {
|
|
35
|
+
block?: Sprinkles["padding"];
|
|
36
|
+
inline?: Sprinkles["padding"];
|
|
37
|
+
top?: Sprinkles["padding"];
|
|
38
|
+
bottom?: Sprinkles["padding"];
|
|
39
|
+
left?: Sprinkles["padding"];
|
|
40
|
+
right?: Sprinkles["padding"];
|
|
41
|
+
};
|
|
42
|
+
declare type Border = boolean | {
|
|
43
|
+
top?: boolean;
|
|
44
|
+
bottom?: boolean;
|
|
45
|
+
left?: boolean;
|
|
46
|
+
right?: boolean;
|
|
47
|
+
};
|
|
48
|
+
export declare const Box: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<HTMLElement>>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<({
|
|
3
|
+
as?: "article" | "div" | "header" | "nav" | "ol" | "ul" | undefined;
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
position?: "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
6
|
+
top?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
7
|
+
right?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
8
|
+
bottom?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
9
|
+
width?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
10
|
+
maxWidth?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
11
|
+
height?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
12
|
+
maxHeight?: string | number | undefined;
|
|
13
|
+
padding?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | {
|
|
14
|
+
block?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
15
|
+
inline?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
16
|
+
top?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
17
|
+
bottom?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
18
|
+
left?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
19
|
+
right?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
border?: (boolean | {
|
|
22
|
+
top?: boolean | undefined;
|
|
23
|
+
bottom?: boolean | undefined;
|
|
24
|
+
left?: boolean | undefined;
|
|
25
|
+
right?: boolean | undefined;
|
|
26
|
+
}) | undefined;
|
|
27
|
+
backgroundColor?: "indigo10" | "indigo11" | "green9" | "green10" | "amber9" | "amber10" | "tomato1" | "tomato7" | "tomato10" | "tomato11" | "purple1" | "purple2" | "purple3" | "purple4" | "purple5" | "purple6" | "purple7" | "purple8" | "purple9" | "purple10" | "purple11" | "purple12" | "purpleAlpha1" | "currentColor" | "inherit" | "transparent" | "grey1" | "grey2" | "grey3" | "grey4" | "grey5" | "grey6" | "grey7" | "grey8" | "grey9" | "grey10" | "grey11" | "grey12" | "dark2" | "dark6" | "dark7" | "dark12" | undefined;
|
|
28
|
+
overflowY?: "auto" | undefined;
|
|
29
|
+
} & ({
|
|
30
|
+
gap?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
31
|
+
alignItems?: "center" | "flex-start" | undefined;
|
|
32
|
+
justifyContent?: "space-between" | "center" | undefined;
|
|
33
|
+
} & ({
|
|
34
|
+
display: "grid";
|
|
35
|
+
gridTemplateColumns?: string | undefined;
|
|
36
|
+
gridTemplateRows?: string | undefined;
|
|
37
|
+
} | {
|
|
38
|
+
display?: "flex" | undefined;
|
|
39
|
+
flexDirection?: "column" | "row" | undefined;
|
|
40
|
+
}))) & import("react").RefAttributes<HTMLElement>>>;
|
|
41
|
+
export default _default;
|
|
42
|
+
export declare const Default: ComponentStoryFn<import("react").ForwardRefExoticComponent<({
|
|
43
|
+
as?: "article" | "div" | "header" | "nav" | "ol" | "ul" | undefined;
|
|
44
|
+
children?: import("react").ReactNode;
|
|
45
|
+
position?: "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
46
|
+
top?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
47
|
+
right?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
48
|
+
bottom?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
49
|
+
width?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
50
|
+
maxWidth?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
51
|
+
height?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
52
|
+
maxHeight?: string | number | undefined;
|
|
53
|
+
padding?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | {
|
|
54
|
+
block?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
55
|
+
inline?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
56
|
+
top?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
57
|
+
bottom?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
58
|
+
left?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
59
|
+
right?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
border?: (boolean | {
|
|
62
|
+
top?: boolean | undefined;
|
|
63
|
+
bottom?: boolean | undefined;
|
|
64
|
+
left?: boolean | undefined;
|
|
65
|
+
right?: boolean | undefined;
|
|
66
|
+
}) | undefined;
|
|
67
|
+
backgroundColor?: "indigo10" | "indigo11" | "green9" | "green10" | "amber9" | "amber10" | "tomato1" | "tomato7" | "tomato10" | "tomato11" | "purple1" | "purple2" | "purple3" | "purple4" | "purple5" | "purple6" | "purple7" | "purple8" | "purple9" | "purple10" | "purple11" | "purple12" | "purpleAlpha1" | "currentColor" | "inherit" | "transparent" | "grey1" | "grey2" | "grey3" | "grey4" | "grey5" | "grey6" | "grey7" | "grey8" | "grey9" | "grey10" | "grey11" | "grey12" | "dark2" | "dark6" | "dark7" | "dark12" | undefined;
|
|
68
|
+
overflowY?: "auto" | undefined;
|
|
69
|
+
} & ({
|
|
70
|
+
gap?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
71
|
+
alignItems?: "center" | "flex-start" | undefined;
|
|
72
|
+
justifyContent?: "space-between" | "center" | undefined;
|
|
73
|
+
} & ({
|
|
74
|
+
display: "grid";
|
|
75
|
+
gridTemplateColumns?: string | undefined;
|
|
76
|
+
gridTemplateRows?: string | undefined;
|
|
77
|
+
} | {
|
|
78
|
+
display?: "flex" | undefined;
|
|
79
|
+
flexDirection?: "column" | "row" | undefined;
|
|
80
|
+
}))) & import("react").RefAttributes<HTMLElement>>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Box } from "./Box";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const root: string;
|
|
2
2
|
export declare const iconOnly: string;
|
|
3
|
-
export declare const size: Record<"
|
|
3
|
+
export declare const size: Record<"medium" | "large" | "small", string>;
|
|
4
4
|
export declare const variant: Record<"primary" | "secondary" | "tertiary", string>;
|
|
5
5
|
export declare const iconVariant: {
|
|
6
6
|
primary: string;
|
|
@@ -5,7 +5,7 @@ export declare const Button: import("react").ForwardRefExoticComponent<Readonly<
|
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
6
|
endIcon?: ReactNode;
|
|
7
7
|
onClick?: ((event: MouseEvent) => void) | undefined;
|
|
8
|
-
size?: "
|
|
8
|
+
size?: "medium" | "large" | "small" | undefined;
|
|
9
9
|
startIcon?: ReactNode;
|
|
10
10
|
variant?: "primary" | "secondary" | "tertiary" | undefined;
|
|
11
11
|
}> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -5,7 +5,7 @@ declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<
|
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
6
|
endIcon?: import("react").ReactNode;
|
|
7
7
|
onClick?: ((event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
8
|
-
size?: "
|
|
8
|
+
size?: "medium" | "large" | "small" | undefined;
|
|
9
9
|
startIcon?: import("react").ReactNode;
|
|
10
10
|
variant?: "primary" | "secondary" | "tertiary" | undefined;
|
|
11
11
|
}> & import("react").RefAttributes<HTMLButtonElement>>>;
|
|
@@ -16,7 +16,7 @@ export declare const Default: ComponentStoryFn<import("react").ForwardRefExoticC
|
|
|
16
16
|
disabled?: boolean | undefined;
|
|
17
17
|
endIcon?: import("react").ReactNode;
|
|
18
18
|
onClick?: ((event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
19
|
-
size?: "
|
|
19
|
+
size?: "medium" | "large" | "small" | undefined;
|
|
20
20
|
startIcon?: import("react").ReactNode;
|
|
21
21
|
variant?: "primary" | "secondary" | "tertiary" | undefined;
|
|
22
22
|
}> & import("react").RefAttributes<HTMLButtonElement>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
2
|
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Partial<Readonly<{
|
|
3
3
|
disabled?: boolean | undefined;
|
|
4
|
-
size: "
|
|
4
|
+
size: "medium" | "large" | "small";
|
|
5
5
|
variant: "primary" | "secondary" | "tertiary";
|
|
6
6
|
}>> & Readonly<{
|
|
7
7
|
children?: import("react").ReactNode;
|
|
@@ -11,7 +11,7 @@ declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<
|
|
|
11
11
|
export default _default;
|
|
12
12
|
export declare const Default: ComponentStoryFn<import("react").ForwardRefExoticComponent<Partial<Readonly<{
|
|
13
13
|
disabled?: boolean | undefined;
|
|
14
|
-
size: "
|
|
14
|
+
size: "medium" | "large" | "small";
|
|
15
15
|
variant: "primary" | "secondary" | "tertiary";
|
|
16
16
|
}>> & Readonly<{
|
|
17
17
|
children?: import("react").ReactNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { DateValue, GregorianCalendar } from "@internationalized/date";
|
|
1
2
|
declare type Props = {
|
|
2
|
-
value:
|
|
3
|
-
onValueChange: (value:
|
|
4
|
-
onFocusReady: (focus: () => void) => void;
|
|
3
|
+
value: DateValue;
|
|
4
|
+
onValueChange: (value: DateValue) => void;
|
|
5
5
|
};
|
|
6
6
|
export declare const Calendar: (props: Props) => JSX.Element;
|
|
7
|
+
export declare const createCalendar: () => GregorianCalendar;
|
|
7
8
|
export {};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { DateValue } from "@internationalized/date";
|
|
1
2
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
3
|
declare const _default: ComponentMeta<(props: {
|
|
3
|
-
value:
|
|
4
|
-
onValueChange: (value:
|
|
5
|
-
onFocusReady: (focus: () => void) => void;
|
|
4
|
+
value: DateValue;
|
|
5
|
+
onValueChange: (value: DateValue) => void;
|
|
6
6
|
}) => JSX.Element>;
|
|
7
7
|
export default _default;
|
|
8
8
|
export declare const Default: ComponentStoryFn<(props: {
|
|
9
|
-
value:
|
|
10
|
-
onValueChange: (value:
|
|
11
|
-
onFocusReady: (focus: () => void) => void;
|
|
9
|
+
value: DateValue;
|
|
10
|
+
onValueChange: (value: DateValue) => void;
|
|
12
11
|
}) => JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Calendar } from "./Calendar";
|
|
1
|
+
export { Calendar, createCalendar } from "./Calendar";
|
|
@@ -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
|
}>>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
2
|
declare const _default: ComponentMeta<import("react").FC<{
|
|
3
3
|
zoom: number;
|
|
4
|
-
image?: string | undefined;
|
|
5
4
|
crop: import("react-easy-crop").Point;
|
|
5
|
+
image?: string | undefined;
|
|
6
6
|
aspect: number;
|
|
7
7
|
onZoomChange?: ((zoom: number) => void) | undefined;
|
|
8
8
|
onCropChange: (location: import("react-easy-crop").Point) => void;
|
|
@@ -12,8 +12,8 @@ declare const _default: ComponentMeta<import("react").FC<{
|
|
|
12
12
|
export default _default;
|
|
13
13
|
export declare const Default: ComponentStoryFn<import("react").FC<{
|
|
14
14
|
zoom: number;
|
|
15
|
-
image?: string | undefined;
|
|
16
15
|
crop: import("react-easy-crop").Point;
|
|
16
|
+
image?: string | undefined;
|
|
17
17
|
aspect: number;
|
|
18
18
|
onZoomChange?: ((zoom: number) => void) | undefined;
|
|
19
19
|
onCropChange: (location: import("react-easy-crop").Point) => void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onValueChange: (
|
|
1
|
+
declare type Mode = "date" | "date-time";
|
|
2
|
+
declare type Props = {
|
|
3
|
+
readOnly?: boolean;
|
|
4
|
+
value?: string;
|
|
5
|
+
onValueChange: (value?: string) => void;
|
|
6
|
+
mode: Mode;
|
|
7
|
+
"aria-labelledby": string;
|
|
6
8
|
};
|
|
7
|
-
export declare const DateInput: ({
|
|
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;
|
|
9
|
+
export declare const DateInput: ({ "aria-labelledby": ariaLabelledBy, readOnly, value, onValueChange, mode }: Props) => JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
-
declare const _default: ComponentMeta<({
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const _default: ComponentMeta<({ "aria-labelledby": ariaLabelledBy, readOnly, value, onValueChange, mode }: {
|
|
3
|
+
readOnly?: boolean | undefined;
|
|
4
|
+
value?: string | undefined;
|
|
5
|
+
onValueChange: (value?: string | undefined) => void;
|
|
6
|
+
mode: "date" | "date-time";
|
|
7
|
+
"aria-labelledby": string;
|
|
5
8
|
}) => JSX.Element>;
|
|
6
9
|
export default _default;
|
|
7
|
-
export declare const Default: ComponentStoryFn<({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
export declare const Default: ComponentStoryFn<({ "aria-labelledby": ariaLabelledBy, readOnly, value, onValueChange, mode }: {
|
|
11
|
+
readOnly?: boolean | undefined;
|
|
12
|
+
value?: string | undefined;
|
|
13
|
+
onValueChange: (value?: string | undefined) => void;
|
|
14
|
+
mode: "date" | "date-time";
|
|
15
|
+
"aria-labelledby": string;
|
|
10
16
|
}) => JSX.Element>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const root: string;
|
|
2
|
+
export declare const flexSpace: string;
|
|
3
|
+
export declare const segment: string;
|
|
4
|
+
export declare const segmentColor: string;
|
|
5
|
+
export declare const segmentDisabledColor: string;
|
|
6
|
+
export declare const segmentInlinePadding: string;
|
|
7
|
+
export declare const segmentLiteralInlinePadding: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const root: Record<"published" | "release" | "archived" | "unclassified", string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
declare const _default: ComponentMeta<({ status }: {
|
|
3
|
+
status: "published" | "release" | "archived" | "unclassified";
|
|
4
|
+
}) => JSX.Element>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: ComponentStoryFn<({ status }: {
|
|
7
|
+
status: "published" | "release" | "archived" | "unclassified";
|
|
8
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DocumentStatusDot } from "./DocumentStatusDot";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare type Props = {
|
|
2
|
+
url: string;
|
|
3
|
+
thumbnail: {
|
|
4
|
+
url: string;
|
|
5
|
+
aspectRatio: "1:1" | "16:9";
|
|
6
|
+
};
|
|
7
|
+
provider: string;
|
|
8
|
+
author?: string;
|
|
9
|
+
subtitle: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const EmbedPreview: ({ url, thumbnail, provider, author, subtitle }: Props) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
declare const _default: ComponentMeta<({ url, thumbnail, provider, author, subtitle }: {
|
|
3
|
+
url: string;
|
|
4
|
+
thumbnail: {
|
|
5
|
+
url: string;
|
|
6
|
+
aspectRatio: "1:1" | "16:9";
|
|
7
|
+
};
|
|
8
|
+
provider: string;
|
|
9
|
+
author?: string | undefined;
|
|
10
|
+
subtitle: string;
|
|
11
|
+
}) => JSX.Element>;
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const Default: ComponentStoryFn<({ url, thumbnail, provider, author, subtitle }: {
|
|
14
|
+
url: string;
|
|
15
|
+
thumbnail: {
|
|
16
|
+
url: string;
|
|
17
|
+
aspectRatio: "1:1" | "16:9";
|
|
18
|
+
};
|
|
19
|
+
provider: string;
|
|
20
|
+
author?: string | undefined;
|
|
21
|
+
subtitle: string;
|
|
22
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
declare const _default: ComponentMeta<({ title }: {
|
|
3
|
+
title: string;
|
|
4
|
+
}) => JSX.Element>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: ComponentStoryFn<({ title }: {
|
|
7
|
+
title: string;
|
|
8
|
+
}) => JSX.Element>;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Handler } from "@prismicio/editor-support/Type";
|
|
2
|
+
import React, { ReactNode } from "react";
|
|
2
3
|
interface ErrorBoundaryProps {
|
|
3
4
|
children?: ReactNode;
|
|
4
5
|
errorImageSrc?: string;
|
|
5
6
|
title: string;
|
|
6
7
|
description: string;
|
|
7
|
-
|
|
8
|
+
renderError?: (error: ReactNode) => ReactNode;
|
|
8
9
|
}
|
|
9
10
|
interface ErrorBoundaryState {
|
|
10
|
-
|
|
11
|
+
error?: unknown;
|
|
11
12
|
}
|
|
13
|
+
declare type ErrorInterceptor = (error: unknown, resetBoundary: Handler) => boolean;
|
|
12
14
|
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
13
15
|
constructor(props: ErrorBoundaryProps);
|
|
14
|
-
static
|
|
15
|
-
|
|
16
|
+
static registerGlobalErrorInterceptor(value: ErrorInterceptor): void;
|
|
17
|
+
static getDerivedStateFromError(error: unknown): {
|
|
18
|
+
error: unknown;
|
|
16
19
|
};
|
|
17
20
|
tryAgain: () => void;
|
|
18
|
-
render():
|
|
21
|
+
render(): React.ReactNode;
|
|
19
22
|
}
|
|
20
23
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
|
-
import { type FC, type ReactNode } from "react";
|
|
2
|
+
import { type FC, type PropsWithChildren, type ReactNode } from "react";
|
|
3
3
|
export declare const Field: import("react").ForwardRefExoticComponent<Readonly<{
|
|
4
4
|
children?: ReactNode;
|
|
5
|
+
footer?: ReactNode;
|
|
5
6
|
labelPosition?: "top" | "side" | undefined;
|
|
6
7
|
onMouseOverChange?: ((isMouseOver: boolean) => void) | undefined;
|
|
7
8
|
}> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -9,10 +10,11 @@ declare type FieldIconProps = Readonly<{
|
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
}>;
|
|
11
12
|
export declare const FieldIcon: FC<FieldIconProps>;
|
|
12
|
-
declare type FieldLabelProps = Readonly<Pick<LabelPrimitive.LabelProps, "children" | "htmlFor">>;
|
|
13
|
+
declare type FieldLabelProps = Readonly<Pick<LabelPrimitive.LabelProps, "children" | "htmlFor" | "id">>;
|
|
13
14
|
export declare const FieldLabel: FC<FieldLabelProps>;
|
|
14
15
|
declare type FieldControlProps = Readonly<{
|
|
15
16
|
children?: ReactNode;
|
|
16
17
|
}>;
|
|
17
18
|
export declare const FieldControl: FC<FieldControlProps>;
|
|
19
|
+
export declare const FieldFooter: ({ children }: PropsWithChildren) => JSX.Element;
|
|
18
20
|
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
2
|
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Readonly<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
+
footer?: import("react").ReactNode;
|
|
4
5
|
labelPosition?: "top" | "side" | undefined;
|
|
5
6
|
onMouseOverChange?: ((isMouseOver: boolean) => void) | undefined;
|
|
6
7
|
}> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
7
8
|
export default _default;
|
|
8
9
|
export declare const Default: ComponentStoryFn<import("react").ForwardRefExoticComponent<Readonly<{
|
|
9
10
|
children?: import("react").ReactNode;
|
|
11
|
+
footer?: import("react").ReactNode;
|
|
10
12
|
labelPosition?: "top" | "side" | undefined;
|
|
11
13
|
onMouseOverChange?: ((isMouseOver: boolean) => void) | undefined;
|
|
12
14
|
}> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Field, FieldControl, FieldIcon, FieldLabel } from "./Field";
|
|
1
|
+
export { Field, FieldControl, FieldFooter, FieldIcon, FieldLabel } from "./Field";
|