@deepnoid/ui 0.1.223 → 1.0.0

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 (252) hide show
  1. package/.turbo/turbo-build.log +266 -251
  2. package/dist/{chunk-NTNF5T5I.mjs → chunk-23KGTXH2.mjs} +1 -1
  3. package/dist/{chunk-SX3JDFTH.mjs → chunk-2K3HZMC6.mjs} +9 -9
  4. package/dist/{chunk-ZFC5O2V3.mjs → chunk-3JKORA4G.mjs} +1 -1
  5. package/dist/{chunk-HFOHFBZH.mjs → chunk-3N442F6I.mjs} +2 -2
  6. package/dist/{chunk-WA7CSZQ3.mjs → chunk-3QZPVRM5.mjs} +1 -1
  7. package/dist/{chunk-BH3I4LIZ.mjs → chunk-4V5D237Z.mjs} +1 -1
  8. package/dist/chunk-63JRWMWN.mjs +215 -0
  9. package/dist/{chunk-GDHLN463.mjs → chunk-6CNPC722.mjs} +2 -2
  10. package/dist/{chunk-4IEHQI5B.mjs → chunk-7JCCPTBU.mjs} +3 -3
  11. package/dist/chunk-A6UUVHC6.mjs +38 -0
  12. package/dist/{chunk-P5L4YI54.mjs → chunk-AOU4QX7H.mjs} +106 -40
  13. package/dist/{chunk-U7SYKG2C.mjs → chunk-BBCJTXGU.mjs} +1 -1
  14. package/dist/{chunk-4S4AAZFC.mjs → chunk-CBFUVFGI.mjs} +4 -4
  15. package/dist/{chunk-AGE57VDD.mjs → chunk-CBIV6KFQ.mjs} +22 -25
  16. package/dist/{chunk-KWHCUAFU.mjs → chunk-CGJBY53Q.mjs} +3 -3
  17. package/dist/{chunk-XZYQFBCT.mjs → chunk-DI7QXTYZ.mjs} +1 -1
  18. package/dist/{chunk-U4DJHAM5.mjs → chunk-DPWUIAVC.mjs} +413 -149
  19. package/dist/chunk-E4VJDQD5.mjs +142 -0
  20. package/dist/{chunk-TE5JU3WA.mjs → chunk-EAWNUQDB.mjs} +90 -133
  21. package/dist/{chunk-OXJX5G3O.mjs → chunk-EIVSXVP5.mjs} +2 -2
  22. package/dist/{chunk-JGG3ZUNG.mjs → chunk-GSOTTSR4.mjs} +1 -1
  23. package/dist/{chunk-NGRGAY42.mjs → chunk-HKF5BNPX.mjs} +1 -1
  24. package/dist/{chunk-2URJGQFC.mjs → chunk-JUKILR6X.mjs} +2 -2
  25. package/dist/{chunk-DW3BX4M2.mjs → chunk-KPOXK7NN.mjs} +1 -1
  26. package/dist/{chunk-5KC3IFNR.mjs → chunk-LJSGQO4B.mjs} +1 -1
  27. package/dist/{chunk-LH6Z7SDZ.mjs → chunk-M7V5YMM2.mjs} +1 -1
  28. package/dist/{chunk-44FMPRHV.mjs → chunk-MAGZDGUW.mjs} +67 -38
  29. package/dist/chunk-MV2WCFK7.mjs +1 -0
  30. package/dist/{chunk-U52FBRJ3.mjs → chunk-NJWXYTBQ.mjs} +1 -1
  31. package/dist/{chunk-3DCUMRYP.mjs → chunk-NPQBJO6G.mjs} +11 -39
  32. package/dist/chunk-OK34FKBQ.mjs +224 -0
  33. package/dist/{chunk-OC5C42CB.mjs → chunk-OPGGL4CG.mjs} +3 -3
  34. package/dist/{chunk-R2XKPG4K.mjs → chunk-OPSMMRA2.mjs} +1 -1
  35. package/dist/{chunk-4X35QQTI.mjs → chunk-P4GNXDMO.mjs} +1 -1
  36. package/dist/{chunk-MTT24BLX.mjs → chunk-PCWANNZ4.mjs} +3 -3
  37. package/dist/{chunk-V2YH54JQ.mjs → chunk-PXUYPS6M.mjs} +12 -2
  38. package/dist/chunk-RFHWRBAB.mjs +105 -0
  39. package/dist/{chunk-EJ4GDC6K.mjs → chunk-S2T4GHJA.mjs} +27 -27
  40. package/dist/{chunk-5VTYO3RF.mjs → chunk-TBI5O3OL.mjs} +1 -1
  41. package/dist/{chunk-FZYZSMSS.mjs → chunk-TBRF36RK.mjs} +1 -1
  42. package/dist/{chunk-Q3KBMVJS.mjs → chunk-TEERNFIT.mjs} +77 -46
  43. package/dist/{chunk-RH3AHG52.mjs → chunk-V5XX3CGL.mjs} +1 -1
  44. package/dist/{chunk-6WD32ERF.mjs → chunk-VO2ZIGIK.mjs} +1 -1
  45. package/dist/{chunk-H6ZQDMYU.mjs → chunk-VOOEH6OJ.mjs} +24 -38
  46. package/dist/{chunk-ACZ3DQVT.mjs → chunk-VUO5J2OK.mjs} +16 -15
  47. package/dist/{chunk-RY5VVXQ4.mjs → chunk-WYTAGN2P.mjs} +1 -1
  48. package/dist/{chunk-NDNIAALB.mjs → chunk-YBDQSEPV.mjs} +17 -18
  49. package/dist/chunk-Z4NO7SMY.mjs +460 -0
  50. package/dist/components/accordion/accordion.js +366 -4
  51. package/dist/components/accordion/accordion.mjs +2 -2
  52. package/dist/components/accordion/accordionItem.js +366 -4
  53. package/dist/components/accordion/accordionItem.mjs +2 -2
  54. package/dist/components/accordion/index.js +366 -4
  55. package/dist/components/accordion/index.mjs +3 -3
  56. package/dist/components/avatar/avatar.js +472 -44
  57. package/dist/components/avatar/avatar.mjs +3 -3
  58. package/dist/components/avatar/index.js +472 -44
  59. package/dist/components/avatar/index.mjs +3 -3
  60. package/dist/components/backdrop/backdrop.js +366 -4
  61. package/dist/components/backdrop/backdrop.mjs +2 -2
  62. package/dist/components/backdrop/index.js +366 -4
  63. package/dist/components/backdrop/index.mjs +2 -2
  64. package/dist/components/breadcrumb/breadcrumb.js +951 -74
  65. package/dist/components/breadcrumb/breadcrumb.mjs +10 -9
  66. package/dist/components/breadcrumb/index.js +951 -74
  67. package/dist/components/breadcrumb/index.mjs +10 -9
  68. package/dist/components/button/button-group.js +366 -4
  69. package/dist/components/button/button-group.mjs +2 -2
  70. package/dist/components/button/button.d.mts +82 -119
  71. package/dist/components/button/button.d.ts +82 -119
  72. package/dist/components/button/button.js +966 -355
  73. package/dist/components/button/button.mjs +6 -5
  74. package/dist/components/button/button.style.d.mts +89 -0
  75. package/dist/components/button/button.style.d.ts +89 -0
  76. package/dist/components/button/button.style.js +1172 -0
  77. package/dist/components/button/button.style.mjs +9 -0
  78. package/dist/components/button/icon-button.d.mts +45 -46
  79. package/dist/components/button/icon-button.d.ts +45 -46
  80. package/dist/components/button/icon-button.js +1125 -527
  81. package/dist/components/button/icon-button.mjs +6 -5
  82. package/dist/components/button/index.js +1154 -830
  83. package/dist/components/button/index.mjs +9 -8
  84. package/dist/components/button/text-button.d.mts +59 -39
  85. package/dist/components/button/text-button.d.ts +59 -39
  86. package/dist/components/button/text-button.js +831 -21
  87. package/dist/components/button/text-button.mjs +3 -2
  88. package/dist/components/charts/areaChart.js +366 -4
  89. package/dist/components/charts/areaChart.mjs +2 -2
  90. package/dist/components/charts/barChart.js +366 -4
  91. package/dist/components/charts/barChart.mjs +2 -2
  92. package/dist/components/charts/circularProgress.js +366 -4
  93. package/dist/components/charts/circularProgress.mjs +2 -2
  94. package/dist/components/charts/index.js +366 -4
  95. package/dist/components/charts/index.mjs +6 -6
  96. package/dist/components/charts/radarChart.js +366 -4
  97. package/dist/components/charts/radarChart.mjs +2 -2
  98. package/dist/components/charts/simpleBarChart.js +366 -4
  99. package/dist/components/charts/simpleBarChart.mjs +2 -2
  100. package/dist/components/checkbox/checkbox.js +376 -42
  101. package/dist/components/checkbox/checkbox.mjs +2 -2
  102. package/dist/components/checkbox/index.js +376 -42
  103. package/dist/components/checkbox/index.mjs +2 -2
  104. package/dist/components/chip/chip.d.mts +32 -0
  105. package/dist/components/chip/chip.d.ts +32 -0
  106. package/dist/components/chip/chip.js +496 -57
  107. package/dist/components/chip/chip.mjs +4 -4
  108. package/dist/components/chip/index.js +496 -57
  109. package/dist/components/chip/index.mjs +4 -4
  110. package/dist/components/drawer/drawer.js +366 -4
  111. package/dist/components/drawer/drawer.mjs +2 -2
  112. package/dist/components/drawer/index.js +366 -4
  113. package/dist/components/drawer/index.mjs +2 -2
  114. package/dist/components/fileUpload/fileUpload.js +1014 -402
  115. package/dist/components/fileUpload/fileUpload.mjs +12 -11
  116. package/dist/components/fileUpload/index.js +1014 -402
  117. package/dist/components/fileUpload/index.mjs +12 -11
  118. package/dist/components/icon/Icon.d.mts +23 -10
  119. package/dist/components/icon/Icon.d.ts +23 -10
  120. package/dist/components/icon/Icon.js +120 -53
  121. package/dist/components/icon/Icon.mjs +2 -2
  122. package/dist/components/icon/index.js +120 -53
  123. package/dist/components/icon/index.mjs +2 -2
  124. package/dist/components/icon/template.d.mts +5 -2
  125. package/dist/components/icon/template.d.ts +5 -2
  126. package/dist/components/icon/template.js +106 -40
  127. package/dist/components/icon/template.mjs +1 -1
  128. package/dist/components/input/index.js +511 -82
  129. package/dist/components/input/index.mjs +4 -4
  130. package/dist/components/input/input.js +511 -82
  131. package/dist/components/input/input.mjs +4 -4
  132. package/dist/components/list/index.js +486 -57
  133. package/dist/components/list/index.mjs +6 -6
  134. package/dist/components/list/list.js +366 -4
  135. package/dist/components/list/list.mjs +2 -2
  136. package/dist/components/list/listItem.js +486 -57
  137. package/dist/components/list/listItem.mjs +5 -5
  138. package/dist/components/modal/GlobalModalProvider.d.mts +2 -0
  139. package/dist/components/modal/GlobalModalProvider.d.ts +2 -0
  140. package/dist/components/modal/GlobalModalProvider.js +1028 -416
  141. package/dist/components/modal/GlobalModalProvider.mjs +12 -11
  142. package/dist/components/modal/index.d.mts +2 -0
  143. package/dist/components/modal/index.d.ts +2 -0
  144. package/dist/components/modal/index.js +1028 -416
  145. package/dist/components/modal/index.mjs +13 -12
  146. package/dist/components/modal/modal.d.mts +101 -29
  147. package/dist/components/modal/modal.d.ts +101 -29
  148. package/dist/components/modal/modal.js +1028 -416
  149. package/dist/components/modal/modal.mjs +11 -10
  150. package/dist/components/modal/useGlobalModal.d.mts +2 -0
  151. package/dist/components/modal/useGlobalModal.d.ts +2 -0
  152. package/dist/components/modal/useGlobalModal.mjs +13 -12
  153. package/dist/components/pagination/index.js +598 -212
  154. package/dist/components/pagination/index.mjs +5 -5
  155. package/dist/components/pagination/pagination.js +598 -212
  156. package/dist/components/pagination/pagination.mjs +5 -5
  157. package/dist/components/picker/datePicker.js +1029 -705
  158. package/dist/components/picker/datePicker.mjs +12 -11
  159. package/dist/components/picker/day.js +366 -4
  160. package/dist/components/picker/day.mjs +2 -2
  161. package/dist/components/picker/index.js +1027 -703
  162. package/dist/components/picker/index.mjs +15 -14
  163. package/dist/components/picker/timePicker/Panel.js +831 -21
  164. package/dist/components/picker/timePicker/Panel.mjs +10 -9
  165. package/dist/components/picker/timePicker/index.js +976 -99
  166. package/dist/components/picker/timePicker/index.mjs +12 -11
  167. package/dist/components/progress/index.js +381 -18
  168. package/dist/components/progress/index.mjs +2 -2
  169. package/dist/components/progress/progress.d.mts +21 -18
  170. package/dist/components/progress/progress.d.ts +21 -18
  171. package/dist/components/progress/progress.js +381 -18
  172. package/dist/components/progress/progress.mjs +2 -2
  173. package/dist/components/radio/index.js +389 -41
  174. package/dist/components/radio/index.mjs +2 -2
  175. package/dist/components/radio/radio.d.mts +33 -48
  176. package/dist/components/radio/radio.d.ts +33 -48
  177. package/dist/components/radio/radio.js +389 -41
  178. package/dist/components/radio/radio.mjs +2 -2
  179. package/dist/components/ripple/index.mjs +3 -3
  180. package/dist/components/select/index.js +819 -221
  181. package/dist/components/select/index.mjs +10 -9
  182. package/dist/components/select/select.js +819 -221
  183. package/dist/components/select/select.mjs +10 -9
  184. package/dist/components/slider/index.d.mts +4 -0
  185. package/dist/components/slider/index.d.ts +4 -0
  186. package/dist/components/slider/index.js +955 -0
  187. package/dist/components/slider/index.mjs +11 -0
  188. package/dist/components/slider/slider.d.mts +158 -0
  189. package/dist/components/slider/slider.d.ts +158 -0
  190. package/dist/components/slider/slider.js +949 -0
  191. package/dist/components/slider/slider.mjs +10 -0
  192. package/dist/components/starRating/index.js +486 -57
  193. package/dist/components/starRating/index.mjs +4 -4
  194. package/dist/components/starRating/starRating.js +486 -57
  195. package/dist/components/starRating/starRating.mjs +4 -4
  196. package/dist/components/switch/index.js +22 -25
  197. package/dist/components/switch/index.mjs +1 -1
  198. package/dist/components/switch/switch.d.mts +0 -18
  199. package/dist/components/switch/switch.d.ts +0 -18
  200. package/dist/components/switch/switch.js +22 -25
  201. package/dist/components/switch/switch.mjs +1 -1
  202. package/dist/components/table/definition-table.js +366 -4
  203. package/dist/components/table/definition-table.mjs +2 -2
  204. package/dist/components/table/form-table.js +366 -4
  205. package/dist/components/table/form-table.mjs +1 -1
  206. package/dist/components/table/index.js +679 -291
  207. package/dist/components/table/index.mjs +10 -10
  208. package/dist/components/table/table-body.js +679 -291
  209. package/dist/components/table/table-body.mjs +7 -7
  210. package/dist/components/table/table-head.js +679 -291
  211. package/dist/components/table/table-head.mjs +7 -7
  212. package/dist/components/table/table.d.mts +8 -29
  213. package/dist/components/table/table.d.ts +8 -29
  214. package/dist/components/table/table.js +679 -291
  215. package/dist/components/table/table.mjs +7 -7
  216. package/dist/components/tabs/index.js +366 -4
  217. package/dist/components/tabs/index.mjs +2 -2
  218. package/dist/components/tabs/tabs.js +366 -4
  219. package/dist/components/tabs/tabs.mjs +2 -2
  220. package/dist/components/textarea/index.js +67 -38
  221. package/dist/components/textarea/index.mjs +1 -1
  222. package/dist/components/textarea/textarea.d.mts +21 -0
  223. package/dist/components/textarea/textarea.d.ts +21 -0
  224. package/dist/components/textarea/textarea.js +67 -38
  225. package/dist/components/textarea/textarea.mjs +1 -1
  226. package/dist/components/timePicker/calendar.js +486 -57
  227. package/dist/components/timePicker/calendar.mjs +3 -3
  228. package/dist/components/toast/index.js +486 -57
  229. package/dist/components/toast/index.mjs +5 -5
  230. package/dist/components/toast/toast.js +486 -57
  231. package/dist/components/toast/toast.mjs +4 -4
  232. package/dist/components/toast/use-toast.js +486 -57
  233. package/dist/components/toast/use-toast.mjs +5 -5
  234. package/dist/components/tooltip/index.js +366 -4
  235. package/dist/components/tooltip/index.mjs +2 -2
  236. package/dist/components/tooltip/tooltip.js +366 -4
  237. package/dist/components/tooltip/tooltip.mjs +2 -2
  238. package/dist/components/tree/index.js +486 -57
  239. package/dist/components/tree/index.mjs +4 -4
  240. package/dist/components/tree/tree.js +486 -57
  241. package/dist/components/tree/tree.mjs +4 -4
  242. package/dist/index.d.mts +1 -0
  243. package/dist/index.d.ts +1 -0
  244. package/dist/index.js +1705 -1281
  245. package/dist/index.mjs +76 -70
  246. package/dist/utils/tailwind-variants.js +366 -4
  247. package/dist/utils/tailwind-variants.mjs +1 -1
  248. package/package.json +1 -1
  249. package/dist/chunk-6AID2NLT.mjs +0 -37
  250. package/dist/chunk-BBRO35V3.mjs +0 -385
  251. package/dist/chunk-EVJ46M3U.mjs +0 -141
  252. package/dist/chunk-SKX5QPUD.mjs +0 -482
@@ -1,482 +0,0 @@
1
- "use client";
2
- import {
3
- useRipple
4
- } from "./chunk-SZL743JC.mjs";
5
- import {
6
- ripple_default
7
- } from "./chunk-LXHUO6VM.mjs";
8
- import {
9
- Icon_default
10
- } from "./chunk-6AID2NLT.mjs";
11
- import {
12
- mapPropsVariants
13
- } from "./chunk-E3G5QXSH.mjs";
14
- import {
15
- tv
16
- } from "./chunk-U4DJHAM5.mjs";
17
-
18
- // src/components/button/button.tsx
19
- import {
20
- forwardRef,
21
- useMemo,
22
- useCallback,
23
- isValidElement,
24
- cloneElement
25
- } from "react";
26
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
27
- var extractTextFromChildren = (children) => {
28
- if (typeof children === "string") {
29
- return children;
30
- }
31
- if (typeof children === "number") {
32
- return String(children);
33
- }
34
- if (isValidElement(children)) {
35
- const childProps = children.props;
36
- return extractTextFromChildren(childProps.children);
37
- }
38
- if (Array.isArray(children)) {
39
- return children.map((child) => extractTextFromChildren(child)).join(" ");
40
- }
41
- return "";
42
- };
43
- var Button = forwardRef((originalProps, ref) => {
44
- const [props, variantProps] = mapPropsVariants(originalProps, buttonStyle.variantKeys);
45
- const { classNames, startContent, endContent, disableRipple, asChild, children, ...buttonProps } = props;
46
- const slots = useMemo(() => buttonStyle({ ...variantProps }), [variantProps]);
47
- const { onPress: onRipplePressHandler, onClear: onClearRipple, ripples } = useRipple();
48
- const autoAriaLabel = useMemo(() => {
49
- if (originalProps["aria-label"] || originalProps["aria-labelledby"]) {
50
- return void 0;
51
- }
52
- if (originalProps.isLoading) {
53
- const baseText = extractTextFromChildren(children);
54
- return baseText ? `${baseText} (loading)` : "loading";
55
- }
56
- const textContent = extractTextFromChildren(children);
57
- return textContent || void 0;
58
- }, [originalProps["aria-label"], originalProps["aria-labelledby"], originalProps.isLoading, children]);
59
- const handlePress = useCallback(
60
- (e) => {
61
- if (disableRipple || originalProps.disabled) return;
62
- onRipplePressHandler(e);
63
- },
64
- [disableRipple, originalProps.disabled, onRipplePressHandler]
65
- );
66
- const mouseDownHandler = useCallback(
67
- (e) => {
68
- var _a;
69
- (_a = buttonProps.onMouseDown) == null ? void 0 : _a.call(buttonProps, e);
70
- if (disableRipple || originalProps.disabled) return;
71
- handlePress(e);
72
- },
73
- [buttonProps.onMouseDown, disableRipple, originalProps.disabled, handlePress]
74
- );
75
- const getRippleProps = useCallback(
76
- () => ({ ripples, onClear: onClearRipple }),
77
- [ripples, onClearRipple]
78
- );
79
- const getBaseProps = useCallback(
80
- () => ({
81
- ...buttonProps,
82
- onMouseDown: mouseDownHandler,
83
- ref,
84
- disabled: originalProps.disabled || originalProps.isLoading,
85
- "data-loading": originalProps.isLoading,
86
- className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
87
- "aria-label": originalProps["aria-label"] || autoAriaLabel
88
- }),
89
- [
90
- buttonProps,
91
- mouseDownHandler,
92
- ref,
93
- originalProps.disabled,
94
- originalProps.isLoading,
95
- originalProps["aria-label"],
96
- autoAriaLabel,
97
- slots,
98
- classNames == null ? void 0 : classNames.base
99
- ]
100
- );
101
- const getContentProps = useCallback(
102
- () => ({
103
- className: slots.content({ class: classNames == null ? void 0 : classNames.content }),
104
- size: originalProps.size
105
- }),
106
- [slots, classNames, originalProps.size]
107
- );
108
- const renderContent = (content) => {
109
- if (isValidElement(content)) {
110
- const _content = content;
111
- const existingProps = _content.props;
112
- const mergedProps = {
113
- ...getContentProps(),
114
- className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
115
- };
116
- return cloneElement(content, mergedProps);
117
- } else {
118
- const contentProps = getContentProps();
119
- return /* @__PURE__ */ jsx("div", { ...contentProps, children: content });
120
- }
121
- };
122
- const buttonContent = /* @__PURE__ */ jsx(Fragment, { children: originalProps.isLoading ? renderContent(/* @__PURE__ */ jsx(Icon_default, { name: "loading", className: "animate-spin" })) : /* @__PURE__ */ jsxs(Fragment, { children: [
123
- startContent && renderContent(startContent),
124
- children,
125
- endContent && renderContent(endContent),
126
- !disableRipple && /* @__PURE__ */ jsx(ripple_default, { ...getRippleProps() })
127
- ] }) });
128
- if (asChild && isValidElement(children)) {
129
- const childElement = children;
130
- const baseProps = getBaseProps();
131
- const mergedProps = {
132
- ...childElement.props,
133
- ...baseProps,
134
- className: `${baseProps.className || ""} ${childElement.props.className || ""}`.trim(),
135
- onClick: (e) => {
136
- var _a, _b, _c;
137
- (_b = (_a = childElement.props).onClick) == null ? void 0 : _b.call(_a, e);
138
- (_c = baseProps.onClick) == null ? void 0 : _c.call(baseProps, e);
139
- },
140
- onMouseDown: (e) => {
141
- var _a, _b, _c;
142
- (_b = (_a = childElement.props).onMouseDown) == null ? void 0 : _b.call(_a, e);
143
- (_c = baseProps.onMouseDown) == null ? void 0 : _c.call(baseProps, e);
144
- },
145
- children: /* @__PURE__ */ jsx(Fragment, { children: originalProps.isLoading ? renderContent(/* @__PURE__ */ jsx(Icon_default, { name: "loading", className: "animate-spin" })) : /* @__PURE__ */ jsxs(Fragment, { children: [
146
- startContent && renderContent(startContent),
147
- childElement.props.children,
148
- endContent && renderContent(endContent),
149
- !disableRipple && /* @__PURE__ */ jsx(ripple_default, { ...getRippleProps() })
150
- ] }) })
151
- };
152
- return cloneElement(childElement, mergedProps);
153
- }
154
- return /* @__PURE__ */ jsx("button", { ...getBaseProps(), children: buttonContent });
155
- });
156
- Button.displayName = "Button";
157
- var button_default = Button;
158
- var buttonStyle = tv({
159
- slots: {
160
- base: "relative flex items-center justify-center whitespace-nowrap transition duration-200 select-none overflow-hidden box-border border border-transparent",
161
- content: ""
162
- },
163
- variants: {
164
- variant: {
165
- solid: "",
166
- soft: "",
167
- outline: "",
168
- ghost: ""
169
- },
170
- color: {
171
- primary: "",
172
- secondary: "",
173
- neutral: "",
174
- info: "",
175
- success: "",
176
- warning: "",
177
- danger: ""
178
- },
179
- size: {
180
- sm: {
181
- base: "h-[24px] px-[8px] py-[3px] text-sm font-[700] rounded-sm gap-sm"
182
- },
183
- md: {
184
- base: "h-[32px] px-[12px] py-[5.5px] text-md font-[700] rounded-md gap-md"
185
- },
186
- lg: {
187
- base: "h-[40px] px-[16px] py-[8px] text-lg font-[700] rounded-lg gap-lg"
188
- },
189
- xl: {
190
- base: "h-[50px] px-[20px] py-[11.5px] text-xl font-[700] rounded-xl gap-xl"
191
- }
192
- },
193
- radius: {
194
- default: {
195
- base: ""
196
- },
197
- full: {
198
- base: "rounded-full"
199
- },
200
- none: {
201
- base: "rounded-none"
202
- }
203
- },
204
- full: {
205
- true: {
206
- base: "w-full"
207
- }
208
- },
209
- isLoading: {
210
- true: {}
211
- },
212
- disabled: {
213
- true: {
214
- base: "!bg-neutral-soft !border-neutral-soft !text-neutral-light pointer-events-none"
215
- }
216
- },
217
- isInGroup: {
218
- true: {
219
- base: "[&:not(:first-child):not(:last-child)]:rounded-none first:rounded-r-none last:rounded-l-none [&:not(:first-child)]:border-l-0"
220
- }
221
- }
222
- },
223
- defaultVariants: {
224
- size: "md",
225
- variant: "solid",
226
- color: "primary",
227
- full: false,
228
- disabled: false,
229
- isLoading: false,
230
- isInGroup: false
231
- },
232
- compoundVariants: [
233
- // solid & color
234
- {
235
- variant: "solid",
236
- color: "primary",
237
- class: {
238
- base: ["text-white", "bg-primary-main", "hover:bg-gradient-to-r", "hover:from-white/20", "hover:to-white/20"]
239
- }
240
- },
241
- {
242
- variant: "solid",
243
- color: "secondary",
244
- class: {
245
- base: ["text-white", "bg-secondary-main", "hover:bg-gradient-to-r", "hover:from-white/20", "hover:to-white/20"]
246
- }
247
- },
248
- {
249
- variant: "solid",
250
- color: "neutral",
251
- class: {
252
- base: ["text-white", "bg-neutral-main", "hover:bg-gradient-to-r", "hover:from-white/20", "hover:to-white/20"]
253
- }
254
- },
255
- {
256
- variant: "solid",
257
- color: "info",
258
- class: {
259
- base: ["text-white", "bg-info-main", "hover:bg-gradient-to-r", "hover:from-white/20", "hover:to-white/20"]
260
- }
261
- },
262
- {
263
- variant: "solid",
264
- color: "success",
265
- class: {
266
- base: ["text-white", "bg-success-main", "hover:bg-gradient-to-r", "hover:from-white/20", "hover:to-white/20"]
267
- }
268
- },
269
- {
270
- variant: "solid",
271
- color: "warning",
272
- class: {
273
- base: ["text-white", "bg-warning-main", "hover:bg-gradient-to-r", "hover:from-white/20", "hover:to-white/20"]
274
- }
275
- },
276
- {
277
- variant: "solid",
278
- color: "danger",
279
- class: {
280
- base: ["text-white", "bg-danger-main", "hover:bg-gradient-to-r", "hover:from-white/20", "hover:to-white/20"]
281
- }
282
- },
283
- // soft & color
284
- {
285
- variant: "soft",
286
- color: "primary",
287
- class: {
288
- base: ["text-primary-main", "bg-primary-soft", "border-primary-soft", "hover:border-primary-light"]
289
- }
290
- },
291
- {
292
- variant: "soft",
293
- color: "secondary",
294
- class: {
295
- base: ["text-secondary-main", "bg-secondary-soft", "border-secondary-soft", "hover:border-secondary-light"]
296
- }
297
- },
298
- {
299
- variant: "soft",
300
- color: "neutral",
301
- class: {
302
- base: ["text-neutral-main", "bg-neutral-soft", "border-neutral-soft", "hover:border-neutral-light"]
303
- }
304
- },
305
- {
306
- variant: "soft",
307
- color: "info",
308
- class: {
309
- base: ["text-info-main", "bg-info-soft", "border-info-soft", "hover:border-info-light"]
310
- }
311
- },
312
- {
313
- variant: "soft",
314
- color: "success",
315
- class: {
316
- base: ["text-success-main", "bg-success-soft", "border-success-soft", "hover:border-success-light"]
317
- }
318
- },
319
- {
320
- variant: "soft",
321
- color: "warning",
322
- class: {
323
- base: ["text-warning-main", "bg-warning-soft", "border-warning-soft", "hover:border-warning-light"]
324
- }
325
- },
326
- {
327
- variant: "soft",
328
- color: "danger",
329
- class: {
330
- base: ["text-danger-main", "bg-danger-soft", "border-danger-soft", "hover:border-danger-light"]
331
- }
332
- },
333
- // outline & color
334
- {
335
- variant: "outline",
336
- color: "primary",
337
- class: {
338
- base: ["bg-body-background", "border-primary-main", "text-primary-main", "hover:bg-primary-soft"]
339
- }
340
- },
341
- {
342
- variant: "outline",
343
- color: "secondary",
344
- class: {
345
- base: ["bg-body-background", "border-secondary-main", "text-secondary-main", "hover:bg-secondary-soft"]
346
- }
347
- },
348
- {
349
- variant: "outline",
350
- color: "neutral",
351
- class: {
352
- base: ["bg-body-background", "border-neutral-main", "text-neutral-main", "hover:bg-neutral-soft"]
353
- }
354
- },
355
- {
356
- variant: "outline",
357
- color: "info",
358
- class: {
359
- base: ["bg-body-background", "border-info-main", "text-info-main", "hover:bg-info-soft"]
360
- }
361
- },
362
- {
363
- variant: "outline",
364
- color: "success",
365
- class: {
366
- base: ["bg-body-background", "border-success-main", "text-success-main", "hover:bg-success-soft"]
367
- }
368
- },
369
- {
370
- variant: "outline",
371
- color: "warning",
372
- class: {
373
- base: ["bg-body-background", "border-warning-main", "text-warning-main", "hover:bg-warning-soft"]
374
- }
375
- },
376
- {
377
- variant: "outline",
378
- color: "danger",
379
- class: {
380
- base: ["bg-body-background", "border-danger-main", "text-danger-main", "hover:bg-danger-soft"]
381
- }
382
- },
383
- // ghost & color
384
- {
385
- variant: "ghost",
386
- color: "primary",
387
- class: {
388
- base: ["text-primary-main", "border-transparent", "hover:bg-primary-soft"]
389
- }
390
- },
391
- {
392
- variant: "ghost",
393
- color: "secondary",
394
- class: {
395
- base: ["text-secondary-main", "border-transparent", "hover:bg-secondary-soft"]
396
- }
397
- },
398
- {
399
- variant: "ghost",
400
- color: "neutral",
401
- class: {
402
- base: ["text-neutral-main", "border-transparent", "hover:bg-neutral-soft"]
403
- }
404
- },
405
- {
406
- variant: "ghost",
407
- color: "info",
408
- class: {
409
- base: ["text-info-main", "border-transparent", "hover:bg-info-soft"]
410
- }
411
- },
412
- {
413
- variant: "ghost",
414
- color: "success",
415
- class: {
416
- base: ["text-success-main", "border-transparent", "hover:bg-success-soft"]
417
- }
418
- },
419
- {
420
- variant: "ghost",
421
- color: "warning",
422
- class: {
423
- base: ["text-warning-main", "border-transparent", "hover:bg-warning-soft"]
424
- }
425
- },
426
- {
427
- variant: "ghost",
428
- color: "danger",
429
- class: {
430
- base: ["text-danger-main", "border-transparent", "hover:bg-danger-soft"]
431
- }
432
- },
433
- // variant && size
434
- {
435
- variant: ["soft", "outline"],
436
- size: "sm",
437
- class: {
438
- base: "border-[1px]"
439
- }
440
- },
441
- {
442
- variant: ["soft", "outline"],
443
- size: "md",
444
- class: {
445
- base: "border-[1.25px]"
446
- }
447
- },
448
- {
449
- variant: ["soft", "outline"],
450
- size: "lg",
451
- class: {
452
- base: "border-[1.5px]"
453
- }
454
- },
455
- {
456
- variant: ["soft", "outline"],
457
- size: "xl",
458
- class: {
459
- base: "border-[1.75px]"
460
- }
461
- },
462
- // variant && disabled
463
- {
464
- variant: ["soft", "ghost"],
465
- disabled: true,
466
- class: {
467
- base: "!border-neutral-soft"
468
- }
469
- },
470
- {
471
- variant: ["outline"],
472
- disabled: true,
473
- class: {
474
- base: "!border-neutral-light"
475
- }
476
- }
477
- ]
478
- });
479
-
480
- export {
481
- button_default
482
- };