@cosxai/ui 0.2.0 → 0.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosxai/ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "COSX design system — React 19 component primitives shared across product-meta and other consumers",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -38,10 +38,15 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
38
38
  const ADDON_STYLE = {
39
39
  display: "inline-flex",
40
40
  alignItems: "center",
41
- padding: "0 10px",
41
+ padding: "0 12px",
42
42
  font: "400 13px/1 var(--ck-font-mono, var(--ck-font-sans))",
43
- color: "var(--ck-text-tertiary)",
44
- background: "var(--ck-bg-subtle, transparent)",
43
+ color: "var(--ck-text-secondary)",
44
+ // `--ck-bg-muted` is the canonical "slightly recessed slab"
45
+ // background — gives the addon visible separation from the input
46
+ // (`--ck-bg-surface`) without needing a hard divider line. The
47
+ // bg shift carries across all chromes; tokens.css defines a
48
+ // muted tone per chrome (light + dark).
49
+ background: "var(--ck-bg-muted)",
45
50
  whiteSpace: "nowrap" as const,
46
51
  userSelect: "none" as const,
47
52
  };
@@ -71,7 +76,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
71
76
  style={{
72
77
  flex: hasAddon ? "1 1 auto" : undefined,
73
78
  minWidth: 0,
74
- height: hasAddon ? "100%" : 34,
79
+ height: hasAddon ? "100%" : 36,
75
80
  padding: "0 12px",
76
81
  font: "400 13px/1 var(--ck-font-sans)",
77
82
  background: "var(--ck-bg-surface)",
@@ -110,7 +115,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
110
115
  style={{
111
116
  display: "flex",
112
117
  alignItems: "stretch",
113
- height: 34,
118
+ height: 36,
114
119
  background: "var(--ck-bg-surface)",
115
120
  border: fieldBorder,
116
121
  borderRadius: fieldRadius,
@@ -118,25 +123,13 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
118
123
  }}
119
124
  >
120
125
  {prefix != null && (
121
- <span
122
- className="ck-input-addon ck-input-addon--prefix"
123
- style={{
124
- ...ADDON_STYLE,
125
- borderRight: "1px solid var(--ck-border-subtle)",
126
- }}
127
- >
126
+ <span className="ck-input-addon ck-input-addon--prefix" style={ADDON_STYLE}>
128
127
  {prefix}
129
128
  </span>
130
129
  )}
131
130
  {inputEl}
132
131
  {suffix != null && (
133
- <span
134
- className="ck-input-addon ck-input-addon--suffix"
135
- style={{
136
- ...ADDON_STYLE,
137
- borderLeft: "1px solid var(--ck-border-subtle)",
138
- }}
139
- >
132
+ <span className="ck-input-addon ck-input-addon--suffix" style={ADDON_STYLE}>
140
133
  {suffix}
141
134
  </span>
142
135
  )}