@clicktap/ui 0.14.13 → 0.14.14

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.
@@ -1 +1 @@
1
- import{jsx as s}from"react/jsx-runtime";import{forwardRef as i}from"react";import{Link as d}from"react-aria-components";import{cn as l}from"../../utils/cn.js";const c=i(({children:t,isDisabled:e,className:r,...a},o)=>s(d,{...a,isDisabled:e,className:l("flex items-center cursor-pointer","text-slate-500","no-underline","transition-colors duration-300","hover:text-slate-800",['data-[disabled="true"]:cursor-default','data-[disabled="true"]:text-slate-300','data-[disabled="true"]:hover:text-slate-300'],r),ref:o,children:t}));export{c as Link,c as default};
1
+ import{jsx as n}from"react/jsx-runtime";import{forwardRef as d}from"react";import{Link as l}from"react-aria-components";import{cn as u}from"../../utils/cn.js";const x=d(({children:e,isDisabled:r,className:t,...o},a)=>n(l,{...o,isDisabled:r,className:s=>{const i=typeof t=="function"?t(s):t;return u("flex items-center cursor-pointer","text-slate-500","no-underline","transition-colors duration-300","hover:text-slate-800",['data-[disabled="true"]:cursor-default','data-[disabled="true"]:text-slate-300','data-[disabled="true"]:hover:text-slate-300'],i)},ref:a,children:e}));export{x as Link,x as default};
@@ -11,19 +11,24 @@ export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
11
11
  // eslint-disable-next-line react/jsx-props-no-spreading
12
12
  {...props}
13
13
  isDisabled={isDisabled}
14
- className={cn(
15
- 'flex items-center cursor-pointer',
16
- 'text-slate-500',
17
- 'no-underline',
18
- 'transition-colors duration-300',
19
- 'hover:text-slate-800',
20
- [
21
- 'data-[disabled="true"]:cursor-default',
22
- 'data-[disabled="true"]:text-slate-300',
23
- 'data-[disabled="true"]:hover:text-slate-300',
24
- ],
25
- className
26
- )}
14
+ className={(renderProps) => {
15
+ const userClasses =
16
+ typeof className === 'function' ? className(renderProps) : className;
17
+
18
+ return cn(
19
+ 'flex items-center cursor-pointer',
20
+ 'text-slate-500',
21
+ 'no-underline',
22
+ 'transition-colors duration-300',
23
+ 'hover:text-slate-800',
24
+ [
25
+ 'data-[disabled="true"]:cursor-default',
26
+ 'data-[disabled="true"]:text-slate-300',
27
+ 'data-[disabled="true"]:hover:text-slate-300',
28
+ ],
29
+ userClasses
30
+ );
31
+ }}
27
32
  ref={ref}
28
33
  >
29
34
  {children}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clicktap/ui",
3
- "version": "0.14.13",
3
+ "version": "0.14.14",
4
4
  "private": false,
5
5
  "author": "Clicktap",
6
6
  "description": "A library of React UI components and low-level hooks.",