@sikka/hawa 0.42.2-next → 0.42.4-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/blocks/auth/index.js +13 -13
- package/dist/blocks/auth/index.mjs +13 -13
- package/dist/blocks/index.js +13 -13
- package/dist/blocks/index.mjs +1 -1
- package/dist/{chunk-Q3IS4SMU.mjs → chunk-RTLFGIYQ.mjs} +13 -13
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs.map +1 -1
- package/dist/dataTable/index.js +11 -11
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +11 -11
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/elements/index.js +24 -24
- package/dist/elements/index.mjs +12 -12
- package/dist/index.css +8 -1
- package/dist/index.js +24 -24
- package/dist/index.mjs +24 -24
- package/dist/pinInput/index.js +13 -13
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +13 -13
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/sonner/index.js +14 -1
- package/dist/sonner/index.js.map +1 -1
- package/dist/sonner/index.mjs +14 -1
- package/dist/sonner/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
@@ -3308,7 +3308,7 @@ var DataTable = ({
|
|
3308
3308
|
enableGoTo,
|
3309
3309
|
...props
|
3310
3310
|
}) => {
|
3311
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
3311
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
3312
3312
|
const [sorting, setSorting] = React24.useState(
|
3313
3313
|
props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
|
3314
3314
|
);
|
@@ -3498,7 +3498,7 @@ var DataTable = ({
|
|
3498
3498
|
) : column.id
|
3499
3499
|
);
|
3500
3500
|
})
|
3501
|
-
))), enableFiltering && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex-row hawa-gap-2 hawa-flex" }, (
|
3501
|
+
))), enableFiltering && ((_e = props.filters) == null ? void 0 : _e.length) && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex-row hawa-gap-2 hawa-flex" }, (_f = props.filters) == null ? void 0 : _f.map((filter) => {
|
3502
3502
|
return /* @__PURE__ */ React24.createElement(
|
3503
3503
|
Button,
|
3504
3504
|
{
|
@@ -3553,7 +3553,7 @@ var DataTable = ({
|
|
3553
3553
|
header.getContext()
|
3554
3554
|
)
|
3555
3555
|
);
|
3556
|
-
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((
|
3556
|
+
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((_g = table.getRowModel().rows) == null ? void 0 : _g.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React24.createElement(
|
3557
3557
|
TableRow,
|
3558
3558
|
{
|
3559
3559
|
key: row.id,
|
@@ -3585,7 +3585,7 @@ var DataTable = ({
|
|
3585
3585
|
colSpan: columns.length,
|
3586
3586
|
className: "hawa-h-24 hawa-text-center"
|
3587
3587
|
},
|
3588
|
-
(
|
3588
|
+
(_h = props.texts) == null ? void 0 : _h.noData
|
3589
3589
|
))))),
|
3590
3590
|
/* @__PURE__ */ React24.createElement(
|
3591
3591
|
"div",
|
@@ -3602,7 +3602,7 @@ var DataTable = ({
|
|
3602
3602
|
className: "hawa-text-muted-foreground hawa-text-sm",
|
3603
3603
|
dir: props.direction
|
3604
3604
|
},
|
3605
|
-
/* @__PURE__ */ React24.createElement("span", null, (
|
3605
|
+
/* @__PURE__ */ React24.createElement("span", null, (_i = props.texts) == null ? void 0 : _i.total),
|
3606
3606
|
" ",
|
3607
3607
|
/* @__PURE__ */ React24.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
|
3608
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(
|
@@ -3613,11 +3613,11 @@ var DataTable = ({
|
|
3613
3613
|
},
|
3614
3614
|
table.getFilteredSelectedRowModel().rows.length,
|
3615
3615
|
" ",
|
3616
|
-
(
|
3616
|
+
(_j = props.texts) == null ? void 0 : _j.of,
|
3617
3617
|
" ",
|
3618
3618
|
table.getFilteredRowModel().rows.length,
|
3619
3619
|
" ",
|
3620
|
-
(
|
3620
|
+
(_k = props.texts) == null ? void 0 : _k.selectedRows
|
3621
3621
|
)), table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "" }, /* @__PURE__ */ React24.createElement(
|
3622
3622
|
DropdownMenu,
|
3623
3623
|
{
|
@@ -3630,10 +3630,10 @@ var DataTable = ({
|
|
3630
3630
|
table.getFilteredSelectedRowModel().rows
|
3631
3631
|
)
|
3632
3632
|
})),
|
3633
|
-
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((
|
3633
|
+
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((_l = props.texts) == null ? void 0 : _l.bulkAction) || "Bulk Action")
|
3634
3634
|
}
|
3635
3635
|
))) : null,
|
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" }, (
|
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" }, (_m = props.texts) == null ? void 0 : _m.goTo), /* @__PURE__ */ React24.createElement(
|
3637
3637
|
"input",
|
3638
3638
|
{
|
3639
3639
|
max: table.getPageCount(),
|
@@ -3670,11 +3670,11 @@ var DataTable = ({
|
|
3670
3670
|
size: "icon",
|
3671
3671
|
className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 hawa-whitespace-nowrap"
|
3672
3672
|
},
|
3673
|
-
`${table.getState().pagination.pageSize} / ${(
|
3673
|
+
`${table.getState().pagination.pageSize} / ${(_n = props.texts) == null ? void 0 : _n.page}`
|
3674
3674
|
),
|
3675
3675
|
onItemSelect: (e) => table.setPageSize(Number(e))
|
3676
3676
|
}
|
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, (
|
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, (_o = props.texts) == null ? void 0 : _o.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, (_p = props.texts) == null ? void 0 : _p.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(
|
3678
3678
|
Button,
|
3679
3679
|
{
|
3680
3680
|
"aria-label": "Next Table Page",
|
@@ -7913,19 +7913,19 @@ var PhoneInput = ({
|
|
7913
7913
|
var React50 = __toESM(require("react"));
|
7914
7914
|
var import_input_otp = require("input-otp");
|
7915
7915
|
|
7916
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7916
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7917
7917
|
var import_react41 = require("react");
|
7918
7918
|
|
7919
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7919
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
7920
7920
|
var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
7921
7921
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
7922
7922
|
return Boolean(className) && array.indexOf(className) === index;
|
7923
7923
|
}).join(" ");
|
7924
7924
|
|
7925
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7925
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7926
7926
|
var import_react40 = require("react");
|
7927
7927
|
|
7928
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7928
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
7929
7929
|
var defaultAttributes = {
|
7930
7930
|
xmlns: "http://www.w3.org/2000/svg",
|
7931
7931
|
width: 24,
|
@@ -7938,7 +7938,7 @@ var defaultAttributes = {
|
|
7938
7938
|
strokeLinejoin: "round"
|
7939
7939
|
};
|
7940
7940
|
|
7941
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7941
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7942
7942
|
var Icon = (0, import_react40.forwardRef)(
|
7943
7943
|
({
|
7944
7944
|
color = "currentColor",
|
@@ -7970,7 +7970,7 @@ var Icon = (0, import_react40.forwardRef)(
|
|
7970
7970
|
}
|
7971
7971
|
);
|
7972
7972
|
|
7973
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7973
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7974
7974
|
var createLucideIcon = (iconName, iconNode) => {
|
7975
7975
|
const Component = (0, import_react41.forwardRef)(
|
7976
7976
|
({ className, ...props }, ref) => (0, import_react41.createElement)(Icon, {
|
@@ -7984,7 +7984,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
7984
7984
|
return Component;
|
7985
7985
|
};
|
7986
7986
|
|
7987
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7987
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
7988
7988
|
var Dot = createLucideIcon("Dot", [
|
7989
7989
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
7990
7990
|
]);
|
@@ -13785,7 +13785,7 @@ var Usage = (props) => {
|
|
13785
13785
|
|
13786
13786
|
lucide-react/dist/esm/shared/src/utils.js:
|
13787
13787
|
(**
|
13788
|
-
* @license lucide-react v0.
|
13788
|
+
* @license lucide-react v0.390.0 - ISC
|
13789
13789
|
*
|
13790
13790
|
* This source code is licensed under the ISC license.
|
13791
13791
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13793,7 +13793,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
13793
13793
|
|
13794
13794
|
lucide-react/dist/esm/defaultAttributes.js:
|
13795
13795
|
(**
|
13796
|
-
* @license lucide-react v0.
|
13796
|
+
* @license lucide-react v0.390.0 - ISC
|
13797
13797
|
*
|
13798
13798
|
* This source code is licensed under the ISC license.
|
13799
13799
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13801,7 +13801,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
13801
13801
|
|
13802
13802
|
lucide-react/dist/esm/Icon.js:
|
13803
13803
|
(**
|
13804
|
-
* @license lucide-react v0.
|
13804
|
+
* @license lucide-react v0.390.0 - ISC
|
13805
13805
|
*
|
13806
13806
|
* This source code is licensed under the ISC license.
|
13807
13807
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13809,7 +13809,7 @@ lucide-react/dist/esm/Icon.js:
|
|
13809
13809
|
|
13810
13810
|
lucide-react/dist/esm/createLucideIcon.js:
|
13811
13811
|
(**
|
13812
|
-
* @license lucide-react v0.
|
13812
|
+
* @license lucide-react v0.390.0 - ISC
|
13813
13813
|
*
|
13814
13814
|
* This source code is licensed under the ISC license.
|
13815
13815
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13817,7 +13817,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
13817
13817
|
|
13818
13818
|
lucide-react/dist/esm/icons/dot.js:
|
13819
13819
|
(**
|
13820
|
-
* @license lucide-react v0.
|
13820
|
+
* @license lucide-react v0.390.0 - ISC
|
13821
13821
|
*
|
13822
13822
|
* This source code is licensed under the ISC license.
|
13823
13823
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13825,7 +13825,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
13825
13825
|
|
13826
13826
|
lucide-react/dist/esm/lucide-react.js:
|
13827
13827
|
(**
|
13828
|
-
* @license lucide-react v0.
|
13828
|
+
* @license lucide-react v0.390.0 - ISC
|
13829
13829
|
*
|
13830
13830
|
* This source code is licensed under the ISC license.
|
13831
13831
|
* See the LICENSE file in the root directory of this source tree.
|
package/dist/index.mjs
CHANGED
@@ -3064,7 +3064,7 @@ var DataTable = ({
|
|
3064
3064
|
enableGoTo,
|
3065
3065
|
...props
|
3066
3066
|
}) => {
|
3067
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
3067
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
3068
3068
|
const [sorting, setSorting] = React24.useState(
|
3069
3069
|
props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
|
3070
3070
|
);
|
@@ -3254,7 +3254,7 @@ var DataTable = ({
|
|
3254
3254
|
) : column.id
|
3255
3255
|
);
|
3256
3256
|
})
|
3257
|
-
))), enableFiltering && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex-row hawa-gap-2 hawa-flex" }, (
|
3257
|
+
))), enableFiltering && ((_e = props.filters) == null ? void 0 : _e.length) && /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex-row hawa-gap-2 hawa-flex" }, (_f = props.filters) == null ? void 0 : _f.map((filter) => {
|
3258
3258
|
return /* @__PURE__ */ React24.createElement(
|
3259
3259
|
Button,
|
3260
3260
|
{
|
@@ -3309,7 +3309,7 @@ var DataTable = ({
|
|
3309
3309
|
header.getContext()
|
3310
3310
|
)
|
3311
3311
|
);
|
3312
|
-
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((
|
3312
|
+
})))), /* @__PURE__ */ React24.createElement(TableBody, null, ((_g = table.getRowModel().rows) == null ? void 0 : _g.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React24.createElement(
|
3313
3313
|
TableRow,
|
3314
3314
|
{
|
3315
3315
|
key: row.id,
|
@@ -3341,7 +3341,7 @@ var DataTable = ({
|
|
3341
3341
|
colSpan: columns.length,
|
3342
3342
|
className: "hawa-h-24 hawa-text-center"
|
3343
3343
|
},
|
3344
|
-
(
|
3344
|
+
(_h = props.texts) == null ? void 0 : _h.noData
|
3345
3345
|
))))),
|
3346
3346
|
/* @__PURE__ */ React24.createElement(
|
3347
3347
|
"div",
|
@@ -3358,7 +3358,7 @@ var DataTable = ({
|
|
3358
3358
|
className: "hawa-text-muted-foreground hawa-text-sm",
|
3359
3359
|
dir: props.direction
|
3360
3360
|
},
|
3361
|
-
/* @__PURE__ */ React24.createElement("span", null, (
|
3361
|
+
/* @__PURE__ */ React24.createElement("span", null, (_i = props.texts) == null ? void 0 : _i.total),
|
3362
3362
|
" ",
|
3363
3363
|
/* @__PURE__ */ React24.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
|
3364
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(
|
@@ -3369,11 +3369,11 @@ var DataTable = ({
|
|
3369
3369
|
},
|
3370
3370
|
table.getFilteredSelectedRowModel().rows.length,
|
3371
3371
|
" ",
|
3372
|
-
(
|
3372
|
+
(_j = props.texts) == null ? void 0 : _j.of,
|
3373
3373
|
" ",
|
3374
3374
|
table.getFilteredRowModel().rows.length,
|
3375
3375
|
" ",
|
3376
|
-
(
|
3376
|
+
(_k = props.texts) == null ? void 0 : _k.selectedRows
|
3377
3377
|
)), table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ React24.createElement("div", { className: "" }, /* @__PURE__ */ React24.createElement(
|
3378
3378
|
DropdownMenu,
|
3379
3379
|
{
|
@@ -3386,10 +3386,10 @@ var DataTable = ({
|
|
3386
3386
|
table.getFilteredSelectedRowModel().rows
|
3387
3387
|
)
|
3388
3388
|
})),
|
3389
|
-
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((
|
3389
|
+
trigger: /* @__PURE__ */ React24.createElement(Button, { size: "xs" }, ((_l = props.texts) == null ? void 0 : _l.bulkAction) || "Bulk Action")
|
3390
3390
|
}
|
3391
3391
|
))) : null,
|
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" }, (
|
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" }, (_m = props.texts) == null ? void 0 : _m.goTo), /* @__PURE__ */ React24.createElement(
|
3393
3393
|
"input",
|
3394
3394
|
{
|
3395
3395
|
max: table.getPageCount(),
|
@@ -3426,11 +3426,11 @@ var DataTable = ({
|
|
3426
3426
|
size: "icon",
|
3427
3427
|
className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 hawa-whitespace-nowrap"
|
3428
3428
|
},
|
3429
|
-
`${table.getState().pagination.pageSize} / ${(
|
3429
|
+
`${table.getState().pagination.pageSize} / ${(_n = props.texts) == null ? void 0 : _n.page}`
|
3430
3430
|
),
|
3431
3431
|
onItemSelect: (e) => table.setPageSize(Number(e))
|
3432
3432
|
}
|
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, (
|
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, (_o = props.texts) == null ? void 0 : _o.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, (_p = props.texts) == null ? void 0 : _p.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(
|
3434
3434
|
Button,
|
3435
3435
|
{
|
3436
3436
|
"aria-label": "Next Table Page",
|
@@ -7669,19 +7669,19 @@ var PhoneInput = ({
|
|
7669
7669
|
import * as React50 from "react";
|
7670
7670
|
import { OTPInput, OTPInputContext } from "input-otp";
|
7671
7671
|
|
7672
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7672
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7673
7673
|
import { forwardRef as forwardRef25, createElement as createElement24 } from "react";
|
7674
7674
|
|
7675
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7675
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
7676
7676
|
var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
7677
7677
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
7678
7678
|
return Boolean(className) && array.indexOf(className) === index;
|
7679
7679
|
}).join(" ");
|
7680
7680
|
|
7681
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7681
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7682
7682
|
import { forwardRef as forwardRef24, createElement as createElement23 } from "react";
|
7683
7683
|
|
7684
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7684
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
7685
7685
|
var defaultAttributes = {
|
7686
7686
|
xmlns: "http://www.w3.org/2000/svg",
|
7687
7687
|
width: 24,
|
@@ -7694,7 +7694,7 @@ var defaultAttributes = {
|
|
7694
7694
|
strokeLinejoin: "round"
|
7695
7695
|
};
|
7696
7696
|
|
7697
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7697
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
7698
7698
|
var Icon = forwardRef24(
|
7699
7699
|
({
|
7700
7700
|
color = "currentColor",
|
@@ -7726,7 +7726,7 @@ var Icon = forwardRef24(
|
|
7726
7726
|
}
|
7727
7727
|
);
|
7728
7728
|
|
7729
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7729
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
7730
7730
|
var createLucideIcon = (iconName, iconNode) => {
|
7731
7731
|
const Component = forwardRef25(
|
7732
7732
|
({ className, ...props }, ref) => createElement24(Icon, {
|
@@ -7740,7 +7740,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
7740
7740
|
return Component;
|
7741
7741
|
};
|
7742
7742
|
|
7743
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
7743
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
7744
7744
|
var Dot = createLucideIcon("Dot", [
|
7745
7745
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
7746
7746
|
]);
|
@@ -13552,7 +13552,7 @@ export {
|
|
13552
13552
|
|
13553
13553
|
lucide-react/dist/esm/shared/src/utils.js:
|
13554
13554
|
(**
|
13555
|
-
* @license lucide-react v0.
|
13555
|
+
* @license lucide-react v0.390.0 - ISC
|
13556
13556
|
*
|
13557
13557
|
* This source code is licensed under the ISC license.
|
13558
13558
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13560,7 +13560,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
13560
13560
|
|
13561
13561
|
lucide-react/dist/esm/defaultAttributes.js:
|
13562
13562
|
(**
|
13563
|
-
* @license lucide-react v0.
|
13563
|
+
* @license lucide-react v0.390.0 - ISC
|
13564
13564
|
*
|
13565
13565
|
* This source code is licensed under the ISC license.
|
13566
13566
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13568,7 +13568,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
13568
13568
|
|
13569
13569
|
lucide-react/dist/esm/Icon.js:
|
13570
13570
|
(**
|
13571
|
-
* @license lucide-react v0.
|
13571
|
+
* @license lucide-react v0.390.0 - ISC
|
13572
13572
|
*
|
13573
13573
|
* This source code is licensed under the ISC license.
|
13574
13574
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13576,7 +13576,7 @@ lucide-react/dist/esm/Icon.js:
|
|
13576
13576
|
|
13577
13577
|
lucide-react/dist/esm/createLucideIcon.js:
|
13578
13578
|
(**
|
13579
|
-
* @license lucide-react v0.
|
13579
|
+
* @license lucide-react v0.390.0 - ISC
|
13580
13580
|
*
|
13581
13581
|
* This source code is licensed under the ISC license.
|
13582
13582
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13584,7 +13584,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
13584
13584
|
|
13585
13585
|
lucide-react/dist/esm/icons/dot.js:
|
13586
13586
|
(**
|
13587
|
-
* @license lucide-react v0.
|
13587
|
+
* @license lucide-react v0.390.0 - ISC
|
13588
13588
|
*
|
13589
13589
|
* This source code is licensed under the ISC license.
|
13590
13590
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -13592,7 +13592,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
13592
13592
|
|
13593
13593
|
lucide-react/dist/esm/lucide-react.js:
|
13594
13594
|
(**
|
13595
|
-
* @license lucide-react v0.
|
13595
|
+
* @license lucide-react v0.390.0 - ISC
|
13596
13596
|
*
|
13597
13597
|
* This source code is licensed under the ISC license.
|
13598
13598
|
* See the LICENSE file in the root directory of this source tree.
|
package/dist/pinInput/index.js
CHANGED
@@ -52,19 +52,19 @@ function cn(...inputs) {
|
|
52
52
|
// elements/pinInput/PinInput.tsx
|
53
53
|
var import_input_otp = require("input-otp");
|
54
54
|
|
55
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
55
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
56
56
|
var import_react2 = require("react");
|
57
57
|
|
58
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
58
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
59
59
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
60
60
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
61
61
|
return Boolean(className) && array.indexOf(className) === index;
|
62
62
|
}).join(" ");
|
63
63
|
|
64
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
64
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
65
65
|
var import_react = require("react");
|
66
66
|
|
67
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
67
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
68
68
|
var defaultAttributes = {
|
69
69
|
xmlns: "http://www.w3.org/2000/svg",
|
70
70
|
width: 24,
|
@@ -77,7 +77,7 @@ var defaultAttributes = {
|
|
77
77
|
strokeLinejoin: "round"
|
78
78
|
};
|
79
79
|
|
80
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
80
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
81
81
|
var Icon = (0, import_react.forwardRef)(
|
82
82
|
({
|
83
83
|
color = "currentColor",
|
@@ -109,7 +109,7 @@ var Icon = (0, import_react.forwardRef)(
|
|
109
109
|
}
|
110
110
|
);
|
111
111
|
|
112
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
112
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
113
113
|
var createLucideIcon = (iconName, iconNode) => {
|
114
114
|
const Component = (0, import_react2.forwardRef)(
|
115
115
|
({ className, ...props }, ref) => (0, import_react2.createElement)(Icon, {
|
@@ -123,7 +123,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
123
123
|
return Component;
|
124
124
|
};
|
125
125
|
|
126
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
126
|
+
// ../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
127
127
|
var Dot = createLucideIcon("Dot", [
|
128
128
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
129
129
|
]);
|
@@ -214,7 +214,7 @@ var PinInput = ({
|
|
214
214
|
|
215
215
|
lucide-react/dist/esm/shared/src/utils.js:
|
216
216
|
(**
|
217
|
-
* @license lucide-react v0.
|
217
|
+
* @license lucide-react v0.390.0 - ISC
|
218
218
|
*
|
219
219
|
* This source code is licensed under the ISC license.
|
220
220
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -222,7 +222,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
222
222
|
|
223
223
|
lucide-react/dist/esm/defaultAttributes.js:
|
224
224
|
(**
|
225
|
-
* @license lucide-react v0.
|
225
|
+
* @license lucide-react v0.390.0 - ISC
|
226
226
|
*
|
227
227
|
* This source code is licensed under the ISC license.
|
228
228
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -230,7 +230,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
230
230
|
|
231
231
|
lucide-react/dist/esm/Icon.js:
|
232
232
|
(**
|
233
|
-
* @license lucide-react v0.
|
233
|
+
* @license lucide-react v0.390.0 - ISC
|
234
234
|
*
|
235
235
|
* This source code is licensed under the ISC license.
|
236
236
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -238,7 +238,7 @@ lucide-react/dist/esm/Icon.js:
|
|
238
238
|
|
239
239
|
lucide-react/dist/esm/createLucideIcon.js:
|
240
240
|
(**
|
241
|
-
* @license lucide-react v0.
|
241
|
+
* @license lucide-react v0.390.0 - ISC
|
242
242
|
*
|
243
243
|
* This source code is licensed under the ISC license.
|
244
244
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -246,7 +246,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
246
246
|
|
247
247
|
lucide-react/dist/esm/icons/dot.js:
|
248
248
|
(**
|
249
|
-
* @license lucide-react v0.
|
249
|
+
* @license lucide-react v0.390.0 - ISC
|
250
250
|
*
|
251
251
|
* This source code is licensed under the ISC license.
|
252
252
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -254,7 +254,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
254
254
|
|
255
255
|
lucide-react/dist/esm/lucide-react.js:
|
256
256
|
(**
|
257
|
-
* @license lucide-react v0.
|
257
|
+
* @license lucide-react v0.390.0 - ISC
|
258
258
|
*
|
259
259
|
* This source code is licensed under the ISC license.
|
260
260
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/pinInput/index.ts","../../elements/pinInput/PinInput.tsx","../../util/index.ts","../../../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/shared/src/utils.ts","../../../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/src/defaultAttributes.ts","../../../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/src/Icon.ts","../../../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/src/createLucideIcon.ts","../../../../node_modules/.pnpm/lucide-react@0.381.0_react@18.3.1/node_modules/lucide-react/src/icons/dot.ts","../../elements/helperText/HelperText.tsx"],"sourcesContent":["export * from \"./PinInput\";\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { OTPInput, OTPInputContext, OTPInputProps } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\n\nimport { HelperText } from \"../helperText\";\n\nconst PinInputRoot = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"hawa-flex hawa-items-center hawa-gap-2 has-[:disabled]:hawa-opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:hawa-cursor-not-allowed\", className)}\n {...props}\n />\n));\nPinInputRoot.displayName = \"PinInputRoot\";\n\nconst PinInputGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"hawa-flex hawa-items-center\", className)}\n {...props}\n />\n));\nPinInputGroup.displayName = \"PinInputGroup\";\n\nconst PinInputSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const pinInputContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = pinInputContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"hawa-border-input hawa-relative hawa-flex hawa-h-10 hawa-w-10 hawa-items-center hawa-justify-center hawa-border-y hawa-border-r hawa-text-sm hawa-transition-all first:hawa-rounded-l-md first:hawa-border-l last:hawa-rounded-r-md\",\n isActive &&\n \"hawa-ring-ring hawa-ring-offset-background hawa-z-10 hawa-ring-2\",\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"hawa-pointer-events-none hawa-absolute hawa-inset-0 hawa-flex hawa-items-center hawa-justify-center\">\n <div className=\"hawa-animate-caret-blink hawa-bg-foreground hawa-h-4 hawa-w-px hawa-duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nPinInputSlot.displayName = \"PinInputSlot\";\n\nconst PinInputSeperator = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nPinInputSeperator.displayName = \"PinInputSeperator\";\n\ntype PinInputProps = Omit<OTPInputProps, \"render\"> & {\n /*\n * The position of the separator in the pin input\n * @default 3\n */\n separatorPosition?: number;\n helperText?: any;\n};\n\nconst PinInput: React.FC<PinInputProps> = ({\n separatorPosition = 0,\n ...props\n}) => {\n const maxLength = props.maxLength || 6; // Assuming a default maxLength of 6 if not provided\n const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);\n\n const firstGroupLength =\n clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;\n const secondGroupLength = maxLength - firstGroupLength;\n\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\">\n <PinInputRoot {...props}>\n {firstGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full\">\n {[...Array(firstGroupLength)].map((_, index) => (\n <PinInputSlot key={index} index={index} className=\"hawa-w-full\" />\n ))}\n </PinInputGroup>\n )}\n {separatorPosition > 0 && separatorPosition < props.maxLength && (\n <PinInputSeperator />\n )}\n {secondGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full\">\n {[...Array(secondGroupLength)].map((_, index) => (\n <PinInputSlot\n key={index + firstGroupLength}\n index={index + firstGroupLength}\n className=\"hawa-w-full\"\n />\n ))}\n </PinInputGroup>\n )}\n </PinInputRoot>\n <HelperText helperText={props.helperText} />\n </div>\n );\n};\n\nexport {\n PinInput,\n PinInputRoot,\n PinInputGroup,\n PinInputSlot,\n PinInputSeperator,\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return Boolean(className) && array.indexOf(className) === index;\n })\n .join(' ');\n","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import { createElement, forwardRef } from 'react';\nimport defaultAttributes from './defaultAttributes';\nimport { IconNode, LucideProps } from './types';\nimport { mergeClasses } from '@lucide/shared';\n\ninterface IconComponentProps extends LucideProps {\n iconNode: IconNode;\n}\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {string} props.className - The class name of the icon\n * @param {IconNode} props.children - The children of the icon\n * @param {IconNode} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color = 'currentColor',\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = '',\n children,\n iconNode,\n ...rest\n },\n ref,\n ) => {\n return createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth,\n className: mergeClasses('lucide', className),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n","import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n ...props,\n }),\n );\n\n Component.displayName = `${iconName}`;\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/dot\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Dot = createLucideIcon('Dot', [\n ['circle', { cx: '12.1', cy: '12.1', r: '1', key: '18d7e5' }],\n]);\n\nexport default Dot;\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({ helperText }: { helperText?: any }) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all\",\n helperText ? \"hawa-h-4 hawa-opacity-100\" : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {helperText}\n </p>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,SAAuB;;;ACAvB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADFA,uBAAyD;;;;;;AEK5C,IAAA,cAAc,CAAC,WAC1B,OAAO,QAAQ,sBAAsB,OAAO,EAAE,YAAY;AAsB/C,IAAA,eAAe,IAA2C,YACrE,QACG,OAAO,CAAC,WAAW,OAAO,UAAU;AACnC,SAAO,QAAQ,SAAS,KAAK,MAAM,QAAQ,SAAS,MAAM;AAC5D,CAAC,EACA,KAAK,GAAG;;;;;;ACpCb,IAAe,oBAAA;EACb,OAAO;EACP,OAAO;EACP,QAAQ;EACR,SAAS;EACT,MAAM;EACN,QAAQ;EACR,aAAa;EACb,eAAe;EACf,gBAAgB;AAClB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G,UACpC,qCAAC,gBAAa,KAAK,OAAO,OAAc,WAAU,eAAc,CACjE,CACH,GAED,oBAAoB,KAAK,oBAAoB,MAAM,aAClD,qCAAC,uBAAkB,GAEpB,oBAAoB,KACnB,qCAAC,iBAAc,WAAU,iBACtB,CAAC,GAAG,MAAM,iBAAiB,CAAC,EAAE,IAAI,CAAC,GAAG,UACrC;AAAA,IAAC;AAAA;AAAA,MACC,KAAK,QAAQ;AAAA,MACb,OAAO,QAAQ;AAAA,MACf,WAAU;AAAA;AAAA,EACZ,CACD,CACH,CAEJ,GACA,qCAAC,cAAW,YAAY,MAAM,YAAY,CAC5C;AAEJ;","names":["React","import_react","React"]}
|
1
|
+
{"version":3,"sources":["../../elements/pinInput/index.ts","../../elements/pinInput/PinInput.tsx","../../util/index.ts","../../../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/shared/src/utils.ts","../../../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/src/defaultAttributes.ts","../../../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/src/Icon.ts","../../../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/src/createLucideIcon.ts","../../../../node_modules/.pnpm/lucide-react@0.390.0_react@18.3.1/node_modules/lucide-react/src/icons/dot.ts","../../elements/helperText/HelperText.tsx"],"sourcesContent":["export * from \"./PinInput\";\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { OTPInput, OTPInputContext, OTPInputProps } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\n\nimport { HelperText } from \"../helperText\";\n\nconst PinInputRoot = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"hawa-flex hawa-items-center hawa-gap-2 has-[:disabled]:hawa-opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:hawa-cursor-not-allowed\", className)}\n {...props}\n />\n));\nPinInputRoot.displayName = \"PinInputRoot\";\n\nconst PinInputGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"hawa-flex hawa-items-center\", className)}\n {...props}\n />\n));\nPinInputGroup.displayName = \"PinInputGroup\";\n\nconst PinInputSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const pinInputContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = pinInputContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"hawa-border-input hawa-relative hawa-flex hawa-h-10 hawa-w-10 hawa-items-center hawa-justify-center hawa-border-y hawa-border-r hawa-text-sm hawa-transition-all first:hawa-rounded-l-md first:hawa-border-l last:hawa-rounded-r-md\",\n isActive &&\n \"hawa-ring-ring hawa-ring-offset-background hawa-z-10 hawa-ring-2\",\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"hawa-pointer-events-none hawa-absolute hawa-inset-0 hawa-flex hawa-items-center hawa-justify-center\">\n <div className=\"hawa-animate-caret-blink hawa-bg-foreground hawa-h-4 hawa-w-px hawa-duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nPinInputSlot.displayName = \"PinInputSlot\";\n\nconst PinInputSeperator = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nPinInputSeperator.displayName = \"PinInputSeperator\";\n\ntype PinInputProps = Omit<OTPInputProps, \"render\"> & {\n /*\n * The position of the separator in the pin input\n * @default 3\n */\n separatorPosition?: number;\n helperText?: any;\n};\n\nconst PinInput: React.FC<PinInputProps> = ({\n separatorPosition = 0,\n ...props\n}) => {\n const maxLength = props.maxLength || 6; // Assuming a default maxLength of 6 if not provided\n const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);\n\n const firstGroupLength =\n clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;\n const secondGroupLength = maxLength - firstGroupLength;\n\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\">\n <PinInputRoot {...props}>\n {firstGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full\">\n {[...Array(firstGroupLength)].map((_, index) => (\n <PinInputSlot key={index} index={index} className=\"hawa-w-full\" />\n ))}\n </PinInputGroup>\n )}\n {separatorPosition > 0 && separatorPosition < props.maxLength && (\n <PinInputSeperator />\n )}\n {secondGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full\">\n {[...Array(secondGroupLength)].map((_, index) => (\n <PinInputSlot\n key={index + firstGroupLength}\n index={index + firstGroupLength}\n className=\"hawa-w-full\"\n />\n ))}\n </PinInputGroup>\n )}\n </PinInputRoot>\n <HelperText helperText={props.helperText} />\n </div>\n );\n};\n\nexport {\n PinInput,\n PinInputRoot,\n PinInputGroup,\n PinInputSlot,\n PinInputSeperator,\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return Boolean(className) && array.indexOf(className) === index;\n })\n .join(' ');\n","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import { createElement, forwardRef } from 'react';\nimport defaultAttributes from './defaultAttributes';\nimport { IconNode, LucideProps } from './types';\nimport { mergeClasses } from '@lucide/shared';\n\ninterface IconComponentProps extends LucideProps {\n iconNode: IconNode;\n}\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {string} props.className - The class name of the icon\n * @param {IconNode} props.children - The children of the icon\n * @param {IconNode} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color = 'currentColor',\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = '',\n children,\n iconNode,\n ...rest\n },\n ref,\n ) => {\n return createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth,\n className: mergeClasses('lucide', className),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n","import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n ...props,\n }),\n );\n\n Component.displayName = `${iconName}`;\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/dot\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Dot = createLucideIcon('Dot', [\n ['circle', { cx: '12.1', cy: '12.1', r: '1', key: '18d7e5' }],\n]);\n\nexport default Dot;\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({ helperText }: { helperText?: any }) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all\",\n helperText ? \"hawa-h-4 hawa-opacity-100\" : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {helperText}\n </p>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,SAAuB;;;ACAvB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADFA,uBAAyD;;;;;;AEK5C,IAAA,cAAc,CAAC,WAC1B,OAAO,QAAQ,sBAAsB,OAAO,EAAE,YAAY;AAsB/C,IAAA,eAAe,IAA2C,YACrE,QACG,OAAO,CAAC,WAAW,OAAO,UAAU;AACnC,SAAO,QAAQ,SAAS,KAAK,MAAM,QAAQ,SAAS,MAAM;AA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