@julseb-lib/react 0.1.70 → 0.1.72
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 +29 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -12
- package/dist/index.d.ts +15 -12
- package/dist/index.js +29 -39
- package/dist/index.js.map +1 -1
- package/dist/types/components-props.d.cts +2 -0
- package/dist/types/components-props.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -66899,6 +66899,8 @@ var Breadcrumbs = ({
|
|
|
66899
66899
|
ref,
|
|
66900
66900
|
children,
|
|
66901
66901
|
separator = "/",
|
|
66902
|
+
accentColor = "primary",
|
|
66903
|
+
textColor = "font",
|
|
66902
66904
|
...rest
|
|
66903
66905
|
}) => {
|
|
66904
66906
|
const Element = element;
|
|
@@ -66909,6 +66911,8 @@ var Breadcrumbs = ({
|
|
|
66909
66911
|
ref,
|
|
66910
66912
|
className: clsx(
|
|
66911
66913
|
"flex flex-wrap items-center gap-2",
|
|
66914
|
+
genLinkColor[accentColor],
|
|
66915
|
+
genTextAllColor[textColor],
|
|
66912
66916
|
"breadcrumbs",
|
|
66913
66917
|
className
|
|
66914
66918
|
),
|
|
@@ -67010,7 +67014,7 @@ var AccordionContent = ({
|
|
|
67010
67014
|
className: clsx(
|
|
67011
67015
|
"overflow-hidden transition-all duration-200 ease",
|
|
67012
67016
|
"py-0 max-h-0 opacity-0",
|
|
67013
|
-
variant === "rounded" && "px-2",
|
|
67017
|
+
variant === "rounded" && "px-2 bg-background",
|
|
67014
67018
|
isOpen && "open py-2 max-h-auto opacity-100",
|
|
67015
67019
|
"accordion-content",
|
|
67016
67020
|
className
|
|
@@ -67180,12 +67184,15 @@ var import_react81 = require("react");
|
|
|
67180
67184
|
var import_bi17 = require("react-icons/bi");
|
|
67181
67185
|
|
|
67182
67186
|
// src/lib/components/Toast/utils.ts
|
|
67183
|
-
var genToastColors = {
|
|
67184
|
-
|
|
67185
|
-
|
|
67186
|
-
|
|
67187
|
-
|
|
67188
|
-
|
|
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;
|
|
67189
67196
|
};
|
|
67190
67197
|
|
|
67191
67198
|
// src/lib/components/Toast/Toast.tsx
|
|
@@ -67204,13 +67211,14 @@ var Toast = ({
|
|
|
67204
67211
|
...rest
|
|
67205
67212
|
}) => {
|
|
67206
67213
|
const Element = element;
|
|
67214
|
+
const { theme } = useLibTheme();
|
|
67207
67215
|
return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)(
|
|
67208
67216
|
Element,
|
|
67209
67217
|
{
|
|
67210
67218
|
ref,
|
|
67211
67219
|
className: clsx(
|
|
67212
|
-
"relative p-3 border rounded-lg w-full max-w-[400px] overflow-hidden text-
|
|
67213
|
-
genToastColors[status],
|
|
67220
|
+
"relative p-3 border rounded-lg w-full max-w-[400px] overflow-hidden text-font",
|
|
67221
|
+
genToastColors(theme)[status],
|
|
67214
67222
|
"toast",
|
|
67215
67223
|
className
|
|
67216
67224
|
),
|
|
@@ -67261,6 +67269,13 @@ var ToastContainer = ({
|
|
|
67261
67269
|
// src/lib/components/Toast/ToastFn.tsx
|
|
67262
67270
|
var import_react_toastify2 = require("react-toastify");
|
|
67263
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
|
+
};
|
|
67264
67279
|
var toast = {
|
|
67265
67280
|
success: (title, options) => import_react_toastify2.toast.success(
|
|
67266
67281
|
({ closeToast }) => /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
|
|
@@ -67277,12 +67292,7 @@ var toast = {
|
|
|
67277
67292
|
...options,
|
|
67278
67293
|
icon: false,
|
|
67279
67294
|
closeButton: false,
|
|
67280
|
-
style:
|
|
67281
|
-
padding: 0,
|
|
67282
|
-
height: "unset",
|
|
67283
|
-
minHeight: "unset",
|
|
67284
|
-
overflow: "hidden"
|
|
67285
|
-
},
|
|
67295
|
+
style: COMMON_STYLES,
|
|
67286
67296
|
autoClose: options?.duration,
|
|
67287
67297
|
className: "!relative !overflow-hidden",
|
|
67288
67298
|
progressClassName: "!bg-success-500 absolute !left-0 !bottom-0"
|
|
@@ -67303,12 +67313,7 @@ var toast = {
|
|
|
67303
67313
|
...options,
|
|
67304
67314
|
icon: false,
|
|
67305
67315
|
closeButton: false,
|
|
67306
|
-
style:
|
|
67307
|
-
padding: 0,
|
|
67308
|
-
height: "unset",
|
|
67309
|
-
minHeight: "unset",
|
|
67310
|
-
overflow: "hidden"
|
|
67311
|
-
},
|
|
67316
|
+
style: COMMON_STYLES,
|
|
67312
67317
|
hideProgressBar: false,
|
|
67313
67318
|
autoClose: options?.duration,
|
|
67314
67319
|
className: "!relative !overflow-hidden",
|
|
@@ -67330,12 +67335,7 @@ var toast = {
|
|
|
67330
67335
|
...options,
|
|
67331
67336
|
icon: false,
|
|
67332
67337
|
closeButton: false,
|
|
67333
|
-
style:
|
|
67334
|
-
padding: 0,
|
|
67335
|
-
height: "unset",
|
|
67336
|
-
minHeight: "unset",
|
|
67337
|
-
overflow: "hidden"
|
|
67338
|
-
},
|
|
67338
|
+
style: COMMON_STYLES,
|
|
67339
67339
|
hideProgressBar: false,
|
|
67340
67340
|
autoClose: options?.duration,
|
|
67341
67341
|
className: "!relative !overflow-hidden",
|
|
@@ -67357,12 +67357,7 @@ var toast = {
|
|
|
67357
67357
|
...options,
|
|
67358
67358
|
icon: false,
|
|
67359
67359
|
closeButton: false,
|
|
67360
|
-
style:
|
|
67361
|
-
padding: 0,
|
|
67362
|
-
height: "unset",
|
|
67363
|
-
minHeight: "unset",
|
|
67364
|
-
overflow: "hidden"
|
|
67365
|
-
},
|
|
67360
|
+
style: COMMON_STYLES,
|
|
67366
67361
|
hideProgressBar: false,
|
|
67367
67362
|
autoClose: options?.duration,
|
|
67368
67363
|
className: "!relative !overflow-hidden",
|
|
@@ -67385,12 +67380,7 @@ var toast = {
|
|
|
67385
67380
|
...options,
|
|
67386
67381
|
icon: false,
|
|
67387
67382
|
closeButton: false,
|
|
67388
|
-
style:
|
|
67389
|
-
padding: 0,
|
|
67390
|
-
height: "unset",
|
|
67391
|
-
minHeight: "unset",
|
|
67392
|
-
overflow: "hidden"
|
|
67393
|
-
},
|
|
67383
|
+
style: COMMON_STYLES,
|
|
67394
67384
|
hideProgressBar: false,
|
|
67395
67385
|
autoClose: options?.duration,
|
|
67396
67386
|
className: "!relative !overflow-hidden",
|