Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #7195 #7226

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion components/doc/inputmask/theming/tailwinddoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,31 @@ export function TailwindDoc(props) {
basic: `
const Tailwind = {
inputmask: {
root: 'font-sans text-base text-gray-700 dark:text-white/80 bg-white dark:bg-gray-900 py-3 px-3 border border-gray-300 dark:border-blue-900/40 hover:border-blue-500 focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)] transition duration-200 ease-in-out appearance-none rounded-md'
root: ({ props, context }) => ({
className: classNames(
'm-0',
'font-sans text-gray-600 dark:text-white/80 bg-white dark:bg-gray-900 border transition-colors duration-200 appearance-none rounded-lg',
{
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]':
!context.disabled,
'hover:border-blue-500': !props.invalid && !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled,
'border-gray-300 dark:border-blue-900/40': !props.invalid,
'border-red-500 hover:border-red-500/80 focus:border-red-500':
props.invalid && !context.disabled,
'border-red-500/50': props.invalid && context.disabled,
},
{
'text-lg px-4 py-4': props.size === 'large',
'text-xs px-2 py-2': props.size === 'small',
'p-3 text-base': !props.size || typeof props.size === 'number'
},
{
'pl-8': context.iconPosition === 'left',
'pr-8': props.iconPosition === 'right'
}
),
}),
}
}
`
Expand Down
26 changes: 18 additions & 8 deletions components/doc/inputtext/theming/tailwinddoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,28 @@ const Tailwind = {
root: ({ props, context }) => ({
className: classNames(
'm-0',
'font-sans text-gray-600 dark:text-white/80 bg-white dark:bg-gray-900 border border-gray-300 dark:border-blue-900/40 transition-colors duration-200 appearance-none rounded-lg',
'font-sans text-gray-600 dark:text-white/80 bg-white dark:bg-gray-900 border transition-colors duration-200 appearance-none rounded-lg',
{
'hover:border-blue-500 focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]': !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]':
!context.disabled,
'hover:border-blue-500': !props.invalid && !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled,
'border-gray-300 dark:border-blue-900/40': !props.invalid,
'border-red-500 hover:border-red-500/80 focus:border-red-500':
props.invalid && !context.disabled,
'border-red-500/50': props.invalid && context.disabled,
},
{
'text-lg px-4 py-4': props.size == 'large',
'text-xs px-2 py-2': props.size == 'small',
'p-3 text-base': props.size == null
'text-lg px-4 py-4': props.size === 'large',
'text-xs px-2 py-2': props.size === 'small',
'p-3 text-base': !props.size || typeof props.size === 'number'
},
{
'pl-8': context.iconPosition === 'left',
'pr-8': props.iconPosition === 'right'
}
)
})
),
}),
}
}
`
Expand Down
1 change: 1 addition & 0 deletions components/lib/inputmask/InputMask.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ export const InputMask = React.memo(
maxLength={props.maxLength}
tabIndex={props.tabIndex}
disabled={props.disabled}
invalid={props.invalid}
readOnly={props.readOnly}
onFocus={onFocus}
onBlur={onBlur}
Expand Down
40 changes: 33 additions & 7 deletions components/lib/passthrough/tailwind/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -790,14 +790,18 @@ const Tailwind = {
root: ({ props, context }) => ({
className: classNames(
'm-0',
'font-sans text-gray-600 dark:text-white/80 bg-white dark:bg-gray-900 border border-gray-300 dark:border-blue-900/40 transition-colors duration-200 appearance-none rounded-lg',
{
'hover:border-blue-500 focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]': !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled
'font-sans text-gray-600 dark:text-white/80 bg-white dark:bg-gray-900 border transition-colors duration-200 appearance-none rounded-lg',
{
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]': !context.disabled,
'hover:border-blue-500': !props.invalid && !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled,
'border-gray-300 dark:border-blue-900/40': !props.invalid,
'border-red-500 hover:border-red-500/80 focus:border-red-500': props.invalid && !context.disabled,
'border-red-500/50': props.invalid && context.disabled
},
{
'text-lg px-4 py-4': props.size == 'large',
'text-xs px-2 py-2': props.size == 'small',
'text-lg px-4 py-4': props.size === 'large',
'text-xs px-2 py-2': props.size === 'small',
'p-3 text-base': !props.size || typeof props.size === 'number'
},
{
Expand Down Expand Up @@ -923,7 +927,29 @@ const Tailwind = {
})
},
inputmask: {
root: 'font-sans text-base text-gray-700 dark:text-white/80 bg-white dark:bg-gray-900 py-3 px-3 border border-gray-300 dark:border-blue-900/40 hover:border-blue-500 focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)] transition duration-200 ease-in-out appearance-none rounded-md'
root: ({ props, context }) => ({
className: classNames(
'm-0',
'font-sans text-gray-600 dark:text-white/80 bg-white dark:bg-gray-900 border transition-colors duration-200 appearance-none rounded-lg',
{
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]': !context.disabled,
'hover:border-blue-500': !props.invalid && !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled,
'border-gray-300 dark:border-blue-900/40': !props.invalid,
'border-red-500 hover:border-red-500/80 focus:border-red-500': props.invalid && !context.disabled,
'border-red-500/50': props.invalid && context.disabled
},
{
'text-lg px-4 py-4': props.size === 'large',
'text-xs px-2 py-2': props.size === 'small',
'p-3 text-base': !props.size || typeof props.size === 'number'
},
{
'pl-8': context.iconPosition === 'left',
'pr-8': props.iconPosition === 'right'
}
)
})
},
inputotp: {
root: { className: 'flex items-center gap-2' },
Expand Down
Loading