@ossy/consultancy 3.24.1 → 3.25.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ossy/consultancy",
3
3
  "description": "Consultancy feature package — schemas, forecasts UI, and assignment margins",
4
- "version": "3.24.1",
4
+ "version": "3.25.0",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
7
7
  "module": "./src/index.js",
@@ -25,7 +25,7 @@
25
25
  "README.md"
26
26
  ],
27
27
  "dependencies": {
28
- "@ossy/email": "^3.24.1",
28
+ "@ossy/email": "^3.25.0",
29
29
  "@ossy/event-store": "^3.24.1",
30
30
  "@ossy/schema": "^3.24.0"
31
31
  },
@@ -42,5 +42,5 @@
42
42
  "devDependencies": {
43
43
  "jest": "^30.2.0"
44
44
  },
45
- "gitHead": "d0e7eda0397239d5e8a8cd5115d9c91959b4103f"
45
+ "gitHead": "00dd4b51a94de7e0399c9dfa59380a53e58c8523"
46
46
  }
@@ -1,35 +1,9 @@
1
1
  import React from 'react'
2
- import { Text } from '@ossy/design-system'
3
- import { CalendarDaySurfaceStyles } from '@ossy/calendar'
4
-
5
- const calendarGrid = {
6
- display: 'grid',
7
- width: '100%',
8
- minWidth: 0,
9
- gridTemplateColumns: 'repeat(7, minmax(0, 1fr))',
10
- gap: '4px',
11
- justifyItems: 'center',
12
- alignItems: 'center',
13
- }
14
-
15
- const calendarDayLayout = {
16
- boxSizing: 'border-box',
17
- display: 'flex',
18
- justifyContent: 'center',
19
- alignItems: 'center',
20
- width: '100%',
21
- maxWidth: 32,
22
- aspectRatio: '1',
23
- minWidth: 0,
24
- borderRadius: '50%',
25
- padding: 0,
26
- fontSize: '.6rem',
27
- margin: 0,
28
- }
2
+ import { CalendarGrid, CalendarDay, CalendarDayNumber } from '@ossy/design-system'
29
3
 
30
4
  /**
31
5
  * Day numbers for one forecast month, Monday first.
32
- * Days off use the shared calendar day surface.
6
+ * Uses the shared design-system calendar grid (timesheet sizing).
33
7
  *
34
8
  * @param {{ month?: { year?: number|string, month?: string, days?: Array<{ monthDay?: number|string, isoWeekday?: number, isWorkday?: boolean }> } }} props
35
9
  */
@@ -42,27 +16,21 @@ export function MonthDayGrid ({ month }) {
42
16
  const monthKey = `${month.year}-${month.month}`
43
17
 
44
18
  return (
45
- <>
46
- <CalendarDaySurfaceStyles />
47
- <div style={{ ...calendarGrid, padding: '0 var(--space-m) var(--space-m)' }}>
48
- {Array.from({ length: startPad }, (_, index) => (
49
- <div key={`${monthKey}-pad-s-${index}`} />
50
- ))}
51
- {days.map((day) => (
52
- <Text
53
- key={`${monthKey}-${day.monthDay}`}
54
- variant="small"
55
- data-ossy-calendar-day
56
- data-day-off={!day.isWorkday}
57
- style={calendarDayLayout}
58
- >
59
- {day.monthDay}
60
- </Text>
61
- ))}
62
- {Array.from({ length: endPad }, (_, index) => (
63
- <div key={`${monthKey}-pad-e-${index}`} />
64
- ))}
65
- </div>
66
- </>
19
+ <CalendarGrid style={{ padding: '0 var(--space-m) var(--space-m)' }}>
20
+ {Array.from({ length: startPad }, (_, index) => (
21
+ <div key={`${monthKey}-pad-s-${index}`} />
22
+ ))}
23
+ {days.map((day) => (
24
+ <CalendarDay
25
+ key={`${monthKey}-${day.monthDay}`}
26
+ dayOff={!day.isWorkday}
27
+ >
28
+ <CalendarDayNumber>{day.monthDay}</CalendarDayNumber>
29
+ </CalendarDay>
30
+ ))}
31
+ {Array.from({ length: endPad }, (_, index) => (
32
+ <div key={`${monthKey}-pad-e-${index}`} />
33
+ ))}
34
+ </CalendarGrid>
67
35
  )
68
36
  }