Skip to content

Commit 5fbf182

Browse files
authored
Merge pull request #2 from StyleShit/ci/AR-48467-dependabot-changeset
Ci/ar 48467 dependabot changeset
2 parents e8e1b5d + 3f119f0 commit 5fbf182

393 files changed

Lines changed: 27899 additions & 4833 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/add-arc-progress.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@drivenets/design-system': minor
3+
---
4+
5+
Add DsArcProgress component

.changeset/better-teeth-scream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@drivenets/design-system': minor
3+
---
4+
5+
Add `DSCommentBubble`, `DSCommentCard`, `DSCommentIndicator`, `DSCommentDrawer` components

.changeset/smart-areas-dance.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@drivenets/design-system': minor
3+
---
4+
5+
- Add `ProgressLinear` component

.cursor/notepads/add-play-tests.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Add Play Tests to Stories
2+
3+
Look at the current file (or the file I specify). Find all exported stories that are missing a `play` function.
4+
5+
For each story without `play`, generate an interaction test following these rules:
6+
7+
1. Import `{ expect, fn, userEvent, within }` from `'storybook/test'`
8+
2. Use `fn()` for all callback args in the story's `args`
9+
3. Use a11y queries only: `getByRole`, `getByLabelText`, `getByText` -- never `getByTestId`
10+
4. Use semantic assertions: `toBeChecked()`, `toBeDisabled()`, `toBeVisible()`, `toBeInTheDocument()`
11+
5. Await all interactions: `await userEvent.click(...)`, `await expect(...)`
12+
6. Don't test implementation details (no data attributes, no CSS selectors), unless it's a required part of the story
13+
7. Test user-visible behavior: render check, click interactions, callback assertions
14+
15+
For stories with callback args, verify the callback was called:
16+
17+
```tsx
18+
await userEvent.click(button);
19+
await expect(args.onClick).toHaveBeenCalledOnce();
20+
```
21+
22+
For stories showing disabled state, verify interactions are blocked:
23+
24+
```tsx
25+
await userEvent.click(element, { pointerEventsCheck: 0 });
26+
await expect(args.onClick).not.toHaveBeenCalled();
27+
```

.cursor/notepads/check-ark-ui.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Check Ark UI for Component
2+
3+
I'm about to build a component. Before writing custom code, check if Ark UI already provides a primitive for it.
4+
5+
Steps:
6+
7+
1. Call the Ark UI MCP `list_components` tool with `framework: "react"` to get all available components.
8+
2. If a matching component exists:
9+
- Call `get_component_props` with `framework: "react"` and the component name to show me the full API.
10+
- Call `get_example` with `framework: "react"`, the component name, and `exampleId: "basic"` to show a usage example.
11+
- Call `styling_guide` with the component name to show data attributes I can use in SCSS.
12+
3. If no match exists, tell me, so I know to build custom.
13+
14+
When showing the Ark UI API, highlight:
15+
16+
- Which props I should expose in my own props layer (don't expose all Ark props)
17+
- Which state Ark manages internally (so I don't duplicate with `useState`)
18+
- Which callbacks I should wrap to forward to my own props
19+
- Which data attributes I can use in SCSS for styling states

.cursor/rules/checkers.mdc

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
description: How to run tests, linting, and type checking during development
3+
alwaysApply: true
4+
---
5+
6+
# Code Quality Checkers
7+
8+
Run checkers **only on changed files/directories** to keep feedback fast. Run from **workspace root**.
9+
10+
## File/Directory-Specific Commands
11+
12+
### Linting (eslint)
13+
14+
```bash
15+
# Single file
16+
pnpm eslint packages/design-system/src/components/ds-button/ds-button.tsx
17+
18+
# Directory
19+
pnpm eslint packages/eslint-plugin/src/
20+
21+
# With auto-fix
22+
pnpm eslint --fix packages/design-system/src/components/ds-button/
23+
```
24+
25+
### Type Checking (tsc)
26+
27+
TypeScript checks the whole project config, so scope by package:
28+
29+
```bash
30+
# design-system package
31+
pnpm --filter @drivenets/design-system typecheck
32+
33+
# eslint-plugin package
34+
pnpm --filter @drivenets/eslint-plugin-design-system typecheck
35+
36+
# vite-plugin package
37+
pnpm --filter @drivenets/vite-plugin-design-system typecheck
38+
```
39+
40+
### Tests (vitest)
41+
42+
```bash
43+
# Single test file
44+
pnpm --filter @drivenets/design-system test packages/design-system/tests/exports.test.ts --run
45+
46+
# Directory of tests
47+
pnpm --filter @drivenets/eslint-plugin-design-system test src/__tests__/ --run
48+
49+
# Pattern match
50+
pnpm --filter @drivenets/vite-plugin-design-system test --run -t "snapshot"
51+
```
52+
53+
## When to Run What
54+
55+
| Changed | Run |
56+
| -------------------------- | --------------------------------------- |
57+
| `*.test.ts` file | `pnpm --filter <pkg> test <path> --run` |
58+
| Source file with tests | Lint the file + run related tests |
59+
| Source file, no tests | Lint the file + typecheck the package |
60+
| SCSS file in design-system | Lint the file |
61+
62+
## Notes
63+
64+
- **`--run` flag** prevents vitest watch mode
65+
- **design-system typecheck** auto-generates SCSS type defs
66+
- Prefer file-level lint, package-level typecheck, file-level test

.cursor/rules/code-review.mdc

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
description: Apply when reviewing code changes, running git diff, or preparing a PR
3+
alwaysApply: false
4+
---
5+
6+
# Code Review Rules
7+
8+
It is a local code review process done before submitting a PR.
9+
10+
## Process
11+
12+
1. Get diff: `git diff origin/main`
13+
2. Review every changed file against project cursor rules
14+
3. Flag only clear, high-severity issues (max 10 inline comments)
15+
16+
## Inline comment format
17+
18+
```typescript
19+
/**
20+
* REVIEW-[SEVERITY]: [ISSUE DESCRIPTION]
21+
*/
22+
```
23+
24+
- One issue per comment; place on the exact changed line
25+
- Natural tone, specific and actionable; do not mention automated or high-confidence
26+
- Severity emojis: 🚨 Critical 🔒 Security ⚡ Performance ⚠️ Logic ✨ Improvement
27+
28+
## Priorities to check
29+
30+
- No `!important` in SCSS
31+
- No hardcoded colors or spacing (use `--color-*`, `--spacing-*` tokens)
32+
- No `:global` in CSS modules
33+
- No unnecessary `useMemo`/`useCallback`
34+
- No `forwardRef` (deprecated)
35+
- No cross-component internal imports
36+
- No `useLayoutEffect` without DOM reads
37+
- Stories have `play` functions with `fn()` and a11y queries
38+
- No inline styles in stories
39+
- Props layer doesn't expose library internals
40+
- Logic errors, security issues, race conditions, missing edge cases
41+

.cursor/rules/design-system.mdc

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
description: Component scaffolding templates for creating new design system components
3+
globs: packages/design-system/src/components/**/*
4+
---
5+
6+
# Component Scaffolding
7+
8+
## File Structure
9+
10+
New component at `packages/design-system/src/components/ds-{name}/`:
11+
12+
```
13+
ds-{name}/
14+
├── index.ts # Barrel export
15+
├── ds-{name}.tsx # Implementation
16+
├── ds-{name}.types.ts # Props interface
17+
├── ds-{name}.module.scss # Styles
18+
└── ds-{name}.stories.tsx # Stories
19+
```
20+
21+
## Implementation Template
22+
23+
```tsx
24+
import classNames from 'classnames';
25+
import styles from './ds-{name}.module.scss';
26+
import type { Ds{Name}Props } from './ds-{name}.types';
27+
28+
/**
29+
* Design system {Name} component
30+
*/
31+
const Ds{Name} = ({
32+
className,
33+
children,
34+
...props
35+
}: Ds{Name}Props) => {
36+
return (
37+
<div className={classNames(styles.container, className)} {...props}>
38+
{children}
39+
</div>
40+
);
41+
};
42+
43+
export default Ds{Name};
44+
```
45+
46+
## Types Template
47+
48+
```typescript
49+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
50+
51+
export interface Ds{Name}Props extends ComponentPropsWithoutRef<'div'> {
52+
/**
53+
* JSDoc description
54+
*/
55+
label?: ReactNode;
56+
}
57+
```
58+
59+
## Index Barrel
60+
61+
```typescript
62+
export { default as Ds{Name} } from './ds-{name}';
63+
export type { Ds{Name}Props } from './ds-{name}.types';
64+
```
65+
66+
## Primitive Libraries
67+
68+
1. **Ark UI** (`@ark-ui/react`) - Primary choice for new components
69+
2. **Radix UI** (`@radix-ui/react-*`) - Deprecated, modify existing only
70+
3. **TanStack** - Data-heavy components (table, virtual)
71+
4. **Custom** - Only when no primitive exists
72+
73+
## Skills
74+
75+
- To scaffold a new component, use the **component-scaffold** skill.
76+
- To create a component from a Figma URL, use the **figma-to-component** skill.
77+
- To check if Ark UI has a primitive, use the **check-ark-ui** notepad.

.cursor/rules/monorepo.mdc

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
description: Package boundaries and workspace structure
3+
globs: packages/**/*
4+
---
5+
6+
# Package Boundaries
7+
8+
## Structure
9+
10+
```
11+
packages/
12+
├── design-system/ # @drivenets/design-system
13+
├── eslint-plugin/ # @drivenets/eslint-plugin-design-system
14+
├── vite-plugin/ # @drivenets/vite-plugin-design-system
15+
└── commitlint-plugin/ # @drivenets/commitlint-plugin-design-system
16+
```
17+
18+
## Import Rules
19+
20+
| Package | Can Import | Cannot Import |
21+
|---------|-----------|---------------|
22+
| design-system | React, Ark UI, Radix, TanStack, classnames | Other workspace packages |
23+
| eslint-plugin | ESLint APIs, TypeScript | React, design-system |
24+
| vite-plugin | Vite APIs | React, design-system |
25+
26+
## Workspace Dependencies
27+
28+
```json
29+
{
30+
"devDependencies": {
31+
"@drivenets/vite-plugin-design-system": "workspace:*"
32+
}
33+
}
34+
```
35+
36+
## Adding New Packages
37+
38+
1. Create `packages/{name}/`
39+
2. `package.json` with name `@drivenets/{name}`
40+
3. `tsconfig.json` extends `../../tsconfig.base.json`
41+
4. `eslint.config.ts` imports from `../../eslint.config.base.ts`
42+
43+
## Cross-Package Imports
44+
45+
```typescript
46+
// Good - use package name
47+
import { util } from '@drivenets/design-system';
48+
49+
// Bad - relative path across packages
50+
import { util } from '../../design-system/src/utils';
51+
```

0 commit comments

Comments
 (0)