@sikka/hawa 0.41.2-next → 0.42.1-next
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/{DropdownMenu-SFJtRGAw.d.ts → DropdownMenu-DgV8PvW3.d.ts} +1 -0
- package/dist/{DropdownMenu-FVVDS2rX.d.mts → DropdownMenu-dvd9brmT.d.mts} +1 -0
- package/dist/appLayout/index.js +3 -1
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +3 -1
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/appTopbar/index.js +3 -1
- package/dist/appTopbar/index.js.map +1 -1
- package/dist/appTopbar/index.mjs +3 -1
- package/dist/appTopbar/index.mjs.map +1 -1
- package/dist/backToTop/index.js +4 -8
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +4 -8
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/feedback/index.js +2 -4
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.d.mts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +6 -7
- package/dist/blocks/index.mjs +4 -4
- package/dist/blocks/misc/index.js +1 -2
- package/dist/blocks/misc/index.mjs +1 -1
- package/dist/blocks/pricing/index.js +3 -6
- package/dist/blocks/pricing/index.mjs +2 -2
- package/dist/carousel/index.js +1 -2
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +1 -2
- package/dist/carousel/index.mjs.map +1 -1
- package/dist/{chunk-SYGWSBJL.mjs → chunk-2LUXOXAL.mjs} +1 -2
- package/dist/{chunk-FP6763YO.mjs → chunk-DBOKFWWD.mjs} +3 -1
- package/dist/{chunk-K5S7P5ZO.mjs → chunk-DGM7WFJR.mjs} +2 -4
- package/dist/{chunk-2GEXJLRC.mjs → chunk-OXZBK6KQ.mjs} +1 -1
- package/dist/{chunk-7R25FOBM.mjs → chunk-Q3IS4SMU.mjs} +5 -8
- package/dist/{chunk-XCW5YNMS.mjs → chunk-QUN7JBW3.mjs} +1 -2
- package/dist/{chunk-I3AK6DXN.mjs → chunk-RGOMP4PW.mjs} +1 -2
- package/dist/codeBlock/index.mjs +1 -2
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/command/index.js +1 -2
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +1 -2
- package/dist/command/index.mjs.map +1 -1
- package/dist/dataTable/index.d.mts +7 -1
- package/dist/dataTable/index.d.ts +7 -1
- package/dist/dataTable/index.js +55 -12
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +55 -12
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/dropdownMenu/index.d.mts +1 -0
- package/dist/dropdownMenu/index.d.ts +1 -0
- package/dist/dropdownMenu/index.js +3 -1
- package/dist/dropdownMenu/index.js.map +1 -1
- package/dist/dropdownMenu/index.mjs +3 -1
- package/dist/dropdownMenu/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +8 -2
- package/dist/elements/index.d.ts +8 -2
- package/dist/elements/index.js +70 -42
- package/dist/elements/index.mjs +69 -40
- package/dist/glow/index.js +1 -2
- package/dist/glow/index.js.map +1 -1
- package/dist/glow/index.mjs +1 -2
- package/dist/glow/index.mjs.map +1 -1
- package/dist/hooks/index.js +1 -2
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.css +6 -0
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +71 -44
- package/dist/index.mjs +72 -46
- package/dist/interfaceSettings/index.js +2 -4
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +2 -4
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +3 -1
- package/dist/layout/index.mjs +3 -3
- package/dist/passwordInput/index.js +5 -10
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +5 -10
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/radio/index.js +2 -4
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +2 -4
- package/dist/radio/index.mjs.map +1 -1
- package/dist/scrollArea/index.js +1 -2
- package/dist/scrollArea/index.js.map +1 -1
- package/dist/scrollArea/index.mjs +1 -2
- package/dist/scrollArea/index.mjs.map +1 -1
- package/dist/scrollIndicator/index.js +1 -2
- package/dist/scrollIndicator/index.js.map +1 -1
- package/dist/scrollIndicator/index.mjs +1 -2
- package/dist/scrollIndicator/index.mjs.map +1 -1
- package/dist/splitButton/index.js +3 -1
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +3 -1
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/tabs/index.js +1 -2
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +1 -2
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
@@ -2309,6 +2309,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
2309
2309
|
.\!hawa-bg-destructive\/\[0\.3\] {
|
2310
2310
|
background-color: hsl(var(--destructive) / 0.3) !important;
|
2311
2311
|
}
|
2312
|
+
.\!hawa-bg-primary {
|
2313
|
+
background-color: hsl(var(--primary)) !important;
|
2314
|
+
}
|
2312
2315
|
.\!hawa-bg-transparent {
|
2313
2316
|
background-color: transparent !important;
|
2314
2317
|
}
|
@@ -2907,6 +2910,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
2907
2910
|
.hawa-tracking-widest {
|
2908
2911
|
letter-spacing: 0.1em;
|
2909
2912
|
}
|
2913
|
+
.\!hawa-text-primary-foreground {
|
2914
|
+
color: hsl(var(--primary-foreground)) !important;
|
2915
|
+
}
|
2910
2916
|
.hawa-text-\[\#666666\] {
|
2911
2917
|
--tw-text-opacity: 1;
|
2912
2918
|
color: rgb(102 102 102 / var(--tw-text-opacity));
|
package/dist/index.d.mts
CHANGED
@@ -183,6 +183,7 @@ interface DropdownMenuProps {
|
|
183
183
|
side?: ExtendedDropdownMenuContentProps["side"];
|
184
184
|
align?: ExtendedDropdownMenuContentProps["align"];
|
185
185
|
alignOffset?: ExtendedDropdownMenuContentProps["alignOffset"];
|
186
|
+
contentProps?: ExtendedDropdownMenuContentProps;
|
186
187
|
width?: "default" | "sm" | "lg" | "parent";
|
187
188
|
size?: "default" | "sm";
|
188
189
|
onItemSelect?: any;
|
@@ -500,6 +501,12 @@ type DataTableProps<DataProps = {}> = {
|
|
500
501
|
enableHideColumns?: boolean;
|
501
502
|
enableGoTo?: boolean;
|
502
503
|
enableSelection?: boolean;
|
504
|
+
enableFiltering?: boolean;
|
505
|
+
filters?: {
|
506
|
+
accessorKey: string;
|
507
|
+
value: string;
|
508
|
+
label: string;
|
509
|
+
}[];
|
503
510
|
hideHeader?: boolean;
|
504
511
|
data: DataProps[];
|
505
512
|
itemsPerPage?: any[];
|
@@ -533,7 +540,7 @@ declare module "@tanstack/table-core" {
|
|
533
540
|
i18nKey?: string;
|
534
541
|
}
|
535
542
|
}
|
536
|
-
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSelection, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
543
|
+
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
537
544
|
|
538
545
|
type BackToTopTypes = {
|
539
546
|
/** Horizontal padding relative to the attached corner */
|
package/dist/index.d.ts
CHANGED
@@ -183,6 +183,7 @@ interface DropdownMenuProps {
|
|
183
183
|
side?: ExtendedDropdownMenuContentProps["side"];
|
184
184
|
align?: ExtendedDropdownMenuContentProps["align"];
|
185
185
|
alignOffset?: ExtendedDropdownMenuContentProps["alignOffset"];
|
186
|
+
contentProps?: ExtendedDropdownMenuContentProps;
|
186
187
|
width?: "default" | "sm" | "lg" | "parent";
|
187
188
|
size?: "default" | "sm";
|
188
189
|
onItemSelect?: any;
|
@@ -500,6 +501,12 @@ type DataTableProps<DataProps = {}> = {
|
|
500
501
|
enableHideColumns?: boolean;
|
501
502
|
enableGoTo?: boolean;
|
502
503
|
enableSelection?: boolean;
|
504
|
+
enableFiltering?: boolean;
|
505
|
+
filters?: {
|
506
|
+
accessorKey: string;
|
507
|
+
value: string;
|
508
|
+
label: string;
|
509
|
+
}[];
|
503
510
|
hideHeader?: boolean;
|
504
511
|
data: DataProps[];
|
505
512
|
itemsPerPage?: any[];
|
@@ -533,7 +540,7 @@ declare module "@tanstack/table-core" {
|
|
533
540
|
i18nKey?: string;
|
534
541
|
}
|
535
542
|
}
|
536
|
-
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSelection, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
543
|
+
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
537
544
|
|
538
545
|
type BackToTopTypes = {
|
539
546
|
/** Horizontal padding relative to the attached corner */
|
package/dist/index.js
CHANGED
@@ -896,6 +896,7 @@ var DropdownMenu = ({
|
|
896
896
|
side,
|
897
897
|
className,
|
898
898
|
classNames,
|
899
|
+
contentProps,
|
899
900
|
triggerClassname,
|
900
901
|
triggerProps,
|
901
902
|
align,
|
@@ -953,7 +954,8 @@ var DropdownMenu = ({
|
|
953
954
|
),
|
954
955
|
style: {
|
955
956
|
maxHeight: "var(--radix-dropdown-menu-content-available-height)"
|
956
|
-
}
|
957
|
+
},
|
958
|
+
...contentProps
|
957
959
|
},
|
958
960
|
header && header,
|
959
961
|
items && items.map((item, index) => {
|
@@ -3301,11 +3303,12 @@ var DataTable = ({
|
|
3301
3303
|
translateFn,
|
3302
3304
|
enableHideColumns,
|
3303
3305
|
enableSelection,
|
3306
|
+
enableFiltering,
|
3304
3307
|
enableSearch,
|
3305
3308
|
enableGoTo,
|
3306
3309
|
...props
|
3307
3310
|
}) => {
|
3308
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
3311
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
3309
3312
|
const [sorting, setSorting] = React24.useState(
|
3310
3313
|
props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
|
3311
3314
|
);
|
@@ -3319,6 +3322,7 @@ var DataTable = ({
|
|
3319
3322
|
return savedVisibility ? JSON.parse(savedVisibility) : {};
|
3320
3323
|
});
|
3321
3324
|
const [rowSelection, setRowSelection] = React24.useState({});
|
3325
|
+
const [selectedFilters, setSelectedFilters] = React24.useState([]);
|
3322
3326
|
let mainColumns = enableSelection ? [
|
3323
3327
|
{
|
3324
3328
|
id: "select",
|
@@ -3398,6 +3402,19 @@ var DataTable = ({
|
|
3398
3402
|
return newColumnVisibility;
|
3399
3403
|
});
|
3400
3404
|
}, [columns]);
|
3405
|
+
React24.useEffect(() => {
|
3406
|
+
var _a2;
|
3407
|
+
(_a2 = props.filters) == null ? void 0 : _a2.forEach((filter) => {
|
3408
|
+
var _a3;
|
3409
|
+
const activeFilter = selectedFilters.find(
|
3410
|
+
(selectedFilter) => {
|
3411
|
+
var _a4, _b2;
|
3412
|
+
return filter.accessorKey === ((_b2 = (_a4 = props.filters) == null ? void 0 : _a4.find((f) => f.value === selectedFilter)) == null ? void 0 : _b2.accessorKey);
|
3413
|
+
}
|
3414
|
+
);
|
3415
|
+
(_a3 = table.getColumn(filter.accessorKey)) == null ? void 0 : _a3.setFilterValue(activeFilter || "");
|
3416
|
+
});
|
3417
|
+
}, [selectedFilters, props.filters]);
|
3401
3418
|
return /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-4" }, (enableSearch || enableHideColumns) && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-4" }, enableSearch && /* @__PURE__ */ React24.createElement(
|
3402
3419
|
Input,
|
3403
3420
|
{
|
@@ -3481,7 +3498,33 @@ var DataTable = ({
|
|
3481
3498
|
) : column.id
|
3482
3499
|
);
|
3483
3500
|
})
|
3484
|
-
))),
|
3501
|
+
))), enableFiltering && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex-row hawa-gap-2 hawa-flex" }, (_e = props.filters) == null ? void 0 : _e.map((filter) => {
|
3502
|
+
return /* @__PURE__ */ React24.createElement(
|
3503
|
+
Button,
|
3504
|
+
{
|
3505
|
+
variant: "outline",
|
3506
|
+
className: selectedFilters.includes(filter.value) ? "!hawa-bg-primary !hawa-text-primary-foreground" : "",
|
3507
|
+
size: "xs",
|
3508
|
+
onClick: () => {
|
3509
|
+
var _a2, _b2;
|
3510
|
+
let newSelectedFilters = selectedFilters.filter(
|
3511
|
+
(item) => {
|
3512
|
+
var _a3, _b3;
|
3513
|
+
return ((_b3 = (_a3 = props.filters) == null ? void 0 : _a3.find((f) => f.value === item)) == null ? void 0 : _b3.accessorKey) !== filter.accessorKey;
|
3514
|
+
}
|
3515
|
+
);
|
3516
|
+
if (!selectedFilters.includes(filter.value)) {
|
3517
|
+
newSelectedFilters.push(filter.value);
|
3518
|
+
(_a2 = table.getColumn(filter.accessorKey)) == null ? void 0 : _a2.setFilterValue(filter.value);
|
3519
|
+
} else {
|
3520
|
+
(_b2 = table.getColumn(filter.accessorKey)) == null ? void 0 : _b2.setFilterValue("");
|
3521
|
+
}
|
3522
|
+
setSelectedFilters(newSelectedFilters);
|
3523
|
+
}
|
3524
|
+
},
|
3525
|
+
filter.label
|
3526
|
+
);
|
3527
|
+
})), props.isLoading ? /* @__PURE__ */ React24.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React24.createElement(
|
3485
3528
|
"div",
|
3486
3529
|
{
|
3487
3530
|
className: cn(
|
@@ -3510,7 +3553,7 @@ var DataTable = ({
|
|
3510
3553
|
header.getContext()
|
3511
3554
|
)
|
3512
3555
|
);
|
3513
|
-
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((
|
3556
|
+
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((_f = table.getRowModel().rows) == null ? void 0 : _f.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React24.createElement(
|
3514
3557
|
TableRow,
|
3515
3558
|
{
|
3516
3559
|
key: row.id,
|
@@ -3542,7 +3585,7 @@ var DataTable = ({
|
|
3542
3585
|
colSpan: columns.length,
|
3543
3586
|
className: "hawa-h-24 hawa-text-center"
|
3544
3587
|
},
|
3545
|
-
(
|
3588
|
+
(_g = props.texts) == null ? void 0 : _g.noData
|
3546
3589
|
))))),
|
3547
3590
|
/* @__PURE__ */ React24.createElement(
|
3548
3591
|
"div",
|
@@ -3559,7 +3602,7 @@ var DataTable = ({
|
|
3559
3602
|
className: "hawa-text-muted-foreground hawa-text-sm",
|
3560
3603
|
dir: props.direction
|
3561
3604
|
},
|
3562
|
-
/* @__PURE__ */ React24.createElement("span", null, (
|
3605
|
+
/* @__PURE__ */ React24.createElement("span", null, (_h = props.texts) == null ? void 0 : _h.total),
|
3563
3606
|
" ",
|
3564
3607
|
/* @__PURE__ */ React24.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
|
3565
3608
|
), props.showCount && table.getFilteredSelectedRowModel().rows.length > 0 && props.showSelectionCount && /* @__PURE__ */ React24.createElement("div", { className: "hawa-w-[0.5px] hawa-mx-2 hawa-bg-red-500 hawa-h-full" }), table.getFilteredSelectedRowModel().rows.length > 0 && props.showSelectionCount && /* @__PURE__ */ React24.createElement(
|
@@ -3570,11 +3613,11 @@ var DataTable = ({
|
|
3570
3613
|
},
|
3571
3614
|
table.getFilteredSelectedRowModel().rows.length,
|
3572
3615
|
" ",
|
3573
|
-
(
|
3616
|
+
(_i = props.texts) == null ? void 0 : _i.of,
|
3574
3617
|
" ",
|
3575
3618
|
table.getFilteredRowModel().rows.length,
|
3576
3619
|
" ",
|
3577
|
-
(
|
3620
|
+
(_j = props.texts) == null ? void 0 : _j.selectedRows
|
3578
3621
|
)), table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "" }, /* @__PURE__ */ React24.createElement(
|
3579
3622
|
DropdownMenu,
|
3580
3623
|
{
|
@@ -3587,10 +3630,10 @@ var DataTable = ({
|
|
3587
3630
|
table.getFilteredSelectedRowModel().rows
|
3588
3631
|
)
|
3589
3632
|
})),
|
3590
|
-
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((
|
3633
|
+
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((_k = props.texts) == null ? void 0 : _k.bulkAction) || "Bulk Action")
|
3591
3634
|
}
|
3592
3635
|
))) : null,
|
3593
|
-
/* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-items-center hawa-gap-2 hawa-bg--500 tablet:hawa-w-fit hawa-justify-between" }, enableGoTo && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-text-sm" }, (
|
3636
|
+
/* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-items-center hawa-gap-2 hawa-bg--500 tablet:hawa-w-fit hawa-justify-between" }, enableGoTo && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-text-sm" }, (_l = props.texts) == null ? void 0 : _l.goTo), /* @__PURE__ */ React24.createElement(
|
3594
3637
|
"input",
|
3595
3638
|
{
|
3596
3639
|
max: table.getPageCount(),
|
@@ -3627,11 +3670,11 @@ var DataTable = ({
|
|
3627
3670
|
size: "icon",
|
3628
3671
|
className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 hawa-whitespace-nowrap"
|
3629
3672
|
},
|
3630
|
-
`${table.getState().pagination.pageSize} / ${(
|
3673
|
+
`${table.getState().pagination.pageSize} / ${(_m = props.texts) == null ? void 0 : _m.page}`
|
3631
3674
|
),
|
3632
3675
|
onItemSelect: (e) => table.setPageSize(Number(e))
|
3633
3676
|
}
|
3634
|
-
), table.getPageCount() > 1 && /* @__PURE__ */ React24.createElement("div", { className: "hawa-bg--500 hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-bg--500 hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React24.createElement("div", null, (
|
3677
|
+
), table.getPageCount() > 1 && /* @__PURE__ */ React24.createElement("div", { className: "hawa-bg--500 hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-bg--500 hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React24.createElement("div", null, (_n = props.texts) == null ? void 0 : _n.page), /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-1" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-font-bold" }, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React24.createElement("span", null, (_o = props.texts) == null ? void 0 : _o.of), /* @__PURE__ */ React24.createElement("span", { className: "hawa-font-bold" }, table.getPageCount())))), /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-items-center hawa-bg--500" }, /* @__PURE__ */ React24.createElement(
|
3635
3678
|
Button,
|
3636
3679
|
{
|
3637
3680
|
"aria-label": "Next Table Page",
|
@@ -3780,15 +3823,12 @@ var BackToTop = ({ ...props }) => {
|
|
3780
3823
|
}
|
3781
3824
|
};
|
3782
3825
|
(0, import_react12.useEffect)(() => {
|
3783
|
-
if (!props.anchor.current)
|
3784
|
-
return;
|
3826
|
+
if (!props.anchor.current) return;
|
3785
3827
|
props.anchor.current.addEventListener("scroll", onScroll);
|
3786
3828
|
let interval = setInterval(() => {
|
3787
|
-
if (!props.anchor.current)
|
3788
|
-
return;
|
3829
|
+
if (!props.anchor.current) return;
|
3789
3830
|
let newRect = props.anchor.current.getBoundingClientRect();
|
3790
|
-
if (_rect.current == null)
|
3791
|
-
return setRect(newRect);
|
3831
|
+
if (_rect.current == null) return setRect(newRect);
|
3792
3832
|
if (!(_rect.current.top == newRect.top && _rect.current.left == newRect.left && _rect.current.width == newRect.width && _rect.current.height == newRect.height)) {
|
3793
3833
|
setRect(newRect);
|
3794
3834
|
}
|
@@ -3801,8 +3841,7 @@ var BackToTop = ({ ...props }) => {
|
|
3801
3841
|
}, [onScroll, props.anchor]);
|
3802
3842
|
const getStyles = () => {
|
3803
3843
|
var _a;
|
3804
|
-
if (!props.anchor.current || !self.current)
|
3805
|
-
return {};
|
3844
|
+
if (!props.anchor.current || !self.current) return {};
|
3806
3845
|
let corner = props.corner || "bottom-right";
|
3807
3846
|
let [vertical, horizontal] = corner.split("-");
|
3808
3847
|
let anchorRect = props.anchor.current.getBoundingClientRect();
|
@@ -4023,8 +4062,7 @@ var Radio = (0, import_react13.forwardRef)(
|
|
4023
4062
|
{
|
4024
4063
|
"aria-current": "page",
|
4025
4064
|
onClick: () => {
|
4026
|
-
if (props.disabled || opt.disabled)
|
4027
|
-
return;
|
4065
|
+
if (props.disabled || opt.disabled) return;
|
4028
4066
|
handleChange(opt);
|
4029
4067
|
},
|
4030
4068
|
className: cn(
|
@@ -4043,8 +4081,7 @@ var Radio = (0, import_react13.forwardRef)(
|
|
4043
4081
|
key: o,
|
4044
4082
|
"aria-current": "page",
|
4045
4083
|
onClick: () => {
|
4046
|
-
if (props.disabled || opt.disabled)
|
4047
|
-
return;
|
4084
|
+
if (props.disabled || opt.disabled) return;
|
4048
4085
|
handleChange(opt);
|
4049
4086
|
},
|
4050
4087
|
className: cn(
|
@@ -4331,8 +4368,7 @@ var FullCommand = ({
|
|
4331
4368
|
{
|
4332
4369
|
key: subIndex,
|
4333
4370
|
onSelect: () => {
|
4334
|
-
if (onActionClick)
|
4335
|
-
onActionClick();
|
4371
|
+
if (onActionClick) onActionClick();
|
4336
4372
|
subItem.action();
|
4337
4373
|
}
|
4338
4374
|
},
|
@@ -4926,8 +4962,7 @@ function toast({ ...props }) {
|
|
4926
4962
|
id,
|
4927
4963
|
open: true,
|
4928
4964
|
onOpenChange: (open) => {
|
4929
|
-
if (!open)
|
4930
|
-
dismiss();
|
4965
|
+
if (!open) dismiss();
|
4931
4966
|
}
|
4932
4967
|
}
|
4933
4968
|
});
|
@@ -5435,8 +5470,7 @@ var ScrollArea = React41.forwardRef(({ className, children, orientation = "verti
|
|
5435
5470
|
document.addEventListener("mouseup", onMouseUp);
|
5436
5471
|
};
|
5437
5472
|
const onMouseMove = (e) => {
|
5438
|
-
if (!isDragging.current || !scrollAreaRef.current)
|
5439
|
-
return;
|
5473
|
+
if (!isDragging.current || !scrollAreaRef.current) return;
|
5440
5474
|
const dx = e.clientX - startPos.current.x;
|
5441
5475
|
const dy = e.clientY - startPos.current.y;
|
5442
5476
|
if (orientation === "vertical") {
|
@@ -8561,16 +8595,11 @@ var PasswordInput = ({
|
|
8561
8595
|
(0, import_react49.useEffect)(() => {
|
8562
8596
|
const calculateStrength = () => {
|
8563
8597
|
let strengthScore = 0;
|
8564
|
-
if (lengthCriteriaMet)
|
8565
|
-
|
8566
|
-
if (
|
8567
|
-
|
8568
|
-
if (
|
8569
|
-
strengthScore += 1;
|
8570
|
-
if (lowercaseCriteriaMet)
|
8571
|
-
strengthScore += 1;
|
8572
|
-
if (uppercaseCriteriaMet)
|
8573
|
-
strengthScore += 1;
|
8598
|
+
if (lengthCriteriaMet) strengthScore += 1;
|
8599
|
+
if (numberCriteriaMet) strengthScore += 1;
|
8600
|
+
if (specialCharCriteriaMet) strengthScore += 1;
|
8601
|
+
if (lowercaseCriteriaMet) strengthScore += 1;
|
8602
|
+
if (uppercaseCriteriaMet) strengthScore += 1;
|
8574
8603
|
return strengthScore;
|
8575
8604
|
};
|
8576
8605
|
const currentStrengthScore = calculateStrength();
|
@@ -8772,8 +8801,7 @@ var ScrollIndicator = ({
|
|
8772
8801
|
}
|
8773
8802
|
};
|
8774
8803
|
(0, import_react50.useEffect)(() => {
|
8775
|
-
if (!anchor.current)
|
8776
|
-
return;
|
8804
|
+
if (!anchor.current) return;
|
8777
8805
|
anchor.current.addEventListener("scroll", onScroll);
|
8778
8806
|
return () => {
|
8779
8807
|
var _a;
|
@@ -8991,8 +9019,7 @@ var Carousel = ({
|
|
8991
9019
|
}, autoplayInterval);
|
8992
9020
|
}
|
8993
9021
|
return () => {
|
8994
|
-
if (autoplayTimer)
|
8995
|
-
clearInterval(autoplayTimer);
|
9022
|
+
if (autoplayTimer) clearInterval(autoplayTimer);
|
8996
9023
|
};
|
8997
9024
|
}, [emblaApi, autoplay, autoplayInterval]);
|
8998
9025
|
const length = import_react52.default.Children.count(items);
|
package/dist/index.mjs
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
3
3
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
4
4
|
}) : x)(function(x) {
|
5
|
-
if (typeof require !== "undefined")
|
6
|
-
return require.apply(this, arguments);
|
5
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
7
6
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
8
7
|
});
|
9
8
|
|
@@ -645,6 +644,7 @@ var DropdownMenu = ({
|
|
645
644
|
side,
|
646
645
|
className,
|
647
646
|
classNames,
|
647
|
+
contentProps,
|
648
648
|
triggerClassname,
|
649
649
|
triggerProps,
|
650
650
|
align,
|
@@ -702,7 +702,8 @@ var DropdownMenu = ({
|
|
702
702
|
),
|
703
703
|
style: {
|
704
704
|
maxHeight: "var(--radix-dropdown-menu-content-available-height)"
|
705
|
-
}
|
705
|
+
},
|
706
|
+
...contentProps
|
706
707
|
},
|
707
708
|
header && header,
|
708
709
|
items && items.map((item, index) => {
|
@@ -3058,11 +3059,12 @@ var DataTable = ({
|
|
3058
3059
|
translateFn,
|
3059
3060
|
enableHideColumns,
|
3060
3061
|
enableSelection,
|
3062
|
+
enableFiltering,
|
3061
3063
|
enableSearch,
|
3062
3064
|
enableGoTo,
|
3063
3065
|
...props
|
3064
3066
|
}) => {
|
3065
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
3067
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
3066
3068
|
const [sorting, setSorting] = React24.useState(
|
3067
3069
|
props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
|
3068
3070
|
);
|
@@ -3076,6 +3078,7 @@ var DataTable = ({
|
|
3076
3078
|
return savedVisibility ? JSON.parse(savedVisibility) : {};
|
3077
3079
|
});
|
3078
3080
|
const [rowSelection, setRowSelection] = React24.useState({});
|
3081
|
+
const [selectedFilters, setSelectedFilters] = React24.useState([]);
|
3079
3082
|
let mainColumns = enableSelection ? [
|
3080
3083
|
{
|
3081
3084
|
id: "select",
|
@@ -3155,6 +3158,19 @@ var DataTable = ({
|
|
3155
3158
|
return newColumnVisibility;
|
3156
3159
|
});
|
3157
3160
|
}, [columns]);
|
3161
|
+
React24.useEffect(() => {
|
3162
|
+
var _a2;
|
3163
|
+
(_a2 = props.filters) == null ? void 0 : _a2.forEach((filter) => {
|
3164
|
+
var _a3;
|
3165
|
+
const activeFilter = selectedFilters.find(
|
3166
|
+
(selectedFilter) => {
|
3167
|
+
var _a4, _b2;
|
3168
|
+
return filter.accessorKey === ((_b2 = (_a4 = props.filters) == null ? void 0 : _a4.find((f) => f.value === selectedFilter)) == null ? void 0 : _b2.accessorKey);
|
3169
|
+
}
|
3170
|
+
);
|
3171
|
+
(_a3 = table.getColumn(filter.accessorKey)) == null ? void 0 : _a3.setFilterValue(activeFilter || "");
|
3172
|
+
});
|
3173
|
+
}, [selectedFilters, props.filters]);
|
3158
3174
|
return /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-4" }, (enableSearch || enableHideColumns) && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-4" }, enableSearch && /* @__PURE__ */ React24.createElement(
|
3159
3175
|
Input,
|
3160
3176
|
{
|
@@ -3238,7 +3254,33 @@ var DataTable = ({
|
|
3238
3254
|
) : column.id
|
3239
3255
|
);
|
3240
3256
|
})
|
3241
|
-
))),
|
3257
|
+
))), enableFiltering && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex-row hawa-gap-2 hawa-flex" }, (_e = props.filters) == null ? void 0 : _e.map((filter) => {
|
3258
|
+
return /* @__PURE__ */ React24.createElement(
|
3259
|
+
Button,
|
3260
|
+
{
|
3261
|
+
variant: "outline",
|
3262
|
+
className: selectedFilters.includes(filter.value) ? "!hawa-bg-primary !hawa-text-primary-foreground" : "",
|
3263
|
+
size: "xs",
|
3264
|
+
onClick: () => {
|
3265
|
+
var _a2, _b2;
|
3266
|
+
let newSelectedFilters = selectedFilters.filter(
|
3267
|
+
(item) => {
|
3268
|
+
var _a3, _b3;
|
3269
|
+
return ((_b3 = (_a3 = props.filters) == null ? void 0 : _a3.find((f) => f.value === item)) == null ? void 0 : _b3.accessorKey) !== filter.accessorKey;
|
3270
|
+
}
|
3271
|
+
);
|
3272
|
+
if (!selectedFilters.includes(filter.value)) {
|
3273
|
+
newSelectedFilters.push(filter.value);
|
3274
|
+
(_a2 = table.getColumn(filter.accessorKey)) == null ? void 0 : _a2.setFilterValue(filter.value);
|
3275
|
+
} else {
|
3276
|
+
(_b2 = table.getColumn(filter.accessorKey)) == null ? void 0 : _b2.setFilterValue("");
|
3277
|
+
}
|
3278
|
+
setSelectedFilters(newSelectedFilters);
|
3279
|
+
}
|
3280
|
+
},
|
3281
|
+
filter.label
|
3282
|
+
);
|
3283
|
+
})), props.isLoading ? /* @__PURE__ */ React24.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React24.createElement(
|
3242
3284
|
"div",
|
3243
3285
|
{
|
3244
3286
|
className: cn(
|
@@ -3267,7 +3309,7 @@ var DataTable = ({
|
|
3267
3309
|
header.getContext()
|
3268
3310
|
)
|
3269
3311
|
);
|
3270
|
-
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((
|
3312
|
+
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((_f = table.getRowModel().rows) == null ? void 0 : _f.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React24.createElement(
|
3271
3313
|
TableRow,
|
3272
3314
|
{
|
3273
3315
|
key: row.id,
|
@@ -3299,7 +3341,7 @@ var DataTable = ({
|
|
3299
3341
|
colSpan: columns.length,
|
3300
3342
|
className: "hawa-h-24 hawa-text-center"
|
3301
3343
|
},
|
3302
|
-
(
|
3344
|
+
(_g = props.texts) == null ? void 0 : _g.noData
|
3303
3345
|
))))),
|
3304
3346
|
/* @__PURE__ */ React24.createElement(
|
3305
3347
|
"div",
|
@@ -3316,7 +3358,7 @@ var DataTable = ({
|
|
3316
3358
|
className: "hawa-text-muted-foreground hawa-text-sm",
|
3317
3359
|
dir: props.direction
|
3318
3360
|
},
|
3319
|
-
/* @__PURE__ */ React24.createElement("span", null, (
|
3361
|
+
/* @__PURE__ */ React24.createElement("span", null, (_h = props.texts) == null ? void 0 : _h.total),
|
3320
3362
|
" ",
|
3321
3363
|
/* @__PURE__ */ React24.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
|
3322
3364
|
), props.showCount && table.getFilteredSelectedRowModel().rows.length > 0 && props.showSelectionCount && /* @__PURE__ */ React24.createElement("div", { className: "hawa-w-[0.5px] hawa-mx-2 hawa-bg-red-500 hawa-h-full" }), table.getFilteredSelectedRowModel().rows.length > 0 && props.showSelectionCount && /* @__PURE__ */ React24.createElement(
|
@@ -3327,11 +3369,11 @@ var DataTable = ({
|
|
3327
3369
|
},
|
3328
3370
|
table.getFilteredSelectedRowModel().rows.length,
|
3329
3371
|
" ",
|
3330
|
-
(
|
3372
|
+
(_i = props.texts) == null ? void 0 : _i.of,
|
3331
3373
|
" ",
|
3332
3374
|
table.getFilteredRowModel().rows.length,
|
3333
3375
|
" ",
|
3334
|
-
(
|
3376
|
+
(_j = props.texts) == null ? void 0 : _j.selectedRows
|
3335
3377
|
)), table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "" }, /* @__PURE__ */ React24.createElement(
|
3336
3378
|
DropdownMenu,
|
3337
3379
|
{
|
@@ -3344,10 +3386,10 @@ var DataTable = ({
|
|
3344
3386
|
table.getFilteredSelectedRowModel().rows
|
3345
3387
|
)
|
3346
3388
|
})),
|
3347
|
-
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((
|
3389
|
+
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((_k = props.texts) == null ? void 0 : _k.bulkAction) || "Bulk Action")
|
3348
3390
|
}
|
3349
3391
|
))) : null,
|
3350
|
-
/* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-items-center hawa-gap-2 hawa-bg--500 tablet:hawa-w-fit hawa-justify-between" }, enableGoTo && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-text-sm" }, (
|
3392
|
+
/* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-items-center hawa-gap-2 hawa-bg--500 tablet:hawa-w-fit hawa-justify-between" }, enableGoTo && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-text-sm" }, (_l = props.texts) == null ? void 0 : _l.goTo), /* @__PURE__ */ React24.createElement(
|
3351
3393
|
"input",
|
3352
3394
|
{
|
3353
3395
|
max: table.getPageCount(),
|
@@ -3384,11 +3426,11 @@ var DataTable = ({
|
|
3384
3426
|
size: "icon",
|
3385
3427
|
className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 hawa-whitespace-nowrap"
|
3386
3428
|
},
|
3387
|
-
`${table.getState().pagination.pageSize} / ${(
|
3429
|
+
`${table.getState().pagination.pageSize} / ${(_m = props.texts) == null ? void 0 : _m.page}`
|
3388
3430
|
),
|
3389
3431
|
onItemSelect: (e) => table.setPageSize(Number(e))
|
3390
3432
|
}
|
3391
|
-
), table.getPageCount() > 1 && /* @__PURE__ */ React24.createElement("div", { className: "hawa-bg--500 hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-bg--500 hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React24.createElement("div", null, (
|
3433
|
+
), table.getPageCount() > 1 && /* @__PURE__ */ React24.createElement("div", { className: "hawa-bg--500 hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-bg--500 hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React24.createElement("div", null, (_n = props.texts) == null ? void 0 : _n.page), /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-1" }, /* @__PURE__ */ React24.createElement("span", { className: "hawa-font-bold" }, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React24.createElement("span", null, (_o = props.texts) == null ? void 0 : _o.of), /* @__PURE__ */ React24.createElement("span", { className: "hawa-font-bold" }, table.getPageCount())))), /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-items-center hawa-bg--500" }, /* @__PURE__ */ React24.createElement(
|
3392
3434
|
Button,
|
3393
3435
|
{
|
3394
3436
|
"aria-label": "Next Table Page",
|
@@ -3537,15 +3579,12 @@ var BackToTop = ({ ...props }) => {
|
|
3537
3579
|
}
|
3538
3580
|
};
|
3539
3581
|
useEffect4(() => {
|
3540
|
-
if (!props.anchor.current)
|
3541
|
-
return;
|
3582
|
+
if (!props.anchor.current) return;
|
3542
3583
|
props.anchor.current.addEventListener("scroll", onScroll);
|
3543
3584
|
let interval = setInterval(() => {
|
3544
|
-
if (!props.anchor.current)
|
3545
|
-
return;
|
3585
|
+
if (!props.anchor.current) return;
|
3546
3586
|
let newRect = props.anchor.current.getBoundingClientRect();
|
3547
|
-
if (_rect.current == null)
|
3548
|
-
return setRect(newRect);
|
3587
|
+
if (_rect.current == null) return setRect(newRect);
|
3549
3588
|
if (!(_rect.current.top == newRect.top && _rect.current.left == newRect.left && _rect.current.width == newRect.width && _rect.current.height == newRect.height)) {
|
3550
3589
|
setRect(newRect);
|
3551
3590
|
}
|
@@ -3558,8 +3597,7 @@ var BackToTop = ({ ...props }) => {
|
|
3558
3597
|
}, [onScroll, props.anchor]);
|
3559
3598
|
const getStyles = () => {
|
3560
3599
|
var _a;
|
3561
|
-
if (!props.anchor.current || !self.current)
|
3562
|
-
return {};
|
3600
|
+
if (!props.anchor.current || !self.current) return {};
|
3563
3601
|
let corner = props.corner || "bottom-right";
|
3564
3602
|
let [vertical, horizontal] = corner.split("-");
|
3565
3603
|
let anchorRect = props.anchor.current.getBoundingClientRect();
|
@@ -3780,8 +3818,7 @@ var Radio = forwardRef16(
|
|
3780
3818
|
{
|
3781
3819
|
"aria-current": "page",
|
3782
3820
|
onClick: () => {
|
3783
|
-
if (props.disabled || opt.disabled)
|
3784
|
-
return;
|
3821
|
+
if (props.disabled || opt.disabled) return;
|
3785
3822
|
handleChange(opt);
|
3786
3823
|
},
|
3787
3824
|
className: cn(
|
@@ -3800,8 +3837,7 @@ var Radio = forwardRef16(
|
|
3800
3837
|
key: o,
|
3801
3838
|
"aria-current": "page",
|
3802
3839
|
onClick: () => {
|
3803
|
-
if (props.disabled || opt.disabled)
|
3804
|
-
return;
|
3840
|
+
if (props.disabled || opt.disabled) return;
|
3805
3841
|
handleChange(opt);
|
3806
3842
|
},
|
3807
3843
|
className: cn(
|
@@ -4088,8 +4124,7 @@ var FullCommand = ({
|
|
4088
4124
|
{
|
4089
4125
|
key: subIndex,
|
4090
4126
|
onSelect: () => {
|
4091
|
-
if (onActionClick)
|
4092
|
-
onActionClick();
|
4127
|
+
if (onActionClick) onActionClick();
|
4093
4128
|
subItem.action();
|
4094
4129
|
}
|
4095
4130
|
},
|
@@ -4683,8 +4718,7 @@ function toast({ ...props }) {
|
|
4683
4718
|
id,
|
4684
4719
|
open: true,
|
4685
4720
|
onOpenChange: (open) => {
|
4686
|
-
if (!open)
|
4687
|
-
dismiss();
|
4721
|
+
if (!open) dismiss();
|
4688
4722
|
}
|
4689
4723
|
}
|
4690
4724
|
});
|
@@ -5192,8 +5226,7 @@ var ScrollArea = React41.forwardRef(({ className, children, orientation = "verti
|
|
5192
5226
|
document.addEventListener("mouseup", onMouseUp);
|
5193
5227
|
};
|
5194
5228
|
const onMouseMove = (e) => {
|
5195
|
-
if (!isDragging.current || !scrollAreaRef.current)
|
5196
|
-
return;
|
5229
|
+
if (!isDragging.current || !scrollAreaRef.current) return;
|
5197
5230
|
const dx = e.clientX - startPos.current.x;
|
5198
5231
|
const dy = e.clientY - startPos.current.y;
|
5199
5232
|
if (orientation === "vertical") {
|
@@ -8321,16 +8354,11 @@ var PasswordInput = ({
|
|
8321
8354
|
useEffect29(() => {
|
8322
8355
|
const calculateStrength = () => {
|
8323
8356
|
let strengthScore = 0;
|
8324
|
-
if (lengthCriteriaMet)
|
8325
|
-
|
8326
|
-
if (
|
8327
|
-
|
8328
|
-
if (
|
8329
|
-
strengthScore += 1;
|
8330
|
-
if (lowercaseCriteriaMet)
|
8331
|
-
strengthScore += 1;
|
8332
|
-
if (uppercaseCriteriaMet)
|
8333
|
-
strengthScore += 1;
|
8357
|
+
if (lengthCriteriaMet) strengthScore += 1;
|
8358
|
+
if (numberCriteriaMet) strengthScore += 1;
|
8359
|
+
if (specialCharCriteriaMet) strengthScore += 1;
|
8360
|
+
if (lowercaseCriteriaMet) strengthScore += 1;
|
8361
|
+
if (uppercaseCriteriaMet) strengthScore += 1;
|
8334
8362
|
return strengthScore;
|
8335
8363
|
};
|
8336
8364
|
const currentStrengthScore = calculateStrength();
|
@@ -8536,8 +8564,7 @@ var ScrollIndicator = ({
|
|
8536
8564
|
}
|
8537
8565
|
};
|
8538
8566
|
useEffect30(() => {
|
8539
|
-
if (!anchor.current)
|
8540
|
-
return;
|
8567
|
+
if (!anchor.current) return;
|
8541
8568
|
anchor.current.addEventListener("scroll", onScroll);
|
8542
8569
|
return () => {
|
8543
8570
|
var _a;
|
@@ -8755,8 +8782,7 @@ var Carousel = ({
|
|
8755
8782
|
}, autoplayInterval);
|
8756
8783
|
}
|
8757
8784
|
return () => {
|
8758
|
-
if (autoplayTimer)
|
8759
|
-
clearInterval(autoplayTimer);
|
8785
|
+
if (autoplayTimer) clearInterval(autoplayTimer);
|
8760
8786
|
};
|
8761
8787
|
}, [emblaApi, autoplay, autoplayInterval]);
|
8762
8788
|
const length = React64.Children.count(items);
|