@sikka/hawa 0.42.6-next → 0.42.8-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.
@@ -17,7 +17,7 @@ import {
17
17
  TabsList,
18
18
  TabsTrigger,
19
19
  Textarea
20
- } from "../chunk-EBVZY3RJ.mjs";
20
+ } from "../chunk-RIZBMJNK.mjs";
21
21
  import "../chunk-WL7C2A5D.mjs";
22
22
  import {
23
23
  BadEmoji,
@@ -156,7 +156,7 @@ import {
156
156
  import * as z from "zod";
157
157
  var LoginForm = ({
158
158
  loginType = "email",
159
- passwordLength = 8,
159
+ minPasswordLength = 8,
160
160
  texts,
161
161
  ...props
162
162
  }) => {
@@ -177,7 +177,7 @@ var LoginForm = ({
177
177
  email: z.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email Required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email Required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Email Invalid" }),
178
178
  password: z.string({
179
179
  required_error: ((_d = texts == null ? void 0 : texts.password) == null ? void 0 : _d.required) || "Password Required"
180
- }).min(1, { message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required) || "Password Required" }).min(passwordLength, {
180
+ }).min(1, { message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required) || "Password Required" }).min(minPasswordLength, {
181
181
  message: ((_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.tooShort) || "Password too short"
182
182
  })
183
183
  });
@@ -194,7 +194,7 @@ var LoginForm = ({
194
194
  ),
195
195
  password: z.string({
196
196
  required_error: ((_j = texts == null ? void 0 : texts.password) == null ? void 0 : _j.required) || "Password Required"
197
- }).min(1, { message: ((_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required) || "Password Required" }).min(passwordLength, {
197
+ }).min(1, { message: ((_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required) || "Password Required" }).min(minPasswordLength, {
198
198
  message: ((_l = texts == null ? void 0 : texts.password) == null ? void 0 : _l.tooShort) || "Password too short"
199
199
  })
200
200
  });
@@ -487,11 +487,12 @@ import * as z2 from "zod";
487
487
  var RegisterForm = ({
488
488
  texts,
489
489
  registerFields = ["email"],
490
+ minPasswordLength = 8,
490
491
  showTermsOption = false,
491
492
  showNewsletterOption = false,
492
493
  ...props
493
494
  }) => {
494
- var _a, _b, _c, _d, _e, _f, _g, _h;
495
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
495
496
  const [passwordVisible, setPasswordVisible] = useState2(false);
496
497
  const thirdPartyAuthTexts = {
497
498
  continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
@@ -536,15 +537,17 @@ var RegisterForm = ({
536
537
  ...fieldSchemas,
537
538
  password: z2.string({
538
539
  required_error: ((_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required) || "Password is required"
539
- }).min(5, {
540
+ }).min(minPasswordLength, {
540
541
  message: ((_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.tooShort) || "Password is too short"
541
542
  }).refine((value) => value !== "", {
542
543
  message: ((_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.required) || "Password is required"
543
544
  }),
544
545
  confirm_password: z2.string({
545
546
  required_error: ((_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required) || "Confirm password required"
547
+ }).min(minPasswordLength, {
548
+ message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.tooShort) || "Password is too short"
546
549
  }).refine((value) => value !== "", {
547
- message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required) || "Confirm password is required"
550
+ message: ((_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.required) || "Confirm password is required"
548
551
  }),
549
552
  refCode: z2.string().optional(),
550
553
  reference: z2.string().optional(),
@@ -553,7 +556,7 @@ var RegisterForm = ({
553
556
  }),
554
557
  newsletter_accepted: z2.boolean().optional()
555
558
  }).refine((data) => data.password === data.confirm_password, {
556
- message: ((_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch) || "Passwords don't match",
559
+ message: ((_g = texts == null ? void 0 : texts.confirm) == null ? void 0 : _g.dontMatch) || "Passwords don't match",
557
560
  path: ["confirm_password"]
558
561
  });
559
562
  const { handleSubmit, control, formState } = useForm2({
@@ -564,7 +567,7 @@ var RegisterForm = ({
564
567
  {
565
568
  className: cn(
566
569
  "hawa-flex hawa-flex-col hawa-gap-4",
567
- (_g = props.classNames) == null ? void 0 : _g.root
570
+ (_h = props.classNames) == null ? void 0 : _h.root
568
571
  )
569
572
  },
570
573
  /* @__PURE__ */ React3.createElement(
@@ -572,7 +575,7 @@ var RegisterForm = ({
572
575
  {
573
576
  dir: props.direction,
574
577
  className: cn(
575
- (_h = props.classNames) == null ? void 0 : _h.card,
578
+ (_i = props.classNames) == null ? void 0 : _i.card,
576
579
  props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
577
580
  )
578
581
  },
@@ -2394,19 +2394,19 @@ var StopPropagationWrapper = (props) => {
2394
2394
  import * as React7 from "react";
2395
2395
  import { OTPInput, OTPInputContext } from "input-otp";
2396
2396
 
2397
- // ../../node_modules/.pnpm/lucide-react@0.396.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
2397
+ // ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
2398
2398
  import { forwardRef as forwardRef4, createElement as createElement3 } from "react";
2399
2399
 
2400
- // ../../node_modules/.pnpm/lucide-react@0.396.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
2400
+ // ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
2401
2401
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2402
2402
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
2403
2403
  return Boolean(className) && array.indexOf(className) === index;
2404
2404
  }).join(" ");
2405
2405
 
2406
- // ../../node_modules/.pnpm/lucide-react@0.396.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
2406
+ // ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
2407
2407
  import { forwardRef as forwardRef3, createElement as createElement2 } from "react";
2408
2408
 
2409
- // ../../node_modules/.pnpm/lucide-react@0.396.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
2409
+ // ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
2410
2410
  var defaultAttributes = {
2411
2411
  xmlns: "http://www.w3.org/2000/svg",
2412
2412
  width: 24,
@@ -2419,7 +2419,7 @@ var defaultAttributes = {
2419
2419
  strokeLinejoin: "round"
2420
2420
  };
2421
2421
 
2422
- // ../../node_modules/.pnpm/lucide-react@0.396.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
2422
+ // ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
2423
2423
  var Icon = forwardRef3(
2424
2424
  ({
2425
2425
  color = "currentColor",
@@ -2451,7 +2451,7 @@ var Icon = forwardRef3(
2451
2451
  }
2452
2452
  );
2453
2453
 
2454
- // ../../node_modules/.pnpm/lucide-react@0.396.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
2454
+ // ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
2455
2455
  var createLucideIcon = (iconName, iconNode) => {
2456
2456
  const Component = forwardRef4(
2457
2457
  ({ className, ...props }, ref) => createElement3(Icon, {
@@ -2465,7 +2465,7 @@ var createLucideIcon = (iconName, iconNode) => {
2465
2465
  return Component;
2466
2466
  };
2467
2467
 
2468
- // ../../node_modules/.pnpm/lucide-react@0.396.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
2468
+ // ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
2469
2469
  var Dot = createLucideIcon("Dot", [
2470
2470
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
2471
2471
  ]);
@@ -3282,7 +3282,7 @@ export {
3282
3282
 
3283
3283
  lucide-react/dist/esm/shared/src/utils.js:
3284
3284
  (**
3285
- * @license lucide-react v0.396.0 - ISC
3285
+ * @license lucide-react v0.403.0 - ISC
3286
3286
  *
3287
3287
  * This source code is licensed under the ISC license.
3288
3288
  * See the LICENSE file in the root directory of this source tree.
@@ -3290,7 +3290,7 @@ lucide-react/dist/esm/shared/src/utils.js:
3290
3290
 
3291
3291
  lucide-react/dist/esm/defaultAttributes.js:
3292
3292
  (**
3293
- * @license lucide-react v0.396.0 - ISC
3293
+ * @license lucide-react v0.403.0 - ISC
3294
3294
  *
3295
3295
  * This source code is licensed under the ISC license.
3296
3296
  * See the LICENSE file in the root directory of this source tree.
@@ -3298,7 +3298,7 @@ lucide-react/dist/esm/defaultAttributes.js:
3298
3298
 
3299
3299
  lucide-react/dist/esm/Icon.js:
3300
3300
  (**
3301
- * @license lucide-react v0.396.0 - ISC
3301
+ * @license lucide-react v0.403.0 - ISC
3302
3302
  *
3303
3303
  * This source code is licensed under the ISC license.
3304
3304
  * See the LICENSE file in the root directory of this source tree.
@@ -3306,7 +3306,7 @@ lucide-react/dist/esm/Icon.js:
3306
3306
 
3307
3307
  lucide-react/dist/esm/createLucideIcon.js:
3308
3308
  (**
3309
- * @license lucide-react v0.396.0 - ISC
3309
+ * @license lucide-react v0.403.0 - ISC
3310
3310
  *
3311
3311
  * This source code is licensed under the ISC license.
3312
3312
  * See the LICENSE file in the root directory of this source tree.
@@ -3314,7 +3314,7 @@ lucide-react/dist/esm/createLucideIcon.js:
3314
3314
 
3315
3315
  lucide-react/dist/esm/icons/dot.js:
3316
3316
  (**
3317
- * @license lucide-react v0.396.0 - ISC
3317
+ * @license lucide-react v0.403.0 - ISC
3318
3318
  *
3319
3319
  * This source code is licensed under the ISC license.
3320
3320
  * See the LICENSE file in the root directory of this source tree.
@@ -3322,7 +3322,7 @@ lucide-react/dist/esm/icons/dot.js:
3322
3322
 
3323
3323
  lucide-react/dist/esm/lucide-react.js:
3324
3324
  (**
3325
- * @license lucide-react v0.396.0 - ISC
3325
+ * @license lucide-react v0.403.0 - ISC
3326
3326
  *
3327
3327
  * This source code is licensed under the ISC license.
3328
3328
  * See the LICENSE file in the root directory of this source tree.
@@ -11,6 +11,7 @@ type DataTableProps<DataProps = {}> = {
11
11
  enableGoTo?: boolean;
12
12
  enableSelection?: boolean;
13
13
  enableFiltering?: boolean;
14
+ resetSelection?: boolean;
14
15
  filters?: {
15
16
  accessorKey: string;
16
17
  value: string;
@@ -49,6 +50,6 @@ declare module "@tanstack/table-core" {
49
50
  i18nKey?: string;
50
51
  }
51
52
  }
52
- declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React.JSX.Element;
53
+ declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, resetSelection, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React.JSX.Element;
53
54
 
54
55
  export { DataTable };
@@ -11,6 +11,7 @@ type DataTableProps<DataProps = {}> = {
11
11
  enableGoTo?: boolean;
12
12
  enableSelection?: boolean;
13
13
  enableFiltering?: boolean;
14
+ resetSelection?: boolean;
14
15
  filters?: {
15
16
  accessorKey: string;
16
17
  value: string;
@@ -49,6 +50,6 @@ declare module "@tanstack/table-core" {
49
50
  i18nKey?: string;
50
51
  }
51
52
  }
52
- declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React.JSX.Element;
53
+ declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, resetSelection, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React.JSX.Element;
53
54
 
54
55
  export { DataTable };
@@ -1334,6 +1334,7 @@ var DataTable = ({
1334
1334
  data,
1335
1335
  paginationPosition = "bottom",
1336
1336
  translateFn,
1337
+ resetSelection,
1337
1338
  enableHideColumns,
1338
1339
  enableSelection,
1339
1340
  enableFiltering,
@@ -1420,6 +1421,9 @@ var DataTable = ({
1420
1421
  React11.useEffect(() => {
1421
1422
  localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(columnVisibility));
1422
1423
  }, [columnVisibility]);
1424
+ React11.useEffect(() => {
1425
+ setRowSelection({});
1426
+ }, [resetSelection]);
1423
1427
  React11.useEffect(() => {
1424
1428
  setColumnVisibility((prev) => {
1425
1429
  let newColumnVisibility = {};