@prismicio/editor-ui 0.4.12 → 0.4.14

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 (167) hide show
  1. package/dist/components/ActionList/ActionList.d.ts +2 -2
  2. package/dist/components/Alert/Alert.d.ts +1 -1
  3. package/dist/components/Alert/AlertContext.d.ts +3 -3
  4. package/dist/components/Alert/index.d.ts +1 -1
  5. package/dist/components/AnimatedElement/AnimatedElement.css.d.ts +1 -0
  6. package/dist/components/AnimatedElement/AnimatedElement.d.ts +4 -4
  7. package/dist/components/AnimatedElement/index.d.ts +1 -1
  8. package/dist/components/AnimatedList/AnimatedList.d.ts +4 -4
  9. package/dist/components/AnimatedList/DragPreview.d.ts +2 -2
  10. package/dist/components/AnimatedList/autoScroll.d.ts +1 -1
  11. package/dist/components/AnimatedList/dnd.d.ts +8 -8
  12. package/dist/components/AnimatedList/layout.d.ts +1 -1
  13. package/dist/components/Avatar/Avatar.css.d.ts +3 -0
  14. package/dist/components/Avatar/Avatar.d.ts +7 -0
  15. package/dist/components/Avatar/Avatar.stories.d.ts +10 -0
  16. package/dist/components/Avatar/index.d.ts +1 -0
  17. package/dist/components/Badge/Badge.css.d.ts +2 -1
  18. package/dist/components/Badge/Badge.d.ts +6 -2
  19. package/dist/components/Badge/Badge.stories.d.ts +5 -2
  20. package/dist/components/BaseInput/BaseInput.css.d.ts +2 -1
  21. package/dist/components/BaseInput/BaseInput.d.ts +5 -1
  22. package/dist/components/BlankSlate/BlankSlate.css.d.ts +1 -0
  23. package/dist/components/BlankSlate/BlankSlate.d.ts +5 -2
  24. package/dist/components/Box/Box.d.ts +23 -21
  25. package/dist/components/Box/Box.stories.d.ts +2 -124
  26. package/dist/components/Button/Button.d.ts +4 -2
  27. package/dist/components/ButtonGroup/ButtonGroup.d.ts +1 -1
  28. package/dist/components/Calendar/Calendar.d.ts +3 -2
  29. package/dist/components/Calendar/Calendar.stories.d.ts +3 -0
  30. package/dist/components/Calendar/CalendarCell.css.d.ts +1 -0
  31. package/dist/components/Calendar/CalendarCell.d.ts +4 -4
  32. package/dist/components/Calendar/CalendarGrid.d.ts +2 -2
  33. package/dist/components/Card/Card.d.ts +16 -16
  34. package/dist/components/Card/Card.stories.d.ts +2 -14
  35. package/dist/components/Carousel/Carousel.css.d.ts +0 -2
  36. package/dist/components/Carousel/CarouselItem.d.ts +2 -2
  37. package/dist/components/CircledIcon/CircledIcon.d.ts +1 -1
  38. package/dist/components/ColorInput/ColorArea.d.ts +1 -1
  39. package/dist/components/ColorInput/ColorInput.d.ts +1 -1
  40. package/dist/components/ColorInput/ColorSlider.d.ts +1 -1
  41. package/dist/components/Cropper/Cropper.d.ts +1 -1
  42. package/dist/components/CropperControls/CropperControls.d.ts +5 -5
  43. package/dist/components/DateInput/DateInput.d.ts +12 -6
  44. package/dist/components/DateInput/DateInput.stories.d.ts +2 -14
  45. package/dist/components/DateInput/DateSegments.d.ts +1 -1
  46. package/dist/components/Dialog/Dialog.css.d.ts +4 -0
  47. package/dist/components/Dialog/Dialog.d.ts +4 -1
  48. package/dist/components/Dialog/Dialog.stories.d.ts +3 -0
  49. package/dist/components/Dialog/FullscreenDialog.d.ts +1 -1
  50. package/dist/components/Dialog/Options/DialogOptions.d.ts +1 -1
  51. package/dist/components/DocumentCard/DocumentCard.css.d.ts +1 -0
  52. package/dist/components/DocumentCard/DocumentCard.d.ts +2 -0
  53. package/dist/components/DocumentStatusBar/DocumentStatusBar.d.ts +1 -1
  54. package/dist/components/DocumentStatusDot/DocumentStatusDot.d.ts +1 -1
  55. package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
  56. package/dist/components/Embed/EmbedPreview.d.ts +1 -1
  57. package/dist/components/Embed/EmptyEmbed.d.ts +1 -1
  58. package/dist/components/Embed/Icon.d.ts +1 -1
  59. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +3 -3
  60. package/dist/components/Field/Field.d.ts +1 -1
  61. package/dist/components/FieldSet/FieldSet.d.ts +4 -4
  62. package/dist/components/FieldSet/FieldSet.stories.d.ts +1 -6
  63. package/dist/components/FieldSet/FieldSet.utils.d.ts +4 -0
  64. package/dist/components/FieldSet/index.d.ts +1 -0
  65. package/dist/components/FileUpload/FileDropZone/FileDropZone.d.ts +1 -1
  66. package/dist/components/FileUpload/FileUpload.utils.d.ts +5 -1
  67. package/dist/components/FilterField/FilterField.d.ts +2 -2
  68. package/dist/components/FilterField/useFilterField.d.ts +2 -1
  69. package/dist/components/Form/Form.d.ts +2 -0
  70. package/dist/components/Form/FormDateInput.d.ts +14 -0
  71. package/dist/components/Form/FormField.css.d.ts +7 -0
  72. package/dist/components/Form/FormField.d.ts +14 -0
  73. package/dist/components/Form/FormInput.css.d.ts +4 -6
  74. package/dist/components/Form/FormInput.d.ts +5 -5
  75. package/dist/components/Form/index.d.ts +1 -0
  76. package/dist/components/Gradient/Gradient.d.ts +1 -1
  77. package/dist/components/HairlineButton/HairlineButton.d.ts +2 -2
  78. package/dist/components/Icon/Icon.d.ts +3 -1
  79. package/dist/components/Icon/iconNames.d.ts +2 -2
  80. package/dist/components/Image/Image.d.ts +4 -5
  81. package/dist/components/Image/Image.stories.d.ts +2 -22
  82. package/dist/components/Image/index.d.ts +1 -1
  83. package/dist/components/InvisibleButton/InvisibleButton.d.ts +1 -1
  84. package/dist/components/LazyRender/LazyRender.d.ts +21 -0
  85. package/dist/components/LazyRender/LazyRender.stories.d.ts +7 -0
  86. package/dist/components/LazyRender/index.d.ts +1 -0
  87. package/dist/components/LinkImageCard/LinkImageCard.d.ts +8 -0
  88. package/dist/components/LinkImageCard/LinkImageCard.stories.d.ts +11 -0
  89. package/dist/components/LinkImageCard/index.d.ts +1 -0
  90. package/dist/components/Masonry/Masonry.d.ts +1 -1
  91. package/dist/components/Masonry/MasonryFile.css.d.ts +2 -0
  92. package/dist/components/Masonry/MasonryFile.d.ts +8 -0
  93. package/dist/components/Masonry/MasonryMedia.d.ts +1 -2
  94. package/dist/components/Masonry/index.d.ts +2 -1
  95. package/dist/components/NumberInput/NumberInput.d.ts +2 -1
  96. package/dist/components/Popover/Popover.d.ts +8 -3
  97. package/dist/components/Popover/Popover.stories.d.ts +2 -20
  98. package/dist/components/Popover/index.d.ts +1 -1
  99. package/dist/components/Radio/RadioButton.css.d.ts +3 -0
  100. package/dist/components/Radio/RadioButton.d.ts +10 -0
  101. package/dist/components/Radio/RadioCard.css.d.ts +1 -0
  102. package/dist/components/Radio/RadioCard.d.ts +5 -0
  103. package/dist/components/Radio/RadioGroup.css.d.ts +1 -0
  104. package/dist/components/Radio/RadioGroup.d.ts +18 -0
  105. package/dist/components/Radio/RadioGroup.stories.d.ts +9 -0
  106. package/dist/components/Radio/RadioItem.css.d.ts +10 -0
  107. package/dist/components/Radio/RadioItem.d.ts +8 -0
  108. package/dist/components/Radio/index.d.ts +3 -0
  109. package/dist/components/ScrollArea/ScrollArea.d.ts +4 -5
  110. package/dist/components/ScrollArea/ScrollArea.stories.d.ts +2 -14
  111. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  112. package/dist/components/Select/Select.css.d.ts +4 -0
  113. package/dist/components/Select/Select.d.ts +7 -2
  114. package/dist/components/SelectButton/SelectButton.d.ts +1 -1
  115. package/dist/components/SelectCard/SelectButton.stories.d.ts +12 -0
  116. package/dist/components/SelectCard/SelectCard.css.d.ts +1 -0
  117. package/dist/components/SelectCard/SelectCard.d.ts +7 -0
  118. package/dist/components/SelectCard/index.d.ts +1 -0
  119. package/dist/components/Separator/Separator.d.ts +11 -5
  120. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  121. package/dist/components/Slice/Slice.stories.d.ts +2 -2
  122. package/dist/components/Slice/SliceCard.d.ts +1 -0
  123. package/dist/components/Slice/{SliceVariationCard.css.d.ts → SliceSelectCard.css.d.ts} +2 -0
  124. package/dist/components/Slice/SliceSelectCard.d.ts +12 -0
  125. package/dist/components/Slice/index.d.ts +1 -1
  126. package/dist/components/Slider/Slider.d.ts +1 -1
  127. package/dist/components/StoryCard.d.ts +12 -0
  128. package/dist/components/Table/Table.css.d.ts +9 -0
  129. package/dist/components/Table/Table.d.ts +24 -0
  130. package/dist/components/Table/Table.stories.d.ts +6 -0
  131. package/dist/components/Table/index.d.ts +1 -0
  132. package/dist/components/TagField/TagField.css.d.ts +0 -5
  133. package/dist/components/TagField/TagFieldHeader.css.d.ts +6 -0
  134. package/dist/components/TagField/TagFieldHeader.d.ts +21 -0
  135. package/dist/components/TagField/useTagField.d.ts +5 -31
  136. package/dist/components/TagField/useTagFieldHeader.d.ts +24 -0
  137. package/dist/components/Text/Text.css.d.ts +3 -0
  138. package/dist/components/Text/Text.d.ts +4 -3
  139. package/dist/components/Text/index.d.ts +1 -1
  140. package/dist/components/TextArea/TextArea.d.ts +2 -1
  141. package/dist/components/TextInput/TextInput.d.ts +4 -1
  142. package/dist/components/TextLink/TextLink.css.d.ts +2 -0
  143. package/dist/components/TextLink/TextLink.d.ts +3 -1
  144. package/dist/components/Toast/Toast.d.ts +2 -2
  145. package/dist/components/Toast/Toast.stories.d.ts +2 -2
  146. package/dist/components/Toast/ToastContext.d.ts +1 -1
  147. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  148. package/dist/components/Toolbar/Toolbar.d.ts +6 -5
  149. package/dist/components/Tooltip/Tooltip.d.ts +14 -1
  150. package/dist/components/Video/Video.d.ts +2 -1
  151. package/dist/components/Video/Video.stories.d.ts +2 -1
  152. package/dist/components/Video/index.d.ts +1 -1
  153. package/dist/index.d.ts +18 -12
  154. package/dist/index.es.js +15679 -16180
  155. package/dist/style.css +1 -1
  156. package/dist/theme/colors.d.ts +65 -65
  157. package/dist/theme/mediaQueries.d.ts +5 -0
  158. package/dist/theme/selectors.d.ts +21 -21
  159. package/dist/theme/sprinkles.css.d.ts +8324 -536
  160. package/dist/theme/util.d.ts +12 -2
  161. package/dist/theme/vars.css.d.ts +137 -73
  162. package/package.json +16 -14
  163. package/dist/components/DocumentVersions/DocumentVersions.css.d.ts +0 -4
  164. package/dist/components/DocumentVersions/DocumentVersions.d.ts +0 -16
  165. package/dist/components/DocumentVersions/DocumentVersions.stories.d.ts +0 -31
  166. package/dist/components/DocumentVersions/index.d.ts +0 -1
  167. package/dist/components/Slice/SliceVariationCard.d.ts +0 -8
@@ -1,23 +1,23 @@
1
- import type { CSSProperties, FC, PropsWithChildren, ReactNode } from "react";
1
+ import type { PropsWithChildren, ReactNode } from "react";
2
+ import { type SX } from "../../theme/util";
2
3
  import * as styles from "./Card.css";
3
- declare type CardProps = Readonly<{
4
+ export interface CardProps {
4
5
  children?: ReactNode;
5
- className?: string;
6
6
  color?: keyof typeof styles.color;
7
- style?: CSSProperties;
8
7
  variant?: keyof typeof styles.variant;
9
- }>;
10
- export declare const Card: FC<CardProps>;
11
- export declare const CardHeader: FC<PropsWithChildren>;
12
- export declare const CardHeaderTitle: FC<PropsWithChildren>;
13
- declare type CardHeaderActionsProps = Readonly<{
8
+ sx?: SX;
9
+ }
10
+ export declare function Card(props: CardProps): JSX.Element;
11
+ export declare function CardHeader(props: PropsWithChildren): JSX.Element;
12
+ export declare function CardHeaderTitle(props: PropsWithChildren): JSX.Element;
13
+ interface CardHeaderActionsProps {
14
14
  children?: ReactNode;
15
- style?: CSSProperties;
16
- }>;
17
- export declare const CardHeaderActions: FC<CardHeaderActionsProps>;
18
- declare type CardContentProps = Readonly<{
15
+ sx?: SX;
16
+ }
17
+ export declare function CardHeaderActions(props: CardHeaderActionsProps): JSX.Element;
18
+ interface CardContentProps {
19
19
  children?: ReactNode;
20
- style?: CSSProperties;
21
- }>;
22
- export declare const CardContent: FC<CardContentProps>;
20
+ sx?: SX;
21
+ }
22
+ export declare function CardContent(props: CardContentProps): JSX.Element;
23
23
  export {};
@@ -1,19 +1,7 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, Readonly<{
2
- children?: import("react").ReactNode;
3
- className?: string | undefined;
4
- color?: "indigo2" | "grey1" | "grey2" | "grey3" | undefined;
5
- style?: import("react").CSSProperties | undefined;
6
- variant?: "dashed" | "selected" | "elevated" | "outlined" | undefined;
7
- }>>;
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./Card").CardProps>;
8
2
  export default _default;
9
3
  export declare const Default: {
10
- render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, Readonly<{
11
- children?: import("react").ReactNode;
12
- className?: string | undefined;
13
- color?: "indigo2" | "grey1" | "grey2" | "grey3" | undefined;
14
- style?: import("react").CSSProperties | undefined;
15
- variant?: "dashed" | "selected" | "elevated" | "outlined" | undefined;
16
- }>>;
4
+ render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./Card").CardProps>;
17
5
  args: {
18
6
  color: string;
19
7
  variant: string;
@@ -2,5 +2,3 @@ export declare const root: string;
2
2
  export declare const direction: Record<"idle" | "prev" | "next", string>;
3
3
  export declare const button: string;
4
4
  export declare const buttonIcon: string;
5
- export declare const prevButton: string;
6
- export declare const nextButton: string;
@@ -1,5 +1,5 @@
1
- import { FC, Key } from "react";
2
- import { ImageProps } from "../Image/Image";
1
+ import { type FC, type Key } from "react";
2
+ import { type ImageProps } from "../Image/Image";
3
3
  export interface CarouselItemProps extends ImageProps {
4
4
  key: Key;
5
5
  isUpdating?: boolean;
@@ -1,4 +1,4 @@
1
- import { IconName } from "../Icon";
1
+ import { type IconName } from "../Icon";
2
2
  import * as styles from "./CircledIconStyles.css";
3
3
  export interface CircledIconProps {
4
4
  iconName: IconName;
@@ -1,2 +1,2 @@
1
- import { ColorAreaProps } from "@react-stately/color";
1
+ import { type ColorAreaProps } from "@react-stately/color";
2
2
  export declare const ColorArea: (props: ColorAreaProps) => JSX.Element;
@@ -1,4 +1,4 @@
1
- declare type Props = {
1
+ type Props = {
2
2
  value?: string;
3
3
  onValueChange: (value?: string) => void;
4
4
  "aria-labelledby": string;
@@ -1,2 +1,2 @@
1
- import { ColorSliderStateOptions } from "@react-stately/color";
1
+ import { type ColorSliderStateOptions } from "@react-stately/color";
2
2
  export declare const ColorSlider: (props: Omit<ColorSliderStateOptions, "locale" | "channel">) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { type FC } from "react";
2
2
  import { type CropperProps as EasyCropperProps } from "react-easy-crop";
3
- declare type CropperProps = Pick<EasyCropperProps, "image" | "zoom" | "crop" | "aspect" | "onZoomChange" | "onCropChange" | "onCropAreaChange" | "initialCroppedAreaPixels">;
3
+ type CropperProps = Pick<EasyCropperProps, "image" | "zoom" | "crop" | "aspect" | "onZoomChange" | "onCropChange" | "onCropAreaChange" | "initialCroppedAreaPixels">;
4
4
  export declare const Cropper: FC<CropperProps>;
5
5
  export {};
@@ -1,14 +1,14 @@
1
- declare type Orientation = "landscape" | "portrait";
1
+ type Orientation = "landscape" | "portrait";
2
2
  declare const aspectRatioOptions: readonly ["1:1", "16:9", "4:3"];
3
- declare type AspectRatioOption = typeof aspectRatioOptions[number];
4
- declare type AspectRatio = [Orientation, AspectRatioOption];
5
- declare type CropArea = Readonly<{
3
+ type AspectRatioOption = typeof aspectRatioOptions[number];
4
+ type AspectRatio = [Orientation, AspectRatioOption];
5
+ type CropArea = Readonly<{
6
6
  x: number;
7
7
  y: number;
8
8
  width: number;
9
9
  height: number;
10
10
  }>;
11
- declare type Props = Readonly<{
11
+ type Props = Readonly<{
12
12
  image: string;
13
13
  crop: {
14
14
  x: number;
@@ -1,10 +1,16 @@
1
- declare type Mode = "date" | "date-time";
2
- declare type Props = {
3
- readOnly?: boolean;
4
- value?: string;
5
- onValueChange: (value?: string) => void;
1
+ import { type SX } from "../../theme/util";
2
+ export type DateInputProps = {
3
+ value?: Date;
6
4
  mode: Mode;
5
+ readOnly?: boolean;
6
+ /**
7
+ * The minimum allowed date that a user may select.
8
+ */
9
+ minValue?: "tomorrow";
7
10
  "aria-labelledby": string;
11
+ sx?: SX;
12
+ onValueChange: (value?: Date) => void;
8
13
  };
9
- export declare const DateInput: ({ "aria-labelledby": ariaLabelledBy, readOnly, value, onValueChange, mode }: Props) => JSX.Element;
14
+ type Mode = "date" | "date-time";
15
+ export declare function DateInput(props: DateInputProps): JSX.Element;
10
16
  export {};
@@ -1,19 +1,7 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, {
2
- readOnly?: boolean | undefined;
3
- value?: string | undefined;
4
- onValueChange: (value?: string | undefined) => void;
5
- mode: "date" | "date-time";
6
- "aria-labelledby": string;
7
- }>;
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./DateInput").DateInputProps>;
8
2
  export default _default;
9
3
  export declare const Default: {
10
- render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
11
- readOnly?: boolean | undefined;
12
- value?: string | undefined;
13
- onValueChange: (value?: string | undefined) => void;
14
- mode: "date" | "date-time";
15
- "aria-labelledby": string;
16
- }>;
4
+ render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./DateInput").DateInputProps>;
17
5
  args: {
18
6
  readOnly: boolean;
19
7
  mode: string;
@@ -1,3 +1,3 @@
1
1
  import type { DateValue } from "@internationalized/date";
2
- import { AriaDateFieldProps } from "@react-aria/datepicker";
2
+ import { type AriaDateFieldProps } from "@react-aria/datepicker";
3
3
  export declare const DateSegments: (props: AriaDateFieldProps<DateValue>) => JSX.Element;
@@ -4,6 +4,10 @@ export declare const containerSize: {
4
4
  small: string;
5
5
  };
6
6
  export declare const container: string;
7
+ export declare const containerPosition: {
8
+ center: string;
9
+ bottomRight: string;
10
+ };
7
11
  export declare const header: string;
8
12
  export declare const closeButton: string;
9
13
  export declare const content: string;
@@ -6,6 +6,7 @@ export interface Custom {
6
6
  height: number | "auto";
7
7
  }
8
8
  export interface DialogProps {
9
+ modal?: boolean;
9
10
  trigger?: ReactNode;
10
11
  children?: ReactNode;
11
12
  open?: boolean;
@@ -13,6 +14,7 @@ export interface DialogProps {
13
14
  onAnimationEnd?: () => void;
14
15
  hasClose?: boolean;
15
16
  size?: keyof typeof styles.containerSize | "fullscreen" | Custom;
17
+ position?: keyof typeof styles.containerPosition;
16
18
  }
17
19
  /**
18
20
  * A Dialog rendered in document.body.
@@ -21,11 +23,12 @@ export interface DialogProps {
21
23
  export declare function Dialog(props: DialogProps): JSX.Element;
22
24
  interface DialogHeaderProps {
23
25
  icon?: IconName;
26
+ onIconClick?: () => void;
24
27
  title: string;
25
28
  }
26
29
  export declare const DialogHeader: FC<DialogHeaderProps>;
27
30
  export declare const DialogContent: FC<PropsWithChildren>;
28
- declare type ActionsProps = {
31
+ type ActionsProps = {
29
32
  ok: {
30
33
  text: string;
31
34
  onClick: () => void;
@@ -20,6 +20,9 @@ export declare const Default: {
20
20
  render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./Dialog").DialogProps>;
21
21
  args: {
22
22
  open: boolean;
23
+ modal: boolean;
24
+ size: string;
25
+ position: string;
23
26
  trigger: JSX.Element;
24
27
  };
25
28
  name: string;
@@ -1,5 +1,5 @@
1
1
  import type { DialogProps } from "./Dialog";
2
- declare type Props = {
2
+ type Props = {
3
3
  onEscapeKeyDown: (evt: KeyboardEvent) => void;
4
4
  } & Pick<DialogProps, "open" | "onOpenChange" | "trigger" | "children" | "onAnimationEnd">;
5
5
  export declare function FullscreenDialog(props: Props): JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import { IconName } from "../../Icon";
2
+ import { type IconName } from "../../Icon";
3
3
  export interface DialogOptionsProps {
4
4
  value?: string;
5
5
  onValueChange?: (newValue: string) => void;
@@ -10,4 +10,5 @@ export declare const docStatus: string;
10
10
  export declare const footer: string;
11
11
  export declare const previewImage: string;
12
12
  export declare const tags: string;
13
+ export declare const tag: string;
13
14
  export declare const descriptionLoadingSkeleton: string;
@@ -1,3 +1,4 @@
1
+ import type { FilterOption } from "../FilterField";
1
2
  export interface DocumentCardProps extends DocumentTypeBadgeProps, TitleProps, DescriptionProps, PreviewImageProps, FooterProps {
2
3
  onSelect: () => void;
3
4
  documentURL: string;
@@ -23,5 +24,6 @@ interface PreviewImageProps {
23
24
  interface FooterProps {
24
25
  tags: string[];
25
26
  loading?: boolean;
27
+ tagsFilter?: Set<FilterOption>;
26
28
  }
27
29
  export {};
@@ -1,4 +1,4 @@
1
- declare type Props = {
1
+ type Props = {
2
2
  status: "published" | "release" | "archived" | "unclassified";
3
3
  };
4
4
  export declare const DocumentStatusBar: ({ status }: Props) => JSX.Element;
@@ -1,4 +1,4 @@
1
- declare type Props = {
1
+ type Props = {
2
2
  status: "published" | "release" | "archived" | "unclassified";
3
3
  };
4
4
  export declare const DocumentStatusDot: ({ status }: Props) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type ReactNode, MutableRefObject } from "react";
1
+ import { type MutableRefObject, type ReactNode } from "react";
2
2
  export interface DropdownMenuProps {
3
3
  modal?: boolean;
4
4
  children: ReactNode;
@@ -1,4 +1,4 @@
1
- declare type Props = {
1
+ type Props = {
2
2
  url: string;
3
3
  thumbnail: {
4
4
  url: string;
@@ -1,4 +1,4 @@
1
- declare type Props = {
1
+ type Props = {
2
2
  title: string;
3
3
  };
4
4
  export declare const EmptyEmbed: ({ title }: Props) => JSX.Element;
@@ -1,4 +1,4 @@
1
- declare type Props = {
1
+ type Props = {
2
2
  provider: string;
3
3
  };
4
4
  export declare const Icon: ({ provider }: Props) => JSX.Element;
@@ -1,6 +1,6 @@
1
- import { Fetcher } from "@prismicio/editor-support/Suspense";
1
+ import { type Fetcher } from "@prismicio/editor-support/Suspense";
2
2
  import type { Handler } from "@prismicio/editor-support/Type";
3
- import React, { ReactNode } from "react";
3
+ import React, { type ReactNode } from "react";
4
4
  export interface ErrorBoundaryProps {
5
5
  children?: ReactNode;
6
6
  renderError?: (error: unknown, reset: Handler) => ReactNode;
@@ -11,7 +11,7 @@ interface State {
11
11
  handleError?: boolean;
12
12
  requests: Map<Fetcher, Map<string, unknown[]>>;
13
13
  }
14
- declare type ErrorInterceptor = (error: unknown, resetBoundary: Handler) => boolean;
14
+ type ErrorInterceptor = (error: unknown, resetBoundary: Handler) => boolean;
15
15
  export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, State> {
16
16
  constructor(props: ErrorBoundaryProps);
17
17
  static registerGlobalErrorInterceptor(value: ErrorInterceptor): void;
@@ -1,5 +1,5 @@
1
1
  import { type PropsWithChildren, type ReactNode } from "react";
2
- import { IconName } from "../Icon";
2
+ import { type IconName } from "../Icon";
3
3
  import * as styles from "./Field.css";
4
4
  export interface FieldProps {
5
5
  children?: ReactNode;
@@ -1,13 +1,13 @@
1
1
  import type { FC, ReactNode } from "react";
2
- declare type FieldSetProps = Readonly<{
2
+ export interface FieldSetProps {
3
3
  children?: ReactNode;
4
4
  selected?: boolean;
5
5
  id?: string;
6
6
  name?: string;
7
- }>;
8
- export declare const FieldSet: FC<FieldSetProps>;
7
+ onFocus?: () => void;
8
+ }
9
+ export declare function FieldSet(props: FieldSetProps): JSX.Element;
9
10
  export interface FieldSetLegendProps {
10
11
  children?: ReactNode;
11
12
  }
12
13
  export declare const FieldSetLegend: FC<FieldSetLegendProps>;
13
- export {};
@@ -1,9 +1,4 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, Readonly<{
2
- children?: import("react").ReactNode;
3
- selected?: boolean | undefined;
4
- id?: string | undefined;
5
- name?: string | undefined;
6
- }>>;
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./FieldSet").FieldSetProps>;
7
2
  export default _default;
8
3
  export declare const Default: {
9
4
  args: {
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The gap between each field.
3
+ */
4
+ export declare const fieldSetGap: 16;
@@ -1 +1,2 @@
1
1
  export { FieldSet, FieldSetLegend } from "./FieldSet";
2
+ export { fieldSetGap } from "./FieldSet.utils";
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { type ReactNode } from "react";
2
2
  export interface FileDropZoneProps {
3
3
  onFilesSelected: (files: File[]) => void;
4
4
  overlay: ReactNode;
@@ -1 +1,5 @@
1
- export declare const validExtension = "image/";
1
+ export declare const validExtensions: {
2
+ readonly imageNonSpecific: "image/";
3
+ readonly imageAll: "image/*";
4
+ readonly applicationPdf: "application/pdf";
5
+ };
@@ -1,5 +1,5 @@
1
- import { IconName } from "../Icon";
2
- import { FilterOption } from "./useFilterField";
1
+ import { type IconName } from "../Icon";
2
+ import { type FilterOption } from "./useFilterField";
3
3
  export interface FilterFieldProps extends Omit<FooterProps, "searchText"> {
4
4
  open: boolean;
5
5
  setOpen: (open: boolean) => void;
@@ -1,4 +1,4 @@
1
- import { KeyboardEvent, RefObject } from "react";
1
+ import { type KeyboardEvent, type RefObject } from "react";
2
2
  export interface FilterOption {
3
3
  id: string;
4
4
  label: string;
@@ -17,5 +17,6 @@ export declare function useFilterField(props: UseFilterFieldProps): {
17
17
  searchText: string;
18
18
  setSearchText: import("react").Dispatch<import("react").SetStateAction<string>>;
19
19
  isFieldLocked: boolean;
20
+ inputPlaceholder: string;
20
21
  };
21
22
  export {};
@@ -1,7 +1,9 @@
1
1
  import type { Handler } from "@prismicio/editor-support/Type";
2
2
  import type { ReactNode } from "react";
3
+ import { type SX } from "../../theme/util";
3
4
  export interface FormProps {
4
5
  children?: ReactNode;
6
+ sx?: SX;
5
7
  onSubmit: Handler;
6
8
  }
7
9
  export declare function Form(props: FormProps): JSX.Element;
@@ -0,0 +1,14 @@
1
+ import type { SX } from "../../theme/util";
2
+ import type { DateInputProps } from "../DateInput/DateInput";
3
+ export interface FormDateInputProps {
4
+ label: string;
5
+ value?: Date;
6
+ mode: DateInputProps["mode"];
7
+ /**
8
+ * The minimum allowed date that a user may select.
9
+ */
10
+ minValue?: "tomorrow";
11
+ sx?: SX;
12
+ onValueChange: (value?: Date) => void;
13
+ }
14
+ export declare function FormDateInput(props: FormDateInputProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ export declare const root: string;
2
+ export declare const field: string;
3
+ export declare const fieldColor: {
4
+ normal: string;
5
+ error: string;
6
+ disabled: string;
7
+ };
@@ -0,0 +1,14 @@
1
+ import { type ReactNode } from "react";
2
+ import { type SX } from "../../theme/util";
3
+ export type FormFieldProps = {
4
+ children?: ReactNode;
5
+ disabled?: boolean;
6
+ error?: boolean;
7
+ sx?: SX;
8
+ } & LabelProps;
9
+ type LabelProps = {
10
+ label: string;
11
+ id: string;
12
+ } | object;
13
+ export declare const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<HTMLDivElement>>;
14
+ export {};
@@ -1,14 +1,12 @@
1
- export declare const root: string;
2
- export declare const inputContainer: {
3
- normal: string;
4
- error: string;
5
- disabled: string;
6
- };
7
1
  export declare const input: {
8
2
  small: string;
9
3
  medium: string;
10
4
  large: string;
11
5
  };
6
+ export declare const inputPadding: {
7
+ normal: string;
8
+ withIcon: string;
9
+ };
12
10
  export declare const inputColor: {
13
11
  error: string;
14
12
  normal: string;
@@ -1,16 +1,16 @@
1
- import type { KeyboardEventHandler } from "react";
2
- import { IconName } from "../Icon";
1
+ import { type KeyboardEventHandler } from "react";
2
+ import { type IconName } from "../Icon";
3
3
  import * as styles from "./FormInput.css";
4
- export interface FormBaseInputProps {
4
+ export interface FormInputProps {
5
5
  type?: "text" | "email" | "password";
6
6
  disabled?: boolean;
7
7
  label?: string;
8
8
  placeholder?: string;
9
9
  value: string;
10
10
  error?: boolean;
11
- onValueChange?: (value: string) => void;
12
11
  size?: keyof typeof styles.input;
13
12
  icon?: IconName;
14
13
  onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
14
+ onValueChange?: (value: string) => void;
15
15
  }
16
- export declare function FormInput(props: FormBaseInputProps): JSX.Element;
16
+ export declare function FormInput(props: FormInputProps): JSX.Element;
@@ -1,2 +1,3 @@
1
1
  export { Form } from "./Form";
2
+ export { FormDateInput } from "./FormDateInput";
2
3
  export { FormInput } from "./FormInput";
@@ -1,4 +1,4 @@
1
- import { SX } from "../../theme/util";
1
+ import { type SX } from "../../theme/util";
2
2
  export interface GradientProps {
3
3
  sx?: SX;
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import { type MouseEvent } from "react";
2
- import { SX } from "../../theme/util";
3
- import { IconName } from "../Icon";
2
+ import { type SX } from "../../theme/util";
3
+ import { type IconName } from "../Icon";
4
4
  export interface HairlineButtonProps {
5
5
  icon: IconName;
6
6
  disabled?: boolean;
@@ -1,4 +1,5 @@
1
- import { ThemeColor } from "../../theme/colors";
1
+ import { type ThemeColor } from "../../theme/colors";
2
+ import { type SX } from "../../theme/util";
2
3
  import * as styles from "./Icon.css";
3
4
  import type { IconName } from "./iconNames";
4
5
  export interface IconProps {
@@ -6,5 +7,6 @@ export interface IconProps {
6
7
  color?: ThemeColor;
7
8
  name: IconName;
8
9
  size?: keyof typeof styles.size;
10
+ sx?: SX;
9
11
  }
10
12
  export declare const Icon: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -1,2 +1,2 @@
1
- export declare const iconNames: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "notes", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "public", "refresh", "save", "schedule", "search", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "viewDay", "visibility", "zoomOutMap"];
2
- export declare type IconName = typeof iconNames[number];
1
+ export declare const iconNames: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "insertDriveFile", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "notes", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "viewDay", "visibility", "zoomOutMap"];
2
+ export type IconName = typeof iconNames[number];
@@ -1,5 +1,4 @@
1
- import { FC } from "react";
2
- export declare type ImageProps = Readonly<{
1
+ export interface ImageProps {
3
2
  src: string;
4
3
  alt?: string;
5
4
  loading?: "eager" | "lazy";
@@ -9,6 +8,6 @@ export declare type ImageProps = Readonly<{
9
8
  boxShadow?: "3";
10
9
  animateOnLoad?: boolean;
11
10
  onLoad?: () => void;
12
- }>;
13
- export declare const ImageComponent: FC<ImageProps>;
14
- export declare const SuspenseImage: FC<ImageProps>;
11
+ }
12
+ export declare function ImageComponent(props: ImageProps): JSX.Element;
13
+ export declare function SuspenseImage(props: ImageProps): JSX.Element;
@@ -1,27 +1,7 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, Readonly<{
2
- src: string;
3
- alt?: string | undefined;
4
- loading?: "eager" | "lazy" | undefined;
5
- decoding?: "auto" | "async" | "sync" | undefined;
6
- sizing?: "contain" | "none" | "cover" | undefined;
7
- borderRadius?: 0 | 4 | undefined;
8
- boxShadow?: "3" | undefined;
9
- animateOnLoad?: boolean | undefined;
10
- onLoad?: (() => void) | undefined;
11
- }>>;
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./Image").ImageProps>;
12
2
  export default _default;
13
3
  export declare const Default: {
14
- render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, Readonly<{
15
- src: string;
16
- alt?: string | undefined;
17
- loading?: "eager" | "lazy" | undefined;
18
- decoding?: "auto" | "async" | "sync" | undefined;
19
- sizing?: "contain" | "none" | "cover" | undefined;
20
- borderRadius?: 0 | 4 | undefined;
21
- boxShadow?: "3" | undefined;
22
- animateOnLoad?: boolean | undefined;
23
- onLoad?: (() => void) | undefined;
24
- }>>;
4
+ render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./Image").ImageProps>;
25
5
  args: {
26
6
  src: string;
27
7
  alt: string;
@@ -1 +1 @@
1
- export { type ImageProps, ImageComponent as Image, SuspenseImage } from "./Image";
1
+ export { ImageComponent as Image, type ImageProps, SuspenseImage } from "./Image";