@sikka/hawa 0.44.0-next → 0.45.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.
Files changed (47) hide show
  1. package/dist/blocks/auth/index.d.mts +3 -2
  2. package/dist/blocks/auth/index.d.ts +3 -2
  3. package/dist/blocks/auth/index.js +63 -34
  4. package/dist/blocks/auth/index.mjs +44 -23
  5. package/dist/blocks/feedback/index.js +22 -13
  6. package/dist/blocks/feedback/index.mjs +2 -2
  7. package/dist/blocks/index.d.mts +5 -2
  8. package/dist/blocks/index.d.ts +5 -2
  9. package/dist/blocks/index.js +143 -41
  10. package/dist/blocks/index.mjs +45 -15
  11. package/dist/blocks/misc/index.d.mts +2 -0
  12. package/dist/blocks/misc/index.d.ts +2 -0
  13. package/dist/blocks/misc/index.js +98 -18
  14. package/dist/blocks/misc/index.mjs +79 -7
  15. package/dist/blocks/pricing/index.js +2 -1
  16. package/dist/blocks/pricing/index.mjs +1 -1
  17. package/dist/{chunk-DYYINLRJ.mjs → chunk-D3B3MKLS.mjs} +20 -12
  18. package/dist/{chunk-MEXJAHQV.mjs → chunk-QOVVJCFE.mjs} +44 -28
  19. package/dist/{chunk-OE6XZ6LW.mjs → chunk-YABFWOF3.mjs} +2 -1
  20. package/dist/elements/index.js +44 -28
  21. package/dist/elements/index.mjs +1 -1
  22. package/dist/index.css +4 -1
  23. package/dist/index.d.mts +5 -2
  24. package/dist/index.d.ts +5 -2
  25. package/dist/index.js +85 -41
  26. package/dist/index.mjs +85 -41
  27. package/dist/interfaceSettings/index.js +2 -1
  28. package/dist/interfaceSettings/index.js.map +1 -1
  29. package/dist/interfaceSettings/index.mjs +2 -1
  30. package/dist/interfaceSettings/index.mjs.map +1 -1
  31. package/dist/phoneInput/index.js +20 -12
  32. package/dist/phoneInput/index.js.map +1 -1
  33. package/dist/phoneInput/index.mjs +20 -12
  34. package/dist/phoneInput/index.mjs.map +1 -1
  35. package/dist/pinInput/index.js +22 -15
  36. package/dist/pinInput/index.js.map +1 -1
  37. package/dist/pinInput/index.mjs +22 -15
  38. package/dist/pinInput/index.mjs.map +1 -1
  39. package/dist/radio/index.js +2 -1
  40. package/dist/radio/index.js.map +1 -1
  41. package/dist/radio/index.mjs +2 -1
  42. package/dist/radio/index.mjs.map +1 -1
  43. package/dist/select/index.js +20 -12
  44. package/dist/select/index.js.map +1 -1
  45. package/dist/select/index.mjs +20 -12
  46. package/dist/select/index.mjs.map +1 -1
  47. package/package.json +11 -11
@@ -232,6 +232,64 @@ var import_react16 = require("react");
232
232
 
233
233
  // hooks/useShortcuts.ts
234
234
  var import_react17 = require("react");
235
+ function parseHotkey(hotkey) {
236
+ const keys = hotkey.toLowerCase().split("+").map((part) => part.trim());
237
+ const modifiers = {
238
+ alt: keys.includes("alt"),
239
+ ctrl: keys.includes("ctrl"),
240
+ meta: keys.includes("meta"),
241
+ mod: keys.includes("mod"),
242
+ shift: keys.includes("shift")
243
+ };
244
+ const reservedKeys = ["alt", "ctrl", "meta", "shift", "mod"];
245
+ const freeKey = keys.find((key) => !reservedKeys.includes(key));
246
+ return {
247
+ ...modifiers,
248
+ key: freeKey
249
+ };
250
+ }
251
+ function isExactHotkey(hotkey, event) {
252
+ const { alt, ctrl, meta, mod, shift, key } = hotkey;
253
+ const { altKey, ctrlKey, metaKey, shiftKey, key: pressedKey } = event;
254
+ if (alt !== altKey) {
255
+ return false;
256
+ }
257
+ if (mod) {
258
+ if (!ctrlKey && !metaKey) {
259
+ return false;
260
+ }
261
+ } else {
262
+ if (ctrl !== ctrlKey) {
263
+ return false;
264
+ }
265
+ if (meta !== metaKey) {
266
+ return false;
267
+ }
268
+ }
269
+ if (shift !== shiftKey) {
270
+ return false;
271
+ }
272
+ if (key && (pressedKey.toLowerCase() === key.toLowerCase() || event.code.replace("Key", "").toLowerCase() === key.toLowerCase())) {
273
+ return true;
274
+ }
275
+ return false;
276
+ }
277
+ function getHotkeyMatcher(hotkey) {
278
+ return (event) => isExactHotkey(parseHotkey(hotkey), event);
279
+ }
280
+ function getHotkeyHandler(hotkeys) {
281
+ return (event) => {
282
+ const _event = "nativeEvent" in event ? event.nativeEvent : event;
283
+ hotkeys.forEach(([hotkey, handler, options = { preventDefault: true }]) => {
284
+ if (getHotkeyMatcher(hotkey)(_event)) {
285
+ if (options.preventDefault) {
286
+ event.preventDefault();
287
+ }
288
+ handler(_event);
289
+ }
290
+ });
291
+ };
292
+ }
235
293
 
236
294
  // hooks/useWindowEvent.ts
237
295
  var import_react18 = require("react");
@@ -1445,13 +1503,21 @@ var Select = ({
1445
1503
  children
1446
1504
  );
1447
1505
  };
1448
- const Option = ({ children, innerProps, innerRef }) => {
1506
+ const Option = ({
1507
+ children,
1508
+ innerProps,
1509
+ innerRef,
1510
+ isFocused,
1511
+ isSelected
1512
+ }) => {
1449
1513
  return /* @__PURE__ */ import_react33.default.createElement(
1450
1514
  "div",
1451
1515
  {
1452
1516
  ref: innerRef,
1453
1517
  className: cn(
1454
- "hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all hover:hawa-bg-primary hover:hawa-text-primary-foreground"
1518
+ "hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all",
1519
+ isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
1520
+ isSelected && "hawa-bg-primary hawa-text-primary-foreground"
1455
1521
  ),
1456
1522
  ...innerProps
1457
1523
  },
@@ -1508,15 +1574,20 @@ var Select = ({
1508
1574
  container: () => cn(
1509
1575
  selectContainerStyles,
1510
1576
  props.phoneCode && phoneCodeStyles,
1511
- props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
1512
1577
  props.isMulti && "hawa-ps-0 "
1513
1578
  ),
1514
- placeholder: () => selectPlaceholderStyles,
1579
+ placeholder: () => cn(
1580
+ selectPlaceholderStyles,
1581
+ props.disabled && "hawa-text-muted-foreground"
1582
+ ),
1515
1583
  valueContainer: () => "hawa-text-foreground hawa-px-1 ",
1516
- singleValue: () => "hawa-text-foreground",
1584
+ singleValue: () => cn(
1585
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
1586
+ ),
1517
1587
  indicatorsContainer: () => cn(
1518
1588
  selectIndicatorContainerStyles,
1519
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
1589
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
1590
+ props.disabled && "hawa-opacity-30"
1520
1591
  )
1521
1592
  },
1522
1593
  unstyled: true,
@@ -1524,12 +1595,6 @@ var Select = ({
1524
1595
  components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
1525
1596
  Option,
1526
1597
  Menu,
1527
- // Control: (e) => (
1528
- // <div
1529
- // className={cn(e.className, "hawa-flex hawa-flex-row")}
1530
- // {...e}
1531
- // />
1532
- // ),
1533
1598
  ValueContainer: (e) => /* @__PURE__ */ import_react33.default.createElement(
1534
1599
  "div",
1535
1600
  {
@@ -1552,6 +1617,7 @@ var Select = ({
1552
1617
  options: props.options,
1553
1618
  getOptionLabel: props.getOptionLabel,
1554
1619
  defaultValue: props.defaultValue,
1620
+ value: props.value,
1555
1621
  placeholder: props.placeholder,
1556
1622
  isDisabled: props.disabled,
1557
1623
  isClearable: props.isClearable,
@@ -1652,6 +1718,7 @@ var ContactForm = ({
1652
1718
  onSubmit,
1653
1719
  customFields,
1654
1720
  classNames,
1721
+ clearOnSubmit = true,
1655
1722
  ...props
1656
1723
  }) => {
1657
1724
  var _a, _b, _c, _d, _e;
@@ -1695,8 +1762,11 @@ var ContactForm = ({
1695
1762
  control,
1696
1763
  handleSubmit,
1697
1764
  formState: { errors },
1698
- reset
1765
+ reset,
1766
+ getValues,
1767
+ trigger
1699
1768
  } = (0, import_react_hook_form2.useForm)({
1769
+ mode: "all",
1700
1770
  resolver: (0, import_zod.zodResolver)(MainSchema),
1701
1771
  defaultValues: {
1702
1772
  name: "",
@@ -1705,10 +1775,16 @@ var ContactForm = ({
1705
1775
  ...customFieldsDefaultValues
1706
1776
  }
1707
1777
  });
1708
- const handleFormSubmit = (data) => {
1778
+ const SubmitForm = async (data) => {
1779
+ const isValid = await trigger();
1780
+ if (!isValid) {
1781
+ return;
1782
+ }
1709
1783
  if (onSubmit) {
1710
1784
  onSubmit(data);
1711
- reset();
1785
+ if (clearOnSubmit) {
1786
+ reset();
1787
+ }
1712
1788
  } else {
1713
1789
  console.log("Form is submitted but onSubmit prop is missing");
1714
1790
  }
@@ -1718,7 +1794,8 @@ var ContactForm = ({
1718
1794
  {
1719
1795
  className: cn(
1720
1796
  "hawa-w-full",
1721
- cardless && "hawa-border-none hawa-bg-transparent hawa-shadow-none hawa-drop-shadow-none"
1797
+ cardless && "hawa-border-none hawa-bg-transparent hawa-shadow-none hawa-drop-shadow-none",
1798
+ classNames == null ? void 0 : classNames.container
1722
1799
  ),
1723
1800
  style: cardless ? { boxShadow: "none" } : void 0
1724
1801
  },
@@ -1726,7 +1803,7 @@ var ContactForm = ({
1726
1803
  "form",
1727
1804
  {
1728
1805
  noValidate: true,
1729
- onSubmit: handleSubmit(handleFormSubmit),
1806
+ onSubmit: handleSubmit(SubmitForm),
1730
1807
  className: "hawa-space-y-2",
1731
1808
  id: formId,
1732
1809
  autoComplete: formAutoComplete
@@ -1837,7 +1914,10 @@ var ContactForm = ({
1837
1914
  textareaProps: {
1838
1915
  placeholder: texts == null ? void 0 : texts.message.placeholder,
1839
1916
  className: "hawa-min-h-20",
1840
- ...field
1917
+ ...field,
1918
+ onKeyDown: getHotkeyHandler([
1919
+ ["mod+enter", () => SubmitForm(getValues())]
1920
+ ])
1841
1921
  },
1842
1922
  classNames: { textarea: "hawa-min-h-40 hawa-h-full" },
1843
1923
  helperText: (_a2 = errors.message) == null ? void 0 : _a2.message
@@ -11,7 +11,7 @@ import {
11
11
  } from "../../chunk-FIUKVRL5.mjs";
12
12
  import {
13
13
  Select
14
- } from "../../chunk-DYYINLRJ.mjs";
14
+ } from "../../chunk-D3B3MKLS.mjs";
15
15
  import {
16
16
  Button,
17
17
  Card,
@@ -84,6 +84,64 @@ import { useEffect as useEffect14, useRef as useRef8 } from "react";
84
84
 
85
85
  // hooks/useShortcuts.ts
86
86
  import { useEffect as useEffect15 } from "react";
87
+ function parseHotkey(hotkey) {
88
+ const keys = hotkey.toLowerCase().split("+").map((part) => part.trim());
89
+ const modifiers = {
90
+ alt: keys.includes("alt"),
91
+ ctrl: keys.includes("ctrl"),
92
+ meta: keys.includes("meta"),
93
+ mod: keys.includes("mod"),
94
+ shift: keys.includes("shift")
95
+ };
96
+ const reservedKeys = ["alt", "ctrl", "meta", "shift", "mod"];
97
+ const freeKey = keys.find((key) => !reservedKeys.includes(key));
98
+ return {
99
+ ...modifiers,
100
+ key: freeKey
101
+ };
102
+ }
103
+ function isExactHotkey(hotkey, event) {
104
+ const { alt, ctrl, meta, mod, shift, key } = hotkey;
105
+ const { altKey, ctrlKey, metaKey, shiftKey, key: pressedKey } = event;
106
+ if (alt !== altKey) {
107
+ return false;
108
+ }
109
+ if (mod) {
110
+ if (!ctrlKey && !metaKey) {
111
+ return false;
112
+ }
113
+ } else {
114
+ if (ctrl !== ctrlKey) {
115
+ return false;
116
+ }
117
+ if (meta !== metaKey) {
118
+ return false;
119
+ }
120
+ }
121
+ if (shift !== shiftKey) {
122
+ return false;
123
+ }
124
+ if (key && (pressedKey.toLowerCase() === key.toLowerCase() || event.code.replace("Key", "").toLowerCase() === key.toLowerCase())) {
125
+ return true;
126
+ }
127
+ return false;
128
+ }
129
+ function getHotkeyMatcher(hotkey) {
130
+ return (event) => isExactHotkey(parseHotkey(hotkey), event);
131
+ }
132
+ function getHotkeyHandler(hotkeys) {
133
+ return (event) => {
134
+ const _event = "nativeEvent" in event ? event.nativeEvent : event;
135
+ hotkeys.forEach(([hotkey, handler, options = { preventDefault: true }]) => {
136
+ if (getHotkeyMatcher(hotkey)(_event)) {
137
+ if (options.preventDefault) {
138
+ event.preventDefault();
139
+ }
140
+ handler(_event);
141
+ }
142
+ });
143
+ };
144
+ }
87
145
 
88
146
  // hooks/useWindowEvent.ts
89
147
  import { useEffect as useEffect16 } from "react";
@@ -447,6 +505,7 @@ var ContactForm = ({
447
505
  onSubmit,
448
506
  customFields,
449
507
  classNames,
508
+ clearOnSubmit = true,
450
509
  ...props
451
510
  }) => {
452
511
  var _a, _b, _c, _d, _e;
@@ -490,8 +549,11 @@ var ContactForm = ({
490
549
  control,
491
550
  handleSubmit,
492
551
  formState: { errors },
493
- reset
552
+ reset,
553
+ getValues,
554
+ trigger
494
555
  } = useForm2({
556
+ mode: "all",
495
557
  resolver: zodResolver(MainSchema),
496
558
  defaultValues: {
497
559
  name: "",
@@ -500,10 +562,16 @@ var ContactForm = ({
500
562
  ...customFieldsDefaultValues
501
563
  }
502
564
  });
503
- const handleFormSubmit = (data) => {
565
+ const SubmitForm = async (data) => {
566
+ const isValid = await trigger();
567
+ if (!isValid) {
568
+ return;
569
+ }
504
570
  if (onSubmit) {
505
571
  onSubmit(data);
506
- reset();
572
+ if (clearOnSubmit) {
573
+ reset();
574
+ }
507
575
  } else {
508
576
  console.log("Form is submitted but onSubmit prop is missing");
509
577
  }
@@ -513,7 +581,8 @@ var ContactForm = ({
513
581
  {
514
582
  className: cn(
515
583
  "hawa-w-full",
516
- cardless && "hawa-border-none hawa-bg-transparent hawa-shadow-none hawa-drop-shadow-none"
584
+ cardless && "hawa-border-none hawa-bg-transparent hawa-shadow-none hawa-drop-shadow-none",
585
+ classNames == null ? void 0 : classNames.container
517
586
  ),
518
587
  style: cardless ? { boxShadow: "none" } : void 0
519
588
  },
@@ -521,7 +590,7 @@ var ContactForm = ({
521
590
  "form",
522
591
  {
523
592
  noValidate: true,
524
- onSubmit: handleSubmit(handleFormSubmit),
593
+ onSubmit: handleSubmit(SubmitForm),
525
594
  className: "hawa-space-y-2",
526
595
  id: formId,
527
596
  autoComplete: formAutoComplete
@@ -632,7 +701,10 @@ var ContactForm = ({
632
701
  textareaProps: {
633
702
  placeholder: texts == null ? void 0 : texts.message.placeholder,
634
703
  className: "hawa-min-h-20",
635
- ...field
704
+ ...field,
705
+ onKeyDown: getHotkeyHandler([
706
+ ["mod+enter", () => SubmitForm(getValues())]
707
+ ])
636
708
  },
637
709
  classNames: { textarea: "hawa-min-h-40 hawa-h-full" },
638
710
  helperText: (_a2 = errors.message) == null ? void 0 : _a2.message
@@ -1159,7 +1159,8 @@ var Radio = (0, import_react13.forwardRef)(
1159
1159
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
1160
1160
  orientationStyle[orientation],
1161
1161
  widthStyle[width],
1162
- tabsContainerClassName
1162
+ tabsContainerClassName,
1163
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
1163
1164
  )
1164
1165
  },
1165
1166
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -6,7 +6,7 @@ import {
6
6
  import "../../chunk-47APBDKK.mjs";
7
7
  import {
8
8
  Radio
9
- } from "../../chunk-OE6XZ6LW.mjs";
9
+ } from "../../chunk-YABFWOF3.mjs";
10
10
  import {
11
11
  CheckMark,
12
12
  UncheckMark
@@ -33,13 +33,21 @@ var Select = ({
33
33
  children
34
34
  );
35
35
  };
36
- const Option = ({ children, innerProps, innerRef }) => {
36
+ const Option = ({
37
+ children,
38
+ innerProps,
39
+ innerRef,
40
+ isFocused,
41
+ isSelected
42
+ }) => {
37
43
  return /* @__PURE__ */ React.createElement(
38
44
  "div",
39
45
  {
40
46
  ref: innerRef,
41
47
  className: cn(
42
- "hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all hover:hawa-bg-primary hover:hawa-text-primary-foreground"
48
+ "hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all",
49
+ isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
50
+ isSelected && "hawa-bg-primary hawa-text-primary-foreground"
43
51
  ),
44
52
  ...innerProps
45
53
  },
@@ -96,15 +104,20 @@ var Select = ({
96
104
  container: () => cn(
97
105
  selectContainerStyles,
98
106
  props.phoneCode && phoneCodeStyles,
99
- props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
100
107
  props.isMulti && "hawa-ps-0 "
101
108
  ),
102
- placeholder: () => selectPlaceholderStyles,
109
+ placeholder: () => cn(
110
+ selectPlaceholderStyles,
111
+ props.disabled && "hawa-text-muted-foreground"
112
+ ),
103
113
  valueContainer: () => "hawa-text-foreground hawa-px-1 ",
104
- singleValue: () => "hawa-text-foreground",
114
+ singleValue: () => cn(
115
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
116
+ ),
105
117
  indicatorsContainer: () => cn(
106
118
  selectIndicatorContainerStyles,
107
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
119
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
120
+ props.disabled && "hawa-opacity-30"
108
121
  )
109
122
  },
110
123
  unstyled: true,
@@ -112,12 +125,6 @@ var Select = ({
112
125
  components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
113
126
  Option,
114
127
  Menu,
115
- // Control: (e) => (
116
- // <div
117
- // className={cn(e.className, "hawa-flex hawa-flex-row")}
118
- // {...e}
119
- // />
120
- // ),
121
128
  ValueContainer: (e) => /* @__PURE__ */ React.createElement(
122
129
  "div",
123
130
  {
@@ -140,6 +147,7 @@ var Select = ({
140
147
  options: props.options,
141
148
  getOptionLabel: props.getOptionLabel,
142
149
  defaultValue: props.defaultValue,
150
+ value: props.value,
143
151
  placeholder: props.placeholder,
144
152
  isDisabled: props.disabled,
145
153
  isClearable: props.isClearable,
@@ -360,13 +360,21 @@ var Select = ({
360
360
  children
361
361
  );
362
362
  };
363
- const Option = ({ children, innerProps, innerRef }) => {
363
+ const Option = ({
364
+ children,
365
+ innerProps,
366
+ innerRef,
367
+ isFocused,
368
+ isSelected
369
+ }) => {
364
370
  return /* @__PURE__ */ React3.createElement(
365
371
  "div",
366
372
  {
367
373
  ref: innerRef,
368
374
  className: cn(
369
- "hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all hover:hawa-bg-primary hover:hawa-text-primary-foreground"
375
+ "hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all",
376
+ isFocused ? "hawa-bg-accent hawa-text-bg-accent-foreground" : "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
377
+ isSelected && "hawa-bg-primary hawa-text-primary-foreground"
370
378
  ),
371
379
  ...innerProps
372
380
  },
@@ -423,15 +431,20 @@ var Select = ({
423
431
  container: () => cn(
424
432
  selectContainerStyles,
425
433
  props.phoneCode && phoneCodeStyles,
426
- props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
427
434
  props.isMulti && "hawa-ps-0 "
428
435
  ),
429
- placeholder: () => selectPlaceholderStyles,
436
+ placeholder: () => cn(
437
+ selectPlaceholderStyles,
438
+ props.disabled && "hawa-text-muted-foreground"
439
+ ),
430
440
  valueContainer: () => "hawa-text-foreground hawa-px-1 ",
431
- singleValue: () => "hawa-text-foreground",
441
+ singleValue: () => cn(
442
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
443
+ ),
432
444
  indicatorsContainer: () => cn(
433
445
  selectIndicatorContainerStyles,
434
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
446
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
447
+ props.disabled && "hawa-opacity-30"
435
448
  )
436
449
  },
437
450
  unstyled: true,
@@ -439,12 +452,6 @@ var Select = ({
439
452
  components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
440
453
  Option,
441
454
  Menu,
442
- // Control: (e) => (
443
- // <div
444
- // className={cn(e.className, "hawa-flex hawa-flex-row")}
445
- // {...e}
446
- // />
447
- // ),
448
455
  ValueContainer: (e) => /* @__PURE__ */ React3.createElement(
449
456
  "div",
450
457
  {
@@ -467,6 +474,7 @@ var Select = ({
467
474
  options: props.options,
468
475
  getOptionLabel: props.getOptionLabel,
469
476
  defaultValue: props.defaultValue,
477
+ value: props.value,
470
478
  placeholder: props.placeholder,
471
479
  isDisabled: props.disabled,
472
480
  isClearable: props.isClearable,
@@ -2409,19 +2417,19 @@ var StopPropagationWrapper = (props) => {
2409
2417
  import * as React7 from "react";
2410
2418
  import { OTPInput, OTPInputContext } from "input-otp";
2411
2419
 
2412
- // ../../node_modules/.pnpm/lucide-react@0.417.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
2420
+ // ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
2413
2421
  import { forwardRef as forwardRef4, createElement as createElement3 } from "react";
2414
2422
 
2415
- // ../../node_modules/.pnpm/lucide-react@0.417.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
2423
+ // ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
2416
2424
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2417
2425
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
2418
2426
  return Boolean(className) && array.indexOf(className) === index;
2419
2427
  }).join(" ");
2420
2428
 
2421
- // ../../node_modules/.pnpm/lucide-react@0.417.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
2429
+ // ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
2422
2430
  import { forwardRef as forwardRef3, createElement as createElement2 } from "react";
2423
2431
 
2424
- // ../../node_modules/.pnpm/lucide-react@0.417.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
2432
+ // ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
2425
2433
  var defaultAttributes = {
2426
2434
  xmlns: "http://www.w3.org/2000/svg",
2427
2435
  width: 24,
@@ -2434,7 +2442,7 @@ var defaultAttributes = {
2434
2442
  strokeLinejoin: "round"
2435
2443
  };
2436
2444
 
2437
- // ../../node_modules/.pnpm/lucide-react@0.417.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
2445
+ // ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
2438
2446
  var Icon = forwardRef3(
2439
2447
  ({
2440
2448
  color = "currentColor",
@@ -2466,7 +2474,7 @@ var Icon = forwardRef3(
2466
2474
  }
2467
2475
  );
2468
2476
 
2469
- // ../../node_modules/.pnpm/lucide-react@0.417.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
2477
+ // ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
2470
2478
  var createLucideIcon = (iconName, iconNode) => {
2471
2479
  const Component = forwardRef4(
2472
2480
  ({ className, ...props }, ref) => createElement3(Icon, {
@@ -2480,7 +2488,7 @@ var createLucideIcon = (iconName, iconNode) => {
2480
2488
  return Component;
2481
2489
  };
2482
2490
 
2483
- // ../../node_modules/.pnpm/lucide-react@0.417.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
2491
+ // ../../node_modules/.pnpm/lucide-react@0.424.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
2484
2492
  var Dot = createLucideIcon("Dot", [
2485
2493
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
2486
2494
  ]);
@@ -2537,12 +2545,19 @@ var PinInput = ({
2537
2545
  const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
2538
2546
  const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
2539
2547
  const secondGroupLength = maxLength - firstGroupLength;
2540
- return /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React7.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React7.createElement(PinInputGroup, { className: "hawa-w-full" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React7.createElement(PinInputSlot, { key: index, index, className: "hawa-w-full" }))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React7.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React7.createElement(PinInputGroup, { className: "hawa-w-full" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React7.createElement(
2548
+ return /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React7.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React7.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React7.createElement(
2549
+ PinInputSlot,
2550
+ {
2551
+ key: index,
2552
+ index,
2553
+ className: "hawa-w-full hawa-border"
2554
+ }
2555
+ ))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React7.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React7.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React7.createElement(
2541
2556
  PinInputSlot,
2542
2557
  {
2543
2558
  key: index + firstGroupLength,
2544
2559
  index: index + firstGroupLength,
2545
- className: "hawa-w-full"
2560
+ className: "hawa-w-full hawa-border"
2546
2561
  }
2547
2562
  )))), /* @__PURE__ */ React7.createElement(HelperText, { helperText: props.helperText }));
2548
2563
  };
@@ -2702,7 +2717,8 @@ var Radio = forwardRef7(
2702
2717
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
2703
2718
  orientationStyle[orientation],
2704
2719
  widthStyle[width],
2705
- tabsContainerClassName
2720
+ tabsContainerClassName,
2721
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
2706
2722
  )
2707
2723
  },
2708
2724
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -3305,7 +3321,7 @@ export {
3305
3321
 
3306
3322
  lucide-react/dist/esm/shared/src/utils.js:
3307
3323
  (**
3308
- * @license lucide-react v0.417.0 - ISC
3324
+ * @license lucide-react v0.424.0 - ISC
3309
3325
  *
3310
3326
  * This source code is licensed under the ISC license.
3311
3327
  * See the LICENSE file in the root directory of this source tree.
@@ -3313,7 +3329,7 @@ lucide-react/dist/esm/shared/src/utils.js:
3313
3329
 
3314
3330
  lucide-react/dist/esm/defaultAttributes.js:
3315
3331
  (**
3316
- * @license lucide-react v0.417.0 - ISC
3332
+ * @license lucide-react v0.424.0 - ISC
3317
3333
  *
3318
3334
  * This source code is licensed under the ISC license.
3319
3335
  * See the LICENSE file in the root directory of this source tree.
@@ -3321,7 +3337,7 @@ lucide-react/dist/esm/defaultAttributes.js:
3321
3337
 
3322
3338
  lucide-react/dist/esm/Icon.js:
3323
3339
  (**
3324
- * @license lucide-react v0.417.0 - ISC
3340
+ * @license lucide-react v0.424.0 - ISC
3325
3341
  *
3326
3342
  * This source code is licensed under the ISC license.
3327
3343
  * See the LICENSE file in the root directory of this source tree.
@@ -3329,7 +3345,7 @@ lucide-react/dist/esm/Icon.js:
3329
3345
 
3330
3346
  lucide-react/dist/esm/createLucideIcon.js:
3331
3347
  (**
3332
- * @license lucide-react v0.417.0 - ISC
3348
+ * @license lucide-react v0.424.0 - ISC
3333
3349
  *
3334
3350
  * This source code is licensed under the ISC license.
3335
3351
  * See the LICENSE file in the root directory of this source tree.
@@ -3337,7 +3353,7 @@ lucide-react/dist/esm/createLucideIcon.js:
3337
3353
 
3338
3354
  lucide-react/dist/esm/icons/dot.js:
3339
3355
  (**
3340
- * @license lucide-react v0.417.0 - ISC
3356
+ * @license lucide-react v0.424.0 - ISC
3341
3357
  *
3342
3358
  * This source code is licensed under the ISC license.
3343
3359
  * See the LICENSE file in the root directory of this source tree.
@@ -3345,7 +3361,7 @@ lucide-react/dist/esm/icons/dot.js:
3345
3361
 
3346
3362
  lucide-react/dist/esm/lucide-react.js:
3347
3363
  (**
3348
- * @license lucide-react v0.417.0 - ISC
3364
+ * @license lucide-react v0.424.0 - ISC
3349
3365
  *
3350
3366
  * This source code is licensed under the ISC license.
3351
3367
  * See the LICENSE file in the root directory of this source tree.
@@ -159,7 +159,8 @@ var Radio = forwardRef2(
159
159
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
160
160
  orientationStyle[orientation],
161
161
  widthStyle[width],
162
- tabsContainerClassName
162
+ tabsContainerClassName,
163
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
163
164
  )
164
165
  },
165
166
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {