@besaitech/ng-design-system 0.0.62 → 0.0.63

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.
@@ -13251,10 +13251,15 @@ class SdsTabList {
13251
13251
  ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
13252
13252
  /** Id of a visible element that names the tablist (takes precedence over [ariaLabel] for AT). */
13253
13253
  ariaLabelledby = input('', ...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : []));
13254
- listClass = computed(() => {
13255
- const base = 'relative flex border-b border-border';
13256
- return this.store.scrollable() ? `${base} overflow-x-auto` : base;
13257
- }, ...(ngDevMode ? [{ debugName: "listClass" }] : []));
13254
+ /**
13255
+ * Scrollable: `overflow-x: auto` turns the other axis to `auto` too (CSS), so the tabs' 1px overlap of a
13256
+ * border-bottom rule (`-mb-px`, so the active underline covers it) made the list 1px taller than its box and
13257
+ * showed a vertical scrollbar. There the rule is an inset shadow instead — painted under the tabs, so the active
13258
+ * underline still covers it with no overlap — and vertical overflow is hidden.
13259
+ */
13260
+ listClass = computed(() => this.store.scrollable()
13261
+ ? 'relative flex overflow-x-auto overflow-y-hidden shadow-[inset_0_-1px_0_var(--color-border)]'
13262
+ : 'relative flex border-b border-border', ...(ngDevMode ? [{ debugName: "listClass" }] : []));
13258
13263
  onKeydown(event) {
13259
13264
  const keys = ['ArrowRight', 'ArrowLeft', 'Home', 'End'];
13260
13265
  if (!keys.includes(event.key))
@@ -13323,7 +13328,9 @@ class SdsTab {
13323
13328
  this.store.select(this.value());
13324
13329
  }
13325
13330
  tabClass() {
13326
- const base = 'relative -mb-px inline-flex items-center gap-2 whitespace-nowrap border-b-2 px-4 py-2.5 ' +
13331
+ // Overlaps the list's border-bottom rule by 1px; a scrollable list draws its rule inside instead (see SdsTabList).
13332
+ const offset = this.store.scrollable() ? '' : '-mb-px ';
13333
+ const base = `relative ${offset}inline-flex items-center gap-2 whitespace-nowrap border-b-2 px-4 py-2.5 ` +
13327
13334
  'text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 ' +
13328
13335
  'focus-visible:ring-brand-500 focus-visible:ring-inset';
13329
13336
  if (this.disabled()) {