From d4114702a0cfba45c58757027798d5798a603eb9 Mon Sep 17 00:00:00 2001 From: Firman Ramdhani <33869609+firmanramdhani@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:45:28 +0700 Subject: [PATCH] feat: add form components with styles for input, textarea, and input number - Introduced new styles for form components including input, textarea, and input number. - Created a new TextArea component with status and variant support. - Updated global styles to include form variables and component styles. - Added type definitions for form components to ensure consistency. - Integrated new components into the main component index for easy access. --- .../src/apps/modules/example/example.page.tsx | 9 + .../input-showcase/group-component.tsx | 126 ++++++++ .../modules/example/input-showcase/index.tsx | 31 ++ packages/configs/eslint/react.js | 17 +- packages/ui/env.d.ts | 11 + packages/ui/package.json | 4 + .../form-provider/form-control.component.tsx | 6 + .../form-provider/form-item.component.tsx | 40 +++ .../components/forms/form-provider/index.tsx | 33 +++ packages/ui/src/components/forms/index.ts | 8 + .../forms/input/input-number.component.tsx | 26 ++ .../forms/input/input-password.component.tsx | 6 + .../forms/input/input.component.tsx | 17 ++ .../components/forms/styles/form.style.css | 4 + .../forms/styles/input-number.style.css | 274 ++++++++++++++++++ .../components/forms/styles/input.style.css | 240 +++++++++++++++ .../forms/styles/textarea.style.css | 161 ++++++++++ .../forms/textarea/textarea.component.tsx | 12 + .../ui/src/components/forms/types/index.ts | 54 ++++ packages/ui/src/components/index.ts | 2 + packages/ui/src/globals.css | 57 +++- pnpm-lock.yaml | 122 +++++++- 22 files changed, 1238 insertions(+), 22 deletions(-) create mode 100644 apps/web/src/apps/modules/example/example.page.tsx create mode 100644 apps/web/src/apps/modules/example/input-showcase/group-component.tsx create mode 100644 apps/web/src/apps/modules/example/input-showcase/index.tsx create mode 100644 packages/ui/env.d.ts create mode 100644 packages/ui/src/components/forms/form-provider/form-control.component.tsx create mode 100644 packages/ui/src/components/forms/form-provider/form-item.component.tsx create mode 100644 packages/ui/src/components/forms/form-provider/index.tsx create mode 100644 packages/ui/src/components/forms/index.ts create mode 100644 packages/ui/src/components/forms/input/input-number.component.tsx create mode 100644 packages/ui/src/components/forms/input/input-password.component.tsx create mode 100644 packages/ui/src/components/forms/input/input.component.tsx create mode 100644 packages/ui/src/components/forms/styles/form.style.css create mode 100644 packages/ui/src/components/forms/styles/input-number.style.css create mode 100644 packages/ui/src/components/forms/styles/input.style.css create mode 100644 packages/ui/src/components/forms/styles/textarea.style.css create mode 100644 packages/ui/src/components/forms/textarea/textarea.component.tsx create mode 100644 packages/ui/src/components/forms/types/index.ts diff --git a/apps/web/src/apps/modules/example/example.page.tsx b/apps/web/src/apps/modules/example/example.page.tsx new file mode 100644 index 0000000..b5f4b3b --- /dev/null +++ b/apps/web/src/apps/modules/example/example.page.tsx @@ -0,0 +1,9 @@ +import InputShowCase from './input-showcase'; + +export default function ExamplePage() { + return ( +
+ +
+ ); +} diff --git a/apps/web/src/apps/modules/example/input-showcase/group-component.tsx b/apps/web/src/apps/modules/example/input-showcase/group-component.tsx new file mode 100644 index 0000000..e4fa83c --- /dev/null +++ b/apps/web/src/apps/modules/example/input-showcase/group-component.tsx @@ -0,0 +1,126 @@ +import { Input, InputNumber, InputStatusType, TextArea } from '@repo/ui'; + +export default function GroupComponent({ status }: { status?: InputStatusType }) { + return ( +
+
+

Default

+
+
+
Default
+
+ + +