Skip to content

Commit

Permalink
remove '-color' from primary and highlight colors in use [fixed #245]
Browse files Browse the repository at this point in the history
  • Loading branch information
atakantepe committed May 8, 2024
1 parent d6ea3a7 commit d970b7a
Show file tree
Hide file tree
Showing 29 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "primevue-tailwind",
"version": "0.9.0",
"version": "0.9.1",
"homepage": "https://tailwind.primevue.org/",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion presets/aura/autocomplete/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default {

// States
'focus:outline-none focus:outline-offset-0 focus:ring-1 ',
'hover:bg-primary-hover hover:border-hover-color',
'hover:bg-primary-hover hover:border-primary-hover',
'focus:ring-primary-500 dark:focus:ring-primary-400'
]
}
Expand Down
8 changes: 4 additions & 4 deletions presets/aura/datatable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default {
'duration-200',

// States
'hover:border-primary-color',
'hover:border-primary',
{ 'outline-none outline-offset-0 ring-1 ring-primary-500 dark:ring-primary-400': state.focused },

// Misc
Expand Down Expand Up @@ -291,7 +291,7 @@ export default {
// Color
{ 'text-surface-700 dark:text-white/80': !context?.highlighted },
{ 'bg-surface-0 dark:bg-surface-900 text-surface-700 dark:text-white/80': !context?.highlighted },
{ 'bg-primary-highlight text-primary-hihlight-inverse-color': context?.highlighted },
{ 'bg-primary-highlight text-primary-hihlight-inverse': context?.highlighted },

//States
{ 'hover:bg-surface-100 dark:hover:bg-[rgba(255,255,255,0.03)]': !context?.highlighted },
Expand Down Expand Up @@ -596,7 +596,7 @@ export default {
'rounded-full',

// Color
{ 'bg-primary-highlight text-primary-highliht-inverse-color': context.active },
{ 'bg-primary-highlight text-primary-highliht-inverse': context.active },
'dark:text-white/70 dark:hover:text-white/80 dark:bg-surface-900',

// States
Expand Down Expand Up @@ -820,7 +820,7 @@ export default {
},
{
'peer-hover:border-surface-400 dark:peer-hover:border-surface-400': !props.disabled && !props.invalid && props.value !== props.modelValue,
'peer-hover:border-primary-hover-color': !props.disabled && props.value == props.modelValue && props.value !== undefined,
'peer-hover:border-primary-hover': !props.disabled && props.value == props.modelValue && props.value !== undefined,
'peer-hover:[&>*:first-child]:bg-primary-600 dark:peer-hover:[&>*:first-child]:bg-primary-300': !props.disabled && props.value == props.modelValue && props.value !== undefined,
'peer-focus-visible:ring-1 peer-focus-visible:ring-primary-500 dark:peer-focus-visible:ring-primary-400': !props.disabled,
'bg-surface-200 [&>*:first-child]:bg-surface-600 dark:bg-surface-700 dark:[&>*:first-child]:bg-surface-400 border-surface-300 dark:border-surface-700 select-none pointer-events-none cursor-default': props.disabled
Expand Down
2 changes: 1 addition & 1 deletion presets/aura/inputnumber/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default {
{ 'border-red-500 dark:border-red-400': parent.props.invalid },

// States
{ 'hover:border-primary-color': !parent.props.invalid },
{ 'hover:border-primary': !parent.props.invalid },
'focus:outline-none focus:outline-offset-0 focus:ring-1 focus:ring-primary-500 dark:focus:ring-primary-400 focus:z-10',
{ 'bg-surface-200 dark:bg-surface-700 select-none pointer-events-none cursor-default': context.disabled },

Expand Down
2 changes: 1 addition & 1 deletion presets/aura/megamenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default {
{
'text-surface-500 dark:text-white/70': !context.focused && !context.active,
'text-surface-500 dark:text-white/70 bg-surface-200': context.focused && !context.active,
'text-primary-highlight-inverse bg-primary-hightlight-color': context.active
'text-primary-highlight-inverse bg-primary-hightlight': context.active
},

// Hover States
Expand Down
2 changes: 1 addition & 1 deletion presets/aura/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
{
'text-surface-500 dark:text-white/70': !context.focused && !context.active,
'text-surface-500 dark:text-white/70 bg-surface-200': context.focused && !context.active,
'text-primary-highlight-inverse bg-primary-hightlight-color': context.active
'text-primary-highlight-inverse bg-primary-hightlight': context.active
},

// Transitions
Expand Down
2 changes: 1 addition & 1 deletion presets/aura/menubar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
{
'text-surface-500 dark:text-white/70': !context.focused && !context.active,
'text-surface-500 dark:text-white/70 bg-surface-200': context.focused && !context.active,
'text-primary-highlight-inverse bg-primary-hightlight-color': context.active
'text-primary-highlight-inverse bg-primary-hightlight': context.active
},

// States
Expand Down
2 changes: 1 addition & 1 deletion presets/aura/radiobutton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
// States
{
'peer-hover:border-surface-400 dark:peer-hover:border-surface-400': !props.disabled && !props.invalid && props.value !== props.modelValue,
'peer-hover:border-primary-hover-color': !props.disabled && props.value == props.modelValue && props.value !== undefined,
'peer-hover:border-primary-hover': !props.disabled && props.value == props.modelValue && props.value !== undefined,
'peer-hover:[&>*:first-child]:bg-primary-600 dark:peer-hover:[&>*:first-child]:bg-primary-300': !props.disabled && props.value == props.modelValue && props.value !== undefined,
'peer-focus-visible:ring-1 peer-focus-visible:ring-primary-500 dark:peer-focus-visible:ring-primary-400': !props.disabled,
'bg-surface-200 [&>*:first-child]:bg-surface-600 dark:bg-surface-700 dark:[&>*:first-child]:bg-surface-400 border-surface-300 dark:border-surface-700 select-none pointer-events-none cursor-default': props.disabled
Expand Down
2 changes: 1 addition & 1 deletion presets/aura/tieredmenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
{
'text-surface-500 dark:text-white/70': !context.focused && !context.active,
'text-surface-500 dark:text-white/70 bg-surface-200': context.focused && !context.active,
'text-primary-highlight-inverse bg-primary-hightlight-color': context.active
'text-primary-highlight-inverse bg-primary-hightlight': context.active
},

// Transitions
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/autocomplete/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
{ 'border-red-500 dark:border-red-400': props.invalid },

// States
{ 'hover:border-primary-color': !props.invalid },
{ 'hover:border-primary': !props.invalid },
'focus:outline-none focus:outline-offset-0',
{ 'ring ring-primary-400/50 dark:ring-primary-300/50': state.focused },
{ 'ring ring-primary-400/50 dark:ring-primary-300/50': state.hovered },
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/cascadeselect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
'duration-200',

// States
{ 'hover:border-primary-color': !props.invalid },
{ 'hover:border-primary': !props.invalid },
{ 'outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50': state.focused },

// Misc
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/checkbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default {

// States
{
'peer-hover:border-primary-color': !props.disabled && !context.checked && !props.invalid,
'peer-hover:border-primary': !props.disabled && !context.checked && !props.invalid,
'peer-hover:bg-primary-hover peer-hover:border-primary-hover': !props.disabled && context.checked,
'peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20': !props.disabled,
'cursor-default opacity-60': props.disabled
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/chips/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
{ 'border-red-500 dark:border-red-400': props.invalid },

// States
{ 'hover:border-primary-color': !props.invalid },
{ 'hover:border-primary': !props.invalid },
'focus:outline-none focus:outline-offset-0',
{ 'ring ring-primary-400/50 dark:ring-primary-300/50': state.focused },
{ 'ring ring-primary-400/50 dark:ring-primary-300/50': state.hovered },
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/colorpicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
'border border-surface-300 dark:border-surface-700',

// States
'hover:border-primary-color',
'hover:border-primary',
'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50',

// Transition
Expand Down
12 changes: 6 additions & 6 deletions presets/lara/datatable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export default {
'duration-200',

// States
'hover:border-primary-color',
'hover:border-primary',
{ 'outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50': state.focused },

// Misc
Expand Down Expand Up @@ -339,7 +339,7 @@ export default {
'duration-200',

// States
'hover:border-primary-color',
'hover:border-primary',
{ 'outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50': state.focused },

// Misc
Expand Down Expand Up @@ -610,7 +610,7 @@ export default {
'rounded-full',

// Color
{ 'bg-primary-highlight text-highlight-inverse-color': context.active },
{ 'bg-primary-highlight text-highlight-inverse': context.active },
'dark:text-white/70 dark:hover:text-white/80 dark:bg-surface-800',

// States
Expand Down Expand Up @@ -835,7 +835,7 @@ export default {

// States
{
'peer-hover:border-primary-color': !props.disabled,
'peer-hover:border-primary': !props.disabled,
'peer-hover:border-primary-hover peer-hover:bg-primary-hover': !props.disabled && props.modelValue,
'peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20': !props.disabled,
'opacity-60 cursor-default': props.disabled
Expand Down Expand Up @@ -935,7 +935,7 @@ export default {

// States
{
'peer-hover:border-primary-color': !props.disabled && !context.checked,
'peer-hover:border-primary': !props.disabled && !context.checked,
'peer-hover:bg-primary-hover peer-hover:border-primary-hover': !props.disabled && context.checked,
'peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20': !props.disabled,
'cursor-default opacity-60': props.disabled
Expand Down Expand Up @@ -1033,7 +1033,7 @@ export default {

// States
{
'peer-hover:border-primary-color': !props.disabled && !context.checked,
'peer-hover:border-primary': !props.disabled && !context.checked,
'peer-hover:bg-primary-hover peer-hover:border-primary-hover': !props.disabled && context.checked,
'peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20': !props.disabled,
'cursor-default opacity-60': props.disabled
Expand Down
4 changes: 2 additions & 2 deletions presets/lara/dropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
'duration-200',

// States
{ 'hover:border-primary-color': !props.invalid },
{ 'hover:border-primary': !props.invalid },
{ 'outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50': state.focused },

// Misc
Expand Down Expand Up @@ -241,7 +241,7 @@ export default {
'duration-200',

// States
'hover:border-primary-color',
'hover:border-primary',
'focus:ring focus:outline-none focus:outline-offset-0',
'focus:ring-primary-400/50 dark:focus:ring-primary-300/50',

Expand Down
2 changes: 1 addition & 1 deletion presets/lara/inputmask/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {

// States
{
'hover:border-primary-color': !context.disabled && !props.invalid,
'hover:border-primary': !context.disabled && !props.invalid,
'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50': !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled
},
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/inputnumber/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default {
{ 'border-red-500 dark:border-red-400': parent.props.invalid },

// States
{ 'hover:border-primary-color': !parent.props.invalid },
{ 'hover:border-primary': !parent.props.invalid },
'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50 focus:z-10',
{ 'opacity-60 select-none pointer-events-none cursor-default': context.disabled },

Expand Down
2 changes: 1 addition & 1 deletion presets/lara/inputotp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default {

// States
{
'hover:border-primary-color': !context.disabled && !props.invalid,
'hover:border-primary': !context.disabled && !props.invalid,
'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50 focus:z-10': !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled
},
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/inputtext/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {

// States
{
'hover:border-primary-color': !context.disabled && !props.invalid,
'hover:border-primary': !context.disabled && !props.invalid,
'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50 focus:z-10': !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled
},
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/listbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default {
'duration-200',

// States
'hover:border-primary-color',
'hover:border-primary',
'focus:ring focus:outline-none focus:outline-offset-0',
'focus:ring-primary-400/50 dark:focus:ring-primary-300/50',

Expand Down
8 changes: 4 additions & 4 deletions presets/lara/multiselect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
'duration-200',

// States
{ 'hover:border-primary-color': !props.invalid },
{ 'hover:border-primary': !props.invalid },
{ 'outline-none outline-offset-0 ring ring-primary-400/50 dark:ring-primary-300/50': state.focused },

// Misc
Expand Down Expand Up @@ -206,7 +206,7 @@ export default {

// States
{
'peer-hover:border-primary-color': !props.disabled && !context.checked,
'peer-hover:border-primary': !props.disabled && !context.checked,
'peer-hover:bg-primary-hover peer-hover:border-primary-hover': !props.disabled && context.checked,
'peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20': !props.disabled,
'cursor-default opacity-60': props.disabled
Expand Down Expand Up @@ -307,7 +307,7 @@ export default {

// States
{
'peer-hover:border-primary-color': !props.disabled && !context.checked,
'peer-hover:border-primary': !props.disabled && !context.checked,
'peer-hover:bg-primary-hover peer-hover:border-primary-hover': !props.disabled && context.checked,
'peer-focus-visible:border-primary-500 dark:peer-focus-visible:border-primary-400 peer-focus-visible:ring-2 peer-focus-visible:ring-primary-400/20 dark:peer-focus-visible:ring-primary-300/20': !props.disabled,
'cursor-default opacity-60': props.disabled
Expand Down Expand Up @@ -497,7 +497,7 @@ export default {
'duration-200',

// States
'hover:border-primary-color',
'hover:border-primary',
'focus:ring focus:outline-none focus:outline-offset-0',
'focus:ring-primary-400/50 dark:focus:ring-primary-300/50',

Expand Down
6 changes: 3 additions & 3 deletions presets/lara/paginator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export default {
'duration-200',

// States
'hover:border-primary-color',
'hover:border-primary',
{ 'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50': !state.focused },

// Misc
Expand Down Expand Up @@ -358,7 +358,7 @@ export default {
'duration-200',

// States
'hover:border-primary-color',
'hover:border-primary',
'focus:outline-none focus:shadow-none',
'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50',

Expand Down Expand Up @@ -391,7 +391,7 @@ export default {
'duration-200',

// States
'hover:border-primary-color',
'hover:border-primary',
{ 'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-400/50 dark:focus:ring-primary-300/50': !state.focused },

// Misc
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/password/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default {

// States
{
'hover:border-primary-color': !context.disabled && !parent.props.invalid,
'hover:border-primary': !context.disabled && !parent.props.invalid,
'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50 focus:z-10': !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled
},
Expand Down
2 changes: 1 addition & 1 deletion presets/lara/textarea/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {

// States
{
'hover:border-primary-color': !context.disabled && !props.invalid,
'hover:border-primary': !context.disabled && !props.invalid,
'focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50': !context.disabled,
'opacity-60 select-none pointer-events-none cursor-default': context.disabled
},
Expand Down

0 comments on commit d970b7a

Please sign in to comment.