@carbonid1/design-system 5.7.8 → 5.7.10
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/dist/Kbd/Kbd.js +2 -0
- package/package.json +1 -1
- package/skills/design-system/SKILL.md +1 -0
package/dist/Kbd/Kbd.js
CHANGED
|
@@ -20,6 +20,8 @@ const resolveKey = (key) => {
|
|
|
20
20
|
const lower = key.toLowerCase();
|
|
21
21
|
if (lower === 'mod')
|
|
22
22
|
return MOD_SYMBOLS[getModKey()] ?? 'Ctrl';
|
|
23
|
+
if (lower === 'ctrl')
|
|
24
|
+
return getModKey() === 'Cmd' ? '⌃' : 'Ctrl';
|
|
23
25
|
return KEY_SYMBOLS[lower] ?? key;
|
|
24
26
|
};
|
|
25
27
|
const kbdVariants = cva('inline-flex items-center justify-center rounded-sm border font-mono leading-none select-none', {
|
package/package.json
CHANGED
|
@@ -38,6 +38,7 @@ If you're editing `@carbonid1/design-system` itself (adding a primitive, changin
|
|
|
38
38
|
- Never build a tooltip, context menu, or toast from scratch — use `Tooltip`, `ContextMenu`, `toast()`
|
|
39
39
|
- All icons from `lucide-react` — search `lucide.dev/icons` before creating anything custom. If nothing fits, build via Lucide's `Icon` + `iconNode`, don't reach for another library.
|
|
40
40
|
- All color through semantic tokens — no hardcoded Tailwind color classes. See [references/theming.md](references/theming.md).
|
|
41
|
+
- **Missing a token or primitive? Surface it, don't invent one.** When the palette has no token — or the package no component — for what you're building, stop and ask the user, offering 2–3 concrete paths (extend the design system, compose what's already there, or a deliberately-scoped one-off). A silent one-off forks the system: these tokens exist so a single decision propagates everywhere, and a bespoke color or component quietly breaks that. Asking is cheap; an unnoticed fork is expensive to unwind later.
|
|
41
42
|
- Tooltip: rely on defaults (`position="top"`, `delay={200}`). Only override when the default is wrong (e.g. header → `position="bottom"`, data-viz progressive disclosure → `delay={600}`). When a tooltip trigger also opens a popover, pass `disabled={open}`.
|
|
42
43
|
- Icon toggle state: `<Icon fill={active ? 'currentColor' : 'none'} />` — not two different components.
|
|
43
44
|
|