diff --git a/categories/web/blob/react/src/components/FileSelectBox/index.tsx b/categories/web/blob/react/src/components/FileSelectBox/index.tsx index bce0f53..fb41ad7 100644 --- a/categories/web/blob/react/src/components/FileSelectBox/index.tsx +++ b/categories/web/blob/react/src/components/FileSelectBox/index.tsx @@ -430,7 +430,7 @@ export const FileSelectBox = React.forwardRef
0, }, )} @@ -456,7 +459,7 @@ export const FileSelectBox = React.forwardRef( id={labelId} htmlFor={id} className={tw( - 'absolute z-[1] w-full top-0.5 left-0 pointer-events-none pl-1 text-xxs font-bold group-focus-within:text-secondary text-primary leading-none bg-negative select-none', + 'absolute z-[1] w-full top-0.5 left-0 pointer-events-none pl-1 text-xxs font-bold group-focus-within:text-secondary text-primary leading-none select-none', { 'sr-only': hiddenLabel, }, @@ -159,7 +159,7 @@ export const ComboBox = React.forwardRef( list={datalistId} data-testid="input" className={tw( - 'bg-negative rounded-inherit w-full peer block font-inherit', + 'rounded-inherit w-full peer block font-inherit bg-transparent box-border', 'focus:outline-0', 'disabled:opacity-50 disabled:cursor-not-allowed', { @@ -193,7 +193,7 @@ export const ComboBox = React.forwardRef(
{ +export const dropdownSelectPlugin: tailwind.PluginCreator = ({ addComponents }) => { addComponents({ '.dropdown-select': { '& optgroup': { diff --git a/categories/web/choice/react/src/components/MenuSelect/index.tsx b/categories/web/choice/react/src/components/MenuSelect/index.tsx index bec6350..357991f 100644 --- a/categories/web/choice/react/src/components/MenuSelect/index.tsx +++ b/categories/web/choice/react/src/components/MenuSelect/index.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import { TextControl, tailwind } from '@tesseract-design/web-base'; import { useFallbackId } from '@modal-sh/react-utils'; -import { PluginCreator } from 'tailwindcss/types/config'; const { tw } = tailwind; @@ -54,11 +53,39 @@ export interface MenuSelectProps extends Omit { +export const menuSelectPlugin: tailwind.PluginCreator = ({ addComponents }) => { addComponents({ '.menu-select': { + '&[data-variant="alternate"][data-size="small"]': { + '--td-padding-top': '1.25rem', + }, + '&[data-variant="alternate"][data-size="medium"]': { + '--td-padding-top': '1.5rem', + }, + '&[data-variant="alternate"][data-size="large"]': { + '--td-padding-top': '2rem', + }, + '&[data-variant="default"][data-size="small"]': { + '--td-padding-top': '0.625rem', + '--td-padding-bottom': '0.625rem', + }, + '&[data-variant="default"][data-size="medium"]': { + '--td-padding-top': '0.75rem', + '--td-padding-bottom': '0.75rem', + }, + '&[data-variant="default"][data-size="large"]': { + '--td-padding-top': '1.25rem', + '--td-padding-bottom': '1.25rem', + }, + 'clip-path': 'inset(var(--td-padding-top, 0) 0 var(--td-padding-bottom, 0) 0)', + 'padding-top': 'var(--td-padding-top, 0)', + 'padding-bottom': 'var(--td-padding-bottom, 0)', '& optgroup': { 'color': 'rgb(var(--color-positive) / 50%)', 'text-transform': 'uppercase', @@ -87,13 +114,14 @@ export const MenuSelect = React.forwardRef - {label && ( - <> - - {' '} - - )} - - {hint && ( -
-
- {hint} -
-
- )} - {indicator && ( -
- {indicator} -
- )} - {border && ( - - )} +
+ {label && ( + <> + + {' '} + + )} + + {hint && ( +
+
+ {hint} +
+
+ )} + {indicator && ( +
+ {indicator} +
+ )} + {border && ( + + )} +
); }); @@ -262,4 +288,5 @@ MenuSelect.defaultProps = { variant: 'default' as const, hiddenLabel: false as const, startingHeight: '15rem' as const, + resizable: false as const, }; diff --git a/categories/web/choice/react/src/components/RadioButton/index.tsx b/categories/web/choice/react/src/components/RadioButton/index.tsx index c574bbf..450e7c6 100644 --- a/categories/web/choice/react/src/components/RadioButton/index.tsx +++ b/categories/web/choice/react/src/components/RadioButton/index.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import { Button, tailwind } from '@tesseract-design/web-base'; import { useFallbackId } from '@modal-sh/react-utils'; -import { PluginCreator } from 'tailwindcss/types/config'; const { tw } = tailwind; @@ -44,7 +43,7 @@ export interface RadioButtonProps extends Omit { +export const radioButtonPlugin: tailwind.PluginCreator = ({ addComponents }) => { addComponents({ '.radio-button': { '& + label > :first-child > :first-child': {