- Added checkbox support to the `FormCheckRadio` component. - Updated the styling of the radio button and checkbox components. - Added the `arrayContainsTypes` validation rule to ensure that arrays contain specific types. - Updated the `dataset` validators and controllers to use the new validation rule. - Updated the `FormCheckRadioGroup` component to correctly handle the `input-value` as a number. - Removed the default value from the `id` column in the `collections` migration. - Added the `array_contains_types` rule to the `adonisrc.ts` file.
124 lines
No EOL
5.3 KiB
JavaScript
124 lines
No EOL
5.3 KiB
JavaScript
/** @type {import('tailwindcss').Config} */
|
|
const plugin = require('tailwindcss/plugin');
|
|
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
const { registerables } = require('chart.js');
|
|
|
|
module.exports = {
|
|
content: ['./resources/**/*.{edge,js,ts,jsx,tsx,vue}'],
|
|
darkMode: 'class', // or 'media' or 'class'
|
|
theme: {
|
|
asideScrollbars: {
|
|
light: 'light',
|
|
gray: 'gray',
|
|
},
|
|
extend: {
|
|
backgroundImage: {
|
|
'radio-checked': "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z' /%3E%3C/svg%3E\")",
|
|
'checkbox-checked': "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath style='fill:%23fff' d='M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z'%3E%3C/path%3E%3C/svg%3E\")",
|
|
},
|
|
colors: {
|
|
'primary': '#22C55E',
|
|
'inprogress': 'rgb(94 234 212)',
|
|
'released': 'rgb(52 211 153)',
|
|
'editor-accepted': 'rgb(125 211 252)',
|
|
'approved': '#FFEB3B', //A lighter yellow, which is cheerful and can indicate that something is in a pending state.
|
|
'rejected-editor': '#f97316',
|
|
'rejected-reviewer': '#f97316',
|
|
'reviewed': '#FFC107', // warm amber, suggesting caution but still positive
|
|
'published': '#8BC34A', // lighter green, which is also fresh and positive
|
|
'primary-dark': '#DCFCE7',
|
|
'lime': {
|
|
DEFAULT: '#BFCE40',
|
|
dark: 'rgba(5,46,55,0.7)',
|
|
50: '#FBFCF7',
|
|
100: '#F8FBE1',
|
|
200: '#EEF69E',
|
|
300: '#DCEC53',
|
|
400: '#A8D619',
|
|
500: '#65DC21',
|
|
600: '#429E04',
|
|
700: '#357C06',
|
|
800: '#295B09',
|
|
900: '#20450A',
|
|
},
|
|
},
|
|
fontFamily: {
|
|
sans: ['Inter', ...defaultTheme.fontFamily.sans],
|
|
logo: ['Archivo Black', ...defaultTheme.fontFamily.sans],
|
|
},
|
|
zIndex: {
|
|
'-1': '-1',
|
|
},
|
|
flexGrow: {
|
|
5: '5',
|
|
},
|
|
maxHeight: {
|
|
'screen-menu': 'calc(100vh - 3.5rem)',
|
|
'modal': 'calc(100vh - 160px)',
|
|
},
|
|
transitionProperty: {
|
|
position: 'right, left, top, bottom, margin, padding',
|
|
textColor: 'color',
|
|
},
|
|
keyframes: {
|
|
'fade-out': {
|
|
from: { opacity: 1 },
|
|
to: { opacity: 0 },
|
|
},
|
|
'fade-in': {
|
|
from: { opacity: 0 },
|
|
to: { opacity: 1 },
|
|
},
|
|
},
|
|
animation: {
|
|
'fade-out': 'fade-out 250ms ease-in-out',
|
|
'fade-in': 'fade-in 250ms ease-in-out',
|
|
},
|
|
}, //extend
|
|
}, // theme
|
|
plugins: [
|
|
require('@tailwindcss/forms'),
|
|
plugin(function ({ matchUtilities, theme }) {
|
|
matchUtilities(
|
|
{
|
|
'aside-scrollbars': (value) => {
|
|
const track = value === 'light' ? '100' : '900';
|
|
const thumb = value === 'light' ? '300' : '600';
|
|
const color = value === 'light' ? 'gray' : value;
|
|
|
|
return {
|
|
'scrollbarWidth': 'thin',
|
|
'scrollbarColor': `${theme(`colors.${color}.${thumb}`)} ${theme(`colors.${color}.${track}`)}`,
|
|
'&::-webkit-scrollbar': {
|
|
width: '8px',
|
|
height: '8px',
|
|
},
|
|
'&::-webkit-scrollbar-track': {
|
|
backgroundColor: theme(`colors.${color}.${track}`),
|
|
},
|
|
'&::-webkit-scrollbar-thumb': {
|
|
borderRadius: '0.25rem',
|
|
backgroundColor: theme(`colors.${color}.${thumb}`),
|
|
},
|
|
};
|
|
},
|
|
},
|
|
{ values: theme('asideScrollbars') },
|
|
);
|
|
}),
|
|
plugin(function({ addUtilities }) {
|
|
const newUtilities = {
|
|
'.drag-none': {
|
|
'-webkit-user-drag': 'none',
|
|
'-khtml-user-drag': 'none',
|
|
'-moz-user-drag': 'none',
|
|
'-o-user-drag': 'none',
|
|
'user-drag': 'none',
|
|
},
|
|
}
|
|
addUtilities(newUtilities)
|
|
}),
|
|
// As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default
|
|
// require('@tailwindcss/line-clamp'),
|
|
],
|
|
}; |