reaxify 0.0.89 → 0.0.90
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/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.es.js +24 -24
- package/dist/components/Badge/index.cjs.js +1 -1
- package/dist/components/Badge/index.es.js +1 -1
- package/dist/components/Button/index.cjs.js +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.es.js +46 -44
- package/dist/components/ButtonGroup/index.cjs.js +1 -1
- package/dist/components/ButtonGroup/index.d.ts.map +1 -1
- package/dist/components/ButtonGroup/index.es.js +21 -23
- package/dist/components/Card/index.cjs.js +1 -1
- package/dist/components/Card/index.es.js +25 -25
- package/dist/components/Divider/index.d.ts +13 -0
- package/dist/components/Divider/index.d.ts.map +1 -0
- package/dist/components/Drawer/index.cjs.js +1 -1
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.es.js +23 -24
- package/dist/components/InputGroup/index.cjs.js +1 -1
- package/dist/components/InputGroup/index.es.js +19 -19
- package/dist/components/Menu/index.cjs.js +1 -1
- package/dist/components/Menu/index.d.ts +1 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.es.js +66 -61
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.es.js +8 -9
- package/dist/components/Switch/index.cjs.js +1 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Switch/index.es.js +35 -35
- package/dist/components/Table/index.cjs.js +1 -1
- package/dist/components/Table/index.es.js +1 -1
- package/dist/components/Tabs/index.cjs.js +1 -1
- package/dist/components/Tabs/index.d.ts +10 -5
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.es.js +64 -48
- package/dist/hooks/useCreateRipple.cjs.js +1 -1
- package/dist/hooks/useCreateRipple.d.ts.map +1 -1
- package/dist/hooks/useCreateRipple.es.js +2 -2
- package/dist/providers/ThemeProvider.d.ts +12 -3
- package/dist/providers/ThemeProvider.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,49 +4,49 @@ import d from "../../helpers/cn.es.js";
|
|
|
4
4
|
import { useMemo as i } from "react";
|
|
5
5
|
import { twMerge as p } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
6
6
|
function C({
|
|
7
|
-
checked:
|
|
8
|
-
onChange:
|
|
9
|
-
disabled:
|
|
7
|
+
checked: r,
|
|
8
|
+
onChange: b,
|
|
9
|
+
disabled: o,
|
|
10
10
|
color: a = "primary",
|
|
11
|
-
size:
|
|
11
|
+
size: n = "md",
|
|
12
12
|
inputProps: s = {},
|
|
13
13
|
className: m,
|
|
14
14
|
...c
|
|
15
15
|
}) {
|
|
16
|
-
const u = i(() => "", [
|
|
17
|
-
const
|
|
18
|
-
primary:
|
|
19
|
-
secondary:
|
|
20
|
-
success:
|
|
21
|
-
info:
|
|
22
|
-
warning:
|
|
23
|
-
danger:
|
|
24
|
-
dark:
|
|
25
|
-
light:
|
|
16
|
+
const u = i(() => "", [r]), f = i(() => {
|
|
17
|
+
const e = {
|
|
18
|
+
primary: r ? "bg-primary border-primary" : "bg-white border-border",
|
|
19
|
+
secondary: r ? "bg-secondary border-secondary" : "bg-white border-border",
|
|
20
|
+
success: r ? "bg-success border-success" : "bg-white border-border",
|
|
21
|
+
info: r ? "bg-info border-info" : "bg-white border-border",
|
|
22
|
+
warning: r ? "bg-warning border-warning" : "bg-white border-border",
|
|
23
|
+
danger: r ? "bg-danger border-danger" : "bg-white border-border",
|
|
24
|
+
dark: r ? "bg-dark border-dark" : "bg-white border-border",
|
|
25
|
+
light: r ? "bg-light border-light" : "bg-white border-border"
|
|
26
26
|
};
|
|
27
|
-
return
|
|
28
|
-
}, [a,
|
|
29
|
-
const
|
|
30
|
-
primary:
|
|
31
|
-
secondary:
|
|
32
|
-
success:
|
|
33
|
-
info:
|
|
34
|
-
warning:
|
|
35
|
-
danger:
|
|
36
|
-
dark:
|
|
37
|
-
light:
|
|
27
|
+
return e == null ? void 0 : e[a];
|
|
28
|
+
}, [a, r]), w = i(() => {
|
|
29
|
+
const e = {
|
|
30
|
+
primary: r ? "bg-primary " : "bg-black",
|
|
31
|
+
secondary: r ? "bg-secondary" : "bg-black",
|
|
32
|
+
success: r ? "bg-success" : "bg-black",
|
|
33
|
+
info: r ? "bg-info" : "bg-black",
|
|
34
|
+
warning: r ? "bg-warning" : "bg-black",
|
|
35
|
+
danger: r ? "bg-danger" : "bg-black",
|
|
36
|
+
dark: r ? "bg-dark" : "bg-black",
|
|
37
|
+
light: r ? "bg-light" : "bg-black"
|
|
38
38
|
};
|
|
39
|
-
return
|
|
40
|
-
}, [a,
|
|
41
|
-
const
|
|
39
|
+
return e == null ? void 0 : e[a];
|
|
40
|
+
}, [a, r]), h = i(() => {
|
|
41
|
+
const e = {
|
|
42
42
|
sm: "[--size:0.25rem]",
|
|
43
43
|
md: "[--size:0.5rem]",
|
|
44
44
|
lg: "[--size:0.75rem]"
|
|
45
45
|
};
|
|
46
|
-
return
|
|
47
|
-
}, [
|
|
48
|
-
var
|
|
49
|
-
|
|
46
|
+
return e == null ? void 0 : e[n];
|
|
47
|
+
}, [n]), y = (e) => {
|
|
48
|
+
var l;
|
|
49
|
+
b == null || b(e.currentTarget.checked), (l = s.onChange) == null || l.call(s, e);
|
|
50
50
|
};
|
|
51
51
|
return /* @__PURE__ */ g(
|
|
52
52
|
"span",
|
|
@@ -55,7 +55,7 @@ function C({
|
|
|
55
55
|
h,
|
|
56
56
|
"[--w:2.5rem] [--h:1.875rem] [--t:0.75rem] [--width:calc(var(--w)+var(--size)*2)] [--height:calc(var(--h)+var(--size))] [--thumb:calc(var(--t)+var(--size))] [--scale:0] hover:[--scale:1]",
|
|
57
57
|
"inline-flex w-(--width) h-(--height) overflow-hidden p-3 relative align-middle",
|
|
58
|
-
|
|
58
|
+
o && "opacity-75",
|
|
59
59
|
u,
|
|
60
60
|
m
|
|
61
61
|
),
|
|
@@ -67,8 +67,8 @@ function C({
|
|
|
67
67
|
...s,
|
|
68
68
|
type: "checkbox",
|
|
69
69
|
className: "peer absolute inset-0 size-full opacity-0 cursor-pointer disabled:cursor-not-allowed z-[2]",
|
|
70
|
-
checked:
|
|
71
|
-
disabled:
|
|
70
|
+
checked: r,
|
|
71
|
+
disabled: o,
|
|
72
72
|
onChange: y
|
|
73
73
|
}
|
|
74
74
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const s=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";const s=require("react/jsx-runtime"),i=require("../../hooks/useClasses.cjs.js"),u=require("react"),n=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),f=u.createContext({striped:!1,bordered:!1,hover:!1});function g({className:r,children:o,...a}){const e=i(t=>t.table.container.base);return s.jsx("div",{className:n.twMerge("w-full overflow-auto",e,r),...a,children:o})}function l({striped:r=!1,bordered:o=!1,hover:a=!1,className:e,children:t,...d}){const b=i(c=>c.table.base);return s.jsx("table",{className:n.twMerge("min-w-full border-collapse border-spacing-0",b,e),...d,children:s.jsx(f.Provider,{value:{bordered:o,hover:a,striped:r},children:t})})}function p({sticky:r=!1,className:o,children:a,...e}){const t=i(d=>d.table.header);return s.jsx("thead",{className:n.twMerge(t==null?void 0:t.base,r&&"sticky top-0 left-0 right-0 z-[2]",r&&(t==null?void 0:t.sticky),o),...e,children:a})}function m({className:r,children:o,...a}){const e=i(t=>t.table.body.base);return s.jsx("tbody",{className:n.twMerge(e,r),...a,children:o})}function y({className:r,children:o,...a}){const e=i(w=>w.table.row),{bordered:t,hover:d,striped:b}=u.useContext(f),c=!!t,x=t==="dashed",h=t==="solid";return s.jsx("tr",{className:n.twMerge("bg-white",e==null?void 0:e.base,c&&"border-b border-solid border-border",x&&"border-dashed",h&&"border-solid",c&&(e==null?void 0:e.bordered),d&&"cursor-pointer transition-colors hover:bg-gray-200",d&&(e==null?void 0:e.hover),b&&"even:bg-gray-100",b&&(e==null?void 0:e.hover),r),...a,children:o})}function j({sticky:r=!1,className:o,children:a,...e}){return s.jsx("th",{className:n.twMerge("font-medium text-sm py-2 px-4 whitespace-nowrap text-center first:text-start last:text-end",r&&"bg-inherit sticky end-0 z-[1]",o),...e,children:a})}function v({sticky:r=!1,className:o,children:a,...e}){return s.jsx("td",{className:n.twMerge("font-normal text-sm py-2 px-4 whitespace-nowrap text-center first:text-start last:text-end",r&&"bg-inherit sticky end-0 z-[1]",o),...e,children:a})}l.Container=g;l.Header=p;l.Body=m;l.Row=y;l.HeaderCell=j;l.DataCell=v;module.exports=l;
|
|
@@ -78,7 +78,7 @@ function v({ className: r, children: o, ...a }) {
|
|
|
78
78
|
className: s(
|
|
79
79
|
"bg-white",
|
|
80
80
|
e == null ? void 0 : e.base,
|
|
81
|
-
c && "border-b border-solid border-
|
|
81
|
+
c && "border-b border-solid border-border",
|
|
82
82
|
u && "border-dashed",
|
|
83
83
|
m && "border-solid",
|
|
84
84
|
c && (e == null ? void 0 : e.bordered),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react/jsx-runtime"),r=require("react"),j=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),g=require("../../helpers/cn.cjs.js"),p=require("../../hooks/useClasses.cjs.js"),q=require("../Button/index.cjs.js"),T=require("../ButtonGroup/index.cjs.js"),d=r.createContext({active:null,onChange:()=>{}});function f({active:s=null,onChange:t=()=>{},children:a}){return c.jsx(d.Provider,{value:{active:s,onChange:t},children:a})}function I({className:s,...t}){const[a,u]=r.useState(!1),l=p(e=>e.tabs.indicator.base),{active:m}=r.useContext(d),b=r.useRef(null),x=r.useCallback(()=>{const e=b.current,n=e==null?void 0:e.parentElement,o=n==null?void 0:n.querySelector("button[data-active='true']");if(!n||!o||!e)return;const i=(o==null?void 0:o.offsetLeft)??0,v=window.getComputedStyle(o).paddingInline,C=(o==null?void 0:o.getBoundingClientRect().width)??0,y=i,w=C;e.style.setProperty("--left",`${y}px`),e.style.setProperty("--width",`${w}px`),e.style.setProperty("--padding-x",`${v}`)},[]);return r.useEffect(()=>{x(),requestAnimationFrame(()=>u(!0))},[x,m]),c.jsx("span",{ref:b,className:j.twMerge("absolute bottom-0 left-(--left,0px) rtl:left-(--left,100%) w-(--width,0px) px-(--padding-x,0px) h-px overflow-hidden",a?"transition-[width,left,padding]":"",l,s),...t,children:c.jsx("span",{className:"block size-full rounded-full bg-primary"})})}function P({className:s,children:t,...a}){const u=p(l=>l.tabs.buttonGroup.base);return c.jsx(T.default,{as:"div",className:g("relative flex items-center",u,s),...a,children:t})}function M({eventKey:s,className:t,children:a,onClick:u,...l}){const m=p(i=>i.tabs.button.base),b=p(i=>i.tabs.button.active),{active:x,onChange:e}=r.useContext(d),n=s===x,h=r.useMemo(()=>typeof t=="function"?t({isActive:n}):t,[n,t]),o=i=>{!n&&e(s),u==null||u(i)};return c.jsx(q,{as:"button",type:"button","data-active":n,onClick:o,color:n?"primary":"dark",variant:"text",className:g("shadow-none border-none",m,n&&b,h),...l,children:a})}function R({eventKey:s,children:t}){const{active:a}=r.useContext(d);return a!==s?null:c.jsx(r.Fragment,{children:t})}f.Indicator=I;f.ButtonGroup=P;f.Button=M;f.Item=R;exports.TabsContext=d;exports.default=f;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { ChildrenProps } from '../../types';
|
|
1
|
+
import { ChildrenProps, ComponentPropsWithoutAs } from '../../types';
|
|
2
2
|
import { ComponentProps, Dispatch } from 'react';
|
|
3
3
|
import { default as Button } from '../Button';
|
|
4
|
+
import { default as ButtonGroup } from '../ButtonGroup';
|
|
4
5
|
type TabsProps = {
|
|
5
6
|
active?: null | string;
|
|
6
7
|
onChange?: Dispatch<string>;
|
|
7
8
|
} & ChildrenProps;
|
|
9
|
+
type TabButtonGroupProps = {
|
|
10
|
+
as?: never;
|
|
11
|
+
};
|
|
8
12
|
type TabButtonProps = {
|
|
9
|
-
|
|
13
|
+
as?: never;
|
|
10
14
|
type?: never;
|
|
11
|
-
|
|
15
|
+
eventKey: string;
|
|
12
16
|
className?: string | ((options: {
|
|
13
17
|
isActive: boolean;
|
|
14
18
|
}) => string | undefined);
|
|
@@ -19,17 +23,18 @@ type TabItemProps = {
|
|
|
19
23
|
type TabsContextType = {
|
|
20
24
|
active: null | string;
|
|
21
25
|
onChange: Dispatch<string>;
|
|
22
|
-
buttonGroupClasses: string;
|
|
23
26
|
};
|
|
24
27
|
export declare const TabsContext: import('react').Context<TabsContextType>;
|
|
25
28
|
declare function Tabs({ active, onChange, children }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
26
29
|
declare namespace Tabs {
|
|
27
30
|
var Indicator: typeof TabIndicator;
|
|
31
|
+
var ButtonGroup: typeof TabButtonGroup;
|
|
28
32
|
var Button: typeof TabButton;
|
|
29
33
|
var Item: typeof TabItem;
|
|
30
34
|
}
|
|
31
35
|
declare function TabIndicator({ className, ...props }: Omit<ComponentProps<"span">, "children">): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
declare function
|
|
36
|
+
declare function TabButtonGroup({ className, children, ...props }: ComponentPropsWithoutAs<typeof ButtonGroup<"div">, TabButtonGroupProps>): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare function TabButton({ eventKey, className, children, onClick, ...props }: ComponentPropsWithoutAs<typeof Button<"button">, TabButtonProps>): import("react/jsx-runtime").JSX.Element;
|
|
33
38
|
declare function TabItem({ eventKey, children }: TabItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
34
39
|
export default Tabs;
|
|
35
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/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AY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,2CAuC1C;AACD,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,OAAO,WAAW,CAAC,KAAK,CAAC,EAAE,mBAAmB,CAAC,2CAWzE;AACD,iBAAS,SAAS,CAAC,EACjB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACT,EAAE,uBAAuB,CAAC,OAAO,MAAM,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,2CAkClE;AACD,iBAAS,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,YAAY,kDAIpD;AAOD,eAAe,IAAI,CAAC"}
|
|
@@ -1,86 +1,102 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { twMerge as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
3
|
+
import { createContext as I, useState as T, useContext as h, useRef as P, useCallback as A, useEffect as B, useMemo as G, Fragment as R } from "react";
|
|
4
|
+
import { twMerge as S } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
5
|
+
import g from "../../helpers/cn.es.js";
|
|
6
|
+
import f from "../../hooks/useClasses.es.js";
|
|
7
|
+
import $ from "../Button/index.es.js";
|
|
8
|
+
import k from "../ButtonGroup/index.es.js";
|
|
9
|
+
const p = I({
|
|
9
10
|
active: null,
|
|
10
11
|
onChange: () => {
|
|
11
|
-
}
|
|
12
|
-
buttonGroupClasses: ""
|
|
12
|
+
}
|
|
13
13
|
});
|
|
14
|
-
function
|
|
15
|
-
}, children:
|
|
16
|
-
|
|
17
|
-
return /* @__PURE__ */ u(b.Provider, { value: { active: o, onChange: n, buttonGroupClasses: l }, children: a });
|
|
14
|
+
function m({ active: o = null, onChange: t = () => {
|
|
15
|
+
}, children: s }) {
|
|
16
|
+
return /* @__PURE__ */ u(p.Provider, { value: { active: o, onChange: t }, children: s });
|
|
18
17
|
}
|
|
19
18
|
function q({
|
|
20
19
|
className: o,
|
|
21
|
-
...
|
|
20
|
+
...t
|
|
22
21
|
}) {
|
|
23
|
-
const [
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
26
|
-
const i = (
|
|
27
|
-
|
|
22
|
+
const [s, a] = T(!1), c = f((e) => e.tabs.indicator.base), { active: b } = h(p), l = P(null), d = A(() => {
|
|
23
|
+
const e = l.current, n = e == null ? void 0 : e.parentElement, r = n == null ? void 0 : n.querySelector("button[data-active='true']");
|
|
24
|
+
if (!n || !r || !e) return;
|
|
25
|
+
const i = (r == null ? void 0 : r.offsetLeft) ?? 0, v = window.getComputedStyle(r).paddingInline, w = (r == null ? void 0 : r.getBoundingClientRect().width) ?? 0, y = i, C = w;
|
|
26
|
+
e.style.setProperty("--left", `${y}px`), e.style.setProperty("--width", `${C}px`), e.style.setProperty("--padding-x", `${v}`);
|
|
28
27
|
}, []);
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
}, [
|
|
28
|
+
return B(() => {
|
|
29
|
+
d(), requestAnimationFrame(() => a(!0));
|
|
30
|
+
}, [d, b]), /* @__PURE__ */ u(
|
|
32
31
|
"span",
|
|
33
32
|
{
|
|
34
|
-
ref:
|
|
35
|
-
className:
|
|
33
|
+
ref: l,
|
|
34
|
+
className: S(
|
|
36
35
|
"absolute bottom-0 left-(--left,0px) rtl:left-(--left,100%) w-(--width,0px) px-(--padding-x,0px) h-px overflow-hidden",
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
s ? "transition-[width,left,padding]" : "",
|
|
37
|
+
c,
|
|
39
38
|
o
|
|
40
39
|
),
|
|
41
|
-
...
|
|
40
|
+
...t,
|
|
42
41
|
children: /* @__PURE__ */ u("span", { className: "block size-full rounded-full bg-primary" })
|
|
43
42
|
}
|
|
44
43
|
);
|
|
45
44
|
}
|
|
46
45
|
function E({
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
onClick: r,
|
|
51
|
-
...l
|
|
46
|
+
className: o,
|
|
47
|
+
children: t,
|
|
48
|
+
...s
|
|
52
49
|
}) {
|
|
53
|
-
const
|
|
50
|
+
const a = f((c) => c.tabs.buttonGroup.base);
|
|
54
51
|
return /* @__PURE__ */ u(
|
|
55
52
|
k,
|
|
53
|
+
{
|
|
54
|
+
as: "div",
|
|
55
|
+
className: g("relative flex items-center", a, o),
|
|
56
|
+
...s,
|
|
57
|
+
children: t
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function F({
|
|
62
|
+
eventKey: o,
|
|
63
|
+
className: t,
|
|
64
|
+
children: s,
|
|
65
|
+
onClick: a,
|
|
66
|
+
...c
|
|
67
|
+
}) {
|
|
68
|
+
const b = f((i) => i.tabs.button.base), l = f((i) => i.tabs.button.active), { active: d, onChange: e } = h(p), n = o === d, x = G(() => typeof t == "function" ? t({ isActive: n }) : t, [n, t]);
|
|
69
|
+
return /* @__PURE__ */ u(
|
|
70
|
+
$,
|
|
56
71
|
{
|
|
57
72
|
as: "button",
|
|
58
73
|
type: "button",
|
|
59
|
-
"data-active":
|
|
74
|
+
"data-active": n,
|
|
60
75
|
onClick: (i) => {
|
|
61
|
-
!
|
|
76
|
+
!n && e(o), a == null || a(i);
|
|
62
77
|
},
|
|
63
|
-
color:
|
|
78
|
+
color: n ? "primary" : "dark",
|
|
64
79
|
variant: "text",
|
|
65
|
-
className:
|
|
80
|
+
className: g(
|
|
66
81
|
"shadow-none border-none",
|
|
67
|
-
|
|
68
|
-
|
|
82
|
+
b,
|
|
83
|
+
n && l,
|
|
69
84
|
x
|
|
70
85
|
),
|
|
71
|
-
...
|
|
72
|
-
children:
|
|
86
|
+
...c,
|
|
87
|
+
children: s
|
|
73
88
|
}
|
|
74
89
|
);
|
|
75
90
|
}
|
|
76
|
-
function
|
|
77
|
-
const { active:
|
|
78
|
-
return
|
|
91
|
+
function L({ eventKey: o, children: t }) {
|
|
92
|
+
const { active: s } = h(p);
|
|
93
|
+
return s !== o ? null : /* @__PURE__ */ u(R, { children: t });
|
|
79
94
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
95
|
+
m.Indicator = q;
|
|
96
|
+
m.ButtonGroup = E;
|
|
97
|
+
m.Button = F;
|
|
98
|
+
m.Item = L;
|
|
83
99
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
100
|
+
p as TabsContext,
|
|
101
|
+
m as default
|
|
86
102
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const u=require("react");function y(){return u.useCallback(t=>{const o=t.currentTarget.querySelector("
|
|
1
|
+
"use client";"use strict";const u=require("react");function y(){return u.useCallback(t=>{const o=t.currentTarget.querySelector("[data-name='ripple-group']")||t.currentTarget,r=o.getBoundingClientRect(),p=t.clientX-r.left,c=t.clientY-r.top,a=r.width,n=r.height,l=Math.max(a,n),s=20,i=Math.ceil(l/s)*2,e=document.createElement("span");e.className=["ripple","absolute","rounded-full","pointer-events-none","transition-[opacity,scale]","duration-500","bg-current","size-[var(--size)] top-[var(--top)] left-[var(--left)] scale-[var(--scale)] opacity-[var(--opacity)]"].join(" "),e.style.setProperty("--size",`${s}px`),e.style.setProperty("--top",`${c-s/2}px`),e.style.setProperty("--left",`${p-s/2}px`),e.style.setProperty("--scale","1"),e.style.setProperty("--opacity","0.2"),o.appendChild(e),setTimeout(()=>{e.style.setProperty("--scale",`${i}`),e.style.setProperty("--opacity","0")},0),setTimeout(()=>o.removeChild(e),500)},[])}module.exports=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateRipple.d.ts","sourceRoot":"","sources":["../../src/hooks/useCreateRipple.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAe,MAAM,OAAO,CAAC;AAEhD,MAAM,CAAC,OAAO,UAAU,eAAe,QAEA,UAAU,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"useCreateRipple.d.ts","sourceRoot":"","sources":["../../src/hooks/useCreateRipple.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAe,MAAM,OAAO,CAAC;AAEhD,MAAM,CAAC,OAAO,UAAU,eAAe,QAEA,UAAU,CAAC,WAAW,CAAC,UA0C7D"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useCallback as y } from "react";
|
|
3
3
|
function h() {
|
|
4
4
|
return y((t) => {
|
|
5
|
-
const s = t.currentTarget.querySelector("
|
|
5
|
+
const s = t.currentTarget.querySelector("[data-name='ripple-group']") || t.currentTarget, r = s.getBoundingClientRect(), p = t.clientX - r.left, a = t.clientY - r.top, l = r.width, n = r.height, c = Math.max(l, n), o = 20, i = Math.ceil(c / o) * 2, e = document.createElement("span");
|
|
6
6
|
e.className = [
|
|
7
7
|
"ripple",
|
|
8
8
|
"absolute",
|
|
@@ -12,7 +12,7 @@ function h() {
|
|
|
12
12
|
"duration-500",
|
|
13
13
|
"bg-current",
|
|
14
14
|
"size-[var(--size)] top-[var(--top)] left-[var(--left)] scale-[var(--scale)] opacity-[var(--opacity)]"
|
|
15
|
-
].join(" "), e.style.setProperty("--size", `${o}px`), e.style.setProperty("--top", `${
|
|
15
|
+
].join(" "), e.style.setProperty("--size", `${o}px`), e.style.setProperty("--top", `${a - o / 2}px`), e.style.setProperty("--left", `${p - o / 2}px`), e.style.setProperty("--scale", "1"), e.style.setProperty("--opacity", "0.2"), s.appendChild(e), setTimeout(() => {
|
|
16
16
|
e.style.setProperty("--scale", `${i}`), e.style.setProperty("--opacity", "0");
|
|
17
17
|
}, 0), setTimeout(() => s.removeChild(e), 500);
|
|
18
18
|
}, []);
|
|
@@ -27,9 +27,6 @@ export type ThemeProviderContextType = {
|
|
|
27
27
|
color: ColorClasses<Record<BadgeVariant, string>>;
|
|
28
28
|
size: SizeClasses;
|
|
29
29
|
};
|
|
30
|
-
box: {
|
|
31
|
-
base: string;
|
|
32
|
-
};
|
|
33
30
|
button: {
|
|
34
31
|
base: string;
|
|
35
32
|
color: ColorClasses<Record<ButtonVariant, string>>;
|
|
@@ -101,6 +98,18 @@ export type ThemeProviderContextType = {
|
|
|
101
98
|
base: string;
|
|
102
99
|
};
|
|
103
100
|
};
|
|
101
|
+
divider: {
|
|
102
|
+
base: string;
|
|
103
|
+
orientation: {
|
|
104
|
+
vertical: string;
|
|
105
|
+
horizontal: string;
|
|
106
|
+
};
|
|
107
|
+
variant: {
|
|
108
|
+
solid: string;
|
|
109
|
+
dashed: string;
|
|
110
|
+
dotted: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
104
113
|
drawer: {
|
|
105
114
|
base: string;
|
|
106
115
|
anchor: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,EACb,KAAK,EACL,WAAW,EACX,IAAI,EACJ,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAGjB,KAAK,YAAY,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACxC,KAAK,WAAW,GAAG,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACxC,KAAK,iBAAiB,GAAG,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACpD,KAAK,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1D,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE;QACb,SAAS,EAAE;YACT,IAAI,EAAE;gBAAE,IAAI,EAAE,MAAM,CAAA;aAAE,CAAC;YACvB,MAAM,EA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