@kiva/kv-components 8.5.4 → 8.5.5
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/docs/ai-documentation-prompt.md +5 -0
- package/docs/ai-stories-prompt.md +11 -1
- package/docs/component-documentation-checklist.md +3 -1
- package/docs/component-documentation-guide.md +7 -1
- package/docs/component-stories-checklist.md +3 -1
- package/docs/component-stories-guide.md +6 -2
- package/docs/storybook-folder-prefixes.md +36 -0
- package/package.json +2 -2
|
@@ -73,10 +73,15 @@ Required steps:
|
|
|
73
73
|
Template Variables to Fill:
|
|
74
74
|
|
|
75
75
|
**Basic Info:**
|
|
76
|
+
- {{folderPrefix}} - Storybook folder prefix for the component (see prefix guidance below)
|
|
76
77
|
- {{ComponentName}} - Component name (e.g., KvButton, KvModal)
|
|
77
78
|
- {{componentDescription}} - One-sentence component purpose
|
|
78
79
|
- {{componentOverviewDescription}} - Brief paragraph about the component
|
|
79
80
|
|
|
81
|
+
**Storybook Folder Prefixes:**
|
|
82
|
+
|
|
83
|
+
The MDX `<Meta title="..." />` MUST include a folder prefix matching the component's `.stories.js` file. See **[Storybook Folder Prefixes](./storybook-folder-prefixes.md)** for the full list of prefixes, guidelines, and examples. If uncertain about which prefix to use, **ASK THE USER**.
|
|
84
|
+
|
|
80
85
|
**Variations:**
|
|
81
86
|
- {{variationsDescription}} - Describe all available variations
|
|
82
87
|
|
|
@@ -59,8 +59,9 @@ import ComponentName from '../ComponentName.vue';
|
|
|
59
59
|
// or omit this import + docs.page until docs are ready.
|
|
60
60
|
import ComponentNameDocsMdx from './ComponentNameDocs.mdx';
|
|
61
61
|
|
|
62
|
+
// IMPORTANT: Title must include a folder prefix (see guidance below)
|
|
62
63
|
export default {
|
|
63
|
-
title: 'ComponentName',
|
|
64
|
+
title: 'Folder Prefix/ComponentName',
|
|
64
65
|
component: ComponentName,
|
|
65
66
|
parameters: {
|
|
66
67
|
docs: {
|
|
@@ -73,6 +74,10 @@ export default {
|
|
|
73
74
|
},
|
|
74
75
|
};
|
|
75
76
|
|
|
77
|
+
**Storybook Folder Prefixes:**
|
|
78
|
+
|
|
79
|
+
All story titles MUST include a folder prefix. See **[Storybook Folder Prefixes](./storybook-folder-prefixes.md)** for the full list of prefixes, guidelines, and examples. If uncertain about which prefix to use, **ASK THE USER**.
|
|
80
|
+
|
|
76
81
|
// Default story - Interactive playground
|
|
77
82
|
export const Default = {
|
|
78
83
|
args: {
|
|
@@ -149,8 +154,13 @@ Template Variables to Fill:
|
|
|
149
154
|
- {{ComponentName}} - Component name (e.g., KvButton, KvModal)
|
|
150
155
|
|
|
151
156
|
**Story Configuration:**
|
|
157
|
+
- {{folderPrefix}} - Storybook folder prefix (see prefix guidance below)
|
|
152
158
|
- {{argTypes}} - Complete argTypes object with controls for all props
|
|
153
159
|
|
|
160
|
+
**Storybook Folder Prefixes:**
|
|
161
|
+
|
|
162
|
+
All story titles MUST include a folder prefix. See **[Storybook Folder Prefixes](./storybook-folder-prefixes.md)** for the full list of prefixes, guidelines, and examples. If uncertain about which prefix to use, **ASK THE USER**.
|
|
163
|
+
|
|
154
164
|
**ComponentOverview Story:**
|
|
155
165
|
- {{dataSection}} - data() function if reactive state needed (optional, remove if not needed)
|
|
156
166
|
- {{setupSection}} - setup() function with icons/constants
|
|
@@ -26,7 +26,9 @@ Use this checklist to ensure comprehensive, high-quality component documentation
|
|
|
26
26
|
- [ ] MDX file created in `src/vue/stories/[ComponentName]Docs.mdx`
|
|
27
27
|
- [ ] Correct imports for Storybook blocks (Canvas, Meta, Story, Controls)
|
|
28
28
|
- [ ] Story file imported correctly (`import * as ComponentStories from './Component.stories.js'`)
|
|
29
|
-
- [ ] Meta tag
|
|
29
|
+
- [ ] Meta tag includes folder prefix matching the .stories.js file (see [Storybook Folder Prefixes](./storybook-folder-prefixes.md))
|
|
30
|
+
- [ ] If uncertain about prefix, asked for clarification or checked existing similar components
|
|
31
|
+
- [ ] Meta tag configured with component reference
|
|
30
32
|
- [ ] **No freeform MDX structure** - All template sections present
|
|
31
33
|
|
|
32
34
|
## Content Sections
|
|
@@ -65,16 +65,22 @@ See component-stories-guide.md for implementation details.
|
|
|
65
65
|
import { Canvas, Meta, Story, Controls } from '@storybook/addon-docs/blocks';
|
|
66
66
|
import * as KvComponentStories from './KvComponent.stories.js';
|
|
67
67
|
|
|
68
|
-
<Meta title="KvComponent" component={KvComponentStories.Component} />
|
|
68
|
+
<Meta title="Folder Prefix/KvComponent" component={KvComponentStories.Component} />
|
|
69
69
|
|
|
70
70
|
## Component Overview
|
|
71
71
|
|
|
72
72
|
<Story of={KvComponentStories.ComponentOverview} />
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
**Important:** The `<Meta title="..." />` MUST include a folder prefix that matches the component's `.stories.js` file. See the **Storybook Folder Prefixes** section below for guidance.
|
|
76
|
+
|
|
75
77
|
The MDX import requires a real stories file. Use a stub with matching export names (ComponentOverview, AllVariations,
|
|
76
78
|
Default, etc.) so Storybook can load while you flesh out the stories.
|
|
77
79
|
|
|
80
|
+
#### Storybook Folder Prefixes
|
|
81
|
+
|
|
82
|
+
The MDX `<Meta title="..." />` MUST include a folder prefix matching the component's `.stories.js` file. See **[Storybook Folder Prefixes](./storybook-folder-prefixes.md)** for the full list of prefixes, guidelines, and examples.
|
|
83
|
+
|
|
78
84
|
## Documentation Structure
|
|
79
85
|
|
|
80
86
|
Every component should have a corresponding `.mdx` documentation file in `src/vue/stories/` that follows this structure:
|
|
@@ -33,7 +33,9 @@ Use this checklist to ensure comprehensive, high-quality Storybook stories for c
|
|
|
33
33
|
|
|
34
34
|
## Default Export Configuration
|
|
35
35
|
|
|
36
|
-
- [ ] `title`
|
|
36
|
+
- [ ] `title` includes appropriate folder prefix (see [Storybook Folder Prefixes](./storybook-folder-prefixes.md))
|
|
37
|
+
- [ ] If uncertain about prefix, asked for clarification or checked existing similar components
|
|
38
|
+
- [ ] `title` matches format: 'Folder Prefix/ComponentName'
|
|
37
39
|
- [ ] `component` references the Vue component correctly
|
|
38
40
|
- [ ] `parameters.docs.page` points to MDX file
|
|
39
41
|
- [ ] `parameters.docs.title` is descriptive
|
|
@@ -104,7 +104,7 @@ import ComponentNameDocsMdx from './ComponentNameDocs.mdx';
|
|
|
104
104
|
|
|
105
105
|
```javascript
|
|
106
106
|
export default {
|
|
107
|
-
title: 'ComponentName',
|
|
107
|
+
title: 'Folder Prefix/ComponentName',
|
|
108
108
|
component: ComponentName,
|
|
109
109
|
parameters: {
|
|
110
110
|
docs: {
|
|
@@ -119,11 +119,15 @@ export default {
|
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
**Key elements:**
|
|
122
|
-
- **title**: Display name in Storybook sidebar (
|
|
122
|
+
- **title**: Display name in Storybook sidebar - MUST include folder prefix (see guidance below)
|
|
123
123
|
- **component**: Reference to the Vue component
|
|
124
124
|
- **parameters.docs.page**: Links to the MDX documentation
|
|
125
125
|
- **argTypes**: Defines interactive controls and their configuration
|
|
126
126
|
|
|
127
|
+
#### Storybook Folder Prefixes
|
|
128
|
+
|
|
129
|
+
All story titles MUST include a folder prefix. See **[Storybook Folder Prefixes](./storybook-folder-prefixes.md)** for the full list of prefixes, guidelines, and examples.
|
|
130
|
+
|
|
127
131
|
### 3. argTypes Configuration
|
|
128
132
|
|
|
129
133
|
Configure controls for component props to enable interactive testing:
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Storybook Folder Prefixes
|
|
2
|
+
|
|
3
|
+
All story titles and MDX `<Meta title="..." />` tags MUST include a folder prefix to organize components in the Storybook sidebar. The prefix in the MDX file MUST match the prefix in the corresponding `.stories.js` file.
|
|
4
|
+
|
|
5
|
+
Use one of the existing prefixes below, or ask for clarification if none fit.
|
|
6
|
+
|
|
7
|
+
## Existing Folder Prefixes
|
|
8
|
+
|
|
9
|
+
- **Base Styling/** - Style guide, theme provider, and foundational styling components
|
|
10
|
+
- **Charts/** - Chart and data visualization components (e.g., KvPieChart, KvLineGraph, KvTreeMapChart)
|
|
11
|
+
- **Checkout/** - Checkout flow components (e.g., KvAtbModal, KvCartModal, KvCartPill, KvCheckoutReceipt)
|
|
12
|
+
- **Comments/** - Comment-related components (e.g., KvCommentsAdd, KvCommentsList, KvCommentsListItem)
|
|
13
|
+
- **Components/** - General-purpose components that don't fit other categories (e.g., KvCarousel, KvLightbox, KvMap, KvUtilityMenu)
|
|
14
|
+
- **Forms/** - Form controls and input components (e.g., KvButton, KvCheckbox, KvTextInput, KvSelect, KvSwitch)
|
|
15
|
+
- **Interface Elements/** - General UI elements, indicators, and feedback components (e.g., KvToast, KvTooltip, KvProgressBar, KvLoadingSpinner)
|
|
16
|
+
- **Loan Display/** - Loan-specific display components (e.g., KvLoanInfoCard, KvClassicLoanCard, KvBorrowerImage)
|
|
17
|
+
- **Page Frame/** - Page layout and structural components (e.g., KvPageContainer, KvGrid, KvWwwHeader)
|
|
18
|
+
|
|
19
|
+
## Guidelines
|
|
20
|
+
|
|
21
|
+
- If the component clearly fits an existing category, use that prefix
|
|
22
|
+
- If uncertain or the component represents a new category, **ask for clarification** on which prefix to use or if a new folder prefix should be created
|
|
23
|
+
- Never omit the folder prefix
|
|
24
|
+
- The prefix creates the folder structure in the Storybook sidebar navigation
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
**Story titles:**
|
|
29
|
+
- `'Forms/KvButton'`
|
|
30
|
+
- `'Loan Display/KvLoanInfoCard'`
|
|
31
|
+
- `'Interface Elements/KvToast'`
|
|
32
|
+
|
|
33
|
+
**MDX Meta tags:**
|
|
34
|
+
- `<Meta title="Forms/KvButton" ... />`
|
|
35
|
+
- `<Meta title="Loan Display/KvLoanInfoCard" ... />`
|
|
36
|
+
- `<Meta title="Interface Elements/KvToast" ... />`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"embla-carousel-fade",
|
|
126
126
|
"popper.js"
|
|
127
127
|
],
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "00f1e4db46e433ceadce0bb2002f721b1453be58"
|
|
129
129
|
}
|