@julseb-lib/react 0.1.71 → 0.1.73
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 +26 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -67014,7 +67014,7 @@ var AccordionContent = ({
|
|
|
67014
67014
|
className: clsx(
|
|
67015
67015
|
"overflow-hidden transition-all duration-200 ease",
|
|
67016
67016
|
"py-0 max-h-0 opacity-0",
|
|
67017
|
-
variant === "rounded" && "px-2",
|
|
67017
|
+
variant === "rounded" && "px-2 bg-background",
|
|
67018
67018
|
isOpen && "open py-2 max-h-auto opacity-100",
|
|
67019
67019
|
"accordion-content",
|
|
67020
67020
|
className
|
|
@@ -67184,12 +67184,15 @@ var import_react81 = require("react");
|
|
|
67184
67184
|
var import_bi17 = require("react-icons/bi");
|
|
67185
67185
|
|
|
67186
67186
|
// src/lib/components/Toast/utils.ts
|
|
67187
|
-
var genToastColors = {
|
|
67188
|
-
|
|
67189
|
-
|
|
67190
|
-
|
|
67191
|
-
|
|
67192
|
-
|
|
67187
|
+
var genToastColors = (theme) => {
|
|
67188
|
+
const colors = {
|
|
67189
|
+
success: theme === "dark" ? "border-success-500 bg-success-950" : "border-success-500 bg-success-50",
|
|
67190
|
+
error: theme === "dark" ? "border-danger-500 bg-danger-950" : "border-danger-500 bg-danger-50",
|
|
67191
|
+
warning: theme === "dark" ? "border-warning-500 bg-warning-950" : "border-warning-500 bg-warning-50",
|
|
67192
|
+
info: theme === "dark" ? "border-primary-500 bg-primary-950" : "border-primary-500 bg-primary-50",
|
|
67193
|
+
loading: theme === "dark" ? "border-gray-500 bg-gray-950" : "border-gray-500 bg-gray-50"
|
|
67194
|
+
};
|
|
67195
|
+
return colors;
|
|
67193
67196
|
};
|
|
67194
67197
|
|
|
67195
67198
|
// src/lib/components/Toast/Toast.tsx
|
|
@@ -67208,13 +67211,14 @@ var Toast = ({
|
|
|
67208
67211
|
...rest
|
|
67209
67212
|
}) => {
|
|
67210
67213
|
const Element = element;
|
|
67214
|
+
const { theme } = useLibTheme();
|
|
67211
67215
|
return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)(
|
|
67212
67216
|
Element,
|
|
67213
67217
|
{
|
|
67214
67218
|
ref,
|
|
67215
67219
|
className: clsx(
|
|
67216
|
-
"relative p-3 border rounded-lg w-full max-w-[400px] overflow-hidden text-
|
|
67217
|
-
genToastColors[status],
|
|
67220
|
+
"relative p-3 border rounded-lg w-full max-w-[400px] overflow-hidden text-font",
|
|
67221
|
+
genToastColors(theme)[status],
|
|
67218
67222
|
"toast",
|
|
67219
67223
|
className
|
|
67220
67224
|
),
|
|
@@ -67265,6 +67269,13 @@ var ToastContainer = ({
|
|
|
67265
67269
|
// src/lib/components/Toast/ToastFn.tsx
|
|
67266
67270
|
var import_react_toastify2 = require("react-toastify");
|
|
67267
67271
|
var import_jsx_runtime335 = require("react/jsx-runtime");
|
|
67272
|
+
var COMMON_STYLES = {
|
|
67273
|
+
padding: 0,
|
|
67274
|
+
height: "unset",
|
|
67275
|
+
minHeight: "unset",
|
|
67276
|
+
overflow: "hidden",
|
|
67277
|
+
borderRadius: "var(--radius-lg)"
|
|
67278
|
+
};
|
|
67268
67279
|
var toast = {
|
|
67269
67280
|
success: (title, options) => import_react_toastify2.toast.success(
|
|
67270
67281
|
({ closeToast }) => /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
|
|
@@ -67281,12 +67292,7 @@ var toast = {
|
|
|
67281
67292
|
...options,
|
|
67282
67293
|
icon: false,
|
|
67283
67294
|
closeButton: false,
|
|
67284
|
-
style:
|
|
67285
|
-
padding: 0,
|
|
67286
|
-
height: "unset",
|
|
67287
|
-
minHeight: "unset",
|
|
67288
|
-
overflow: "hidden"
|
|
67289
|
-
},
|
|
67295
|
+
style: COMMON_STYLES,
|
|
67290
67296
|
autoClose: options?.duration,
|
|
67291
67297
|
className: "!relative !overflow-hidden",
|
|
67292
67298
|
progressClassName: "!bg-success-500 absolute !left-0 !bottom-0"
|
|
@@ -67307,12 +67313,7 @@ var toast = {
|
|
|
67307
67313
|
...options,
|
|
67308
67314
|
icon: false,
|
|
67309
67315
|
closeButton: false,
|
|
67310
|
-
style:
|
|
67311
|
-
padding: 0,
|
|
67312
|
-
height: "unset",
|
|
67313
|
-
minHeight: "unset",
|
|
67314
|
-
overflow: "hidden"
|
|
67315
|
-
},
|
|
67316
|
+
style: COMMON_STYLES,
|
|
67316
67317
|
hideProgressBar: false,
|
|
67317
67318
|
autoClose: options?.duration,
|
|
67318
67319
|
className: "!relative !overflow-hidden",
|
|
@@ -67334,12 +67335,7 @@ var toast = {
|
|
|
67334
67335
|
...options,
|
|
67335
67336
|
icon: false,
|
|
67336
67337
|
closeButton: false,
|
|
67337
|
-
style:
|
|
67338
|
-
padding: 0,
|
|
67339
|
-
height: "unset",
|
|
67340
|
-
minHeight: "unset",
|
|
67341
|
-
overflow: "hidden"
|
|
67342
|
-
},
|
|
67338
|
+
style: COMMON_STYLES,
|
|
67343
67339
|
hideProgressBar: false,
|
|
67344
67340
|
autoClose: options?.duration,
|
|
67345
67341
|
className: "!relative !overflow-hidden",
|
|
@@ -67361,12 +67357,7 @@ var toast = {
|
|
|
67361
67357
|
...options,
|
|
67362
67358
|
icon: false,
|
|
67363
67359
|
closeButton: false,
|
|
67364
|
-
style:
|
|
67365
|
-
padding: 0,
|
|
67366
|
-
height: "unset",
|
|
67367
|
-
minHeight: "unset",
|
|
67368
|
-
overflow: "hidden"
|
|
67369
|
-
},
|
|
67360
|
+
style: COMMON_STYLES,
|
|
67370
67361
|
hideProgressBar: false,
|
|
67371
67362
|
autoClose: options?.duration,
|
|
67372
67363
|
className: "!relative !overflow-hidden",
|
|
@@ -67389,12 +67380,7 @@ var toast = {
|
|
|
67389
67380
|
...options,
|
|
67390
67381
|
icon: false,
|
|
67391
67382
|
closeButton: false,
|
|
67392
|
-
style:
|
|
67393
|
-
padding: 0,
|
|
67394
|
-
height: "unset",
|
|
67395
|
-
minHeight: "unset",
|
|
67396
|
-
overflow: "hidden"
|
|
67397
|
-
},
|
|
67383
|
+
style: COMMON_STYLES,
|
|
67398
67384
|
hideProgressBar: false,
|
|
67399
67385
|
autoClose: options?.duration,
|
|
67400
67386
|
className: "!relative !overflow-hidden",
|
|
@@ -67533,7 +67519,7 @@ var DragListItem = ({
|
|
|
67533
67519
|
{
|
|
67534
67520
|
ref,
|
|
67535
67521
|
className: clsx(
|
|
67536
|
-
"flex items-start gap-2 w-full cursor-grab active:cursor-grabbing",
|
|
67522
|
+
"flex items-start gap-2 bg-background w-full cursor-grab active:cursor-grabbing",
|
|
67537
67523
|
"drag-list-item",
|
|
67538
67524
|
className
|
|
67539
67525
|
),
|