adnbn-ui 0.2.6 → 0.2.7
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adnbn-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.7",
|
|
5
5
|
"description": "A comprehensive React UI component library designed exclusively for the AddonBone browser extension framework with customizable theming and consistent design patterns",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -34,6 +34,7 @@ const Tooltip: ForwardRefRenderFunction<HTMLDivElement, TooltipProps> = (props,
|
|
|
34
34
|
|
|
35
35
|
arrowWidth,
|
|
36
36
|
arrowHeight,
|
|
37
|
+
collisionPadding = 8,
|
|
37
38
|
matchTriggerWidth,
|
|
38
39
|
content,
|
|
39
40
|
arrowClassName,
|
|
@@ -62,6 +63,7 @@ const Tooltip: ForwardRefRenderFunction<HTMLDivElement, TooltipProps> = (props,
|
|
|
62
63
|
},
|
|
63
64
|
contentClassName
|
|
64
65
|
)}
|
|
66
|
+
collisionPadding={collisionPadding}
|
|
65
67
|
{...other}
|
|
66
68
|
>
|
|
67
69
|
{content}
|
|
@@ -6,7 +6,7 @@ $root: tooltip;
|
|
|
6
6
|
font-family: var(--tooltip-font-family, var(--font-family)), sans-serif;
|
|
7
7
|
font-weight: var(--tooltip-font-weight, 500);
|
|
8
8
|
font-size: var(--tooltip-font-size, var(--font-size, 14px));
|
|
9
|
-
line-height: var(--tooltip-line-height, var(--line-height,
|
|
9
|
+
line-height: var(--tooltip-line-height, var(--line-height, 1rem));
|
|
10
10
|
color: var(--tooltip-color, var(--text-secondary-color));
|
|
11
11
|
background-color: var(--tooltip-bg-color, var(--bg-secondary-color));
|
|
12
12
|
border-radius: var(--tooltip-border-radius, 5px);
|
|
@@ -19,9 +19,7 @@ $root: tooltip;
|
|
|
19
19
|
user-select: none;
|
|
20
20
|
animation-duration: var(--transition-speed-md);
|
|
21
21
|
will-change: transform, opacity;
|
|
22
|
-
box-shadow:
|
|
23
|
-
rgba(0, 6, 13, 0.35) 0 10px 38px -10px,
|
|
24
|
-
rgba(0, 6, 13, 0.2) 0px 10px 20px -15px;
|
|
22
|
+
box-shadow: var(--tooltip-box-shadow-offset, 0 0 5px 0) var(--tooltip-box-shadow-color, rgba(210, 208, 208, 0.47));
|
|
25
23
|
|
|
26
24
|
&--trigger-width {
|
|
27
25
|
width: var(--radix-tooltip-trigger-width);
|
|
@@ -42,10 +40,41 @@ $root: tooltip;
|
|
|
42
40
|
&[data-state="delayed-open"][data-side="left"] {
|
|
43
41
|
animation-name: slideRightAndFade;
|
|
44
42
|
}
|
|
43
|
+
|
|
44
|
+
&:before {
|
|
45
|
+
content: "";
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
position: absolute;
|
|
48
|
+
z-index: 100000;
|
|
49
|
+
inset: 0;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
border: calc(var(--tooltip-border-width, 1px) + 2px) solid var(--tooltip-bg-color, var(--bg-secondary-color));
|
|
53
|
+
border-radius: calc(var(--tooltip-border-radius, 5px) - var(--tooltip-border-width, 1px));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
& > span {
|
|
57
|
+
&:before {
|
|
58
|
+
content: "";
|
|
59
|
+
position: absolute;
|
|
60
|
+
border-radius: 100%;
|
|
61
|
+
width: 1px;
|
|
62
|
+
height: 1px;
|
|
63
|
+
top: 50%;
|
|
64
|
+
left: 50%;
|
|
65
|
+
transform: translate(-50%, -50%);
|
|
66
|
+
box-shadow: var(--tooltip-arrow-box-shadow-offset, 0 1px 4px 2px)
|
|
67
|
+
var(--tooltip-box-shadow-color, rgba(210, 208, 208, 0.47));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
45
70
|
}
|
|
46
71
|
|
|
47
72
|
&-arrow {
|
|
73
|
+
position: relative;
|
|
48
74
|
fill: var(--tooltip-bg-color, var(--bg-secondary-color));
|
|
75
|
+
stroke: var(--tooltip-border-color, var(--tooltip-bg-color, var(--bg-secondary-color)));
|
|
76
|
+
stroke-width: var(--tooltip-border-width, 1px);
|
|
77
|
+
margin-top: calc(var(--tooltip-border-width, 1px) * -1);
|
|
49
78
|
}
|
|
50
79
|
}
|
|
51
80
|
|
package/src/components/types.ts
CHANGED
|
@@ -58,7 +58,7 @@ export interface ComponentsProps {
|
|
|
58
58
|
| "radius"
|
|
59
59
|
| "color"
|
|
60
60
|
>;
|
|
61
|
-
tooltip?:
|
|
61
|
+
tooltip?: TooltipProps;
|
|
62
62
|
view?: ViewProps;
|
|
63
63
|
viewDrawer?: ViewDrawerProps;
|
|
64
64
|
viewModal?: ViewModalProps;
|