@gapo_ui/typography
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -38,4 +38,23 @@ require("./main.css"); | ||
function $b7366991e07cd86f$var$colorValue(color) { | ||
return `var(--spectrum-global-color-${color})`; | ||
const $b7366991e07cd86f$var$HEX_RE = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/g; | ||
const $b7366991e07cd86f$var$GAPO_OTHER_COLORS = [ | ||
"red", | ||
"orange", | ||
"yellow", | ||
"lime", | ||
"green", | ||
"teal", | ||
"blue", | ||
"indigo", | ||
"purple", | ||
"pink", | ||
]; | ||
const $b7366991e07cd86f$var$isOtherColorValue = (value)=>{ | ||
return $b7366991e07cd86f$var$GAPO_OTHER_COLORS.includes(value.replace(/(Light|Dark)/, "")); | ||
}; | ||
function $b7366991e07cd86f$var$colorValue(value) { | ||
var ref; | ||
if ((ref = value.match($b7366991e07cd86f$var$HEX_RE)) === null || ref === void 0 ? void 0 : ref.length) return value; | ||
if ($b7366991e07cd86f$var$isOtherColorValue(value)) return `var(--gapo-other-color-${value})`; | ||
return `var(--spectrum-global-color-${value})`; | ||
} | ||
@@ -42,0 +61,0 @@ function $b7366991e07cd86f$var$variantValue(variant) { |
@@ -22,4 +22,23 @@ import "./main.css"; | ||
function $6878dbcb5e28bd00$var$colorValue(color) { | ||
return `var(--spectrum-global-color-${color})`; | ||
const $6878dbcb5e28bd00$var$HEX_RE = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/g; | ||
const $6878dbcb5e28bd00$var$GAPO_OTHER_COLORS = [ | ||
"red", | ||
"orange", | ||
"yellow", | ||
"lime", | ||
"green", | ||
"teal", | ||
"blue", | ||
"indigo", | ||
"purple", | ||
"pink", | ||
]; | ||
const $6878dbcb5e28bd00$var$isOtherColorValue = (value)=>{ | ||
return $6878dbcb5e28bd00$var$GAPO_OTHER_COLORS.includes(value.replace(/(Light|Dark)/, "")); | ||
}; | ||
function $6878dbcb5e28bd00$var$colorValue(value) { | ||
var ref; | ||
if ((ref = value.match($6878dbcb5e28bd00$var$HEX_RE)) === null || ref === void 0 ? void 0 : ref.length) return value; | ||
if ($6878dbcb5e28bd00$var$isOtherColorValue(value)) return `var(--gapo-other-color-${value})`; | ||
return `var(--spectrum-global-color-${value})`; | ||
} | ||
@@ -26,0 +45,0 @@ function $6878dbcb5e28bd00$var$variantValue(variant) { |
{ | ||
"name": "@gapo_ui/typography", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Gapo UI components in React", | ||
@@ -40,3 +40,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@gapo_types/typography": "^0.1.4", | ||
"@gapo_types/typography": "^0.1.5", | ||
"@gapo_ui/utils": "^0.2.0" | ||
@@ -47,3 +47,3 @@ }, | ||
}, | ||
"gitHead": "c53af175c959838e56081c094689439a180ece35" | ||
"gitHead": "b38bffe668af97ca70d4c552bfd74782ad2d3c8f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
25733
262