@marketrix.ai/widget 3.8.474 → 3.8.476
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/src/components/base/IconButton.d.ts +1 -3
- package/dist/src/components/base/Surface.d.ts +3 -3
- package/dist/src/components/base/layoutProps.d.ts +31 -43
- package/dist/src/design-system/component-tokens.d.ts +3 -3
- package/dist/src/utils/widgetPositioning.d.ts +0 -5
- package/dist/widget.mjs +57 -58
- package/package.json +3 -5
- package/dist/src/lib/utils.d.ts +0 -3
- package/dist/widget.mjs.map +0 -1
|
@@ -7,8 +7,6 @@ export interface IconButtonProps extends ComponentPropsWithRef<'button'> {
|
|
|
7
7
|
size?: IconButtonSize;
|
|
8
8
|
tone?: TextTone;
|
|
9
9
|
label: string;
|
|
10
|
-
/** @internal blocks/ only */
|
|
11
|
-
className?: string;
|
|
12
10
|
}
|
|
13
|
-
export declare function IconButton({ variant, size, tone, label, disabled,
|
|
11
|
+
export declare function IconButton({ variant, size, tone, label, disabled, children, style, ref, ...props }: IconButtonProps): import("react").JSX.Element;
|
|
14
12
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ElementType } from 'react';
|
|
1
|
+
import { type CSSProperties, type ElementType } from 'react';
|
|
2
2
|
import type { ShadowToken } from '../../design-system/shadows';
|
|
3
3
|
import { type LayoutProps } from './layoutProps';
|
|
4
4
|
export type SurfaceBackground = 'default' | 'card';
|
|
@@ -11,6 +11,6 @@ export interface SurfaceProps extends LayoutProps, Omit<React.HTMLAttributes<HTM
|
|
|
11
11
|
/** @internal blocks/ only */
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
14
|
+
export declare const backgroundStyles: Record<SurfaceBackground, CSSProperties>;
|
|
15
|
+
export declare const paddingPresetStyles: Record<SurfacePadding, CSSProperties>;
|
|
16
16
|
export declare const Surface: import("react").ForwardRefExoticComponent<SurfaceProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,43 +1,25 @@
|
|
|
1
1
|
import type { CSSProperties, ElementType } from 'react';
|
|
2
2
|
export type SpacingToken = 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3
3
|
export declare const SPACING_SCALE: Record<SpacingToken, string>;
|
|
4
|
-
declare const
|
|
5
|
-
readonly start: "
|
|
6
|
-
readonly center: "
|
|
7
|
-
readonly end: "
|
|
8
|
-
readonly stretch: "
|
|
9
|
-
readonly baseline: "
|
|
4
|
+
declare const ALIGN: {
|
|
5
|
+
readonly start: "flex-start";
|
|
6
|
+
readonly center: "center";
|
|
7
|
+
readonly end: "flex-end";
|
|
8
|
+
readonly stretch: "stretch";
|
|
9
|
+
readonly baseline: "baseline";
|
|
10
10
|
};
|
|
11
|
-
declare const
|
|
12
|
-
readonly start: "
|
|
13
|
-
readonly center: "
|
|
14
|
-
readonly end: "
|
|
15
|
-
readonly between: "
|
|
16
|
-
readonly around: "
|
|
11
|
+
declare const JUSTIFY: {
|
|
12
|
+
readonly start: "flex-start";
|
|
13
|
+
readonly center: "center";
|
|
14
|
+
readonly end: "flex-end";
|
|
15
|
+
readonly between: "space-between";
|
|
16
|
+
readonly around: "space-around";
|
|
17
17
|
};
|
|
18
|
-
declare const
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
};
|
|
24
|
-
declare const overflowYClasses: {
|
|
25
|
-
readonly hidden: "overflow-y-hidden";
|
|
26
|
-
readonly auto: "overflow-y-auto";
|
|
27
|
-
};
|
|
28
|
-
declare const widthClasses: {
|
|
29
|
-
readonly full: "w-full";
|
|
30
|
-
readonly auto: "w-auto";
|
|
31
|
-
};
|
|
32
|
-
declare const heightClasses: {
|
|
33
|
-
readonly full: "h-full";
|
|
34
|
-
readonly auto: "h-auto";
|
|
35
|
-
};
|
|
36
|
-
declare const borderSideClasses: {
|
|
37
|
-
readonly top: "border-t";
|
|
38
|
-
readonly bottom: "border-b";
|
|
39
|
-
readonly left: "border-l";
|
|
40
|
-
readonly right: "border-r";
|
|
18
|
+
declare const BORDER_SIDE: {
|
|
19
|
+
readonly top: "borderTopWidth";
|
|
20
|
+
readonly bottom: "borderBottomWidth";
|
|
21
|
+
readonly left: "borderLeftWidth";
|
|
22
|
+
readonly right: "borderRightWidth";
|
|
41
23
|
};
|
|
42
24
|
export interface LayoutProps {
|
|
43
25
|
padding?: SpacingToken;
|
|
@@ -46,24 +28,30 @@ export interface LayoutProps {
|
|
|
46
28
|
paddingTop?: SpacingToken;
|
|
47
29
|
paddingBottom?: SpacingToken;
|
|
48
30
|
gap?: SpacingToken;
|
|
49
|
-
align?: keyof typeof
|
|
50
|
-
justify?: keyof typeof
|
|
31
|
+
align?: keyof typeof ALIGN;
|
|
32
|
+
justify?: keyof typeof JUSTIFY;
|
|
51
33
|
grow?: boolean;
|
|
52
34
|
shrink?: boolean;
|
|
53
35
|
position?: 'relative' | 'absolute' | 'fixed' | 'sticky';
|
|
54
36
|
inset?: SpacingToken | '0';
|
|
55
|
-
overflow?:
|
|
56
|
-
overflowY?:
|
|
57
|
-
width?:
|
|
58
|
-
height?:
|
|
37
|
+
overflow?: 'hidden' | 'auto' | 'visible' | 'scroll';
|
|
38
|
+
overflowY?: 'hidden' | 'auto';
|
|
39
|
+
width?: 'full' | 'auto';
|
|
40
|
+
height?: 'full' | 'auto';
|
|
59
41
|
minWidth?: '0';
|
|
60
|
-
border?: boolean | keyof typeof
|
|
42
|
+
border?: boolean | keyof typeof BORDER_SIDE;
|
|
61
43
|
rounded?: boolean | 'none' | 'sm' | 'full' | 'lg' | 'theme' | 'md' | 'xl' | 'pill' | 'circle';
|
|
62
44
|
animate?: 'spin' | 'ping' | 'pulse' | 'fadeIn' | 'none';
|
|
63
45
|
hidden?: boolean;
|
|
64
46
|
as?: ElementType;
|
|
65
47
|
style?: CSSProperties;
|
|
66
48
|
}
|
|
67
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Layout props resolve to a style object rather than class names. As classes they were interpolated
|
|
51
|
+
* (`p-${token}`), which no scanner could see — a build-time safelist was the only thing keeping them
|
|
52
|
+
* alive, it emitted the whole 8x7 matrix whether used or not, and a missing entry failed silently at
|
|
53
|
+
* runtime. A style object makes every token work by construction and costs nothing per unused one.
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveLayoutStyle(props: LayoutProps): CSSProperties;
|
|
68
56
|
export declare function stripLayoutProps<T extends LayoutProps>(props: T): Omit<T, keyof LayoutProps>;
|
|
69
57
|
export {};
|
|
@@ -4,9 +4,9 @@ export type RadiusToken = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'theme' | 'pill'
|
|
|
4
4
|
export type TextTone = 'default' | 'muted' | 'faint' | 'primary' | 'inherit';
|
|
5
5
|
export type TextLeading = 'tight' | 'snug' | 'normal' | 'relaxed';
|
|
6
6
|
export type NotificationTone = 'info' | 'error' | 'neutral';
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
7
|
+
export declare const RADIUS: Record<RadiusToken, string>;
|
|
8
|
+
export declare const TEXT_TONE: Record<TextTone, string>;
|
|
9
|
+
export declare const TEXT_LEADING: Record<TextLeading, string>;
|
|
10
10
|
export declare const TAB_BAR_HEIGHT = 48;
|
|
11
11
|
export declare const notificationToneStyles: Record<NotificationTone, {
|
|
12
12
|
background: string;
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { WidgetPosition } from '../types';
|
|
3
3
|
export declare const getCorner: (position: WidgetPosition) => {
|
|
4
|
-
readonly classes: "bottom-5 right-5";
|
|
5
4
|
readonly vertical: "bottom";
|
|
6
5
|
readonly horizontal: "right";
|
|
7
6
|
} | {
|
|
8
|
-
readonly classes: "bottom-5 left-5";
|
|
9
7
|
readonly vertical: "bottom";
|
|
10
8
|
readonly horizontal: "left";
|
|
11
9
|
} | {
|
|
12
|
-
readonly classes: "top-5 right-5";
|
|
13
10
|
readonly vertical: "top";
|
|
14
11
|
readonly horizontal: "right";
|
|
15
12
|
} | {
|
|
16
|
-
readonly classes: "top-5 left-5";
|
|
17
13
|
readonly vertical: "top";
|
|
18
14
|
readonly horizontal: "left";
|
|
19
15
|
};
|
|
20
16
|
export declare const isWidgetPosition: (value: unknown) => value is WidgetPosition;
|
|
21
|
-
export declare const getPositionClasses: (position: WidgetPosition) => string;
|
|
22
17
|
export declare const getPanelPositionStyle: (position: WidgetPosition) => React.CSSProperties;
|
|
23
18
|
export declare const getAnchorTopLeft: (position: WidgetPosition, vw: number, vh: number, w: number, h: number) => {
|
|
24
19
|
x: number;
|