pejay-ui 1.4.3 → 1.5.0

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 (148) hide show
  1. package/README.md +26 -0
  2. package/bin/cli.js +45 -15
  3. package/package.json +2 -1
  4. package/registry/buttons.json +3 -2
  5. package/registry/dropdowns.json +3 -1
  6. package/registry/forms.json +51 -23
  7. package/registry/hotkeys.json +12 -0
  8. package/registry/overlays.json +18 -2
  9. package/registry/panels.json +21 -0
  10. package/registry/skeleton.json +20 -0
  11. package/registry/spinner.json +13 -0
  12. package/templates/button/Button.tsx +8 -7
  13. package/templates/button/README.md +81 -0
  14. package/templates/button/index.ts +1 -2
  15. package/templates/form/{checkbox-group.tsx → choices/checkbox-group.tsx} +1 -1
  16. package/templates/form/{checkbox.tsx → choices/checkbox.tsx} +1 -1
  17. package/templates/form/{radio-group.tsx → choices/radio-group.tsx} +1 -1
  18. package/templates/form/{radio.tsx → choices/radio.tsx} +1 -1
  19. package/templates/form/choices/readme.checkbox-group.md +27 -0
  20. package/templates/form/choices/readme.checkbox.md +26 -0
  21. package/templates/form/choices/readme.radio-group.md +26 -0
  22. package/templates/form/choices/readme.radio.md +24 -0
  23. package/templates/form/choices/readme.switch.md +26 -0
  24. package/templates/form/{switch.tsx → choices/switch.tsx} +1 -1
  25. package/templates/form/{file-input.tsx → file/file-input.tsx} +2 -2
  26. package/templates/form/file/readme.file-input.md +26 -0
  27. package/templates/form/index.ts +19 -22
  28. package/templates/form/{amount-input.tsx → numeric/amount-input.tsx} +2 -2
  29. package/templates/form/{number-input.tsx → numeric/number-input.tsx} +2 -2
  30. package/templates/form/{range-slider.tsx → numeric/range-slider.tsx} +1 -1
  31. package/templates/form/numeric/readme.amount-input.md +27 -0
  32. package/templates/form/numeric/readme.number-input.md +26 -0
  33. package/templates/form/numeric/readme.range-slider.md +27 -0
  34. package/templates/form/{date-picker.tsx → pickers/date-picker.tsx} +2 -2
  35. package/templates/form/{date-range-picker.tsx → pickers/date-range-picker.tsx} +2 -2
  36. package/templates/form/pickers/readme.date-picker.md +26 -0
  37. package/templates/form/pickers/readme.date-range-picker.md +25 -0
  38. package/templates/form/pickers/readme.time-picker.md +25 -0
  39. package/templates/form/pickers/readme.time-range-picker.md +25 -0
  40. package/templates/form/{time-picker.tsx → pickers/time-picker.tsx} +1 -1
  41. package/templates/form/{time-range-picker.tsx → pickers/time-range-picker.tsx} +1 -1
  42. package/templates/form/{input.tsx → text-inputs/input.tsx} +1 -1
  43. package/templates/form/{password-input.tsx → text-inputs/password-input.tsx} +1 -1
  44. package/templates/form/text-inputs/readme.email-input.md +24 -0
  45. package/templates/form/text-inputs/readme.input.md +28 -0
  46. package/templates/form/text-inputs/readme.password-input.md +24 -0
  47. package/templates/form/text-inputs/readme.phone-input.md +24 -0
  48. package/templates/form/text-inputs/readme.textarea.md +24 -0
  49. package/templates/form/text-inputs/readme.url-input.md +23 -0
  50. package/templates/form/{textarea.tsx → text-inputs/textarea.tsx} +1 -1
  51. package/templates/hotkeys/README.md +134 -0
  52. package/templates/hotkeys/components/HotkeyProvider.tsx +78 -0
  53. package/templates/hotkeys/components/HotkeysHelpModal.tsx +102 -0
  54. package/templates/hotkeys/core/key-matcher.ts +106 -0
  55. package/templates/hotkeys/core/registry.ts +39 -0
  56. package/templates/hotkeys/core/types.ts +15 -0
  57. package/templates/hotkeys/hooks/useHotkey.ts +43 -0
  58. package/templates/hotkeys/index.ts +6 -0
  59. package/templates/layouts/lv1/app-layout.tsx +1 -1
  60. package/templates/layouts/lv1/sidebar-menu.tsx +1 -1
  61. package/templates/notes/app-provider/app-provider-side-panel-modals-roadmap.md +606 -0
  62. package/templates/notes/app-provider/manual-open-close-side-panel-and-modal.md +913 -0
  63. package/templates/notes/app-provider/side-panel-card-hooks-and-complexity.md +578 -0
  64. package/templates/notes/under-dev/AppProvider.tsx +92 -0
  65. package/templates/notes/under-dev/app-context.ts +14 -0
  66. package/templates/notes/under-dev/card/base-card.tsx +35 -0
  67. package/templates/notes/under-dev/card/index.ts +4 -0
  68. package/templates/notes/under-dev/card/modal-card.tsx +88 -0
  69. package/templates/notes/under-dev/card/side-panel-card.tsx +127 -0
  70. package/templates/notes/under-dev/form-overlay-registry.ts +42 -0
  71. package/templates/notes/under-dev/keyboard-shortcuts-help.tsx +79 -0
  72. package/templates/notes/under-dev/keyboard-utils.ts +22 -0
  73. package/templates/notes/under-dev/overlay/backdrop.tsx +95 -0
  74. package/templates/notes/under-dev/overlay/index.ts +4 -0
  75. package/templates/notes/under-dev/overlay/modal.tsx +43 -0
  76. package/templates/notes/under-dev/overlay/side-panel.tsx +126 -0
  77. package/templates/notes/under-dev/overlay-close.ts +50 -0
  78. package/templates/notes/under-dev/page-shortcut-registry.ts +9 -0
  79. package/templates/notes/under-dev/unsaved-changes-notify.ts +11 -0
  80. package/templates/notes/under-dev/use-keyboard-shortcuts.tsx +110 -0
  81. package/templates/notes/under-dev/useFormDirty.ts +6 -0
  82. package/templates/notes/under-dev/useFormOverlayRegistration.ts +47 -0
  83. package/templates/notes/under-dev/useFormPanel.tsx +18 -0
  84. package/templates/notes/under-dev/useFormTabHandler.ts +22 -0
  85. package/templates/notes/under-dev/useHorizontalWheelScroll.ts +27 -0
  86. package/templates/notes/under-dev/useOverlay.ts +41 -0
  87. package/templates/overlays/index.ts +2 -1
  88. package/templates/overlays/portal/portal.tsx +26 -0
  89. package/templates/overlays/tooltip/readme.tooltip.md +26 -0
  90. package/templates/{button → overlays/tooltip}/tooltip.tsx +1 -1
  91. package/templates/panels/COMPONENTS.md +103 -0
  92. package/templates/panels/README.md +702 -0
  93. package/templates/panels/components/base-card.tsx +33 -0
  94. package/templates/panels/components/index.ts +8 -0
  95. package/templates/panels/components/modal/backdrop.tsx +88 -0
  96. package/templates/panels/components/modal/modal-card.tsx +139 -0
  97. package/templates/panels/components/modal/modal-raw.tsx +36 -0
  98. package/templates/panels/components/modal/modal.tsx +49 -0
  99. package/templates/panels/components/side-panel/side-panel-card.tsx +123 -0
  100. package/templates/panels/components/side-panel/side-panel-raw.tsx +25 -0
  101. package/templates/panels/components/side-panel/side-panel.tsx +135 -0
  102. package/templates/panels/core/PanelProvider.tsx +145 -0
  103. package/templates/panels/core/constants.ts +9 -0
  104. package/templates/panels/core/form-overlay-registry.ts +35 -0
  105. package/templates/panels/core/index.ts +6 -0
  106. package/templates/panels/core/overlay-close.ts +11 -0
  107. package/templates/panels/core/panel-context.ts +41 -0
  108. package/templates/panels/core/types.ts +41 -0
  109. package/templates/panels/hooks/index.ts +7 -0
  110. package/templates/panels/hooks/useFormDirty.ts +6 -0
  111. package/templates/panels/hooks/useFormOverlayRegistration.ts +92 -0
  112. package/templates/panels/hooks/useFormPanel.tsx +18 -0
  113. package/templates/panels/hooks/useFormTabHandler.ts +25 -0
  114. package/templates/panels/hooks/useHorizontalWheelScroll.ts +31 -0
  115. package/templates/panels/hooks/useModalForm.tsx +22 -0
  116. package/templates/panels/hooks/useOverlay.ts +65 -0
  117. package/templates/panels/index.ts +3 -0
  118. package/templates/panels/vendor-example/by-using-modal/VendorModalPage.tsx +47 -0
  119. package/templates/panels/vendor-example/by-using-modal/useVendorModalForm.tsx +19 -0
  120. package/templates/panels/vendor-example/by-using-modal/vendor-modal-form.tsx +112 -0
  121. package/templates/panels/vendor-example/by-using-modal/vendor-types.ts +29 -0
  122. package/templates/panels/vendor-example/by-using-sidepanel/VendorsPage.tsx +47 -0
  123. package/templates/panels/vendor-example/by-using-sidepanel/useVendorFormPanel.tsx +15 -0
  124. package/templates/panels/vendor-example/by-using-sidepanel/vendor-form.tsx +108 -0
  125. package/templates/panels/vendor-example/by-using-sidepanel/vendor-types.ts +29 -0
  126. package/templates/select-dropdown/README.md +62 -0
  127. package/templates/select-dropdown/multiselect-input.tsx +2 -2
  128. package/templates/select-dropdown/select-input.tsx +2 -2
  129. package/templates/skeleton/README.md +53 -0
  130. package/templates/skeleton/index.ts +2 -0
  131. package/templates/skeleton/skeleton.css +36 -0
  132. package/templates/skeleton/skeleton.tsx +40 -0
  133. package/templates/skeleton/types.ts +12 -0
  134. package/templates/spinner/README.md +51 -0
  135. package/templates/spinner/index.ts +1 -0
  136. package/templates/spinner/spinner.css +58 -0
  137. package/templates/spinner/spinner.tsx +263 -0
  138. package/templates/toast/container.tsx +2 -2
  139. package/templates/utilities/formater.dateTime.md +74 -0
  140. package/templates/utilities/formater.dateTime.ts +310 -0
  141. package/templates/utilities/formater.phoneNumber.md +32 -0
  142. package/templates/utilities/formater.phoneNumber.ts +143 -0
  143. package/templates/utilities/sanitize.md +23 -0
  144. package/templates/utilities/sanitize.ts +148 -0
  145. /package/templates/form/{email-input.tsx → text-inputs/email-input.tsx} +0 -0
  146. /package/templates/form/{phone-input.tsx → text-inputs/phone-input.tsx} +0 -0
  147. /package/templates/form/{url-input.tsx → text-inputs/url-input.tsx} +0 -0
  148. /package/templates/{overlays → notes/under-dev/overlay}/portal.tsx +0 -0
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from "react";
2
- import { cn } from "@/utils/cn";
2
+ import { cn } from "@/pejay-ui/utils/cn";
3
3
 
4
4
  /*
5
5
  * ============================================================================
@@ -0,0 +1,27 @@
1
+ # CheckboxGroup Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { CheckboxGroup } from "@/pejay-ui/components/form";
11
+
12
+ <CheckboxGroup
13
+ label="Hobbies"
14
+ options={[{ label: "Sports", value: "sports" }, { label: "Music", value: "music" }]}
15
+ value={hobbies}
16
+ onChange={setHobbies}
17
+ />
18
+ ```
19
+
20
+ ---
21
+
22
+ ## Props
23
+
24
+ | Prop | Type | Default | Description |
25
+ | :--- | :--- | :--- | :--- |
26
+ | `options` | `Array<{ label: string, value: string }>` | — | Option items list. |
27
+ | `value` | `string[]` | — | Selected values list. |
@@ -0,0 +1,26 @@
1
+ # Checkbox Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { Checkbox } from "@/pejay-ui/components/form";
11
+
12
+ <Checkbox
13
+ label="I agree to terms"
14
+ checked={agreed}
15
+ onChange={(e) => setAgreed(e.target.checked)}
16
+ />
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `label` | `string` | — | Description text displayed next to the checkbox box. |
26
+ | `checked` | `boolean` | `false` | Checked state. |
@@ -0,0 +1,26 @@
1
+ # RadioGroup Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { RadioGroup } from "@/pejay-ui/components/form";
11
+
12
+ <RadioGroup
13
+ label="Preferred Mode"
14
+ options={[{ label: "Dark", value: "dark" }, { label: "Light", value: "light" }]}
15
+ value={theme}
16
+ onChange={setTheme}
17
+ />
18
+ ```
19
+
20
+ ---
21
+
22
+ ## Props
23
+
24
+ | Prop | Type | Default | Description |
25
+ | :--- | :--- | :--- | :--- |
26
+ | `options` | `Array<{ label: string, value: string }>` | — | Group items lists. |
@@ -0,0 +1,24 @@
1
+ # Radio Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { Radio } from "@/pejay-ui/components/form";
11
+
12
+ <Radio
13
+ label="Option Item"
14
+ name="group-1"
15
+ />
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Props
21
+
22
+ | Prop | Type | Default | Description |
23
+ | :--- | :--- | :--- | :--- |
24
+ | `label` | `string` | — | Option description text. |
@@ -0,0 +1,26 @@
1
+ # Switch Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { Switch } from "@/pejay-ui/components/form";
11
+
12
+ <Switch
13
+ label="Enable Notifications"
14
+ checked={isEnabled}
15
+ onChange={setIsEnabled}
16
+ />
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `label` | `string` | — | Helper label text. |
26
+ | `checked` | `boolean` | `false` | Toggles checkbox status on/off. |
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { cn } from "@/utils/cn";
2
+ import { cn } from "@/pejay-ui/utils/cn";
3
3
 
4
4
  interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> {
5
5
  /* Title label of the switch toggle */
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useRef } from "react";
2
2
  import { Upload, X, FileText, Image as ImageIcon } from "lucide-react";
3
- import { cn } from "@/utils/cn";
4
- import { Input } from "./input";
3
+ import { cn } from "@/pejay-ui/utils/cn";
4
+ import { Input } from "../text-inputs/input";
5
5
 
6
6
  /*
7
7
  * ============================================================================
@@ -0,0 +1,26 @@
1
+ # FileInput Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { FileInput } from "@/pejay-ui/components/form";
11
+
12
+ <FileInput
13
+ label="Upload Resume"
14
+ accept=".pdf,.docx"
15
+ onChange={(files) => console.log(files)}
16
+ />
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `multiple` | `boolean` | `false` | Allows multiple file select upload. |
26
+ | `accept` | `string` | — | Accepted file formats. |
@@ -1,22 +1,19 @@
1
- export * from "./input";
2
- export * from "./checkbox";
3
- export * from "./textarea";
4
- export * from "./radio";
5
- export * from "./radio-group";
6
- export * from "./switch";
7
- export * from "./checkbox-group";
8
- export * from "./range-slider";
9
- export * from "./password-input";
10
-
11
- export * from "./date-picker";
12
- export * from "./time-picker";
13
- export * from "./date-range-picker";
14
- export * from "./time-range-picker";
15
-
16
- export * from "./number-input";
17
- export * from "./amount-input";
18
- export * from "./phone-input";
19
- export * from "./url-input";
20
-
21
- export * from "./email-input";
22
- export * from "./file-input";
1
+ export * from "./text-inputs/input";
2
+ export * from "./text-inputs/textarea";
3
+ export * from "./text-inputs/email-input";
4
+ export * from "./text-inputs/password-input";
5
+ export * from "./text-inputs/phone-input";
6
+ export * from "./text-inputs/url-input";
7
+ export * from "./pickers/date-picker";
8
+ export * from "./pickers/date-range-picker";
9
+ export * from "./pickers/time-picker";
10
+ export * from "./pickers/time-range-picker";
11
+ export * from "./numeric/number-input";
12
+ export * from "./numeric/amount-input";
13
+ export * from "./numeric/range-slider";
14
+ export * from "./choices/checkbox";
15
+ export * from "./choices/checkbox-group";
16
+ export * from "./choices/radio";
17
+ export * from "./choices/radio-group";
18
+ export * from "./choices/switch";
19
+ export * from "./file/file-input";
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect } from "react";
2
- import { Input } from "./input";
2
+ import { Input } from "../text-inputs/input";
3
3
  import { Plus, Minus } from "lucide-react";
4
- import { cn } from "@/utils/cn";
4
+ import { cn } from "@/pejay-ui/utils/cn";
5
5
 
6
6
  /*
7
7
  * ============================================================================
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect } from "react";
2
- import { Input } from "./input";
2
+ import { Input } from "../text-inputs/input";
3
3
  import { Plus, Minus } from "lucide-react";
4
- import { cn } from "@/utils/cn";
4
+ import { cn } from "@/pejay-ui/utils/cn";
5
5
 
6
6
  /*
7
7
  * ============================================================================
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { cn } from "@/utils/cn";
2
+ import { cn } from "@/pejay-ui/utils/cn";
3
3
 
4
4
  interface RangeSliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
5
5
  /* Title label of the range slider */
@@ -0,0 +1,27 @@
1
+ # AmountInput Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { AmountInput } from "@/pejay-ui/components/form";
11
+
12
+ <AmountInput
13
+ label="Price Value"
14
+ currency="USD"
15
+ value={amount}
16
+ onChange={setAmount}
17
+ />
18
+ ```
19
+
20
+ ---
21
+
22
+ ## Props
23
+
24
+ | Prop | Type | Default | Description |
25
+ | :--- | :--- | :--- | :--- |
26
+ | `currency` | `string` | `"$"` | Currency prefix symbol. |
27
+ | `allowDecimals` | `boolean` | `true` | Allows float decimals. |
@@ -0,0 +1,26 @@
1
+ # NumberInput Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { NumberInput } from "@/pejay-ui/components/form";
11
+
12
+ <NumberInput
13
+ label="Age"
14
+ min={18}
15
+ max={99}
16
+ />
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `min` | `number` | — | Minimum value allowed. |
26
+ | `max` | `number` | — | Maximum value allowed. |
@@ -0,0 +1,27 @@
1
+ # RangeSlider Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { RangeSlider } from "@/pejay-ui/components/form";
11
+
12
+ <RangeSlider
13
+ min={0}
14
+ max={100}
15
+ value={val}
16
+ onChange={setVal}
17
+ />
18
+ ```
19
+
20
+ ---
21
+
22
+ ## Props
23
+
24
+ | Prop | Type | Default | Description |
25
+ | :--- | :--- | :--- | :--- |
26
+ | `min` | `number` | `0` | Minimum range. |
27
+ | `max` | `number` | `100` | Maximum range. |
@@ -5,14 +5,14 @@ import React, {
5
5
  useEffect,
6
6
  useLayoutEffect,
7
7
  } from "react";
8
- import { cn } from "@/utils/cn";
8
+ import { cn } from "@/pejay-ui/utils/cn";
9
9
  import {
10
10
  Calendar as CalendarIcon,
11
11
  ChevronLeft,
12
12
  ChevronRight,
13
13
  ChevronDown,
14
14
  } from "lucide-react";
15
- import { SelectInput } from "../select-dropdown/select-input";
15
+ import { SelectInput } from "../../select-dropdown/select-input";
16
16
  const DateUtils = {};
17
17
  import {
18
18
  useFloating,
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useMemo } from "react";
2
- import { cn } from "@/utils/cn";
2
+ import { cn } from "@/pejay-ui/utils/cn";
3
3
  import {
4
4
  Calendar as CalendarIcon,
5
5
  ChevronLeft,
@@ -8,7 +8,7 @@ import {
8
8
  PanelLeftClose,
9
9
  PanelLeft,
10
10
  } from "lucide-react";
11
- import { SelectInput } from "../select-dropdown/select-input";
11
+ import { SelectInput } from "../../select-dropdown/select-input";
12
12
  const DateUtils = {};
13
13
  import {
14
14
  useFloating,
@@ -0,0 +1,26 @@
1
+ # DatePicker Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { DatePicker } from "@/pejay-ui/components/form";
11
+
12
+ <DatePicker
13
+ label="Date of Birth"
14
+ value={birthDate}
15
+ onChange={setBirthDate}
16
+ />
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `value` | `Date` | — | Selected date object. |
26
+ | `onChange` | `(date: Date) => void` | — | Callback when date is selected. |
@@ -0,0 +1,25 @@
1
+ # DateRangePicker Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { DateRangePicker } from "@/pejay-ui/components/form";
11
+
12
+ <DateRangePicker
13
+ label="Booking Duration"
14
+ value={range}
15
+ onChange={setRange}
16
+ />
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `value` | `{ start: Date, end: Date }` | — | Date range values. |
@@ -0,0 +1,25 @@
1
+ # TimePicker Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { TimePicker } from "@/pejay-ui/components/form";
11
+
12
+ <TimePicker
13
+ label="Start Time"
14
+ value={time}
15
+ onChange={setTime}
16
+ />
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `value` | `string` | — | Time string value (e.g. "12:00 AM"). |
@@ -0,0 +1,25 @@
1
+ # TimeRangePicker Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { TimeRangePicker } from "@/pejay-ui/components/form";
11
+
12
+ <TimeRangePicker
13
+ label="Shift Duration"
14
+ value={range}
15
+ onChange={setRange}
16
+ />
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `value` | `{ start: string, end: string }` | — | Time range selector values. |
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useMemo, useRef, useEffect } from "react";
2
- import { cn } from "@/utils/cn";
2
+ import { cn } from "@/pejay-ui/utils/cn";
3
3
  import { Clock, ChevronDown } from "lucide-react";
4
4
  const DateUtils = {};
5
5
  import {
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useMemo } from "react";
2
- import { cn } from "@/utils/cn";
2
+ import { cn } from "@/pejay-ui/utils/cn";
3
3
  import { Clock, ChevronDown } from "lucide-react";
4
4
  const DateUtils = {};
5
5
  import {
@@ -1,5 +1,5 @@
1
1
  import React, { useRef } from "react";
2
- import { cn } from "@/utils/cn";
2
+ import { cn } from "@/pejay-ui/utils/cn";
3
3
 
4
4
  /*
5
5
  * ============================================================================
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import { Input } from "./input";
3
3
  import { Check, Eye, EyeOff, AlertTriangle } from "lucide-react";
4
- import { cn } from "@/utils/cn";
4
+ import { cn } from "@/pejay-ui/utils/cn";
5
5
 
6
6
  /*
7
7
  * ============================================================================
@@ -0,0 +1,24 @@
1
+ # EmailInput Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { EmailInput } from "@/pejay-ui/components/form";
11
+
12
+ <EmailInput
13
+ value={email}
14
+ onChange={(e) => setEmail(e.target.value)}
15
+ />
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Props
21
+
22
+ | Prop | Type | Default | Description |
23
+ | :--- | :--- | :--- | :--- |
24
+ | `label` | `string` | `"Email"` | Field label text. |
@@ -0,0 +1,28 @@
1
+ # Input (Text) Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { Input } from "@/pejay-ui/components/form";
11
+
12
+ <Input
13
+ label="User Name"
14
+ placeholder="Enter your user name"
15
+ prefix={<UserIcon size={16} />}
16
+ />
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ | :--- | :--- | :--- | :--- |
25
+ | `label` | `string` | — | Label text displayed above the input. |
26
+ | `error` | `string` | — | Validation error text that highlights borders red. |
27
+ | `prefix` | `ReactNode` | — | Component to render on the left side of the input field. |
28
+ | `suffix` | `ReactNode` | — | Component to render on the right side of the input field. |
@@ -0,0 +1,24 @@
1
+ # PasswordInput Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { PasswordInput } from "@/pejay-ui/components/form";
11
+
12
+ <PasswordInput
13
+ label="Password"
14
+ placeholder="Enter secret pass"
15
+ />
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Props
21
+
22
+ | Prop | Type | Default | Description |
23
+ | :--- | :--- | :--- | :--- |
24
+ | `strengthBar` | `boolean` | `false` | Toggles password strength progress indicator. |
@@ -0,0 +1,24 @@
1
+ # PhoneInput Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { PhoneInput } from "@/pejay-ui/components/form";
11
+
12
+ <PhoneInput
13
+ value={phone}
14
+ onChange={(val) => setPhone(val)}
15
+ />
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Props
21
+
22
+ | Prop | Type | Default | Description |
23
+ | :--- | :--- | :--- | :--- |
24
+ | `label` | `string` | `"Phone Number"` | Input field label. |
@@ -0,0 +1,24 @@
1
+ # Textarea Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { Textarea } from "@/pejay-ui/components/form";
11
+
12
+ <Textarea
13
+ label="Remarks"
14
+ rows={6}
15
+ />
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Props
21
+
22
+ | Prop | Type | Default | Description |
23
+ | :--- | :--- | :--- | :--- |
24
+ | `rows` | `number` | `4` | Default display rows. |
@@ -0,0 +1,23 @@
1
+ # UrlInput Component
2
+
3
+ A styled form input component optimized for Tailwind.
4
+
5
+ ---
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { UrlInput } from "@/pejay-ui/components/form";
11
+
12
+ <UrlInput
13
+ placeholder="https://example.com"
14
+ />
15
+ ```
16
+
17
+ ---
18
+
19
+ ## Props
20
+
21
+ | Prop | Type | Default | Description |
22
+ | :--- | :--- | :--- | :--- |
23
+ | `label` | `string` | `"URL"` | Input field label. |