@sewadah/selaras 0.3.0 → 0.3.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 (141) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +14 -1
  3. package/dist/runtime/components/Autocomplete.vue +3 -1
  4. package/dist/runtime/components/Calendar.d.vue.ts +69 -0
  5. package/dist/runtime/components/Calendar.vue +163 -0
  6. package/dist/runtime/components/Calendar.vue.d.ts +69 -0
  7. package/dist/runtime/components/Callout.vue +12 -1
  8. package/dist/runtime/components/CodeGroup.vue +13 -3
  9. package/dist/runtime/components/CodeTree.d.vue.ts +2 -0
  10. package/dist/runtime/components/CodeTree.vue +52 -1
  11. package/dist/runtime/components/CodeTree.vue.d.ts +2 -0
  12. package/dist/runtime/components/ColorPicker.d.vue.ts +8 -0
  13. package/dist/runtime/components/ColorPicker.vue +66 -45
  14. package/dist/runtime/components/ColorPicker.vue.d.ts +8 -0
  15. package/dist/runtime/components/Column.js +1 -1
  16. package/dist/runtime/components/CommandPalette.d.vue.ts +3 -1
  17. package/dist/runtime/components/CommandPalette.vue +5 -0
  18. package/dist/runtime/components/CommandPalette.vue.d.ts +3 -1
  19. package/dist/runtime/components/ContentNavigation.d.vue.ts +8 -1
  20. package/dist/runtime/components/ContentNavigation.vue +9 -2
  21. package/dist/runtime/components/ContentNavigation.vue.d.ts +8 -1
  22. package/dist/runtime/components/ContextMenu.d.vue.ts +8 -1
  23. package/dist/runtime/components/ContextMenu.vue +16 -4
  24. package/dist/runtime/components/ContextMenu.vue.d.ts +8 -1
  25. package/dist/runtime/components/DatePicker.d.vue.ts +10 -3
  26. package/dist/runtime/components/DatePicker.vue +24 -16
  27. package/dist/runtime/components/DatePicker.vue.d.ts +10 -3
  28. package/dist/runtime/components/Dropdown.d.vue.ts +33 -6
  29. package/dist/runtime/components/Dropdown.vue +143 -11
  30. package/dist/runtime/components/Dropdown.vue.d.ts +33 -6
  31. package/dist/runtime/components/FileTree.d.vue.ts +2 -0
  32. package/dist/runtime/components/FileTree.vue +8 -4
  33. package/dist/runtime/components/FileTree.vue.d.ts +2 -0
  34. package/dist/runtime/components/FormField.d.vue.ts +4 -0
  35. package/dist/runtime/components/FormField.vue +19 -4
  36. package/dist/runtime/components/FormField.vue.d.ts +4 -0
  37. package/dist/runtime/components/Input.vue +3 -2
  38. package/dist/runtime/components/Kbd.vue +12 -2
  39. package/dist/runtime/components/NavigationMenu.d.vue.ts +10 -10
  40. package/dist/runtime/components/NavigationMenu.vue +13 -9
  41. package/dist/runtime/components/NavigationMenu.vue.d.ts +10 -10
  42. package/dist/runtime/components/NavigationMenuAccordionItem.vue +5 -1
  43. package/dist/runtime/components/NavigationMenuFlyoutList.vue +7 -4
  44. package/dist/runtime/components/Popover.d.vue.ts +8 -2
  45. package/dist/runtime/components/Popover.vue +9 -4
  46. package/dist/runtime/components/Popover.vue.d.ts +8 -2
  47. package/dist/runtime/components/ProsePre.d.vue.ts +2 -0
  48. package/dist/runtime/components/ProsePre.vue +2 -1
  49. package/dist/runtime/components/ProsePre.vue.d.ts +2 -0
  50. package/dist/runtime/components/Select.vue +3 -1
  51. package/dist/runtime/components/SplitterPanel.d.vue.ts +2 -2
  52. package/dist/runtime/components/SplitterPanel.vue.d.ts +2 -2
  53. package/dist/runtime/components/Table.vue +95 -26
  54. package/dist/runtime/components/Tabs.d.vue.ts +44 -4
  55. package/dist/runtime/components/Tabs.vue +171 -18
  56. package/dist/runtime/components/Tabs.vue.d.ts +44 -4
  57. package/dist/runtime/components/Textarea.vue +3 -2
  58. package/dist/runtime/components/Timeline.d.vue.ts +19 -0
  59. package/dist/runtime/components/Timeline.vue +99 -0
  60. package/dist/runtime/components/Timeline.vue.d.ts +19 -0
  61. package/dist/runtime/components/Toast.d.vue.ts +10 -1
  62. package/dist/runtime/components/Toast.vue +94 -8
  63. package/dist/runtime/components/Toast.vue.d.ts +10 -1
  64. package/dist/runtime/components/Tooltip.d.vue.ts +8 -2
  65. package/dist/runtime/components/Tooltip.vue +9 -4
  66. package/dist/runtime/components/Tooltip.vue.d.ts +8 -2
  67. package/dist/runtime/composables/use-form-field.d.ts +1 -0
  68. package/dist/runtime/composables/use-table.d.ts +3 -0
  69. package/dist/runtime/composables/use-table.js +10 -4
  70. package/dist/runtime/composables/use-toast.js +5 -1
  71. package/dist/runtime/directives/hotkey.d.ts +13 -0
  72. package/dist/runtime/directives/hotkey.js +107 -0
  73. package/dist/runtime/directives/index.d.ts +2 -0
  74. package/dist/runtime/directives/index.js +2 -0
  75. package/dist/runtime/directives/mask.d.ts +30 -0
  76. package/dist/runtime/directives/mask.js +165 -0
  77. package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +29 -25
  78. package/dist/runtime/internal/ComboboxSelectBase.vue +103 -19
  79. package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +29 -25
  80. package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +16 -11
  81. package/dist/runtime/internal/ComboboxSelectBody.vue +49 -10
  82. package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +16 -11
  83. package/dist/runtime/internal/DatePickerCalendarBody.vue +1 -1
  84. package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +1 -1
  85. package/dist/runtime/internal/ShortcutHint.d.vue.ts +6 -0
  86. package/dist/runtime/internal/ShortcutHint.vue +13 -0
  87. package/dist/runtime/internal/ShortcutHint.vue.d.ts +6 -0
  88. package/dist/runtime/internal/ToastItemRenderer.d.vue.ts +9 -1
  89. package/dist/runtime/internal/ToastItemRenderer.vue +55 -8
  90. package/dist/runtime/internal/ToastItemRenderer.vue.d.ts +9 -1
  91. package/dist/runtime/internal/combobox-select.js +2 -1
  92. package/dist/runtime/internal/programmatic-services.d.ts +2 -0
  93. package/dist/runtime/internal/programmatic-services.js +8 -0
  94. package/dist/runtime/internal/toast-stack.d.ts +36 -0
  95. package/dist/runtime/internal/toast-stack.js +36 -0
  96. package/dist/runtime/structural.css +1 -1
  97. package/dist/runtime/table.d.ts +1 -1
  98. package/dist/runtime/theme/alert-dialog.js +1 -1
  99. package/dist/runtime/theme/calendar.d.ts +86 -0
  100. package/dist/runtime/theme/calendar.js +19 -0
  101. package/dist/runtime/theme/callout.d.ts +0 -12
  102. package/dist/runtime/theme/callout.js +8 -8
  103. package/dist/runtime/theme/code-tree.js +1 -1
  104. package/dist/runtime/theme/command-palette.js +1 -1
  105. package/dist/runtime/theme/content-navigation.d.ts +3 -0
  106. package/dist/runtime/theme/content-navigation.js +1 -0
  107. package/dist/runtime/theme/drawer.js +1 -1
  108. package/dist/runtime/theme/dropdown.d.ts +21 -0
  109. package/dist/runtime/theme/dropdown.js +15 -2
  110. package/dist/runtime/theme/file-tree.js +1 -1
  111. package/dist/runtime/theme/form-field.d.ts +18 -0
  112. package/dist/runtime/theme/form-field.js +6 -1
  113. package/dist/runtime/theme/modal.js +1 -1
  114. package/dist/runtime/theme/slideover.js +1 -1
  115. package/dist/runtime/theme/table.d.ts +27 -0
  116. package/dist/runtime/theme/table.js +11 -2
  117. package/dist/runtime/theme/tabs.d.ts +87 -3
  118. package/dist/runtime/theme/tabs.js +46 -22
  119. package/dist/runtime/theme/timeline.d.ts +251 -0
  120. package/dist/runtime/theme/timeline.js +84 -0
  121. package/dist/runtime/theme/toast.d.ts +92 -0
  122. package/dist/runtime/theme/toast.js +29 -7
  123. package/dist/runtime/theme-config.d.ts +12 -1
  124. package/dist/runtime/types/index.d.ts +6 -1
  125. package/dist/runtime/utils/arrow.d.ts +21 -0
  126. package/dist/runtime/utils/arrow.js +10 -0
  127. package/dist/runtime/utils/file-icons.js +2 -0
  128. package/dist/runtime/utils/icons.d.ts +2 -0
  129. package/dist/runtime/utils/icons.js +2 -0
  130. package/dist/runtime/utils/messages.d.ts +6 -0
  131. package/dist/runtime/utils/messages.js +6 -0
  132. package/dist/runtime/utils/navigation-menu.d.ts +7 -0
  133. package/dist/runtime/utils/navigation-menu.js +3 -0
  134. package/dist/runtime/utils/overlay.d.ts +17 -0
  135. package/dist/runtime/utils/overlay.js +7 -0
  136. package/dist/runtime/utils/select-contracts.d.ts +7 -1
  137. package/dist/runtime/utils/table-columns.js +1 -1
  138. package/dist/runtime/utils/table-contracts.d.ts +9 -1
  139. package/dist/runtime/utils/timeline-contracts.d.ts +42 -0
  140. package/dist/runtime/utils/timeline-contracts.js +0 -0
  141. package/package.json +2 -1
@@ -5,7 +5,10 @@ export const dropdownTheme = tv({
5
5
  item: "flex items-center gap-2 rounded-[var(--selaras-resolved-radius-sm)] px-2 py-1.5 text-sm text-[var(--selaras-resolved-text-default)] cursor-pointer select-none outline-none data-[highlighted]:bg-[var(--selaras-resolved-surface-elevated)] data-[disabled]:opacity-50 data-[disabled]:pointer-events-none",
6
6
  icon: "size-4 shrink-0 text-[var(--selaras-resolved-text-muted)]",
7
7
  separator: "-mx-1 my-1 h-px bg-[var(--selaras-resolved-border-default)]",
8
- arrow: "fill-[var(--selaras-resolved-surface-default)] stroke-[var(--selaras-resolved-border-default)] stroke-1"
8
+ arrow: "fill-[var(--selaras-resolved-surface-default)] stroke-[var(--selaras-resolved-border-default)] stroke-1",
9
+ // The adaptive small-screen dialog's scrolling list and each item group in it.
10
+ mobileList: "max-h-[calc(100dvh-8rem)] overflow-y-auto p-2",
11
+ mobileGroup: "flex flex-col gap-1"
9
12
  },
10
13
  variants: {
11
14
  // For a delete/remove-style action - deliberately just this one flag
@@ -16,6 +19,16 @@ export const dropdownTheme = tv({
16
19
  item: "text-[var(--selaras-resolved-color-danger-text)] data-[highlighted]:bg-[var(--selaras-resolved-color-danger-subtle-hover)] data-[highlighted]:text-[var(--selaras-resolved-color-danger-on-subtle)]",
17
20
  icon: "text-current"
18
21
  }
22
+ },
23
+ // Items in the adaptive dialog: larger touch targets, and real hover/focus
24
+ // states, since they aren't menu items with a highlighted state.
25
+ mobile: {
26
+ true: {
27
+ item: "min-h-11 w-full gap-3 px-3 py-2 text-start text-base transition-colors hover:bg-[var(--selaras-resolved-surface-elevated)] focus-visible:bg-[var(--selaras-resolved-surface-elevated)] focus-visible:ring-2 focus-visible:ring-[var(--selaras-resolved-color-primary-fill)] disabled:pointer-events-none disabled:opacity-50"
28
+ }
19
29
  }
20
- }
30
+ },
31
+ compoundVariants: [
32
+ { mobile: true, destructive: true, class: { item: "hover:bg-[var(--selaras-resolved-color-danger-subtle-hover)] hover:text-[var(--selaras-resolved-color-danger-on-subtle)]" } }
33
+ ]
21
34
  });
@@ -18,7 +18,7 @@ export const fileTreeTheme = tv({
18
18
  },
19
19
  variants: {
20
20
  selected: {
21
- true: { row: "bg-[var(--_selaras-color-subtle)] text-[var(--_selaras-color-text)] hover:bg-[var(--_selaras-color-subtle)] hover:text-[var(--_selaras-color-text)]" }
21
+ true: { row: "bg-[var(--_selaras-color-subtle)] font-medium text-[var(--_selaras-color-text)] hover:bg-[var(--_selaras-color-subtle)] hover:text-[var(--_selaras-color-text)]" }
22
22
  },
23
23
  color: {
24
24
  primary: "",
@@ -19,6 +19,12 @@ export declare const formFieldTheme: import("tailwind-variants").TVReturnType<{
19
19
  container: string;
20
20
  };
21
21
  };
22
+ labelMode: {
23
+ static: {};
24
+ floating: {
25
+ container: string;
26
+ };
27
+ };
22
28
  }, {
23
29
  root: string;
24
30
  body: string;
@@ -50,6 +56,12 @@ export declare const formFieldTheme: import("tailwind-variants").TVReturnType<{
50
56
  container: string;
51
57
  };
52
58
  };
59
+ labelMode: {
60
+ static: {};
61
+ floating: {
62
+ container: string;
63
+ };
64
+ };
53
65
  }, {
54
66
  root: string;
55
67
  body: string;
@@ -81,6 +93,12 @@ export declare const formFieldTheme: import("tailwind-variants").TVReturnType<{
81
93
  container: string;
82
94
  };
83
95
  };
96
+ labelMode: {
97
+ static: {};
98
+ floating: {
99
+ container: string;
100
+ };
101
+ };
84
102
  }, {
85
103
  root: string;
86
104
  body: string;
@@ -28,10 +28,15 @@ export const formFieldTheme = tv({
28
28
  orientation: {
29
29
  vertical: {},
30
30
  horizontal: { body: "flex-row items-start gap-3", header: "shrink-0", container: "flex-1 min-w-0" }
31
+ },
32
+ labelMode: {
33
+ static: {},
34
+ floating: { container: "relative" }
31
35
  }
32
36
  },
33
37
  defaultVariants: {
34
38
  size: "md",
35
- orientation: "vertical"
39
+ orientation: "vertical",
40
+ labelMode: "static"
36
41
  }
37
42
  });
@@ -1,7 +1,7 @@
1
1
  import { tv } from "tailwind-variants";
2
2
  export const modalTheme = tv({
3
3
  slots: {
4
- overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)]",
4
+ overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)] backdrop-blur-[2px]",
5
5
  // flex flex-col + the header/footer's own shrink-0 (native to a flex
6
6
  // child, no extra class needed) let a tall body scroll internally via
7
7
  // its own overflow-y-auto below, capped to the viewport height so a
@@ -1,7 +1,7 @@
1
1
  import { tv } from "tailwind-variants";
2
2
  export const slideoverTheme = tv({
3
3
  slots: {
4
- overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)]",
4
+ overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)] backdrop-blur-[2px]",
5
5
  content: "fixed z-[var(--selaras-resolved-z-modal)] flex flex-col bg-[var(--selaras-resolved-surface-default)] shadow-[var(--selaras-resolved-shadow-lg)] focus:outline-none",
6
6
  header: "flex items-start justify-between gap-4 p-4 sm:px-6",
7
7
  title: "text-base font-semibold text-[var(--selaras-resolved-text-default)]",
@@ -34,6 +34,11 @@ export declare const tableTheme: import("tailwind-variants").TVReturnType<{
34
34
  table: string;
35
35
  };
36
36
  };
37
+ rowHover: {
38
+ true: {
39
+ table: string;
40
+ };
41
+ };
37
42
  scrollable: {
38
43
  true: {
39
44
  wrapper: string;
@@ -52,6 +57,9 @@ export declare const tableTheme: import("tailwind-variants").TVReturnType<{
52
57
  td: string;
53
58
  tfoot: string;
54
59
  emptyState: string;
60
+ filterButton: string;
61
+ filterIcon: string;
62
+ filterPopover: string;
55
63
  filterInput: string;
56
64
  paginationWrapper: string;
57
65
  paginationInfo: string;
@@ -60,6 +68,7 @@ export declare const tableTheme: import("tailwind-variants").TVReturnType<{
60
68
  loadingIcon: string;
61
69
  expandButton: string;
62
70
  expandChevron: string;
71
+ treeCell: string;
63
72
  expandedRow: string;
64
73
  expandedCell: string;
65
74
  columnToggle: string;
@@ -101,6 +110,11 @@ export declare const tableTheme: import("tailwind-variants").TVReturnType<{
101
110
  table: string;
102
111
  };
103
112
  };
113
+ rowHover: {
114
+ true: {
115
+ table: string;
116
+ };
117
+ };
104
118
  scrollable: {
105
119
  true: {
106
120
  wrapper: string;
@@ -119,6 +133,9 @@ export declare const tableTheme: import("tailwind-variants").TVReturnType<{
119
133
  td: string;
120
134
  tfoot: string;
121
135
  emptyState: string;
136
+ filterButton: string;
137
+ filterIcon: string;
138
+ filterPopover: string;
122
139
  filterInput: string;
123
140
  paginationWrapper: string;
124
141
  paginationInfo: string;
@@ -127,6 +144,7 @@ export declare const tableTheme: import("tailwind-variants").TVReturnType<{
127
144
  loadingIcon: string;
128
145
  expandButton: string;
129
146
  expandChevron: string;
147
+ treeCell: string;
130
148
  expandedRow: string;
131
149
  expandedCell: string;
132
150
  columnToggle: string;
@@ -168,6 +186,11 @@ export declare const tableTheme: import("tailwind-variants").TVReturnType<{
168
186
  table: string;
169
187
  };
170
188
  };
189
+ rowHover: {
190
+ true: {
191
+ table: string;
192
+ };
193
+ };
171
194
  scrollable: {
172
195
  true: {
173
196
  wrapper: string;
@@ -186,6 +209,9 @@ export declare const tableTheme: import("tailwind-variants").TVReturnType<{
186
209
  td: string;
187
210
  tfoot: string;
188
211
  emptyState: string;
212
+ filterButton: string;
213
+ filterIcon: string;
214
+ filterPopover: string;
189
215
  filterInput: string;
190
216
  paginationWrapper: string;
191
217
  paginationInfo: string;
@@ -194,6 +220,7 @@ export declare const tableTheme: import("tailwind-variants").TVReturnType<{
194
220
  loadingIcon: string;
195
221
  expandButton: string;
196
222
  expandChevron: string;
223
+ treeCell: string;
197
224
  expandedRow: string;
198
225
  expandedCell: string;
199
226
  columnToggle: string;
@@ -8,11 +8,14 @@ export const tableTheme = tv({
8
8
  tr: "border-b border-[var(--selaras-resolved-border-default)] last:border-b-0",
9
9
  th: "text-start font-medium text-[var(--selaras-resolved-text-muted)] whitespace-nowrap data-[pinned]:sticky data-[pinned]:z-[1] data-[pinned]:bg-[var(--selaras-resolved-surface-elevated)]",
10
10
  thSortable: "cursor-pointer select-none hover:text-[var(--selaras-resolved-text-default)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-[var(--_selaras-color-focus)]",
11
- sortIcon: "ms-1 inline-block size-3.5 align-text-bottom text-[var(--selaras-resolved-text-muted)]",
11
+ sortIcon: "ms-1 inline-block size-3.5 align-text-bottom text-[var(--selaras-resolved-text-muted)] data-[sort-state=none]:opacity-50",
12
12
  td: "text-[var(--selaras-resolved-text-default)] data-[pinned]:sticky data-[pinned]:z-[1] data-[pinned]:bg-[var(--selaras-resolved-surface-default)]",
13
13
  tfoot: "bg-[var(--selaras-resolved-surface-elevated)] font-medium",
14
14
  emptyState: "px-3 py-8 text-center text-sm text-[var(--selaras-resolved-text-muted)]",
15
- filterInput: "mt-1",
15
+ filterButton: "shrink-0",
16
+ filterIcon: "size-4",
17
+ filterPopover: "w-64 p-3",
18
+ filterInput: "",
16
19
  paginationWrapper: "flex items-center justify-between gap-3 px-3 py-2",
17
20
  paginationInfo: "text-sm text-[var(--selaras-resolved-text-muted)]",
18
21
  paginationButtons: "flex items-center gap-2",
@@ -27,6 +30,7 @@ export const tableTheme = tv({
27
30
  // for the one case where both conditions hold at once, rather than
28
31
  // leaving the outcome to rely on Tailwind's variant cascade order.
29
32
  expandChevron: "size-4 transition-transform rtl:rotate-180 data-[expanded]:rotate-90 rtl:data-[expanded]:rotate-90",
33
+ treeCell: "flex items-center gap-1",
30
34
  expandedRow: "border-b border-[var(--selaras-resolved-border-default)] last:border-b-0",
31
35
  expandedCell: "bg-[var(--selaras-resolved-surface-elevated)] px-3 py-3 text-[var(--selaras-resolved-text-default)]",
32
36
  columnToggle: "relative",
@@ -58,6 +62,11 @@ export const tableTheme = tv({
58
62
  striped: {
59
63
  true: { table: "[&>tbody>tr:nth-child(even)]:bg-[var(--selaras-resolved-surface-elevated)]" }
60
64
  },
65
+ rowHover: {
66
+ // Body rows only, like `striped` - header and footer rows share the `tr`
67
+ // slot but aren't selectable. Cells repaint too, for pinned columns.
68
+ true: { table: "[&>tbody>tr]:transition-colors [&>tbody>tr:hover]:bg-[var(--selaras-resolved-surface-elevated)] [&>tbody>tr:hover>td]:bg-[var(--selaras-resolved-surface-elevated)]" }
69
+ },
61
70
  scrollable: {
62
71
  true: { wrapper: "overflow-y-auto", thead: "sticky top-0 z-[1]" }
63
72
  }
@@ -1,7 +1,7 @@
1
1
  export declare const tabsTheme: import("tailwind-variants").TVReturnType<{
2
2
  variant: {
3
3
  underline: {
4
- list: string;
4
+ trigger: string;
5
5
  indicator: string;
6
6
  };
7
7
  pill: {
@@ -10,6 +10,18 @@ export declare const tabsTheme: import("tailwind-variants").TVReturnType<{
10
10
  indicator: string;
11
11
  };
12
12
  };
13
+ orientation: {
14
+ horizontal: {
15
+ indicator: string;
16
+ };
17
+ vertical: {
18
+ root: string;
19
+ list: string;
20
+ trigger: string;
21
+ indicator: string;
22
+ content: string;
23
+ };
24
+ };
13
25
  color: {
14
26
  primary: "";
15
27
  neutral: "";
@@ -19,8 +31,24 @@ export declare const tabsTheme: import("tailwind-variants").TVReturnType<{
19
31
  info: "";
20
32
  warning: "";
21
33
  };
34
+ scrollable: {
35
+ false: {
36
+ scrollRoot: string;
37
+ scrollViewport: string;
38
+ };
39
+ true: {
40
+ scrollRoot: string;
41
+ scrollViewport: string;
42
+ list: string;
43
+ trigger: string;
44
+ };
45
+ };
22
46
  }, {
23
47
  root: string;
48
+ scrollRoot: string;
49
+ scrollViewport: string;
50
+ scrollButton: string;
51
+ scrollIcon: string;
24
52
  list: string;
25
53
  trigger: string;
26
54
  icon: string;
@@ -29,7 +57,7 @@ export declare const tabsTheme: import("tailwind-variants").TVReturnType<{
29
57
  }, undefined, {
30
58
  variant: {
31
59
  underline: {
32
- list: string;
60
+ trigger: string;
33
61
  indicator: string;
34
62
  };
35
63
  pill: {
@@ -38,6 +66,18 @@ export declare const tabsTheme: import("tailwind-variants").TVReturnType<{
38
66
  indicator: string;
39
67
  };
40
68
  };
69
+ orientation: {
70
+ horizontal: {
71
+ indicator: string;
72
+ };
73
+ vertical: {
74
+ root: string;
75
+ list: string;
76
+ trigger: string;
77
+ indicator: string;
78
+ content: string;
79
+ };
80
+ };
41
81
  color: {
42
82
  primary: "";
43
83
  neutral: "";
@@ -47,8 +87,24 @@ export declare const tabsTheme: import("tailwind-variants").TVReturnType<{
47
87
  info: "";
48
88
  warning: "";
49
89
  };
90
+ scrollable: {
91
+ false: {
92
+ scrollRoot: string;
93
+ scrollViewport: string;
94
+ };
95
+ true: {
96
+ scrollRoot: string;
97
+ scrollViewport: string;
98
+ list: string;
99
+ trigger: string;
100
+ };
101
+ };
50
102
  }, {
51
103
  root: string;
104
+ scrollRoot: string;
105
+ scrollViewport: string;
106
+ scrollButton: string;
107
+ scrollIcon: string;
52
108
  list: string;
53
109
  trigger: string;
54
110
  icon: string;
@@ -57,7 +113,7 @@ export declare const tabsTheme: import("tailwind-variants").TVReturnType<{
57
113
  }, import("tailwind-variants").TVReturnTypeLike<{
58
114
  variant: {
59
115
  underline: {
60
- list: string;
116
+ trigger: string;
61
117
  indicator: string;
62
118
  };
63
119
  pill: {
@@ -66,6 +122,18 @@ export declare const tabsTheme: import("tailwind-variants").TVReturnType<{
66
122
  indicator: string;
67
123
  };
68
124
  };
125
+ orientation: {
126
+ horizontal: {
127
+ indicator: string;
128
+ };
129
+ vertical: {
130
+ root: string;
131
+ list: string;
132
+ trigger: string;
133
+ indicator: string;
134
+ content: string;
135
+ };
136
+ };
69
137
  color: {
70
138
  primary: "";
71
139
  neutral: "";
@@ -75,8 +143,24 @@ export declare const tabsTheme: import("tailwind-variants").TVReturnType<{
75
143
  info: "";
76
144
  warning: "";
77
145
  };
146
+ scrollable: {
147
+ false: {
148
+ scrollRoot: string;
149
+ scrollViewport: string;
150
+ };
151
+ true: {
152
+ scrollRoot: string;
153
+ scrollViewport: string;
154
+ list: string;
155
+ trigger: string;
156
+ };
157
+ };
78
158
  }, {
79
159
  root: string;
160
+ scrollRoot: string;
161
+ scrollViewport: string;
162
+ scrollButton: string;
163
+ scrollIcon: string;
80
164
  list: string;
81
165
  trigger: string;
82
166
  icon: string;
@@ -2,39 +2,46 @@ import { tv } from "tailwind-variants";
2
2
  export const tabsTheme = tv({
3
3
  slots: {
4
4
  root: "w-full",
5
- // relative - the positioned ancestor both the triggers' own offsetLeft
6
- // and the sliding indicator's absolute positioning resolve against.
5
+ scrollRoot: "",
6
+ scrollViewport: "",
7
+ // Button supplies the neutral ghost styling and sm icon size. These slots
8
+ // let Tabs authors adjust either control without duplicating Button CSS.
9
+ scrollButton: "",
10
+ scrollIcon: "",
11
+ // Relative positioning anchors Reka's measured indicator in either axis.
7
12
  list: "relative flex items-center border-b border-[var(--selaras-resolved-border-default)]",
8
13
  // z-10 unconditionally (not just for `pill`) - harmless for `underline`
9
14
  // (its indicator never overlaps the trigger's own text anyway) and
10
15
  // keeps this one class instead of a compound variant.
11
- trigger: "relative z-10 inline-flex items-center gap-1.5 px-1 py-2 text-sm font-medium text-[var(--selaras-resolved-text-muted)] transition-colors hover:text-[var(--selaras-resolved-text-default)] disabled:opacity-50 disabled:pointer-events-none data-[state=active]:text-[var(--_selaras-color-text)]",
16
+ trigger: "relative z-10 inline-flex items-center gap-1.5 px-1 py-2 text-sm font-medium text-[var(--selaras-resolved-text-muted)] transition-colors hover:text-[var(--selaras-resolved-text-default)] disabled:opacity-50 disabled:pointer-events-none",
12
17
  icon: "size-4 shrink-0",
13
- // Positioned via Reka's own TabsIndicator - it measures the active
14
- // trigger's offsetLeft/offsetWidth itself (ResizeObserver-driven, and
15
- // re-runs on every active-tab change whether Tabs is controlled or
16
- // uncontrolled) and exposes the result as these two CSS custom
17
- // properties, the same `var(...)` arbitrary-value pattern
18
- // theme/select.ts's own `content` slot already uses for
19
- // --reka-combobox-trigger-width. The transition is the only thing
20
- // actually driving the slide - JS never animates it directly.
21
- // `translate-x-*` compiles to the standalone CSS `translate` property
22
- // (not `transform`) in this version of Tailwind, so the transition
23
- // list has to say `translate`, not `transform` - watching the wrong
24
- // property meant this never animated at all, just snapped instantly.
25
- indicator: "absolute translate-x-[var(--reka-tabs-indicator-position)] w-[var(--reka-tabs-indicator-size)] transition-[translate,width] duration-200 ease-out",
18
+ // Reka measures width/left horizontally and height/top vertically.
19
+ // Tailwind's translate utilities use the CSS `translate` property.
20
+ indicator: "absolute transition-[translate,width,height] duration-200 ease-out",
26
21
  content: "pt-4 focus-visible:outline-none data-[state=active]:animate-in data-[state=active]:fade-in-0"
27
22
  },
28
23
  variants: {
29
24
  variant: {
30
25
  underline: {
31
- list: "gap-4",
32
- indicator: "inset-x-0 bottom-0 h-0.5 rounded-full bg-[var(--_selaras-color-fill)]"
26
+ trigger: "data-[state=active]:text-[var(--_selaras-color-text)]",
27
+ indicator: "rounded-full bg-[var(--_selaras-color-fill)]"
33
28
  },
34
29
  pill: {
35
- list: "gap-1 rounded-[var(--selaras-resolved-radius-md)] border-0 bg-[var(--selaras-resolved-surface-elevated)] p-1",
36
- trigger: "rounded-[var(--selaras-resolved-radius-sm)] px-3",
37
- indicator: "inset-y-1 rounded-[var(--selaras-resolved-radius-sm)] bg-[var(--selaras-resolved-surface-default)] shadow-[var(--selaras-resolved-shadow-sm)]"
30
+ list: "gap-1 rounded-[var(--selaras-resolved-radius-md)] border-0 bg-[color-mix(in_oklab,var(--selaras-resolved-surface-elevated)_96%,var(--selaras-resolved-surface-inverted))] p-1",
31
+ trigger: "justify-center text-center rounded-[var(--selaras-resolved-radius-sm)] px-3 data-[state=active]:text-[var(--_selaras-color-on-fill)]",
32
+ indicator: "rounded-[var(--selaras-resolved-radius-sm)] bg-[var(--_selaras-color-fill)] shadow-[var(--selaras-resolved-shadow-sm)]"
33
+ }
34
+ },
35
+ orientation: {
36
+ horizontal: {
37
+ indicator: "left-0 w-[var(--reka-tabs-indicator-size)] translate-x-[var(--reka-tabs-indicator-position)]"
38
+ },
39
+ vertical: {
40
+ root: "flex items-start gap-4",
41
+ list: "shrink-0 flex-col items-stretch border-b-0 border-e",
42
+ trigger: "w-full justify-start text-start px-3",
43
+ indicator: "top-0 h-[var(--reka-tabs-indicator-size)] translate-y-[var(--reka-tabs-indicator-position)]",
44
+ content: "min-w-0 flex-1 pt-0"
38
45
  }
39
46
  },
40
47
  color: {
@@ -45,10 +52,27 @@ export const tabsTheme = tv({
45
52
  danger: "",
46
53
  info: "",
47
54
  warning: ""
55
+ },
56
+ scrollable: {
57
+ false: { scrollRoot: "contents", scrollViewport: "contents" },
58
+ true: {
59
+ scrollRoot: "flex w-full min-w-0 items-center gap-1",
60
+ scrollViewport: "min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
61
+ list: "w-max min-w-full flex-nowrap",
62
+ trigger: "shrink-0 whitespace-nowrap"
63
+ }
48
64
  }
49
65
  },
66
+ compoundVariants: [
67
+ { variant: "underline", orientation: "horizontal", class: { list: "gap-4", indicator: "bottom-0 h-0.5" } },
68
+ { variant: "underline", orientation: "vertical", class: { list: "gap-1", indicator: "end-0 w-0.5" } },
69
+ { variant: "pill", orientation: "horizontal", class: { indicator: "inset-y-1" } },
70
+ { variant: "pill", orientation: "vertical", class: { list: "border-0", indicator: "inset-x-1" } }
71
+ ],
50
72
  defaultVariants: {
51
73
  variant: "underline",
52
- color: "primary"
74
+ orientation: "horizontal",
75
+ color: "primary",
76
+ scrollable: false
53
77
  }
54
78
  });