@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.
- package/components/shared/overlay.js +7 -0
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +2 -2
- package/components/ui-meter/ui-meter.html +1 -1
- package/dist/index.js +1 -1
- package/docs/catalog.json +1 -1
- package/editor/components.css +19 -19
- package/editor/index.js +1125 -853
- package/package.json +3 -3
- package/styles/ui-action-bar.css +1 -1
- package/styles/ui-affordance-scope.css +1 -1
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +1 -1
- package/styles/ui-badge.css +1 -1
- package/styles/ui-breadcrumb-item.css +1 -1
- package/styles/ui-breadcrumbs.css +1 -1
- package/styles/ui-button.css +1 -1
- package/styles/ui-calendar.css +1 -1
- package/styles/ui-callout.css +1 -1
- package/styles/ui-card-group.css +1 -1
- package/styles/ui-card.css +1 -1
- package/styles/ui-checkbox.css +1 -1
- package/styles/ui-cluster.css +1 -1
- package/styles/ui-color-picker.css +1 -1
- package/styles/ui-column.css +1 -1
- package/styles/ui-combobox.css +1 -1
- package/styles/ui-compact-content.css +1 -1
- package/styles/ui-compact-editor.css +1 -1
- package/styles/ui-compact-mark.css +1 -1
- package/styles/ui-compact-node.css +1 -1
- package/styles/ui-container.css +1 -1
- package/styles/ui-context-menu.css +1 -1
- package/styles/ui-cover.css +1 -1
- package/styles/ui-curve-editor.css +1 -1
- package/styles/ui-cycle-button.css +1 -1
- package/styles/ui-data-table.css +1 -1
- package/styles/ui-date-field.css +1 -1
- package/styles/ui-date-picker.css +1 -1
- package/styles/ui-date-range-picker.css +1 -1
- package/styles/ui-description-item.css +1 -1
- package/styles/ui-description-list.css +1 -1
- package/styles/ui-dialog.css +1 -1
- package/styles/ui-disclosure.css +1 -1
- package/styles/ui-editable.css +1 -1
- package/styles/ui-editor-block-actions.css +1 -1
- package/styles/ui-editor-chip-editor.css +1 -1
- package/styles/ui-editor-code-language.css +1 -1
- package/styles/ui-editor-footnote-editor.css +1 -1
- package/styles/ui-editor-formatting-tools.css +1 -1
- package/styles/ui-editor-image-toolbar.css +1 -1
- package/styles/ui-editor-insert-table-grid.css +1 -1
- package/styles/ui-editor-link-card.css +1 -1
- package/styles/ui-editor-link-form.css +1 -1
- package/styles/ui-editor-mention-menu-item.css +1 -1
- package/styles/ui-editor-mention-menu.css +1 -1
- package/styles/ui-editor-slash-menu-group.css +1 -1
- package/styles/ui-editor-slash-menu-item.css +1 -1
- package/styles/ui-editor-slash-menu.css +1 -1
- package/styles/ui-editor-surface.css +1 -1
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-editor-table-overlay.css +1 -1
- package/styles/ui-editor-table-toolbar.css +1 -1
- package/styles/ui-editor-toolbar.css +1 -1
- package/styles/ui-editor.css +1 -1
- package/styles/ui-file-input.css +1 -1
- package/styles/ui-floating-action-button.css +1 -1
- package/styles/ui-form-field.css +1 -1
- package/styles/ui-grid.css +1 -1
- package/styles/ui-icon-button.css +1 -1
- package/styles/ui-icon.css +1 -1
- package/styles/ui-image.css +1 -1
- package/styles/ui-input-group.css +1 -1
- package/styles/ui-input.css +1 -1
- package/styles/ui-light-editor.css +1 -1
- package/styles/ui-list-item.css +1 -1
- package/styles/ui-list.css +1 -1
- package/styles/ui-listbox.css +1 -1
- package/styles/ui-menu-group.css +1 -1
- package/styles/ui-menu-item.css +1 -1
- package/styles/ui-menu.css +1 -1
- package/styles/ui-meter.css +1 -1
- package/styles/ui-nav-item.css +1 -1
- package/styles/ui-notice-stripe.css +1 -1
- package/styles/ui-number-input.css +1 -1
- package/styles/ui-page-header.css +1 -1
- package/styles/ui-pagination.css +1 -1
- package/styles/ui-popover.css +1 -1
- package/styles/ui-radio-group.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-reel.css +1 -1
- package/styles/ui-scroll-area.css +1 -1
- package/styles/ui-search-result-row.css +1 -1
- package/styles/ui-search-shell.css +1 -1
- package/styles/ui-section.css +1 -1
- package/styles/ui-segmented-control.css +1 -1
- package/styles/ui-select.css +1 -1
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +1 -1
- package/styles/ui-site-header.css +1 -1
- package/styles/ui-skeleton.css +1 -1
- package/styles/ui-slider.css +1 -1
- package/styles/ui-spinner.css +1 -1
- package/styles/ui-stack.css +1 -1
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-swatch.css +1 -1
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +1 -1
- package/styles/ui-table.css +1 -1
- package/styles/ui-tabs.css +1 -1
- package/styles/ui-text.css +1 -1
- package/styles/ui-textarea.css +1 -1
- package/styles/ui-time-field.css +1 -1
- package/styles/ui-time-picker.css +1 -1
- package/styles/ui-toast-region.css +1 -1
- package/styles/ui-toast.css +1 -1
- package/styles/ui-tooltip.css +1 -1
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +1 -1
- package/styles/ui-tree.css +1 -1
- package/styles/ui-wizard.css +1 -1
- package/vanilla/UiActionBar.d.ts +1 -1
- package/vanilla/UiActionBar.js +14 -12
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +13 -11
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +27 -25
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +26 -23
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +14 -12
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +14 -13
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +10 -10
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +187 -244
- package/vanilla/UiCalendar.d.ts +1 -1
- package/vanilla/UiCalendar.js +272 -193
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +32 -27
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +72 -69
- package/vanilla/UiCardGroup.d.ts +1 -1
- package/vanilla/UiCardGroup.js +17 -15
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +32 -30
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +20 -18
- package/vanilla/UiColorPicker.d.ts +1 -1
- package/vanilla/UiColorPicker.js +22 -20
- package/vanilla/UiColumn.d.ts +2 -2
- package/vanilla/UiColumn.js +18 -15
- package/vanilla/UiCombobox.d.ts +3 -3
- package/vanilla/UiCombobox.js +237 -174
- package/vanilla/UiCompactContent.d.ts +1 -1
- package/vanilla/UiCompactContent.js +13 -8
- package/vanilla/UiCompactEditor.d.ts +1 -1
- package/vanilla/UiCompactEditor.js +17 -12
- package/vanilla/UiCompactMark.d.ts +1 -1
- package/vanilla/UiCompactMark.js +47 -45
- package/vanilla/UiCompactNode.d.ts +2 -2
- package/vanilla/UiCompactNode.js +37 -33
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +13 -11
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +11 -9
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +13 -11
- package/vanilla/UiCurveEditor.d.ts +1 -1
- package/vanilla/UiCurveEditor.js +40 -38
- package/vanilla/UiCycleButton.d.ts +2 -2
- package/vanilla/UiCycleButton.js +31 -26
- package/vanilla/UiDataTable.d.ts +1 -1
- package/vanilla/UiDataTable.js +26 -20
- package/vanilla/UiDateField.d.ts +1 -1
- package/vanilla/UiDateField.js +78 -75
- package/vanilla/UiDatePicker.d.ts +1 -1
- package/vanilla/UiDatePicker.js +155 -149
- package/vanilla/UiDateRangePicker.d.ts +1 -1
- package/vanilla/UiDateRangePicker.js +136 -128
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +13 -11
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +13 -11
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +14 -14
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +28 -26
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +29 -27
- package/vanilla/UiEditor.d.ts +1 -1
- package/vanilla/UiEditor.js +62 -58
- package/vanilla/UiEditorBlockActions.d.ts +1 -1
- package/vanilla/UiEditorBlockActions.js +14 -12
- package/vanilla/UiEditorChipEditor.d.ts +1 -1
- package/vanilla/UiEditorChipEditor.js +22 -14
- package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
- package/vanilla/UiEditorCodeLanguage.js +23 -16
- package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
- package/vanilla/UiEditorFootnoteEditor.js +17 -9
- package/vanilla/UiEditorFormattingTools.d.ts +1 -1
- package/vanilla/UiEditorFormattingTools.js +108 -71
- package/vanilla/UiEditorImageToolbar.d.ts +1 -1
- package/vanilla/UiEditorImageToolbar.js +68 -66
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +50 -35
- package/vanilla/UiEditorLinkCard.d.ts +1 -1
- package/vanilla/UiEditorLinkCard.js +27 -25
- package/vanilla/UiEditorLinkForm.d.ts +1 -1
- package/vanilla/UiEditorLinkForm.js +79 -57
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +63 -44
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +22 -16
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +52 -33
- package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuGroup.js +19 -14
- package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuItem.js +27 -25
- package/vanilla/UiEditorSurface.d.ts +1 -1
- package/vanilla/UiEditorSurface.js +13 -11
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +81 -52
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +107 -68
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +121 -70
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +20 -12
- package/vanilla/UiFileInput.d.ts +1 -1
- package/vanilla/UiFileInput.js +94 -80
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +21 -20
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +21 -19
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +26 -23
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +20 -15
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +35 -43
- package/vanilla/UiImage.d.ts +1 -1
- package/vanilla/UiImage.js +16 -14
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +29 -35
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.js +16 -14
- package/vanilla/UiLightEditor.d.ts +1 -1
- package/vanilla/UiLightEditor.js +29 -27
- package/vanilla/UiList.d.ts +1 -1
- package/vanilla/UiList.js +33 -27
- package/vanilla/UiListItem.d.ts +1 -1
- package/vanilla/UiListItem.js +12 -12
- package/vanilla/UiListbox.d.ts +1 -1
- package/vanilla/UiListbox.js +90 -80
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +20 -12
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +14 -11
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +74 -75
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +67 -62
- package/vanilla/UiNavItem.d.ts +1 -1
- package/vanilla/UiNavItem.js +63 -65
- package/vanilla/UiNoticeStripe.d.ts +1 -1
- package/vanilla/UiNoticeStripe.js +16 -16
- package/vanilla/UiNumberInput.d.ts +1 -1
- package/vanilla/UiNumberInput.js +41 -38
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +17 -15
- package/vanilla/UiPagination.d.ts +1 -1
- package/vanilla/UiPagination.js +53 -44
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +13 -11
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +25 -23
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +33 -36
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +20 -12
- package/vanilla/UiScrollArea.d.ts +1 -1
- package/vanilla/UiScrollArea.js +13 -11
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +21 -20
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +16 -14
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +48 -45
- package/vanilla/UiSegmentedControl.d.ts +2 -2
- package/vanilla/UiSegmentedControl.js +52 -47
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +17 -21
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +12 -12
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +17 -15
- package/vanilla/UiSiteHeader.d.ts +1 -1
- package/vanilla/UiSiteHeader.js +25 -23
- package/vanilla/UiSkeleton.d.ts +1 -1
- package/vanilla/UiSkeleton.js +21 -20
- package/vanilla/UiSlider.d.ts +1 -1
- package/vanilla/UiSlider.js +50 -47
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +34 -27
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +12 -12
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +22 -21
- package/vanilla/UiSwatch.d.ts +1 -1
- package/vanilla/UiSwatch.js +20 -17
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +25 -23
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +13 -11
- package/vanilla/UiTable.d.ts +1 -1
- package/vanilla/UiTable.js +13 -11
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +39 -28
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +128 -125
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +27 -39
- package/vanilla/UiTimeField.d.ts +1 -1
- package/vanilla/UiTimeField.js +42 -40
- package/vanilla/UiTimePicker.d.ts +1 -1
- package/vanilla/UiTimePicker.js +105 -102
- package/vanilla/UiToast.d.ts +1 -1
- package/vanilla/UiToast.js +14 -14
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +61 -31
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +17 -14
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +24 -22
- package/vanilla/UiTree.d.ts +1 -1
- package/vanilla/UiTree.js +17 -12
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +73 -79
- package/vanilla/UiWizard.d.ts +1 -1
- package/vanilla/UiWizard.js +61 -40
package/vanilla/UiToastRegion.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, KeyedList, NONCONFORMING, readMember, textCall, toAttribute, toText, trackContainer, truthy, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkConstrained, checkFormat, checkNumber, 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, checkedReferenceValue, buildTemplate, KeyedList, NONCONFORMING, readMember, textCall, toAttribute, toText, trackContainer, truthy, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkConstrained, checkFormat, checkNumber, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-toast-region/ui-toast-region.js";
|
|
4
4
|
import "../styles/ui-toast-region.css";
|
|
5
5
|
|
|
6
6
|
const T0 = ["",[],"\n ",4,"\n ",2,"\n "];
|
|
7
7
|
const T1 = ["",[]];
|
|
8
8
|
const T2 = ["div",["class","toast"],"\n ",["span",["class","message"],0],"\n ",["span",["class","dismiss"],"\n ",["ui-icon-button",["size","sm","variant","ghost"],["ui-icon",["name","x"]]],"\n "],"\n "];
|
|
9
|
+
const RC0 = ["b", "boolean"];
|
|
10
|
+
const RC1 = ["s", "string"];
|
|
11
|
+
const RC2 = [["p",formatOf(keywordFormat)], "keyword with values alert, status"];
|
|
12
|
+
const RC3 = [["p",formatOf(keywordFormat)], "keyword with values neutral, info, success, warning, danger"];
|
|
9
13
|
let P0, P1, P2;
|
|
10
14
|
const emptyDirty = new Map();
|
|
11
15
|
const S = { n: ["toasts"], t: [["l",["o",["id","s","message","s","tone",["p",formatOf(keywordFormat)],"role",["p",formatOf(keywordFormat)],"closing","b"]]]], f: import.meta.url, g: "ui-toast-region", d: { "dismiss": [detailCheck(checkObject([["id", checkString, false], ["reason", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["action","timeout"]}), false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["keyboard","pointer","programmatic"]}), false]], false)), true, true, false], "show-toast": [detailCheck(checkObject([["message", checkString, false], ["id", checkString, true], ["tone", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["neutral","info","success","warning","danger"]}), true], ["duration", checkNumber, true]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs, i: [[]] };
|
|
@@ -13,12 +17,9 @@ const D = { g: "ui-toast-region", props: { "duration": { "required":false,"defau
|
|
|
13
17
|
const C = (host) => activateModule(controller, host);
|
|
14
18
|
|
|
15
19
|
export function createUiToastRegion(options = {}, html) {
|
|
16
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
20
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
21
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["duration","placement"].includes(name)));
|
|
17
22
|
const element = document.createElement("div");
|
|
18
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
19
|
-
if (value === null || value === undefined || value === false) continue;
|
|
20
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
21
|
-
}
|
|
22
23
|
if (!element.hasAttribute("role")) element.setAttribute("role", "region");
|
|
23
24
|
if (!element.hasAttribute("aria-label")) element.setAttribute("aria-label", "Notifications");
|
|
24
25
|
if (!element.hasAttribute("aria-live")) element.setAttribute("aria-live", "polite");
|
|
@@ -49,23 +50,35 @@ export function createUiToastRegion(options = {}, html) {
|
|
|
49
50
|
const o = r.i;
|
|
50
51
|
if (c & 1073741824) {
|
|
51
52
|
r.w = 0;
|
|
52
|
-
const x0 = trackContainer(r, readMember(o, "closing"));
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
53
|
+
const x0 = trackContainer(r, checkedReferenceValue(S, readMember(o, "closing"), RC0, "expression:$toast.closing:toast.closing", "toast.closing"));
|
|
54
|
+
if (x0 !== NONCONFORMING) {
|
|
55
|
+
const s0 = truthy(x0);
|
|
56
|
+
if (s0 !== r.v0) r.n.classList.toggle("closing", r.v0 = s0);
|
|
57
|
+
}
|
|
58
|
+
const x1 = trackContainer(r, checkedReferenceValue(S, readMember(o, "id"), RC1, "expression:$toast.id:toast.id", "toast.id"));
|
|
59
|
+
if (x1 !== NONCONFORMING) {
|
|
60
|
+
const s1 = toAttribute(x1, "id");
|
|
61
|
+
if (s1 !== r.v1) writeAttribute(r.n, "id", r.v1 = s1);
|
|
62
|
+
}
|
|
63
|
+
const x2 = trackContainer(r, checkedReferenceValue(S, readMember(o, "role"), RC2, "expression:$toast.role:toast.role", "toast.role"));
|
|
64
|
+
if (x2 !== NONCONFORMING) {
|
|
65
|
+
const s2 = toAttribute(x2, "role");
|
|
66
|
+
if (s2 !== r.v2) writeAttribute(r.n, "role", r.v2 = s2);
|
|
67
|
+
}
|
|
68
|
+
const x3 = trackContainer(r, checkedReferenceValue(S, readMember(o, "tone"), RC3, "expression:$toast.tone:toast.tone", "toast.tone"));
|
|
69
|
+
if (x3 !== NONCONFORMING) {
|
|
70
|
+
const s3 = toAttribute(x3, "data-tone");
|
|
71
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-tone", r.v3 = s3);
|
|
72
|
+
}
|
|
73
|
+
const x4 = trackContainer(r, checkedReferenceValue(S, readMember(o, "message"), RC1, "expression:$toast.message:toast.message", "toast.message"));
|
|
74
|
+
if (x4 !== NONCONFORMING) {
|
|
75
|
+
const s4 = toText(x4);
|
|
76
|
+
if (s4 !== r.v4) r.a1.data = r.v4 = s4;
|
|
77
|
+
}
|
|
78
|
+
if (x1 !== NONCONFORMING) {
|
|
79
|
+
const s5 = toAttribute(x1, "data-toast");
|
|
80
|
+
if (s5 !== r.v5) writeAttribute(r.a2, "data-toast", r.v5 = s5);
|
|
81
|
+
}
|
|
69
82
|
}
|
|
70
83
|
if (c === -1) {
|
|
71
84
|
const x5 = true;
|
|
@@ -73,7 +86,7 @@ export function createUiToastRegion(options = {}, html) {
|
|
|
73
86
|
if (s6 !== r.v6) writeAttribute(r.a3, "round", r.v6 = s6);
|
|
74
87
|
}
|
|
75
88
|
if (c & 1073741824) {
|
|
76
|
-
const x6 = textCall("concat", ["Dismiss ", trackContainer(r, readMember(o, "message"))]);
|
|
89
|
+
const x6 = textCall("concat", ["Dismiss ", trackContainer(r, checkedReferenceValue(S, readMember(o, "message"), RC1, "expression:concat('Dismiss ', $toast.message):toast.message", "toast.message"))]);
|
|
77
90
|
if (x6 !== NONCONFORMING) {
|
|
78
91
|
const s7 = toAttribute(x6, "label");
|
|
79
92
|
if (s7 !== r.v7) writeAttribute(r.a3, "label", r.v7 = s7);
|
|
@@ -81,22 +94,39 @@ export function createUiToastRegion(options = {}, html) {
|
|
|
81
94
|
}
|
|
82
95
|
};
|
|
83
96
|
const p0 = (r, c, d) => {
|
|
97
|
+
if (c === -1) {
|
|
98
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
99
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
100
|
+
const x0 = "region";
|
|
101
|
+
const s1 = toAttribute(x0, "role");
|
|
102
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
103
|
+
const x1 = "Notifications";
|
|
104
|
+
const s2 = toAttribute(x1, "aria-label");
|
|
105
|
+
writeAttribute(r.n, "aria-label", r.v2 = s2);
|
|
106
|
+
const x2 = "polite";
|
|
107
|
+
const s3 = toAttribute(x2, "aria-live");
|
|
108
|
+
writeAttribute(r.n, "aria-live", r.v3 = s3);
|
|
109
|
+
const x3 = "manual";
|
|
110
|
+
const s4 = toAttribute(x3, "popover");
|
|
111
|
+
writeAttribute(r.n, "popover", r.v4 = s4);
|
|
112
|
+
}
|
|
84
113
|
if (c & 4) {
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
114
|
+
const x4 = hostState(["placement"], [v[2]]);
|
|
115
|
+
const s5 = x4;
|
|
116
|
+
if (s5 !== r.v5) writeAttribute(r.n, "data-ui-toast-region-state", (r.v5 = s5) === "" ? null : s5);
|
|
88
117
|
}
|
|
89
|
-
if (
|
|
90
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "", J, false, undefined, d);
|
|
118
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
91
119
|
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); } }
|
|
92
120
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
121
|
+
if (c & 1073741825) r.L1.update(v[0], d, c);
|
|
93
122
|
};
|
|
94
123
|
const t0 = element.firstChild.nextSibling;
|
|
95
124
|
const t1 = t0.nextSibling.nextSibling.nextSibling;
|
|
96
|
-
const R = { n: element, v0: undefined,
|
|
125
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, v5: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined, L1: new KeyedList(t1, t1.nextSibling, m2, p2, (o) => readMember(o, "id"), "toast") };
|
|
97
126
|
const I = { B };
|
|
98
127
|
const J = project(I, children, slots);
|
|
99
128
|
I.R = new Set();
|
|
129
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
100
130
|
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);
|
|
101
131
|
manageProps(I);
|
|
102
132
|
return element;
|
package/vanilla/UiTooltip.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
2
|
export interface UiTooltipEventMap {
|
|
3
3
|
open: CustomEvent<{ readonly open: boolean; readonly reason: "action" | "programmatic" | "light-dismiss" | "escape"; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
close: CustomEvent<{ readonly open: boolean; readonly reason: "action" | "programmatic" | "light-dismiss" | "escape"; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
package/vanilla/UiTooltip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkNumber, 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, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkNumber, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-tooltip/ui-tooltip.js";
|
|
4
4
|
import "../styles/ui-tooltip.css";
|
|
5
5
|
|
|
@@ -12,12 +12,9 @@ const D = { g: "ui-tooltip", props: { "for": { "required":false,"default":"", c:
|
|
|
12
12
|
const C = (host) => activateModule(controller, host);
|
|
13
13
|
|
|
14
14
|
export function createUiTooltip(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]) => !["for","hide-delay","inverse","open","placement","show-delay","trigger"].includes(name)));
|
|
16
17
|
const element = document.createElement("span");
|
|
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
|
if (!element.hasAttribute("role")) element.setAttribute("role", "tooltip");
|
|
22
19
|
element.setAttribute("component", "ui-tooltip");
|
|
23
20
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -41,14 +38,19 @@ export function createUiTooltip(options = {}, html) {
|
|
|
41
38
|
};
|
|
42
39
|
const p0 = (r, c, d) => {
|
|
43
40
|
if (c & 1) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
42
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
43
|
+
const x0 = "tooltip";
|
|
44
|
+
const s1 = toAttribute(x0, "role");
|
|
45
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
46
|
+
const x1 = !v[0];
|
|
47
|
+
const s2 = toAttribute(x1, "hidden");
|
|
48
|
+
writeAttribute(r.n, "hidden", r.v2 = s2);
|
|
47
49
|
}
|
|
48
50
|
if (c & 8) {
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
51
|
+
const x2 = hostState(["inverse"], [v[3]]);
|
|
52
|
+
const s3 = x2;
|
|
53
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-ui-tooltip-state", (r.v3 = s3) === "" ? null : s3);
|
|
52
54
|
}
|
|
53
55
|
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
54
56
|
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); } }
|
|
@@ -61,10 +63,11 @@ export function createUiTooltip(options = {}, html) {
|
|
|
61
63
|
const t1 = t0.firstChild.nextSibling;
|
|
62
64
|
const t2 = t1.firstChild;
|
|
63
65
|
const t3 = t1.nextSibling.nextSibling.firstChild;
|
|
64
|
-
const R = { n: element, v0: undefined, v1: undefined, a1: t2, e0: t2.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined };
|
|
66
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, a1: t2, e0: t2.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined };
|
|
65
67
|
const I = { B };
|
|
66
68
|
const J = project(I, children, slots);
|
|
67
69
|
I.R = new Set();
|
|
70
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
68
71
|
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);
|
|
69
72
|
manageProps(I);
|
|
70
73
|
return element;
|
package/vanilla/UiTopBar.d.ts
CHANGED
package/vanilla/UiTopBar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, NONCONFORMING, toAttribute, writeAttribute, computedCycle, dispose, acceptProps, manageProps, generatedInputs, awaitInput, evaluateInput, inputRead, READY_INPUT, UNRESOLVED_INPUT, notifyPropertySet, project, fillSlot, readonlyView, 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, equalValue, buildTemplate, NONCONFORMING, toAttribute, truthy, writeAttribute, computedCycle, dispose, acceptProps, manageProps, generatedInputs, awaitInput, evaluateInput, inputRead, READY_INPUT, UNRESOLVED_INPUT, notifyPropertySet, project, fillSlot, readonlyView, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-top-bar/ui-top-bar.js";
|
|
4
4
|
import "../styles/ui-top-bar.css";
|
|
5
5
|
|
|
@@ -14,12 +14,9 @@ const D = { g: "ui-top-bar", props: { "titleFor": { "required":false,"default":"
|
|
|
14
14
|
const C = (host) => activateModule(controller, host);
|
|
15
15
|
|
|
16
16
|
export function createUiTopBar(options = {}, html) {
|
|
17
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
17
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
18
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["title-for"].includes(name)));
|
|
18
19
|
const element = document.createElement("header");
|
|
19
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
20
|
-
if (value === null || value === undefined || value === false) continue;
|
|
21
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
22
|
-
}
|
|
23
20
|
element.setAttribute("component", "ui-top-bar");
|
|
24
21
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
25
22
|
const v = [false, undefined, null];
|
|
@@ -28,7 +25,7 @@ export function createUiTopBar(options = {}, html) {
|
|
|
28
25
|
const inputStatus = (j) => { if (j >= 1 && j < 2) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 2) return awaitInput(B, "titleFor", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
|
|
29
26
|
const X = { e: 0, g: (j) => g(j), w: new Set(), a: CS, i: inputStatus };
|
|
30
27
|
const ke = [];
|
|
31
|
-
const K = [() => (!(inputRead(v[2], inputStatus(2))
|
|
28
|
+
const K = [() => (!truthy(equalValue(inputRead(v[2], inputStatus(2)), "")) && !inputRead(v[0], inputStatus(0)))];
|
|
32
29
|
const g = (j) => {
|
|
33
30
|
const i = j - 1;
|
|
34
31
|
if (ke[i] === X.e) return v[j];
|
|
@@ -74,30 +71,34 @@ export function createUiTopBar(options = {}, html) {
|
|
|
74
71
|
const p4 = (r, c, d) => {
|
|
75
72
|
};
|
|
76
73
|
const p0 = (r, c, d) => {
|
|
74
|
+
if (c === -1) {
|
|
75
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
76
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
77
|
+
}
|
|
77
78
|
if (c & 4) {
|
|
78
|
-
const x0 = !(v[2]
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
79
|
+
const x0 = !truthy(equalValue(v[2], ""));
|
|
80
|
+
const s1 = x0;
|
|
81
|
+
if (s1 !== r.v1) r.a2.classList.toggle("scroll-title", r.v1 = s1);
|
|
81
82
|
}
|
|
82
83
|
if (c & 5) {
|
|
83
84
|
const x1 = g(1);
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
85
|
+
const s2 = x1;
|
|
86
|
+
if (s2 !== r.v2) r.a2.classList.toggle("concealed", r.v2 = s2);
|
|
87
|
+
const s3 = toAttribute(x1, "aria-hidden");
|
|
88
|
+
if (s3 !== r.v3) writeAttribute(r.a2, "aria-hidden", r.v3 = s3);
|
|
89
|
+
const s4 = toAttribute(x1, "inert");
|
|
90
|
+
if (s4 !== r.v4) writeAttribute(r.a2, "inert", r.v4 = s4);
|
|
90
91
|
}
|
|
91
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
92
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "leading", J, false, undefined, d);
|
|
92
93
|
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); } }
|
|
93
94
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
94
|
-
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.
|
|
95
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a3, r.e1, "", J, false, undefined, d);
|
|
95
96
|
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); } }
|
|
96
97
|
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
97
|
-
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.
|
|
98
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a4, r.e2, "search", J, false, undefined, d);
|
|
98
99
|
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); } }
|
|
99
100
|
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
100
|
-
if (r.f3 === undefined) { r.f3 = 1; const at = fillSlot(r.
|
|
101
|
+
if (r.f3 === undefined) { r.f3 = 1; const at = fillSlot(r.a5, r.e3, "actions", J, false, undefined, d);
|
|
101
102
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b3 = m4(d); at.before(r.b3.n); } }
|
|
102
103
|
else if (r.b3 !== undefined) p4(r.b3, c, d);
|
|
103
104
|
};
|
|
@@ -108,10 +109,11 @@ export function createUiTopBar(options = {}, html) {
|
|
|
108
109
|
const t4 = t2.nextSibling.nextSibling;
|
|
109
110
|
const t5 = t4.firstChild;
|
|
110
111
|
const t6 = t4.nextSibling.nextSibling.firstChild;
|
|
111
|
-
const R = {
|
|
112
|
+
const R = { n: element, a2: t2, v0: undefined, v1: false, v2: false, v3: null, v4: null, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a3: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a4: t5, e2: t5.nextSibling, b2: undefined, f2: undefined, a5: t6, e3: t6.nextSibling, b3: undefined, f3: undefined };
|
|
112
113
|
const I = { B };
|
|
113
114
|
const J = project(I, children, slots);
|
|
114
115
|
I.R = new Set();
|
|
116
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
115
117
|
attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, undefined, X, I);
|
|
116
118
|
manageProps(I);
|
|
117
119
|
return element;
|
package/vanilla/UiTree.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
2
|
export interface UiTreeEventMap {
|
|
3
3
|
reorder: CustomEvent<{ readonly sourceId: string; readonly targetId: string; readonly position: "before" | "inside" | "after"; readonly sourceType: string; readonly targetType: string; readonly sourceScope: string; readonly targetScope: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
"reorder-rejected": CustomEvent<{ readonly sourceId: string; readonly targetId: string; readonly position: "before" | "inside" | "after"; readonly reason: "max-depth"; readonly maxDepth: number; readonly resultingDepth: number; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
package/vanilla/UiTree.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkInteger, checkList, checkNumber, 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, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkInteger, checkList, checkNumber, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-tree/ui-tree.js";
|
|
4
4
|
import "../styles/ui-tree.css";
|
|
5
5
|
|
|
@@ -11,12 +11,9 @@ const D = { g: "ui-tree", props: { "density": { "required":false,"values":["comf
|
|
|
11
11
|
const C = (host) => activateModule(controller, host);
|
|
12
12
|
|
|
13
13
|
export function createUiTree(options = {}, html) {
|
|
14
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
14
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
15
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["density","hover-expand-delay","label","marquee","max-depth","move-activation","selection"].includes(name)));
|
|
15
16
|
const element = document.createElement("div");
|
|
16
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
17
|
-
if (value === null || value === undefined || value === false) continue;
|
|
18
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
19
|
-
}
|
|
20
17
|
if (!element.hasAttribute("role")) element.setAttribute("role", "tree");
|
|
21
18
|
element.setAttribute("component", "ui-tree");
|
|
22
19
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -31,19 +28,27 @@ export function createUiTree(options = {}, html) {
|
|
|
31
28
|
const p1 = (r, c, d) => {
|
|
32
29
|
};
|
|
33
30
|
const p0 = (r, c, d) => {
|
|
31
|
+
if (c === -1) {
|
|
32
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
33
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
34
|
+
const x0 = "tree";
|
|
35
|
+
const s1 = toAttribute(x0, "role");
|
|
36
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
37
|
+
}
|
|
34
38
|
if (c & 9) {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
39
|
+
const x1 = hostState(["marquee","density"], [v[3], v[0]]);
|
|
40
|
+
const s2 = x1;
|
|
41
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-ui-tree-state", (r.v2 = s2) === "" ? null : s2);
|
|
38
42
|
}
|
|
39
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
43
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
40
44
|
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); } }
|
|
41
45
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
42
46
|
};
|
|
43
47
|
const t0 = element.firstChild;
|
|
44
|
-
const R = { n: element, v0: undefined,
|
|
48
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
45
49
|
const I = { B };
|
|
46
50
|
const J = project(I, children, slots);
|
|
51
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
47
52
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
48
53
|
manageProps(I);
|
|
49
54
|
return element;
|
package/vanilla/UiTreeItem.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
2
|
export interface UiTreeItemEventMap {
|
|
3
3
|
expand: CustomEvent<{ readonly id: string; readonly expanded: boolean; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
}
|
package/vanilla/UiTreeItem.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, clearRegion, NONCONFORMING, readIndex, recordValue, textCall, toAttribute, toText, truthy, writeAttribute, dispatchDeclared, detailCheck, dispose, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkNumber, 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, clearRegion, NONCONFORMING, readIndex, recordValue, textCall, toAttribute, toText, truthy, writeAttribute, dispatchDeclared, detailCheck, dispose, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkNumber, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-tree-item/ui-tree-item.js";
|
|
4
4
|
import "../styles/ui-tree-item.css";
|
|
5
5
|
|
|
@@ -17,12 +17,9 @@ const D = { g: "ui-tree-item", props: { "accepts": { "required":false,"default":
|
|
|
17
17
|
const C = (host) => activateModule(controller, host);
|
|
18
18
|
|
|
19
19
|
export function createUiTreeItem(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]) => !["accepts","actions-visible","container","disabled","drag-type","drop-depth","drop-scope","expanded","item-id","label","lazy","marquee","selected","sortable","subtree-depth"].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", "treeitem");
|
|
27
24
|
element.setAttribute("component", "ui-tree-item");
|
|
28
25
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -103,88 +100,90 @@ export function createUiTreeItem(options = {}, html) {
|
|
|
103
100
|
const p7 = (r, c, d) => {
|
|
104
101
|
};
|
|
105
102
|
const p0 = (r, c, d) => {
|
|
106
|
-
if (c &
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const x1 = v[
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
103
|
+
if (c & 683810) {
|
|
104
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
105
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
106
|
+
const x0 = "treeitem";
|
|
107
|
+
const s1 = toAttribute(x0, "role");
|
|
108
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
109
|
+
const x1 = v[14];
|
|
110
|
+
const s2 = toAttribute(x1, "aria-label");
|
|
111
|
+
writeAttribute(r.n, "aria-label", r.v2 = s2);
|
|
112
|
+
const x2 = v[1];
|
|
113
|
+
const s3 = toAttribute(x2, "aria-level");
|
|
114
|
+
writeAttribute(r.n, "aria-level", r.v3 = s3);
|
|
115
|
+
const x3 = v[17];
|
|
116
|
+
const s4 = toAttribute(x3, "aria-selected");
|
|
117
|
+
writeAttribute(r.n, "aria-selected", r.v4 = s4);
|
|
118
|
+
const x4 = v[8];
|
|
119
|
+
const s5 = toAttribute(x4, "aria-disabled");
|
|
120
|
+
writeAttribute(r.n, "aria-disabled", r.v5 = s5);
|
|
121
|
+
const x5 = v[13];
|
|
122
|
+
const s6 = toAttribute(x5, "data-item-id");
|
|
123
|
+
writeAttribute(r.n, "data-item-id", r.v6 = s6);
|
|
124
|
+
const x6 = v[9];
|
|
125
|
+
const s7 = toAttribute(x6, "data-drag-type");
|
|
126
|
+
writeAttribute(r.n, "data-drag-type", r.v7 = s7);
|
|
127
|
+
const x7 = v[11];
|
|
128
|
+
const s8 = toAttribute(x7, "data-drop-scope");
|
|
129
|
+
writeAttribute(r.n, "data-drop-scope", r.v8 = s8);
|
|
130
|
+
const x8 = v[5];
|
|
131
|
+
const s9 = toAttribute(x8, "data-accepts");
|
|
132
|
+
writeAttribute(r.n, "data-accepts", r.v9 = s9);
|
|
133
|
+
const x9 = v[10];
|
|
134
|
+
const s10 = toAttribute(x9, "data-drop-depth");
|
|
135
|
+
writeAttribute(r.n, "data-drop-depth", r.v10 = s10);
|
|
136
|
+
const x10 = v[19];
|
|
137
|
+
const s11 = toAttribute(x10, "data-subtree-depth");
|
|
138
|
+
writeAttribute(r.n, "data-subtree-depth", r.v11 = s11);
|
|
122
139
|
}
|
|
123
140
|
if (c & 256) {
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
const s10 = toAttribute(x3, "disabled");
|
|
128
|
-
if (s10 !== r.v10) writeAttribute(r.a3, "disabled", r.v10 = s10);
|
|
129
|
-
const s13 = toAttribute(x3, "disabled");
|
|
130
|
-
if (s13 !== r.v13) writeAttribute(r.a4, "disabled", r.v13 = s13);
|
|
131
|
-
}
|
|
132
|
-
if (c & 8192) {
|
|
133
|
-
const x4 = v[13];
|
|
134
|
-
const s4 = toAttribute(x4, "data-item-id");
|
|
135
|
-
if (s4 !== r.v4) writeAttribute(r.n, "data-item-id", r.v4 = s4);
|
|
141
|
+
const x11 = v[8];
|
|
142
|
+
const s12 = toAttribute(x11, "disabled");
|
|
143
|
+
if (s12 !== r.v12) writeAttribute(r.a3, "disabled", r.v12 = s12);
|
|
136
144
|
}
|
|
137
|
-
if (c &
|
|
138
|
-
const
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
}
|
|
142
|
-
if (c & 2048) {
|
|
143
|
-
const x6 = v[11];
|
|
144
|
-
const s6 = toAttribute(x6, "data-drop-scope");
|
|
145
|
-
if (s6 !== r.v6) writeAttribute(r.n, "data-drop-scope", r.v6 = s6);
|
|
146
|
-
}
|
|
147
|
-
if (c & 32) {
|
|
148
|
-
const x7 = v[5];
|
|
149
|
-
const s7 = toAttribute(x7, "data-accepts");
|
|
150
|
-
if (s7 !== r.v7) writeAttribute(r.n, "data-accepts", r.v7 = s7);
|
|
151
|
-
}
|
|
152
|
-
if (c & 1024) {
|
|
153
|
-
const x8 = v[10];
|
|
154
|
-
const s8 = toAttribute(x8, "data-drop-depth");
|
|
155
|
-
if (s8 !== r.v8) writeAttribute(r.n, "data-drop-depth", r.v8 = s8);
|
|
145
|
+
if (c & 8) {
|
|
146
|
+
const x12 = !v[3];
|
|
147
|
+
const s13 = toAttribute(x12, "hidden");
|
|
148
|
+
if (s13 !== r.v13) writeAttribute(r.a3, "hidden", r.v13 = s13);
|
|
156
149
|
}
|
|
157
|
-
if (c &
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
150
|
+
if (c & 131072) {
|
|
151
|
+
const x13 = v[17];
|
|
152
|
+
const s14 = toAttribute(x13, "checked");
|
|
153
|
+
if (s14 !== r.v14) writeAttribute(r.a4, "checked", r.v14 = s14);
|
|
161
154
|
}
|
|
162
|
-
if (c &
|
|
163
|
-
const
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
155
|
+
if (c & 256) {
|
|
156
|
+
const x14 = v[8];
|
|
157
|
+
const s15 = toAttribute(x14, "disabled");
|
|
158
|
+
if (s15 !== r.v15) writeAttribute(r.a4, "disabled", r.v15 = s15);
|
|
166
159
|
}
|
|
167
160
|
if (c & 16384) {
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
170
|
-
const
|
|
171
|
-
if (
|
|
161
|
+
const x15 = textCall("concat", ["Select ", v[14]]);
|
|
162
|
+
if (x15 !== NONCONFORMING) {
|
|
163
|
+
const s16 = toAttribute(x15, "aria-label");
|
|
164
|
+
if (s16 !== r.v16) writeAttribute(r.a4, "aria-label", r.v16 = s16);
|
|
172
165
|
}
|
|
173
166
|
}
|
|
174
167
|
if (c & 9) {
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
168
|
+
const x16 = !(v[3] && v[0]);
|
|
169
|
+
const s17 = toAttribute(x16, "hidden");
|
|
170
|
+
if (s17 !== r.v17) writeAttribute(r.a12, "hidden", r.v17 = s17);
|
|
178
171
|
}
|
|
179
172
|
if (c & 131400) {
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
173
|
+
const x17 = hostState(["isContainer","selected","disabled","actionsVisible"], [v[3], v[17], v[8], v[6]]);
|
|
174
|
+
const s18 = x17;
|
|
175
|
+
if (s18 !== r.v18) writeAttribute(r.n, "data-ui-tree-item-state", (r.v18 = s18) === "" ? null : s18);
|
|
183
176
|
}
|
|
184
177
|
if (c & 262400 && !((truthy(v[18]) && !truthy(v[8]))) !== !r.b0) {
|
|
185
178
|
if (r.b0) { r.b0 = undefined; clearRegion(r.a2, r.e0); }
|
|
186
179
|
else { r.b0 = m1(d); r.e0.before(r.b0.n); }
|
|
187
180
|
} else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
181
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a6, r.e1, "leading", J, false, undefined, d);
|
|
182
|
+
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); } }
|
|
183
|
+
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
184
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a9, r.e2, "label", J, true, undefined, d, r.z ??= []);
|
|
185
|
+
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); } }
|
|
186
|
+
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
188
187
|
let t3;
|
|
189
188
|
if (c & 16 && (t3 = ((o) => { { const t = v[4]; if (t === NONCONFORMING) return t; if (truthy(t)) return 0; } return 1; return -1; })(undefined)) !== NONCONFORMING && t3 !== (r.b3 === undefined ? -1 : r.b3.s)) {
|
|
190
189
|
dispose(r.b3);
|
|
@@ -192,12 +191,6 @@ export function createUiTreeItem(options = {}, html) {
|
|
|
192
191
|
clearRegion(r.a11, r.e3);
|
|
193
192
|
if (t3 >= 0) { r.b3 = [m4, m5][t3](d); r.b3.s = t3; r.e3.before(r.b3.n); }
|
|
194
193
|
} else if (r.b3 !== undefined) { if (r.b3.s === 0) p4(r.b3, c, d); if (r.b3.s === 1) p5(r.b3, c, d); }
|
|
195
|
-
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a6, r.e1, "leading", J, false, undefined, d);
|
|
196
|
-
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); } }
|
|
197
|
-
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
198
|
-
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a9, r.e2, "label", J, true, undefined, d);
|
|
199
|
-
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); } }
|
|
200
|
-
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
201
194
|
if (r.f4 === undefined) { r.f4 = 1; const at = fillSlot(r.a13, r.e4, "", J, false, undefined, d);
|
|
202
195
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b4 = m7(d); at.before(r.b4.n); } }
|
|
203
196
|
else if (r.b4 !== undefined) p7(r.b4, c, d);
|
|
@@ -216,10 +209,11 @@ export function createUiTreeItem(options = {}, html) {
|
|
|
216
209
|
const t11 = t10.firstChild.nextSibling;
|
|
217
210
|
const t12 = t0.nextSibling.nextSibling;
|
|
218
211
|
const t13 = t12.firstChild;
|
|
219
|
-
const R = { n: element, a3: t2, a4: t4, a12: t12, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, v5: undefined, v6: undefined, v7: undefined, v8: undefined, v9: undefined, v10:
|
|
212
|
+
const R = { n: element, a3: t2, a4: t4, a12: t12, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, v5: undefined, v6: undefined, v7: undefined, v8: undefined, v9: undefined, v10: undefined, v11: undefined, v12: null, v13: null, v14: null, v15: null, v16: null, v17: null, v18: undefined, a2: t1, e0: t1.nextSibling, b0: undefined, a6: t6, e1: t6.nextSibling, b1: undefined, f1: undefined, a9: t9, e2: t9.nextSibling, b2: undefined, f2: undefined, a11: t11, e3: t11.nextSibling, b3: undefined, a13: t13, e4: t13.nextSibling, b4: undefined, f4: undefined };
|
|
220
213
|
const I = { B };
|
|
221
214
|
const J = project(I, children, slots);
|
|
222
215
|
I.R = new Set();
|
|
216
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
223
217
|
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);
|
|
224
218
|
manageProps(I);
|
|
225
219
|
I.r["row"] = t0;
|
package/vanilla/UiWizard.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
2
|
export interface UiWizardEventMap {
|
|
3
3
|
navigate: CustomEvent<{ readonly value: string; readonly previousValue: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
}
|