@codefast/ui 0.3.10 → 0.3.11-canary.1
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/CHANGELOG.md +32 -0
- package/README.md +277 -167
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +5 -5
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +9 -9
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +5 -5
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +3 -3
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +7 -7
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +6 -8
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +8 -8
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +17 -17
- package/dist/components/calendar.d.ts +5 -5
- package/dist/components/calendar.js +35 -35
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +7 -7
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +20 -20
- package/dist/components/chart.d.ts +12 -11
- package/dist/components/chart.js +42 -42
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +2 -2
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +10 -10
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +10 -10
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +12 -12
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +9 -9
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +10 -10
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +10 -10
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +17 -17
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +8 -8
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +3 -3
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +20 -20
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +7 -7
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +4 -4
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +6 -6
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +4 -4
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +1 -1
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +23 -23
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +2 -2
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +1 -1
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +13 -13
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +2 -2
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +10 -10
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +6 -6
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +3 -3
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +22 -22
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +3 -3
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +3 -3
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +1 -1
- package/dist/components/resizable.d.ts +2 -2
- package/dist/components/resizable.js +3 -3
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +31 -31
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +9 -9
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +9 -9
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +17 -17
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +65 -65
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +4 -4
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +4 -4
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +5 -5
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +2 -2
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +8 -8
- package/dist/components/tabs.d.ts +2 -2
- package/dist/components/tabs.js +4 -4
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +1 -1
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle-group.js +5 -5
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/toggle.js +8 -8
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +2 -2
- package/dist/css/preset.css +4 -4
- package/dist/css/style.css +3 -3
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
- package/dist/hooks/use-copy-to-clipboard.js +1 -1
- package/dist/hooks/use-media-query.js +3 -3
- package/dist/hooks/use-mutation-observer.d.ts +1 -1
- package/dist/hooks/use-pagination.js +1 -1
- package/dist/index.d.ts +130 -130
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +3 -3
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +46 -46
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +7 -7
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +8 -8
- package/package.json +111 -189
- package/dist/components/accordion.cjs +0 -98
- package/dist/components/alert-dialog.cjs +0 -156
- package/dist/components/alert.cjs +0 -84
- package/dist/components/aspect-ratio.cjs +0 -44
- package/dist/components/avatar.cjs +0 -66
- package/dist/components/badge.cjs +0 -67
- package/dist/components/breadcrumb.cjs +0 -127
- package/dist/components/button-group.cjs +0 -87
- package/dist/components/button.cjs +0 -92
- package/dist/components/calendar.cjs +0 -151
- package/dist/components/card.cjs +0 -105
- package/dist/components/carousel.cjs +0 -211
- package/dist/components/chart.cjs +0 -251
- package/dist/components/checkbox-cards.cjs +0 -70
- package/dist/components/checkbox-group.cjs +0 -64
- package/dist/components/checkbox.cjs +0 -54
- package/dist/components/collapsible.cjs +0 -62
- package/dist/components/command.cjs +0 -168
- package/dist/components/context-menu.cjs +0 -219
- package/dist/components/dialog.cjs +0 -165
- package/dist/components/drawer.cjs +0 -144
- package/dist/components/dropdown-menu.cjs +0 -222
- package/dist/components/empty.cjs +0 -113
- package/dist/components/field.cjs +0 -194
- package/dist/components/form.cjs +0 -152
- package/dist/components/hover-card.cjs +0 -78
- package/dist/components/input-group.cjs +0 -156
- package/dist/components/input-number.cjs +0 -99
- package/dist/components/input-otp.cjs +0 -102
- package/dist/components/input-password.cjs +0 -72
- package/dist/components/input-search.cjs +0 -81
- package/dist/components/input.cjs +0 -46
- package/dist/components/item.cjs +0 -186
- package/dist/components/kbd.cjs +0 -54
- package/dist/components/label.cjs +0 -46
- package/dist/components/menubar.cjs +0 -233
- package/dist/components/native-select.cjs +0 -75
- package/dist/components/navigation-menu.cjs +0 -146
- package/dist/components/pagination.cjs +0 -138
- package/dist/components/popover.cjs +0 -87
- package/dist/components/progress-circle.cjs +0 -185
- package/dist/components/progress.cjs +0 -53
- package/dist/components/radio-cards.cjs +0 -67
- package/dist/components/radio-group.cjs +0 -60
- package/dist/components/radio.cjs +0 -48
- package/dist/components/resizable.cjs +0 -72
- package/dist/components/scroll-area.cjs +0 -141
- package/dist/components/select.cjs +0 -181
- package/dist/components/separator.cjs +0 -83
- package/dist/components/sheet.cjs +0 -185
- package/dist/components/sidebar.cjs +0 -507
- package/dist/components/skeleton.cjs +0 -44
- package/dist/components/slider.cjs +0 -80
- package/dist/components/sonner.cjs +0 -58
- package/dist/components/spinner.cjs +0 -76
- package/dist/components/switch.cjs +0 -50
- package/dist/components/table.cjs +0 -118
- package/dist/components/tabs.cjs +0 -76
- package/dist/components/textarea.cjs +0 -44
- package/dist/components/toggle-group.cjs +0 -91
- package/dist/components/toggle.cjs +0 -72
- package/dist/components/tooltip.cjs +0 -91
- package/dist/hooks/use-animated-value.cjs +0 -75
- package/dist/hooks/use-copy-to-clipboard.cjs +0 -58
- package/dist/hooks/use-is-mobile.cjs +0 -40
- package/dist/hooks/use-media-query.cjs +0 -57
- package/dist/hooks/use-mutation-observer.cjs +0 -57
- package/dist/hooks/use-pagination.cjs +0 -93
- package/dist/index.cjs +0 -1081
- package/dist/primitives/checkbox-group.cjs +0 -151
- package/dist/primitives/input-number.cjs +0 -439
- package/dist/primitives/input.cjs +0 -99
- package/dist/primitives/progress-circle.cjs +0 -199
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
Tooltip: ()=>Tooltip,
|
|
29
|
-
TooltipProvider: ()=>TooltipProvider,
|
|
30
|
-
TooltipTrigger: ()=>TooltipTrigger,
|
|
31
|
-
TooltipContent: ()=>TooltipContent,
|
|
32
|
-
TooltipArrow: ()=>TooltipArrow
|
|
33
|
-
});
|
|
34
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
35
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
36
|
-
const react_tooltip_namespaceObject = require("@radix-ui/react-tooltip");
|
|
37
|
-
function TooltipProvider({ ...props }) {
|
|
38
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tooltip_namespaceObject.Provider, {
|
|
39
|
-
"data-slot": "tooltip-provider",
|
|
40
|
-
...props
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function Tooltip({ ...props }) {
|
|
44
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tooltip_namespaceObject.Root, {
|
|
45
|
-
"data-slot": "tooltip",
|
|
46
|
-
...props
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function TooltipTrigger({ ...props }) {
|
|
50
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tooltip_namespaceObject.Trigger, {
|
|
51
|
-
"data-slot": "tooltip-trigger",
|
|
52
|
-
...props
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
function TooltipContent({ children, className, sideOffset = 4, ...props }) {
|
|
56
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tooltip_namespaceObject.Portal, {
|
|
57
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_tooltip_namespaceObject.Content, {
|
|
58
|
-
className: (0, tailwind_variants_namespaceObject.cn)('bg-primary text-primary-foreground data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance', 'max-w-(--radix-tooltip-content-available-width)', className),
|
|
59
|
-
collisionPadding: 8,
|
|
60
|
-
"data-slot": "tooltip-content",
|
|
61
|
-
sideOffset: sideOffset,
|
|
62
|
-
...props,
|
|
63
|
-
children: [
|
|
64
|
-
children,
|
|
65
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TooltipArrow, {})
|
|
66
|
-
]
|
|
67
|
-
})
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function TooltipArrow({ className, ...props }) {
|
|
71
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tooltip_namespaceObject.Arrow, {
|
|
72
|
-
className: (0, tailwind_variants_namespaceObject.cn)('fill-primary', className),
|
|
73
|
-
"data-slot": "tooltip-arrow",
|
|
74
|
-
...props
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
exports.Tooltip = __webpack_exports__.Tooltip;
|
|
78
|
-
exports.TooltipArrow = __webpack_exports__.TooltipArrow;
|
|
79
|
-
exports.TooltipContent = __webpack_exports__.TooltipContent;
|
|
80
|
-
exports.TooltipProvider = __webpack_exports__.TooltipProvider;
|
|
81
|
-
exports.TooltipTrigger = __webpack_exports__.TooltipTrigger;
|
|
82
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
83
|
-
"Tooltip",
|
|
84
|
-
"TooltipArrow",
|
|
85
|
-
"TooltipContent",
|
|
86
|
-
"TooltipProvider",
|
|
87
|
-
"TooltipTrigger"
|
|
88
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
89
|
-
Object.defineProperty(exports, '__esModule', {
|
|
90
|
-
value: true
|
|
91
|
-
});
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
useAnimatedValue: ()=>useAnimatedValue
|
|
29
|
-
});
|
|
30
|
-
const external_react_namespaceObject = require("react");
|
|
31
|
-
function useAnimatedValue(targetValue, duration, animate) {
|
|
32
|
-
const actualTargetValue = targetValue ?? 0;
|
|
33
|
-
const [animatedValue, setAnimatedValue] = (0, external_react_namespaceObject.useState)(actualTargetValue);
|
|
34
|
-
const animatedValueRef = (0, external_react_namespaceObject.useRef)(actualTargetValue);
|
|
35
|
-
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
36
|
-
animatedValueRef.current = animatedValue;
|
|
37
|
-
}, [
|
|
38
|
-
animatedValue
|
|
39
|
-
]);
|
|
40
|
-
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
41
|
-
if (!animate) return void setAnimatedValue(actualTargetValue);
|
|
42
|
-
const currentValue = animatedValueRef.current;
|
|
43
|
-
const valueRange = actualTargetValue - currentValue;
|
|
44
|
-
const startTime = performance.now();
|
|
45
|
-
if (duration <= 0 || 0 === valueRange) return void setAnimatedValue(actualTargetValue);
|
|
46
|
-
let animationFrame;
|
|
47
|
-
const animateValue = (currentTime)=>{
|
|
48
|
-
const elapsedTime = currentTime - startTime;
|
|
49
|
-
if (elapsedTime >= duration) setAnimatedValue(actualTargetValue);
|
|
50
|
-
else {
|
|
51
|
-
const progress = elapsedTime / duration;
|
|
52
|
-
const easeProgress = 1 - (1 - progress) * (1 - progress);
|
|
53
|
-
const nextValue = currentValue + valueRange * easeProgress;
|
|
54
|
-
setAnimatedValue(nextValue);
|
|
55
|
-
animationFrame = requestAnimationFrame(animateValue);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
animationFrame = requestAnimationFrame(animateValue);
|
|
59
|
-
return ()=>{
|
|
60
|
-
cancelAnimationFrame(animationFrame);
|
|
61
|
-
};
|
|
62
|
-
}, [
|
|
63
|
-
actualTargetValue,
|
|
64
|
-
duration,
|
|
65
|
-
animate
|
|
66
|
-
]);
|
|
67
|
-
return Math.round(animatedValue);
|
|
68
|
-
}
|
|
69
|
-
exports.useAnimatedValue = __webpack_exports__.useAnimatedValue;
|
|
70
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
71
|
-
"useAnimatedValue"
|
|
72
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
73
|
-
Object.defineProperty(exports, '__esModule', {
|
|
74
|
-
value: true
|
|
75
|
-
});
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
useCopyToClipboard: ()=>useCopyToClipboard
|
|
29
|
-
});
|
|
30
|
-
const external_react_namespaceObject = require("react");
|
|
31
|
-
function useCopyToClipboard({ onCopy, timeout = 2000 } = {}) {
|
|
32
|
-
const [isCopied, setIsCopied] = (0, external_react_namespaceObject.useState)(false);
|
|
33
|
-
const copyToClipboard = async (value)=>{
|
|
34
|
-
if ("u" < typeof window || !('clipboard' in navigator)) return;
|
|
35
|
-
if (!value) return;
|
|
36
|
-
try {
|
|
37
|
-
await navigator.clipboard.writeText(value);
|
|
38
|
-
setIsCopied(true);
|
|
39
|
-
if (onCopy) onCopy();
|
|
40
|
-
setTimeout(()=>{
|
|
41
|
-
setIsCopied(false);
|
|
42
|
-
}, timeout);
|
|
43
|
-
} catch (error) {
|
|
44
|
-
console.error(error);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return {
|
|
48
|
-
copyToClipboard,
|
|
49
|
-
isCopied
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
exports.useCopyToClipboard = __webpack_exports__.useCopyToClipboard;
|
|
53
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
54
|
-
"useCopyToClipboard"
|
|
55
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
56
|
-
Object.defineProperty(exports, '__esModule', {
|
|
57
|
-
value: true
|
|
58
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
useIsMobile: ()=>useIsMobile
|
|
29
|
-
});
|
|
30
|
-
const external_use_media_query_cjs_namespaceObject = require("./use-media-query.cjs");
|
|
31
|
-
function useIsMobile(mobileBreakpoint = 768) {
|
|
32
|
-
return (0, external_use_media_query_cjs_namespaceObject.useMediaQuery)(`(max-width: ${(mobileBreakpoint - 1).toString()}px)`);
|
|
33
|
-
}
|
|
34
|
-
exports.useIsMobile = __webpack_exports__.useIsMobile;
|
|
35
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
36
|
-
"useIsMobile"
|
|
37
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
38
|
-
Object.defineProperty(exports, '__esModule', {
|
|
39
|
-
value: true
|
|
40
|
-
});
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
useMediaQuery: ()=>useMediaQuery
|
|
29
|
-
});
|
|
30
|
-
const external_react_namespaceObject = require("react");
|
|
31
|
-
function useMediaQuery(query) {
|
|
32
|
-
const [matches, setMatches] = (0, external_react_namespaceObject.useState)(()=>{
|
|
33
|
-
if ("u" > typeof window && 'function' == typeof window.matchMedia) return window.matchMedia(query).matches;
|
|
34
|
-
return false;
|
|
35
|
-
});
|
|
36
|
-
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
37
|
-
if ("u" < typeof window) return;
|
|
38
|
-
const mediaQueryList = window.matchMedia(query);
|
|
39
|
-
const onChange = (event)=>{
|
|
40
|
-
setMatches(event.matches);
|
|
41
|
-
};
|
|
42
|
-
mediaQueryList.addEventListener('change', onChange);
|
|
43
|
-
return ()=>{
|
|
44
|
-
mediaQueryList.removeEventListener('change', onChange);
|
|
45
|
-
};
|
|
46
|
-
}, [
|
|
47
|
-
query
|
|
48
|
-
]);
|
|
49
|
-
return matches;
|
|
50
|
-
}
|
|
51
|
-
exports.useMediaQuery = __webpack_exports__.useMediaQuery;
|
|
52
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
53
|
-
"useMediaQuery"
|
|
54
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
55
|
-
Object.defineProperty(exports, '__esModule', {
|
|
56
|
-
value: true
|
|
57
|
-
});
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
useMutationObserver: ()=>useMutationObserver
|
|
29
|
-
});
|
|
30
|
-
const external_react_namespaceObject = require("react");
|
|
31
|
-
const defaultOptions = {
|
|
32
|
-
attributes: true,
|
|
33
|
-
characterData: true,
|
|
34
|
-
childList: true,
|
|
35
|
-
subtree: true
|
|
36
|
-
};
|
|
37
|
-
function useMutationObserver(ref, callback, options = defaultOptions) {
|
|
38
|
-
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
39
|
-
if (!ref.current) return;
|
|
40
|
-
const observer = new MutationObserver(callback);
|
|
41
|
-
observer.observe(ref.current, options);
|
|
42
|
-
return ()=>{
|
|
43
|
-
observer.disconnect();
|
|
44
|
-
};
|
|
45
|
-
}, [
|
|
46
|
-
ref,
|
|
47
|
-
callback,
|
|
48
|
-
options
|
|
49
|
-
]);
|
|
50
|
-
}
|
|
51
|
-
exports.useMutationObserver = __webpack_exports__.useMutationObserver;
|
|
52
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
53
|
-
"useMutationObserver"
|
|
54
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
55
|
-
Object.defineProperty(exports, '__esModule', {
|
|
56
|
-
value: true
|
|
57
|
-
});
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
ELLIPSIS: ()=>ELLIPSIS,
|
|
29
|
-
usePagination: ()=>usePagination
|
|
30
|
-
});
|
|
31
|
-
const external_react_namespaceObject = require("react");
|
|
32
|
-
const ELLIPSIS = '•••';
|
|
33
|
-
const createRange = (start, end)=>{
|
|
34
|
-
const length = end - start + 1;
|
|
35
|
-
return Array.from({
|
|
36
|
-
length
|
|
37
|
-
}, (_, index)=>start + index);
|
|
38
|
-
};
|
|
39
|
-
function usePagination({ currentPage, resultsPerPage, siblingPagesCount = 1, totalResults }) {
|
|
40
|
-
return (0, external_react_namespaceObject.useMemo)(()=>{
|
|
41
|
-
const totalPages = Math.ceil(totalResults / Math.floor(resultsPerPage));
|
|
42
|
-
if (totalPages <= 0) return [];
|
|
43
|
-
const visiblePageNumbers = siblingPagesCount + 5;
|
|
44
|
-
if (visiblePageNumbers >= totalPages) return createRange(1, totalPages);
|
|
45
|
-
const leftSiblingIndex = Math.max(currentPage - siblingPagesCount, 1);
|
|
46
|
-
const rightSiblingIndex = Math.min(currentPage + siblingPagesCount, totalPages);
|
|
47
|
-
const shouldShowLeftEllipsis = leftSiblingIndex > 2;
|
|
48
|
-
const shouldShowRightEllipsis = rightSiblingIndex < totalPages - 2;
|
|
49
|
-
const firstPage = 1;
|
|
50
|
-
const lastPage = totalPages;
|
|
51
|
-
if (!shouldShowLeftEllipsis && shouldShowRightEllipsis) {
|
|
52
|
-
const leftRange = createRange(1, 3 + 2 * siblingPagesCount);
|
|
53
|
-
return [
|
|
54
|
-
...leftRange,
|
|
55
|
-
ELLIPSIS,
|
|
56
|
-
lastPage
|
|
57
|
-
];
|
|
58
|
-
}
|
|
59
|
-
if (shouldShowLeftEllipsis && !shouldShowRightEllipsis) {
|
|
60
|
-
const rightRange = createRange(totalPages - (3 + 2 * siblingPagesCount) + 1, totalPages);
|
|
61
|
-
return [
|
|
62
|
-
firstPage,
|
|
63
|
-
ELLIPSIS,
|
|
64
|
-
...rightRange
|
|
65
|
-
];
|
|
66
|
-
}
|
|
67
|
-
if (shouldShowLeftEllipsis && shouldShowRightEllipsis) {
|
|
68
|
-
const middleRange = createRange(leftSiblingIndex, rightSiblingIndex);
|
|
69
|
-
return [
|
|
70
|
-
firstPage,
|
|
71
|
-
ELLIPSIS,
|
|
72
|
-
...middleRange,
|
|
73
|
-
ELLIPSIS,
|
|
74
|
-
lastPage
|
|
75
|
-
];
|
|
76
|
-
}
|
|
77
|
-
return [];
|
|
78
|
-
}, [
|
|
79
|
-
totalResults,
|
|
80
|
-
resultsPerPage,
|
|
81
|
-
siblingPagesCount,
|
|
82
|
-
currentPage
|
|
83
|
-
]);
|
|
84
|
-
}
|
|
85
|
-
exports.ELLIPSIS = __webpack_exports__.ELLIPSIS;
|
|
86
|
-
exports.usePagination = __webpack_exports__.usePagination;
|
|
87
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
88
|
-
"ELLIPSIS",
|
|
89
|
-
"usePagination"
|
|
90
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
91
|
-
Object.defineProperty(exports, '__esModule', {
|
|
92
|
-
value: true
|
|
93
|
-
});
|