@prismicio/editor-ui 0.3.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.
Files changed (101) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Alert/Alert.css.d.ts +4 -0
  3. package/dist/components/Alert/Alert.d.ts +11 -0
  4. package/dist/components/Alert/Alert.stories.d.ts +5 -0
  5. package/dist/components/Alert/index.d.ts +1 -0
  6. package/dist/components/{AnimatedList/AnimatedList.stories.d.ts → Animated/Animated.stories.d.ts} +2 -0
  7. package/dist/components/Animated/AnimatedElement.d.ts +17 -0
  8. package/dist/components/Animated/AnimatedList.css.d.ts +8 -0
  9. package/dist/components/Animated/index.d.ts +2 -0
  10. package/dist/components/AppBackground.d.ts +6 -2
  11. package/dist/components/Box/Box.d.ts +16 -6
  12. package/dist/components/Box/Box.stories.d.ts +78 -3
  13. package/dist/components/Calendar/Calendar.d.ts +4 -3
  14. package/dist/components/Calendar/Calendar.stories.d.ts +5 -6
  15. package/dist/components/Calendar/index.d.ts +1 -1
  16. package/dist/components/Cropper/Cropper.stories.d.ts +2 -2
  17. package/dist/components/DateInput/DateInput.css.d.ts +2 -0
  18. package/dist/components/DateInput/DateInput.d.ts +8 -9
  19. package/dist/components/DateInput/DateInput.stories.d.ts +12 -6
  20. package/dist/components/DateInput/DateSegments.css.d.ts +7 -0
  21. package/dist/components/DateInput/DateSegments.d.ts +3 -0
  22. package/dist/components/DocumentStatusDot/DocumentStatusDot.css.d.ts +1 -0
  23. package/dist/components/DocumentStatusDot/DocumentStatusDot.d.ts +5 -0
  24. package/dist/components/DocumentStatusDot/DocumentStatusDot.stories.d.ts +8 -0
  25. package/dist/components/DocumentStatusDot/index.d.ts +1 -0
  26. package/dist/components/DragCard/DragCard.css.d.ts +3 -0
  27. package/dist/components/Embed/EmbedPreview.css.d.ts +4 -0
  28. package/dist/components/Embed/EmbedPreview.d.ts +12 -0
  29. package/dist/components/Embed/EmbedPreview.stories.d.ts +22 -0
  30. package/dist/components/Embed/EmptyEmbed.d.ts +5 -0
  31. package/dist/components/Embed/EmptyEmbed.stories.d.ts +8 -0
  32. package/dist/components/Embed/Icon.d.ts +5 -0
  33. package/dist/components/Embed/index.d.ts +2 -0
  34. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +9 -6
  35. package/dist/components/Field/Field.css.d.ts +1 -0
  36. package/dist/components/Field/Field.d.ts +4 -2
  37. package/dist/components/Field/Field.stories.d.ts +2 -0
  38. package/dist/components/Field/index.d.ts +1 -1
  39. package/dist/components/FieldSet/FieldSet.css.d.ts +4 -0
  40. package/dist/components/FieldSet/FieldSet.d.ts +4 -2
  41. package/dist/components/FieldSet/FieldSet.stories.d.ts +4 -0
  42. package/dist/components/Form/Form.css.d.ts +1 -0
  43. package/dist/components/Form/Form.d.ts +8 -0
  44. package/dist/components/Form/Form.stories.d.ts +5 -0
  45. package/dist/components/Form/FormInput.css.d.ts +3 -0
  46. package/dist/components/Form/FormInput.d.ts +8 -0
  47. package/dist/components/Form/index.d.ts +2 -0
  48. package/dist/components/Icon/Icon.css.d.ts +0 -5
  49. package/dist/components/Icon/Icon.d.ts +1 -1
  50. package/dist/components/Icon/Icon.stories.d.ts +4 -4
  51. package/dist/components/Icon/PrismicLogo.css.d.ts +1 -0
  52. package/dist/components/Icon/PrismicLogo.d.ts +5 -0
  53. package/dist/components/Icon/iconNames.d.ts +1 -1
  54. package/dist/components/Icon/index.d.ts +1 -0
  55. package/dist/components/IconButton/IconButton.css.d.ts +4 -1
  56. package/dist/components/IconButton/IconButton.d.ts +8 -7
  57. package/dist/components/IconButton/IconButton.stories.d.ts +2 -12
  58. package/dist/components/Image/Image.css.d.ts +4 -0
  59. package/dist/components/Image/Image.d.ts +1 -0
  60. package/dist/components/Image/Image.stories.d.ts +2 -0
  61. package/dist/components/Skeleton/Skeleton.css.d.ts +9 -2
  62. package/dist/components/Skeleton/Skeleton.d.ts +4 -3
  63. package/dist/components/Skeleton/Skeleton.stories.d.ts +4 -4
  64. package/dist/components/SliceCard/SliceCard.css.d.ts +9 -0
  65. package/dist/components/SliceCard/SliceCard.d.ts +12 -0
  66. package/dist/components/SliceCard/SliceCard.stories.d.ts +5 -0
  67. package/dist/components/SliceCard/index.d.ts +1 -0
  68. package/dist/components/Switch/Switch.stories.d.ts +2 -2
  69. package/dist/components/Tab/Tab.css.d.ts +5 -0
  70. package/dist/components/Tab/Tab.d.ts +7 -0
  71. package/dist/components/Tab/Tab.stories.d.ts +5 -0
  72. package/dist/components/Tab/index.d.ts +1 -0
  73. package/dist/components/Text/Text.css.d.ts +1 -26
  74. package/dist/components/Text/Text.d.ts +4 -5
  75. package/dist/components/Text/Text.stories.d.ts +4 -6
  76. package/dist/components/TextLink/TextLink.css.d.ts +1 -0
  77. package/dist/components/TextLink/TextLink.d.ts +9 -0
  78. package/dist/components/TextLink/TextLink.stories.d.ts +4 -0
  79. package/dist/components/TextLink/index.d.ts +1 -0
  80. package/dist/components/Toast/Toast.css.d.ts +4 -0
  81. package/dist/components/Toast/Toast.d.ts +16 -0
  82. package/dist/components/Toast/Toast.stories.d.ts +27 -0
  83. package/dist/components/Toast/index.d.ts +1 -0
  84. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +4 -4
  85. package/dist/components/Toolbar/Toolbar.stories.d.ts +2 -2
  86. package/dist/index.d.ts +11 -4
  87. package/dist/index.es.js +9098 -5412
  88. package/dist/index.umd.js +92 -80
  89. package/dist/style.css +1 -1
  90. package/dist/theme/colors.d.ts +62 -10
  91. package/dist/theme/selectors.d.ts +20 -20
  92. package/dist/theme/sprinkles.css.d.ts +2052 -631
  93. package/dist/theme/vars.css.d.ts +106 -130
  94. package/package.json +7 -5
  95. package/dist/components/AnimatedList/AnimatedList.css.d.ts +0 -8
  96. package/dist/components/AnimatedList/index.d.ts +0 -1
  97. package/dist/components/Link/Link.d.ts +0 -7
  98. package/dist/components/Link/index.d.ts +0 -1
  99. package/dist/theme/utils.d.ts +0 -2
  100. /package/dist/components/{AnimatedList → Animated}/AnimatedList.d.ts +0 -0
  101. /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,4 @@
1
+ export declare const root: string;
2
+ export declare const content: string;
3
+ export declare const buttons: string;
4
+ export declare const button: string;
@@ -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,5 @@
1
+ import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
2
+ import { Alert } from "./Alert";
3
+ declare const _default: ComponentMeta<typeof Alert>;
4
+ export default _default;
5
+ export declare const Default: ComponentStoryFn<typeof Alert>;
@@ -0,0 +1 @@
1
+ export { Alert, AlertButton } from "./Alert";
@@ -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>;
@@ -0,0 +1,2 @@
1
+ export { AnimatedElement } from "./AnimatedElement";
2
+ export { AnimatedList } from "./AnimatedList";
@@ -1,2 +1,6 @@
1
- import type { FC, PropsWithChildren } from "react";
2
- export declare const AppBackground: FC<PropsWithChildren>;
1
+ import type { ReactNode } from "react";
2
+ interface Props {
3
+ children?: ReactNode;
4
+ }
5
+ export declare function AppBackground({ children }: Props): JSX.Element;
6
+ export {};
@@ -1,18 +1,26 @@
1
- import { ReactElement, ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  import { type ThemeColor } from "../../theme/colors";
3
3
  import { type Sprinkles } from "../../theme/sprinkles.css";
4
- declare type Props = {
4
+ declare type BoxProps = {
5
5
  as?: "div" | "nav" | "ul" | "ol" | "article" | "header";
6
6
  children?: ReactNode;
7
- position?: "absolute" | "relative";
8
- width?: Sprinkles["width"];
9
- height?: Sprinkles["height"];
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;
10
15
  padding?: Padding;
11
16
  border?: Border;
12
17
  backgroundColor?: ThemeColor;
18
+ overflowY?: "auto";
13
19
  } & DisplayProps;
14
20
  declare type DisplayProps = {
15
21
  gap?: Sprinkles["gap"];
22
+ alignItems?: Sprinkles["alignItems"];
23
+ justifyContent?: Sprinkles["justifyContent"];
16
24
  } & (GridDisplayProps | FlexDisplayProps);
17
25
  declare type GridDisplayProps = {
18
26
  display: "grid";
@@ -24,6 +32,8 @@ declare type FlexDisplayProps = {
24
32
  flexDirection?: "column" | "row";
25
33
  };
26
34
  declare type Padding = Sprinkles["padding"] | {
35
+ block?: Sprinkles["padding"];
36
+ inline?: Sprinkles["padding"];
27
37
  top?: Sprinkles["padding"];
28
38
  bottom?: Sprinkles["padding"];
29
39
  left?: Sprinkles["padding"];
@@ -35,5 +45,5 @@ declare type Border = boolean | {
35
45
  left?: boolean;
36
46
  right?: boolean;
37
47
  };
38
- export declare function Box(props: Props): ReactElement;
48
+ export declare const Box: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<HTMLElement>>;
39
49
  export {};
@@ -1,5 +1,80 @@
1
1
  import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
2
- import { Box } from "./Box";
3
- declare const _default: ComponentMeta<typeof Box>;
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>>>;
4
41
  export default _default;
5
- export declare const Default: ComponentStoryFn<typeof Box>;
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>>>;
@@ -1,7 +1,8 @@
1
+ import { DateValue, GregorianCalendar } from "@internationalized/date";
1
2
  declare type Props = {
2
- value: string;
3
- onValueChange: (value: string) => void;
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: string;
4
- onValueChange: (value: string) => void;
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: string;
10
- onValueChange: (value: string) => void;
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";
@@ -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;
@@ -0,0 +1,2 @@
1
+ export declare const root: string;
2
+ export declare const dateSegments: string;
@@ -1,11 +1,10 @@
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;
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: ({ 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;
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<({ 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;
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<({ 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
+ 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,3 @@
1
+ import type { DateValue } from "@internationalized/date";
2
+ import { AriaDateFieldProps } from "@react-aria/datepicker";
3
+ export declare const DateSegments: (props: AriaDateFieldProps<DateValue>) => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const root: Record<"published" | "release" | "archived" | "unclassified", string>;
@@ -0,0 +1,5 @@
1
+ declare type Props = {
2
+ status: "published" | "release" | "archived" | "unclassified";
3
+ };
4
+ export declare const DocumentStatusDot: ({ status }: Props) => JSX.Element;
5
+ export {};
@@ -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,3 @@
1
+ export declare const root: string;
2
+ export declare const card: string;
3
+ export declare const main: string;
@@ -0,0 +1,4 @@
1
+ export declare const root: string;
2
+ export declare const thumbnail: Record<"1:1" | "16:9", string>;
3
+ export declare const content: string;
4
+ export declare const title: string;
@@ -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,5 @@
1
+ declare type Props = {
2
+ title: string;
3
+ };
4
+ export declare const EmptyEmbed: ({ title }: Props) => JSX.Element;
5
+ export {};
@@ -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>;
@@ -0,0 +1,5 @@
1
+ declare type Props = {
2
+ provider: string;
3
+ };
4
+ export declare const Icon: ({ provider }: Props) => JSX.Element;
5
+ export {};
@@ -0,0 +1,2 @@
1
+ export { EmbedPreview } from "./EmbedPreview";
2
+ export { EmptyEmbed } from "./EmptyEmbed";
@@ -1,20 +1,23 @@
1
- import React, { CSSProperties, ReactNode } from "react";
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
- style?: CSSProperties;
8
+ renderError?: (error: ReactNode) => ReactNode;
8
9
  }
9
10
  interface ErrorBoundaryState {
10
- hasError: boolean;
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 getDerivedStateFromError(_error: unknown): {
15
- hasError: boolean;
16
+ static registerGlobalErrorInterceptor(value: ErrorInterceptor): void;
17
+ static getDerivedStateFromError(error: unknown): {
18
+ error: unknown;
16
19
  };
17
20
  tryAgain: () => void;
18
- render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
21
+ render(): React.ReactNode;
19
22
  }
20
23
  export {};
@@ -1,5 +1,6 @@
1
1
  export declare const root: string;
2
2
  export declare const labelPosition: Record<"top" | "side", string>;
3
+ export declare const footer: string;
3
4
  export declare const icon: string;
4
5
  export declare const iconChildren: string;
5
6
  export declare const label: string;
@@ -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";
@@ -1,2 +1,6 @@
1
1
  export declare const root: string;
2
+ export declare const border: {
3
+ normal: string;
4
+ selected: string;
5
+ };
2
6
  export declare const legend: string;
@@ -1,11 +1,13 @@
1
1
  import type { FC, ReactNode } from "react";
2
2
  declare type FieldSetProps = Readonly<{
3
3
  children?: ReactNode;
4
+ selected?: boolean;
5
+ id?: string;
4
6
  name?: string;
5
7
  }>;
6
8
  export declare const FieldSet: FC<FieldSetProps>;
7
- declare type FieldSetLegendProps = Readonly<{
9
+ interface FieldSetLegendProps {
8
10
  children?: ReactNode;
9
- }>;
11
+ }
10
12
  export declare const FieldSetLegend: FC<FieldSetLegendProps>;
11
13
  export {};
@@ -1,10 +1,14 @@
1
1
  import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
2
2
  declare const _default: ComponentMeta<import("react").FC<Readonly<{
3
3
  children?: import("react").ReactNode;
4
+ selected?: boolean | undefined;
5
+ id?: string | undefined;
4
6
  name?: string | undefined;
5
7
  }>>>;
6
8
  export default _default;
7
9
  export declare const Default: ComponentStoryFn<import("react").FC<Readonly<{
8
10
  children?: import("react").ReactNode;
11
+ selected?: boolean | undefined;
12
+ id?: string | undefined;
9
13
  name?: string | undefined;
10
14
  }>>>;
@@ -0,0 +1 @@
1
+ export declare const form: string;
@@ -0,0 +1,8 @@
1
+ import type { Handler } from "@prismicio/editor-support/Type";
2
+ import type { ReactNode } from "react";
3
+ interface Props {
4
+ children?: ReactNode;
5
+ onSubmit: Handler;
6
+ }
7
+ export declare function Form(props: Props): JSX.Element;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
2
+ import { Form } from "./";
3
+ declare const _default: ComponentMeta<typeof Form>;
4
+ export default _default;
5
+ export declare const Default: ComponentStoryFn<typeof Form>;
@@ -0,0 +1,3 @@
1
+ export declare const root: string;
2
+ export declare const inlineBox: string;
3
+ export declare const input: string;
@@ -0,0 +1,8 @@
1
+ export interface FormBaseInputProps {
2
+ type?: "text" | "email" | "password";
3
+ label?: string;
4
+ placeholder?: string;
5
+ value: string;
6
+ onValueChange?: (value: string) => void;
7
+ }
8
+ export declare function FormInput(props: FormBaseInputProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Form } from "./Form";
2
+ export { FormInput } from "./FormInput";
@@ -1,8 +1,3 @@
1
- export declare const color: {
2
- grey2: string;
3
- grey11: string;
4
- inherit: string;
5
- };
6
1
  export declare const size: {
7
2
  xs: string;
8
3
  small: string;