@khipu/design-system 0.1.0-alpha.53 → 0.1.0-alpha.55

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.
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
13
13
  * Source: design-system/src/tokens/tokens.json
14
- * Generated: 2026-04-30T15:21:29.125Z
14
+ * Generated: 2026-05-04T15:34:36.820Z
15
15
  *
16
16
  * To regenerate:
17
17
  * cd design-system && npm run tokens:generate
@@ -5177,15 +5177,35 @@ dialog#surveyModal button.circle {
5177
5177
 
5178
5178
  /* ========================================
5179
5179
  16 - SEGMENTED TABS (.kds-segmented-tabs)
5180
- Pill-group toggle for tab switching
5180
+ Pill-group toggle with sliding indicator
5181
5181
  ======================================== */
5182
5182
 
5183
5183
  .kds-segmented-tabs {
5184
+ --_tab-count: 2;
5185
+ --_active-idx: 0;
5184
5186
  height: var(--kds-spacing-5);
5185
- background: var(--kds-color-background-elevated);
5187
+ background: var(--kds-color-background-muted);
5186
5188
  border-radius: var(--kds-radius-lg);
5187
5189
  padding: var(--kds-spacing-0-25);
5188
5190
  display: flex;
5191
+ position: relative;
5192
+ }
5193
+
5194
+ /* Sliding pill indicator */
5195
+ .kds-segmented-tabs::before {
5196
+ content: "";
5197
+ position: absolute;
5198
+ top: var(--kds-spacing-0-25);
5199
+ bottom: var(--kds-spacing-0-25);
5200
+ left: var(--kds-spacing-0-25);
5201
+ width: calc((100% - var(--kds-spacing-0-25) * 2) / var(--_tab-count));
5202
+ border-radius: calc(var(--kds-radius-lg) - var(--kds-spacing-0-25));
5203
+ background: var(--kds-color-background-default);
5204
+ box-shadow: var(--kds-shadow-card);
5205
+ transition: transform var(--kds-transition-standard) var(--kds-easing-standard);
5206
+ transform: translateX(calc(var(--_active-idx) * 100%));
5207
+ z-index: 0;
5208
+ pointer-events: none;
5189
5209
  }
5190
5210
 
5191
5211
  .kds-segmented-tabs.kds-segmented-tabs button {
@@ -5197,14 +5217,21 @@ dialog#surveyModal button.circle {
5197
5217
  font-size: var(--kds-font-size-sm);
5198
5218
  color: var(--kds-color-text-secondary);
5199
5219
  cursor: pointer;
5200
- transition: background 0.2s, color 0.2s, box-shadow 0.2s;
5220
+ transition: color var(--kds-transition-shorter);
5221
+ position: relative;
5222
+ z-index: 1;
5223
+ display: flex;
5224
+ align-items: center;
5225
+ justify-content: center;
5226
+ box-sizing: border-box;
5227
+ block-size: auto;
5201
5228
  }
5202
5229
 
5203
5230
  .kds-segmented-tabs.kds-segmented-tabs button.active,
5204
5231
  .kds-segmented-tabs.kds-segmented-tabs button[aria-selected="true"] {
5205
- background: var(--kds-color-primary-main);
5206
- color: var(--kds-color-primary-contrast);
5207
- box-shadow: var(--kds-shadow-card);
5232
+ background: transparent;
5233
+ color: var(--kds-color-text-primary);
5234
+ font-weight: var(--kds-font-weight-semibold);
5208
5235
  }
5209
5236
 
5210
5237
 
@@ -5417,6 +5444,18 @@ dialog#surveyModal button.circle {
5417
5444
  font-size: 30px;
5418
5445
  }
5419
5446
 
5447
+ .kds-invoice-merchant-neutral {
5448
+ background: var(--kds-color-background-paper);
5449
+ border: 1px solid var(--kds-color-border-subtle);
5450
+ color: var(--kds-color-text-primary);
5451
+ }
5452
+
5453
+ .kds-invoice-merchant.initials {
5454
+ font-weight: 700;
5455
+ font-size: 11px;
5456
+ line-height: 1;
5457
+ }
5458
+
5420
5459
  /* -- Card Title -- */
5421
5460
  .kds-card-title {
5422
5461
  font-weight: 700;
@@ -1135,11 +1135,24 @@ const ui = _context.ui;
1135
1135
  /**
1136
1136
  * Initialize segmented tabs
1137
1137
  * Delegated click on .kds-segmented-tabs button toggles .active and aria-selected
1138
+ * Sets --_active-idx and --_tab-count CSS custom properties for sliding pill animation
1138
1139
  * Dispatches kds:tab:change with { index, button }
1139
1140
  * @param {Element} root - Root element to scope listeners (default: document)
1140
1141
  */
1141
1142
  function initSegmentedTabs(root) {
1142
1143
  root = root || document;
1144
+
1145
+ /* Set initial CSS vars on all segmented-tab containers */
1146
+ root.querySelectorAll('.kds-segmented-tabs').forEach(function(tabs) {
1147
+ var buttons = tabs.querySelectorAll('button');
1148
+ tabs.style.setProperty('--_tab-count', buttons.length);
1149
+ var activeIdx = 0;
1150
+ buttons.forEach(function(b, i) {
1151
+ if (b.classList.contains('active') || b.getAttribute('aria-selected') === 'true') activeIdx = i;
1152
+ });
1153
+ tabs.style.setProperty('--_active-idx', activeIdx);
1154
+ });
1155
+
1143
1156
  root.addEventListener('click', function(e) {
1144
1157
  var btn = e.target.closest('.kds-segmented-tabs button');
1145
1158
  if (!btn) return;
@@ -1156,6 +1169,8 @@ const ui = _context.ui;
1156
1169
  btn.setAttribute('aria-selected', 'true');
1157
1170
 
1158
1171
  var index = Array.prototype.indexOf.call(buttons, btn);
1172
+ tabs.style.setProperty('--_active-idx', index);
1173
+
1159
1174
  tabs.dispatchEvent(new CustomEvent('kds:tab:change', {
1160
1175
  bubbles: true,
1161
1176
  detail: { index: index, button: btn }