@skdx/docs-kit 0.35.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 (505) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -0
  3. package/dist/component-aliases.json +12 -0
  4. package/dist/data/THIRD-PARTY-NOTICES.md +21 -0
  5. package/dist/data/angular-inputs.json +1 -0
  6. package/dist/data/api-manifest.json +1 -0
  7. package/dist/data/exports-by-framework.json +1 -0
  8. package/dist/data/honoured-slots.json +1 -0
  9. package/dist/data/styling-hooks-manifest.json +10331 -0
  10. package/dist/frameworks.mjs +64 -0
  11. package/dist/shared/contracts/accordion.d.ts +3 -0
  12. package/dist/shared/contracts/accordion.js +1 -0
  13. package/dist/shared/contracts/alert.d.ts +3 -0
  14. package/dist/shared/contracts/alert.js +1 -0
  15. package/dist/shared/contracts/angle-slider.d.ts +3 -0
  16. package/dist/shared/contracts/angle-slider.js +1 -0
  17. package/dist/shared/contracts/aspect-ratio.d.ts +3 -0
  18. package/dist/shared/contracts/aspect-ratio.js +1 -0
  19. package/dist/shared/contracts/autocomplete.d.ts +3 -0
  20. package/dist/shared/contracts/autocomplete.js +1 -0
  21. package/dist/shared/contracts/avatar.d.ts +3 -0
  22. package/dist/shared/contracts/avatar.js +1 -0
  23. package/dist/shared/contracts/badge.d.ts +3 -0
  24. package/dist/shared/contracts/badge.js +1 -0
  25. package/dist/shared/contracts/box.d.ts +3 -0
  26. package/dist/shared/contracts/box.js +1 -0
  27. package/dist/shared/contracts/breadcrumb.d.ts +3 -0
  28. package/dist/shared/contracts/breadcrumb.js +1 -0
  29. package/dist/shared/contracts/button.d.ts +3 -0
  30. package/dist/shared/contracts/button.js +1 -0
  31. package/dist/shared/contracts/calendar.d.ts +5 -0
  32. package/dist/shared/contracts/calendar.js +1 -0
  33. package/dist/shared/contracts/card.d.ts +3 -0
  34. package/dist/shared/contracts/card.js +1 -0
  35. package/dist/shared/contracts/carousel.d.ts +3 -0
  36. package/dist/shared/contracts/carousel.js +1 -0
  37. package/dist/shared/contracts/change-reason.d.ts +29 -0
  38. package/dist/shared/contracts/change-reason.js +1 -0
  39. package/dist/shared/contracts/chat-composer.d.ts +3 -0
  40. package/dist/shared/contracts/chat-composer.js +1 -0
  41. package/dist/shared/contracts/chat-message.d.ts +3 -0
  42. package/dist/shared/contracts/chat-message.js +1 -0
  43. package/dist/shared/contracts/checkbox-card.d.ts +3 -0
  44. package/dist/shared/contracts/checkbox-card.js +1 -0
  45. package/dist/shared/contracts/checkbox-group.d.ts +3 -0
  46. package/dist/shared/contracts/checkbox-group.js +1 -0
  47. package/dist/shared/contracts/checkbox.d.ts +3 -0
  48. package/dist/shared/contracts/checkbox.js +1 -0
  49. package/dist/shared/contracts/clipboard.d.ts +3 -0
  50. package/dist/shared/contracts/clipboard.js +1 -0
  51. package/dist/shared/contracts/collapsible.d.ts +3 -0
  52. package/dist/shared/contracts/collapsible.js +1 -0
  53. package/dist/shared/contracts/color-picker.d.ts +3 -0
  54. package/dist/shared/contracts/color-picker.js +1 -0
  55. package/dist/shared/contracts/combobox.d.ts +3 -0
  56. package/dist/shared/contracts/combobox.js +1 -0
  57. package/dist/shared/contracts/command.d.ts +3 -0
  58. package/dist/shared/contracts/command.js +1 -0
  59. package/dist/shared/contracts/comment-thread.d.ts +3 -0
  60. package/dist/shared/contracts/comment-thread.js +1 -0
  61. package/dist/shared/contracts/comment.d.ts +3 -0
  62. package/dist/shared/contracts/comment.js +1 -0
  63. package/dist/shared/contracts/confirm-dialog.d.ts +3 -0
  64. package/dist/shared/contracts/confirm-dialog.js +1 -0
  65. package/dist/shared/contracts/conversation-list.d.ts +3 -0
  66. package/dist/shared/contracts/conversation-list.js +1 -0
  67. package/dist/shared/contracts/dashboard-layout.d.ts +3 -0
  68. package/dist/shared/contracts/dashboard-layout.js +1 -0
  69. package/dist/shared/contracts/date-field.d.ts +3 -0
  70. package/dist/shared/contracts/date-field.js +1 -0
  71. package/dist/shared/contracts/date-picker.d.ts +3 -0
  72. package/dist/shared/contracts/date-picker.js +1 -0
  73. package/dist/shared/contracts/date-value.d.ts +11 -0
  74. package/dist/shared/contracts/date-value.js +1 -0
  75. package/dist/shared/contracts/dialog.d.ts +3 -0
  76. package/dist/shared/contracts/dialog.js +1 -0
  77. package/dist/shared/contracts/divider.d.ts +5 -0
  78. package/dist/shared/contracts/divider.js +1 -0
  79. package/dist/shared/contracts/drawer.d.ts +3 -0
  80. package/dist/shared/contracts/drawer.js +1 -0
  81. package/dist/shared/contracts/editable.d.ts +3 -0
  82. package/dist/shared/contracts/editable.js +1 -0
  83. package/dist/shared/contracts/empty-state.d.ts +3 -0
  84. package/dist/shared/contracts/empty-state.js +1 -0
  85. package/dist/shared/contracts/field.d.ts +3 -0
  86. package/dist/shared/contracts/field.js +1 -0
  87. package/dist/shared/contracts/file-upload.d.ts +3 -0
  88. package/dist/shared/contracts/file-upload.js +1 -0
  89. package/dist/shared/contracts/filter-bar.d.ts +3 -0
  90. package/dist/shared/contracts/filter-bar.js +1 -0
  91. package/dist/shared/contracts/floating-panel.d.ts +3 -0
  92. package/dist/shared/contracts/floating-panel.js +1 -0
  93. package/dist/shared/contracts/forgot-password-page.d.ts +3 -0
  94. package/dist/shared/contracts/forgot-password-page.js +1 -0
  95. package/dist/shared/contracts/form-property.d.ts +3 -0
  96. package/dist/shared/contracts/form-property.js +1 -0
  97. package/dist/shared/contracts/form-section.d.ts +3 -0
  98. package/dist/shared/contracts/form-section.js +1 -0
  99. package/dist/shared/contracts/form-validity.d.ts +7 -0
  100. package/dist/shared/contracts/form-validity.js +1 -0
  101. package/dist/shared/contracts/form.d.ts +3 -0
  102. package/dist/shared/contracts/form.js +1 -0
  103. package/dist/shared/contracts/heading.d.ts +3 -0
  104. package/dist/shared/contracts/heading.js +1 -0
  105. package/dist/shared/contracts/image.d.ts +3 -0
  106. package/dist/shared/contracts/image.js +1 -0
  107. package/dist/shared/contracts/index.d.ts +8 -0
  108. package/dist/shared/contracts/index.js +1 -0
  109. package/dist/shared/contracts/kbd.d.ts +3 -0
  110. package/dist/shared/contracts/kbd.js +1 -0
  111. package/dist/shared/contracts/label.d.ts +3 -0
  112. package/dist/shared/contracts/label.js +1 -0
  113. package/dist/shared/contracts/link.d.ts +3 -0
  114. package/dist/shared/contracts/link.js +1 -0
  115. package/dist/shared/contracts/list.d.ts +3 -0
  116. package/dist/shared/contracts/list.js +1 -0
  117. package/dist/shared/contracts/listbox.d.ts +3 -0
  118. package/dist/shared/contracts/listbox.js +1 -0
  119. package/dist/shared/contracts/loading-overlay.d.ts +3 -0
  120. package/dist/shared/contracts/loading-overlay.js +1 -0
  121. package/dist/shared/contracts/member-id.d.ts +18 -0
  122. package/dist/shared/contracts/member-id.js +1 -0
  123. package/dist/shared/contracts/mentions.d.ts +3 -0
  124. package/dist/shared/contracts/mentions.js +1 -0
  125. package/dist/shared/contracts/menu.d.ts +3 -0
  126. package/dist/shared/contracts/menu.js +1 -0
  127. package/dist/shared/contracts/menubar.d.ts +3 -0
  128. package/dist/shared/contracts/menubar.js +1 -0
  129. package/dist/shared/contracts/navigation-menu.d.ts +6 -0
  130. package/dist/shared/contracts/navigation-menu.js +1 -0
  131. package/dist/shared/contracts/notification-center.d.ts +3 -0
  132. package/dist/shared/contracts/notification-center.js +1 -0
  133. package/dist/shared/contracts/number-field.d.ts +5 -0
  134. package/dist/shared/contracts/number-field.js +1 -0
  135. package/dist/shared/contracts/onboarding-checklist.d.ts +3 -0
  136. package/dist/shared/contracts/onboarding-checklist.js +1 -0
  137. package/dist/shared/contracts/overlay-parts.d.ts +73 -0
  138. package/dist/shared/contracts/overlay-parts.js +1 -0
  139. package/dist/shared/contracts/page-container.d.ts +3 -0
  140. package/dist/shared/contracts/page-container.js +1 -0
  141. package/dist/shared/contracts/pagination.d.ts +5 -0
  142. package/dist/shared/contracts/pagination.js +1 -0
  143. package/dist/shared/contracts/password-input.d.ts +6 -0
  144. package/dist/shared/contracts/password-input.js +1 -0
  145. package/dist/shared/contracts/pin-input.d.ts +6 -0
  146. package/dist/shared/contracts/pin-input.js +1 -0
  147. package/dist/shared/contracts/polymorphic.d.ts +6 -0
  148. package/dist/shared/contracts/polymorphic.js +1 -0
  149. package/dist/shared/contracts/popover.d.ts +7 -0
  150. package/dist/shared/contracts/popover.js +1 -0
  151. package/dist/shared/contracts/progress.d.ts +6 -0
  152. package/dist/shared/contracts/progress.js +1 -0
  153. package/dist/shared/contracts/qr-code.d.ts +5 -0
  154. package/dist/shared/contracts/qr-code.js +1 -0
  155. package/dist/shared/contracts/radio-card.d.ts +6 -0
  156. package/dist/shared/contracts/radio-card.js +1 -0
  157. package/dist/shared/contracts/radio-group.d.ts +6 -0
  158. package/dist/shared/contracts/radio-group.js +1 -0
  159. package/dist/shared/contracts/rating.d.ts +6 -0
  160. package/dist/shared/contracts/rating.js +1 -0
  161. package/dist/shared/contracts/reset-password-page.d.ts +3 -0
  162. package/dist/shared/contracts/reset-password-page.js +1 -0
  163. package/dist/shared/contracts/resizable.d.ts +7 -0
  164. package/dist/shared/contracts/resizable.js +1 -0
  165. package/dist/shared/contracts/rules.d.ts +11 -0
  166. package/dist/shared/contracts/rules.js +1 -0
  167. package/dist/shared/contracts/scroll-area.d.ts +6 -0
  168. package/dist/shared/contracts/scroll-area.js +1 -0
  169. package/dist/shared/contracts/select.d.ts +5 -0
  170. package/dist/shared/contracts/select.js +1 -0
  171. package/dist/shared/contracts/selection-value.d.ts +20 -0
  172. package/dist/shared/contracts/selection-value.js +1 -0
  173. package/dist/shared/contracts/sign-in-page.d.ts +3 -0
  174. package/dist/shared/contracts/sign-in-page.js +1 -0
  175. package/dist/shared/contracts/sign-up-page.d.ts +3 -0
  176. package/dist/shared/contracts/sign-up-page.js +1 -0
  177. package/dist/shared/contracts/skeleton.d.ts +5 -0
  178. package/dist/shared/contracts/skeleton.js +1 -0
  179. package/dist/shared/contracts/slider.d.ts +7 -0
  180. package/dist/shared/contracts/slider.js +1 -0
  181. package/dist/shared/contracts/speed-dial.d.ts +6 -0
  182. package/dist/shared/contracts/speed-dial.js +1 -0
  183. package/dist/shared/contracts/spinner.d.ts +6 -0
  184. package/dist/shared/contracts/spinner.js +1 -0
  185. package/dist/shared/contracts/split-button.d.ts +6 -0
  186. package/dist/shared/contracts/split-button.js +1 -0
  187. package/dist/shared/contracts/stat-card.d.ts +3 -0
  188. package/dist/shared/contracts/stat-card.js +1 -0
  189. package/dist/shared/contracts/stepper.d.ts +6 -0
  190. package/dist/shared/contracts/stepper.js +1 -0
  191. package/dist/shared/contracts/styling-hooks.d.ts +8 -0
  192. package/dist/shared/contracts/styling-hooks.js +1 -0
  193. package/dist/shared/contracts/switch.d.ts +6 -0
  194. package/dist/shared/contracts/switch.js +1 -0
  195. package/dist/shared/contracts/table.d.ts +7 -0
  196. package/dist/shared/contracts/table.js +1 -0
  197. package/dist/shared/contracts/tabs.d.ts +5 -0
  198. package/dist/shared/contracts/tabs.js +1 -0
  199. package/dist/shared/contracts/tag-group.d.ts +7 -0
  200. package/dist/shared/contracts/tag-group.js +1 -0
  201. package/dist/shared/contracts/tags-input.d.ts +8 -0
  202. package/dist/shared/contracts/tags-input.js +1 -0
  203. package/dist/shared/contracts/text-field.d.ts +6 -0
  204. package/dist/shared/contracts/text-field.js +1 -0
  205. package/dist/shared/contracts/text.d.ts +6 -0
  206. package/dist/shared/contracts/text.js +1 -0
  207. package/dist/shared/contracts/textarea.d.ts +5 -0
  208. package/dist/shared/contracts/textarea.js +1 -0
  209. package/dist/shared/contracts/time-field.d.ts +5 -0
  210. package/dist/shared/contracts/time-field.js +1 -0
  211. package/dist/shared/contracts/time.d.ts +6 -0
  212. package/dist/shared/contracts/time.js +1 -0
  213. package/dist/shared/contracts/timeline.d.ts +5 -0
  214. package/dist/shared/contracts/timeline.js +1 -0
  215. package/dist/shared/contracts/toast.d.ts +6 -0
  216. package/dist/shared/contracts/toast.js +1 -0
  217. package/dist/shared/contracts/toggle-group.d.ts +6 -0
  218. package/dist/shared/contracts/toggle-group.js +1 -0
  219. package/dist/shared/contracts/toggle.d.ts +5 -0
  220. package/dist/shared/contracts/toggle.js +1 -0
  221. package/dist/shared/contracts/toolbar.d.ts +3 -0
  222. package/dist/shared/contracts/toolbar.js +1 -0
  223. package/dist/shared/contracts/tour.d.ts +5 -0
  224. package/dist/shared/contracts/tour.js +1 -0
  225. package/dist/shared/contracts/transfer.d.ts +6 -0
  226. package/dist/shared/contracts/transfer.js +1 -0
  227. package/dist/shared/contracts/tree-select.d.ts +6 -0
  228. package/dist/shared/contracts/tree-select.js +1 -0
  229. package/dist/shared/contracts/tree.d.ts +6 -0
  230. package/dist/shared/contracts/tree.js +1 -0
  231. package/dist/shared/contracts/types.d.ts +230 -0
  232. package/dist/shared/contracts/types.js +1 -0
  233. package/dist/shared/contracts/usage-card.d.ts +3 -0
  234. package/dist/shared/contracts/usage-card.js +1 -0
  235. package/dist/shared/contracts/user-menu.d.ts +3 -0
  236. package/dist/shared/contracts/user-menu.js +1 -0
  237. package/dist/shared/contracts/verification-page.d.ts +3 -0
  238. package/dist/shared/contracts/verification-page.js +1 -0
  239. package/dist/shared/contracts/workspace-switcher.d.ts +3 -0
  240. package/dist/shared/contracts/workspace-switcher.js +1 -0
  241. package/dist/shared/core/announcer.d.ts +17 -0
  242. package/dist/shared/core/announcer.js +1 -0
  243. package/dist/shared/core/appearance.d.ts +14 -0
  244. package/dist/shared/core/appearance.js +1 -0
  245. package/dist/shared/core/arrow-keys.d.ts +7 -0
  246. package/dist/shared/core/arrow-keys.js +1 -0
  247. package/dist/shared/core/calendar-locale.d.ts +35 -0
  248. package/dist/shared/core/calendar-locale.js +1 -0
  249. package/dist/shared/core/color.d.ts +80 -0
  250. package/dist/shared/core/color.js +1 -0
  251. package/dist/shared/core/controllable.d.ts +42 -0
  252. package/dist/shared/core/controllable.js +1 -0
  253. package/dist/shared/core/csv.d.ts +43 -0
  254. package/dist/shared/core/csv.js +2 -0
  255. package/dist/shared/core/date-segments.d.ts +223 -0
  256. package/dist/shared/core/date-segments.js +1 -0
  257. package/dist/shared/core/date-value.d.ts +57 -0
  258. package/dist/shared/core/date-value.js +1 -0
  259. package/dist/shared/core/dev-mode.d.ts +12 -0
  260. package/dist/shared/core/dev-mode.js +1 -0
  261. package/dist/shared/core/dialogs.d.ts +96 -0
  262. package/dist/shared/core/dialogs.js +1 -0
  263. package/dist/shared/core/dismissal.d.ts +56 -0
  264. package/dist/shared/core/dismissal.js +1 -0
  265. package/dist/shared/core/field-core.d.ts +250 -0
  266. package/dist/shared/core/field-core.js +1 -0
  267. package/dist/shared/core/focus-targets.d.ts +77 -0
  268. package/dist/shared/core/focus-targets.js +1 -0
  269. package/dist/shared/core/format-file-size.d.ts +9 -0
  270. package/dist/shared/core/format-file-size.js +1 -0
  271. package/dist/shared/core/glyph-data.d.ts +13 -0
  272. package/dist/shared/core/glyph-data.js +1 -0
  273. package/dist/shared/core/measure-auto-resize.d.ts +5 -0
  274. package/dist/shared/core/measure-auto-resize.js +1 -0
  275. package/dist/shared/core/media-query.d.ts +7 -0
  276. package/dist/shared/core/media-query.js +1 -0
  277. package/dist/shared/core/mentions.d.ts +116 -0
  278. package/dist/shared/core/mentions.js +2 -0
  279. package/dist/shared/core/pin-chars.d.ts +13 -0
  280. package/dist/shared/core/pin-chars.js +1 -0
  281. package/dist/shared/core/placement.d.ts +102 -0
  282. package/dist/shared/core/placement.js +1 -0
  283. package/dist/shared/core/qr-encoder.d.ts +33 -0
  284. package/dist/shared/core/qr-encoder.js +1 -0
  285. package/dist/shared/core/roving-tab-stop.d.ts +37 -0
  286. package/dist/shared/core/roving-tab-stop.js +1 -0
  287. package/dist/shared/core/select-keyboard.d.ts +80 -0
  288. package/dist/shared/core/select-keyboard.js +1 -0
  289. package/dist/shared/core/selection.d.ts +58 -0
  290. package/dist/shared/core/selection.js +1 -0
  291. package/dist/shared/core/tabbable.d.ts +8 -0
  292. package/dist/shared/core/tabbable.js +1 -0
  293. package/dist/shared/core/timer.d.ts +82 -0
  294. package/dist/shared/core/timer.js +1 -0
  295. package/dist/shared/core/tree-columns.d.ts +48 -0
  296. package/dist/shared/core/tree-columns.js +1 -0
  297. package/dist/shared/core/typeahead.d.ts +27 -0
  298. package/dist/shared/core/typeahead.js +1 -0
  299. package/dist/shared/index.d.ts +113 -0
  300. package/dist/shared/index.js +1 -0
  301. package/dist/skins-src/_foundation-fallback.css +124 -0
  302. package/dist/skins-src/base.css +328 -0
  303. package/dist/skins-src/components/_actuator.css +203 -0
  304. package/dist/skins-src/components/_arrow.css +20 -0
  305. package/dist/skins-src/components/_card-control.css +27 -0
  306. package/dist/skins-src/components/_collection.css +281 -0
  307. package/dist/skins-src/components/_hit-target.css +28 -0
  308. package/dist/skins-src/components/_overlay.css +214 -0
  309. package/dist/skins-src/components/_status.css +38 -0
  310. package/dist/skins-src/components/_trigger.css +85 -0
  311. package/dist/skins-src/components/accordion.css +85 -0
  312. package/dist/skins-src/components/alert.css +118 -0
  313. package/dist/skins-src/components/angle-slider.css +110 -0
  314. package/dist/skins-src/components/aspect-ratio.css +26 -0
  315. package/dist/skins-src/components/autocomplete.css +112 -0
  316. package/dist/skins-src/components/avatar.css +87 -0
  317. package/dist/skins-src/components/badge.css +164 -0
  318. package/dist/skins-src/components/box.css +9 -0
  319. package/dist/skins-src/components/breadcrumb.css +78 -0
  320. package/dist/skins-src/components/button.css +304 -0
  321. package/dist/skins-src/components/calendar.css +269 -0
  322. package/dist/skins-src/components/card.css +116 -0
  323. package/dist/skins-src/components/carousel.css +192 -0
  324. package/dist/skins-src/components/chat-composer.css +89 -0
  325. package/dist/skins-src/components/chat-message.css +98 -0
  326. package/dist/skins-src/components/checkbox-card.css +153 -0
  327. package/dist/skins-src/components/checkbox-group.css +72 -0
  328. package/dist/skins-src/components/checkbox.css +141 -0
  329. package/dist/skins-src/components/clipboard.css +126 -0
  330. package/dist/skins-src/components/collapsible.css +64 -0
  331. package/dist/skins-src/components/color-picker.css +304 -0
  332. package/dist/skins-src/components/combobox.css +111 -0
  333. package/dist/skins-src/components/command.css +73 -0
  334. package/dist/skins-src/components/comment-thread.css +56 -0
  335. package/dist/skins-src/components/comment.css +59 -0
  336. package/dist/skins-src/components/confirm-dialog.css +43 -0
  337. package/dist/skins-src/components/conversation-list.css +142 -0
  338. package/dist/skins-src/components/dashboard-layout.css +106 -0
  339. package/dist/skins-src/components/date-field.css +95 -0
  340. package/dist/skins-src/components/date-picker.css +79 -0
  341. package/dist/skins-src/components/dialog.css +161 -0
  342. package/dist/skins-src/components/divider.css +64 -0
  343. package/dist/skins-src/components/drawer.css +166 -0
  344. package/dist/skins-src/components/editable.css +121 -0
  345. package/dist/skins-src/components/empty-state.css +85 -0
  346. package/dist/skins-src/components/field.css +104 -0
  347. package/dist/skins-src/components/file-upload.css +164 -0
  348. package/dist/skins-src/components/filter-bar.css +48 -0
  349. package/dist/skins-src/components/floating-panel.css +168 -0
  350. package/dist/skins-src/components/forgot-password-page.css +45 -0
  351. package/dist/skins-src/components/form-section.css +75 -0
  352. package/dist/skins-src/components/form.css +115 -0
  353. package/dist/skins-src/components/heading.css +38 -0
  354. package/dist/skins-src/components/image.css +43 -0
  355. package/dist/skins-src/components/kbd.css +76 -0
  356. package/dist/skins-src/components/label.css +45 -0
  357. package/dist/skins-src/components/link.css +72 -0
  358. package/dist/skins-src/components/list.css +104 -0
  359. package/dist/skins-src/components/listbox.css +90 -0
  360. package/dist/skins-src/components/loading-overlay.css +89 -0
  361. package/dist/skins-src/components/mentions.css +79 -0
  362. package/dist/skins-src/components/menu.css +102 -0
  363. package/dist/skins-src/components/menubar.css +130 -0
  364. package/dist/skins-src/components/navigation-menu.css +145 -0
  365. package/dist/skins-src/components/notification-center.css +139 -0
  366. package/dist/skins-src/components/number-field.css +95 -0
  367. package/dist/skins-src/components/onboarding-checklist.css +156 -0
  368. package/dist/skins-src/components/page-container.css +29 -0
  369. package/dist/skins-src/components/pagination.css +147 -0
  370. package/dist/skins-src/components/password-input.css +116 -0
  371. package/dist/skins-src/components/pin-input.css +115 -0
  372. package/dist/skins-src/components/popover.css +108 -0
  373. package/dist/skins-src/components/progress.css +207 -0
  374. package/dist/skins-src/components/qr-code.css +62 -0
  375. package/dist/skins-src/components/radio-card.css +158 -0
  376. package/dist/skins-src/components/radio-group.css +148 -0
  377. package/dist/skins-src/components/rating.css +150 -0
  378. package/dist/skins-src/components/reset-password-page.css +51 -0
  379. package/dist/skins-src/components/resizable.css +131 -0
  380. package/dist/skins-src/components/scroll-area.css +101 -0
  381. package/dist/skins-src/components/select.css +239 -0
  382. package/dist/skins-src/components/sign-in-page.css +47 -0
  383. package/dist/skins-src/components/sign-up-page.css +55 -0
  384. package/dist/skins-src/components/skeleton.css +55 -0
  385. package/dist/skins-src/components/skip-link.css +51 -0
  386. package/dist/skins-src/components/slider.css +164 -0
  387. package/dist/skins-src/components/speed-dial.css +162 -0
  388. package/dist/skins-src/components/spinner.css +59 -0
  389. package/dist/skins-src/components/split-button.css +167 -0
  390. package/dist/skins-src/components/stat-card.css +117 -0
  391. package/dist/skins-src/components/stepper.css +153 -0
  392. package/dist/skins-src/components/switch.css +155 -0
  393. package/dist/skins-src/components/table.css +336 -0
  394. package/dist/skins-src/components/tabs.css +116 -0
  395. package/dist/skins-src/components/tag-group.css +72 -0
  396. package/dist/skins-src/components/tags-input.css +176 -0
  397. package/dist/skins-src/components/text-field.css +182 -0
  398. package/dist/skins-src/components/text.css +83 -0
  399. package/dist/skins-src/components/textarea.css +118 -0
  400. package/dist/skins-src/components/time-field.css +43 -0
  401. package/dist/skins-src/components/time.css +13 -0
  402. package/dist/skins-src/components/timeline.css +206 -0
  403. package/dist/skins-src/components/toast.css +133 -0
  404. package/dist/skins-src/components/toggle-group.css +185 -0
  405. package/dist/skins-src/components/toggle.css +89 -0
  406. package/dist/skins-src/components/toolbar.css +84 -0
  407. package/dist/skins-src/components/tour.css +67 -0
  408. package/dist/skins-src/components/transfer.css +112 -0
  409. package/dist/skins-src/components/tree-select.css +124 -0
  410. package/dist/skins-src/components/tree.css +110 -0
  411. package/dist/skins-src/components/usage-card.css +129 -0
  412. package/dist/skins-src/components/user-menu.css +83 -0
  413. package/dist/skins-src/components/verification-page.css +64 -0
  414. package/dist/skins-src/components/workspace-switcher.css +133 -0
  415. package/dist/skins-src/utilities.css +130 -0
  416. package/dist/skins-src/web-components.css +64 -0
  417. package/dist/strip-paint.d.mts +7 -0
  418. package/dist/strip-paint.mjs +131 -0
  419. package/dist/themes/AntDark.md +14 -0
  420. package/dist/themes/AntDark.ts +47 -0
  421. package/dist/themes/AntLight.md +21 -0
  422. package/dist/themes/AntLight.ts +95 -0
  423. package/dist/themes/CatppuccinLatte.md +20 -0
  424. package/dist/themes/CatppuccinLatte.ts +93 -0
  425. package/dist/themes/CatppuccinMocha.md +15 -0
  426. package/dist/themes/CatppuccinMocha.ts +93 -0
  427. package/dist/themes/ChakraDark.md +8 -0
  428. package/dist/themes/ChakraDark.ts +47 -0
  429. package/dist/themes/ChakraLight.md +14 -0
  430. package/dist/themes/ChakraLight.ts +93 -0
  431. package/dist/themes/Contrast.test.ts +80 -0
  432. package/dist/themes/CupcakeDark.md +8 -0
  433. package/dist/themes/CupcakeDark.ts +39 -0
  434. package/dist/themes/CupcakeLight.md +31 -0
  435. package/dist/themes/CupcakeLight.ts +93 -0
  436. package/dist/themes/DefaultTheme.md +8 -0
  437. package/dist/themes/DefaultTheme.test.ts +96 -0
  438. package/dist/themes/DefaultTheme.ts +137 -0
  439. package/dist/themes/DraculaDark.md +14 -0
  440. package/dist/themes/DraculaDark.ts +93 -0
  441. package/dist/themes/DraculaLight.md +8 -0
  442. package/dist/themes/DraculaLight.ts +55 -0
  443. package/dist/themes/EmeraldDark.md +8 -0
  444. package/dist/themes/EmeraldDark.ts +35 -0
  445. package/dist/themes/EmeraldLight.md +8 -0
  446. package/dist/themes/EmeraldLight.ts +93 -0
  447. package/dist/themes/EverforestDark.md +26 -0
  448. package/dist/themes/EverforestDark.ts +99 -0
  449. package/dist/themes/EverforestLight.md +31 -0
  450. package/dist/themes/EverforestLight.ts +51 -0
  451. package/dist/themes/FluentDark.md +8 -0
  452. package/dist/themes/FluentDark.ts +47 -0
  453. package/dist/themes/FluentLight.md +8 -0
  454. package/dist/themes/FluentLight.ts +100 -0
  455. package/dist/themes/GraphiteDark.md +8 -0
  456. package/dist/themes/GraphiteDark.ts +35 -0
  457. package/dist/themes/GraphiteLight.md +14 -0
  458. package/dist/themes/GraphiteLight.ts +93 -0
  459. package/dist/themes/GruvboxDark.md +14 -0
  460. package/dist/themes/GruvboxDark.ts +93 -0
  461. package/dist/themes/GruvboxLight.md +27 -0
  462. package/dist/themes/GruvboxLight.ts +49 -0
  463. package/dist/themes/MaterialDark.md +8 -0
  464. package/dist/themes/MaterialDark.ts +47 -0
  465. package/dist/themes/MaterialLight.md +8 -0
  466. package/dist/themes/MaterialLight.ts +104 -0
  467. package/dist/themes/MidnightDark.md +8 -0
  468. package/dist/themes/MidnightDark.ts +19 -0
  469. package/dist/themes/MidnightLight.md +8 -0
  470. package/dist/themes/MidnightLight.ts +23 -0
  471. package/dist/themes/NordDark.md +28 -0
  472. package/dist/themes/NordDark.ts +93 -0
  473. package/dist/themes/NordLight.md +20 -0
  474. package/dist/themes/NordLight.ts +50 -0
  475. package/dist/themes/OneDark.md +26 -0
  476. package/dist/themes/OneDark.ts +93 -0
  477. package/dist/themes/OneLight.md +20 -0
  478. package/dist/themes/OneLight.ts +51 -0
  479. package/dist/themes/PrimerDark.md +26 -0
  480. package/dist/themes/PrimerDark.ts +99 -0
  481. package/dist/themes/PrimerLight.md +14 -0
  482. package/dist/themes/PrimerLight.ts +93 -0
  483. package/dist/themes/RosePine.md +23 -0
  484. package/dist/themes/RosePine.ts +93 -0
  485. package/dist/themes/RosePineDawn.md +20 -0
  486. package/dist/themes/RosePineDawn.ts +51 -0
  487. package/dist/themes/SkandaDark.md +8 -0
  488. package/dist/themes/SkandaDark.ts +57 -0
  489. package/dist/themes/SkandaLight.md +8 -0
  490. package/dist/themes/SkandaLight.ts +96 -0
  491. package/dist/themes/SolarizedDark.md +8 -0
  492. package/dist/themes/SolarizedDark.ts +93 -0
  493. package/dist/themes/SolarizedLight.md +32 -0
  494. package/dist/themes/SolarizedLight.ts +93 -0
  495. package/dist/themes/SynthwaveDark.md +8 -0
  496. package/dist/themes/SynthwaveDark.ts +93 -0
  497. package/dist/themes/SynthwaveLight.md +20 -0
  498. package/dist/themes/SynthwaveLight.ts +48 -0
  499. package/dist/themes/Themes.test.ts +110 -0
  500. package/dist/themes/brands.test.ts +63 -0
  501. package/dist/themes/brands.ts +121 -0
  502. package/dist/themes/createBrandTheme.test.ts +223 -0
  503. package/dist/themes/createBrandTheme.ts +298 -0
  504. package/dist/themes/index.ts +54 -0
  505. package/package.json +73 -0
@@ -0,0 +1,223 @@
1
+ /** One editable piece of a segmented date/time value. */
2
+ export type SegmentType = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod';
3
+ /** How far down a segmented field is editable (no 'hour': would duplicate 'minute'). */
4
+ export type Granularity = 'day' | 'minute' | 'second';
5
+ /** Whether hours read `1`–`12` (with an AM/PM segment) or `0`–`23`. */
6
+ export type HourCycle = 12 | 24;
7
+ /** Current numeric value of each editable segment; `null` means "not typed yet". */
8
+ export type SegmentValues = Partial<Record<SegmentType, number | null>>;
9
+ /** One rendered piece of a segmented field — an editable segment or a locale literal. */
10
+ export interface Segment {
11
+ /** The segment this piece edits, or `'literal'` for the text between segments. */
12
+ type: SegmentType | 'literal';
13
+ /** What to render: the padded value, the placeholder, or the literal itself. */
14
+ text: string;
15
+ /** Current numeric value; `null` for literals and for untyped segments. */
16
+ value: number | null;
17
+ /** Lowest accepted value (`0` for literals). */
18
+ min: number;
19
+ /** Highest accepted value (`0` for literals). Dynamic for `day`. */
20
+ max: number;
21
+ /** Whether this segment is still showing its placeholder. */
22
+ isPlaceholder: boolean;
23
+ /** `false` only for literals. */
24
+ isEditable: boolean;
25
+ }
26
+ /** Default placeholder text; unreachable by Intl and untranslatable by locale. */
27
+ export declare const SEGMENT_PLACEHOLDERS: Record<SegmentType, string>;
28
+ /** The `aria-valuetext` an untyped segment announces, so a spinbutton never reads a value the user did not enter. */
29
+ export declare const EMPTY_VALUE_TEXT = "Empty";
30
+ /** Accessible names for each segment type. */
31
+ export declare const SEGMENT_LABELS: Record<SegmentType, string>;
32
+ /** Localization strings for segmented date/time fields. */
33
+ export interface SegmentedLabelProps {
34
+ /**
35
+ * Words the accessible name of each segment type.
36
+ * @default undefined — the built-in English names ('year', 'month', 'AM/PM', …).
37
+ */
38
+ getSegmentLabel?: ((type: SegmentType) => string | undefined) | undefined;
39
+ /**
40
+ * Aria text for untyped segments.
41
+ * @default 'Empty'
42
+ */
43
+ emptySegmentText?: string | undefined;
44
+ /**
45
+ * Words the placeholder for each segment.
46
+ * @default undefined — the built-in English letters ('yyyy', 'mm', 'dd', …).
47
+ */
48
+ getSegmentPlaceholder?: SegmentPlaceholderResolver | undefined;
49
+ }
50
+ /** The runtime's own locale, used whenever `locale` is omitted — matches `calendar-locale`'s `resolveLocale`. */
51
+ export declare function resolveLocale(locale?: string): string;
52
+ /**
53
+ * The hour cycle to render with: the explicit `hourCycle` when given, otherwise
54
+ * whatever the locale resolves to (`h11`/`h12` → `12`, `h23`/`h24` → `24`).
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * resolveHourCycle('en-US'); // 12
59
+ * resolveHourCycle('de-DE'); // 24
60
+ * ```
61
+ */
62
+ export declare function resolveHourCycle(locale?: string, hourCycle?: HourCycle): HourCycle;
63
+ /**
64
+ * The editable segments a field of this kind and granularity owns, in canonical (not locale) order; `dayPeriod` is appended by {@link buildSegments} only when the resolved hour cycle is 12.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * segmentTypesFor('date', 'minute'); // ['year','month','day','hour','minute']
69
+ * segmentTypesFor('time', 'second'); // ['hour','minute','second']
70
+ * ```
71
+ */
72
+ export declare function segmentTypesFor(kind: 'date' | 'time', granularity: Granularity): SegmentType[];
73
+ /** Days in a Gregorian month; `31` while either input is unknown, so `day` stays fully typeable. */
74
+ export declare function daysInMonth(year: number | null | undefined, month: number | null | undefined): number;
75
+ /** The accepted range of one segment, given the values around it. */
76
+ export declare function segmentRange(type: SegmentType, values: SegmentValues, hourCycle: HourCycle): {
77
+ min: number;
78
+ max: number;
79
+ };
80
+ /** The locale's AM and PM names, e.g. `['AM', 'PM']` or `['vorm.', 'nachm.']`. */
81
+ export declare function getDayPeriodNames(locale?: string): [string, string];
82
+ /** Converts a keystroke to day period index (0 AM, 1 PM, null if neither). */
83
+ export declare function dayPeriodFromKey(key: string, locale?: string): number | null;
84
+ /** Words the placeholder of one segment type; return the built-in {@link SEGMENT_PLACEHOLDERS} entry for the types you do not want to change. */
85
+ export type SegmentPlaceholderResolver = (type: SegmentType) => string;
86
+ /**
87
+ * How a segment renders: zero-padded digits, the locale's AM/PM name, or the
88
+ * placeholder.
89
+ *
90
+ * @param shouldForceLeadingZeros `false` renders a one-digit month, day or hour
91
+ * bare — see {@link SEGMENT_PAD_UNFORCED} for why those three and no others.
92
+ */
93
+ export declare function formatSegmentText(type: SegmentType, value: number | null, locale?: string, getSegmentPlaceholder?: SegmentPlaceholderResolver, shouldForceLeadingZeros?: boolean): string;
94
+ /** Options for {@link buildSegments}. */
95
+ export interface BuildSegmentsOptions {
96
+ /** `'date'` adds year/month/day ahead of the time segments. */
97
+ kind: 'date' | 'time';
98
+ /** How far down the field is editable. */
99
+ granularity: Granularity;
100
+ /** BCP-47 locale deciding segment order, literals and AM/PM names. */
101
+ locale?: string | undefined;
102
+ /** Forced hour cycle; omitted means "whatever the locale uses". */
103
+ hourCycle?: HourCycle | undefined;
104
+ /** Current per-segment values. */
105
+ values: SegmentValues;
106
+ /** Words each segment's placeholder; omitted keeps the built-in English letters. */
107
+ getSegmentPlaceholder?: SegmentPlaceholderResolver | undefined;
108
+ /**
109
+ * Whether a one-digit month, day or hour renders zero-padded (`05`) or bare
110
+ * (`5`). Never touches `year`, `minute` or `second`.
111
+ * @default true
112
+ */
113
+ shouldForceLeadingZeros?: boolean | undefined;
114
+ }
115
+ /**
116
+ * The full ordered render list for a segmented field — editable segments
117
+ * interleaved with the locale's literals.
118
+ *
119
+ * @example
120
+ * ```ts
121
+ * buildSegments({ kind: 'date', granularity: 'day', locale: 'en-US', values: {} })
122
+ * .filter((s) => s.isEditable)
123
+ * .map((s) => s.type); // ['month', 'day', 'year']
124
+ * ```
125
+ */
126
+ export declare function buildSegments(options: BuildSegmentsOptions): Segment[];
127
+ /**
128
+ * How many units one Arrow press moves a segment, given the field-level `step` in seconds; drives only the finest rendered segment, falling back to `1` when `step` doesn't fit the grid.
129
+ *
130
+ * @example
131
+ * ```ts
132
+ * segmentStepFor('minute', 'minute', 900); // 15
133
+ * segmentStepFor('hour', 'minute', 900); // 1 — only the finest segment steps
134
+ * ```
135
+ */
136
+ export declare function segmentStepFor(type: SegmentType, granularity: Granularity, step?: number): number;
137
+ /**
138
+ * Stepper one segment by `delta`, wrapping around its range, snapping onto the `step` grid like a native stepper when `step` is past 1.
139
+ * @param step the segment's own step, from {@link segmentStepFor}
140
+ */
141
+ export declare function stepSegment(segment: Segment, delta: number, step?: number): number;
142
+ /** The `aria-valuenow` a segment publishes: its current value pulled back inside its own `aria-valuemin`/`aria-valuemax`, since mid-entry it can legitimately sit below minimum. */
143
+ export declare function segmentValueNow(segment: Segment): number;
144
+ /** The result of typing one digit into a segment. */
145
+ export interface DigitEntry {
146
+ /** The segment's new value. May be below `min` mid-entry (typing `0` then `5` into a month). */
147
+ value: number;
148
+ /** Buffer to carry into the next keystroke on this segment; `0` once entry is complete. */
149
+ buffer: number;
150
+ /** Whether focus should move to the next editable segment. */
151
+ advance: boolean;
152
+ }
153
+ /**
154
+ * Types one digit into a segment: an overflowing keystroke restarts entry at that digit instead of being rejected, and focus advances once no further digit could fit.
155
+ *
156
+ * @param segment the segment being typed into
157
+ * @param buffer what has been typed into it so far (`0` when entry just started)
158
+ * @param digit the digit `0`–`9` just pressed
159
+ *
160
+ * @example
161
+ * ```ts
162
+ * // month, "1" already typed, user presses 5 → 15 overflows, restart at 5
163
+ * typeDigit(monthSegment, 1, 5); // { value: 5, buffer: 0, advance: true }
164
+ * ```
165
+ */
166
+ export declare function typeDigit(segment: Segment, buffer: number, digit: number): DigitEntry;
167
+ /** Whether every editable segment has been typed and sits inside its range. */
168
+ export declare function isComplete(segments: Segment[]): boolean;
169
+ /** Converts a possibly-12-hour `hour` plus `dayPeriod` into the 0-23 hour. */
170
+ export declare function to24Hour(hour: number, dayPeriod: number | null | undefined, hourCycle: HourCycle): number;
171
+ /** Converts a 0-23 hour into the `[hour, dayPeriod]` pair the given cycle renders. */
172
+ export declare function from24Hour(hour: number, hourCycle: HourCycle): [number, number | null];
173
+ /**
174
+ * The `Date` these segment values describe, in local time, or `null` while
175
+ * any date segment is still untyped; unowned time segments default to `0`,
176
+ * like `<input type="date">`.
177
+ */
178
+ export declare function valuesToDate(values: SegmentValues, hourCycle: HourCycle): Date | null;
179
+ /** Splits a `Date` back into segment values for the given hour cycle. */
180
+ export declare function dateToValues(date: Date, hourCycle: HourCycle): SegmentValues;
181
+ /**
182
+ * The `HH:mm` / `HH:mm:ss` string these segment values describe — always 24
183
+ * hour, like `<input type="time">`, regardless of the rendered `hourCycle` —
184
+ * or `null` while hour or minute is untyped.
185
+ */
186
+ export declare function valuesToTimeString(values: SegmentValues, granularity: Granularity, hourCycle: HourCycle): string | null;
187
+ /** Parses `HH:mm[:ss]` (24 hour) into segment values for the given hour cycle. Invalid input yields empty values. */
188
+ export declare function timeStringToValues(time: string, hourCycle: HourCycle): SegmentValues;
189
+ /** The `YYYY-MM-DD` / `YYYY-MM-DDTHH:mm[:ss]` string a segmented date field submits. */
190
+ export declare function dateToFormValue(date: Date, granularity: Granularity): string;
191
+ /**
192
+ * The inverse of {@link dateToFormValue}, built field by field rather than `new Date(string)`, which reads a bare `YYYY-MM-DD` as UTC midnight.
193
+ *
194
+ * @param value a string in the shape {@link dateToFormValue} produces
195
+ * @returns the local date, or `null` when the string is not one of those shapes
196
+ */
197
+ export declare function parseDateFormValue(value: string): Date | null;
198
+ /** Which side of a `min`/`max` bound a value falls outside, or `null` when it is in range. */
199
+ export type RangeViolation = 'underflow' | 'overflow';
200
+ /**
201
+ * Whether a `HH:mm[:ss]` time falls outside `min`/`max`, compared as strings
202
+ * (24-hour times sort chronologically when zero-padded).
203
+ *
204
+ * @param value the field's current wire value, or `null` while incomplete
205
+ * @param min the earliest accepted time, `HH:mm[:ss]`
206
+ * @param max the latest accepted time, `HH:mm[:ss]`
207
+ * @returns which bound was crossed, or `null` when in range
208
+ */
209
+ export declare function timeRangeViolation(value: string | null | undefined, min?: string, max?: string): RangeViolation | null;
210
+ /**
211
+ * Whether an `HH:mm[:ss]` time misses the `step` grid — the `stepMismatch` `<input type="time" step>` raises. Step counts seconds, anchored on `min` or midnight.
212
+ *
213
+ * @param value the field's current wire value, or `null` while incomplete
214
+ * @param step the field's step in seconds; non-positive or non-finite is no constraint
215
+ * @param min the step base — the same `min` the range check uses
216
+ */
217
+ export declare function timeStepMismatch(value: string | null | undefined, step?: number, min?: string): boolean;
218
+ /** Pulls segment values inside `min`/`max` bounds (Home/End only); arrow-stepping and typing deliberately do not clamp so out-of-bounds values stay reachable for validation. */
219
+ export declare function clampValuesToTimeRange(values: SegmentValues, granularity: Granularity, hourCycle: HourCycle, min?: string, max?: string): SegmentValues;
220
+ /** Whether a `Date` falls outside `minDate`/`maxDate`, compared at the field's `granularity` (a `day` field ignores time of day), string-compared via {@link dateToFormValue} to match the native input's behavior. */
221
+ export declare function dateRangeViolation(value: Date | null | undefined, granularity: Granularity, minDate?: Date, maxDate?: Date): RangeViolation | null;
222
+ /** @internal Drops every memoized `Intl` result. */
223
+ export declare function clearDateSegmentCache(): void;
@@ -0,0 +1 @@
1
+ var b={year:"yyyy",month:"mm",day:"dd",hour:"hh",minute:"mm",second:"ss",dayPeriod:"--"},V="Empty",v={year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM"},y={year:4,month:2,day:2,hour:2,minute:2,second:2,dayPeriod:0},x={...y,month:1,day:1,hour:1},T=Date.UTC(2024,0,15,13,45,56),m=new Map,d=new Map;function g(e){return e??new Intl.DateTimeFormat().resolvedOptions().locale}function P(e,n){if(n===12||n===24)return n;let t=new Intl.DateTimeFormat(g(e),{hour:"numeric"}).resolvedOptions(),r=t.hourCycle??(t.hour12?"h12":"h23");return r==="h11"||r==="h12"?12:24}function D(e,n){let t=e==="date"?["year","month","day"]:[];return(e==="time"||n!=="day")&&(t.push("hour","minute"),n==="second"&&t.push("second")),t}function C(e,n){return!e||!n?31:new Date(e,n,0).getDate()}function E(e,n,t){switch(e){case"year":return{min:1,max:9999};case"month":return{min:1,max:12};case"day":return{min:1,max:C(n.year,n.month)};case"hour":return t===12?{min:1,max:12}:{min:0,max:23};case"minute":case"second":return{min:0,max:59};case"dayPeriod":return{min:0,max:1}}}function p(e){let n=g(e),t=d.get(n);if(t)return t;let r=new Intl.DateTimeFormat(n,{hour:"numeric",hourCycle:"h12",timeZone:"UTC"}),o=i=>r.formatToParts(Date.UTC(2024,0,15,i)).find(l=>l.type==="dayPeriod")?.value??(i<12?"AM":"PM"),u=[o(1),o(13)];return d.set(n,u),u}function G(e,n){if([...e].length!==1)return null;let t=e.toLowerCase();if(t==="a")return 0;if(t==="p")return 1;let r=p(n),o=l=>{let a=[...l][0];return a!==void 0&&a.localeCompare(e,n,{sensitivity:"base"})===0},u=o(r[0]),i=o(r[1]);return u&&i?null:u?0:i?1:null}function F(e,n){let t={timeZone:"UTC"};return e.includes("year")&&(t.year="numeric"),e.includes("month")&&(t.month="2-digit"),e.includes("day")&&(t.day="2-digit"),e.includes("hour")&&(t.hour="2-digit",t.hourCycle=n===12?"h12":"h23"),e.includes("minute")&&(t.minute="2-digit"),e.includes("second")&&(t.second="2-digit"),t}function M(e,n,t){let r=`${e}|${n.join(",")}|${t}`,o=m.get(r);if(o)return o;let u=new Intl.DateTimeFormat(e,F(n,t)).formatToParts(T),i=[];for(let l of u)l.type==="literal"?i.push({type:"literal",text:l.value.replace(/[\u202F\u2009\u00A0]/g," "),value:null,min:0,max:0,isPlaceholder:!1,isEditable:!1}):(l.type==="dayPeriod"||n.includes(l.type))&&i.push({type:l.type,text:"",value:null,min:0,max:0,isPlaceholder:!0,isEditable:!0});return m.set(r,i),i}function w(e,n,t,r,o=!0){if(n===null)return r?.(e)??b[e];if(e==="dayPeriod")return p(t)[n===0?0:1];let u=o?y:x;return String(n).padStart(u[e],"0")}function O(e){let n=g(e.locale),t=P(n,e.hourCycle),r=D(e.kind,e.granularity);return M(n,r,t).map(o=>{if(!o.isEditable)return o;let u=o.type,i=e.values[u]??null,{min:l,max:a}=E(u,e.values,t);return{type:u,text:w(u,i,n,e.getSegmentPlaceholder,e.shouldForceLeadingZeros??!0),value:i,min:l,max:a,isPlaceholder:i===null,isEditable:!0}})}function N(e){let n=new Date;switch(e.type){case"year":return n.getFullYear();case"hour":{let t=n.getHours();return e.min!==1?t:t%12===0?12:t%12}case"minute":return n.getMinutes();case"second":return n.getSeconds();case"dayPeriod":return n.getHours()<12?0:1;case"day":case"month":case"literal":return e.min}}function L(e,n,t){let r=n==="second"?"second":"minute",o=n==="second"?1:60;if(e!==r||t===void 0||!Number.isFinite(t)||t<=0||t%o!==0)return 1;let u=t/o;return u<60?u:1}function A(e,n,t=1){let{min:r,max:o}=e;if(e.value===null)return r+Math.floor((N(e)-r)/t)*t;let u=Math.floor((o-r)/t)+1,i=e.value-r,l=(n>0?Math.floor(i/t):Math.ceil(i/t))+n;return r+(l%u+u)%u*t}function I(e){return Math.min(Math.max(e.value??e.min,e.min),e.max)}function _(e,n,t){let r=n*10+t;r>e.max&&(r=t);let o=r*10>e.max;return{value:r,buffer:o?0:r,advance:o}}function U(e){return e.every(n=>!n.isEditable||n.value!==null&&n.value>=n.min&&n.value<=n.max)}function h(e,n,t){return t===24?e:e%12+(n===1?12:0)}function S(e,n){return n===24?[e,null]:[e%12===0?12:e%12,e<12?0:1]}function Y(e,n){let{year:t,month:r,day:o}=e;if(!t||!r||!o)return null;let u=e.hour==null?0:h(e.hour,e.dayPeriod,n),i=new Date(t,r-1,o,u,e.minute??0,e.second??0,0);return t<100&&i.setFullYear(t),i}function B(e,n){let[t,r]=S(e.getHours(),n);return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:t,minute:e.getMinutes(),second:e.getSeconds(),dayPeriod:r}}function R(e,n,t){if(e.hour==null||e.minute==null||t===12&&e.dayPeriod==null)return null;let r=i=>String(i).padStart(2,"0"),o=h(e.hour,e.dayPeriod,t),u=`${r(o)}:${r(e.minute)}`;return n!=="second"?u:e.second==null?null:`${u}:${r(e.second)}`}function $(e,n){let t=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/.exec(e.trim());if(!t)return{};let r=Number(t[1]),o=Number(t[2]),u=t[3]===void 0?0:Number(t[3]);if(r>23||o>59||u>59)return{};let[i,l]=S(r,n);return{hour:i,minute:o,second:u,dayPeriod:l}}function c(e,n){let t=(u,i=2)=>String(u).padStart(i,"0"),r=`${t(e.getFullYear(),4)}-${t(e.getMonth()+1)}-${t(e.getDate())}`;if(n==="day")return r;let o=`${t(e.getHours())}:${t(e.getMinutes())}`;return n==="second"?`${r}T${o}:${t(e.getSeconds())}`:`${r}T${o}`}function Z(e){let n=/^(\d{4,})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/.exec(e.trim());if(!n)return null;let t=Number(n[1]),r=new Date(t,Number(n[2])-1,Number(n[3]),Number(n[4]??0),Number(n[5]??0),Number(n[6]??0));return t<100&&r.setFullYear(t),Number.isNaN(r.getTime())?null:r}function s(e){let n=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/.exec(e.trim());if(!n)return null;let t=r=>r.padStart(2,"0");return`${t(n[1])}:${n[2]}:${t(n[3]??"00")}`}function H(e,n,t){if(!e)return null;let r=s(e);if(r===null)return null;let o=n?s(n):null;if(o!==null&&r<o)return"underflow";let u=t?s(t):null;return u!==null&&r>u?"overflow":null}function f(e){let n=s(e);if(n===null)return null;let[t,r,o]=n.split(":").map(Number);return t*3600+r*60+o}function z(e,n,t){if(!e||n===void 0||!Number.isFinite(n)||n<=0)return!1;let r=f(e);if(r===null)return!1;let o=(t===void 0?0:f(t))??0;return((r-o)%n+n)%n!==0}function j(e,n,t,r,o){let u=R(e,n,t),i=H(u,r,o);return i===null?e:{...e,...$(i==="underflow"?r:o,t)}}function K(e,n,t,r){if(!e)return null;let o=c(e,n);return t&&o<c(t,n)?"underflow":r&&o>c(r,n)?"overflow":null}function X(){m.clear(),d.clear()}export{V as EMPTY_VALUE_TEXT,v as SEGMENT_LABELS,b as SEGMENT_PLACEHOLDERS,O as buildSegments,j as clampValuesToTimeRange,X as clearDateSegmentCache,K as dateRangeViolation,c as dateToFormValue,B as dateToValues,G as dayPeriodFromKey,C as daysInMonth,w as formatSegmentText,S as from24Hour,p as getDayPeriodNames,U as isComplete,Z as parseDateFormValue,P as resolveHourCycle,g as resolveLocale,E as segmentRange,L as segmentStepFor,D as segmentTypesFor,I as segmentValueNow,A as stepSegment,H as timeRangeViolation,z as timeStepMismatch,$ as timeStringToValues,h as to24Hour,_ as typeDigit,Y as valuesToDate,R as valuesToTimeString};
@@ -0,0 +1,57 @@
1
+ import { type Granularity } from './date-segments.js';
2
+ /** Anything a date-shaped member accepts: the native object, or its ISO-8601 wire form. */
3
+ export type DateInput = Date | string;
4
+ /** A date range, structurally identical to Calendar's own `DateRange`. */
5
+ export interface DateRangeLike {
6
+ start: Date;
7
+ end: Date | null;
8
+ }
9
+ /** What {@link toCalendarValue} produces — the `Date`-shaped selection every framework emits. */
10
+ export type DateValue = Date | Date[] | DateRangeLike | null;
11
+ /** How many dates a selection holds, deciding how a wire string widens. */
12
+ export type SelectionModeLike = 'single' | 'multiple' | 'range';
13
+ /** @internal Puts {@link toDate}'s malformed-input warning back to "not yet warned". */
14
+ export declare function resetMalformedDateWarning(): void;
15
+ /**
16
+ * Reads a consumer-supplied value into a local `Date` or `null`, parsing strings field-by-field (never via `new Date(string)`, which reads `YYYY-MM-DD` as UTC) and warning in dev on invalid shapes.
17
+ *
18
+ * @param input a `Date`, an ISO-8601 string, or `null`/`undefined`
19
+ * @param source the property it arrived on, named in the warning
20
+ * @returns the local calendar date, or `null` when unreadable
21
+ */
22
+ export declare function toDate(input: DateInput | null | undefined, source?: string): Date | null;
23
+ /**
24
+ * The canonical ISO-8601 string for a date — what to persist and what `<form>` submits — using local wall-clock fields, not `toISOString`, which would shift dates across the date line.
25
+ *
26
+ * @param date the local date to render
27
+ * @param granularity how much of the time of day to include
28
+ * @returns `YYYY-MM-DD`, or `YYYY-MM-DDTHH:mm[:ss]` past `day`
29
+ */
30
+ export declare function toISODateValue(date: Date, granularity?: Granularity): string;
31
+ /**
32
+ * Reads any authored selection shape into the canonical `DateValue`; the wire string is self-describing except for a single-date `multiple` selection, widened via `mode`.
33
+ *
34
+ * @param input the authored selection, in any accepted form
35
+ * @param mode how many dates the selection holds
36
+ * @param source the property it arrived on, named in the warning
37
+ */
38
+ export declare function toCalendarValue(input: DateInput | ReadonlyArray<DateInput> | {
39
+ start: DateInput;
40
+ end?: DateInput | null | undefined;
41
+ } | null | undefined, mode: SelectionModeLike, source?: string): DateValue | undefined;
42
+ /**
43
+ * The canonical wire string for a selection — what `value` takes as an
44
+ * attribute and what consumers persist.
45
+ *
46
+ * @param value a selection in the `Date` shape
47
+ * @returns the string, or `null` when nothing is selected
48
+ */
49
+ export declare function toCalendarString(value: DateValue | undefined): string | null;
50
+ /**
51
+ * Reads a time of day from a 24-hour string or a `Date`'s local wall-clock time, discarding the date part since time of day is not an instant.
52
+ *
53
+ * @param input a `HH:mm[:ss]` string, a `Date`, or `null`/`undefined`
54
+ * @param source the property it arrived on, named in the warning
55
+ * @returns the 24-hour string, or `null` when unreadable
56
+ */
57
+ export declare function toTimeValue(input: Date | string | null | undefined, source?: string): string | null;
@@ -0,0 +1 @@
1
+ import{dateToFormValue as c,parseDateFormValue as m}from"./date-segments.js";var g=/^(\d{4,})-(\d{2})$/,p=/^(\d{4,}-\d{2}-\d{2})/,d=!1;function M(){d=!1}function f(e,n){d||(d=!0,console.warn(`[skdx] ${n?`\`${n}\``:"A date property"} was given ${JSON.stringify(e)}, which is not an ISO-8601 date. Expected \`YYYY-MM-DD\`, \`YYYY-MM-DDTHH:mm[:ss]\`, or a bare \`YYYY-MM\` for a month. The value is ignored \u2014 the property behaves as if it had not been supplied \u2014 rather than being coerced to today, to the epoch, or to an \`Invalid Date\` that would then poison every comparison after it.`))}function i(e,n){if(e==null)return null;if(e instanceof Date)return Number.isNaN(e.getTime())?null:e;if(typeof e!="string")return null;let t=e.trim();if(t==="")return null;let r=m(t);if(r!==null){let l=p.exec(t)?.[1];return l!==void 0&&o(r)!==l?(f(t,n),null):r}let a=y(t);return a||(f(t,n),null)}function y(e){let n=g.exec(e);if(!n)return null;let t=Number(n[2])-1;if(t<0||t>11)return null;let r=Number(n[1]),a=new Date(r,t,1);return r<100&&a.setFullYear(r),Number.isNaN(a.getTime())?null:a}function o(e,n="day"){return c(e,n)}function I(e,n,t){if(e===void 0)return;if(e===null)return n==="multiple"?[]:null;if(typeof e=="string"){let l=h(e,t);return s(l,n)}if(Array.isArray(e)){let l=e.map(u=>i(u,t)).filter(u=>u!==null);return s(l,n)}if(e instanceof Date)return s(i(e,t),n);let r=e,a=i(r.start,t);return a===null?n==="multiple"?[]:null:{start:a,end:i(r.end,t)}}function s(e,n){return n!=="multiple"?e:e===null?[]:Array.isArray(e)?e:e instanceof Date?[e]:[]}function h(e,n){let t=e.trim();if(t==="")return null;if(t.includes("/")){let[r="",a=""]=t.split("/"),l=i(r,n);return l===null?null:{start:l,end:a===""?null:i(a,n)}}return t.includes(",")?t.split(",").map(r=>i(r,n)).filter(r=>r!==null):i(t,n)}function Y(e){return e==null?null:Array.isArray(e)?e.length===0?null:e.map(n=>o(n)).join(","):e instanceof Date?o(e):`${o(e.start)}/${e.end===null?"":o(e.end)}`}var N=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/;function b(e,n){if(e==null)return null;if(e instanceof Date){if(Number.isNaN(e.getTime()))return null;let a=D=>String(D).padStart(2,"0"),l=e.getSeconds(),u=`${a(e.getHours())}:${a(e.getMinutes())}`;return l===0?u:`${u}:${a(l)}`}if(typeof e!="string")return null;let t=e.trim();if(t==="")return null;let r=N.exec(t);return!r||Number(r[1])>23||Number(r[2])>59||r[3]!==void 0&&Number(r[3])>59?(f(t,n),null):t}export{M as resetMalformedDateWarning,Y as toCalendarString,I as toCalendarValue,i as toDate,o as toISODateValue,b as toTimeValue};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Whether this build is a development build, so dev-only diagnostics may throw rather than log.
3
+ *
4
+ * Only an explicit development signal answers yes; an unset or unrecognised flag says
5
+ * nothing, so a bundle that defines none of the three is treated as production. The
6
+ * probes read build-time constants rather than arguments, so a test that needs a
7
+ * particular answer mocks this module.
8
+ *
9
+ * @returns `true` in development, `false` in production and when nothing says.
10
+ * @internal
11
+ */
12
+ export declare function isDevMode(): boolean;
@@ -0,0 +1 @@
1
+ function e(){try{if(typeof process<"u"&&process.env.NODE_ENV==="development")return!0}catch{}try{if(import.meta.env?.DEV===!0)return!0}catch{}return typeof ngDevMode<"u"&&ngDevMode===!0}export{e as isDevMode};
@@ -0,0 +1,96 @@
1
+ /** Which of the three canned dialogs an entry is. */
2
+ export type DialogsKind = 'alert' | 'confirm' | 'prompt';
3
+ /** Options common to alert, confirm and prompt; a bare string is the title. */
4
+ export interface DialogsOptions {
5
+ /** Heading of the dialog, rendered as its title and accessible name. */
6
+ title: string;
7
+ /**
8
+ * Body text under the title, rendered as the dialog's description.
9
+ *
10
+ * @default undefined — no description.
11
+ */
12
+ description?: string | undefined;
13
+ /**
14
+ * Label of the confirming button.
15
+ *
16
+ * @default 'OK' for alert and prompt, 'Confirm' for confirm
17
+ */
18
+ confirmLabel?: string | undefined;
19
+ /**
20
+ * Label of the cancelling button; alerts have none.
21
+ *
22
+ * @default 'Cancel'
23
+ */
24
+ cancelLabel?: string | undefined;
25
+ /**
26
+ * Severity rung the skin colours the dialog by, mirrored to `data-status`.
27
+ *
28
+ * @default undefined — the skin's own default.
29
+ */
30
+ status?: string | undefined;
31
+ }
32
+ /** Options for a prompt, which adds a single text field to the confirm shape. */
33
+ export interface DialogsPromptOptions extends DialogsOptions {
34
+ /**
35
+ * Text the field starts with.
36
+ *
37
+ * @default ''
38
+ */
39
+ defaultValue?: string | undefined;
40
+ /**
41
+ * Visible label of the text field.
42
+ *
43
+ * @default 'Value'
44
+ */
45
+ label?: string | undefined;
46
+ /**
47
+ * Placeholder shown in the empty field.
48
+ *
49
+ * @default undefined — no placeholder.
50
+ */
51
+ placeholder?: string | undefined;
52
+ }
53
+ /** A queued dialog as the host renders it: resolved options plus the settle callback. */
54
+ export interface DialogsEntry extends DialogsPromptOptions {
55
+ /** Stable identity, for keying the rendered dialog. */
56
+ id: string;
57
+ /** Which canned dialog this is. */
58
+ kind: DialogsKind;
59
+ /** Resolved confirming label, never undefined. */
60
+ confirmLabel: string;
61
+ /** Resolved cancelling label, `undefined` for alerts. */
62
+ cancelLabel: string | undefined;
63
+ }
64
+ /** What settling an entry hands back: nothing for alert, a boolean for confirm, text or null for prompt. */
65
+ export type DialogsResult = void | boolean | string | null;
66
+ /** The queue every host renders from and every caller awaits on. */
67
+ export interface DialogsStore {
68
+ /** Subscribes to queue changes. Returns its own unsubscribe. */
69
+ subscribe: (listener: () => void) => () => void;
70
+ /** The entry currently shown, or `null` — a stable reference until the queue changes. */
71
+ getCurrent: () => DialogsEntry | null;
72
+ /** Shows a message with one button; resolves when it is dismissed. */
73
+ alert(options: DialogsOptions | string): Promise<void>;
74
+ /** Asks a yes/no question; resolves `true` on confirm, `false` on cancel or dismissal. */
75
+ confirm(options: DialogsOptions | string): Promise<boolean>;
76
+ /** Asks for one line of text; resolves the text on confirm, `null` on cancel or dismissal. */
77
+ prompt(options: DialogsPromptOptions | string): Promise<string | null>;
78
+ /** Resolves and removes the entry with `id`, then shows the next one. No-ops for an id that is not current. */
79
+ settle(id: string, result: DialogsResult): void;
80
+ }
81
+ /**
82
+ * Creates the dialog queue once per app. Hand it to the `Dialogs` host and call
83
+ * `alert`, `confirm` or `prompt` from anywhere; each returns a promise that
84
+ * settles with the user's answer.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * const dialogs = createDialogs();
89
+ * if (await dialogs.confirm({ title: 'Delete the project?', status: 'danger' })) remove();
90
+ * ```
91
+ */
92
+ export declare function createDialogs(): DialogsStore;
93
+ /** What cancelling or dismissing `entry` resolves with: `false` for confirm, `null` for prompt, nothing for alert. */
94
+ export declare function dialogsCancelResult(entry: DialogsEntry): DialogsResult;
95
+ /** What confirming `entry` resolves with: `true` for confirm, the typed `draft` for prompt, nothing for alert. */
96
+ export declare function dialogsConfirmResult(entry: DialogsEntry, draft: string): DialogsResult;
@@ -0,0 +1 @@
1
+ var d={alert:"OK",confirm:"Confirm",prompt:"OK"};function g(){let n=[],i=new Set,l=0;function s(){for(let e of i)e()}function o(e,t){let r=typeof t=="string"?{title:t}:t,a={...r,id:`skdx-dialogs-${++l}`,kind:e,confirmLabel:r.confirmLabel??d[e],cancelLabel:e==="alert"?void 0:r.cancelLabel??"Cancel"};return new Promise(u=>{n.push({entry:a,resolve:u}),n.length===1&&s()})}return{subscribe(e){return i.add(e),()=>{i.delete(e)}},getCurrent:()=>n[0]?.entry??null,alert:e=>o("alert",e).then(()=>{}),confirm:e=>o("confirm",e).then(t=>t===!0),prompt:e=>o("prompt",e).then(t=>typeof t=="string"?t:null),settle(e,t){if(n[0]?.entry.id!==e)return;let{resolve:r}=n.shift();r(t),s()}}}function f(n){if(n.kind==="confirm")return!1;if(n.kind==="prompt")return null}function p(n,i){if(n.kind==="confirm")return!0;if(n.kind==="prompt")return i}export{g as createDialogs,f as dialogsCancelResult,p as dialogsConfirmResult};
@@ -0,0 +1,56 @@
1
+ /** What `onFocusOutside` receives: `focusin` is not cancelable, so the handler gets a cancelable stand-in carrying the original as its `detail`. */
2
+ export type FocusOutsideEvent = CustomEvent<FocusEvent>;
3
+ /** Either flavour of outside interaction, as `onInteractOutside` sees it. */
4
+ export type InteractOutsideEvent = PointerEvent | FocusOutsideEvent;
5
+ /** One open dismissible layer, as the stack knows it: only what counts as inside it. */
6
+ export interface DismissLayer {
7
+ /** The layer's own elements, read fresh each time since a panel mounts and unmounts under the same layer. */
8
+ insideElements: () => Array<Element | null | undefined>;
9
+ }
10
+ /** Registers an open layer and returns its teardown; layers close out of order (a parent unmount takes its children), so the teardown removes by identity, not by position. */
11
+ export declare function pushDismissLayer(layer: DismissLayer): () => void;
12
+ /**
13
+ * Whether `target` sits inside a layer that opened within `layer`: a portalled
14
+ * listbox or popover whose trigger lives in this panel. `contains()` cannot see
15
+ * it, so an outside-interaction check must ask the stack as well. Transitive,
16
+ * so a Select inside a Popover inside a Dialog still counts for the Dialog.
17
+ */
18
+ export declare function nestedLayerContains(layer: DismissLayer, target: Node): boolean;
19
+ /** The layer nothing else is open inside: push order cannot rank nested layers, because a framework's effects run child-first. */
20
+ export declare function topDismissLayer(candidates?: readonly DismissLayer[]): DismissLayer | undefined;
21
+ /** The one layer an Escape belongs to: sibling non-modal layers can be open at once, so the layer holding the key's target answers, and the top layer only when none does. */
22
+ export declare function escapeLayer(target: Node | null): DismissLayer | undefined;
23
+ /**
24
+ * Runs one layer's share of a document-level Escape keydown: at most one layer
25
+ * handles a given Escape, and `preventDefault()` comes after the consumer's
26
+ * handler — never before, so a veto is read from the same event — and only when
27
+ * this layer was the one that handled it. Preventing matters because the close
28
+ * watcher of an ancestor native `<dialog>` skips a canceled Escape, which is
29
+ * what stops one press from closing both the top layer and the Dialog around it.
30
+ *
31
+ * Listen on the document, not the panel: a layer must answer Escape while focus
32
+ * sits outside it (virtual focus, a portalled submenu), which a panel-level
33
+ * listener never sees.
34
+ *
35
+ * @param event the document keydown
36
+ * @param layer the layer asking whether the key is its own
37
+ * @param handler the consumer's Escape handler, or `undefined` for a layer that leaves Escape to the platform (a native `<dialog>`)
38
+ * @returns whether this layer handled the key
39
+ */
40
+ export declare function handleEscapeKeyDown(event: KeyboardEvent, layer: DismissLayer, handler: ((event: KeyboardEvent) => void) | undefined): boolean;
41
+ /** The cancelable stand-in an auto-focus handler receives; there is no native event for "about to move focus". */
42
+ export type AutoFocusEvent = CustomEvent<null>;
43
+ /** Announces an automatic focus move as a cancelable event and reports whether it may go ahead. */
44
+ export declare function autoFocusEvent(type: 'open-auto-focus' | 'close-auto-focus', handler?: (event: AutoFocusEvent) => void): boolean;
45
+ /** The cancelable stand-in for a `focusin` that landed outside the layer. */
46
+ export declare function focusOutsideEvent(event: FocusEvent): FocusOutsideEvent;
47
+ /** Marks an overlay's open-time focus move so other layers don't read it as outside interaction; released in a microtask because `focus()` dispatches `focusin` synchronously. */
48
+ export declare function focusOnOpen(move: () => void): void;
49
+ /** The node a `focusin` moved focus to, or `null` when it is not a move this layer may be dismissed by: another layer opening, or focus clearing to `<body>`. */
50
+ export declare function focusOutsideTarget(event: FocusEvent): Node | null;
51
+ /** Whether an outside-interaction target is the overlay's own trigger, including through the trigger's shadow root. */
52
+ export declare function triggerContains(trigger: Element | null | undefined, target: Node | null): boolean;
53
+ /**
54
+ * The native `<dialog>` backdrop, normalised onto the same `PointerEvent` channel as every other outside pointer-down, or `null` when the press landed inside the panel. The backdrop is not an element: a pointer on it targets the dialog itself, which `contains()` would misread as inside.
55
+ */
56
+ export declare function backdropPointerDown(event: MouseEvent, dialog: Element | null | undefined): PointerEvent | null;
@@ -0,0 +1 @@
1
+ var s=[];function c(e,n){let t=n;for(;t;){if(e.contains(t))return!0;let o=t.getRootNode();t=o instanceof ShadowRoot?o.host:null}return!1}function a(e,n){return e.insideElements().some(t=>n.insideElements().some(o=>o&&t&&c(t,o)))}function d(e){return s.push(e),()=>{let n=s.indexOf(e);n!==-1&&s.splice(n,1)}}function m(e,n){let t=new Set([e]),o=!0;for(;o;){o=!1;for(let u of s)t.has(u)||[...t].some(r=>a(r,u))&&(t.add(u),o=!0)}return t.delete(e),[...t].some(u=>u.insideElements().some(r=>r&&c(r,n)))}function l(e=s){for(let n=e.length-1;n>=0;n--){let t=e[n];if(!e.some(o=>o!==t&&a(t,o)))return t}}function f(e){let n=e?s.filter(t=>t.insideElements().some(o=>o?.contains(e))):[];return l(n)??l()}function y(e,n,t){return e.key!=="Escape"||!t||f(e.target)!==n?!1:(t(e),e.preventDefault(),!0)}function p(e,n){if(!n)return!0;let t=new CustomEvent(e,{cancelable:!0,detail:null});return n(t),!t.defaultPrevented}function E(e){return new CustomEvent("focus-outside",{detail:e,cancelable:!0})}var i=0;function b(e){i+=1;try{e()}finally{queueMicrotask(()=>{i-=1})}}function v(e){if(i>0)return null;let n=e.target;return!n||n===document.body?null:n}function x(e,n){if(!e||!n)return!1;if(e.contains(n))return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host.contains(n)}function D(e,n){return!n||e.target!==n?null:e instanceof PointerEvent?e:new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,composed:!0,pointerType:"mouse",clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey})}export{p as autoFocusEvent,D as backdropPointerDown,f as escapeLayer,b as focusOnOpen,E as focusOutsideEvent,v as focusOutsideTarget,y as handleEscapeKeyDown,m as nestedLayerContains,d as pushDismissLayer,l as topDismissLayer,x as triggerContains};