@senvenli/react 0.3.1 → 0.3.3

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.
@@ -211,7 +211,7 @@
211
211
  "type": "Density",
212
212
  "required": false,
213
213
  "origin": "own",
214
- "description": "`compact` (36px rows) by default: DataTable is the dense working list of a back office.",
214
+ "description": "`comfortable` (default, rows of at least 48px) or `compact` (36px rows) for a dense screen that needs every row in view.",
215
215
  "schema": {
216
216
  "type": "string",
217
217
  "enum": [
@@ -283,6 +283,7 @@
283
283
  "ds-size-row",
284
284
  "ds-size-row-compact",
285
285
  "ds-space-050",
286
+ "ds-space-100",
286
287
  "ds-space-150",
287
288
  "ds-space-200",
288
289
  "ds-space-300",
@@ -1600,7 +1600,8 @@
1600
1600
  "SidebarItem",
1601
1601
  "SidebarSubmenu",
1602
1602
  "SidebarSection",
1603
- "SidebarFooter"
1603
+ "SidebarFooter",
1604
+ "SidebarAccount"
1604
1605
  ],
1605
1606
  "genui": false
1606
1607
  },
@@ -1859,6 +1860,27 @@
1859
1860
  ],
1860
1861
  "genui": false
1861
1862
  },
1863
+ {
1864
+ "name": "tour",
1865
+ "title": "Tour",
1866
+ "family": "overlay",
1867
+ "status": "alpha",
1868
+ "description": "A guided tour: a short sequence of steps, each pointing at a part of the page with a title, a sentence and Back, Next and Done.",
1869
+ "keywords": [
1870
+ "tour",
1871
+ "product tour",
1872
+ "onboarding",
1873
+ "walkthrough",
1874
+ "coachmark",
1875
+ "guided tour",
1876
+ "spotlight"
1877
+ ],
1878
+ "import": "@senvenli/react/overlay",
1879
+ "exports": [
1880
+ "Tour"
1881
+ ],
1882
+ "genui": false
1883
+ },
1862
1884
  {
1863
1885
  "name": "autocomplete",
1864
1886
  "title": "Autocomplete",
@@ -12,7 +12,8 @@
12
12
  "SidebarItem",
13
13
  "SidebarSubmenu",
14
14
  "SidebarSection",
15
- "SidebarFooter"
15
+ "SidebarFooter",
16
+ "SidebarAccount"
16
17
  ],
17
18
  "description": "The main navigation of an app: brand, sections with nested items and badges, a pinned footer, collapsible to icons.",
18
19
  "keywords": [
@@ -60,6 +61,11 @@
60
61
  "genui": {
61
62
  "expose": false
62
63
  },
64
+ "guidance": [
65
+ {
66
+ "rule": "Put the signed-in person in the footer with SidebarAccount (name, description, avatarSrc, items): a row that opens the account menu, and, collapsed, a square the size of a nav icon with the name as its tooltip, so sign-out stays reachable."
67
+ }
68
+ ],
63
69
  "source": [
64
70
  "src/navigation/sidebar.tsx"
65
71
  ],
@@ -536,6 +542,51 @@
536
542
  "origin": "own",
537
543
  "description": "The account's Avatar before the rest; collapsed, the rail shows it alone. As the Sidebar's `avatar`."
538
544
  }
545
+ ],
546
+ "SidebarAccount": [
547
+ {
548
+ "name": "name",
549
+ "type": "string",
550
+ "required": true,
551
+ "origin": "own",
552
+ "description": "The person's name: the row's first line, the trigger's name and, collapsed, its tooltip.",
553
+ "schema": {
554
+ "type": "string"
555
+ }
556
+ },
557
+ {
558
+ "name": "description",
559
+ "type": "string",
560
+ "required": false,
561
+ "origin": "own",
562
+ "description": "The second line: an email or a role.",
563
+ "schema": {
564
+ "type": "string"
565
+ }
566
+ },
567
+ {
568
+ "name": "avatarSrc",
569
+ "type": "string",
570
+ "required": false,
571
+ "origin": "own",
572
+ "description": "A photo; the name's initials otherwise.",
573
+ "schema": {
574
+ "type": "string"
575
+ }
576
+ },
577
+ {
578
+ "name": "items",
579
+ "type": "readonly MenuEntry[]",
580
+ "required": true,
581
+ "origin": "own",
582
+ "description": "The account menu: profile, settings, sign out (a `danger` item goes last)."
583
+ },
584
+ {
585
+ "name": "onAction",
586
+ "type": "(id: Key) => void",
587
+ "required": false,
588
+ "origin": "own"
589
+ }
539
590
  ]
540
591
  },
541
592
  "tokens": [
@@ -569,7 +620,9 @@
569
620
  "collapseSidebar",
570
621
  "expandSidebar",
571
622
  "mainNavigation",
572
- "newTab"
623
+ "morePeople",
624
+ "newTab",
625
+ "online"
573
626
  ],
574
627
  "quality": {
575
628
  "tests": true,
@@ -145,7 +145,7 @@
145
145
  "comfortable",
146
146
  "compact"
147
147
  ],
148
- "description": "`compact` (36px rows) for dense working screens; `default` (48px) for public and content pages."
148
+ "description": "`comfortable` (default: rows of at least 48px, 12px above and below a value, 24px at the edges) or `compact` (36px rows) for dense working screens."
149
149
  }
150
150
  },
151
151
  "required": [
@@ -299,7 +299,7 @@
299
299
  "type": "Density",
300
300
  "required": false,
301
301
  "origin": "own",
302
- "description": "`compact` (36px rows) for dense working screens; `default` (48px) for public and content pages.",
302
+ "description": "`comfortable` (default: rows of at least 48px, 12px above and below a value, 24px at the edges) or `compact` (36px rows) for dense working screens.",
303
303
  "schema": {
304
304
  "type": "string",
305
305
  "enum": [
@@ -347,6 +347,7 @@
347
347
  "ds-size-row",
348
348
  "ds-size-row-compact",
349
349
  "ds-space-050",
350
+ "ds-space-100",
350
351
  "ds-space-150",
351
352
  "ds-space-200",
352
353
  "ds-space-300",
@@ -0,0 +1,327 @@
1
+ {
2
+ "$schema": "https://design.senvenli.com/schema/component.full.json",
3
+ "kind": "component",
4
+ "family": "overlay",
5
+ "status": "alpha",
6
+ "import": "@senvenli/react/overlay",
7
+ "name": "tour",
8
+ "title": "Tour",
9
+ "exports": [
10
+ "Tour"
11
+ ],
12
+ "description": "A guided tour: a short sequence of steps, each pointing at a part of the page with a title, a sentence and Back, Next and Done.",
13
+ "keywords": [
14
+ "tour",
15
+ "product tour",
16
+ "onboarding",
17
+ "walkthrough",
18
+ "coachmark",
19
+ "guided tour",
20
+ "spotlight"
21
+ ],
22
+ "usage": {
23
+ "when": [
24
+ "Introducing a screen's main parts to someone new, once, in three to seven steps.",
25
+ "Showing what changed after a redesign, pointing at each moved part."
26
+ ],
27
+ "instead": [
28
+ {
29
+ "use": "popover",
30
+ "when": "One hint about one control, opened on purpose."
31
+ },
32
+ {
33
+ "use": "empty-state",
34
+ "when": "Teaching the first action on an empty screen."
35
+ },
36
+ {
37
+ "use": "dialog",
38
+ "when": "A message that does not point at anything on the page."
39
+ }
40
+ ]
41
+ },
42
+ "guidance": [
43
+ {
44
+ "rule": "Keep it short: a few steps, a few words of title and one or two sentences each. Nobody reads a tenth step."
45
+ },
46
+ {
47
+ "rule": "Always let people leave. Skip, the close button and Esc call onSkip; Done calls onFinish, so the app can remember which."
48
+ },
49
+ {
50
+ "rule": "Point at things that are on the screen. A target on another route is waited for (targetTimeout), then shown centred or skipped (missingTarget)."
51
+ },
52
+ {
53
+ "rule": "The page is dimmed and the target cannot be pressed by default. Use mask={false} for a step that asks people to use the page."
54
+ }
55
+ ],
56
+ "a11y": {
57
+ "builtIn": [
58
+ "Each step is a dialog named by its title and described by its sentence; modal with the default mask (focus stays in the panel, the page is hidden from screen readers), non-modal with mask={false}.",
59
+ "The step's heading takes focus on every step and a status line announces \"Step 2 of 5\".",
60
+ "Left and Right arrows move between steps, mirrored right to left, and leave text fields alone; Esc skips.",
61
+ "Focus returns to where it was when the tour closes.",
62
+ "With reduced motion the panel and the lit area move without animation and scrolling to a target is instant."
63
+ ],
64
+ "youProvide": [
65
+ "A title that says what the step shows, not \"Step 1\".",
66
+ "A way to start the tour again later (a Help menu item), since a skipped tour is gone."
67
+ ]
68
+ },
69
+ "related": [
70
+ "popover",
71
+ "dialog",
72
+ "stepper"
73
+ ],
74
+ "genui": {
75
+ "expose": false
76
+ },
77
+ "source": [
78
+ "src/overlay/tour.tsx"
79
+ ],
80
+ "props": {
81
+ "Tour": [
82
+ {
83
+ "name": "steps",
84
+ "type": "readonly TourStep[]",
85
+ "required": true,
86
+ "origin": "own",
87
+ "schema": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "properties": {
93
+ "id": {
94
+ "type": "string"
95
+ },
96
+ "title": {
97
+ "type": "string"
98
+ },
99
+ "description": {
100
+ "type": "string"
101
+ },
102
+ "placement": {
103
+ "type": "string",
104
+ "enum": [
105
+ "top",
106
+ "bottom",
107
+ "start",
108
+ "end"
109
+ ]
110
+ }
111
+ },
112
+ "required": [
113
+ "title"
114
+ ]
115
+ }
116
+ }
117
+ },
118
+ {
119
+ "name": "isOpen",
120
+ "type": "boolean",
121
+ "required": false,
122
+ "origin": "own",
123
+ "schema": {
124
+ "type": "boolean"
125
+ }
126
+ },
127
+ {
128
+ "name": "defaultOpen",
129
+ "type": "boolean",
130
+ "required": false,
131
+ "origin": "own",
132
+ "schema": {
133
+ "type": "boolean"
134
+ }
135
+ },
136
+ {
137
+ "name": "onOpenChange",
138
+ "type": "(isOpen: boolean) => void",
139
+ "required": false,
140
+ "origin": "own"
141
+ },
142
+ {
143
+ "name": "step",
144
+ "type": "number",
145
+ "required": false,
146
+ "origin": "own",
147
+ "description": "The current step's index (0-based), controlled.",
148
+ "schema": {
149
+ "type": "number"
150
+ }
151
+ },
152
+ {
153
+ "name": "defaultStep",
154
+ "type": "number",
155
+ "required": false,
156
+ "origin": "own",
157
+ "description": "The step an uncontrolled tour starts at each time it opens; default 0.",
158
+ "schema": {
159
+ "type": "number"
160
+ }
161
+ },
162
+ {
163
+ "name": "onStepChange",
164
+ "type": "(step: number) => void",
165
+ "required": false,
166
+ "origin": "own"
167
+ },
168
+ {
169
+ "name": "onFinish",
170
+ "type": "() => void",
171
+ "required": false,
172
+ "origin": "own",
173
+ "description": "Done on the last step. The tour then closes."
174
+ },
175
+ {
176
+ "name": "onSkip",
177
+ "type": "() => void",
178
+ "required": false,
179
+ "origin": "own",
180
+ "description": "Skip, the close button or Esc. The tour then closes. Kept apart from `onFinish` so an app can tell them apart."
181
+ },
182
+ {
183
+ "name": "mask",
184
+ "type": "boolean",
185
+ "required": false,
186
+ "origin": "own",
187
+ "description": "`true` (default): the page is dimmed except the target, which cannot be pressed, and focus stays in the panel\n(a modal dialog). `false`: no dimming, the page stays usable and the panel is a non-modal dialog.",
188
+ "schema": {
189
+ "type": "boolean"
190
+ }
191
+ },
192
+ {
193
+ "name": "spotlightPadding",
194
+ "type": "number",
195
+ "required": false,
196
+ "origin": "own",
197
+ "description": "Room between the target and the edge of the lit area, in px; default 6.",
198
+ "schema": {
199
+ "type": "number"
200
+ }
201
+ },
202
+ {
203
+ "name": "placement",
204
+ "type": "TourPlacement",
205
+ "required": false,
206
+ "origin": "own",
207
+ "description": "The side of the target the panel prefers; default `bottom`. It flips when that side has no room.",
208
+ "schema": {
209
+ "type": "string",
210
+ "enum": [
211
+ "top",
212
+ "bottom",
213
+ "start",
214
+ "end"
215
+ ]
216
+ }
217
+ },
218
+ {
219
+ "name": "showProgress",
220
+ "type": "boolean",
221
+ "required": false,
222
+ "origin": "own",
223
+ "description": "\"Step 2 of 5\" above the title; default true.",
224
+ "schema": {
225
+ "type": "boolean"
226
+ }
227
+ },
228
+ {
229
+ "name": "scrollIntoView",
230
+ "type": "boolean",
231
+ "required": false,
232
+ "origin": "own",
233
+ "description": "Scroll a target that is out of view to the middle of the screen; default true.",
234
+ "schema": {
235
+ "type": "boolean"
236
+ }
237
+ },
238
+ {
239
+ "name": "targetTimeout",
240
+ "type": "number",
241
+ "required": false,
242
+ "origin": "own",
243
+ "description": "How long to wait for a target that is not on the page yet (a route still loading), in ms; default 3000.",
244
+ "schema": {
245
+ "type": "number"
246
+ }
247
+ },
248
+ {
249
+ "name": "missingTarget",
250
+ "type": "\"center\" | \"skip\"",
251
+ "required": false,
252
+ "origin": "own",
253
+ "description": "When a target never appears: `center` (default) shows the step as a centred panel; `skip` moves on in the direction of travel.",
254
+ "schema": {
255
+ "type": "string",
256
+ "enum": [
257
+ "center",
258
+ "skip"
259
+ ]
260
+ }
261
+ },
262
+ {
263
+ "name": "isKeyboardNavigationDisabled",
264
+ "type": "boolean",
265
+ "required": false,
266
+ "origin": "own",
267
+ "description": "Turn off the arrow keys moving between steps. Esc still skips.",
268
+ "schema": {
269
+ "type": "boolean"
270
+ }
271
+ },
272
+ {
273
+ "name": "motion",
274
+ "type": "ComponentMotion",
275
+ "required": false,
276
+ "origin": "own",
277
+ "description": "`auto` (follow the device), `reduce` or `none`, for this component; the provider's setting otherwise.",
278
+ "schema": {
279
+ "type": "string",
280
+ "enum": [
281
+ "none",
282
+ "auto",
283
+ "reduce"
284
+ ]
285
+ }
286
+ }
287
+ ]
288
+ },
289
+ "tokens": [
290
+ "ds-blanket",
291
+ "ds-border-focused",
292
+ "ds-easing-enter",
293
+ "ds-easing-exit",
294
+ "ds-radius-large",
295
+ "ds-radius-medium",
296
+ "ds-radius-small",
297
+ "ds-radius-xlarge",
298
+ "ds-shadow-overlay",
299
+ "ds-space-050",
300
+ "ds-space-100",
301
+ "ds-space-150",
302
+ "ds-space-200",
303
+ "ds-space-300",
304
+ "ds-surface-overlay",
305
+ "ds-text",
306
+ "ds-text-subtle"
307
+ ],
308
+ "strings": [
309
+ "close",
310
+ "newTab",
311
+ "stepNOf",
312
+ "tourBack",
313
+ "tourFinish",
314
+ "tourNext",
315
+ "tourSkip"
316
+ ],
317
+ "quality": {
318
+ "tests": true,
319
+ "a11y": false,
320
+ "docs": false,
321
+ "visual": false,
322
+ "dark": false,
323
+ "rtl": false,
324
+ "mcp": true,
325
+ "generic": true
326
+ }
327
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senvenli/react",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Senvenli UI web components (React Aria Components + Tailwind v4).",
5
5
  "license": "MIT",
6
6
  "author": "Senvenli",
@@ -94,7 +94,7 @@
94
94
  "clsx": "^2.1.1",
95
95
  "recharts": "^3.11.0",
96
96
  "tailwind-merge": "^3.5.0",
97
- "@senvenli/tokens": "^0.3.1"
97
+ "@senvenli/tokens": "^0.3.3"
98
98
  },
99
99
  "peerDependencies": {
100
100
  "lucide-react": "^1.34.0",