From d331c56e814d80aa92b216ac0512b3e5f2c71472 Mon Sep 17 00:00:00 2001 From: supakornnetsuwan Date: Thu, 16 Oct 2025 11:49:31 +0700 Subject: [PATCH 1/4] fix: `shadcn` component directory structure - move `shadcn` components to `v2` folder and export the directory - flatten `primary` button variant - fix: `aria-menu` background - rename back the deprecated react-aria components by removing the leading `Aria[component-name]` keyword --- .../erp/genseki/auth/setup/setup.client.tsx | 10 +- .../erp/genseki/collections/posts.client.tsx | 2 +- .../ui-playground/src/app/playground/page.tsx | 473 +++++++++--------- .../app/playground/shadcn/button-section.tsx | 9 +- .../playground/shadcn/combobox-section.tsx | 4 +- .../app/playground/shadcn/input-section.tsx | 4 +- .../app/playground/shadcn/link-section.tsx | 3 +- packages/react/package.json | 9 + .../_components/input-email-section.tsx | 10 +- .../views/login/login.client.tsx | 12 +- .../reset-password/reset-password.client.tsx | 6 +- .../components/compound/auto-field/index.tsx | 68 ++- .../components/compound/collection-card.tsx | 6 +- .../collection-sidebar/nav/app-topbar-nav.tsx | 4 +- .../editor/components/redo-undo-buttons.tsx | 10 +- .../editor/components/upload-image-button.tsx | 6 +- .../components/compound/file-upload-field.tsx | 54 +- .../compound/reorder-group/index.tsx | 6 +- .../components/compound/submit-button.tsx | 2 +- .../components/primitives/breadcrumbs.tsx | 4 +- .../components/primitives/button-group.tsx | 99 +--- .../react/components/primitives/button.tsx | 102 +--- .../react/components/primitives/calendar.tsx | 10 +- .../components/primitives/color-picker.tsx | 22 +- .../react/components/primitives/combobox.tsx | 358 ++----------- .../components/primitives/date-picker.tsx | 16 +- .../react/components/primitives/dialog.tsx | 235 ++------- .../src/react/components/primitives/form.tsx | 9 +- .../src/react/components/primitives/index.ts | 3 +- .../src/react/components/primitives/link.tsx | 26 +- .../src/react/components/primitives/menu.tsx | 8 +- .../src/react/components/primitives/modal.tsx | 72 +-- .../components/primitives/multiple-select.tsx | 6 +- .../react/components/primitives/popover.tsx | 138 ++--- .../react/components/primitives/select.tsx | 8 +- .../react/components/primitives/separator.tsx | 43 +- .../src/react/components/primitives/sheet.tsx | 233 ++------- .../react/components/primitives/sidebar.tsx | 20 +- .../react/components/primitives/text-area.tsx | 10 +- .../components/primitives/text-field.tsx | 60 +-- .../react/components/primitives/toolbar.tsx | 4 +- packages/react/src/react/pages/401.tsx | 6 +- packages/react/src/react/pages/403.tsx | 6 +- packages/react/src/react/pages/404.tsx | 6 +- .../views/collections/list/toolbar/create.tsx | 2 +- .../views/collections/list/toolbar/delete.tsx | 19 +- .../views/collections/list/toolbar/filter.tsx | 2 +- .../views/collections/list/toolbar/index.tsx | 3 +- .../views/collections/list/toolbar/search.tsx | 3 +- packages/react/tsconfig.json | 2 +- .../v2/components/primitives/button-group.tsx | 81 +++ .../react/v2/components/primitives/button.tsx | 72 +++ .../v2/components/primitives/combobox.tsx | 294 +++++++++++ .../components/primitives/command.tsx | 2 +- .../react/v2/components/primitives/dialog.tsx | 127 +++++ .../react/v2/components/primitives/index.ts | 12 + .../components/primitives/input-group.tsx | 4 +- .../react/v2/components/primitives/input.tsx | 28 ++ .../components/primitives/label.tsx | 2 +- .../react/v2/components/primitives/link.tsx | 19 + .../v2/components/primitives/popover.tsx | 45 ++ .../v2/components/primitives/separator.tsx | 32 ++ .../react/v2/components/primitives/sheet.tsx | 124 +++++ packages/react/v2/index.ts | 1 + 64 files changed, 1522 insertions(+), 1554 deletions(-) create mode 100644 packages/react/v2/components/primitives/button-group.tsx create mode 100644 packages/react/v2/components/primitives/button.tsx create mode 100644 packages/react/v2/components/primitives/combobox.tsx rename packages/react/{src/react => v2}/components/primitives/command.tsx (98%) create mode 100644 packages/react/v2/components/primitives/dialog.tsx create mode 100644 packages/react/v2/components/primitives/index.ts rename packages/react/{src/react => v2}/components/primitives/input-group.tsx (98%) create mode 100644 packages/react/v2/components/primitives/input.tsx rename packages/react/{src/react => v2}/components/primitives/label.tsx (92%) create mode 100644 packages/react/v2/components/primitives/link.tsx create mode 100644 packages/react/v2/components/primitives/popover.tsx create mode 100644 packages/react/v2/components/primitives/separator.tsx create mode 100644 packages/react/v2/components/primitives/sheet.tsx create mode 100644 packages/react/v2/index.ts diff --git a/examples/erp/genseki/auth/setup/setup.client.tsx b/examples/erp/genseki/auth/setup/setup.client.tsx index fb5b78aa..6b6b9a23 100644 --- a/examples/erp/genseki/auth/setup/setup.client.tsx +++ b/examples/erp/genseki/auth/setup/setup.client.tsx @@ -7,13 +7,13 @@ import { useRouter } from 'next/navigation' import z from 'zod' import { - AriaTextField, Form, FormControl, FormField, FormItem, FormMessage, SubmitButton, + TextField, toast, } from '@genseki/react' @@ -74,7 +74,7 @@ export function SetupClientForm() { render={({ field }) => ( - ( - ( - ( -
- setTheme(theme === 'dark' ? 'light' : 'dark')} > {theme === 'dark' ? 'Light' : 'Dark'} - +
@@ -466,10 +465,10 @@ export default function UIPlayground() { Spell Check - + @@ -675,86 +674,84 @@ export default function UIPlayground() { - - + + Confirm - - + - - Delete file - + + Delete file + This will permanently delete the selected file. Continue? - - - - + + + + Cancel - - + + Delete - - - - + + + + - - + + Turn on 2FA - - - - Nice! Let's beef up your account. - + + + + Nice! Let's beef up your account. + 2FA beefs up your account's defense. Pop in your password to keep going. - - + +
- - + - - - + + + Cancel - - + + + -
-
+ +
- - + + + + + Login + Enter your credentials to sign in. +
{}} className="w-[400px]"> - +
- -
Remember me - + Forgot password? - +
-
- - + + + Cancel - - + + + - -
+ +
- - + + + + + Email + We'll send you an email to log in. + + + - - + + + + + Popover Title + Lorem ipsum dolor sit amet + + Popover Body | Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos, temporibus. - - - + + + Close - - + + Confirm - - - - + + + +
@@ -1085,7 +1080,7 @@ export default function UIPlayground() {
{}} /> - - } size="xs" /> - - - } /> - } /> - - + } /> - - +
@@ -1169,14 +1164,14 @@ export default function UIPlayground() {
- -
- } trailingIcon={} size="md" > Primary - - +
- } @@ -1260,8 +1255,8 @@ export default function UIPlayground() { size="md" > Primary - - +
- } trailingIcon={} variant="primary" size="sm" > Primary - - +
- } trailingIcon={} variant="primary" size="xs" > Primary - - +
@@ -1443,77 +1438,77 @@ export default function UIPlayground() {
- + + + + + + +
- + + + + + + +
- + + + + + + +
@@ -1557,12 +1552,12 @@ export default function UIPlayground() {
- - 1d - 1w - 1m - 1y - + + 1d + 1w + 1m + 1y +
@@ -1839,15 +1834,15 @@ export default function UIPlayground() {
e.preventDefault()}> - - +