@utopia-studio-design/design-system-cli 0.4.1 → 0.6.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/README.md +23 -0
- package/bin/utopia-ds-mcp.mjs +9 -2
- package/bin/utopia-ds.mjs +106 -8
- package/data/blocks/activity-feed/ActivityFeedBlock.tsx +255 -0
- package/data/blocks/activity-feed/README.md +16 -0
- package/data/blocks/activity-feed/activity-feed-contract.ts +96 -0
- package/data/blocks/activity-feed/activity-feed-fixture.ts +22 -0
- package/data/blocks/activity-feed/activity-feed.css +154 -0
- package/data/blocks/agent-status/AgentStatusBlock.tsx +313 -0
- package/data/blocks/agent-status/README.md +15 -0
- package/data/blocks/agent-status/agent-status-contract.ts +133 -0
- package/data/blocks/agent-status/agent-status-fixture.ts +79 -0
- package/data/blocks/agent-status/agent-status.css +216 -0
- package/data/blocks/analytics-dashboard/AnalyticsDashboardBlocks.tsx +107 -0
- package/data/blocks/analytics-dashboard/AnalyticsMetricBlocks.tsx +87 -0
- package/data/blocks/analytics-dashboard/README.md +17 -0
- package/data/blocks/analytics-dashboard/analytics-dashboard.css +92 -0
- package/data/blocks/calendar-application/CalendarApplicationBlocks.tsx +519 -0
- package/data/blocks/calendar-application/README.md +20 -0
- package/data/blocks/calendar-application/calendar-application.css +216 -0
- package/data/blocks/calendar-application/calendar-localization.ts +90 -0
- package/data/blocks/calendar-application/calendar-panel-contract.ts +72 -0
- package/data/blocks/dashboard-composer/CeramicPuckAdapter.tsx +380 -0
- package/data/blocks/dashboard-composer/DashboardComposerBlocks.tsx +337 -0
- package/data/blocks/dashboard-composer/README.md +16 -0
- package/data/blocks/dashboard-composer/RegistryDataBlocks.tsx +238 -0
- package/data/blocks/dashboard-composer/dashboard-composer.css +328 -0
- package/data/blocks/database-workspace/DatabaseWorkspaceBlocks.tsx +240 -0
- package/data/blocks/database-workspace/README.md +9 -0
- package/data/blocks/database-workspace/database-workspace.css +107 -0
- package/data/blocks/interaction-workbench/InteractionWorkbench.tsx +271 -0
- package/data/blocks/interaction-workbench/README.md +9 -0
- package/data/blocks/interaction-workbench/interaction-workbench.css +226 -0
- package/data/docs/calendar.md +164 -0
- package/data/docs/charts.md +95 -0
- package/data/docs/composition-registry.md +174 -0
- package/data/docs/dashboard-composer.md +94 -0
- package/data/docs/database.md +68 -0
- package/data/docs/examples/dashboard-layout.v1.json +65 -0
- package/data/docs/foundations.md +1 -1
- package/data/docs/interaction-foundation.md +109 -0
- package/data/docs/quick-start-ai.md +23 -1
- package/data/manifests/blocks.json +392 -0
- package/data/manifests/catalog.json +7 -4
- package/data/manifests/components.json +179 -0
- package/data/manifests/composition-registry.json +427 -0
- package/data/manifests/motion-profiles.json +1 -1
- package/data/manifests/patterns.json +113 -1
- package/data/manifests/templates.json +346 -0
- package/data/manifests/theme-renacore.json +142 -0
- package/data/manifests/theme-vyapti.json +125 -0
- package/data/manifests/themes.json +400 -28
- package/data/templates/analytics-dashboard/AnalyticsDashboardBlocks.tsx +107 -0
- package/data/templates/analytics-dashboard/AnalyticsMetricBlocks.tsx +87 -0
- package/data/templates/analytics-dashboard/README.md +6 -0
- package/data/templates/analytics-dashboard/analytics-dashboard.css +92 -0
- package/data/templates/analytics-dashboard/index.html +13 -0
- package/data/templates/analytics-dashboard/main.tsx +196 -0
- package/data/templates/analytics-dashboard/styles.css +120 -0
- package/data/templates/analytics-dashboard/template.manifest.json +17 -0
- package/data/templates/calendar-application/CalendarApplicationBlocks.tsx +519 -0
- package/data/templates/calendar-application/README.md +10 -0
- package/data/templates/calendar-application/calendar-application.css +216 -0
- package/data/templates/calendar-application/calendar-localization.ts +90 -0
- package/data/templates/calendar-application/index.html +14 -0
- package/data/templates/calendar-application/main.tsx +409 -0
- package/data/templates/calendar-application/styles.css +248 -0
- package/data/templates/calendar-application/template.manifest.json +27 -0
- package/data/templates/composition-registry-lab/README.md +9 -0
- package/data/templates/composition-registry-lab/index.html +14 -0
- package/data/templates/composition-registry-lab/main.tsx +217 -0
- package/data/templates/composition-registry-lab/sample-layout.json +63 -0
- package/data/templates/composition-registry-lab/styles.css +343 -0
- package/data/templates/composition-registry-lab/template.manifest.json +34 -0
- package/data/templates/dashboard-composer/ActivityFeedBlock.tsx +255 -0
- package/data/templates/dashboard-composer/AgentStatusBlock.tsx +313 -0
- package/data/templates/dashboard-composer/AnalyticsDashboardBlocks.tsx +107 -0
- package/data/templates/dashboard-composer/AnalyticsMetricBlocks.tsx +87 -0
- package/data/templates/dashboard-composer/CalendarApplicationBlocks.tsx +519 -0
- package/data/templates/dashboard-composer/CeramicPuckAdapter.tsx +380 -0
- package/data/templates/dashboard-composer/DashboardComposerBlocks.tsx +337 -0
- package/data/templates/dashboard-composer/DatabaseWorkspaceBlocks.tsx +240 -0
- package/data/templates/dashboard-composer/README.md +53 -0
- package/data/templates/dashboard-composer/RegistryDataBlocks.tsx +238 -0
- package/data/templates/dashboard-composer/activity-feed-contract.ts +96 -0
- package/data/templates/dashboard-composer/activity-feed-fixture.ts +22 -0
- package/data/templates/dashboard-composer/activity-feed.css +154 -0
- package/data/templates/dashboard-composer/agent-status-contract.ts +133 -0
- package/data/templates/dashboard-composer/agent-status-fixture.ts +79 -0
- package/data/templates/dashboard-composer/agent-status-lab/index.html +19 -0
- package/data/templates/dashboard-composer/agent-status-lab/main.tsx +151 -0
- package/data/templates/dashboard-composer/agent-status-lab/styles.css +139 -0
- package/data/templates/dashboard-composer/agent-status.css +216 -0
- package/data/templates/dashboard-composer/analytics-dashboard.css +92 -0
- package/data/templates/dashboard-composer/calendar-application.css +216 -0
- package/data/templates/dashboard-composer/calendar-localization.ts +90 -0
- package/data/templates/dashboard-composer/calendar-panel-contract.ts +72 -0
- package/data/templates/dashboard-composer/dashboard-composer.css +328 -0
- package/data/templates/dashboard-composer/database-workspace.css +107 -0
- package/data/templates/dashboard-composer/index.html +14 -0
- package/data/templates/dashboard-composer/main.tsx +550 -0
- package/data/templates/dashboard-composer/sample-layout.json +147 -0
- package/data/templates/dashboard-composer/styles.css +198 -0
- package/data/templates/dashboard-composer/template.manifest.json +34 -0
- package/data/templates/dashboard-composer/visual-editor/PuckEditorSurface.tsx +132 -0
- package/data/templates/dashboard-composer/visual-editor/VisualEditorApp.tsx +343 -0
- package/data/templates/dashboard-composer/visual-editor/index.html +17 -0
- package/data/templates/dashboard-composer/visual-editor/main.tsx +95 -0
- package/data/templates/dashboard-composer/visual-editor/styles.css +310 -0
- package/data/templates/database-workspace/DatabaseWorkspaceBlocks.tsx +240 -0
- package/data/templates/database-workspace/README.md +5 -0
- package/data/templates/database-workspace/database-workspace.css +107 -0
- package/data/templates/database-workspace/index.html +14 -0
- package/data/templates/database-workspace/main.tsx +247 -0
- package/data/templates/database-workspace/styles.css +121 -0
- package/data/templates/database-workspace/template.manifest.json +19 -0
- package/data/templates/interaction-lab/InteractionWorkbench.tsx +271 -0
- package/data/templates/interaction-lab/README.md +7 -0
- package/data/templates/interaction-lab/index.html +14 -0
- package/data/templates/interaction-lab/interaction-workbench.css +226 -0
- package/data/templates/interaction-lab/main.tsx +104 -0
- package/data/templates/interaction-lab/styles.css +224 -0
- package/data/templates/interaction-lab/template.manifest.json +36 -0
- package/lib/api.mjs +72 -5
- package/lib/composition-runtime.mjs +382 -0
- package/package.json +4 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
.ceramic-calendar-sidebar,
|
|
2
|
+
.ceramic-calendar-sidebar fieldset,
|
|
3
|
+
.ceramic-event-editor form {
|
|
4
|
+
display: grid;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ceramic-calendar-sidebar {
|
|
8
|
+
align-content: start;
|
|
9
|
+
gap: var(--space-5);
|
|
10
|
+
padding: var(--space-4);
|
|
11
|
+
border-inline-end: var(--border-width-hairline) solid var(--border);
|
|
12
|
+
background: var(--surface);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ceramic-calendar-sidebar-heading {
|
|
16
|
+
display: grid;
|
|
17
|
+
gap: var(--space-1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ceramic-calendar-sidebar-heading > span {
|
|
21
|
+
color: var(--muted-foreground);
|
|
22
|
+
font-size: var(--font-size-eyebrow);
|
|
23
|
+
font-weight: var(--font-weight-semibold);
|
|
24
|
+
letter-spacing: var(--tracking-eyebrow);
|
|
25
|
+
text-transform: uppercase;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ceramic-calendar-sidebar-heading > strong {
|
|
29
|
+
font-size: var(--font-size-body);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ceramic-calendar-mini {
|
|
33
|
+
inline-size: 100%;
|
|
34
|
+
padding: 0;
|
|
35
|
+
border: 0;
|
|
36
|
+
background: transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ceramic-calendar-mini .uds-calendar-month {
|
|
40
|
+
inline-size: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ceramic-calendar-mini .uds-calendar-title {
|
|
44
|
+
font-size: var(--font-size-small);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ceramic-calendar-mini .uds-calendar-grid {
|
|
48
|
+
inline-size: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ceramic-calendar-mini .uds-calendar-day-button {
|
|
52
|
+
inline-size: 100%;
|
|
53
|
+
min-inline-size: 0;
|
|
54
|
+
block-size: 1.875rem;
|
|
55
|
+
min-block-size: 1.875rem;
|
|
56
|
+
padding: 0;
|
|
57
|
+
font-size: var(--font-size-eyebrow);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ceramic-calendar-sidebar fieldset {
|
|
61
|
+
gap: var(--space-2);
|
|
62
|
+
margin: 0;
|
|
63
|
+
padding: var(--space-4) 0 0;
|
|
64
|
+
border: 0;
|
|
65
|
+
border-block-start: var(--border-width-hairline) solid var(--border);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ceramic-calendar-sidebar legend {
|
|
69
|
+
margin-block-end: var(--space-3);
|
|
70
|
+
font-size: var(--font-size-small);
|
|
71
|
+
font-weight: var(--font-weight-semibold);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ceramic-calendar-sidebar fieldset label,
|
|
75
|
+
.ceramic-event-checkbox {
|
|
76
|
+
display: grid;
|
|
77
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: var(--space-2);
|
|
80
|
+
min-block-size: var(--button-height-sm);
|
|
81
|
+
color: var(--muted-foreground);
|
|
82
|
+
font-size: var(--font-size-small);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ceramic-calendar-sidebar fieldset label > span {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: var(--space-2);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ceramic-calendar-sidebar fieldset i {
|
|
92
|
+
inline-size: 0.5rem;
|
|
93
|
+
block-size: 0.5rem;
|
|
94
|
+
border-radius: var(--radius-round);
|
|
95
|
+
background: var(--interaction-selection-border);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ceramic-calendar-sidebar fieldset i[data-resource='customer'] {
|
|
99
|
+
background: var(--warning);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ceramic-calendar-sidebar fieldset i[data-resource='focus'] {
|
|
103
|
+
background: var(--success);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.ceramic-timezone-selector {
|
|
107
|
+
display: grid;
|
|
108
|
+
gap: var(--space-2);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.ceramic-agenda-panel {
|
|
112
|
+
min-inline-size: 0;
|
|
113
|
+
padding: var(--space-4);
|
|
114
|
+
overflow: auto;
|
|
115
|
+
border-inline-start: var(--border-width-hairline) solid var(--border);
|
|
116
|
+
background: var(--surface);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ceramic-agenda-panel .uds-scheduler-agenda li {
|
|
120
|
+
grid-template-columns: minmax(0, 1fr);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.ceramic-agenda-panel .uds-scheduler-agenda li > span {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ceramic-agenda-panel .uds-scheduler-event {
|
|
128
|
+
inline-size: 100%;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ceramic-event-editor-backdrop {
|
|
132
|
+
position: fixed;
|
|
133
|
+
z-index: var(--z-overlay);
|
|
134
|
+
inset: 0;
|
|
135
|
+
background: var(--overlay);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.ceramic-event-editor {
|
|
139
|
+
position: fixed;
|
|
140
|
+
z-index: var(--z-modal);
|
|
141
|
+
inset-block: 0;
|
|
142
|
+
inset-inline-end: 0;
|
|
143
|
+
inline-size: min(100%, 30rem);
|
|
144
|
+
overflow: auto;
|
|
145
|
+
padding: var(--space-6);
|
|
146
|
+
border-inline-start: var(--border-width-strong) solid var(--border);
|
|
147
|
+
background: var(--popover-surface);
|
|
148
|
+
color: var(--foreground);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.ceramic-event-editor > header,
|
|
152
|
+
.ceramic-event-editor-actions,
|
|
153
|
+
.ceramic-event-editor-actions > div {
|
|
154
|
+
display: flex;
|
|
155
|
+
flex-wrap: wrap;
|
|
156
|
+
align-items: start;
|
|
157
|
+
gap: var(--space-2);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.ceramic-event-editor > header,
|
|
161
|
+
.ceramic-event-editor-actions {
|
|
162
|
+
justify-content: space-between;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.ceramic-event-editor > header > div {
|
|
166
|
+
display: grid;
|
|
167
|
+
gap: var(--space-1);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.ceramic-event-editor > header span {
|
|
171
|
+
color: var(--muted-foreground);
|
|
172
|
+
font-size: var(--font-size-eyebrow);
|
|
173
|
+
font-weight: var(--font-weight-semibold);
|
|
174
|
+
letter-spacing: var(--tracking-eyebrow);
|
|
175
|
+
text-transform: uppercase;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.ceramic-event-editor h2 {
|
|
179
|
+
margin: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.ceramic-event-editor form {
|
|
183
|
+
gap: var(--space-4);
|
|
184
|
+
margin-block-start: var(--space-6);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.ceramic-event-editor-actions {
|
|
188
|
+
margin-block-start: var(--space-2);
|
|
189
|
+
padding-block-start: var(--space-4);
|
|
190
|
+
border-block-start: var(--border-width-hairline) solid var(--border);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.ceramic-event-editor-alert {
|
|
194
|
+
padding: var(--space-3);
|
|
195
|
+
border: var(--border-width-hairline) solid var(--destructive-border);
|
|
196
|
+
border-radius: var(--radius-md);
|
|
197
|
+
background: var(--destructive-surface);
|
|
198
|
+
color: var(--destructive-text);
|
|
199
|
+
font-size: var(--font-size-small);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.ceramic-event-editor-alert:focus {
|
|
203
|
+
outline: var(--focus-ring-width) solid var(--focus-ring);
|
|
204
|
+
outline-offset: var(--focus-ring-offset);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@media (max-width: 44rem) {
|
|
208
|
+
.ceramic-event-editor {
|
|
209
|
+
inline-size: 100%;
|
|
210
|
+
padding: var(--space-4);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.ceramic-event-editor-actions > div {
|
|
214
|
+
flex: 1 1 auto;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { SchedulerLabelOverrides } from '@utopia-studio-design/design-system/Calendar'
|
|
2
|
+
|
|
3
|
+
export const calendarLocaleOptions = ['en-US', 'ar-SA', 'ar-EG', 'ar-AE'] as const
|
|
4
|
+
export type CalendarLocale = typeof calendarLocaleOptions[number]
|
|
5
|
+
|
|
6
|
+
export function isArabicCalendarLocale(locale: string) {
|
|
7
|
+
return locale.toLowerCase().startsWith('ar')
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const arabicSchedulerLabels: SchedulerLabelOverrides = {
|
|
11
|
+
navigationLabel: 'التنقل بين تواريخ التقويم',
|
|
12
|
+
changeDateLabel: 'تغيير تاريخ التقويم',
|
|
13
|
+
previous: 'السابق',
|
|
14
|
+
today: 'اليوم',
|
|
15
|
+
next: 'التالي',
|
|
16
|
+
viewsLabel: 'طرق عرض التقويم',
|
|
17
|
+
view: { month: 'الشهر', week: 'الأسبوع', day: 'اليوم', agenda: 'جدول الأعمال' },
|
|
18
|
+
compactView: { month: 'الشهر', week: 'الأسبوع', day: 'اليوم', agenda: 'الأجندة' },
|
|
19
|
+
newEvent: 'حدث جديد',
|
|
20
|
+
allDay: 'طوال اليوم',
|
|
21
|
+
allDayRegion: 'أحداث طوال اليوم',
|
|
22
|
+
dayView: 'عرض تقويم اليوم',
|
|
23
|
+
weekView: 'عرض تقويم الأسبوع',
|
|
24
|
+
monthView: 'عرض تقويم الشهر',
|
|
25
|
+
monthGrid: 'شبكة تقويم الشهر',
|
|
26
|
+
agenda: 'جدول الأحداث',
|
|
27
|
+
accessibleAgenda: 'جدول الأحداث المتاح',
|
|
28
|
+
noEventsInRange: 'لا توجد أحداث في هذه الفترة.',
|
|
29
|
+
calendars: (count) => `${new Intl.NumberFormat('ar').format(count)} تقاويم`,
|
|
30
|
+
more: (count) => `${new Intl.NumberFormat('ar').format(count)} أخرى`,
|
|
31
|
+
compactMore: (count) => `+${new Intl.NumberFormat('ar').format(count)}`,
|
|
32
|
+
selectDate: (dateLabel) => `اختيار ${dateLabel}`,
|
|
33
|
+
selectedEvent: 'الحدث المحدد',
|
|
34
|
+
selectedActions: 'إجراءات الحدث المحدد',
|
|
35
|
+
moveResizeActions: 'نقل الحدث المحدد وتغيير مدته',
|
|
36
|
+
moreActions: 'مزيد من إجراءات الحدث',
|
|
37
|
+
moveEarlier: 'نقل ١٥ دقيقة إلى وقت أبكر',
|
|
38
|
+
moveLater: 'نقل ١٥ دقيقة إلى وقت لاحق',
|
|
39
|
+
extend: 'تمديد ١٥ دقيقة',
|
|
40
|
+
duplicate: 'تكرار',
|
|
41
|
+
delete: 'حذف',
|
|
42
|
+
undo: 'التراجع عن آخر تغيير',
|
|
43
|
+
saving: 'جارٍ حفظ تغيير التقويم…',
|
|
44
|
+
saveError: 'فشل تغيير التقويم وتمت استعادته.',
|
|
45
|
+
conflict: 'يتعارض هذا التغيير مع حدث آخر أو فترة غير متاحة.',
|
|
46
|
+
loading: 'جارٍ تحميل أحداث التقويم…',
|
|
47
|
+
emptyTitle: 'لا توجد أحداث مجدولة',
|
|
48
|
+
emptyDescription: 'أنشئ حدثًا أو غيّر نطاق التاريخ.',
|
|
49
|
+
errorTitle: 'التقويم غير متاح',
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function getCalendarSchedulerLabels(locale: string) {
|
|
53
|
+
return isArabicCalendarLocale(locale) ? arabicSchedulerLabels : undefined
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function getCalendarSidebarLabels(locale: string) {
|
|
57
|
+
return isArabicCalendarLocale(locale) ? {
|
|
58
|
+
ariaLabel: 'الشريط الجانبي للتقويم',
|
|
59
|
+
jumpToDate: 'الانتقال إلى تاريخ',
|
|
60
|
+
schedule: 'الجدول',
|
|
61
|
+
calendars: 'تقاويمي',
|
|
62
|
+
} : undefined
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function getCalendarEditorLabels(locale: string) {
|
|
66
|
+
return isArabicCalendarLocale(locale) ? {
|
|
67
|
+
ariaLabel: 'محرر الحدث',
|
|
68
|
+
eyebrow: 'حدث التقويم',
|
|
69
|
+
newEvent: 'حدث جديد',
|
|
70
|
+
close: 'إغلاق محرر الحدث',
|
|
71
|
+
title: 'العنوان',
|
|
72
|
+
starts: 'يبدأ',
|
|
73
|
+
ends: 'ينتهي',
|
|
74
|
+
allDay: 'حدث طوال اليوم',
|
|
75
|
+
applyTo: 'تطبيق التغيير على',
|
|
76
|
+
occurrence: 'هذا التكرار',
|
|
77
|
+
series: 'السلسلة بأكملها',
|
|
78
|
+
save: 'حفظ الحدث',
|
|
79
|
+
saving: 'جارٍ حفظ الحدث…',
|
|
80
|
+
cancel: 'إلغاء',
|
|
81
|
+
delete: 'حذف الحدث',
|
|
82
|
+
validationSummary: 'تحقق من الحقول المميزة.',
|
|
83
|
+
titleRequired: 'أدخل عنوان الحدث.',
|
|
84
|
+
startRequired: 'أدخل تاريخ ووقت البدء.',
|
|
85
|
+
endRequired: 'أدخل تاريخ ووقت الانتهاء.',
|
|
86
|
+
invalidDateTime: 'أدخل تاريخًا ووقتًا صالحين.',
|
|
87
|
+
endAfterStart: 'يجب أن يكون الانتهاء بعد البدء.',
|
|
88
|
+
saveError: 'تعذر حفظ الحدث. لا تزال تغييراتك موجودة.',
|
|
89
|
+
} : undefined
|
|
90
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
SchedulerRootProps,
|
|
3
|
+
SchedulerView,
|
|
4
|
+
SchedulerWeekDay,
|
|
5
|
+
} from '@utopia-studio-design/design-system/Calendar'
|
|
6
|
+
import {
|
|
7
|
+
calendarLocaleOptions,
|
|
8
|
+
getCalendarSchedulerLabels,
|
|
9
|
+
type CalendarLocale,
|
|
10
|
+
} from './calendar-localization'
|
|
11
|
+
|
|
12
|
+
export type CalendarPanelDirection = 'inherit' | 'auto' | 'ltr' | 'rtl'
|
|
13
|
+
|
|
14
|
+
export interface CalendarPanelConfiguration {
|
|
15
|
+
direction?: 'ltr' | 'rtl'
|
|
16
|
+
initialScrollHour: number
|
|
17
|
+
locale: CalendarLocale
|
|
18
|
+
secondaryCalendar?: string
|
|
19
|
+
showAgendaAlternative: boolean
|
|
20
|
+
timezone: string
|
|
21
|
+
view: SchedulerView
|
|
22
|
+
weekStartsOn?: SchedulerWeekDay
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CalendarPanelContext {
|
|
26
|
+
compact: boolean
|
|
27
|
+
direction: 'ltr' | 'rtl'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const schedulerViews: SchedulerView[] = ['month', 'week', 'day', 'agenda']
|
|
31
|
+
const directionModes: CalendarPanelDirection[] = ['inherit', 'auto', 'ltr', 'rtl']
|
|
32
|
+
|
|
33
|
+
export function resolveCalendarPanelConfiguration(
|
|
34
|
+
props: Record<string, unknown>,
|
|
35
|
+
context: CalendarPanelContext,
|
|
36
|
+
): CalendarPanelConfiguration & Pick<SchedulerRootProps, 'calendarSystem' | 'labels'> {
|
|
37
|
+
const configuredView = schedulerViews.includes(props.view as SchedulerView)
|
|
38
|
+
? props.view as SchedulerView
|
|
39
|
+
: 'week'
|
|
40
|
+
const locale = calendarLocaleOptions.includes(props.locale as CalendarLocale)
|
|
41
|
+
? props.locale as CalendarLocale
|
|
42
|
+
: 'en-US'
|
|
43
|
+
const directionMode = directionModes.includes(props.direction as CalendarPanelDirection)
|
|
44
|
+
? props.direction as CalendarPanelDirection
|
|
45
|
+
: 'inherit'
|
|
46
|
+
const direction = directionMode === 'inherit'
|
|
47
|
+
? context.direction
|
|
48
|
+
: directionMode === 'auto' ? undefined : directionMode
|
|
49
|
+
const weekStartsOn = Number.isInteger(props.weekStartsOn)
|
|
50
|
+
&& Number(props.weekStartsOn) >= 0
|
|
51
|
+
&& Number(props.weekStartsOn) <= 6
|
|
52
|
+
? props.weekStartsOn as SchedulerWeekDay
|
|
53
|
+
: undefined
|
|
54
|
+
const initialScrollHour = Number.isFinite(props.initialScrollHour)
|
|
55
|
+
? Math.min(23, Math.max(0, Number(props.initialScrollHour)))
|
|
56
|
+
: 8
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
calendarSystem: 'gregory',
|
|
60
|
+
direction,
|
|
61
|
+
initialScrollHour,
|
|
62
|
+
labels: getCalendarSchedulerLabels(locale),
|
|
63
|
+
locale,
|
|
64
|
+
secondaryCalendar: props.secondaryCalendar === 'islamic-umalqura'
|
|
65
|
+
? 'islamic-umalqura'
|
|
66
|
+
: undefined,
|
|
67
|
+
showAgendaAlternative: props.showAgendaAlternative === true,
|
|
68
|
+
timezone: typeof props.timeZone === 'string' && props.timeZone ? props.timeZone : 'UTC',
|
|
69
|
+
view: context.compact && configuredView === 'week' ? 'day' : configuredView,
|
|
70
|
+
weekStartsOn,
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
.ceramic-todo-list {
|
|
2
|
+
display: grid;
|
|
3
|
+
align-content: start;
|
|
4
|
+
gap: var(--space-3);
|
|
5
|
+
min-inline-size: 0;
|
|
6
|
+
block-size: 100%;
|
|
7
|
+
padding: var(--space-4);
|
|
8
|
+
background: var(--surface);
|
|
9
|
+
color: var(--foreground);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ceramic-todo-list > header,
|
|
13
|
+
.ceramic-todo-items > li,
|
|
14
|
+
.ceramic-todo-items label,
|
|
15
|
+
.ceramic-todo-items > li > div,
|
|
16
|
+
.ceramic-todo-create,
|
|
17
|
+
.ceramic-dashboard-block-toolbar,
|
|
18
|
+
.ceramic-dashboard-block-toolbar > div {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ceramic-todo-list > header,
|
|
24
|
+
.ceramic-todo-items > li,
|
|
25
|
+
.ceramic-dashboard-block-toolbar {
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ceramic-todo-list > header {
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
gap: var(--space-3);
|
|
32
|
+
padding-block-end: var(--space-3);
|
|
33
|
+
border-block-end: var(--border-width-hairline) solid var(--border);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ceramic-todo-list > header > div {
|
|
37
|
+
display: grid;
|
|
38
|
+
min-inline-size: 0;
|
|
39
|
+
gap: var(--space-1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ceramic-todo-list h2,
|
|
43
|
+
.ceramic-todo-list p {
|
|
44
|
+
margin: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ceramic-todo-list > header span {
|
|
48
|
+
color: var(--muted-foreground);
|
|
49
|
+
font-size: var(--font-size-eyebrow);
|
|
50
|
+
font-weight: var(--font-weight-semibold);
|
|
51
|
+
letter-spacing: var(--tracking-eyebrow);
|
|
52
|
+
text-transform: uppercase;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ceramic-todo-items {
|
|
56
|
+
display: grid;
|
|
57
|
+
gap: var(--space-1);
|
|
58
|
+
margin: 0;
|
|
59
|
+
padding: 0;
|
|
60
|
+
list-style: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ceramic-todo-items > li {
|
|
64
|
+
gap: var(--space-2);
|
|
65
|
+
min-inline-size: 0;
|
|
66
|
+
padding-block: var(--space-2);
|
|
67
|
+
border-block-end: var(--border-width-hairline) solid var(--border);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ceramic-todo-list[data-density='compact'] .ceramic-todo-items > li {
|
|
71
|
+
padding-block: var(--space-1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ceramic-todo-list[data-density='comfortable'] .ceramic-todo-items > li {
|
|
75
|
+
padding-block: var(--space-3);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.ceramic-todo-items label {
|
|
79
|
+
gap: var(--space-2);
|
|
80
|
+
min-inline-size: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ceramic-todo-items label > span {
|
|
84
|
+
overflow-wrap: anywhere;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ceramic-todo-items > li[data-completed='true'] label > span {
|
|
88
|
+
color: var(--muted-foreground);
|
|
89
|
+
text-decoration: line-through;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ceramic-todo-items > li > div {
|
|
93
|
+
flex: 0 0 auto;
|
|
94
|
+
gap: var(--space-1);
|
|
95
|
+
color: var(--muted-foreground);
|
|
96
|
+
font-size: var(--font-size-small);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ceramic-todo-state {
|
|
100
|
+
display: grid;
|
|
101
|
+
gap: var(--space-1);
|
|
102
|
+
min-block-size: 8rem;
|
|
103
|
+
align-content: center;
|
|
104
|
+
justify-items: start;
|
|
105
|
+
color: var(--muted-foreground);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ceramic-todo-state strong {
|
|
109
|
+
color: var(--foreground);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ceramic-todo-create {
|
|
113
|
+
gap: var(--space-2);
|
|
114
|
+
min-inline-size: 0;
|
|
115
|
+
margin-block-start: auto;
|
|
116
|
+
padding-block-start: var(--space-2);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ceramic-todo-create .uds-input {
|
|
120
|
+
flex: 1 1 auto;
|
|
121
|
+
min-inline-size: 0;
|
|
122
|
+
inline-size: 100%;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ceramic-todo-create .uds-button {
|
|
126
|
+
flex: 0 0 auto;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ceramic-dashboard-renderer {
|
|
130
|
+
display: grid;
|
|
131
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
132
|
+
gap: var(--space-3);
|
|
133
|
+
min-inline-size: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ceramic-dashboard-block {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-direction: column;
|
|
139
|
+
grid-column: var(--ceramic-block-column) / span var(--ceramic-block-span);
|
|
140
|
+
min-inline-size: 0;
|
|
141
|
+
overflow: clip;
|
|
142
|
+
border: var(--border-width-hairline) solid var(--border);
|
|
143
|
+
background: var(--surface);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ceramic-dashboard-block > :not(.ceramic-dashboard-block-toolbar) {
|
|
147
|
+
flex: 1 1 auto;
|
|
148
|
+
min-block-size: 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.ceramic-dashboard-block[data-locked='true'] {
|
|
152
|
+
border-color: var(--interaction-selection-border);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.ceramic-dashboard-block-toolbar {
|
|
156
|
+
gap: var(--space-2);
|
|
157
|
+
min-inline-size: 0;
|
|
158
|
+
padding: var(--space-2) var(--space-3);
|
|
159
|
+
border-block-end: var(--border-width-hairline) solid var(--border);
|
|
160
|
+
background: var(--muted);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.ceramic-dashboard-block-toolbar > div {
|
|
164
|
+
gap: var(--space-1);
|
|
165
|
+
min-inline-size: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.ceramic-dashboard-block-toolbar strong {
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
text-overflow: ellipsis;
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ceramic-dashboard-missing,
|
|
175
|
+
.ceramic-dashboard-error {
|
|
176
|
+
display: grid;
|
|
177
|
+
gap: var(--space-1);
|
|
178
|
+
padding: var(--space-4);
|
|
179
|
+
color: var(--muted-foreground);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.ceramic-dashboard-missing strong,
|
|
183
|
+
.ceramic-dashboard-error strong {
|
|
184
|
+
color: var(--foreground);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.ceramic-dashboard-block .uds-scheduler-root {
|
|
188
|
+
border: 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.ceramic-puck-canvas {
|
|
192
|
+
container-name: ceramic-puck-canvas;
|
|
193
|
+
container-type: inline-size;
|
|
194
|
+
min-block-size: 100%;
|
|
195
|
+
min-inline-size: 0;
|
|
196
|
+
padding: var(--space-4);
|
|
197
|
+
background: var(--background);
|
|
198
|
+
color: var(--foreground);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.ceramic-puck-canvas > [class*='_DropZone_'] {
|
|
202
|
+
display: grid;
|
|
203
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
204
|
+
align-items: start;
|
|
205
|
+
gap: var(--space-3);
|
|
206
|
+
min-inline-size: 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.ceramic-puck-block-preview {
|
|
210
|
+
display: flex;
|
|
211
|
+
flex-direction: column;
|
|
212
|
+
grid-column: span var(--ceramic-puck-span);
|
|
213
|
+
min-block-size: 20rem;
|
|
214
|
+
min-inline-size: 0;
|
|
215
|
+
overflow: clip;
|
|
216
|
+
border: var(--border-width-hairline) solid var(--border);
|
|
217
|
+
background: var(--surface);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.ceramic-puck-block-preview[data-block-type='calendar-panel'] {
|
|
221
|
+
block-size: 34rem;
|
|
222
|
+
min-block-size: 34rem;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.ceramic-puck-block-preview[data-block-type='todo-list'] {
|
|
226
|
+
container-type: inline-size;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.ceramic-puck-block-preview[data-block-type='activity-feed'] {
|
|
230
|
+
min-block-size: 24rem;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.ceramic-puck-block-preview[data-block-type='agent-status'] {
|
|
234
|
+
min-block-size: 30rem;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.ceramic-puck-block-preview[data-block-type='issue-table'],
|
|
238
|
+
.ceramic-puck-block-preview[data-block-type='chart-panel'] {
|
|
239
|
+
min-block-size: 34rem;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.ceramic-puck-block-preview[data-locked='true'] {
|
|
243
|
+
border-color: var(--interaction-selection-border);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.ceramic-puck-block-preview .uds-scheduler-root,
|
|
247
|
+
.ceramic-puck-block-preview .ceramic-kpi-grid {
|
|
248
|
+
border: 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.ceramic-issue-table-block,
|
|
252
|
+
.ceramic-chart-panel-block {
|
|
253
|
+
min-inline-size: 0;
|
|
254
|
+
max-inline-size: 100%;
|
|
255
|
+
block-size: 100%;
|
|
256
|
+
padding: var(--space-3);
|
|
257
|
+
background: var(--surface);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.ceramic-issue-table-block .uds-database-root {
|
|
261
|
+
block-size: 100%;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.ceramic-chart-panel-state {
|
|
265
|
+
display: grid;
|
|
266
|
+
place-content: center;
|
|
267
|
+
justify-items: start;
|
|
268
|
+
gap: var(--space-2);
|
|
269
|
+
min-block-size: 20rem;
|
|
270
|
+
padding: var(--space-4);
|
|
271
|
+
color: var(--muted-foreground);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.ceramic-chart-panel-state strong {
|
|
275
|
+
color: var(--foreground);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@container (max-width: 30rem) {
|
|
279
|
+
.ceramic-puck-block-preview .ceramic-todo-items > li {
|
|
280
|
+
align-items: start;
|
|
281
|
+
flex-direction: column;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.ceramic-puck-block-preview .ceramic-todo-items > li > div {
|
|
285
|
+
padding-inline-start: calc(var(--control-size-sm) + var(--space-2));
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
@container ceramic-puck-canvas (max-width: 42rem) {
|
|
290
|
+
.ceramic-puck-block-preview {
|
|
291
|
+
grid-column: 1 / -1;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
@media (max-width: 48rem) {
|
|
296
|
+
.ceramic-dashboard-block {
|
|
297
|
+
grid-column: 1 / -1;
|
|
298
|
+
grid-row: auto;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.ceramic-puck-block-preview {
|
|
302
|
+
grid-column: 1 / -1;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.ceramic-dashboard-block-toolbar {
|
|
306
|
+
align-items: start;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@media (max-width: 28rem) {
|
|
311
|
+
.ceramic-dashboard-block-toolbar > div:first-child .uds-badge {
|
|
312
|
+
display: none;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.ceramic-dashboard-block-toolbar > div:first-child strong {
|
|
316
|
+
overflow: visible;
|
|
317
|
+
white-space: normal;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.ceramic-todo-items > li {
|
|
321
|
+
align-items: start;
|
|
322
|
+
flex-direction: column;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.ceramic-todo-items > li > div {
|
|
326
|
+
padding-inline-start: calc(var(--control-size-sm) + var(--space-2));
|
|
327
|
+
}
|
|
328
|
+
}
|