@cdx-ui/components 0.0.1-beta.102 → 0.0.1-beta.103
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/lib/commonjs/components/Badge/styles.js +2 -2
- package/lib/commonjs/components/Badge/styles.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +2 -2
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/CLAUDE.md +2 -2
- package/lib/commonjs/components/Checkbox/styles.js +3 -3
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Chip/styles.js +2 -2
- package/lib/commonjs/components/Chip/styles.js.map +1 -1
- package/lib/commonjs/components/CurrencyInput/styles.js +2 -2
- package/lib/commonjs/components/CurrencyInput/styles.js.map +1 -1
- package/lib/commonjs/components/Dialog/styles.js +2 -2
- package/lib/commonjs/components/Dialog/styles.js.map +1 -1
- package/lib/commonjs/components/Field/styles.js +2 -2
- package/lib/commonjs/components/Field/styles.js.map +1 -1
- package/lib/commonjs/components/IconButton/styles.js +2 -2
- package/lib/commonjs/components/IconButton/styles.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +2 -2
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/Link/styles.js +2 -2
- package/lib/commonjs/components/Link/styles.js.map +1 -1
- package/lib/commonjs/components/ListItem/styles.js +2 -2
- package/lib/commonjs/components/ListItem/styles.js.map +1 -1
- package/lib/commonjs/components/QuickActionButton/styles.js +3 -3
- package/lib/commonjs/components/QuickActionButton/styles.js.map +1 -1
- package/lib/commonjs/components/Radio/styles.js +3 -3
- package/lib/commonjs/components/Radio/styles.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +2 -2
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Textarea/styles.js +2 -2
- package/lib/commonjs/components/Textarea/styles.js.map +1 -1
- package/lib/commonjs/components/Tile/styles.js +2 -2
- package/lib/commonjs/components/Tile/styles.js.map +1 -1
- package/lib/commonjs/styles/constants.js +16 -0
- package/lib/commonjs/styles/constants.js.map +1 -0
- package/lib/module/components/Badge/styles.js +1 -1
- package/lib/module/components/Badge/styles.js.map +1 -1
- package/lib/module/components/Button/styles.js +1 -1
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/CLAUDE.md +2 -2
- package/lib/module/components/Checkbox/styles.js +1 -1
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Chip/styles.js +1 -1
- package/lib/module/components/Chip/styles.js.map +1 -1
- package/lib/module/components/CurrencyInput/styles.js +1 -1
- package/lib/module/components/CurrencyInput/styles.js.map +1 -1
- package/lib/module/components/Dialog/styles.js +1 -1
- package/lib/module/components/Dialog/styles.js.map +1 -1
- package/lib/module/components/Field/styles.js +1 -1
- package/lib/module/components/Field/styles.js.map +1 -1
- package/lib/module/components/IconButton/styles.js +1 -1
- package/lib/module/components/IconButton/styles.js.map +1 -1
- package/lib/module/components/Input/styles.js +1 -1
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/Link/styles.js +1 -1
- package/lib/module/components/Link/styles.js.map +1 -1
- package/lib/module/components/ListItem/styles.js +1 -1
- package/lib/module/components/ListItem/styles.js.map +1 -1
- package/lib/module/components/QuickActionButton/styles.js +1 -1
- package/lib/module/components/QuickActionButton/styles.js.map +1 -1
- package/lib/module/components/Radio/styles.js +1 -1
- package/lib/module/components/Radio/styles.js.map +1 -1
- package/lib/module/components/Select/styles.js +1 -1
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Textarea/styles.js +1 -1
- package/lib/module/components/Textarea/styles.js.map +1 -1
- package/lib/module/components/Tile/styles.js +1 -1
- package/lib/module/components/Tile/styles.js.map +1 -1
- package/lib/module/styles/constants.js +12 -0
- package/lib/module/styles/constants.js.map +1 -0
- package/lib/typescript/styles/constants.d.ts +4 -0
- package/lib/typescript/styles/constants.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/components/Badge/styles.ts +1 -1
- package/src/components/Button/styles.ts +1 -1
- package/src/components/CLAUDE.md +2 -2
- package/src/components/Checkbox/styles.ts +1 -1
- package/src/components/Chip/styles.ts +1 -1
- package/src/components/CurrencyInput/styles.ts +1 -1
- package/src/components/Dialog/styles.ts +1 -1
- package/src/components/Field/styles.ts +1 -1
- package/src/components/IconButton/styles.ts +1 -1
- package/src/components/Input/styles.ts +1 -1
- package/src/components/Link/styles.ts +1 -1
- package/src/components/ListItem/styles.ts +1 -1
- package/src/components/QuickActionButton/styles.ts +1 -1
- package/src/components/Radio/styles.ts +1 -1
- package/src/components/Select/styles.ts +1 -1
- package/src/components/Textarea/styles.ts +1 -1
- package/src/components/Tile/styles.ts +1 -1
- package/src/styles/constants.ts +10 -0
- package/lib/commonjs/styles/index.js +0 -17
- package/lib/commonjs/styles/index.js.map +0 -1
- package/lib/commonjs/styles/primitives.js +0 -159
- package/lib/commonjs/styles/primitives.js.map +0 -1
- package/lib/module/styles/index.js +0 -4
- package/lib/module/styles/index.js.map +0 -1
- package/lib/module/styles/primitives.js +0 -155
- package/lib/module/styles/primitives.js.map +0 -1
- package/lib/typescript/styles/index.d.ts +0 -2
- package/lib/typescript/styles/index.d.ts.map +0 -1
- package/lib/typescript/styles/primitives.d.ts +0 -123
- package/lib/typescript/styles/primitives.d.ts.map +0 -1
- package/src/styles/index.ts +0 -1
- package/src/styles/primitives.ts +0 -143
package/src/styles/primitives.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
// packages/components/src/styles/primitives.ts
|
|
2
|
-
// Semantic constants for Forge UI component styling.
|
|
3
|
-
|
|
4
|
-
// ─── Colors ──────────────────────────────────────────────
|
|
5
|
-
// Surface & background
|
|
6
|
-
/** @deprecated Use `bg-surface-primary` (--color-surface-primary) instead. */
|
|
7
|
-
export const COLOR_BG_PRIMARY = 'bg-white';
|
|
8
|
-
/** @deprecated Use `bg-surface-secondary` (--color-surface-secondary) instead. */
|
|
9
|
-
export const COLOR_BG_SUBTLE = 'bg-slate-50';
|
|
10
|
-
/** @deprecated Use `bg-surface-neutral-subtle` (--color-surface-neutral-subtle) instead. */
|
|
11
|
-
export const COLOR_BG_MUTED = 'bg-slate-100';
|
|
12
|
-
/** @deprecated Use `bg-base-950` (--color-base-950) instead. */
|
|
13
|
-
export const COLOR_BG_INVERSE = 'bg-slate-900';
|
|
14
|
-
|
|
15
|
-
// Border
|
|
16
|
-
/** @deprecated Use `border-stroke-secondary` (--color-stroke-secondary) instead. */
|
|
17
|
-
export const COLOR_BORDER_DEFAULT = 'border-slate-200';
|
|
18
|
-
/** @deprecated Use `border-stroke-hover` (--color-stroke-hover) instead. */
|
|
19
|
-
export const COLOR_BORDER_STRONG = 'border-slate-300';
|
|
20
|
-
/** @deprecated Use `border-stroke-focus` (--color-stroke-focus) instead. */
|
|
21
|
-
export const COLOR_BORDER_FOCUS = 'border-slate-900';
|
|
22
|
-
/** @deprecated Use `border-stroke-danger` (--color-stroke-danger) instead. */
|
|
23
|
-
export const COLOR_BORDER_INVALID = 'border-red-500';
|
|
24
|
-
|
|
25
|
-
// Text
|
|
26
|
-
/** @deprecated Use `text-content-primary` (--color-content-primary) instead. */
|
|
27
|
-
export const COLOR_TEXT_PRIMARY = 'text-slate-900';
|
|
28
|
-
/** @deprecated Use `text-content-secondary` (--color-content-secondary) instead. */
|
|
29
|
-
export const COLOR_TEXT_SECONDARY = 'text-slate-500';
|
|
30
|
-
/** @deprecated Use `text-content-tertiary` (--color-content-tertiary) instead. */
|
|
31
|
-
export const COLOR_TEXT_MUTED = 'text-slate-400';
|
|
32
|
-
/** @deprecated Use the appropriate `text-content-*-on-strong` token for the surface color, e.g. `text-content-action-on-strong` (--color-content-action-on-strong). */
|
|
33
|
-
export const COLOR_TEXT_INVERSE = 'text-white';
|
|
34
|
-
/** @deprecated Use `text-content-tertiary` (--color-content-tertiary) instead. */
|
|
35
|
-
export const COLOR_TEXT_PLACEHOLDER = 'text-slate-400';
|
|
36
|
-
/** @deprecated Use `text-content-danger` (--color-content-danger) instead. */
|
|
37
|
-
export const COLOR_TEXT_INVALID = 'text-red-600';
|
|
38
|
-
|
|
39
|
-
// Brand / Action
|
|
40
|
-
/** @deprecated Use `bg-surface-action-strong` (--color-surface-action-strong) instead. */
|
|
41
|
-
export const COLOR_BRAND_DEFAULT = 'bg-slate-900';
|
|
42
|
-
/** @deprecated Use `bg-surface-action-strong-hover` (--color-surface-action-strong-hover) instead. */
|
|
43
|
-
export const COLOR_BRAND_HOVER = 'bg-slate-800';
|
|
44
|
-
/** @deprecated Use `bg-surface-action-strong-active` (--color-surface-action-strong-active) instead. */
|
|
45
|
-
export const COLOR_BRAND_ACTIVE = 'bg-slate-700';
|
|
46
|
-
|
|
47
|
-
// Accent (for checked states, active indicators)
|
|
48
|
-
/** @deprecated Use `bg-surface-action-strong` (--color-surface-action-strong) instead. */
|
|
49
|
-
export const COLOR_ACCENT_DEFAULT = 'bg-slate-900';
|
|
50
|
-
/** @deprecated Use `border-stroke-action` (--color-stroke-action) instead. */
|
|
51
|
-
export const COLOR_ACCENT_BORDER = 'border-slate-900';
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @deprecated Use semantic token classes directly instead. Map each color key to its
|
|
55
|
-
* corresponding `--color-surface-*`, `--color-stroke-*`, and `--color-content-*` tokens:
|
|
56
|
-
* - `bg` → `bg-surface-{color}-strong` (--color-surface-{color}-strong)
|
|
57
|
-
* - `bgHover` → `bg-surface-{color}-strong-hover` (--color-surface-{color}-strong-hover)
|
|
58
|
-
* - `bgActive` → `bg-surface-{color}-strong-active` (--color-surface-{color}-strong-active)
|
|
59
|
-
* - `border` → `border-stroke-{color}` (--color-stroke-{color})
|
|
60
|
-
* - `text` → `text-content-{color}` (--color-content-{color})
|
|
61
|
-
* - `ring` → `ring-[--color-stroke-focus]` (--color-stroke-focus)
|
|
62
|
-
*
|
|
63
|
-
* See Button/styles.ts for a complete migration example.
|
|
64
|
-
*/
|
|
65
|
-
export const SEMANTIC_COLORS = {
|
|
66
|
-
action: {
|
|
67
|
-
bg: 'bg-slate-900',
|
|
68
|
-
bgHover: 'bg-slate-800',
|
|
69
|
-
bgActive: 'bg-slate-700',
|
|
70
|
-
border: 'border-slate-900',
|
|
71
|
-
text: 'text-slate-900',
|
|
72
|
-
ring: 'ring-slate-400/50',
|
|
73
|
-
},
|
|
74
|
-
danger: {
|
|
75
|
-
bg: 'bg-red-600',
|
|
76
|
-
bgHover: 'bg-red-700',
|
|
77
|
-
bgActive: 'bg-red-800',
|
|
78
|
-
border: 'border-red-600',
|
|
79
|
-
text: 'text-red-600',
|
|
80
|
-
ring: 'ring-red-400/50',
|
|
81
|
-
},
|
|
82
|
-
warning: {
|
|
83
|
-
bg: 'bg-amber-500',
|
|
84
|
-
bgHover: 'bg-amber-600',
|
|
85
|
-
bgActive: 'bg-amber-700',
|
|
86
|
-
border: 'border-amber-500',
|
|
87
|
-
text: 'text-amber-600',
|
|
88
|
-
ring: 'ring-amber-400/50',
|
|
89
|
-
},
|
|
90
|
-
success: {
|
|
91
|
-
bg: 'bg-green-600',
|
|
92
|
-
bgHover: 'bg-green-700',
|
|
93
|
-
bgActive: 'bg-green-800',
|
|
94
|
-
border: 'border-green-600',
|
|
95
|
-
text: 'text-green-600',
|
|
96
|
-
ring: 'ring-green-400/50',
|
|
97
|
-
},
|
|
98
|
-
info: {
|
|
99
|
-
bg: 'bg-sky-500',
|
|
100
|
-
bgHover: 'bg-sky-600',
|
|
101
|
-
bgActive: 'bg-sky-700',
|
|
102
|
-
border: 'border-sky-500',
|
|
103
|
-
text: 'text-sky-600',
|
|
104
|
-
ring: 'ring-sky-400/50',
|
|
105
|
-
},
|
|
106
|
-
} as const;
|
|
107
|
-
|
|
108
|
-
// ─── Focus ───────────────────────────────────────────────
|
|
109
|
-
/** @deprecated Use `ring-2 ring-[--color-stroke-focus] ring-offset-2` (--color-stroke-focus) instead. */
|
|
110
|
-
export const FOCUS_RING = 'ring-2 ring-slate-400/50 ring-offset-2';
|
|
111
|
-
|
|
112
|
-
// ─── Radius ──────────────────────────────────────────────
|
|
113
|
-
/** @deprecated Use `rounded-[var(--border-radius-button)]` for buttons/inputs or `rounded-[var(--border-radius-default)]` for containers. */
|
|
114
|
-
export const RADIUS_SM = 'rounded-lg';
|
|
115
|
-
/** @deprecated Use `rounded-[var(--border-radius-default)]` for cards/containers. */
|
|
116
|
-
export const RADIUS_MD = 'rounded-xl';
|
|
117
|
-
/** @deprecated Use `rounded-[var(--border-radius-round)]` for circular elements (icon buttons, radio, pills). */
|
|
118
|
-
export const RADIUS_FULL = 'rounded-full';
|
|
119
|
-
|
|
120
|
-
// ─── Shadows ─────────────────────────────────────────────
|
|
121
|
-
|
|
122
|
-
/** @deprecated Use `shadow-sm` directly instead */
|
|
123
|
-
export const SHADOW_SM = 'shadow-sm';
|
|
124
|
-
/** @deprecated Use `shadow-md` directly instead */
|
|
125
|
-
export const SHADOW_MD = 'shadow-md';
|
|
126
|
-
|
|
127
|
-
// ─── Sizing ──────────────────────────────────────────────
|
|
128
|
-
// Unified size scale for interactive/form components (Button, Input, Select, Checkbox).
|
|
129
|
-
// Only two sizes: 'default' (regular) and 'small' (compact).
|
|
130
|
-
// NOTE: Text and Heading use a separate typography scale (xs/sm/md/lg/xl) — not this.
|
|
131
|
-
/** @deprecated */
|
|
132
|
-
export const SIZE_SCALE = {
|
|
133
|
-
default: { height: 'h-10', px: 'px-4', gap: 'gap-2', text: 'text-base' },
|
|
134
|
-
small: { height: 'h-8', px: 'px-3', gap: 'gap-1.5', text: 'text-sm' },
|
|
135
|
-
} as const;
|
|
136
|
-
|
|
137
|
-
// ─── Transitions ─────────────────────────────────────────
|
|
138
|
-
export const TRANSITION_COLORS = 'transition-colors duration-150';
|
|
139
|
-
|
|
140
|
-
// ─── Disabled ────────────────────────────────────────────
|
|
141
|
-
export const DISABLED_OPACITY = 'data-[disabled=true]:opacity-50';
|
|
142
|
-
export const DISABLED_CURSOR =
|
|
143
|
-
'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none';
|