@blockbite/ui 2.0.27 → 2.0.28
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/DataItemList.d.ts +2 -1
- package/dist/GradientSwatchPicker.d.ts +48 -0
- package/dist/Modal.d.ts +10 -3
- package/dist/Tabs.d.ts +3 -3
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2393 -1944
- package/dist/index.js.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +3 -3
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/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;
|
|
@@ -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
|
@@ -10,7 +10,7 @@ export declare const TabsWrapper: ({ children, defaultValue, value, onValueChang
|
|
|
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
28
|
Wrapper: ({ children, defaultValue, value, onValueChange, ...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/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';
|