@epilot/spark-ui 0.30.2 → 0.31.0

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 (153) hide show
  1. package/dist/components/accordion.cjs +3 -3
  2. package/dist/components/accordion.cjs.map +1 -1
  3. package/dist/components/accordion.js +3 -3
  4. package/dist/components/accordion.js.map +1 -1
  5. package/dist/components/alert-dialog.cjs +2 -2
  6. package/dist/components/alert-dialog.cjs.map +1 -1
  7. package/dist/components/alert-dialog.js +2 -2
  8. package/dist/components/alert-dialog.js.map +1 -1
  9. package/dist/components/attachment.cjs +1 -1
  10. package/dist/components/attachment.js +1 -1
  11. package/dist/components/avatar.js +1 -1
  12. package/dist/components/badge.cjs +1 -1
  13. package/dist/components/badge.js +2 -2
  14. package/dist/components/banner.cjs +1 -1
  15. package/dist/components/banner.js +1 -1
  16. package/dist/components/breadcrumbs.cjs +1 -1
  17. package/dist/components/breadcrumbs.js +1 -1
  18. package/dist/components/bubble.cjs +1 -1
  19. package/dist/components/bubble.d.ts +1 -1
  20. package/dist/components/bubble.js +1 -1
  21. package/dist/components/button-group.cjs +2 -2
  22. package/dist/components/button-group.cjs.map +1 -1
  23. package/dist/components/button-group.js +3 -3
  24. package/dist/components/button-group.js.map +1 -1
  25. package/dist/components/button.cjs +2 -2
  26. package/dist/components/button.cjs.map +1 -1
  27. package/dist/components/button.d.cts +1 -1
  28. package/dist/components/button.d.ts +1 -1
  29. package/dist/components/button.js +3 -3
  30. package/dist/components/button.js.map +1 -1
  31. package/dist/components/calendar.cjs +3 -1
  32. package/dist/components/calendar.cjs.map +1 -1
  33. package/dist/components/calendar.js +3 -1
  34. package/dist/components/calendar.js.map +1 -1
  35. package/dist/components/callout.cjs +1 -1
  36. package/dist/components/callout.js +1 -1
  37. package/dist/components/card.cjs +1 -1
  38. package/dist/components/card.js +1 -1
  39. package/dist/components/checkbox-group.cjs +1 -1
  40. package/dist/components/checkbox-group.js +2 -2
  41. package/dist/components/checkbox.js +1 -1
  42. package/dist/components/combobox.cjs +2 -2
  43. package/dist/components/combobox.js +2 -2
  44. package/dist/components/dialog.cjs +2 -2
  45. package/dist/components/dialog.cjs.map +1 -1
  46. package/dist/components/dialog.js +2 -2
  47. package/dist/components/dialog.js.map +1 -1
  48. package/dist/components/drawer.cjs +1 -1
  49. package/dist/components/drawer.js +1 -1
  50. package/dist/components/dropdown-menu.cjs +1 -1
  51. package/dist/components/dropdown-menu.cjs.map +1 -1
  52. package/dist/components/dropdown-menu.js +1 -1
  53. package/dist/components/dropdown-menu.js.map +1 -1
  54. package/dist/components/empty-state.cjs +1 -1
  55. package/dist/components/empty-state.js +1 -1
  56. package/dist/components/entity-card.cjs +1 -1
  57. package/dist/components/entity-card.js +1 -1
  58. package/dist/components/field.cjs +2 -2
  59. package/dist/components/field.cjs.map +1 -1
  60. package/dist/components/field.js +2 -2
  61. package/dist/components/field.js.map +1 -1
  62. package/dist/components/hero-metric.cjs +1 -1
  63. package/dist/components/hero-metric.js +1 -1
  64. package/dist/components/icon.js +1 -1
  65. package/dist/components/info-block.cjs +1 -1
  66. package/dist/components/info-block.js +1 -1
  67. package/dist/components/input-date-time.cjs +8 -3
  68. package/dist/components/input-date-time.cjs.map +1 -1
  69. package/dist/components/input-date-time.js +8 -3
  70. package/dist/components/input-date-time.js.map +1 -1
  71. package/dist/components/input-group.cjs +2 -2
  72. package/dist/components/input-group.d.cts +1 -1
  73. package/dist/components/input-group.d.ts +1 -1
  74. package/dist/components/input-group.js +2 -2
  75. package/dist/components/input-otp.cjs +2 -2
  76. package/dist/components/input-otp.js +2 -2
  77. package/dist/components/input.cjs +2 -2
  78. package/dist/components/input.js +2 -2
  79. package/dist/components/list.cjs +1 -1
  80. package/dist/components/list.js +1 -1
  81. package/dist/components/marker.cjs +1 -1
  82. package/dist/components/marker.js +1 -1
  83. package/dist/components/page-header.cjs +1 -1
  84. package/dist/components/page-header.js +1 -1
  85. package/dist/components/pill.js +1 -1
  86. package/dist/components/popover.cjs +2 -2
  87. package/dist/components/popover.cjs.map +1 -1
  88. package/dist/components/popover.js +2 -2
  89. package/dist/components/popover.js.map +1 -1
  90. package/dist/components/progress.cjs +2 -2
  91. package/dist/components/progress.cjs.map +1 -1
  92. package/dist/components/progress.js +2 -2
  93. package/dist/components/progress.js.map +1 -1
  94. package/dist/components/radio.cjs +1 -1
  95. package/dist/components/radio.js +2 -2
  96. package/dist/components/select.cjs +2 -2
  97. package/dist/components/select.cjs.map +1 -1
  98. package/dist/components/select.js +2 -2
  99. package/dist/components/select.js.map +1 -1
  100. package/dist/components/separator.cjs +1 -1
  101. package/dist/components/separator.js +1 -1
  102. package/dist/components/sheet.cjs +2 -2
  103. package/dist/components/sheet.cjs.map +1 -1
  104. package/dist/components/sheet.js +2 -2
  105. package/dist/components/sheet.js.map +1 -1
  106. package/dist/components/skeleton.cjs +1 -1
  107. package/dist/components/skeleton.js +1 -1
  108. package/dist/components/spark-home.cjs +6122 -0
  109. package/dist/components/spark-home.cjs.map +1 -0
  110. package/dist/components/spark-home.d.cts +68 -0
  111. package/dist/components/spark-home.d.ts +68 -0
  112. package/dist/components/spark-home.js +6118 -0
  113. package/dist/components/spark-home.js.map +1 -0
  114. package/dist/components/switch-group.cjs +1 -1
  115. package/dist/components/switch-group.js +2 -2
  116. package/dist/components/switch.js +1 -1
  117. package/dist/components/tabs.cjs +35 -66
  118. package/dist/components/tabs.cjs.map +1 -1
  119. package/dist/components/tabs.d.cts +4 -10
  120. package/dist/components/tabs.d.ts +4 -10
  121. package/dist/components/tabs.js +35 -66
  122. package/dist/components/tabs.js.map +1 -1
  123. package/dist/components/textarea.cjs +2 -2
  124. package/dist/components/textarea.js +2 -2
  125. package/dist/components/theme.cjs +1 -1
  126. package/dist/components/theme.js +2 -2
  127. package/dist/components/toggle-group.js +1 -1
  128. package/dist/components/toggle.js +1 -1
  129. package/dist/lib/calendar-day-button.cjs +23 -0
  130. package/dist/lib/calendar-day-button.cjs.map +1 -0
  131. package/dist/lib/calendar-day-button.d.cts +14 -0
  132. package/dist/lib/calendar-day-button.d.ts +14 -0
  133. package/dist/lib/calendar-day-button.js +20 -0
  134. package/dist/lib/calendar-day-button.js.map +1 -0
  135. package/dist/lib/calendar-lists.cjs +6 -5
  136. package/dist/lib/calendar-lists.cjs.map +1 -1
  137. package/dist/lib/calendar-lists.js +6 -5
  138. package/dist/lib/calendar-lists.js.map +1 -1
  139. package/dist/lib/input-date-parts.cjs +3 -2
  140. package/dist/lib/input-date-parts.cjs.map +1 -1
  141. package/dist/lib/input-date-parts.js +3 -2
  142. package/dist/lib/input-date-parts.js.map +1 -1
  143. package/dist/lib/scroll-within.cjs +27 -0
  144. package/dist/lib/scroll-within.cjs.map +1 -0
  145. package/dist/lib/scroll-within.d.cts +14 -0
  146. package/dist/lib/scroll-within.d.ts +14 -0
  147. package/dist/lib/scroll-within.js +25 -0
  148. package/dist/lib/scroll-within.js.map +1 -0
  149. package/dist/styles/index.css +1 -0
  150. package/dist/styles/spark-default.css +3 -6
  151. package/dist/styles/spark-home.css +735 -0
  152. package/dist/styles/theme.css +8 -0
  153. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ "use client";
2
+
3
+ //#region src/lib/scroll-within.d.ts
4
+ /**
5
+ * Scrolls `list` so `item` shows, without scrolling the page or any other ancestor
6
+ * (`scrollIntoView` scrolls them all). `center` puts it in the middle; `nearest` only
7
+ * scrolls when it is cut off.
8
+ */
9
+ declare function scrollWithin(list: HTMLElement | null, item: HTMLElement | null, align?: 'center' | 'nearest'): void;
10
+ /** Focuses `item` and brings it into view inside `list` only. */
11
+ declare function focusWithin(list: HTMLElement | null, item: HTMLElement | null): void;
12
+ //#endregion
13
+ export { focusWithin, scrollWithin };
14
+ //# sourceMappingURL=scroll-within.d.cts.map
@@ -0,0 +1,14 @@
1
+ "use client";
2
+
3
+ //#region src/lib/scroll-within.d.ts
4
+ /**
5
+ * Scrolls `list` so `item` shows, without scrolling the page or any other ancestor
6
+ * (`scrollIntoView` scrolls them all). `center` puts it in the middle; `nearest` only
7
+ * scrolls when it is cut off.
8
+ */
9
+ declare function scrollWithin(list: HTMLElement | null, item: HTMLElement | null, align?: 'center' | 'nearest'): void;
10
+ /** Focuses `item` and brings it into view inside `list` only. */
11
+ declare function focusWithin(list: HTMLElement | null, item: HTMLElement | null): void;
12
+ //#endregion
13
+ export { focusWithin, scrollWithin };
14
+ //# sourceMappingURL=scroll-within.d.ts.map
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ //#region src/lib/scroll-within.ts
3
+ /**
4
+ * Scrolls `list` so `item` shows, without scrolling the page or any other ancestor
5
+ * (`scrollIntoView` scrolls them all). `center` puts it in the middle; `nearest` only
6
+ * scrolls when it is cut off.
7
+ */
8
+ function scrollWithin(list, item, align = "nearest") {
9
+ if (!list || !item) return;
10
+ const listBox = list.getBoundingClientRect();
11
+ const itemBox = item.getBoundingClientRect();
12
+ const top = itemBox.top - listBox.top;
13
+ if (align === "center") list.scrollTop += top - (list.clientHeight - itemBox.height) / 2;
14
+ else if (top < 0) list.scrollTop += top;
15
+ else if (top + itemBox.height > list.clientHeight) list.scrollTop += top + itemBox.height - list.clientHeight;
16
+ }
17
+ /** Focuses `item` and brings it into view inside `list` only. */
18
+ function focusWithin(list, item) {
19
+ item?.focus({ preventScroll: true });
20
+ scrollWithin(list, item);
21
+ }
22
+ //#endregion
23
+ export { focusWithin, scrollWithin };
24
+
25
+ //# sourceMappingURL=scroll-within.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scroll-within.js","names":[],"sources":["../../src/lib/scroll-within.ts"],"sourcesContent":["/**\n * Scrolls `list` so `item` shows, without scrolling the page or any other ancestor\n * (`scrollIntoView` scrolls them all). `center` puts it in the middle; `nearest` only\n * scrolls when it is cut off.\n */\nexport function scrollWithin(\n list: HTMLElement | null,\n item: HTMLElement | null,\n align: 'center' | 'nearest' = 'nearest',\n) {\n if (!list || !item) return\n const listBox = list.getBoundingClientRect()\n const itemBox = item.getBoundingClientRect()\n const top = itemBox.top - listBox.top\n if (align === 'center') {\n list.scrollTop += top - (list.clientHeight - itemBox.height) / 2\n } else if (top < 0) {\n list.scrollTop += top\n } else if (top + itemBox.height > list.clientHeight) {\n list.scrollTop += top + itemBox.height - list.clientHeight\n }\n}\n\n/** Focuses `item` and brings it into view inside `list` only. */\nexport function focusWithin(\n list: HTMLElement | null,\n item: HTMLElement | null,\n) {\n item?.focus({ preventScroll: true })\n scrollWithin(list, item)\n}\n"],"mappings":";;;;;;;AAKA,SAAgB,aACd,MACA,MACA,QAA8B,WAC9B;CACA,IAAI,CAAC,QAAQ,CAAC,MAAM;CACpB,MAAM,UAAU,KAAK,sBAAsB;CAC3C,MAAM,UAAU,KAAK,sBAAsB;CAC3C,MAAM,MAAM,QAAQ,MAAM,QAAQ;CAClC,IAAI,UAAU,UACZ,KAAK,aAAa,OAAO,KAAK,eAAe,QAAQ,UAAU;MAC1D,IAAI,MAAM,GACf,KAAK,aAAa;MACb,IAAI,MAAM,QAAQ,SAAS,KAAK,cACrC,KAAK,aAAa,MAAM,QAAQ,SAAS,KAAK;AAElD;;AAGA,SAAgB,YACd,MACA,MACA;CACA,MAAM,MAAM,EAAE,eAAe,KAAK,CAAC;CACnC,aAAa,MAAM,IAAI;AACzB"}
@@ -80,6 +80,7 @@
80
80
  /* Tailwind v4 theme: scales, semantic tokens, dark variant, safelist */
81
81
  @import './theme.css';
82
82
  @import './utilities.css';
83
+ @import './spark-home.css';
83
84
 
84
85
  /* Tailwind animate plugin */
85
86
  @import 'tw-animate-css';
@@ -1656,15 +1656,12 @@
1656
1656
 
1657
1657
  /*
1658
1658
  * Tabs — NOT data-style-driven: a tab strip has no solid/soft/surface axis, so it
1659
- * themes via accent + neutral + radius + scaling + high-contrast only. Two component
1660
- * tokens, both accent-by-default via component fallbacks: the active/hover ink
1661
- * (fallback --spark-a11) and the underline indicator (fallback --spark-indicator,
1662
- * i.e. step 9). HC deepens both — ink a11→a12, indicator 9→12 — mirroring the §11
1663
- * model (ink darkens, the accent-filled element deepens to 12).
1659
+ * themes via accent + neutral + radius + scaling + high-contrast only. One component
1660
+ * token: the active-tab bar (fallback base-accent-solid, i.e. step 9). HC deepens it
1661
+ * to step 12, mirroring the §11 model (the accent-filled element deepens to 12).
1664
1662
  */
1665
1663
  [data-high-contrast],
1666
1664
  :where([data-high-contrast] .spark-theme) {
1667
- --spark-tabs-ink: var(--spark-a12);
1668
1665
  --spark-tabs-indicator: var(--spark-12);
1669
1666
  }
1670
1667