@tan-ahmed/tan-ui-kit 0.1.5 → 0.1.6
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 +24 -10
- package/dist/components/ui/button.d.ts +4 -7
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/tan-ui-kit.cjs.js +1 -1
- package/dist/tan-ui-kit.css +1 -1
- package/dist/tan-ui-kit.es.js +443 -31
- package/package.json +14 -12
package/README.md
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
# @tan-ahmed/tan-ui-kit
|
|
2
2
|
|
|
3
|
-
A React component library built with Tailwind CSS v4 and
|
|
3
|
+
A React component library built with Tailwind CSS v4 and base-ui components.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
### Recommended: Using pnpm
|
|
8
|
+
|
|
8
9
|
```bash
|
|
9
10
|
pnpm add @tan-ahmed/tan-ui-kit
|
|
10
11
|
```
|
|
11
12
|
|
|
12
13
|
### Using yarn
|
|
14
|
+
|
|
13
15
|
```bash
|
|
14
16
|
yarn add @tan-ahmed/tan-ui-kit
|
|
15
17
|
```
|
|
16
18
|
|
|
17
19
|
### Using npm
|
|
20
|
+
|
|
18
21
|
```bash
|
|
19
22
|
npm install @tan-ahmed/tan-ui-kit
|
|
20
23
|
```
|
|
@@ -42,7 +45,7 @@ This package requires the following peer dependencies:
|
|
|
42
45
|
Make sure to install these in your project:
|
|
43
46
|
|
|
44
47
|
```bash
|
|
45
|
-
pnpm add
|
|
48
|
+
pnpm add @radix-ui/react-slot class-variance-authority clsx tailwind-merge
|
|
46
49
|
```
|
|
47
50
|
|
|
48
51
|
## Setup
|
|
@@ -50,7 +53,7 @@ pnpm add react react-dom @radix-ui/react-slot class-variance-authority clsx tail
|
|
|
50
53
|
### 1. Install Peer Dependencies
|
|
51
54
|
|
|
52
55
|
```bash
|
|
53
|
-
pnpm add
|
|
56
|
+
pnpm add @radix-ui/react-slot class-variance-authority clsx tailwind-merge tailwindcss@^4.0.0
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
### 2. Configure Tailwind CSS v4
|
|
@@ -67,23 +70,34 @@ This package uses **Tailwind CSS v4**. In your main CSS file (e.g., `src/index.c
|
|
|
67
70
|
|
|
68
71
|
### 3. Import the Component and Styles
|
|
69
72
|
|
|
73
|
+
**Important:** Import the styles in your main entry point file:
|
|
74
|
+
|
|
75
|
+
- **React (Vite/CRA)**: `src/main.tsx` or `src/index.tsx`
|
|
76
|
+
- **Next.js (App Router)**: `app/layout.tsx` or `app/page.tsx`
|
|
77
|
+
- **Next.js (Pages Router)**: `pages/_app.tsx`
|
|
78
|
+
- **TanStack Start**: `app.tsx`
|
|
79
|
+
- **Other frameworks**: Your main entry point file
|
|
80
|
+
|
|
70
81
|
```tsx
|
|
71
|
-
|
|
72
|
-
import
|
|
82
|
+
// In your main entry point file (e.g., src/main.tsx, app.tsx, etc.)
|
|
83
|
+
import "@tan-ahmed/tan-ui-kit/styles"; // ⚠️ Import this at the top of your entry file
|
|
84
|
+
import { Button } from "@tan-ahmed/tan-ui-kit";
|
|
73
85
|
|
|
74
86
|
function App() {
|
|
75
|
-
return <Button variant="destructive">Click me</Button
|
|
87
|
+
return <Button variant="destructive">Click me</Button>;
|
|
76
88
|
}
|
|
77
89
|
```
|
|
78
90
|
|
|
79
91
|
## Usage
|
|
80
92
|
|
|
93
|
+
Import the styles once in your main entry point file (see Setup section above), then use components anywhere:
|
|
94
|
+
|
|
81
95
|
```tsx
|
|
82
|
-
|
|
83
|
-
import
|
|
96
|
+
// In your component files, you only need to import the component
|
|
97
|
+
import { Button } from "@tan-ahmed/tan-ui-kit";
|
|
84
98
|
|
|
85
|
-
function
|
|
86
|
-
return <Button variant="secondary">Click me</Button
|
|
99
|
+
function MyComponent() {
|
|
100
|
+
return <Button variant="secondary">Click me</Button>;
|
|
87
101
|
}
|
|
88
102
|
```
|
|
89
103
|
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
1
2
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
5
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
4
|
+
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
11
8
|
export { Button, buttonVariants };
|
|
12
9
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;8EA4BnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,2CAQ7D;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/tan-ui-kit.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),d=require("react"),l=require("@radix-ui/react-slot"),f=require("class-variance-authority"),g=require("clsx"),b=require("tailwind-merge");function v(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const p=v(d);function m(...e){return b.twMerge(g.clsx(e))}const o=f.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),i=p.forwardRef(({className:e,variant:r,size:t,asChild:n=!1,...s},a)=>{const c=n?l.Slot:"button";return u.jsx(c,{className:m(o({variant:r,size:t,className:e})),ref:a,...s})});i.displayName="Button";exports.Button=i;exports.buttonVariants=o;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react/jsx-runtime"),G=require("class-variance-authority"),Y=require("clsx"),J=require("tailwind-merge"),M=require("react");function Z(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=Z(M);function Q(){return typeof window<"u"}function X(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ee(e){return Q()?e instanceof HTMLElement||e instanceof X(e).HTMLElement:!1}const D={};function N(e,t){const n=c.useRef(D);return n.current===D&&(n.current=e(t)),n}const v=c[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],te=v&&v!==c.useLayoutEffect?v:e=>e();function I(e){const t=N(ne).current;return t.next=e,te(t.effect),t.trampoline}function ne(){const e={next:void 0,callback:re,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function re(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}let x;process.env.NODE_ENV!=="production"&&(x=new Set);function O(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");x.has(t)||(x.add(t),console.error(`Base UI: ${t}`))}}const oe=()=>{},ie=typeof document<"u"?c.useLayoutEffect:oe;function E(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const h={};function T(e,t,n,o,r){let i={...w(e,h)};return t&&(i=y(i,t)),n&&(i=y(i,n)),o&&(i=y(i,o)),i}function se(e){if(e.length===0)return h;if(e.length===1)return w(e[0],h);let t={...w(e[0],h)};for(let n=1;n<e.length;n+=1)t=y(t,e[n]);return t}function y(e,t){return R(t)?t(e):ae(e,t)}function ae(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":{e[n]=E(e.style,o);break}case"className":{e[n]=_(e.className,o);break}default:ue(n,o)?e[n]=ce(e[n],o):e[n]=o}}return e}function ue(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&o===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function R(e){return typeof e=="function"}function w(e,t){return R(e)?e(t):e??h}function ce(e,t){return t?e?n=>{if(le(n)){const r=n;k(r);const i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}const o=t(n);return e?.(n),o}:t:e}function k(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function _(e,t){return t?e?t+" "+e:t:e}function le(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function de(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(o=>n.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${n} for the full message.`}const U=c.createContext(void 0);process.env.NODE_ENV!=="production"&&(U.displayName="CompositeRootContext");function fe(e=!1){const t=c.useContext(U);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":de(16));return t}function pe(e){const{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:r=0,isNativeButton:i}=e,a=o&&t!==!1,f=o&&t===!1;return{props:c.useMemo(()=>{const u={onKeyDown(b){n&&t&&b.key!=="Tab"&&b.preventDefault()}};return o||(u.tabIndex=r,!i&&n&&(u.tabIndex=t?r:-1)),(i&&(t||a)||!i&&n)&&(u["aria-disabled"]=n),i&&(!t||f)&&(u.disabled=n),u},[o,n,t,a,f,i,r])}}function be(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:r=!0}=e,i=c.useRef(null),a=fe(!0)!==void 0,f=I(()=>{const l=i.current;return!!(l?.tagName==="A"&&l?.href)}),{props:p}=pe({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:o,isNativeButton:r});process.env.NODE_ENV!=="production"&&c.useEffect(()=>{if(!i.current)return;const l=i.current.tagName==="BUTTON";r?l||O("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):l&&O("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[r]);const u=c.useCallback(()=>{const l=i.current;ge(l)&&a&&t&&p.disabled===void 0&&l.disabled&&(l.disabled=!1)},[t,p.disabled,a]);ie(u,[u]);const b=c.useCallback((l={})=>{const{onClick:d,onMouseDown:z,onKeyUp:L,onKeyDown:K,onPointerDown:W,...$}=l;return T({type:r?"button":void 0,onClick(s){if(t){s.preventDefault();return}d?.(s)},onMouseDown(s){t||z?.(s)},onKeyDown(s){if(t||(k(s),K?.(s)),s.baseUIHandlerPrevented)return;const q=s.target===s.currentTarget&&!r&&!f()&&!t,C=s.key==="Enter",F=s.key===" ";q&&((F||C)&&s.preventDefault(),C&&d?.(s))},onKeyUp(s){t||(k(s),L?.(s)),!s.baseUIHandlerPrevented&&s.target===s.currentTarget&&!r&&!t&&s.key===" "&&d?.(s)},onPointerDown(s){if(t){s.preventDefault();return}W?.(s)}},r?void 0:{role:"button"},p,$)},[t,p,r,f]),g=I(l=>{i.current=l,u()});return{getButtonProps:b,buttonRef:g}}function ge(e){return ee(e)&&e.tagName==="BUTTON"}function P(e,t,n,o){const r=N(V).current;return he(r,e,t,n,o)&&j(r,[e,t,n,o]),r.callback}function me(e){const t=N(V).current;return ye(t,e)&&j(t,e),t.callback}function V(){return{callback:null,cleanup:null,refs:[]}}function he(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}function ye(e,t){return e.refs.length!==t.length||e.refs.some((n,o)=>n!==t[o])}function j(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const o=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const i=t[r];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(o[r]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const i=t[r];if(i!=null)switch(typeof i){case"function":{const a=o[r];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const ve=parseInt(c.version,10);function xe(e){return ve>=e}function B(e){if(!c.isValidElement(e))return null;const t=e,n=t.props;return(xe(19)?n?.ref:t.ref)??null}function Ee(e,t){const n={};for(const o in e){const r=e[o];if(t?.hasOwnProperty(o)){const i=t[o](r);i!=null&&Object.assign(n,i);continue}r===!0?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}function we(e,t){return typeof e=="function"?e(t):e}function ke(e,t){return typeof e=="function"?e(t):e}const m=Object.freeze({});function Ne(e,t,n={}){const o=t.render,r=Ce(t,n);if(n.enabled===!1)return null;const i=n.state??m;return De(e,o,r,i)}function Ce(e,t={}){const{className:n,style:o,render:r}=e,{state:i=m,ref:a,props:f,stateAttributesMapping:p,enabled:u=!0}=t,b=u?we(n,i):void 0,g=u?ke(o,i):void 0,l=u?Ee(i,p):m,d=u?E(l,Array.isArray(f)?se(f):f)??m:m;return typeof document<"u"&&(u?Array.isArray(a)?d.ref=me([d.ref,B(r),...a]):d.ref=P(d.ref,B(r),a):P(null,null)),u?(b!==void 0&&(d.className=_(d.className,b)),g!==void 0&&(d.style=E(d.style,g)),d):m}function De(e,t,n,o){if(t){if(typeof t=="function")return t(n,o);const r=T(n,t.props);return r.ref=n.ref,c.cloneElement(t,r)}return Ie(e,n)}function Ie(e,t){return M.createElement("button",{type:"button",...t,key:t.key})}const A=c.forwardRef(function(t,n){const{render:o,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:f=!0,...p}=t,{getButtonProps:u,buttonRef:b}=be({disabled:i,focusableWhenDisabled:a,native:f}),g=c.useMemo(()=>({disabled:i}),[i]);return Ne("button",t,{state:g,ref:[n,b],props:[p,u]})});process.env.NODE_ENV!=="production"&&(A.displayName="Button");function Oe(...e){return J.twMerge(Y.clsx(e))}const S=G.cva("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Pe({className:e,variant:t="default",size:n="default",...o}){return H.jsx(A,{"data-slot":"button",className:Oe(S({variant:t,size:n,className:e})),...o})}exports.Button=Pe;exports.buttonVariants=S;
|
package/dist/tan-ui-kit.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-outline-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-md:.375rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:#fff;--color-foreground:#0a0a0a;--color-primary:#171717;--color-primary-foreground:#fafafa;--color-secondary:#f5f5f5;--color-secondary-foreground:#171717;--color-accent:#f5f5f5;--color-accent-foreground:#171717;--color-destructive:#ef4444;--color-destructive-foreground:#fafafa;--color-border:#e5e5e5;--color-input:#e5e5e5;--color-ring:#0a0a0a}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:0 0% 9%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--radius:.5rem}.dark{--background:0 0% 3.9%;--foreground:0 0% 98%;--card:0 0% 3.9%;--card-foreground:0 0% 98%;--popover:0 0% 3.9%;--popover-foreground:0 0% 98%;--primary:0 0% 98%;--primary-foreground:0 0% 9%;--secondary:0 0% 14.9%;--secondary-foreground:0 0% 98%;--muted:0 0% 14.9%;--muted-foreground:0 0% 63.9%;--accent:0 0% 14.9%;--accent-foreground:0 0% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:0 0% 98%;--border:0 0% 14.9%;--input:0 0% 14.9%;--ring:0 0% 83.1%}*{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground)}}@layer components;@layer utilities{.visible{visibility:visible}.inline-flex{display:inline-flex}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.w-10{width:calc(var(--spacing)*10)}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-input{border-color:var(--color-input)}.bg-background{background-color:var(--color-background)}.bg-destructive{background-color:var(--color-destructive)}.bg-primary{background-color:var(--color-primary)}.bg-secondary{background-color:var(--color-secondary)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-2{padding-block:calc(var(--spacing)*2)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.whitespace-nowrap{white-space:nowrap}.text-destructive-foreground{color:var(--color-destructive-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.underline-offset-4{text-underline-offset:4px}.ring-offset-background{--tw-ring-offset-color:var(--color-background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-destructive\/90:hover{background-color:#ef4444e6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--color-destructive)90%,transparent)}}.hover\:bg-primary\/90:hover{background-color:#171717e6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--color-primary)90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:#f5f5f5cc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--color-secondary)80%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--color-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-500:oklch(62.3% .214 259.815);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-bold:700;--radius-md:calc(var(--radius) - 2px);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-popover:var(--popover);--color-popover-foreground:var(--popover-foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-secondary:var(--secondary);--color-secondary-foreground:var(--secondary-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-destructive:var(--destructive);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.visible{visibility:visible}.mx-auto{margin-inline:auto}.inline-flex{display:inline-flex}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.w-10{width:calc(var(--spacing)*10)}.w-full{width:100%}.shrink-0{flex-shrink:0}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.rounded-\[min\(var\(--radius-md\)\,8px\)\]{border-radius:min(var(--radius-md),8px)}.rounded-\[min\(var\(--radius-md\)\,10px\)\]{border-radius:min(var(--radius-md),10px)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-border{border-color:var(--border)}.border-input{border-color:var(--input)}.border-transparent{border-color:#0000}.bg-background{background-color:var(--background)}.bg-destructive,.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/10{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-clip-padding{background-clip:padding-box}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-2{padding-block:calc(var(--spacing)*2)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.whitespace-nowrap{white-space:nowrap}.text-blue-500{color:var(--color-blue-500)}.text-destructive{color:var(--destructive)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.underline-offset-4{text-underline-offset:4px}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive\/20:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/20:hover{background-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\:bg-muted:hover{background-color:var(--muted)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary)80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus-visible\:border-destructive\/40:focus-visible{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:border-destructive\/40:focus-visible{border-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}:where([data-slot=button-group]) .in-data-\[slot\=button-group\]\:rounded-md{border-radius:calc(var(--radius) - 2px)}.has-data-\[icon\=inline-end\]\:pr-1\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing)*1.5)}.has-data-\[icon\=inline-end\]\:pr-2:has([data-icon=inline-end]){padding-right:calc(var(--spacing)*2)}.has-data-\[icon\=inline-end\]\:pr-3:has([data-icon=inline-end]){padding-right:calc(var(--spacing)*3)}.has-data-\[icon\=inline-start\]\:pl-1\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing)*1.5)}.has-data-\[icon\=inline-start\]\:pl-2:has([data-icon=inline-start]){padding-left:calc(var(--spacing)*2)}.has-data-\[icon\=inline-start\]\:pl-3:has([data-icon=inline-start]){padding-left:calc(var(--spacing)*3)}.aria-expanded\:bg-muted[aria-expanded=true]{background-color:var(--muted)}.aria-expanded\:bg-secondary[aria-expanded=true]{background-color:var(--secondary)}.aria-expanded\:text-foreground[aria-expanded=true]{color:var(--foreground)}.aria-expanded\:text-secondary-foreground[aria-expanded=true]{color:var(--secondary-foreground)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-\[3px\][aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/20:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/20:is(.dark *){background-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}@media(hover:hover){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:color-mix(in oklab,var(--destructive)30%,transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--muted)50%,transparent)}}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:color-mix(in oklab,var(--destructive)50%,transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:.625rem;--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
|
package/dist/tan-ui-kit.es.js
CHANGED
|
@@ -1,29 +1,436 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
function
|
|
8
|
-
return
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as F } from "react/jsx-runtime";
|
|
2
|
+
import { cva as H } from "class-variance-authority";
|
|
3
|
+
import { clsx as G } from "clsx";
|
|
4
|
+
import { twMerge as Y } from "tailwind-merge";
|
|
5
|
+
import * as c from "react";
|
|
6
|
+
import { createElement as J } from "react";
|
|
7
|
+
function Z() {
|
|
8
|
+
return typeof window < "u";
|
|
9
|
+
}
|
|
10
|
+
function q(e) {
|
|
11
|
+
var t;
|
|
12
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
13
|
+
}
|
|
14
|
+
function Q(e) {
|
|
15
|
+
return Z() ? e instanceof HTMLElement || e instanceof q(e).HTMLElement : !1;
|
|
16
|
+
}
|
|
17
|
+
const D = {};
|
|
18
|
+
function N(e, t) {
|
|
19
|
+
const n = c.useRef(D);
|
|
20
|
+
return n.current === D && (n.current = e(t)), n;
|
|
21
|
+
}
|
|
22
|
+
const y = c[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)], X = (
|
|
23
|
+
// React 17 doesn't have useInsertionEffect.
|
|
24
|
+
y && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
|
|
25
|
+
y !== c.useLayoutEffect ? y : (e) => e()
|
|
26
|
+
);
|
|
27
|
+
function I(e) {
|
|
28
|
+
const t = N(ee).current;
|
|
29
|
+
return t.next = e, X(t.effect), t.trampoline;
|
|
30
|
+
}
|
|
31
|
+
function ee() {
|
|
32
|
+
const e = {
|
|
33
|
+
next: void 0,
|
|
34
|
+
callback: te,
|
|
35
|
+
trampoline: (...t) => e.callback?.(...t),
|
|
36
|
+
effect: () => {
|
|
37
|
+
e.callback = e.next;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return e;
|
|
41
|
+
}
|
|
42
|
+
function te() {
|
|
43
|
+
if (process.env.NODE_ENV !== "production")
|
|
44
|
+
throw new Error("Base UI: Cannot call an event handler while rendering.");
|
|
45
|
+
}
|
|
46
|
+
let x;
|
|
47
|
+
process.env.NODE_ENV !== "production" && (x = /* @__PURE__ */ new Set());
|
|
48
|
+
function B(...e) {
|
|
49
|
+
if (process.env.NODE_ENV !== "production") {
|
|
50
|
+
const t = e.join(" ");
|
|
51
|
+
x.has(t) || (x.add(t), console.error(`Base UI: ${t}`));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const ne = () => {
|
|
55
|
+
}, re = typeof document < "u" ? c.useLayoutEffect : ne;
|
|
56
|
+
function E(e, t) {
|
|
57
|
+
if (e && !t)
|
|
58
|
+
return e;
|
|
59
|
+
if (!e && t)
|
|
60
|
+
return t;
|
|
61
|
+
if (e || t)
|
|
62
|
+
return {
|
|
63
|
+
...e,
|
|
64
|
+
...t
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const h = {};
|
|
68
|
+
function T(e, t, n, o, r) {
|
|
69
|
+
let i = {
|
|
70
|
+
...w(e, h)
|
|
71
|
+
};
|
|
72
|
+
return t && (i = v(i, t)), n && (i = v(i, n)), o && (i = v(i, o)), i;
|
|
73
|
+
}
|
|
74
|
+
function oe(e) {
|
|
75
|
+
if (e.length === 0)
|
|
76
|
+
return h;
|
|
77
|
+
if (e.length === 1)
|
|
78
|
+
return w(e[0], h);
|
|
79
|
+
let t = {
|
|
80
|
+
...w(e[0], h)
|
|
81
|
+
};
|
|
82
|
+
for (let n = 1; n < e.length; n += 1)
|
|
83
|
+
t = v(t, e[n]);
|
|
84
|
+
return t;
|
|
85
|
+
}
|
|
86
|
+
function v(e, t) {
|
|
87
|
+
return U(t) ? t(e) : ie(e, t);
|
|
88
|
+
}
|
|
89
|
+
function ie(e, t) {
|
|
90
|
+
if (!t)
|
|
91
|
+
return e;
|
|
92
|
+
for (const n in t) {
|
|
93
|
+
const o = t[n];
|
|
94
|
+
switch (n) {
|
|
95
|
+
case "style": {
|
|
96
|
+
e[n] = E(e.style, o);
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case "className": {
|
|
100
|
+
e[n] = M(e.className, o);
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
default:
|
|
104
|
+
se(n, o) ? e[n] = ae(e[n], o) : e[n] = o;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return e;
|
|
108
|
+
}
|
|
109
|
+
function se(e, t) {
|
|
110
|
+
const n = e.charCodeAt(0), o = e.charCodeAt(1), r = e.charCodeAt(2);
|
|
111
|
+
return n === 111 && o === 110 && r >= 65 && r <= 90 && (typeof t == "function" || typeof t > "u");
|
|
112
|
+
}
|
|
113
|
+
function U(e) {
|
|
114
|
+
return typeof e == "function";
|
|
115
|
+
}
|
|
116
|
+
function w(e, t) {
|
|
117
|
+
return U(e) ? e(t) : e ?? h;
|
|
118
|
+
}
|
|
119
|
+
function ae(e, t) {
|
|
120
|
+
return t ? e ? (n) => {
|
|
121
|
+
if (ue(n)) {
|
|
122
|
+
const r = n;
|
|
123
|
+
k(r);
|
|
124
|
+
const i = t(r);
|
|
125
|
+
return r.baseUIHandlerPrevented || e?.(r), i;
|
|
126
|
+
}
|
|
127
|
+
const o = t(n);
|
|
128
|
+
return e?.(n), o;
|
|
129
|
+
} : t : e;
|
|
130
|
+
}
|
|
131
|
+
function k(e) {
|
|
132
|
+
return e.preventBaseUIHandler = () => {
|
|
133
|
+
e.baseUIHandlerPrevented = !0;
|
|
134
|
+
}, e;
|
|
135
|
+
}
|
|
136
|
+
function M(e, t) {
|
|
137
|
+
return t ? e ? t + " " + e : t : e;
|
|
138
|
+
}
|
|
139
|
+
function ue(e) {
|
|
140
|
+
return e != null && typeof e == "object" && "nativeEvent" in e;
|
|
141
|
+
}
|
|
142
|
+
function ce(e, ...t) {
|
|
143
|
+
const n = new URL("https://base-ui.com/production-error");
|
|
144
|
+
return n.searchParams.set("code", e.toString()), t.forEach((o) => n.searchParams.append("args[]", o)), `Base UI error #${e}; visit ${n} for the full message.`;
|
|
145
|
+
}
|
|
146
|
+
const R = /* @__PURE__ */ c.createContext(void 0);
|
|
147
|
+
process.env.NODE_ENV !== "production" && (R.displayName = "CompositeRootContext");
|
|
148
|
+
function le(e = !1) {
|
|
149
|
+
const t = c.useContext(R);
|
|
150
|
+
if (t === void 0 && !e)
|
|
151
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : ce(16));
|
|
152
|
+
return t;
|
|
153
|
+
}
|
|
154
|
+
function de(e) {
|
|
155
|
+
const {
|
|
156
|
+
focusableWhenDisabled: t,
|
|
157
|
+
disabled: n,
|
|
158
|
+
composite: o = !1,
|
|
159
|
+
tabIndex: r = 0,
|
|
160
|
+
isNativeButton: i
|
|
161
|
+
} = e, a = o && t !== !1, f = o && t === !1;
|
|
162
|
+
return {
|
|
163
|
+
props: c.useMemo(() => {
|
|
164
|
+
const u = {
|
|
165
|
+
// allow Tabbing away from focusableWhenDisabled elements
|
|
166
|
+
onKeyDown(b) {
|
|
167
|
+
n && t && b.key !== "Tab" && b.preventDefault();
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
return o || (u.tabIndex = r, !i && n && (u.tabIndex = t ? r : -1)), (i && (t || a) || !i && n) && (u["aria-disabled"] = n), i && (!t || f) && (u.disabled = n), u;
|
|
171
|
+
}, [o, n, t, a, f, i, r])
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function fe(e = {}) {
|
|
175
|
+
const {
|
|
176
|
+
disabled: t = !1,
|
|
177
|
+
focusableWhenDisabled: n,
|
|
178
|
+
tabIndex: o = 0,
|
|
179
|
+
native: r = !0
|
|
180
|
+
} = e, i = c.useRef(null), a = le(!0) !== void 0, f = I(() => {
|
|
181
|
+
const l = i.current;
|
|
182
|
+
return !!(l?.tagName === "A" && l?.href);
|
|
183
|
+
}), {
|
|
184
|
+
props: p
|
|
185
|
+
} = de({
|
|
186
|
+
focusableWhenDisabled: n,
|
|
187
|
+
disabled: t,
|
|
188
|
+
composite: a,
|
|
189
|
+
tabIndex: o,
|
|
190
|
+
isNativeButton: r
|
|
191
|
+
});
|
|
192
|
+
process.env.NODE_ENV !== "production" && c.useEffect(() => {
|
|
193
|
+
if (!i.current)
|
|
194
|
+
return;
|
|
195
|
+
const l = i.current.tagName === "BUTTON";
|
|
196
|
+
r ? l || B("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`.") : l && B("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.");
|
|
197
|
+
}, [r]);
|
|
198
|
+
const u = c.useCallback(() => {
|
|
199
|
+
const l = i.current;
|
|
200
|
+
pe(l) && a && t && p.disabled === void 0 && l.disabled && (l.disabled = !1);
|
|
201
|
+
}, [t, p.disabled, a]);
|
|
202
|
+
re(u, [u]);
|
|
203
|
+
const b = c.useCallback((l = {}) => {
|
|
204
|
+
const {
|
|
205
|
+
onClick: d,
|
|
206
|
+
onMouseDown: z,
|
|
207
|
+
onKeyUp: L,
|
|
208
|
+
onKeyDown: S,
|
|
209
|
+
onPointerDown: j,
|
|
210
|
+
...K
|
|
211
|
+
} = l;
|
|
212
|
+
return T({
|
|
213
|
+
type: r ? "button" : void 0,
|
|
214
|
+
onClick(s) {
|
|
215
|
+
if (t) {
|
|
216
|
+
s.preventDefault();
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
d?.(s);
|
|
220
|
+
},
|
|
221
|
+
onMouseDown(s) {
|
|
222
|
+
t || z?.(s);
|
|
223
|
+
},
|
|
224
|
+
onKeyDown(s) {
|
|
225
|
+
if (t || (k(s), S?.(s)), s.baseUIHandlerPrevented)
|
|
226
|
+
return;
|
|
227
|
+
const W = s.target === s.currentTarget && !r && !f() && !t, C = s.key === "Enter", $ = s.key === " ";
|
|
228
|
+
W && (($ || C) && s.preventDefault(), C && d?.(s));
|
|
229
|
+
},
|
|
230
|
+
onKeyUp(s) {
|
|
231
|
+
t || (k(s), L?.(s)), !s.baseUIHandlerPrevented && s.target === s.currentTarget && !r && !t && s.key === " " && d?.(s);
|
|
232
|
+
},
|
|
233
|
+
onPointerDown(s) {
|
|
234
|
+
if (t) {
|
|
235
|
+
s.preventDefault();
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
j?.(s);
|
|
239
|
+
}
|
|
240
|
+
}, r ? void 0 : {
|
|
241
|
+
role: "button"
|
|
242
|
+
}, p, K);
|
|
243
|
+
}, [t, p, r, f]), m = I((l) => {
|
|
244
|
+
i.current = l, u();
|
|
245
|
+
});
|
|
246
|
+
return {
|
|
247
|
+
getButtonProps: b,
|
|
248
|
+
buttonRef: m
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
function pe(e) {
|
|
252
|
+
return Q(e) && e.tagName === "BUTTON";
|
|
253
|
+
}
|
|
254
|
+
function P(e, t, n, o) {
|
|
255
|
+
const r = N(A).current;
|
|
256
|
+
return me(r, e, t, n, o) && V(r, [e, t, n, o]), r.callback;
|
|
257
|
+
}
|
|
258
|
+
function be(e) {
|
|
259
|
+
const t = N(A).current;
|
|
260
|
+
return ge(t, e) && V(t, e), t.callback;
|
|
261
|
+
}
|
|
262
|
+
function A() {
|
|
263
|
+
return {
|
|
264
|
+
callback: null,
|
|
265
|
+
cleanup: null,
|
|
266
|
+
refs: []
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
function me(e, t, n, o, r) {
|
|
270
|
+
return e.refs[0] !== t || e.refs[1] !== n || e.refs[2] !== o || e.refs[3] !== r;
|
|
271
|
+
}
|
|
272
|
+
function ge(e, t) {
|
|
273
|
+
return e.refs.length !== t.length || e.refs.some((n, o) => n !== t[o]);
|
|
274
|
+
}
|
|
275
|
+
function V(e, t) {
|
|
276
|
+
if (e.refs = t, t.every((n) => n == null)) {
|
|
277
|
+
e.callback = null;
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
e.callback = (n) => {
|
|
281
|
+
if (e.cleanup && (e.cleanup(), e.cleanup = null), n != null) {
|
|
282
|
+
const o = Array(t.length).fill(null);
|
|
283
|
+
for (let r = 0; r < t.length; r += 1) {
|
|
284
|
+
const i = t[r];
|
|
285
|
+
if (i != null)
|
|
286
|
+
switch (typeof i) {
|
|
287
|
+
case "function": {
|
|
288
|
+
const a = i(n);
|
|
289
|
+
typeof a == "function" && (o[r] = a);
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
case "object": {
|
|
293
|
+
i.current = n;
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
e.cleanup = () => {
|
|
299
|
+
for (let r = 0; r < t.length; r += 1) {
|
|
300
|
+
const i = t[r];
|
|
301
|
+
if (i != null)
|
|
302
|
+
switch (typeof i) {
|
|
303
|
+
case "function": {
|
|
304
|
+
const a = o[r];
|
|
305
|
+
typeof a == "function" ? a() : i(null);
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
case "object": {
|
|
309
|
+
i.current = null;
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
const he = parseInt(c.version, 10);
|
|
319
|
+
function ve(e) {
|
|
320
|
+
return he >= e;
|
|
321
|
+
}
|
|
322
|
+
function O(e) {
|
|
323
|
+
if (!/* @__PURE__ */ c.isValidElement(e))
|
|
324
|
+
return null;
|
|
325
|
+
const t = e, n = t.props;
|
|
326
|
+
return (ve(19) ? n?.ref : t.ref) ?? null;
|
|
327
|
+
}
|
|
328
|
+
function ye(e, t) {
|
|
329
|
+
const n = {};
|
|
330
|
+
for (const o in e) {
|
|
331
|
+
const r = e[o];
|
|
332
|
+
if (t?.hasOwnProperty(o)) {
|
|
333
|
+
const i = t[o](r);
|
|
334
|
+
i != null && Object.assign(n, i);
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
r === !0 ? n[`data-${o.toLowerCase()}`] = "" : r && (n[`data-${o.toLowerCase()}`] = r.toString());
|
|
338
|
+
}
|
|
339
|
+
return n;
|
|
340
|
+
}
|
|
341
|
+
function xe(e, t) {
|
|
342
|
+
return typeof e == "function" ? e(t) : e;
|
|
343
|
+
}
|
|
344
|
+
function Ee(e, t) {
|
|
345
|
+
return typeof e == "function" ? e(t) : e;
|
|
346
|
+
}
|
|
347
|
+
const g = Object.freeze({});
|
|
348
|
+
function we(e, t, n = {}) {
|
|
349
|
+
const o = t.render, r = ke(t, n);
|
|
350
|
+
if (n.enabled === !1)
|
|
351
|
+
return null;
|
|
352
|
+
const i = n.state ?? g;
|
|
353
|
+
return Ne(e, o, r, i);
|
|
354
|
+
}
|
|
355
|
+
function ke(e, t = {}) {
|
|
356
|
+
const {
|
|
357
|
+
className: n,
|
|
358
|
+
style: o,
|
|
359
|
+
render: r
|
|
360
|
+
} = e, {
|
|
361
|
+
state: i = g,
|
|
362
|
+
ref: a,
|
|
363
|
+
props: f,
|
|
364
|
+
stateAttributesMapping: p,
|
|
365
|
+
enabled: u = !0
|
|
366
|
+
} = t, b = u ? xe(n, i) : void 0, m = u ? Ee(o, i) : void 0, l = u ? ye(i, p) : g, d = u ? E(l, Array.isArray(f) ? oe(f) : f) ?? g : g;
|
|
367
|
+
return typeof document < "u" && (u ? Array.isArray(a) ? d.ref = be([d.ref, O(r), ...a]) : d.ref = P(d.ref, O(r), a) : P(null, null)), u ? (b !== void 0 && (d.className = M(d.className, b)), m !== void 0 && (d.style = E(d.style, m)), d) : g;
|
|
368
|
+
}
|
|
369
|
+
function Ne(e, t, n, o) {
|
|
370
|
+
if (t) {
|
|
371
|
+
if (typeof t == "function")
|
|
372
|
+
return t(n, o);
|
|
373
|
+
const r = T(n, t.props);
|
|
374
|
+
return r.ref = n.ref, /* @__PURE__ */ c.cloneElement(t, r);
|
|
375
|
+
}
|
|
376
|
+
return Ce(e, n);
|
|
377
|
+
}
|
|
378
|
+
function Ce(e, t) {
|
|
379
|
+
return /* @__PURE__ */ J("button", {
|
|
380
|
+
type: "button",
|
|
381
|
+
...t,
|
|
382
|
+
key: t.key
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
const _ = /* @__PURE__ */ c.forwardRef(function(t, n) {
|
|
386
|
+
const {
|
|
387
|
+
render: o,
|
|
388
|
+
className: r,
|
|
389
|
+
disabled: i = !1,
|
|
390
|
+
focusableWhenDisabled: a = !1,
|
|
391
|
+
nativeButton: f = !0,
|
|
392
|
+
...p
|
|
393
|
+
} = t, {
|
|
394
|
+
getButtonProps: u,
|
|
395
|
+
buttonRef: b
|
|
396
|
+
} = fe({
|
|
397
|
+
disabled: i,
|
|
398
|
+
focusableWhenDisabled: a,
|
|
399
|
+
native: f
|
|
400
|
+
}), m = c.useMemo(() => ({
|
|
401
|
+
disabled: i
|
|
402
|
+
}), [i]);
|
|
403
|
+
return we("button", t, {
|
|
404
|
+
state: m,
|
|
405
|
+
ref: [n, b],
|
|
406
|
+
props: [p, u]
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
process.env.NODE_ENV !== "production" && (_.displayName = "Button");
|
|
410
|
+
function De(...e) {
|
|
411
|
+
return Y(G(e));
|
|
412
|
+
}
|
|
413
|
+
const Ie = H(
|
|
414
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
|
|
12
415
|
{
|
|
13
416
|
variants: {
|
|
14
417
|
variant: {
|
|
15
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
418
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
419
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs",
|
|
420
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
421
|
+
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
422
|
+
destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
|
|
20
423
|
link: "text-primary underline-offset-4 hover:underline"
|
|
21
424
|
},
|
|
22
425
|
size: {
|
|
23
|
-
default: "h-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
426
|
+
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
427
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
428
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
429
|
+
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
430
|
+
icon: "size-9",
|
|
431
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
432
|
+
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
433
|
+
"icon-lg": "size-10"
|
|
27
434
|
}
|
|
28
435
|
},
|
|
29
436
|
defaultVariants: {
|
|
@@ -31,18 +438,23 @@ const m = c(
|
|
|
31
438
|
size: "default"
|
|
32
439
|
}
|
|
33
440
|
}
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
|
|
441
|
+
);
|
|
442
|
+
function Re({
|
|
443
|
+
className: e,
|
|
444
|
+
variant: t = "default",
|
|
445
|
+
size: n = "default",
|
|
446
|
+
...o
|
|
447
|
+
}) {
|
|
448
|
+
return /* @__PURE__ */ F(
|
|
449
|
+
_,
|
|
37
450
|
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
...
|
|
451
|
+
"data-slot": "button",
|
|
452
|
+
className: De(Ie({ variant: t, size: n, className: e })),
|
|
453
|
+
...o
|
|
41
454
|
}
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
l.displayName = "Button";
|
|
455
|
+
);
|
|
456
|
+
}
|
|
45
457
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
458
|
+
Re as Button,
|
|
459
|
+
Ie as buttonVariants
|
|
48
460
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tan-ahmed/tan-ui-kit",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "A React component library built with Tailwind CSS v4 and
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "A React component library built with Tailwind CSS v4 and base-ui components",
|
|
5
5
|
"type": "module",
|
|
6
|
-
|
|
7
6
|
"module": "./dist/tan-ui-kit.es.js",
|
|
8
7
|
"types": "./dist/index.d.ts",
|
|
9
8
|
"exports": {
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
"component-library",
|
|
33
32
|
"ui-components",
|
|
34
33
|
"tailwindcss",
|
|
35
|
-
"
|
|
34
|
+
"base-ui",
|
|
36
35
|
"typescript"
|
|
37
36
|
],
|
|
38
37
|
"author": "",
|
|
@@ -46,7 +45,6 @@
|
|
|
46
45
|
"prepublishOnly": "npm run build"
|
|
47
46
|
},
|
|
48
47
|
"peerDependencies": {
|
|
49
|
-
"@radix-ui/react-slot": "^1.0.2",
|
|
50
48
|
"class-variance-authority": "^0.7.0",
|
|
51
49
|
"clsx": "^2.1.0",
|
|
52
50
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -55,23 +53,27 @@
|
|
|
55
53
|
},
|
|
56
54
|
"devDependencies": {
|
|
57
55
|
"@eslint/js": "^9.39.1",
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
56
|
+
"@base-ui/react": "^1.1.0",
|
|
57
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
58
|
+
"@types/node": "^24.10.9",
|
|
60
59
|
"@types/react": "^19.2.5",
|
|
61
60
|
"@types/react-dom": "^19.2.3",
|
|
62
61
|
"@vitejs/plugin-react": "^5.1.1",
|
|
63
|
-
"class-variance-authority": "^0.7.
|
|
64
|
-
"clsx": "^2.1.
|
|
62
|
+
"class-variance-authority": "^0.7.1",
|
|
63
|
+
"clsx": "^2.1.1",
|
|
65
64
|
"eslint": "^9.39.1",
|
|
66
65
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
67
66
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
68
67
|
"globals": "^15.0.0",
|
|
69
|
-
"tailwind-merge": "^2.
|
|
70
|
-
"tailwindcss": "^4.
|
|
71
|
-
"
|
|
68
|
+
"tailwind-merge": "^2.6.0",
|
|
69
|
+
"tailwindcss": "^4.1.18",
|
|
70
|
+
"tw-animate-css": "^1.4.0",
|
|
72
71
|
"typescript": "~5.9.3",
|
|
73
72
|
"typescript-eslint": "^8.46.4",
|
|
74
73
|
"vite": "^7.2.4",
|
|
75
74
|
"vite-plugin-dts": "^4.5.4"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"lucide-react": "^0.563.0"
|
|
76
78
|
}
|
|
77
79
|
}
|