@threadlabs/looma 0.50.2 → 0.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/components/shared/binding-inputs.js +5 -0
  2. package/components/shared/calendar-model.js +84 -0
  3. package/components/shared/date-input-segments.js +25 -0
  4. package/components/shared/date-navigation.js +35 -0
  5. package/components/shared/date-picker.js +38 -0
  6. package/components/shared/date-range.js +61 -0
  7. package/components/shared/date-time.js +273 -0
  8. package/components/shared/external-value.js +12 -0
  9. package/components/shared/form-reset.js +1 -1
  10. package/components/shared/icons.js +2 -0
  11. package/components/shared/initial-field-value.js +14 -0
  12. package/components/shared/input-segments.js +190 -0
  13. package/components/shared/prepared-module.js +19 -0
  14. package/components/ui-button/ui-button.html +31 -10
  15. package/components/ui-calendar/calendar-source.js +34 -0
  16. package/components/ui-calendar/ui-calendar.html +221 -0
  17. package/components/ui-calendar/ui-calendar.js +185 -0
  18. package/components/ui-cluster/ui-cluster.html +5 -2
  19. package/components/ui-date-field/ui-date-field.html +143 -0
  20. package/components/ui-date-field/ui-date-field.js +258 -0
  21. package/components/ui-date-picker/ui-date-picker.html +213 -0
  22. package/components/ui-date-picker/ui-date-picker.js +153 -0
  23. package/components/ui-date-range-picker/ui-date-range-picker.html +202 -0
  24. package/components/ui-date-range-picker/ui-date-range-picker.js +224 -0
  25. package/components/ui-file-input/files.js +15 -0
  26. package/components/ui-file-input/ui-file-input.html +79 -0
  27. package/components/ui-file-input/ui-file-input.js +108 -0
  28. package/components/ui-form-field/ui-form-field.js +2 -2
  29. package/components/ui-grid/ui-grid.html +74 -5
  30. package/components/ui-icon/ui-icon.html +8 -0
  31. package/components/ui-icon-button/ui-icon-button.html +22 -7
  32. package/components/ui-input/ui-input.html +10 -1
  33. package/components/ui-input/ui-input.js +11 -5
  34. package/components/ui-input-group/ui-input-group.html +2 -2
  35. package/components/ui-input-group/ui-input-group.js +6 -5
  36. package/components/ui-popover/ui-popover.html +2 -0
  37. package/components/ui-popover/ui-popover.js +5 -1
  38. package/components/ui-select/ui-select.html +8 -3
  39. package/components/ui-time-field/ui-time-field.html +62 -0
  40. package/components/ui-time-field/ui-time-field.js +21 -0
  41. package/components/ui-time-picker/time-options.js +25 -0
  42. package/components/ui-time-picker/ui-time-picker.html +160 -0
  43. package/components/ui-time-picker/ui-time-picker.js +132 -0
  44. package/dist/index.js +68 -61
  45. package/docs/README.md +2 -2
  46. package/docs/catalog.json +14346 -6343
  47. package/docs/documentation.css +1 -1
  48. package/docs/framework-examples.mjs +13 -2
  49. package/docs/site.mjs +1 -1
  50. package/editor/components.css +62 -29
  51. package/editor/icons.d.ts +2 -0
  52. package/editor/index.js +602 -141
  53. package/package.json +6 -4
  54. package/styles/ui-action-bar.css +1 -1
  55. package/styles/ui-affordance-scope.css +1 -1
  56. package/styles/ui-avatar-group.css +1 -1
  57. package/styles/ui-avatar.css +1 -1
  58. package/styles/ui-badge.css +1 -1
  59. package/styles/ui-breadcrumb-item.css +1 -1
  60. package/styles/ui-breadcrumbs.css +1 -1
  61. package/styles/ui-button.css +19 -7
  62. package/styles/ui-calendar.css +1 -0
  63. package/styles/ui-callout.css +1 -1
  64. package/styles/ui-card-group.css +1 -1
  65. package/styles/ui-card.css +1 -1
  66. package/styles/ui-checkbox.css +1 -1
  67. package/styles/ui-cluster.css +4 -1
  68. package/styles/ui-color-picker.css +1 -1
  69. package/styles/ui-combobox.css +1 -1
  70. package/styles/ui-compact-content.css +1 -1
  71. package/styles/ui-compact-editor.css +1 -1
  72. package/styles/ui-compact-mark.css +1 -1
  73. package/styles/ui-compact-node.css +1 -1
  74. package/styles/ui-container.css +1 -1
  75. package/styles/ui-context-menu.css +1 -1
  76. package/styles/ui-cover.css +1 -1
  77. package/styles/ui-curve-editor.css +1 -1
  78. package/styles/ui-cycle-button.css +1 -1
  79. package/styles/ui-date-field.css +1 -0
  80. package/styles/ui-date-picker.css +1 -0
  81. package/styles/ui-date-range-picker.css +1 -0
  82. package/styles/ui-description-item.css +1 -1
  83. package/styles/ui-description-list.css +1 -1
  84. package/styles/ui-dialog.css +1 -1
  85. package/styles/ui-disclosure.css +1 -1
  86. package/styles/ui-editable.css +1 -1
  87. package/styles/ui-editor-block-actions.css +1 -1
  88. package/styles/ui-editor-chip-editor.css +1 -1
  89. package/styles/ui-editor-code-language.css +1 -1
  90. package/styles/ui-editor-footnote-editor.css +1 -1
  91. package/styles/ui-editor-formatting-tools.css +1 -1
  92. package/styles/ui-editor-image-toolbar.css +1 -1
  93. package/styles/ui-editor-insert-table-grid.css +1 -1
  94. package/styles/ui-editor-link-card.css +1 -1
  95. package/styles/ui-editor-link-form.css +1 -1
  96. package/styles/ui-editor-mention-menu-item.css +1 -1
  97. package/styles/ui-editor-mention-menu.css +1 -1
  98. package/styles/ui-editor-slash-menu-group.css +1 -1
  99. package/styles/ui-editor-slash-menu-item.css +1 -1
  100. package/styles/ui-editor-slash-menu.css +1 -1
  101. package/styles/ui-editor-surface.css +1 -1
  102. package/styles/ui-editor-table-context-menu.css +1 -1
  103. package/styles/ui-editor-table-overlay.css +1 -1
  104. package/styles/ui-editor-table-toolbar.css +1 -1
  105. package/styles/ui-editor-toolbar.css +1 -1
  106. package/styles/ui-editor.css +1 -1
  107. package/styles/ui-file-input.css +1 -0
  108. package/styles/ui-floating-action-button.css +1 -1
  109. package/styles/ui-form-field.css +1 -1
  110. package/styles/ui-grid.css +44 -1
  111. package/styles/ui-icon-button.css +19 -5
  112. package/styles/ui-icon.css +5 -1
  113. package/styles/ui-image.css +1 -1
  114. package/styles/ui-input-group.css +3 -3
  115. package/styles/ui-input.css +1 -1
  116. package/styles/ui-light-editor.css +1 -1
  117. package/styles/ui-list-item.css +1 -1
  118. package/styles/ui-list.css +1 -1
  119. package/styles/ui-listbox.css +1 -1
  120. package/styles/ui-menu-group.css +1 -1
  121. package/styles/ui-menu-item.css +1 -1
  122. package/styles/ui-menu.css +1 -1
  123. package/styles/ui-meter.css +1 -1
  124. package/styles/ui-nav-item.css +1 -1
  125. package/styles/ui-number-input.css +1 -1
  126. package/styles/ui-page-header.css +1 -1
  127. package/styles/ui-pagination.css +1 -1
  128. package/styles/ui-popover.css +1 -1
  129. package/styles/ui-radio-group.css +1 -1
  130. package/styles/ui-radio.css +1 -1
  131. package/styles/ui-reel.css +1 -1
  132. package/styles/ui-scroll-area.css +1 -1
  133. package/styles/ui-search-result-row.css +1 -1
  134. package/styles/ui-search-shell.css +1 -1
  135. package/styles/ui-section.css +1 -1
  136. package/styles/ui-select.css +9 -4
  137. package/styles/ui-separator.css +1 -1
  138. package/styles/ui-sidebar.css +1 -1
  139. package/styles/ui-site-header.css +19 -19
  140. package/styles/ui-skeleton.css +1 -1
  141. package/styles/ui-slider.css +1 -1
  142. package/styles/ui-spinner.css +1 -1
  143. package/styles/ui-stack.css +1 -1
  144. package/styles/ui-status-message.css +1 -1
  145. package/styles/ui-swatch.css +1 -1
  146. package/styles/ui-switch.css +1 -1
  147. package/styles/ui-switcher.css +1 -1
  148. package/styles/ui-table.css +1 -1
  149. package/styles/ui-tabs.css +1 -1
  150. package/styles/ui-text.css +1 -1
  151. package/styles/ui-textarea.css +1 -1
  152. package/styles/ui-time-field.css +1 -0
  153. package/styles/ui-time-picker.css +1 -0
  154. package/styles/ui-toast-region.css +1 -1
  155. package/styles/ui-toast.css +1 -1
  156. package/styles/ui-tooltip.css +1 -1
  157. package/styles/ui-top-bar.css +1 -1
  158. package/styles/ui-tree-item.css +1 -1
  159. package/styles/ui-tree.css +1 -1
  160. package/tokens.css +4 -0
  161. package/vanilla/UiActionBar.d.ts +1 -1
  162. package/vanilla/UiActionBar.js +1 -1
  163. package/vanilla/UiAffordanceScope.d.ts +1 -1
  164. package/vanilla/UiAffordanceScope.js +1 -1
  165. package/vanilla/UiAvatar.d.ts +1 -1
  166. package/vanilla/UiAvatar.js +1 -1
  167. package/vanilla/UiAvatarGroup.d.ts +1 -1
  168. package/vanilla/UiAvatarGroup.js +1 -1
  169. package/vanilla/UiBadge.d.ts +1 -1
  170. package/vanilla/UiBadge.js +1 -1
  171. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  172. package/vanilla/UiBreadcrumbItem.js +1 -1
  173. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  174. package/vanilla/UiBreadcrumbs.js +1 -1
  175. package/vanilla/UiButton.d.ts +2 -1
  176. package/vanilla/UiButton.js +128 -108
  177. package/vanilla/UiCalendar.d.ts +50 -0
  178. package/vanilla/UiCalendar.js +477 -0
  179. package/vanilla/UiCallout.d.ts +1 -1
  180. package/vanilla/UiCallout.js +1 -1
  181. package/vanilla/UiCard.d.ts +1 -1
  182. package/vanilla/UiCard.js +1 -1
  183. package/vanilla/UiCardGroup.d.ts +1 -1
  184. package/vanilla/UiCardGroup.js +1 -1
  185. package/vanilla/UiCheckbox.d.ts +1 -1
  186. package/vanilla/UiCheckbox.js +1 -1
  187. package/vanilla/UiCluster.d.ts +2 -2
  188. package/vanilla/UiCluster.js +2 -2
  189. package/vanilla/UiColorPicker.d.ts +1 -1
  190. package/vanilla/UiColorPicker.js +1 -1
  191. package/vanilla/UiCombobox.d.ts +1 -1
  192. package/vanilla/UiCombobox.js +1 -1
  193. package/vanilla/UiCompactContent.d.ts +1 -1
  194. package/vanilla/UiCompactContent.js +1 -1
  195. package/vanilla/UiCompactEditor.d.ts +1 -1
  196. package/vanilla/UiCompactEditor.js +1 -1
  197. package/vanilla/UiCompactMark.d.ts +1 -1
  198. package/vanilla/UiCompactMark.js +1 -1
  199. package/vanilla/UiCompactNode.d.ts +1 -1
  200. package/vanilla/UiCompactNode.js +1 -1
  201. package/vanilla/UiContainer.d.ts +1 -1
  202. package/vanilla/UiContainer.js +1 -1
  203. package/vanilla/UiContextMenu.d.ts +1 -1
  204. package/vanilla/UiContextMenu.js +1 -1
  205. package/vanilla/UiCover.d.ts +1 -1
  206. package/vanilla/UiCover.js +1 -1
  207. package/vanilla/UiCurveEditor.d.ts +1 -1
  208. package/vanilla/UiCurveEditor.js +1 -1
  209. package/vanilla/UiCycleButton.d.ts +1 -1
  210. package/vanilla/UiCycleButton.js +1 -1
  211. package/vanilla/UiDateField.d.ts +52 -0
  212. package/vanilla/UiDateField.js +208 -0
  213. package/vanilla/UiDatePicker.d.ts +63 -0
  214. package/vanilla/UiDatePicker.js +360 -0
  215. package/vanilla/UiDateRangePicker.d.ts +60 -0
  216. package/vanilla/UiDateRangePicker.js +418 -0
  217. package/vanilla/UiDescriptionItem.d.ts +1 -1
  218. package/vanilla/UiDescriptionItem.js +1 -1
  219. package/vanilla/UiDescriptionList.d.ts +1 -1
  220. package/vanilla/UiDescriptionList.js +1 -1
  221. package/vanilla/UiDialog.d.ts +1 -1
  222. package/vanilla/UiDialog.js +1 -1
  223. package/vanilla/UiDisclosure.d.ts +1 -1
  224. package/vanilla/UiDisclosure.js +1 -1
  225. package/vanilla/UiEditable.d.ts +1 -1
  226. package/vanilla/UiEditable.js +1 -1
  227. package/vanilla/UiEditor.d.ts +1 -1
  228. package/vanilla/UiEditor.js +1 -1
  229. package/vanilla/UiEditorBlockActions.d.ts +1 -1
  230. package/vanilla/UiEditorBlockActions.js +1 -1
  231. package/vanilla/UiEditorChipEditor.d.ts +1 -1
  232. package/vanilla/UiEditorChipEditor.js +1 -1
  233. package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
  234. package/vanilla/UiEditorCodeLanguage.js +1 -1
  235. package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
  236. package/vanilla/UiEditorFootnoteEditor.js +1 -1
  237. package/vanilla/UiEditorFormattingTools.d.ts +1 -1
  238. package/vanilla/UiEditorFormattingTools.js +1 -1
  239. package/vanilla/UiEditorImageToolbar.d.ts +1 -1
  240. package/vanilla/UiEditorImageToolbar.js +1 -1
  241. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  242. package/vanilla/UiEditorInsertTableGrid.js +1 -1
  243. package/vanilla/UiEditorLinkCard.d.ts +1 -1
  244. package/vanilla/UiEditorLinkCard.js +1 -1
  245. package/vanilla/UiEditorLinkForm.d.ts +1 -1
  246. package/vanilla/UiEditorLinkForm.js +1 -1
  247. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  248. package/vanilla/UiEditorMentionMenu.js +1 -1
  249. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  250. package/vanilla/UiEditorMentionMenuItem.js +1 -1
  251. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  252. package/vanilla/UiEditorSlashMenu.js +1 -1
  253. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  254. package/vanilla/UiEditorSlashMenuGroup.js +1 -1
  255. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  256. package/vanilla/UiEditorSlashMenuItem.js +1 -1
  257. package/vanilla/UiEditorSurface.d.ts +1 -1
  258. package/vanilla/UiEditorSurface.js +1 -1
  259. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  260. package/vanilla/UiEditorTableContextMenu.js +1 -1
  261. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  262. package/vanilla/UiEditorTableOverlay.js +1 -1
  263. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  264. package/vanilla/UiEditorTableToolbar.js +1 -1
  265. package/vanilla/UiEditorToolbar.d.ts +1 -1
  266. package/vanilla/UiEditorToolbar.js +1 -1
  267. package/vanilla/UiFileInput.d.ts +36 -0
  268. package/vanilla/UiFileInput.js +209 -0
  269. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  270. package/vanilla/UiFloatingActionButton.js +1 -1
  271. package/vanilla/UiFormField.d.ts +1 -1
  272. package/vanilla/UiFormField.js +1 -1
  273. package/vanilla/UiGrid.d.ts +7 -2
  274. package/vanilla/UiGrid.js +85 -19
  275. package/vanilla/UiIcon.d.ts +2 -1
  276. package/vanilla/UiIcon.js +10 -10
  277. package/vanilla/UiIconButton.d.ts +2 -2
  278. package/vanilla/UiIconButton.js +2 -2
  279. package/vanilla/UiImage.d.ts +1 -1
  280. package/vanilla/UiImage.js +1 -1
  281. package/vanilla/UiInput.d.ts +2 -1
  282. package/vanilla/UiInput.js +11 -11
  283. package/vanilla/UiInputGroup.d.ts +1 -1
  284. package/vanilla/UiInputGroup.js +1 -1
  285. package/vanilla/UiLightEditor.d.ts +1 -1
  286. package/vanilla/UiLightEditor.js +1 -1
  287. package/vanilla/UiList.d.ts +1 -1
  288. package/vanilla/UiList.js +1 -1
  289. package/vanilla/UiListItem.d.ts +1 -1
  290. package/vanilla/UiListItem.js +1 -1
  291. package/vanilla/UiListbox.d.ts +1 -1
  292. package/vanilla/UiListbox.js +1 -1
  293. package/vanilla/UiMenu.d.ts +1 -1
  294. package/vanilla/UiMenu.js +1 -1
  295. package/vanilla/UiMenuGroup.d.ts +1 -1
  296. package/vanilla/UiMenuGroup.js +1 -1
  297. package/vanilla/UiMenuItem.d.ts +1 -1
  298. package/vanilla/UiMenuItem.js +1 -1
  299. package/vanilla/UiMeter.d.ts +1 -1
  300. package/vanilla/UiMeter.js +1 -1
  301. package/vanilla/UiNavItem.d.ts +1 -1
  302. package/vanilla/UiNavItem.js +1 -1
  303. package/vanilla/UiNumberInput.d.ts +1 -1
  304. package/vanilla/UiNumberInput.js +1 -1
  305. package/vanilla/UiPageHeader.d.ts +1 -1
  306. package/vanilla/UiPageHeader.js +1 -1
  307. package/vanilla/UiPagination.d.ts +1 -1
  308. package/vanilla/UiPagination.js +1 -1
  309. package/vanilla/UiPopover.d.ts +2 -1
  310. package/vanilla/UiPopover.js +4 -4
  311. package/vanilla/UiRadio.d.ts +1 -1
  312. package/vanilla/UiRadio.js +1 -1
  313. package/vanilla/UiRadioGroup.d.ts +1 -1
  314. package/vanilla/UiRadioGroup.js +1 -1
  315. package/vanilla/UiReel.d.ts +1 -1
  316. package/vanilla/UiReel.js +1 -1
  317. package/vanilla/UiScrollArea.d.ts +1 -1
  318. package/vanilla/UiScrollArea.js +1 -1
  319. package/vanilla/UiSearchResultRow.d.ts +1 -1
  320. package/vanilla/UiSearchResultRow.js +1 -1
  321. package/vanilla/UiSearchShell.d.ts +1 -1
  322. package/vanilla/UiSearchShell.js +1 -1
  323. package/vanilla/UiSection.d.ts +1 -1
  324. package/vanilla/UiSection.js +1 -1
  325. package/vanilla/UiSelect.d.ts +1 -1
  326. package/vanilla/UiSelect.js +1 -1
  327. package/vanilla/UiSeparator.d.ts +1 -1
  328. package/vanilla/UiSeparator.js +1 -1
  329. package/vanilla/UiSidebar.d.ts +1 -1
  330. package/vanilla/UiSidebar.js +1 -1
  331. package/vanilla/UiSiteHeader.d.ts +1 -1
  332. package/vanilla/UiSiteHeader.js +1 -1
  333. package/vanilla/UiSkeleton.d.ts +1 -1
  334. package/vanilla/UiSkeleton.js +1 -1
  335. package/vanilla/UiSlider.d.ts +1 -1
  336. package/vanilla/UiSlider.js +1 -1
  337. package/vanilla/UiSpinner.d.ts +1 -1
  338. package/vanilla/UiSpinner.js +1 -1
  339. package/vanilla/UiStack.d.ts +1 -1
  340. package/vanilla/UiStack.js +1 -1
  341. package/vanilla/UiStatusMessage.d.ts +1 -1
  342. package/vanilla/UiStatusMessage.js +1 -1
  343. package/vanilla/UiSwatch.d.ts +1 -1
  344. package/vanilla/UiSwatch.js +1 -1
  345. package/vanilla/UiSwitch.d.ts +1 -1
  346. package/vanilla/UiSwitch.js +1 -1
  347. package/vanilla/UiSwitcher.d.ts +1 -1
  348. package/vanilla/UiSwitcher.js +1 -1
  349. package/vanilla/UiTable.d.ts +1 -1
  350. package/vanilla/UiTable.js +1 -1
  351. package/vanilla/UiTabs.d.ts +1 -1
  352. package/vanilla/UiTabs.js +1 -1
  353. package/vanilla/UiText.d.ts +1 -1
  354. package/vanilla/UiText.js +1 -1
  355. package/vanilla/UiTextarea.d.ts +1 -1
  356. package/vanilla/UiTextarea.js +1 -1
  357. package/vanilla/UiTimeField.d.ts +42 -0
  358. package/vanilla/UiTimeField.js +112 -0
  359. package/vanilla/UiTimePicker.d.ts +48 -0
  360. package/vanilla/UiTimePicker.js +372 -0
  361. package/vanilla/UiToast.d.ts +1 -1
  362. package/vanilla/UiToast.js +1 -1
  363. package/vanilla/UiToastRegion.d.ts +1 -1
  364. package/vanilla/UiToastRegion.js +1 -1
  365. package/vanilla/UiTooltip.d.ts +1 -1
  366. package/vanilla/UiTooltip.js +1 -1
  367. package/vanilla/UiTopBar.d.ts +1 -1
  368. package/vanilla/UiTopBar.js +1 -1
  369. package/vanilla/UiTree.d.ts +1 -1
  370. package/vanilla/UiTree.js +1 -1
  371. package/vanilla/UiTreeItem.d.ts +1 -1
  372. package/vanilla/UiTreeItem.js +1 -1
  373. package/vanilla/index.js +7 -0
@@ -4,7 +4,7 @@
4
4
  [data-example-card] pre { overflow: auto; }
5
5
  /* The customizer is an application page; use Markupress's public width token instead of patching its layout. */
6
6
  :root:has([data-looma-customizer]), :root:has([data-component~="looma-catalog"]) { --markupress-content-width: 110rem; }
7
- [data-preview] { display: grid; place-items: center; gap: var(--ui-space-4); min-inline-size: 0; min-block-size: 13rem; padding: var(--ui-space-4); box-sizing: border-box; color: var(--ui-text); font-family: var(--ui-font-sans); font-size: var(--ui-font-size); line-height: var(--ui-line-height); background: var(--ui-surface-raised); }
7
+ [data-preview] { display: grid; grid-template-columns: minmax(0, 1fr) !important; place-items: center; gap: var(--ui-space-4); min-inline-size: 0; min-block-size: 13rem; padding: var(--ui-space-4); box-sizing: border-box; color: var(--ui-text); font-family: var(--ui-font-sans); font-size: var(--ui-font-size); line-height: var(--ui-line-height); background: var(--ui-surface-raised); }
8
8
  [data-preview-layout] { justify-items: stretch; }
9
9
 
10
10
  /* These headings are authored page content projected through the example card's heading slot. */
@@ -4,7 +4,8 @@ const escapeHtml = value => String(value).replaceAll('&', '&amp;').replaceAll('<
4
4
  const indent = depth => ' '.repeat(depth);
5
5
  const textValue = node => node.preserve ? node.value : node.value.replace(/[\t\n\r\f ]+/g, ' ');
6
6
  const formattingSpace = node => node?.kind === 'text' && !node.preserve && /^[\t\n\r\f ]*$/.test(node.value);
7
- const key = value => /^[a-zA-Z_$][\w$]*$/.test(value) ? value : JSON.stringify(value);
7
+ const key = (value, quote = JSON.stringify) => /^[a-zA-Z_$][\w$]*$/.test(value) ? value : quote(value);
8
+ const singleQuoted = value => `'${JSON.stringify(value).slice(1, -1).replaceAll('\\"', '"').replaceAll("'", "\\'")}'`;
8
9
  const kebab = value => value.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);
9
10
  const voidElements = new Set(['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
10
11
  const reactAttributes = { class: 'className', for: 'htmlFor', readonly: 'readOnly', tabindex: 'tabIndex', autofocus: 'autoFocus', maxlength: 'maxLength', minlength: 'minLength', colspan: 'colSpan', rowspan: 'rowSpan', srcset: 'srcSet', crossorigin: 'crossOrigin', spellcheck: 'spellCheck', contenteditable: 'contentEditable', allowfullscreen: 'allowFullScreen', formnovalidate: 'formNoValidate', novalidate: 'noValidate', playsinline: 'playsInline' };
@@ -14,6 +15,16 @@ const reserved = new Set('await break case catch class const continue debugger d
14
15
 
15
16
  export const frameworkLabels = { 'html-next': 'HTML Next', vue: 'Vue', react: 'React', svelte: 'Svelte' };
16
17
 
18
+ function vueExpression(value) {
19
+ if (typeof value === 'string') return singleQuoted(value);
20
+ if (Array.isArray(value)) return `[${value.map(vueExpression).join(', ')}]`;
21
+ if (value && typeof value === 'object') {
22
+ const fields = Object.entries(value).map(([name, item]) => `${key(name, singleQuoted)}: ${vueExpression(item)}`);
23
+ return fields.length ? `{ ${fields.join(', ')} }` : '{}';
24
+ }
25
+ return JSON.stringify(value);
26
+ }
27
+
17
28
  // Derive block layout from the tree. Mixed text and inline adjacency stay together.
18
29
  function layout(nodes, owner) {
19
30
  const structural = nodes.some(node => node.kind === 'slot' || node.kind === 'element' && (node.component || !inlineElements.has(node.tag)));
@@ -66,7 +77,7 @@ function attribute(value, target, component) {
66
77
  }
67
78
  name = component ? kebab(name) : value.name;
68
79
  if (data === true && nativeBooleans.has(name) && !component) return name;
69
- return typeof data === 'string' ? `${name}="${escapeHtml(data).replaceAll('{', '&#123;')}"` : `:${name}="${escapeHtml(JSON.stringify(data))}"`;
80
+ return typeof data === 'string' ? `${name}="${escapeHtml(data).replaceAll('{', '&#123;')}"` : `:${name}="${escapeHtml(vueExpression(data))}"`;
70
81
  }
71
82
 
72
83
  function snippetBindings(model) {
package/docs/site.mjs CHANGED
@@ -112,7 +112,7 @@ export async function prepareDocumentation({ root, config = {}, catalog }) {
112
112
  const links = tags.filter(tag => resourceByTag.has(tag)).map(tag => `<link rel="component" href="${escapeHtml(resourceByTag.get(tag).resource)}">`).join('\n');
113
113
  const setup = path.join(previews, key + '.js');
114
114
  if (example.behavior) await write(setup, `import setupExample from ${JSON.stringify(example.behavior)};\nexport function connect(host) { return setupExample(host.element); }\n`);
115
- await write(file, `${links}\n<template component="${previewTag(example)}"${example.behavior ? ` module="./${key}.js"` : ''}><defs><prop name="namespace" type="string" default="${key}">A unique namespace for this example's IDs and control relationships.</prop></defs><div><div data-preview="${escapeHtml(example.id)}"${component.group === 'layout' ? ' data-preview-layout' : ''}>${scopedExampleMarkup(example, base)}</div></div></template>\n`);
115
+ await write(file, `${links}\n<template component="${previewTag(example)}"${example.behavior ? ` module="./${key}.js"` : ''}><defs><prop name="namespace" type="string" default="${key}">A unique namespace for this example's IDs and control relationships.</prop></defs><div><div data-preview="${escapeHtml(example.id)}"${example.stretch || component.group === 'layout' ? ' data-preview-layout' : ''}>${scopedExampleMarkup(example, base)}</div></div></template>\n`);
116
116
  examples.push({ ...example, file, component: component.id, path: base + componentPath(component).slice(1) });
117
117
  }
118
118
  }
@@ -1,4 +1,4 @@
1
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
1
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
2
2
  @supports (-moz-appearance: none) {
3
3
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
4
4
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -144,8 +144,8 @@
144
144
  }
145
145
 
146
146
  :scope:where([data-component~="ui-button"])[data-ui-button-state~="size=xs"] {
147
- --_button-square-size: 1.5rem;
148
- min-block-size: 1.5rem;
147
+ --_button-square-size: var(--ui-control-size-xs);
148
+ min-block-size: var(--ui-control-size-xs);
149
149
  padding: calc(var(--ui-space-0-5) * 1.5) calc(var(--ui-space-1) * 1.25) !important;
150
150
  font-size: var(--ui-font-size-xs);
151
151
  }
@@ -483,8 +483,16 @@
483
483
  box-shadow: inset 0 0 0 1px oklch(from var(--_tone) l c h / 10%), inset 0 1px 2px oklch(from var(--_tone) l c h / 8%);
484
484
  }
485
485
 
486
+ :scope:where([data-component~="ui-button"])[data-appearance="ghost"][data-selected]:not(:disabled, [aria-disabled="true"]) {
487
+ background-color: var(--ui-button-ghost-active-surface, var(--ui-selection-surface));
488
+ color: var(--ui-button-ghost-text, var(--ui-selection-text));
489
+ border-color: transparent;
490
+ box-shadow: inset 0 0 0 1px var(--ui-selection-border);
491
+ }
492
+
486
493
  /* A soft halo that transitions in with the other box-shadow changes, layered on the raised shadow. */
487
- :scope:where([data-component~="ui-button"]):focus-visible {
494
+ :scope:where([data-component~="ui-button"]):focus-visible,
495
+ :scope:where([data-component~="ui-button"])[data-appearance="ghost"][data-selected]:focus-visible {
488
496
  outline: none;
489
497
  box-shadow:
490
498
  var(--ui-button-shadow, var(--ui-action-shadow, var(--_ui-action-shadow))),
@@ -524,12 +532,16 @@
524
532
  box-shadow: var(--ui-focus-halo);
525
533
  }
526
534
 
527
- /* Ghost keeps no border, but gains the same neutral surface as other disabled buttons. */
535
+ /* Disabled ghost actions keep the quiet variant's transparent surface and muted text. */
528
536
  :scope:where([data-component~="ui-button"])[data-appearance="ghost"]:is(:disabled, [aria-disabled="true"]:not([aria-busy="true"])) {
529
- background-color: var(--ui-disabled-surface);
537
+ background-color: transparent;
530
538
  border-color: transparent;
531
539
  }
532
540
 
541
+ :scope:where([data-component~="ui-button"])[data-appearance="ghost"][data-selected]:is(:disabled, [aria-disabled="true"]:not([aria-busy="true"])) {
542
+ background-color: var(--ui-disabled-surface);
543
+ }
544
+
533
545
  /* The size states outrank :host, so sm is named too, or a small button would stay small. */
534
546
 
535
547
  /* Under touch, a link-style button's press lands within the control minimum: an invisible hit
@@ -637,7 +649,7 @@
637
649
  /* A loading action stays visually active; only an explicitly disabled action takes the
638
650
  neutral disabled palette. Its flat surface and muted ink make the state unambiguous. */
639
651
 
640
- /* Ghost keeps no border, but gains the same neutral surface as other disabled buttons. */
652
+ /* Disabled ghost actions keep the quiet variant's transparent surface and muted text. */
641
653
 
642
654
  /* The size states outrank :host, so sm is named too, or a small button would stay small. */
643
655
 
@@ -651,7 +663,7 @@
651
663
 
652
664
  /* A component that sets its display still honours the hidden attribute on its root. */
653
665
  }
654
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
666
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
655
667
  @supports (-moz-appearance: none) {
656
668
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
657
669
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -685,7 +697,7 @@
685
697
 
686
698
  /* A component that sets its display still honours the hidden attribute on its root. */
687
699
  }
688
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
700
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
689
701
  @supports (-moz-appearance: none) {
690
702
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
691
703
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -722,6 +734,9 @@
722
734
  :scope:where([data-component~="ui-cluster"])[data-ui-cluster-state~="fixed"] {
723
735
  flex: none;
724
736
  }
737
+ :scope:where([data-component~="ui-cluster"])[data-ui-cluster-state~="padding=xs"] {
738
+ padding: var(--ui-space-1) !important;
739
+ }
725
740
  :scope:where([data-component~="ui-cluster"])[data-ui-cluster-state~="padding=s"] {
726
741
  padding: var(--ui-space-2) !important;
727
742
  }
@@ -796,7 +811,7 @@
796
811
 
797
812
  /* A component that sets its display still honours the hidden attribute on its root. */
798
813
  }
799
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
814
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
800
815
  @supports (-moz-appearance: none) {
801
816
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
802
817
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -895,7 +910,7 @@
895
910
 
896
911
  /* A component that sets its display still honours the hidden attribute on its root. */
897
912
  }
898
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
913
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
899
914
  @supports (-moz-appearance: none) {
900
915
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
901
916
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -922,6 +937,10 @@
922
937
  color: var(--ui-text-muted);
923
938
  }
924
939
 
940
+ :scope:where([data-component~="ui-icon"])[data-ui-icon-state~="directional"]:dir(rtl) svg {
941
+ transform: scaleX(-1);
942
+ }
943
+
925
944
  svg {
926
945
  inline-size: 100%;
927
946
  block-size: 100%;
@@ -936,7 +955,7 @@
936
955
  @scope ([data-component~="ui-icon"]) to ([data-component]) {
937
956
  /* A component that sets its display still honours the hidden attribute on its root. */
938
957
  }
939
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
958
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
940
959
  @supports (-moz-appearance: none) {
941
960
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
942
961
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -1210,6 +1229,7 @@
1210
1229
  :scope:where([data-component~="ui-icon-button"]) {
1211
1230
  /* The size prop resolves here; --ui-icon-button-size overrides it on an element. */
1212
1231
  --_size: 2rem;
1232
+ --_icon-button-hit-size: var(--ui-control-min-block-size);
1213
1233
  appearance: none;
1214
1234
  inline-size: var(--ui-icon-button-size, var(--_size));
1215
1235
  block-size: var(--ui-icon-button-size, var(--_size));
@@ -1250,8 +1270,8 @@
1250
1270
  content: "";
1251
1271
  position: absolute;
1252
1272
  inset: 50% auto auto 50%;
1253
- inline-size: max(100%, var(--ui-control-min-block-size));
1254
- block-size: max(100%, var(--ui-control-min-block-size));
1273
+ inline-size: max(100%, var(--_icon-button-hit-size));
1274
+ block-size: max(100%, var(--_icon-button-hit-size));
1255
1275
  transform: translate(-50%, -50%);
1256
1276
  }
1257
1277
  }
@@ -1264,11 +1284,16 @@
1264
1284
  content: "";
1265
1285
  position: absolute;
1266
1286
  inset: 50% auto auto 50%;
1267
- inline-size: max(100%, var(--ui-control-min-block-size));
1268
- block-size: max(100%, var(--ui-control-min-block-size));
1287
+ inline-size: max(100%, var(--_icon-button-hit-size));
1288
+ block-size: max(100%, var(--_icon-button-hit-size));
1269
1289
  transform: translate(-50%, -50%);
1270
1290
  }
1271
1291
 
1292
+ :scope:where([data-component~="ui-icon-button"])[data-ui-icon-button-state~="size=xs"] {
1293
+ --_size: var(--ui-control-size-xs);
1294
+ --_icon-button-hit-size: var(--ui-inline-control-min-block-size);
1295
+ }
1296
+
1272
1297
  :scope:where([data-component~="ui-icon-button"])[data-ui-icon-button-state~="size=sm"] {
1273
1298
  --_size: 1.75rem;
1274
1299
  inline-size: var(--ui-icon-button-size, var(--_size));
@@ -1298,6 +1323,10 @@
1298
1323
  inline-size: 100%;
1299
1324
  }
1300
1325
 
1326
+ :scope:where([data-component~="ui-icon-button"])[data-ui-icon-button-state~="matchButton"][data-ui-icon-button-state~="size=xs"] {
1327
+ --_size: var(--ui-control-size-xs);
1328
+ }
1329
+
1301
1330
  :scope:where([data-component~="ui-icon-button"])[data-ui-icon-button-state~="matchButton"][data-ui-icon-button-state~="size=sm"] {
1302
1331
  --_size: var(--ui-control-size-sm);
1303
1332
  }
@@ -1481,6 +1510,10 @@
1481
1510
  --_ui-default-icon-stroke-width: var(--_ui-icon-button-icon-stroke-width, 1.75);
1482
1511
  }
1483
1512
 
1513
+ :scope:where([data-component~="ui-icon-button"])[data-ui-icon-button-state~="size=xs"] {
1514
+ --_icon-button-icon-default: var(--ui-icon-size-xs);
1515
+ }
1516
+
1484
1517
  :scope:where([data-component~="ui-icon-button"])[data-ui-icon-button-state~="size=sm"] {
1485
1518
  --_icon-button-icon-default: var(--ui-icon-size-sm);
1486
1519
  }
@@ -1534,7 +1567,7 @@
1534
1567
 
1535
1568
  /* A component that sets its display still honours the hidden attribute on its root. */
1536
1569
  }
1537
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
1570
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
1538
1571
  @supports (-moz-appearance: none) {
1539
1572
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
1540
1573
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -1620,7 +1653,7 @@
1620
1653
 
1621
1654
  /* A component that sets its display still honours the hidden attribute on its root. */
1622
1655
  }
1623
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
1656
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
1624
1657
  @supports (-moz-appearance: none) {
1625
1658
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
1626
1659
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -1834,7 +1867,7 @@
1834
1867
  @media (prefers-reduced-motion: reduce) {
1835
1868
  }
1836
1869
  }
1837
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
1870
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
1838
1871
  @supports (-moz-appearance: none) {
1839
1872
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
1840
1873
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -2006,7 +2039,7 @@
2006
2039
 
2007
2040
  /* A component that sets its display still honours the hidden attribute on its root. */
2008
2041
  }
2009
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
2042
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
2010
2043
  @supports (-moz-appearance: none) {
2011
2044
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
2012
2045
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -2194,7 +2227,7 @@
2194
2227
  @media (prefers-reduced-motion: reduce) {
2195
2228
  }
2196
2229
  }
2197
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
2230
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
2198
2231
  @supports (-moz-appearance: none) {
2199
2232
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
2200
2233
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -2273,7 +2306,7 @@
2273
2306
  @scope ([data-component~="ui-stack"]) to ([data-component]) {
2274
2307
  /* A component that sets its display still honours the hidden attribute on its root. */
2275
2308
  }
2276
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
2309
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
2277
2310
  @supports (-moz-appearance: none) {
2278
2311
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
2279
2312
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -2458,7 +2491,7 @@
2458
2491
 
2459
2492
  /* A component that sets its display still honours the hidden attribute on its root. */
2460
2493
  }
2461
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
2494
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
2462
2495
  @supports (-moz-appearance: none) {
2463
2496
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
2464
2497
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -2733,7 +2766,7 @@
2733
2766
  @media (prefers-reduced-motion: reduce) {
2734
2767
  }
2735
2768
  }
2736
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
2769
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
2737
2770
  @supports (-moz-appearance: none) {
2738
2771
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
2739
2772
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -2991,7 +3024,7 @@
2991
3024
 
2992
3025
  /* A component that sets its display still honours the hidden attribute on its root. */
2993
3026
  }
2994
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
3027
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
2995
3028
  @supports (-moz-appearance: none) {
2996
3029
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
2997
3030
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -3199,7 +3232,7 @@
3199
3232
 
3200
3233
  /* A component that sets its display still honours the hidden attribute on its root. */
3201
3234
  }
3202
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
3235
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
3203
3236
  @supports (-moz-appearance: none) {
3204
3237
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
3205
3238
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -3368,7 +3401,7 @@
3368
3401
 
3369
3402
  /* A component that sets its display still honours the hidden attribute on its root. */
3370
3403
  }
3371
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
3404
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
3372
3405
  @supports (-moz-appearance: none) {
3373
3406
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
3374
3407
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -3415,7 +3448,7 @@
3415
3448
  @scope ([data-component~="ui-separator"]) to ([data-component]) {
3416
3449
  /* The root is the hr, so the rules name :host; a bare hr matches only a descendant. */
3417
3450
  }
3418
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
3451
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
3419
3452
  @supports (-moz-appearance: none) {
3420
3453
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
3421
3454
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
@@ -3554,7 +3587,7 @@
3554
3587
 
3555
3588
  /* A component that sets its display still honours the hidden attribute on its root. */
3556
3589
  }
3557
- /* Generated by HTML Next 1.0.0-alpha.76. Do not edit. */
3590
+ /* Generated by HTML Next 1.0.0-alpha.79. Do not edit. */
3558
3591
  @supports (-moz-appearance: none) {
3559
3592
  :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
3560
3593
  :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
package/editor/icons.d.ts CHANGED
@@ -18,10 +18,12 @@ export declare const LOOMA_ICONS: {
18
18
  unlink: IconNode;
19
19
  braces: IconNode;
20
20
  calculator: IconNode;
21
+ calendar: IconNode;
21
22
  check: IconNode;
22
23
  'circle-check': IconNode;
23
24
  'circle-dot': IconNode;
24
25
  'circle-x': IconNode;
26
+ clock: IconNode;
25
27
  'chevron-down': IconNode;
26
28
  'chevron-left': IconNode;
27
29
  'chevron-right': IconNode;