@editora/ui-core 0.1.25 → 0.2.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 (349) hide show
  1. package/README.md +132 -0
  2. package/dist/accordion.cjs.js +13 -12
  3. package/dist/accordion.esm.js +13 -12
  4. package/dist/alert-dialog.cjs.js +92 -53
  5. package/dist/alert-dialog.esm.js +211 -159
  6. package/dist/alert.cjs.js +42 -33
  7. package/dist/alert.esm.js +80 -71
  8. package/dist/animated-beam.cjs.js +42 -50
  9. package/dist/animated-beam.esm.js +47 -55
  10. package/dist/animated-list.cjs.js +11 -27
  11. package/dist/animated-list.esm.js +12 -28
  12. package/dist/animated-text.cjs.js +9 -9
  13. package/dist/animated-text.esm.js +9 -9
  14. package/dist/app-header.cjs.js +17 -12
  15. package/dist/app-header.esm.js +18 -13
  16. package/dist/aspect-ratio.cjs.js +10 -12
  17. package/dist/aspect-ratio.esm.js +11 -13
  18. package/dist/avatar.cjs.js +16 -20
  19. package/dist/avatar.esm.js +16 -20
  20. package/dist/badge.cjs.js +27 -22
  21. package/dist/badge.esm.js +32 -27
  22. package/dist/block-controls.cjs.js +11 -12
  23. package/dist/block-controls.esm.js +8 -9
  24. package/dist/box.cjs.js +2 -3
  25. package/dist/box.esm.js +2 -3
  26. package/dist/breadcrumb.cjs.js +12 -18
  27. package/dist/breadcrumb.esm.js +11 -17
  28. package/dist/button.cjs.js +1 -1
  29. package/dist/button.esm.js +1 -1
  30. package/dist/{calendar-D-mXMgqc.js → calendar-CzpWDxLc.js} +56 -46
  31. package/dist/{calendar-B3PUKHQm.mjs → calendar-DkSDFg33.mjs} +127 -117
  32. package/dist/calendar.cjs.js +1 -1
  33. package/dist/calendar.esm.js +1 -1
  34. package/dist/card.cjs.js +6 -7
  35. package/dist/card.esm.js +5 -6
  36. package/dist/chart.cjs.js +58 -52
  37. package/dist/chart.esm.js +101 -95
  38. package/dist/checkbox.cjs.js +19 -15
  39. package/dist/checkbox.esm.js +19 -15
  40. package/dist/collapsible.cjs.js +9 -13
  41. package/dist/collapsible.esm.js +9 -13
  42. package/dist/color-picker.cjs.js +38 -19
  43. package/dist/color-picker.esm.js +134 -115
  44. package/dist/combobox.cjs.js +60 -57
  45. package/dist/combobox.esm.js +96 -92
  46. package/dist/command-palette.cjs.js +1 -0
  47. package/dist/command-palette.esm.js +1 -0
  48. package/dist/command.cjs.js +32 -14
  49. package/dist/command.esm.js +46 -28
  50. package/dist/components/date-time-utils.d.ts.map +1 -1
  51. package/dist/components/ui-accordion.d.ts.map +1 -1
  52. package/dist/components/ui-alert-dialog.d.ts +2 -0
  53. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  54. package/dist/components/ui-alert.d.ts.map +1 -1
  55. package/dist/components/ui-animated-beam.d.ts.map +1 -1
  56. package/dist/components/ui-animated-list.d.ts.map +1 -1
  57. package/dist/components/ui-app-header.d.ts.map +1 -1
  58. package/dist/components/ui-aspect-ratio.d.ts.map +1 -1
  59. package/dist/components/ui-avatar.d.ts.map +1 -1
  60. package/dist/components/ui-badge.d.ts.map +1 -1
  61. package/dist/components/ui-block-controls.d.ts.map +1 -1
  62. package/dist/components/ui-box.d.ts.map +1 -1
  63. package/dist/components/ui-breadcrumb.d.ts.map +1 -1
  64. package/dist/components/ui-button.d.ts.map +1 -1
  65. package/dist/components/ui-calendar.d.ts.map +1 -1
  66. package/dist/components/ui-card.d.ts.map +1 -1
  67. package/dist/components/ui-chart.d.ts.map +1 -1
  68. package/dist/components/ui-checkbox.d.ts.map +1 -1
  69. package/dist/components/ui-collapsible.d.ts.map +1 -1
  70. package/dist/components/ui-color-picker.d.ts.map +1 -1
  71. package/dist/components/ui-combobox.d.ts.map +1 -1
  72. package/dist/components/ui-command-palette.d.ts.map +1 -1
  73. package/dist/components/ui-command.d.ts.map +1 -1
  74. package/dist/components/ui-container.d.ts.map +1 -1
  75. package/dist/components/ui-context-menu.d.ts.map +1 -1
  76. package/dist/components/ui-data-table.d.ts +7 -0
  77. package/dist/components/ui-data-table.d.ts.map +1 -1
  78. package/dist/components/ui-date-picker.d.ts.map +1 -1
  79. package/dist/components/ui-date-range-picker.d.ts.map +1 -1
  80. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
  81. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  82. package/dist/components/ui-dialog.d.ts +2 -0
  83. package/dist/components/ui-dialog.d.ts.map +1 -1
  84. package/dist/components/ui-dock.d.ts.map +1 -1
  85. package/dist/components/ui-drawer.d.ts.map +1 -1
  86. package/dist/components/ui-dropdown.d.ts.map +1 -1
  87. package/dist/components/ui-empty-state.d.ts.map +1 -1
  88. package/dist/components/ui-field.d.ts.map +1 -1
  89. package/dist/components/ui-fieldset.d.ts.map +1 -1
  90. package/dist/components/ui-file-upload.d.ts.map +1 -1
  91. package/dist/components/ui-floating-toolbar.d.ts.map +1 -1
  92. package/dist/components/ui-form.d.ts.map +1 -1
  93. package/dist/components/ui-gantt.d.ts.map +1 -1
  94. package/dist/components/ui-hover-card.d.ts.map +1 -1
  95. package/dist/components/ui-icon-cloud.d.ts.map +1 -1
  96. package/dist/components/ui-inline-edit.d.ts.map +1 -1
  97. package/dist/components/ui-input.d.ts.map +1 -1
  98. package/dist/components/ui-marquee.d.ts.map +1 -1
  99. package/dist/components/ui-menu.d.ts.map +1 -1
  100. package/dist/components/ui-menubar.d.ts.map +1 -1
  101. package/dist/components/ui-meter.d.ts.map +1 -1
  102. package/dist/components/ui-multi-select.d.ts.map +1 -1
  103. package/dist/components/ui-number-field.d.ts.map +1 -1
  104. package/dist/components/ui-orbiter.d.ts.map +1 -1
  105. package/dist/components/ui-pagination.d.ts.map +1 -1
  106. package/dist/components/ui-password-field.d.ts.map +1 -1
  107. package/dist/components/ui-pin-input.d.ts.map +1 -1
  108. package/dist/components/ui-popover.d.ts.map +1 -1
  109. package/dist/components/ui-progress.d.ts.map +1 -1
  110. package/dist/components/ui-radio-group.d.ts.map +1 -1
  111. package/dist/components/ui-radio.d.ts.map +1 -1
  112. package/dist/components/ui-rating.d.ts +1 -0
  113. package/dist/components/ui-rating.d.ts.map +1 -1
  114. package/dist/components/ui-scroll-area.d.ts.map +1 -1
  115. package/dist/components/ui-section.d.ts.map +1 -1
  116. package/dist/components/ui-select.d.ts.map +1 -1
  117. package/dist/components/ui-selection-popup.d.ts.map +1 -1
  118. package/dist/components/ui-sidebar.d.ts.map +1 -1
  119. package/dist/components/ui-slider.d.ts.map +1 -1
  120. package/dist/components/ui-sortable.d.ts.map +1 -1
  121. package/dist/components/ui-spinning-text.d.ts.map +1 -1
  122. package/dist/components/ui-split-button.d.ts.map +1 -1
  123. package/dist/components/ui-splitter.d.ts.map +1 -1
  124. package/dist/components/ui-stepper.d.ts.map +1 -1
  125. package/dist/components/ui-switch.d.ts.map +1 -1
  126. package/dist/components/ui-tabs.d.ts.map +1 -1
  127. package/dist/components/ui-tags-input.d.ts.map +1 -1
  128. package/dist/components/ui-textarea.d.ts.map +1 -1
  129. package/dist/components/ui-time-picker.d.ts.map +1 -1
  130. package/dist/components/ui-toggle-group.d.ts +2 -0
  131. package/dist/components/ui-toggle-group.d.ts.map +1 -1
  132. package/dist/components/ui-toggle.d.ts.map +1 -1
  133. package/dist/components/ui-toolbar.d.ts +2 -0
  134. package/dist/components/ui-toolbar.d.ts.map +1 -1
  135. package/dist/components/ui-tooltip.d.ts.map +1 -1
  136. package/dist/components/ui-transfer-list.d.ts.map +1 -1
  137. package/dist/components/ui-tree-item.d.ts.map +1 -1
  138. package/dist/components/ui-tree.d.ts.map +1 -1
  139. package/dist/components/ui-wizard.d.ts.map +1 -1
  140. package/dist/container.cjs.js +6 -12
  141. package/dist/container.esm.js +8 -14
  142. package/dist/context-menu.cjs.js +8 -8
  143. package/dist/context-menu.esm.js +42 -41
  144. package/dist/data-table.cjs.js +21 -18
  145. package/dist/data-table.esm.js +210 -190
  146. package/dist/date-field.cjs.js +9 -9
  147. package/dist/date-field.esm.js +19 -19
  148. package/dist/date-picker.cjs.js +29 -20
  149. package/dist/date-picker.esm.js +59 -50
  150. package/dist/date-range-picker.cjs.js +24 -19
  151. package/dist/date-range-picker.esm.js +86 -81
  152. package/dist/date-range-time-picker.cjs.js +27 -20
  153. package/dist/date-range-time-picker.esm.js +24 -17
  154. package/dist/date-time-picker.cjs.js +24 -17
  155. package/dist/date-time-picker.esm.js +89 -82
  156. package/dist/date-time-utils-C-4eHTyy.js +1 -0
  157. package/dist/{date-time-utils-BTlxnz5j.mjs → date-time-utils-zAx4ghvC.mjs} +75 -68
  158. package/dist/description.cjs.js +4 -4
  159. package/dist/description.esm.js +4 -4
  160. package/dist/dialog.cjs.js +59 -43
  161. package/dist/dialog.esm.js +86 -53
  162. package/dist/direction-provider.cjs.js +1 -1
  163. package/dist/direction-provider.esm.js +1 -1
  164. package/dist/dock.cjs.js +16 -30
  165. package/dist/dock.esm.js +26 -40
  166. package/dist/drawer.cjs.js +8 -12
  167. package/dist/drawer.esm.js +6 -10
  168. package/dist/dropdown.cjs.js +8 -6
  169. package/dist/dropdown.esm.js +33 -30
  170. package/dist/empty-state.cjs.js +17 -15
  171. package/dist/empty-state.esm.js +13 -11
  172. package/dist/field-error.cjs.js +1 -1
  173. package/dist/field-error.esm.js +7 -7
  174. package/dist/field.cjs.js +23 -14
  175. package/dist/field.esm.js +30 -21
  176. package/dist/fieldset.cjs.js +16 -9
  177. package/dist/fieldset.esm.js +19 -12
  178. package/dist/file-upload.cjs.js +79 -37
  179. package/dist/file-upload.esm.js +154 -112
  180. package/dist/flex.cjs.js +2 -2
  181. package/dist/flex.esm.js +8 -8
  182. package/dist/floating-toolbar.cjs.js +6 -7
  183. package/dist/floating-toolbar.esm.js +8 -9
  184. package/dist/form.cjs.js +24 -27
  185. package/dist/form.esm.js +24 -27
  186. package/dist/gantt.cjs.js +13 -11
  187. package/dist/gantt.esm.js +13 -11
  188. package/dist/grid.cjs.js +1 -1
  189. package/dist/grid.esm.js +1 -1
  190. package/dist/hover-card.cjs.js +8 -8
  191. package/dist/hover-card.esm.js +18 -15
  192. package/dist/icon-cloud.cjs.js +19 -36
  193. package/dist/icon-cloud.esm.js +41 -58
  194. package/dist/index.cjs.js +1 -1
  195. package/dist/index.d.ts +2 -0
  196. package/dist/index.d.ts.map +1 -1
  197. package/dist/index.esm.js +108 -104
  198. package/dist/inline-edit.cjs.js +50 -22
  199. package/dist/inline-edit.esm.js +77 -49
  200. package/dist/input.cjs.js +45 -38
  201. package/dist/input.esm.js +60 -53
  202. package/dist/label.cjs.js +6 -6
  203. package/dist/label.esm.js +6 -6
  204. package/dist/layout.cjs.js +3 -3
  205. package/dist/layout.esm.js +3 -3
  206. package/dist/marquee.cjs.js +7 -10
  207. package/dist/marquee.esm.js +7 -10
  208. package/dist/masonry-grid.cjs.js +2 -2
  209. package/dist/masonry-grid.esm.js +11 -11
  210. package/dist/{menu-item-styles-IGSFLAHu.mjs → menu-item-styles-CdqxPUuw.mjs} +15 -15
  211. package/dist/{menu-item-styles-B4onAr4C.js → menu-item-styles-DUdyjQ7i.js} +10 -10
  212. package/dist/menu.cjs.js +8 -24
  213. package/dist/menu.esm.js +52 -72
  214. package/dist/menubar.cjs.js +9 -31
  215. package/dist/menubar.esm.js +127 -153
  216. package/dist/meter.cjs.js +4 -9
  217. package/dist/meter.esm.js +6 -11
  218. package/dist/multi-select.cjs.js +53 -40
  219. package/dist/multi-select.esm.js +87 -73
  220. package/dist/navigation-menu.cjs.js +10 -10
  221. package/dist/navigation-menu.esm.js +33 -33
  222. package/dist/number-field.cjs.js +28 -17
  223. package/dist/number-field.esm.js +37 -26
  224. package/dist/number-ticker.cjs.js +4 -4
  225. package/dist/number-ticker.esm.js +10 -10
  226. package/dist/odometer.cjs.js +9 -9
  227. package/dist/odometer.esm.js +17 -17
  228. package/dist/orbiter.cjs.js +11 -28
  229. package/dist/orbiter.esm.js +28 -45
  230. package/dist/overlay-motion-B56x1GoY.js +49 -0
  231. package/dist/overlay-motion-BX3dPLay.mjs +120 -0
  232. package/dist/pagination.cjs.js +28 -25
  233. package/dist/pagination.esm.js +54 -51
  234. package/dist/password-field.cjs.js +39 -34
  235. package/dist/password-field.esm.js +63 -58
  236. package/dist/pin-input.cjs.js +18 -14
  237. package/dist/pin-input.esm.js +24 -20
  238. package/dist/placement-grid.cjs.js +1 -1
  239. package/dist/placement-grid.esm.js +1 -1
  240. package/dist/plugin-panel.cjs.js +1 -1
  241. package/dist/plugin-panel.esm.js +1 -1
  242. package/dist/popover.cjs.js +16 -28
  243. package/dist/popover.esm.js +29 -45
  244. package/dist/portal-DeaM1tYY.mjs +121 -0
  245. package/dist/portal-XbYR3m_q.js +1 -0
  246. package/dist/portal.cjs.js +1 -1
  247. package/dist/portal.d.ts +3 -1
  248. package/dist/portal.d.ts.map +1 -1
  249. package/dist/portal.esm.js +1 -1
  250. package/dist/{positioner-D0VGxtYU.mjs → positioner-BE8Nbho2.mjs} +5 -3
  251. package/dist/{positioner-D_fqyx_j.js → positioner-DZ1FW6A9.js} +1 -1
  252. package/dist/positioner.cjs.js +1 -1
  253. package/dist/positioner.esm.js +1 -1
  254. package/dist/presence.cjs.js +1 -1
  255. package/dist/presence.esm.js +1 -1
  256. package/dist/primitives/overlay-motion.d.ts +47 -0
  257. package/dist/primitives/overlay-motion.d.ts.map +1 -0
  258. package/dist/primitives/positioner.d.ts.map +1 -1
  259. package/dist/progress.cjs.js +11 -16
  260. package/dist/progress.esm.js +37 -42
  261. package/dist/quick-actions.cjs.js +14 -14
  262. package/dist/quick-actions.esm.js +12 -12
  263. package/dist/radio-group.cjs.js +50 -26
  264. package/dist/radio-group.esm.js +53 -29
  265. package/dist/radio.cjs.js +16 -13
  266. package/dist/radio.esm.js +16 -13
  267. package/dist/rating.cjs.js +11 -15
  268. package/dist/rating.esm.js +48 -50
  269. package/dist/{runtime-CFnK53iC.mjs → runtime-BRT7E4A8.mjs} +563 -531
  270. package/dist/runtime-CXw4SGV9.js +5 -0
  271. package/dist/runtime.cjs.js +1 -1
  272. package/dist/runtime.d.ts +3 -2
  273. package/dist/runtime.d.ts.map +1 -1
  274. package/dist/runtime.esm.js +36 -32
  275. package/dist/scroll-area.cjs.js +3 -4
  276. package/dist/scroll-area.esm.js +3 -4
  277. package/dist/section.cjs.js +2 -4
  278. package/dist/section.esm.js +2 -4
  279. package/dist/select.cjs.js +42 -75
  280. package/dist/select.esm.js +57 -89
  281. package/dist/selection-popup.cjs.js +3 -4
  282. package/dist/selection-popup.esm.js +3 -4
  283. package/dist/semantic-tokens.d.ts +17 -0
  284. package/dist/semantic-tokens.d.ts.map +1 -0
  285. package/dist/separator.cjs.js +6 -6
  286. package/dist/separator.esm.js +7 -7
  287. package/dist/sidebar.cjs.js +29 -28
  288. package/dist/sidebar.esm.js +32 -31
  289. package/dist/skeleton.cjs.js +2 -2
  290. package/dist/skeleton.esm.js +2 -2
  291. package/dist/slider.cjs.js +22 -26
  292. package/dist/slider.esm.js +25 -29
  293. package/dist/slot.cjs.js +1 -1
  294. package/dist/slot.esm.js +1 -1
  295. package/dist/sortable.cjs.js +10 -11
  296. package/dist/sortable.esm.js +10 -11
  297. package/dist/spinning-text.cjs.js +4 -13
  298. package/dist/spinning-text.esm.js +4 -13
  299. package/dist/split-button.cjs.js +7 -7
  300. package/dist/split-button.esm.js +17 -16
  301. package/dist/splitter.cjs.js +52 -10
  302. package/dist/splitter.esm.js +55 -13
  303. package/dist/stepper.cjs.js +31 -65
  304. package/dist/stepper.esm.js +32 -66
  305. package/dist/switch.cjs.js +20 -22
  306. package/dist/switch.esm.js +20 -22
  307. package/dist/table.cjs.js +5 -5
  308. package/dist/table.esm.js +20 -20
  309. package/dist/tabs.cjs.js +101 -26
  310. package/dist/tabs.esm.js +187 -112
  311. package/dist/tags-input.cjs.js +43 -17
  312. package/dist/tags-input.esm.js +75 -49
  313. package/dist/textarea.cjs.js +34 -35
  314. package/dist/textarea.esm.js +50 -51
  315. package/dist/theme.d.ts +25 -1
  316. package/dist/theme.d.ts.map +1 -1
  317. package/dist/time-field.cjs.js +8 -8
  318. package/dist/time-field.esm.js +29 -29
  319. package/dist/time-picker.cjs.js +17 -14
  320. package/dist/time-picker.esm.js +28 -25
  321. package/dist/timeline.cjs.js +10 -10
  322. package/dist/timeline.esm.js +7 -7
  323. package/dist/toast.cjs.js +2 -2
  324. package/dist/toast.esm.js +2 -2
  325. package/dist/toggle-group.cjs.js +13 -13
  326. package/dist/toggle-group.esm.js +66 -61
  327. package/dist/toggle.cjs.js +52 -34
  328. package/dist/toggle.esm.js +80 -62
  329. package/dist/toolbar.cjs.js +14 -14
  330. package/dist/toolbar.esm.js +41 -33
  331. package/dist/tooltip.cjs.js +3 -3
  332. package/dist/tooltip.esm.js +39 -33
  333. package/dist/transfer-list.cjs.js +37 -38
  334. package/dist/transfer-list.esm.js +32 -33
  335. package/dist/{tree-B_oQput6.mjs → tree-33fVNnaf.mjs} +6 -5
  336. package/dist/{tree-SivHxcAy.js → tree-Dc02MChE.js} +6 -5
  337. package/dist/tree-item.cjs.js +9 -8
  338. package/dist/tree-item.esm.js +13 -12
  339. package/dist/tree.cjs.js +1 -1
  340. package/dist/tree.esm.js +1 -1
  341. package/dist/{ui-button-Co8Sid6t.mjs → ui-button-C3OmI7Sn.mjs} +152 -154
  342. package/dist/{ui-button-BPrzJScZ.js → ui-button-CnLwXBnx.js} +107 -109
  343. package/dist/wizard.cjs.js +51 -39
  344. package/dist/wizard.esm.js +51 -39
  345. package/package.json +1 -1
  346. package/dist/date-time-utils-y3AvNvGe.js +0 -1
  347. package/dist/portal-DgpQ3Jo1.js +0 -1
  348. package/dist/portal-bR42gHvG.mjs +0 -118
  349. package/dist/runtime-DwE-tizc.js +0 -1
package/dist/tabs.esm.js CHANGED
@@ -8,7 +8,9 @@ const k = `
8
8
  --ui-tabs-text: var(--ui-color-text, #0f172a);
9
9
  --ui-tabs-muted: var(--ui-color-muted, #526175);
10
10
  --ui-tabs-accent: var(--ui-tabs-active-bg, var(--ui-color-primary, #2563eb));
11
- --ui-tabs-active-text: color-mix(in srgb, var(--ui-tabs-accent) 82%, #0f172a 18%);
11
+ /* The accent as text: readable on the surface, unlike the accent fill itself (light amber, for one). */
12
+ --ui-tabs-accent-text: var(--ui-color-accent-text, var(--ui-tabs-accent));
13
+ --ui-tabs-active-text: color-mix(in srgb, var(--ui-tabs-accent) 45%, var(--ui-color-text-strong, #0f172a));
12
14
  --ui-tabs-focus: var(--ui-color-focus-ring, #2563eb);
13
15
  --ui-tabs-indicator-bg: color-mix(in srgb, var(--ui-tabs-accent) 16%, transparent);
14
16
  --ui-tabs-indicator-border: color-mix(in srgb, var(--ui-tabs-accent) 32%, transparent);
@@ -97,7 +99,7 @@ const k = `
97
99
 
98
100
  .tab:hover {
99
101
  background: color-mix(in srgb, var(--ui-tabs-accent) 10%, transparent);
100
- color: color-mix(in srgb, var(--ui-tabs-accent) 82%, #0f172a 18%);
102
+ color: color-mix(in srgb, var(--ui-tabs-accent) 45%, var(--ui-color-text-strong, #0f172a));
101
103
  }
102
104
 
103
105
  .tab[aria-selected="true"] {
@@ -108,7 +110,7 @@ const k = `
108
110
 
109
111
  .tab:focus-visible {
110
112
  outline: none;
111
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-tabs-focus) 28%, transparent);
113
+ box-shadow: 0 0 0 2px var(--ui-ring-color, var(--ui-tabs-focus));
112
114
  }
113
115
 
114
116
  .tab:active {
@@ -214,6 +216,23 @@ const k = `
214
216
  flex: 1;
215
217
  }
216
218
 
219
+ :host(:not([variant])),
220
+ :host([variant="default"]),
221
+ :host([variant="underline"]),
222
+ :host([variant="line"]) {
223
+ --ui-tabs-shell-gap: 4px;
224
+ --ui-tabs-nav-padding: 0px;
225
+ --ui-tabs-nav-gap: 4px;
226
+ --ui-tabs-tab-radius: var(--ui-radius, 6px);
227
+ --ui-tabs-tab-min-h: 36px;
228
+ --ui-tabs-tab-pad-x: 12px;
229
+ --ui-tabs-tab-font-size: 14px;
230
+ --ui-tabs-panel-padding: 12px;
231
+ --ui-tabs-muted: var(--ui-color-text-secondary, var(--ui-color-muted, #526175));
232
+ --ui-tabs-active-text: var(--ui-color-text-strong, var(--ui-color-text, #0f172a));
233
+ --ui-tabs-line: var(--ui-color-accent-solid, var(--ui-tabs-accent));
234
+ }
235
+
217
236
  :host([size="sm"]) {
218
237
  --ui-tabs-nav-padding: 6px;
219
238
  --ui-tabs-nav-gap: 6px;
@@ -301,7 +320,7 @@ const k = `
301
320
  --ui-tabs-panel-bg: var(--ui-color-surface, #ffffff);
302
321
  --ui-tabs-border: color-mix(in srgb, var(--ui-tabs-accent) 76%, #0f172a 24%);
303
322
  --ui-tabs-muted: color-mix(in srgb, var(--ui-color-primary-foreground, var(--ui-color-foreground-on-primary, #ffffff)) 94%, transparent);
304
- --ui-tabs-active-text: color-mix(in srgb, var(--ui-tabs-accent) 78%, #0f172a 22%);
323
+ --ui-tabs-active-text: var(--ui-tabs-accent-text);
305
324
  --ui-tabs-focus: color-mix(in srgb, var(--ui-color-primary-foreground, var(--ui-color-foreground-on-primary, #ffffff)) 72%, var(--ui-tabs-accent));
306
325
  }
307
326
 
@@ -311,7 +330,7 @@ const k = `
311
330
  }
312
331
 
313
332
  :host([variant="solid"]) .tab[aria-selected="true"] {
314
- background: var(--ui-color-primary-foreground, var(--ui-color-foreground-on-primary, #ffffff));
333
+ background: var(--ui-color-surface, #ffffff);
315
334
  border-color: color-mix(in srgb, var(--ui-tabs-accent) 44%, var(--ui-tabs-border));
316
335
  color: var(--ui-tabs-active-text);
317
336
  }
@@ -344,30 +363,83 @@ const k = `
344
363
  backdrop-filter: blur(10px);
345
364
  }
346
365
 
366
+ /* The default look is a line: a hairline under the tabs and a 2px accent line under the selected one. */
367
+ :host(:not([variant])) .nav,
368
+ :host([variant="default"]) .nav,
347
369
  :host([variant="underline"]) .nav,
348
370
  :host([variant="line"]) .nav {
371
+ border: 0;
349
372
  border-radius: 0;
350
- border-top: 0;
351
- border-left: 0;
352
- border-right: 0;
353
- box-shadow: none;
354
- padding-inline: 0;
373
+ padding: 0;
355
374
  background: transparent;
375
+ box-shadow: inset 0 -1px 0 var(--ui-color-line-subtle, var(--ui-tabs-border));
356
376
  }
357
377
 
378
+ :host(:not([variant])) .tab,
379
+ :host([variant="default"]) .tab,
358
380
  :host([variant="underline"]) .tab,
359
381
  :host([variant="line"]) .tab {
360
- border-radius: 0;
361
- border-top: 0;
362
- border-left: 0;
363
- border-right: 0;
364
- border-bottom: 2px solid transparent;
382
+ border: 0;
383
+ gap: 6px;
384
+ font-weight: 500;
385
+ }
386
+
387
+ :host(:not([variant])) .tab::after,
388
+ :host([variant="default"]) .tab::after,
389
+ :host([variant="underline"]) .tab::after,
390
+ :host([variant="line"]) .tab::after {
391
+ content: '';
392
+ position: absolute;
393
+ inset-inline: 0;
394
+ inset-block-end: 0;
395
+ block-size: 2px;
396
+ border-radius: 1px;
397
+ background: transparent;
398
+ transition: background-color var(--ui-tabs-transition);
399
+ }
400
+
401
+ :host(:not([variant])) .tab:hover,
402
+ :host([variant="default"]) .tab:hover,
403
+ :host([variant="underline"]) .tab:hover,
404
+ :host([variant="line"]) .tab:hover {
405
+ background: var(--ui-color-fill, color-mix(in srgb, var(--ui-tabs-accent) 10%, transparent));
406
+ color: var(--ui-color-text-strong, var(--ui-tabs-active-text));
365
407
  }
366
408
 
409
+ :host(:not([variant])) .tab[aria-selected="true"],
410
+ :host([variant="default"]) .tab[aria-selected="true"],
367
411
  :host([variant="underline"]) .tab[aria-selected="true"],
368
412
  :host([variant="line"]) .tab[aria-selected="true"] {
369
413
  background: transparent;
370
- border-bottom-color: var(--ui-tabs-accent);
414
+ border: 0;
415
+ color: var(--ui-tabs-active-text);
416
+ }
417
+
418
+ :host(:not([variant])) .tab[aria-selected="true"]::after,
419
+ :host([variant="default"]) .tab[aria-selected="true"]::after,
420
+ :host([variant="underline"]) .tab[aria-selected="true"]::after,
421
+ :host([variant="line"]) .tab[aria-selected="true"]::after {
422
+ background: var(--ui-tabs-line);
423
+ }
424
+
425
+ :host(:not([variant])) .tab:focus-visible,
426
+ :host([variant="default"]) .tab:focus-visible,
427
+ :host([variant="underline"]) .tab:focus-visible,
428
+ :host([variant="line"]) .tab:focus-visible {
429
+ outline: var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--ui-tabs-focus));
430
+ outline-offset: -2px;
431
+ box-shadow: none;
432
+ }
433
+
434
+ :host(:not([variant])) .panel-wrap,
435
+ :host([variant="default"]) .panel-wrap,
436
+ :host([variant="underline"]) .panel-wrap,
437
+ :host([variant="line"]) .panel-wrap {
438
+ border: 0;
439
+ border-radius: 0;
440
+ background: transparent;
441
+ box-shadow: none;
442
+ padding-inline: 2px;
371
443
  }
372
444
 
373
445
  :host([variant="segmented"]) .nav {
@@ -436,14 +508,17 @@ const k = `
436
508
 
437
509
  :host([tone="success"]) {
438
510
  --ui-tabs-accent: var(--ui-color-success, #15803d);
511
+ --ui-tabs-accent-text: var(--ui-color-success-text, var(--ui-tabs-accent));
439
512
  }
440
513
 
441
514
  :host([tone="warning"]) {
442
515
  --ui-tabs-accent: var(--ui-color-warning, #b45309);
516
+ --ui-tabs-accent-text: var(--ui-color-warning-text, var(--ui-tabs-accent));
443
517
  }
444
518
 
445
519
  :host([tone="danger"]) {
446
520
  --ui-tabs-accent: var(--ui-color-danger, #dc2626);
521
+ --ui-tabs-accent-text: var(--ui-color-danger-text, var(--ui-tabs-accent));
447
522
  }
448
523
 
449
524
  :host([headless]) .nav,
@@ -486,7 +561,7 @@ const k = `
486
561
  }
487
562
  }
488
563
  `, g = "data-ui-tabs-auto-label";
489
- function v(d) {
564
+ function h(d) {
490
565
  return String(d).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
491
566
  }
492
567
  function x(d) {
@@ -547,8 +622,8 @@ class I extends y {
547
622
  disconnectedCallback() {
548
623
  this.root.removeEventListener("click", this._onClick), this.root.removeEventListener("keydown", this._onKeyDown), this._observer && (this._observer.disconnect(), this._observer = null), this._resizeObserver ? (this._resizeObserver.disconnect(), this._resizeObserver = null) : window.removeEventListener("resize", this._onWindowResize), super.disconnectedCallback();
549
624
  }
550
- attributeChangedCallback(t, e, r) {
551
- if (e !== r) {
625
+ attributeChangedCallback(t, a, r) {
626
+ if (a !== r) {
552
627
  if (t === "selected" || t === "value") {
553
628
  this._isSyncingSelectionAttributes || this._syncSelectionUi();
554
629
  return;
@@ -560,8 +635,8 @@ class I extends y {
560
635
  return this.getAttribute("selected") || "0";
561
636
  }
562
637
  set selected(t) {
563
- const e = String(t);
564
- e ? this.setAttribute("selected", e) : this.removeAttribute("selected");
638
+ const a = String(t);
639
+ a ? this.setAttribute("selected", a) : this.removeAttribute("selected");
565
640
  }
566
641
  _sourceTabs() {
567
642
  return Array.from(this.querySelectorAll('[slot="tab"]'));
@@ -570,55 +645,55 @@ class I extends y {
570
645
  return Array.from(this.querySelectorAll('[slot="panel"]'));
571
646
  }
572
647
  _tabsModel() {
573
- return this._sourceTabs().map((t, e) => {
574
- const r = t.getAttribute("data-value") || t.getAttribute("value") || String(e), a = t.getAttribute("data-label") || t.textContent?.trim() || `Tab ${e + 1}`, i = t.getAttribute("data-icon") || "", s = t.hasAttribute("disabled") || x(t.getAttribute("data-disabled")), b = `${this._uid}-tab-${e}`, c = `${this._uid}-panel-${e}`;
575
- return { index: e, value: r, label: a, icon: i, disabled: s, tabId: b, panelId: c };
648
+ return this._sourceTabs().map((t, a) => {
649
+ const r = t.getAttribute("data-value") || t.getAttribute("value") || String(a), e = t.getAttribute("data-label") || t.textContent?.trim() || `Tab ${a + 1}`, i = t.getAttribute("data-icon") || "", s = t.hasAttribute("disabled") || x(t.getAttribute("data-disabled")), l = `${this._uid}-tab-${a}`, c = `${this._uid}-panel-${a}`;
650
+ return { index: a, value: r, label: e, icon: i, disabled: s, tabId: l, panelId: c };
576
651
  });
577
652
  }
578
653
  _resolveSelectedIndex(t) {
579
654
  if (!t.length) return -1;
580
- const e = this.getAttribute("selected"), r = this.getAttribute("value"), a = this._sourceTabs();
655
+ const a = this.getAttribute("selected"), r = this.getAttribute("value"), e = this._sourceTabs();
581
656
  let i = -1;
582
- if (e != null && e !== "") {
583
- const s = Number(e);
584
- Number.isFinite(s) ? i = Math.trunc(s) : i = t.findIndex((b) => b.value === e);
657
+ if (a != null && a !== "") {
658
+ const s = Number(a);
659
+ Number.isFinite(s) ? i = Math.trunc(s) : i = t.findIndex((l) => l.value === a);
585
660
  }
586
- return i < 0 && r && (i = t.findIndex((s) => s.value === r)), i < 0 && (i = t.findIndex((s, b) => !!a[b]?.hasAttribute("data-active") && !s.disabled)), (i < 0 || !t[i] || t[i].disabled) && (i = t.findIndex((s) => !s.disabled)), i;
661
+ return i < 0 && r && (i = t.findIndex((s) => s.value === r)), i < 0 && (i = t.findIndex((s, l) => !!e[l]?.hasAttribute("data-active") && !s.disabled)), (i < 0 || !t[i] || t[i].disabled) && (i = t.findIndex((s) => !s.disabled)), i;
587
662
  }
588
- _syncSelectedAttributes(t, e) {
589
- const r = t[e];
663
+ _syncSelectedAttributes(t, a) {
664
+ const r = t[a];
590
665
  this._isSyncingSelectionAttributes = !0;
591
666
  try {
592
667
  if (!r) {
593
668
  this.removeAttribute("selected"), this.removeAttribute("value");
594
669
  return;
595
670
  }
596
- this.getAttribute("selected") !== String(e) && this.setAttribute("selected", String(e)), this.getAttribute("value") !== r.value && this.setAttribute("value", r.value);
671
+ this.getAttribute("selected") !== String(a) && this.setAttribute("selected", String(a)), this.getAttribute("value") !== r.value && this.setAttribute("value", r.value);
597
672
  } finally {
598
673
  this._isSyncingSelectionAttributes = !1;
599
674
  }
600
675
  }
601
- _emit(t, e, r) {
602
- const a = e[r];
603
- if (!a) return;
676
+ _emit(t, a, r) {
677
+ const e = a[r];
678
+ if (!e) return;
604
679
  const i = {
605
680
  selected: r,
606
681
  index: r,
607
- value: a.value,
608
- label: a.label,
609
- tabId: a.tabId,
610
- panelId: a.panelId
682
+ value: e.value,
683
+ label: e.label,
684
+ tabId: e.tabId,
685
+ panelId: e.panelId
611
686
  };
612
687
  this.dispatchEvent(new CustomEvent(t, { detail: i, bubbles: !0, composed: !0 }));
613
688
  }
614
- _setSelectedByIndex(t, e, r) {
615
- const a = t[e];
616
- if (!a || a.disabled) return;
617
- if (this._resolveSelectedIndex(t) === e) {
618
- this._focusTab(e);
689
+ _setSelectedByIndex(t, a, r) {
690
+ const e = t[a];
691
+ if (!e || e.disabled) return;
692
+ if (this._resolveSelectedIndex(t) === a) {
693
+ this._focusTab(a);
619
694
  return;
620
695
  }
621
- this._focusIndex = e, this.setAttribute("selected", String(e)), this.setAttribute("value", a.value), r && (this._emit("change", t, e), this._emit("select", t, e));
696
+ this._focusIndex = a, this.setAttribute("selected", String(a)), this.setAttribute("value", e.value), r && (this._emit("change", t, a), this._emit("select", t, a));
622
697
  }
623
698
  _syncSelectionUi() {
624
699
  if (!this.isConnected) return;
@@ -628,58 +703,58 @@ class I extends y {
628
703
  }
629
704
  const t = this._tabsModel();
630
705
  if (!t.length) return;
631
- const e = this._resolveSelectedIndex(t), r = this._resolveFocusIndex(t, e);
632
- this._syncSelectedAttributes(t, e);
633
- const a = Array.from(this.root.querySelectorAll(".tab"));
634
- a.forEach((s, b) => {
635
- const c = t[b];
706
+ const a = this._resolveSelectedIndex(t), r = this._resolveFocusIndex(t, a);
707
+ this._syncSelectedAttributes(t, a);
708
+ const e = Array.from(this.root.querySelectorAll(".tab"));
709
+ e.forEach((s, l) => {
710
+ const c = t[l];
636
711
  if (!c) return;
637
- const o = b === e;
638
- s.setAttribute("aria-selected", o ? "true" : "false"), s.setAttribute("aria-disabled", c.disabled ? "true" : "false"), c.disabled ? s.setAttribute("disabled", "") : s.removeAttribute("disabled");
639
- }), p(a, a[r] || null, { activeAttribute: null });
640
- const i = t[e];
641
- this._syncIndicator(e), this._clearCrossRootReferences(), i && this._scrollSelectedTabIntoView(e), this._syncPanels(t, e);
712
+ const n = l === a;
713
+ s.setAttribute("aria-selected", n ? "true" : "false"), s.setAttribute("aria-disabled", c.disabled ? "true" : "false"), c.disabled ? s.setAttribute("disabled", "") : s.removeAttribute("disabled");
714
+ }), p(e, e[r] || null, { activeAttribute: null });
715
+ const i = t[a];
716
+ this._syncIndicator(a), this._clearCrossRootReferences(), i && this._scrollSelectedTabIntoView(a), this._syncPanels(t, a);
642
717
  }
643
718
  _syncIndicator(t) {
644
- const e = this.root.querySelector(".nav");
645
- if (!e) return;
646
- const r = this.getAttribute("variant") || "default", a = r === "indicator";
647
- if (!a && !(r === "indicator-line")) {
648
- e.removeAttribute("data-indicator-ready"), e.style.removeProperty("--ui-tabs-indicator-x"), e.style.removeProperty("--ui-tabs-indicator-y"), e.style.removeProperty("--ui-tabs-indicator-w"), e.style.removeProperty("--ui-tabs-indicator-h");
719
+ const a = this.root.querySelector(".nav");
720
+ if (!a) return;
721
+ const r = this.getAttribute("variant") || "default", e = r === "indicator";
722
+ if (!e && !(r === "indicator-line")) {
723
+ a.removeAttribute("data-indicator-ready"), a.style.removeProperty("--ui-tabs-indicator-x"), a.style.removeProperty("--ui-tabs-indicator-y"), a.style.removeProperty("--ui-tabs-indicator-w"), a.style.removeProperty("--ui-tabs-indicator-h");
649
724
  return;
650
725
  }
651
726
  const s = this.root.querySelector(`.tab[data-index="${t}"]`);
652
727
  if (!s) {
653
- e.removeAttribute("data-indicator-ready");
728
+ a.removeAttribute("data-indicator-ready");
654
729
  return;
655
730
  }
656
- const b = this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal", c = getComputedStyle(this).direction === "rtl";
657
- let o = s.offsetLeft, u = s.offsetTop, n = s.offsetWidth, l = s.offsetHeight;
658
- a ? (o += 2, u += 2, n = Math.max(0, n - 4), l = Math.max(0, l - 4)) : b === "vertical" ? (u += 5, l = Math.max(8, l - 10), n = 3, o += c ? s.offsetWidth - 3 - 2 : 2) : (o += 8, n = Math.max(12, n - 16), l = 2, u += s.offsetHeight - 2 - 2), e.style.setProperty("--ui-tabs-indicator-x", `${o}px`), e.style.setProperty("--ui-tabs-indicator-y", `${u}px`), e.style.setProperty("--ui-tabs-indicator-w", `${n}px`), e.style.setProperty("--ui-tabs-indicator-h", `${l}px`), e.setAttribute("data-indicator-ready", "true");
731
+ const l = this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal", c = getComputedStyle(this).direction === "rtl";
732
+ let n = s.offsetLeft, u = s.offsetTop, o = s.offsetWidth, b = s.offsetHeight;
733
+ e ? (n += 2, u += 2, o = Math.max(0, o - 4), b = Math.max(0, b - 4)) : l === "vertical" ? (u += 5, b = Math.max(8, b - 10), o = 3, n += c ? s.offsetWidth - 3 - 2 : 2) : (n += 8, o = Math.max(12, o - 16), b = 2, u += s.offsetHeight - 2 - 2), a.style.setProperty("--ui-tabs-indicator-x", `${n}px`), a.style.setProperty("--ui-tabs-indicator-y", `${u}px`), a.style.setProperty("--ui-tabs-indicator-w", `${o}px`), a.style.setProperty("--ui-tabs-indicator-h", `${b}px`), a.setAttribute("data-indicator-ready", "true");
659
734
  }
660
735
  _clearCrossRootReferences() {
661
736
  this.removeAttribute("aria-activedescendant"), this.removeAttribute("aria-controls");
662
737
  }
663
- _syncPanels(t, e) {
664
- const r = this._sourcePanels(), a = this.root.querySelector(".panel-wrap");
665
- a && (r.length ? a.removeAttribute("hidden") : a.setAttribute("hidden", "")), this._isSyncing = !0;
738
+ _syncPanels(t, a) {
739
+ const r = this._sourcePanels(), e = this.root.querySelector(".panel-wrap");
740
+ e && (r.length ? e.removeAttribute("hidden") : e.setAttribute("hidden", "")), this._isSyncing = !0;
666
741
  try {
667
742
  r.forEach((i, s) => {
668
- const b = t[s], c = s === e;
669
- i.id = b?.panelId || `${this._uid}-panel-${s}`, i.setAttribute("role", "tabpanel"), i.setAttribute("tabindex", c ? "0" : "-1"), i.setAttribute("aria-hidden", c ? "false" : "true"), b && (i.getAttribute("aria-labelledby") === b.tabId && i.removeAttribute("aria-labelledby"), i.hasAttribute("aria-labelledby") || i.hasAttribute("aria-label") && !i.hasAttribute(g) || (i.setAttribute("aria-label", b.label), i.setAttribute(g, ""))), c ? i.removeAttribute("hidden") : i.setAttribute("hidden", "");
743
+ const l = t[s], c = s === a;
744
+ i.id = l?.panelId || `${this._uid}-panel-${s}`, i.setAttribute("role", "tabpanel"), i.setAttribute("tabindex", c ? "0" : "-1"), i.setAttribute("aria-hidden", c ? "false" : "true"), l && (i.getAttribute("aria-labelledby") === l.tabId && i.removeAttribute("aria-labelledby"), i.hasAttribute("aria-labelledby") || i.hasAttribute("aria-label") && !i.hasAttribute(g) || (i.setAttribute("aria-label", l.label), i.setAttribute(g, ""))), c ? i.removeAttribute("hidden") : i.setAttribute("hidden", "");
670
745
  });
671
746
  } finally {
672
747
  this._isSyncing = !1;
673
748
  }
674
749
  }
675
750
  _enabledIndices(t) {
676
- return t.filter((e) => !e.disabled).map((e) => e.index);
751
+ return t.filter((a) => !a.disabled).map((a) => a.index);
677
752
  }
678
- _resolveFocusIndex(t, e) {
753
+ _resolveFocusIndex(t, a) {
679
754
  const r = _(t, {
680
755
  activeIndex: this._focusIndex,
681
- selectedIndex: e,
682
- getDisabled: (a) => a.disabled
756
+ selectedIndex: a,
757
+ getDisabled: (e) => e.disabled
683
758
  });
684
759
  return this._focusIndex = r, r;
685
760
  }
@@ -688,41 +763,41 @@ class I extends y {
688
763
  }
689
764
  _focusTab(t) {
690
765
  this._focusIndex = t;
691
- const e = this.root.querySelector(`.tab[data-index="${t}"]`), r = Array.from(this.root.querySelectorAll(".tab"));
692
- p(r, e, { activeAttribute: null }), w(e);
766
+ const a = this.root.querySelector(`.tab[data-index="${t}"]`), r = Array.from(this.root.querySelectorAll(".tab"));
767
+ p(r, a, { activeAttribute: null }), w(a);
693
768
  }
694
769
  _scrollSelectedTabIntoView(t) {
695
- const e = this.root.querySelector(".nav"), r = this.root.querySelector(`.tab[data-index="${t}"]`);
696
- if (!e || !r) return;
697
- const a = this.getAttribute("orientation") !== "vertical", i = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
770
+ const a = this.root.querySelector(".nav"), r = this.root.querySelector(`.tab[data-index="${t}"]`);
771
+ if (!a || !r) return;
772
+ const e = this.getAttribute("orientation") !== "vertical", i = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
698
773
  typeof r.scrollIntoView == "function" && r.scrollIntoView({
699
774
  behavior: i ? "auto" : "smooth",
700
775
  block: "nearest",
701
- inline: a ? "center" : "nearest"
776
+ inline: e ? "center" : "nearest"
702
777
  });
703
778
  }
704
779
  _onClick(t) {
705
780
  const r = t.target?.closest(".tab");
706
781
  if (!r || r.disabled) return;
707
- const a = Number(r.getAttribute("data-index"));
708
- if (!Number.isFinite(a)) return;
782
+ const e = Number(r.getAttribute("data-index"));
783
+ if (!Number.isFinite(e)) return;
709
784
  const i = this._tabsModel();
710
- this._setSelectedByIndex(i, a, !0);
785
+ this._setSelectedByIndex(i, e, !0);
711
786
  }
712
787
  _onKeyDown(t) {
713
788
  const r = t.target?.closest(".tab");
714
789
  if (!r) return;
715
- const a = this._tabsModel();
716
- if (!a.length) return;
717
- const i = this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal", s = this.getAttribute("activation") === "manual" ? "manual" : "auto", b = !this.hasAttribute("loop") || x(this.getAttribute("loop")), c = getComputedStyle(this).direction === "rtl", o = Number(r.getAttribute("data-index"));
718
- if (!Number.isFinite(o)) return;
719
- const u = (n) => {
720
- const l = A(a, o, n, {
721
- wrap: b,
722
- fallbackIndex: this._resolveFocusIndex(a, this._resolveSelectedIndex(a)),
723
- getDisabled: (h) => h.disabled
790
+ const e = this._tabsModel();
791
+ if (!e.length) return;
792
+ const i = this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal", s = this.getAttribute("activation") === "manual" ? "manual" : "auto", l = !this.hasAttribute("loop") || x(this.getAttribute("loop")), c = getComputedStyle(this).direction === "rtl", n = Number(r.getAttribute("data-index"));
793
+ if (!Number.isFinite(n)) return;
794
+ const u = (o) => {
795
+ const b = A(e, n, o, {
796
+ wrap: l,
797
+ fallbackIndex: this._resolveFocusIndex(e, this._resolveSelectedIndex(e)),
798
+ getDisabled: (v) => v.disabled
724
799
  });
725
- l != null && (this._focusTab(l), s === "auto" ? this._setSelectedByIndex(a, l, !0) : this._emit("focus", a, l));
800
+ b != null && (this._focusTab(b), s === "auto" ? this._setSelectedByIndex(e, b, !0) : this._emit("focus", e, b));
726
801
  };
727
802
  if (i === "horizontal" && (t.key === "ArrowRight" && !c || t.key === "ArrowLeft" && c) || i === "vertical" && t.key === "ArrowDown") {
728
803
  t.preventDefault(), u(1);
@@ -734,47 +809,47 @@ class I extends y {
734
809
  }
735
810
  if (t.key === "Home") {
736
811
  t.preventDefault();
737
- const n = f(a, "first", (l) => l.disabled);
738
- if (n < 0) return;
739
- this._focusTab(n), s === "auto" ? this._setSelectedByIndex(a, n, !0) : this._emit("focus", a, n);
812
+ const o = f(e, "first", (b) => b.disabled);
813
+ if (o < 0) return;
814
+ this._focusTab(o), s === "auto" ? this._setSelectedByIndex(e, o, !0) : this._emit("focus", e, o);
740
815
  return;
741
816
  }
742
817
  if (t.key === "End") {
743
818
  t.preventDefault();
744
- const n = f(a, "last", (l) => l.disabled);
745
- if (n < 0) return;
746
- this._focusTab(n), s === "auto" ? this._setSelectedByIndex(a, n, !0) : this._emit("focus", a, n);
819
+ const o = f(e, "last", (b) => b.disabled);
820
+ if (o < 0) return;
821
+ this._focusTab(o), s === "auto" ? this._setSelectedByIndex(e, o, !0) : this._emit("focus", e, o);
747
822
  return;
748
823
  }
749
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this._setSelectedByIndex(a, o, !0));
824
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this._setSelectedByIndex(e, n, !0));
750
825
  }
751
826
  render() {
752
- const t = this._tabsModel(), e = this._resolveSelectedIndex(t), r = this._resolveFocusIndex(t, e);
753
- this._syncSelectedAttributes(t, e);
754
- const a = this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal", i = (this.getAttribute("aria-label") || "").trim(), s = (this.getAttribute("aria-labelledby") || "").trim(), b = (i ? ` aria-label="${v(i)}"` : "") + (s ? ` aria-labelledby="${v(s)}"` : ""), c = t.map((o) => {
755
- const u = o.index === e, n = o.icon ? `<span class="tab-icon" aria-hidden="true">${v(o.icon)}</span>` : "";
827
+ const t = this._tabsModel(), a = this._resolveSelectedIndex(t), r = this._resolveFocusIndex(t, a);
828
+ this._syncSelectedAttributes(t, a);
829
+ const e = this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal", i = (this.getAttribute("aria-label") || "").trim(), s = (this.getAttribute("aria-labelledby") || "").trim(), l = (i ? ` aria-label="${h(i)}"` : "") + (s ? ` aria-labelledby="${h(s)}"` : ""), c = t.map((n) => {
830
+ const u = n.index === a, o = n.icon ? `<span class="tab-icon" aria-hidden="true">${h(n.icon)}</span>` : "";
756
831
  return `
757
832
  <button
758
833
  type="button"
759
834
  class="tab"
760
835
  part="tab"
761
- id="${o.tabId}"
836
+ id="${n.tabId}"
762
837
  role="tab"
763
- data-index="${o.index}"
838
+ data-index="${n.index}"
764
839
  aria-selected="${u ? "true" : "false"}"
765
- aria-disabled="${o.disabled ? "true" : "false"}"
766
- tabindex="${o.index === r && !o.disabled ? "0" : "-1"}"
767
- ${o.disabled ? "disabled" : ""}
840
+ aria-disabled="${n.disabled ? "true" : "false"}"
841
+ tabindex="${n.index === r && !n.disabled ? "0" : "-1"}"
842
+ ${n.disabled ? "disabled" : ""}
768
843
  >
769
- ${n}
770
- <span class="tab-label">${v(o.label)}</span>
844
+ ${o}
845
+ <span class="tab-label">${h(n.label)}</span>
771
846
  </button>
772
847
  `;
773
848
  }).join("");
774
849
  this.setContent(`
775
850
  <style>${k}</style>
776
851
  <section class="shell" part="shell">
777
- <div class="nav" role="tablist" aria-orientation="${a}"${b} part="nav">
852
+ <div class="nav" role="tablist" aria-orientation="${e}"${l} part="nav">
778
853
  <span class="indicator" part="indicator" aria-hidden="true"></span>
779
854
  ${c}
780
855
  </div>
@@ -783,7 +858,7 @@ class I extends y {
783
858
  </div>
784
859
  </section>
785
860
  <slot class="source-tabs" name="tab"></slot>
786
- `), this._clearCrossRootReferences(), this._syncIndicator(e), this._syncPanels(t, e);
861
+ `), this._clearCrossRootReferences(), this._syncIndicator(a), this._syncPanels(t, a);
787
862
  }
788
863
  }
789
864
  typeof customElements < "u" && !customElements.get("ui-tabs") && customElements.define("ui-tabs", I);