@semplice-studio/pa-design-system 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/dist/layout.css +504 -0
  2. package/package.json +2 -1
@@ -0,0 +1,504 @@
1
+ /*
2
+ * @semplice/pa-design-system — layout utility classes (v1.35)
3
+ *
4
+ * `.pa-*` classes that compose the design system's tokens into the
5
+ * recurring page-chrome / section / grid / surface / typography
6
+ * primitives templates and consumer projects need.
7
+ *
8
+ * Every declaration sources its value from a `--pa-*` token. The only
9
+ * literals in this file are:
10
+ * - unitless numbers (0, 1, ...) and CSS keywords (auto, 100%)
11
+ * - icon-circle dimensions (28 / 40 / 48 / 64 px), documented inline
12
+ * as a known sizing-token gap — see `docs/frontend/layouts.md`.
13
+ *
14
+ * Imported automatically via `@import './layout.css';` in tokens.css,
15
+ * so consumers get the layer through the existing
16
+ * `@semplice/pa-design-system/tokens.css` entry. No new public export.
17
+ */
18
+
19
+ /* ------------------------------------------------------------------ */
20
+ /* Page chrome */
21
+ /* ------------------------------------------------------------------ */
22
+ .pa-page-frame {
23
+ width: 100%;
24
+ max-width: var(--pa-layout-frame-max);
25
+ margin: 0 auto;
26
+ background: var(--pa-color-bg-white);
27
+ }
28
+
29
+ .pa-container {
30
+ width: 100%;
31
+ max-width: var(--pa-layout-container-max);
32
+ margin: 0 auto;
33
+ padding: 0 var(--pa-space-sm);
34
+ box-sizing: border-box;
35
+ }
36
+
37
+ .pa-narrow {
38
+ width: 100%;
39
+ max-width: var(--pa-layout-narrow-max);
40
+ margin: 0 auto;
41
+ }
42
+
43
+ .pa-narrow--xs { max-width: var(--pa-layout-auth-max); }
44
+ .pa-narrow--prose { max-width: var(--pa-layout-prose-max); }
45
+
46
+ /* ------------------------------------------------------------------ */
47
+ /* Sections (vertical rhythm + band variants) */
48
+ /* ------------------------------------------------------------------ */
49
+ .pa-section {
50
+ padding: var(--pa-space-lg) var(--pa-space-sm);
51
+ }
52
+
53
+ .pa-section--lg {
54
+ padding: var(--pa-space-2xl) var(--pa-space-sm);
55
+ }
56
+
57
+ .pa-section--dark {
58
+ background: var(--pa-color-bg-primary-dark-120);
59
+ color: var(--pa-color-text-white);
60
+ }
61
+
62
+ .pa-section--tint {
63
+ background: var(--pa-color-bg-primary-light-40);
64
+ }
65
+
66
+ .pa-section--gradient {
67
+ background: linear-gradient(
68
+ 135deg,
69
+ var(--pa-color-bg-primary-dark-110) 0%,
70
+ var(--pa-color-primary) 100%
71
+ );
72
+ color: var(--pa-color-text-white);
73
+ }
74
+
75
+ /* ------------------------------------------------------------------ */
76
+ /* Grids */
77
+ /* ------------------------------------------------------------------ */
78
+ .pa-grid-2 {
79
+ display: grid;
80
+ grid-template-columns: repeat(2, minmax(0, 1fr));
81
+ gap: var(--pa-space-sm);
82
+ }
83
+
84
+ .pa-grid-3 {
85
+ display: grid;
86
+ grid-template-columns: repeat(3, minmax(0, 1fr));
87
+ gap: var(--pa-space-sm);
88
+ }
89
+
90
+ .pa-grid-4 {
91
+ display: grid;
92
+ grid-template-columns: repeat(4, minmax(0, 1fr));
93
+ gap: var(--pa-space-sm);
94
+ }
95
+
96
+ .pa-grid-6 {
97
+ display: grid;
98
+ grid-template-columns: repeat(6, minmax(0, 1fr));
99
+ gap: var(--pa-space-sm);
100
+ }
101
+
102
+ .pa-split {
103
+ display: grid;
104
+ grid-template-columns: 1fr 1fr;
105
+ gap: var(--pa-space-xl);
106
+ }
107
+
108
+ .pa-layout-sidebar {
109
+ display: grid;
110
+ grid-template-columns: minmax(0, 1fr) var(--pa-layout-sidebar-md);
111
+ gap: var(--pa-space-2xl);
112
+ }
113
+
114
+ .pa-layout-sidebar--sm {
115
+ grid-template-columns: minmax(0, 1fr) var(--pa-layout-sidebar-sm);
116
+ }
117
+
118
+ .pa-layout-sidebar--md {
119
+ grid-template-columns: minmax(0, 1fr) var(--pa-layout-sidebar-md);
120
+ }
121
+
122
+ /* Sidebar on the left, content first in the DOM for reading order. */
123
+ .pa-layout-sidebar--left {
124
+ grid-template-columns: var(--pa-layout-sidebar-md) minmax(0, 1fr);
125
+ }
126
+
127
+ .pa-layout-sidebar--left.pa-layout-sidebar--sm {
128
+ grid-template-columns: var(--pa-layout-sidebar-sm) minmax(0, 1fr);
129
+ }
130
+
131
+ .pa-layout-sidebar--left > :first-child { grid-column: 2; grid-row: 1; }
132
+ .pa-layout-sidebar--left > :last-child { grid-column: 1; grid-row: 1; }
133
+
134
+ .pa-field-full-row {
135
+ grid-column: 1 / -1;
136
+ }
137
+
138
+ /* ------------------------------------------------------------------ */
139
+ /* Stacks (vertical gap helpers) */
140
+ /* ------------------------------------------------------------------ */
141
+ .pa-stack-xs { display: flex; flex-direction: column; gap: var(--pa-space-xs); }
142
+ .pa-stack-sm { display: flex; flex-direction: column; gap: var(--pa-space-sm); }
143
+ .pa-stack-md { display: flex; flex-direction: column; gap: var(--pa-space-md); }
144
+ .pa-stack-lg { display: flex; flex-direction: column; gap: var(--pa-space-lg); }
145
+ .pa-stack-xl { display: flex; flex-direction: column; gap: var(--pa-space-xl); }
146
+
147
+ /* ------------------------------------------------------------------ */
148
+ /* Typography helpers */
149
+ /* ------------------------------------------------------------------ */
150
+ .pa-eyebrow {
151
+ font-family: var(--pa-font-family-base);
152
+ font-size: var(--pa-font-eyebrow-size);
153
+ line-height: var(--pa-font-eyebrow-line-height);
154
+ font-weight: var(--pa-font-eyebrow-weight);
155
+ letter-spacing: var(--pa-font-eyebrow-letter-spacing);
156
+ text-transform: var(--pa-font-eyebrow-transform);
157
+ color: var(--pa-color-text-muted);
158
+ margin: 0;
159
+ }
160
+
161
+ .pa-eyebrow--sm {
162
+ font-size: var(--pa-font-label-helper-size);
163
+ line-height: var(--pa-font-label-helper-line-height);
164
+ }
165
+
166
+ /* ------------------------------------------------------------------ */
167
+ /* Page & section titles — heading + optional subtitle paragraph */
168
+ /* (replaces the retired PaTitleBar pattern) */
169
+ /* ------------------------------------------------------------------ */
170
+ .pa-page-title {
171
+ font-family: var(--pa-font-family-base);
172
+ font-size: var(--pa-font-h3-size);
173
+ line-height: var(--pa-font-h3-line-height);
174
+ font-weight: var(--pa-font-h3-weight);
175
+ letter-spacing: var(--pa-font-h3-letter-spacing);
176
+ color: var(--pa-color-text-black);
177
+ margin: 0;
178
+ }
179
+
180
+ .pa-page-subtitle {
181
+ font-family: var(--pa-font-family-base);
182
+ font-size: var(--pa-font-body-size);
183
+ line-height: var(--pa-font-body-line-height);
184
+ font-weight: var(--pa-font-body-weight);
185
+ color: var(--pa-color-text-secondary-gray);
186
+ margin: var(--pa-space-xs) 0 0;
187
+ }
188
+
189
+ .pa-section-title {
190
+ font-family: var(--pa-font-family-base);
191
+ font-size: var(--pa-font-h4-size);
192
+ line-height: var(--pa-font-h4-line-height);
193
+ font-weight: var(--pa-font-h4-weight);
194
+ letter-spacing: var(--pa-font-h4-letter-spacing);
195
+ color: var(--pa-color-text-black);
196
+ margin: 0;
197
+ }
198
+
199
+ .pa-section-title--gray {
200
+ color: var(--pa-color-text-secondary-gray);
201
+ }
202
+
203
+ .pa-section-subtitle {
204
+ font-family: var(--pa-font-family-base);
205
+ font-size: var(--pa-font-body-size);
206
+ line-height: var(--pa-font-body-line-height);
207
+ font-weight: var(--pa-font-body-weight);
208
+ color: var(--pa-color-text-secondary-gray);
209
+ margin: var(--pa-space-2xs) 0 0;
210
+ }
211
+
212
+ /* ------------------------------------------------------------------ */
213
+ /* Surfaces */
214
+ /* ------------------------------------------------------------------ */
215
+ .pa-panel {
216
+ background: var(--pa-color-bg-white);
217
+ border: var(--pa-border-xs) solid var(--pa-color-border-subtle);
218
+ border-radius: var(--pa-radius-smooth);
219
+ padding: var(--pa-space-lg);
220
+ box-sizing: border-box;
221
+ }
222
+
223
+ .pa-tint-card {
224
+ background: var(--pa-color-bg-primary-light-40);
225
+ border-radius: var(--pa-radius-smooth);
226
+ padding: var(--pa-space-md);
227
+ box-sizing: border-box;
228
+ }
229
+
230
+ .pa-tint-card--sticky {
231
+ position: sticky;
232
+ top: var(--pa-space-md);
233
+ }
234
+
235
+ /* ------------------------------------------------------------------ */
236
+ /* Dividers */
237
+ /* ------------------------------------------------------------------ */
238
+ .pa-divider {
239
+ height: var(--pa-border-xs);
240
+ background: var(--pa-color-border-subtle);
241
+ border: 0;
242
+ margin: var(--pa-space-md) 0;
243
+ }
244
+
245
+ .pa-divider--text {
246
+ display: flex;
247
+ align-items: center;
248
+ gap: var(--pa-space-sm);
249
+ margin: var(--pa-space-md) 0;
250
+ font-family: var(--pa-font-family-base);
251
+ font-size: var(--pa-font-small-size);
252
+ line-height: var(--pa-font-small-line-height);
253
+ color: var(--pa-color-text-muted);
254
+ }
255
+
256
+ .pa-divider--text::before,
257
+ .pa-divider--text::after {
258
+ content: '';
259
+ flex: 1;
260
+ height: var(--pa-border-xs);
261
+ background: var(--pa-color-border-subtle);
262
+ }
263
+
264
+ /* ------------------------------------------------------------------ */
265
+ /* Form chrome */
266
+ /* ------------------------------------------------------------------ */
267
+ .pa-form-action-bar {
268
+ display: flex;
269
+ justify-content: flex-end;
270
+ gap: var(--pa-space-xs-plus);
271
+ margin-top: var(--pa-space-lg);
272
+ padding-top: var(--pa-space-md);
273
+ border-top: var(--pa-border-xs) solid var(--pa-color-border-subtle);
274
+ }
275
+
276
+ /* ------------------------------------------------------------------ */
277
+ /* Tag / chip helpers */
278
+ /* ------------------------------------------------------------------ */
279
+ .pa-tag-cloud {
280
+ display: flex;
281
+ flex-wrap: wrap;
282
+ gap: var(--pa-space-xs);
283
+ }
284
+
285
+ /* ------------------------------------------------------------------ */
286
+ /* Icon-circle helpers */
287
+ /* Dimensions (28 / 40 / 48 / 64 px) are sizing literals — the token */
288
+ /* vocabulary has no `--pa-size-icon-*` group yet. Documented as a */
289
+ /* known gap in docs/frontend/layouts.md. */
290
+ /* ------------------------------------------------------------------ */
291
+ .pa-icon-circle-sm,
292
+ .pa-icon-circle-md,
293
+ .pa-icon-circle-lg,
294
+ .pa-icon-circle-xl {
295
+ display: inline-flex;
296
+ align-items: center;
297
+ justify-content: center;
298
+ border-radius: 50%;
299
+ flex-shrink: 0;
300
+ }
301
+
302
+ .pa-icon-circle-sm { width: 28px; height: 28px; }
303
+ .pa-icon-circle-md { width: 40px; height: 40px; }
304
+ .pa-icon-circle-lg { width: 48px; height: 48px; }
305
+ .pa-icon-circle-xl { width: 64px; height: 64px; }
306
+
307
+ /* ================================================================== */
308
+ /* Compositional helpers (v1.35 — US-140) */
309
+ /* ================================================================== */
310
+
311
+ /* ------------------------------------------------------------------ */
312
+ /* Prose — long-form article body */
313
+ /* Wraps an article's prose column. Scopes typography for the nested */
314
+ /* h2 / h3 / p / ul / ol / blockquote / figure / figcaption. */
315
+ /* ------------------------------------------------------------------ */
316
+ .pa-prose {
317
+ font-family: var(--pa-font-family-base);
318
+ font-size: var(--pa-font-body-size);
319
+ line-height: 1.7;
320
+ color: var(--pa-color-text-secondary-gray);
321
+ }
322
+
323
+ .pa-prose > * + * {
324
+ margin-top: var(--pa-space-md);
325
+ }
326
+
327
+ .pa-prose h2 {
328
+ font-family: var(--pa-font-family-base);
329
+ font-size: var(--pa-font-h4-size);
330
+ line-height: var(--pa-font-h4-line-height);
331
+ font-weight: var(--pa-font-h4-weight);
332
+ letter-spacing: var(--pa-font-h4-letter-spacing);
333
+ color: var(--pa-color-text-dark-blue);
334
+ margin-top: var(--pa-space-xl);
335
+ scroll-margin-top: var(--pa-space-sm);
336
+ }
337
+
338
+ .pa-prose h3 {
339
+ font-family: var(--pa-font-family-base);
340
+ font-size: var(--pa-font-h5-size);
341
+ line-height: var(--pa-font-h5-line-height);
342
+ font-weight: var(--pa-font-h5-weight);
343
+ letter-spacing: var(--pa-font-h5-letter-spacing);
344
+ color: var(--pa-color-text-dark-blue);
345
+ margin-top: var(--pa-space-lg);
346
+ scroll-margin-top: var(--pa-space-sm);
347
+ }
348
+
349
+ .pa-prose p {
350
+ margin: 0;
351
+ }
352
+
353
+ .pa-prose ul,
354
+ .pa-prose ol {
355
+ padding-left: var(--pa-space-md);
356
+ }
357
+
358
+ .pa-prose li + li {
359
+ margin-top: var(--pa-space-xs);
360
+ }
361
+
362
+ .pa-prose blockquote {
363
+ margin-top: var(--pa-space-lg);
364
+ }
365
+
366
+ .pa-prose figure {
367
+ margin: 0;
368
+ }
369
+
370
+ .pa-prose figcaption {
371
+ margin-top: var(--pa-space-xs);
372
+ font-family: var(--pa-font-family-base);
373
+ font-size: var(--pa-font-small-size);
374
+ line-height: var(--pa-font-small-line-height);
375
+ color: var(--pa-color-text-muted);
376
+ }
377
+
378
+ /* ------------------------------------------------------------------ */
379
+ /* Blockquote */
380
+ /* ------------------------------------------------------------------ */
381
+ .pa-blockquote {
382
+ display: flex;
383
+ flex-direction: column;
384
+ gap: var(--pa-space-xs);
385
+ border-left: var(--pa-border-md) solid var(--pa-color-primary);
386
+ background: var(--pa-color-bg-primary-light-40);
387
+ padding: var(--pa-space-xs) var(--pa-space-sm) var(--pa-space-sm) var(--pa-space-sm-plus);
388
+ margin: 0;
389
+ font-family: var(--pa-font-family-base);
390
+ font-size: var(--pa-font-h6-size);
391
+ line-height: var(--pa-font-h6-line-height);
392
+ font-weight: var(--pa-font-h6-weight);
393
+ letter-spacing: var(--pa-font-h6-letter-spacing);
394
+ color: var(--pa-color-text-secondary-gray);
395
+ }
396
+
397
+ .pa-blockquote p {
398
+ margin: 0;
399
+ }
400
+
401
+ .pa-blockquote cite {
402
+ font-style: normal;
403
+ font-size: var(--pa-font-body-size);
404
+ line-height: var(--pa-font-body-line-height);
405
+ font-weight: var(--pa-font-body-weight);
406
+ letter-spacing: var(--pa-font-body-letter-spacing);
407
+ }
408
+
409
+ /* ------------------------------------------------------------------ */
410
+ /* Stat — big-number block */
411
+ /* ------------------------------------------------------------------ */
412
+ .pa-stat {
413
+ text-align: center;
414
+ }
415
+
416
+ .pa-stat__value {
417
+ font-family: var(--pa-font-family-base);
418
+ font-size: var(--pa-font-h1-size);
419
+ line-height: var(--pa-font-h1-line-height);
420
+ font-weight: var(--pa-font-h1-weight);
421
+ letter-spacing: var(--pa-font-h1-letter-spacing);
422
+ margin: 0 0 var(--pa-space-xs);
423
+ }
424
+
425
+ .pa-stat__label {
426
+ font-family: var(--pa-font-family-base);
427
+ font-size: var(--pa-font-small-size);
428
+ line-height: var(--pa-font-small-line-height);
429
+ font-weight: var(--pa-font-small-weight);
430
+ color: var(--pa-color-text-muted);
431
+ margin: 0;
432
+ }
433
+
434
+ /* ------------------------------------------------------------------ */
435
+ /* Info strip — bordered horizontal cell row with vertical dividers */
436
+ /* ------------------------------------------------------------------ */
437
+ .pa-info-strip {
438
+ display: flex;
439
+ align-items: stretch;
440
+ width: 100%;
441
+ border: var(--pa-border-xs) solid var(--pa-color-border-subtle);
442
+ border-radius: var(--pa-radius-smooth);
443
+ background: var(--pa-color-bg-white);
444
+ overflow: hidden;
445
+ }
446
+
447
+ .pa-info-strip > * {
448
+ flex: 1;
449
+ padding: var(--pa-space-sm-plus);
450
+ min-width: 0;
451
+ }
452
+
453
+ .pa-info-strip > * + * {
454
+ border-left: var(--pa-border-xs) solid var(--pa-color-border-subtle);
455
+ }
456
+
457
+ /* ------------------------------------------------------------------ */
458
+ /* Map placeholder */
459
+ /* 320 px tall block; the gradient stops use literal hex values */
460
+ /* (#E0E8F1 / #C6D5E5) until a `--pa-gradient-placeholder-light` */
461
+ /* token is added — documented as a known gap in layouts.md. */
462
+ /* ------------------------------------------------------------------ */
463
+ .pa-map-placeholder {
464
+ display: flex;
465
+ align-items: center;
466
+ justify-content: center;
467
+ width: 100%;
468
+ height: var(--pa-layout-sidebar-md);
469
+ border-radius: var(--pa-radius-smooth);
470
+ background: linear-gradient(135deg, #E0E8F1 0%, #C6D5E5 100%);
471
+ color: var(--pa-color-text-secondary-gray);
472
+ font-family: var(--pa-font-family-base);
473
+ font-size: var(--pa-font-small-size);
474
+ line-height: var(--pa-font-small-line-height);
475
+ }
476
+
477
+ /* ------------------------------------------------------------------ */
478
+ /* Article meta — H1 → meta-row → bottom rule */
479
+ /* ------------------------------------------------------------------ */
480
+ .pa-article-meta {
481
+ display: flex;
482
+ flex-wrap: wrap;
483
+ align-items: center;
484
+ gap: var(--pa-space-sm);
485
+ padding-bottom: var(--pa-space-md);
486
+ border-bottom: var(--pa-border-xs) solid var(--pa-color-border-subtle);
487
+ font-family: var(--pa-font-family-base);
488
+ font-size: var(--pa-font-small-size);
489
+ line-height: var(--pa-font-small-line-height);
490
+ color: var(--pa-color-text-muted);
491
+ }
492
+
493
+ /* ------------------------------------------------------------------ */
494
+ /* Byline — flex avatar + name signature */
495
+ /* ------------------------------------------------------------------ */
496
+ .pa-byline {
497
+ display: flex;
498
+ align-items: center;
499
+ gap: var(--pa-space-sm);
500
+ font-family: var(--pa-font-family-base);
501
+ font-size: var(--pa-font-small-size);
502
+ line-height: var(--pa-font-small-line-height);
503
+ color: var(--pa-color-text-secondary-gray);
504
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semplice-studio/pa-design-system",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Vue 3 design system for Semplice's Italian Pubblica Amministrazione (PA) portals — components + design tokens.",
5
5
  "license": "EUPL-1.2",
6
6
  "author": "Semplice <andrea@semplice.is>",
@@ -24,6 +24,7 @@
24
24
  "import": "./dist/index.js"
25
25
  },
26
26
  "./tokens.css": "./dist/tokens.css",
27
+ "./layout.css": "./dist/layout.css",
27
28
  "./style.css": "./dist/style.css",
28
29
  "./components/*": {
29
30
  "types": "./dist/components/*/index.d.ts",