@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/UiStack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, toText, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkFormat, checkNumber, 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, toText, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkFormat, checkNumber, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-stack.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],4];
|
|
@@ -9,12 +9,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-stack", b: generatedInputs
|
|
|
9
9
|
const D = { g: "ui-stack", props: { "align": { "required":false,"values":["start","center","end","stretch"], c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "fill": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "gap": { "required":false,"values":["none","xs","s","m","l","xl"], c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "height": { "required":false, c: checkNumber, t: "number", j: 0, m: "n" }, "justify": { "required":false,"values":["start","center","end","between"], c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
10
10
|
|
|
11
11
|
export function createUiStack(options = {}, html) {
|
|
12
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
12
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
13
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["align","fill","gap","height","justify"].includes(name)));
|
|
13
14
|
const element = document.createElement("div");
|
|
14
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
15
|
-
if (value === null || value === undefined || value === false) continue;
|
|
16
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
17
|
-
}
|
|
18
15
|
element.setAttribute("component", "ui-stack");
|
|
19
16
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
20
17
|
const v = [null, null, null, null, null];
|
|
@@ -29,23 +26,26 @@ export function createUiStack(options = {}, html) {
|
|
|
29
26
|
};
|
|
30
27
|
const p0 = (r, c, d) => {
|
|
31
28
|
if (c & 8) {
|
|
29
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
30
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
32
31
|
const x0 = v[3];
|
|
33
|
-
const
|
|
34
|
-
|
|
32
|
+
const s1 = toText(x0);
|
|
33
|
+
r.n.style.setProperty("--_ui-stack-height", r.v1 = s1);
|
|
35
34
|
}
|
|
36
35
|
if (c & 31) {
|
|
37
36
|
const x1 = hostState(["fill","height","gap","align","justify"], [v[1], v[3], v[2], v[0], v[4]]);
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
37
|
+
const s2 = x1;
|
|
38
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-ui-stack-state", (r.v2 = s2) === "" ? null : s2);
|
|
40
39
|
}
|
|
41
40
|
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
42
41
|
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); } }
|
|
43
42
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
44
43
|
};
|
|
45
44
|
const t0 = element.firstChild;
|
|
46
|
-
const R = { n: element, v0: undefined, v1: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
45
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
47
46
|
const I = { B };
|
|
48
47
|
const J = project(I, children, slots);
|
|
48
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
49
49
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
50
50
|
manageProps(I);
|
|
51
51
|
return element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, NONCONFORMING, readIndex, textCall, toAttribute, toText, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkString, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, equalValue, buildTemplate, NONCONFORMING, readIndex, textCall, toAttribute, toText, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkString, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-status-message.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",["ui-spinner",["size","sm"]],"\n ",["span",["class","copy"],"\n ",["strong",["class","heading"],0],"\n ",["span",["class","message"],4],"\n "],"\n ",["span",["class","action"],4],"\n "];
|
|
@@ -10,12 +10,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-status-message", b: generat
|
|
|
10
10
|
const D = { g: "ui-status-message", props: { "heading": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "kind": { "required":false,"values":["empty","loading","error"],"default":"empty", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "layout": { "required":false,"values":["inline","panel","fill"],"default":"inline", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
11
11
|
|
|
12
12
|
export function createUiStatusMessage(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]) => !["heading","kind","layout"].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
|
element.setAttribute("component", "ui-status-message");
|
|
20
17
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
21
18
|
const v = [null, null, null];
|
|
@@ -38,29 +35,32 @@ export function createUiStatusMessage(options = {}, html) {
|
|
|
38
35
|
};
|
|
39
36
|
const p0 = (r, c, d) => {
|
|
40
37
|
if (c & 1073741826) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
39
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
40
|
+
const x0 = readIndex({ "true": "alert", "false": "status" }, textCall("concat", [equalValue(v[1], "error")]));
|
|
41
|
+
if (x0 !== NONCONFORMING) r.g1 = x0;
|
|
42
|
+
if (r.g1 !== NONCONFORMING) {
|
|
43
|
+
const s1 = toAttribute(r.g1, "role");
|
|
44
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
if (c & 2) {
|
|
48
|
-
const x1 = (v[1]
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
48
|
+
const x1 = equalValue(v[1], "loading", true);
|
|
49
|
+
const s2 = toAttribute(x1, "hidden");
|
|
50
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "hidden", r.v2 = s2);
|
|
51
51
|
}
|
|
52
52
|
if (c & 1) {
|
|
53
53
|
const x2 = !truthy(v[0]);
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
54
|
+
const s3 = toAttribute(x2, "hidden");
|
|
55
|
+
if (s3 !== r.v3) writeAttribute(r.a2, "hidden", r.v3 = s3);
|
|
56
56
|
const x3 = v[0];
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
57
|
+
const s4 = toText(x3);
|
|
58
|
+
if (s4 !== r.v4) r.a3.data = r.v4 = s4;
|
|
59
59
|
}
|
|
60
60
|
if (c & 6) {
|
|
61
61
|
const x4 = hostState(["kind","layout"], [v[1], v[2]]);
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
62
|
+
const s5 = x4;
|
|
63
|
+
if (s5 !== r.v5) writeAttribute(r.n, "data-ui-status-message-state", (r.v5 = s5) === "" ? null : s5);
|
|
64
64
|
}
|
|
65
65
|
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a4, r.e0, "", J, false, undefined, d);
|
|
66
66
|
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); } }
|
|
@@ -75,9 +75,10 @@ export function createUiStatusMessage(options = {}, html) {
|
|
|
75
75
|
const t3 = t2.firstChild;
|
|
76
76
|
const t4 = t2.nextSibling.nextSibling.firstChild;
|
|
77
77
|
const t5 = t1.nextSibling.nextSibling.firstChild;
|
|
78
|
-
const R = { n: element, a1: t0, a2: t2, a3: t3, v0: undefined, v1:
|
|
78
|
+
const R = { n: element, a1: t0, a2: t2, a3: t3, v0: undefined, v1: undefined, g1: NONCONFORMING, v2: null, v3: null, v4: "", v5: undefined, a4: t4, e0: t4.nextSibling, b0: undefined, f0: undefined, a5: t5, e1: t5.nextSibling, b1: undefined, f1: undefined };
|
|
79
79
|
const I = { B };
|
|
80
80
|
const J = project(I, children, slots);
|
|
81
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
81
82
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
82
83
|
manageProps(I);
|
|
83
84
|
return element;
|
package/vanilla/UiSwatch.d.ts
CHANGED
package/vanilla/UiSwatch.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, NONCONFORMING, readIndex, toAttribute, writeAttribute, computedCycle, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, awaitInput, evaluateInput, inputRead, READY_INPUT, UNRESOLVED_INPUT, notifyPropertySet, readonlyView, 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, NONCONFORMING, readIndex, toAttribute, writeAttribute, computedCycle, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, awaitInput, evaluateInput, inputRead, READY_INPUT, UNRESOLVED_INPUT, notifyPropertySet, readonlyView, checkFormat, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-swatch.css";
|
|
4
4
|
|
|
5
5
|
const S = { n: ["toneName"], t: ["?"], f: import.meta.url, g: "ui-swatch", k: 0, r: readonlyView, b: generatedInputs };
|
|
6
6
|
const D = { g: "ui-swatch", props: { "tone": { "required":false,"values":["neutral","blue","green","yellow","red","purple"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
7
7
|
|
|
8
8
|
export function createUiSwatch(options = {}, html) {
|
|
9
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
9
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
10
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["tone"].includes(name)));
|
|
10
11
|
const element = document.createElement("input");
|
|
11
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
12
|
-
if (value === null || value === undefined || value === false) continue;
|
|
13
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
14
|
-
}
|
|
15
12
|
if (!element.hasAttribute("type")) element.setAttribute("type", "radio");
|
|
16
13
|
element.setAttribute("component", "ui-swatch");
|
|
17
14
|
const v = [undefined, null];
|
|
@@ -35,21 +32,27 @@ export function createUiSwatch(options = {}, html) {
|
|
|
35
32
|
};
|
|
36
33
|
const p0 = (r, c, d) => {
|
|
37
34
|
if (c & 1073741826) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
36
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
37
|
+
const x0 = "radio";
|
|
38
|
+
const s1 = toAttribute(x0, "type");
|
|
39
|
+
writeAttribute(r.n, "type", r.v1 = s1);
|
|
40
|
+
const x1 = v[1];
|
|
41
|
+
const s2 = toAttribute(x1, "value");
|
|
42
|
+
writeAttribute(r.n, "value", r.v2 = s2);
|
|
43
|
+
const x2 = g(0);
|
|
44
|
+
const s3 = toAttribute(x2, "aria-label");
|
|
45
|
+
writeAttribute(r.n, "aria-label", r.v3 = s3);
|
|
44
46
|
}
|
|
45
47
|
if (c & 2) {
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
48
|
+
const x3 = hostState(["tone"], [v[1]]);
|
|
49
|
+
const s4 = x3;
|
|
50
|
+
if (s4 !== r.v4) writeAttribute(r.n, "data-ui-swatch-state", (r.v4 = s4) === "" ? null : s4);
|
|
49
51
|
}
|
|
50
52
|
};
|
|
51
|
-
const R = { n: element, v0: undefined, v1: undefined, v2: undefined };
|
|
53
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined };
|
|
52
54
|
const I = { B };
|
|
55
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
53
56
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, X, I);
|
|
54
57
|
manageProps(I);
|
|
55
58
|
return element;
|
package/vanilla/UiSwitch.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 UiSwitchEventMap {
|
|
3
3
|
change: CustomEvent<{ readonly checked: boolean; readonly value: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
}
|
package/vanilla/UiSwitch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, readsChanged, rec, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, buildTemplate, readsChanged, rec, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-switch/ui-switch.js";
|
|
4
4
|
import "../styles/ui-switch.css";
|
|
5
5
|
|
|
@@ -12,12 +12,9 @@ const D = { g: "ui-switch", props: { "checked": { "required":false,"default":fal
|
|
|
12
12
|
const C = (host) => activateModule(controller, host);
|
|
13
13
|
|
|
14
14
|
export function createUiSwitch(options = {}, html) {
|
|
15
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
15
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
16
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["checked","disabled","name","required","size","value"].includes(name)));
|
|
16
17
|
const element = document.createElement("label");
|
|
17
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
18
|
-
if (value === null || value === undefined || value === false) continue;
|
|
19
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
20
|
-
}
|
|
21
18
|
element.setAttribute("component", "ui-switch");
|
|
22
19
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
23
20
|
const v = [false, null, null, null, null, null, null];
|
|
@@ -39,43 +36,47 @@ export function createUiSwitch(options = {}, html) {
|
|
|
39
36
|
const p2 = (r, c, d) => {
|
|
40
37
|
};
|
|
41
38
|
const p0 = (r, c, d) => {
|
|
39
|
+
if (c === -1) {
|
|
40
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
41
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
42
|
+
}
|
|
42
43
|
if (c & 1) {
|
|
43
44
|
const f0 = [];
|
|
44
45
|
const x0 = rec(f0, v[0]);
|
|
45
|
-
if (c === -1 || c & 1 || readsChanged(r.
|
|
46
|
-
r.
|
|
47
|
-
r.
|
|
46
|
+
if (c === -1 || c & 1 || readsChanged(r.v1, f0)) {
|
|
47
|
+
r.v1 = f0;
|
|
48
|
+
r.a1["checked"] = x0;
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
if (c & 4) {
|
|
51
52
|
const x1 = v[2];
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
53
|
+
const s2 = toAttribute(x1, "disabled");
|
|
54
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "disabled", r.v2 = s2);
|
|
54
55
|
}
|
|
55
56
|
if (c & 16) {
|
|
56
57
|
const x2 = v[4];
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
58
|
+
const s3 = toAttribute(x2, "required");
|
|
59
|
+
if (s3 !== r.v3) writeAttribute(r.a1, "required", r.v3 = s3);
|
|
59
60
|
}
|
|
60
61
|
if (c & 8) {
|
|
61
62
|
const x3 = v[3];
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
63
|
+
const s4 = toAttribute(x3, "name");
|
|
64
|
+
if (s4 !== r.v4) writeAttribute(r.a1, "name", r.v4 = s4);
|
|
64
65
|
}
|
|
65
66
|
if (c & 64) {
|
|
66
67
|
const x4 = v[6];
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
68
|
+
const s5 = toAttribute(x4, "value");
|
|
69
|
+
if (s5 !== r.v5) writeAttribute(r.a1, "value", r.v5 = s5);
|
|
69
70
|
}
|
|
70
71
|
if (c & 36) {
|
|
71
72
|
const x5 = hostState(["disabled","size"], [v[2], v[5]]);
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
73
|
+
const s6 = x5;
|
|
74
|
+
if (s6 !== r.v6) writeAttribute(r.n, "data-ui-switch-state", (r.v6 = s6) === "" ? null : s6);
|
|
74
75
|
}
|
|
75
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
76
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "", J, false, undefined, d);
|
|
76
77
|
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); } }
|
|
77
78
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
78
|
-
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.
|
|
79
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a4, r.e1, "description", J, false, undefined, d);
|
|
79
80
|
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); } }
|
|
80
81
|
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
81
82
|
};
|
|
@@ -85,10 +86,11 @@ export function createUiSwitch(options = {}, html) {
|
|
|
85
86
|
const t3 = t2.firstChild;
|
|
86
87
|
const t4 = t2.nextSibling.nextSibling;
|
|
87
88
|
const t5 = t4.firstChild;
|
|
88
|
-
const R = { n: element,
|
|
89
|
+
const R = { n: element, a1: t0, v0: undefined, v1: undefined, v2: null, v3: null, v4: null, v5: null, v6: undefined, a2: t3, e0: t3.nextSibling, b0: undefined, f0: undefined, a4: t5, e1: t5.nextSibling, b1: undefined, f1: undefined };
|
|
89
90
|
const I = { B };
|
|
90
91
|
const J = project(I, children, slots);
|
|
91
92
|
I.R = new Set();
|
|
93
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
92
94
|
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);
|
|
93
95
|
manageProps(I);
|
|
94
96
|
I.r["input"] = t0;
|
package/vanilla/UiSwitcher.d.ts
CHANGED
package/vanilla/UiSwitcher.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, fillSlot, checkFormat, checkInteger, 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, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkInteger, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-switcher/ui-switcher.js";
|
|
4
4
|
import "../styles/ui-switcher.css";
|
|
5
5
|
|
|
@@ -11,12 +11,9 @@ const D = { g: "ui-switcher", props: { "align": { "required":false,"values":["st
|
|
|
11
11
|
const C = (host) => activateModule(controller, host);
|
|
12
12
|
|
|
13
13
|
export function createUiSwitcher(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]) => !["align","gap","limit","threshold"].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
|
element.setAttribute("component", "ui-switcher");
|
|
21
18
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
22
19
|
const v = [false, null, null, null, null];
|
|
@@ -30,20 +27,25 @@ export function createUiSwitcher(options = {}, html) {
|
|
|
30
27
|
const p1 = (r, c, d) => {
|
|
31
28
|
};
|
|
32
29
|
const p0 = (r, c, d) => {
|
|
30
|
+
if (c === -1) {
|
|
31
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
32
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
33
|
+
}
|
|
33
34
|
if (c & 23) {
|
|
34
35
|
const x0 = hostState(["overLimit","gap","threshold","align"], [v[0], v[2], v[4], v[1]]);
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
36
|
+
const s1 = x0;
|
|
37
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-switcher-state", (r.v1 = s1) === "" ? null : s1);
|
|
37
38
|
}
|
|
38
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
39
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
39
40
|
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); } }
|
|
40
41
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
41
42
|
};
|
|
42
43
|
const t0 = element.firstChild;
|
|
43
|
-
const R = { n: element, v0: undefined,
|
|
44
|
+
const R = { n: element, v0: undefined, v1: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
44
45
|
const I = { B };
|
|
45
46
|
const J = project(I, children, slots);
|
|
46
47
|
I.R = new Set();
|
|
48
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
47
49
|
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);
|
|
48
50
|
manageProps(I);
|
|
49
51
|
return element;
|
package/vanilla/UiTable.d.ts
CHANGED
package/vanilla/UiTable.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, fillSlot, checkBoolean, checkFormat, 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, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkFormat, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-table/ui-table.js";
|
|
4
4
|
import "../styles/ui-table.css";
|
|
5
5
|
|
|
@@ -11,12 +11,9 @@ const D = { g: "ui-table", props: { "density": { "required":false,"values":["com
|
|
|
11
11
|
const C = (host) => activateModule(controller, host);
|
|
12
12
|
|
|
13
13
|
export function createUiTable(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","sticky-header"].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
|
element.setAttribute("component", "ui-table");
|
|
21
18
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
22
19
|
const v = [null, null];
|
|
@@ -30,19 +27,24 @@ export function createUiTable(options = {}, html) {
|
|
|
30
27
|
const p1 = (r, c, d) => {
|
|
31
28
|
};
|
|
32
29
|
const p0 = (r, c, d) => {
|
|
30
|
+
if (c === -1) {
|
|
31
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
32
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
33
|
+
}
|
|
33
34
|
if (c & 3) {
|
|
34
35
|
const x0 = hostState(["density","stickyHeader"], [v[0], v[1]]);
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
36
|
+
const s1 = x0;
|
|
37
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-table-state", (r.v1 = s1) === "" ? null : s1);
|
|
37
38
|
}
|
|
38
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
39
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
39
40
|
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); } }
|
|
40
41
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
41
42
|
};
|
|
42
43
|
const t0 = element.firstChild;
|
|
43
|
-
const R = { n: element, v0: undefined,
|
|
44
|
+
const R = { n: element, v0: undefined, v1: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
44
45
|
const I = { B };
|
|
45
46
|
const J = project(I, children, slots);
|
|
47
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
46
48
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
47
49
|
manageProps(I);
|
|
48
50
|
return element;
|
package/vanilla/UiTabs.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 UiTabsEventMap {
|
|
3
3
|
select: CustomEvent<{ readonly value: string; readonly previousValue: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
}
|
package/vanilla/UiTabs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, KeyedList, NONCONFORMING, readMember, textCall, toAttribute, toText, trackContainer, writeAttribute, writeText, 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, checkedReferenceValue, equalValue, buildTemplate, KeyedList, NONCONFORMING, readMember, textCall, toAttribute, toText, trackContainer, writeAttribute, writeText, 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-tabs/ui-tabs.js";
|
|
4
4
|
import "../styles/ui-tabs.css";
|
|
5
5
|
|
|
@@ -7,6 +7,7 @@ const T0 = ["",[],"\n ",["div",["class","list","role","tablist"],"\n ",4
|
|
|
7
7
|
const T1 = ["",[],"\n ",2,"\n "];
|
|
8
8
|
const T2 = ["button",["type","button","role","tab"],0];
|
|
9
9
|
const T3 = ["",[]];
|
|
10
|
+
const RC0 = ["s", "string"];
|
|
10
11
|
let P0, P1, P2, P3;
|
|
11
12
|
const emptyDirty = new Map();
|
|
12
13
|
const S = { n: ["internalValue","tabs"], t: ["s",["l",["o",["id","s","label","s"]]]], f: import.meta.url, g: "ui-tabs", 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] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs, i: ["", []] };
|
|
@@ -14,12 +15,9 @@ const D = { g: "ui-tabs", props: { "activation": { "required":false,"values":["a
|
|
|
14
15
|
const C = (host) => activateModule(controller, host);
|
|
15
16
|
|
|
16
17
|
export function createUiTabs(options = {}, html) {
|
|
17
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
18
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
19
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["activation","density","group","label","orientation","stretch","value"].includes(name)));
|
|
18
20
|
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
21
|
element.setAttribute("component", "ui-tabs");
|
|
24
22
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
25
23
|
const v = ["", [], null, null, null, null, null, null, null];
|
|
@@ -45,24 +43,32 @@ export function createUiTabs(options = {}, html) {
|
|
|
45
43
|
const o = r.i;
|
|
46
44
|
if (c & 1073741824) {
|
|
47
45
|
r.w = 0;
|
|
48
|
-
const x0 = textCall("concat", [trackContainer(r, readMember(o, "id")), "-tab"]);
|
|
46
|
+
const x0 = textCall("concat", [trackContainer(r, checkedReferenceValue(S, readMember(o, "id"), RC0, "expression:concat($tab.id, '-tab'):tab.id", "tab.id")), "-tab"]);
|
|
49
47
|
if (x0 !== NONCONFORMING) {
|
|
50
48
|
const s0 = toAttribute(x0, "id");
|
|
51
49
|
if (s0 !== r.v0) writeAttribute(r.n, "id", r.v0 = s0);
|
|
52
50
|
}
|
|
53
|
-
const x1 = trackContainer(r, readMember(o, "id"));
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
const x1 = trackContainer(r, checkedReferenceValue(S, readMember(o, "id"), RC0, "expression:$tab.id:tab.id", "tab.id"));
|
|
52
|
+
if (x1 !== NONCONFORMING) {
|
|
53
|
+
const s1 = toAttribute(x1, "value");
|
|
54
|
+
if (s1 !== r.v1) writeAttribute(r.n, "value", r.v1 = s1);
|
|
55
|
+
}
|
|
56
|
+
if (x1 !== NONCONFORMING) {
|
|
57
|
+
const s2 = toAttribute(x1, "aria-controls");
|
|
58
|
+
if (s2 !== r.v2) writeAttribute(r.n, "aria-controls", r.v2 = s2);
|
|
59
|
+
}
|
|
60
|
+
const x2 = trackContainer(r, checkedReferenceValue(S, readMember(o, "label"), RC0, "expression:$tab.label:tab.label", "tab.label"));
|
|
61
|
+
if (x2 !== NONCONFORMING) {
|
|
62
|
+
const s4 = toText(x2);
|
|
63
|
+
if (s4 !== r.v4) writeText(r.n, r.v4 = s4);
|
|
64
|
+
}
|
|
61
65
|
}
|
|
62
66
|
if (c & 1073741825) {
|
|
63
|
-
const x3 = (readMember(o, "id")
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
const x3 = equalValue(checkedReferenceValue(S, readMember(o, "id"), RC0, "expression:$tab.id = $internalValue:tab.id", "tab.id"), v[0]);
|
|
68
|
+
if (x3 !== NONCONFORMING) {
|
|
69
|
+
const s3 = toAttribute(x3, "aria-selected");
|
|
70
|
+
if (s3 !== r.v3) writeAttribute(r.n, "aria-selected", r.v3 = s3);
|
|
71
|
+
}
|
|
66
72
|
}
|
|
67
73
|
};
|
|
68
74
|
const m3 = (d) => {
|
|
@@ -74,25 +80,29 @@ export function createUiTabs(options = {}, html) {
|
|
|
74
80
|
const p3 = (r, c, d) => {
|
|
75
81
|
};
|
|
76
82
|
const p0 = (r, c, d) => {
|
|
83
|
+
if (c === -1) {
|
|
84
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
85
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
86
|
+
}
|
|
77
87
|
if (c & 32) {
|
|
78
88
|
const x0 = v[5];
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
89
|
+
const s1 = toAttribute(x0, "aria-label");
|
|
90
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "aria-label", r.v1 = s1);
|
|
81
91
|
}
|
|
82
92
|
if (c & 1073741888) {
|
|
83
93
|
const x1 = v[6];
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
94
|
+
const s2 = toAttribute(x1, "aria-orientation");
|
|
95
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "aria-orientation", r.v2 = s2);
|
|
86
96
|
}
|
|
87
97
|
if (c & 200) {
|
|
88
98
|
const x2 = hostState(["density","stretch","orientation"], [v[3], v[7], v[6]]);
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
99
|
+
const s3 = x2;
|
|
100
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-ui-tabs-state", (r.v3 = s3) === "" ? null : s3);
|
|
91
101
|
}
|
|
92
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
102
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "tab", J, true, undefined, d, r.z ??= []);
|
|
93
103
|
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); } }
|
|
94
104
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
95
|
-
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.
|
|
105
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a4, r.e1, "", J, false, undefined, d);
|
|
96
106
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m3(d); at.before(r.b1.n); } }
|
|
97
107
|
else if (r.b1 !== undefined) p3(r.b1, c, d);
|
|
98
108
|
};
|
|
@@ -100,10 +110,11 @@ export function createUiTabs(options = {}, html) {
|
|
|
100
110
|
const t1 = t0.firstChild.nextSibling;
|
|
101
111
|
const t2 = t0.nextSibling.nextSibling;
|
|
102
112
|
const t3 = t2.firstChild;
|
|
103
|
-
const R = { n: element,
|
|
113
|
+
const R = { n: element, a1: t0, v0: undefined, v1: null, v2: null, v3: undefined, a2: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a4: t3, e1: t3.nextSibling, b1: undefined, f1: undefined };
|
|
104
114
|
const I = { B };
|
|
105
115
|
const J = project(I, children, slots);
|
|
106
116
|
I.R = new Set();
|
|
117
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
107
118
|
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);
|
|
108
119
|
manageProps(I);
|
|
109
120
|
I.r["list"] = t0;
|
package/vanilla/UiText.d.ts
CHANGED