@crewlethq/ui 0.2.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.
@@ -0,0 +1,163 @@
1
+ /*
2
+ * Tag and TagsInput primitives. A Tag is a static label; with onRemove it
3
+ * becomes a removable chip, and TagsInput renders a row of those chips
4
+ * in front of its text field.
5
+ */
6
+
7
+ .crewlet-tag {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ gap: 6px;
11
+ padding: 4px 8px;
12
+ background-color: rgba(100, 100, 100, 0.15);
13
+ color: var(--color-text-primary);
14
+ border-radius: 6px;
15
+ font-size: 13px;
16
+ font-weight: 500;
17
+ border: 1px solid rgba(100, 100, 100, 0.25);
18
+ animation: crewlet-tag-fade-in 0.2s ease;
19
+ line-height: 1;
20
+ /* A tag is an atomic token: its label must never break across
21
+ lines inside the pill. Constrained layouts truncate with an
22
+ ellipsis via the label's max-width instead. */
23
+ white-space: nowrap;
24
+ max-width: 100%;
25
+ }
26
+
27
+ .crewlet-tag__label {
28
+ overflow: hidden;
29
+ text-overflow: ellipsis;
30
+ }
31
+
32
+ @keyframes crewlet-tag-fade-in {
33
+ from { opacity: 0; transform: scale(0.8); }
34
+ to { opacity: 1; transform: scale(1); }
35
+ }
36
+
37
+ .crewlet-tag__icon {
38
+ display: inline-flex;
39
+ align-items: center;
40
+ font-size: 14px;
41
+ color: var(--color-text-secondary);
42
+ }
43
+
44
+ .crewlet-tag__label {
45
+ line-height: 1;
46
+ }
47
+
48
+ /* sm is the compact chip geometry used for inline values (an event
49
+ name pill in an activity feed): 12px text in a fixed 26px pill (18px content line +
50
+ 3px vertical padding + 1px borders). The explicit height keeps
51
+ every small chip family (tags, agent chips, code pills) on one
52
+ baseline regardless of the content's own line box. */
53
+ .crewlet-tag--sm { padding: 3px 8px; font-size: 12px; height: 26px; }
54
+ .crewlet-tag--md { padding: 4px 8px; font-size: 13px; }
55
+
56
+ .crewlet-tag--monospace .crewlet-tag__label {
57
+ font-family: var(--font-family-mono);
58
+ font-size: 12px;
59
+ }
60
+
61
+ /* ── variants ───────────────────────────────────────────────────────── */
62
+ .crewlet-tag--neutral {
63
+ background-color: rgba(100, 100, 100, 0.15);
64
+ border-color: rgba(100, 100, 100, 0.25);
65
+ color: var(--color-text-primary);
66
+ }
67
+
68
+ .crewlet-tag--info {
69
+ background-color: rgba(59, 130, 246, 0.12);
70
+ border-color: rgba(59, 130, 246, 0.28);
71
+ color: #93c5fd;
72
+ }
73
+
74
+ .crewlet-tag--success {
75
+ background-color: rgba(34, 197, 94, 0.12);
76
+ border-color: rgba(34, 197, 94, 0.28);
77
+ color: #86efac;
78
+ }
79
+
80
+ .crewlet-tag--warn {
81
+ background-color: rgba(234, 179, 8, 0.14);
82
+ border-color: rgba(234, 179, 8, 0.30);
83
+ color: #fde68a;
84
+ }
85
+
86
+ .crewlet-tag--danger {
87
+ background-color: rgba(239, 68, 68, 0.14);
88
+ border-color: rgba(239, 68, 68, 0.30);
89
+ color: #fca5a5;
90
+ }
91
+
92
+ .crewlet-tag--brand {
93
+ background-color: rgba(var(--color-brand-accent-rgb, 84, 105, 212), 0.14);
94
+ border-color: rgba(var(--color-brand-accent-rgb, 84, 105, 212), 0.30);
95
+ color: var(--color-brand-accent, #5469d4);
96
+ }
97
+
98
+ /* ── remove button ──────────────────────────────────────────────────── */
99
+ .crewlet-tag__remove {
100
+ display: flex;
101
+ align-items: center;
102
+ justify-content: center;
103
+ background: rgba(100, 100, 100, 0.2);
104
+ border: none;
105
+ border-radius: 50%;
106
+ width: 18px;
107
+ height: 18px;
108
+ padding: 0;
109
+ cursor: pointer;
110
+ color: var(--color-text-secondary);
111
+ font-size: 16px;
112
+ line-height: 1;
113
+ font-weight: 600;
114
+ transition: all 0.15s ease;
115
+ }
116
+
117
+ .crewlet-tag__remove:hover {
118
+ background: rgba(239, 68, 68, 0.3);
119
+ color: #ef4444;
120
+ transform: scale(1.1);
121
+ }
122
+
123
+ /* ── TagsInput container ────────────────────────────────────────────── */
124
+ .crewlet-tags-input {
125
+ display: flex;
126
+ flex-wrap: wrap;
127
+ gap: 8px;
128
+ padding: 8px 12px;
129
+ min-height: 44px;
130
+ background-color: var(--color-surface-subtle);
131
+ border: 1px solid var(--color-border-default);
132
+ border-radius: 8px;
133
+ align-items: center;
134
+ cursor: text;
135
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
136
+ }
137
+
138
+ .crewlet-tags-input:focus-within {
139
+ border-color: var(--color-brand-accent);
140
+ box-shadow: var(--shadow-focus, 0 0 0 3px rgba(var(--color-brand-accent-rgb, 84, 105, 212), 0.15));
141
+ }
142
+
143
+ .crewlet-tags-input.is-disabled {
144
+ opacity: 0.6;
145
+ cursor: not-allowed;
146
+ }
147
+
148
+ .crewlet-tags-input__field {
149
+ flex: 1;
150
+ min-width: 120px;
151
+ border: none;
152
+ outline: none;
153
+ background: transparent;
154
+ color: var(--color-text-primary);
155
+ font-size: 14px;
156
+ padding: 4px;
157
+ font-family: inherit;
158
+ }
159
+
160
+ .crewlet-tags-input__field::placeholder {
161
+ color: var(--color-text-secondary);
162
+ opacity: 0.6;
163
+ }