diff --git a/.changeset/five-tables-smile.md b/.changeset/five-tables-smile.md new file mode 100644 index 00000000..e8687ae0 --- /dev/null +++ b/.changeset/five-tables-smile.md @@ -0,0 +1,6 @@ +--- +'@example/ui-playground': patch +'@genseki/react': patch +--- + +Revamp new design system and design token for Genseki. diff --git a/examples/erp/src/app/(admin)/admin/tiptap-style.css b/examples/erp/src/app/(admin)/admin/tiptap-style.css index d9db2492..dadb6917 100644 --- a/examples/erp/src/app/(admin)/admin/tiptap-style.css +++ b/examples/erp/src/app/(admin)/admin/tiptap-style.css @@ -278,7 +278,7 @@ } .tiptap-image-upload-subtext { - color: var(--color-text-trivial); + color: var(--color-text-secondary); } } } diff --git a/examples/ui-playground/src/app/playground/_components/card.tsx b/examples/ui-playground/src/app/playground/_components/card.tsx index 9808b718..2a8c6f41 100644 --- a/examples/ui-playground/src/app/playground/_components/card.tsx +++ b/examples/ui-playground/src/app/playground/_components/card.tsx @@ -18,7 +18,7 @@ export const PlaygroundCard = ({
- +
{categoryTitle} diff --git a/examples/ui-playground/src/app/playground/_components/wrapper.tsx b/examples/ui-playground/src/app/playground/_components/wrapper.tsx index 49dd1241..310e7703 100644 --- a/examples/ui-playground/src/app/playground/_components/wrapper.tsx +++ b/examples/ui-playground/src/app/playground/_components/wrapper.tsx @@ -3,7 +3,7 @@ import { Typography } from '@genseki/react' export const Wrapper = ({ children, title }: { children: React.ReactNode; title: string }) => { return (
- + {title} {children} diff --git a/examples/ui-playground/src/app/playground/page.tsx b/examples/ui-playground/src/app/playground/page.tsx index 59f2cf72..a2a8f38e 100644 --- a/examples/ui-playground/src/app/playground/page.tsx +++ b/examples/ui-playground/src/app/playground/page.tsx @@ -316,9 +316,10 @@ export default function UIPlayground() { return (
+
xxxx
-
+
- Background: --color-primary | Foreground: --color-primary-fg | border: - --color-primary-emphasis + Background: --color-primary | Foreground: --color-primary-fg | border: --color-primary
@@ -1093,13 +1093,22 @@ export default function UIPlayground() { isDisabled placeholder="Data" /> + } + suffix={} + size="xs" + /> } size="md" > - TESTER + Primary + + + + + + +
+ + +
+
- -
- - - - - - - -
-
@@ -1584,17 +1628,13 @@ export default function UIPlayground() { - - X - - - Z - + /> +
@@ -1690,7 +1730,7 @@ export default function UIPlayground() { Annotation - Annotation + Annotation diff --git a/examples/ui-playground/src/app/playground/tiptap-style.css b/examples/ui-playground/src/app/playground/tiptap-style.css index addfc9c0..f2e4201c 100644 --- a/examples/ui-playground/src/app/playground/tiptap-style.css +++ b/examples/ui-playground/src/app/playground/tiptap-style.css @@ -281,7 +281,7 @@ } .tiptap-image-upload-subtext { - color: var(--color-text-trivial); + color: var(--color-text-secondary); } } } diff --git a/packages/react/src/react/components/compound/auto-field/index.tsx b/packages/react/src/react/components/compound/auto-field/index.tsx index e813b095..de30d865 100644 --- a/packages/react/src/react/components/compound/auto-field/index.tsx +++ b/packages/react/src/react/components/compound/auto-field/index.tsx @@ -25,12 +25,14 @@ import { SelectOption, type SelectProps, SelectTrigger, + Separator, Switch, type SwitchProps, TextField, type TextFieldProps, TimeField, type TimeFieldProps, + Typography, useFormItemController, } from '@genseki/react' @@ -251,7 +253,7 @@ export function AutoSelectField(props: AutoSelectField) { > {props.label && ( )} @@ -609,14 +611,25 @@ export function AutoOneRelationshipField(props: AutoRelationshipFieldProps) { switch (fieldShape.type) { case 'connect': return ( -
-
{fieldShape.label}
- {connectComponent(`${props.name}.connect`, fieldShape.options)} +
+ {fieldShape.label && ( + <> + + {fieldShape.label} + + + + )} +
{connectComponent(`${props.name}.connect`, fieldShape.options)}
) case 'create': return ( -
+
{fieldShape.label}
{createComponent}
@@ -625,7 +638,7 @@ export function AutoOneRelationshipField(props: AutoRelationshipFieldProps) { return (
{connectComponent(`${props.name}.connect`, fieldShape.options)} -
+
{createComponent}
@@ -700,37 +713,57 @@ export function AutoManyRelationshipField(props: AutoManyRelationshipFieldProps) switch (fieldShape.type) { case 'connect': return ( -
- {fieldArray.fields.map((fieldValue, index) => ( -
-
- {fieldShape.label} #{index + 1} -
- {connectComponent(`${props.name}.${index}.connect`, fieldShape.options)} +
+ {!!fieldArray.fields.length && ( +
+ {fieldArray.fields.map((fieldValue, index) => ( +
+
+ {fieldShape.label} #{index + 1} +
+ {connectComponent(`${props.name}.${index}.connect`, fieldShape.options)} +
+ ))}
- ))} -
) case 'create': return ( -
- {fieldArray.fields.map((fieldValue, index) => ( -
-
- {fieldShape.label} #{index + 1} -
- {createComponent(`${props.name}.${index}.create`)} +
+ {!!fieldArray.fields.length && ( +
+ {fieldArray.fields.map((fieldValue, index) => ( +
+ + {fieldShape.label} #{index + 1} + +
+ {createComponent(`${props.name}.${index}.create`)} +
+
+ ))}
- ))} + )} @@ -739,7 +772,7 @@ export function AutoManyRelationshipField(props: AutoManyRelationshipFieldProps) case 'connectOrCreate': return ( -
+
{fieldArray.fields.map((fieldValue, index) => (
diff --git a/packages/react/src/react/components/compound/collection-card.tsx b/packages/react/src/react/components/compound/collection-card.tsx index 1797eff0..6b964879 100644 --- a/packages/react/src/react/components/compound/collection-card.tsx +++ b/packages/react/src/react/components/compound/collection-card.tsx @@ -31,7 +31,7 @@ export const CollectionCard = ({
- + {collectionName}
@@ -46,7 +46,7 @@ export const CollectionCard = ({ content={description} type="body" weight="normal" - className="text-text-trivial line-clamp-3" + className="text-text-secondary line-clamp-3" > {description} diff --git a/packages/react/src/react/components/compound/collection-sidebar/index.tsx b/packages/react/src/react/components/compound/collection-sidebar/index.tsx index 34b9d541..5acb3636 100644 --- a/packages/react/src/react/components/compound/collection-sidebar/index.tsx +++ b/packages/react/src/react/components/compound/collection-sidebar/index.tsx @@ -57,10 +57,10 @@ export function AppSidebar(props: AppSidebarProps) {
- + {props.title} - + {props.version}
@@ -72,7 +72,7 @@ export function AppSidebar(props: AppSidebarProps) { - Collections + Collections diff --git a/packages/react/src/react/components/compound/collection-sidebar/sections/navigations-section.tsx b/packages/react/src/react/components/compound/collection-sidebar/sections/navigations-section.tsx index eac369f1..1708f08a 100644 --- a/packages/react/src/react/components/compound/collection-sidebar/sections/navigations-section.tsx +++ b/packages/react/src/react/components/compound/collection-sidebar/sections/navigations-section.tsx @@ -19,7 +19,7 @@ export const NavigationSection = ({ id }: { id: number }) => { - Navigations + Navigations { - Plugins + Plugins diff --git a/packages/react/src/react/components/compound/editor/components/rich-text-editor.tsx b/packages/react/src/react/components/compound/editor/components/rich-text-editor.tsx index b7daae37..3fe101dd 100644 --- a/packages/react/src/react/components/compound/editor/components/rich-text-editor.tsx +++ b/packages/react/src/react/components/compound/editor/components/rich-text-editor.tsx @@ -24,7 +24,7 @@ export const RichTextEditor = (props: RichTextEditorProps) => {
{props.label && ( )} {
{props.label && ( )} {fileKey ? ( @@ -474,7 +474,7 @@ export const FileUploadField = (props: FileUploadFieldProps) => { {hintText} - {/* + {/* Maximum file size {readableMaxSize}. */}
diff --git a/packages/react/src/react/components/compound/reorder-group/index.tsx b/packages/react/src/react/components/compound/reorder-group/index.tsx index 0bd20cfc..74d431f4 100644 --- a/packages/react/src/react/components/compound/reorder-group/index.tsx +++ b/packages/react/src/react/components/compound/reorder-group/index.tsx @@ -100,7 +100,7 @@ const SortableItem = ({ id, children, title, order }: SortableItemProps) => {
@@ -111,10 +111,10 @@ const SortableItem = ({ id, children, title, order }: SortableItemProps) => { {...attributes} {...listeners} > - +
- + {order} {title}
diff --git a/packages/react/src/react/components/primitives/badge.tsx b/packages/react/src/react/components/primitives/badge.tsx index 5576a863..d8f44f40 100644 --- a/packages/react/src/react/components/primitives/badge.tsx +++ b/packages/react/src/react/components/primitives/badge.tsx @@ -1,11 +1,11 @@ import { tv, type VariantProps } from 'tailwind-variants' const badgeIntents = { - gray: 'bg-white border-gray-300 text-bluegray-600', - brand: 'bg-pumpkin-50 text-text-accent border-pumpkin-300', - blue: 'bg-ocean-50 text-ocean-500 border-ocean-300', - red: 'bg-red-50 text-red-500 border-red-300', - yellow: 'bg-yellow-50 text-yellow-500 border-yellow-300', + gray: 'bg-white border-gray-300 text-text-secondary', + brand: 'bg-pumpkin-50 text-text-brand border-pumpkin-300', + blue: 'bg-surface-info text-ocean-500 border-ocean-300', + red: 'bg-surface-incorrect text-red-500 border-red-300', + yellow: 'bg-surface-accent text-yellow-500 border-yellow-300', green: 'bg-palm-50 text-palm-500 border-palm-300', purple: 'bg-purple-50 text-purple-500 border-purple-300', cyan: 'bg-cyan-50 text-cyan-500 border-cyan-300', diff --git a/packages/react/src/react/components/primitives/base-icon.tsx b/packages/react/src/react/components/primitives/base-icon.tsx index e1226595..b2d7d39a 100644 --- a/packages/react/src/react/components/primitives/base-icon.tsx +++ b/packages/react/src/react/components/primitives/base-icon.tsx @@ -5,7 +5,7 @@ import { tv, type VariantProps } from 'tailwind-variants' import { cn } from '../../utils/cn' const iconVariants = tv({ - base: 'text-text-body', + base: 'text-icon-secondary', variants: { size: { xl: 'size-15', diff --git a/packages/react/src/react/components/primitives/button-group.tsx b/packages/react/src/react/components/primitives/button-group.tsx index a45b48fd..eb6e47b2 100644 --- a/packages/react/src/react/components/primitives/button-group.tsx +++ b/packages/react/src/react/components/primitives/button-group.tsx @@ -60,7 +60,7 @@ interface ButtonGroupItemProps extends ToggleButtonProps {} const ButtonGroupItemStyles = tv({ base: [ - 'bg-bluegray-100 cursor-pointer dark:bg-bluegray-700', + 'bg-surface-primary-hover cursor-pointer dark:bg-bluegray-700', 'text-bluegray-800 px-4 py-2 dark:text-bluegray-200', 'relative isolate inline-flex flex-row items-center font-medium outline-hidden', ], @@ -76,12 +76,12 @@ const ButtonGroupItemStyles = tv({ }, size: { sm: [ - 'text-base', + 'text-sm', '*:data-[slot=icon]:size-4.5 sm:*:data-[slot=icon]:size-4', '*:data-[slot=loader]:size-4.5 sm:*:data-[slot=loader]:size-4', ], md: [ - 'text-lg', + 'text-base', '*:data-[slot=icon]:size-5 sm:*:data-[slot=icon]:size-4', '*:data-[slot=loader]:size-5 sm:*:data-[slot=loader]:size-4', ], diff --git a/packages/react/src/react/components/primitives/button.tsx b/packages/react/src/react/components/primitives/button.tsx index a20798a8..288cb0e4 100644 --- a/packages/react/src/react/components/primitives/button.tsx +++ b/packages/react/src/react/components/primitives/button.tsx @@ -7,7 +7,7 @@ import { Link, } from 'react-aria-components' -import { Spinner } from '@phosphor-icons/react' +import { Spinner, SpinnerIcon } from '@phosphor-icons/react' import { tv, type VariantProps } from 'tailwind-variants' import { BaseIcon } from './base-icon' @@ -18,35 +18,35 @@ const buttonVariants = tv({ base: 'cursor-pointer flex items-center justify-center transition-all duration-200', variants: { variant: { - primary: `[&>*]:text-white text-white - shadow-[0_0_0_0.8px_var(--color-primary-emphasis),0_1px_3px_0_var(--color-primary),inset_0_1.5px_0_0_--alpha(var(--color-white)/20%)] - focus-visible:ring-2 focus-visible:ring-primary-emphasis focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none`, + primary: `[&>*]:text-text-inverse text-text-inverse + focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none`, secondary: ` - bg-pumpkin-50 hover:bg-pumpkin-100 - [&>*]:text-accent text-accent - focus-visible:ring-2 focus-visible:ring-primary-emphasis focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none`, - tertiary: `bg-pumpkin-50 hover:bg-pumpkin-100 - [&>*]:text-accent text-accent - focus-visible:ring-2 focus-visible:ring-primary-emphasis focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none border border-primary-emphasis`, - naked: `bg-white-normal hover:bg-bluegray-100 [&>*]:text-bluegray-600 text-bluegray-600 shadow-xs border-b border-stroke-trivial/10 - focus-visible:ring-2 focus-visible:ring-primary-emphasis focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none`, - outline: `bg-white-normal dark:bg-bluegray-800 hover:bg-bluegray-50 [&>*]:text-text-body text-text-body border border-bluegray-300 focus-visible:ring-2 focus-visible:ring-primary-emphasis focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none`, + bg-surface-button-secondary hover:bg-surface-button-secondary-hover disabled:bg-surface-button-secondary-disabled + [&>*]:text-text-brand text-text-brand + focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none`, + tertiary: `bg-surface-button-tertiary hover:bg-surface-button-tertiary-hover disabled:bg-surface-button-tertiary-disabled focus:outline-none + [&>*]:text-text-brand text-text-brand + focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg border border-border-button-tertiary`, + naked: `bg-surface-button-naked hover:bg-surface-button-naked-hover disabled:bg-surface-button-naked-disabled focus:outline-none + [&>*]:text-text-secondary text-text-secondary shadow-xs border-b border-stroke-tertiary/10 + focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg`, + outline: `bg-surface-button-outline hover:bg-surface-button-outline-hover disabled:bg-surface-button-outline-disabled focus:outline-none + [&>*]:text-text-secondary text-text-secondary border border-border-button-outline focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg`, ghost: - 'bg-none [&>*]:text-bluegray-600 text-bluegray-600 hover:bg-bluegray-50 focus-visible:ring-2 focus-visible:ring-primary-emphasis focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none', + 'bg-none [&>*]:text-text-secondary text-text-secondary focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none', vanish: - '[&>*]:text-secondary-fg text-secondary-fg focus-visible:ring-2 focus-visible:ring-primary-emphasis focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none', - destruction: `[&>*]:text-white text-white bg-red-600 hover:bg-red-700 - focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none`, + '[&>*]:text-secondary-fg text-secondary-fg focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none', + destruction: `[&>*]:text-text-inverse text-text-inverse bg-surface-button-destruction hover:bg-surface-button-destruction-hover disabled:bg-surface-button-destruction-disabled focus:outline-none + focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 focus-visible:ring-offset-bg `, }, size: { 'square-petite': 'size-14 p-0 rounded-md text-base font-medium', - md: 'p-6 gap-x-2 rounded-md text-base font-medium', - sm: 'p-4 gap-x-2 rounded-md text-sm font-medium', - xs: 'p-2 gap-x-1 rounded-sm text-sm font-medium', - xxs: 'p-1 gap-x-1 rounded-xs text-xs font-medium', + md: 'py-4 [&:has(>_*[data-slot="icon"]:only-child)]:p-4 px-6 gap-x-2 rounded-md text-base font-medium', + sm: 'py-3 [&:has(>_*[data-slot="icon"]:only-child)]:p-3 px-4 gap-x-2 rounded-md text-sm font-medium', + xs: 'py-1 [&:has(>_*[data-slot="icon"]:only-child)]:p-1 px-2 gap-x-1 rounded-sm text-sm font-medium', }, isDisabled: { - true: 'cursor-not-allowed bg-accent-fg [&>*]:text-bluegray-300 text-bluegray-300 border-secondary shadow-none', + true: 'cursor-not-allowed [&>*]:text-bluegray-300 text-bluegray-300 border-secondary shadow-none', false: null, }, }, @@ -90,6 +90,7 @@ const Button = React.forwardRef( return ( ( {props.leadingIcon} {typeof props.children === 'function' ? props.children(values) : props.children} {isPending ? ( - + ) : ( props.trailingIcon )} diff --git a/packages/react/src/react/components/primitives/card.tsx b/packages/react/src/react/components/primitives/card.tsx index 8d78f93a..e847c026 100644 --- a/packages/react/src/react/components/primitives/card.tsx +++ b/packages/react/src/react/components/primitives/card.tsx @@ -25,7 +25,7 @@ const Card: React.FC = ({ title, itemNumber, description, buttonTitle {/* Header */}
@@ -36,22 +36,22 @@ const Card: React.FC = ({ title, itemNumber, description, buttonTitle

{title}

{itemNumber && (
- - {itemNumber} items + + {itemNumber} items
)}
-

{description}

+

{description}

) diff --git a/packages/react/src/react/components/primitives/checkbox.tsx b/packages/react/src/react/components/primitives/checkbox.tsx index 6bcbab74..45ce8bb0 100644 --- a/packages/react/src/react/components/primitives/checkbox.tsx +++ b/packages/react/src/react/components/primitives/checkbox.tsx @@ -94,12 +94,12 @@ const Checkbox = forwardRef(function Checkbox( const sizeClasses = { md: { box: 'size-8', - label: 'text-base font-medium', + label: 'text-base font-medium leading-[100%]', description: 'text-base', }, lg: { - box: 'size-10', - label: 'text-lg font-medium', + box: 'size-12', + label: 'text-lg font-medium leading-[100%]', description: 'text-lg', }, } @@ -139,7 +139,7 @@ const Checkbox = forwardRef(function Checkbox( {props.label ? ( ) : ( (props.children as React.ReactNode) diff --git a/packages/react/src/react/components/primitives/color-field.tsx b/packages/react/src/react/components/primitives/color-field.tsx index 2e0be01d..4d18405f 100644 --- a/packages/react/src/react/components/primitives/color-field.tsx +++ b/packages/react/src/react/components/primitives/color-field.tsx @@ -62,7 +62,7 @@ const ColorField = forwardRef( data-slot="prefix" type="caption" weight="medium" - className="ml-2 text-text-trivial" + className="ml-2 text-text-secondary" > {prefix} @@ -90,7 +90,7 @@ const ColorField = forwardRef( data-slot="suffix" type="caption" weight="medium" - className="text-text-trivial mr-2" + className="text-text-secondary mr-2" > {suffix} diff --git a/packages/react/src/react/components/primitives/date-field.tsx b/packages/react/src/react/components/primitives/date-field.tsx index fb7fcf6c..9bf172c9 100644 --- a/packages/react/src/react/components/primitives/date-field.tsx +++ b/packages/react/src/react/components/primitives/date-field.tsx @@ -57,7 +57,7 @@ const DateField = ({ > {label && ( )} diff --git a/packages/react/src/react/components/primitives/date-picker.tsx b/packages/react/src/react/components/primitives/date-picker.tsx index d1c99387..4c44f227 100644 --- a/packages/react/src/react/components/primitives/date-picker.tsx +++ b/packages/react/src/react/components/primitives/date-picker.tsx @@ -102,7 +102,7 @@ const DatePicker = ({ > {label && ( )} diff --git a/packages/react/src/react/components/primitives/dropdown.tsx b/packages/react/src/react/components/primitives/dropdown.tsx index ca0cf130..c78a727e 100644 --- a/packages/react/src/react/components/primitives/dropdown.tsx +++ b/packages/react/src/react/components/primitives/dropdown.tsx @@ -139,7 +139,7 @@ const DropdownItemDetails = forwardRef(function DropdownItemDetails( {description && ( {description} diff --git a/packages/react/src/react/components/primitives/field.tsx b/packages/react/src/react/components/primitives/field.tsx index 5a24b217..5ce12f5f 100644 --- a/packages/react/src/react/components/primitives/field.tsx +++ b/packages/react/src/react/components/primitives/field.tsx @@ -141,7 +141,7 @@ const Input = forwardRef(function Input( {...props} className={composeTailwindRenderProps( className, - 'text-fg placeholder-text-body outline-hidden focus:outline-hidden w-full min-w-0 bg-transparent p-4 text-base [&::-ms-reveal]:hidden [&::-webkit-search-cancel-button]:hidden' + 'text-text-primary placeholder-text-primary outline-hidden focus:outline-hidden w-full min-w-0 bg-transparent p-4 text-base [&::-ms-reveal]:hidden [&::-webkit-search-cancel-button]:hidden' )} /> ) diff --git a/packages/react/src/react/components/primitives/form.tsx b/packages/react/src/react/components/primitives/form.tsx index cee2ca65..e4c0d28c 100644 --- a/packages/react/src/react/components/primitives/form.tsx +++ b/packages/react/src/react/components/primitives/form.tsx @@ -96,7 +96,7 @@ const FormItem = React.forwardRef { return ( -
+
) } @@ -148,7 +148,7 @@ const FormDescription = React.forwardRef< ref={ref} id={formDescriptionId} className={cn( - 'text-body-s font-regular text-input-text-helper peer-disabled:text-input-text-disabled', + 'text-primary-s font-regular text-input-text-helper peer-disabled:text-input-text-disabled', className )} {...props} @@ -194,7 +194,7 @@ export const FormRootMessage = React.forwardRef<

) diff --git a/packages/react/src/react/components/primitives/loader.tsx b/packages/react/src/react/components/primitives/loader.tsx index b7586e25..ca19208a 100644 --- a/packages/react/src/react/components/primitives/loader.tsx +++ b/packages/react/src/react/components/primitives/loader.tsx @@ -14,22 +14,22 @@ const loaderStyles = tv({ variants: { intent: { current: 'text-current', - primary: 'text-primary', - secondary: 'text-muted-fg', - success: 'text-success', - warning: 'text-warning', - danger: 'text-danger', + primary: 'text-text-brand', + secondary: 'text-text-secondary', + success: 'text-text-correct', + warning: 'text-text-accent', + danger: 'text-text-incorrect', }, size: { - small: 'size-4', - medium: 'size-6', - large: 'size-8', - 'extra-large': 'size-10', + small: 'size-6', + medium: 'size-8', + large: 'size-10', + 'extra-large': 'size-12', }, }, defaultVariants: { intent: 'current', - size: 'small', + size: 'medium', }, }) diff --git a/packages/react/src/react/components/primitives/modal.tsx b/packages/react/src/react/components/primitives/modal.tsx index f9633512..cb857de5 100644 --- a/packages/react/src/react/components/primitives/modal.tsx +++ b/packages/react/src/react/components/primitives/modal.tsx @@ -184,7 +184,7 @@ const ModalTitle = forwardRef( const ModalDescription = forwardRef( function ModalDescription(props, ref) { - return + return } ) diff --git a/packages/react/src/react/components/primitives/multiple-select.tsx b/packages/react/src/react/components/primitives/multiple-select.tsx index 1c8292c7..fdeba2a3 100644 --- a/packages/react/src/react/components/primitives/multiple-select.tsx +++ b/packages/react/src/react/components/primitives/multiple-select.tsx @@ -129,7 +129,7 @@ const MultipleSelect = ({ <> {props.label && ( )} {label && ( )} { 'flex gap-2.5 size-20 transition-colors text-lg shrink-0 items-center justify-center bg-white dark:bg-bluegray-800', currentPage === 1 ? 'cursor-not-allowed text-bluegray-300' - : 'cursor-pointer text-text-body ' + : 'cursor-pointer text-text-primary ' )} onClick={() => onPageChange(currentPage - 1)} disabled={currentPage === 1} @@ -55,9 +55,11 @@ const Pagination = (props: PaginationProps) => { return (

- ... + + ... +
) } @@ -65,7 +67,7 @@ const Pagination = (props: PaginationProps) => { ) })} @@ -86,7 +90,7 @@ const Pagination = (props: PaginationProps) => { 'flex gap-2.5 size-20 transition-colors cursor-pointer text-lg shrink-0 items-center justify-center bg-white dark:bg-bluegray-800', currentPage === totalPages ? 'cursor-not-allowed text-bluegray-300' - : 'cursor-pointer text-text-body' + : 'cursor-pointer text-text-primary' )} onClick={() => onPageChange(currentPage + 1)} disabled={currentPage === totalPages} diff --git a/packages/react/src/react/components/primitives/radio-group.tsx b/packages/react/src/react/components/primitives/radio-group.tsx index 571a6456..89be6ac9 100644 --- a/packages/react/src/react/components/primitives/radio-group.tsx +++ b/packages/react/src/react/components/primitives/radio-group.tsx @@ -97,7 +97,7 @@ const Radio = ({ className, children, description, label, size = 'md', ...props data-slot="indicator" className={twMerge([ `relative inset-bluegray-300 isolate flex ${sizeClasses[size].indicator} shrink-0 items-center justify-center rounded-full bg-secondary text-bg transition before:absolute before:inset-auto before:shrink-0 before:rounded-full before:content-['']`, - `focus-visible:ring-2 focus-visible:ring-primary-emphasis focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none border border-bluegray-400`, + `focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg focus:outline-none border border-bluegray-400`, isSelected && [ 'bg-primary text-primary-fg before:bg-white', 'group-invalid:inset-ring-danger/70 group-invalid:bg-danger group-invalid:text-danger-fg', diff --git a/packages/react/src/react/components/primitives/select.tsx b/packages/react/src/react/components/primitives/select.tsx index f2c6694b..6000257c 100644 --- a/packages/react/src/react/components/primitives/select.tsx +++ b/packages/react/src/react/components/primitives/select.tsx @@ -34,13 +34,13 @@ import { cn } from '../../utils/cn' const selectTriggerStyles = tv({ extend: focusStyles, base: [ - 'btr flex w-full cursor-default items-center gap-12 gap-x-2 rounded-md border border-input px-6 py-5 text-start shadow-sm transition group-disabled:opacity-50 **:data-[slot=icon]:size-8 h-20 dark:shadow-none', + 'bg-bg btr flex w-full cursor-default items-center gap-12 gap-x-2 rounded-md border border-input px-6 py-5 text-start shadow-sm transition group-disabled:opacity-50 **:data-[slot=icon]:size-8 h-20 dark:shadow-none', 'group-data-open:border-ring/70 group-data-open:ring-4 group-data-open:ring-ring/20', 'text-fg group-invalid:border-danger group-invalid:ring-danger/20 forced-colors:group-invalid:border-[Mark]', ], variants: { isDisabled: { - true: 'opacity-80 bg-bluegray-100 forced-colors:border-[GrayText] forced-colors:text-[GrayText]', + true: 'opacity-80 bg-surface-primary-hover forced-colors:border-[GrayText] forced-colors:text-[GrayText]', }, }, }) @@ -69,7 +69,7 @@ const Select = ({ <> {label && ( )} {typeof props.children === 'function' ? props.children(values) : props.children} diff --git a/packages/react/src/react/components/primitives/sidebar.tsx b/packages/react/src/react/components/primitives/sidebar.tsx index 076a9891..a2b2713f 100644 --- a/packages/react/src/react/components/primitives/sidebar.tsx +++ b/packages/react/src/react/components/primitives/sidebar.tsx @@ -422,7 +422,7 @@ const sidebarItemStyles = tv({ true: 'flex not-has-data-[slot=icon]:hidden size-9 items-center justify-center gap-x-0 p-0 **:data-[slot=menu-trigger]:hidden', }, isCurrent: { - true: 'bg-primary/10 text-text-accent pointer-events-none hover:bg-(--sidebar-accent)/90 hover:text-fg **:data-[slot=menu-trigger]:from-(--sidebar-accent) **:data-[slot=icon]:text-fg [&_.text-muted-fg]:text-fg/80', + true: 'bg-primary/10 text-text-brand pointer-events-none hover:bg-(--sidebar-accent)/90 hover:text-fg **:data-[slot=menu-trigger]:from-(--sidebar-accent) **:data-[slot=icon]:text-fg [&_.text-muted-fg]:text-fg/80', }, isActive: { true: 'bg-[--alpha(var(--sidebar-accent)/20%)] text-sidebar-fg **:data-[slot=menu-trigger]:flex', diff --git a/packages/react/src/react/components/primitives/tab.tsx b/packages/react/src/react/components/primitives/tab.tsx index 86339a64..da601182 100644 --- a/packages/react/src/react/components/primitives/tab.tsx +++ b/packages/react/src/react/components/primitives/tab.tsx @@ -86,16 +86,16 @@ const TabList = ({ className, ref, ...props }: TabListProps const tabStyles = tv({ base: [ - 'relative flex cursor-pointer items-center whitespace-nowrap rounded-full font-semibold outline-hidden transition *:data-[slot=icon]:mr-2 *:data-[slot=icon]:size-4 focus-visible:text-text-accent', + 'relative flex cursor-pointer items-center whitespace-nowrap rounded-full font-semibold outline-hidden transition *:data-[slot=icon]:mr-2 *:data-[slot=icon]:size-4 focus-visible:text-text-brand', 'group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:py-0 group-data-[orientation=vertical]/tabs:pr-2 group-data-[orientation=vertical]/tabs:pl-4', 'group-data-[orientation=horizontal]/tabs:pb-6', ], variants: { isSelected: { - false: 'text-text-body', - true: 'text-text-accent', + false: 'text-text-primary', + true: 'text-text-brand', }, - isFocused: { false: 'ring-0', true: 'text-text-accent' }, + isFocused: { false: 'ring-0', true: 'text-text-brand' }, isDisabled: { true: 'text-muted-fg/50', }, diff --git a/packages/react/src/react/components/primitives/table.tsx b/packages/react/src/react/components/primitives/table.tsx index 7f1ca13c..9d7e8ced 100644 --- a/packages/react/src/react/components/primitives/table.tsx +++ b/packages/react/src/react/components/primitives/table.tsx @@ -37,7 +37,11 @@ const TableBody = React.forwardRef< HTMLTableSectionElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( - + )) TableBody.displayName = 'TableBody' @@ -45,7 +49,11 @@ const TableFooter = React.forwardRef< HTMLTableSectionElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( - + )) TableFooter.displayName = 'TableFooter' @@ -89,7 +97,7 @@ const TableCell = React.forwardRef< {label && ( )}