@threadlabs/looma 0.52.12 → 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
|
@@ -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-search-result-row.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",["span",["class","leading"],4],"\n ",["span",["class","content"],"\n ",["span",["class","title"],4],"\n ",["span",["class","meta"],4],"\n ",["span",["class","excerpt"],4],"\n "],"\n ",["span",["class","trailing"],4],"\n "];
|
|
@@ -13,12 +13,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-search-result-row", b: gene
|
|
|
13
13
|
const D = { g: "ui-search-result-row", props: { "density": { "required":false,"values":["comfortable","compact"],"default":"comfortable", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "selected": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" } } };
|
|
14
14
|
|
|
15
15
|
export function createUiSearchResultRow(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]) => !["density","disabled","selected"].includes(name)));
|
|
17
18
|
const element = document.createElement("button");
|
|
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
19
|
if (!element.hasAttribute("type")) element.setAttribute("type", "button");
|
|
23
20
|
element.setAttribute("component", "ui-search-result-row");
|
|
24
21
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -65,20 +62,23 @@ export function createUiSearchResultRow(options = {}, html) {
|
|
|
65
62
|
const p5 = (r, c, d) => {
|
|
66
63
|
};
|
|
67
64
|
const p0 = (r, c, d) => {
|
|
68
|
-
if (c &
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const x1 = v[
|
|
75
|
-
const
|
|
76
|
-
|
|
65
|
+
if (c & 6) {
|
|
66
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
67
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
68
|
+
const x0 = "button";
|
|
69
|
+
const s1 = toAttribute(x0, "type");
|
|
70
|
+
writeAttribute(r.n, "type", r.v1 = s1);
|
|
71
|
+
const x1 = v[1];
|
|
72
|
+
const s2 = toAttribute(x1, "disabled");
|
|
73
|
+
writeAttribute(r.n, "disabled", r.v2 = s2);
|
|
74
|
+
const x2 = v[2];
|
|
75
|
+
const s3 = toAttribute(x2, "aria-current");
|
|
76
|
+
writeAttribute(r.n, "aria-current", r.v3 = s3);
|
|
77
77
|
}
|
|
78
78
|
if (c & 5) {
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
79
|
+
const x3 = hostState(["density","selected"], [v[0], v[2]]);
|
|
80
|
+
const s4 = x3;
|
|
81
|
+
if (s4 !== r.v4) writeAttribute(r.n, "data-ui-search-result-row-state", (r.v4 = s4) === "" ? null : s4);
|
|
82
82
|
}
|
|
83
83
|
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "leading", J, false, undefined, d);
|
|
84
84
|
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); } }
|
|
@@ -105,9 +105,10 @@ export function createUiSearchResultRow(options = {}, html) {
|
|
|
105
105
|
const t6 = t5.firstChild;
|
|
106
106
|
const t7 = t5.nextSibling.nextSibling.firstChild;
|
|
107
107
|
const t8 = t2.nextSibling.nextSibling.firstChild;
|
|
108
|
-
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: t6, e2: t6.nextSibling, b2: undefined, f2: undefined, a4: t7, e3: t7.nextSibling, b3: undefined, f3: undefined, a5: t8, e4: t8.nextSibling, b4: undefined, f4: undefined };
|
|
108
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a3: t6, e2: t6.nextSibling, b2: undefined, f2: undefined, a4: t7, e3: t7.nextSibling, b3: undefined, f3: undefined, a5: t8, e4: t8.nextSibling, b4: undefined, f4: undefined };
|
|
109
109
|
const I = { B };
|
|
110
110
|
const J = project(I, children, slots);
|
|
111
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
111
112
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
112
113
|
manageProps(I);
|
|
113
114
|
return element;
|
|
@@ -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 UiSearchShellEventMap {
|
|
3
3
|
close: CustomEvent<{ readonly open: boolean; readonly reason: "action" | "programmatic" | "light-dismiss" | "escape"; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
}
|
package/vanilla/UiSearchShell.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, keywordFormat, 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, keywordFormat, 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-search-shell/ui-search-shell.js";
|
|
4
4
|
import "../styles/ui-search-shell.css";
|
|
5
5
|
|
|
@@ -14,12 +14,9 @@ const D = { g: "ui-search-shell", props: { "dismissible": { "required":false,"de
|
|
|
14
14
|
const C = (host) => activateModule(controller, host);
|
|
15
15
|
|
|
16
16
|
export function createUiSearchShell(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]) => !["dismissible","label","modal","open"].includes(name)));
|
|
18
19
|
const element = document.createElement("div");
|
|
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-search-shell");
|
|
24
21
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
25
22
|
const v = [false, null, null, null, null];
|
|
@@ -57,21 +54,25 @@ export function createUiSearchShell(options = {}, html) {
|
|
|
57
54
|
const p4 = (r, c, d) => {
|
|
58
55
|
};
|
|
59
56
|
const p0 = (r, c, d) => {
|
|
57
|
+
if (c === -1) {
|
|
58
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
59
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
60
|
+
}
|
|
60
61
|
if (c & 4) {
|
|
61
62
|
const x0 = v[2];
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
63
|
+
const s1 = toAttribute(x0, "aria-label");
|
|
64
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "aria-label", r.v1 = s1);
|
|
64
65
|
}
|
|
65
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
66
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "search", J, false, undefined, d);
|
|
66
67
|
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); } }
|
|
67
68
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
68
|
-
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.
|
|
69
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a3, r.e1, "status", J, false, undefined, d);
|
|
69
70
|
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); } }
|
|
70
71
|
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
71
|
-
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.
|
|
72
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a4, r.e2, "body", J, false, undefined, d);
|
|
72
73
|
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); } }
|
|
73
74
|
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
74
|
-
if (r.f3 === undefined) { r.f3 = 1; const at = fillSlot(r.
|
|
75
|
+
if (r.f3 === undefined) { r.f3 = 1; const at = fillSlot(r.a5, r.e3, "footer", J, false, undefined, d);
|
|
75
76
|
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); } }
|
|
76
77
|
else if (r.b3 !== undefined) p4(r.b3, c, d);
|
|
77
78
|
};
|
|
@@ -84,10 +85,11 @@ export function createUiSearchShell(options = {}, html) {
|
|
|
84
85
|
const t6 = t4.nextSibling.nextSibling;
|
|
85
86
|
const t7 = t6.firstChild;
|
|
86
87
|
const t8 = t6.nextSibling.nextSibling.firstChild;
|
|
87
|
-
const R = {
|
|
88
|
+
const R = { n: element, a1: t0, v0: undefined, v1: null, a2: t3, e0: t3.nextSibling, b0: undefined, f0: undefined, a3: t5, e1: t5.nextSibling, b1: undefined, f1: undefined, a4: t7, e2: t7.nextSibling, b2: undefined, f2: undefined, a5: t8, e3: t8.nextSibling, b3: undefined, f3: undefined };
|
|
88
89
|
const I = { B };
|
|
89
90
|
const J = project(I, children, slots);
|
|
90
91
|
I.R = new Set();
|
|
92
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
91
93
|
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);
|
|
92
94
|
manageProps(I);
|
|
93
95
|
I.r["dialog"] = t0;
|
package/vanilla/UiSection.d.ts
CHANGED
package/vanilla/UiSection.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, toAttribute, toText, truthy, 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, toText, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, armElement, replaceRoot, checkFormat, checkString, initializeSlot, sharePlainSlots, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-section.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",["legend",["class","legend"],["h2",["class","heading"],0]],"\n ",["span",["class","content"],"\n ",["span",["class","head"],"\n ",["span",["class","copy"],["span",["class","description"],4]],"\n ",["span",["class","actions"],4],"\n "],"\n ",["span",["class","body"],4],"\n "],"\n "];
|
|
@@ -17,24 +17,17 @@ const Q = [[],[]];
|
|
|
17
17
|
const D = { g: "ui-section", props: { "heading": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "tone": { "required":false,"values":["neutral","danger"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["plain","card","divided","fieldset"],"default":"plain", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
18
18
|
|
|
19
19
|
export function createUiSection(options = {}, html) {
|
|
20
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
20
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
21
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["heading","tone","variant"].includes(name)));
|
|
21
22
|
const v = [null, null, null];
|
|
22
23
|
let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
|
|
23
|
-
let a = ((v[2]
|
|
24
|
+
let a = (truthy(equalValue(v[2], "fieldset")) ? 0 : 1);
|
|
24
25
|
let element;
|
|
25
26
|
if (a === 0) {
|
|
26
27
|
element = document.createElement("fieldset");
|
|
27
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
28
|
-
if (value === null || value === undefined || value === false) continue;
|
|
29
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
30
|
-
}
|
|
31
28
|
element.setAttribute("component", "ui-section");
|
|
32
29
|
} else {
|
|
33
30
|
element = document.createElement("section");
|
|
34
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
35
|
-
if (value === null || value === undefined || value === false) continue;
|
|
36
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
37
|
-
}
|
|
38
31
|
element.setAttribute("component", "ui-section");
|
|
39
32
|
}
|
|
40
33
|
B = acceptProps(element, D, S.n, v, componentProps, Q[a], html);
|
|
@@ -96,33 +89,37 @@ export function createUiSection(options = {}, html) {
|
|
|
96
89
|
const t5 = t4.firstChild.firstChild;
|
|
97
90
|
const t6 = t4.nextSibling.nextSibling.firstChild;
|
|
98
91
|
const t7 = t3.nextSibling.nextSibling.firstChild;
|
|
99
|
-
const r = { n,
|
|
92
|
+
const r = { n, a1: t0, a2: t1, v0: undefined, v1: null, v2: "", v3: undefined, a3: t5, e0: t5.nextSibling, b0: undefined, f0: undefined, a4: t6, e1: t6.nextSibling, b1: undefined, f1: undefined, a5: t7, e2: t7.nextSibling, b2: undefined, f2: undefined };
|
|
100
93
|
p0(r, -1, d);
|
|
101
94
|
return r;
|
|
102
95
|
};
|
|
103
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
|
+
}
|
|
104
101
|
if (c & 1) {
|
|
105
102
|
const x0 = !truthy(v[0]);
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
103
|
+
const s1 = toAttribute(x0, "hidden");
|
|
104
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "hidden", r.v1 = s1);
|
|
108
105
|
const x1 = v[0];
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
106
|
+
const s2 = toText(x1);
|
|
107
|
+
if (s2 !== r.v2) r.a2.data = r.v2 = s2;
|
|
111
108
|
}
|
|
112
109
|
if (c & 6) {
|
|
113
110
|
const x2 = hostState(["variant","tone"], [v[2], v[1]]);
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
111
|
+
const s3 = x2;
|
|
112
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-ui-section-state", (r.v3 = s3) === "" ? null : s3);
|
|
116
113
|
}
|
|
117
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
118
|
-
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); } }
|
|
119
|
-
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
120
|
-
if (r.f1 === undefined) { r.f1 = 1; const at =
|
|
121
|
-
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); } }
|
|
122
|
-
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
123
|
-
if (r.f2 === undefined) { r.f2 = 1; const at =
|
|
124
|
-
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); } }
|
|
125
|
-
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
114
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a3, r.e0, "description", J, false, undefined, d);
|
|
115
|
+
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); } }
|
|
116
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
117
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a4, r.e1, "actions", J, false, undefined, d);
|
|
118
|
+
if (typeof at === "function") r.f1 = at(r, (d, at) => m2(d, undefined, r), p2); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
|
|
119
|
+
else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
120
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a5, r.e2, "", J, false, undefined, d);
|
|
121
|
+
if (typeof at === "function") r.f2 = at(r, (d, at) => m3(d, undefined, r), p3); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m3(d); at.before(r.b2.n); } }
|
|
122
|
+
else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
126
123
|
};
|
|
127
124
|
const m4 = (n, d) => {
|
|
128
125
|
n.append((P4 ??= buildTemplate(T4)).cloneNode(true));
|
|
@@ -133,33 +130,37 @@ export function createUiSection(options = {}, html) {
|
|
|
133
130
|
const t4 = t2.nextSibling.nextSibling.firstChild;
|
|
134
131
|
const t5 = t1.nextSibling.nextSibling.firstChild;
|
|
135
132
|
const t6 = t0.nextSibling.nextSibling.firstChild;
|
|
136
|
-
const r = { n,
|
|
133
|
+
const r = { n, a1: t2, a2: t3, v0: undefined, v1: null, v2: "", v3: undefined, a3: t4, e0: t4.nextSibling, b0: undefined, f0: undefined, a4: t5, e1: t5.nextSibling, b1: undefined, f1: undefined, a5: t6, e2: t6.nextSibling, b2: undefined, f2: undefined };
|
|
137
134
|
p4(r, -1, d);
|
|
138
135
|
return r;
|
|
139
136
|
};
|
|
140
137
|
const p4 = (r, c, d) => {
|
|
138
|
+
if (c === -1) {
|
|
139
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
140
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
141
|
+
}
|
|
141
142
|
if (c & 1) {
|
|
142
143
|
const x0 = !truthy(v[0]);
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
144
|
+
const s1 = toAttribute(x0, "hidden");
|
|
145
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "hidden", r.v1 = s1);
|
|
145
146
|
const x1 = v[0];
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
147
|
+
const s2 = toText(x1);
|
|
148
|
+
if (s2 !== r.v2) r.a2.data = r.v2 = s2;
|
|
148
149
|
}
|
|
149
150
|
if (c & 6) {
|
|
150
151
|
const x2 = hostState(["variant","tone"], [v[2], v[1]]);
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
152
|
+
const s3 = x2;
|
|
153
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-ui-section-state", (r.v3 = s3) === "" ? null : s3);
|
|
153
154
|
}
|
|
154
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
155
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m5(d); at.before(r.b0.n); } }
|
|
156
|
-
else if (r.b0 !== undefined) p5(r.b0, c, d);
|
|
157
|
-
if (r.f1 === undefined) { r.f1 = 1; const at =
|
|
158
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m6(d); at.before(r.b1.n); } }
|
|
159
|
-
else if (r.b1 !== undefined) p6(r.b1, c, d);
|
|
160
|
-
if (r.f2 === undefined) { r.f2 = 1; const at =
|
|
161
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m7(d); at.before(r.b2.n); } }
|
|
162
|
-
else if (r.b2 !== undefined) p7(r.b2, c, d);
|
|
155
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a3, r.e0, "description", J, false, undefined, d);
|
|
156
|
+
if (typeof at === "function") r.f0 = at(r, (d, at) => m5(d, undefined, r), p5); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m5(d); at.before(r.b0.n); } }
|
|
157
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p5(r.b0, c, d);
|
|
158
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a4, r.e1, "actions", J, false, undefined, d);
|
|
159
|
+
if (typeof at === "function") r.f1 = at(r, (d, at) => m6(d, undefined, r), p6); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m6(d); at.before(r.b1.n); } }
|
|
160
|
+
else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p6(r.b1, c, d);
|
|
161
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a5, r.e2, "", J, false, undefined, d);
|
|
162
|
+
if (typeof at === "function") r.f2 = at(r, (d, at) => m7(d, undefined, r), p7); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m7(d); at.before(r.b2.n); } }
|
|
163
|
+
else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p7(r.b2, c, d);
|
|
163
164
|
};
|
|
164
165
|
const M = [m0, m4], N = [p0, p4];
|
|
165
166
|
let R;
|
|
@@ -167,7 +168,7 @@ export function createUiSection(options = {}, html) {
|
|
|
167
168
|
if (R === null) return;
|
|
168
169
|
if (R === undefined) { R = M[a](element, d); return; }
|
|
169
170
|
if (c & 4) {
|
|
170
|
-
const t = ((v[2]
|
|
171
|
+
const t = (truthy(equalValue(v[2], "fieldset")) ? 0 : 1);
|
|
171
172
|
if (t !== a) {
|
|
172
173
|
dispose(R);
|
|
173
174
|
for (const key in I.r) delete I.r[key];
|
|
@@ -184,6 +185,8 @@ export function createUiSection(options = {}, html) {
|
|
|
184
185
|
};
|
|
185
186
|
const I = { B };
|
|
186
187
|
const J = project(I, children, slots);
|
|
188
|
+
sharePlainSlots(I, J, ["description","actions",""]);
|
|
189
|
+
I.F = { values: attributes, draw: () => p(-1) };
|
|
187
190
|
attachGeneratedController(element, S, v, p, undefined, undefined, I);
|
|
188
191
|
manageProps(I);
|
|
189
192
|
return element;
|
|
@@ -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 UiSegmentedControlEventMap {
|
|
3
3
|
select: CustomEvent<{ readonly value: string; readonly previousValue: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
change: CustomEvent<{ readonly checked: boolean; readonly value: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
@@ -15,7 +15,7 @@ export interface UiSegmentedControlProps {
|
|
|
15
15
|
disabled?: boolean | null;
|
|
16
16
|
form?: string | null;
|
|
17
17
|
invalid?: boolean | null;
|
|
18
|
-
items: readonly ({ readonly value: string; readonly label: string; readonly disabled?: boolean | null })[];
|
|
18
|
+
items: readonly ({ readonly value: string; readonly label: string; readonly disabled?: boolean | null })[] | null;
|
|
19
19
|
label?: string | null;
|
|
20
20
|
labelVisibility?: "visible" | "sr-only" | null;
|
|
21
21
|
name?: string | null;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, stateInitializers, buildTemplate,
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, checkedReferenceValue, equalValue, stateInitializers, buildTemplate, KeyedList, NONCONFORMING, readMember, readsChanged, rec, toAttribute, toText, trackContainer, truthy, writeAttribute, dispatchDeclared, detailCheck, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, awaitInput, inputRead, READY_INPUT, UNRESOLVED_INPUT, checkBoolean, checkConstrained, checkFormat, checkList, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-radio-group/ui-radio-group.js";
|
|
4
4
|
import "../styles/ui-segmented-control.css";
|
|
5
5
|
|
|
6
6
|
const T0 = ["",[],"\n ",["legend",[],0],"\n ",["div",["class","segments"],"\n ",2,"\n "],"\n "];
|
|
7
7
|
const T1 = ["label",[],"\n ",["input",["type","radio"]],"\n ",["span",["class","choice"],0],"\n "];
|
|
8
|
+
const RC0 = ["s", "string"];
|
|
9
|
+
const RC1 = ["b", "boolean"];
|
|
8
10
|
let P0, P1;
|
|
9
11
|
const emptyDirty = new Map();
|
|
10
12
|
const S = { n: ["internalValue"], t: ["s"], f: import.meta.url, g: "ui-segmented-control", d: { "select": [detailCheck(checkObject([["value", checkString, false], ["previousValue", checkString, false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["keyboard","pointer","programmatic"]}), false]], false)), true, true, false], "change": [detailCheck(checkObject([["checked", checkBoolean, false], ["value", checkString, false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["keyboard","pointer","programmatic"]}), false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs };
|
|
@@ -12,12 +14,9 @@ const D = { g: "ui-segmented-control", props: { "disabled": { "required":false,"
|
|
|
12
14
|
const C = (host) => activateModule(controller, host);
|
|
13
15
|
|
|
14
16
|
export function createUiSegmentedControl(options, html) {
|
|
15
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
17
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
18
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["disabled","form","invalid","items","label","label-visibility","name","required","size","value"].includes(name)));
|
|
16
19
|
const element = document.createElement("fieldset");
|
|
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
20
|
if (!element.hasAttribute("role")) element.setAttribute("role", "radiogroup");
|
|
22
21
|
element.setAttribute("component", "ui-segmented-control");
|
|
23
22
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -26,7 +25,7 @@ export function createUiSegmentedControl(options, html) {
|
|
|
26
25
|
const CS = [];
|
|
27
26
|
const inputStatus = (j) => { if (j === 0) return E.status(j); if (j === 1) return awaitInput(B, "disabled", true); if (j === 2) return awaitInput(B, "form", true); if (j === 3) return awaitInput(B, "invalid", true); if (j === 4) return awaitInput(B, "items", true); if (j === 5) return awaitInput(B, "label", true); if (j === 6) return awaitInput(B, "labelVisibility", true); if (j === 7) return awaitInput(B, "name", true); if (j === 8) return awaitInput(B, "required", true); if (j === 9) return awaitInput(B, "size", true); if (j === 10) return awaitInput(B, "value", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
|
|
28
27
|
const X = { e: 0, g: (j) => v[j], w: new Set(), a: CS, i: inputStatus };
|
|
29
|
-
const E = stateInitializers(S, v, X, { 0: () => inputRead(v[10], inputStatus(10)) });
|
|
28
|
+
const E = stateInitializers(S, v, X, { 0: () => (inputRead(v[10], inputStatus(10))) });
|
|
30
29
|
const m1 = (o, j, l) => {
|
|
31
30
|
const n = (P1 ??= buildTemplate(T1)).cloneNode(true);
|
|
32
31
|
const t0 = n.firstChild.nextSibling;
|
|
@@ -44,9 +43,11 @@ export function createUiSegmentedControl(options, html) {
|
|
|
44
43
|
if (s0 !== r.v0) writeAttribute(r.a0, "name", r.v0 = s0);
|
|
45
44
|
}
|
|
46
45
|
if (c & 1073741824) {
|
|
47
|
-
const x1 = trackContainer(r, readMember(o, "value"));
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
const x1 = trackContainer(r, checkedReferenceValue(S, readMember(o, "value"), RC0, "expression:$item.value:item.value", "item.value"));
|
|
47
|
+
if (x1 !== NONCONFORMING) {
|
|
48
|
+
const s1 = toAttribute(x1, "value");
|
|
49
|
+
if (s1 !== r.v1) writeAttribute(r.a0, "value", r.v1 = s1);
|
|
50
|
+
}
|
|
50
51
|
}
|
|
51
52
|
if (c & 4) {
|
|
52
53
|
const x2 = v[2];
|
|
@@ -54,12 +55,16 @@ export function createUiSegmentedControl(options, html) {
|
|
|
54
55
|
if (s2 !== r.v2) writeAttribute(r.a0, "form", r.v2 = s2);
|
|
55
56
|
}
|
|
56
57
|
if (c & 1073741824) {
|
|
57
|
-
const x3 = (readMember(o, "disabled")
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
const x3 = equalValue(checkedReferenceValue(S, readMember(o, "disabled"), RC1, "expression:$item.disabled = true:item.disabled", "item.disabled"), true);
|
|
59
|
+
if (x3 !== NONCONFORMING) {
|
|
60
|
+
const s3 = toAttribute(x3, "disabled");
|
|
61
|
+
if (s3 !== r.v3) writeAttribute(r.a0, "disabled", r.v3 = s3);
|
|
62
|
+
}
|
|
63
|
+
const x4 = trackContainer(r, checkedReferenceValue(S, readMember(o, "label"), RC0, "expression:$item.label:item.label", "item.label"));
|
|
64
|
+
if (x4 !== NONCONFORMING) {
|
|
65
|
+
const s6 = toText(x4);
|
|
66
|
+
if (s6 !== r.v6) r.a1.data = r.v6 = s6;
|
|
67
|
+
}
|
|
63
68
|
}
|
|
64
69
|
if (c & 256) {
|
|
65
70
|
const x5 = v[8];
|
|
@@ -68,7 +73,7 @@ export function createUiSegmentedControl(options, html) {
|
|
|
68
73
|
}
|
|
69
74
|
if (c & 1073741825) {
|
|
70
75
|
const f0 = [];
|
|
71
|
-
const x6 = (
|
|
76
|
+
const x6 = equalValue(checkedReferenceValue(S, rec(f0, readMember(rec(f0, o), "value")), RC0, "expression:$item.value = $internalValue:item.value", "item.value"), checkedReferenceValue(S, rec(f0, E.read(0)), RC0, "expression:$item.value = $internalValue:internalValue", "internalValue"));
|
|
72
77
|
if (c === -1 || c & 1 || readsChanged(r.v5, f0)) {
|
|
73
78
|
r.v5 = f0;
|
|
74
79
|
if (x6 !== NONCONFORMING) r.a0["checked"] = x6;
|
|
@@ -76,40 +81,39 @@ export function createUiSegmentedControl(options, html) {
|
|
|
76
81
|
}
|
|
77
82
|
};
|
|
78
83
|
const p0 = (r, c, d) => {
|
|
79
|
-
if (c &
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const x1 = v[
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
if (s3 !== r.v3) writeAttribute(r.n, "aria-invalid", r.v3 = s3);
|
|
84
|
+
if (c & 270) {
|
|
85
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
86
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
87
|
+
const x0 = "radiogroup";
|
|
88
|
+
const s1 = toAttribute(x0, "role");
|
|
89
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
90
|
+
const x1 = v[1];
|
|
91
|
+
const s2 = toAttribute(x1, "disabled");
|
|
92
|
+
writeAttribute(r.n, "disabled", r.v2 = s2);
|
|
93
|
+
const x2 = v[2];
|
|
94
|
+
const s3 = toAttribute(x2, "form");
|
|
95
|
+
writeAttribute(r.n, "form", r.v3 = s3);
|
|
96
|
+
const x3 = v[8];
|
|
97
|
+
const s4 = toAttribute(x3, "aria-required");
|
|
98
|
+
writeAttribute(r.n, "aria-required", r.v4 = s4);
|
|
99
|
+
const x4 = v[3];
|
|
100
|
+
const s5 = toAttribute(x4, "aria-invalid");
|
|
101
|
+
writeAttribute(r.n, "aria-invalid", r.v5 = s5);
|
|
98
102
|
}
|
|
99
103
|
if (c & 64) {
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
104
|
+
const x5 = equalValue(v[6], "sr-only");
|
|
105
|
+
const s6 = truthy(x5);
|
|
106
|
+
if (s6 !== r.v6) r.a1.classList.toggle("sr-only", r.v6 = s6);
|
|
103
107
|
}
|
|
104
108
|
if (c & 32) {
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
109
|
+
const x6 = v[5];
|
|
110
|
+
const s7 = toText(x6);
|
|
111
|
+
if (s7 !== r.v7) r.a2.data = r.v7 = s7;
|
|
108
112
|
}
|
|
109
113
|
if (c & 520) {
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
114
|
+
const x7 = hostState(["invalid","size"], [v[3], v[9]]);
|
|
115
|
+
const s8 = x7;
|
|
116
|
+
if (s8 !== r.v8) writeAttribute(r.n, "data-ui-segmented-control-state", (r.v8 = s8) === "" ? null : s8);
|
|
113
117
|
}
|
|
114
118
|
if (c & 1073741840) r.L0.update(v[4], d, c);
|
|
115
119
|
if (c !== -1 && c & 389) r.L0.each(c, d);
|
|
@@ -117,9 +121,10 @@ export function createUiSegmentedControl(options, html) {
|
|
|
117
121
|
const t0 = element.firstChild.nextSibling;
|
|
118
122
|
const t1 = t0.firstChild;
|
|
119
123
|
const t2 = t0.nextSibling.nextSibling.firstChild.nextSibling;
|
|
120
|
-
const R = { n: element, a1: t0, a2: t1, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4:
|
|
124
|
+
const R = { n: element, a1: t0, a2: t1, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, v5: undefined, v6: false, v7: "", v8: undefined, L0: new KeyedList(t2, t2.nextSibling, m1, p1, (o) => readMember(o, "value"), "item") };
|
|
121
125
|
const I = { B, U: E };
|
|
122
126
|
I.R = new Set();
|
|
127
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
123
128
|
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);
|
|
124
129
|
manageProps(I);
|
|
125
130
|
return element;
|
package/vanilla/UiSelect.d.ts
CHANGED
package/vanilla/UiSelect.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, 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, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkFormat, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-select/ui-select.js";
|
|
4
4
|
import "../styles/ui-select.css";
|
|
5
5
|
|
|
@@ -11,12 +11,9 @@ const D = { g: "ui-select", props: { "disabled": { "required":false,"default":fa
|
|
|
11
11
|
const C = (host) => activateModule(controller, host);
|
|
12
12
|
|
|
13
13
|
export function createUiSelect(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]) => !["disabled","invalid","muted","required","size","value"].includes(name)));
|
|
15
16
|
const element = document.createElement("select");
|
|
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
|
element.setAttribute("component", "ui-select");
|
|
21
18
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
22
19
|
const v = [null, null, null, null, null, null];
|
|
@@ -30,34 +27,33 @@ export function createUiSelect(options = {}, html) {
|
|
|
30
27
|
const p1 = (r, c, d) => {
|
|
31
28
|
};
|
|
32
29
|
const p0 = (r, c, d) => {
|
|
33
|
-
if (c &
|
|
30
|
+
if (c & 11) {
|
|
31
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
32
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
34
33
|
const x0 = v[0];
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
if (c & 8) {
|
|
34
|
+
const s1 = toAttribute(x0, "disabled");
|
|
35
|
+
writeAttribute(r.n, "disabled", r.v1 = s1);
|
|
39
36
|
const x1 = v[3];
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
if (c & 2) {
|
|
37
|
+
const s2 = toAttribute(x1, "required");
|
|
38
|
+
writeAttribute(r.n, "required", r.v2 = s2);
|
|
44
39
|
const x2 = v[1];
|
|
45
|
-
const
|
|
46
|
-
|
|
40
|
+
const s3 = toAttribute(x2, "aria-invalid");
|
|
41
|
+
writeAttribute(r.n, "aria-invalid", r.v3 = s3);
|
|
47
42
|
}
|
|
48
43
|
if (c & 20) {
|
|
49
44
|
const x3 = hostState(["muted","size"], [v[2], v[4]]);
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
45
|
+
const s4 = x3;
|
|
46
|
+
if (s4 !== r.v4) writeAttribute(r.n, "data-ui-select-state", (r.v4 = s4) === "" ? null : s4);
|
|
52
47
|
}
|
|
53
48
|
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
54
49
|
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); } }
|
|
55
50
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
56
51
|
};
|
|
57
52
|
const t0 = element.firstChild;
|
|
58
|
-
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
53
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
59
54
|
const I = { B };
|
|
60
55
|
const J = project(I, children, slots);
|
|
56
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
61
57
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
62
58
|
manageProps(I);
|
|
63
59
|
return element;
|
package/vanilla/UiSeparator.d.ts
CHANGED