@warp-ds/uno
Advanced tools
Comparing version 1.0.0-alpha.30 to 1.0.0-alpha.31
{ | ||
"name": "@warp-ds/uno", | ||
"repository": "git@github.com:warp-ds/drive.git", | ||
"version": "1.0.0-alpha.30", | ||
"version": "1.0.0-alpha.31", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "exports": { |
@@ -0,7 +1,13 @@ | ||
import { entriesToCss } from '@unocss/core'; | ||
// TODO: use actual variables and values when those has been defined | ||
const focusRingStyle = { | ||
'outline': '2px solid var(--w-color-focused)', | ||
const focusRingStyle = entriesToCss(Object.entries({ | ||
outline: '2px solid var(--w-color-focused)', | ||
'outline-offset': 'var(--w-outline-offset, 1px)', | ||
}; | ||
})); | ||
const outlineNone = entriesToCss(Object.entries({ | ||
outline: 'none', | ||
})); | ||
const focusRingInsetStyle = { | ||
@@ -12,6 +18,8 @@ '--w-outline-offset': '-3px', | ||
export const focusRing = [ | ||
["focusable:focus", focusRingStyle], | ||
["focusable:focus:not(:focus-visible)", { 'outline': 'none' }], | ||
["focusable:focus-visible", focusRingStyle], | ||
[/^focusable$/, ([selector]) => { | ||
const focus = `.${selector}:focus,.${selector}:focus-visible{${focusRingStyle}}`; | ||
const notFocusVisible = `.${selector}:not(:focus-visible){${outlineNone}}`; | ||
return focus + notFocusVisible; | ||
}], | ||
["focusable-inset", { ... focusRingInsetStyle }], | ||
]; |
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
197576
5633