@warp-ds/uno
Advanced tools
Comparing version 1.4.0-next.7 to 1.4.0-next.8
{ | ||
"name": "@warp-ds/uno", | ||
"repository": "git@github.com:warp-ds/drive.git", | ||
"version": "1.4.0-next.7", | ||
"version": "1.4.0-next.8", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "exports": { |
import { handler as h, resolveArbitraryValues } from '#utils'; | ||
export const flex = [ | ||
// flex | ||
[ | ||
@@ -13,11 +12,13 @@ /^flex-(.*)$/, | ||
['flex-none', { flex: 'none' }], | ||
// shrink/grow/basis | ||
// grow and shrink have two forms - 'shrink' and 'shrink-N' | ||
// shrink / grow / basis | ||
['shrink', { 'flex-shrink': 1 }], | ||
[ | ||
/^shrink(?:-(.*))?$/, | ||
([, d = '']) => ({ 'flex-shrink': h.number(d) ?? 1 }), | ||
/^shrink-\[?(\d+)]?$/, | ||
([, d]) => ({ 'flex-shrink': h.number(d) ?? 1 }), | ||
{ autocomplete: ['shrink-<num>'] }, | ||
], | ||
['grow', { 'flex-grow': 1 }], | ||
[ | ||
/^grow(?:-(.*))?$/, | ||
/^grow-\[?(\d+)]?$/, | ||
([, d = '']) => ({ 'flex-grow': h.number(d) ?? 1 }), | ||
@@ -38,3 +39,4 @@ { autocomplete: ['grow-<num>'] }, | ||
], | ||
// directions | ||
// direction | ||
['flex-row', { 'flex-direction': 'row' }], | ||
@@ -44,3 +46,4 @@ ['flex-row-reverse', { 'flex-direction': 'row-reverse' }], | ||
['flex-col-reverse', { 'flex-direction': 'column-reverse' }], | ||
// wraps | ||
// wrap | ||
['flex-wrap', { 'flex-wrap': 'wrap' }], | ||
@@ -47,0 +50,0 @@ ['flex-wrap-reverse', { 'flex-wrap': 'wrap-reverse' }], |
@@ -52,6 +52,6 @@ import { escapeSelector } from '@unocss/core'; | ||
export function number(str) { | ||
const newStr = (str?.startsWith('[') && str?.endsWith(']')) ? bracket(str) : str; | ||
if (!numberRE.test(newStr)) return; | ||
const num = parseFloat(newStr); | ||
if (!Number.isNaN(num)) return round(num); | ||
if (numberRE.test(str)) { | ||
const num = parseFloat(str); | ||
if (!Number.isNaN(num)) return round(num); | ||
} | ||
} | ||
@@ -58,0 +58,0 @@ export function percent(str) { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
209063