@warp-ds/component-classes
Advanced tools
Comparing version 1.0.0-alpha.11 to 1.0.0-alpha.12
import * as components from './index.js'; | ||
const filterInternalClasses = (str) => { | ||
const classes = str.split(/\s/); | ||
return classes.filter(c => c.startsWith("i-")); | ||
} | ||
export const classes = Object.values(components) | ||
.map((e) => { | ||
if (typeof e === 'object') return Object.values(e).map((e) => e.split(/\s/)); | ||
return e.split(/\s/); | ||
if (typeof e === 'object') return Object.values(e).map(filterInternalClasses); | ||
return filterInternalClasses(e) | ||
}) | ||
.flat(Infinity); |
15
index.js
@@ -254,2 +254,15 @@ export const attention = { | ||
'py-10 px-14 border-0 font-bold rounded-8 leading-24 max-w-max focusable justify-center transition-colors ease-in-out animate-inprogress i-text-$color-button-loading-text! pointer-events-none i-bg-$color-button-loading-background!', // .button--in-progress, a.button--in-progress:visited | ||
}; | ||
}; | ||
export const alert = { | ||
alert: "flex p-16 border border-l-4 rounded-4", | ||
icon: "w-16 mr-8 pt-4", | ||
negative: "i-border-$color-alert-negative-subtle-border i-bg-$color-alert-negative-background i-text-$color-alert-negative-text i-border-l-$color-alert-negative-border", | ||
negativeIcon: "i-text-$color-alert-negative-icon", | ||
positive: "i-border-$color-alert-positive-subtle-border i-bg-$color-alert-positive-background i-text-$color-alert-positive-text i-border-l-$color-alert-positive-border", | ||
positiveIcon: "i-text-$color-alert-positive-icon", | ||
warning: "i-border-$color-alert-warning-subtle-border i-bg-$color-alert-warning-background i-text-$color-alert-warning-text i-border-l-$color-alert-warning-border", | ||
warningIcon: "i-text-$color-alert-warning-icon", | ||
info: "i-border-$color-alert-info-subtle-border i-bg-$color-alert-info-background i-text-$color-alert-info-text i-border-l-$color-alert-info-border", | ||
infoIcon: "i-text-$color-alert-info-icon" | ||
} |
{ | ||
"name": "@warp-ds/component-classes", | ||
"repository": "git@github.com:warp-ds/component-classes.git", | ||
"version": "1.0.0-alpha.11", | ||
"version": "1.0.0-alpha.12", | ||
"description": "WARP component classes", | ||
@@ -6,0 +6,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
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
32178
276