@prismicio/editor-ui 0.4.15 → 0.4.16

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.
@@ -1,7 +1,9 @@
1
+ import { Time } from "@internationalized/date";
1
2
  import { type SX } from "../../theme/util";
2
3
  export type DateInputProps = {
3
4
  value?: Date;
4
5
  mode: Mode;
6
+ defaultTime?: Time;
5
7
  readOnly?: boolean;
6
8
  /**
7
9
  * The minimum allowed date that a user may select.
@@ -1,3 +1,9 @@
1
- import type { DateValue } from "@internationalized/date";
1
+ import { CalendarDate, type DateValue, type Time, ZonedDateTime } from "@internationalized/date";
2
2
  import { type AriaDateFieldProps } from "@react-aria/datepicker";
3
- export declare const DateSegments: (props: AriaDateFieldProps<DateValue>) => JSX.Element;
3
+ interface DateSegmentsProps {
4
+ ariaDateFieldProps: AriaDateFieldProps<DateValue>;
5
+ defaultTime?: Time;
6
+ placeholderValue: CalendarDate | ZonedDateTime;
7
+ }
8
+ export declare function DateSegments(props: DateSegmentsProps): JSX.Element;
9
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { colors } from "../../theme/colors";
2
2
  import { variant as textVariants } from "../Text/Text.css";
3
3
  export interface EditableTextProps {
4
+ "aria-label": string;
4
5
  value: string;
5
6
  onFocus?: () => void;
6
7
  onBlur?: () => void;
@@ -3,6 +3,7 @@ export default _default;
3
3
  export declare const Default: {
4
4
  render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./EditableText").EditableTextProps>;
5
5
  args: {
6
+ "aria-label": string;
6
7
  value: string;
7
8
  color: string;
8
9
  variant: string;
@@ -1,8 +1,10 @@
1
+ import { Time } from "@internationalized/date";
1
2
  import type { SX } from "../../theme/util";
2
3
  import type { DateInputProps } from "../DateInput/DateInput";
3
4
  export interface FormDateInputProps {
4
5
  label: string;
5
6
  value?: Date;
7
+ defaultTime?: Time;
6
8
  mode: DateInputProps["mode"];
7
9
  /**
8
10
  * The minimum allowed date that a user may select.
@@ -3,13 +3,28 @@ export declare const cursor: {
3
3
  default: string;
4
4
  pointer: string;
5
5
  };
6
- export declare const size: {
6
+ export declare const noPaddingSize: {
7
7
  small: string;
8
8
  medium: string;
9
9
  large: string;
10
10
  };
11
- export declare const noPaddingSize: {
11
+ export declare const radius: {
12
+ medium: string;
13
+ full: string;
14
+ };
15
+ export declare const size: {
12
16
  small: string;
13
17
  medium: string;
14
18
  large: string;
15
19
  };
20
+ export declare const variant: {
21
+ ghost: string;
22
+ solid: string;
23
+ };
24
+ export declare const color: {
25
+ grey: string;
26
+ green: string;
27
+ amber: string;
28
+ purple: string;
29
+ tomato: string;
30
+ };
@@ -1,13 +1,14 @@
1
- import type { ThemeColor } from "../../theme/colors";
2
1
  import type { IconName } from "../Icon/iconNames";
3
2
  import * as styles from "./IconButton.css";
4
3
  export interface IconButtonProps {
5
- icon: IconName;
6
- size?: keyof typeof styles.size;
4
+ color?: keyof typeof styles.color;
7
5
  cursor?: keyof typeof styles.cursor;
8
6
  hasPadding?: boolean;
9
- color?: ThemeColor;
7
+ icon: IconName | JSX.Element;
10
8
  loading?: boolean;
11
9
  onClick?: () => void;
10
+ radius?: keyof typeof styles.radius;
11
+ size?: keyof typeof styles.size;
12
+ variant?: keyof typeof styles.variant;
12
13
  }
13
14
  export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,12 +1,10 @@
1
1
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./IconButton").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
2
2
  export default _default;
3
3
  export declare const Default: {
4
+ render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./IconButton").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
4
5
  args: {
5
6
  icon: string;
6
7
  cursor: string;
7
- loading: boolean;
8
- hasPadding: boolean;
9
- size: string;
10
8
  };
11
9
  name: string;
12
10
  };
@@ -1,7 +1,6 @@
1
- type Props = Readonly<{
1
+ export interface SearchInputProps {
2
2
  value: string;
3
3
  onValueChange: (value: string) => void;
4
4
  placeholder?: string;
5
- }>;
6
- export declare const SearchInput: ({ onValueChange, value, ...props }: Props) => JSX.Element;
7
- export {};
5
+ }
6
+ export declare function SearchInput(props: SearchInputProps): JSX.Element;
@@ -1,15 +1,7 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, Readonly<{
2
- value: string;
3
- onValueChange: (value: string) => void;
4
- placeholder?: string | undefined;
5
- }>>;
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./SearchInput").SearchInputProps>;
6
2
  export default _default;
7
3
  export declare const Default: {
8
- render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, Readonly<{
9
- value: string;
10
- onValueChange: (value: string) => void;
11
- placeholder?: string | undefined;
12
- }>>;
4
+ render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./SearchInput").SearchInputProps>;
13
5
  args: {
14
6
  value: string;
15
7
  placeholder: string;
@@ -1,4 +1,5 @@
1
1
  import { type PropsWithChildren } from "react";
2
+ import type { IconName } from "../Icon";
2
3
  interface ToastConfig {
3
4
  title: string;
4
5
  seconds?: number;
@@ -6,6 +7,7 @@ interface ToastConfig {
6
7
  title: string;
7
8
  onClick: () => void;
8
9
  };
10
+ icon?: IconName;
9
11
  }
10
12
  interface ToastContext {
11
13
  showToast: (config: ToastConfig) => void;