@med-o/design-tokens 0.3.0 → 0.4.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.
@@ -407,6 +407,12 @@
407
407
  --medo-layout-gutter: 1rem;
408
408
  --medo-layout-margin: 1rem;
409
409
  --medo-layout-section: 3rem;
410
+ --medo-layout-gap-inline: var(--medo-space-2);
411
+ --medo-layout-gap-content: var(--medo-space-4);
412
+ --medo-layout-gap-fields: var(--medo-space-4);
413
+ --medo-layout-gap-items: var(--medo-layout-gutter);
414
+ --medo-layout-gap-group: var(--medo-space-8);
415
+ --medo-layout-gap-section: var(--medo-layout-section);
410
416
  }
411
417
 
412
418
  [data-theme="light"] {
@@ -743,6 +749,12 @@
743
749
  --medo-layout-gutter: 1.5rem;
744
750
  --medo-layout-margin: 1.5rem;
745
751
  --medo-layout-section: 4rem;
752
+ --medo-layout-gap-inline: var(--medo-space-2);
753
+ --medo-layout-gap-content: var(--medo-space-4);
754
+ --medo-layout-gap-fields: var(--medo-space-6);
755
+ --medo-layout-gap-items: var(--medo-layout-gutter);
756
+ --medo-layout-gap-group: var(--medo-space-10);
757
+ --medo-layout-gap-section: var(--medo-layout-section);
746
758
  }
747
759
  }
748
760
 
@@ -752,5 +764,11 @@
752
764
  --medo-layout-gutter: 1.5rem;
753
765
  --medo-layout-margin: 2rem;
754
766
  --medo-layout-section: 6rem;
767
+ --medo-layout-gap-inline: var(--medo-space-2);
768
+ --medo-layout-gap-content: var(--medo-space-4);
769
+ --medo-layout-gap-fields: var(--medo-space-6);
770
+ --medo-layout-gap-items: var(--medo-layout-gutter);
771
+ --medo-layout-gap-group: var(--medo-space-12);
772
+ --medo-layout-gap-section: var(--medo-layout-section);
755
773
  }
756
774
  }
@@ -4608,5 +4608,83 @@
4608
4608
  "type": "dimension",
4609
4609
  "cssVar": "--medo-layout-section",
4610
4610
  "value": "3rem"
4611
+ },
4612
+ {
4613
+ "name": "layout/gap/inline",
4614
+ "path": [
4615
+ "layout",
4616
+ "gap",
4617
+ "inline"
4618
+ ],
4619
+ "type": "dimension",
4620
+ "cssVar": "--medo-layout-gap-inline",
4621
+ "value": "0.5rem",
4622
+ "ref": "2",
4623
+ "description": "Rule: elements side by side in one group – buttons, tags, filters. 8 px."
4624
+ },
4625
+ {
4626
+ "name": "layout/gap/content",
4627
+ "path": [
4628
+ "layout",
4629
+ "gap",
4630
+ "content"
4631
+ ],
4632
+ "type": "dimension",
4633
+ "cssVar": "--medo-layout-gap-content",
4634
+ "value": "1rem",
4635
+ "ref": "4",
4636
+ "description": "Rule: inside one block – heading, text, actions. 16 px."
4637
+ },
4638
+ {
4639
+ "name": "layout/gap/fields",
4640
+ "path": [
4641
+ "layout",
4642
+ "gap",
4643
+ "fields"
4644
+ ],
4645
+ "type": "dimension",
4646
+ "cssVar": "--medo-layout-gap-fields",
4647
+ "value": "1rem",
4648
+ "ref": "4",
4649
+ "description": "Rule: form fields below each other. 16 · 24 · 24 px."
4650
+ },
4651
+ {
4652
+ "name": "layout/gap/items",
4653
+ "path": [
4654
+ "layout",
4655
+ "gap",
4656
+ "items"
4657
+ ],
4658
+ "type": "dimension",
4659
+ "cssVar": "--medo-layout-gap-items",
4660
+ "value": "1rem",
4661
+ "ref": "gutter",
4662
+ "description": "Rule: cards and tiles in a grid or list. Equals layout/gutter (16 · 24 · 24 px)."
4663
+ },
4664
+ {
4665
+ "name": "layout/gap/group",
4666
+ "path": [
4667
+ "layout",
4668
+ "gap",
4669
+ "group"
4670
+ ],
4671
+ "type": "dimension",
4672
+ "cssVar": "--medo-layout-gap-group",
4673
+ "value": "2rem",
4674
+ "ref": "8",
4675
+ "description": "Rule: groups inside a section – sub-sections, fieldsets. 32 · 40 · 48 px."
4676
+ },
4677
+ {
4678
+ "name": "layout/gap/section",
4679
+ "path": [
4680
+ "layout",
4681
+ "gap",
4682
+ "section"
4683
+ ],
4684
+ "type": "dimension",
4685
+ "cssVar": "--medo-layout-gap-section",
4686
+ "value": "3rem",
4687
+ "ref": "section",
4688
+ "description": "Rule: sections of a page. Equals layout/section (48 · 64 · 96 px)."
4611
4689
  }
4612
4690
  ]
package/dist/js/tokens.js CHANGED
@@ -397,7 +397,13 @@ export const tokens = {
397
397
  "layout-columns": 4,
398
398
  "layout-gutter": "1rem",
399
399
  "layout-margin": "1rem",
400
- "layout-section": "3rem"
400
+ "layout-section": "3rem",
401
+ "layout-gap-inline": "0.5rem",
402
+ "layout-gap-content": "1rem",
403
+ "layout-gap-fields": "1rem",
404
+ "layout-gap-items": "1rem",
405
+ "layout-gap-group": "2rem",
406
+ "layout-gap-section": "3rem"
401
407
  };
402
408
 
403
409
  export const darkColors = {
@@ -110,6 +110,12 @@
110
110
 
111
111
  /* Spacing: 1 step = space/1 (4px). p-4 = space/4 = 16px, p-0.5 = space/0-5. */
112
112
  --spacing: var(--medo-space-1);
113
+ --spacing-inline: var(--medo-layout-gap-inline);
114
+ --spacing-content: var(--medo-layout-gap-content);
115
+ --spacing-fields: var(--medo-layout-gap-fields);
116
+ --spacing-items: var(--medo-layout-gap-items);
117
+ --spacing-group: var(--medo-layout-gap-group);
118
+ --spacing-section: var(--medo-layout-gap-section);
113
119
 
114
120
  /* Radius */
115
121
  --radius-*: initial;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@med-o/design-tokens",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Design tokens of the med.o Design System (DTCG source, CSS variables, Tailwind v4 theme, JS).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,6 +24,38 @@
24
24
  "value": 96,
25
25
  "unit": "px"
26
26
  }
27
+ },
28
+ "gap": {
29
+ "inline": {
30
+ "$type": "dimension",
31
+ "$value": "{space.2}",
32
+ "$description": "Rule: elements side by side in one group – buttons, tags, filters. 8 px."
33
+ },
34
+ "content": {
35
+ "$type": "dimension",
36
+ "$value": "{space.4}",
37
+ "$description": "Rule: inside one block – heading, text, actions. 16 px."
38
+ },
39
+ "fields": {
40
+ "$type": "dimension",
41
+ "$value": "{space.6}",
42
+ "$description": "Rule: form fields below each other. 16 · 24 · 24 px."
43
+ },
44
+ "items": {
45
+ "$type": "dimension",
46
+ "$value": "{layout.gutter}",
47
+ "$description": "Rule: cards and tiles in a grid or list. Equals layout/gutter (16 · 24 · 24 px)."
48
+ },
49
+ "group": {
50
+ "$type": "dimension",
51
+ "$value": "{space.12}",
52
+ "$description": "Rule: groups inside a section – sub-sections, fieldsets. 32 · 40 · 48 px."
53
+ },
54
+ "section": {
55
+ "$type": "dimension",
56
+ "$value": "{layout.section}",
57
+ "$description": "Rule: sections of a page. Equals layout/section (48 · 64 · 96 px)."
58
+ }
27
59
  }
28
60
  }
29
61
  }
@@ -24,6 +24,38 @@
24
24
  "value": 48,
25
25
  "unit": "px"
26
26
  }
27
+ },
28
+ "gap": {
29
+ "inline": {
30
+ "$type": "dimension",
31
+ "$value": "{space.2}",
32
+ "$description": "Rule: elements side by side in one group – buttons, tags, filters. 8 px."
33
+ },
34
+ "content": {
35
+ "$type": "dimension",
36
+ "$value": "{space.4}",
37
+ "$description": "Rule: inside one block – heading, text, actions. 16 px."
38
+ },
39
+ "fields": {
40
+ "$type": "dimension",
41
+ "$value": "{space.4}",
42
+ "$description": "Rule: form fields below each other. 16 · 24 · 24 px."
43
+ },
44
+ "items": {
45
+ "$type": "dimension",
46
+ "$value": "{layout.gutter}",
47
+ "$description": "Rule: cards and tiles in a grid or list. Equals layout/gutter (16 · 24 · 24 px)."
48
+ },
49
+ "group": {
50
+ "$type": "dimension",
51
+ "$value": "{space.8}",
52
+ "$description": "Rule: groups inside a section – sub-sections, fieldsets. 32 · 40 · 48 px."
53
+ },
54
+ "section": {
55
+ "$type": "dimension",
56
+ "$value": "{layout.section}",
57
+ "$description": "Rule: sections of a page. Equals layout/section (48 · 64 · 96 px)."
58
+ }
27
59
  }
28
60
  }
29
61
  }
@@ -24,6 +24,38 @@
24
24
  "value": 64,
25
25
  "unit": "px"
26
26
  }
27
+ },
28
+ "gap": {
29
+ "inline": {
30
+ "$type": "dimension",
31
+ "$value": "{space.2}",
32
+ "$description": "Rule: elements side by side in one group – buttons, tags, filters. 8 px."
33
+ },
34
+ "content": {
35
+ "$type": "dimension",
36
+ "$value": "{space.4}",
37
+ "$description": "Rule: inside one block – heading, text, actions. 16 px."
38
+ },
39
+ "fields": {
40
+ "$type": "dimension",
41
+ "$value": "{space.6}",
42
+ "$description": "Rule: form fields below each other. 16 · 24 · 24 px."
43
+ },
44
+ "items": {
45
+ "$type": "dimension",
46
+ "$value": "{layout.gutter}",
47
+ "$description": "Rule: cards and tiles in a grid or list. Equals layout/gutter (16 · 24 · 24 px)."
48
+ },
49
+ "group": {
50
+ "$type": "dimension",
51
+ "$value": "{space.10}",
52
+ "$description": "Rule: groups inside a section – sub-sections, fieldsets. 32 · 40 · 48 px."
53
+ },
54
+ "section": {
55
+ "$type": "dimension",
56
+ "$value": "{layout.section}",
57
+ "$description": "Rule: sections of a page. Equals layout/section (48 · 64 · 96 px)."
58
+ }
27
59
  }
28
60
  }
29
61
  }