@slipstream-ui/core 0.12.1 → 0.14.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 (310) hide show
  1. package/dist/index.d.mts +208 -4
  2. package/dist/index.d.ts +208 -4
  3. package/dist/index.js +471 -11
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +463 -11
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/manifests/accordion.manifest.json +1 -1
  8. package/dist/manifests/alert.manifest.json +1 -1
  9. package/dist/manifests/announcement-bar.manifest.json +1 -1
  10. package/dist/manifests/app-shell.manifest.json +1 -1
  11. package/dist/manifests/applied-filters.manifest.json +1 -1
  12. package/dist/manifests/article-card.manifest.json +1 -1
  13. package/dist/manifests/auth-layout.manifest.json +1 -1
  14. package/dist/manifests/autocomplete.manifest.json +1 -1
  15. package/dist/manifests/avatar.manifest.json +1 -1
  16. package/dist/manifests/badge.manifest.json +1 -1
  17. package/dist/manifests/block.manifest.json +1 -1
  18. package/dist/manifests/bottom-nav.manifest.json +1 -1
  19. package/dist/manifests/breadcrumb.manifest.json +1 -1
  20. package/dist/manifests/button-group.manifest.json +1 -1
  21. package/dist/manifests/button.manifest.json +1 -1
  22. package/dist/manifests/calendar.manifest.json +1 -1
  23. package/dist/manifests/card.manifest.json +1 -1
  24. package/dist/manifests/checkbox.manifest.json +1 -1
  25. package/dist/manifests/comparison-table.manifest.json +1 -1
  26. package/dist/manifests/confirm-dialog.manifest.json +1 -1
  27. package/dist/manifests/consent-banner.manifest.json +1 -1
  28. package/dist/manifests/contact-strip.manifest.json +1 -1
  29. package/dist/manifests/container.manifest.json +1 -1
  30. package/dist/manifests/cover-image.manifest.json +1 -1
  31. package/dist/manifests/cta-section.manifest.json +1 -1
  32. package/dist/manifests/data-table.manifest.json +1 -1
  33. package/dist/manifests/date-picker-popover.manifest.json +1 -1
  34. package/dist/manifests/date-picker.manifest.json +1 -1
  35. package/dist/manifests/date-range-picker.manifest.json +1 -1
  36. package/dist/manifests/deal-card.manifest.json +1 -1
  37. package/dist/manifests/dialog.manifest.json +1 -1
  38. package/dist/manifests/document-card.manifest.json +1 -1
  39. package/dist/manifests/drawer.manifest.json +1 -1
  40. package/dist/manifests/empty-state.manifest.json +1 -1
  41. package/dist/manifests/entity-card.manifest.json +1 -1
  42. package/dist/manifests/feature-grid.manifest.json +1 -1
  43. package/dist/manifests/feature-row.manifest.json +1 -1
  44. package/dist/manifests/fieldset.manifest.json +1 -1
  45. package/dist/manifests/figure.manifest.json +105 -0
  46. package/dist/manifests/file-upload.manifest.json +1 -1
  47. package/dist/manifests/filter-bar.manifest.json +1 -1
  48. package/dist/manifests/filter-chips.manifest.json +1 -1
  49. package/dist/manifests/filter-panel.manifest.json +1 -1
  50. package/dist/manifests/flex.manifest.json +1 -1
  51. package/dist/manifests/form-field.manifest.json +1 -1
  52. package/dist/manifests/form-layout.manifest.json +1 -1
  53. package/dist/manifests/form.manifest.json +1 -1
  54. package/dist/manifests/grid.manifest.json +1 -1
  55. package/dist/manifests/heading.manifest.json +1 -1
  56. package/dist/manifests/hero.manifest.json +1 -1
  57. package/dist/manifests/icon-button.manifest.json +101 -0
  58. package/dist/manifests/icon-tile.manifest.json +107 -0
  59. package/dist/manifests/icon.manifest.json +119 -0
  60. package/dist/manifests/image.manifest.json +1 -1
  61. package/dist/manifests/input-group.manifest.json +1 -1
  62. package/dist/manifests/input.manifest.json +1 -1
  63. package/dist/manifests/label.manifest.json +1 -1
  64. package/dist/manifests/link-tabs.manifest.json +1 -1
  65. package/dist/manifests/link.manifest.json +1 -1
  66. package/dist/manifests/list-toolbar.manifest.json +1 -1
  67. package/dist/manifests/list.manifest.json +1 -1
  68. package/dist/manifests/load-more.manifest.json +1 -1
  69. package/dist/manifests/logo-cloud.manifest.json +1 -1
  70. package/dist/manifests/media-card.manifest.json +1 -1
  71. package/dist/manifests/media.manifest.json +142 -0
  72. package/dist/manifests/menu.manifest.json +1 -1
  73. package/dist/manifests/metric-card.manifest.json +1 -1
  74. package/dist/manifests/month-schedule.manifest.json +1 -1
  75. package/dist/manifests/multi-select.manifest.json +1 -1
  76. package/dist/manifests/newsletter.manifest.json +1 -1
  77. package/dist/manifests/page-header.manifest.json +1 -1
  78. package/dist/manifests/pagination.manifest.json +1 -1
  79. package/dist/manifests/password-input.manifest.json +1 -1
  80. package/dist/manifests/popover.manifest.json +1 -1
  81. package/dist/manifests/process-steps.manifest.json +1 -1
  82. package/dist/manifests/progress.manifest.json +1 -1
  83. package/dist/manifests/prose.manifest.json +1 -1
  84. package/dist/manifests/radio.manifest.json +1 -1
  85. package/dist/manifests/range-slider.manifest.json +1 -1
  86. package/dist/manifests/search.manifest.json +1 -1
  87. package/dist/manifests/section-heading.manifest.json +1 -1
  88. package/dist/manifests/section.manifest.json +1 -1
  89. package/dist/manifests/segmented-control.manifest.json +1 -1
  90. package/dist/manifests/select-menu.manifest.json +1 -1
  91. package/dist/manifests/select.manifest.json +1 -1
  92. package/dist/manifests/separator.manifest.json +1 -1
  93. package/dist/manifests/site-footer.manifest.json +1 -1
  94. package/dist/manifests/site-header.manifest.json +1 -1
  95. package/dist/manifests/skeleton.manifest.json +1 -1
  96. package/dist/manifests/social-links.manifest.json +120 -0
  97. package/dist/manifests/spinner.manifest.json +1 -1
  98. package/dist/manifests/stat-band.manifest.json +1 -1
  99. package/dist/manifests/stepper.manifest.json +1 -1
  100. package/dist/manifests/switch.manifest.json +1 -1
  101. package/dist/manifests/table-card.manifest.json +1 -1
  102. package/dist/manifests/table-of-contents.manifest.json +1 -1
  103. package/dist/manifests/table.manifest.json +1 -1
  104. package/dist/manifests/tabs.manifest.json +1 -1
  105. package/dist/manifests/testimonial.manifest.json +1 -1
  106. package/dist/manifests/text.manifest.json +1 -1
  107. package/dist/manifests/textarea.manifest.json +1 -1
  108. package/dist/manifests/theme-toggle.manifest.json +1 -1
  109. package/dist/manifests/time-picker.manifest.json +49 -6
  110. package/dist/manifests/timeline.manifest.json +1 -1
  111. package/dist/manifests/toast.manifest.json +1 -1
  112. package/dist/manifests/tombstone-card.manifest.json +1 -1
  113. package/dist/manifests/tooltip.manifest.json +1 -1
  114. package/dist/src/components/figure/Figure.d.ts +23 -0
  115. package/dist/src/components/figure/Figure.js +60 -0
  116. package/dist/src/components/figure/Figure.js.map +1 -0
  117. package/dist/src/components/figure/Figure.mjs +26 -0
  118. package/dist/src/components/figure/Figure.mjs.map +1 -0
  119. package/dist/src/components/figure/index.d.ts +2 -0
  120. package/dist/src/components/figure/index.js +29 -0
  121. package/dist/src/components/figure/index.js.map +1 -0
  122. package/dist/src/components/figure/index.mjs +5 -0
  123. package/dist/src/components/figure/index.mjs.map +1 -0
  124. package/dist/src/components/icon/Icon.d.ts +33 -0
  125. package/dist/src/components/icon/Icon.js +82 -0
  126. package/dist/src/components/icon/Icon.js.map +1 -0
  127. package/dist/src/components/icon/Icon.mjs +47 -0
  128. package/dist/src/components/icon/Icon.mjs.map +1 -0
  129. package/dist/src/components/icon/index.d.ts +2 -0
  130. package/dist/src/components/icon/index.js +31 -0
  131. package/dist/src/components/icon/index.js.map +1 -0
  132. package/dist/src/components/icon/index.mjs +6 -0
  133. package/dist/src/components/icon/index.mjs.map +1 -0
  134. package/dist/src/components/icon-button/IconButton.d.ts +25 -0
  135. package/dist/src/components/icon-button/IconButton.js +60 -0
  136. package/dist/src/components/icon-button/IconButton.js.map +1 -0
  137. package/dist/src/components/icon-button/IconButton.mjs +26 -0
  138. package/dist/src/components/icon-button/IconButton.mjs.map +1 -0
  139. package/dist/src/components/icon-button/index.d.ts +2 -0
  140. package/dist/src/components/icon-button/index.js +29 -0
  141. package/dist/src/components/icon-button/index.js.map +1 -0
  142. package/dist/src/components/icon-button/index.mjs +5 -0
  143. package/dist/src/components/icon-button/index.mjs.map +1 -0
  144. package/dist/src/components/icon-tile/IconTile.d.ts +23 -0
  145. package/dist/src/components/icon-tile/IconTile.js +75 -0
  146. package/dist/src/components/icon-tile/IconTile.js.map +1 -0
  147. package/dist/src/components/icon-tile/IconTile.mjs +40 -0
  148. package/dist/src/components/icon-tile/IconTile.mjs.map +1 -0
  149. package/dist/src/components/icon-tile/index.d.ts +2 -0
  150. package/dist/src/components/icon-tile/index.js +31 -0
  151. package/dist/src/components/icon-tile/index.js.map +1 -0
  152. package/dist/src/components/icon-tile/index.mjs +6 -0
  153. package/dist/src/components/icon-tile/index.mjs.map +1 -0
  154. package/dist/src/components/media/Media.d.ts +48 -0
  155. package/dist/src/components/media/Media.js +97 -0
  156. package/dist/src/components/media/Media.js.map +1 -0
  157. package/dist/src/components/media/Media.mjs +63 -0
  158. package/dist/src/components/media/Media.mjs.map +1 -0
  159. package/dist/src/components/media/index.d.ts +2 -0
  160. package/dist/src/components/media/index.js +29 -0
  161. package/dist/src/components/media/index.js.map +1 -0
  162. package/dist/src/components/media/index.mjs +5 -0
  163. package/dist/src/components/media/index.mjs.map +1 -0
  164. package/dist/src/components/social-links/SocialLinks.d.ts +34 -0
  165. package/dist/src/components/social-links/SocialLinks.js +69 -0
  166. package/dist/src/components/social-links/SocialLinks.js.map +1 -0
  167. package/dist/src/components/social-links/SocialLinks.mjs +35 -0
  168. package/dist/src/components/social-links/SocialLinks.mjs.map +1 -0
  169. package/dist/src/components/social-links/index.d.ts +2 -0
  170. package/dist/src/components/social-links/index.js +29 -0
  171. package/dist/src/components/social-links/index.js.map +1 -0
  172. package/dist/src/components/social-links/index.mjs +5 -0
  173. package/dist/src/components/social-links/index.mjs.map +1 -0
  174. package/dist/src/components/time-picker/TimePicker.d.ts +31 -2
  175. package/dist/src/components/time-picker/TimePicker.js +244 -11
  176. package/dist/src/components/time-picker/TimePicker.js.map +1 -1
  177. package/dist/src/components/time-picker/TimePicker.mjs +244 -11
  178. package/dist/src/components/time-picker/TimePicker.mjs.map +1 -1
  179. package/dist/src/index.d.ts +6 -0
  180. package/dist/styles-full.css +1 -1
  181. package/dist/styles.css +1 -1
  182. package/package.json +4 -4
  183. package/src/components/figure/Figure.test.tsx +54 -0
  184. package/src/components/figure/Figure.tsx +38 -0
  185. package/src/components/figure/index.ts +2 -0
  186. package/src/components/icon/Icon.test.tsx +70 -0
  187. package/src/components/icon/Icon.tsx +61 -0
  188. package/src/components/icon/index.ts +2 -0
  189. package/src/components/icon-button/IconButton.test.tsx +76 -0
  190. package/src/components/icon-button/IconButton.tsx +38 -0
  191. package/src/components/icon-button/index.ts +2 -0
  192. package/src/components/icon-tile/IconTile.test.tsx +63 -0
  193. package/src/components/icon-tile/IconTile.tsx +55 -0
  194. package/src/components/icon-tile/index.ts +2 -0
  195. package/src/components/media/Media.test.tsx +53 -0
  196. package/src/components/media/Media.tsx +92 -0
  197. package/src/components/media/index.ts +2 -0
  198. package/src/components/social-links/SocialLinks.test.tsx +59 -0
  199. package/src/components/social-links/SocialLinks.tsx +73 -0
  200. package/src/components/social-links/index.ts +2 -0
  201. package/src/components/time-picker/TimePicker.test.tsx +77 -0
  202. package/src/components/time-picker/TimePicker.tsx +315 -12
  203. package/src/index.ts +6 -0
  204. package/src/manifests/accordion.manifest.json +1 -1
  205. package/src/manifests/alert.manifest.json +1 -1
  206. package/src/manifests/announcement-bar.manifest.json +1 -1
  207. package/src/manifests/app-shell.manifest.json +1 -1
  208. package/src/manifests/applied-filters.manifest.json +1 -1
  209. package/src/manifests/article-card.manifest.json +1 -1
  210. package/src/manifests/auth-layout.manifest.json +1 -1
  211. package/src/manifests/autocomplete.manifest.json +1 -1
  212. package/src/manifests/avatar.manifest.json +1 -1
  213. package/src/manifests/badge.manifest.json +1 -1
  214. package/src/manifests/block.manifest.json +1 -1
  215. package/src/manifests/bottom-nav.manifest.json +1 -1
  216. package/src/manifests/breadcrumb.manifest.json +1 -1
  217. package/src/manifests/button-group.manifest.json +1 -1
  218. package/src/manifests/button.manifest.json +1 -1
  219. package/src/manifests/calendar.manifest.json +1 -1
  220. package/src/manifests/card.manifest.json +1 -1
  221. package/src/manifests/checkbox.manifest.json +1 -1
  222. package/src/manifests/comparison-table.manifest.json +1 -1
  223. package/src/manifests/confirm-dialog.manifest.json +1 -1
  224. package/src/manifests/consent-banner.manifest.json +1 -1
  225. package/src/manifests/contact-strip.manifest.json +1 -1
  226. package/src/manifests/container.manifest.json +1 -1
  227. package/src/manifests/cover-image.manifest.json +1 -1
  228. package/src/manifests/cta-section.manifest.json +1 -1
  229. package/src/manifests/data-table.manifest.json +1 -1
  230. package/src/manifests/date-picker-popover.manifest.json +1 -1
  231. package/src/manifests/date-picker.manifest.json +1 -1
  232. package/src/manifests/date-range-picker.manifest.json +1 -1
  233. package/src/manifests/deal-card.manifest.json +1 -1
  234. package/src/manifests/dialog.manifest.json +1 -1
  235. package/src/manifests/document-card.manifest.json +1 -1
  236. package/src/manifests/drawer.manifest.json +1 -1
  237. package/src/manifests/empty-state.manifest.json +1 -1
  238. package/src/manifests/entity-card.manifest.json +1 -1
  239. package/src/manifests/feature-grid.manifest.json +1 -1
  240. package/src/manifests/feature-row.manifest.json +1 -1
  241. package/src/manifests/fieldset.manifest.json +1 -1
  242. package/src/manifests/figure.manifest.json +105 -0
  243. package/src/manifests/file-upload.manifest.json +1 -1
  244. package/src/manifests/filter-bar.manifest.json +1 -1
  245. package/src/manifests/filter-chips.manifest.json +1 -1
  246. package/src/manifests/filter-panel.manifest.json +1 -1
  247. package/src/manifests/flex.manifest.json +1 -1
  248. package/src/manifests/form-field.manifest.json +1 -1
  249. package/src/manifests/form-layout.manifest.json +1 -1
  250. package/src/manifests/form.manifest.json +1 -1
  251. package/src/manifests/grid.manifest.json +1 -1
  252. package/src/manifests/heading.manifest.json +1 -1
  253. package/src/manifests/hero.manifest.json +1 -1
  254. package/src/manifests/icon-button.manifest.json +101 -0
  255. package/src/manifests/icon-tile.manifest.json +107 -0
  256. package/src/manifests/icon.manifest.json +119 -0
  257. package/src/manifests/image.manifest.json +1 -1
  258. package/src/manifests/input-group.manifest.json +1 -1
  259. package/src/manifests/input.manifest.json +1 -1
  260. package/src/manifests/label.manifest.json +1 -1
  261. package/src/manifests/link-tabs.manifest.json +1 -1
  262. package/src/manifests/link.manifest.json +1 -1
  263. package/src/manifests/list-toolbar.manifest.json +1 -1
  264. package/src/manifests/list.manifest.json +1 -1
  265. package/src/manifests/load-more.manifest.json +1 -1
  266. package/src/manifests/logo-cloud.manifest.json +1 -1
  267. package/src/manifests/media-card.manifest.json +1 -1
  268. package/src/manifests/media.manifest.json +142 -0
  269. package/src/manifests/menu.manifest.json +1 -1
  270. package/src/manifests/metric-card.manifest.json +1 -1
  271. package/src/manifests/month-schedule.manifest.json +1 -1
  272. package/src/manifests/multi-select.manifest.json +1 -1
  273. package/src/manifests/newsletter.manifest.json +1 -1
  274. package/src/manifests/page-header.manifest.json +1 -1
  275. package/src/manifests/pagination.manifest.json +1 -1
  276. package/src/manifests/password-input.manifest.json +1 -1
  277. package/src/manifests/popover.manifest.json +1 -1
  278. package/src/manifests/process-steps.manifest.json +1 -1
  279. package/src/manifests/progress.manifest.json +1 -1
  280. package/src/manifests/prose.manifest.json +1 -1
  281. package/src/manifests/radio.manifest.json +1 -1
  282. package/src/manifests/range-slider.manifest.json +1 -1
  283. package/src/manifests/search.manifest.json +1 -1
  284. package/src/manifests/section-heading.manifest.json +1 -1
  285. package/src/manifests/section.manifest.json +1 -1
  286. package/src/manifests/segmented-control.manifest.json +1 -1
  287. package/src/manifests/select-menu.manifest.json +1 -1
  288. package/src/manifests/select.manifest.json +1 -1
  289. package/src/manifests/separator.manifest.json +1 -1
  290. package/src/manifests/site-footer.manifest.json +1 -1
  291. package/src/manifests/site-header.manifest.json +1 -1
  292. package/src/manifests/skeleton.manifest.json +1 -1
  293. package/src/manifests/social-links.manifest.json +120 -0
  294. package/src/manifests/spinner.manifest.json +1 -1
  295. package/src/manifests/stat-band.manifest.json +1 -1
  296. package/src/manifests/stepper.manifest.json +1 -1
  297. package/src/manifests/switch.manifest.json +1 -1
  298. package/src/manifests/table-card.manifest.json +1 -1
  299. package/src/manifests/table-of-contents.manifest.json +1 -1
  300. package/src/manifests/table.manifest.json +1 -1
  301. package/src/manifests/tabs.manifest.json +1 -1
  302. package/src/manifests/testimonial.manifest.json +1 -1
  303. package/src/manifests/text.manifest.json +1 -1
  304. package/src/manifests/textarea.manifest.json +1 -1
  305. package/src/manifests/theme-toggle.manifest.json +1 -1
  306. package/src/manifests/time-picker.manifest.json +49 -6
  307. package/src/manifests/timeline.manifest.json +1 -1
  308. package/src/manifests/toast.manifest.json +1 -1
  309. package/src/manifests/tombstone-card.manifest.json +1 -1
  310. package/src/manifests/tooltip.manifest.json +1 -1
package/dist/index.mjs CHANGED
@@ -6178,13 +6178,108 @@ DatePickerPopover.displayName = "DatePickerPopover";
6178
6178
  // src/components/time-picker/TimePicker.tsx
6179
6179
  import * as React66 from "react";
6180
6180
  import { jsx as jsx67, jsxs as jsxs47 } from "react/jsx-runtime";
6181
- var TimePicker = React66.forwardRef(function TimePicker2({ value, defaultValue, onValueChange, onChange, clearable = false, clearLabel = "Clear time", className, ...props }, ref) {
6181
+ var pad2 = (n) => String(n).padStart(2, "0");
6182
+ function toMinutes(value) {
6183
+ if (!value) return null;
6184
+ const match = /^(\d{1,2}):(\d{2})/.exec(value.trim());
6185
+ if (!match) return null;
6186
+ const minutes = Number(match[1]) * 60 + Number(match[2]);
6187
+ return minutes >= 0 && minutes <= 1439 ? minutes : null;
6188
+ }
6189
+ function fromMinutes(total) {
6190
+ return `${pad2(Math.floor(total / 60))}:${pad2(total % 60)}`;
6191
+ }
6192
+ function minuteChoices(step) {
6193
+ const out = [];
6194
+ for (let m = 0; m < 60; m += step) out.push(m);
6195
+ return out;
6196
+ }
6197
+ function allowedMinutes(hour24, minBound, maxBound, step) {
6198
+ const base = hour24 * 60;
6199
+ return minuteChoices(step).filter((m) => {
6200
+ const total = base + m;
6201
+ return total >= minBound && total <= maxBound;
6202
+ });
6203
+ }
6204
+ function hourHasValidMinute(hour24, minBound, maxBound, step) {
6205
+ return allowedMinutes(hour24, minBound, maxBound, step).length > 0;
6206
+ }
6207
+ function to12(hour24, minute) {
6208
+ const period = hour24 >= 12 ? "PM" : "AM";
6209
+ const hour12 = hour24 % 12 === 0 ? 12 : hour24 % 12;
6210
+ return { hour12, minute, period };
6211
+ }
6212
+ function from12(hour12, minute, period) {
6213
+ const hour24 = hour12 % 12 + (period === "PM" ? 12 : 0);
6214
+ return hour24 * 60 + minute;
6215
+ }
6216
+ function format12(value) {
6217
+ const total = toMinutes(value);
6218
+ if (total === null) return "";
6219
+ const { hour12, minute, period } = to12(Math.floor(total / 60), total % 60);
6220
+ return `${hour12}:${pad2(minute)} ${period}`;
6221
+ }
6222
+ var PERIODS = ["AM", "PM"];
6223
+ var TimePicker = React66.forwardRef(function TimePicker2({
6224
+ value,
6225
+ defaultValue,
6226
+ onValueChange,
6227
+ onChange,
6228
+ clearable = false,
6229
+ clearLabel = "Clear time",
6230
+ format = "24h",
6231
+ minuteStep = 1,
6232
+ min,
6233
+ max,
6234
+ placeholder,
6235
+ className,
6236
+ name,
6237
+ id,
6238
+ disabled,
6239
+ required,
6240
+ "aria-label": ariaLabel,
6241
+ "aria-describedby": ariaDescribedBy,
6242
+ "aria-invalid": ariaInvalid,
6243
+ ...props
6244
+ }, ref) {
6182
6245
  const [internal, setInternal] = React66.useState(defaultValue ?? "");
6183
6246
  const current = value ?? internal;
6247
+ const step = Math.min(60, Math.max(1, Math.floor(minuteStep)));
6184
6248
  const commit = (next) => {
6185
6249
  if (value === void 0) setInternal(next);
6186
6250
  onValueChange?.(next);
6187
6251
  };
6252
+ const clearButton = clearable && current ? /* @__PURE__ */ jsx67(
6253
+ "button",
6254
+ {
6255
+ type: "button",
6256
+ onClick: () => commit(""),
6257
+ "aria-label": clearLabel,
6258
+ className: "absolute right-1.5 top-1/2 z-10 inline-flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
6259
+ children: "\u2715"
6260
+ }
6261
+ ) : null;
6262
+ if (format === "12h") {
6263
+ return /* @__PURE__ */ jsx67(
6264
+ TimePicker12h,
6265
+ {
6266
+ current,
6267
+ commit,
6268
+ clearButton,
6269
+ step,
6270
+ min,
6271
+ max,
6272
+ placeholder: placeholder ?? "Pick a time",
6273
+ className,
6274
+ name,
6275
+ id,
6276
+ disabled,
6277
+ ariaLabel,
6278
+ ariaDescribedBy,
6279
+ ariaInvalid
6280
+ }
6281
+ );
6282
+ }
6188
6283
  return /* @__PURE__ */ jsxs47("div", { className: cn("relative flex items-center", className), children: [
6189
6284
  /* @__PURE__ */ jsx67(
6190
6285
  Input,
@@ -6192,6 +6287,17 @@ var TimePicker = React66.forwardRef(function TimePicker2({ value, defaultValue,
6192
6287
  ref,
6193
6288
  type: "time",
6194
6289
  value: current,
6290
+ min,
6291
+ max,
6292
+ step: step * 60,
6293
+ placeholder,
6294
+ name,
6295
+ id,
6296
+ disabled,
6297
+ required,
6298
+ "aria-label": ariaLabel,
6299
+ "aria-describedby": ariaDescribedBy,
6300
+ "aria-invalid": ariaInvalid,
6195
6301
  onChange: (event) => {
6196
6302
  commit(event.target.value);
6197
6303
  onChange?.(event);
@@ -6200,18 +6306,143 @@ var TimePicker = React66.forwardRef(function TimePicker2({ value, defaultValue,
6200
6306
  ...props
6201
6307
  }
6202
6308
  ),
6203
- clearable && current && /* @__PURE__ */ jsx67(
6204
- "button",
6205
- {
6206
- type: "button",
6207
- onClick: () => commit(""),
6208
- "aria-label": clearLabel,
6209
- className: "absolute right-1.5 inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
6210
- children: "\u2715"
6211
- }
6212
- )
6309
+ clearButton
6213
6310
  ] });
6214
6311
  });
6312
+ TimePicker.displayName = "TimePicker";
6313
+ function TimePicker12h({
6314
+ current,
6315
+ commit,
6316
+ clearButton,
6317
+ step,
6318
+ min,
6319
+ max,
6320
+ placeholder,
6321
+ className,
6322
+ name,
6323
+ id,
6324
+ disabled,
6325
+ ariaLabel,
6326
+ ariaDescribedBy,
6327
+ ariaInvalid
6328
+ }) {
6329
+ const [open, setOpen] = React66.useState(false);
6330
+ const total = toMinutes(current);
6331
+ const minBound = toMinutes(min) ?? 0;
6332
+ const maxBound = toMinutes(max) ?? 1439;
6333
+ const draft = React66.useMemo(() => {
6334
+ if (total !== null) {
6335
+ const hour242 = Math.floor(total / 60);
6336
+ const { hour12: hour122, minute: minute2, period: period2 } = to12(hour242, total % 60);
6337
+ return { hour12: hour122, minute: minute2, period: period2 };
6338
+ }
6339
+ const anchor = minBound;
6340
+ const hour24 = Math.floor(anchor / 60);
6341
+ const { hour12, minute, period } = to12(hour24, anchor % 60);
6342
+ return { hour12, minute, period };
6343
+ }, [total, minBound]);
6344
+ const minutesFor = (hour12, period) => {
6345
+ const hour24 = hour12 % 12 + (period === "PM" ? 12 : 0);
6346
+ return allowedMinutes(hour24, minBound, maxBound, step);
6347
+ };
6348
+ const hours12 = Array.from({ length: 12 }, (_, i) => i + 1);
6349
+ const hour24Of = (h12, p) => h12 % 12 + (p === "PM" ? 12 : 0);
6350
+ const isHourEnabled = (h12) => minutesFor(h12, draft.period).length > 0;
6351
+ const isPeriodEnabled = (p) => hours12.some((h) => hourHasValidMinute(hour24Of(h, p), minBound, maxBound, step));
6352
+ const minuteOptions = minutesFor(draft.hour12, draft.period);
6353
+ const validMinute = minuteOptions.includes(draft.minute) ? draft.minute : minuteOptions[0];
6354
+ const emit2 = (h12, minute, p) => {
6355
+ commit(fromMinutes(from12(h12, minute, p)));
6356
+ };
6357
+ const onHour = (h12) => {
6358
+ const options = minutesFor(h12, draft.period);
6359
+ if (options.length === 0) return;
6360
+ const minute = options.includes(draft.minute) ? draft.minute : options[0];
6361
+ emit2(h12, minute, draft.period);
6362
+ };
6363
+ const onPeriod = (p) => {
6364
+ let hour = draft.hour12;
6365
+ let options = minutesFor(hour, p);
6366
+ if (options.length === 0) {
6367
+ hour = hours12.find((h) => minutesFor(h, p).length > 0) ?? hour;
6368
+ options = minutesFor(hour, p);
6369
+ if (options.length === 0) return;
6370
+ }
6371
+ const minute = options.includes(draft.minute) ? draft.minute : options[0];
6372
+ emit2(hour, minute, p);
6373
+ };
6374
+ const label = total !== null ? format12(current) : placeholder;
6375
+ return /* @__PURE__ */ jsxs47("div", { className: cn("relative flex items-center", className), children: [
6376
+ /* @__PURE__ */ jsxs47(Popover, { open, onOpenChange: setOpen, children: [
6377
+ /* @__PURE__ */ jsxs47(
6378
+ PopoverTrigger,
6379
+ {
6380
+ id,
6381
+ type: "button",
6382
+ disabled,
6383
+ "aria-label": ariaLabel,
6384
+ "aria-describedby": ariaDescribedBy,
6385
+ "aria-invalid": ariaInvalid,
6386
+ className: cn(
6387
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-left text-sm",
6388
+ "hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
6389
+ total === null && "text-muted-foreground",
6390
+ clearButton && "pr-9"
6391
+ ),
6392
+ children: [
6393
+ /* @__PURE__ */ jsx67("span", { children: label }),
6394
+ /* @__PURE__ */ jsx67("span", { "aria-hidden": "true", className: "text-muted-foreground", children: "\u25BE" })
6395
+ ]
6396
+ }
6397
+ ),
6398
+ /* @__PURE__ */ jsx67(PopoverContent, { side: "bottom", align: "start", matchTriggerWidth: true, className: "p-3", children: /* @__PURE__ */ jsxs47("div", { className: "flex items-end gap-2", children: [
6399
+ /* @__PURE__ */ jsx67(
6400
+ Select,
6401
+ {
6402
+ label: "Hour",
6403
+ labelHidden: true,
6404
+ className: "flex-1",
6405
+ value: String(draft.hour12),
6406
+ onValueChange: (v) => onHour(Number(Array.isArray(v) ? v[0] : v)),
6407
+ options: hours12.map((h) => ({
6408
+ value: String(h),
6409
+ label: pad2(h),
6410
+ disabled: !isHourEnabled(h)
6411
+ }))
6412
+ }
6413
+ ),
6414
+ /* @__PURE__ */ jsx67(
6415
+ Select,
6416
+ {
6417
+ label: "Minute",
6418
+ labelHidden: true,
6419
+ className: "flex-1",
6420
+ value: String(validMinute),
6421
+ onValueChange: (v) => emit2(draft.hour12, Number(Array.isArray(v) ? v[0] : v), draft.period),
6422
+ options: minuteOptions.map((m) => ({ value: String(m), label: pad2(m) }))
6423
+ }
6424
+ ),
6425
+ /* @__PURE__ */ jsx67(
6426
+ Select,
6427
+ {
6428
+ label: "AM or PM",
6429
+ labelHidden: true,
6430
+ className: "flex-1",
6431
+ value: draft.period,
6432
+ onValueChange: (v) => onPeriod(Array.isArray(v) ? v[0] : v),
6433
+ options: PERIODS.map((p) => ({
6434
+ value: p,
6435
+ label: p,
6436
+ disabled: !isPeriodEnabled(p)
6437
+ }))
6438
+ }
6439
+ )
6440
+ ] }) })
6441
+ ] }),
6442
+ clearButton,
6443
+ name ? /* @__PURE__ */ jsx67("input", { type: "hidden", name, value: current }) : null
6444
+ ] });
6445
+ }
6215
6446
 
6216
6447
  // src/components/stepper/Stepper.tsx
6217
6448
  import * as React67 from "react";
@@ -8902,6 +9133,219 @@ var Breadcrumb = React103.forwardRef(
8902
9133
  }
8903
9134
  );
8904
9135
  Breadcrumb.displayName = "Breadcrumb";
9136
+
9137
+ // src/components/icon/Icon.tsx
9138
+ import * as React104 from "react";
9139
+ import { cva as cva9 } from "class-variance-authority";
9140
+ import { jsx as jsx105 } from "react/jsx-runtime";
9141
+ var iconVariants = cva9("inline-flex shrink-0 items-center justify-center [&_svg]:shrink-0", {
9142
+ variants: {
9143
+ size: {
9144
+ sm: "[&_svg]:h-3.5 [&_svg]:w-3.5",
9145
+ md: "[&_svg]:h-4 [&_svg]:w-4",
9146
+ lg: "[&_svg]:h-5 [&_svg]:w-5",
9147
+ xl: "[&_svg]:h-6 [&_svg]:w-6"
9148
+ },
9149
+ tone: {
9150
+ default: "text-foreground",
9151
+ muted: "text-muted-foreground",
9152
+ primary: "text-primary-ink",
9153
+ success: "text-success-ink",
9154
+ warning: "text-warning-ink",
9155
+ info: "text-info-ink",
9156
+ destructive: "text-destructive"
9157
+ }
9158
+ },
9159
+ defaultVariants: {
9160
+ size: "md",
9161
+ tone: "default"
9162
+ }
9163
+ });
9164
+ var Icon = React104.forwardRef(
9165
+ ({ className, size, tone, icon: IconComponent, label, children, ...props }, ref) => /* @__PURE__ */ jsx105(
9166
+ "span",
9167
+ {
9168
+ ref,
9169
+ role: label ? "img" : void 0,
9170
+ "aria-label": label,
9171
+ "aria-hidden": label ? void 0 : true,
9172
+ className: cn(iconVariants({ size, tone }), className),
9173
+ ...props,
9174
+ children: IconComponent ? /* @__PURE__ */ jsx105(IconComponent, { "aria-hidden": "true", focusable: "false" }) : children
9175
+ }
9176
+ )
9177
+ );
9178
+ Icon.displayName = "Icon";
9179
+
9180
+ // src/components/icon-button/IconButton.tsx
9181
+ import * as React105 from "react";
9182
+ import { jsx as jsx106 } from "react/jsx-runtime";
9183
+ var sizeClasses11 = {
9184
+ sm: "h-8 w-8",
9185
+ md: void 0,
9186
+ lg: "h-11 w-11"
9187
+ };
9188
+ var IconButton = React105.forwardRef(
9189
+ ({ className, label, size = "md", ...props }, ref) => /* @__PURE__ */ jsx106(
9190
+ Button,
9191
+ {
9192
+ ref,
9193
+ size: "icon",
9194
+ "aria-label": label,
9195
+ className: cn(sizeClasses11[size], className),
9196
+ ...props
9197
+ }
9198
+ )
9199
+ );
9200
+ IconButton.displayName = "IconButton";
9201
+
9202
+ // src/components/icon-tile/IconTile.tsx
9203
+ import * as React106 from "react";
9204
+ import { cva as cva10 } from "class-variance-authority";
9205
+ import { jsx as jsx107, jsxs as jsxs77 } from "react/jsx-runtime";
9206
+ var iconTileVariants = cva10(
9207
+ "relative inline-flex shrink-0 items-center justify-center rounded-lg [&_svg]:shrink-0",
9208
+ {
9209
+ variants: {
9210
+ tone: {
9211
+ default: "bg-muted text-muted-foreground",
9212
+ primary: "bg-primary/10 text-primary-ink",
9213
+ success: "bg-success/10 text-success-ink",
9214
+ warning: "bg-warning/10 text-warning-ink",
9215
+ info: "bg-info/10 text-info-ink",
9216
+ destructive: "bg-destructive/10 text-destructive"
9217
+ },
9218
+ size: {
9219
+ sm: "h-8 w-8 [&_svg]:h-4 [&_svg]:w-4",
9220
+ md: "h-10 w-10 [&_svg]:h-5 [&_svg]:w-5",
9221
+ lg: "h-12 w-12 [&_svg]:h-6 [&_svg]:w-6"
9222
+ }
9223
+ },
9224
+ defaultVariants: {
9225
+ tone: "default",
9226
+ size: "md"
9227
+ }
9228
+ }
9229
+ );
9230
+ var IconTile = React106.forwardRef(
9231
+ ({ className, tone, size, badge, children, ...props }, ref) => /* @__PURE__ */ jsxs77("span", { ref, className: cn(iconTileVariants({ tone, size }), className), ...props, children: [
9232
+ children,
9233
+ badge !== void 0 && badge !== null && /* @__PURE__ */ jsx107("span", { className: "absolute -right-1.5 -top-1.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-semibold leading-none text-primary-foreground", children: badge })
9234
+ ] })
9235
+ );
9236
+ IconTile.displayName = "IconTile";
9237
+
9238
+ // src/components/social-links/SocialLinks.tsx
9239
+ import * as React107 from "react";
9240
+ import { jsx as jsx108 } from "react/jsx-runtime";
9241
+ function isElement(icon) {
9242
+ return React107.isValidElement(icon);
9243
+ }
9244
+ var SocialLinks = React107.forwardRef(
9245
+ ({ className, links, label = "Social links", iconSize = "md", iconTone = "muted", ...props }, ref) => /* @__PURE__ */ jsx108("nav", { ref, "aria-label": label, className: cn("flex items-center gap-1", className), ...props, children: /* @__PURE__ */ jsx108("ul", { className: "flex items-center gap-1", children: links.map((link) => /* @__PURE__ */ jsx108("li", { children: /* @__PURE__ */ jsx108(
9246
+ "a",
9247
+ {
9248
+ href: link.href,
9249
+ target: "_blank",
9250
+ rel: "noopener noreferrer",
9251
+ "aria-label": link.icon ? link.label : void 0,
9252
+ className: cn(
9253
+ "inline-flex items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
9254
+ link.icon ? "h-9 w-9" : "px-3 py-1.5 text-sm"
9255
+ ),
9256
+ children: link.icon ? isElement(link.icon) ? /* @__PURE__ */ jsx108(Icon, { size: iconSize, tone: iconTone, children: link.icon }) : /* @__PURE__ */ jsx108(
9257
+ Icon,
9258
+ {
9259
+ size: iconSize,
9260
+ tone: iconTone,
9261
+ icon: link.icon
9262
+ }
9263
+ ) : link.label
9264
+ }
9265
+ ) }, link.href)) }) })
9266
+ );
9267
+ SocialLinks.displayName = "SocialLinks";
9268
+
9269
+ // src/components/figure/Figure.tsx
9270
+ import * as React108 from "react";
9271
+ import { jsx as jsx109, jsxs as jsxs78 } from "react/jsx-runtime";
9272
+ var Figure = React108.forwardRef(
9273
+ ({ className, caption, credit, align = "left", children, ...props }, ref) => /* @__PURE__ */ jsxs78("figure", { ref, className: cn("m-0", className), ...props, children: [
9274
+ children,
9275
+ (caption || credit) && /* @__PURE__ */ jsxs78(
9276
+ "figcaption",
9277
+ {
9278
+ className: cn(
9279
+ "mt-2 text-xs text-muted-foreground",
9280
+ align === "center" && "text-center"
9281
+ ),
9282
+ children: [
9283
+ caption,
9284
+ credit && /* @__PURE__ */ jsx109("span", { className: "mt-0.5 block text-muted-foreground/80", children: credit })
9285
+ ]
9286
+ }
9287
+ )
9288
+ ] })
9289
+ );
9290
+ Figure.displayName = "Figure";
9291
+
9292
+ // src/components/media/Media.tsx
9293
+ import * as React109 from "react";
9294
+ import { jsx as jsx110 } from "react/jsx-runtime";
9295
+ var aspectClasses2 = {
9296
+ video: "aspect-video",
9297
+ square: "aspect-square",
9298
+ wide: "aspect-[2/1]"
9299
+ };
9300
+ var Media = React109.forwardRef(
9301
+ ({
9302
+ className,
9303
+ aspect = "video",
9304
+ src,
9305
+ alt = "",
9306
+ sizes,
9307
+ priority = false,
9308
+ fallback,
9309
+ caption,
9310
+ credit,
9311
+ align,
9312
+ children,
9313
+ ...props
9314
+ }, ref) => {
9315
+ const preset = aspectClasses2[aspect];
9316
+ const aspectStyle = preset === void 0 && typeof aspect === "string" ? { aspectRatio: aspect } : void 0;
9317
+ return /* @__PURE__ */ jsx110(
9318
+ Figure,
9319
+ {
9320
+ ref,
9321
+ caption,
9322
+ credit,
9323
+ align,
9324
+ className,
9325
+ ...props,
9326
+ children: /* @__PURE__ */ jsx110(
9327
+ "div",
9328
+ {
9329
+ className: cn("relative overflow-hidden rounded-lg bg-muted", preset),
9330
+ style: aspectStyle,
9331
+ children: src ? /* @__PURE__ */ jsx110(
9332
+ Image2,
9333
+ {
9334
+ src,
9335
+ alt,
9336
+ priority,
9337
+ sizes,
9338
+ fallback,
9339
+ className: "h-full w-full object-cover"
9340
+ }
9341
+ ) : children ?? fallback
9342
+ }
9343
+ )
9344
+ }
9345
+ );
9346
+ }
9347
+ );
9348
+ Media.displayName = "Media";
8905
9349
  export {
8906
9350
  Accordion,
8907
9351
  AccordionContent,
@@ -8962,6 +9406,7 @@ export {
8962
9406
  FeatureGrid,
8963
9407
  FeatureRow,
8964
9408
  Fieldset,
9409
+ Figure,
8965
9410
  FileUpload,
8966
9411
  FilterBar,
8967
9412
  FilterChips,
@@ -8975,6 +9420,9 @@ export {
8975
9420
  GridItem,
8976
9421
  Heading,
8977
9422
  Hero,
9423
+ Icon,
9424
+ IconButton,
9425
+ IconTile,
8978
9426
  Image2 as Image,
8979
9427
  Input,
8980
9428
  InputGroup,
@@ -8987,6 +9435,7 @@ export {
8987
9435
  ListToolbar,
8988
9436
  LoadMore,
8989
9437
  LogoCloud,
9438
+ Media,
8990
9439
  MediaCard,
8991
9440
  Menu,
8992
9441
  MenuContent,
@@ -9026,6 +9475,7 @@ export {
9026
9475
  SiteFooter,
9027
9476
  SiteHeader,
9028
9477
  Skeleton,
9478
+ SocialLinks,
9029
9479
  Spinner,
9030
9480
  StatBand,
9031
9481
  Stepper,
@@ -9059,6 +9509,8 @@ export {
9059
9509
  buttonVariants,
9060
9510
  cn,
9061
9511
  documentHead,
9512
+ iconTileVariants,
9513
+ iconVariants,
9062
9514
  isComponentManifest,
9063
9515
  resolveGap,
9064
9516
  separatorVariants,