Skip to content

Commit 8d00caa

Browse files
authored
chore: update tasty (#1069)
1 parent cbb749d commit 8d00caa

112 files changed

Lines changed: 4315 additions & 2203 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/lazy-items-unite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Update tasty to support infering property types.

.cursor/rules/documentation.mdc

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ alwaysApply: false
1414
## Documentation Structure
1515

1616
```mdx
17-
import { Meta, Canvas, Story, Controls } from '@storybook/addon-docs/blocks';
17+
import { Meta, Canvas, Story } from '@storybook/addon-docs/blocks';
1818
import { ComponentName } from './ComponentName';
1919
import * as ComponentStories from './ComponentName.stories';
2020

@@ -38,11 +38,18 @@ Brief description of what the component is and its primary purpose.
3838

3939
### Properties
4040

41-
<Controls of={componentStories.Default} />
41+
- **`propName`** `type` (default: `value`) — Description of the property
42+
- **`anotherProp`** `boolean` (default: `false`) — Description of the property
4243

4344
### Base Properties
4445

45-
Supports [Base properties](/BaseProperties)
46+
Supports [Base properties](/docs/base-properties--docs)
47+
48+
### Field Properties
49+
50+
[For input components only]
51+
52+
Supports all [Field properties](/docs/field-properties--docs)
4653

4754
### Styling Properties
4855

@@ -159,11 +166,11 @@ This component supports all [Field properties](/field-properties.md) when used w
159166

160167
### Properties
161168

162-
- **Props List**: Use `<Controls of={componentStories.Default} />` - DO NOT manually list props if Controls is used
163-
- **Base Properties**: Link to `/base-properties.md` instead of listing (unless `qa` has special behavior)
169+
- **Props List**: List all component-specific properties using the definition list format. Properties, types, defaults, and descriptions must match the `argTypes` defined in the corresponding `.stories.tsx` file. Format: `- **\`propName\`** \`type\` (default: \`value\`) — Description`
170+
- **Base Properties**: Link to `/docs/base-properties--docs` instead of listing (unless `qa` has special behavior)
164171
- **Styling Properties**: Document `styles`/`*Styles` props. List sub-elements that can be overridden (check component's tasty styles)
165172
- **Style Properties**: List direct styling props (`width`, `height`, etc.) - see `src/tasty/styles/list.ts`
166-
- **React Aria Properties**: Only document if adding clarifications beyond what Controls shows
173+
- **React Aria Properties**: Document any React Aria properties that need extra clarification
167174

168175
### Examples
169176

@@ -185,9 +192,13 @@ This component supports all [Field properties](/field-properties.md) when used w
185192
- Relevant ARIA properties
186193
- Accessible implementation guidance
187194

195+
### Field Properties
196+
197+
For input components: Add `Supports all [Field properties](/docs/field-properties--docs)` in the Properties section, right after Base Properties. Do NOT duplicate field-level props (`label`, `name`, `isRequired`, `isDisabled`, `isReadOnly`, `isLoading`, `validationState`, `autoFocus`, `tooltip`, `description`, `rules`, etc.) — they are documented on the Field Properties page.
198+
188199
### Form Integration
189200

190-
For input components: "This component supports all [Field properties](/field-properties.md) when used within a Form."
201+
For input components: "This component supports all [Field properties](/docs/field-properties--docs) when used within a Form."
191202

192203
### File Naming
193204

@@ -196,7 +207,7 @@ For input components: "This component supports all [Field properties](/field-pro
196207
## Review Checklist
197208

198209
- [ ] **JSX code snippets provided (not just stories)**
199-
- [ ] **No manual props list if using `<Controls />`**
210+
- [ ] **All component-specific properties explicitly listed**
200211
- [ ] Follows prescribed structure
201212
- [ ] Styling properties and sub-elements documented
202213
- [ ] Modifiers listed with descriptions

.cursor/rules/storybook.mdc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ alwaysApply: false
1010
- For interactive tests: `import { userEvent, within } from 'storybook/test';` (NOT from `@testing-library/react`)
1111

1212
### Documentation Files (.docs.mdx)
13-
- `import { Meta, Canvas, Story, Controls } from '@storybook/addon-docs/blocks';`
13+
- `import { Meta, Canvas, Story } from '@storybook/addon-docs/blocks';`
1414
- `Meta` - Define meta information with `<Meta of={StoriesImport} />`
1515
- `Canvas` - Display story with code panel
1616
- `Story` - Reference specific story with `<Story of={StoriesImport.StoryName} />`
17-
- `Controls` - Display interactive controls table with `<Controls of={StoriesImport.StoryName} />`
1817
- `ArgTypes` - Display argument types documentation
1918
- `Source` - Show code examples
2019
- Import stories: `import * as ComponentStories from './Component.stories';`
@@ -108,7 +107,7 @@ export const Interactive: StoryObj = {
108107
## MDX Documentation Structure
109108

110109
```mdx
111-
import { Meta, Canvas, Story, Controls } from '@storybook/addon-docs/blocks';
110+
import { Meta, Canvas, Story } from '@storybook/addon-docs/blocks';
112111
import * as ComponentStories from './Component.stories';
113112

114113
<Meta of={ComponentStories} />
@@ -129,11 +128,18 @@ Component description
129128

130129
### Properties
131130

132-
<Controls of={ComponentStories.Default} />
131+
- **`propName`** `type` (default: `value`) — Description of the property
132+
- **`anotherProp`** `boolean` (default: `false`) — Description of the property
133133

134134
### Base Properties
135135

136-
Reference base properties support here.
136+
Supports [Base properties](/docs/base-properties--docs)
137+
138+
### Field Properties
139+
140+
[For input components only]
141+
142+
Supports all [Field properties](/docs/field-properties--docs)
137143

138144
## Examples
139145

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ stats.html
1515
yarn-error.log
1616
coverage
1717
size-limit-report/stats.json
18-
docs-static
1918
*.plan.md
2019
*.spec.md
20+
.docs-generated
21+
.docs-gitignore.bak

.size-limit.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ module.exports = [
2020
}),
2121
);
2222
},
23-
limit: '370kB',
23+
limit: '375kB',
2424
},
2525
{
2626
name: 'Tree shaking (just a Button)',
2727
path: './dist/index.js',
2828
webpack: true,
2929
import: '{ Button }',
30-
limit: '100kB',
30+
limit: '105kB',
3131
},
3232
];

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!.gitignore
3+
!tasty

docs/tasty

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../node_modules/@tenphi/tasty/docs

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"dist/**/*.d.ts",
2323
"dist/**/*.map",
2424
"dist/README.md",
25-
"dist/CHANGELOG.md"
25+
"dist/CHANGELOG.md",
26+
"docs"
2627
],
2728
"scripts": {
2829
"start": "pnpm storybook",
@@ -42,13 +43,13 @@
4243
"build-storybook": "STORYBOOK_MODE=stories storybook build --stats-json",
4344
"build-docs": "STORYBOOK_MODE=docs storybook build --docs -o storybook-docs",
4445
"chromatic": "chromatic --only-changed",
45-
"build-static-docs": "npm run build-docs && node scripts/snapshot-docs.js",
4646
"size": "size-limit",
47-
"prepare": "husky install",
47+
"prepare": "husky install && git config blame.ignoreRevsFile .git-blame-ignore-revs",
4848
"clear": "pnpm clear:dist && rimraf ./storybook-docs ./storybook-static ./node_modules/.cache",
4949
"clear:dist": "rimraf ./dist",
50+
"prepack": "node scripts/prepare-docs.mjs",
51+
"postpack": "node scripts/cleanup-docs.mjs",
5052
"release": "pnpm build && changeset publish --provenance",
51-
"postinstall": "git config blame.ignoreRevsFile .git-blame-ignore-revs",
5253
"add-icons": "cd src/icons && node add-new-icon.js && pnpm fix"
5354
},
5455
"keywords": [
@@ -72,7 +73,7 @@
7273
"@react-types/shared": "^3.32.1",
7374
"@tabler/icons-react": "^3.31.0",
7475
"@tanstack/react-virtual": "^3.13.12",
75-
"@tenphi/tasty": "0.6.0",
76+
"@tenphi/tasty": "0.7.1",
7677
"clipboard-copy": "^4.0.1",
7778
"clsx": "^1.1.1",
7879
"diff": "^8.0.3",
@@ -106,7 +107,6 @@
106107
"@size-limit/file": "^8.2.4",
107108
"@size-limit/webpack": "^8.2.4",
108109
"@size-limit/webpack-why": "^8.2.4",
109-
"@sparticuz/chromium": "^137.0.1",
110110
"@statoscope/cli": "^5.20.1",
111111
"@storybook/addon-docs": "^10.2.3",
112112
"@storybook/addon-links": "^10.2.3",
@@ -147,8 +147,6 @@
147147
"lint-staged": "^10.0.0",
148148
"markdown-table": "^3.0.3",
149149
"npm-run-all": "^4.1.5",
150-
"playwright": "^1.53.2",
151-
"playwright-core": "^1.53.2",
152150
"prettier": "^3.2.5",
153151
"react": "^19.1.1",
154152
"react-dom": "^19.1.1",

0 commit comments

Comments
 (0)