@blockbite/ui 2.0.27 → 2.1.0
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/dist/ButtonToggle.d.ts +1 -1
- package/dist/ChapterDivider.d.ts +2 -2
- package/dist/DataItemList.d.ts +2 -1
- package/dist/EmptyState.d.ts +2 -1
- package/dist/GradientSwatchPicker.d.ts +48 -0
- package/dist/Modal.d.ts +10 -3
- package/dist/Tabs.d.ts +5 -5
- package/dist/TagInput.d.ts +4 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2710 -2153
- package/dist/index.js.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +5 -5
package/dist/ButtonToggle.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ type ButtonToggleGroupProps = {
|
|
|
27
27
|
display?: 'icon' | 'label' | '' | null;
|
|
28
28
|
variant?: 'primary' | 'secondary';
|
|
29
29
|
stretch?: boolean;
|
|
30
|
-
icon?:
|
|
30
|
+
icon?: JSX.Element;
|
|
31
31
|
onPressedChange?: (value: string) => void;
|
|
32
32
|
};
|
|
33
33
|
export declare const ButtonToggle: React.FC<Omit<ButtonToggleProps, 'defaultPressed'> & {
|
package/dist/ChapterDivider.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ type ChapterDividerProps = {
|
|
|
4
4
|
help?: string;
|
|
5
5
|
badge?: string;
|
|
6
6
|
addon?: React.ReactNode;
|
|
7
|
-
|
|
7
|
+
divider?: boolean;
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
};
|
|
10
|
-
export declare const ChapterDivider: ({ title, className, help, badge, addon,
|
|
10
|
+
export declare const ChapterDivider: ({ title, className, help, badge, addon, divider, ...props }: ChapterDividerProps) => JSX.Element;
|
|
11
11
|
export {};
|
package/dist/DataItemList.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ type DataListProps<T extends {
|
|
|
10
10
|
onUpdate: (id: T['id'], updates: Partial<T>) => void;
|
|
11
11
|
onSwitch: (prevId: T['id'], updates: Partial<T>) => void;
|
|
12
12
|
renderItemActions?: (item: T) => React.ReactNode;
|
|
13
|
+
renderItemContent?: (item: T, isActive: boolean) => React.ReactNode;
|
|
13
14
|
addons?: JSX.Element;
|
|
14
15
|
className?: string;
|
|
15
16
|
footerSlot?: React.ReactNode;
|
|
@@ -19,5 +20,5 @@ type DataListProps<T extends {
|
|
|
19
20
|
export declare const DataItemList: <T extends {
|
|
20
21
|
id: string | number;
|
|
21
22
|
title?: string;
|
|
22
|
-
}>({ data, active, setActive, onCreate, onDelete, onUpdate, onSwitch, renderItemActions, addons, className, footerSlot, footerSlotClassName, badge, }: DataListProps<T>) => JSX.Element;
|
|
23
|
+
}>({ data, active, setActive, onCreate, onDelete, onUpdate, onSwitch, renderItemActions, renderItemContent, addons, className, footerSlot, footerSlotClassName, badge, }: DataListProps<T>) => JSX.Element;
|
|
23
24
|
export default DataItemList;
|
package/dist/EmptyState.d.ts
CHANGED
|
@@ -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 {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type PaletteColor = {
|
|
2
|
+
name: string;
|
|
3
|
+
color: string;
|
|
4
|
+
value: string;
|
|
5
|
+
};
|
|
6
|
+
type GradientKind = 'linear' | 'radial';
|
|
7
|
+
type Direction = 'to-t' | 'to-tr' | 'to-r' | 'to-br' | 'to-b' | 'to-bl' | 'to-l' | 'to-tl';
|
|
8
|
+
type StopRole = 'from' | 'via' | 'to';
|
|
9
|
+
type GradientStop = {
|
|
10
|
+
id: string;
|
|
11
|
+
role: StopRole;
|
|
12
|
+
colorToken: string;
|
|
13
|
+
position: number;
|
|
14
|
+
opacity: number;
|
|
15
|
+
};
|
|
16
|
+
export type TailwindGradientValue = {
|
|
17
|
+
kind: GradientKind;
|
|
18
|
+
direction: Direction;
|
|
19
|
+
stops: GradientStop[];
|
|
20
|
+
};
|
|
21
|
+
export type GradientSwatchPickerProps = {
|
|
22
|
+
colors: PaletteColor[];
|
|
23
|
+
activeOptionValue?: any;
|
|
24
|
+
onChange?: (nextClassGroups: any) => void;
|
|
25
|
+
};
|
|
26
|
+
export declare function classGroupsToGradientValue(groups: Record<string, any> | null | undefined, palette: PaletteColor[]): TailwindGradientValue | null;
|
|
27
|
+
export declare function gradientValueToClassGroups(value: TailwindGradientValue): Record<string, any>;
|
|
28
|
+
export declare function gradientClassGroupsToArray(groups: Record<string, any>): Array<{
|
|
29
|
+
id: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}>;
|
|
32
|
+
export declare function gradientValueToArray(value: TailwindGradientValue): Array<{
|
|
33
|
+
id: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const arrayToGradient: (arr: Array<{
|
|
37
|
+
id: string;
|
|
38
|
+
value: string;
|
|
39
|
+
selector?: string;
|
|
40
|
+
}>) => TailwindGradientValue;
|
|
41
|
+
export declare function normalizeStops(stops: GradientStop[]): GradientStop[];
|
|
42
|
+
export type TailwindGradientPickerProps = {
|
|
43
|
+
palette: PaletteColor[];
|
|
44
|
+
value: TailwindGradientValue;
|
|
45
|
+
onChange: (value: TailwindGradientValue) => void;
|
|
46
|
+
};
|
|
47
|
+
export declare const TailwindGradientPicker: React.FC<TailwindGradientPickerProps>;
|
|
48
|
+
export {};
|
package/dist/Modal.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
export declare const useModalContext: () => any;
|
|
2
2
|
type ModalProps = {
|
|
3
3
|
children: React.ReactElement | React.ReactElement[];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/** controlled */
|
|
5
|
+
open?: boolean;
|
|
6
|
+
/** uncontrolled fallback */
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
title?: string;
|
|
7
10
|
size?: 'small' | 'medium' | 'large' | 'fill' | 'wide';
|
|
11
|
+
/** passthrough props */
|
|
12
|
+
onRequestClose?: () => void;
|
|
13
|
+
shouldCloseOnEsc?: boolean;
|
|
14
|
+
shouldCloseOnClickOutside?: boolean;
|
|
8
15
|
[key: string]: any;
|
|
9
16
|
};
|
|
10
17
|
export declare const Modal: React.FC<ModalProps>;
|
package/dist/Tabs.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ type TabsProps = {
|
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
style?: React.CSSProperties;
|
|
8
8
|
};
|
|
9
|
-
export declare const TabsWrapper: ({ children, defaultValue, value, onValueChange, ...rest }: TabsProps) => JSX.Element;
|
|
9
|
+
export declare const TabsWrapper: ({ children, defaultValue, value, onValueChange, className, ...rest }: TabsProps) => JSX.Element;
|
|
10
10
|
type TabsListProps = {
|
|
11
11
|
options: {
|
|
12
12
|
name: string;
|
|
13
|
-
title:
|
|
13
|
+
title: any;
|
|
14
14
|
icon?: any;
|
|
15
15
|
}[];
|
|
16
16
|
children?: React.ReactNode;
|
|
@@ -23,10 +23,10 @@ type TabsContentProps = {
|
|
|
23
23
|
children: React.ReactNode;
|
|
24
24
|
className?: string;
|
|
25
25
|
};
|
|
26
|
-
export declare const TabsContent: ({ value, children, className, }: TabsContentProps) => string | number | boolean |
|
|
26
|
+
export declare const TabsContent: ({ value, children, className, }: TabsContentProps) => string | number | boolean | Iterable<import('../wp.element').ReactNode> | JSX.Element;
|
|
27
27
|
export declare const Tabs: {
|
|
28
|
-
Wrapper: ({ children, defaultValue, value, onValueChange, ...rest }: TabsProps) => JSX.Element;
|
|
28
|
+
Wrapper: ({ children, defaultValue, value, onValueChange, className, ...rest }: TabsProps) => JSX.Element;
|
|
29
29
|
List: ({ options, children, className, onValueChange, }: TabsListProps) => JSX.Element;
|
|
30
|
-
Content: ({ value, children, className, }: TabsContentProps) => string | number | boolean |
|
|
30
|
+
Content: ({ value, children, className, }: TabsContentProps) => string | number | boolean | Iterable<import('../wp.element').ReactNode> | JSX.Element;
|
|
31
31
|
};
|
|
32
32
|
export {};
|
package/dist/TagInput.d.ts
CHANGED
|
@@ -8,10 +8,13 @@ type TagInputProps = {
|
|
|
8
8
|
onChange?: (tokens: string[]) => void;
|
|
9
9
|
onInputChange?: (inputValue: string) => void;
|
|
10
10
|
suggestions?: string[];
|
|
11
|
+
onLoadMore?: () => void;
|
|
12
|
+
hasMore?: boolean;
|
|
13
|
+
isLoading?: boolean;
|
|
11
14
|
[key: string]: any;
|
|
12
15
|
};
|
|
13
16
|
export declare const TagInput: {
|
|
14
|
-
({ className, inputClassName, value, label, helper, placeholder, onChange, onInputChange, suggestions, ...props }: TagInputProps): JSX.Element;
|
|
17
|
+
({ className, inputClassName, value, label, helper, placeholder, onChange, onInputChange, suggestions, onLoadMore, hasMore, isLoading, ...props }: TagInputProps): JSX.Element;
|
|
15
18
|
displayName: string;
|
|
16
19
|
};
|
|
17
20
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,13 @@ export { DropdownPicker } from './DropdownPicker.js';
|
|
|
13
13
|
export { EmptyState } from './EmptyState.js';
|
|
14
14
|
export { FloatingPanel } from './FloatingPanel.js';
|
|
15
15
|
export { FocalPointControl } from './FocalPointControl.js';
|
|
16
|
+
export { classGroupsToGradientValue } from './GradientSwatchPicker.js';
|
|
17
|
+
export { gradientValueToClassGroups } from './GradientSwatchPicker.js';
|
|
18
|
+
export { gradientClassGroupsToArray } from './GradientSwatchPicker.js';
|
|
19
|
+
export { gradientValueToArray } from './GradientSwatchPicker.js';
|
|
20
|
+
export { arrayToGradient } from './GradientSwatchPicker.js';
|
|
21
|
+
export { normalizeStops } from './GradientSwatchPicker.js';
|
|
22
|
+
export { TailwindGradientPicker } from './GradientSwatchPicker.js';
|
|
16
23
|
export { Icon } from './Icon.js';
|
|
17
24
|
export { Label } from './Label.js';
|
|
18
25
|
export { LinkPicker } from './LinkPicker.js';
|