@blockbite/ui 2.0.28 → 2.1.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.
@@ -1,4 +1,4 @@
1
- type ChapterDividerProps = {
1
+ type ChapterHeadingProps = {
2
2
  title?: string;
3
3
  className?: string;
4
4
  help?: string;
@@ -7,5 +7,5 @@ type ChapterDividerProps = {
7
7
  gradient?: boolean;
8
8
  [key: string]: any;
9
9
  };
10
- export declare const ChapterDivider: ({ title, className, help, badge, addon, line, ...props }: ChapterDividerProps) => JSX.Element;
10
+ export declare const ChapterHeading: ({ title, className, help, badge, addon, ...props }: ChapterHeadingProps) => JSX.Element;
11
11
  export {};
@@ -3,7 +3,8 @@ type Props = {
3
3
  title: string;
4
4
  description: string;
5
5
  children?: React.ReactNode;
6
+ size?: 'small' | 'medium';
6
7
  [key: string]: any;
7
8
  };
8
- export declare function EmptyState({ icon, title, description, children, ...rest }: Props): JSX.Element;
9
+ export declare function EmptyState({ icon, title, description, children, size, ...rest }: Props): JSX.Element;
9
10
  export {};
@@ -22,9 +22,25 @@ export type GradientSwatchPickerProps = {
22
22
  colors: PaletteColor[];
23
23
  activeOptionValue?: any;
24
24
  onChange?: (nextClassGroups: any) => void;
25
+ onGradientChange?: (value: TailwindGradientValue) => void;
25
26
  };
26
27
  export declare function classGroupsToGradientValue(groups: Record<string, any> | null | undefined, palette: PaletteColor[]): TailwindGradientValue | null;
27
28
  export declare function gradientValueToClassGroups(value: TailwindGradientValue): Record<string, any>;
29
+ export declare function gradientDirectionToCoords(direction: Direction): {
30
+ x1: string;
31
+ y1: string;
32
+ x2: string;
33
+ y2: string;
34
+ };
35
+ export declare function gradientArrayToClassGroups(items?: Array<{
36
+ id: string;
37
+ value: string;
38
+ }>): Record<string, any>;
39
+ export declare function gradientArrayToClassString(items?: Array<{
40
+ id: string;
41
+ value: string;
42
+ }>): string;
43
+ export declare function resolveGradientStopColor(token: string, prefix?: 'color' | 'bb-color'): string;
28
44
  export declare function gradientClassGroupsToArray(groups: Record<string, any>): Array<{
29
45
  id: string;
30
46
  value: string;
@@ -1,4 +1 @@
1
- export declare function MediaPicker({ mediaProps, mediaCallback }: {
2
- mediaProps: any;
3
- mediaCallback: any;
4
- }): JSX.Element;
1
+ export declare function MediaPicker({ mediaProps, mediaCallback, className }: any): JSX.Element;
package/dist/Notice.d.ts CHANGED
@@ -2,6 +2,8 @@ type NoticeProps = {
2
2
  children: React.ReactNode;
3
3
  className?: string;
4
4
  status?: 'success' | 'error' | 'warning' | 'info';
5
+ isDismissible?: boolean;
6
+ onDismiss?: () => void;
5
7
  };
6
- export declare const Notice: ({ children, status, className, }: NoticeProps) => JSX.Element;
8
+ export declare const Notice: ({ children, status, className, isDismissible, onDismiss, }: NoticeProps) => JSX.Element;
7
9
  export {};
@@ -0,0 +1,17 @@
1
+ import { Button as WordpressButton } from '@wordpress/components';
2
+ type SaveButtonProps = {
3
+ children?: React.ReactNode;
4
+ asChild?: boolean;
5
+ className?: string;
6
+ display?: 'icon' | 'icon-lg' | 'label' | 'auto' | '' | null;
7
+ onClick?: () => void | Promise<void>;
8
+ label?: string;
9
+ savedLabel?: string;
10
+ savedDuration?: number;
11
+ size?: 'small' | 'default' | 'compact';
12
+ variant?: 'primary' | 'secondary' | 'link' | 'primary' | 'tertiary';
13
+ icon?: any;
14
+ disabled?: boolean;
15
+ } & Omit<React.ComponentProps<typeof WordpressButton>, 'onClick' | 'size'>;
16
+ export declare const SaveButton: ({ children, size, label, className, onClick, variant, display, icon, disabled, savedLabel, savedDuration, ...buttonProps }: SaveButtonProps) => JSX.Element;
17
+ export {};
@@ -5,13 +5,22 @@ type TagInputProps = {
5
5
  label?: string;
6
6
  helper?: string;
7
7
  placeholder?: string;
8
+ css?: string;
8
9
  onChange?: (tokens: string[]) => void;
9
10
  onInputChange?: (inputValue: string) => void;
11
+ colorTokenClasses?: Record<string, string>;
10
12
  suggestions?: string[];
13
+ onLoadMore?: () => void;
14
+ hasMore?: boolean;
15
+ isLoading?: boolean;
16
+ /** If true, user can add arbitrary tokens (not only suggestions). Default true. */
17
+ allowCustom?: boolean;
18
+ /** If true, tokens are de-duped. Default true. */
19
+ dedupe?: boolean;
11
20
  [key: string]: any;
12
21
  };
13
22
  export declare const TagInput: {
14
- ({ className, inputClassName, value, label, helper, placeholder, onChange, onInputChange, suggestions, ...props }: TagInputProps): JSX.Element;
23
+ ({ className, inputClassName, value, label, helper, placeholder, onChange, onInputChange, colorTokenClasses, suggestions, onLoadMore, css, hasMore, isLoading, allowCustom, dedupe, ...props }: TagInputProps): JSX.Element;
15
24
  displayName: string;
16
25
  };
17
- export {};
26
+ export default TagInput;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  export { AutocompleteDropdown } from './AutocompleteDropdown.js';
2
2
  export { Badge } from './Badge.js';
3
3
  export { BitePreview } from './BitePreview.js';
4
- export { Button } from './Button.js';
5
4
  export { ButtonToggle } from './ButtonToggle.js';
6
5
  export { ButtonToggleGroup } from './ButtonToggle.js';
7
6
  export { Chapter } from './Chapter.js';
8
- export { ChapterDivider } from './ChapterDivider.js';
7
+ export { ChapterHeading } from './ChapterHeading.js';
9
8
  export { Checkbox } from './Checkbox.js';
10
9
  export { DataItemList } from './DataItemList.js';
11
10
  export { DisappearingMessage } from './DisappearingMessage.js';
@@ -15,6 +14,10 @@ export { FloatingPanel } from './FloatingPanel.js';
15
14
  export { FocalPointControl } from './FocalPointControl.js';
16
15
  export { classGroupsToGradientValue } from './GradientSwatchPicker.js';
17
16
  export { gradientValueToClassGroups } from './GradientSwatchPicker.js';
17
+ export { gradientDirectionToCoords } from './GradientSwatchPicker.js';
18
+ export { gradientArrayToClassGroups } from './GradientSwatchPicker.js';
19
+ export { gradientArrayToClassString } from './GradientSwatchPicker.js';
20
+ export { resolveGradientStopColor } from './GradientSwatchPicker.js';
18
21
  export { gradientClassGroupsToArray } from './GradientSwatchPicker.js';
19
22
  export { gradientValueToArray } from './GradientSwatchPicker.js';
20
23
  export { arrayToGradient } from './GradientSwatchPicker.js';
@@ -40,6 +43,7 @@ export { ProjectsNavigation } from './ProjectsNavigation.js';
40
43
  export { RangeSlider } from './RangeSlider.js';
41
44
  export { ResponsiveImage } from './ResponsiveImage.js';
42
45
  export { ResponsiveVideo } from './ResponsiveVideo.js';
46
+ export { SaveButton } from './SaveButton.js';
43
47
  export { ScrollList } from './ScrollList.js';
44
48
  export { SelectControlWrapper } from './SelectControlWrapper.js';
45
49
  export { SingleBlockTypeAppender } from './SingleBlockTypeAppender.js';