agroptima-design-system 1.2.32 → 1.3.0-beta.0

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/CLAUDE.md CHANGED
@@ -91,7 +91,8 @@ ComponentName/
91
91
  - `_form.scss` - Form-specific typography
92
92
  - `_cards_table.scss` - Table typography
93
93
  - **_config.scss** - Spacing scale, border radius, responsive breakpoints
94
- - **_breakpoints.scss** - Breakpoints: 375px (mobile), 900px (tablet), 1200px (desktop)
94
+ - **_breakpoints.scss** - Breakpoints: 375px (`$small`), 768px (`$medium`), 1200px (`$large`)
95
+ - **breakpoints.ts** - Same values for TypeScript/`matchMedia` consumers; `tests/breakpoints.spec.ts` fails if they drift apart
95
96
  - **_depth.scss** - Z-index scale
96
97
  - **_mixins.scss** - Reusable SCSS utilities
97
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agroptima-design-system",
3
- "version": "1.2.32",
3
+ "version": "1.3.0-beta.0",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -0,0 +1,5 @@
1
+ export const breakpoints = {
2
+ small: 375,
3
+ medium: 768,
4
+ large: 1200,
5
+ } as const
@@ -0,0 +1,22 @@
1
+ import { readFileSync } from 'node:fs'
2
+ import { join } from 'node:path'
3
+ import { breakpoints } from '../src/settings/breakpoints'
4
+
5
+ function parseScssBreakpoints(): Record<string, number> {
6
+ const scss = readFileSync(
7
+ join(__dirname, '../src/settings/_breakpoints.scss'),
8
+ 'utf8',
9
+ )
10
+ return Object.fromEntries(
11
+ [...scss.matchAll(/^\$([\w-]+):\s*(\d+)px;/gm)].map(([, name, value]) => [
12
+ name,
13
+ Number(value),
14
+ ]),
15
+ )
16
+ }
17
+
18
+ describe('breakpoints', () => {
19
+ it('keeps the TypeScript and SCSS definitions in sync', () => {
20
+ expect({ ...breakpoints }).toEqual(parseScssBreakpoints())
21
+ })
22
+ })