@julseb-lib/react 1.1.25 → 1.1.27
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/{Image-SKLDS4YE.js → Image-4MLJ7FPA.js} +2 -2
- package/dist/{chunk-UHS3R3PM.js → chunk-PXJ4JXEH.js} +3 -1
- package/dist/{chunk-UHS3R3PM.js.map → chunk-PXJ4JXEH.js.map} +1 -1
- package/dist/index.cjs +87 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +86 -79
- package/dist/index.js.map +1 -1
- package/dist/types/global.cjs.map +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/tailwind.cjs.map +1 -1
- package/dist/types/tailwind.d.cts +31 -1
- package/dist/types/tailwind.d.ts +31 -1
- package/package.json +2 -1
- /package/dist/{Image-SKLDS4YE.js.map → Image-4MLJ7FPA.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -2686,6 +2686,7 @@ var init_Image = __esm({
|
|
|
2686
2686
|
caption,
|
|
2687
2687
|
borderRadius,
|
|
2688
2688
|
fit,
|
|
2689
|
+
alt,
|
|
2689
2690
|
...rest
|
|
2690
2691
|
}) => {
|
|
2691
2692
|
const Element = caption ? "figure" : "img";
|
|
@@ -2709,6 +2710,7 @@ var init_Image = __esm({
|
|
|
2709
2710
|
typeof caption === "object" && caption.imgClasses,
|
|
2710
2711
|
"image"
|
|
2711
2712
|
),
|
|
2713
|
+
alt,
|
|
2712
2714
|
...rest
|
|
2713
2715
|
}
|
|
2714
2716
|
),
|
|
@@ -5212,7 +5214,10 @@ var import_react49 = require("react");
|
|
|
5212
5214
|
var import_bi = require("react-icons/bi");
|
|
5213
5215
|
init_Text2();
|
|
5214
5216
|
init_utils();
|
|
5215
|
-
var import_jsx_runtime52 =
|
|
5217
|
+
var import_jsx_runtime52 = (
|
|
5218
|
+
// eslint-disable-next-line
|
|
5219
|
+
require("react/jsx-runtime")
|
|
5220
|
+
);
|
|
5216
5221
|
var InputContainer = ({
|
|
5217
5222
|
className,
|
|
5218
5223
|
element = "div",
|
|
@@ -5569,7 +5574,6 @@ var InputListItem = ({
|
|
|
5569
5574
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
5570
5575
|
"button",
|
|
5571
5576
|
{
|
|
5572
|
-
role: "button",
|
|
5573
5577
|
onClick,
|
|
5574
5578
|
className: clsx(
|
|
5575
5579
|
"flex items-center gap-2 p-2 w-full text-left",
|
|
@@ -6244,42 +6248,49 @@ var InputImage = ({
|
|
|
6244
6248
|
helperBottom,
|
|
6245
6249
|
validation,
|
|
6246
6250
|
className: containerClassName,
|
|
6247
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime74.
|
|
6248
|
-
"
|
|
6251
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6252
|
+
"button",
|
|
6249
6253
|
{
|
|
6250
|
-
htmlFor: id,
|
|
6251
|
-
ref,
|
|
6252
|
-
className: clsx(
|
|
6253
|
-
"relative flex justify-center items-center size-16 overflow-hidden text-primary-500 cursor-pointer",
|
|
6254
|
-
validation?.status === false ? "bg-danger-50 text-danger-500" : "bg-gray-100",
|
|
6255
|
-
disabled && "cursor-not-allowed text-gray-500",
|
|
6256
|
-
genBorderRadius[borderRadius],
|
|
6257
|
-
"input-image-container",
|
|
6258
|
-
className
|
|
6259
|
-
),
|
|
6260
6254
|
onMouseEnter: () => !disabled && setIsHovered(true),
|
|
6261
6255
|
onMouseLeave: () => !disabled && setIsHovered(false),
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6256
|
+
type: "button",
|
|
6257
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6258
|
+
"label",
|
|
6259
|
+
{
|
|
6260
|
+
htmlFor: id,
|
|
6261
|
+
ref,
|
|
6262
|
+
className: clsx(
|
|
6263
|
+
"relative flex justify-center items-center size-16 overflow-hidden text-primary-500 cursor-pointer",
|
|
6264
|
+
validation?.status === false ? "bg-danger-50 text-danger-500" : "bg-gray-100",
|
|
6265
|
+
disabled && "cursor-not-allowed text-gray-500",
|
|
6266
|
+
genBorderRadius[borderRadius],
|
|
6267
|
+
"input-image-container",
|
|
6268
|
+
className
|
|
6269
|
+
),
|
|
6270
|
+
children: [
|
|
6271
|
+
value === "" || !value ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(EmptyContainer, { icons }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6272
|
+
"img",
|
|
6273
|
+
{
|
|
6274
|
+
src: value,
|
|
6275
|
+
alt: "Input",
|
|
6276
|
+
className: "w-full h-full object-cover input-image-image"
|
|
6277
|
+
}
|
|
6278
|
+
),
|
|
6279
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(HoverContainer, { isVisible: isHovered, icons }),
|
|
6280
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6281
|
+
"input",
|
|
6282
|
+
{
|
|
6283
|
+
type: "file",
|
|
6284
|
+
id,
|
|
6285
|
+
disabled,
|
|
6286
|
+
className: "sr-only input-image-input",
|
|
6287
|
+
accept: "image/*",
|
|
6288
|
+
...rest
|
|
6289
|
+
}
|
|
6290
|
+
)
|
|
6291
|
+
]
|
|
6292
|
+
}
|
|
6293
|
+
)
|
|
6283
6294
|
}
|
|
6284
6295
|
)
|
|
6285
6296
|
}
|
|
@@ -66801,7 +66812,6 @@ var InputPhone = ({
|
|
|
66801
66812
|
"input-phone-country-button"
|
|
66802
66813
|
),
|
|
66803
66814
|
onClick: () => setIsOpen(!isOpen),
|
|
66804
|
-
role: "button",
|
|
66805
66815
|
"aria-label": countryButtonAriaLabel,
|
|
66806
66816
|
children: [
|
|
66807
66817
|
country?.flag,
|
|
@@ -66872,7 +66882,8 @@ var InputPhone = ({
|
|
|
66872
66882
|
className: "outline-none w-full input-phone-search",
|
|
66873
66883
|
placeholder: searchPlaceholder,
|
|
66874
66884
|
value: search,
|
|
66875
|
-
onChange: (e) => setSearch(e.target.value)
|
|
66885
|
+
onChange: (e) => setSearch(e.target.value),
|
|
66886
|
+
"aria-label": "Search country"
|
|
66876
66887
|
}
|
|
66877
66888
|
)
|
|
66878
66889
|
]
|
|
@@ -67092,12 +67103,6 @@ var InputSlider = ({
|
|
|
67092
67103
|
"flex items-center gap-2 w-full input-slider-container",
|
|
67093
67104
|
className
|
|
67094
67105
|
),
|
|
67095
|
-
onMouseEnter: () => {
|
|
67096
|
-
if (showValue === "hover") setIsTooltipVisible(true);
|
|
67097
|
-
},
|
|
67098
|
-
onMouseLeave: () => {
|
|
67099
|
-
if (showValue === "hover") setIsTooltipVisible(false);
|
|
67100
|
-
},
|
|
67101
67106
|
children: [
|
|
67102
67107
|
showMinMax && /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(Text, { tag: "small", color: "gray", className: "min-max", children: min }),
|
|
67103
67108
|
/* @__PURE__ */ (0, import_jsx_runtime320.jsxs)("div", { className: "relative w-full slider-wrapper", children: [
|
|
@@ -67126,6 +67131,13 @@ var InputSlider = ({
|
|
|
67126
67131
|
["--cursor-value"]: `${percentage}%`,
|
|
67127
67132
|
background: validation?.status === false ? `linear-gradient(to right, rgb(239 68 68) 0%, rgb(239 68 68) ${percentage}%, rgb(229 231 235) ${percentage}%, rgb(229 231 235) 100%)` : validation?.status === true ? `linear-gradient(to right, rgb(34 197 94) 0%, rgb(34 197 94) ${percentage}%, rgb(229 231 235) ${percentage}%, rgb(229 231 235) 100%)` : `linear-gradient(to right, rgb(59 130 246) 0%, rgb(59 130 246) ${percentage}%, rgb(229 231 235) ${percentage}%, rgb(229 231 235) 100%)`
|
|
67128
67133
|
},
|
|
67134
|
+
onMouseEnter: () => {
|
|
67135
|
+
if (showValue === "hover") setIsTooltipVisible(true);
|
|
67136
|
+
},
|
|
67137
|
+
onMouseLeave: () => {
|
|
67138
|
+
if (showValue === "hover")
|
|
67139
|
+
setIsTooltipVisible(false);
|
|
67140
|
+
},
|
|
67129
67141
|
...inputProps
|
|
67130
67142
|
}
|
|
67131
67143
|
)
|
|
@@ -67574,7 +67586,8 @@ var InputPin = ({
|
|
|
67574
67586
|
"border border-gray-200 size-12 rounded-lg text-center focus:border-primary-500",
|
|
67575
67587
|
validation?.status === false ? "focus:border-danger-500" : validation?.status === true && "focus:border-success-500",
|
|
67576
67588
|
"input-pin"
|
|
67577
|
-
)
|
|
67589
|
+
),
|
|
67590
|
+
"aria-label": `Input pin ${i + 1}`
|
|
67578
67591
|
},
|
|
67579
67592
|
i
|
|
67580
67593
|
);
|
|
@@ -68446,7 +68459,6 @@ var Modal = ({
|
|
|
68446
68459
|
),
|
|
68447
68460
|
onClick: () => setIsOpen(false),
|
|
68448
68461
|
"aria-label": labelClose,
|
|
68449
|
-
role: "button",
|
|
68450
68462
|
type: "button",
|
|
68451
68463
|
children: closeIcon
|
|
68452
68464
|
}
|
|
@@ -68507,7 +68519,6 @@ var DragListItem = ({
|
|
|
68507
68519
|
/* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
68508
68520
|
"button",
|
|
68509
68521
|
{
|
|
68510
|
-
role: "button",
|
|
68511
68522
|
"aria-label": iconLabel,
|
|
68512
68523
|
className: clsx(
|
|
68513
68524
|
"outline-none cursor-grab! active:cursor-grabbing",
|
|
@@ -68823,7 +68834,8 @@ var Paginator = ({
|
|
|
68823
68834
|
"[&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-inner-spin-button]:m-0 [appearance:textfield]",
|
|
68824
68835
|
"paginator-input"
|
|
68825
68836
|
),
|
|
68826
|
-
size: currentPage.toString().length + 1
|
|
68837
|
+
size: currentPage.toString().length + 1,
|
|
68838
|
+
"aria-label": "Change page"
|
|
68827
68839
|
}
|
|
68828
68840
|
),
|
|
68829
68841
|
" ",
|
|
@@ -69247,7 +69259,6 @@ var SlideshowButton = ({
|
|
|
69247
69259
|
onClick,
|
|
69248
69260
|
"aria-label": position === "left" ? controls?.labelPrev ?? "Previous" : controls?.labelNext ?? "Next",
|
|
69249
69261
|
type: "button",
|
|
69250
|
-
role: "button",
|
|
69251
69262
|
children: position === "left" ? controls?.icons?.prev ?? /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
|
|
69252
69263
|
import_bi22.BiChevronLeft,
|
|
69253
69264
|
{
|
|
@@ -69305,6 +69316,7 @@ var SlideshowPagination = ({
|
|
|
69305
69316
|
setActive(i);
|
|
69306
69317
|
handleClick(i);
|
|
69307
69318
|
},
|
|
69319
|
+
"aria-label": `Set image ${i + 1} active`,
|
|
69308
69320
|
children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
|
|
69309
69321
|
"img",
|
|
69310
69322
|
{
|
|
@@ -69312,7 +69324,8 @@ var SlideshowPagination = ({
|
|
|
69312
69324
|
className: clsx(
|
|
69313
69325
|
"w-full h-full object-cover",
|
|
69314
69326
|
"slideshow-thumbnail"
|
|
69315
|
-
)
|
|
69327
|
+
),
|
|
69328
|
+
alt: `Slideshow ${i + 1}`
|
|
69316
69329
|
}
|
|
69317
69330
|
)
|
|
69318
69331
|
},
|
|
@@ -69321,7 +69334,6 @@ var SlideshowPagination = ({
|
|
|
69321
69334
|
"button",
|
|
69322
69335
|
{
|
|
69323
69336
|
className: clsx(
|
|
69324
|
-
"",
|
|
69325
69337
|
type === "dots-outline" ? outlineColor[color ?? "primary"] : genBgColor2[color ?? "primary"],
|
|
69326
69338
|
active === n && "active",
|
|
69327
69339
|
type === "dots" && [
|
|
@@ -69336,7 +69348,8 @@ var SlideshowPagination = ({
|
|
|
69336
69348
|
onClick: () => {
|
|
69337
69349
|
setActive(n);
|
|
69338
69350
|
handleClick(n);
|
|
69339
|
-
}
|
|
69351
|
+
},
|
|
69352
|
+
"aria-label": `Set image ${n + 1} active`
|
|
69340
69353
|
},
|
|
69341
69354
|
n
|
|
69342
69355
|
))
|
|
@@ -69363,7 +69376,6 @@ var outlineColor = {
|
|
|
69363
69376
|
};
|
|
69364
69377
|
|
|
69365
69378
|
// src/lib/components/Slideshow/Slideshow.tsx
|
|
69366
|
-
init_Image2();
|
|
69367
69379
|
init_utils();
|
|
69368
69380
|
var import_jsx_runtime356 = require("react/jsx-runtime");
|
|
69369
69381
|
var Slideshow = ({
|
|
@@ -69526,6 +69538,9 @@ var Slideshow = ({
|
|
|
69526
69538
|
userSelect: "none",
|
|
69527
69539
|
WebkitUserSelect: "none"
|
|
69528
69540
|
},
|
|
69541
|
+
"aria-label": "Slides wrapper",
|
|
69542
|
+
role: "slider",
|
|
69543
|
+
tabIndex: 0,
|
|
69529
69544
|
children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
69530
69545
|
"div",
|
|
69531
69546
|
{
|
|
@@ -69540,27 +69555,21 @@ var Slideshow = ({
|
|
|
69540
69555
|
transitionDuration: `${options?.speed ?? 300}ms`
|
|
69541
69556
|
},
|
|
69542
69557
|
children: images ? images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
69543
|
-
|
|
69558
|
+
LazyImage,
|
|
69544
69559
|
{
|
|
69545
|
-
|
|
69546
|
-
|
|
69547
|
-
|
|
69548
|
-
|
|
69549
|
-
|
|
69550
|
-
|
|
69551
|
-
|
|
69552
|
-
|
|
69553
|
-
|
|
69554
|
-
|
|
69555
|
-
|
|
69556
|
-
|
|
69557
|
-
|
|
69558
|
-
fit: "cover",
|
|
69559
|
-
borderRadius,
|
|
69560
|
-
draggable: false
|
|
69561
|
-
},
|
|
69562
|
-
(0, import_utils122.uuid)()
|
|
69563
|
-
)
|
|
69560
|
+
src: img,
|
|
69561
|
+
alt: `Slideshow image ${i + 1}`,
|
|
69562
|
+
className: clsx(
|
|
69563
|
+
"size-full shrink-0",
|
|
69564
|
+
genObjectFit[imgFit],
|
|
69565
|
+
"slideshow-image"
|
|
69566
|
+
),
|
|
69567
|
+
width: "100%",
|
|
69568
|
+
height: "100%",
|
|
69569
|
+
borderRadius,
|
|
69570
|
+
draggable: false,
|
|
69571
|
+
skeletonClasses: "size-full",
|
|
69572
|
+
skeletonAnimation: "shine"
|
|
69564
69573
|
},
|
|
69565
69574
|
(0, import_utils122.uuid)()
|
|
69566
69575
|
)) : childrenArray.map((child) => /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
@@ -70651,7 +70660,7 @@ var Drawer = ({
|
|
|
70651
70660
|
"[&.open]:opacity-100 [&.open]:visible",
|
|
70652
70661
|
"overlay"
|
|
70653
70662
|
),
|
|
70654
|
-
|
|
70663
|
+
"aria-label": "Close drawer"
|
|
70655
70664
|
}
|
|
70656
70665
|
),
|
|
70657
70666
|
/* @__PURE__ */ (0, import_jsx_runtime371.jsxs)(
|
|
@@ -70799,7 +70808,8 @@ var Header = ({
|
|
|
70799
70808
|
}, [hideOnScroll]);
|
|
70800
70809
|
const burgerProps = {
|
|
70801
70810
|
isOpen,
|
|
70802
|
-
onClick: () => {
|
|
70811
|
+
onClick: (e) => {
|
|
70812
|
+
e.stopPropagation();
|
|
70803
70813
|
if (isOpen) handleClose();
|
|
70804
70814
|
else handleOpen();
|
|
70805
70815
|
},
|
|
@@ -70838,7 +70848,8 @@ var Header = ({
|
|
|
70838
70848
|
ref: el
|
|
70839
70849
|
};
|
|
70840
70850
|
useKeyPress("Escape", handleClose);
|
|
70841
|
-
useClickOutside(el, () => {
|
|
70851
|
+
useClickOutside(el, (e) => {
|
|
70852
|
+
if (e.target?.closest(".header-burger")) return;
|
|
70842
70853
|
if (isOpen) handleClose();
|
|
70843
70854
|
});
|
|
70844
70855
|
return /* @__PURE__ */ (0, import_jsx_runtime373.jsxs)(
|
|
@@ -70883,7 +70894,7 @@ var Header = ({
|
|
|
70883
70894
|
isOpen ? "visible opacity-100" : "invisible opacity-0",
|
|
70884
70895
|
"drawer-overlay"
|
|
70885
70896
|
),
|
|
70886
|
-
|
|
70897
|
+
"aria-label": "Close drawer"
|
|
70887
70898
|
}
|
|
70888
70899
|
),
|
|
70889
70900
|
navDesktopPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime373.jsx)("nav", { ...navProps }),
|