@skybin-tech/nebula-ui 0.0.29 → 0.0.31

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 (133) hide show
  1. package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -1
  2. package/dist/cjs/components/Accordion/Accordion.cjs.map +1 -1
  3. package/dist/cjs/components/Alert/Alert.cjs.map +1 -1
  4. package/dist/cjs/components/Avatar/Avatar.cjs.map +1 -1
  5. package/dist/cjs/components/Button/Button.cjs.map +1 -1
  6. package/dist/cjs/components/Card/Card.cjs.map +1 -1
  7. package/dist/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
  8. package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
  9. package/dist/cjs/components/Form/Checkbox.cjs.map +1 -1
  10. package/dist/cjs/components/Form/Combobox.cjs.map +1 -1
  11. package/dist/cjs/components/Form/CountryPicker.cjs.map +1 -1
  12. package/dist/cjs/components/Form/CountrySelect.cjs.map +1 -1
  13. package/dist/cjs/components/Form/DatePicker.cjs +8 -2
  14. package/dist/cjs/components/Form/DatePicker.cjs.map +1 -1
  15. package/dist/cjs/components/Form/DateTimePicker.cjs +202 -0
  16. package/dist/cjs/components/Form/DateTimePicker.cjs.map +1 -0
  17. package/dist/cjs/components/Form/FieldLayout.cjs.map +1 -1
  18. package/dist/cjs/components/Form/Form.cjs +9 -8
  19. package/dist/cjs/components/Form/Form.cjs.map +1 -1
  20. package/dist/cjs/components/Form/FormSwitch.cjs.map +1 -1
  21. package/dist/cjs/components/Form/PasswordRevealToggle.cjs +21 -0
  22. package/dist/cjs/components/Form/PasswordRevealToggle.cjs.map +1 -0
  23. package/dist/cjs/components/Form/PhoneInput.cjs.map +1 -1
  24. package/dist/cjs/components/Form/Radio.cjs.map +1 -1
  25. package/dist/cjs/components/Form/Select.cjs.map +1 -1
  26. package/dist/cjs/components/Form/TextArea.cjs.map +1 -1
  27. package/dist/cjs/components/Form/TextBox.cjs +29 -14
  28. package/dist/cjs/components/Form/TextBox.cjs.map +1 -1
  29. package/dist/cjs/components/Form/TimePicker.cjs +111 -0
  30. package/dist/cjs/components/Form/TimePicker.cjs.map +1 -0
  31. package/dist/cjs/components/Form/context.cjs +1 -1
  32. package/dist/cjs/components/Form/context.cjs.map +1 -1
  33. package/dist/cjs/components/Form/hooks.cjs.map +1 -1
  34. package/dist/cjs/components/Form/index.cjs +7 -0
  35. package/dist/cjs/components/Form/variants.cjs.map +1 -1
  36. package/dist/cjs/components/Input/Input.cjs +32 -4
  37. package/dist/cjs/components/Input/Input.cjs.map +1 -1
  38. package/dist/cjs/components/Label/Label.cjs.map +1 -1
  39. package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
  40. package/dist/cjs/components/Separator/Separator.cjs.map +1 -1
  41. package/dist/cjs/components/Switch/Switch.cjs.map +1 -1
  42. package/dist/cjs/components/Tabs/Tabs.cjs.map +1 -1
  43. package/dist/cjs/components/Textarea/Textarea.cjs.map +1 -1
  44. package/dist/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
  45. package/dist/cjs/hooks/useDebounce.cjs.map +1 -1
  46. package/dist/cjs/hooks/useToggle.cjs.map +1 -1
  47. package/dist/cjs/index.cjs +7 -0
  48. package/dist/cjs/primitives/accordion.cjs.map +1 -1
  49. package/dist/cjs/primitives/alert.cjs.map +1 -1
  50. package/dist/cjs/primitives/badge.cjs.map +1 -1
  51. package/dist/cjs/primitives/breadcrumb.cjs.map +1 -1
  52. package/dist/cjs/primitives/button.cjs.map +1 -1
  53. package/dist/cjs/primitives/checkbox.cjs.map +1 -1
  54. package/dist/cjs/primitives/command.cjs.map +1 -1
  55. package/dist/cjs/primitives/dialog.cjs.map +1 -1
  56. package/dist/cjs/primitives/dropdown-menu.cjs.map +1 -1
  57. package/dist/cjs/primitives/input-otp.cjs.map +1 -1
  58. package/dist/cjs/primitives/label.cjs.map +1 -1
  59. package/dist/cjs/primitives/progress.cjs.map +1 -1
  60. package/dist/cjs/primitives/radio-group.cjs.map +1 -1
  61. package/dist/cjs/primitives/scroll-area.cjs.map +1 -1
  62. package/dist/cjs/primitives/select.cjs.map +1 -1
  63. package/dist/cjs/primitives/sheet.cjs.map +1 -1
  64. package/dist/cjs/primitives/slider.cjs.map +1 -1
  65. package/dist/cjs/primitives/switch.cjs.map +1 -1
  66. package/dist/cjs/primitives/table.cjs.map +1 -1
  67. package/dist/cjs/primitives/toast.cjs.map +1 -1
  68. package/dist/cjs/primitives/toggle.cjs.map +1 -1
  69. package/dist/cjs/utils/cn.cjs.map +1 -1
  70. package/dist/components/Button/Button.js.map +1 -1
  71. package/dist/components/Form/Checkbox.js.map +1 -1
  72. package/dist/components/Form/Combobox.js.map +1 -1
  73. package/dist/components/Form/CountryPicker.js.map +1 -1
  74. package/dist/components/Form/CountrySelect.js.map +1 -1
  75. package/dist/components/Form/DatePicker.d.ts.map +1 -1
  76. package/dist/components/Form/DatePicker.js +9 -3
  77. package/dist/components/Form/DatePicker.js.map +1 -1
  78. package/dist/components/Form/DateTimePicker.d.ts +28 -0
  79. package/dist/components/Form/DateTimePicker.d.ts.map +1 -0
  80. package/dist/components/Form/DateTimePicker.js +202 -0
  81. package/dist/components/Form/DateTimePicker.js.map +1 -0
  82. package/dist/components/Form/FieldLayout.js.map +1 -1
  83. package/dist/components/Form/Form.js +9 -8
  84. package/dist/components/Form/Form.js.map +1 -1
  85. package/dist/components/Form/FormSwitch.js.map +1 -1
  86. package/dist/components/Form/PasswordRevealToggle.d.ts +7 -0
  87. package/dist/components/Form/PasswordRevealToggle.d.ts.map +1 -0
  88. package/dist/components/Form/PasswordRevealToggle.js +21 -0
  89. package/dist/components/Form/PasswordRevealToggle.js.map +1 -0
  90. package/dist/components/Form/PhoneInput.js.map +1 -1
  91. package/dist/components/Form/Radio.js.map +1 -1
  92. package/dist/components/Form/Select.js.map +1 -1
  93. package/dist/components/Form/TextArea.js.map +1 -1
  94. package/dist/components/Form/TextBox.d.ts +5 -0
  95. package/dist/components/Form/TextBox.d.ts.map +1 -1
  96. package/dist/components/Form/TextBox.js +30 -15
  97. package/dist/components/Form/TextBox.js.map +1 -1
  98. package/dist/components/Form/TimePicker.d.ts +14 -0
  99. package/dist/components/Form/TimePicker.d.ts.map +1 -0
  100. package/dist/components/Form/TimePicker.js +111 -0
  101. package/dist/components/Form/TimePicker.js.map +1 -0
  102. package/dist/components/Form/context.d.ts +1 -1
  103. package/dist/components/Form/context.d.ts.map +1 -1
  104. package/dist/components/Form/context.js +1 -1
  105. package/dist/components/Form/context.js.map +1 -1
  106. package/dist/components/Form/index.d.ts +6 -0
  107. package/dist/components/Form/index.d.ts.map +1 -1
  108. package/dist/components/Form/index.js +4 -1
  109. package/dist/components/Input/Input.d.ts +14 -2
  110. package/dist/components/Input/Input.d.ts.map +1 -1
  111. package/dist/components/Input/Input.js +34 -6
  112. package/dist/components/Input/Input.js.map +1 -1
  113. package/dist/components/Pagination/Pagination.js.map +1 -1
  114. package/dist/index.d.ts +2 -2
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +4 -1
  117. package/dist/primitives/accordion.js.map +1 -1
  118. package/dist/primitives/breadcrumb.js.map +1 -1
  119. package/dist/primitives/checkbox.js.map +1 -1
  120. package/dist/primitives/command.js.map +1 -1
  121. package/dist/primitives/dialog.js.map +1 -1
  122. package/dist/primitives/dropdown-menu.js.map +1 -1
  123. package/dist/primitives/input-otp.js.map +1 -1
  124. package/dist/primitives/progress.js.map +1 -1
  125. package/dist/primitives/radio-group.js.map +1 -1
  126. package/dist/primitives/scroll-area.js.map +1 -1
  127. package/dist/primitives/select.js.map +1 -1
  128. package/dist/primitives/sheet.js.map +1 -1
  129. package/dist/primitives/slider.js.map +1 -1
  130. package/dist/primitives/switch.js.map +1 -1
  131. package/dist/primitives/table.js.map +1 -1
  132. package/dist/primitives/toast.js.map +1 -1
  133. package/package.json +22 -22
@@ -0,0 +1,111 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn } from "../../utils/cn.js";
4
+ import { Button } from "../../primitives/button.js";
5
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../primitives/select.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { setHours, setMinutes, startOfDay } from "date-fns";
8
+ //#region src/components/Form/TimePicker.tsx
9
+ function getHour12(date) {
10
+ const hour = date.getHours() % 12;
11
+ return hour === 0 ? 12 : hour;
12
+ }
13
+ function getPeriod(date) {
14
+ return date.getHours() >= 12 ? "PM" : "AM";
15
+ }
16
+ function toHours24(hour12, period) {
17
+ const hour = hour12 % 12;
18
+ return period === "PM" ? hour + 12 : hour;
19
+ }
20
+ function applyTime(base, hour12, minute, period) {
21
+ const next = base ? new Date(base) : startOfDay(/* @__PURE__ */ new Date());
22
+ return setMinutes(setHours(next, toHours24(hour12, period)), minute);
23
+ }
24
+ function minuteOptions(minuteStep, currentMinute) {
25
+ const steps = [];
26
+ for (let minute = 0; minute < 60; minute += minuteStep) steps.push(minute);
27
+ if (currentMinute !== void 0 && !steps.includes(currentMinute)) return [...steps, currentMinute].sort((a, b) => a - b);
28
+ return steps;
29
+ }
30
+ function TimePicker({ value, onChange, onClear, minuteStep = 5, disabled, className }) {
31
+ const hour = value ? getHour12(value) : void 0;
32
+ const minute = value ? value.getMinutes() : void 0;
33
+ const period = value ? getPeriod(value) : void 0;
34
+ const minutes = minuteOptions(minuteStep, minute);
35
+ const commit = (nextHour, nextMinute, nextPeriod) => {
36
+ onChange(applyTime(value, nextHour, nextMinute, nextPeriod));
37
+ };
38
+ return /* @__PURE__ */ jsxs("div", {
39
+ className: cn("flex flex-col gap-2", className),
40
+ children: [/* @__PURE__ */ jsxs("div", {
41
+ className: "flex items-center gap-2",
42
+ children: [
43
+ /* @__PURE__ */ jsxs(Select, {
44
+ value: hour !== void 0 ? String(hour) : void 0,
45
+ onValueChange: (next) => {
46
+ commit(Number(next), minute ?? 0, period ?? "AM");
47
+ },
48
+ disabled,
49
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
50
+ "aria-label": "Hour",
51
+ className: "h-8 w-[4.5rem] text-xs",
52
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "HH" })
53
+ }), /* @__PURE__ */ jsx(SelectContent, { children: Array.from({ length: 12 }, (_, index) => index + 1).map((option) => /* @__PURE__ */ jsx(SelectItem, {
54
+ value: String(option),
55
+ children: option
56
+ }, option)) })]
57
+ }),
58
+ /* @__PURE__ */ jsx("span", {
59
+ className: "text-muted-foreground text-sm",
60
+ children: ":"
61
+ }),
62
+ /* @__PURE__ */ jsxs(Select, {
63
+ value: minute !== void 0 ? String(minute) : void 0,
64
+ onValueChange: (next) => {
65
+ commit(hour ?? 12, Number(next), period ?? "AM");
66
+ },
67
+ disabled,
68
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
69
+ "aria-label": "Minute",
70
+ className: "h-8 w-[4.5rem] text-xs",
71
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "MM" })
72
+ }), /* @__PURE__ */ jsx(SelectContent, { children: minutes.map((option) => /* @__PURE__ */ jsx(SelectItem, {
73
+ value: String(option),
74
+ children: String(option).padStart(2, "0")
75
+ }, option)) })]
76
+ }),
77
+ /* @__PURE__ */ jsxs(Select, {
78
+ value: period,
79
+ onValueChange: (next) => {
80
+ commit(hour ?? 12, minute ?? 0, next);
81
+ },
82
+ disabled,
83
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
84
+ "aria-label": "AM or PM",
85
+ className: "h-8 w-[4.75rem] text-xs",
86
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "AM" })
87
+ }), /* @__PURE__ */ jsxs(SelectContent, { children: [/* @__PURE__ */ jsx(SelectItem, {
88
+ value: "AM",
89
+ children: "AM"
90
+ }), /* @__PURE__ */ jsx(SelectItem, {
91
+ value: "PM",
92
+ children: "PM"
93
+ })] })]
94
+ })
95
+ ]
96
+ }), onClear && value ? /* @__PURE__ */ jsx(Button, {
97
+ type: "button",
98
+ variant: "link",
99
+ size: "sm",
100
+ disabled,
101
+ className: "h-auto self-start px-0",
102
+ onClick: onClear,
103
+ children: "Clear time"
104
+ }) : null]
105
+ });
106
+ }
107
+ TimePicker.displayName = "TimePicker";
108
+ //#endregion
109
+ export { TimePicker };
110
+
111
+ //# sourceMappingURL=TimePicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimePicker.js","names":[],"sources":["../../../src/components/Form/TimePicker.tsx"],"sourcesContent":["'use client';\r\n\r\nimport { setHours, setMinutes, startOfDay } from \"date-fns\";\r\nimport { cn } from \"../../utils/cn\";\r\nimport { Button } from \"../../primitives/button\";\r\nimport {\r\n Select,\r\n SelectContent,\r\n SelectItem,\r\n SelectTrigger,\r\n SelectValue,\r\n} from \"../../primitives/select\";\r\n\r\nexport type DayPeriod = \"AM\" | \"PM\";\r\n\r\nexport interface TimePickerProps {\r\n value?: Date;\r\n onChange: (date: Date) => void;\r\n onClear?: () => void;\r\n minuteStep?: number;\r\n disabled?: boolean;\r\n className?: string;\r\n}\r\n\r\nfunction getHour12(date: Date): number {\r\n const hour = date.getHours() % 12;\r\n return hour === 0 ? 12 : hour;\r\n}\r\n\r\nfunction getPeriod(date: Date): DayPeriod {\r\n return date.getHours() >= 12 ? \"PM\" : \"AM\";\r\n}\r\n\r\nfunction toHours24(hour12: number, period: DayPeriod): number {\r\n const hour = hour12 % 12;\r\n return period === \"PM\" ? hour + 12 : hour;\r\n}\r\n\r\nfunction applyTime(\r\n base: Date | undefined,\r\n hour12: number,\r\n minute: number,\r\n period: DayPeriod\r\n): Date {\r\n const next = base ? new Date(base) : startOfDay(new Date());\r\n return setMinutes(setHours(next, toHours24(hour12, period)), minute);\r\n}\r\n\r\nfunction minuteOptions(minuteStep: number, currentMinute?: number): number[] {\r\n const steps: number[] = [];\r\n for (let minute = 0; minute < 60; minute += minuteStep) {\r\n steps.push(minute);\r\n }\r\n\r\n if (currentMinute !== undefined && !steps.includes(currentMinute)) {\r\n return [...steps, currentMinute].sort((a, b) => a - b);\r\n }\r\n\r\n return steps;\r\n}\r\n\r\nexport function TimePicker({\r\n value,\r\n onChange,\r\n onClear,\r\n minuteStep = 5,\r\n disabled,\r\n className,\r\n}: TimePickerProps) {\r\n const hour = value ? getHour12(value) : undefined;\r\n const minute = value ? value.getMinutes() : undefined;\r\n const period = value ? getPeriod(value) : undefined;\r\n const minutes = minuteOptions(minuteStep, minute);\r\n\r\n const commit = (nextHour: number, nextMinute: number, nextPeriod: DayPeriod) => {\r\n onChange(applyTime(value, nextHour, nextMinute, nextPeriod));\r\n };\r\n\r\n return (\r\n <div className={cn(\"flex flex-col gap-2\", className)}>\r\n <div className=\"flex items-center gap-2\">\r\n <Select\r\n value={hour !== undefined ? String(hour) : undefined}\r\n onValueChange={(next) => {\r\n commit(Number(next), minute ?? 0, period ?? \"AM\");\r\n }}\r\n disabled={disabled}\r\n >\r\n <SelectTrigger aria-label=\"Hour\" className=\"h-8 w-[4.5rem] text-xs\">\r\n <SelectValue placeholder=\"HH\" />\r\n </SelectTrigger>\r\n <SelectContent>\r\n {Array.from({ length: 12 }, (_, index) => index + 1).map((option) => (\r\n <SelectItem key={option} value={String(option)}>\r\n {option}\r\n </SelectItem>\r\n ))}\r\n </SelectContent>\r\n </Select>\r\n\r\n <span className=\"text-muted-foreground text-sm\">:</span>\r\n\r\n <Select\r\n value={minute !== undefined ? String(minute) : undefined}\r\n onValueChange={(next) => {\r\n commit(hour ?? 12, Number(next), period ?? \"AM\");\r\n }}\r\n disabled={disabled}\r\n >\r\n <SelectTrigger aria-label=\"Minute\" className=\"h-8 w-[4.5rem] text-xs\">\r\n <SelectValue placeholder=\"MM\" />\r\n </SelectTrigger>\r\n <SelectContent>\r\n {minutes.map((option) => (\r\n <SelectItem key={option} value={String(option)}>\r\n {String(option).padStart(2, \"0\")}\r\n </SelectItem>\r\n ))}\r\n </SelectContent>\r\n </Select>\r\n\r\n <Select\r\n value={period}\r\n onValueChange={(next) => {\r\n commit(hour ?? 12, minute ?? 0, next as DayPeriod);\r\n }}\r\n disabled={disabled}\r\n >\r\n <SelectTrigger aria-label=\"AM or PM\" className=\"h-8 w-[4.75rem] text-xs\">\r\n <SelectValue placeholder=\"AM\" />\r\n </SelectTrigger>\r\n <SelectContent>\r\n <SelectItem value=\"AM\">AM</SelectItem>\r\n <SelectItem value=\"PM\">PM</SelectItem>\r\n </SelectContent>\r\n </Select>\r\n </div>\r\n\r\n {onClear && value ? (\r\n <Button\r\n type=\"button\"\r\n variant=\"link\"\r\n size=\"sm\"\r\n disabled={disabled}\r\n className=\"h-auto self-start px-0\"\r\n onClick={onClear}\r\n >\r\n Clear time\r\n </Button>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n\r\nTimePicker.displayName = \"TimePicker\";\r\n"],"mappings":";;;;;;;;AAwBA,SAAS,UAAU,MAAoB;CACrC,MAAM,OAAO,KAAK,SAAS,IAAI;CAC/B,OAAO,SAAS,IAAI,KAAK;AAC3B;AAEA,SAAS,UAAU,MAAuB;CACxC,OAAO,KAAK,SAAS,KAAK,KAAK,OAAO;AACxC;AAEA,SAAS,UAAU,QAAgB,QAA2B;CAC5D,MAAM,OAAO,SAAS;CACtB,OAAO,WAAW,OAAO,OAAO,KAAK;AACvC;AAEA,SAAS,UACP,MACA,QACA,QACA,QACM;CACN,MAAM,OAAO,OAAO,IAAI,KAAK,IAAI,IAAI,2BAAW,IAAI,KAAK,CAAC;CAC1D,OAAO,WAAW,SAAS,MAAM,UAAU,QAAQ,MAAM,CAAC,GAAG,MAAM;AACrE;AAEA,SAAS,cAAc,YAAoB,eAAkC;CAC3E,MAAM,QAAkB,CAAC;CACzB,KAAK,IAAI,SAAS,GAAG,SAAS,IAAI,UAAU,YAC1C,MAAM,KAAK,MAAM;CAGnB,IAAI,kBAAkB,KAAA,KAAa,CAAC,MAAM,SAAS,aAAa,GAC9D,OAAO,CAAC,GAAG,OAAO,aAAa,CAAC,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC;CAGvD,OAAO;AACT;AAEA,SAAgB,WAAW,EACzB,OACA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AClB,CAAA,GACf,oBAAC,eAAD,EAAA,UACG,QAAQ,KAAK,WACZ,oBAAC,YAAD;MAAyB,OAAO,OAAO,MAAM;MAC1C,UAAA,OAAO,MAAM,CAAC,CAAC,SAAS,GAAG,GAAG;KACrB,GAFK,MAEL,CACb,EACY,CAAA,CACT;;IAER,qBAAC,QAAD;KACE,OAAO;KACP,gBAAgB,SAAS;MACvB,OAAO,QAAQ,IAAI,UAAU,GAAG,IAAiB;KACnD;KACU;KALZ,UAAA,CAOE,oBAAC,eAAD;MAAe,cAAW;MAAW,WAAU;MAC7C,UAAA,oBAAC,aAAD,EAAa,aAAY,KAAM,CAAA;KAClB,CAAA,GACf,qBAAC,eAAD,EAAA,UAAA,CACE,oBAAC,YAAD;MAAY,OAAM;MAAK,UAAA;KAAc,CAAA,GACrC,oBAAC,YAAD;MAAY,OAAM;MAAK,UAAA;KAAc,CAAA,CACxB,EAAA,CAAA,CACT;;GACL;EAEJ,CAAA,GAAA,WAAW,QACV,oBAAC,QAAD;GACE,MAAK;GACL,SAAQ;GACR,MAAK;GACK;GACV,WAAU;GACV,SAAS;GACV,UAAA;EAEO,CAAA,IACN,IACD;;AAET;AAEA,WAAW,cAAc"}
@@ -64,7 +64,7 @@ export interface FormConfig {
64
64
  */
65
65
  export interface FieldRegistration {
66
66
  name: string;
67
- type: "string" | "number" | "boolean" | "date" | "array";
67
+ type: "string" | "number" | "boolean" | "date" | "datetime" | "array";
68
68
  rules: FieldValidationRules;
69
69
  }
70
70
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/Form/context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,wBAAwB;IACxB,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CA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Q/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,+DAA+C,CAAC;AAE9E;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAC/B,KAAK,EAAE,oBAAoB,GAC1B,CAAC,CAAC,UAAU,CA8Hd;AAiCD;;GAEG;AACH,wBAAgB,0BAA0B;qCAGY,iBAAiB;sCAIhB,MAAM;;;;;EAoB5D"}
@@ -72,7 +72,7 @@ function buildZodSchemaFromRules(type, rules) {
72
72
  if (rules.required) return finalizeSchema(schema.refine((val) => val === true, { message: typeof rules.required === "string" ? rules.required : "This field is required" }), rules);
73
73
  return finalizeSchema(schema.optional(), rules);
74
74
  }
75
- if (type === "date") {
75
+ if (type === "date" || type === "datetime") {
76
76
  const schema = z.coerce.date();
77
77
  if (!rules.required) return finalizeSchema(schema.optional(), rules);
78
78
  return finalizeSchema(schema, rules);
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","names":[],"sources":["../../../src/components/Form/context.ts"],"sourcesContent":["'use client';\r\n\r\nimport { createContext, useCallback, useRef } from \"react\";\r\nimport type { UseFormReturn, FieldValues } from \"react-hook-form\";\r\nimport { z } from \"zod\";\r\n\r\n/**\r\n * Validation rule types that can be applied to form fields\r\n */\r\nexport interface FieldValidationRules {\r\n /** Field is required */\r\n required?: boolean | string;\r\n /** Minimum length for strings */\r\n minLength?: number | { value: number; message: string };\r\n /** Maximum length for strings */\r\n maxLength?: number | { value: number; message: string };\r\n /** Minimum value for numbers */\r\n min?: number | { value: number; message: string };\r\n /** Maximum value for numbers */\r\n max?: number | { value: number; message: string };\r\n /** Regex pattern for validation */\r\n pattern?: RegExp | { value: RegExp; message: string };\r\n /** Email validation */\r\n email?: boolean | string;\r\n /** URL validation */\r\n url?: boolean | string;\r\n /** Custom validation function */\r\n validate?: (value: unknown) => boolean | string | Promise<boolean | string>;\r\n}\r\n\r\n/**\r\n * Form configuration options\r\n */\r\nexport interface FormConfig {\r\n /** Show validation errors inline */\r\n showInlineErrors?: boolean;\r\n /** Validate on blur */\r\n validateOnBlur?: boolean;\r\n /** Validate on change */\r\n validateOnChange?: boolean;\r\n /** Size of form controls */\r\n size?: \"sm\" | \"md\" | \"lg\";\r\n /** Layout direction */\r\n layout?: \"horizontal\" | \"vertical\" | \"inline\";\r\n /** Label width for horizontal layout */\r\n labelWidth?: string | number;\r\n /** Whether form is disabled */\r\n disabled?: boolean;\r\n /** Colon after label */\r\n colon?: boolean;\r\n}\r\n\r\n/**\r\n * Field registration info\r\n */\r\nexport interface FieldRegistration {\r\n name: string;\r\n type: \"string\" | \"number\" | \"boolean\" | \"date\" | \"array\";\r\n rules: FieldValidationRules;\r\n}\r\n\r\n/**\r\n * Form context value\r\n */\r\nexport interface FormContextValue<TFieldValues extends FieldValues = FieldValues>\r\n extends FormConfig {\r\n form: UseFormReturn<TFieldValues>;\r\n /** Register a field's validation rules */\r\n registerFieldValidation: (field: FieldRegistration) => void;\r\n /** Unregister a field's validation rules */\r\n unregisterFieldValidation: (name: string) => void;\r\n /** Get current validation schema */\r\n getValidationSchema: () => z.ZodObject<Record<string, z.ZodTypeAny>>;\r\n /** Trigger validation for a specific field */\r\n triggerValidation: (name: string) => Promise<boolean>;\r\n}\r\n\r\n/**\r\n * Default form configuration\r\n */\r\nexport const defaultFormConfig: FormConfig = {\r\n showInlineErrors: true,\r\n validateOnBlur: true,\r\n validateOnChange: false,\r\n size: \"md\",\r\n layout: \"vertical\",\r\n disabled: false,\r\n colon: true,\r\n};\r\n\r\n/**\r\n * Form context for sharing form state and configuration\r\n */\r\nexport const FormConfigContext = createContext<FormContextValue | null>(null);\r\n\r\n/**\r\n * Build a Zod schema from validation rules\r\n */\r\nexport function buildZodSchemaFromRules(\r\n type: FieldRegistration[\"type\"],\r\n rules: FieldValidationRules\r\n): z.ZodTypeAny {\r\n // Helper to extract value and message\r\n const getValueAndMessage = <T>(\r\n rule: T | { value: T; message: string } | undefined,\r\n defaultMessage: string\r\n ): { value: T; message: string } | null => {\r\n if (rule === undefined) return null;\r\n if (typeof rule === \"object\" && rule !== null && \"value\" in rule) {\r\n return rule as { value: T; message: string };\r\n }\r\n return { value: rule as T, message: defaultMessage };\r\n };\r\n\r\n // Build string schema\r\n if (type === \"string\") {\r\n let schema = z.string();\r\n\r\n const minLengthRule = getValueAndMessage(\r\n rules.minLength,\r\n `Minimum ${typeof rules.minLength === \"number\" ? rules.minLength : (rules.minLength as { value: number })?.value} characters required`\r\n );\r\n if (minLengthRule) {\r\n schema = schema.min(minLengthRule.value as number, minLengthRule.message);\r\n }\r\n\r\n const maxLengthRule = getValueAndMessage(\r\n rules.maxLength,\r\n `Maximum ${typeof rules.maxLength === \"number\" ? rules.maxLength : (rules.maxLength as { value: number })?.value} characters allowed`\r\n );\r\n if (maxLengthRule) {\r\n schema = schema.max(maxLengthRule.value as number, maxLengthRule.message);\r\n }\r\n\r\n if (rules.pattern !== undefined) {\r\n const patternRule = rules.pattern instanceof RegExp\r\n ? { value: rules.pattern, message: \"Invalid format\" }\r\n : rules.pattern;\r\n schema = schema.regex(patternRule.value, patternRule.message);\r\n }\r\n\r\n if (rules.email) {\r\n const message = typeof rules.email === \"string\" ? rules.email : \"Invalid email address\";\r\n schema = schema.email(message);\r\n }\r\n\r\n if (rules.url) {\r\n const message = typeof rules.url === \"string\" ? rules.url : \"Invalid URL\";\r\n schema = schema.url(message);\r\n }\r\n\r\n // Handle required - for strings, require non-empty\r\n if (rules.required) {\r\n const message = typeof rules.required === \"string\" ? rules.required : \"This field is required\";\r\n return finalizeSchema(\r\n z.preprocess(\r\n (value) => (value === undefined || value === null ? \"\" : value),\r\n schema.min(1, message)\r\n ),\r\n rules\r\n );\r\n }\r\n\r\n return finalizeSchema(schema.optional(), rules);\r\n }\r\n\r\n // Build number schema\r\n if (type === \"number\") {\r\n let schema = z.coerce.number();\r\n\r\n const minRule = getValueAndMessage(\r\n rules.min,\r\n `Minimum value is ${typeof rules.min === \"number\" ? rules.min : (rules.min as { value: number })?.value}`\r\n );\r\n if (minRule) {\r\n schema = schema.min(minRule.value as number, minRule.message);\r\n }\r\n\r\n const maxRule = getValueAndMessage(\r\n rules.max,\r\n `Maximum value is ${typeof rules.max === \"number\" ? rules.max : (rules.max as { value: number })?.value}`\r\n );\r\n if (maxRule) {\r\n schema = schema.max(maxRule.value as number, maxRule.message);\r\n }\r\n\r\n if (!rules.required) {\r\n return finalizeSchema(schema.optional(), rules);\r\n }\r\n return finalizeSchema(schema, rules);\r\n }\r\n\r\n // Build boolean schema\r\n if (type === \"boolean\") {\r\n const schema = z.boolean();\r\n if (rules.required) {\r\n return finalizeSchema(\r\n schema.refine((val) => val === true, {\r\n message: typeof rules.required === \"string\" ? rules.required : \"This field is required\",\r\n }),\r\n rules\r\n );\r\n }\r\n return finalizeSchema(schema.optional(), rules);\r\n }\r\n\r\n // Build date schema\r\n if (type === \"date\") {\r\n const schema = z.coerce.date();\r\n if (!rules.required) {\r\n return finalizeSchema(schema.optional(), rules);\r\n }\r\n return finalizeSchema(schema, rules);\r\n }\r\n\r\n // Build array schema\r\n if (type === \"array\") {\r\n let schema = z.array(z.unknown());\r\n if (rules.required) {\r\n const message = typeof rules.required === \"string\" ? rules.required : \"This field is required\";\r\n schema = schema.min(1, message);\r\n }\r\n return finalizeSchema(schema, rules);\r\n }\r\n\r\n // Default fallback\r\n return finalizeSchema(z.unknown(), rules);\r\n}\r\n\r\nfunction applyCustomValidate(\r\n schema: z.ZodTypeAny,\r\n rules: FieldValidationRules\r\n): z.ZodTypeAny {\r\n if (!rules.validate) {\r\n return schema;\r\n }\r\n\r\n const validateFn = rules.validate;\r\n\r\n return schema.superRefine(async (value, ctx) => {\r\n const result = await validateFn(value);\r\n\r\n if (result === true) {\r\n return;\r\n }\r\n\r\n ctx.addIssue({\r\n code: z.ZodIssueCode.custom,\r\n message: typeof result === \"string\" ? result : \"Invalid value\",\r\n });\r\n });\r\n}\r\n\r\nfunction finalizeSchema(\r\n schema: z.ZodTypeAny,\r\n rules: FieldValidationRules\r\n): z.ZodTypeAny {\r\n return applyCustomValidate(schema, rules);\r\n}\r\n\r\n/**\r\n * Hook to manage field validations\r\n */\r\nexport function useFieldValidationRegistry() {\r\n const fieldsRef = useRef<Map<string, FieldRegistration>>(new Map());\r\n\r\n const registerFieldValidation = useCallback((field: FieldRegistration) => {\r\n fieldsRef.current.set(field.name, field);\r\n }, []);\r\n\r\n const unregisterFieldValidation = useCallback((name: string) => {\r\n fieldsRef.current.delete(name);\r\n }, []);\r\n\r\n const getValidationSchema = useCallback(() => {\r\n const shape: Record<string, z.ZodTypeAny> = {};\r\n \r\n fieldsRef.current.forEach((field) => {\r\n shape[field.name] = buildZodSchemaFromRules(field.type, field.rules);\r\n });\r\n\r\n return z.object(shape);\r\n }, []);\r\n\r\n return {\r\n registerFieldValidation,\r\n unregisterFieldValidation,\r\n getValidationSchema,\r\n fieldsRef,\r\n };\r\n}\r\n"],"mappings":";;;;;;;;AAgFA,IAAa,oBAAgC;CAC3C,kBAAkB;CAClB,gBAAgB;CAChB,kBAAkB;CAClB,MAAM;CACN,QAAQ;CACR,UAAU;CACV,OAAO;AACT;;;;AAKA,IAAa,oBAAoB,cAAuC,IAAI;;;;AAK5E,SAAgB,wBACd,MACA,OACc;CAEd,MAAM,sBACJ,MACA,mBACyC;EACzC,IAAI,SAAS,KAAA,GAAW,OAAO;EAC/B,IAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,WAAW,MAC1D,OAAO;EAET,OAAO;GAAE,OAAO;GAAW,SAAS;EAAe;CACrD;CAGA,IAAI,SAAS,UAAU;EACrB,IAAI,SAAS,EAAE,OAAO;EAEtB,MAAM,gBAAgB,mBACpB,MAAM,WACN,WAAW,OAAO,MAAM,cAAc,WAAW,MAAM,YAAa,MAAM,WAAiC,MAAM,qBACnH;EACA,IAAI,eACF,SAAS,OAAO,IAAI,cAAc,OAAiB,cAAc,OAAO;EAG1E,MAAM,gBAAgB,mBACpB,MAAM,WACN,WAAW,OAAO,MAA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K;EACzC,GAAG,CAAC,CAiBF;EACA,2BAhBgC,aAAa,SAAiB;GAC9D,UAAU,QAAQ,OAAO,IAAI;EAC/B,GAAG,CAAC,CAcF;EACA,qBAb0B,kBAAkB;GAC5C,MAAM,QAAsC,CAAC;GAE7C,UAAU,QAAQ,SAAS,UAAU;IACnC,MAAM,MAAM,QAAQ,wBAAwB,MAAM,MAAM,MAAM,KAAK;GACrE,CAAC;GAED,OAAO,EAAE,OAAO,KAAK;EACvB,GAAG,CAAC,CAKF;EACA;CACF;AACF"}
1
+ {"version":3,"file":"context.js","names":[],"sources":["../../../src/components/Form/context.ts"],"sourcesContent":["'use client';\r\n\r\nimport { createContext, useCallback, useRef } from \"react\";\r\nimport type { UseFormReturn, FieldValues } from \"react-hook-form\";\r\nimport { z } from \"zod\";\r\n\r\n/**\r\n * Validation rule types that can be applied to form fields\r\n */\r\nexport interface FieldValidationRules {\r\n /** Field is required */\r\n required?: boolean | string;\r\n /** Minimum length for strings */\r\n minLength?: number | { value: number; message: string };\r\n /** Maximum length for strings */\r\n maxLength?: number | { value: number; message: string };\r\n /** Minimum value for numbers */\r\n min?: number | { value: number; message: string };\r\n /** Maximum value for numbers */\r\n max?: number | { value: number; message: string };\r\n /** Regex pattern for validation */\r\n pattern?: RegExp | { value: RegExp; message: string };\r\n /** Email validation */\r\n email?: boolean | string;\r\n /** URL validation */\r\n url?: boolean | string;\r\n /** Custom validation function */\r\n validate?: (value: unknown) => boolean | string | Promise<boolean | string>;\r\n}\r\n\r\n/**\r\n * Form configuration options\r\n */\r\nexport interface FormConfig {\r\n /** Show validation errors inline */\r\n showInlineErrors?: boolean;\r\n /** Validate on blur */\r\n validateOnBlur?: boolean;\r\n /** Validate on change */\r\n validateOnChange?: boolean;\r\n /** Size of form controls */\r\n size?: \"sm\" | \"md\" | \"lg\";\r\n /** Layout direction */\r\n layout?: \"horizontal\" | \"vertical\" | \"inline\";\r\n /** Label width for horizontal layout */\r\n labelWidth?: string | number;\r\n /** Whether form is disabled */\r\n disabled?: boolean;\r\n /** Colon after label */\r\n colon?: boolean;\r\n}\r\n\r\n/**\r\n * Field registration info\r\n */\r\nexport interface FieldRegistration {\r\n name: string;\r\n type: \"string\" | \"number\" | \"boolean\" | \"date\" | \"datetime\" | \"array\";\r\n rules: FieldValidationRules;\r\n}\r\n\r\n/**\r\n * Form context value\r\n */\r\nexport interface FormContextValue<TFieldValues extends FieldValues = FieldValues>\r\n extends FormConfig {\r\n form: UseFormReturn<TFieldValues>;\r\n /** Register a field's validation rules */\r\n registerFieldValidation: (field: FieldRegistration) => void;\r\n /** Unregister a field's validation rules */\r\n unregisterFieldValidation: (name: string) => void;\r\n /** Get current validation schema */\r\n getValidationSchema: () => z.ZodObject<Record<string, z.ZodTypeAny>>;\r\n /** Trigger validation for a specific field */\r\n triggerValidation: (name: string) => Promise<boolean>;\r\n}\r\n\r\n/**\r\n * Default form configuration\r\n */\r\nexport const defaultFormConfig: FormConfig = {\r\n showInlineErrors: true,\r\n validateOnBlur: true,\r\n validateOnChange: false,\r\n size: \"md\",\r\n layout: \"vertical\",\r\n disabled: false,\r\n colon: true,\r\n};\r\n\r\n/**\r\n * Form context for sharing form state and configuration\r\n */\r\nexport const FormConfigContext = createContext<FormContextValue | null>(null);\r\n\r\n/**\r\n * Build a Zod schema from validation rules\r\n */\r\nexport function buildZodSchemaFromRules(\r\n type: FieldRegistration[\"type\"],\r\n rules: FieldValidationRules\r\n): z.ZodTypeAny {\r\n // Helper to extract value and message\r\n const getValueAndMessage = <T>(\r\n rule: T | { value: T; message: string } | undefined,\r\n defaultMessage: string\r\n ): { value: T; message: string } | null => {\r\n if (rule === undefined) return null;\r\n if (typeof rule === \"object\" && rule !== null && \"value\" in rule) {\r\n return rule as { value: T; message: string };\r\n }\r\n return { value: rule as T, message: defaultMessage };\r\n };\r\n\r\n // Build string schema\r\n if (type === \"string\") {\r\n let schema = z.string();\r\n\r\n const minLengthRule = getValueAndMessage(\r\n rules.minLength,\r\n `Minimum ${typeof rules.minLength === \"number\" ? rules.minLength : (rules.minLength as { value: number })?.value} characters required`\r\n );\r\n if (minLengthRule) {\r\n schema = schema.min(minLengthRule.value as number, minLengthRule.message);\r\n }\r\n\r\n const maxLengthRule = getValueAndMessage(\r\n rules.maxLength,\r\n `Maximum ${typeof rules.maxLength === \"number\" ? rules.maxLength : (rules.maxLength as { value: number })?.value} characters allowed`\r\n );\r\n if (maxLengthRule) {\r\n schema = schema.max(maxLengthRule.value as number, maxLengthRule.message);\r\n }\r\n\r\n if (rules.pattern !== undefined) {\r\n const patternRule = rules.pattern instanceof RegExp\r\n ? { value: rules.pattern, message: \"Invalid format\" }\r\n : rules.pattern;\r\n schema = schema.regex(patternRule.value, patternRule.message);\r\n }\r\n\r\n if (rules.email) {\r\n const message = typeof rules.email === \"string\" ? rules.email : \"Invalid email address\";\r\n schema = schema.email(message);\r\n }\r\n\r\n if (rules.url) {\r\n const message = typeof rules.url === \"string\" ? rules.url : \"Invalid URL\";\r\n schema = schema.url(message);\r\n }\r\n\r\n // Handle required - for strings, require non-empty\r\n if (rules.required) {\r\n const message = typeof rules.required === \"string\" ? rules.required : \"This field is required\";\r\n return finalizeSchema(\r\n z.preprocess(\r\n (value) => (value === undefined || value === null ? \"\" : value),\r\n schema.min(1, message)\r\n ),\r\n rules\r\n );\r\n }\r\n\r\n return finalizeSchema(schema.optional(), rules);\r\n }\r\n\r\n // Build number schema\r\n if (type === \"number\") {\r\n let schema = z.coerce.number();\r\n\r\n const minRule = getValueAndMessage(\r\n rules.min,\r\n `Minimum value is ${typeof rules.min === \"number\" ? rules.min : (rules.min as { value: number })?.value}`\r\n );\r\n if (minRule) {\r\n schema = schema.min(minRule.value as number, minRule.message);\r\n }\r\n\r\n const maxRule = getValueAndMessage(\r\n rules.max,\r\n `Maximum value is ${typeof rules.max === \"number\" ? rules.max : (rules.max as { value: number })?.value}`\r\n );\r\n if (maxRule) {\r\n schema = schema.max(maxRule.value as number, maxRule.message);\r\n }\r\n\r\n if (!rules.required) {\r\n return finalizeSchema(schema.optional(), rules);\r\n }\r\n return finalizeSchema(schema, rules);\r\n }\r\n\r\n // Build boolean schema\r\n if (type === \"boolean\") {\r\n const schema = z.boolean();\r\n if (rules.required) {\r\n return finalizeSchema(\r\n schema.refine((val) => val === true, {\r\n message: typeof rules.required === \"string\" ? rules.required : \"This field is required\",\r\n }),\r\n rules\r\n );\r\n }\r\n return finalizeSchema(schema.optional(), rules);\r\n }\r\n\r\n // Build date / datetime schema\r\n if (type === \"date\" || type === \"datetime\") {\r\n const schema = z.coerce.date();\r\n if (!rules.required) {\r\n return finalizeSchema(schema.optional(), rules);\r\n }\r\n return finalizeSchema(schema, rules);\r\n }\r\n\r\n // Build array schema\r\n if (type === \"array\") {\r\n let schema = z.array(z.unknown());\r\n if (rules.required) {\r\n const message = typeof rules.required === \"string\" ? rules.required : \"This field is required\";\r\n schema = schema.min(1, message);\r\n }\r\n return finalizeSchema(schema, rules);\r\n }\r\n\r\n // Default fallback\r\n return finalizeSchema(z.unknown(), rules);\r\n}\r\n\r\nfunction applyCustomValidate(\r\n schema: z.ZodTypeAny,\r\n rules: FieldValidationRules\r\n): z.ZodTypeAny {\r\n if (!rules.validate) {\r\n return schema;\r\n }\r\n\r\n const validateFn = rules.validate;\r\n\r\n return schema.superRefine(async (value, ctx) => {\r\n const result = await validateFn(value);\r\n\r\n if (result === true) {\r\n return;\r\n }\r\n\r\n ctx.addIssue({\r\n code: z.ZodIssueCode.custom,\r\n message: typeof result === \"string\" ? result : \"Invalid value\",\r\n });\r\n });\r\n}\r\n\r\nfunction finalizeSchema(\r\n schema: z.ZodTypeAny,\r\n rules: FieldValidationRules\r\n): z.ZodTypeAny {\r\n return applyCustomValidate(schema, rules);\r\n}\r\n\r\n/**\r\n * Hook to manage field validations\r\n */\r\nexport function useFieldValidationRegistry() {\r\n const fieldsRef = useRef<Map<string, FieldRegistration>>(new Map());\r\n\r\n const registerFieldValidation = useCallback((field: FieldRegistration) => {\r\n fieldsRef.current.set(field.name, field);\r\n }, []);\r\n\r\n const unregisterFieldValidation = useCallback((name: string) => {\r\n fieldsRef.current.delete(name);\r\n }, []);\r\n\r\n const getValidationSchema = useCallback(() => {\r\n const shape: Record<string, z.ZodTypeAny> = {};\r\n \r\n fieldsRef.current.forEach((field) => {\r\n shape[field.name] = buildZodSchemaFromRules(field.type, field.rules);\r\n });\r\n\r\n return z.object(shape);\r\n }, []);\r\n\r\n return {\r\n registerFieldValidation,\r\n unregisterFieldValidation,\r\n getValidationSchema,\r\n fieldsRef,\r\n };\r\n}\r\n"],"mappings":";;;;;;;;AAgFA,IAAa,oBAAgC;CAC3C,kBAAkB;CAClB,gBAAgB;CAChB,kBAAkB;CAClB,MAAM;CACN,QAAQ;CACR,UAAU;CACV,OAAO;AACT;;;;AAKA,IAAa,oBAAoB,cAAuC,IAAI;;;;AAK5E,SAAgB,wBACd,MACA,OACc;CAEd,MAAM,sBACJ,MACA,mBACyC;EACzC,IAAI,SAAS,KAAA,GAAW,OAAO;EAC/B,IAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,WAAW,MAC1D,OAAO;EAET,OAAO;GAAE,OAAO;GAAW,SAAS;EAAe;CACrD;CAGA,IAAI,SAAS,UAAU;EACrB,IAAI,SAAS,EAAE,OAAO;EAEtB,MAAM,gBAAgB,mBACpB,MAAM,WACN,WAAW,OAAO,MAAM,cAAc,WAAW,MAAM,YAAa,MAAM,WAAiC,MAAM,qBACnH;EACA,IAAI,eACF,SAAS,OAAO,IAAI,cAAc,OAAiB,cAAc,OAAO;EAG1E,MAAM,gBAAgB,mBACpB,MAAM,WACN,WAAW,OAAO,MAAM,cAAc,WAAW,MAAM,YAAa,MAAM,WAAiC,MAAM,oBACnH;EACA,IAAI,eACF,SAAS,OAAO,IAAI,cAAc,OAAiB,cAAc,OAAO;EAG1E,IAAI,MAAM,YAAY,KAAA,GAAW;GAC/B,MAAM,cAAc,MAAM,mBAAmB,SACzC;IAAE,OAAO,MAAM;IAAS,SAAS;GAAiB,IAClD,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BAAwB,MAAM,MAAM,MAAM,KAAK;GACrE,CAAC;GAED,OAAO,EAAE,OAAO,KAAK;EACvB,GAAG,CAAC,CAKF;EACA;CACF;AACF"}
@@ -2,6 +2,8 @@ export { Form } from './Form';
2
2
  export type { FormProps } from './Form';
3
3
  export { TextBox } from './TextBox';
4
4
  export type { TextBoxProps } from './TextBox';
5
+ export { PasswordRevealToggle } from './PasswordRevealToggle';
6
+ export type { PasswordRevealToggleProps } from './PasswordRevealToggle';
5
7
  export { TextArea } from './TextArea';
6
8
  export type { TextAreaProps } from './TextArea';
7
9
  export { Select, Select as FormSelect } from './Select';
@@ -12,6 +14,10 @@ export { PhoneInput, PhoneInput as FormPhoneInput } from './PhoneInput';
12
14
  export type { PhoneInputProps, PhoneInputProps as FormPhoneInputProps } from './PhoneInput';
13
15
  export { DatePicker, DatePicker as FormDatePicker } from './DatePicker';
14
16
  export type { DatePickerProps, DatePickerProps as FormDatePickerProps } from './DatePicker';
17
+ export { DateTimePicker, DateTimePicker as FormDateTimePicker } from './DateTimePicker';
18
+ export type { DateTimePickerProps, DateTimePickerProps as FormDateTimePickerProps, } from './DateTimePicker';
19
+ export { TimePicker } from './TimePicker';
20
+ export type { TimePickerProps, DayPeriod } from './TimePicker';
15
21
  export { Combobox, Combobox as FormCombobox } from './Combobox';
16
22
  export type { ComboboxProps, ComboboxProps as FormComboboxProps } from './Combobox';
17
23
  export { Checkbox, Checkbox as FormCheckbox } from './Checkbox';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAA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E,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
@@ -2,6 +2,7 @@
2
2
  import { FormConfigContext, buildZodSchemaFromRules, defaultFormConfig, useFieldValidationRegistry } from "./context.js";
3
3
  import { Form } from "./Form.js";
4
4
  import { FieldLayout } from "./FieldLayout.js";
5
+ import { PasswordRevealToggle } from "./PasswordRevealToggle.js";
5
6
  import { TextBox } from "./TextBox.js";
6
7
  import { TextArea } from "./TextArea.js";
7
8
  import { Select } from "./Select.js";
@@ -9,9 +10,11 @@ import { CountryPicker } from "./CountryPicker.js";
9
10
  import { CountrySelect } from "./CountrySelect.js";
10
11
  import { PhoneInput } from "./PhoneInput.js";
11
12
  import { DatePicker } from "./DatePicker.js";
13
+ import { TimePicker } from "./TimePicker.js";
14
+ import { DateTimePicker } from "./DateTimePicker.js";
12
15
  import { Combobox } from "./Combobox.js";
13
16
  import { Checkbox } from "./Checkbox.js";
14
17
  import { RadioGroup, RadioItem } from "./Radio.js";
15
18
  import { FormSwitch } from "./FormSwitch.js";
16
19
  import { useFieldError, useForm, useFormConfig, useFormField } from "./hooks.js";
17
- export { Checkbox, Combobox, CountryPicker, CountrySelect, DatePicker, FieldLayout, Form, Checkbox as FormCheckbox, Combobox as FormCombobox, FormConfigContext, CountrySelect as FormCountrySelect, DatePicker as FormDatePicker, PhoneInput as FormPhoneInput, Select as FormSelect, FormSwitch, PhoneInput, RadioGroup, RadioItem, Select, TextArea, TextBox, buildZodSchemaFromRules, defaultFormConfig, useFieldError, useFieldValidationRegistry, useForm, useFormConfig, useFormField };
20
+ export { Checkbox, Combobox, CountryPicker, CountrySelect, DatePicker, DateTimePicker, FieldLayout, Form, Checkbox as FormCheckbox, Combobox as FormCombobox, FormConfigContext, CountrySelect as FormCountrySelect, DatePicker as FormDatePicker, DateTimePicker as FormDateTimePicker, PhoneInput as FormPhoneInput, Select as FormSelect, FormSwitch, PasswordRevealToggle, PhoneInput, RadioGroup, RadioItem, Select, TextArea, TextBox, TimePicker, buildZodSchemaFromRules, defaultFormConfig, useFieldError, useFieldValidationRegistry, useForm, useFormConfig, useFormField };
@@ -1,5 +1,17 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
2
  import { Input as InputPrimitive } from '../../primitives/input';
3
- export type InputProps = ComponentPropsWithoutRef<typeof InputPrimitive>;
4
- export declare const Input: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import('react').RefAttributes<HTMLInputElement>, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
3
+ export type InputProps = ComponentPropsWithoutRef<typeof InputPrimitive> & {
4
+ /**
5
+ * Show an eye toggle for password fields.
6
+ * Defaults to true when `type="password"`.
7
+ */
8
+ passwordToggle?: boolean;
9
+ };
10
+ export declare const Input: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import('react').RefAttributes<HTMLInputElement>, "ref"> & {
11
+ /**
12
+ * Show an eye toggle for password fields.
13
+ * Defaults to true when `type="password"`.
14
+ */
15
+ passwordToggle?: boolean;
16
+ } & import('react').RefAttributes<HTMLInputElement>>;
5
17
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAc,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAA;AAExE,eAAO,MAAM,KAAK,qRAGwC,CAAA"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAc,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAIhE,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC,OAAO,cAAc,CAAC,GAAG;IACzE;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,KAAK;IAPhB;;;OAGG;qBACc,OAAO;oDA0CxB,CAAA"}
@@ -1,12 +1,40 @@
1
1
  "use client";
2
+ "use client";
3
+ import { cn } from "../../utils/cn.js";
4
+ import { PasswordRevealToggle } from "../Form/PasswordRevealToggle.js";
2
5
  import { TextBoxPrimitive } from "../../primitives/textbox.js";
3
- import { forwardRef } from "react";
4
- import { jsx } from "react/jsx-runtime";
6
+ import { forwardRef, useState } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
5
8
  //#region src/components/Input/Input.tsx
6
- var Input = forwardRef((props, ref) => /* @__PURE__ */ jsx(TextBoxPrimitive, {
7
- ref,
8
- ...props
9
- }));
9
+ var Input = forwardRef(({ type, className, passwordToggle, disabled, ...props }, ref) => {
10
+ const [passwordVisible, setPasswordVisible] = useState(false);
11
+ const showPasswordToggle = type === "password" && passwordToggle !== false;
12
+ const resolvedType = showPasswordToggle && passwordVisible ? "text" : type;
13
+ if (!showPasswordToggle) return /* @__PURE__ */ jsx(TextBoxPrimitive, {
14
+ ref,
15
+ type,
16
+ className,
17
+ disabled,
18
+ ...props
19
+ });
20
+ return /* @__PURE__ */ jsxs("div", {
21
+ className: "relative w-full",
22
+ children: [/* @__PURE__ */ jsx(TextBoxPrimitive, {
23
+ ref,
24
+ type: resolvedType,
25
+ className: cn("pr-10", className),
26
+ disabled,
27
+ ...props
28
+ }), /* @__PURE__ */ jsx("div", {
29
+ className: "absolute right-3 top-1/2 -translate-y-1/2",
30
+ children: /* @__PURE__ */ jsx(PasswordRevealToggle, {
31
+ visible: passwordVisible,
32
+ onToggle: () => setPasswordVisible((visible) => !visible),
33
+ disabled
34
+ })
35
+ })]
36
+ });
37
+ });
10
38
  Input.displayName = "Input";
11
39
  //#endregion
12
40
  export { Input };
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","names":[],"sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import { forwardRef } from \"react\"\r\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\"\r\nimport { Input as InputPrimitive } from \"../../primitives/input\"\r\n\r\nexport type InputProps = ComponentPropsWithoutRef<typeof InputPrimitive>\r\n\r\nexport const Input = forwardRef<\r\n ElementRef<typeof InputPrimitive>,\r\n InputProps\r\n>((props, ref) => <InputPrimitive ref={ref} {...props} />)\r\nInput.displayName = \"Input\"\r\n"],"mappings":";;;;;AAMA,IAAa,QAAQ,YAGlB,OAAO,QAAQ,oBAAC,kBAAD;CAAqB;CAAK,GAAI;AAAQ,CAAA,CAAC;AACzD,MAAM,cAAc"}
1
+ {"version":3,"file":"Input.js","names":[],"sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport { forwardRef, useState } from \"react\"\r\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\"\r\nimport { Input as InputPrimitive } from \"../../primitives/input\"\r\nimport { cn } from \"../../utils/cn\"\r\nimport { PasswordRevealToggle } from \"../Form/PasswordRevealToggle\"\r\n\r\nexport type InputProps = ComponentPropsWithoutRef<typeof InputPrimitive> & {\r\n /**\r\n * Show an eye toggle for password fields.\r\n * Defaults to true when `type=\"password\"`.\r\n */\r\n passwordToggle?: boolean\r\n}\r\n\r\nexport const Input = forwardRef<\r\n ElementRef<typeof InputPrimitive>,\r\n InputProps\r\n>(({ type, className, passwordToggle, disabled, ...props }, ref) => {\r\n const [passwordVisible, setPasswordVisible] = useState(false)\r\n const isPasswordType = type === \"password\"\r\n const showPasswordToggle = isPasswordType && passwordToggle !== false\r\n const resolvedType = showPasswordToggle && passwordVisible ? \"text\" : type\r\n\r\n if (!showPasswordToggle) {\r\n return (\r\n <InputPrimitive\r\n ref={ref}\r\n type={type}\r\n className={className}\r\n disabled={disabled}\r\n {...props}\r\n />\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"relative w-full\">\r\n <InputPrimitive\r\n ref={ref}\r\n type={resolvedType}\r\n className={cn(\"pr-10\", className)}\r\n disabled={disabled}\r\n {...props}\r\n />\r\n <div className=\"absolute right-3 top-1/2 -translate-y-1/2\">\r\n <PasswordRevealToggle\r\n visible={passwordVisible}\r\n onToggle={() => setPasswordVisible((visible) => !visible)}\r\n disabled={disabled}\r\n />\r\n </div>\r\n </div>\r\n )\r\n})\r\nInput.displayName = \"Input\"\r\n"],"mappings":";;;;;;;;AAgBA,IAAa,QAAQ,YAGlB,EAAE,MAAM,WAAW,gBAAgB,UAAU,GAAG,SAAS,QAAQ;CAClE,MAAM,CAAC,iBAAiB,sBAAsB,SAAS,KAAK;CAE5D,MAAM,qBADiB,SAAS,cACa,mBAAmB;CAChE,MAAM,eAAe,sBAAsB,kBAAkB,SAAS;CAEtE,IAAI,CAAC,oBACH,OACE,oBAAC,kBAAD;EACO;EACC;EACK;EACD;EACV,GAAI;CACL,CAAA;CAIL,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,kBAAD;GACO;GACL,MAAM;GACN,WAAW,GAAG,SAAS,SAAS;GACtB;GACV,GAAI;EACL,CAAA,GACD,oBAAC,OAAD;GAAK,WAAU;GACb,UAAA,oBAAC,sBAAD;IACE,SAAS;IACT,gBAAgB,oBAAoB,YAAY,CAAC,OAAO;IAC9C;GACX,CAAA;EACE,CAAA,CACF;;AAET,CAAC;AACD,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from \"lucide-react\"\r\nimport { cn } from \"../../utils/cn\"\r\nimport { ButtonPrimitive, buttonVariants } from \"../../primitives/button\"\r\n\r\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\r\n <nav\r\n role=\"navigation\"\r\n aria-label=\"pagination\"\r\n className={cn(\"mx-auto flex w-full justify-center\", className)}\r\n {...props}\r\n />\r\n)\r\nPagination.displayName = \"Pagination\"\r\n\r\nconst PaginationContent = React.forwardRef<\r\n HTMLUListElement,\r\n React.ComponentProps<\"ul\">\r\n>(({ className, ...props }, ref) => (\r\n <ul\r\n ref={ref}\r\n className={cn(\"flex flex-row items-center gap-1\", className)}\r\n {...props}\r\n />\r\n))\r\nPaginationContent.displayName = \"PaginationContent\"\r\n\r\nconst PaginationItem = React.forwardRef<\r\n HTMLLIElement,\r\n React.ComponentProps<\"li\">\r\n>(({ className, ...props }, ref) => (\r\n <li ref={ref} className={cn(\"\", className)} {...props} />\r\n))\r\nPaginationItem.displayName = \"PaginationItem\"\r\n\r\ntype PaginationLinkProps = {\r\n isActive?: boolean\r\n} & Pick<React.ComponentProps<typeof ButtonPrimitive>, \"size\"> &\r\n React.ComponentProps<\"a\">\r\n\r\nconst PaginationLink = ({ className, isActive, size = \"icon\", ...props }: PaginationLinkProps) => (\r\n <a\r\n aria-current={isActive ? \"page\" : undefined}\r\n className={cn(\r\n buttonVariants({\r\n variant: isActive ? \"outline\" : \"ghost\",\r\n size,\r\n }),\r\n className\r\n )}\r\n {...props}\r\n />\r\n)\r\nPaginationLink.displayName = \"PaginationLink\"\r\n\r\nconst PaginationPrevious = ({ className, size = \"default\", ...props }: React.ComponentProps<typeof PaginationLink>) => (\r\n <PaginationLink\r\n aria-label=\"Go to previous page\"\r\n className={cn(\"gap-1 pl-2.5\", className)}\r\n size={size}\r\n {...props}\r\n >\r\n <ChevronLeft className=\"h-4 w-4\" />\r\n <span>Previous</span>\r\n </PaginationLink>\r\n)\r\nPaginationPrevious.displayName = \"PaginationPrevious\"\r\n\r\nconst PaginationNext = ({ className, size = \"default\", ...props }: React.ComponentProps<typeof PaginationLink>) => (\r\n <PaginationLink\r\n aria-label=\"Go to next page\"\r\n className={cn(\"gap-1 pr-2.5\", className)}\r\n size={size}\r\n {...props}\r\n >\r\n <span>Next</span>\r\n <ChevronRight className=\"h-4 w-4\" />\r\n </PaginationLink>\r\n)\r\nPaginationNext.displayName = \"PaginationNext\"\r\n\r\nconst PaginationEllipsis = ({ className, ...props }: React.ComponentProps<\"span\">) => (\r\n <span\r\n aria-hidden\r\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\r\n {...props}\r\n >\r\n <MoreHorizontal className=\"h-4 w-4\" />\r\n <span className=\"sr-only\">More pages</span>\r\n </span>\r\n)\r\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\r\n\r\nexport {\r\n Pagination,\r\n PaginationContent,\r\n PaginationItem,\r\n PaginationLink,\r\n PaginationNext,\r\n PaginationPrevious,\r\n PaginationEllipsis,\r\n}\r\n"],"mappings":";;;;;;;AAKA,IAAM,cAAc,EAAE,WAAW,GAAG,YAClC,oBAAC,OAAD;CACE,MAAK;CACL,cAAW;CACX,WAAW,GAAG,sCAAsC,SAAS;CAC7D,GAAI;AACL,CAAA;AAEH,WAAW,cAAc;AAEzB,IAAM,oBAAoB,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,MAAD;CACO;CACL,WAAW,GAAG,oCAAoC,SAAS;CAC3D,GAAI;AACL,CAAA,CACF;AACD,kBAAkB,cAAc;AAEhC,IAAM,iBAAiB,MAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,MAAD;CAAS;CAAK,WAAW,GAAG,IAAI,SAAS;CAAG,GAAI;AAAQ,CAAA,CACzD;AACD,eAAe,cAAc;AAO7B,IAAM,kBAAkB,EAAE,WAAW,UAAU,OAAO,QAAQ,GAAG,YAC/D,oBAAC,KAAD;CACE,gBAAc,WAAW,SAAS,KAAA;CAClC,WAAW,GACT,eAAe;EACb,SAAS,WAAW,YAAY;EAChC;CACF,CAAC,GACD,SACF;CACA,GAAI;AACL,CAAA;AAEH,eAAe,cAAc;AAE7B,IAAM,sBAAsB,EAAE,WAAW,OAAO,WAAW,GAAG,YAC5D,qBAAC,gBAAD;CACE,cAAW;CACX,WAAW,GAAG,gBAAgB,SAAS;CACjC;CACN,GAAI;WAJN,CAME,oBAAC,aAAD,EAAa,WAAU,UAAW,CAAA,GAClC,oBAAC,QAAD,EAAA,UAAM,WAAc,CAAA,CACN;;AAElB,mBAAmB,cAAc;AAEjC,IAAM,kBAAkB,EAAE,WAAW,OAAO,WAAW,GAAG,YACxD,qBAAC,gBAAD;CACE,cAAW;CACX,WAAW,GAAG,gBAAgB,SAAS;CACjC;CACN,GAAI;WAJN,CAME,oBAAC,QAAD,EAAA,UAAM,OAAU,CAAA,GAChB,oBAAC,cAAD,EAAc,WAAU,UAAW,CAAA,CACrB;;AAElB,eAAe,cAAc;AAE7B,IAAM,sBAAsB,EAAE,WAAW,GAAG,YAC1C,qBAAC,QAAD;CACE,eAAA;CACA,WAAW,GAAG,4CAA4C,SAAS;CACnE,GAAI;WAHN,CAKE,oBAAC,gBAAD,EAAgB,WAAU,UAAW,CAAA,GACrC,oBAAC,QAAD;EAAM,WAAU;YAAU;CAAgB,CAAA,CACtC;;AAER,mBAAmB,cAAc"}
1
+ {"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from \"lucide-react\"\r\nimport { cn } from \"../../utils/cn\"\r\nimport { ButtonPrimitive, buttonVariants } from \"../../primitives/button\"\r\n\r\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\r\n <nav\r\n role=\"navigation\"\r\n aria-label=\"pagination\"\r\n className={cn(\"mx-auto flex w-full justify-center\", className)}\r\n {...props}\r\n />\r\n)\r\nPagination.displayName = \"Pagination\"\r\n\r\nconst PaginationContent = React.forwardRef<\r\n HTMLUListElement,\r\n React.ComponentProps<\"ul\">\r\n>(({ className, ...props }, ref) => (\r\n <ul\r\n ref={ref}\r\n className={cn(\"flex flex-row items-center gap-1\", className)}\r\n {...props}\r\n />\r\n))\r\nPaginationContent.displayName = \"PaginationContent\"\r\n\r\nconst PaginationItem = React.forwardRef<\r\n HTMLLIElement,\r\n React.ComponentProps<\"li\">\r\n>(({ className, ...props }, ref) => (\r\n <li ref={ref} className={cn(\"\", className)} {...props} />\r\n))\r\nPaginationItem.displayName = \"PaginationItem\"\r\n\r\ntype PaginationLinkProps = {\r\n isActive?: boolean\r\n} & Pick<React.ComponentProps<typeof ButtonPrimitive>, \"size\"> &\r\n React.ComponentProps<\"a\">\r\n\r\nconst PaginationLink = ({ className, isActive, size = \"icon\", ...props }: PaginationLinkProps) => (\r\n <a\r\n aria-current={isActive ? \"page\" : undefined}\r\n className={cn(\r\n buttonVariants({\r\n variant: isActive ? \"outline\" : \"ghost\",\r\n size,\r\n }),\r\n className\r\n )}\r\n {...props}\r\n />\r\n)\r\nPaginationLink.displayName = \"PaginationLink\"\r\n\r\nconst PaginationPrevious = ({ className, size = \"default\", ...props }: React.ComponentProps<typeof PaginationLink>) => (\r\n <PaginationLink\r\n aria-label=\"Go to previous page\"\r\n className={cn(\"gap-1 pl-2.5\", className)}\r\n size={size}\r\n {...props}\r\n >\r\n <ChevronLeft className=\"h-4 w-4\" />\r\n <span>Previous</span>\r\n </PaginationLink>\r\n)\r\nPaginationPrevious.displayName = \"PaginationPrevious\"\r\n\r\nconst PaginationNext = ({ className, size = \"default\", ...props }: React.ComponentProps<typeof PaginationLink>) => (\r\n <PaginationLink\r\n aria-label=\"Go to next page\"\r\n className={cn(\"gap-1 pr-2.5\", className)}\r\n size={size}\r\n {...props}\r\n >\r\n <span>Next</span>\r\n <ChevronRight className=\"h-4 w-4\" />\r\n </PaginationLink>\r\n)\r\nPaginationNext.displayName = \"PaginationNext\"\r\n\r\nconst PaginationEllipsis = ({ className, ...props }: React.ComponentProps<\"span\">) => (\r\n <span\r\n aria-hidden\r\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\r\n {...props}\r\n >\r\n <MoreHorizontal className=\"h-4 w-4\" />\r\n <span className=\"sr-only\">More pages</span>\r\n </span>\r\n)\r\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\r\n\r\nexport {\r\n Pagination,\r\n PaginationContent,\r\n PaginationItem,\r\n PaginationLink,\r\n PaginationNext,\r\n PaginationPrevious,\r\n PaginationEllipsis,\r\n}\r\n"],"mappings":";;;;;;;AAKA,IAAM,cAAc,EAAE,WAAW,GAAG,YAClC,oBAAC,OAAD;CACE,MAAK;CACL,cAAW;CACX,WAAW,GAAG,sCAAsC,SAAS;CAC7D,GAAI;AACL,CAAA;AAEH,WAAW,cAAc;AAEzB,IAAM,oBAAoB,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,MAAD;CACO;CACL,WAAW,GAAG,oCAAoC,SAAS;CAC3D,GAAI;AACL,CAAA,CACF;AACD,kBAAkB,cAAc;AAEhC,IAAM,iBAAiB,MAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,MAAD;CAAS;CAAK,WAAW,GAAG,IAAI,SAAS;CAAG,GAAI;AAAQ,CAAA,CACzD;AACD,eAAe,cAAc;AAO7B,IAAM,kBAAkB,EAAE,WAAW,UAAU,OAAO,QAAQ,GAAG,YAC/D,oBAAC,KAAD;CACE,gBAAc,WAAW,SAAS,KAAA;CAClC,WAAW,GACT,eAAe;EACb,SAAS,WAAW,YAAY;EAChC;CACF,CAAC,GACD,SACF;CACA,GAAI;AACL,CAAA;AAEH,eAAe,cAAc;AAE7B,IAAM,sBAAsB,EAAE,WAAW,OAAO,WAAW,GAAG,YAC5D,qBAAC,gBAAD;CACE,cAAW;CACX,WAAW,GAAG,gBAAgB,SAAS;CACjC;CACN,GAAI;CAJN,UAAA,CAME,oBAAC,aAAD,EAAa,WAAU,UAAW,CAAA,GAClC,oBAAC,QAAD,EAAA,UAAM,WAAc,CAAA,CACN;;AAElB,mBAAmB,cAAc;AAEjC,IAAM,kBAAkB,EAAE,WAAW,OAAO,WAAW,GAAG,YACxD,qBAAC,gBAAD;CACE,cAAW;CACX,WAAW,GAAG,gBAAgB,SAAS;CACjC;CACN,GAAI;CAJN,UAAA,CAME,oBAAC,QAAD,EAAA,UAAM,OAAU,CAAA,GAChB,oBAAC,cAAD,EAAc,WAAU,UAAW,CAAA,CACrB;;AAElB,eAAe,cAAc;AAE7B,IAAM,sBAAsB,EAAE,WAAW,GAAG,YAC1C,qBAAC,QAAD;CACE,eAAA;CACA,WAAW,GAAG,4CAA4C,SAAS;CACnE,GAAI;CAHN,UAAA,CAKE,oBAAC,gBAAD,EAAgB,WAAU,UAAW,CAAA,GACrC,oBAAC,QAAD;EAAM,WAAU;EAAU,UAAA;CAAgB,CAAA,CACtC;;AAER,mBAAmB,cAAc"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { Button, buttonVariants } from './components/Button';
2
2
  export type { ButtonProps } from './components/Button';
3
- export { Form, TextBox, TextArea, FormCheckbox, RadioGroup, RadioItem, FormSwitch, FormConfigContext, defaultFormConfig, buildZodSchemaFromRules, useFieldValidationRegistry, useFormConfig, useForm, useFormField, useFieldError, CountrySelect, FormCountrySelect, PhoneInput, FormPhoneInput, DatePicker, FormDatePicker, Combobox, FormCombobox, } from './components/Form';
3
+ export { Form, TextBox, PasswordRevealToggle, TextArea, FormCheckbox, RadioGroup, RadioItem, FormSwitch, FormConfigContext, defaultFormConfig, buildZodSchemaFromRules, useFieldValidationRegistry, useFormConfig, useForm, useFormField, useFieldError, CountrySelect, FormCountrySelect, PhoneInput, FormPhoneInput, DatePicker, FormDatePicker, DateTimePicker, FormDateTimePicker, TimePicker, Combobox, FormCombobox, } from './components/Form';
4
4
  export { Select as FormSelect } from './components/Form/Select';
5
- export type { FormProps, TextBoxProps, TextAreaProps, CheckboxProps, RadioGroupProps, RadioItemProps, RadioOption, FormSwitchProps, FormConfig, FormContextValue, FieldValidationRules, FieldRegistration, CountrySelectProps, FormCountrySelectProps, PhoneInputProps, FormPhoneInputProps, DatePickerProps, FormDatePickerProps, ComboboxProps, FormComboboxProps, } from './components/Form';
5
+ export type { FormProps, TextBoxProps, PasswordRevealToggleProps, TextAreaProps, CheckboxProps, RadioGroupProps, RadioItemProps, RadioOption, FormSwitchProps, FormConfig, FormContextValue, FieldValidationRules, FieldRegistration, CountrySelectProps, FormCountrySelectProps, PhoneInputProps, FormPhoneInputProps, DatePickerProps, FormDatePickerProps, DateTimePickerProps, FormDateTimePickerProps, TimePickerProps, ComboboxProps, FormComboboxProps, } from './components/Form';
6
6
  export type { SelectProps as FormSelectProps, SelectOption } from './components/Form/Select';
7
7
  export { getCountryFlag, getCountryByCode, getCountryName, getCountryDialCode, formatE164, parseE164, COUNTRIES, } from './data/countries';
8
8
  export type { Country } from './data/countries';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,OAAO,EACP,YAAY,EACZ,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,UAAU,EACV,cAAc,EACd,QAAQ,EACR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,GACZ,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC/F,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG/D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAG1D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGrG,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import { cn } from "./utils/cn.js";
3
3
  import { Button, buttonVariants } from "./components/Button/Button.js";
4
4
  import { FormConfigContext, buildZodSchemaFromRules, defaultFormConfig, useFieldValidationRegistry } from "./components/Form/context.js";
5
5
  import { Form } from "./components/Form/Form.js";
6
+ import { PasswordRevealToggle } from "./components/Form/PasswordRevealToggle.js";
6
7
  import { TextBox } from "./components/Form/TextBox.js";
7
8
  import { TextArea } from "./components/Form/TextArea.js";
8
9
  import { Select as Select$1, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./primitives/select.js";
@@ -15,6 +16,8 @@ import { CountrySelect } from "./components/Form/CountrySelect.js";
15
16
  import { PhoneInput } from "./components/Form/PhoneInput.js";
16
17
  import { Calendar } from "./primitives/calendar.js";
17
18
  import { DatePicker } from "./components/Form/DatePicker.js";
19
+ import { TimePicker } from "./components/Form/TimePicker.js";
20
+ import { DateTimePicker } from "./components/Form/DateTimePicker.js";
18
21
  import { Combobox } from "./components/Form/Combobox.js";
19
22
  import { Checkbox as Checkbox$1 } from "./components/Form/Checkbox.js";
20
23
  import { RadioGroup, RadioItem } from "./components/Form/Radio.js";
@@ -50,4 +53,4 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./comp
50
53
  import { Skeleton } from "./components/Skeleton/Skeleton.js";
51
54
  import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./components/Accordion/Accordion.js";
52
55
  import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/Pagination/Pagination.js";
53
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, COUNTRIES, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CountrySelect, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, Checkbox$1 as FormCheckbox, Combobox as FormCombobox, FormConfigContext, CountrySelect as FormCountrySelect, DatePicker as FormDatePicker, PhoneInput as FormPhoneInput, Select as FormSelect, FormSwitch, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioItem, ScrollArea, ScrollBar, Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextArea, TextBox, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildZodSchemaFromRules, buttonVariants, cn, defaultFormConfig, formatE164, getCountryByCode, getCountryDialCode, getCountryFlag, getCountryName, parseE164, toast, toggleVariants, useDebounce, useFieldError, useFieldValidationRegistry, useForm, useFormConfig, useFormField, useToast, useToggle };
56
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, COUNTRIES, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CountrySelect, DatePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, Checkbox$1 as FormCheckbox, Combobox as FormCombobox, FormConfigContext, CountrySelect as FormCountrySelect, DatePicker as FormDatePicker, DateTimePicker as FormDateTimePicker, PhoneInput as FormPhoneInput, Select as FormSelect, FormSwitch, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordRevealToggle, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioItem, ScrollArea, ScrollBar, Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextArea, TextBox, Textarea, TimePicker, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildZodSchemaFromRules, buttonVariants, cn, defaultFormConfig, formatE164, getCountryByCode, getCountryDialCode, getCountryFlag, getCountryName, parseE164, toast, toggleVariants, useDebounce, useFieldError, useFieldValidationRegistry, useForm, useFormConfig, useFormField, useToast, useToggle };
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","names":[],"sources":["../../src/primitives/accordion.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\r\nimport { ChevronDown } from \"lucide-react\"\r\nimport { cn } from \"@/utils/index\"\r\n\r\nconst Accordion = AccordionPrimitive.Root\r\n\r\nconst AccordionItem = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\r\n>(({ className, ...props }, ref) => (\r\n <AccordionPrimitive.Item\r\n ref={ref}\r\n className={cn(\"border-b border-border\", className)}\r\n {...props}\r\n />\r\n))\r\nAccordionItem.displayName = \"AccordionItem\"\r\n\r\nconst AccordionTrigger = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\r\n>(({ className, children, ...props }, ref) => (\r\n <AccordionPrimitive.Header className=\"flex\">\r\n <AccordionPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n \"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200\" />\r\n </AccordionPrimitive.Trigger>\r\n </AccordionPrimitive.Header>\r\n))\r\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\r\n\r\nconst AccordionContent = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <AccordionPrimitive.Content\r\n ref={ref}\r\n className=\"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\r\n {...props}\r\n >\r\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\r\n </AccordionPrimitive.Content>\r\n))\r\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\r\n\r\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\r\n"],"mappings":";;;;;;;AAKA,IAAM,YAAY,mBAAmB;AAErC,IAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,mBAAmB,MAApB;CACO;CACL,WAAW,GAAG,0BAA0B,SAAS;CACjD,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc;AAE5B,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAAC,mBAAmB,QAApB;CAA2B,WAAU;WACnC,qBAAC,mBAAmB,SAApB;EACO;EACL,WAAW,GACT,kJACA,SACF;EACA,GAAI;YANN,CAQG,UACD,oBAAC,aAAD,EAAa,WAAU,2EAA4E,CAAA,CACzE;;AACH,CAAA,CAC5B;AACD,iBAAiB,cAAc,mBAAmB,QAAQ;AAE1D,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAAC,mBAAmB,SAApB;CACO;CACL,WAAU;CACV,GAAI;WAEJ,oBAAC,OAAD;EAAK,WAAW,GAAG,aAAa,SAAS;EAAI;CAAc,CAAA;AACjC,CAAA,CAC7B;AACD,iBAAiB,cAAc,mBAAmB,QAAQ"}
1
+ {"version":3,"file":"accordion.js","names":[],"sources":["../../src/primitives/accordion.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\r\nimport { ChevronDown } from \"lucide-react\"\r\nimport { cn } from \"@/utils/index\"\r\n\r\nconst Accordion = AccordionPrimitive.Root\r\n\r\nconst AccordionItem = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\r\n>(({ className, ...props }, ref) => (\r\n <AccordionPrimitive.Item\r\n ref={ref}\r\n className={cn(\"border-b border-border\", className)}\r\n {...props}\r\n />\r\n))\r\nAccordionItem.displayName = \"AccordionItem\"\r\n\r\nconst AccordionTrigger = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\r\n>(({ className, children, ...props }, ref) => (\r\n <AccordionPrimitive.Header className=\"flex\">\r\n <AccordionPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n \"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200\" />\r\n </AccordionPrimitive.Trigger>\r\n </AccordionPrimitive.Header>\r\n))\r\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\r\n\r\nconst AccordionContent = React.forwardRef<\r\n React.ElementRef<typeof AccordionPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <AccordionPrimitive.Content\r\n ref={ref}\r\n className=\"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\r\n {...props}\r\n >\r\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\r\n </AccordionPrimitive.Content>\r\n))\r\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\r\n\r\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\r\n"],"mappings":";;;;;;;AAKA,IAAM,YAAY,mBAAmB;AAErC,IAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,mBAAmB,MAApB;CACO;CACL,WAAW,GAAG,0BAA0B,SAAS;CACjD,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc;AAE5B,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAAC,mBAAmB,QAApB;CAA2B,WAAU;CACnC,UAAA,qBAAC,mBAAmB,SAApB;EACO;EACL,WAAW,GACT,kJACA,SACF;EACA,GAAI;EANN,UAAA,CAQG,UACD,oBAAC,aAAD,EAAa,WAAU,2EAA4E,CAAA,CACzE;;AACH,CAAA,CAC5B;AACD,iBAAiB,cAAc,mBAAmB,QAAQ;AAE1D,IAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAAC,mBAAmB,SAApB;CACO;CACL,WAAU;CACV,GAAI;CAEJ,UAAA,oBAAC,OAAD;EAAK,WAAW,GAAG,aAAa,SAAS;EAAI;CAAc,CAAA;AACjC,CAAA,CAC7B;AACD,iBAAiB,cAAc,mBAAmB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","names":[],"sources":["../../src/primitives/breadcrumb.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\"\n\nimport { cn } from \"@/utils/index\"\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />)\nBreadcrumb.displayName = \"Breadcrumb\"\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n className\n )}\n {...props}\n />\n))\nBreadcrumbList.displayName = \"BreadcrumbList\"\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n))\nBreadcrumbItem.displayName = \"BreadcrumbItem\"\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n )\n})\nBreadcrumbLink.displayName = \"BreadcrumbLink\"\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n))\nBreadcrumbPage.displayName = \"BreadcrumbPage\"\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n)\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\"\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n)\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\"\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\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N,CAME,oBAAC,gBAAD,EAAgB,WAAU,UAAW,CAAA,GACrC,oBAAC,QAAD;EAAM,WAAU;YAAU;CAAU,CAAA,CAChC;;AAER,mBAAmB,cAAc"}
1
+ {"version":3,"file":"breadcrumb.js","names":[],"sources":["../../src/primitives/breadcrumb.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\"\n\nimport { cn } from \"@/utils/index\"\n\nconst Breadcrumb = React.forwardRef<\n HTMLElement,\n React.ComponentPropsWithoutRef<\"nav\"> & {\n separator?: React.ReactNode\n }\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />)\nBreadcrumb.displayName = \"Breadcrumb\"\n\nconst BreadcrumbList = React.forwardRef<\n HTMLOListElement,\n React.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n <ol\n ref={ref}\n className={cn(\n \"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\",\n className\n )}\n {...props}\n />\n))\nBreadcrumbList.displayName = \"BreadcrumbList\"\n\nconst BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-1.5\", className)}\n {...props}\n />\n))\nBreadcrumbItem.displayName = \"BreadcrumbItem\"\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<\"a\"> & {\n asChild?: boolean\n }\n>(({ asChild, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n className={cn(\"transition-colors hover:text-foreground\", className)}\n {...props}\n />\n )\n})\nBreadcrumbLink.displayName = \"BreadcrumbLink\"\n\nconst BreadcrumbPage = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn(\"font-normal text-foreground\", className)}\n {...props}\n />\n))\nBreadcrumbPage.displayName = \"BreadcrumbPage\"\n\nconst BreadcrumbSeparator = ({\n children,\n className,\n ...props\n}: React.ComponentProps<\"li\">) => (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n)\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\"\n\nconst BreadcrumbEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n)\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\"\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n}\n"],"mappings":";;;;;;;AAMA,IAAM,aAAa,MAAM,YAKtB,EAAE,GAAG,SAAS,QAAQ,oBAAC,OAAD;CAAU;CAAK,cAAW;CAAa,GAAI;AAAQ,CAAA,CAAC;AAC7E,WAAW,cAAc;AAEzB,IAAM,iBAAiB,MAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,MAAD;CACO;CACL,WAAW,GACT,4FACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,eAAe,cAAc;AAE7B,IAAM,iBAAiB,MAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,MAAD;CACO;CACL,WAAW,GAAG,oCAAoC,SAAS;CAC3D,GAAI;AACL,CAAA,CACF;AACD,eAAe,cAAc;AAE7B,IAAM,iBAAiB,MAAM,YAK1B,EAAE,SAAS,WAAW,GAAG,SAAS,QAAQ;CAG3C,OACE,oBAHW,UAAU,OAAO,KAG5B;EACO;EACL,WAAW,GAAG,2CAA2C,SAAS;EAClE,GAAI;CACL,CAAA;AAEL,CAAC;AACD,eAAe,cAAc;AAE7B,IAAM,iBAAiB,MAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,QAAD;CACO;CACL,MAAK;CACL,iBAAc;CACd,gBAAa;CACb,WAAW,GAAG,+BAA+B,SAAS;CACtD,GAAI;AACL,CAAA,CACF;AACD,eAAe,cAAc;AAE7B,IAAM,uBAAuB,EAC3B,UACA,WACA,GAAG,YAEH,oBAAC,MAAD;CACE,MAAK;CACL,eAAY;CACZ,WAAW,GAAG,+BAA+B,SAAS;CACtD,GAAI;CAEH,UAAA,YAAY,oBAAC,cAAD,CAAe,CAAA;AAC1B,CAAA;AAEN,oBAAoB,cAAc;AAElC,IAAM,sBAAsB,EAC1B,WACA,GAAG,YAEH,qBAAC,QAAD;CACE,MAAK;CACL,eAAY;CACZ,WAAW,GAAG,4CAA4C,SAAS;CACnE,GAAI;CAJN,UAAA,CAME,oBAAC,gBAAD,EAAgB,WAAU,UAAW,CAAA,GACrC,oBAAC,QAAD;EAAM,WAAU;EAAU,UAAA;CAAU,CAAA,CAChC;;AAER,mBAAmB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","names":[],"sources":["../../src/primitives/checkbox.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\r\nimport { Check } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/utils\"\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ElementRef<typeof CheckboxPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\r\n>(({ className, ...props }, ref) => (\r\n <CheckboxPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n <CheckboxPrimitive.Indicator\r\n className={cn(\"grid place-content-center text-current\")}\r\n >\r\n <Check className=\"h-4 w-4\" />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n))\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\r\n\r\nexport { Checkbox }\r\n"],"mappings":";;;;;;;AAMA,IAAM,WAAW,MAAM,YAGpB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,kBAAkB,MAAnB;CACO;CACL,WAAW,GACT,4UACA,SACF;CACA,GAAI;WAEJ,oBAAC,kBAAkB,WAAnB;EACE,WAAW,GAAG,wCAAwC;YAEtD,oBAAC,OAAD,EAAO,WAAU,UAAW,CAAA;CACD,CAAA;AACP,CAAA,CACzB;AACD,SAAS,cAAc,kBAAkB,KAAK"}
1
+ {"version":3,"file":"checkbox.js","names":[],"sources":["../../src/primitives/checkbox.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\r\nimport { Check } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/utils\"\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ElementRef<typeof CheckboxPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\r\n>(({ className, ...props }, ref) => (\r\n <CheckboxPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n <CheckboxPrimitive.Indicator\r\n className={cn(\"grid place-content-center text-current\")}\r\n >\r\n <Check className=\"h-4 w-4\" />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n))\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\r\n\r\nexport { Checkbox }\r\n"],"mappings":";;;;;;;AAMA,IAAM,WAAW,MAAM,YAGpB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,kBAAkB,MAAnB;CACO;CACL,WAAW,GACT,4UACA,SACF;CACA,GAAI;CAEJ,UAAA,oBAAC,kBAAkB,WAAnB;EACE,WAAW,GAAG,wCAAwC;EAEtD,UAAA,oBAAC,OAAD,EAAO,WAAU,UAAW,CAAA;CACD,CAAA;AACP,CAAA,CACzB;AACD,SAAS,cAAc,kBAAkB,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","names":[],"sources":["../../src/primitives/command.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\r\nimport { Command as CommandPrimitive } from \"cmdk\"\r\nimport { Search } from \"lucide-react\"\r\nimport { cn } from \"@/utils/cn\"\r\nimport { Dialog, DialogContent } from \"./dialog\"\r\n\r\nconst Command = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive\r\n ref={ref}\r\n className={cn(\"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\", className)}\r\n {...props}\r\n />\r\n))\r\nCommand.displayName = CommandPrimitive.displayName\r\n\r\nconst CommandDialog = ({ children, ...props }: DialogProps) => (\r\n <Dialog {...props}>\r\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\r\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\r\n {children}\r\n </Command>\r\n </DialogContent>\r\n </Dialog>\r\n)\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Input>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\r\n>(({ className, ...props }, ref) => (\r\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\r\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\r\n <CommandPrimitive.Input\r\n ref={ref}\r\n className={cn(\"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\", className)}\r\n {...props}\r\n />\r\n </div>\r\n))\r\nCommandInput.displayName = CommandPrimitive.Input.displayName\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.List>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive.List\r\n ref={ref}\r\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\r\n {...props}\r\n />\r\n))\r\nCommandList.displayName = CommandPrimitive.List.displayName\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Empty>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\r\n>((props, ref) => (\r\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\r\n))\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Group>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive.Group\r\n ref={ref}\r\n className={cn(\"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\", className)}\r\n {...props}\r\n />\r\n))\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive.Separator ref={ref} className={cn(\"-mx-1 h-px bg-border\", className)} {...props} />\r\n))\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive.Item\r\n ref={ref}\r\n className={cn(\"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\", className)}\r\n {...props}\r\n />\r\n))\r\nCommandItem.displayName = CommandPrimitive.Item.displayName\r\n\r\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\r\n <span className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)} {...props} />\r\n)\r\nCommandShortcut.displayName = \"CommandShortcut\"\r\n\r\nexport {\r\n Command,\r\n CommandDialog,\r\n CommandInput,\r\n CommandList,\r\n CommandEmpty,\r\n CommandGroup,\r\n CommandItem,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,SAAS,QAC1B,oBAAC,QAAiB,WAAlB;CAAiC;CAAK,WAAW,GAAG,wBAAwB,SAAS;CAAG,GAAI;AAAQ,CAAA,CACrG;AACD,iBAAiB,cAAc,QAAiB,UAAU;AAE1D,IAAM,cAAc,MAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,QAAiB,MAAlB;CACO;CACL,WAAW,GAAG,2TAA2T,SAAS;CAClV,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,QAAiB,KAAK;AAEhD,IAAM,mBAAmB,EAAE,WAAW,GAAG,YACvC,oBAAC,QAAD;CAAM,WAAW,GAAG,yDAAyD,SAAS;CAAG,GAAI;AAAQ,CAAA;AAEvG,gBAAgB,cAAc"}
1
+ {"version":3,"file":"command.js","names":[],"sources":["../../src/primitives/command.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\r\nimport { Command as CommandPrimitive } from \"cmdk\"\r\nimport { Search } from \"lucide-react\"\r\nimport { cn } from \"@/utils/cn\"\r\nimport { Dialog, DialogContent } from \"./dialog\"\r\n\r\nconst Command = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive\r\n ref={ref}\r\n className={cn(\"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\", className)}\r\n {...props}\r\n />\r\n))\r\nCommand.displayName = CommandPrimitive.displayName\r\n\r\nconst CommandDialog = ({ children, ...props }: DialogProps) => (\r\n <Dialog {...props}>\r\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\r\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\r\n {children}\r\n </Command>\r\n </DialogContent>\r\n </Dialog>\r\n)\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Input>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\r\n>(({ className, ...props }, ref) => (\r\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\r\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\r\n <CommandPrimitive.Input\r\n ref={ref}\r\n className={cn(\"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\", className)}\r\n {...props}\r\n />\r\n </div>\r\n))\r\nCommandInput.displayName = CommandPrimitive.Input.displayName\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.List>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive.List\r\n ref={ref}\r\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\r\n {...props}\r\n />\r\n))\r\nCommandList.displayName = CommandPrimitive.List.displayName\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Empty>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\r\n>((props, ref) => (\r\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\r\n))\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Group>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive.Group\r\n ref={ref}\r\n className={cn(\"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\", className)}\r\n {...props}\r\n />\r\n))\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive.Separator ref={ref} className={cn(\"-mx-1 h-px bg-border\", className)} {...props} />\r\n))\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ElementRef<typeof CommandPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\r\n>(({ className, ...props }, ref) => (\r\n <CommandPrimitive.Item\r\n ref={ref}\r\n className={cn(\"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\", className)}\r\n {...props}\r\n />\r\n))\r\nCommandItem.displayName = CommandPrimitive.Item.displayName\r\n\r\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\r\n <span className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)} {...props} />\r\n)\r\nCommandShortcut.displayName = \"CommandShortcut\"\r\n\r\nexport {\r\n Command,\r\n CommandDialog,\r\n CommandInput,\r\n CommandList,\r\n CommandEmpty,\r\n CommandGroup,\r\n CommandItem,\r\n CommandSeparator,\r\n CommandShortcut,\r\n}\r\n"],"mappings":";;;;;;;;;AAOA,IAAM,YAAU,MAAM,YAG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AAG,wBAAwB,SAAS;CAAG,GAAI;AAAQ,CAAA,CACrG;AACD,iBAAiB,cAAc,QAAiB,UAAU;AAE1D,IAAM,cAAc,MAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,QAAiB,MAAlB;CACO;CACL,WAAW,GAAG,2TAA2T,SAAS;CAClV,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,QAAiB,KAAK;AAEhD,IAAM,mBAAmB,EAAE,WAAW,GAAG,YACvC,oBAAC,QAAD;CAAM,WAAW,GAAG,yDAAyD,SAAS;CAAG,GAAI;AAAQ,CAAA;AAEvG,gBAAgB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","names":[],"sources":["../../src/primitives/dialog.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\r\nimport { X } from \"lucide-react\"\r\nimport { cn } from \"@/utils/cn\"\r\n\r\nconst Dialog = DialogPrimitive.Root\r\nconst DialogTrigger = DialogPrimitive.Trigger\r\nconst DialogPortal = DialogPrimitive.Portal\r\nconst DialogClose = DialogPrimitive.Close\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\r\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <DialogPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\r\n <X className=\"h-4 w-4\" />\r\n <span className=\"sr-only\">Close</span>\r\n </DialogPrimitive.Close>\r\n </DialogPrimitive.Content>\r\n </DialogPortal>\r\n))\r\nDialogContent.displayName = DialogPrimitive.Content.displayName\r\n\r\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />\r\n)\r\nDialogHeader.displayName = \"DialogHeader\"\r\n\r\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)} {...props} />\r\n)\r\nDialogFooter.displayName = \"DialogFooter\"\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\r\n {...props}\r\n />\r\n))\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-muted-foreground\", className)}\r\n {...props}\r\n />\r\n))\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName\r\n\r\nexport {\r\n Dialog,\r\n DialogPortal,\r\n DialogOverlay,\r\n DialogClose,\r\n DialogTrigger,\r\n DialogContent,\r\n DialogHeader,\r\n DialogFooter,\r\n DialogTitle,\r\n DialogDescription,\r\n}\r\n"],"mappings":";;;;;;;AAKA,IAAM,SAAS,gBAAgB;AAC/B,IAAM,gBAAgB,gBAAgB;AACtC,IAAM,eAAe,gBAAgB;AACrC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,SAAjB;CACO;CACL,WAAW,GACT,0JACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GAChB,qBAAC,gBAAgB,SAAjB;CACO;CACL,WAAW,GACT,+fACA,SACF;CACA,GAAI;WANN,CAQG,UACD,qBAAC,gBAAgB,OAAjB;EAAuB,WAAU;YAAjC,CACE,oBAAC,GAAD,EAAG,WAAU,UAAW,CAAA,GACxB,oBAAC,QAAD;GAAM,WAAU;aAAU;EAAW,CAAA,CAChB;GACA;EACb,EAAA,CAAA,CACf;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CAAK,WAAW,GAAG,sDAAsD,SAAS;CAAG,GAAI;AAAQ,CAAA;AAEnG,aAAa,cAAc;AAE3B,IAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CAAK,WAAW,GAAG,iEAAiE,SAAS;CAAG,GAAI;AAAQ,CAAA;AAE9G,aAAa,cAAc;AAE3B,IAAM,cAAc,MAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,OAAjB;CACO;CACL,WAAW,GAAG,qDAAqD,SAAS;CAC5E,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,IAAM,oBAAoB,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,aAAjB;CACO;CACL,WAAW,GAAG,iCAAiC,SAAS;CACxD,GAAI;AACL,CAAA,CACF;AACD,kBAAkB,cAAc,gBAAgB,YAAY"}
1
+ {"version":3,"file":"dialog.js","names":[],"sources":["../../src/primitives/dialog.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\r\nimport { X } from \"lucide-react\"\r\nimport { cn } from \"@/utils/cn\"\r\n\r\nconst Dialog = DialogPrimitive.Root\r\nconst DialogTrigger = DialogPrimitive.Trigger\r\nconst DialogPortal = DialogPrimitive.Portal\r\nconst DialogClose = DialogPrimitive.Close\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\r\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <DialogPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\r\n <X className=\"h-4 w-4\" />\r\n <span className=\"sr-only\">Close</span>\r\n </DialogPrimitive.Close>\r\n </DialogPrimitive.Content>\r\n </DialogPortal>\r\n))\r\nDialogContent.displayName = DialogPrimitive.Content.displayName\r\n\r\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />\r\n)\r\nDialogHeader.displayName = \"DialogHeader\"\r\n\r\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)} {...props} />\r\n)\r\nDialogFooter.displayName = \"DialogFooter\"\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\r\n {...props}\r\n />\r\n))\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-muted-foreground\", className)}\r\n {...props}\r\n />\r\n))\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName\r\n\r\nexport {\r\n Dialog,\r\n DialogPortal,\r\n DialogOverlay,\r\n DialogClose,\r\n DialogTrigger,\r\n DialogContent,\r\n DialogHeader,\r\n DialogFooter,\r\n DialogTitle,\r\n DialogDescription,\r\n}\r\n"],"mappings":";;;;;;;AAKA,IAAM,SAAS,gBAAgB;AAC/B,IAAM,gBAAgB,gBAAgB;AACtC,IAAM,eAAe,gBAAgB;AACrC,IAAM,cAAc,gBAAgB;AAEpC,IAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,SAAjB;CACO;CACL,WAAW,GACT,0JACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,IAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GAChB,qBAAC,gBAAgB,SAAjB;CACO;CACL,WAAW,GACT,+fACA,SACF;CACA,GAAI;CANN,UAAA,CAQG,UACD,qBAAC,gBAAgB,OAAjB;EAAuB,WAAU;EAAjC,UAAA,CACE,oBAAC,GAAD,EAAG,WAAU,UAAW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