@gridui/tooltip 1.1.0 → 1.2.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.
- package/README.md +15 -5
- package/dist/index.js.map +2 -2
- package/dist/styled.js +3 -0
- package/dist/styles.css +197 -0
- package/dist/styles.local.css +32 -0
- package/dist/tooltip-content/tooltip-content.d.ts +6 -0
- package/docs/catalog.json +6 -5
- package/docs/reference/tooltip-content.md +2 -2
- package/docs/reference/tooltip-provider.md +2 -2
- package/docs/reference/tooltip-trigger.md +2 -2
- package/docs/reference/tooltip.md +2 -2
- package/package.json +14 -9
package/README.md
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
# @gridui/tooltip
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Overlays family. Public API: `Tooltip`, `TooltipContent`, `TooltipContentProps`, `TooltipProps`, `TooltipProvider`, `TooltipProviderProps`, `TooltipTrigger`, `TooltipTriggerProps`.
|
|
4
4
|
|
|
5
5
|
Import components from `@gridui/tooltip` and load `@gridui/tooltip/styles.css` after Theme.
|
|
6
|
-
|
|
6
|
+
Applications own routes, labels, state persistence, and branding.
|
|
7
|
+
|
|
8
|
+
See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-overlays/tooltip/.changeset/history).
|
|
9
|
+
|
|
10
|
+
## Styles
|
|
11
|
+
|
|
12
|
+
Load Theme once. Use `@gridui/tooltip/styled` for automatic component CSS in
|
|
13
|
+
CSS-aware bundlers, or keep the CSS-free root import and load `@gridui/tooltip/styles.css`.
|
|
14
|
+
Both entries expose the same root API. The standalone stylesheet includes component
|
|
15
|
+
dependency styles; Theme/reset remain separate. See the
|
|
16
|
+
[integration guide](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/integration.md)
|
|
17
|
+
for static HTML loading, SSR limits, and avoiding duplicate CSS.
|
|
7
18
|
|
|
8
|
-
See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/tooltip/.changeset/history).
|
|
9
19
|
|
|
10
20
|
## Tooltips
|
|
11
21
|
|
|
@@ -50,11 +60,11 @@ localization, and business state.
|
|
|
50
60
|
```
|
|
51
61
|
|
|
52
62
|
|
|
53
|
-
Surface motion uses `@gridui/overlay`;
|
|
63
|
+
Surface motion uses `@gridui/overlay`; its styles are included.
|
|
54
64
|
|
|
55
65
|
[Component reference](docs/reference/README.md) contains focused API pages for each public component.
|
|
56
66
|
|
|
57
67
|
Shared animation policy and tempo come from `MotionConfig` in `@gridui/motion`.
|
|
58
68
|
Disabled or reduced-motion policy settles decoration without disabling interaction.
|
|
59
|
-
See the [motion guide](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-
|
|
69
|
+
See the [motion guide](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-foundation/motion)
|
|
60
70
|
for CSS scopes, portal behavior, and specialized timing contracts.
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/tooltip/tooltip.tsx", "../src/tooltip-content/tooltip-content.tsx", "../src/tooltip-content/style.ts", "../src/tooltip-provider/tooltip-provider.tsx", "../src/tooltip-trigger/tooltip-trigger.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Tooltip\n * @namespace Tooltip\n * @description Tooltip\n */\n\nimport { OverlayOpen, useOverlayState } from \"@gridui/overlay\";\nimport * as Primitive from \"@radix-ui/react-tooltip\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type TooltipProps = ComponentPropsWithRef<typeof Primitive.Root>;\n\nexport const Tooltip: FC<TooltipProps> = (props: TooltipProps) => {\n const state = useOverlayState(props);\n return (<OverlayOpen.Provider\n value={state.open}\n >\n <Primitive.Root\n {...props}\n {...state}\n />\n </OverlayOpen.Provider>);\n};\n", "
|
|
5
|
-
"mappings": ";AAOA,SAAS,aAAa,uBAAuB;AAC7C,YAAY,eAAe;AAUnB;AALD,IAAM,UAA4B,CAAC,UAAwB;AAC9D,QAAM,QAAQ,gBAAgB,KAAK;AACnC,SAAQ;AAAA,IAAC,YAAY;AAAA,IAAZ;AAAA,MACL,OAAO,MAAM;AAAA,MAEb;AAAA,QAAW;AAAA,QAAV;AAAA,UACI,GAAG;AAAA,UACH,GAAG;AAAA;AAAA,MACR;AAAA;AAAA,EACJ;AACJ;;;
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Tooltip\n * @namespace Tooltip\n * @description Tooltip\n */\n\nimport { OverlayOpen, useOverlayState } from \"@gridui/overlay\";\nimport * as Primitive from \"@radix-ui/react-tooltip\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type TooltipProps = ComponentPropsWithRef<typeof Primitive.Root>;\n\nexport const Tooltip: FC<TooltipProps> = (props: TooltipProps) => {\n const state = useOverlayState(props);\n return (<OverlayOpen.Provider\n value={state.open}\n >\n <Primitive.Root\n {...props}\n {...state}\n />\n </OverlayOpen.Provider>);\n};\n", "/**\n * @author WMXPY\n * @package Tooltip\n * @namespace TooltipContent\n * @description Tooltip Content\n */\n\nimport { useMotionStyle } from \"@gridui/motion/policy\";\n/**\n * @author WMXPY\n * @package Tooltip\n * @namespace TooltipContent\n * @description Tooltip Content\n */\n\nimport { tooltipContentStyles } from \"./style\";\nimport { RetainedLayer } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Primitive from \"@radix-ui/react-tooltip\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type TooltipContentProps = ComponentPropsWithRef<typeof Primitive.Content> & {\n readonly container?: ComponentPropsWithRef<typeof Primitive.Portal>[\"container\"];\n};\n\nexport const TooltipContent: FC<TooltipContentProps> = (props: TooltipContentProps) => {\n const motionStyle = useMotionStyle();\n const {\n container,\n forceMount,\n className,\n sideOffset = 8,\n collisionPadding = 16,\n ...restProps\n } = props;\n const mountProps = forceMount ? { forceMount } : {};\n const content = (<Primitive.Content\n {...mountProps}\n {...restProps}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(tooltipContentStyles(), className)}\n style={{ ...(props.style), ...motionStyle }}\n />);\n return (<Primitive.Portal\n {...mountProps}\n container={container}\n >\n {forceMount ? (<RetainedLayer>\n {content}\n </RetainedLayer>) : content}\n </Primitive.Portal>);\n};\n", "/**\n * @author WMXPY\n * @package Tooltip\n * @namespace TooltipContent\n * @description Style\n */\n\nimport { overlaySurfaceStyles } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const tooltipContentStyles = cva(cn(\n overlaySurfaceStyles({ kind: \"tooltip\" }),\n \"gridui-tooltip-content gridui-u-tooltip--z-(--gridui-z-tooltip) gridui-u-tooltip--box-border gridui-u-tooltip--w-max gridui-u-tooltip--max-w-[min(20rem,var(--radix-tooltip-content-available-width))]\",\n \"gridui-u-tooltip--p-gridui-8 gridui-u-tooltip--type-supporting gridui-u-tooltip--wrap-anywhere\",\n));\n", "/**\n * @author WMXPY\n * @package Tooltip\n * @namespace TooltipProvider\n * @description Tooltip Provider\n */\n\nimport * as Primitive from \"@radix-ui/react-tooltip\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type TooltipProviderProps = ComponentPropsWithRef<typeof Primitive.Provider>;\n\nexport const TooltipProvider: FC<TooltipProviderProps> = (props: TooltipProviderProps) => {\n const { delayDuration = 300, ...restProps } = props;\n return (<Primitive.Provider\n {...restProps}\n delayDuration={delayDuration}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Tooltip\n * @namespace TooltipTrigger\n * @description Tooltip Trigger\n */\n\nimport * as Primitive from \"@radix-ui/react-tooltip\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type TooltipTriggerProps = ComponentPropsWithRef<typeof Primitive.Trigger>;\n\nexport const TooltipTrigger: FC<TooltipTriggerProps> = (props: TooltipTriggerProps) => {\n const { asChild = true, ...restProps } = props;\n return (<Primitive.Trigger\n {...restProps}\n asChild={asChild}\n />);\n};\n"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,aAAa,uBAAuB;AAC7C,YAAY,eAAe;AAUnB;AALD,IAAM,UAA4B,CAAC,UAAwB;AAC9D,QAAM,QAAQ,gBAAgB,KAAK;AACnC,SAAQ;AAAA,IAAC,YAAY;AAAA,IAAZ;AAAA,MACL,OAAO,MAAM;AAAA,MAEb;AAAA,QAAW;AAAA,QAAV;AAAA,UACI,GAAG;AAAA,UACH,GAAG;AAAA;AAAA,MACR;AAAA;AAAA,EACJ;AACJ;;;AChBA,SAAS,sBAAsB;;;ACA/B,SAAS,4BAA4B;AACrC,SAAS,UAAU;AACnB,SAAS,WAAW;AAEb,IAAM,uBAAuB,IAAI;AAAA,EACpC,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAAA,EACxC;AAAA,EACA;AACJ,CAAC;;;ADCD,SAAS,qBAAqB;AAC9B,SAAS,MAAAA,WAAU;AACnB,YAAYC,gBAAe;AAkBN,gBAAAC,YAAA;AAXd,IAAM,iBAA0C,CAAC,UAA+B;AACnF,QAAM,cAAc,eAAe;AACnC,QAAM;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa;AAAA,IACb,mBAAmB;AAAA,IACnB,GAAG;AAAA,EACP,IAAI;AACJ,QAAM,aAAa,aAAa,EAAE,WAAW,IAAI,CAAC;AAClD,QAAM,UAAW,gBAAAA;AAAA,IAAW;AAAA,IAAV;AAAA,MACb,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,WAAWF,IAAG,qBAAqB,GAAG,SAAS;AAAA,MAC/C,OAAO,EAAE,GAAI,MAAM,OAAQ,GAAG,YAAY;AAAA;AAAA,EAC9C;AACA,SAAQ,gBAAAE;AAAA,IAAW;AAAA,IAAV;AAAA,MACJ,GAAG;AAAA,MACJ;AAAA,MAEC,uBAAc,gBAAAA,KAAC,iBACX,mBACL,IAAoB;AAAA;AAAA,EACxB;AACJ;;;AE7CA,YAAYC,gBAAe;AAOf,gBAAAC,YAAA;AAFL,IAAM,kBAA4C,CAAC,UAAgC;AACtF,QAAM,EAAE,gBAAgB,KAAK,GAAG,UAAU,IAAI;AAC9C,SAAQ,gBAAAA;AAAA,IAAW;AAAA,IAAV;AAAA,MACJ,GAAG;AAAA,MACJ;AAAA;AAAA,EACJ;AACJ;;;ACXA,YAAYC,gBAAe;AAOf,gBAAAC,YAAA;AAFL,IAAM,iBAA0C,CAAC,UAA+B;AACnF,QAAM,EAAE,UAAU,MAAM,GAAG,UAAU,IAAI;AACzC,SAAQ,gBAAAA;AAAA,IAAW;AAAA,IAAV;AAAA,MACJ,GAAG;AAAA,MACJ;AAAA;AAAA,EACJ;AACJ;",
|
|
6
6
|
"names": ["cn", "Primitive", "jsx", "Primitive", "jsx", "Primitive", "jsx"]
|
|
7
7
|
}
|
package/dist/styled.js
ADDED
package/dist/styles.css
CHANGED
|
@@ -1,3 +1,200 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties;
|
|
3
|
+
@layer theme, base, components, utilities;
|
|
4
|
+
@layer utilities {
|
|
5
|
+
.gridui-u-overlay--z-\(--gridui-z-popover\) {
|
|
6
|
+
z-index: var(--gridui-z-popover);
|
|
7
|
+
}
|
|
8
|
+
.gridui-u-overlay--flex {
|
|
9
|
+
display: flex;
|
|
10
|
+
}
|
|
11
|
+
.gridui-u-overlay--inline-flex {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
}
|
|
14
|
+
.gridui-u-overlay--size-gridui-16 {
|
|
15
|
+
width: var(--gridui-space-16);
|
|
16
|
+
height: var(--gridui-space-16);
|
|
17
|
+
}
|
|
18
|
+
.gridui-u-overlay--min-w-0 {
|
|
19
|
+
min-width: 0px;
|
|
20
|
+
}
|
|
21
|
+
.gridui-u-overlay--shrink-0 {
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
}
|
|
24
|
+
.gridui-u-overlay--cursor-pointer {
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
.gridui-u-overlay--items-center {
|
|
28
|
+
align-items: center;
|
|
29
|
+
}
|
|
30
|
+
.gridui-u-overlay--justify-center {
|
|
31
|
+
justify-content: center;
|
|
32
|
+
}
|
|
33
|
+
.gridui-u-overlay--gap-gridui-8 {
|
|
34
|
+
gap: var(--gridui-space-8);
|
|
35
|
+
}
|
|
36
|
+
.gridui-u-overlay--rounded-control {
|
|
37
|
+
border-radius: var(--gridui-control-radius);
|
|
38
|
+
}
|
|
39
|
+
.gridui-u-overlay--border {
|
|
40
|
+
border-style: var(--tw-border-style);
|
|
41
|
+
border-width: 1px;
|
|
42
|
+
}
|
|
43
|
+
.gridui-u-overlay--border-solid {
|
|
44
|
+
--tw-border-style: solid;
|
|
45
|
+
border-style: solid;
|
|
46
|
+
}
|
|
47
|
+
.gridui-u-overlay--border-border {
|
|
48
|
+
border-color: var(--gridui-border);
|
|
49
|
+
}
|
|
50
|
+
.gridui-u-overlay--bg-background {
|
|
51
|
+
background-color: var(--gridui-background);
|
|
52
|
+
}
|
|
53
|
+
.gridui-u-overlay--p-0 {
|
|
54
|
+
padding: 0px;
|
|
55
|
+
}
|
|
56
|
+
.gridui-u-overlay--px-gridui-8 {
|
|
57
|
+
padding-inline: var(--gridui-space-8);
|
|
58
|
+
}
|
|
59
|
+
.gridui-u-overlay--type-data {
|
|
60
|
+
font: var(--gridui-type-data);
|
|
61
|
+
font-family: var(--gridui-font-body);
|
|
62
|
+
letter-spacing: normal;
|
|
63
|
+
font-variant-numeric: tabular-nums;
|
|
64
|
+
}
|
|
65
|
+
.gridui-u-overlay--type-caption {
|
|
66
|
+
font: var(--gridui-type-caption);
|
|
67
|
+
font-family: var(--gridui-font-body);
|
|
68
|
+
letter-spacing: normal;
|
|
69
|
+
}
|
|
70
|
+
.gridui-u-overlay--wrap-anywhere {
|
|
71
|
+
overflow-wrap: anywhere;
|
|
72
|
+
}
|
|
73
|
+
.gridui-u-overlay--whitespace-normal {
|
|
74
|
+
white-space: normal;
|
|
75
|
+
}
|
|
76
|
+
.gridui-u-overlay--text-foreground {
|
|
77
|
+
color: var(--gridui-foreground);
|
|
78
|
+
}
|
|
79
|
+
.gridui-u-overlay--text-inherit {
|
|
80
|
+
color: inherit;
|
|
81
|
+
}
|
|
82
|
+
.gridui-u-overlay--text-muted {
|
|
83
|
+
color: var(--gridui-muted);
|
|
84
|
+
}
|
|
85
|
+
.gridui-u-overlay--no-underline {
|
|
86
|
+
text-decoration-line: none;
|
|
87
|
+
}
|
|
88
|
+
.gridui-u-overlay--aria-selected\:bg-selection-background[aria-selected="true"] {
|
|
89
|
+
background-color: var(--gridui-selection-background);
|
|
90
|
+
}
|
|
91
|
+
.gridui-u-overlay--aria-\[current\=page\]\:bg-selection-background[aria-current="page"] {
|
|
92
|
+
background-color: var(--gridui-selection-background);
|
|
93
|
+
}
|
|
94
|
+
.gridui-u-overlay--data-disabled\:pointer-events-none[data-disabled] {
|
|
95
|
+
pointer-events: none;
|
|
96
|
+
}
|
|
97
|
+
.gridui-u-overlay--data-disabled\:opacity-50[data-disabled] {
|
|
98
|
+
opacity: 50%;
|
|
99
|
+
}
|
|
100
|
+
.gridui-u-overlay--data-\[state\=checked\]\:bg-selection-background[data-state="checked"] {
|
|
101
|
+
background-color: var(--gridui-selection-background);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
@layer components {
|
|
105
|
+
.gridui-overlay-surface {
|
|
106
|
+
--gridui-surface-offset-x: 0px;
|
|
107
|
+
--gridui-surface-offset-y: 0px;
|
|
108
|
+
--gridui-overlay-enter-duration: var(--gridui-motion-duration-normal);
|
|
109
|
+
--gridui-overlay-fill-mode: both;
|
|
110
|
+
transform-origin: var(--gridui-overlay-origin, center);
|
|
111
|
+
}
|
|
112
|
+
.gridui-overlay-dialog {
|
|
113
|
+
--gridui-overlay-fill-mode: none;
|
|
114
|
+
transform-origin: center;
|
|
115
|
+
}
|
|
116
|
+
.gridui-overlay-tooltip {
|
|
117
|
+
--gridui-overlay-enter-duration: var(--gridui-motion-duration-quick);
|
|
118
|
+
}
|
|
119
|
+
.gridui-overlay-floating[data-side="bottom"] {
|
|
120
|
+
--gridui-surface-offset-y: calc(-1 * var(--gridui-motion-distance));
|
|
121
|
+
}
|
|
122
|
+
.gridui-overlay-floating[data-side="top"] {
|
|
123
|
+
--gridui-surface-offset-y: var(--gridui-motion-distance);
|
|
124
|
+
}
|
|
125
|
+
.gridui-overlay-floating[data-side="left"] {
|
|
126
|
+
--gridui-surface-offset-x: var(--gridui-motion-distance);
|
|
127
|
+
}
|
|
128
|
+
.gridui-overlay-floating[data-side="right"] {
|
|
129
|
+
--gridui-surface-offset-x: calc(-1 * var(--gridui-motion-distance));
|
|
130
|
+
}
|
|
131
|
+
.gridui-overlay-surface[data-state="closed"] {
|
|
132
|
+
pointer-events: none;
|
|
133
|
+
}
|
|
134
|
+
.gridui-overlay-surface:not([data-side="none"]):is([data-state="open"], [data-state="delayed-open"], [data-state="instant-open"]) {
|
|
135
|
+
animation: var(--gridui-motion-animation, gridui-surface-enter calc(var(--gridui-overlay-enter-duration) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-out) var(--gridui-overlay-fill-mode));
|
|
136
|
+
}
|
|
137
|
+
.gridui-overlay-surface:not([data-side="none"])[data-state="closed"] {
|
|
138
|
+
animation: var(--gridui-motion-animation, gridui-surface-exit calc(var(--gridui-motion-duration-quick) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-in) var(--gridui-overlay-fill-mode));
|
|
139
|
+
}
|
|
140
|
+
.gridui-overlay-backdrop {
|
|
141
|
+
background: var(--gridui-backdrop);
|
|
142
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
143
|
+
background: color-mix(in srgb, var(--gridui-backdrop) var(--gridui-backdrop-opacity), transparent);
|
|
144
|
+
}
|
|
145
|
+
--gridui-overlay-enter-duration: var(--gridui-motion-duration-normal);
|
|
146
|
+
--gridui-overlay-exit-duration: var(--gridui-motion-duration-quick);
|
|
147
|
+
--gridui-overlay-fill-mode: none;
|
|
148
|
+
}
|
|
149
|
+
.gridui-overlay-backdrop-deliberate {
|
|
150
|
+
--gridui-overlay-enter-duration: var(--gridui-motion-duration-deliberate);
|
|
151
|
+
--gridui-overlay-exit-duration: var(--gridui-motion-duration-normal);
|
|
152
|
+
--gridui-overlay-fill-mode: both;
|
|
153
|
+
}
|
|
154
|
+
.gridui-overlay-backdrop[data-state="open"] {
|
|
155
|
+
animation: var(--gridui-motion-animation, gridui-fade-enter calc(var(--gridui-overlay-enter-duration) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-out) var(--gridui-overlay-fill-mode));
|
|
156
|
+
}
|
|
157
|
+
.gridui-overlay-backdrop[data-state="closed"] {
|
|
158
|
+
animation: var(--gridui-motion-animation, gridui-fade-exit calc(var(--gridui-overlay-exit-duration) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-in) var(--gridui-overlay-fill-mode));
|
|
159
|
+
}
|
|
160
|
+
@media (prefers-reduced-motion: reduce) {
|
|
161
|
+
.gridui-overlay-surface:not([data-side="none"])[data-state], .gridui-overlay-backdrop[data-state] {
|
|
162
|
+
animation: none;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
.gridui-overlay-list {
|
|
166
|
+
--gridui-overlay-row-min: var(--gridui-control-min-height-medium);
|
|
167
|
+
--gridui-overlay-row-padding: var(--gridui-space-8);
|
|
168
|
+
}
|
|
169
|
+
.gridui-overlay-density-compact {
|
|
170
|
+
--gridui-overlay-row-min: var(--gridui-control-min-height-small);
|
|
171
|
+
--gridui-overlay-row-padding: var(--gridui-space-4);
|
|
172
|
+
}
|
|
173
|
+
.gridui-overlay-density-comfortable {
|
|
174
|
+
--gridui-overlay-row-min: var(--gridui-control-min-height-medium);
|
|
175
|
+
--gridui-overlay-row-padding: var(--gridui-space-8);
|
|
176
|
+
}
|
|
177
|
+
.gridui-overlay-list-item {
|
|
178
|
+
min-block-size: max(var(--gridui-overlay-row-min, var(--gridui-control-min-height-medium)), var(--gridui-target-min-size));
|
|
179
|
+
padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
|
|
180
|
+
}
|
|
181
|
+
.gridui-overlay-list-label {
|
|
182
|
+
padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
@property --tw-border-style {
|
|
186
|
+
syntax: "*";
|
|
187
|
+
inherits: false;
|
|
188
|
+
initial-value: solid;
|
|
189
|
+
}
|
|
190
|
+
@layer properties {
|
|
191
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
192
|
+
*, ::before, ::after, ::backdrop {
|
|
193
|
+
--tw-border-style: solid;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
1
198
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
199
|
@layer theme, base, components, utilities;
|
|
3
200
|
@layer utilities {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
3
|
+
@layer utilities {
|
|
4
|
+
.gridui-u-tooltip--z-\(--gridui-z-tooltip\) {
|
|
5
|
+
z-index: var(--gridui-z-tooltip);
|
|
6
|
+
}
|
|
7
|
+
.gridui-u-tooltip--box-border {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
.gridui-u-tooltip--w-max {
|
|
11
|
+
width: max-content;
|
|
12
|
+
}
|
|
13
|
+
.gridui-u-tooltip--max-w-\[min\(20rem\,var\(--radix-tooltip-content-available-width\)\)\] {
|
|
14
|
+
max-width: min(20rem, var(--radix-tooltip-content-available-width));
|
|
15
|
+
}
|
|
16
|
+
.gridui-u-tooltip--p-gridui-8 {
|
|
17
|
+
padding: var(--gridui-space-8);
|
|
18
|
+
}
|
|
19
|
+
.gridui-u-tooltip--type-supporting {
|
|
20
|
+
font: var(--gridui-type-supporting);
|
|
21
|
+
font-family: var(--gridui-font-body);
|
|
22
|
+
letter-spacing: normal;
|
|
23
|
+
}
|
|
24
|
+
.gridui-u-tooltip--wrap-anywhere {
|
|
25
|
+
overflow-wrap: anywhere;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
@layer components {
|
|
29
|
+
.gridui-tooltip-content {
|
|
30
|
+
--gridui-overlay-origin: var(--radix-tooltip-content-transform-origin);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Tooltip
|
|
4
|
+
* @namespace TooltipContent
|
|
5
|
+
* @description Tooltip Content
|
|
6
|
+
*/
|
|
1
7
|
import * as Primitive from "@radix-ui/react-tooltip";
|
|
2
8
|
import type { ComponentPropsWithRef, FC } from "react";
|
|
3
9
|
export type TooltipContentProps = ComponentPropsWithRef<typeof Primitive.Content> & {
|
package/docs/catalog.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/tooltip",
|
|
4
|
-
"version": "1.1
|
|
5
|
-
"category": "
|
|
4
|
+
"version": "1.2.1",
|
|
5
|
+
"category": "overlays",
|
|
6
6
|
"description": "GridUI React tooltip",
|
|
7
7
|
"usage": "The Tooltip family owns composable primitives for supplemental button and link hints. This family owns timing, controlled state, native trigger composition, portal styling, positioning, accessibility, and content limits. Applications own clipboard state and localized labels.",
|
|
8
8
|
"documentation": [
|
|
@@ -60,9 +60,10 @@
|
|
|
60
60
|
"@gridui/overlay/styles.css",
|
|
61
61
|
"@gridui/tooltip/styles.css"
|
|
62
62
|
],
|
|
63
|
+
"styledImport": "@gridui/tooltip/styled",
|
|
63
64
|
"examples": [
|
|
64
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
65
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
66
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
65
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/stories/getting-started.mdx",
|
|
66
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/stories/hints.mdx",
|
|
67
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/stories/tooltip.stories.tsx"
|
|
67
68
|
]
|
|
68
69
|
}
|
|
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/tooltip/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
|
-
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/stories/tooltip.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/tooltip/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
|
-
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/stories/tooltip.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/tooltip/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
|
-
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/stories/tooltip.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/tooltip/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
|
-
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/tooltip/stories/tooltip.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/tooltip",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "GridUI React tooltip",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -10,14 +10,19 @@
|
|
|
10
10
|
"docs"
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": [
|
|
13
|
-
"**/*.css"
|
|
13
|
+
"**/*.css",
|
|
14
|
+
"./dist/styled.js"
|
|
14
15
|
],
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"types": "./dist/index.d.ts",
|
|
18
19
|
"import": "./dist/index.js"
|
|
19
20
|
},
|
|
20
|
-
"./styles.css": "./dist/styles.css"
|
|
21
|
+
"./styles.css": "./dist/styles.css",
|
|
22
|
+
"./styled": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/styled.js"
|
|
25
|
+
}
|
|
21
26
|
},
|
|
22
27
|
"publishConfig": {
|
|
23
28
|
"access": "public"
|
|
@@ -27,16 +32,16 @@
|
|
|
27
32
|
"react-dom": "^19.2.0"
|
|
28
33
|
},
|
|
29
34
|
"dependencies": {
|
|
30
|
-
"@gridui/
|
|
31
|
-
"@gridui/
|
|
32
|
-
"@gridui/
|
|
35
|
+
"@gridui/motion": "^1.0.3",
|
|
36
|
+
"@gridui/overlay": "^2.5.0",
|
|
37
|
+
"@gridui/style-utils": "^4.1.0",
|
|
38
|
+
"@gridui/theme": "^5.0.0",
|
|
33
39
|
"@radix-ui/react-tooltip": "1.4.1",
|
|
34
|
-
"class-variance-authority": "0.7.1"
|
|
35
|
-
"@gridui/motion": "^1.0.1"
|
|
40
|
+
"class-variance-authority": "0.7.1"
|
|
36
41
|
},
|
|
37
42
|
"devDependencies": {
|
|
38
43
|
"@gridui-internal/configuration": "0.0.0-internal",
|
|
39
|
-
"@gridui/button": "
|
|
44
|
+
"@gridui/button": "6.0.0",
|
|
40
45
|
"@jest/globals": "30.5.2",
|
|
41
46
|
"@storybook/react-vite": "10.6.7",
|
|
42
47
|
"@types/jest": "30.0.0",
|