@botiverse/raft-ui 0.0.0-stage → 0.7.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +561 -0
  2. package/LICENSE +21 -0
  3. package/README.md +103 -2
  4. package/codemods/package-name.mjs +166 -0
  5. package/codemods/token-names.mjs +150 -0
  6. package/dist/cn.d.mts +5 -0
  7. package/dist/cn.mjs +48 -0
  8. package/dist/components/combobox-select/combobox-select.css +286 -0
  9. package/dist/components/float-button/float-button.css +316 -0
  10. package/dist/components/steps/otter-indicator.css +141 -0
  11. package/dist/components/steps/steps.css +370 -0
  12. package/dist/components/timeline/timeline.css +255 -0
  13. package/dist/dialog-CY6S-Xqf.mjs +505 -0
  14. package/dist/fonts.css +13 -0
  15. package/dist/foundation.css +623 -0
  16. package/dist/index-B3_j9XYd.d.mts +329 -0
  17. package/dist/index.d.mts +5114 -0
  18. package/dist/index.mjs +16442 -0
  19. package/dist/style.css +1315 -0
  20. package/dist/styles.css +391 -0
  21. package/dist/tokens.json +3811 -0
  22. package/dist/wip.d.mts +92 -0
  23. package/dist/wip.mjs +517 -0
  24. package/package.json +92 -3
  25. package/skills/raft-ui-critique/SKILL.md +167 -0
  26. package/skills/raft-ui-critique/agents/openai.yaml +4 -0
  27. package/skills/raft-ui-critique/references/theme-lenses.md +69 -0
  28. package/skills/raft-ui-guide/SKILL.md +96 -0
  29. package/skills/raft-ui-guide/agents/openai.yaml +4 -0
  30. package/skills/raft-ui-guide/rules/adoption.md +55 -0
  31. package/skills/raft-ui-guide/rules/composition.md +14 -0
  32. package/skills/raft-ui-guide/rules/conversation.md +15 -0
  33. package/skills/raft-ui-guide/rules/display.md +14 -0
  34. package/skills/raft-ui-guide/rules/feedback.md +13 -0
  35. package/skills/raft-ui-guide/rules/forms.md +13 -0
  36. package/skills/raft-ui-guide/rules/layout.md +15 -0
  37. package/skills/raft-ui-guide/rules/lookup.md +78 -0
  38. package/skills/raft-ui-guide/rules/overlays.md +13 -0
  39. package/skills/raft-ui-guide/rules/overview.md +30 -0
  40. package/skills/raft-ui-guide/rules/styling.md +17 -0
  41. package/skills/raft-ui-guide/rules/technical-overview.md +80 -0
@@ -0,0 +1,255 @@
1
+ /* Timeline pure CSS styling following pattern/Button.css architecture
2
+ - Local CSS variables (--r-timeline-*) declared on the list; items inherit them
3
+ - Modifier classes rebind local variables
4
+ - Component styles strictly consume local variables
5
+ - Every marker is a status pixel: a 9px square in the item's colour with a
6
+ 1.5px sticker-ink edge, strung on a hairline. Titles are 14/20 ink,
7
+ details and times Space Mono 12 in ink-3, the time on the right of the
8
+ row. One scale for every size; `lg` only opens the title to 16/24.
9
+ */
10
+
11
+ /* ─────────────────────────────────────────────────────────────────────────
12
+ 1. Local Variable Definitions & Modifier Overrides
13
+ ───────────────────────────────────────────────────────────────────────── */
14
+
15
+ .r-timeline {
16
+ --r-timeline-icon-size: var(--r-timeline-custom-icon-size, 9px);
17
+ --r-timeline-title-font-size: 14px;
18
+ --r-timeline-content-font-size: 12px;
19
+ --r-timeline-time-font-size: 12px;
20
+ --r-timeline-line-height: 20px;
21
+ --r-timeline-item-inner-gap: 2px;
22
+ --r-timeline-title-font-family: var(--font-sans);
23
+ --r-timeline-title-font-weight: 400;
24
+ --r-timeline-gap: 12px;
25
+ --r-timeline-item-gap: 12px;
26
+ --r-timeline-horizontal-item-gap: 40px;
27
+ --r-timeline-line-width: 1px;
28
+ --r-timeline-line-color: var(--line-hairline);
29
+ --r-timeline-marker-border-width: 1.5px;
30
+ --r-timeline-marker-radius: 2px;
31
+ /* How much of the variant's fill the marker takes, and its outline. */
32
+ --r-timeline-marker-fill: 100%;
33
+ --r-timeline-marker-border-color: var(--sticker-ink);
34
+ /* How far each marker sits below the item's top, to center on the title's first line. */
35
+ --r-timeline-axis-offset: calc((20px - var(--r-timeline-icon-size)) / 2);
36
+
37
+ &.r-timeline--lg {
38
+ --r-timeline-title-font-size: 16px;
39
+ --r-timeline-line-height: 24px;
40
+ --r-timeline-axis-offset: calc((24px - var(--r-timeline-icon-size)) / 2);
41
+ }
42
+
43
+ &.r-timeline--horizontal {
44
+ --r-timeline-axis-offset: 0px;
45
+ }
46
+ }
47
+
48
+ /* Markers take the presence colours (default = offline stone, accent = the
49
+ In Review lavender, since pink only means "do it"); task-status items keep
50
+ their status colour. */
51
+ .r-timeline-item {
52
+ --r-timeline-item-color: var(--foreground-hint);
53
+ --r-timeline-item-fill: var(--presence-offline);
54
+
55
+ &.r-timeline-item--information {
56
+ --r-timeline-item-color: var(--info-strong);
57
+ --r-timeline-item-fill: var(--info);
58
+ }
59
+ &.r-timeline-item--success {
60
+ --r-timeline-item-color: var(--success-strong);
61
+ --r-timeline-item-fill: var(--success);
62
+ }
63
+ &.r-timeline-item--warning {
64
+ --r-timeline-item-color: var(--warning-strong);
65
+ --r-timeline-item-fill: var(--warning);
66
+ }
67
+ &.r-timeline-item--danger {
68
+ --r-timeline-item-color: var(--danger-strong);
69
+ --r-timeline-item-fill: var(--danger);
70
+ }
71
+ /* Accent: the emphasis tone for review-type states, e.g. "in review". */
72
+ &.r-timeline-item--accent {
73
+ --r-timeline-item-color: var(--task-status-in-review-strong);
74
+ --r-timeline-item-fill: var(--task-status-in-review);
75
+ }
76
+ &.r-timeline-item--color {
77
+ --r-timeline-item-color: var(--r-timeline-custom-color);
78
+ --r-timeline-item-fill: var(--r-timeline-custom-color);
79
+ }
80
+
81
+ /* An icon in place of the pixel gets a 14px box. */
82
+ &[data-icon] {
83
+ --r-timeline-icon-size: var(--r-timeline-custom-icon-size, 14px);
84
+ --r-timeline-axis-offset: calc(
85
+ (var(--r-timeline-line-height) - var(--r-timeline-icon-size)) / 2
86
+ );
87
+ }
88
+ }
89
+
90
+ /* ─────────────────────────────────────────────────────────────────────────
91
+ 2. Component Styles
92
+ ───────────────────────────────────────────────────────────────────────── */
93
+
94
+ .r-timeline {
95
+ display: flex;
96
+ flex-direction: column;
97
+ line-height: var(--r-timeline-line-height);
98
+ list-style: none;
99
+ margin: 0;
100
+ padding: 0;
101
+ }
102
+
103
+ .r-timeline-item {
104
+ display: flex;
105
+ gap: var(--r-timeline-gap);
106
+ margin: 0;
107
+ padding: 0;
108
+ }
109
+
110
+ /* The axis: the marker, centered on the title's first line, then the line down to the next item. */
111
+ .r-timeline-item__axis {
112
+ align-items: center;
113
+ display: flex;
114
+ flex: none;
115
+ flex-direction: column;
116
+ padding-top: var(--r-timeline-axis-offset);
117
+ width: var(--r-timeline-icon-size);
118
+ }
119
+
120
+ .r-timeline-item__marker {
121
+ background: color-mix(
122
+ in oklch,
123
+ var(--r-timeline-item-fill) var(--r-timeline-marker-fill),
124
+ transparent
125
+ );
126
+ border: var(--r-timeline-marker-border-width) solid
127
+ var(--r-timeline-marker-border-color, var(--r-timeline-item-color));
128
+ border-radius: var(--r-timeline-marker-radius);
129
+ box-sizing: border-box;
130
+ flex: none;
131
+ height: var(--r-timeline-icon-size);
132
+ width: var(--r-timeline-icon-size);
133
+ }
134
+
135
+ .r-timeline-item__icon {
136
+ align-items: center;
137
+ color: var(--r-timeline-item-color);
138
+ display: flex;
139
+ flex: none;
140
+ font-size: var(--r-timeline-icon-size);
141
+ height: var(--r-timeline-icon-size);
142
+ justify-content: center;
143
+ width: var(--r-timeline-icon-size);
144
+
145
+ & svg {
146
+ height: 1em;
147
+ width: 1em;
148
+ }
149
+ }
150
+
151
+ .r-timeline-item__line {
152
+ border-inline-start: var(--r-timeline-line-width) solid var(--r-timeline-line-color);
153
+ flex: 1;
154
+ /* Runs on through the next item's offset, stopping 2px short of each
155
+ marker: a gap of the row's own background cuts the hairline around
156
+ each pixel. */
157
+ margin-bottom: calc(2px - var(--r-timeline-axis-offset));
158
+ margin-top: 2px;
159
+ }
160
+
161
+ .r-timeline-item--dashed > .r-timeline-item__axis > .r-timeline-item__line {
162
+ border-style: dashed;
163
+ }
164
+
165
+ .r-timeline-item:last-child > .r-timeline-item__axis > .r-timeline-item__line {
166
+ visibility: hidden;
167
+ }
168
+
169
+ .r-timeline-item__body {
170
+ flex: 1;
171
+ min-width: 0;
172
+ padding-bottom: var(--r-timeline-item-gap);
173
+ }
174
+
175
+ .r-timeline-item:last-child > .r-timeline-item__body {
176
+ padding-bottom: 0;
177
+ }
178
+
179
+ .r-timeline-title {
180
+ color: var(--foreground);
181
+ font-family: var(--r-timeline-title-font-family);
182
+ font-size: var(--r-timeline-title-font-size);
183
+ font-weight: var(--r-timeline-title-font-weight);
184
+ margin-bottom: var(--r-timeline-item-inner-gap);
185
+ overflow-wrap: anywhere;
186
+ }
187
+
188
+ .r-timeline-content {
189
+ color: var(--foreground-hint);
190
+ font-family: var(--font-mono);
191
+ font-size: var(--r-timeline-content-font-size);
192
+ line-height: 16px;
193
+ overflow-wrap: anywhere;
194
+ }
195
+
196
+ .r-timeline-time {
197
+ color: var(--foreground-hint);
198
+ font-family: var(--font-mono);
199
+ font-size: var(--r-timeline-time-font-size);
200
+ margin-top: var(--r-timeline-item-inner-gap);
201
+ white-space: nowrap;
202
+ }
203
+
204
+ /* Markers on the left: the row is [pixel | text | time], the time at the end
205
+ of the first line. */
206
+ .r-timeline--left > .r-timeline-item > .r-timeline-item__body {
207
+ column-gap: var(--r-timeline-gap);
208
+ display: grid;
209
+ grid-template-columns: minmax(0, 1fr) auto;
210
+
211
+ & > * {
212
+ grid-column: 1;
213
+ }
214
+ & > .r-timeline-time {
215
+ grid-column: 2;
216
+ grid-row: 1;
217
+ margin-top: 0;
218
+ }
219
+ }
220
+
221
+ /* Markers on the right: the axis moves to the end and the text aligns to it. */
222
+ .r-timeline--right > .r-timeline-item {
223
+ flex-direction: row-reverse;
224
+ text-align: end;
225
+ }
226
+
227
+ /* Horizontal: items in a row, each marker followed by a line across to the next. */
228
+ .r-timeline--horizontal {
229
+ flex-direction: row;
230
+ }
231
+
232
+ .r-timeline--horizontal > .r-timeline-item {
233
+ flex: none;
234
+ flex-direction: column;
235
+
236
+ & > .r-timeline-item__axis {
237
+ flex-direction: row;
238
+ height: var(--r-timeline-icon-size);
239
+ padding-top: 0;
240
+ width: auto;
241
+ }
242
+ & > .r-timeline-item__axis > .r-timeline-item__line {
243
+ border-inline-start: 0;
244
+ border-top: var(--r-timeline-line-width) solid var(--r-timeline-line-color);
245
+ margin-bottom: 0;
246
+ margin-top: 0;
247
+ }
248
+ &.r-timeline-item--dashed > .r-timeline-item__axis > .r-timeline-item__line {
249
+ border-top-style: dashed;
250
+ }
251
+ & > .r-timeline-item__body {
252
+ padding-bottom: 0;
253
+ padding-inline-end: var(--r-timeline-horizontal-item-gap);
254
+ }
255
+ }