myshell-react-lib 0.3.4 → 0.3.6
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/dist/index.cjs +181 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +160 -58
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4506,6 +4506,9 @@ __export(index_exports, {
|
|
|
4506
4506
|
NumberInput: function() {
|
|
4507
4507
|
return NumberInput;
|
|
4508
4508
|
},
|
|
4509
|
+
Pagination: function() {
|
|
4510
|
+
return Pagination;
|
|
4511
|
+
},
|
|
4509
4512
|
Paragraph: function() {
|
|
4510
4513
|
return Paragraph;
|
|
4511
4514
|
},
|
|
@@ -25870,12 +25873,114 @@ function LogoLoading(param) {
|
|
|
25870
25873
|
]
|
|
25871
25874
|
});
|
|
25872
25875
|
}
|
|
25876
|
+
// src/components/pagination.tsx
|
|
25877
|
+
var import_lucide_react19 = require("lucide-react");
|
|
25878
|
+
var import_react17 = require("react");
|
|
25879
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
25880
|
+
function Pagination(param) {
|
|
25881
|
+
var currentPage = param.currentPage, totalPages = param.totalPages, onPageChange = param.onPageChange, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
25882
|
+
var addEllipsis = function(sortedPages) {
|
|
25883
|
+
var result = [];
|
|
25884
|
+
for(var i = 0; i < sortedPages.length; i += 1){
|
|
25885
|
+
var page = sortedPages[i];
|
|
25886
|
+
var prevPage = sortedPages[i - 1];
|
|
25887
|
+
if (prevPage !== void 0 && page - prevPage > 1) {
|
|
25888
|
+
if (result.length <= 2) {
|
|
25889
|
+
result.push("ellipsis-left");
|
|
25890
|
+
} else {
|
|
25891
|
+
result.push("ellipsis-right");
|
|
25892
|
+
}
|
|
25893
|
+
}
|
|
25894
|
+
result.push(page);
|
|
25895
|
+
}
|
|
25896
|
+
return result;
|
|
25897
|
+
};
|
|
25898
|
+
var pageNumbers = (0, import_react17.useMemo)(function() {
|
|
25899
|
+
var pages = /* @__PURE__ */ new Set();
|
|
25900
|
+
pages.add(1);
|
|
25901
|
+
if (totalPages > 1) {
|
|
25902
|
+
pages.add(totalPages);
|
|
25903
|
+
}
|
|
25904
|
+
if (currentPage <= 4) {
|
|
25905
|
+
for(var i = 2; i <= Math.min(5, totalPages); i += 1){
|
|
25906
|
+
pages.add(i);
|
|
25907
|
+
}
|
|
25908
|
+
} else if (currentPage >= totalPages - 3) {
|
|
25909
|
+
for(var i1 = Math.max(1, totalPages - 4); i1 <= totalPages; i1 += 1){
|
|
25910
|
+
pages.add(i1);
|
|
25911
|
+
}
|
|
25912
|
+
} else {
|
|
25913
|
+
pages.add(currentPage - 1);
|
|
25914
|
+
pages.add(currentPage);
|
|
25915
|
+
pages.add(currentPage + 1);
|
|
25916
|
+
}
|
|
25917
|
+
var sortedPages = Array.from(pages).sort(function(a, b) {
|
|
25918
|
+
return a - b;
|
|
25919
|
+
});
|
|
25920
|
+
return addEllipsis(sortedPages);
|
|
25921
|
+
}, [
|
|
25922
|
+
currentPage,
|
|
25923
|
+
totalPages
|
|
25924
|
+
]);
|
|
25925
|
+
var renderPageNumbers = function() {
|
|
25926
|
+
return pageNumbers.map(function(page) {
|
|
25927
|
+
if (page === "ellipsis-left" || page === "ellipsis-right") {
|
|
25928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", {
|
|
25929
|
+
className: "flex size-9 items-center justify-center text-sm font-medium text-Colors-Text-Default",
|
|
25930
|
+
"aria-hidden": "true",
|
|
25931
|
+
children: "..."
|
|
25932
|
+
}, page);
|
|
25933
|
+
}
|
|
25934
|
+
var isActive = page === currentPage;
|
|
25935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("button", {
|
|
25936
|
+
type: "button",
|
|
25937
|
+
onClick: function() {
|
|
25938
|
+
return onPageChange(page);
|
|
25939
|
+
},
|
|
25940
|
+
className: cn("flex h-7 min-w-7 items-center justify-center rounded-md px-1 text-sm font-medium transition-colors sm:h-9 sm:min-w-9", isActive ? "bg-Colors-Background-Surface-Subtle text-Colors-Text-Default" : "hover:bg-Colors-Background-Surface-Subtle text-Colors-Text-Default"),
|
|
25941
|
+
"aria-current": isActive ? "page" : void 0,
|
|
25942
|
+
disabled: isActive,
|
|
25943
|
+
children: page
|
|
25944
|
+
}, page);
|
|
25945
|
+
});
|
|
25946
|
+
};
|
|
25947
|
+
if (totalPages <= 1) {
|
|
25948
|
+
return null;
|
|
25949
|
+
}
|
|
25950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("nav", {
|
|
25951
|
+
className: cn("flex items-center justify-center gap-1.5", className),
|
|
25952
|
+
"aria-label": "Pagination",
|
|
25953
|
+
children: [
|
|
25954
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(IconButton, {
|
|
25955
|
+
icon: import_lucide_react19.ChevronLeft,
|
|
25956
|
+
variant: "plain",
|
|
25957
|
+
size: "md",
|
|
25958
|
+
onClick: function() {
|
|
25959
|
+
return onPageChange(currentPage - 1);
|
|
25960
|
+
},
|
|
25961
|
+
disabled: currentPage <= 1,
|
|
25962
|
+
"aria-label": "Previous page"
|
|
25963
|
+
}),
|
|
25964
|
+
renderPageNumbers(),
|
|
25965
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(IconButton, {
|
|
25966
|
+
icon: import_lucide_react19.ChevronRight,
|
|
25967
|
+
variant: "plain",
|
|
25968
|
+
size: "md",
|
|
25969
|
+
onClick: function() {
|
|
25970
|
+
return onPageChange(currentPage + 1);
|
|
25971
|
+
},
|
|
25972
|
+
disabled: currentPage >= totalPages,
|
|
25973
|
+
"aria-label": "Next page"
|
|
25974
|
+
})
|
|
25975
|
+
]
|
|
25976
|
+
});
|
|
25977
|
+
}
|
|
25873
25978
|
// src/components/toast/toast.tsx
|
|
25874
25979
|
var ToastPrimitives = __toESM(require("@radix-ui/react-toast"), 1);
|
|
25875
25980
|
var import_class_variance_authority21 = require("class-variance-authority");
|
|
25876
25981
|
var React51 = __toESM(require("react"), 1);
|
|
25877
|
-
var
|
|
25878
|
-
var
|
|
25982
|
+
var import_lucide_react20 = require("lucide-react");
|
|
25983
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
25879
25984
|
var ToastProvider = ToastPrimitives.Provider;
|
|
25880
25985
|
var viewportPositionVariants = (0, import_class_variance_authority21.cva)("fixed z-[1000001] flex max-h-screen w-max-content p-0 gap-2", {
|
|
25881
25986
|
variants: {
|
|
@@ -25899,7 +26004,7 @@ var ToastViewport = React51.forwardRef(function(_param, ref) {
|
|
|
25899
26004
|
"className",
|
|
25900
26005
|
"position"
|
|
25901
26006
|
]);
|
|
25902
|
-
return /* @__PURE__ */ (0,
|
|
26007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ToastPrimitives.Viewport, _object_spread({
|
|
25903
26008
|
ref: ref,
|
|
25904
26009
|
className: cn(viewportPositionVariants({
|
|
25905
26010
|
position: position
|
|
@@ -25937,7 +26042,7 @@ var Toast = React51.forwardRef(function(_param, ref) {
|
|
|
25937
26042
|
"variant",
|
|
25938
26043
|
"position"
|
|
25939
26044
|
]);
|
|
25940
|
-
return /* @__PURE__ */ (0,
|
|
26045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ToastPrimitives.Root, _object_spread({
|
|
25941
26046
|
ref: ref,
|
|
25942
26047
|
className: cn(toastVariants({
|
|
25943
26048
|
variant: variant,
|
|
@@ -25951,7 +26056,7 @@ var ToastAction = React51.forwardRef(function(_param, ref) {
|
|
|
25951
26056
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
25952
26057
|
"className"
|
|
25953
26058
|
]);
|
|
25954
|
-
return /* @__PURE__ */ (0,
|
|
26059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ToastPrimitives.Action, _object_spread({
|
|
25955
26060
|
ref: ref,
|
|
25956
26061
|
className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-sm border border-slate-200 bg-transparent px-3 text-sm font-medium ring-offset-white transition-colors hover:bg-slate-100 focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-slate-100/40 group-[.destructive]:hover:border-red-500/30 group-[.destructive]:hover:bg-red-500 group-[.destructive]:hover:text-slate-50 group-[.destructive]:focus:ring-red-500 dark:border-slate-800 dark:ring-offset-slate-950 dark:hover:bg-slate-800 dark:focus:ring-slate-300 dark:group-[.destructive]:border-slate-800/40 dark:group-[.destructive]:hover:border-red-900/30 dark:group-[.destructive]:hover:bg-red-900 dark:group-[.destructive]:hover:text-slate-50 dark:group-[.destructive]:focus:ring-red-900", className)
|
|
25957
26062
|
}, props));
|
|
@@ -25961,12 +26066,12 @@ var ToastClose = React51.forwardRef(function(_param, ref) {
|
|
|
25961
26066
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
25962
26067
|
"className"
|
|
25963
26068
|
]);
|
|
25964
|
-
return /* @__PURE__ */ (0,
|
|
26069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ToastPrimitives.Close, _object_spread_props(_object_spread({
|
|
25965
26070
|
ref: ref,
|
|
25966
26071
|
className: cn("absolute size-5 right-3 top-3 rounded-full p-1 text-cc-Button-Tertiary-fg-default hover:text-cc-Button-Tertiary-fg-alt bg-cc-Button-Tertiary-bg-default hover:bg-cc-Button-Tertiary-bg-hover transition-opacity outline-none focus:outline-none focus:ring-2 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 ", className),
|
|
25967
26072
|
"toast-close": ""
|
|
25968
26073
|
}, props), {
|
|
25969
|
-
children: /* @__PURE__ */ (0,
|
|
26074
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react20.XIcon, {
|
|
25970
26075
|
className: "h-3 w-3 text-cc-Button-Tertiary-fg-default"
|
|
25971
26076
|
})
|
|
25972
26077
|
}));
|
|
@@ -25976,7 +26081,7 @@ var ToastTitle = React51.forwardRef(function(_param, ref) {
|
|
|
25976
26081
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
25977
26082
|
"className"
|
|
25978
26083
|
]);
|
|
25979
|
-
return /* @__PURE__ */ (0,
|
|
26084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ToastPrimitives.Title, _object_spread({
|
|
25980
26085
|
ref: ref,
|
|
25981
26086
|
className: cn("text-sm font-semibold", className)
|
|
25982
26087
|
}, props));
|
|
@@ -25986,7 +26091,7 @@ var ToastDescription = React51.forwardRef(function(_param, ref) {
|
|
|
25986
26091
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
25987
26092
|
"className"
|
|
25988
26093
|
]);
|
|
25989
|
-
return /* @__PURE__ */ (0,
|
|
26094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ToastPrimitives.Description, _object_spread({
|
|
25990
26095
|
ref: ref,
|
|
25991
26096
|
className: cn("text-sm opacity-90", className)
|
|
25992
26097
|
}, props));
|
|
@@ -25994,7 +26099,7 @@ var ToastDescription = React51.forwardRef(function(_param, ref) {
|
|
|
25994
26099
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
25995
26100
|
// src/components/toast/use-toast.tsx
|
|
25996
26101
|
var React52 = __toESM(require("react"), 1);
|
|
25997
|
-
var
|
|
26102
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
25998
26103
|
var TOAST_LIMIT = 8;
|
|
25999
26104
|
var TOAST_REMOVE_DELAY = 1e3;
|
|
26000
26105
|
var count = 0;
|
|
@@ -26097,10 +26202,10 @@ function toast(_param) {
|
|
|
26097
26202
|
toast: _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, props), {
|
|
26098
26203
|
position: position
|
|
26099
26204
|
}), actions && {
|
|
26100
|
-
action: /* @__PURE__ */ (0,
|
|
26205
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", {
|
|
26101
26206
|
className: "flex justify-start items-center gap-2",
|
|
26102
26207
|
children: [
|
|
26103
|
-
(actions === null || actions === void 0 ? void 0 : actions.dismissText) && /* @__PURE__ */ (0,
|
|
26208
|
+
(actions === null || actions === void 0 ? void 0 : actions.dismissText) && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Text, {
|
|
26104
26209
|
size: "sm",
|
|
26105
26210
|
weight: "medium",
|
|
26106
26211
|
color: "brand",
|
|
@@ -26110,13 +26215,13 @@ function toast(_param) {
|
|
|
26110
26215
|
},
|
|
26111
26216
|
children: actions === null || actions === void 0 ? void 0 : actions.dismissText
|
|
26112
26217
|
}),
|
|
26113
|
-
(actions === null || actions === void 0 ? void 0 : actions.view) && actions.viewUrl && /* @__PURE__ */ (0,
|
|
26218
|
+
(actions === null || actions === void 0 ? void 0 : actions.view) && actions.viewUrl && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(link_default, {
|
|
26114
26219
|
href: actions.viewUrl,
|
|
26115
26220
|
target: "_blank",
|
|
26116
26221
|
rel: "noreferrer noopener",
|
|
26117
|
-
children: /* @__PURE__ */ (0,
|
|
26222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", {
|
|
26118
26223
|
className: "flex items-center gap-1.5",
|
|
26119
|
-
children: /* @__PURE__ */ (0,
|
|
26224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Text, {
|
|
26120
26225
|
size: "sm",
|
|
26121
26226
|
weight: "medium",
|
|
26122
26227
|
color: "default",
|
|
@@ -26165,13 +26270,13 @@ function useToast() {
|
|
|
26165
26270
|
});
|
|
26166
26271
|
}
|
|
26167
26272
|
// src/components/toast/toaster.tsx
|
|
26168
|
-
var
|
|
26169
|
-
var
|
|
26170
|
-
var
|
|
26273
|
+
var import_react18 = __toESM(require("react"), 1);
|
|
26274
|
+
var import_lucide_react21 = require("lucide-react");
|
|
26275
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
26171
26276
|
function Toaster() {
|
|
26172
26277
|
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_position = _ref.position, position = _ref_position === void 0 ? "top-right" : _ref_position;
|
|
26173
26278
|
var toasts = useToast().toasts;
|
|
26174
|
-
var positionGroups =
|
|
26279
|
+
var positionGroups = import_react18.default.useMemo(function() {
|
|
26175
26280
|
var groups = {};
|
|
26176
26281
|
var allPositions = [
|
|
26177
26282
|
"top-left",
|
|
@@ -26204,19 +26309,19 @@ function Toaster() {
|
|
|
26204
26309
|
var renderIcon3 = function(variant2) {
|
|
26205
26310
|
switch(variant2){
|
|
26206
26311
|
case "info":
|
|
26207
|
-
return /* @__PURE__ */ (0,
|
|
26312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react21.InfoIcon, {
|
|
26208
26313
|
className: "h-6 w-6 sm:h-4.5 sm:w-4.5 text-cc-Icon-Featured-icon-fg-Info"
|
|
26209
26314
|
});
|
|
26210
26315
|
case "success":
|
|
26211
|
-
return /* @__PURE__ */ (0,
|
|
26316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react21.CircleCheckIcon, {
|
|
26212
26317
|
className: "h-6 w-6 sm:h-4.5 sm:w-4.5 text-cc-Icon-Featured-icon-fg-Success"
|
|
26213
26318
|
});
|
|
26214
26319
|
case "warning":
|
|
26215
|
-
return /* @__PURE__ */ (0,
|
|
26320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react21.TriangleAlertIcon, {
|
|
26216
26321
|
className: "h-6 w-6 sm:h-4.5 sm:w-4.5 text-cc-Icon-Featured-icon-fg-Warning"
|
|
26217
26322
|
});
|
|
26218
26323
|
case "error":
|
|
26219
|
-
return /* @__PURE__ */ (0,
|
|
26324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react21.CircleXIcon, {
|
|
26220
26325
|
className: "h-6 w-6 sm:h-4.5 sm:w-4.5 text-cc-Icon-Featured-icon-fg-Error"
|
|
26221
26326
|
});
|
|
26222
26327
|
}
|
|
@@ -26233,26 +26338,26 @@ function Toaster() {
|
|
|
26233
26338
|
return "bg-cc-Icon-Featured-icon-bg-Error";
|
|
26234
26339
|
}
|
|
26235
26340
|
};
|
|
26236
|
-
return /* @__PURE__ */ (0,
|
|
26341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Toast, _object_spread_props(_object_spread({}, toast4), {
|
|
26237
26342
|
position: toastPosition,
|
|
26238
26343
|
children: [
|
|
26239
|
-
/* @__PURE__ */ (0,
|
|
26344
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", {
|
|
26240
26345
|
className: "flex flex-col gap-3",
|
|
26241
|
-
children: /* @__PURE__ */ (0,
|
|
26346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", {
|
|
26242
26347
|
className: "flex items-start gap-3",
|
|
26243
26348
|
children: [
|
|
26244
|
-
/* @__PURE__ */ (0,
|
|
26349
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", {
|
|
26245
26350
|
className: cn("flex h-10 w-10 sm:h-8 sm:w-8 flex-shrink-0 flex-grow-0 items-center justify-center rounded-full", getBackgroundColor(variant)),
|
|
26246
26351
|
children: icon || renderIcon3(variant)
|
|
26247
26352
|
}),
|
|
26248
|
-
/* @__PURE__ */ (0,
|
|
26353
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", {
|
|
26249
26354
|
className: "grid gap-1",
|
|
26250
26355
|
children: [
|
|
26251
|
-
title && /* @__PURE__ */ (0,
|
|
26356
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ToastTitle, {
|
|
26252
26357
|
className: "text-base text-cc-Toast-fg-default",
|
|
26253
26358
|
children: title
|
|
26254
26359
|
}),
|
|
26255
|
-
description && /* @__PURE__ */ (0,
|
|
26360
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ToastDescription, {
|
|
26256
26361
|
className: "text-sm text-cc-Toast-fg-subtle",
|
|
26257
26362
|
children: description
|
|
26258
26363
|
}),
|
|
@@ -26262,17 +26367,17 @@ function Toaster() {
|
|
|
26262
26367
|
]
|
|
26263
26368
|
})
|
|
26264
26369
|
}),
|
|
26265
|
-
/* @__PURE__ */ (0,
|
|
26370
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ToastClose, {})
|
|
26266
26371
|
]
|
|
26267
26372
|
}), id);
|
|
26268
26373
|
};
|
|
26269
|
-
return /* @__PURE__ */ (0,
|
|
26374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ToastProvider, {
|
|
26270
26375
|
children: Object.entries(positionGroups).map(function(param) {
|
|
26271
26376
|
var _param = _sliced_to_array(param, 2), pos = _param[0], toastsForPosition = _param[1];
|
|
26272
|
-
return /* @__PURE__ */ (0,
|
|
26377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_react18.default.Fragment, {
|
|
26273
26378
|
children: [
|
|
26274
26379
|
toastsForPosition.map(renderToast),
|
|
26275
|
-
toastsForPosition.length > 0 && /* @__PURE__ */ (0,
|
|
26380
|
+
toastsForPosition.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ToastViewport, {
|
|
26276
26381
|
position: pos
|
|
26277
26382
|
})
|
|
26278
26383
|
]
|
|
@@ -26282,10 +26387,10 @@ function Toaster() {
|
|
|
26282
26387
|
}
|
|
26283
26388
|
// src/components/swiper/index.tsx
|
|
26284
26389
|
var import_class_variance_authority22 = require("class-variance-authority");
|
|
26285
|
-
var
|
|
26390
|
+
var import_react19 = require("react");
|
|
26286
26391
|
var import_navigation2 = require("next/navigation");
|
|
26287
26392
|
var import_modules = require("swiper/modules");
|
|
26288
|
-
var
|
|
26393
|
+
var import_react20 = require("swiper/react");
|
|
26289
26394
|
var import_css = require("swiper/css");
|
|
26290
26395
|
var import_navigation3 = require("swiper/css/navigation");
|
|
26291
26396
|
var import_free_mode = require("swiper/css/free-mode");
|
|
@@ -26294,7 +26399,7 @@ var import_pagination = require("swiper/css/pagination");
|
|
|
26294
26399
|
// src/components/swiper/index.module.scss
|
|
26295
26400
|
var index_module_default = '.swiperBox {\n @apply w-full h-fit;\n}\n.swiperBox :global(.swiper) :global(.swiper-button-prev) {\n @apply bg-contain bg-no-repeat;\n background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0iIzQxNDM0NSIgY2xhc3M9InNpemUtNSI+CiAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTEuNzggNS4yMmEuNzUuNzUgMCAwIDEgMCAxLjA2TDguMDYgMTBsMy43MiAzLjcyYS43NS43NSAwIDEgMS0xLjA2IDEuMDZsLTQuMjUtNC4yNWEuNzUuNzUgMCAwIDEgMC0xLjA2bDQuMjUtNC4yNWEuNzUuNzUgMCAwIDEgMS4wNiAwWiIgY2xpcC1ydWxlPSJldmVub2RkIiAvPgo8L3N2Zz4K");\n}\n.swiperBox :global(.swiper) :global(.swiper-button-next) {\n @apply bg-contain bg-no-repeat;\n background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0iIzQxNDM0NSIgY2xhc3M9InNpemUtNSI+CiAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC4yMiA1LjIyYS43NS43NSAwIDAgMSAxLjA2IDBsNC4yNSA0LjI1YS43NS43NSAwIDAgMSAwIDEuMDZsLTQuMjUgNC4yNWEuNzUuNzUgMCAwIDEtMS4wNi0xLjA2TDExLjk0IDEwIDguMjIgNi4yOGEuNzUuNzUgMCAwIDEgMC0xLjA2WiIgY2xpcC1ydWxlPSJldmVub2RkIiAvPgo8L3N2Zz4KCg==");\n}\n.swiperBox :global(.swiper) :global(.swiper-button-prev::after) {\n @apply text-Colors-Foreground-Default content-none;\n}\n.swiperBox :global(.swiper) :global(.swiper-button-next::after) {\n @apply text-Colors-Foreground-Default content-none;\n}\n.swiperBox :global(.swiper.banner-swiper) :global(.banner-swiper-slide.swiper-slide-prev) {\n @apply origin-right;\n}\n.swiperBox :global(.swiper.banner-swiper) :global(.banner-swiper-slide.swiper-slide-next) {\n @apply origin-left;\n}\n.swiperBox :global(.swiper.banner-swiper) :global(.swiper-slide-active) {\n @apply opacity-100;\n}\n.swiperBox :global(.swiper.banner-swiper) :global(.swiper-button-next) {\n @apply -right-4 md:right-0 3xl:right-[calc((100%-1200px)/2-16px)];\n}\n.swiperBox :global(.swiper.banner-swiper) :global(.swiper-button-prev) {\n @apply -left-4 md:left-0 3xl:left-[calc((100%-1200px)/2-16px)];\n}\n.swiperBox :global(.swiper.feature-swiper) :global(.swiper-button-next) {\n @apply right-0;\n}\n.swiperBox :global(.swiper.feature-swiper) :global(.swiper-button-prev) {\n @apply left-0;\n}\n.swiperBox :global(.swiper.feature-swiper) :global(.swiper-button-disabled) {\n @apply hidden;\n}\n.swiperBox :global(.swiper.patron-badge-swiper) :global(.swiper-button-next) {\n @apply right-0;\n}\n.swiperBox :global(.swiper.patron-badge-swiper) :global(.swiper-button-prev) {\n @apply left-0;\n}\n.swiperBox :global(.swiper.patron-badge-swiper) :global(.swiper-button-disabled) {\n @apply hidden;\n}\n.swiperBox :global(.swiper.grid-swiper) :global(.swiper-wrapper) {\n @apply w-[100vw] md:w-full flex-wrap flex-col m-0;\n}\n.swiperBox :global(.swiper) :global(.swiper-button-next) {\n @apply hidden md:flex justify-center items-center absolute top-[50%] w-8 h-8 font-semibold text-Colors-Foreground-Default border border-Colors-Border-Default bg-Colors-Background-Normal-Primary-Default rounded-full cursor-pointer hover:bg-Colors-Background-Normal-Primary-Hover active:bg-Colors-Background-Normal-Primary-Active;\n}\n.swiperBox :global(.swiper) :global(.swiper-button-next)::after {\n @apply text-Colors-Foreground-Default text-xs font-bold;\n}\n.swiperBox :global(.swiper) :global(.swiper-button-prev) {\n @apply hidden md:flex justify-center items-center absolute top-[50%] w-8 h-8 font-semibold text-Colors-Foreground-Default border border-Colors-Border-Default bg-Colors-Background-Normal-Primary-Default rounded-full cursor-pointer hover:bg-Colors-Background-Normal-Primary-Hover active:bg-Colors-Background-Normal-Primary-Active;\n}\n.swiperBox :global(.swiper) :global(.swiper-button-prev)::after {\n @apply text-Colors-Foreground-Default text-xs font-bold;\n}\n\n.animate :global(.swiper-slide) {\n transition: transform 500ms linear;\n}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL1VzZXJzL21vbmljYS9EZXNrdG9wL215c2hlbGwvbXlzaGVsbC1yZWFjdC1saWIvc3JjL2NvbXBvbmVudHMvc3dpcGVyIiwic291cmNlcyI6WyJpbmRleC5tb2R1bGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFOztBQUdFO0VBQ0U7RUFDQTs7QUFFRjtFQUNFO0VBQ0E7O0FBRUY7RUFDRTs7QUFFRjtFQUNFOztBQUlGO0VBRUU7O0FBRUY7RUFFRTs7QUFFRjtFQUNFOztBQUdGO0VBQ0U7O0FBRUY7RUFDRTs7QUFJRjtFQUNFOztBQUVGO0VBQ0U7O0FBRUY7RUFDRTs7QUFJRjtFQUNFOztBQUVGO0VBQ0U7O0FBRUY7RUFDRTs7QUFJRjtFQUNFOztBQUtGO0VBQ0U7O0FBQ0U7RUFDRTs7QUFHTjtFQUNFOztBQUNFO0VBQ0U7OztBQU9SO0VBQ0UiLCJzb3VyY2VzQ29udGVudCI6WyIuc3dpcGVyQm94e1xuICBAYXBwbHkgdy1mdWxsIGgtZml0O1xuICBcbiAgOmdsb2JhbCguc3dpcGVyKS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GVyLURlZmF1bHQgYmctQ29sb3JzLUJhY2tncm91bmQtTm9ybWFsLVByaW1hcnktRGVmYXVsdCByb3VuZGVkLWZ1bGwgY3Vyc29yLXBvaW50ZXIgaG92ZXI6YmctQ29sb3JzLUJhY2tncm91bmQtTm9ybWFsLVByaW1hcnktSG92ZXIgYWN0aXZlOmJnLUNvbG9ycy1CYWNrZ3JvdW5kLU5vcm1hbC1QcmltYXJ5LUFjdGl2ZTtcbiAgICAgICAgJjo6YWZ0ZXIge1xuICAgICAgICAgIEBhcHBseSB0ZXh0LUNvbG9ycy1Gb3JlZ3JvdW5kLURlZmF1bHQgdGV4dC14cyBmb250LWJvbGQ7XG4gICAgICB9XG4gICAgfVxuICB9XG59XG5cbi5hbmltYXRlIHtcbiAgOmdsb2JhbCguc3dpcGVyLXNsaWRlKSB7XG4gICAgdHJhbnNpdGlvbjogdHJhbnNmb3JtIDUwMG1zIGxpbmVhcjtcbiAgfVxufVxuIl19 */';
|
|
26296
26401
|
// src/components/swiper/index.tsx
|
|
26297
|
-
var
|
|
26402
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
26298
26403
|
var swiperVariants = (0, import_class_variance_authority22.cva)("", {
|
|
26299
26404
|
variants: {
|
|
26300
26405
|
rounded: {
|
|
@@ -26320,7 +26425,7 @@ function Swiper(props) {
|
|
|
26320
26425
|
var isGrid = swiperType === "grid";
|
|
26321
26426
|
var router = (0, import_navigation2.useRouter)();
|
|
26322
26427
|
var Com = component || "div";
|
|
26323
|
-
var swiperList = (0,
|
|
26428
|
+
var swiperList = (0, import_react19.useMemo)(function() {
|
|
26324
26429
|
var length = dataList.length;
|
|
26325
26430
|
if (length < 2 || isGrid || isFeatured) {
|
|
26326
26431
|
return dataList;
|
|
@@ -26335,7 +26440,7 @@ function Swiper(props) {
|
|
|
26335
26440
|
var autoPlayOptions = {
|
|
26336
26441
|
delay: delay
|
|
26337
26442
|
};
|
|
26338
|
-
var swiperRef = (0,
|
|
26443
|
+
var swiperRef = (0, import_react19.useRef)();
|
|
26339
26444
|
var fgconfigs = {
|
|
26340
26445
|
0: {
|
|
26341
26446
|
slidesPerView: 1.014,
|
|
@@ -26399,8 +26504,8 @@ function Swiper(props) {
|
|
|
26399
26504
|
import_modules.Grid
|
|
26400
26505
|
]
|
|
26401
26506
|
});
|
|
26402
|
-
var _ref = _sliced_to_array((0,
|
|
26403
|
-
(0,
|
|
26507
|
+
var _ref = _sliced_to_array((0, import_react19.useState)(false), 2), animate = _ref[0], setAnimate = _ref[1];
|
|
26508
|
+
(0, import_react19.useEffect)(function() {
|
|
26404
26509
|
setTimeout(function() {
|
|
26405
26510
|
setAnimate(true);
|
|
26406
26511
|
}, 200);
|
|
@@ -26430,9 +26535,9 @@ function Swiper(props) {
|
|
|
26430
26535
|
}
|
|
26431
26536
|
}
|
|
26432
26537
|
};
|
|
26433
|
-
return /* @__PURE__ */ (0,
|
|
26538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", {
|
|
26434
26539
|
className: index_module_default.swiperBox,
|
|
26435
|
-
children: /* @__PURE__ */ (0,
|
|
26540
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react20.Swiper, _object_spread_props(_object_spread({
|
|
26436
26541
|
observer: true,
|
|
26437
26542
|
observeParents: true
|
|
26438
26543
|
}, swiperConfigs), {
|
|
@@ -26442,9 +26547,9 @@ function Swiper(props) {
|
|
|
26442
26547
|
swiperRef.current = swiper;
|
|
26443
26548
|
},
|
|
26444
26549
|
children: swiperList.map(function(item, index) {
|
|
26445
|
-
return /* @__PURE__ */ (0,
|
|
26550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react20.SwiperSlide, {
|
|
26446
26551
|
className: cn(isBanner && "banner-swiper-slide !w-[90%] md:!w-[98%] h-[220px] md:h-auto max-w-[1200px] aspect-[4/1] rounded-2xl opacity-30", isFeatured && "rounded-2xl !w-[100%-32px] md:!w-[100%-72px]", isGrid && "grid-swiper-slide !w-[100%-32px] md:!w-[100%-72px] !h-[100%/3] flex justify-center items-center rounded-2xl", "text-clip", slideClassName),
|
|
26447
|
-
children: /* @__PURE__ */ (0,
|
|
26552
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Com, {
|
|
26448
26553
|
item: item,
|
|
26449
26554
|
index: index,
|
|
26450
26555
|
onClick: handleSlideItemClick,
|
|
@@ -26460,49 +26565,49 @@ function Swiper(props) {
|
|
|
26460
26565
|
}
|
|
26461
26566
|
// src/components/custom-notification.tsx
|
|
26462
26567
|
var import_react_hot_toast = require("react-hot-toast");
|
|
26463
|
-
var
|
|
26464
|
-
var
|
|
26568
|
+
var import_lucide_react22 = require("lucide-react");
|
|
26569
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
26465
26570
|
function CustomNotification(param) {
|
|
26466
26571
|
var tProps = param.tProps, customProps = param.customProps;
|
|
26467
26572
|
var type = customProps.type, title = customProps.title, content = customProps.content, _customProps_isClosable = customProps.isClosable, isClosable = _customProps_isClosable === void 0 ? false : _customProps_isClosable, action = customProps.action, loading = customProps.loading;
|
|
26468
26573
|
var id = tProps.id;
|
|
26469
26574
|
var displayedContent = !isString(content) ? JSON.stringify(content) : content;
|
|
26470
|
-
return /* @__PURE__ */ (0,
|
|
26471
|
-
children: /* @__PURE__ */ (0,
|
|
26575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", {
|
|
26576
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", {
|
|
26472
26577
|
id: id,
|
|
26473
26578
|
className: "z-[10000000] min-h-10 w-fit max-w-[90vw] rounded-full border border-cc-Popover-border bg-Colors-Background-Utilities-Modal px-3 py-2 shadow-modal-default md:max-w-[560px]",
|
|
26474
|
-
children: /* @__PURE__ */ (0,
|
|
26579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", {
|
|
26475
26580
|
className: "flex w-full items-center justify-center gap-2",
|
|
26476
26581
|
children: [
|
|
26477
|
-
loading && /* @__PURE__ */ (0,
|
|
26478
|
-
!loading && type && /* @__PURE__ */ (0,
|
|
26582
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Spinner, {}),
|
|
26583
|
+
!loading && type && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", {
|
|
26479
26584
|
className: "flex flex-shrink-0 items-center justify-center",
|
|
26480
26585
|
children: [
|
|
26481
|
-
type === "info" && /* @__PURE__ */ (0,
|
|
26586
|
+
type === "info" && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CircleInfoIcon, {
|
|
26482
26587
|
className: "h-6 w-6 text-cc-Icon-Featured-icon-fg-Info items-center justify-center sm:h-4.5 sm:w-4.5"
|
|
26483
26588
|
}),
|
|
26484
|
-
type === "success" && /* @__PURE__ */ (0,
|
|
26589
|
+
type === "success" && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CircleSuccessIcon, {
|
|
26485
26590
|
className: "h-6 w-6 text-cc-Icon-Featured-icon-fg-Success items-center justify-center sm:h-4.5 sm:w-4.5"
|
|
26486
26591
|
}),
|
|
26487
|
-
type === "warning" && /* @__PURE__ */ (0,
|
|
26592
|
+
type === "warning" && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CircleWarningIcon, {
|
|
26488
26593
|
className: "h-6 w-6 text-cc-Icon-Featured-icon-fg-Warning items-center justify-center sm:h-4.5 sm:w-4.5"
|
|
26489
26594
|
}),
|
|
26490
|
-
type === "error" && /* @__PURE__ */ (0,
|
|
26595
|
+
type === "error" && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CircleErrorIcon, {
|
|
26491
26596
|
className: "h-6 w-6 text-cc-Icon-Featured-icon-fg-Error items-center justify-center sm:h-4.5 sm:w-4.5"
|
|
26492
26597
|
})
|
|
26493
26598
|
]
|
|
26494
26599
|
}),
|
|
26495
|
-
/* @__PURE__ */ (0,
|
|
26600
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", {
|
|
26496
26601
|
className: "flex flex-grow flex-col space-y-1 overflow-hidden",
|
|
26497
26602
|
children: [
|
|
26498
|
-
title && /* @__PURE__ */ (0,
|
|
26603
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text, {
|
|
26499
26604
|
size: "sm",
|
|
26500
26605
|
weight: "regular",
|
|
26501
26606
|
color: "default",
|
|
26502
26607
|
children: title
|
|
26503
26608
|
}),
|
|
26504
|
-
/* @__PURE__ */ (0,
|
|
26505
|
-
children: /* @__PURE__ */ (0,
|
|
26609
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", {
|
|
26610
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text, {
|
|
26506
26611
|
size: "sm",
|
|
26507
26612
|
weight: "regular",
|
|
26508
26613
|
color: "default",
|
|
@@ -26511,19 +26616,19 @@ function CustomNotification(param) {
|
|
|
26511
26616
|
})
|
|
26512
26617
|
]
|
|
26513
26618
|
}),
|
|
26514
|
-
action && /* @__PURE__ */ (0,
|
|
26619
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, {
|
|
26515
26620
|
children: [
|
|
26516
|
-
/* @__PURE__ */ (0,
|
|
26621
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Separator, {
|
|
26517
26622
|
orientation: "vertical",
|
|
26518
26623
|
className: "h-3"
|
|
26519
26624
|
}),
|
|
26520
26625
|
action
|
|
26521
26626
|
]
|
|
26522
26627
|
}),
|
|
26523
|
-
isClosable && /* @__PURE__ */ (0,
|
|
26628
|
+
isClosable && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(IconButton, {
|
|
26524
26629
|
size: "sm",
|
|
26525
26630
|
variant: "plain",
|
|
26526
|
-
icon:
|
|
26631
|
+
icon: import_lucide_react22.XIcon,
|
|
26527
26632
|
onClick: function() {
|
|
26528
26633
|
return import_react_hot_toast.toast.dismiss(id);
|
|
26529
26634
|
},
|
|
@@ -26535,16 +26640,16 @@ function CustomNotification(param) {
|
|
|
26535
26640
|
});
|
|
26536
26641
|
}
|
|
26537
26642
|
// src/common/hooks/useNotification.tsx
|
|
26538
|
-
var
|
|
26643
|
+
var import_react21 = require("react");
|
|
26539
26644
|
var import_react_hot_toast2 = require("react-hot-toast");
|
|
26540
|
-
var
|
|
26645
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
26541
26646
|
function useNotification() {
|
|
26542
|
-
var addToast = (0,
|
|
26647
|
+
var addToast = (0, import_react21.useCallback)(function(config2, duration2) {
|
|
26543
26648
|
if (config2.id) {
|
|
26544
26649
|
import_react_hot_toast2.toast.remove(config2.id);
|
|
26545
26650
|
}
|
|
26546
26651
|
import_react_hot_toast2.toast.custom(function(t) {
|
|
26547
|
-
return /* @__PURE__ */ (0,
|
|
26652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(CustomNotification, {
|
|
26548
26653
|
tProps: _object_spread_props(_object_spread({}, t), {
|
|
26549
26654
|
duration: duration2
|
|
26550
26655
|
}),
|
|
@@ -26555,30 +26660,30 @@ function useNotification() {
|
|
|
26555
26660
|
duration: duration2
|
|
26556
26661
|
});
|
|
26557
26662
|
}, []);
|
|
26558
|
-
var message = (0,
|
|
26663
|
+
var message = (0, import_react21.useCallback)(function(config2, duration2) {
|
|
26559
26664
|
return addToast(_object_spread({}, config2), duration2);
|
|
26560
26665
|
}, []);
|
|
26561
|
-
var success = (0,
|
|
26666
|
+
var success = (0, import_react21.useCallback)(function(config2, duration2) {
|
|
26562
26667
|
return addToast(_object_spread_props(_object_spread({}, config2), {
|
|
26563
26668
|
type: "success"
|
|
26564
26669
|
}), duration2);
|
|
26565
26670
|
}, []);
|
|
26566
|
-
var error = (0,
|
|
26671
|
+
var error = (0, import_react21.useCallback)(function(config2, duration2) {
|
|
26567
26672
|
return addToast(_object_spread_props(_object_spread({}, config2), {
|
|
26568
26673
|
type: "error"
|
|
26569
26674
|
}), duration2);
|
|
26570
26675
|
}, []);
|
|
26571
|
-
var warning = (0,
|
|
26676
|
+
var warning = (0, import_react21.useCallback)(function(config2, duration2) {
|
|
26572
26677
|
return addToast(_object_spread_props(_object_spread({}, config2), {
|
|
26573
26678
|
type: "warning"
|
|
26574
26679
|
}), duration2);
|
|
26575
26680
|
}, []);
|
|
26576
|
-
var info = (0,
|
|
26681
|
+
var info = (0, import_react21.useCallback)(function(config2, duration2) {
|
|
26577
26682
|
return addToast(_object_spread_props(_object_spread({}, config2), {
|
|
26578
26683
|
type: "info"
|
|
26579
26684
|
}), duration2);
|
|
26580
26685
|
}, []);
|
|
26581
|
-
var close = (0,
|
|
26686
|
+
var close = (0, import_react21.useCallback)(function(id) {
|
|
26582
26687
|
import_react_hot_toast2.toast.dismiss(id);
|
|
26583
26688
|
}, []);
|
|
26584
26689
|
return {
|
|
@@ -26605,7 +26710,7 @@ var Message = /*#__PURE__*/ function() {
|
|
|
26605
26710
|
}
|
|
26606
26711
|
var addToast = function() {
|
|
26607
26712
|
import_react_hot_toast2.toast.custom(function(t) {
|
|
26608
|
-
return /* @__PURE__ */ (0,
|
|
26713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(CustomNotification, {
|
|
26609
26714
|
tProps: _object_spread_props(_object_spread({}, t), {
|
|
26610
26715
|
duration: duration2
|
|
26611
26716
|
}),
|
|
@@ -26819,6 +26924,7 @@ var Message = /*#__PURE__*/ function() {
|
|
|
26819
26924
|
NoPageIcon: NoPageIcon,
|
|
26820
26925
|
NoPageState: NoPageState,
|
|
26821
26926
|
NumberInput: NumberInput,
|
|
26927
|
+
Pagination: Pagination,
|
|
26822
26928
|
Paragraph: Paragraph,
|
|
26823
26929
|
Popover: Popover,
|
|
26824
26930
|
PopoverAnchor: PopoverAnchor,
|