@deepnoid/ui 0.1.11 → 0.1.13
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/.turbo/turbo-build.log +157 -147
- package/dist/{chunk-LHDOM76J.mjs → chunk-2KAR2PTQ.mjs} +1 -1
- package/dist/{chunk-QYJORE4E.mjs → chunk-4GLKWK3Z.mjs} +1 -1
- package/dist/{chunk-H5DOTBKA.mjs → chunk-56RN6YOP.mjs} +1 -1
- package/dist/{chunk-RMTHVIPI.mjs → chunk-57WBWSSL.mjs} +2 -2
- package/dist/{chunk-ILFY6MZ6.mjs → chunk-6G7GOPSB.mjs} +5 -5
- package/dist/{chunk-DG3KRCXB.mjs → chunk-7R4NOC2G.mjs} +9 -9
- package/dist/{chunk-6BBDU4HW.mjs → chunk-7R4QY3TA.mjs} +1 -1
- package/dist/{chunk-M5KV3WZ2.mjs → chunk-A7OXEUCC.mjs} +29 -37
- package/dist/{chunk-W55GVLPJ.mjs → chunk-AHTNXGAY.mjs} +1 -1
- package/dist/{chunk-RRI3I435.mjs → chunk-DADMVOYI.mjs} +1 -1
- package/dist/{chunk-ASQAVFM5.mjs → chunk-GQS6V47G.mjs} +1 -1
- package/dist/{chunk-C62UPLCC.mjs → chunk-GXWSYM7Z.mjs} +2 -2
- package/dist/{chunk-KHI2DZTG.mjs → chunk-LP724WOP.mjs} +4 -4
- package/dist/{chunk-BWURZ3WF.mjs → chunk-NEUCUEIG.mjs} +2 -2
- package/dist/{chunk-DPCE4DLW.mjs → chunk-NJ4PBW65.mjs} +1 -1
- package/dist/{chunk-53O3RJVP.mjs → chunk-O5UA4WDU.mjs} +2 -2
- package/dist/{chunk-OHDRKCOC.mjs → chunk-T5LK5CJS.mjs} +41 -23
- package/dist/chunk-TTY3EEXX.mjs +143 -0
- package/dist/{chunk-N4F3R6HG.mjs → chunk-WB24YDE2.mjs} +1 -1
- package/dist/{chunk-N4UFXIUC.mjs → chunk-YQGZRSUQ.mjs} +1 -1
- package/dist/chunk-ZMJYDLTS.mjs +380 -0
- package/dist/components/avatar/avatar.js +29 -37
- package/dist/components/avatar/avatar.mjs +2 -2
- package/dist/components/avatar/index.js +29 -37
- package/dist/components/avatar/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.mts +0 -3
- package/dist/components/breadcrumb/breadcrumb.d.ts +0 -3
- package/dist/components/breadcrumb/breadcrumb.js +257 -65
- package/dist/components/breadcrumb/breadcrumb.mjs +13 -3
- package/dist/components/breadcrumb/index.js +257 -65
- package/dist/components/breadcrumb/index.mjs +13 -3
- package/dist/components/button/button-group.js +1 -1
- package/dist/components/button/button-group.mjs +1 -1
- package/dist/components/button/button.js +29 -37
- package/dist/components/button/button.mjs +4 -4
- package/dist/components/button/icon-button.d.mts +157 -0
- package/dist/components/button/icon-button.d.ts +157 -0
- package/dist/components/button/icon-button.js +4674 -0
- package/dist/components/button/icon-button.mjs +16 -0
- package/dist/components/button/index.d.mts +5 -0
- package/dist/components/button/index.d.ts +5 -0
- package/dist/components/button/index.js +566 -45
- package/dist/components/button/index.mjs +16 -7
- package/dist/components/button/text-button.d.mts +146 -0
- package/dist/components/button/text-button.d.ts +146 -0
- package/dist/components/button/text-button.js +507 -0
- package/dist/components/button/text-button.mjs +11 -0
- package/dist/components/chip/chip.js +29 -37
- package/dist/components/chip/chip.mjs +3 -3
- package/dist/components/chip/index.js +29 -37
- package/dist/components/chip/index.mjs +3 -3
- package/dist/components/dateTimePicker/calendar.js +29 -37
- package/dist/components/dateTimePicker/calendar.mjs +3 -3
- package/dist/components/dateTimePicker/dateTimePicker.js +29 -37
- package/dist/components/dateTimePicker/dateTimePicker.mjs +7 -7
- package/dist/components/dateTimePicker/index.js +29 -37
- package/dist/components/dateTimePicker/index.mjs +7 -7
- package/dist/components/dateTimePicker/timePicker.js +29 -37
- package/dist/components/dateTimePicker/timePicker.mjs +5 -5
- package/dist/components/icon/Icon.d.mts +4 -4
- package/dist/components/icon/Icon.d.ts +4 -4
- package/dist/components/icon/Icon.js +29 -37
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.js +29 -37
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.d.mts +1 -1
- package/dist/components/icon/template.d.ts +1 -1
- package/dist/components/icon/template.js +29 -37
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +29 -37
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.js +29 -37
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/list/index.js +29 -37
- package/dist/components/list/index.mjs +4 -4
- package/dist/components/list/listItem.js +29 -37
- package/dist/components/list/listItem.mjs +4 -4
- package/dist/components/modal/index.js +29 -37
- package/dist/components/modal/index.mjs +10 -7
- package/dist/components/modal/modal.js +29 -37
- package/dist/components/modal/modal.mjs +10 -7
- package/dist/components/pagination/index.js +36 -44
- package/dist/components/pagination/index.mjs +4 -4
- package/dist/components/pagination/pagination.js +36 -44
- package/dist/components/pagination/pagination.mjs +4 -4
- package/dist/components/ripple/index.mjs +3 -3
- package/dist/components/select/index.js +29 -37
- package/dist/components/select/index.mjs +4 -4
- package/dist/components/select/option.js +29 -37
- package/dist/components/select/option.mjs +3 -3
- package/dist/components/select/select.js +29 -37
- package/dist/components/select/select.mjs +4 -4
- package/dist/components/table/index.js +37 -45
- package/dist/components/table/index.mjs +5 -5
- package/dist/components/table/table.d.mts +1 -1
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.js +37 -45
- package/dist/components/table/table.mjs +5 -5
- package/dist/components/toast/index.js +29 -37
- package/dist/components/toast/index.mjs +4 -4
- package/dist/components/toast/toast.js +29 -37
- package/dist/components/toast/toast.mjs +3 -3
- package/dist/components/toast/use-toast.js +29 -37
- package/dist/components/toast/use-toast.mjs +4 -4
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1103 -609
- package/dist/index.mjs +50 -42
- package/package.json +1 -1
- /package/dist/{chunk-VUYUQGLF.mjs → chunk-MY5U63QO.mjs} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
icon_button_default
|
|
4
|
+
} from "../../chunk-ZMJYDLTS.mjs";
|
|
5
|
+
import "../../chunk-6WSACUIB.mjs";
|
|
6
|
+
import "../../chunk-6PNKRBUT.mjs";
|
|
7
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
8
|
+
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
|
+
import "../../chunk-DADMVOYI.mjs";
|
|
10
|
+
import "../../chunk-A7OXEUCC.mjs";
|
|
11
|
+
import "../../chunk-2ZT6V4QR.mjs";
|
|
12
|
+
import "../../chunk-E3G5QXSH.mjs";
|
|
13
|
+
import "../../chunk-AC6TWLRT.mjs";
|
|
14
|
+
export {
|
|
15
|
+
icon_button_default as default
|
|
16
|
+
};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export { default as Button, ButtonProps } from './button.mjs';
|
|
2
|
+
export { default as IconButton } from './icon-button.mjs';
|
|
3
|
+
export { default as TextButton } from './text-button.mjs';
|
|
2
4
|
export { default as ButtonGroup, ButtonGroupProps } from './button-group.mjs';
|
|
3
5
|
import 'tailwind-variants';
|
|
4
6
|
import 'react';
|
|
5
7
|
import '../../utils/types.mjs';
|
|
8
|
+
import '../icon/Icon.mjs';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
10
|
+
import '../icon/template.mjs';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export { default as Button, ButtonProps } from './button.js';
|
|
2
|
+
export { default as IconButton } from './icon-button.js';
|
|
3
|
+
export { default as TextButton } from './text-button.js';
|
|
2
4
|
export { default as ButtonGroup, ButtonGroupProps } from './button-group.js';
|
|
3
5
|
import 'tailwind-variants';
|
|
4
6
|
import 'react';
|
|
5
7
|
import '../../utils/types.js';
|
|
8
|
+
import '../icon/Icon.js';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
10
|
+
import '../icon/template.js';
|
|
@@ -103,7 +103,9 @@ var require_plugin = __commonJS({
|
|
|
103
103
|
var button_exports = {};
|
|
104
104
|
__export(button_exports, {
|
|
105
105
|
Button: () => button_default,
|
|
106
|
-
ButtonGroup: () => button_group_default
|
|
106
|
+
ButtonGroup: () => button_group_default,
|
|
107
|
+
IconButton: () => icon_button_default,
|
|
108
|
+
TextButton: () => text_button_default
|
|
107
109
|
});
|
|
108
110
|
module.exports = __toCommonJS(button_exports);
|
|
109
111
|
|
|
@@ -756,6 +758,35 @@ var template = {
|
|
|
756
758
|
}
|
|
757
759
|
);
|
|
758
760
|
},
|
|
761
|
+
home: ({ className }) => {
|
|
762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
763
|
+
"svg",
|
|
764
|
+
{
|
|
765
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
766
|
+
width: "18",
|
|
767
|
+
height: "18",
|
|
768
|
+
viewBox: "0 0 18 18",
|
|
769
|
+
fill: "none",
|
|
770
|
+
className,
|
|
771
|
+
children: [
|
|
772
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
773
|
+
"path",
|
|
774
|
+
{
|
|
775
|
+
d: "M8.60249 2.88071C8.70796 2.77538 8.85092 2.71621 8.99999 2.71621C9.14905 2.71621 9.29202 2.77538 9.39749 2.88071L15.915 9.39821C15.9669 9.45191 16.029 9.49474 16.0976 9.52418C16.1663 9.55363 16.2401 9.56911 16.3148 9.56973C16.3895 9.57034 16.4635 9.55607 16.5326 9.52776C16.6018 9.49944 16.6645 9.45764 16.7173 9.4048C16.7701 9.35196 16.8119 9.28914 16.8401 9.22C16.8684 9.15086 16.8826 9.07678 16.8819 9.00209C16.8812 8.92741 16.8656 8.8536 16.8361 8.78499C16.8066 8.71638 16.7637 8.65433 16.71 8.60246L10.1932 2.08496C10.0365 1.92826 9.85051 1.80396 9.64577 1.71915C9.44103 1.63435 9.22159 1.5907 8.99999 1.5907C8.77838 1.5907 8.55894 1.63435 8.3542 1.71915C8.14947 1.80396 7.96344 1.92826 7.80674 2.08496L1.28924 8.60246C1.23554 8.65438 1.19272 8.71647 1.16327 8.78511C1.13382 8.85375 1.11834 8.92757 1.11773 9.00225C1.11711 9.07694 1.13138 9.15101 1.15969 9.22012C1.18801 9.28924 1.22981 9.35202 1.28265 9.40481C1.33549 9.4576 1.39831 9.49934 1.46745 9.52759C1.53659 9.55584 1.61067 9.57004 1.68536 9.56935C1.76005 9.56867 1.83385 9.55312 1.90246 9.5236C1.97108 9.49409 2.03312 9.45121 2.08499 9.39746L8.60249 2.88071Z",
|
|
776
|
+
fill: "currentColor"
|
|
777
|
+
}
|
|
778
|
+
),
|
|
779
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
780
|
+
"path",
|
|
781
|
+
{
|
|
782
|
+
d: "M9 4.07397L15.1193 10.1932C15.1418 10.2157 15.1643 10.2367 15.1875 10.2577V14.9062C15.1875 15.6825 14.5575 16.3125 13.7812 16.3125H11.25C11.1008 16.3125 10.9577 16.2532 10.8523 16.1477C10.7468 16.0422 10.6875 15.8992 10.6875 15.75V12.375C10.6875 12.2258 10.6282 12.0827 10.5227 11.9772C10.4173 11.8717 10.2742 11.8125 10.125 11.8125H7.875C7.72582 11.8125 7.58274 11.8717 7.47725 11.9772C7.37176 12.0827 7.3125 12.2258 7.3125 12.375V15.75C7.3125 15.8992 7.25324 16.0422 7.14775 16.1477C7.04226 16.2532 6.89918 16.3125 6.75 16.3125H4.21875C3.84579 16.3125 3.4881 16.1643 3.22438 15.9006C2.96066 15.6369 2.8125 15.2792 2.8125 14.9062V10.2577C2.83583 10.2369 2.85859 10.2153 2.88075 10.1932L9 4.07397Z",
|
|
783
|
+
fill: "currentColor"
|
|
784
|
+
}
|
|
785
|
+
)
|
|
786
|
+
]
|
|
787
|
+
}
|
|
788
|
+
);
|
|
789
|
+
},
|
|
759
790
|
// ----------------------------------- old ---------------------------------
|
|
760
791
|
// ** Status **
|
|
761
792
|
plus: ({ className, fill }) => {
|
|
@@ -1212,43 +1243,6 @@ var template = {
|
|
|
1212
1243
|
// );
|
|
1213
1244
|
// },
|
|
1214
1245
|
// ** Common **
|
|
1215
|
-
home: ({ className, fill }) => {
|
|
1216
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1217
|
-
"svg",
|
|
1218
|
-
{
|
|
1219
|
-
width: "24",
|
|
1220
|
-
height: "24",
|
|
1221
|
-
viewBox: "0 0 24 24",
|
|
1222
|
-
fill: "none",
|
|
1223
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1224
|
-
className,
|
|
1225
|
-
children: fill ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1226
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1227
|
-
"path",
|
|
1228
|
-
{
|
|
1229
|
-
d: "M11.4699 3.84111C11.6106 3.70066 11.8012 3.62177 11.9999 3.62177C12.1987 3.62177 12.3893 3.70066 12.5299 3.84111L21.2199 12.5311C21.2892 12.6027 21.3719 12.6598 21.4635 12.6991C21.555 12.7383 21.6534 12.759 21.753 12.7598C21.8526 12.7606 21.9513 12.7416 22.0435 12.7038C22.1356 12.6661 22.2194 12.6104 22.2897 12.5399C22.3601 12.4694 22.4158 12.3857 22.4534 12.2935C22.4911 12.2013 22.51 12.1025 22.5091 12.003C22.5082 11.9034 22.4875 11.805 22.4481 11.7135C22.4088 11.622 22.3516 11.5393 22.2799 11.4701L13.5909 2.78011C13.382 2.57118 13.134 2.40544 12.861 2.29237C12.588 2.17929 12.2954 2.12109 11.9999 2.12109C11.7045 2.12109 11.4119 2.17929 11.1389 2.29237C10.8659 2.40544 10.6179 2.57118 10.4089 2.78011L1.71894 11.4701C1.64734 11.5393 1.59025 11.6221 1.55098 11.7136C1.51172 11.8052 1.49108 11.9036 1.49026 12.0032C1.48944 12.1028 1.50846 12.2015 1.54622 12.2937C1.58397 12.3858 1.6397 12.4695 1.71015 12.5399C1.78061 12.6103 1.86437 12.6659 1.95656 12.7036C2.04875 12.7413 2.14752 12.7602 2.2471 12.7593C2.34669 12.7584 2.44509 12.7377 2.53658 12.6983C2.62806 12.659 2.71079 12.6018 2.77994 12.5301L11.4699 3.84111Z",
|
|
1230
|
-
fill: "currentColor"
|
|
1231
|
-
}
|
|
1232
|
-
),
|
|
1233
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1234
|
-
"path",
|
|
1235
|
-
{
|
|
1236
|
-
d: "M12 5.43213L20.159 13.5911C20.189 13.6211 20.219 13.6491 20.25 13.6771V19.8751C20.25 20.9101 19.41 21.7501 18.375 21.7501H15C14.8011 21.7501 14.6103 21.6711 14.4697 21.5305C14.329 21.3898 14.25 21.199 14.25 21.0001V16.5001C14.25 16.3012 14.171 16.1105 14.0303 15.9698C13.8897 15.8291 13.6989 15.7501 13.5 15.7501H10.5C10.3011 15.7501 10.1103 15.8291 9.96967 15.9698C9.82902 16.1105 9.75 16.3012 9.75 16.5001V21.0001C9.75 21.199 9.67098 21.3898 9.53033 21.5305C9.38968 21.6711 9.19891 21.7501 9 21.7501H5.625C5.12772 21.7501 4.65081 21.5526 4.29917 21.201C3.94754 20.8493 3.75 20.3724 3.75 19.8751V13.6771C3.78111 13.6493 3.81146 13.6206 3.841 13.5911L12 5.43213Z",
|
|
1237
|
-
fill: "currentColor"
|
|
1238
|
-
}
|
|
1239
|
-
)
|
|
1240
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1241
|
-
"path",
|
|
1242
|
-
{
|
|
1243
|
-
d: "M2.25 12.0001L11.204 3.04507C11.644 2.60607 12.356 2.60607 12.795 3.04507L21.75 12.0001M4.5 9.75007V19.8751C4.5 20.4961 5.004 21.0001 5.625 21.0001H9.75V16.1251C9.75 15.5041 10.254 15.0001 10.875 15.0001H13.125C13.746 15.0001 14.25 15.5041 14.25 16.1251V21.0001H18.375C18.996 21.0001 19.5 20.4961 19.5 19.8751V9.75007M8.25 21.0001H16.5",
|
|
1244
|
-
stroke: "currentColor",
|
|
1245
|
-
strokeLinecap: "round",
|
|
1246
|
-
strokeLinejoin: "round"
|
|
1247
|
-
}
|
|
1248
|
-
)
|
|
1249
|
-
}
|
|
1250
|
-
);
|
|
1251
|
-
},
|
|
1252
1246
|
camera: ({ className, fill }) => {
|
|
1253
1247
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1254
1248
|
"svg",
|
|
@@ -4717,12 +4711,537 @@ var buttonStyle = tv({
|
|
|
4717
4711
|
]
|
|
4718
4712
|
});
|
|
4719
4713
|
|
|
4720
|
-
// src/components/button/button
|
|
4721
|
-
var import_react3 =
|
|
4714
|
+
// src/components/button/icon-button.tsx
|
|
4715
|
+
var import_react3 = require("react");
|
|
4722
4716
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
4723
|
-
var
|
|
4724
|
-
|
|
4725
|
-
|
|
4717
|
+
var IconButton = (0, import_react3.forwardRef)((props, ref) => {
|
|
4718
|
+
const [localProps, variantProps] = mapPropsVariants(props, iconButtonStyle.variantKeys);
|
|
4719
|
+
const { classNames, iconName, disableRipple, isDisabled, isLoading, size, onMouseDown, ...buttonProps } = {
|
|
4720
|
+
...localProps,
|
|
4721
|
+
...variantProps
|
|
4722
|
+
};
|
|
4723
|
+
const slots = (0, import_react3.useMemo)(() => iconButtonStyle({ ...variantProps }), [variantProps]);
|
|
4724
|
+
const { onPress, onClear, ripples } = useRipple();
|
|
4725
|
+
const handleRipple = (0, import_react3.useCallback)(
|
|
4726
|
+
(e) => {
|
|
4727
|
+
if (!disableRipple && !isDisabled) {
|
|
4728
|
+
onPress(e);
|
|
4729
|
+
}
|
|
4730
|
+
},
|
|
4731
|
+
[disableRipple, isDisabled, onPress]
|
|
4732
|
+
);
|
|
4733
|
+
const handleMouseDown = (0, import_react3.useCallback)(
|
|
4734
|
+
(e) => {
|
|
4735
|
+
onMouseDown == null ? void 0 : onMouseDown(e);
|
|
4736
|
+
handleRipple(e);
|
|
4737
|
+
},
|
|
4738
|
+
[onMouseDown, handleRipple]
|
|
4739
|
+
);
|
|
4740
|
+
const rippleProps = (0, import_react3.useMemo)(() => ({ ripples, onClear }), [ripples, onClear]);
|
|
4741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
4742
|
+
"button",
|
|
4743
|
+
{
|
|
4744
|
+
...buttonProps,
|
|
4745
|
+
onMouseDown: handleMouseDown,
|
|
4746
|
+
ref,
|
|
4747
|
+
disabled: isDisabled || isLoading,
|
|
4748
|
+
"data-loading": isLoading,
|
|
4749
|
+
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
4750
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon_default, { name: "loading", size, className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
4751
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon_default, { name: iconName, size }),
|
|
4752
|
+
!disableRipple && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ripple_default, { ...rippleProps })
|
|
4753
|
+
] })
|
|
4754
|
+
}
|
|
4755
|
+
);
|
|
4756
|
+
});
|
|
4757
|
+
IconButton.displayName = "IconButton";
|
|
4758
|
+
var icon_button_default = IconButton;
|
|
4759
|
+
var iconButtonStyle = tv({
|
|
4760
|
+
slots: {
|
|
4761
|
+
base: [
|
|
4762
|
+
"relative",
|
|
4763
|
+
"flex",
|
|
4764
|
+
"items-center",
|
|
4765
|
+
"justify-center",
|
|
4766
|
+
"whitespace-nowrap",
|
|
4767
|
+
"transition",
|
|
4768
|
+
"duration-200",
|
|
4769
|
+
"select-none",
|
|
4770
|
+
"overflow-hidden",
|
|
4771
|
+
"box-border"
|
|
4772
|
+
]
|
|
4773
|
+
},
|
|
4774
|
+
variants: {
|
|
4775
|
+
variant: {
|
|
4776
|
+
solid: [],
|
|
4777
|
+
soft: [],
|
|
4778
|
+
outline: [],
|
|
4779
|
+
ghost: []
|
|
4780
|
+
},
|
|
4781
|
+
color: {
|
|
4782
|
+
primary: [],
|
|
4783
|
+
secondary: [],
|
|
4784
|
+
neutral: [],
|
|
4785
|
+
info: [],
|
|
4786
|
+
success: [],
|
|
4787
|
+
warning: [],
|
|
4788
|
+
danger: []
|
|
4789
|
+
},
|
|
4790
|
+
size: {
|
|
4791
|
+
sm: {
|
|
4792
|
+
base: ["w-[24px]", "h-[24px]", "rounded-sm"]
|
|
4793
|
+
},
|
|
4794
|
+
md: {
|
|
4795
|
+
base: ["w-[32px]", "h-[32px]", "rounded-md"]
|
|
4796
|
+
},
|
|
4797
|
+
lg: {
|
|
4798
|
+
base: ["w-[40px]", "h-[40px]", "rounded-lg"]
|
|
4799
|
+
},
|
|
4800
|
+
xl: {
|
|
4801
|
+
base: ["w-[50px]", "h-[50px]", "rounded-xl"]
|
|
4802
|
+
}
|
|
4803
|
+
},
|
|
4804
|
+
isLoading: {
|
|
4805
|
+
true: {}
|
|
4806
|
+
},
|
|
4807
|
+
isDisabled: {
|
|
4808
|
+
true: {
|
|
4809
|
+
base: ["!bg-neutral-soft", "!border-neutral-soft", "!text-neutral-light", "pointer-events-none"]
|
|
4810
|
+
}
|
|
4811
|
+
},
|
|
4812
|
+
isInGroup: {
|
|
4813
|
+
true: {
|
|
4814
|
+
base: ["[&:not(:first-child):not(:last-child)]:rounded-none", "first:rounded-r-none", "last:rounded-l-none"]
|
|
4815
|
+
}
|
|
4816
|
+
}
|
|
4817
|
+
},
|
|
4818
|
+
compoundVariants: [
|
|
4819
|
+
{
|
|
4820
|
+
variant: "solid",
|
|
4821
|
+
color: "primary",
|
|
4822
|
+
class: {
|
|
4823
|
+
base: ["text-white", "bg-primary-main", "hover:bg-gradient-to-t", "hover:from-white/20", "hover:to-white/20"]
|
|
4824
|
+
}
|
|
4825
|
+
},
|
|
4826
|
+
{
|
|
4827
|
+
variant: "solid",
|
|
4828
|
+
color: "secondary",
|
|
4829
|
+
class: {
|
|
4830
|
+
base: ["text-white", "bg-secondary-main", "hover:bg-gradient-to-t", "hover:from-white/20", "hover:to-white/20"]
|
|
4831
|
+
}
|
|
4832
|
+
},
|
|
4833
|
+
{
|
|
4834
|
+
variant: "solid",
|
|
4835
|
+
color: "neutral",
|
|
4836
|
+
class: {
|
|
4837
|
+
base: ["text-white", "bg-neutral-main", "hover:bg-gradient-to-t", "hover:from-white/20", "hover:to-white/20"]
|
|
4838
|
+
}
|
|
4839
|
+
},
|
|
4840
|
+
{
|
|
4841
|
+
variant: "solid",
|
|
4842
|
+
color: "info",
|
|
4843
|
+
class: {
|
|
4844
|
+
base: ["text-white", "bg-info-main", "hover:bg-gradient-to-t", "hover:from-white/20", "hover:to-white/20"]
|
|
4845
|
+
}
|
|
4846
|
+
},
|
|
4847
|
+
{
|
|
4848
|
+
variant: "solid",
|
|
4849
|
+
color: "success",
|
|
4850
|
+
class: {
|
|
4851
|
+
base: ["text-white", "bg-success-main", "hover:bg-gradient-to-t", "hover:from-white/20", "hover:to-white/20"]
|
|
4852
|
+
}
|
|
4853
|
+
},
|
|
4854
|
+
{
|
|
4855
|
+
variant: "solid",
|
|
4856
|
+
color: "warning",
|
|
4857
|
+
class: {
|
|
4858
|
+
base: ["text-white", "bg-warning-main", "hover:bg-gradient-to-t", "hover:from-white/20", "hover:to-white/20"]
|
|
4859
|
+
}
|
|
4860
|
+
},
|
|
4861
|
+
{
|
|
4862
|
+
variant: "solid",
|
|
4863
|
+
color: "danger",
|
|
4864
|
+
class: {
|
|
4865
|
+
base: ["text-white", "bg-danger-main", "hover:bg-gradient-to-t", "hover:from-white/20", "hover:to-white/20"]
|
|
4866
|
+
}
|
|
4867
|
+
},
|
|
4868
|
+
// soft
|
|
4869
|
+
{
|
|
4870
|
+
variant: "soft",
|
|
4871
|
+
color: "primary",
|
|
4872
|
+
class: {
|
|
4873
|
+
base: ["text-primary-main", "bg-primary-soft", "!border-primary-soft", "hover:!border-primary-light"]
|
|
4874
|
+
}
|
|
4875
|
+
},
|
|
4876
|
+
{
|
|
4877
|
+
variant: "soft",
|
|
4878
|
+
color: "secondary",
|
|
4879
|
+
class: {
|
|
4880
|
+
base: ["text-secondary-main", "bg-secondary-soft", "!border-secondary-soft", "hover:!border-secondary-light"]
|
|
4881
|
+
}
|
|
4882
|
+
},
|
|
4883
|
+
{
|
|
4884
|
+
variant: "soft",
|
|
4885
|
+
color: "neutral",
|
|
4886
|
+
class: {
|
|
4887
|
+
base: ["text-neutral-main", "bg-neutral-soft", "!border-neutral-soft", "hover:!border-neutral-light"]
|
|
4888
|
+
}
|
|
4889
|
+
},
|
|
4890
|
+
{
|
|
4891
|
+
variant: "soft",
|
|
4892
|
+
color: "info",
|
|
4893
|
+
class: {
|
|
4894
|
+
base: ["text-info-main", "bg-info-soft", "!border-info-soft", "hover:!border-info-light"]
|
|
4895
|
+
}
|
|
4896
|
+
},
|
|
4897
|
+
{
|
|
4898
|
+
variant: "soft",
|
|
4899
|
+
color: "success",
|
|
4900
|
+
class: {
|
|
4901
|
+
base: ["text-success-main", "bg-success-soft", "!border-success-soft", "hover:!border-success-light"]
|
|
4902
|
+
}
|
|
4903
|
+
},
|
|
4904
|
+
{
|
|
4905
|
+
variant: "soft",
|
|
4906
|
+
color: "warning",
|
|
4907
|
+
class: {
|
|
4908
|
+
base: ["text-warning-main", "bg-warning-soft", "!border-warning-soft", "hover:!border-warning-light"]
|
|
4909
|
+
}
|
|
4910
|
+
},
|
|
4911
|
+
{
|
|
4912
|
+
variant: "soft",
|
|
4913
|
+
color: "danger",
|
|
4914
|
+
class: {
|
|
4915
|
+
base: ["text-danger-main", "bg-danger-soft", "!border-danger-soft", "hover:!border-danger-light"]
|
|
4916
|
+
}
|
|
4917
|
+
},
|
|
4918
|
+
// outline
|
|
4919
|
+
{
|
|
4920
|
+
variant: "outline",
|
|
4921
|
+
color: "primary",
|
|
4922
|
+
class: {
|
|
4923
|
+
base: ["bg-transparent", "!border-primary-main", "text-primary-main", "hover:bg-primary-soft"]
|
|
4924
|
+
}
|
|
4925
|
+
},
|
|
4926
|
+
{
|
|
4927
|
+
variant: "outline",
|
|
4928
|
+
color: "secondary",
|
|
4929
|
+
class: {
|
|
4930
|
+
base: ["bg-transparent", "!border-secondary-main", "text-secondary-main", "hover:bg-secondary-soft"]
|
|
4931
|
+
}
|
|
4932
|
+
},
|
|
4933
|
+
{
|
|
4934
|
+
variant: "outline",
|
|
4935
|
+
color: "neutral",
|
|
4936
|
+
class: {
|
|
4937
|
+
base: ["bg-transparent", "!border-neutral-main", "text-neutral-main", "hover:bg-neutral-soft"]
|
|
4938
|
+
}
|
|
4939
|
+
},
|
|
4940
|
+
{
|
|
4941
|
+
variant: "outline",
|
|
4942
|
+
color: "info",
|
|
4943
|
+
class: {
|
|
4944
|
+
base: ["bg-transparent", "!border-info-main", "text-info-main", "hover:bg-info-soft"]
|
|
4945
|
+
}
|
|
4946
|
+
},
|
|
4947
|
+
{
|
|
4948
|
+
variant: "outline",
|
|
4949
|
+
color: "success",
|
|
4950
|
+
class: {
|
|
4951
|
+
base: ["bg-transparent", "!border-success-main", "text-success-main", "hover:bg-success-soft"]
|
|
4952
|
+
}
|
|
4953
|
+
},
|
|
4954
|
+
{
|
|
4955
|
+
variant: "outline",
|
|
4956
|
+
color: "warning",
|
|
4957
|
+
class: {
|
|
4958
|
+
base: ["bg-transparent", "!border-warning-main", "text-warning-main", "hover:bg-warning-soft"]
|
|
4959
|
+
}
|
|
4960
|
+
},
|
|
4961
|
+
{
|
|
4962
|
+
variant: "outline",
|
|
4963
|
+
color: "danger",
|
|
4964
|
+
class: {
|
|
4965
|
+
base: ["bg-transparent", "!border-danger-main", "text-danger-main", "hover:bg-danger-soft"]
|
|
4966
|
+
}
|
|
4967
|
+
},
|
|
4968
|
+
// ghost
|
|
4969
|
+
{
|
|
4970
|
+
variant: "ghost",
|
|
4971
|
+
color: "primary",
|
|
4972
|
+
class: {
|
|
4973
|
+
base: ["text-primary-main", "border-transparent", "hover:bg-primary-soft"]
|
|
4974
|
+
}
|
|
4975
|
+
},
|
|
4976
|
+
{
|
|
4977
|
+
variant: "ghost",
|
|
4978
|
+
color: "secondary",
|
|
4979
|
+
class: {
|
|
4980
|
+
base: ["text-secondary-main", "border-transparent", "hover:bg-secondary-soft"]
|
|
4981
|
+
}
|
|
4982
|
+
},
|
|
4983
|
+
{
|
|
4984
|
+
variant: "ghost",
|
|
4985
|
+
color: "neutral",
|
|
4986
|
+
class: {
|
|
4987
|
+
base: ["text-neutral-main", "border-transparent", "hover:bg-neutral-soft"]
|
|
4988
|
+
}
|
|
4989
|
+
},
|
|
4990
|
+
{
|
|
4991
|
+
variant: "ghost",
|
|
4992
|
+
color: "info",
|
|
4993
|
+
class: {
|
|
4994
|
+
base: ["text-info-main", "border-transparent", "hover:bg-info-soft"]
|
|
4995
|
+
}
|
|
4996
|
+
},
|
|
4997
|
+
{
|
|
4998
|
+
variant: "ghost",
|
|
4999
|
+
color: "success",
|
|
5000
|
+
class: {
|
|
5001
|
+
base: ["text-success-main", "border-transparent", "hover:bg-success-soft"]
|
|
5002
|
+
}
|
|
5003
|
+
},
|
|
5004
|
+
{
|
|
5005
|
+
variant: "ghost",
|
|
5006
|
+
color: "warning",
|
|
5007
|
+
class: {
|
|
5008
|
+
base: ["text-warning-main", "border-transparent", "hover:bg-warning-soft"]
|
|
5009
|
+
}
|
|
5010
|
+
},
|
|
5011
|
+
{
|
|
5012
|
+
variant: "ghost",
|
|
5013
|
+
color: "danger",
|
|
5014
|
+
class: {
|
|
5015
|
+
base: ["text-danger-main", "border-transparent", "hover:bg-danger-soft"]
|
|
5016
|
+
}
|
|
5017
|
+
},
|
|
5018
|
+
// soft/outline + size
|
|
5019
|
+
{
|
|
5020
|
+
variant: ["soft", "outline"],
|
|
5021
|
+
size: "sm",
|
|
5022
|
+
class: {
|
|
5023
|
+
base: ["border-sm"]
|
|
5024
|
+
}
|
|
5025
|
+
},
|
|
5026
|
+
{
|
|
5027
|
+
variant: ["soft", "outline"],
|
|
5028
|
+
size: "md",
|
|
5029
|
+
class: {
|
|
5030
|
+
base: ["border-md"]
|
|
5031
|
+
}
|
|
5032
|
+
},
|
|
5033
|
+
{
|
|
5034
|
+
variant: ["soft", "outline"],
|
|
5035
|
+
size: "lg",
|
|
5036
|
+
class: {
|
|
5037
|
+
base: ["border-lg"]
|
|
5038
|
+
}
|
|
5039
|
+
},
|
|
5040
|
+
{
|
|
5041
|
+
variant: ["soft", "outline"],
|
|
5042
|
+
size: "xl",
|
|
5043
|
+
class: {
|
|
5044
|
+
base: ["border-xl"]
|
|
5045
|
+
}
|
|
5046
|
+
},
|
|
5047
|
+
// isDisabled + variant
|
|
5048
|
+
{
|
|
5049
|
+
variant: ["soft", "ghost"],
|
|
5050
|
+
isDisabled: true,
|
|
5051
|
+
class: {
|
|
5052
|
+
base: ["!border-neutral-soft"]
|
|
5053
|
+
}
|
|
5054
|
+
},
|
|
5055
|
+
{
|
|
5056
|
+
variant: ["outline"],
|
|
5057
|
+
isDisabled: true,
|
|
5058
|
+
class: {
|
|
5059
|
+
base: ["!border-neutral-light"]
|
|
5060
|
+
}
|
|
5061
|
+
}
|
|
5062
|
+
],
|
|
5063
|
+
defaultVariants: {
|
|
5064
|
+
size: "md",
|
|
5065
|
+
variant: "solid",
|
|
5066
|
+
color: "primary",
|
|
5067
|
+
fullWidth: false,
|
|
5068
|
+
isDisabled: false,
|
|
5069
|
+
isLoading: false,
|
|
5070
|
+
isInGroup: false
|
|
5071
|
+
}
|
|
5072
|
+
});
|
|
5073
|
+
|
|
5074
|
+
// src/components/button/text-button.tsx
|
|
5075
|
+
var import_react4 = require("react");
|
|
5076
|
+
|
|
5077
|
+
// src/utils/clsx.ts
|
|
5078
|
+
function clsx(...args) {
|
|
5079
|
+
var i = 0, tmp, x, str = "";
|
|
5080
|
+
while (i < args.length) {
|
|
5081
|
+
if (tmp = args[i++]) {
|
|
5082
|
+
if (x = toVal(tmp)) {
|
|
5083
|
+
str && (str += " ");
|
|
5084
|
+
str += x;
|
|
5085
|
+
}
|
|
5086
|
+
}
|
|
5087
|
+
}
|
|
5088
|
+
return str;
|
|
5089
|
+
}
|
|
5090
|
+
function toVal(mix) {
|
|
5091
|
+
var k, y, str = "";
|
|
5092
|
+
if (typeof mix === "string" || typeof mix === "number") {
|
|
5093
|
+
str += mix;
|
|
5094
|
+
} else if (typeof mix === "object") {
|
|
5095
|
+
if (Array.isArray(mix)) {
|
|
5096
|
+
var len = mix.length;
|
|
5097
|
+
for (k = 0; k < len; k++) {
|
|
5098
|
+
if (mix[k]) {
|
|
5099
|
+
if (y = toVal(mix[k])) {
|
|
5100
|
+
str && (str += " ");
|
|
5101
|
+
str += y;
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5104
|
+
}
|
|
5105
|
+
} else {
|
|
5106
|
+
for (y in mix) {
|
|
5107
|
+
if (mix[y]) {
|
|
5108
|
+
str && (str += " ");
|
|
5109
|
+
str += y;
|
|
5110
|
+
}
|
|
5111
|
+
}
|
|
5112
|
+
}
|
|
5113
|
+
}
|
|
5114
|
+
return str;
|
|
5115
|
+
}
|
|
5116
|
+
|
|
5117
|
+
// src/components/button/text-button.tsx
|
|
5118
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
5119
|
+
var TextButton = (0, import_react4.forwardRef)((originalProps, ref) => {
|
|
5120
|
+
const [props, variantProps] = mapPropsVariants(originalProps, textButtonStyle.variantKeys);
|
|
5121
|
+
const { children, startContent, endContent, classNames, variant, isDisabled, size, ...buttonProps } = {
|
|
5122
|
+
...props,
|
|
5123
|
+
...variantProps
|
|
5124
|
+
};
|
|
5125
|
+
const slots = (0, import_react4.useMemo)(() => textButtonStyle({ ...variantProps }), [variantProps]);
|
|
5126
|
+
const getContentProps = (0, import_react4.useCallback)(() => {
|
|
5127
|
+
const className = slots.content({ class: classNames == null ? void 0 : classNames.content });
|
|
5128
|
+
return { className, size };
|
|
5129
|
+
}, [slots, classNames, size]);
|
|
5130
|
+
const renderContent = (content) => {
|
|
5131
|
+
const contentProps = getContentProps();
|
|
5132
|
+
if ((0, import_react4.isValidElement)(content)) {
|
|
5133
|
+
const _content = content;
|
|
5134
|
+
const contentProps2 = getContentProps();
|
|
5135
|
+
const mergedProps = {
|
|
5136
|
+
...contentProps2,
|
|
5137
|
+
...typeof _content.props.className === "string" && {
|
|
5138
|
+
className: clsx(contentProps2.className, _content.props.className)
|
|
5139
|
+
}
|
|
5140
|
+
};
|
|
5141
|
+
return (0, import_react4.cloneElement)(_content, mergedProps);
|
|
5142
|
+
}
|
|
5143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ...contentProps, children: content });
|
|
5144
|
+
};
|
|
5145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
5146
|
+
"button",
|
|
5147
|
+
{
|
|
5148
|
+
...buttonProps,
|
|
5149
|
+
ref,
|
|
5150
|
+
disabled: isDisabled,
|
|
5151
|
+
className: clsx(
|
|
5152
|
+
slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
5153
|
+
variant === "underline" && slots.underline({ class: classNames == null ? void 0 : classNames.underline })
|
|
5154
|
+
),
|
|
5155
|
+
children: [
|
|
5156
|
+
startContent && renderContent(startContent),
|
|
5157
|
+
children,
|
|
5158
|
+
endContent && renderContent(endContent)
|
|
5159
|
+
]
|
|
5160
|
+
}
|
|
5161
|
+
);
|
|
5162
|
+
});
|
|
5163
|
+
TextButton.displayName = "TextButton";
|
|
5164
|
+
var text_button_default = TextButton;
|
|
5165
|
+
var textButtonStyle = tv({
|
|
5166
|
+
slots: {
|
|
5167
|
+
base: ["flex", "items-center", "justify-center", "whitespace-nowrap", "overflow-hidden"],
|
|
5168
|
+
content: [],
|
|
5169
|
+
underline: ["underline", "decoration-skip-ink", "underline-offset-[1px]"]
|
|
5170
|
+
},
|
|
5171
|
+
variants: {
|
|
5172
|
+
variant: {
|
|
5173
|
+
"non-under": [],
|
|
5174
|
+
underline: []
|
|
5175
|
+
},
|
|
5176
|
+
color: {
|
|
5177
|
+
primary: [],
|
|
5178
|
+
secondary: [],
|
|
5179
|
+
neutral: []
|
|
5180
|
+
},
|
|
5181
|
+
size: {
|
|
5182
|
+
sm: {
|
|
5183
|
+
base: ["text-sm"],
|
|
5184
|
+
underline: ["decoration-[1px]"]
|
|
5185
|
+
},
|
|
5186
|
+
md: {
|
|
5187
|
+
base: ["text-md"],
|
|
5188
|
+
underline: ["decoration-[1.25px]"]
|
|
5189
|
+
},
|
|
5190
|
+
lg: {
|
|
5191
|
+
base: ["text-lg"],
|
|
5192
|
+
underline: ["decoration-[1.5px]"]
|
|
5193
|
+
},
|
|
5194
|
+
xl: {
|
|
5195
|
+
base: ["text-xl"],
|
|
5196
|
+
underline: ["decoration-[1.75px]"]
|
|
5197
|
+
}
|
|
5198
|
+
},
|
|
5199
|
+
isDisabled: {
|
|
5200
|
+
true: {
|
|
5201
|
+
base: ["!text-neutral-light", "pointer-events-none"]
|
|
5202
|
+
}
|
|
5203
|
+
},
|
|
5204
|
+
isInGroup: {
|
|
5205
|
+
true: {
|
|
5206
|
+
base: ["[&:not(:first-child):not(:last-child)]:rounded-none", "first:rounded-r-none", "last:rounded-l-none"]
|
|
5207
|
+
}
|
|
5208
|
+
}
|
|
5209
|
+
},
|
|
5210
|
+
compoundVariants: [
|
|
5211
|
+
{
|
|
5212
|
+
color: "primary",
|
|
5213
|
+
class: {
|
|
5214
|
+
base: ["text-primary-main", "hover:text-primary-dark", "active:text-primary-strong"]
|
|
5215
|
+
}
|
|
5216
|
+
},
|
|
5217
|
+
{
|
|
5218
|
+
color: "secondary",
|
|
5219
|
+
class: {
|
|
5220
|
+
base: ["text-secondary-main", "hover:text-secondary-dark", "active:text-secondary-strong"]
|
|
5221
|
+
}
|
|
5222
|
+
},
|
|
5223
|
+
{
|
|
5224
|
+
color: "neutral",
|
|
5225
|
+
class: {
|
|
5226
|
+
base: ["text-neutral-main", "hover:text-neutral-dark", "active:text-neutral-strong"]
|
|
5227
|
+
}
|
|
5228
|
+
}
|
|
5229
|
+
],
|
|
5230
|
+
defaultVariants: {
|
|
5231
|
+
size: "md",
|
|
5232
|
+
color: "primary",
|
|
5233
|
+
variant: "non-under",
|
|
5234
|
+
isDisabled: false,
|
|
5235
|
+
isInGroup: false
|
|
5236
|
+
}
|
|
5237
|
+
});
|
|
5238
|
+
|
|
5239
|
+
// src/components/button/button-group.tsx
|
|
5240
|
+
var import_react5 = __toESM(require("react"));
|
|
5241
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
5242
|
+
var ButtonGroup = (0, import_react5.forwardRef)(({ children, ...props }, ref) => {
|
|
5243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: buttonGroup(), children: import_react5.default.Children.map(children, (child) => {
|
|
5244
|
+
return import_react5.default.cloneElement(child, {
|
|
4726
5245
|
...props,
|
|
4727
5246
|
...child.props,
|
|
4728
5247
|
disabled: props.isDisabled,
|
|
@@ -4733,10 +5252,12 @@ var ButtonGroup = (0, import_react3.forwardRef)(({ children, ...props }, ref) =>
|
|
|
4733
5252
|
ButtonGroup.displayName = "ButtonGroup";
|
|
4734
5253
|
var button_group_default = ButtonGroup;
|
|
4735
5254
|
var buttonGroup = tv({
|
|
4736
|
-
base: "flex"
|
|
5255
|
+
base: ["flex", "gap-[20px]"]
|
|
4737
5256
|
});
|
|
4738
5257
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4739
5258
|
0 && (module.exports = {
|
|
4740
5259
|
Button,
|
|
4741
|
-
ButtonGroup
|
|
5260
|
+
ButtonGroup,
|
|
5261
|
+
IconButton,
|
|
5262
|
+
TextButton
|
|
4742
5263
|
});
|