@threadlabs/looma 0.52.12 → 0.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/chunks/extensions.js +2 -2
- 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/UiList.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project,
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, equalValue, buildTemplate, toAttribute, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, armElement, replaceRoot, checkFormat, initializeSlot, sharePlainSlots, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-list.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],4];
|
|
@@ -13,25 +13,18 @@ const Q = [[],[]];
|
|
|
13
13
|
const D = { g: "ui-list", props: { "as": { "required":false,"values":["ul","ol"],"default":"ul", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "density": { "required":false,"values":["comfortable","compact"],"default":"comfortable", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "layout": { "required":false,"values":["rows","grid"],"default":"rows", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "markers": { "required":false,"values":["none","disc"],"default":"none", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
14
14
|
|
|
15
15
|
export function createUiList(options = {}, html) {
|
|
16
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
16
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
17
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["as","density","layout","markers"].includes(name)));
|
|
17
18
|
const v = [null, null, null, null];
|
|
18
19
|
let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
|
|
19
|
-
let a = ((v[0]
|
|
20
|
+
let a = (truthy(equalValue(v[0], "ol")) ? 0 : 1);
|
|
20
21
|
let element;
|
|
21
22
|
if (a === 0) {
|
|
22
23
|
element = document.createElement("ol");
|
|
23
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
24
|
-
if (value === null || value === undefined || value === false) continue;
|
|
25
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
26
|
-
}
|
|
27
24
|
element.setAttribute("component", "ui-list");
|
|
28
25
|
} else {
|
|
29
26
|
element = document.createElement("ul");
|
|
30
|
-
|
|
31
|
-
if (value === null || value === undefined || value === false) continue;
|
|
32
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
33
|
-
}
|
|
34
|
-
if (!element.hasAttribute("role")) element.setAttribute("role", "list");
|
|
27
|
+
element.setAttribute("role", "list");
|
|
35
28
|
element.setAttribute("component", "ui-list");
|
|
36
29
|
}
|
|
37
30
|
B = acceptProps(element, D, S.n, v, componentProps, Q[a], html);
|
|
@@ -54,36 +47,47 @@ export function createUiList(options = {}, html) {
|
|
|
54
47
|
const m0 = (n, d) => {
|
|
55
48
|
n.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
56
49
|
const t0 = n.firstChild;
|
|
57
|
-
const r = { n, v0: undefined,
|
|
50
|
+
const r = { n, v0: undefined, v1: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
58
51
|
p0(r, -1, d);
|
|
59
52
|
return r;
|
|
60
53
|
};
|
|
61
54
|
const p0 = (r, c, d) => {
|
|
55
|
+
if (c === -1) {
|
|
56
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
57
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
58
|
+
}
|
|
62
59
|
if (c & 15) {
|
|
63
60
|
const x0 = hostState(["as","markers","density","layout"], [v[0], v[3], v[1], v[2]]);
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
61
|
+
const s1 = x0;
|
|
62
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-list-state", (r.v1 = s1) === "" ? null : s1);
|
|
66
63
|
}
|
|
67
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
68
|
-
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); } }
|
|
69
|
-
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
64
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
65
|
+
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); } }
|
|
66
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
70
67
|
};
|
|
71
68
|
const m2 = (n, d) => {
|
|
72
69
|
n.append((P2 ??= buildTemplate(T2)).cloneNode(true));
|
|
73
70
|
const t0 = n.firstChild;
|
|
74
|
-
const r = { n, v0: undefined,
|
|
71
|
+
const r = { n, v0: undefined, v1: undefined, v2: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
75
72
|
p2(r, -1, d);
|
|
76
73
|
return r;
|
|
77
74
|
};
|
|
78
75
|
const p2 = (r, c, d) => {
|
|
76
|
+
if (c === -1) {
|
|
77
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
78
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
79
|
+
const x0 = "list";
|
|
80
|
+
const s1 = toAttribute(x0, "role");
|
|
81
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
82
|
+
}
|
|
79
83
|
if (c & 15) {
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
84
|
+
const x1 = hostState(["as","markers","density","layout"], [v[0], v[3], v[1], v[2]]);
|
|
85
|
+
const s2 = x1;
|
|
86
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-ui-list-state", (r.v2 = s2) === "" ? null : s2);
|
|
83
87
|
}
|
|
84
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
85
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m3(d); at.before(r.b0.n); } }
|
|
86
|
-
else if (r.b0 !== undefined) p3(r.b0, c, d);
|
|
88
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
89
|
+
if (typeof at === "function") r.f0 = 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.b0 = m3(d); at.before(r.b0.n); } }
|
|
90
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p3(r.b0, c, d);
|
|
87
91
|
};
|
|
88
92
|
const M = [m0, m2], N = [p0, p2];
|
|
89
93
|
let R;
|
|
@@ -91,7 +95,7 @@ export function createUiList(options = {}, html) {
|
|
|
91
95
|
if (R === null) return;
|
|
92
96
|
if (R === undefined) { R = M[a](element, d); return; }
|
|
93
97
|
if (c & 1) {
|
|
94
|
-
const t = ((v[0]
|
|
98
|
+
const t = (truthy(equalValue(v[0], "ol")) ? 0 : 1);
|
|
95
99
|
if (t !== a) {
|
|
96
100
|
dispose(R);
|
|
97
101
|
for (const key in I.r) delete I.r[key];
|
|
@@ -108,6 +112,8 @@ export function createUiList(options = {}, html) {
|
|
|
108
112
|
};
|
|
109
113
|
const I = { B };
|
|
110
114
|
const J = project(I, children, slots);
|
|
115
|
+
sharePlainSlots(I, J, [""]);
|
|
116
|
+
I.F = { values: attributes, draw: () => p(-1) };
|
|
111
117
|
attachGeneratedController(element, S, v, p, undefined, undefined, I);
|
|
112
118
|
manageProps(I);
|
|
113
119
|
return element;
|
package/vanilla/UiListItem.d.ts
CHANGED
package/vanilla/UiListItem.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, 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, buildTemplate, toAttribute, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkFormat, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-list-item.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",["span",["class","leading"],4],"\n ",["span",["class","content"],"\n ",["span",["class","title"],4],"\n ",["span",["class","description"],4],"\n "],"\n ",["span",["class","trailing"],4],"\n "];
|
|
@@ -12,12 +12,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-list-item", b: generatedInp
|
|
|
12
12
|
const D = { g: "ui-list-item", props: { "align": { "required":false,"values":["center","title"],"default":"center", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "current": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "highlighted": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "leadingInteractive": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "variant": { "required":false,"values":["row","card"],"default":"row", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "wrap": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" } } };
|
|
13
13
|
|
|
14
14
|
export function createUiListItem(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]) => !["align","current","highlighted","leading-interactive","variant","wrap"].includes(name)));
|
|
16
17
|
const element = document.createElement("li");
|
|
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-list-item");
|
|
22
19
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
23
20
|
const v = [null, null, null, null, null, null];
|
|
@@ -56,14 +53,16 @@ export function createUiListItem(options = {}, html) {
|
|
|
56
53
|
};
|
|
57
54
|
const p0 = (r, c, d) => {
|
|
58
55
|
if (c & 2) {
|
|
56
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
57
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
59
58
|
const x0 = v[1];
|
|
60
|
-
const
|
|
61
|
-
|
|
59
|
+
const s1 = toAttribute(x0, "aria-current");
|
|
60
|
+
writeAttribute(r.n, "aria-current", r.v1 = s1);
|
|
62
61
|
}
|
|
63
62
|
if (c & 63) {
|
|
64
63
|
const x1 = hostState(["variant","highlighted","current","leadingInteractive","wrap","align"], [v[4], v[2], v[1], v[3], v[5], v[0]]);
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
64
|
+
const s2 = x1;
|
|
65
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-ui-list-item-state", (r.v2 = s2) === "" ? null : s2);
|
|
67
66
|
}
|
|
68
67
|
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "leading", J, false, undefined, d);
|
|
69
68
|
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); } }
|
|
@@ -85,9 +84,10 @@ export function createUiListItem(options = {}, html) {
|
|
|
85
84
|
const t4 = t3.firstChild;
|
|
86
85
|
const t5 = t3.nextSibling.nextSibling.firstChild;
|
|
87
86
|
const t6 = t2.nextSibling.nextSibling.firstChild;
|
|
88
|
-
const R = { n: element, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a3: t5, e2: t5.nextSibling, b2: undefined, f2: undefined, a4: t6, e3: t6.nextSibling, b3: undefined, f3: undefined };
|
|
87
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a3: t5, e2: t5.nextSibling, b2: undefined, f2: undefined, a4: t6, e3: t6.nextSibling, b3: undefined, f3: undefined };
|
|
89
88
|
const I = { B };
|
|
90
89
|
const J = project(I, children, slots);
|
|
90
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
91
91
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
92
92
|
manageProps(I);
|
|
93
93
|
return element;
|
package/vanilla/UiListbox.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 UiListboxEventMap {
|
|
3
3
|
change: CustomEvent<{ readonly value?: string | null; readonly values: readonly (string)[]; readonly trigger: "keyboard" | "pointer" }>;
|
|
4
4
|
}
|
package/vanilla/UiListbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController,
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, checkedReferenceValue, equalValue, buildTemplate, clearRegion, KeyedList, negate, NONCONFORMING, readIndex, readMember, textCall, toAttribute, toText, trackContainer, truthy, visitSelected, writeAttribute, dispatchDeclared, detailCheck, dispose, IndexedList, keywordFormat, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkList, checkNumber, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-listbox/ui-listbox.js";
|
|
4
4
|
import "../styles/ui-listbox.css";
|
|
5
5
|
|
|
@@ -8,6 +8,9 @@ const T1 = ["div",["class","option","role","option","data-ui-choice-option","","
|
|
|
8
8
|
const T2 = ["",[]];
|
|
9
9
|
const T3 = ["",[],"\n ",2,"\n "];
|
|
10
10
|
const T4 = ["input",["type","hidden"]];
|
|
11
|
+
const RC0 = ["i", "integer"];
|
|
12
|
+
const RC1 = ["b", "boolean"];
|
|
13
|
+
const RC2 = ["s", "string"];
|
|
11
14
|
let P0, P1, P2, P3, P4;
|
|
12
15
|
const emptyDirty = new Map();
|
|
13
16
|
const S = { n: ["choices","selection","hasSelection","active","uid","validationError"], t: [["l",["o",["value","s","label","s","disabled","b","selected","b","index","i"]]],["l","s"],"b","i","s","b"], f: import.meta.url, g: "ui-listbox", d: { "change": [detailCheck(checkObject([["value", checkString, true], ["values", checkList(checkString), false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["keyboard","pointer"]}), false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs, i: [[], [], false, null, "", false] };
|
|
@@ -15,12 +18,9 @@ const D = { g: "ui-listbox", props: { "disabled": { "required":false,"default":f
|
|
|
15
18
|
const C = (host) => activateModule(controller, host);
|
|
16
19
|
|
|
17
20
|
export function createUiListbox(options = {}, html) {
|
|
18
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
21
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
22
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["disabled","invalid","multiple","name","required","rows","value","values"].includes(name)));
|
|
19
23
|
const element = document.createElement("div");
|
|
20
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
21
|
-
if (value === null || value === undefined || value === false) continue;
|
|
22
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
23
|
-
}
|
|
24
24
|
if (!element.hasAttribute("role")) element.setAttribute("role", "listbox");
|
|
25
25
|
element.setAttribute("component", "ui-listbox");
|
|
26
26
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -39,9 +39,9 @@ export function createUiListbox(options = {}, html) {
|
|
|
39
39
|
const o = r.i;
|
|
40
40
|
if (c & 1073741824) r.w = 0;
|
|
41
41
|
if (c & 1073741832) {
|
|
42
|
-
const x0 = (
|
|
42
|
+
const x0 = equalValue(checkedReferenceValue(S, readMember(o, "index"), RC0, "expression:$choice.index = $active:choice.index", "choice.index"), checkedReferenceValue(S, v[3], RC0, "expression:$choice.index = $active:active", "active"));
|
|
43
43
|
if (x0 !== NONCONFORMING) {
|
|
44
|
-
const s0 = x0;
|
|
44
|
+
const s0 = truthy(x0);
|
|
45
45
|
if (s0 !== r.v0) r.n.classList.toggle("active", r.v0 = s0);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -51,25 +51,33 @@ export function createUiListbox(options = {}, html) {
|
|
|
51
51
|
if (s1 !== r.v1) writeAttribute(r.n, "data-multiple", r.v1 = s1);
|
|
52
52
|
}
|
|
53
53
|
if (c & 1073741840) {
|
|
54
|
-
const x2 = textCall("concat", [v[4], "-option-", trackContainer(r, readMember(o, "index"))]);
|
|
54
|
+
const x2 = textCall("concat", [v[4], "-option-", trackContainer(r, checkedReferenceValue(S, readMember(o, "index"), RC0, "expression:concat($uid, '-option-', $choice.index):choice.index", "choice.index"))]);
|
|
55
55
|
if (x2 !== NONCONFORMING) {
|
|
56
56
|
const s2 = toAttribute(x2, "id");
|
|
57
57
|
if (s2 !== r.v2) writeAttribute(r.n, "id", r.v2 = s2);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
if (c & 1073741824) {
|
|
61
|
-
const x3 = trackContainer(r, readMember(o, "index"));
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
61
|
+
const x3 = trackContainer(r, checkedReferenceValue(S, readMember(o, "index"), RC0, "expression:$choice.index:choice.index", "choice.index"));
|
|
62
|
+
if (x3 !== NONCONFORMING) {
|
|
63
|
+
const s3 = toAttribute(x3, "data-index");
|
|
64
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-index", r.v3 = s3);
|
|
65
|
+
}
|
|
66
|
+
const x4 = trackContainer(r, checkedReferenceValue(S, readMember(o, "selected"), RC1, "expression:$choice.selected:choice.selected", "choice.selected"));
|
|
67
|
+
if (x4 !== NONCONFORMING) {
|
|
68
|
+
const s4 = toAttribute(x4, "aria-selected");
|
|
69
|
+
if (s4 !== r.v4) writeAttribute(r.n, "aria-selected", r.v4 = s4);
|
|
70
|
+
}
|
|
71
|
+
const x5 = trackContainer(r, checkedReferenceValue(S, readMember(o, "disabled"), RC1, "expression:$choice.disabled:choice.disabled", "choice.disabled"));
|
|
72
|
+
if (x5 !== NONCONFORMING) {
|
|
73
|
+
const s5 = toAttribute(x5, "aria-disabled");
|
|
74
|
+
if (s5 !== r.v5) writeAttribute(r.n, "aria-disabled", r.v5 = s5);
|
|
75
|
+
}
|
|
76
|
+
const x6 = trackContainer(r, checkedReferenceValue(S, readMember(o, "label"), RC2, "expression:$choice.label:choice.label", "choice.label"));
|
|
77
|
+
if (x6 !== NONCONFORMING) {
|
|
78
|
+
const s6 = toText(x6);
|
|
79
|
+
if (s6 !== r.v6) r.a1.data = r.v6 = s6;
|
|
80
|
+
}
|
|
73
81
|
}
|
|
74
82
|
};
|
|
75
83
|
const m2 = (d) => {
|
|
@@ -106,91 +114,92 @@ export function createUiListbox(options = {}, html) {
|
|
|
106
114
|
if (s0 !== r.v0) writeAttribute(r.n, "name", r.v0 = s0);
|
|
107
115
|
}
|
|
108
116
|
if (c & 1073741824) {
|
|
109
|
-
const x1 = trackContainer(r, o);
|
|
110
|
-
|
|
111
|
-
|
|
117
|
+
const x1 = trackContainer(r, checkedReferenceValue(S, o, RC2, "expression:$selected:selected", "selected"));
|
|
118
|
+
if (x1 !== NONCONFORMING) {
|
|
119
|
+
const s1 = toAttribute(x1, "value");
|
|
120
|
+
if (s1 !== r.v1) writeAttribute(r.n, "value", r.v1 = s1);
|
|
121
|
+
}
|
|
112
122
|
}
|
|
113
123
|
};
|
|
114
124
|
const p0 = (r, c, d) => {
|
|
115
|
-
if (c &
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
125
|
+
if (c & 1073745376) {
|
|
126
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
127
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
128
|
+
const x0 = "listbox";
|
|
129
|
+
const s1 = toAttribute(x0, "role");
|
|
130
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
131
|
+
const x1 = readIndex({ "true": "-1", "false": "0" }, textCall("concat", [v[6]]));
|
|
132
|
+
if (x1 !== NONCONFORMING) r.g2 = x1;
|
|
133
|
+
if (r.g2 !== NONCONFORMING) {
|
|
134
|
+
const s2 = toAttribute(r.g2, "tabindex");
|
|
135
|
+
writeAttribute(r.n, "tabindex", r.v2 = s2);
|
|
120
136
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
if (c & 160) {
|
|
138
|
-
const x4 = (truthy(v[7]) || v[5]);
|
|
139
|
-
const s4 = toAttribute(x4, "aria-invalid");
|
|
140
|
-
if (s4 !== r.v4) writeAttribute(r.n, "aria-invalid", r.v4 = s4);
|
|
137
|
+
const x2 = v[8];
|
|
138
|
+
const s3 = toAttribute(x2, "aria-multiselectable");
|
|
139
|
+
writeAttribute(r.n, "aria-multiselectable", r.v3 = s3);
|
|
140
|
+
const x3 = v[6];
|
|
141
|
+
const s4 = toAttribute(x3, "aria-disabled");
|
|
142
|
+
writeAttribute(r.n, "aria-disabled", r.v4 = s4);
|
|
143
|
+
const x4 = v[10];
|
|
144
|
+
const s5 = toAttribute(x4, "aria-required");
|
|
145
|
+
writeAttribute(r.n, "aria-required", r.v5 = s5);
|
|
146
|
+
const x5 = (truthy(v[7]) || v[5]);
|
|
147
|
+
const s6 = toAttribute(x5, "aria-invalid");
|
|
148
|
+
writeAttribute(r.n, "aria-invalid", r.v6 = s6);
|
|
149
|
+
const x6 = v[11];
|
|
150
|
+
const s7 = toText(x6);
|
|
151
|
+
r.n.style.setProperty("--_rows", r.v7 = s7);
|
|
141
152
|
}
|
|
142
153
|
if (c & 2048) {
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
const s6 = toAttribute(x5, "size");
|
|
147
|
-
if (s6 !== r.v6) writeAttribute(r.a3, "size", r.v6 = s6);
|
|
154
|
+
const x7 = v[11];
|
|
155
|
+
const s8 = toAttribute(x7, "size");
|
|
156
|
+
if (s8 !== r.v8) writeAttribute(r.a3, "size", r.v8 = s8);
|
|
148
157
|
}
|
|
149
158
|
if (c & 256) {
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
159
|
+
const x8 = v[8];
|
|
160
|
+
const s9 = toAttribute(x8, "multiple");
|
|
161
|
+
if (s9 !== r.v9) writeAttribute(r.a3, "multiple", r.v9 = s9);
|
|
153
162
|
}
|
|
154
163
|
if (c & 64) {
|
|
155
|
-
const
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
164
|
+
const x9 = v[6];
|
|
165
|
+
const s10 = toAttribute(x9, "disabled");
|
|
166
|
+
if (s10 !== r.v10) writeAttribute(r.a3, "disabled", r.v10 = s10);
|
|
158
167
|
}
|
|
159
168
|
if (c & 1024) {
|
|
160
|
-
const
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
169
|
+
const x10 = v[10];
|
|
170
|
+
const s11 = toAttribute(x10, "required");
|
|
171
|
+
if (s11 !== r.v11) writeAttribute(r.a3, "required", r.v11 = s11);
|
|
163
172
|
}
|
|
164
173
|
if (c & 512) {
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
174
|
+
const x11 = v[9];
|
|
175
|
+
const s12 = toAttribute(x11, "name");
|
|
176
|
+
if (s12 !== r.v12) writeAttribute(r.a3, "name", r.v12 = s12);
|
|
168
177
|
}
|
|
169
178
|
if (c & 1092) {
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
179
|
+
const x12 = ((truthy(v[10]) && !v[2]) && !truthy(v[6]));
|
|
180
|
+
const s13 = toAttribute(x12, "required");
|
|
181
|
+
if (s13 !== r.v13) writeAttribute(r.a6, "required", r.v13 = s13);
|
|
173
182
|
}
|
|
174
183
|
if (c & 4) {
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
184
|
+
const x13 = v[2];
|
|
185
|
+
const s14 = toAttribute(x13, "checked");
|
|
186
|
+
if (s14 !== r.v14) writeAttribute(r.a6, "checked", r.v14 = s14);
|
|
178
187
|
}
|
|
179
188
|
if (c & 64) {
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
189
|
+
const x14 = v[6];
|
|
190
|
+
const s15 = toAttribute(x14, "disabled");
|
|
191
|
+
if (s15 !== r.v15) writeAttribute(r.a6, "disabled", r.v15 = s15);
|
|
183
192
|
}
|
|
184
193
|
if (c & 1073741825) r.L0.update(v[0], d, c);
|
|
185
194
|
if (c !== -1 && c & 272) r.L0.each(c, d);
|
|
186
195
|
if (c !== -1 && c & 8 && !(c & 272)) visitSelected(r.L0.m, s3, v[3], p1, c);
|
|
196
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a4, r.e1, "", J, false, undefined, d);
|
|
197
|
+
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); } }
|
|
198
|
+
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
187
199
|
if (c & 576 && !((truthy(v[9]) && !truthy(v[6]))) !== !r.b2) {
|
|
188
200
|
if (r.b2) { r.b2 = undefined; clearRegion(r.a5, r.e2); }
|
|
189
201
|
else { r.b2 = m3(d); r.e2.before(r.b2.n); }
|
|
190
202
|
} else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
191
|
-
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a4, r.e1, "", J, false, undefined, d);
|
|
192
|
-
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); } }
|
|
193
|
-
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
194
203
|
s3 = v[3];
|
|
195
204
|
};
|
|
196
205
|
const t0 = element.firstChild.nextSibling;
|
|
@@ -200,10 +209,11 @@ export function createUiListbox(options = {}, html) {
|
|
|
200
209
|
const t4 = t3.firstChild.nextSibling;
|
|
201
210
|
const t5 = t3.nextSibling.nextSibling;
|
|
202
211
|
const t6 = t5.nextSibling.nextSibling.nextSibling;
|
|
203
|
-
const R = { n: element, a3: t3, a6: t6, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, v5: undefined, v6:
|
|
212
|
+
const R = { n: element, a3: t3, a6: t6, v0: undefined, v1: undefined, v2: undefined, g2: NONCONFORMING, v3: undefined, v4: undefined, v5: undefined, v6: undefined, v7: undefined, v8: null, v9: null, v10: null, v11: null, v12: null, v13: null, v14: null, v15: null, L0: new KeyedList(t2, t2.nextSibling, m1, p1, (o) => readMember(o, "index"), "choice"), a4: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a5: t5, e2: t5.nextSibling, b2: undefined };
|
|
204
213
|
const I = { B };
|
|
205
214
|
const J = project(I, children, slots);
|
|
206
215
|
I.R = new Set();
|
|
216
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
207
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);
|
|
208
218
|
manageProps(I);
|
|
209
219
|
I.r["choices"] = t1;
|
package/vanilla/UiMenu.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 UiMenuEventMap {
|
|
3
3
|
select: CustomEvent<{ readonly value: string; readonly checked?: boolean | null; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
open: CustomEvent<{ readonly open: boolean; readonly reason: "action" | "programmatic"; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
package/vanilla/UiMenu.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, 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, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-menu/ui-menu.js";
|
|
4
4
|
import "../styles/ui-menu.css";
|
|
5
5
|
|
|
@@ -11,12 +11,9 @@ const D = { g: "ui-menu", props: { "density": { "required":false,"values":["comf
|
|
|
11
11
|
const C = (host) => activateModule(controller, host);
|
|
12
12
|
|
|
13
13
|
export function createUiMenu(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","for","icons","inline","open","placement","size"].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", "menu");
|
|
21
18
|
if (!element.hasAttribute("aria-orientation")) element.setAttribute("aria-orientation", "vertical");
|
|
22
19
|
element.setAttribute("component", "ui-menu");
|
|
@@ -32,20 +29,31 @@ export function createUiMenu(options = {}, html) {
|
|
|
32
29
|
const p1 = (r, c, d) => {
|
|
33
30
|
};
|
|
34
31
|
const p0 = (r, c, d) => {
|
|
32
|
+
if (c === -1) {
|
|
33
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
34
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
35
|
+
const x0 = "menu";
|
|
36
|
+
const s1 = toAttribute(x0, "role");
|
|
37
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
38
|
+
const x1 = "vertical";
|
|
39
|
+
const s2 = toAttribute(x1, "aria-orientation");
|
|
40
|
+
writeAttribute(r.n, "aria-orientation", r.v2 = s2);
|
|
41
|
+
}
|
|
35
42
|
if (c & 155) {
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
43
|
+
const x2 = hostState(["density","size","icons","internalOpen","inline"], [v[1], v[7], v[3], v[0], v[4]]);
|
|
44
|
+
const s3 = x2;
|
|
45
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-ui-menu-state", (r.v3 = s3) === "" ? null : s3);
|
|
39
46
|
}
|
|
40
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
47
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
41
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); } }
|
|
42
49
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
43
50
|
};
|
|
44
51
|
const t0 = element.firstChild.firstChild;
|
|
45
|
-
const R = { n: element, v0: undefined,
|
|
52
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
46
53
|
const I = { B };
|
|
47
54
|
const J = project(I, children, slots);
|
|
48
55
|
I.R = new Set();
|
|
56
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
49
57
|
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);
|
|
50
58
|
manageProps(I);
|
|
51
59
|
return element;
|
package/vanilla/UiMenuGroup.d.ts
CHANGED
package/vanilla/UiMenuGroup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, clearRegion, toAttribute, toText, truthy, writeAttribute, dispose, acceptProps, manageProps, generatedInputs, project, fillSlot, 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, buildTemplate, clearRegion, toAttribute, toText, truthy, writeAttribute, dispose, acceptProps, manageProps, generatedInputs, project, fillSlot, checkString, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-menu-group.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",1,"\n ",4,"\n "];
|
|
@@ -10,12 +10,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-menu-group", b: generatedIn
|
|
|
10
10
|
const D = { g: "ui-menu-group", props: { "label": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" } } };
|
|
11
11
|
|
|
12
12
|
export function createUiMenuGroup(options = {}, html) {
|
|
13
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
13
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
14
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["label"].includes(name)));
|
|
14
15
|
const element = document.createElement("div");
|
|
15
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
16
|
-
if (value === null || value === undefined || value === false) continue;
|
|
17
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
18
|
-
}
|
|
19
16
|
if (!element.hasAttribute("role")) element.setAttribute("role", "group");
|
|
20
17
|
element.setAttribute("component", "ui-menu-group");
|
|
21
18
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -45,9 +42,14 @@ export function createUiMenuGroup(options = {}, html) {
|
|
|
45
42
|
};
|
|
46
43
|
const p0 = (r, c, d) => {
|
|
47
44
|
if (c & 1) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
46
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
47
|
+
const x0 = "group";
|
|
48
|
+
const s1 = toAttribute(x0, "role");
|
|
49
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
50
|
+
const x1 = v[0];
|
|
51
|
+
const s2 = toAttribute(x1, "aria-label");
|
|
52
|
+
writeAttribute(r.n, "aria-label", r.v2 = s2);
|
|
51
53
|
}
|
|
52
54
|
if (c & 1 && !(truthy(v[0])) !== !r.b0) {
|
|
53
55
|
if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
|
|
@@ -59,9 +61,10 @@ export function createUiMenuGroup(options = {}, html) {
|
|
|
59
61
|
};
|
|
60
62
|
const t0 = element.firstChild.nextSibling;
|
|
61
63
|
const t1 = t0.nextSibling.nextSibling.nextSibling;
|
|
62
|
-
const R = { n: element, v0: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, a2: t1, e1: t1.nextSibling, b1: undefined, f1: undefined };
|
|
64
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, a2: t1, e1: t1.nextSibling, b1: undefined, f1: undefined };
|
|
63
65
|
const I = { B };
|
|
64
66
|
const J = project(I, children, slots);
|
|
67
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
65
68
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
66
69
|
manageProps(I);
|
|
67
70
|
return element;
|
package/vanilla/UiMenuItem.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 UiMenuItemEventMap {
|
|
3
3
|
change: CustomEvent<{ readonly checked: boolean; readonly value: string; readonly type: "checkbox" | "radio"; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
}
|