@unifold/ui-react 0.1.23 → 0.1.25
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/index.d.mts +17 -6
- package/dist/index.d.ts +17 -6
- package/dist/index.js +633 -578
- package/dist/index.mjs +607 -554
- package/dist/styles-base.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -263,8 +263,19 @@ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.S
|
|
|
263
263
|
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
264
264
|
|
|
265
265
|
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
/**
|
|
267
|
+
* Tooltip wrapper that supports both hover (desktop) and tap-to-toggle (mobile).
|
|
268
|
+
*
|
|
269
|
+
* Radix Tooltip only opens on hover, which is unusable on touch devices.
|
|
270
|
+
* This wrapper adds controlled open state so the trigger's onClick can toggle it,
|
|
271
|
+
* while preserving the default hover behavior on desktop.
|
|
272
|
+
*/
|
|
273
|
+
declare function Tooltip({ children, ...props }: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
274
|
+
/**
|
|
275
|
+
* Tooltip trigger that adds click-to-toggle for mobile/touch support.
|
|
276
|
+
* On desktop, hover still works as usual via Radix's built-in behavior.
|
|
277
|
+
*/
|
|
278
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
268
279
|
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
269
280
|
|
|
270
281
|
/**
|
|
@@ -288,13 +299,13 @@ interface AllowedCountryResult {
|
|
|
288
299
|
* Combines the IP geolocation API with the project's blocked countries configuration
|
|
289
300
|
* to determine if the user should be allowed to access geo-restricted features.
|
|
290
301
|
*
|
|
291
|
-
* @param publishableKey -
|
|
302
|
+
* @param publishableKey - Publishable key for API calls (required)
|
|
292
303
|
* @returns AllowedCountryResult with isAllowed status and location info
|
|
293
304
|
*
|
|
294
305
|
* @example
|
|
295
306
|
* ```tsx
|
|
296
|
-
* function MyComponent() {
|
|
297
|
-
* const { isAllowed, alpha2, country, isLoading, error } = useAllowedCountry();
|
|
307
|
+
* function MyComponent({ publishableKey }: { publishableKey: string }) {
|
|
308
|
+
* const { isAllowed, alpha2, country, isLoading, error } = useAllowedCountry(publishableKey);
|
|
298
309
|
*
|
|
299
310
|
* if (isLoading) return <LoadingSpinner />;
|
|
300
311
|
* if (error) return <ErrorMessage error={error} />;
|
|
@@ -304,7 +315,7 @@ interface AllowedCountryResult {
|
|
|
304
315
|
* }
|
|
305
316
|
* ```
|
|
306
317
|
*/
|
|
307
|
-
declare function useAllowedCountry(publishableKey
|
|
318
|
+
declare function useAllowedCountry(publishableKey: string): AllowedCountryResult;
|
|
308
319
|
|
|
309
320
|
/**
|
|
310
321
|
* Unifold color palette for React (Web)
|
package/dist/index.d.ts
CHANGED
|
@@ -263,8 +263,19 @@ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.S
|
|
|
263
263
|
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
264
264
|
|
|
265
265
|
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
/**
|
|
267
|
+
* Tooltip wrapper that supports both hover (desktop) and tap-to-toggle (mobile).
|
|
268
|
+
*
|
|
269
|
+
* Radix Tooltip only opens on hover, which is unusable on touch devices.
|
|
270
|
+
* This wrapper adds controlled open state so the trigger's onClick can toggle it,
|
|
271
|
+
* while preserving the default hover behavior on desktop.
|
|
272
|
+
*/
|
|
273
|
+
declare function Tooltip({ children, ...props }: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
274
|
+
/**
|
|
275
|
+
* Tooltip trigger that adds click-to-toggle for mobile/touch support.
|
|
276
|
+
* On desktop, hover still works as usual via Radix's built-in behavior.
|
|
277
|
+
*/
|
|
278
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
268
279
|
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
269
280
|
|
|
270
281
|
/**
|
|
@@ -288,13 +299,13 @@ interface AllowedCountryResult {
|
|
|
288
299
|
* Combines the IP geolocation API with the project's blocked countries configuration
|
|
289
300
|
* to determine if the user should be allowed to access geo-restricted features.
|
|
290
301
|
*
|
|
291
|
-
* @param publishableKey -
|
|
302
|
+
* @param publishableKey - Publishable key for API calls (required)
|
|
292
303
|
* @returns AllowedCountryResult with isAllowed status and location info
|
|
293
304
|
*
|
|
294
305
|
* @example
|
|
295
306
|
* ```tsx
|
|
296
|
-
* function MyComponent() {
|
|
297
|
-
* const { isAllowed, alpha2, country, isLoading, error } = useAllowedCountry();
|
|
307
|
+
* function MyComponent({ publishableKey }: { publishableKey: string }) {
|
|
308
|
+
* const { isAllowed, alpha2, country, isLoading, error } = useAllowedCountry(publishableKey);
|
|
298
309
|
*
|
|
299
310
|
* if (isLoading) return <LoadingSpinner />;
|
|
300
311
|
* if (error) return <ErrorMessage error={error} />;
|
|
@@ -304,7 +315,7 @@ interface AllowedCountryResult {
|
|
|
304
315
|
* }
|
|
305
316
|
* ```
|
|
306
317
|
*/
|
|
307
|
-
declare function useAllowedCountry(publishableKey
|
|
318
|
+
declare function useAllowedCountry(publishableKey: string): AllowedCountryResult;
|
|
308
319
|
|
|
309
320
|
/**
|
|
310
321
|
* Unifold color palette for React (Web)
|