@threadlabs/looma 0.52.11 → 0.53.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 (341) hide show
  1. package/components/shared/overlay.js +7 -0
  2. package/components/ui-editor-toolbar/ui-editor-toolbar.html +2 -2
  3. package/components/ui-meter/ui-meter.html +1 -1
  4. package/dist/index.js +1 -1
  5. package/docs/catalog.json +1 -1
  6. package/editor/components.css +19 -19
  7. package/editor/index.js +1125 -853
  8. package/package.json +3 -3
  9. package/styles/ui-action-bar.css +1 -1
  10. package/styles/ui-affordance-scope.css +1 -1
  11. package/styles/ui-avatar-group.css +1 -1
  12. package/styles/ui-avatar.css +1 -1
  13. package/styles/ui-badge.css +1 -1
  14. package/styles/ui-breadcrumb-item.css +1 -1
  15. package/styles/ui-breadcrumbs.css +1 -1
  16. package/styles/ui-button.css +1 -1
  17. package/styles/ui-calendar.css +1 -1
  18. package/styles/ui-callout.css +1 -1
  19. package/styles/ui-card-group.css +1 -1
  20. package/styles/ui-card.css +1 -1
  21. package/styles/ui-checkbox.css +1 -1
  22. package/styles/ui-cluster.css +1 -1
  23. package/styles/ui-color-picker.css +1 -1
  24. package/styles/ui-column.css +1 -1
  25. package/styles/ui-combobox.css +1 -1
  26. package/styles/ui-compact-content.css +1 -1
  27. package/styles/ui-compact-editor.css +1 -1
  28. package/styles/ui-compact-mark.css +1 -1
  29. package/styles/ui-compact-node.css +1 -1
  30. package/styles/ui-container.css +1 -1
  31. package/styles/ui-context-menu.css +1 -1
  32. package/styles/ui-cover.css +1 -1
  33. package/styles/ui-curve-editor.css +1 -1
  34. package/styles/ui-cycle-button.css +1 -1
  35. package/styles/ui-data-table.css +1 -1
  36. package/styles/ui-date-field.css +1 -1
  37. package/styles/ui-date-picker.css +1 -1
  38. package/styles/ui-date-range-picker.css +1 -1
  39. package/styles/ui-description-item.css +1 -1
  40. package/styles/ui-description-list.css +1 -1
  41. package/styles/ui-dialog.css +1 -1
  42. package/styles/ui-disclosure.css +1 -1
  43. package/styles/ui-editable.css +1 -1
  44. package/styles/ui-editor-block-actions.css +1 -1
  45. package/styles/ui-editor-chip-editor.css +1 -1
  46. package/styles/ui-editor-code-language.css +1 -1
  47. package/styles/ui-editor-footnote-editor.css +1 -1
  48. package/styles/ui-editor-formatting-tools.css +1 -1
  49. package/styles/ui-editor-image-toolbar.css +1 -1
  50. package/styles/ui-editor-insert-table-grid.css +1 -1
  51. package/styles/ui-editor-link-card.css +1 -1
  52. package/styles/ui-editor-link-form.css +1 -1
  53. package/styles/ui-editor-mention-menu-item.css +1 -1
  54. package/styles/ui-editor-mention-menu.css +1 -1
  55. package/styles/ui-editor-slash-menu-group.css +1 -1
  56. package/styles/ui-editor-slash-menu-item.css +1 -1
  57. package/styles/ui-editor-slash-menu.css +1 -1
  58. package/styles/ui-editor-surface.css +1 -1
  59. package/styles/ui-editor-table-context-menu.css +1 -1
  60. package/styles/ui-editor-table-overlay.css +1 -1
  61. package/styles/ui-editor-table-toolbar.css +1 -1
  62. package/styles/ui-editor-toolbar.css +1 -1
  63. package/styles/ui-editor.css +1 -1
  64. package/styles/ui-file-input.css +1 -1
  65. package/styles/ui-floating-action-button.css +1 -1
  66. package/styles/ui-form-field.css +1 -1
  67. package/styles/ui-grid.css +1 -1
  68. package/styles/ui-icon-button.css +1 -1
  69. package/styles/ui-icon.css +1 -1
  70. package/styles/ui-image.css +1 -1
  71. package/styles/ui-input-group.css +1 -1
  72. package/styles/ui-input.css +1 -1
  73. package/styles/ui-light-editor.css +1 -1
  74. package/styles/ui-list-item.css +1 -1
  75. package/styles/ui-list.css +1 -1
  76. package/styles/ui-listbox.css +1 -1
  77. package/styles/ui-menu-group.css +1 -1
  78. package/styles/ui-menu-item.css +1 -1
  79. package/styles/ui-menu.css +1 -1
  80. package/styles/ui-meter.css +1 -1
  81. package/styles/ui-nav-item.css +1 -1
  82. package/styles/ui-notice-stripe.css +1 -1
  83. package/styles/ui-number-input.css +1 -1
  84. package/styles/ui-page-header.css +1 -1
  85. package/styles/ui-pagination.css +1 -1
  86. package/styles/ui-popover.css +1 -1
  87. package/styles/ui-radio-group.css +1 -1
  88. package/styles/ui-radio.css +1 -1
  89. package/styles/ui-reel.css +1 -1
  90. package/styles/ui-scroll-area.css +1 -1
  91. package/styles/ui-search-result-row.css +1 -1
  92. package/styles/ui-search-shell.css +1 -1
  93. package/styles/ui-section.css +1 -1
  94. package/styles/ui-segmented-control.css +1 -1
  95. package/styles/ui-select.css +1 -1
  96. package/styles/ui-separator.css +1 -1
  97. package/styles/ui-sidebar.css +1 -1
  98. package/styles/ui-site-header.css +1 -1
  99. package/styles/ui-skeleton.css +1 -1
  100. package/styles/ui-slider.css +1 -1
  101. package/styles/ui-spinner.css +1 -1
  102. package/styles/ui-stack.css +1 -1
  103. package/styles/ui-status-message.css +1 -1
  104. package/styles/ui-swatch.css +1 -1
  105. package/styles/ui-switch.css +1 -1
  106. package/styles/ui-switcher.css +1 -1
  107. package/styles/ui-table.css +1 -1
  108. package/styles/ui-tabs.css +1 -1
  109. package/styles/ui-text.css +1 -1
  110. package/styles/ui-textarea.css +1 -1
  111. package/styles/ui-time-field.css +1 -1
  112. package/styles/ui-time-picker.css +1 -1
  113. package/styles/ui-toast-region.css +1 -1
  114. package/styles/ui-toast.css +1 -1
  115. package/styles/ui-tooltip.css +1 -1
  116. package/styles/ui-top-bar.css +1 -1
  117. package/styles/ui-tree-item.css +1 -1
  118. package/styles/ui-tree.css +1 -1
  119. package/styles/ui-wizard.css +1 -1
  120. package/vanilla/UiActionBar.d.ts +1 -1
  121. package/vanilla/UiActionBar.js +14 -12
  122. package/vanilla/UiAffordanceScope.d.ts +1 -1
  123. package/vanilla/UiAffordanceScope.js +13 -11
  124. package/vanilla/UiAvatar.d.ts +1 -1
  125. package/vanilla/UiAvatar.js +27 -25
  126. package/vanilla/UiAvatarGroup.d.ts +1 -1
  127. package/vanilla/UiAvatarGroup.js +26 -23
  128. package/vanilla/UiBadge.d.ts +1 -1
  129. package/vanilla/UiBadge.js +14 -12
  130. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  131. package/vanilla/UiBreadcrumbItem.js +14 -13
  132. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  133. package/vanilla/UiBreadcrumbs.js +10 -10
  134. package/vanilla/UiButton.d.ts +1 -1
  135. package/vanilla/UiButton.js +187 -244
  136. package/vanilla/UiCalendar.d.ts +1 -1
  137. package/vanilla/UiCalendar.js +272 -193
  138. package/vanilla/UiCallout.d.ts +1 -1
  139. package/vanilla/UiCallout.js +32 -27
  140. package/vanilla/UiCard.d.ts +1 -1
  141. package/vanilla/UiCard.js +72 -69
  142. package/vanilla/UiCardGroup.d.ts +1 -1
  143. package/vanilla/UiCardGroup.js +17 -15
  144. package/vanilla/UiCheckbox.d.ts +1 -1
  145. package/vanilla/UiCheckbox.js +32 -30
  146. package/vanilla/UiCluster.d.ts +1 -1
  147. package/vanilla/UiCluster.js +20 -18
  148. package/vanilla/UiColorPicker.d.ts +1 -1
  149. package/vanilla/UiColorPicker.js +22 -20
  150. package/vanilla/UiColumn.d.ts +2 -2
  151. package/vanilla/UiColumn.js +18 -15
  152. package/vanilla/UiCombobox.d.ts +3 -3
  153. package/vanilla/UiCombobox.js +237 -174
  154. package/vanilla/UiCompactContent.d.ts +1 -1
  155. package/vanilla/UiCompactContent.js +13 -8
  156. package/vanilla/UiCompactEditor.d.ts +1 -1
  157. package/vanilla/UiCompactEditor.js +17 -12
  158. package/vanilla/UiCompactMark.d.ts +1 -1
  159. package/vanilla/UiCompactMark.js +47 -45
  160. package/vanilla/UiCompactNode.d.ts +2 -2
  161. package/vanilla/UiCompactNode.js +37 -33
  162. package/vanilla/UiContainer.d.ts +1 -1
  163. package/vanilla/UiContainer.js +13 -11
  164. package/vanilla/UiContextMenu.d.ts +1 -1
  165. package/vanilla/UiContextMenu.js +11 -9
  166. package/vanilla/UiCover.d.ts +1 -1
  167. package/vanilla/UiCover.js +13 -11
  168. package/vanilla/UiCurveEditor.d.ts +1 -1
  169. package/vanilla/UiCurveEditor.js +40 -38
  170. package/vanilla/UiCycleButton.d.ts +2 -2
  171. package/vanilla/UiCycleButton.js +31 -26
  172. package/vanilla/UiDataTable.d.ts +1 -1
  173. package/vanilla/UiDataTable.js +26 -20
  174. package/vanilla/UiDateField.d.ts +1 -1
  175. package/vanilla/UiDateField.js +78 -75
  176. package/vanilla/UiDatePicker.d.ts +1 -1
  177. package/vanilla/UiDatePicker.js +155 -149
  178. package/vanilla/UiDateRangePicker.d.ts +1 -1
  179. package/vanilla/UiDateRangePicker.js +136 -128
  180. package/vanilla/UiDescriptionItem.d.ts +1 -1
  181. package/vanilla/UiDescriptionItem.js +13 -11
  182. package/vanilla/UiDescriptionList.d.ts +1 -1
  183. package/vanilla/UiDescriptionList.js +13 -11
  184. package/vanilla/UiDialog.d.ts +1 -1
  185. package/vanilla/UiDialog.js +14 -14
  186. package/vanilla/UiDisclosure.d.ts +1 -1
  187. package/vanilla/UiDisclosure.js +28 -26
  188. package/vanilla/UiEditable.d.ts +1 -1
  189. package/vanilla/UiEditable.js +29 -27
  190. package/vanilla/UiEditor.d.ts +1 -1
  191. package/vanilla/UiEditor.js +62 -58
  192. package/vanilla/UiEditorBlockActions.d.ts +1 -1
  193. package/vanilla/UiEditorBlockActions.js +14 -12
  194. package/vanilla/UiEditorChipEditor.d.ts +1 -1
  195. package/vanilla/UiEditorChipEditor.js +22 -14
  196. package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
  197. package/vanilla/UiEditorCodeLanguage.js +23 -16
  198. package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
  199. package/vanilla/UiEditorFootnoteEditor.js +17 -9
  200. package/vanilla/UiEditorFormattingTools.d.ts +1 -1
  201. package/vanilla/UiEditorFormattingTools.js +108 -71
  202. package/vanilla/UiEditorImageToolbar.d.ts +1 -1
  203. package/vanilla/UiEditorImageToolbar.js +68 -66
  204. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  205. package/vanilla/UiEditorInsertTableGrid.js +50 -35
  206. package/vanilla/UiEditorLinkCard.d.ts +1 -1
  207. package/vanilla/UiEditorLinkCard.js +27 -25
  208. package/vanilla/UiEditorLinkForm.d.ts +1 -1
  209. package/vanilla/UiEditorLinkForm.js +79 -57
  210. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  211. package/vanilla/UiEditorMentionMenu.js +63 -44
  212. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  213. package/vanilla/UiEditorMentionMenuItem.js +22 -16
  214. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  215. package/vanilla/UiEditorSlashMenu.js +52 -33
  216. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  217. package/vanilla/UiEditorSlashMenuGroup.js +19 -14
  218. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  219. package/vanilla/UiEditorSlashMenuItem.js +27 -25
  220. package/vanilla/UiEditorSurface.d.ts +1 -1
  221. package/vanilla/UiEditorSurface.js +13 -11
  222. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  223. package/vanilla/UiEditorTableContextMenu.js +81 -52
  224. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  225. package/vanilla/UiEditorTableOverlay.js +107 -68
  226. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  227. package/vanilla/UiEditorTableToolbar.js +121 -70
  228. package/vanilla/UiEditorToolbar.d.ts +1 -1
  229. package/vanilla/UiEditorToolbar.js +20 -12
  230. package/vanilla/UiFileInput.d.ts +1 -1
  231. package/vanilla/UiFileInput.js +94 -80
  232. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  233. package/vanilla/UiFloatingActionButton.js +21 -20
  234. package/vanilla/UiFormField.d.ts +1 -1
  235. package/vanilla/UiFormField.js +21 -19
  236. package/vanilla/UiGrid.d.ts +1 -1
  237. package/vanilla/UiGrid.js +26 -23
  238. package/vanilla/UiIcon.d.ts +1 -1
  239. package/vanilla/UiIcon.js +20 -15
  240. package/vanilla/UiIconButton.d.ts +1 -1
  241. package/vanilla/UiIconButton.js +35 -43
  242. package/vanilla/UiImage.d.ts +1 -1
  243. package/vanilla/UiImage.js +16 -14
  244. package/vanilla/UiInput.d.ts +1 -1
  245. package/vanilla/UiInput.js +29 -35
  246. package/vanilla/UiInputGroup.d.ts +1 -1
  247. package/vanilla/UiInputGroup.js +16 -14
  248. package/vanilla/UiLightEditor.d.ts +1 -1
  249. package/vanilla/UiLightEditor.js +29 -27
  250. package/vanilla/UiList.d.ts +1 -1
  251. package/vanilla/UiList.js +33 -27
  252. package/vanilla/UiListItem.d.ts +1 -1
  253. package/vanilla/UiListItem.js +12 -12
  254. package/vanilla/UiListbox.d.ts +1 -1
  255. package/vanilla/UiListbox.js +90 -80
  256. package/vanilla/UiMenu.d.ts +1 -1
  257. package/vanilla/UiMenu.js +20 -12
  258. package/vanilla/UiMenuGroup.d.ts +1 -1
  259. package/vanilla/UiMenuGroup.js +14 -11
  260. package/vanilla/UiMenuItem.d.ts +1 -1
  261. package/vanilla/UiMenuItem.js +74 -75
  262. package/vanilla/UiMeter.d.ts +1 -1
  263. package/vanilla/UiMeter.js +67 -62
  264. package/vanilla/UiNavItem.d.ts +1 -1
  265. package/vanilla/UiNavItem.js +63 -65
  266. package/vanilla/UiNoticeStripe.d.ts +1 -1
  267. package/vanilla/UiNoticeStripe.js +16 -16
  268. package/vanilla/UiNumberInput.d.ts +1 -1
  269. package/vanilla/UiNumberInput.js +41 -38
  270. package/vanilla/UiPageHeader.d.ts +1 -1
  271. package/vanilla/UiPageHeader.js +17 -15
  272. package/vanilla/UiPagination.d.ts +1 -1
  273. package/vanilla/UiPagination.js +53 -44
  274. package/vanilla/UiPopover.d.ts +1 -1
  275. package/vanilla/UiPopover.js +13 -11
  276. package/vanilla/UiRadio.d.ts +1 -1
  277. package/vanilla/UiRadio.js +25 -23
  278. package/vanilla/UiRadioGroup.d.ts +1 -1
  279. package/vanilla/UiRadioGroup.js +33 -36
  280. package/vanilla/UiReel.d.ts +1 -1
  281. package/vanilla/UiReel.js +20 -12
  282. package/vanilla/UiScrollArea.d.ts +1 -1
  283. package/vanilla/UiScrollArea.js +13 -11
  284. package/vanilla/UiSearchResultRow.d.ts +1 -1
  285. package/vanilla/UiSearchResultRow.js +21 -20
  286. package/vanilla/UiSearchShell.d.ts +1 -1
  287. package/vanilla/UiSearchShell.js +16 -14
  288. package/vanilla/UiSection.d.ts +1 -1
  289. package/vanilla/UiSection.js +48 -45
  290. package/vanilla/UiSegmentedControl.d.ts +2 -2
  291. package/vanilla/UiSegmentedControl.js +52 -47
  292. package/vanilla/UiSelect.d.ts +1 -1
  293. package/vanilla/UiSelect.js +17 -21
  294. package/vanilla/UiSeparator.d.ts +1 -1
  295. package/vanilla/UiSeparator.js +12 -12
  296. package/vanilla/UiSidebar.d.ts +1 -1
  297. package/vanilla/UiSidebar.js +17 -15
  298. package/vanilla/UiSiteHeader.d.ts +1 -1
  299. package/vanilla/UiSiteHeader.js +25 -23
  300. package/vanilla/UiSkeleton.d.ts +1 -1
  301. package/vanilla/UiSkeleton.js +21 -20
  302. package/vanilla/UiSlider.d.ts +1 -1
  303. package/vanilla/UiSlider.js +50 -47
  304. package/vanilla/UiSpinner.d.ts +1 -1
  305. package/vanilla/UiSpinner.js +34 -27
  306. package/vanilla/UiStack.d.ts +1 -1
  307. package/vanilla/UiStack.js +12 -12
  308. package/vanilla/UiStatusMessage.d.ts +1 -1
  309. package/vanilla/UiStatusMessage.js +22 -21
  310. package/vanilla/UiSwatch.d.ts +1 -1
  311. package/vanilla/UiSwatch.js +20 -17
  312. package/vanilla/UiSwitch.d.ts +1 -1
  313. package/vanilla/UiSwitch.js +25 -23
  314. package/vanilla/UiSwitcher.d.ts +1 -1
  315. package/vanilla/UiSwitcher.js +13 -11
  316. package/vanilla/UiTable.d.ts +1 -1
  317. package/vanilla/UiTable.js +13 -11
  318. package/vanilla/UiTabs.d.ts +1 -1
  319. package/vanilla/UiTabs.js +39 -28
  320. package/vanilla/UiText.d.ts +1 -1
  321. package/vanilla/UiText.js +128 -125
  322. package/vanilla/UiTextarea.d.ts +1 -1
  323. package/vanilla/UiTextarea.js +27 -39
  324. package/vanilla/UiTimeField.d.ts +1 -1
  325. package/vanilla/UiTimeField.js +42 -40
  326. package/vanilla/UiTimePicker.d.ts +1 -1
  327. package/vanilla/UiTimePicker.js +105 -102
  328. package/vanilla/UiToast.d.ts +1 -1
  329. package/vanilla/UiToast.js +14 -14
  330. package/vanilla/UiToastRegion.d.ts +1 -1
  331. package/vanilla/UiToastRegion.js +61 -31
  332. package/vanilla/UiTooltip.d.ts +1 -1
  333. package/vanilla/UiTooltip.js +17 -14
  334. package/vanilla/UiTopBar.d.ts +1 -1
  335. package/vanilla/UiTopBar.js +24 -22
  336. package/vanilla/UiTree.d.ts +1 -1
  337. package/vanilla/UiTree.js +17 -12
  338. package/vanilla/UiTreeItem.d.ts +1 -1
  339. package/vanilla/UiTreeItem.js +73 -79
  340. package/vanilla/UiWizard.d.ts +1 -1
  341. package/vanilla/UiWizard.js +61 -40
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
2
  export interface UiCalloutEventMap {
3
3
  }
4
4
  export interface UiCalloutElement extends HTMLDivElement {
@@ -1,5 +1,5 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, clearRegion, toText, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkString, defineComponent } from "@nextwebwg/html-next/generated-runtime";
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, equalValue, buildTemplate, clearRegion, toAttribute, toText, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkString, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
3
3
  import "../styles/ui-callout.css";
4
4
 
5
5
  const T0 = ["",[],"\n ",["span",["class","icon","aria-hidden","true"],"\n ",1,"\n ",1,"\n ",1,"\n ",1,"\n ",1,"\n ",1,"\n ",1,"\n "],"\n ",["div",["class","content"],"\n ",1,"\n ",4,"\n "],"\n "];
@@ -17,12 +17,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-callout", b: generatedInput
17
17
  const D = { g: "ui-callout", props: { "heading": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "tone": { "required":false,"values":["info","neutral","note","tip","important","warning","caution","success","danger"],"default":"info", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
18
18
 
19
19
  export function createUiCallout(options = {}, html) {
20
- const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
20
+ const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
21
+ const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["heading","tone"].includes(name)));
21
22
  const element = document.createElement("div");
22
- for (const [name, value] of Object.entries(attributes)) {
23
- if (value === null || value === undefined || value === false) continue;
24
- element.setAttribute(name, value === true ? "" : String(value));
25
- }
26
23
  if (!element.hasAttribute("role")) element.setAttribute("role", "note");
27
24
  element.setAttribute("component", "ui-callout");
28
25
  element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
@@ -107,44 +104,51 @@ export function createUiCallout(options = {}, html) {
107
104
  const p9 = (r, c, d) => {
108
105
  };
109
106
  const p0 = (r, c, d) => {
107
+ if (c === -1) {
108
+ resetForwardedAttributes(r.n, attributes, r.v0);
109
+ r.v0 = forwardAttributes(r.n, attributes);
110
+ const x0 = "note";
111
+ const s1 = toAttribute(x0, "role");
112
+ writeAttribute(r.n, "role", r.v1 = s1);
113
+ }
110
114
  if (c & 2) {
111
- const x0 = hostState(["tone"], [v[1]]);
112
- const s0 = x0;
113
- if (s0 !== r.v0) writeAttribute(r.n, "data-ui-callout-state", (r.v0 = s0) === "" ? null : s0);
115
+ const x1 = hostState(["tone"], [v[1]]);
116
+ const s2 = x1;
117
+ if (s2 !== r.v2) writeAttribute(r.n, "data-ui-callout-state", (r.v2 = s2) === "" ? null : s2);
114
118
  }
115
- if (c & 2 && !((v[1] === "info")) !== !r.b0) {
116
- if (r.b0) { r.b0 = undefined; clearRegion(r.a0, r.e0); }
119
+ if (c & 2 && !(truthy(equalValue(v[1], "info"))) !== !r.b0) {
120
+ if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
117
121
  else { r.b0 = m1(d); r.e0.before(r.b0.n); }
118
122
  } else if (r.b0 !== undefined) p1(r.b0, c, d);
119
- if (c & 2 && !(((v[1] === "neutral") || (v[1] === "note"))) !== !r.b1) {
120
- if (r.b1) { r.b1 = undefined; clearRegion(r.a1, r.e1); }
123
+ if (c & 2 && !((truthy(equalValue(v[1], "neutral")) || truthy(equalValue(v[1], "note")))) !== !r.b1) {
124
+ if (r.b1) { r.b1 = undefined; clearRegion(r.a2, r.e1); }
121
125
  else { r.b1 = m2(d); r.e1.before(r.b1.n); }
122
126
  } else if (r.b1 !== undefined) p2(r.b1, c, d);
123
- if (c & 2 && !((v[1] === "tip")) !== !r.b2) {
124
- if (r.b2) { r.b2 = undefined; clearRegion(r.a2, r.e2); }
127
+ if (c & 2 && !(truthy(equalValue(v[1], "tip"))) !== !r.b2) {
128
+ if (r.b2) { r.b2 = undefined; clearRegion(r.a3, r.e2); }
125
129
  else { r.b2 = m3(d); r.e2.before(r.b2.n); }
126
130
  } else if (r.b2 !== undefined) p3(r.b2, c, d);
127
- if (c & 2 && !((v[1] === "important")) !== !r.b3) {
128
- if (r.b3) { r.b3 = undefined; clearRegion(r.a3, r.e3); }
131
+ if (c & 2 && !(truthy(equalValue(v[1], "important"))) !== !r.b3) {
132
+ if (r.b3) { r.b3 = undefined; clearRegion(r.a4, r.e3); }
129
133
  else { r.b3 = m4(d); r.e3.before(r.b3.n); }
130
134
  } else if (r.b3 !== undefined) p4(r.b3, c, d);
131
- if (c & 2 && !((v[1] === "warning")) !== !r.b4) {
132
- if (r.b4) { r.b4 = undefined; clearRegion(r.a4, r.e4); }
135
+ if (c & 2 && !(truthy(equalValue(v[1], "warning"))) !== !r.b4) {
136
+ if (r.b4) { r.b4 = undefined; clearRegion(r.a5, r.e4); }
133
137
  else { r.b4 = m5(d); r.e4.before(r.b4.n); }
134
138
  } else if (r.b4 !== undefined) p5(r.b4, c, d);
135
- if (c & 2 && !((v[1] === "success")) !== !r.b5) {
136
- if (r.b5) { r.b5 = undefined; clearRegion(r.a5, r.e5); }
139
+ if (c & 2 && !(truthy(equalValue(v[1], "success"))) !== !r.b5) {
140
+ if (r.b5) { r.b5 = undefined; clearRegion(r.a6, r.e5); }
137
141
  else { r.b5 = m6(d); r.e5.before(r.b5.n); }
138
142
  } else if (r.b5 !== undefined) p6(r.b5, c, d);
139
- if (c & 2 && !(((v[1] === "danger") || (v[1] === "caution"))) !== !r.b6) {
140
- if (r.b6) { r.b6 = undefined; clearRegion(r.a6, r.e6); }
143
+ if (c & 2 && !((truthy(equalValue(v[1], "danger")) || truthy(equalValue(v[1], "caution")))) !== !r.b6) {
144
+ if (r.b6) { r.b6 = undefined; clearRegion(r.a7, r.e6); }
141
145
  else { r.b6 = m7(d); r.e6.before(r.b6.n); }
142
146
  } else if (r.b6 !== undefined) p7(r.b6, c, d);
143
147
  if (c & 1 && !(truthy(v[0])) !== !r.b7) {
144
- if (r.b7) { r.b7 = undefined; clearRegion(r.a7, r.e7); }
148
+ if (r.b7) { r.b7 = undefined; clearRegion(r.a8, r.e7); }
145
149
  else { r.b7 = m8(d); r.e7.before(r.b7.n); }
146
150
  } else if (r.b7 !== undefined) p8(r.b7, c, d);
147
- if (r.f8 === undefined) { r.f8 = 1; const at = fillSlot(r.a8, r.e8, "", J, false, undefined, d);
151
+ if (r.f8 === undefined) { r.f8 = 1; const at = fillSlot(r.a9, r.e8, "", J, false, undefined, d);
148
152
  if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b8 = m9(d); at.before(r.b8.n); } }
149
153
  else if (r.b8 !== undefined) p9(r.b8, c, d);
150
154
  };
@@ -159,9 +163,10 @@ export function createUiCallout(options = {}, html) {
159
163
  const t8 = t0.nextSibling.nextSibling;
160
164
  const t9 = t8.firstChild.nextSibling;
161
165
  const t10 = t9.nextSibling.nextSibling.nextSibling;
162
- const R = { n: element, v0: undefined, a0: t1, e0: t1.nextSibling, b0: undefined, a1: t2, e1: t2.nextSibling, b1: undefined, a2: t3, e2: t3.nextSibling, b2: undefined, a3: t4, e3: t4.nextSibling, b3: undefined, a4: t5, e4: t5.nextSibling, b4: undefined, a5: t6, e5: t6.nextSibling, b5: undefined, a6: t7, e6: t7.nextSibling, b6: undefined, a7: t9, e7: t9.nextSibling, b7: undefined, a8: t10, e8: t10.nextSibling, b8: undefined, f8: undefined };
166
+ const R = { n: element, v0: undefined, v1: undefined, v2: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, a2: t2, e1: t2.nextSibling, b1: undefined, a3: t3, e2: t3.nextSibling, b2: undefined, a4: t4, e3: t4.nextSibling, b3: undefined, a5: t5, e4: t5.nextSibling, b4: undefined, a6: t6, e5: t6.nextSibling, b5: undefined, a7: t7, e6: t7.nextSibling, b6: undefined, a8: t9, e7: t9.nextSibling, b7: undefined, a9: t10, e8: t10.nextSibling, b8: undefined, f8: undefined };
163
167
  const I = { B };
164
168
  const J = project(I, children, slots);
169
+ I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
165
170
  attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
166
171
  manageProps(I);
167
172
  return element;
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
2
  export interface UiCardEventMap {
3
3
  }
4
4
  export interface UiCardElement extends HTMLElement {
package/vanilla/UiCard.js CHANGED
@@ -1,5 +1,5 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, armElement, replaceRoot, checkBoolean, checkFormat, defineComponent } from "@nextwebwg/html-next/generated-runtime";
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, equalValue, buildTemplate, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, armElement, replaceRoot, checkBoolean, checkFormat, initializeSlot, sharePlainSlots, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
3
3
  import "../styles/ui-card.css";
4
4
 
5
5
  const T0 = ["",[],"\n ",["div",["class","header"],4],"\n ",["div",["class","content"],4],"\n ",["div",["class","actions"],4],"\n "];
@@ -25,38 +25,23 @@ const Q = [[],[],[],[]];
25
25
  const D = { g: "ui-card", props: { "as": { "required":false,"values":["div","section","article","aside"],"default":"div", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "fill": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "padding": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["content","sm","md","lg"],"default":"content", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "tone": { "required":false,"values":["neutral","accent","accent-secondary","accent-tertiary","info","success","warning","danger"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "treatment": { "required":false,"values":["standard","expressive"],"default":"standard", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outlined","subtle","elevated","placeholder"],"default":"outlined", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
26
26
 
27
27
  export function createUiCard(options = {}, html) {
28
- const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
28
+ const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
29
+ const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["as","fill","padding","size","tone","treatment","variant"].includes(name)));
29
30
  const v = [null, null, null, null, null, null, null];
30
31
  let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
31
- let a = ((v[0] === "section") ? 0 : (v[0] === "article") ? 1 : (v[0] === "aside") ? 2 : 3);
32
+ let a = (truthy(equalValue(v[0], "section")) ? 0 : truthy(equalValue(v[0], "article")) ? 1 : truthy(equalValue(v[0], "aside")) ? 2 : 3);
32
33
  let element;
33
34
  if (a === 0) {
34
35
  element = document.createElement("section");
35
- for (const [name, value] of Object.entries(attributes)) {
36
- if (value === null || value === undefined || value === false) continue;
37
- element.setAttribute(name, value === true ? "" : String(value));
38
- }
39
36
  element.setAttribute("component", "ui-card");
40
37
  } else if (a === 1) {
41
38
  element = document.createElement("article");
42
- for (const [name, value] of Object.entries(attributes)) {
43
- if (value === null || value === undefined || value === false) continue;
44
- element.setAttribute(name, value === true ? "" : String(value));
45
- }
46
39
  element.setAttribute("component", "ui-card");
47
40
  } else if (a === 2) {
48
41
  element = document.createElement("aside");
49
- for (const [name, value] of Object.entries(attributes)) {
50
- if (value === null || value === undefined || value === false) continue;
51
- element.setAttribute(name, value === true ? "" : String(value));
52
- }
53
42
  element.setAttribute("component", "ui-card");
54
43
  } else {
55
44
  element = document.createElement("div");
56
- for (const [name, value] of Object.entries(attributes)) {
57
- if (value === null || value === undefined || value === false) continue;
58
- element.setAttribute(name, value === true ? "" : String(value));
59
- }
60
45
  element.setAttribute("component", "ui-card");
61
46
  }
62
47
  B = acceptProps(element, D, S.n, v, componentProps, Q[a], html);
@@ -163,25 +148,29 @@ export function createUiCard(options = {}, html) {
163
148
  const t2 = t0.nextSibling.nextSibling;
164
149
  const t3 = t2.firstChild;
165
150
  const t4 = t2.nextSibling.nextSibling.firstChild;
166
- const r = { n, v0: undefined, a0: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a1: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a2: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
151
+ const r = { n, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
167
152
  p0(r, -1, d);
168
153
  return r;
169
154
  };
170
155
  const p0 = (r, c, d) => {
156
+ if (c === -1) {
157
+ resetForwardedAttributes(r.n, attributes, r.v0);
158
+ r.v0 = forwardAttributes(r.n, attributes);
159
+ }
171
160
  if (c & 126) {
172
161
  const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
173
- const s0 = x0;
174
- if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
162
+ const s1 = x0;
163
+ if (s1 !== r.v1) writeAttribute(r.n, "data-ui-card-state", (r.v1 = s1) === "" ? null : s1);
175
164
  }
176
- if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "header", J, false, undefined, d);
177
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
178
- else if (r.b0 !== undefined) p1(r.b0, c, d);
179
- if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a1, r.e1, "", J, false, undefined, d);
180
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
181
- else if (r.b1 !== undefined) p2(r.b1, c, d);
182
- if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a2, r.e2, "actions", J, false, undefined, d);
183
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m3(d); at.before(r.b2.n); } }
184
- else if (r.b2 !== undefined) p3(r.b2, c, d);
165
+ if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "header", J, false, undefined, d);
166
+ if (typeof at === "function") r.f0 = at(r, (d, at) => m1(d, undefined, r), p1); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
167
+ else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p1(r.b0, c, d);
168
+ if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
169
+ if (typeof at === "function") r.f1 = at(r, (d, at) => m2(d, undefined, r), p2); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
170
+ else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p2(r.b1, c, d);
171
+ if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "actions", J, false, undefined, d);
172
+ if (typeof at === "function") r.f2 = at(r, (d, at) => m3(d, undefined, r), p3); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m3(d); at.before(r.b2.n); } }
173
+ else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p3(r.b2, c, d);
185
174
  };
186
175
  const m4 = (n, d) => {
187
176
  n.append((P4 ??= buildTemplate(T4)).cloneNode(true));
@@ -190,25 +179,29 @@ export function createUiCard(options = {}, html) {
190
179
  const t2 = t0.nextSibling.nextSibling;
191
180
  const t3 = t2.firstChild;
192
181
  const t4 = t2.nextSibling.nextSibling.firstChild;
193
- const r = { n, v0: undefined, a0: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a1: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a2: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
182
+ const r = { n, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
194
183
  p4(r, -1, d);
195
184
  return r;
196
185
  };
197
186
  const p4 = (r, c, d) => {
187
+ if (c === -1) {
188
+ resetForwardedAttributes(r.n, attributes, r.v0);
189
+ r.v0 = forwardAttributes(r.n, attributes);
190
+ }
198
191
  if (c & 126) {
199
192
  const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
200
- const s0 = x0;
201
- if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
193
+ const s1 = x0;
194
+ if (s1 !== r.v1) writeAttribute(r.n, "data-ui-card-state", (r.v1 = s1) === "" ? null : s1);
202
195
  }
203
- if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "header", J, false, undefined, d);
204
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m5(d); at.before(r.b0.n); } }
205
- else if (r.b0 !== undefined) p5(r.b0, c, d);
206
- if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a1, r.e1, "", J, false, undefined, d);
207
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m6(d); at.before(r.b1.n); } }
208
- else if (r.b1 !== undefined) p6(r.b1, c, d);
209
- if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a2, r.e2, "actions", J, false, undefined, d);
210
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m7(d); at.before(r.b2.n); } }
211
- else if (r.b2 !== undefined) p7(r.b2, c, d);
196
+ if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "header", J, false, undefined, d);
197
+ if (typeof at === "function") r.f0 = at(r, (d, at) => m5(d, undefined, r), p5); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m5(d); at.before(r.b0.n); } }
198
+ else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p5(r.b0, c, d);
199
+ if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
200
+ if (typeof at === "function") r.f1 = at(r, (d, at) => m6(d, undefined, r), p6); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m6(d); at.before(r.b1.n); } }
201
+ else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p6(r.b1, c, d);
202
+ if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "actions", J, false, undefined, d);
203
+ if (typeof at === "function") r.f2 = at(r, (d, at) => m7(d, undefined, r), p7); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m7(d); at.before(r.b2.n); } }
204
+ else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p7(r.b2, c, d);
212
205
  };
213
206
  const m8 = (n, d) => {
214
207
  n.append((P8 ??= buildTemplate(T8)).cloneNode(true));
@@ -217,25 +210,29 @@ export function createUiCard(options = {}, html) {
217
210
  const t2 = t0.nextSibling.nextSibling;
218
211
  const t3 = t2.firstChild;
219
212
  const t4 = t2.nextSibling.nextSibling.firstChild;
220
- const r = { n, v0: undefined, a0: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a1: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a2: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
213
+ const r = { n, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
221
214
  p8(r, -1, d);
222
215
  return r;
223
216
  };
224
217
  const p8 = (r, c, d) => {
218
+ if (c === -1) {
219
+ resetForwardedAttributes(r.n, attributes, r.v0);
220
+ r.v0 = forwardAttributes(r.n, attributes);
221
+ }
225
222
  if (c & 126) {
226
223
  const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
227
- const s0 = x0;
228
- if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
224
+ const s1 = x0;
225
+ if (s1 !== r.v1) writeAttribute(r.n, "data-ui-card-state", (r.v1 = s1) === "" ? null : s1);
229
226
  }
230
- if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "header", J, false, undefined, d);
231
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m9(d); at.before(r.b0.n); } }
232
- else if (r.b0 !== undefined) p9(r.b0, c, d);
233
- if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a1, r.e1, "", J, false, undefined, d);
234
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m10(d); at.before(r.b1.n); } }
235
- else if (r.b1 !== undefined) p10(r.b1, c, d);
236
- if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a2, r.e2, "actions", J, false, undefined, d);
237
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m11(d); at.before(r.b2.n); } }
238
- else if (r.b2 !== undefined) p11(r.b2, c, d);
227
+ if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "header", J, false, undefined, d);
228
+ if (typeof at === "function") r.f0 = at(r, (d, at) => m9(d, undefined, r), p9); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m9(d); at.before(r.b0.n); } }
229
+ else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p9(r.b0, c, d);
230
+ if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
231
+ if (typeof at === "function") r.f1 = at(r, (d, at) => m10(d, undefined, r), p10); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m10(d); at.before(r.b1.n); } }
232
+ else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p10(r.b1, c, d);
233
+ if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "actions", J, false, undefined, d);
234
+ if (typeof at === "function") r.f2 = at(r, (d, at) => m11(d, undefined, r), p11); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m11(d); at.before(r.b2.n); } }
235
+ else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p11(r.b2, c, d);
239
236
  };
240
237
  const m12 = (n, d) => {
241
238
  n.append((P12 ??= buildTemplate(T12)).cloneNode(true));
@@ -244,25 +241,29 @@ export function createUiCard(options = {}, html) {
244
241
  const t2 = t0.nextSibling.nextSibling;
245
242
  const t3 = t2.firstChild;
246
243
  const t4 = t2.nextSibling.nextSibling.firstChild;
247
- const r = { n, v0: undefined, a0: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a1: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a2: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
244
+ const r = { n, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
248
245
  p12(r, -1, d);
249
246
  return r;
250
247
  };
251
248
  const p12 = (r, c, d) => {
249
+ if (c === -1) {
250
+ resetForwardedAttributes(r.n, attributes, r.v0);
251
+ r.v0 = forwardAttributes(r.n, attributes);
252
+ }
252
253
  if (c & 126) {
253
254
  const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
254
- const s0 = x0;
255
- if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
255
+ const s1 = x0;
256
+ if (s1 !== r.v1) writeAttribute(r.n, "data-ui-card-state", (r.v1 = s1) === "" ? null : s1);
256
257
  }
257
- if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "header", J, false, undefined, d);
258
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m13(d); at.before(r.b0.n); } }
259
- else if (r.b0 !== undefined) p13(r.b0, c, d);
260
- if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a1, r.e1, "", J, false, undefined, d);
261
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m14(d); at.before(r.b1.n); } }
262
- else if (r.b1 !== undefined) p14(r.b1, c, d);
263
- if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a2, r.e2, "actions", J, false, undefined, d);
264
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m15(d); at.before(r.b2.n); } }
265
- else if (r.b2 !== undefined) p15(r.b2, c, d);
258
+ if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "header", J, false, undefined, d);
259
+ if (typeof at === "function") r.f0 = at(r, (d, at) => m13(d, undefined, r), p13); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m13(d); at.before(r.b0.n); } }
260
+ else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p13(r.b0, c, d);
261
+ if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
262
+ if (typeof at === "function") r.f1 = at(r, (d, at) => m14(d, undefined, r), p14); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m14(d); at.before(r.b1.n); } }
263
+ else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p14(r.b1, c, d);
264
+ if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "actions", J, false, undefined, d);
265
+ if (typeof at === "function") r.f2 = at(r, (d, at) => m15(d, undefined, r), p15); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m15(d); at.before(r.b2.n); } }
266
+ else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p15(r.b2, c, d);
266
267
  };
267
268
  const M = [m0, m4, m8, m12], N = [p0, p4, p8, p12];
268
269
  let R;
@@ -270,7 +271,7 @@ export function createUiCard(options = {}, html) {
270
271
  if (R === null) return;
271
272
  if (R === undefined) { R = M[a](element, d); return; }
272
273
  if (c & 1) {
273
- const t = ((v[0] === "section") ? 0 : (v[0] === "article") ? 1 : (v[0] === "aside") ? 2 : 3);
274
+ const t = (truthy(equalValue(v[0], "section")) ? 0 : truthy(equalValue(v[0], "article")) ? 1 : truthy(equalValue(v[0], "aside")) ? 2 : 3);
274
275
  if (t !== a) {
275
276
  dispose(R);
276
277
  for (const key in I.r) delete I.r[key];
@@ -287,6 +288,8 @@ export function createUiCard(options = {}, html) {
287
288
  };
288
289
  const I = { B };
289
290
  const J = project(I, children, slots);
291
+ sharePlainSlots(I, J, ["header","","actions"]);
292
+ I.F = { values: attributes, draw: () => p(-1) };
290
293
  attachGeneratedController(element, S, v, p, undefined, undefined, I);
291
294
  manageProps(I);
292
295
  return element;
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
2
  export interface UiCardGroupEventMap {
3
3
  }
4
4
  export interface UiCardGroupElement extends HTMLDivElement {
@@ -1,5 +1,5 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispose, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkInteger, defineComponent } from "@nextwebwg/html-next/generated-runtime";
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispose, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkInteger, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
3
3
  import "../styles/ui-card-group.css";
4
4
 
5
5
  const T0 = ["",[],"\n ",["ui-grid",[],4],"\n "];
@@ -9,12 +9,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-card-group", b: generatedIn
9
9
  const D = { g: "ui-card-group", props: { "columns": { "required":false, c: checkInteger, t: "integer", j: 0, m: "i" }, "gap": { "required":false,"values":["xs","s","m","l","xl"],"default":"l", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "min": { "required":false,"values":["sm","md","lg"],"default":"lg", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
10
10
 
11
11
  export function createUiCardGroup(options = {}, html) {
12
- const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
12
+ const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
13
+ const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["columns","gap","min"].includes(name)));
13
14
  const element = document.createElement("div");
14
- for (const [name, value] of Object.entries(attributes)) {
15
- if (value === null || value === undefined || value === false) continue;
16
- element.setAttribute(name, value === true ? "" : String(value));
17
- }
18
15
  element.setAttribute("component", "ui-card-group");
19
16
  element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
20
17
  const v = [null, null, null];
@@ -28,30 +25,35 @@ export function createUiCardGroup(options = {}, html) {
28
25
  const p1 = (r, c, d) => {
29
26
  };
30
27
  const p0 = (r, c, d) => {
28
+ if (c === -1) {
29
+ resetForwardedAttributes(r.n, attributes, r.v0);
30
+ r.v0 = forwardAttributes(r.n, attributes);
31
+ }
31
32
  if (c & 1073741826) {
32
33
  const x0 = v[1];
33
- const s0 = toAttribute(x0, "gap");
34
- if (s0 !== r.v0) writeAttribute(r.a0, "gap", r.v0 = s0);
34
+ const s1 = toAttribute(x0, "gap");
35
+ if (s1 !== r.v1) writeAttribute(r.a1, "gap", r.v1 = s1);
35
36
  }
36
37
  if (c & 1073741828) {
37
38
  const x1 = v[2];
38
- const s1 = toAttribute(x1, "min");
39
- if (s1 !== r.v1) writeAttribute(r.a0, "min", r.v1 = s1);
39
+ const s2 = toAttribute(x1, "min");
40
+ if (s2 !== r.v2) writeAttribute(r.a1, "min", r.v2 = s2);
40
41
  }
41
42
  if (c & 1) {
42
43
  const x2 = v[0];
43
- const s2 = toAttribute(x2, "columns");
44
- if (s2 !== r.v2) writeAttribute(r.a0, "columns", r.v2 = s2);
44
+ const s3 = toAttribute(x2, "columns");
45
+ if (s3 !== r.v3) writeAttribute(r.a1, "columns", r.v3 = s3);
45
46
  }
46
- if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
47
+ if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "", J, false, undefined, d);
47
48
  if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
48
49
  else if (r.b0 !== undefined) p1(r.b0, c, d);
49
50
  };
50
51
  const t0 = element.firstChild.nextSibling;
51
52
  const t1 = t0.firstChild;
52
- const R = { a0: t0, v0: null, v1: null, v2: null, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined };
53
+ const R = { n: element, a1: t0, v0: undefined, v1: null, v2: null, v3: null, a2: t1, e0: t1.nextSibling, b0: undefined, f0: undefined };
53
54
  const I = { B };
54
55
  const J = project(I, children, slots);
56
+ I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
55
57
  attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
56
58
  manageProps(I);
57
59
  return element;
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
2
  export interface UiCheckboxEventMap {
3
3
  change: CustomEvent<{ readonly checked: boolean; readonly value: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
4
4
  }
@@ -1,5 +1,5 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, readsChanged, rec, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, buildTemplate, readsChanged, rec, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
3
3
  import * as controller from "../components/ui-checkbox/ui-checkbox.js";
4
4
  import "../styles/ui-checkbox.css";
5
5
 
@@ -12,12 +12,9 @@ const D = { g: "ui-checkbox", props: { "checked": { "required":false,"default":f
12
12
  const C = (host) => activateModule(controller, host);
13
13
 
14
14
  export function createUiCheckbox(options = {}, html) {
15
- const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
15
+ const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
16
+ const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["checked","disabled","indeterminate","invalid","label","name","required","size","value"].includes(name)));
16
17
  const element = document.createElement("label");
17
- for (const [name, value] of Object.entries(attributes)) {
18
- if (value === null || value === undefined || value === false) continue;
19
- element.setAttribute(name, value === true ? "" : String(value));
20
- }
21
18
  element.setAttribute("component", "ui-checkbox");
22
19
  element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
23
20
  const v = [false, null, null, null, null, null, null, null, null, null];
@@ -39,61 +36,65 @@ export function createUiCheckbox(options = {}, html) {
39
36
  const p2 = (r, c, d) => {
40
37
  };
41
38
  const p0 = (r, c, d) => {
39
+ if (c === -1) {
40
+ resetForwardedAttributes(r.n, attributes, r.v0);
41
+ r.v0 = forwardAttributes(r.n, attributes);
42
+ }
42
43
  if (c & 32) {
43
44
  const x0 = v[5];
44
- const s0 = toAttribute(x0, "aria-label");
45
- if (s0 !== r.v0) writeAttribute(r.a0, "aria-label", r.v0 = s0);
45
+ const s1 = toAttribute(x0, "aria-label");
46
+ if (s1 !== r.v1) writeAttribute(r.a1, "aria-label", r.v1 = s1);
46
47
  }
47
48
  if (c & 1) {
48
49
  const f0 = [];
49
50
  const x1 = rec(f0, v[0]);
50
- if (c === -1 || c & 1 || readsChanged(r.v1, f0)) {
51
- r.v1 = f0;
52
- r.a0["checked"] = x1;
51
+ if (c === -1 || c & 1 || readsChanged(r.v2, f0)) {
52
+ r.v2 = f0;
53
+ r.a1["checked"] = x1;
53
54
  }
54
55
  }
55
56
  if (c & 8) {
56
57
  const f1 = [];
57
58
  const x2 = rec(f1, v[3]);
58
- if (c === -1 || c & 8 || readsChanged(r.v2, f1)) {
59
- r.v2 = f1;
60
- r.a0["indeterminate"] = x2;
59
+ if (c === -1 || c & 8 || readsChanged(r.v3, f1)) {
60
+ r.v3 = f1;
61
+ r.a1["indeterminate"] = x2;
61
62
  }
62
63
  }
63
64
  if (c & 4) {
64
65
  const x3 = v[2];
65
- const s3 = toAttribute(x3, "disabled");
66
- if (s3 !== r.v3) writeAttribute(r.a0, "disabled", r.v3 = s3);
66
+ const s4 = toAttribute(x3, "disabled");
67
+ if (s4 !== r.v4) writeAttribute(r.a1, "disabled", r.v4 = s4);
67
68
  }
68
69
  if (c & 16) {
69
70
  const x4 = v[4];
70
- const s4 = toAttribute(x4, "aria-invalid");
71
- if (s4 !== r.v4) writeAttribute(r.a0, "aria-invalid", r.v4 = s4);
71
+ const s5 = toAttribute(x4, "aria-invalid");
72
+ if (s5 !== r.v5) writeAttribute(r.a1, "aria-invalid", r.v5 = s5);
72
73
  }
73
74
  if (c & 128) {
74
75
  const x5 = v[7];
75
- const s5 = toAttribute(x5, "required");
76
- if (s5 !== r.v5) writeAttribute(r.a0, "required", r.v5 = s5);
76
+ const s6 = toAttribute(x5, "required");
77
+ if (s6 !== r.v6) writeAttribute(r.a1, "required", r.v6 = s6);
77
78
  }
78
79
  if (c & 64) {
79
80
  const x6 = v[6];
80
- const s6 = toAttribute(x6, "name");
81
- if (s6 !== r.v6) writeAttribute(r.a0, "name", r.v6 = s6);
81
+ const s7 = toAttribute(x6, "name");
82
+ if (s7 !== r.v7) writeAttribute(r.a1, "name", r.v7 = s7);
82
83
  }
83
84
  if (c & 512) {
84
85
  const x7 = v[9];
85
- const s7 = toAttribute(x7, "value");
86
- if (s7 !== r.v7) writeAttribute(r.a0, "value", r.v7 = s7);
86
+ const s8 = toAttribute(x7, "value");
87
+ if (s8 !== r.v8) writeAttribute(r.a1, "value", r.v8 = s8);
87
88
  }
88
89
  if (c & 276) {
89
90
  const x8 = hostState(["invalid","disabled","size"], [v[4], v[2], v[8]]);
90
- const s8 = x8;
91
- if (s8 !== r.v8) writeAttribute(r.n, "data-ui-checkbox-state", (r.v8 = s8) === "" ? null : s8);
91
+ const s9 = x8;
92
+ if (s9 !== r.v9) writeAttribute(r.n, "data-ui-checkbox-state", (r.v9 = s9) === "" ? null : s9);
92
93
  }
93
- if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
94
+ if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "", J, false, undefined, d);
94
95
  if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
95
96
  else if (r.b0 !== undefined) p1(r.b0, c, d);
96
- if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a3, r.e1, "description", J, false, undefined, d);
97
+ if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a4, r.e1, "description", J, false, undefined, d);
97
98
  if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
98
99
  else if (r.b1 !== undefined) p2(r.b1, c, d);
99
100
  };
@@ -103,10 +104,11 @@ export function createUiCheckbox(options = {}, html) {
103
104
  const t3 = t2.firstChild;
104
105
  const t4 = t2.nextSibling.nextSibling;
105
106
  const t5 = t4.firstChild;
106
- const R = { n: element, a0: t0, v0: null, v1: undefined, v2: undefined, v3: null, v4: null, v5: null, v6: null, v7: null, v8: undefined, a1: t3, e0: t3.nextSibling, b0: undefined, f0: undefined, a3: t5, e1: t5.nextSibling, b1: undefined, f1: undefined };
107
+ const R = { n: element, a1: t0, v0: undefined, v1: null, v2: undefined, v3: undefined, v4: null, v5: null, v6: null, v7: null, v8: null, v9: undefined, a2: t3, e0: t3.nextSibling, b0: undefined, f0: undefined, a4: t5, e1: t5.nextSibling, b1: undefined, f1: undefined };
107
108
  const I = { B };
108
109
  const J = project(I, children, slots);
109
110
  I.R = new Set();
111
+ I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
110
112
  attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, undefined, undefined, I);
111
113
  manageProps(I);
112
114
  I.r["input"] = t0;
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
2
  export interface UiClusterEventMap {
3
3
  "overflow-change": CustomEvent<{ readonly count: number }>;
4
4
  }