feat(Meter): new component (#827)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Italo
2023-10-27 15:40:39 -03:00
committed by GitHub
parent 5296cf2319
commit abbcc37fbb
10 changed files with 750 additions and 2 deletions

View File

@@ -177,6 +177,17 @@ const safelistByComponent = {
}, {
pattern: new RegExp(`text-(${colorsAsRegex})-500`)
}],
meter: (colorsAsRegex) => [{
pattern: new RegExp(`bg-(${colorsAsRegex})-400`),
variants: ['dark']
}, {
pattern: new RegExp(`bg-(${colorsAsRegex})-500`)
}, {
pattern: new RegExp(`text-(${colorsAsRegex})-400`),
variants: ['dark']
}, {
pattern: new RegExp(`text-(${colorsAsRegex})-500`)
}],
notification: (colorsAsRegex) => [{
pattern: new RegExp(`bg-(${colorsAsRegex})-400`),
variants: ['dark']
@@ -193,7 +204,9 @@ const safelistByComponent = {
const safelistComponentAliasesMap = {
'USelect': 'UInput',
'USelectMenu': 'UInput',
'UTextarea': 'UInput'
'UTextarea': 'UInput',
'URadioGroup': 'URadio',
'UMeterGroup': 'UMeter'
}
const colorsAsRegex = (colors: string[]): string => colors.join('|')