diditui 1.2.0 → 1.2.2

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.
Files changed (115) hide show
  1. package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
  2. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  3. package/dist/components/ActionButton/index.cjs +1 -0
  4. package/dist/components/ActionButton/index.d.ts +14 -0
  5. package/dist/components/ActionButton/index.js +111 -0
  6. package/dist/components/Button/index.cjs +1 -0
  7. package/dist/components/Button/index.d.ts +15 -0
  8. package/dist/components/Button/index.js +112 -0
  9. package/dist/components/Card/index.cjs +1 -0
  10. package/dist/components/Card/index.d.ts +10 -0
  11. package/dist/components/Card/index.js +29 -0
  12. package/dist/components/Checkbox/index.cjs +1 -0
  13. package/dist/components/Checkbox/index.d.ts +12 -0
  14. package/dist/components/Checkbox/index.js +48 -0
  15. package/dist/components/CopyValue/index.cjs +1 -0
  16. package/dist/components/CopyValue/index.d.ts +12 -0
  17. package/dist/components/CopyValue/index.js +46 -0
  18. package/dist/components/DiditAnimatedLogo/index.cjs +1 -0
  19. package/dist/components/DiditAnimatedLogo/index.d.ts +15 -0
  20. package/dist/components/DiditAnimatedLogo/index.js +55 -0
  21. package/dist/components/Icon/index.cjs +1 -0
  22. package/dist/components/Icon/index.d.ts +14 -0
  23. package/dist/components/Icon/index.js +533 -0
  24. package/dist/components/IconButton/index.cjs +1 -0
  25. package/dist/components/IconButton/index.d.ts +15 -0
  26. package/dist/components/IconButton/index.js +69 -0
  27. package/dist/components/Input/index.cjs +1 -0
  28. package/dist/components/Input/index.d.ts +18 -0
  29. package/dist/components/Input/index.js +109 -0
  30. package/dist/components/Modal/index.cjs +1 -0
  31. package/dist/components/Modal/index.d.ts +38 -0
  32. package/dist/components/Modal/index.js +58 -0
  33. package/dist/components/QrCode/generator.d.ts +4 -0
  34. package/dist/components/QrCode/index.cjs +1 -0
  35. package/dist/components/QrCode/index.d.ts +10 -0
  36. package/dist/components/QrCode/index.js +134 -0
  37. package/dist/components/SearchInput/index.cjs +1 -0
  38. package/dist/components/SearchInput/index.d.ts +11 -0
  39. package/dist/components/SearchInput/index.js +86 -0
  40. package/dist/components/SearchMini/index.cjs +1 -0
  41. package/dist/components/SearchMini/index.d.ts +11 -0
  42. package/dist/components/SearchMini/index.js +54 -0
  43. package/dist/components/SelectDropdown/SelectDropdownOption.d.ts +14 -0
  44. package/dist/components/SelectDropdown/SelectDropdownTrigger.d.ts +19 -0
  45. package/dist/components/SelectDropdown/index.cjs +1 -0
  46. package/dist/components/SelectDropdown/index.d.ts +32 -0
  47. package/dist/components/SelectDropdown/index.js +223 -0
  48. package/dist/components/Spinner/index.cjs +1 -0
  49. package/dist/components/Spinner/index.d.ts +9 -0
  50. package/dist/components/Spinner/index.js +80 -0
  51. package/dist/components/StatusLabel/index.cjs +1 -0
  52. package/dist/components/StatusLabel/index.d.ts +14 -0
  53. package/dist/components/StatusLabel/index.js +71 -0
  54. package/dist/components/Text/index.cjs +1 -0
  55. package/dist/components/Text/index.d.ts +12 -0
  56. package/dist/components/Text/index.js +62 -0
  57. package/dist/components/Toggle/index.cjs +1 -0
  58. package/dist/components/Toggle/index.d.ts +15 -0
  59. package/dist/components/Toggle/index.js +68 -0
  60. package/dist/components/Tooltip/index.cjs +1 -0
  61. package/dist/components/Tooltip/index.d.ts +10 -0
  62. package/dist/components/Tooltip/index.js +60 -0
  63. package/dist/components/UserCard/index.cjs +1 -0
  64. package/dist/components/UserCard/index.d.ts +9 -0
  65. package/dist/components/UserCard/index.js +22 -0
  66. package/dist/components/index.d.ts +20 -0
  67. package/dist/examples/Card/index.d.ts +2 -0
  68. package/dist/examples/DiditAnimatedLogo/index.d.ts +2 -0
  69. package/dist/examples/Icons/index.d.ts +2 -0
  70. package/dist/examples/Input/index.d.ts +2 -0
  71. package/dist/examples/Modal/index.d.ts +2 -0
  72. package/dist/examples/SearchInput/index.d.ts +2 -0
  73. package/dist/examples/SelectDropdown/index.d.ts +2 -0
  74. package/dist/examples/Tooltip/index.d.ts +2 -0
  75. package/dist/examples/UserCard/index.d.ts +2 -0
  76. package/dist/hooks/index.cjs +1 -0
  77. package/dist/hooks/index.d.ts +4 -0
  78. package/dist/hooks/index.js +12 -0
  79. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +14 -0
  80. package/dist/hooks/useKeyPress.d.ts +1 -0
  81. package/dist/hooks/useMediaQueries.d.ts +6 -0
  82. package/dist/hooks/useMediaQuery.d.ts +27 -0
  83. package/dist/hooks/useOnClickOutside.d.ts +4 -0
  84. package/dist/index-BndgMvJa.cjs +1 -0
  85. package/dist/index-DCn7qPZq.js +2285 -0
  86. package/dist/index-DJRxClZE.cjs +1 -0
  87. package/dist/index-Dw-qpi3m.js +34 -0
  88. package/dist/index-P5d-BEGS.cjs +1 -0
  89. package/dist/index-yKIH4JAz.js +130 -0
  90. package/dist/index.cjs +1 -0
  91. package/dist/index.d.ts +4 -0
  92. package/dist/index.js +56 -0
  93. package/dist/styles.cjs +1 -0
  94. package/dist/styles.d.ts +0 -0
  95. package/dist/styles.js +1 -0
  96. package/dist/tailwind.cjs +1 -1
  97. package/dist/tailwind.d.ts +104 -110
  98. package/dist/tailwind.js +1 -1
  99. package/dist/types/index.cjs +1 -0
  100. package/dist/types/index.d.ts +2 -0
  101. package/dist/types/index.js +1 -0
  102. package/dist/types/react.d.ts +31 -0
  103. package/dist/useKeyPress-BICQls3u.js +23 -0
  104. package/dist/useKeyPress-xaski6PX.cjs +1 -0
  105. package/dist/useMediaQueries-CCasya_y.cjs +1 -0
  106. package/dist/useMediaQueries-DR5uwn4F.js +41 -0
  107. package/dist/utils/index.cjs +1 -0
  108. package/dist/utils/index.d.ts +9 -0
  109. package/dist/utils/index.js +5 -0
  110. package/package.json +130 -9
  111. package/dist/_commonjsHelpers-BItOPCY9.js +0 -28
  112. package/dist/_commonjsHelpers-BTDuMlIz.cjs +0 -1
  113. package/dist/diditui.cjs +0 -87
  114. package/dist/diditui.d.ts +0 -409
  115. package/dist/diditui.js +0 -8187
@@ -0,0 +1 @@
1
+ "use strict";var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}exports.commonjsGlobal=o;exports.getDefaultExportFromCjs=l;
@@ -0,0 +1,8 @@
1
+ var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function l(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ export {
6
+ o as c,
7
+ l as g
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("../../index-BndgMvJa.cjs"),b=require("../Icon/index.cjs"),f=require("../Spinner/index.cjs"),g=require("../../index-P5d-BEGS.cjs"),x=require("../Text/index.cjs"),v=g.cva(["group w-fit max-w-full flex items-center gap-1 rounded-[100px] overflow-hidden","transition-all duration-300 p-[7px] border border-transparent"],{variants:{variant:{default:"bg-transparent hover:bg-surface-ulo border-surface-lo text-surface-hi hover:text-foreground",soft:"bg-soft/20 border-soft text-surface-hi hover:bg-soft/50 hover:text-foreground",primary:"bg-primary/5 border-primary/20 text-primary hover:bg-primary/10",accent:"bg-accent/10 border-accent/20 text-accent hover:bg-accent/40",success:"bg-success/5 border-success/20 text-success hover:bg-success/10",warning:"bg-warning/5 border-warning/20 text-warning hover:bg-warning/10",error:"bg-error/5 border-error/20 text-error hover:bg-error/10"},disabled:{true:"pointer-events-none opacity-50"},isLoading:{true:"pointer-events-none"},isActive:{true:""}},compoundVariants:[{variant:"default",isActive:!0,disabled:!1,className:"text-foreground bg-surface-ulo"},{variant:"soft",isActive:!0,disabled:!1,className:"text-foreground bg-soft/50"},{variant:"primary",isActive:!0,disabled:!1,className:"bg-primary/10"},{variant:"accent",isActive:!0,disabled:!1,className:"bg-accent/40"},{variant:"success",isActive:!0,disabled:!1,className:"bg-success/10"},{variant:"warning",isActive:!0,disabled:!1,className:"bg-warning/10"},{variant:"error",isActive:!0,disabled:!1,className:"bg-error/10"}],defaultVariants:{variant:"default",disabled:!1,isLoading:!1}});function p({variant:e="default",icon:s,isLoading:r=!1,isActive:a=!1,disabled:o,className:i,children:c,...u}){const l=n.cn(v({variant:e,isLoading:r,disabled:o,isActive:a,className:i}),{"pr-[9px]":!!s||r}),d=n.cn("transition-colors duration-300",{"text-surface-md group-hover:text-foreground":e==="default","text-surface-hi":a&&e==="default"});return t.jsxs("button",{className:l,...u,children:[s&&!r&&t.jsx(b.Icon,{type:s,size:"xs",className:d}),r&&t.jsx(f.Spinner,{size:"xs",variant:e==="soft"?"default":e}),t.jsx(x.Text,{as:"span",className:"truncate",variant:"Label4",children:c})]})}exports.ActionButton=p;
@@ -0,0 +1,14 @@
1
+ import { ComponentProps } from 'react';
2
+ import { IconType } from '../../types';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ declare const actionButtonStyles: (props?: ({
5
+ variant?: "warning" | "default" | "primary" | "soft" | "accent" | "success" | "error" | null | undefined;
6
+ disabled?: boolean | null | undefined;
7
+ isLoading?: boolean | null | undefined;
8
+ isActive?: boolean | null | undefined;
9
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
+ type ActionButtonProps = ComponentProps<'button'> & VariantProps<typeof actionButtonStyles> & {
11
+ icon?: IconType;
12
+ };
13
+ declare function ActionButton({ variant, icon, isLoading, isActive, disabled, className, children, ...props }: ActionButtonProps): import("react/jsx-runtime").JSX.Element;
14
+ export { ActionButton };
@@ -0,0 +1,111 @@
1
+ import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
+ import { c as o } from "../../index-DCn7qPZq.js";
3
+ import { Icon as b } from "../Icon/index.js";
4
+ import { Spinner as g } from "../Spinner/index.js";
5
+ import { c as m } from "../../index-Dw-qpi3m.js";
6
+ import { Text as p } from "../Text/index.js";
7
+ const v = m(
8
+ [
9
+ "group w-fit max-w-full flex items-center gap-1 rounded-[100px] overflow-hidden",
10
+ "transition-all duration-300 p-[7px] border border-transparent"
11
+ ],
12
+ {
13
+ variants: {
14
+ variant: {
15
+ default: "bg-transparent hover:bg-surface-ulo border-surface-lo text-surface-hi hover:text-foreground",
16
+ soft: "bg-soft/20 border-soft text-surface-hi hover:bg-soft/50 hover:text-foreground",
17
+ primary: "bg-primary/5 border-primary/20 text-primary hover:bg-primary/10",
18
+ accent: "bg-accent/10 border-accent/20 text-accent hover:bg-accent/40",
19
+ success: "bg-success/5 border-success/20 text-success hover:bg-success/10",
20
+ warning: "bg-warning/5 border-warning/20 text-warning hover:bg-warning/10",
21
+ error: "bg-error/5 border-error/20 text-error hover:bg-error/10"
22
+ },
23
+ disabled: {
24
+ true: "pointer-events-none opacity-50"
25
+ },
26
+ isLoading: {
27
+ true: "pointer-events-none"
28
+ },
29
+ isActive: {
30
+ true: ""
31
+ }
32
+ },
33
+ compoundVariants: [
34
+ {
35
+ variant: "default",
36
+ isActive: !0,
37
+ disabled: !1,
38
+ className: "text-foreground bg-surface-ulo"
39
+ },
40
+ {
41
+ variant: "soft",
42
+ isActive: !0,
43
+ disabled: !1,
44
+ className: "text-foreground bg-soft/50"
45
+ },
46
+ {
47
+ variant: "primary",
48
+ isActive: !0,
49
+ disabled: !1,
50
+ className: "bg-primary/10"
51
+ },
52
+ {
53
+ variant: "accent",
54
+ isActive: !0,
55
+ disabled: !1,
56
+ className: "bg-accent/40"
57
+ },
58
+ {
59
+ variant: "success",
60
+ isActive: !0,
61
+ disabled: !1,
62
+ className: "bg-success/10"
63
+ },
64
+ {
65
+ variant: "warning",
66
+ isActive: !0,
67
+ disabled: !1,
68
+ className: "bg-warning/10"
69
+ },
70
+ {
71
+ variant: "error",
72
+ isActive: !0,
73
+ disabled: !1,
74
+ className: "bg-error/10"
75
+ }
76
+ ],
77
+ defaultVariants: {
78
+ variant: "default",
79
+ disabled: !1,
80
+ isLoading: !1
81
+ }
82
+ }
83
+ );
84
+ function j({
85
+ variant: e = "default",
86
+ icon: t,
87
+ isLoading: r = !1,
88
+ isActive: s = !1,
89
+ disabled: n,
90
+ className: i,
91
+ children: c,
92
+ ...l
93
+ }) {
94
+ const u = o(
95
+ v({ variant: e, isLoading: r, disabled: n, isActive: s, className: i }),
96
+ {
97
+ "pr-[9px]": !!t || r
98
+ }
99
+ ), f = o("transition-colors duration-300", {
100
+ "text-surface-md group-hover:text-foreground": e === "default",
101
+ "text-surface-hi": s && e === "default"
102
+ });
103
+ return /* @__PURE__ */ d("button", { className: u, ...l, children: [
104
+ t && !r && /* @__PURE__ */ a(b, { type: t, size: "xs", className: f }),
105
+ r && /* @__PURE__ */ a(g, { size: "xs", variant: e === "soft" ? "default" : e }),
106
+ /* @__PURE__ */ a(p, { as: "span", className: "truncate", variant: "Label4", children: c })
107
+ ] });
108
+ }
109
+ export {
110
+ j as ActionButton
111
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../../index-BndgMvJa.cjs"),x=require("../Icon/index.cjs"),b=require("../Spinner/index.cjs"),f=require("../../index-P5d-BEGS.cjs"),h=f.cva(["group relative w-full min-w-52 flex items-center rounded-full overflow-hidden","transition-all duration-300"],{variants:{variant:{default:"bg-transparent border border-foreground text-foreground",white:"bg-transparent border border-background text-background",primary:"bg-primary border border-primary text-background",soft:"bg-soft border border-soft text-primary",error:"bg-error border border-error text-background"},size:{md:"px-2 py-4 pl-4",lg:"px-3 py-5 pl-5"},disabled:{true:"pointer-events-none bg-surface-lo text-surface-mdlo border-surface-lo"},isLoading:{true:"pointer-events-none"},animate:{true:"",false:"hover:opacity-70"}},compoundVariants:[{animate:!0,variant:"primary",className:"hover:text-primary"},{animate:!0,variant:"error",className:"hover:text-error"}],defaultVariants:{size:"md",variant:"default",disabled:!1,isLoading:!1,animate:!1}});function y({size:t="md",variant:r="default",icon:a,isLoading:s=!1,animate:i=!1,disabled:o,className:u,children:l,...c}){const d=n.cn(["absolute right-2 p-[7px] rounded-full z-20 flex justify-end items-center","transition-color duration-300",{"right-2":t==="md","right-3":t==="lg","text-foreground":r==="default","bg-background text-primary":r==="primary","bg-background text-error":r==="error","bg-transparent text-surface-mdlo":o}]),g=n.cn(["hidden absolute right-2 size-7","bg-background rounded-full z-10 transition-all duration-300","group-hover:w-[calc(100%-4px)] group-hover:right-[2px] group-hover:h-[calc(100%-4px)]",{"right-2":t==="md","right-3":t==="lg","text-foreground":r==="default","bg-background text-primary":r==="primary","bg-background text-error":r==="error","bg-transparent text-surface-mdlo":o,block:i}]),m=n.cn(["text-sm font-medium leading-[90%] tracking-tight w-full text-center z-30","text-inherit",{"mr-[32px]":!!a}]),p=r==="primary"?"xs":"sm";return e.jsxs("button",{className:n.cn(h({variant:r,size:t,isLoading:s,disabled:o,animate:i,className:u})),...c,children:[e.jsx("span",{className:m,children:l}),a&&!s&&e.jsx("div",{className:d,children:e.jsx(x.Icon,{type:a,size:o?"sm":p})}),s&&e.jsx("div",{className:d,children:e.jsx(b.Spinner,{size:"xs",variant:r==="white"?"soft":r})}),e.jsx("div",{className:g})]})}exports.Button=y;
@@ -0,0 +1,15 @@
1
+ import { ComponentProps } from 'react';
2
+ import { IconType } from '../../types';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ declare const buttonStyles: (props?: ({
5
+ variant?: "default" | "primary" | "soft" | "error" | "white" | null | undefined;
6
+ size?: "md" | "lg" | null | undefined;
7
+ disabled?: boolean | null | undefined;
8
+ isLoading?: boolean | null | undefined;
9
+ animate?: boolean | null | undefined;
10
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
11
+ type ButtonProps = ComponentProps<'button'> & VariantProps<typeof buttonStyles> & {
12
+ icon?: IconType;
13
+ };
14
+ declare function Button({ size, variant, icon, isLoading, animate, disabled, className, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
15
+ export { Button };
@@ -0,0 +1,112 @@
1
+ import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
+ import { c as a } from "../../index-DCn7qPZq.js";
3
+ import { Icon as b } from "../Icon/index.js";
4
+ import { Spinner as x } from "../Spinner/index.js";
5
+ import { c as h } from "../../index-Dw-qpi3m.js";
6
+ const y = h(
7
+ [
8
+ "group relative w-full min-w-52 flex items-center rounded-full overflow-hidden",
9
+ "transition-all duration-300"
10
+ ],
11
+ {
12
+ variants: {
13
+ variant: {
14
+ default: "bg-transparent border border-foreground text-foreground",
15
+ white: "bg-transparent border border-background text-background",
16
+ primary: "bg-primary border border-primary text-background",
17
+ soft: "bg-soft border border-soft text-primary",
18
+ error: "bg-error border border-error text-background"
19
+ },
20
+ size: {
21
+ md: "px-2 py-4 pl-4",
22
+ lg: "px-3 py-5 pl-5"
23
+ },
24
+ disabled: {
25
+ true: "pointer-events-none bg-surface-lo text-surface-mdlo border-surface-lo"
26
+ },
27
+ isLoading: {
28
+ true: "pointer-events-none"
29
+ },
30
+ animate: {
31
+ true: "",
32
+ false: "hover:opacity-70"
33
+ }
34
+ },
35
+ compoundVariants: [
36
+ {
37
+ animate: !0,
38
+ variant: "primary",
39
+ className: "hover:text-primary"
40
+ },
41
+ {
42
+ animate: !0,
43
+ variant: "error",
44
+ className: "hover:text-error"
45
+ }
46
+ ],
47
+ defaultVariants: {
48
+ size: "md",
49
+ variant: "default",
50
+ disabled: !1,
51
+ isLoading: !1,
52
+ animate: !1
53
+ }
54
+ }
55
+ );
56
+ function j({
57
+ size: t = "md",
58
+ variant: r = "default",
59
+ icon: n,
60
+ isLoading: s = !1,
61
+ animate: i = !1,
62
+ disabled: o,
63
+ className: l,
64
+ children: u,
65
+ ...m
66
+ }) {
67
+ const d = a([
68
+ "absolute right-2 p-[7px] rounded-full z-20 flex justify-end items-center",
69
+ "transition-color duration-300",
70
+ {
71
+ "right-2": t === "md",
72
+ "right-3": t === "lg",
73
+ "text-foreground": r === "default",
74
+ "bg-background text-primary": r === "primary",
75
+ "bg-background text-error": r === "error",
76
+ "bg-transparent text-surface-mdlo": o
77
+ }
78
+ ]), c = a([
79
+ "hidden absolute right-2 size-7",
80
+ "bg-background rounded-full z-10 transition-all duration-300",
81
+ "group-hover:w-[calc(100%-4px)] group-hover:right-[2px] group-hover:h-[calc(100%-4px)]",
82
+ {
83
+ "right-2": t === "md",
84
+ "right-3": t === "lg",
85
+ "text-foreground": r === "default",
86
+ "bg-background text-primary": r === "primary",
87
+ "bg-background text-error": r === "error",
88
+ "bg-transparent text-surface-mdlo": o,
89
+ block: i
90
+ }
91
+ ]), p = a([
92
+ "text-sm font-medium leading-[90%] tracking-tight w-full text-center z-30",
93
+ "text-inherit",
94
+ { "mr-[32px]": !!n }
95
+ ]), g = r === "primary" ? "xs" : "sm";
96
+ return /* @__PURE__ */ f(
97
+ "button",
98
+ {
99
+ className: a(y({ variant: r, size: t, isLoading: s, disabled: o, animate: i, className: l })),
100
+ ...m,
101
+ children: [
102
+ /* @__PURE__ */ e("span", { className: p, children: u }),
103
+ n && !s && /* @__PURE__ */ e("div", { className: d, children: /* @__PURE__ */ e(b, { type: n, size: o ? "sm" : g }) }),
104
+ s && /* @__PURE__ */ e("div", { className: d, children: /* @__PURE__ */ e(x, { size: "xs", variant: r === "white" ? "soft" : r }) }),
105
+ /* @__PURE__ */ e("div", { className: c })
106
+ ]
107
+ }
108
+ );
109
+ }
110
+ export {
111
+ j as Button
112
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("../../index-BndgMvJa.cjs"),i=require("../../index-P5d-BEGS.cjs"),u=i.cva(["w-full rounded-[32px] overflow-hidden bg-background"],{variants:{padding:{none:"p-0",sm:"p-4",md:"p-6",lg:"p-8"},border:{true:"border border-surface-lo"},shadow:{true:"shadow-card"}},defaultVariants:{padding:"md",shadow:!1}});function c({className:e,padding:r,border:d,shadow:a,children:n,...o}){return s.jsx("div",{className:t.cn(u({border:d,shadow:a,padding:r,className:e})),...o,children:n})}exports.Card=c;
@@ -0,0 +1,10 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { ComponentProps } from 'react';
3
+ declare const cardStyles: (props?: ({
4
+ padding?: "sm" | "md" | "lg" | "none" | null | undefined;
5
+ border?: boolean | null | undefined;
6
+ shadow?: boolean | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ type CardProps = ComponentProps<'div'> & VariantProps<typeof cardStyles>;
9
+ declare function Card({ className, padding, border, shadow, children, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
10
+ export { Card };
@@ -0,0 +1,29 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { c as t } from "../../index-DCn7qPZq.js";
3
+ import { c } from "../../index-Dw-qpi3m.js";
4
+ const p = c(["w-full rounded-[32px] overflow-hidden bg-background"], {
5
+ variants: {
6
+ padding: {
7
+ none: "p-0",
8
+ sm: "p-4",
9
+ md: "p-6",
10
+ lg: "p-8"
11
+ },
12
+ border: {
13
+ true: "border border-surface-lo"
14
+ },
15
+ shadow: {
16
+ true: "shadow-card"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ padding: "md",
21
+ shadow: !1
22
+ }
23
+ });
24
+ function l({ className: r, padding: d, border: a, shadow: o, children: e, ...s }) {
25
+ return /* @__PURE__ */ n("div", { className: t(p({ border: a, shadow: o, padding: d, className: r })), ...s, children: e });
26
+ }
27
+ export {
28
+ l as Card
29
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../index-BndgMvJa.cjs"),x=require("react"),p=require("../Text/index.cjs");function g({id:t,className:a,label:r,size:n="md",checked:i,disabled:s,note:u="",onToggle:c=()=>{}}){const l=o.cn(["inline-flex items-center gap-4"],a,{"opacity-30":s}),d=o.cn(["w-5 h-5 text-primary hover:bg-surface-lo border border-surface-mdlo rounded","focus:ring-transparent focus:ring-0 focus:outline-none cursor-pointer","disabled:cursor-auto",n==="sm"&&"w-4 h-4",n==="lg"&&"w-6 h-6"]),h=x.useCallback(m=>{c(m.target.checked)},[c]);return e.jsxs("div",{className:l,children:[e.jsx("input",{id:t,type:"checkbox",checked:i,className:d,onChange:h,disabled:s,title:u}),r&&e.jsx(p.Text,{as:"label",htmlFor:t,variant:"Label3",className:"text-inheret truncate",children:r})]})}exports.CheckBox=g;
@@ -0,0 +1,12 @@
1
+ interface CheckboxProps {
2
+ id?: string;
3
+ className?: string;
4
+ label?: string | React.ReactNode;
5
+ size?: 'sm' | 'md' | 'lg';
6
+ checked?: boolean;
7
+ note?: string;
8
+ disabled?: boolean;
9
+ onToggle?: (checked: boolean) => void;
10
+ }
11
+ declare function CheckBox({ id, className, label, size, checked, disabled, note, onToggle }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
12
+ export { CheckBox };
@@ -0,0 +1,48 @@
1
+ import { jsxs as f, jsx as s } from "react/jsx-runtime";
2
+ import { c as n } from "../../index-DCn7qPZq.js";
3
+ import { useCallback as d } from "react";
4
+ import { Text as x } from "../Text/index.js";
5
+ function k({
6
+ id: e,
7
+ className: c,
8
+ label: r,
9
+ size: t = "md",
10
+ checked: i,
11
+ disabled: o,
12
+ note: l = "",
13
+ onToggle: a = () => {
14
+ }
15
+ }) {
16
+ const m = n(["inline-flex items-center gap-4"], c, {
17
+ "opacity-30": o
18
+ }), u = n([
19
+ "w-5 h-5 text-primary hover:bg-surface-lo border border-surface-mdlo rounded",
20
+ "focus:ring-transparent focus:ring-0 focus:outline-none cursor-pointer",
21
+ "disabled:cursor-auto",
22
+ t === "sm" && "w-4 h-4",
23
+ t === "lg" && "w-6 h-6"
24
+ ]), p = d(
25
+ (h) => {
26
+ a(h.target.checked);
27
+ },
28
+ [a]
29
+ );
30
+ return /* @__PURE__ */ f("div", { className: m, children: [
31
+ /* @__PURE__ */ s(
32
+ "input",
33
+ {
34
+ id: e,
35
+ type: "checkbox",
36
+ checked: i,
37
+ className: u,
38
+ onChange: p,
39
+ disabled: o,
40
+ title: l
41
+ }
42
+ ),
43
+ r && /* @__PURE__ */ s(x, { as: "label", htmlFor: e, variant: "Label3", className: "text-inheret truncate", children: r })
44
+ ] });
45
+ }
46
+ export {
47
+ k as CheckBox
48
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../index-BndgMvJa.cjs"),g=require("../../index-P5d-BEGS.cjs"),c=require("react"),a=require("../Text/index.cjs"),l=require("../Icon/index.cjs"),u=require("../Tooltip/index.cjs"),j=g.cva(["flex items-center justify-center gap-3 group","bg-surface-ulo py-2 px-3 rounded-3xl text-surface-md"],{variants:{isSecret:{true:"backdrop-blur-md"}},defaultVariants:{isSecret:!1}});function f({label:i,value:r,isSecret:s,className:d,onCopy:t,...x}){const[n,p]=c.useState(s),h=c.useCallback(()=>{navigator.clipboard.writeText(r),t==null||t()},[r,t]),m=o.cn("text-inherit group-hover:text-foreground truncate",{blur:n});return e.jsxs("div",{className:o.cn(j({isSecret:s,className:d})),...x,children:[i&&e.jsx(a.Text,{className:"text-inherit text-nowrap",variant:"StyledLabel",as:"span",children:i}),e.jsx(a.Text,{className:m,variant:"P3",as:"p",children:r}),s&&e.jsx(u.Tooltip,{label:n?"Show":"Hide",children:e.jsx("button",{onClick:()=>p(b=>!b),children:e.jsx(l.Icon,{className:"text-inherit group-hover:text-foreground",type:n?"eye":"eyeSlash",size:"sm"})})}),e.jsx(u.Tooltip,{label:"Copy",children:e.jsx("button",{onClick:h,children:e.jsx(l.Icon,{className:"text-inherit group-hover:text-foreground",type:"copy",size:"sm"})})})]})}exports.CopyValue=f;
@@ -0,0 +1,12 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { ComponentProps } from 'react';
3
+ declare const copyValueStyles: (props?: ({
4
+ isSecret?: boolean | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ type CopyValueProps = ComponentProps<'div'> & VariantProps<typeof copyValueStyles> & {
7
+ value: string;
8
+ label?: string;
9
+ onCopy?: () => void;
10
+ };
11
+ declare function CopyValue({ label, value, isSecret, className, onCopy, ...props }: CopyValueProps): import("react/jsx-runtime").JSX.Element;
12
+ export { CopyValue };
@@ -0,0 +1,46 @@
1
+ import { jsxs as x, jsx as e } from "react/jsx-runtime";
2
+ import { c as o } from "../../index-DCn7qPZq.js";
3
+ import { c as b } from "../../index-Dw-qpi3m.js";
4
+ import { useState as g, useCallback as v } from "react";
5
+ import { Text as n } from "../Text/index.js";
6
+ import { Icon as c } from "../Icon/index.js";
7
+ import { Tooltip as l } from "../Tooltip/index.js";
8
+ const y = b(
9
+ [
10
+ "flex items-center justify-center gap-3 group",
11
+ "bg-surface-ulo py-2 px-3 rounded-3xl text-surface-md"
12
+ ],
13
+ {
14
+ variants: {
15
+ isSecret: {
16
+ true: "backdrop-blur-md"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ isSecret: !1
21
+ }
22
+ }
23
+ );
24
+ function V({ label: i, value: r, isSecret: a, className: d, onCopy: t, ...m }) {
25
+ const [s, u] = g(a), p = v(() => {
26
+ navigator.clipboard.writeText(r), t == null || t();
27
+ }, [r, t]), f = o("text-inherit group-hover:text-foreground truncate", {
28
+ blur: s
29
+ });
30
+ return /* @__PURE__ */ x("div", { className: o(y({ isSecret: a, className: d })), ...m, children: [
31
+ i && /* @__PURE__ */ e(n, { className: "text-inherit text-nowrap", variant: "StyledLabel", as: "span", children: i }),
32
+ /* @__PURE__ */ e(n, { className: f, variant: "P3", as: "p", children: r }),
33
+ a && /* @__PURE__ */ e(l, { label: s ? "Show" : "Hide", children: /* @__PURE__ */ e("button", { onClick: () => u((h) => !h), children: /* @__PURE__ */ e(
34
+ c,
35
+ {
36
+ className: "text-inherit group-hover:text-foreground",
37
+ type: s ? "eye" : "eyeSlash",
38
+ size: "sm"
39
+ }
40
+ ) }) }),
41
+ /* @__PURE__ */ e(l, { label: "Copy", children: /* @__PURE__ */ e("button", { onClick: p, children: /* @__PURE__ */ e(c, { className: "text-inherit group-hover:text-foreground", type: "copy", size: "sm" }) }) })
42
+ ] });
43
+ }
44
+ export {
45
+ V as CopyValue
46
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("../../index-BndgMvJa.cjs"),r=require("../../index-P5d-BEGS.cjs"),l=r.cva(["relative flex items-center justify-center overflow-hidden","rounded-full md:w-[1-px]"],{variants:{size:{smaller:"w-[32px] h-[42px]",small:"w-[52px] h-[69px]",medium:"w-[70px] h-[93px] md:w-[100px] md:h-[133px]",large:"w-[100px] h-[133px] md:w-[130px] md:h-[173px]"}},defaultVariants:{size:"medium"}});function o({size:d,animate:a=!0,backgroundClassName:s,gradientColors:e={from:"#493dd1",via:"#2a57f6",to:"#9ecffb"}}){const n=i.cn("p-3.5 w-[150%] h-[120%] absolute -top-[10%] -left-1/4 rounded-full",{"animate-spin":a});return t.jsxs("div",{className:l({size:d}),style:{transform:"translate3d(0, 0, 0)",backfaceVisibility:"hidden"},children:[t.jsx("div",{className:n,style:{background:`linear-gradient(to bottom left, ${e.from} 10%, ${e.via} 30%, ${e.to} 70%)`}}),t.jsx("div",{className:i.cn("relative z-20 w-3/4 h-[80%] rounded-full bg-background",s)})]})}exports.DiditAnimatedLogo=o;
@@ -0,0 +1,15 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ declare const diditAnimatedLogoStyles: (props?: ({
3
+ size?: "small" | "smaller" | "medium" | "large" | null | undefined;
4
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
+ type DiditAnimatedLogoProps = VariantProps<typeof diditAnimatedLogoStyles> & {
6
+ animate?: boolean;
7
+ backgroundClassName?: string;
8
+ gradientColors?: {
9
+ from: string;
10
+ via: string;
11
+ to: string;
12
+ };
13
+ };
14
+ declare function DiditAnimatedLogo({ size, animate, backgroundClassName, gradientColors }: DiditAnimatedLogoProps): import("react/jsx-runtime").JSX.Element;
15
+ export { DiditAnimatedLogo };
@@ -0,0 +1,55 @@
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
+ import { c as a } from "../../index-DCn7qPZq.js";
3
+ import { c as l } from "../../index-Dw-qpi3m.js";
4
+ const o = l(
5
+ [
6
+ "relative flex items-center justify-center overflow-hidden",
7
+ "rounded-full md:w-[1-px]"
8
+ ],
9
+ {
10
+ variants: {
11
+ size: {
12
+ smaller: "w-[32px] h-[42px]",
13
+ small: "w-[52px] h-[69px]",
14
+ medium: "w-[70px] h-[93px] md:w-[100px] md:h-[133px]",
15
+ large: "w-[100px] h-[133px] md:w-[130px] md:h-[173px]"
16
+ }
17
+ },
18
+ defaultVariants: {
19
+ size: "medium"
20
+ }
21
+ }
22
+ );
23
+ function c({
24
+ size: i,
25
+ animate: d = !0,
26
+ backgroundClassName: r,
27
+ gradientColors: e = { from: "#493dd1", via: "#2a57f6", to: "#9ecffb" }
28
+ }) {
29
+ const s = a("p-3.5 w-[150%] h-[120%] absolute -top-[10%] -left-1/4 rounded-full", {
30
+ "animate-spin": d
31
+ });
32
+ return /* @__PURE__ */ m("div", { className: o({ size: i }), style: { transform: "translate3d(0, 0, 0)", backfaceVisibility: "hidden" }, children: [
33
+ /* @__PURE__ */ t(
34
+ "div",
35
+ {
36
+ className: s,
37
+ style: {
38
+ background: `linear-gradient(to bottom left, ${e.from} 10%, ${e.via} 30%, ${e.to} 70%)`
39
+ }
40
+ }
41
+ ),
42
+ /* @__PURE__ */ t(
43
+ "div",
44
+ {
45
+ className: a(
46
+ "relative z-20 w-3/4 h-[80%] rounded-full bg-background",
47
+ r
48
+ )
49
+ }
50
+ )
51
+ ] });
52
+ }
53
+ export {
54
+ c as DiditAnimatedLogo
55
+ };