@nexus-cross/design-system 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.
- package/cursor-rules/nexus-project-setup.mdc +292 -0
- package/cursor-rules/nexus-ui-api.mdc +698 -0
- package/cursor-rules/nexus-ui-components.mdc +136 -0
- package/dist/accordion.d.mts +28 -0
- package/dist/accordion.d.ts +28 -0
- package/dist/accordion.js +28 -0
- package/dist/accordion.mjs +3 -0
- package/dist/avatar.d.mts +17 -0
- package/dist/avatar.d.ts +17 -0
- package/dist/avatar.js +16 -0
- package/dist/avatar.mjs +3 -0
- package/dist/button.d.mts +17 -0
- package/dist/button.d.ts +17 -0
- package/dist/button.js +16 -0
- package/dist/button.mjs +3 -0
- package/dist/carousel.d.mts +36 -0
- package/dist/carousel.d.ts +36 -0
- package/dist/carousel.js +32 -0
- package/dist/carousel.mjs +3 -0
- package/dist/checkbox.d.mts +21 -0
- package/dist/checkbox.d.ts +21 -0
- package/dist/checkbox.js +20 -0
- package/dist/checkbox.mjs +3 -0
- package/dist/chip.d.mts +16 -0
- package/dist/chip.d.ts +16 -0
- package/dist/chip.js +16 -0
- package/dist/chip.mjs +3 -0
- package/dist/chunks/chunk-22ULI3BF.js +21 -0
- package/dist/chunks/chunk-26BUGBOY.mjs +57 -0
- package/dist/chunks/chunk-2JTPRBHZ.mjs +36 -0
- package/dist/chunks/chunk-2MC7XJSE.js +98 -0
- package/dist/chunks/chunk-2RPRCWKV.mjs +139 -0
- package/dist/chunks/chunk-2ZXDXO4I.js +166 -0
- package/dist/chunks/chunk-33UFQJIO.mjs +135 -0
- package/dist/chunks/chunk-3HHJORN7.mjs +137 -0
- package/dist/chunks/chunk-3PCNRCTB.js +61 -0
- package/dist/chunks/chunk-3VFBPFZF.mjs +640 -0
- package/dist/chunks/chunk-4J3GCZ7W.mjs +102 -0
- package/dist/chunks/chunk-54IA2P2Z.mjs +40 -0
- package/dist/chunks/chunk-54RBL7J4.mjs +179 -0
- package/dist/chunks/chunk-5JHJNN2K.js +83 -0
- package/dist/chunks/chunk-5JHN4FCY.mjs +58 -0
- package/dist/chunks/chunk-6FMDO6TT.mjs +114 -0
- package/dist/chunks/chunk-6H7V2I3X.mjs +270 -0
- package/dist/chunks/chunk-7AISZYWL.js +7 -0
- package/dist/chunks/chunk-7G65JBTN.js +133 -0
- package/dist/chunks/chunk-ADO7PDLY.mjs +66 -0
- package/dist/chunks/chunk-AFSEYJZT.js +267 -0
- package/dist/chunks/chunk-AOXXE5UQ.mjs +14 -0
- package/dist/chunks/chunk-AZ2URLDD.js +39 -0
- package/dist/chunks/chunk-B6G5TJRO.js +116 -0
- package/dist/chunks/chunk-BLGQHR3M.js +56 -0
- package/dist/chunks/chunk-BPUQ2CO2.mjs +48 -0
- package/dist/chunks/chunk-BSZ2LN6E.js +129 -0
- package/dist/chunks/chunk-CA3SOLI3.mjs +78 -0
- package/dist/chunks/chunk-CSJDDREF.js +90 -0
- package/dist/chunks/chunk-CVYXRSXT.mjs +8 -0
- package/dist/chunks/chunk-CZC76ZD5.js +10 -0
- package/dist/chunks/chunk-D6FII7HW.js +202 -0
- package/dist/chunks/chunk-DLFV7ZZV.js +112 -0
- package/dist/chunks/chunk-DO6VK2QQ.mjs +108 -0
- package/dist/chunks/chunk-ECVAVQUY.mjs +243 -0
- package/dist/chunks/chunk-EHAUUUWB.mjs +120 -0
- package/dist/chunks/chunk-EVOOTSY5.js +59 -0
- package/dist/chunks/chunk-GX6GSWX3.mjs +38 -0
- package/dist/chunks/chunk-HHXDOKXY.js +108 -0
- package/dist/chunks/chunk-HNLI646G.mjs +325 -0
- package/dist/chunks/chunk-HUPAHDJ7.js +273 -0
- package/dist/chunks/chunk-I252NERB.mjs +21 -0
- package/dist/chunks/chunk-IE4DGLMH.js +75 -0
- package/dist/chunks/chunk-INP2AH3B.js +27 -0
- package/dist/chunks/chunk-IOSIQLZL.js +70 -0
- package/dist/chunks/chunk-J5ZKGPBY.js +132 -0
- package/dist/chunks/chunk-JNMCYWGY.js +10 -0
- package/dist/chunks/chunk-LI7SFBUQ.mjs +89 -0
- package/dist/chunks/chunk-LMMON5AU.mjs +81 -0
- package/dist/chunks/chunk-LOQXCHKL.js +74 -0
- package/dist/chunks/chunk-MA2VCCIY.js +71 -0
- package/dist/chunks/chunk-MCKOWMLS.mjs +8 -0
- package/dist/chunks/chunk-MRRKW5QN.mjs +108 -0
- package/dist/chunks/chunk-MTX7GD3H.js +80 -0
- package/dist/chunks/chunk-NFIPQZ4O.js +100 -0
- package/dist/chunks/chunk-NHDGKOAM.js +104 -0
- package/dist/chunks/chunk-OMN5YQCE.js +143 -0
- package/dist/chunks/chunk-OTGS6BDQ.mjs +25 -0
- package/dist/chunks/chunk-P2T72N62.mjs +34 -0
- package/dist/chunks/chunk-P3DZKXG4.js +116 -0
- package/dist/chunks/chunk-QK6NCII4.js +36 -0
- package/dist/chunks/chunk-QZ4QR3XV.mjs +142 -0
- package/dist/chunks/chunk-RS3SBY3I.js +163 -0
- package/dist/chunks/chunk-RX5UKRYK.mjs +76 -0
- package/dist/chunks/chunk-SGNRVYYQ.mjs +99 -0
- package/dist/chunks/chunk-SJMCPSVH.mjs +76 -0
- package/dist/chunks/chunk-T2IY2TSR.js +43 -0
- package/dist/chunks/chunk-U53UA76K.js +653 -0
- package/dist/chunks/chunk-U56AGSLE.mjs +106 -0
- package/dist/chunks/chunk-ULGYTBCT.mjs +47 -0
- package/dist/chunks/chunk-V5OTJP6H.mjs +5 -0
- package/dist/chunks/chunk-VGO4Z2WH.js +336 -0
- package/dist/chunks/chunk-VIGRCJAE.mjs +37 -0
- package/dist/chunks/chunk-VVXQZ4XH.mjs +93 -0
- package/dist/chunks/chunk-W4GG5A7K.mjs +51 -0
- package/dist/chunks/chunk-WKCXACMZ.js +99 -0
- package/dist/chunks/chunk-WR55D4ZS.js +80 -0
- package/dist/chunks/chunk-X2SHTVZQ.js +89 -0
- package/dist/chunks/chunk-XEHFB62A.js +82 -0
- package/dist/chunks/chunk-XG6QG65W.mjs +63 -0
- package/dist/chunks/chunk-YB5ZKHVB.js +64 -0
- package/dist/chunks/chunk-YCG4FZC3.js +167 -0
- package/dist/chunks/chunk-YEWKPWK3.mjs +80 -0
- package/dist/chunks/chunk-YLO4UKSC.mjs +48 -0
- package/dist/chunks/chunk-YZV6FWE7.js +160 -0
- package/dist/chunks/chunk-ZWSIIGA3.mjs +58 -0
- package/dist/client-only.d.mts +13 -0
- package/dist/client-only.d.ts +13 -0
- package/dist/client-only.js +11 -0
- package/dist/client-only.mjs +2 -0
- package/dist/countdown.d.mts +27 -0
- package/dist/countdown.d.ts +27 -0
- package/dist/countdown.js +16 -0
- package/dist/countdown.mjs +3 -0
- package/dist/counter.d.mts +15 -0
- package/dist/counter.d.ts +15 -0
- package/dist/counter.js +11 -0
- package/dist/counter.mjs +2 -0
- package/dist/data-list.d.mts +33 -0
- package/dist/data-list.d.ts +33 -0
- package/dist/data-list.js +14 -0
- package/dist/data-list.mjs +5 -0
- package/dist/divider.d.mts +14 -0
- package/dist/divider.d.ts +14 -0
- package/dist/divider.js +16 -0
- package/dist/divider.mjs +3 -0
- package/dist/drawer.d.mts +42 -0
- package/dist/drawer.d.ts +42 -0
- package/dist/drawer.js +44 -0
- package/dist/drawer.mjs +3 -0
- package/dist/ellipsis.d.mts +16 -0
- package/dist/ellipsis.d.ts +16 -0
- package/dist/ellipsis.js +12 -0
- package/dist/ellipsis.mjs +3 -0
- package/dist/error-boundary.d.mts +20 -0
- package/dist/error-boundary.d.ts +20 -0
- package/dist/error-boundary.js +11 -0
- package/dist/error-boundary.mjs +2 -0
- package/dist/hooks/useCheckDevice.d.mts +47 -0
- package/dist/hooks/useCheckDevice.d.ts +47 -0
- package/dist/hooks/useCheckDevice.js +8 -0
- package/dist/hooks/useCheckDevice.mjs +2 -0
- package/dist/hooks/useClickOutside.d.mts +12 -0
- package/dist/hooks/useClickOutside.d.ts +12 -0
- package/dist/hooks/useClickOutside.js +8 -0
- package/dist/hooks/useClickOutside.mjs +2 -0
- package/dist/hooks/useDraggableBottomSheet.d.mts +24 -0
- package/dist/hooks/useDraggableBottomSheet.d.ts +24 -0
- package/dist/hooks/useDraggableBottomSheet.js +11 -0
- package/dist/hooks/useDraggableBottomSheet.mjs +2 -0
- package/dist/hooks/useDraggableWindow.d.mts +21 -0
- package/dist/hooks/useDraggableWindow.d.ts +21 -0
- package/dist/hooks/useDraggableWindow.js +11 -0
- package/dist/hooks/useDraggableWindow.mjs +2 -0
- package/dist/hooks/useInView.d.mts +14 -0
- package/dist/hooks/useInView.d.ts +14 -0
- package/dist/hooks/useInView.js +17 -0
- package/dist/hooks/useInView.mjs +2 -0
- package/dist/hooks/useModal.d.mts +2 -0
- package/dist/hooks/useModal.d.ts +2 -0
- package/dist/hooks/useModal.js +11 -0
- package/dist/hooks/useModal.mjs +2 -0
- package/dist/index.d.mts +76 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.js +746 -0
- package/dist/index.mjs +328 -0
- package/dist/infinite-scroll.d.mts +26 -0
- package/dist/infinite-scroll.d.ts +26 -0
- package/dist/infinite-scroll.js +12 -0
- package/dist/infinite-scroll.mjs +3 -0
- package/dist/marquee.d.mts +12 -0
- package/dist/marquee.d.ts +12 -0
- package/dist/marquee.js +12 -0
- package/dist/marquee.mjs +3 -0
- package/dist/modal/index.d.mts +87 -0
- package/dist/modal/index.d.ts +87 -0
- package/dist/modal/index.js +54 -0
- package/dist/modal/index.mjs +9 -0
- package/dist/number-input.d.mts +38 -0
- package/dist/number-input.d.ts +38 -0
- package/dist/number-input.js +20 -0
- package/dist/number-input.mjs +3 -0
- package/dist/pagination.d.mts +22 -0
- package/dist/pagination.d.ts +22 -0
- package/dist/pagination.js +20 -0
- package/dist/pagination.mjs +3 -0
- package/dist/popover.d.mts +25 -0
- package/dist/popover.d.ts +25 -0
- package/dist/popover.js +32 -0
- package/dist/popover.mjs +3 -0
- package/dist/radio-group.d.mts +29 -0
- package/dist/radio-group.d.ts +29 -0
- package/dist/radio-group.js +24 -0
- package/dist/radio-group.mjs +3 -0
- package/dist/schemas/_all.json +2250 -0
- package/dist/schemas/accordion.json +101 -0
- package/dist/schemas/avatar.json +55 -0
- package/dist/schemas/button.json +71 -0
- package/dist/schemas/carousel.json +32 -0
- package/dist/schemas/carouselButton.json +20 -0
- package/dist/schemas/carouselDots.json +17 -0
- package/dist/schemas/carouselSlide.json +20 -0
- package/dist/schemas/checkBox.json +57 -0
- package/dist/schemas/chip.json +49 -0
- package/dist/schemas/clientOnly.json +19 -0
- package/dist/schemas/countdown.json +58 -0
- package/dist/schemas/counter.json +57 -0
- package/dist/schemas/dataList.json +56 -0
- package/dist/schemas/divider.json +40 -0
- package/dist/schemas/drawer.json +27 -0
- package/dist/schemas/drawerContent.json +50 -0
- package/dist/schemas/ellipsis.json +49 -0
- package/dist/schemas/errorBoundary.json +22 -0
- package/dist/schemas/infiniteScroll.json +65 -0
- package/dist/schemas/marquee.json +46 -0
- package/dist/schemas/modalCall.json +21 -0
- package/dist/schemas/modalTemplate.json +123 -0
- package/dist/schemas/numberInput.json +77 -0
- package/dist/schemas/pagination.json +50 -0
- package/dist/schemas/popover.json +67 -0
- package/dist/schemas/radioGroup.json +61 -0
- package/dist/schemas/radioItem.json +35 -0
- package/dist/schemas/select.json +62 -0
- package/dist/schemas/selectItem.json +31 -0
- package/dist/schemas/skeleton.json +48 -0
- package/dist/schemas/spinner.json +27 -0
- package/dist/schemas/switch.json +41 -0
- package/dist/schemas/tab.json +89 -0
- package/dist/schemas/table.json +75 -0
- package/dist/schemas/tableRow.json +32 -0
- package/dist/schemas/tdColumn.json +107 -0
- package/dist/schemas/textArea.json +44 -0
- package/dist/schemas/textInput.json +67 -0
- package/dist/schemas/themeProvider.json +65 -0
- package/dist/schemas/toaster.json +31 -0
- package/dist/schemas/tooltip.json +67 -0
- package/dist/schemas/virtualGrid.json +59 -0
- package/dist/schemas/virtualList.json +54 -0
- package/dist/schemas.d.mts +1263 -0
- package/dist/schemas.d.ts +1263 -0
- package/dist/schemas.js +513 -0
- package/dist/schemas.mjs +469 -0
- package/dist/select.d.mts +31 -0
- package/dist/select.d.ts +31 -0
- package/dist/select.js +24 -0
- package/dist/select.mjs +3 -0
- package/dist/skeleton.d.mts +15 -0
- package/dist/skeleton.d.ts +15 -0
- package/dist/skeleton.js +12 -0
- package/dist/skeleton.mjs +3 -0
- package/dist/spinner.d.mts +9 -0
- package/dist/spinner.d.ts +9 -0
- package/dist/spinner.js +12 -0
- package/dist/spinner.mjs +3 -0
- package/dist/styles/layer.d.mts +3 -0
- package/dist/styles/layer.d.ts +3 -0
- package/dist/styles/layer.js +18 -0
- package/dist/styles/layer.mjs +16 -0
- package/dist/styles.css +2401 -0
- package/dist/styles.d.mts +3 -0
- package/dist/styles.d.ts +3 -0
- package/dist/styles.js +16 -0
- package/dist/styles.layered.css +2404 -0
- package/dist/styles.mjs +14 -0
- package/dist/switch.d.mts +15 -0
- package/dist/switch.d.ts +15 -0
- package/dist/switch.js +16 -0
- package/dist/switch.mjs +3 -0
- package/dist/tab.d.mts +36 -0
- package/dist/tab.d.ts +36 -0
- package/dist/tab.js +20 -0
- package/dist/tab.mjs +3 -0
- package/dist/table.d.mts +80 -0
- package/dist/table.d.ts +80 -0
- package/dist/table.js +33 -0
- package/dist/table.mjs +4 -0
- package/dist/text-area.d.mts +15 -0
- package/dist/text-area.d.ts +15 -0
- package/dist/text-area.js +16 -0
- package/dist/text-area.mjs +3 -0
- package/dist/text-input.d.mts +21 -0
- package/dist/text-input.d.ts +21 -0
- package/dist/text-input.js +16 -0
- package/dist/text-input.mjs +3 -0
- package/dist/theme-provider.d.mts +25 -0
- package/dist/theme-provider.d.ts +25 -0
- package/dist/theme-provider.js +15 -0
- package/dist/theme-provider.mjs +2 -0
- package/dist/toast.d.mts +42 -0
- package/dist/toast.d.ts +42 -0
- package/dist/toast.js +20 -0
- package/dist/toast.mjs +3 -0
- package/dist/tooltip.d.mts +24 -0
- package/dist/tooltip.d.ts +24 -0
- package/dist/tooltip.js +20 -0
- package/dist/tooltip.mjs +3 -0
- package/dist/useModal-BsGIcP8t.d.mts +128 -0
- package/dist/useModal-BsGIcP8t.d.ts +128 -0
- package/dist/utils/cn.d.mts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +11 -0
- package/dist/utils/cn.mjs +2 -0
- package/dist/utils/scroll.d.mts +4 -0
- package/dist/utils/scroll.d.ts +4 -0
- package/dist/utils/scroll.js +15 -0
- package/dist/utils/scroll.mjs +2 -0
- package/dist/virtual-scroll.d.mts +34 -0
- package/dist/virtual-scroll.d.ts +34 -0
- package/dist/virtual-scroll.js +16 -0
- package/dist/virtual-scroll.mjs +3 -0
- package/package.json +291 -0
- package/scripts/setup-cursor-rules.cjs +92 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkEVOOTSY5_js = require('./chunk-EVOOTSY5.js');
|
|
4
|
+
var chunkIOSIQLZL_js = require('./chunk-IOSIQLZL.js');
|
|
5
|
+
var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
+
|
|
29
|
+
function DataList({
|
|
30
|
+
list,
|
|
31
|
+
loadingElement,
|
|
32
|
+
skeletonElement,
|
|
33
|
+
skeletonCount = 3,
|
|
34
|
+
noDataMessage,
|
|
35
|
+
loading = false,
|
|
36
|
+
errorFallback,
|
|
37
|
+
children,
|
|
38
|
+
className
|
|
39
|
+
}) {
|
|
40
|
+
const content = React__namespace.useMemo(() => {
|
|
41
|
+
if (!list || loading) {
|
|
42
|
+
if (skeletonElement) {
|
|
43
|
+
return Array.from({ length: skeletonCount }).map(
|
|
44
|
+
(_, index) => React__namespace.cloneElement(skeletonElement, {
|
|
45
|
+
...skeletonElement.props,
|
|
46
|
+
key: index
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
return loadingElement ?? /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkCZC76ZD5_js.cn("nexus-datalist-center"), children: /* @__PURE__ */ jsxRuntime.jsx(chunkIOSIQLZL_js.Spinner, { size: 32 }) });
|
|
51
|
+
}
|
|
52
|
+
if (list.length === 0) {
|
|
53
|
+
if (React__namespace.isValidElement(noDataMessage)) {
|
|
54
|
+
return noDataMessage;
|
|
55
|
+
}
|
|
56
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
57
|
+
"p",
|
|
58
|
+
{
|
|
59
|
+
className: chunkCZC76ZD5_js.cn("nexus-datalist-empty"),
|
|
60
|
+
children: noDataMessage ?? "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
return list.map(
|
|
65
|
+
(item, index) => children({ item, index })
|
|
66
|
+
);
|
|
67
|
+
}, [
|
|
68
|
+
list,
|
|
69
|
+
loading,
|
|
70
|
+
skeletonElement,
|
|
71
|
+
skeletonCount,
|
|
72
|
+
loadingElement,
|
|
73
|
+
noDataMessage,
|
|
74
|
+
children
|
|
75
|
+
]);
|
|
76
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkEVOOTSY5_js.ErrorBoundary, { fallback: errorFallback, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: content }) });
|
|
77
|
+
}
|
|
78
|
+
DataList.displayName = "DataList";
|
|
79
|
+
|
|
80
|
+
exports.DataList = DataList;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
|
|
6
|
+
function _interopNamespace(e) {
|
|
7
|
+
if (e && e.__esModule) return e;
|
|
8
|
+
var n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
Object.keys(e).forEach(function (k) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return e[k]; }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
25
|
+
|
|
26
|
+
// src/components/Counter.tsx
|
|
27
|
+
function easeOutCubic(t) {
|
|
28
|
+
return 1 - Math.pow(1 - t, 3);
|
|
29
|
+
}
|
|
30
|
+
function formatNumber(val, separator, digits) {
|
|
31
|
+
const fixed = digits > 0 ? val.toFixed(digits) : Math.round(val).toString();
|
|
32
|
+
if (!separator) return fixed;
|
|
33
|
+
const [intPart, decPart] = fixed.split(".");
|
|
34
|
+
const formatted = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
35
|
+
return decPart !== void 0 ? `${formatted}.${decPart}` : formatted;
|
|
36
|
+
}
|
|
37
|
+
var Counter = React__namespace.forwardRef(
|
|
38
|
+
({
|
|
39
|
+
startValue = 0,
|
|
40
|
+
endValue,
|
|
41
|
+
duration = 1500,
|
|
42
|
+
delay = 0,
|
|
43
|
+
separator = true,
|
|
44
|
+
digits = 0,
|
|
45
|
+
triggerOnView = false,
|
|
46
|
+
onEnd,
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}, ref) => {
|
|
50
|
+
const [display, setDisplay] = React__namespace.useState(formatNumber(startValue, separator, digits));
|
|
51
|
+
const [started, setStarted] = React__namespace.useState(!triggerOnView);
|
|
52
|
+
const innerRef = React__namespace.useRef(null);
|
|
53
|
+
React__namespace.useImperativeHandle(ref, () => innerRef.current);
|
|
54
|
+
React__namespace.useEffect(() => {
|
|
55
|
+
if (!triggerOnView || !innerRef.current) return;
|
|
56
|
+
const observer = new IntersectionObserver(
|
|
57
|
+
([entry]) => {
|
|
58
|
+
if (entry.isIntersecting) {
|
|
59
|
+
setStarted(true);
|
|
60
|
+
observer.disconnect();
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{ threshold: 0.1 }
|
|
64
|
+
);
|
|
65
|
+
observer.observe(innerRef.current);
|
|
66
|
+
return () => observer.disconnect();
|
|
67
|
+
}, [triggerOnView]);
|
|
68
|
+
React__namespace.useEffect(() => {
|
|
69
|
+
if (!started) return;
|
|
70
|
+
let rafId;
|
|
71
|
+
let startTime = null;
|
|
72
|
+
const delayMs = delay;
|
|
73
|
+
const timeout = setTimeout(() => {
|
|
74
|
+
const animate = (timestamp) => {
|
|
75
|
+
if (startTime === null) startTime = timestamp;
|
|
76
|
+
const elapsed = timestamp - startTime;
|
|
77
|
+
const progress = Math.min(elapsed / duration, 1);
|
|
78
|
+
const eased = easeOutCubic(progress);
|
|
79
|
+
const current = startValue + (endValue - startValue) * eased;
|
|
80
|
+
setDisplay(formatNumber(current, separator, digits));
|
|
81
|
+
if (progress < 1) {
|
|
82
|
+
rafId = requestAnimationFrame(animate);
|
|
83
|
+
} else {
|
|
84
|
+
setDisplay(formatNumber(endValue, separator, digits));
|
|
85
|
+
onEnd?.();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
rafId = requestAnimationFrame(animate);
|
|
89
|
+
}, delayMs);
|
|
90
|
+
return () => {
|
|
91
|
+
clearTimeout(timeout);
|
|
92
|
+
if (rafId) cancelAnimationFrame(rafId);
|
|
93
|
+
};
|
|
94
|
+
}, [started, startValue, endValue, duration, delay, separator, digits, onEnd]);
|
|
95
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref: innerRef, className, role: "status", "aria-live": "polite", "aria-atomic": true, ...props, children: display });
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
Counter.displayName = "Counter";
|
|
99
|
+
|
|
100
|
+
exports.Counter = Counter;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
|
|
5
|
+
// src/hooks/useDraggableWindow.ts
|
|
6
|
+
function useDraggableWindow({
|
|
7
|
+
initialPosition,
|
|
8
|
+
persistKey,
|
|
9
|
+
targetRef
|
|
10
|
+
} = {}) {
|
|
11
|
+
const [position, setPosition] = react.useState(() => {
|
|
12
|
+
if (persistKey) {
|
|
13
|
+
try {
|
|
14
|
+
const saved = localStorage.getItem(`draggable-${persistKey}`);
|
|
15
|
+
if (saved) return JSON.parse(saved);
|
|
16
|
+
} catch {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return initialPosition ?? { x: -1, y: -1 };
|
|
20
|
+
});
|
|
21
|
+
const dragRef = react.useRef({
|
|
22
|
+
isDragging: false,
|
|
23
|
+
startX: 0,
|
|
24
|
+
startY: 0,
|
|
25
|
+
startPosX: 0,
|
|
26
|
+
startPosY: 0
|
|
27
|
+
});
|
|
28
|
+
const handleMouseDown = react.useCallback(
|
|
29
|
+
(e) => {
|
|
30
|
+
if (e.target.closest("button, input, select, textarea"))
|
|
31
|
+
return;
|
|
32
|
+
e.preventDefault();
|
|
33
|
+
let startPosX = position.x;
|
|
34
|
+
let startPosY = position.y;
|
|
35
|
+
if (startPosX === -1 && startPosY === -1 && targetRef?.current) {
|
|
36
|
+
const rect = targetRef.current.getBoundingClientRect();
|
|
37
|
+
startPosX = rect.left;
|
|
38
|
+
startPosY = rect.top;
|
|
39
|
+
setPosition({ x: startPosX, y: startPosY });
|
|
40
|
+
}
|
|
41
|
+
dragRef.current = {
|
|
42
|
+
isDragging: true,
|
|
43
|
+
startX: e.clientX,
|
|
44
|
+
startY: e.clientY,
|
|
45
|
+
startPosX,
|
|
46
|
+
startPosY
|
|
47
|
+
};
|
|
48
|
+
const handleMouseMove = (ev) => {
|
|
49
|
+
if (!dragRef.current.isDragging) return;
|
|
50
|
+
const dx = ev.clientX - dragRef.current.startX;
|
|
51
|
+
const dy = ev.clientY - dragRef.current.startY;
|
|
52
|
+
const newX = Math.max(
|
|
53
|
+
0,
|
|
54
|
+
Math.min(window.innerWidth - 100, dragRef.current.startPosX + dx)
|
|
55
|
+
);
|
|
56
|
+
const newY = Math.max(
|
|
57
|
+
0,
|
|
58
|
+
Math.min(window.innerHeight - 40, dragRef.current.startPosY + dy)
|
|
59
|
+
);
|
|
60
|
+
setPosition({ x: newX, y: newY });
|
|
61
|
+
};
|
|
62
|
+
const handleMouseUp = () => {
|
|
63
|
+
dragRef.current.isDragging = false;
|
|
64
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
65
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
66
|
+
document.body.style.cursor = "";
|
|
67
|
+
document.body.style.userSelect = "";
|
|
68
|
+
if (persistKey) {
|
|
69
|
+
setPosition((pos) => {
|
|
70
|
+
try {
|
|
71
|
+
localStorage.setItem(
|
|
72
|
+
`draggable-${persistKey}`,
|
|
73
|
+
JSON.stringify(pos)
|
|
74
|
+
);
|
|
75
|
+
} catch {
|
|
76
|
+
}
|
|
77
|
+
return pos;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
document.body.style.cursor = "grabbing";
|
|
82
|
+
document.body.style.userSelect = "none";
|
|
83
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
84
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
85
|
+
},
|
|
86
|
+
[position, persistKey, targetRef]
|
|
87
|
+
);
|
|
88
|
+
const resetPosition = react.useCallback(() => {
|
|
89
|
+
const reset = initialPosition ?? { x: -1, y: -1 };
|
|
90
|
+
setPosition(reset);
|
|
91
|
+
if (persistKey) {
|
|
92
|
+
localStorage.removeItem(`draggable-${persistKey}`);
|
|
93
|
+
}
|
|
94
|
+
}, [initialPosition, persistKey]);
|
|
95
|
+
return {
|
|
96
|
+
position,
|
|
97
|
+
setPosition,
|
|
98
|
+
handleMouseDown,
|
|
99
|
+
resetPosition,
|
|
100
|
+
isDefaultPosition: position.x === -1 && position.y === -1
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
exports.useDraggableWindow = useDraggableWindow;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var reactVirtual = require('@tanstack/react-virtual');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
|
+
|
|
28
|
+
function VirtualListInner({
|
|
29
|
+
items,
|
|
30
|
+
estimateSize,
|
|
31
|
+
renderItem,
|
|
32
|
+
overscan = 5,
|
|
33
|
+
gap = 0,
|
|
34
|
+
className,
|
|
35
|
+
style,
|
|
36
|
+
onEndReached,
|
|
37
|
+
endReachedThreshold = 200
|
|
38
|
+
}, ref) {
|
|
39
|
+
const parentRef = React__namespace.useRef(null);
|
|
40
|
+
React__namespace.useImperativeHandle(ref, () => parentRef.current);
|
|
41
|
+
const estimateFn = typeof estimateSize === "function" ? estimateSize : () => estimateSize;
|
|
42
|
+
const onEndReachedRef = React__namespace.useRef(onEndReached);
|
|
43
|
+
onEndReachedRef.current = onEndReached;
|
|
44
|
+
const virtualizer = reactVirtual.useVirtualizer({
|
|
45
|
+
count: items.length,
|
|
46
|
+
getScrollElement: () => parentRef.current,
|
|
47
|
+
estimateSize: estimateFn,
|
|
48
|
+
overscan,
|
|
49
|
+
gap
|
|
50
|
+
});
|
|
51
|
+
React__namespace.useEffect(() => {
|
|
52
|
+
const el = parentRef.current;
|
|
53
|
+
if (!el || !onEndReachedRef.current) return;
|
|
54
|
+
const handleScroll = () => {
|
|
55
|
+
const { scrollTop, scrollHeight, clientHeight } = el;
|
|
56
|
+
if (scrollHeight - scrollTop - clientHeight < endReachedThreshold) {
|
|
57
|
+
onEndReachedRef.current?.();
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
el.addEventListener("scroll", handleScroll, { passive: true });
|
|
61
|
+
return () => el.removeEventListener("scroll", handleScroll);
|
|
62
|
+
}, [endReachedThreshold]);
|
|
63
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: parentRef, className: chunkCZC76ZD5_js.cn("nexus-virtual-scroll", className), style, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: virtualizer.getTotalSize(), width: "100%", position: "relative" }, children: virtualizer.getVirtualItems().map((virtualItem) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
style: {
|
|
67
|
+
position: "absolute",
|
|
68
|
+
top: 0,
|
|
69
|
+
left: 0,
|
|
70
|
+
width: "100%",
|
|
71
|
+
height: virtualItem.size,
|
|
72
|
+
transform: `translateY(${virtualItem.start}px)`
|
|
73
|
+
},
|
|
74
|
+
children: renderItem(items[virtualItem.index], virtualItem.index, virtualItem)
|
|
75
|
+
},
|
|
76
|
+
virtualItem.key
|
|
77
|
+
)) }) });
|
|
78
|
+
}
|
|
79
|
+
var VirtualList = React__namespace.forwardRef(VirtualListInner);
|
|
80
|
+
function VirtualGridInner({
|
|
81
|
+
items,
|
|
82
|
+
columns,
|
|
83
|
+
estimateSize,
|
|
84
|
+
renderItem,
|
|
85
|
+
overscan = 3,
|
|
86
|
+
gap = 0,
|
|
87
|
+
className,
|
|
88
|
+
style,
|
|
89
|
+
onEndReached,
|
|
90
|
+
endReachedThreshold = 200
|
|
91
|
+
}, ref) {
|
|
92
|
+
const parentRef = React__namespace.useRef(null);
|
|
93
|
+
React__namespace.useImperativeHandle(ref, () => parentRef.current);
|
|
94
|
+
const rowCount = Math.ceil(items.length / columns);
|
|
95
|
+
const estimateFn = typeof estimateSize === "function" ? estimateSize : () => estimateSize;
|
|
96
|
+
const onEndReachedRef = React__namespace.useRef(onEndReached);
|
|
97
|
+
onEndReachedRef.current = onEndReached;
|
|
98
|
+
const virtualizer = reactVirtual.useVirtualizer({
|
|
99
|
+
count: rowCount,
|
|
100
|
+
getScrollElement: () => parentRef.current,
|
|
101
|
+
estimateSize: estimateFn,
|
|
102
|
+
overscan,
|
|
103
|
+
gap
|
|
104
|
+
});
|
|
105
|
+
React__namespace.useEffect(() => {
|
|
106
|
+
const el = parentRef.current;
|
|
107
|
+
if (!el || !onEndReachedRef.current) return;
|
|
108
|
+
const handleScroll = () => {
|
|
109
|
+
const { scrollTop, scrollHeight, clientHeight } = el;
|
|
110
|
+
if (scrollHeight - scrollTop - clientHeight < endReachedThreshold) {
|
|
111
|
+
onEndReachedRef.current?.();
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
el.addEventListener("scroll", handleScroll, { passive: true });
|
|
115
|
+
return () => el.removeEventListener("scroll", handleScroll);
|
|
116
|
+
}, [endReachedThreshold]);
|
|
117
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: parentRef, className: chunkCZC76ZD5_js.cn("nexus-virtual-scroll", className), style, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: virtualizer.getTotalSize(), width: "100%", position: "relative" }, children: virtualizer.getVirtualItems().map((virtualRow) => {
|
|
118
|
+
const rowStart = virtualRow.index * columns;
|
|
119
|
+
const rowItems = items.slice(rowStart, rowStart + columns);
|
|
120
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
style: {
|
|
124
|
+
position: "absolute",
|
|
125
|
+
top: 0,
|
|
126
|
+
left: 0,
|
|
127
|
+
width: "100%",
|
|
128
|
+
height: virtualRow.size,
|
|
129
|
+
transform: `translateY(${virtualRow.start}px)`,
|
|
130
|
+
display: "grid",
|
|
131
|
+
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
132
|
+
gap
|
|
133
|
+
},
|
|
134
|
+
children: rowItems.map((item, colIdx) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: renderItem(item, rowStart + colIdx) }, rowStart + colIdx))
|
|
135
|
+
},
|
|
136
|
+
virtualRow.key
|
|
137
|
+
);
|
|
138
|
+
}) }) });
|
|
139
|
+
}
|
|
140
|
+
var VirtualGrid = React__namespace.forwardRef(VirtualGridInner);
|
|
141
|
+
|
|
142
|
+
exports.VirtualGrid = VirtualGrid;
|
|
143
|
+
exports.VirtualList = VirtualList;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/hooks/useClickOutside.ts
|
|
4
|
+
var useClickOutside = (ref, handler, option) => {
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const listener = (event) => {
|
|
7
|
+
const el = ref && "current" in ref ? ref.current : ref;
|
|
8
|
+
if (!el || el.contains(event.target)) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
handler(event);
|
|
12
|
+
};
|
|
13
|
+
document.addEventListener("click", listener);
|
|
14
|
+
if (!option?.offTouchEvent) {
|
|
15
|
+
document.addEventListener("touchstart", listener);
|
|
16
|
+
}
|
|
17
|
+
return () => {
|
|
18
|
+
document.removeEventListener("click", listener);
|
|
19
|
+
document.removeEventListener("touchstart", listener);
|
|
20
|
+
};
|
|
21
|
+
}, [ref, handler, option]);
|
|
22
|
+
};
|
|
23
|
+
var useClickOutside_default = useClickOutside;
|
|
24
|
+
|
|
25
|
+
export { useClickOutside_default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cn } from './chunk-MCKOWMLS.mjs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var Skeleton = React.forwardRef(
|
|
6
|
+
({
|
|
7
|
+
className,
|
|
8
|
+
children,
|
|
9
|
+
as: Tag = "div",
|
|
10
|
+
circle = false,
|
|
11
|
+
width,
|
|
12
|
+
height,
|
|
13
|
+
style,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => /* @__PURE__ */ jsx(
|
|
16
|
+
Tag,
|
|
17
|
+
{
|
|
18
|
+
ref,
|
|
19
|
+
role: "status",
|
|
20
|
+
"aria-label": "Loading",
|
|
21
|
+
className: cn(
|
|
22
|
+
"nexus-skeleton",
|
|
23
|
+
circle ? "nexus-skeleton--circle" : "nexus-skeleton--rect",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
style: { width, height, ...style },
|
|
27
|
+
...props,
|
|
28
|
+
children: children && /* @__PURE__ */ jsx("span", { className: "nexus-skeleton__children", children })
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
);
|
|
32
|
+
Skeleton.displayName = "Skeleton";
|
|
33
|
+
|
|
34
|
+
export { Skeleton };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkCZC76ZD5_js = require('./chunk-CZC76ZD5.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
6
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
+
|
|
29
|
+
var buttonVariants = classVarianceAuthority.cva("nexus-btn", {
|
|
30
|
+
variants: {
|
|
31
|
+
semantic: {
|
|
32
|
+
primary: "nexus-btn--primary",
|
|
33
|
+
secondary: "nexus-btn--secondary",
|
|
34
|
+
normal: "nexus-btn--normal",
|
|
35
|
+
danger: "nexus-btn--danger"
|
|
36
|
+
},
|
|
37
|
+
variant: {
|
|
38
|
+
contained: "nexus-btn--contained",
|
|
39
|
+
outlined: "nexus-btn--outlined",
|
|
40
|
+
subtle: "nexus-btn--subtle",
|
|
41
|
+
ghost: "nexus-btn--ghost"
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
xl: "nexus-btn--xl",
|
|
45
|
+
lg: "nexus-btn--lg",
|
|
46
|
+
md: "nexus-btn--md",
|
|
47
|
+
sm: "nexus-btn--sm"
|
|
48
|
+
},
|
|
49
|
+
radius: {
|
|
50
|
+
default: "",
|
|
51
|
+
circle: "nexus-btn--circle"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
semantic: "primary",
|
|
56
|
+
variant: "contained",
|
|
57
|
+
size: "md",
|
|
58
|
+
radius: "default"
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
var Button = React__namespace.forwardRef(
|
|
62
|
+
({
|
|
63
|
+
className,
|
|
64
|
+
semantic,
|
|
65
|
+
variant,
|
|
66
|
+
size,
|
|
67
|
+
radius,
|
|
68
|
+
asChild = false,
|
|
69
|
+
detectDoubleClick = false,
|
|
70
|
+
disabled,
|
|
71
|
+
children,
|
|
72
|
+
onClick,
|
|
73
|
+
style,
|
|
74
|
+
...props
|
|
75
|
+
}, ref) => {
|
|
76
|
+
const clickTimeoutRef = React__namespace.useRef(
|
|
77
|
+
null
|
|
78
|
+
);
|
|
79
|
+
const handleClick = React__namespace.useCallback(
|
|
80
|
+
(e) => {
|
|
81
|
+
if (detectDoubleClick && clickTimeoutRef.current) return;
|
|
82
|
+
onClick?.(e);
|
|
83
|
+
if (detectDoubleClick) {
|
|
84
|
+
clickTimeoutRef.current = setTimeout(() => {
|
|
85
|
+
clickTimeoutRef.current = null;
|
|
86
|
+
}, 500);
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
[detectDoubleClick, onClick]
|
|
90
|
+
);
|
|
91
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
92
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
93
|
+
Comp,
|
|
94
|
+
{
|
|
95
|
+
ref,
|
|
96
|
+
type: asChild ? void 0 : "button",
|
|
97
|
+
role: asChild ? "button" : void 0,
|
|
98
|
+
className: chunkCZC76ZD5_js.cn(
|
|
99
|
+
buttonVariants({ semantic, variant, size, radius }),
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
disabled: asChild ? void 0 : disabled,
|
|
103
|
+
"aria-disabled": disabled || void 0,
|
|
104
|
+
tabIndex: disabled ? -1 : void 0,
|
|
105
|
+
onClick: disabled ? void 0 : handleClick,
|
|
106
|
+
style,
|
|
107
|
+
...props,
|
|
108
|
+
children
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
Button.displayName = "Button";
|
|
114
|
+
|
|
115
|
+
exports.Button = Button;
|
|
116
|
+
exports.buttonVariants = buttonVariants;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
|
|
6
|
+
function _interopNamespace(e) {
|
|
7
|
+
if (e && e.__esModule) return e;
|
|
8
|
+
var n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
Object.keys(e).forEach(function (k) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return e[k]; }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
25
|
+
|
|
26
|
+
// src/components/ClientOnly.tsx
|
|
27
|
+
function ClientOnly({ children, fallback = null }) {
|
|
28
|
+
const [mounted, setMounted] = React__namespace.useState(false);
|
|
29
|
+
React__namespace.useEffect(() => {
|
|
30
|
+
setMounted(true);
|
|
31
|
+
}, []);
|
|
32
|
+
return mounted ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fallback });
|
|
33
|
+
}
|
|
34
|
+
ClientOnly.displayName = "ClientOnly";
|
|
35
|
+
|
|
36
|
+
exports.ClientOnly = ClientOnly;
|