@repobuddy/storybook 2.17.0 → 2.18.1
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.
|
@@ -8,12 +8,12 @@ type TagBadgeParameter = TagBadgeParameters[0];
|
|
|
8
8
|
/**
|
|
9
9
|
* Type representing the names of predefined tags used in Storybook stories.
|
|
10
10
|
*/
|
|
11
|
-
type TagNames = 'editor' | 'source' | 'type' | 'func' | 'var' | 'new' | 'beta' | 'props' | 'deprecated' | 'outdated' | 'danger' | 'todo' | 'code-only' | 'snapshot' | 'unit' | 'integration' | 'keyboard' | 'internal' | 'usecase' | 'use-case' | 'version:next';
|
|
11
|
+
type TagNames = '!test' | 'editor' | 'source' | 'type' | '!type' | 'func' | '!func' | 'var' | '!var' | 'new' | 'beta' | 'props' | 'deprecated' | 'outdated' | 'danger' | 'todo' | 'code-only' | 'snapshot' | '!snapshot' | 'unit' | 'integration' | 'keyboard' | 'internal' | 'usecase' | 'use-case' | 'version:next';
|
|
12
12
|
/** Badge (✏️) for stories with a live editor. Shown in sidebar on story and inherited. */
|
|
13
13
|
declare const editorBadge: TagBadgeParameter;
|
|
14
14
|
/** Badge (🆕) for recently added stories. */
|
|
15
15
|
declare const newBadge: TagBadgeParameter;
|
|
16
|
-
/** Badge (
|
|
16
|
+
/** Badge (🌱) for stories covering features in beta. */
|
|
17
17
|
declare const betaBadge: TagBadgeParameter;
|
|
18
18
|
/** Badge (🔧) for stories that demonstrate props or configuration. */
|
|
19
19
|
declare const propsBadge: TagBadgeParameter;
|
|
@@ -45,27 +45,33 @@ declare const integrationBadge: TagBadgeParameter;
|
|
|
45
45
|
declare const keyboardBadge: TagBadgeParameter;
|
|
46
46
|
/** Badge (🔒) for internal or private-use-only stories. */
|
|
47
47
|
declare const internalBadge: TagBadgeParameter;
|
|
48
|
+
/** Badge (🎯) for stories that demonstrate a specific use case or scenario. */
|
|
49
|
+
declare const useCaseBadge: TagBadgeParameter;
|
|
48
50
|
/**
|
|
49
51
|
* Configuration for story tag badges that appear in the Storybook sidebar.
|
|
50
52
|
* Each badge is associated with a specific tag and displays an emoji or symbol with a tooltip.
|
|
51
53
|
*
|
|
52
|
-
*
|
|
54
|
+
* Badge order (first match wins): New → Beta → Deprecated → Outdated → Danger → Use Case →
|
|
55
|
+
* Keyboard → Source → Type → Function → Var → Props → Todo → Unit → Integration → Editor →
|
|
56
|
+
* Code Only → Version → Internal → Snapshot.
|
|
57
|
+
*
|
|
53
58
|
* - 🆕 New - Recently added stories
|
|
54
|
-
* -
|
|
59
|
+
* - 🌱 Beta - Stories for features in beta
|
|
55
60
|
* - 🪦 Deprecated - Stories for deprecated features
|
|
56
61
|
* - ⚠️ Outdated - Stories that need updating
|
|
57
|
-
* - ✏️ Editor - Stories with live editor
|
|
58
|
-
* - 🧪 Unit - Stories with unit tests
|
|
59
|
-
* - 🔗 Integration - Stories with integration tests
|
|
60
|
-
* - ⌨️ Keyboard - Stories that demonstrate or test keyboard interaction
|
|
61
62
|
* - 🚨 Danger - Stories demonstrating dangerous patterns
|
|
63
|
+
* - 🎯 Use Case - Stories that demonstrate a specific use case or scenario
|
|
64
|
+
* - ⌨️ Keyboard - Stories that demonstrate or test keyboard interaction
|
|
62
65
|
* - `</>` Source - Source-code-focused stories
|
|
63
66
|
* - `<T>` Type - Stories that showcase or document TypeScript types
|
|
64
67
|
* - `ƒ(x)` Function - Stories that showcase or document functions
|
|
65
68
|
* - `var` Variables - Stories that describe values and variables
|
|
66
69
|
* - 🔧 Props - Stories that demonstrate props or configuration
|
|
67
|
-
* - 📝 Code Only - Stories without visual examples
|
|
68
70
|
* - 📋 Todo - Stories marked as todo/incomplete
|
|
71
|
+
* - 🧪 Unit - Stories with unit tests
|
|
72
|
+
* - 🔗 Integration - Stories with integration tests
|
|
73
|
+
* - ✏️ Editor - Stories with live editor
|
|
74
|
+
* - 📝 Code Only - Stories without visual examples
|
|
69
75
|
* - `next` - (`version:next`) The component or function is available in the next version
|
|
70
76
|
* - `x.y` - (`version:x.y`) The component or function was created or updated in the x.y version
|
|
71
77
|
* - 🔒 Internal - Internal or private-use-only stories
|
|
@@ -144,4 +150,4 @@ type StoryObj<TMetaOrCmpOrArgs = Args> = ExtendStoryObj<TMetaOrCmpOrArgs, StoryO
|
|
|
144
150
|
tag: TagNames;
|
|
145
151
|
}>;
|
|
146
152
|
//#endregion
|
|
147
|
-
export { Meta, StoryObj, TagNames, betaBadge, codeOnlyBadge, dangerBadge, deprecatedBadge, editorBadge, functionBadge, integrationBadge, internalBadge, keyboardBadge, newBadge, outdatedBadge, propsBadge, snapshotBadge, sourceBadge, tagBadges, todoBadge, typeBadge, unitBadge, varBadge };
|
|
153
|
+
export { Meta, StoryObj, TagNames, betaBadge, codeOnlyBadge, dangerBadge, deprecatedBadge, editorBadge, functionBadge, integrationBadge, internalBadge, keyboardBadge, newBadge, outdatedBadge, propsBadge, snapshotBadge, sourceBadge, tagBadges, todoBadge, typeBadge, unitBadge, useCaseBadge, varBadge };
|
|
@@ -31,11 +31,11 @@ const newBadge = {
|
|
|
31
31
|
tooltip: "New"
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
/** Badge (
|
|
34
|
+
/** Badge (🌱) for stories covering features in beta. */
|
|
35
35
|
const betaBadge = {
|
|
36
36
|
tags: "beta",
|
|
37
37
|
badge: {
|
|
38
|
-
text: "
|
|
38
|
+
text: "🌱",
|
|
39
39
|
style: {
|
|
40
40
|
backgroundColor: "transparent",
|
|
41
41
|
borderColor: "transparent"
|
|
@@ -234,27 +234,43 @@ const internalBadge = {
|
|
|
234
234
|
tooltip: "Internal"
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
|
+
/** Badge (🎯) for stories that demonstrate a specific use case or scenario. */
|
|
238
|
+
const useCaseBadge = {
|
|
239
|
+
tags: "use-case",
|
|
240
|
+
badge: {
|
|
241
|
+
text: "🎯",
|
|
242
|
+
style: {
|
|
243
|
+
backgroundColor: "transparent",
|
|
244
|
+
borderColor: "transparent"
|
|
245
|
+
},
|
|
246
|
+
tooltip: "Use Case"
|
|
247
|
+
}
|
|
248
|
+
};
|
|
237
249
|
/**
|
|
238
250
|
* Configuration for story tag badges that appear in the Storybook sidebar.
|
|
239
251
|
* Each badge is associated with a specific tag and displays an emoji or symbol with a tooltip.
|
|
240
252
|
*
|
|
241
|
-
*
|
|
253
|
+
* Badge order (first match wins): New → Beta → Deprecated → Outdated → Danger → Use Case →
|
|
254
|
+
* Keyboard → Source → Type → Function → Var → Props → Todo → Unit → Integration → Editor →
|
|
255
|
+
* Code Only → Version → Internal → Snapshot.
|
|
256
|
+
*
|
|
242
257
|
* - 🆕 New - Recently added stories
|
|
243
|
-
* -
|
|
258
|
+
* - 🌱 Beta - Stories for features in beta
|
|
244
259
|
* - 🪦 Deprecated - Stories for deprecated features
|
|
245
260
|
* - ⚠️ Outdated - Stories that need updating
|
|
246
|
-
* - ✏️ Editor - Stories with live editor
|
|
247
|
-
* - 🧪 Unit - Stories with unit tests
|
|
248
|
-
* - 🔗 Integration - Stories with integration tests
|
|
249
|
-
* - ⌨️ Keyboard - Stories that demonstrate or test keyboard interaction
|
|
250
261
|
* - 🚨 Danger - Stories demonstrating dangerous patterns
|
|
262
|
+
* - 🎯 Use Case - Stories that demonstrate a specific use case or scenario
|
|
263
|
+
* - ⌨️ Keyboard - Stories that demonstrate or test keyboard interaction
|
|
251
264
|
* - `</>` Source - Source-code-focused stories
|
|
252
265
|
* - `<T>` Type - Stories that showcase or document TypeScript types
|
|
253
266
|
* - `ƒ(x)` Function - Stories that showcase or document functions
|
|
254
267
|
* - `var` Variables - Stories that describe values and variables
|
|
255
268
|
* - 🔧 Props - Stories that demonstrate props or configuration
|
|
256
|
-
* - 📝 Code Only - Stories without visual examples
|
|
257
269
|
* - 📋 Todo - Stories marked as todo/incomplete
|
|
270
|
+
* - 🧪 Unit - Stories with unit tests
|
|
271
|
+
* - 🔗 Integration - Stories with integration tests
|
|
272
|
+
* - ✏️ Editor - Stories with live editor
|
|
273
|
+
* - 📝 Code Only - Stories without visual examples
|
|
258
274
|
* - `next` - (`version:next`) The component or function is available in the next version
|
|
259
275
|
* - `x.y` - (`version:x.y`) The component or function was created or updated in the x.y version
|
|
260
276
|
* - 🔒 Internal - Internal or private-use-only stories
|
|
@@ -265,22 +281,23 @@ const tagBadges = [
|
|
|
265
281
|
betaBadge,
|
|
266
282
|
deprecatedBadge,
|
|
267
283
|
outdatedBadge,
|
|
268
|
-
editorBadge,
|
|
269
|
-
unitBadge,
|
|
270
|
-
integrationBadge,
|
|
271
|
-
keyboardBadge,
|
|
272
284
|
dangerBadge,
|
|
285
|
+
useCaseBadge,
|
|
286
|
+
keyboardBadge,
|
|
273
287
|
sourceBadge,
|
|
274
288
|
typeBadge,
|
|
275
289
|
functionBadge,
|
|
276
290
|
varBadge,
|
|
277
291
|
propsBadge,
|
|
278
|
-
codeOnlyBadge,
|
|
279
292
|
todoBadge,
|
|
293
|
+
unitBadge,
|
|
294
|
+
integrationBadge,
|
|
295
|
+
editorBadge,
|
|
296
|
+
codeOnlyBadge,
|
|
280
297
|
versionBadge,
|
|
281
298
|
internalBadge,
|
|
282
299
|
snapshotBadge
|
|
283
300
|
];
|
|
284
301
|
|
|
285
302
|
//#endregion
|
|
286
|
-
export { betaBadge, codeOnlyBadge, dangerBadge, deprecatedBadge, editorBadge, functionBadge, integrationBadge, internalBadge, keyboardBadge, newBadge, outdatedBadge, propsBadge, snapshotBadge, sourceBadge, tagBadges, todoBadge, typeBadge, unitBadge, varBadge };
|
|
303
|
+
export { betaBadge, codeOnlyBadge, dangerBadge, deprecatedBadge, editorBadge, functionBadge, integrationBadge, internalBadge, keyboardBadge, newBadge, outdatedBadge, propsBadge, snapshotBadge, sourceBadge, tagBadges, todoBadge, typeBadge, unitBadge, useCaseBadge, varBadge };
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -76,21 +76,28 @@ addons.setConfig({
|
|
|
76
76
|
### `storybook-addon-tag-badges`
|
|
77
77
|
|
|
78
78
|
If you use [`storybook-addon-tag-badges`][`storybook-addon-tag-badges`],
|
|
79
|
-
we provide a different set of badges that uses emojis:
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
79
|
+
we provide a different set of badges that uses emojis (order: first match wins):
|
|
80
|
+
|
|
81
|
+
- 🆕 `new` - Recently added stories
|
|
82
|
+
- 🌱 `beta` - Features in beta
|
|
83
|
+
- 🪦 `deprecated` - Deprecated features
|
|
84
|
+
- ⚠️ `outdated` - Stories that need updating
|
|
85
|
+
- 🚨 `danger` - Dangerous or cautionary patterns
|
|
86
|
+
- 🎯 `use-case` - Specific use case or scenario
|
|
87
|
+
- ⌨️ `keyboard` - Keyboard interaction
|
|
88
|
+
- `</>` `source` - Source-code-focused stories
|
|
89
|
+
- `<T>` `type` - TypeScript types (shown in MDX)
|
|
90
|
+
- `ƒ(x)` `func` - Functions (shown in MDX)
|
|
91
|
+
- `var` `var` - Variables (shown in MDX)
|
|
92
|
+
- 🔧 `props` - Props or configuration
|
|
93
|
+
- 📋 `todo` - Todo or incomplete stories
|
|
91
94
|
- 🧪 `unit` - Unit tests
|
|
92
|
-
- 🔗 `integration` - Integration tests
|
|
95
|
+
- 🔗 `integration` - Integration tests (hidden in sidebar)
|
|
96
|
+
- ✏️ `editor` - Live editor stories (with [`storybook-addon-code-editor`][`storybook-addon-code-editor`])
|
|
97
|
+
- 📝 `code-only` - Stories without visual examples (hidden in MDX)
|
|
93
98
|
- Version indicators (unchanged)
|
|
99
|
+
- 🔒 `internal` - Internal or private-use-only stories
|
|
100
|
+
- 📸 `snapshot` - Snapshot tests (toolbar only, not sidebar)
|
|
94
101
|
|
|
95
102
|
To use them, add them to your `.storybook/manager.ts`:
|
|
96
103
|
|
|
@@ -8,11 +8,15 @@ type TagBadgeParameter = TagBadgeParameters[0]
|
|
|
8
8
|
* Type representing the names of predefined tags used in Storybook stories.
|
|
9
9
|
*/
|
|
10
10
|
export type TagNames =
|
|
11
|
+
| '!test'
|
|
11
12
|
| 'editor'
|
|
12
13
|
| 'source'
|
|
13
14
|
| 'type'
|
|
15
|
+
| '!type'
|
|
14
16
|
| 'func'
|
|
17
|
+
| '!func'
|
|
15
18
|
| 'var'
|
|
19
|
+
| '!var'
|
|
16
20
|
| 'new'
|
|
17
21
|
| 'beta'
|
|
18
22
|
| 'props'
|
|
@@ -22,6 +26,7 @@ export type TagNames =
|
|
|
22
26
|
| 'todo'
|
|
23
27
|
| 'code-only'
|
|
24
28
|
| 'snapshot'
|
|
29
|
+
| '!snapshot'
|
|
25
30
|
| 'unit'
|
|
26
31
|
| 'integration'
|
|
27
32
|
| 'keyboard'
|
|
@@ -62,11 +67,11 @@ export const newBadge: TagBadgeParameter = {
|
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
/** Badge (
|
|
70
|
+
/** Badge (🌱) for stories covering features in beta. */
|
|
66
71
|
export const betaBadge: TagBadgeParameter = {
|
|
67
72
|
tags: 'beta',
|
|
68
73
|
badge: {
|
|
69
|
-
text: '
|
|
74
|
+
text: '🌱',
|
|
70
75
|
style: {
|
|
71
76
|
backgroundColor: 'transparent',
|
|
72
77
|
borderColor: 'transparent'
|
|
@@ -295,27 +300,44 @@ export const internalBadge: TagBadgeParameter = {
|
|
|
295
300
|
}
|
|
296
301
|
}
|
|
297
302
|
|
|
303
|
+
/** Badge (🎯) for stories that demonstrate a specific use case or scenario. */
|
|
304
|
+
export const useCaseBadge: TagBadgeParameter = {
|
|
305
|
+
tags: 'use-case',
|
|
306
|
+
badge: {
|
|
307
|
+
text: '🎯',
|
|
308
|
+
style: {
|
|
309
|
+
backgroundColor: 'transparent',
|
|
310
|
+
borderColor: 'transparent'
|
|
311
|
+
},
|
|
312
|
+
tooltip: 'Use Case'
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
298
316
|
/**
|
|
299
317
|
* Configuration for story tag badges that appear in the Storybook sidebar.
|
|
300
318
|
* Each badge is associated with a specific tag and displays an emoji or symbol with a tooltip.
|
|
301
319
|
*
|
|
302
|
-
*
|
|
320
|
+
* Badge order (first match wins): New → Beta → Deprecated → Outdated → Danger → Use Case →
|
|
321
|
+
* Keyboard → Source → Type → Function → Var → Props → Todo → Unit → Integration → Editor →
|
|
322
|
+
* Code Only → Version → Internal → Snapshot.
|
|
323
|
+
*
|
|
303
324
|
* - 🆕 New - Recently added stories
|
|
304
|
-
* -
|
|
325
|
+
* - 🌱 Beta - Stories for features in beta
|
|
305
326
|
* - 🪦 Deprecated - Stories for deprecated features
|
|
306
327
|
* - ⚠️ Outdated - Stories that need updating
|
|
307
|
-
* - ✏️ Editor - Stories with live editor
|
|
308
|
-
* - 🧪 Unit - Stories with unit tests
|
|
309
|
-
* - 🔗 Integration - Stories with integration tests
|
|
310
|
-
* - ⌨️ Keyboard - Stories that demonstrate or test keyboard interaction
|
|
311
328
|
* - 🚨 Danger - Stories demonstrating dangerous patterns
|
|
329
|
+
* - 🎯 Use Case - Stories that demonstrate a specific use case or scenario
|
|
330
|
+
* - ⌨️ Keyboard - Stories that demonstrate or test keyboard interaction
|
|
312
331
|
* - `</>` Source - Source-code-focused stories
|
|
313
332
|
* - `<T>` Type - Stories that showcase or document TypeScript types
|
|
314
333
|
* - `ƒ(x)` Function - Stories that showcase or document functions
|
|
315
334
|
* - `var` Variables - Stories that describe values and variables
|
|
316
335
|
* - 🔧 Props - Stories that demonstrate props or configuration
|
|
317
|
-
* - 📝 Code Only - Stories without visual examples
|
|
318
336
|
* - 📋 Todo - Stories marked as todo/incomplete
|
|
337
|
+
* - 🧪 Unit - Stories with unit tests
|
|
338
|
+
* - 🔗 Integration - Stories with integration tests
|
|
339
|
+
* - ✏️ Editor - Stories with live editor
|
|
340
|
+
* - 📝 Code Only - Stories without visual examples
|
|
319
341
|
* - `next` - (`version:next`) The component or function is available in the next version
|
|
320
342
|
* - `x.y` - (`version:x.y`) The component or function was created or updated in the x.y version
|
|
321
343
|
* - 🔒 Internal - Internal or private-use-only stories
|
|
@@ -326,18 +348,19 @@ export const tagBadges: TagBadgeParameters = [
|
|
|
326
348
|
betaBadge,
|
|
327
349
|
deprecatedBadge,
|
|
328
350
|
outdatedBadge,
|
|
329
|
-
editorBadge,
|
|
330
|
-
unitBadge,
|
|
331
|
-
integrationBadge,
|
|
332
|
-
keyboardBadge,
|
|
333
351
|
dangerBadge,
|
|
352
|
+
useCaseBadge,
|
|
353
|
+
keyboardBadge,
|
|
334
354
|
sourceBadge,
|
|
335
355
|
typeBadge,
|
|
336
356
|
functionBadge,
|
|
337
357
|
varBadge,
|
|
338
358
|
propsBadge,
|
|
339
|
-
codeOnlyBadge,
|
|
340
359
|
todoBadge,
|
|
360
|
+
unitBadge,
|
|
361
|
+
integrationBadge,
|
|
362
|
+
editorBadge,
|
|
363
|
+
codeOnlyBadge,
|
|
341
364
|
versionBadge,
|
|
342
365
|
internalBadge,
|
|
343
366
|
snapshotBadge
|