@itkeazco/graphite 0.0.0-stage → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/README.md +271 -2
- package/bin/graphite.js +94 -0
- package/dist/fonts.css +2 -0
- package/dist/icon-sets/phosphor-bold.json +1 -0
- package/dist/icon-sets/phosphor-light.json +1 -0
- package/dist/icon-sets/phosphor-regular.json +1 -0
- package/dist/icon-sets/tabler.json +1 -0
- package/dist/index.css +5 -0
- package/dist/index.d.ts +658 -0
- package/dist/index.js +2227 -0
- package/dist/layers.css +866 -0
- package/dist/neutrals.css +572 -0
- package/dist/styles.css +655 -0
- package/dist/tokens.css +824 -0
- package/dist/tokens.d.ts +35 -0
- package/dist/tokens.js +2 -0
- package/dist/tokens.json +884 -0
- package/dist/typography.css +26 -0
- package/package.json +90 -4
- package/rules/graphite.mdc +100 -0
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Token values as data. Generated from docs/tokens.source.json. Colour tokens are { light, dark } with aliases resolved to hex. Brand overrides are present only when a token defines them. */
|
|
2
|
+
export interface ThemeColor {
|
|
3
|
+
light: string;
|
|
4
|
+
dark: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GraphiteBrand {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
usage?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TypeRole {
|
|
12
|
+
size: string;
|
|
13
|
+
lineHeight: string;
|
|
14
|
+
weight: string;
|
|
15
|
+
tracking?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GraphiteTokens {
|
|
18
|
+
color: Record<string, ThemeColor & { brands?: Record<string, ThemeColor> }>;
|
|
19
|
+
brands: GraphiteBrand[];
|
|
20
|
+
primitives: Record<string, string>;
|
|
21
|
+
spacing: Record<string, string>;
|
|
22
|
+
radius: Record<string, string>;
|
|
23
|
+
size: Record<string, string>;
|
|
24
|
+
opacity: Record<string, string>;
|
|
25
|
+
shadow: Record<string, { light: string; dark: string }>;
|
|
26
|
+
fontSize: Record<string, string>;
|
|
27
|
+
lineHeight: Record<string, string>;
|
|
28
|
+
fontWeight: Record<string, string>;
|
|
29
|
+
tracking: Record<string, string>;
|
|
30
|
+
duration: Record<string, string>;
|
|
31
|
+
stroke: Record<string, string>;
|
|
32
|
+
type: Record<string, TypeRole>;
|
|
33
|
+
}
|
|
34
|
+
export declare const tokens: GraphiteTokens;
|
|
35
|
+
export default tokens;
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const tokens = {"color":{"color-bg-surface-secondary":{"light":"#fafafa","dark":"#111113"},"color-bg-surface-tertiary":{"light":"#f2f2f3","dark":"#111113"},"color-bg-surface-primary":{"light":"#ffffff","dark":"#1c1c1f"},"color-bg-neutral-secondary":{"light":"#f2f2f3","dark":"#2a2a2e"},"color-bg-neutral-secondary-hover":{"light":"#e6e6e9","dark":"#3d3d43"},"color-bg-neutral-primary":{"light":"#e6e6e9","dark":"#3d3d43"},"color-bg-neutral-primary-hover":{"light":"#d3d3d7","dark":"#52525b"},"color-bg-inverse-primary":{"light":"#1c1c1f","dark":"#fafafa"},"color-bg-brand-primary":{"light":"#1c1c1f","dark":"#fafafa","brands":{"sample":{"light":"#1d4ed8","dark":"#60a5fa"},"blue":{"light":"#1d4ed8","dark":"#60a5fa"},"violet":{"light":"#6d28d9","dark":"#a78bfa"},"green":{"light":"#15803d","dark":"#4ade80"},"orange":{"light":"#c2410c","dark":"#fb923c"},"rose":{"light":"#be123c","dark":"#fb7185"}}},"color-bg-inverse-primary-hover":{"light":"#2a2a2e","dark":"#e6e6e9"},"color-bg-brand-primary-hover":{"light":"#2a2a2e","dark":"#e6e6e9","brands":{"sample":{"light":"#1e40af","dark":"#93c5fd"},"blue":{"light":"#1e40af","dark":"#93c5fd"},"violet":{"light":"#5b21b6","dark":"#c4b5fd"},"green":{"light":"#166534","dark":"#86efac"},"orange":{"light":"#9a3412","dark":"#fdba74"},"rose":{"light":"#9f1239","dark":"#fda4af"}}},"color-bg-inverse-primary-pressed":{"light":"#3d3d43","dark":"#d3d3d7"},"color-bg-brand-primary-pressed":{"light":"#3d3d43","dark":"#d3d3d7","brands":{"sample":{"light":"#1e3a8a","dark":"#bfdbfe"},"blue":{"light":"#1e3a8a","dark":"#bfdbfe"},"violet":{"light":"#4c1d95","dark":"#ddd6fe"},"green":{"light":"#14532d","dark":"#bbf7d0"},"orange":{"light":"#7c2d12","dark":"#fed7aa"},"rose":{"light":"#881337","dark":"#fecdd3"}}},"color-bg-scrim-primary":{"light":"rgba(13,13,13,0.28)","dark":"rgba(0,0,0,0.6)"},"color-bg-overlay-primary":{"light":"#ffffff","dark":"#ffffff"},"color-bg-overlay-primary-hover":{"light":"#f2f2f3","dark":"#f2f2f3"},"color-bg-overlay-primary-pressed":{"light":"#e6e6e9","dark":"#e6e6e9"},"color-text-onoverlay-primary":{"light":"#1c1c1f","dark":"#1c1c1f"},"color-border-default-tertiary":{"light":"#e6e6e9","dark":"#2a2a2e"},"color-border-default-secondary":{"light":"#d3d3d7","dark":"#3d3d43"},"color-border-default-secondary-hover":{"light":"#a2a2ab","dark":"#6a6a73"},"color-border-default-primary":{"light":"#1c1c1f","dark":"#fafafa"},"color-text-default-primary":{"light":"#1c1c1f","dark":"#fafafa"},"color-text-default-secondary":{"light":"#6a6a73","dark":"#a2a2ab"},"color-text-default-tertiary":{"light":"#a2a2ab","dark":"#6a6a73"},"color-text-inverse-primary":{"light":"#ffffff","dark":"#111113"},"color-text-onbrand-primary":{"light":"#ffffff","dark":"#111113","brands":{"sample":{"light":"#ffffff","dark":"#111113"},"blue":{"light":"#ffffff","dark":"#111113"},"violet":{"light":"#ffffff","dark":"#111113"},"green":{"light":"#ffffff","dark":"#111113"},"orange":{"light":"#ffffff","dark":"#111113"},"rose":{"light":"#ffffff","dark":"#111113"}}},"color-text-inverse-secondary":{"light":"#a2a2ab","dark":"#6a6a73"},"color-text-danger-primary":{"light":"#b91c1c","dark":"#fca5a5"},"color-bg-live-primary":{"light":"#ef4444","dark":"#f87171"},"color-bg-success-primary":{"light":"#16a34a","dark":"#22c55e"},"color-bg-danger-primary":{"light":"#dc2626","dark":"#f87171"},"color-bg-danger-primary-hover":{"light":"#b91c1c","dark":"#fca5a5"},"color-bg-knob-primary":{"light":"#ffffff","dark":"#ffffff"},"color-border-focus-primary":{"light":"#1c1c1f","dark":"#fafafa"},"color-border-focus-secondary":{"light":"rgba(26,26,26,0.08)","dark":"rgba(242,242,242,0.12)"},"color-bg-warning-primary":{"light":"#f59e0b","dark":"#fbbf24"},"color-bg-info-primary":{"light":"#2563eb","dark":"#60a5fa"},"color-text-success-primary":{"light":"#166534","dark":"#86efac"},"color-text-warning-primary":{"light":"#92400e","dark":"#fcd34d"},"color-text-info-primary":{"light":"#1d4ed8","dark":"#93c5fd"},"color-text-onbold-primary":{"light":"#ffffff","dark":"#111113"},"color-text-onwarning-primary":{"light":"#1c1c1f","dark":"#111113"},"color-bg-success-secondary":{"light":"#f0fdf4","dark":"#052e16"},"color-bg-danger-secondary":{"light":"#fef2f2","dark":"#450a0a"},"color-bg-warning-secondary":{"light":"#fffbeb","dark":"#451a03"},"color-bg-info-secondary":{"light":"#eff6ff","dark":"#172554"},"color-border-success-primary":{"light":"#bbf7d0","dark":"#166534"},"color-border-danger-primary":{"light":"#fecaca","dark":"#991b1b"},"color-border-warning-primary":{"light":"#fde68a","dark":"#92400e"},"color-border-info-primary":{"light":"#bfdbfe","dark":"#1e40af"},"color-bg-accent-primary":{"light":"#2563eb","dark":"#3b82f6","brands":{"blue":{"light":"#2563eb","dark":"#3b82f6"},"violet":{"light":"#7c3aed","dark":"#8b5cf6"},"green":{"light":"#16a34a","dark":"#22c55e"},"orange":{"light":"#ea580c","dark":"#f97316"},"rose":{"light":"#e11d48","dark":"#f43f5e"}}},"color-text-accent-primary":{"light":"#1d4ed8","dark":"#93c5fd","brands":{"blue":{"light":"#1d4ed8","dark":"#93c5fd"},"violet":{"light":"#6d28d9","dark":"#c4b5fd"},"green":{"light":"#15803d","dark":"#86efac"},"orange":{"light":"#c2410c","dark":"#fdba74"},"rose":{"light":"#be123c","dark":"#fda4af"}}},"color-bg-accent-secondary":{"light":"#eff6ff","dark":"#172554","brands":{"blue":{"light":"#eff6ff","dark":"#172554"},"violet":{"light":"#f5f3ff","dark":"#2e1065"},"green":{"light":"#f0fdf4","dark":"#052e16"},"orange":{"light":"#fff7ed","dark":"#431407"},"rose":{"light":"#fff1f2","dark":"#4c0519"}}},"chart-2":{"light":"#6a6a73","dark":"#a2a2ab"},"chart-3":{"light":"#a2a2ab","dark":"#6a6a73"},"chart-4":{"light":"#d3d3d7","dark":"#52525b"},"chart-5":{"light":"#e6e6e9","dark":"#3d3d43"},"chart-6":{"light":"#f2f2f3","dark":"#2a2a2e"}},"brands":[{"id":"sample","name":"Sample","usage":"Opt-in demo. Applies only with data-brand=\"sample\" and remaps the primary action to blue. Products ship their own brand CSS (Homie: Hebrew, dir=rtl, Rubik) instead of editing this."},{"id":"blue","name":"Blue","usage":"Colour preset. data-brand=\"blue\" turns the primary action and the accent blue. Surfaces stay grey."},{"id":"violet","name":"Violet","usage":"Colour preset. data-brand=\"violet\" turns the primary action and the accent violet. Surfaces stay grey."},{"id":"green","name":"Green","usage":"Colour preset. data-brand=\"green\" turns the primary action and the accent green. Surfaces stay grey."},{"id":"orange","name":"Orange","usage":"Colour preset. data-brand=\"orange\" turns the primary action and the accent orange. Surfaces stay grey."},{"id":"rose","name":"Rose","usage":"Colour preset. data-brand=\"rose\" turns the primary action and the accent rose. Surfaces stay grey."}],"primitives":{"graphite-50":"#fafafa","graphite-100":"#f2f2f3","graphite-200":"#e6e6e9","graphite-300":"#d3d3d7","graphite-400":"#a2a2ab","graphite-500":"#6a6a73","graphite-600":"#52525b","graphite-700":"#3d3d43","graphite-800":"#2a2a2e","graphite-900":"#1c1c1f","graphite-950":"#111113","white":"#ffffff","black":"#000000","slate-50":"#f8fafc","slate-100":"#f1f5f9","slate-200":"#e2e8f0","slate-300":"#cbd5e1","slate-400":"#94a3b8","slate-500":"#64748b","slate-600":"#475569","slate-700":"#334155","slate-800":"#1e293b","slate-900":"#0f172a","slate-950":"#020617","gray-50":"#f9fafb","gray-100":"#f3f4f6","gray-200":"#e5e7eb","gray-300":"#d1d5db","gray-400":"#9ca3af","gray-500":"#6b7280","gray-600":"#4b5563","gray-700":"#374151","gray-800":"#1f2937","gray-900":"#111827","gray-950":"#030712","zinc-50":"#fafafa","zinc-100":"#f4f4f5","zinc-200":"#e4e4e7","zinc-300":"#d4d4d8","zinc-400":"#a1a1aa","zinc-500":"#71717a","zinc-600":"#52525b","zinc-700":"#3f3f46","zinc-800":"#27272a","zinc-900":"#18181b","zinc-950":"#09090b","neutral-50":"#fafafa","neutral-100":"#f5f5f5","neutral-200":"#e5e5e5","neutral-300":"#d4d4d4","neutral-400":"#a3a3a3","neutral-500":"#737373","neutral-600":"#525252","neutral-700":"#404040","neutral-800":"#262626","neutral-900":"#171717","neutral-950":"#0a0a0a","stone-50":"#fafaf9","stone-100":"#f5f5f4","stone-200":"#e7e5e4","stone-300":"#d6d3d1","stone-400":"#a8a29e","stone-500":"#78716c","stone-600":"#57534e","stone-700":"#44403c","stone-800":"#292524","stone-900":"#1c1917","stone-950":"#0c0a09","red-50":"#fef2f2","red-100":"#fee2e2","red-200":"#fecaca","red-300":"#fca5a5","red-400":"#f87171","red-500":"#ef4444","red-600":"#dc2626","red-700":"#b91c1c","red-800":"#991b1b","red-900":"#7f1d1d","red-950":"#450a0a","orange-50":"#fff7ed","orange-100":"#ffedd5","orange-200":"#fed7aa","orange-300":"#fdba74","orange-400":"#fb923c","orange-500":"#f97316","orange-600":"#ea580c","orange-700":"#c2410c","orange-800":"#9a3412","orange-900":"#7c2d12","orange-950":"#431407","amber-50":"#fffbeb","amber-100":"#fef3c7","amber-200":"#fde68a","amber-300":"#fcd34d","amber-400":"#fbbf24","amber-500":"#f59e0b","amber-600":"#d97706","amber-700":"#b45309","amber-800":"#92400e","amber-900":"#78350f","amber-950":"#451a03","yellow-50":"#fefce8","yellow-100":"#fef9c3","yellow-200":"#fef08a","yellow-300":"#fde047","yellow-400":"#facc15","yellow-500":"#eab308","yellow-600":"#ca8a04","yellow-700":"#a16207","yellow-800":"#854d0e","yellow-900":"#713f12","yellow-950":"#422006","lime-50":"#f7fee7","lime-100":"#ecfccb","lime-200":"#d9f99d","lime-300":"#bef264","lime-400":"#a3e635","lime-500":"#84cc16","lime-600":"#65a30d","lime-700":"#4d7c0f","lime-800":"#3f6212","lime-900":"#365314","lime-950":"#1a2e05","green-50":"#f0fdf4","green-100":"#dcfce7","green-200":"#bbf7d0","green-300":"#86efac","green-400":"#4ade80","green-500":"#22c55e","green-600":"#16a34a","green-700":"#15803d","green-800":"#166534","green-900":"#14532d","green-950":"#052e16","emerald-50":"#ecfdf5","emerald-100":"#d1fae5","emerald-200":"#a7f3d0","emerald-300":"#6ee7b7","emerald-400":"#34d399","emerald-500":"#10b981","emerald-600":"#059669","emerald-700":"#047857","emerald-800":"#065f46","emerald-900":"#064e3b","emerald-950":"#022c22","teal-50":"#f0fdfa","teal-100":"#ccfbf1","teal-200":"#99f6e4","teal-300":"#5eead4","teal-400":"#2dd4bf","teal-500":"#14b8a6","teal-600":"#0d9488","teal-700":"#0f766e","teal-800":"#115e59","teal-900":"#134e4a","teal-950":"#042f2e","cyan-50":"#ecfeff","cyan-100":"#cffafe","cyan-200":"#a5f3fc","cyan-300":"#67e8f9","cyan-400":"#22d3ee","cyan-500":"#06b6d4","cyan-600":"#0891b2","cyan-700":"#0e7490","cyan-800":"#155e75","cyan-900":"#164e63","cyan-950":"#083344","sky-50":"#f0f9ff","sky-100":"#e0f2fe","sky-200":"#bae6fd","sky-300":"#7dd3fc","sky-400":"#38bdf8","sky-500":"#0ea5e9","sky-600":"#0284c7","sky-700":"#0369a1","sky-800":"#075985","sky-900":"#0c4a6e","sky-950":"#082f49","blue-50":"#eff6ff","blue-100":"#dbeafe","blue-200":"#bfdbfe","blue-300":"#93c5fd","blue-400":"#60a5fa","blue-500":"#3b82f6","blue-600":"#2563eb","blue-700":"#1d4ed8","blue-800":"#1e40af","blue-900":"#1e3a8a","blue-950":"#172554","indigo-50":"#eef2ff","indigo-100":"#e0e7ff","indigo-200":"#c7d2fe","indigo-300":"#a5b4fc","indigo-400":"#818cf8","indigo-500":"#6366f1","indigo-600":"#4f46e5","indigo-700":"#4338ca","indigo-800":"#3730a3","indigo-900":"#312e81","indigo-950":"#1e1b4b","violet-50":"#f5f3ff","violet-100":"#ede9fe","violet-200":"#ddd6fe","violet-300":"#c4b5fd","violet-400":"#a78bfa","violet-500":"#8b5cf6","violet-600":"#7c3aed","violet-700":"#6d28d9","violet-800":"#5b21b6","violet-900":"#4c1d95","violet-950":"#2e1065","purple-50":"#faf5ff","purple-100":"#f3e8ff","purple-200":"#e9d5ff","purple-300":"#d8b4fe","purple-400":"#c084fc","purple-500":"#a855f7","purple-600":"#9333ea","purple-700":"#7e22ce","purple-800":"#6b21a8","purple-900":"#581c87","purple-950":"#3b0764","fuchsia-50":"#fdf4ff","fuchsia-100":"#fae8ff","fuchsia-200":"#f5d0fe","fuchsia-300":"#f0abfc","fuchsia-400":"#e879f9","fuchsia-500":"#d946ef","fuchsia-600":"#c026d3","fuchsia-700":"#a21caf","fuchsia-800":"#86198f","fuchsia-900":"#701a75","fuchsia-950":"#4a044e","pink-50":"#fdf2f8","pink-100":"#fce7f3","pink-200":"#fbcfe8","pink-300":"#f9a8d4","pink-400":"#f472b6","pink-500":"#ec4899","pink-600":"#db2777","pink-700":"#be185d","pink-800":"#9d174d","pink-900":"#831843","pink-950":"#500724","rose-50":"#fff1f2","rose-100":"#ffe4e6","rose-200":"#fecdd3","rose-300":"#fda4af","rose-400":"#fb7185","rose-500":"#f43f5e","rose-600":"#e11d48","rose-700":"#be123c","rose-800":"#9f1239","rose-900":"#881337","rose-950":"#4c0519","alpha-black-8":"rgba(26,26,26,0.08)","alpha-black-28":"rgba(13,13,13,0.28)","alpha-black-60":"rgba(0,0,0,0.6)","alpha-white-12":"rgba(242,242,242,0.12)"},"spacing":{"space-4":"4px","space-8":"8px","space-12":"12px","space-16":"16px","space-20":"20px","space-24":"24px","space-32":"32px","space-40":"40px","space-48":"48px","space-56":"56px","space-64":"64px","space-80":"80px","space-96":"96px"},"radius":{"radius-0":"0px","radius-4":"4px","radius-8":"8px","radius-12":"12px","radius-16":"16px","radius-20":"20px","radius-24":"24px","radius-32":"32px","radius-full":"999px"},"size":{"size-16":"16px","size-20":"20px","size-24":"24px","size-28":"28px","size-32":"32px","size-36":"36px","size-40":"40px","size-44":"44px","size-48":"48px","size-56":"56px","size-64":"64px","size-72":"72px"},"opacity":{"opacity-disabled":"0.45"},"shadow":{"shadow-raised":{"light":"0 1px 2px rgba(0,0,0,0.06), 0 1px 1px rgba(0,0,0,0.04)","dark":"0 1px 2px rgba(0,0,0,0.5)"},"shadow-raised-hover":{"light":"0 2px 6px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05)","dark":"0 2px 6px rgba(0,0,0,0.6)"},"shadow-floating":{"light":"0 12px 32px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04)","dark":"0 12px 32px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.4)"}},"fontSize":{"font-12":"12px","font-14":"14px","font-16":"16px","font-20":"20px","font-24":"24px","font-32":"32px","font-40":"40px","font-48":"48px","font-64":"64px","font-80":"80px"},"lineHeight":{"leading-1":"1","leading-16":"16px","leading-20":"20px","leading-24":"24px","leading-28":"28px","leading-32":"32px","leading-40":"40px","leading-48":"48px","leading-56":"56px","leading-72":"72px","leading-88":"88px"},"fontWeight":{"weight-400":"400","weight-450":"450","weight-500":"500","weight-600":"600"},"tracking":{"tracking-tight":"-0.01em","tracking-tighter":"-0.02em","tracking-tightest":"-0.03em"},"duration":{"duration-80":"80ms","duration-140":"140ms","duration-180":"180ms","duration-200":"200ms","duration-220":"220ms","duration-300":"300ms","duration-700":"700ms","duration-1200":"1200ms"},"stroke":{"icon-stroke":"1.75","icon-stroke-strong":"2.25","icon-stroke-check":"2.5"},"type":{"display-2xl":{"size":"80px","lineHeight":"88px","weight":"600","tracking":"-0.03em"},"display-xl":{"size":"64px","lineHeight":"72px","weight":"600","tracking":"-0.03em"},"display-lg":{"size":"48px","lineHeight":"56px","weight":"600","tracking":"-0.02em"},"display":{"size":"32px","lineHeight":"40px","weight":"600","tracking":"-0.02em"},"heading":{"size":"24px","lineHeight":"32px","weight":"600","tracking":"-0.01em"},"subheading":{"size":"20px","lineHeight":"28px","weight":"600","tracking":"-0.01em"},"title":{"size":"16px","lineHeight":"24px","weight":"500"},"body":{"size":"14px","lineHeight":"20px","weight":"400"},"label":{"size":"14px","lineHeight":"20px","weight":"500"},"caption":{"size":"12px","lineHeight":"16px","weight":"400"},"micro":{"size":"12px","lineHeight":"16px","weight":"500"},"code":{"size":"12px","lineHeight":"20px","weight":"400"},"kbd":{"size":"12px","lineHeight":"1","weight":"500"}}};
|
|
2
|
+
export default tokens;
|