@widgetic/design-system 0.5.37 → 0.5.38

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.
@@ -43,6 +43,20 @@
43
43
  { id: 'workspace', labelWidth: 'w-16', labelWidths: ['w-24', 'w-28', 'w-20', 'w-24', 'w-16'] },
44
44
  { id: 'account', labelWidth: 'w-14', labelWidths: ['w-20', 'w-28'] }
45
45
  ];
46
+
47
+ /**
48
+ * The margin above every group after the first. Tailwind reads whole class names from the source, so the class is
49
+ * written here once and used by the real menu and by the skeleton, which must not move when the menu is known.
50
+ *
51
+ * What a person sees between the last row of a group and the label of the next one (Stats, then Account) is 24px, from
52
+ * the bottom of the text of the row to the top of the text of the label:
53
+ * 6px the row under its 20px line (Nav Row: h-8, 14/20)
54
+ * + 2px the gap between the children of the menu (gap-0.5)
55
+ * + 4px this margin (mt-1)
56
+ * + 12px the label above its 16px line (Nav Section Label: pt-3, as in Figma)
57
+ * = 24px. It was mt-3 (12px, 32px in all) up to 14 Nov 2026, when 24px was asked for.
58
+ */
59
+ const groupGapClass = 'mt-1';
46
60
  </script>
47
61
 
48
62
  {#if pending}
@@ -55,9 +69,10 @@
55
69
  {...restProps}
56
70
  >
57
71
  <span class="sr-only" role="status">{pendingLabel}</span>
58
- {#each pendingGroups as group (group.id)}
59
- <div class="flex flex-col gap-0.5" aria-hidden="true">
60
- <div class="flex h-8 w-full min-w-0 items-center py-1 ps-3 pe-2 pb-1">
72
+ {#each pendingGroups as group, groupIndex (group.id)}
73
+ <div class={cn('flex flex-col gap-0.5', groupIndex > 0 && groupGapClass)} aria-hidden="true">
74
+ <!-- The label box of the real menu (Nav Section Label: px-2 pt-3 pb-1): the bar sits where its text will. -->
75
+ <div class="flex h-8 w-full min-w-0 items-center px-2 pt-3 pb-1">
61
76
  <Skeleton class={cn('h-3', group.labelWidth)} pulse="low" />
62
77
  </div>
63
78
  {#each group.labelWidths as labelWidth, rowIndex (rowIndex)}
@@ -78,7 +93,7 @@
78
93
  >
79
94
  {#each groups as group, groupIndex (group.id)}
80
95
  <div
81
- class={cn('flex flex-col gap-0.5', groupIndex > 0 && 'mt-3')}
96
+ class={cn('flex flex-col gap-0.5', groupIndex > 0 && groupGapClass)}
82
97
  data-testid="settings-nav-group-{group.id}"
83
98
  >
84
99
  <NavSectionLabel label={group.label} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/design-system",
3
- "version": "0.5.37",
3
+ "version": "0.5.38",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "svelte": "./dist/index.js",