@ttoss/ui 6.0.0 → 6.0.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/dist/esm/index.js CHANGED
@@ -720,8 +720,8 @@ var Label = /* @__PURE__ */__name(({
720
720
  }, /* @__PURE__ */React9.createElement(Icon5, {
721
721
  icon: "info"
722
722
  }), /* @__PURE__ */React9.createElement(Tooltip, {
723
- ...tooltip,
724
- id: tooltipId
723
+ id: tooltipId,
724
+ ...tooltip
725
725
  })));
726
726
  }, "Label");
727
727
 
@@ -1291,7 +1291,6 @@ var TooltipIcon = /* @__PURE__ */__name(({
1291
1291
  icon,
1292
1292
  onClick,
1293
1293
  tooltip,
1294
- tooltipProps,
1295
1294
  "data-testid": dataTestId,
1296
1295
  variant,
1297
1296
  sx
@@ -1312,9 +1311,9 @@ var TooltipIcon = /* @__PURE__ */__name(({
1312
1311
  icon
1313
1312
  })), tooltip && /* @__PURE__ */React15.createElement(Tooltip, {
1314
1313
  id: tooltipId,
1315
- ...tooltipProps,
1314
+ ...tooltip,
1316
1315
  variant
1317
- }, tooltip));
1316
+ }));
1318
1317
  }, "TooltipIcon");
1319
1318
 
1320
1319
  // src/theme/ThemeProvider.tsx
package/dist/index.d.ts CHANGED
@@ -77,14 +77,11 @@ interface TooltipIconProps {
77
77
  */
78
78
  onClick?: () => void;
79
79
  /**
80
- * Optional tooltip text to display when hovering over the icon.
80
+ * Optional tooltip configuration.
81
+ * Pass tooltip props to display a tooltip when hovering over the icon.
82
+ * The 'variant' prop is excluded as it's controlled by the component's variant prop.
81
83
  */
82
- tooltip?: string;
83
- /**
84
- * Additional props to pass to the Tooltip component.
85
- * Excludes 'children', 'anchorSelect', and 'variant' which are managed internally.
86
- */
87
- tooltipProps?: Omit<TooltipProps, 'children' | 'anchorSelect' | 'variant'>;
84
+ tooltip?: Omit<TooltipProps, 'variant'>;
88
85
  /**
89
86
  * Test ID for testing purposes.
90
87
  */
@@ -110,7 +107,7 @@ interface TooltipIconProps {
110
107
  * ```tsx
111
108
  * <TooltipIcon
112
109
  * icon="info-circle"
113
- * tooltip="Additional information"
110
+ * tooltip={{ children: 'Additional information' }}
114
111
  * variant="info"
115
112
  * />
116
113
  * ```
@@ -119,13 +116,13 @@ interface TooltipIconProps {
119
116
  * ```tsx
120
117
  * <TooltipIcon
121
118
  * icon="warning-alt"
122
- * tooltip="Warning message"
119
+ * tooltip={{ children: 'Warning message', place: 'top' }}
123
120
  * variant="warning"
124
121
  * onClick={() => console.log('Clicked')}
125
122
  * />
126
123
  * ```
127
124
  */
128
- declare const TooltipIcon: ({ icon, onClick, tooltip, tooltipProps, "data-testid": dataTestId, variant, sx, }: TooltipIconProps) => react_jsx_runtime.JSX.Element;
125
+ declare const TooltipIcon: ({ icon, onClick, tooltip, "data-testid": dataTestId, variant, sx, }: TooltipIconProps) => react_jsx_runtime.JSX.Element;
129
126
 
130
127
  interface InputProps extends InputProps$1 {
131
128
  leadingIcon?: TooltipIconProps | IconType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/ui",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "Primitive layout, typographic, and other components for styling applications.",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",