@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, writeAttribute, dispose, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, 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, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-editor-toolbar/ui-editor-toolbar.js";
|
|
4
4
|
import "../styles/ui-editor-toolbar.css";
|
|
5
5
|
|
|
@@ -11,12 +11,9 @@ const D = { g: "ui-editor-toolbar", props: { "floating": { "required":false,"def
|
|
|
11
11
|
const C = (host) => activateModule(controller, host);
|
|
12
12
|
|
|
13
13
|
export function createUiEditorToolbar(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]) => !["floating"].includes(name)));
|
|
15
16
|
const element = document.createElement("div");
|
|
16
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
17
|
-
if (value === null || value === undefined || value === false) continue;
|
|
18
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
19
|
-
}
|
|
20
17
|
if (!element.hasAttribute("role")) element.setAttribute("role", "toolbar");
|
|
21
18
|
if (!element.hasAttribute("aria-label")) element.setAttribute("aria-label", "Editor toolbar");
|
|
22
19
|
element.setAttribute("component", "ui-editor-toolbar");
|
|
@@ -32,20 +29,31 @@ export function createUiEditorToolbar(options = {}, html) {
|
|
|
32
29
|
const p1 = (r, c, d) => {
|
|
33
30
|
};
|
|
34
31
|
const p0 = (r, c, d) => {
|
|
32
|
+
if (c === -1) {
|
|
33
|
+
resetForwardedAttributes(r.n, attributes, r.v2);
|
|
34
|
+
const x0 = "toolbar";
|
|
35
|
+
const s0 = toAttribute(x0, "role");
|
|
36
|
+
writeAttribute(r.n, "role", r.v0 = s0);
|
|
37
|
+
const x1 = "Editor toolbar";
|
|
38
|
+
const s1 = toAttribute(x1, "aria-label");
|
|
39
|
+
writeAttribute(r.n, "aria-label", r.v1 = s1);
|
|
40
|
+
r.v2 = forwardAttributes(r.n, attributes);
|
|
41
|
+
}
|
|
35
42
|
if (c & 1) {
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
43
|
+
const x2 = hostState(["floating"], [v[0]]);
|
|
44
|
+
const s3 = x2;
|
|
45
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-ui-editor-toolbar-state", (r.v3 = s3) === "" ? null : s3);
|
|
39
46
|
}
|
|
40
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
47
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "", J, false, undefined, d);
|
|
41
48
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
|
|
42
49
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
43
50
|
};
|
|
44
51
|
const t0 = element.firstChild;
|
|
45
52
|
const t1 = t0.firstChild;
|
|
46
|
-
const R = { n: element, v0: undefined,
|
|
53
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, a2: t1, e0: t1.nextSibling, b0: undefined, f0: undefined };
|
|
47
54
|
const I = { B };
|
|
48
55
|
const J = project(I, children, slots);
|
|
56
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
49
57
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
50
58
|
manageProps(I);
|
|
51
59
|
I.r["strip"] = t0;
|
package/vanilla/UiFileInput.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 UiFileInputEventMap {
|
|
3
3
|
change: CustomEvent<{ readonly files: readonly (unknown)[]; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
reject: CustomEvent<{ readonly files: readonly (unknown)[]; readonly message: string }>;
|
package/vanilla/UiFileInput.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController,
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, checkedReferenceValue, equalValue, buildTemplate, formatCall, NONCONFORMING, notValue, readIndex, readMember, textCall, toAttribute, toText, trackContainer, truthy, truthyValue, writeAttribute, dispatchDeclared, detailCheck, dispose, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, RangedKeyedList, checkBoolean, checkConstrained, checkFormat, checkList, checkNumber, checkObject, checkString, checkUnknown, boundFailures, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-file-input/ui-file-input.js";
|
|
4
4
|
import "../styles/ui-file-input.css";
|
|
5
5
|
|
|
@@ -7,6 +7,9 @@ const T0 = ["",[],["ui-text",["weight","semibold"],0],"\n ",["ui-text",["tone
|
|
|
7
7
|
const T1 = ["",[],"Drop files here, or choose files below."];
|
|
8
8
|
const T2 = ["",[],"\n ",["ui-list-item",["wrap","","align","title"],0,["span",["slot","description"],0],["ui-icon-button",["slot","trailing","data-file-remove","","size","sm","variant","ghost","tone","neutral"],["ui-icon",["name","x"]]]],"\n "];
|
|
9
9
|
const T3 = ["",[]];
|
|
10
|
+
const RC0 = [["o"], "object({ id: string, name: string, size: number })"];
|
|
11
|
+
const RC1 = ["s", "string"];
|
|
12
|
+
const RC2 = ["n", "number"];
|
|
10
13
|
let P0, P1, P2, P3;
|
|
11
14
|
const emptyDirty = new Map();
|
|
12
15
|
const S = { n: ["enhanced","dragging","invalidSelection","error","files"], t: ["b","b","b","s",["l",["o",["id","s","name","s","size","n"]]]], f: import.meta.url, g: "ui-file-input", d: { "change": [detailCheck(checkObject([["files", checkList(checkUnknown), false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["keyboard","pointer","programmatic"]}), false]], false)), true, true, false], "reject": [detailCheck(checkObject([["files", checkList(checkUnknown), false], ["message", checkString, false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs, i: [false, false, false, "", []] };
|
|
@@ -14,12 +17,9 @@ const D = { g: "ui-file-input", props: { "accept": { "required":false,"default":
|
|
|
14
17
|
const C = (host) => activateModule(controller, host);
|
|
15
18
|
|
|
16
19
|
export function createUiFileInput(options = {}, html) {
|
|
17
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
20
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
21
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["accept","disabled","form","input-id","invalid","label","locale","max-file-size","multiple","name","remove-label","required"].includes(name)));
|
|
18
22
|
const element = document.createElement("ui-card");
|
|
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
23
|
if (!element.hasAttribute("padding")) element.setAttribute("padding", "sm");
|
|
24
24
|
if (!element.hasAttribute("role")) element.setAttribute("role", "group");
|
|
25
25
|
element.setAttribute("component", "ui-file-input");
|
|
@@ -44,7 +44,7 @@ export function createUiFileInput(options = {}, html) {
|
|
|
44
44
|
const s = document.createComment("html-next:item-start"), t = document.createComment("html-next:item-end");
|
|
45
45
|
n.prepend(s);
|
|
46
46
|
n.append(t);
|
|
47
|
-
const r = { k: undefined, i: o, n: s, t, x: 0, y: 0, a0: t1, a1: t3, a2: t4, w: 0, v0: "", v1: "", v2: null, v3: null, v4: null };
|
|
47
|
+
const r = { k: undefined, i: o, n: s, t, x: 0, y: 0, a0: t1, a1: t3, a2: t4, w: 0, v0: "", m0_1: "", v1: "", v2: null, v3: null, v4: null };
|
|
48
48
|
p2(r, -1, emptyDirty);
|
|
49
49
|
return r;
|
|
50
50
|
};
|
|
@@ -52,22 +52,25 @@ export function createUiFileInput(options = {}, html) {
|
|
|
52
52
|
const o = r.i;
|
|
53
53
|
if (c & 1073741824) {
|
|
54
54
|
r.w = 0;
|
|
55
|
-
const x0 = trackContainer(r, readMember(o, "name"));
|
|
56
|
-
|
|
55
|
+
const x0 = trackContainer(r, checkedReferenceValue(S, readMember(o, "name"), RC1, "expression:$file.name:file.name", "file.name"));
|
|
56
|
+
if (x0 !== NONCONFORMING) r.m0_1 = toText(x0);
|
|
57
|
+
const s0 = "\n " + r.m0_1 + "\n ";
|
|
57
58
|
if (s0 !== r.v0) r.a0.data = r.v0 = s0;
|
|
58
|
-
const x1 = trackContainer(r, readMember(o, "id"));
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const x1 = trackContainer(r, checkedReferenceValue(S, readMember(o, "id"), RC1, "expression:$file.id:file.id", "file.id"));
|
|
60
|
+
if (x1 !== NONCONFORMING) {
|
|
61
|
+
const s2 = toAttribute(x1, "data-file-id");
|
|
62
|
+
if (s2 !== r.v2) writeAttribute(r.a2, "data-file-id", r.v2 = s2);
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
if (c & 1073743872) {
|
|
63
|
-
const x2 = formatCall("format", [trackContainer(r, readMember(o, "size")), "unit", { "unit": "byte", "unitDisplay": "short", "maximumFractionDigits": 0 }, v[11]], "number");
|
|
66
|
+
const x2 = formatCall("format", [trackContainer(r, checkedReferenceValue(S, readMember(o, "size"), RC2, "expression:format($file.size, 'unit', { unit: 'byte', unitDisplay: 'short', maximumFractionDigits: 0 }, $locale):file.size", "file.size")), "unit", { "unit": "byte", "unitDisplay": "short", "maximumFractionDigits": 0 }, v[11]], "number");
|
|
64
67
|
if (x2 !== NONCONFORMING) {
|
|
65
68
|
const s1 = toText(x2);
|
|
66
69
|
if (s1 !== r.v1) r.a1.data = r.v1 = s1;
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
if (c & 1073774592) {
|
|
70
|
-
const x3 = textCall("concat", [v[15], " ", trackContainer(r, readMember(o, "name"))]);
|
|
73
|
+
const x3 = textCall("concat", [v[15], " ", trackContainer(r, checkedReferenceValue(S, readMember(o, "name"), RC1, "expression:concat($removeLabel, ' ', $file.name):file.name", "file.name"))]);
|
|
71
74
|
if (x3 !== NONCONFORMING) {
|
|
72
75
|
const s3 = toAttribute(x3, "label");
|
|
73
76
|
if (s3 !== r.v3) writeAttribute(r.a2, "label", r.v3 = s3);
|
|
@@ -88,102 +91,112 @@ export function createUiFileInput(options = {}, html) {
|
|
|
88
91
|
const p3 = (r, c, d) => {
|
|
89
92
|
};
|
|
90
93
|
const p0 = (r, c, d) => {
|
|
91
|
-
if (c &
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
if (c & 1073742850) {
|
|
95
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
96
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
97
|
+
const x0 = "sm";
|
|
98
|
+
const s1 = toAttribute(x0, "padding");
|
|
99
|
+
writeAttribute(r.n, "padding", r.v1 = s1);
|
|
100
|
+
const x1 = "group";
|
|
101
|
+
const s2 = toAttribute(x1, "role");
|
|
102
|
+
writeAttribute(r.n, "role", r.v2 = s2);
|
|
103
|
+
const x2 = v[10];
|
|
104
|
+
const s3 = toAttribute(x2, "aria-label");
|
|
105
|
+
writeAttribute(r.n, "aria-label", r.v3 = s3);
|
|
106
|
+
const x3 = readIndex({ "true": "accent", "false": "neutral" }, textCall("concat", [v[1]]));
|
|
107
|
+
if (x3 !== NONCONFORMING) r.g4 = x3;
|
|
108
|
+
if (r.g4 !== NONCONFORMING) {
|
|
109
|
+
const s4 = toAttribute(r.g4, "tone");
|
|
110
|
+
writeAttribute(r.n, "tone", r.v4 = s4);
|
|
103
111
|
}
|
|
104
112
|
}
|
|
113
|
+
if (c & 1024) {
|
|
114
|
+
const x4 = v[10];
|
|
115
|
+
const s5 = toText(x4);
|
|
116
|
+
if (s5 !== r.v5) r.a1.data = r.v5 = s5;
|
|
117
|
+
}
|
|
105
118
|
if (c & 1) {
|
|
106
|
-
const
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
119
|
+
const x5 = !v[0];
|
|
120
|
+
const s6 = toAttribute(x5, "hidden");
|
|
121
|
+
if (s6 !== r.v6) writeAttribute(r.a2, "hidden", r.v6 = s6);
|
|
122
|
+
const x6 = hostState(["enhanced"], [v[0]]);
|
|
123
|
+
const s20 = x6;
|
|
124
|
+
if (s20 !== r.v20) writeAttribute(r.n, "data-ui-file-input-state", (r.v20 = s20) === "" ? null : s20);
|
|
112
125
|
}
|
|
113
126
|
if (c & 1073742080) {
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
127
|
+
const x7 = readIndex({ "true": v[8], "false": null }, textCall("concat", [equalValue(v[8], "", true)]));
|
|
128
|
+
if (x7 !== NONCONFORMING) {
|
|
129
|
+
const s7 = toAttribute(x7, "id");
|
|
130
|
+
if (s7 !== r.v7) writeAttribute(r.a4, "id", r.v7 = s7);
|
|
118
131
|
}
|
|
119
132
|
}
|
|
120
133
|
if (c & 16384) {
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
134
|
+
const x8 = v[14];
|
|
135
|
+
const s8 = toAttribute(x8, "name");
|
|
136
|
+
if (s8 !== r.v8) writeAttribute(r.a4, "name", r.v8 = s8);
|
|
124
137
|
}
|
|
125
138
|
if (c & 1073741952) {
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
const
|
|
129
|
-
if (
|
|
139
|
+
const x9 = readIndex({ "true": v[7], "false": null }, textCall("concat", [equalValue(v[7], "", true)]));
|
|
140
|
+
if (x9 !== NONCONFORMING) {
|
|
141
|
+
const s9 = toAttribute(x9, "form");
|
|
142
|
+
if (s9 !== r.v9) writeAttribute(r.a4, "form", r.v9 = s9);
|
|
130
143
|
}
|
|
131
144
|
}
|
|
132
145
|
if (c & 32) {
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
146
|
+
const x10 = v[5];
|
|
147
|
+
const s10 = toAttribute(x10, "accept");
|
|
148
|
+
if (s10 !== r.v10) writeAttribute(r.a4, "accept", r.v10 = s10);
|
|
136
149
|
}
|
|
137
150
|
if (c & 8192) {
|
|
138
|
-
const
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
151
|
+
const x11 = v[13];
|
|
152
|
+
const s11 = toAttribute(x11, "multiple");
|
|
153
|
+
if (s11 !== r.v11) writeAttribute(r.a4, "multiple", r.v11 = s11);
|
|
141
154
|
}
|
|
142
155
|
if (c & 64) {
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
156
|
+
const x12 = v[6];
|
|
157
|
+
const s12 = toAttribute(x12, "disabled");
|
|
158
|
+
if (s12 !== r.v12) writeAttribute(r.a4, "disabled", r.v12 = s12);
|
|
146
159
|
}
|
|
147
160
|
if (c & 65536) {
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
161
|
+
const x13 = v[16];
|
|
162
|
+
const s13 = toAttribute(x13, "required");
|
|
163
|
+
if (s13 !== r.v13) writeAttribute(r.a4, "required", r.v13 = s13);
|
|
151
164
|
}
|
|
152
165
|
if (c & 516) {
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
166
|
+
const x14 = (truthy(v[9]) || v[2]);
|
|
167
|
+
const s14 = toAttribute(x14, "invalid");
|
|
168
|
+
if (s14 !== r.v14) writeAttribute(r.a4, "invalid", r.v14 = s14);
|
|
156
169
|
}
|
|
157
170
|
if (c & 1024) {
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
171
|
+
const x15 = v[10];
|
|
172
|
+
const s15 = toAttribute(x15, "aria-label");
|
|
173
|
+
if (s15 !== r.v15) writeAttribute(r.a4, "aria-label", r.v15 = s15);
|
|
161
174
|
}
|
|
162
175
|
if (c & 1073741840) {
|
|
163
|
-
const
|
|
164
|
-
if (
|
|
165
|
-
const
|
|
166
|
-
if (
|
|
176
|
+
const x16 = notValue(truthyValue(checkedReferenceValue(S, readIndex(v[4], 0), RC0, "expression:not $files.0:files.0", "files.0")));
|
|
177
|
+
if (x16 !== NONCONFORMING) {
|
|
178
|
+
const s16 = toAttribute(x16, "hidden");
|
|
179
|
+
if (s16 !== r.v16) writeAttribute(r.a5, "hidden", r.v16 = s16);
|
|
167
180
|
}
|
|
168
181
|
}
|
|
169
182
|
if (c & 1024) {
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
183
|
+
const x17 = v[10];
|
|
184
|
+
const s17 = toAttribute(x17, "aria-label");
|
|
185
|
+
if (s17 !== r.v17) writeAttribute(r.a5, "aria-label", r.v17 = s17);
|
|
173
186
|
}
|
|
174
187
|
if (c & 8) {
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
178
|
-
const
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
181
|
-
}
|
|
182
|
-
if (
|
|
183
|
-
if (c !== -1 && c & 1073776704) r.L1.each(c, d);
|
|
184
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a3, r.e0, "", J, true, undefined, d);
|
|
188
|
+
const x18 = equalValue(v[3], "");
|
|
189
|
+
const s18 = toAttribute(x18, "hidden");
|
|
190
|
+
if (s18 !== r.v18) writeAttribute(r.a7, "hidden", r.v18 = s18);
|
|
191
|
+
const x19 = v[3];
|
|
192
|
+
const s19 = toText(x19);
|
|
193
|
+
if (s19 !== r.v19) r.a8.data = r.v19 = s19;
|
|
194
|
+
}
|
|
195
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a3, r.e0, "", J, true, undefined, d, r.z ??= []);
|
|
185
196
|
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); } }
|
|
186
197
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
198
|
+
if (c & 1073741840) r.L1.update(v[4], d, c);
|
|
199
|
+
if (c !== -1 && c & 1073776704) r.L1.each(c, d);
|
|
187
200
|
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a9, r.e2, "footer", J, false, undefined, d);
|
|
188
201
|
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); } }
|
|
189
202
|
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
@@ -198,10 +211,11 @@ export function createUiFileInput(options = {}, html) {
|
|
|
198
211
|
const t7 = t5.nextSibling.nextSibling;
|
|
199
212
|
const t8 = t7.firstChild;
|
|
200
213
|
const t9 = t7.nextSibling.nextSibling;
|
|
201
|
-
const R = { n: element, a1: t1, a2: t2, a4: t4, a5: t5, a7: t7, a8: t8, v0: undefined, v1: undefined, v2:
|
|
214
|
+
const R = { n: element, a1: t1, a2: t2, a4: t4, a5: t5, a7: t7, a8: t8, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, g4: NONCONFORMING, v5: "", v6: null, v7: null, v8: null, v9: null, v10: null, v11: null, v12: null, v13: null, v14: null, v15: null, v16: null, v17: null, v18: null, v19: "", v20: undefined, a3: t3, e0: t3.nextSibling, b0: undefined, f0: undefined, L1: new RangedKeyedList(t6, t6.nextSibling, m2, p2, (o) => readMember(o, "id"), "file"), a9: t9, e2: t9.nextSibling, b2: undefined, f2: undefined };
|
|
202
215
|
const I = { B };
|
|
203
216
|
const J = project(I, children, slots);
|
|
204
217
|
I.R = new Set();
|
|
218
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
205
219
|
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);
|
|
206
220
|
manageProps(I);
|
|
207
221
|
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 UiFloatingActionButtonEventMap {
|
|
3
3
|
}
|
|
4
4
|
export interface UiFloatingActionButtonElement extends HTMLButtonElement {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispose, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkString, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispose, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkString, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-floating-action-button.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],4];
|
|
@@ -9,12 +9,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-floating-action-button", b:
|
|
|
9
9
|
const D = { g: "ui-floating-action-button", props: { "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "label": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "mobileOnly": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" } } };
|
|
10
10
|
|
|
11
11
|
export function createUiFloatingActionButton(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]) => !["disabled","label","mobile-only"].includes(name)));
|
|
13
14
|
const element = document.createElement("button");
|
|
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
|
if (!element.hasAttribute("type")) element.setAttribute("type", "button");
|
|
19
16
|
element.setAttribute("component", "ui-floating-action-button");
|
|
20
17
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -29,29 +26,33 @@ export function createUiFloatingActionButton(options = {}, html) {
|
|
|
29
26
|
const p1 = (r, c, d) => {
|
|
30
27
|
};
|
|
31
28
|
const p0 = (r, c, d) => {
|
|
32
|
-
if (c &
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const x1 = v[
|
|
39
|
-
const
|
|
40
|
-
|
|
29
|
+
if (c & 3) {
|
|
30
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
31
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
32
|
+
const x0 = "button";
|
|
33
|
+
const s1 = toAttribute(x0, "type");
|
|
34
|
+
writeAttribute(r.n, "type", r.v1 = s1);
|
|
35
|
+
const x1 = v[1];
|
|
36
|
+
const s2 = toAttribute(x1, "aria-label");
|
|
37
|
+
writeAttribute(r.n, "aria-label", r.v2 = s2);
|
|
38
|
+
const x2 = v[0];
|
|
39
|
+
const s3 = toAttribute(x2, "disabled");
|
|
40
|
+
writeAttribute(r.n, "disabled", r.v3 = s3);
|
|
41
41
|
}
|
|
42
42
|
if (c & 4) {
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
43
|
+
const x3 = hostState(["mobileOnly"], [v[2]]);
|
|
44
|
+
const s4 = x3;
|
|
45
|
+
if (s4 !== r.v4) writeAttribute(r.n, "data-ui-floating-action-button-state", (r.v4 = s4) === "" ? null : s4);
|
|
46
46
|
}
|
|
47
47
|
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
48
48
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
|
|
49
49
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
50
50
|
};
|
|
51
51
|
const t0 = element.firstChild;
|
|
52
|
-
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
52
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
|
|
53
53
|
const I = { B };
|
|
54
54
|
const J = project(I, children, slots);
|
|
55
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
55
56
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
56
57
|
manageProps(I);
|
|
57
58
|
return element;
|
package/vanilla/UiFormField.d.ts
CHANGED
package/vanilla/UiFormField.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, writeAttribute, dispose, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, 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, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-form-field/ui-form-field.js";
|
|
4
4
|
import "../styles/ui-form-field.css";
|
|
5
5
|
|
|
@@ -15,12 +15,9 @@ const D = { g: "ui-form-field", props: { "disabled": { "required":false,"default
|
|
|
15
15
|
const C = (host) => activateModule(controller, host);
|
|
16
16
|
|
|
17
17
|
export function createUiFormField(options = {}, html) {
|
|
18
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
18
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
19
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["disabled","invalid","required"].includes(name)));
|
|
19
20
|
const element = document.createElement("div");
|
|
20
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
21
|
-
if (value === null || value === undefined || value === false) continue;
|
|
22
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
23
|
-
}
|
|
24
21
|
element.setAttribute("component", "ui-form-field");
|
|
25
22
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
26
23
|
const v = [null, null, null];
|
|
@@ -66,26 +63,30 @@ export function createUiFormField(options = {}, html) {
|
|
|
66
63
|
const p5 = (r, c, d) => {
|
|
67
64
|
};
|
|
68
65
|
const p0 = (r, c, d) => {
|
|
66
|
+
if (c === -1) {
|
|
67
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
68
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
69
|
+
}
|
|
69
70
|
if (c & 2) {
|
|
70
71
|
const x0 = hostState(["invalid"], [v[1]]);
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
72
|
+
const s1 = x0;
|
|
73
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-form-field-state", (r.v1 = s1) === "" ? null : s1);
|
|
73
74
|
}
|
|
74
|
-
if (r.
|
|
75
|
-
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); } }
|
|
76
|
-
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
77
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "label", J, false, undefined, d);
|
|
75
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "label", J, false, undefined, d);
|
|
78
76
|
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); } }
|
|
79
77
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
80
|
-
if (r.
|
|
78
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a2, r.e1, "labelAction", J, false, undefined, d);
|
|
79
|
+
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
|
+
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
81
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a3, r.e2, "", J, false, undefined, d);
|
|
82
|
+
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); } }
|
|
83
|
+
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
84
|
+
if (r.f3 === undefined) { r.f3 = 1; const at = fillSlot(r.a4, r.e3, "help", J, false, undefined, d);
|
|
81
85
|
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); } }
|
|
82
86
|
else if (r.b3 !== undefined) p4(r.b3, c, d);
|
|
83
|
-
if (r.f4 === undefined) { r.f4 = 1; const at = fillSlot(r.
|
|
87
|
+
if (r.f4 === undefined) { r.f4 = 1; const at = fillSlot(r.a5, r.e4, "error", J, false, undefined, d);
|
|
84
88
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b4 = m5(d); at.before(r.b4.n); } }
|
|
85
89
|
else if (r.b4 !== undefined) p5(r.b4, c, d);
|
|
86
|
-
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a2, r.e2, "", J, false, undefined, d);
|
|
87
|
-
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); } }
|
|
88
|
-
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
89
90
|
};
|
|
90
91
|
const t0 = element.firstChild.nextSibling;
|
|
91
92
|
const t1 = t0.firstChild.nextSibling;
|
|
@@ -94,9 +95,10 @@ export function createUiFormField(options = {}, html) {
|
|
|
94
95
|
const t4 = t3.nextSibling.nextSibling.nextSibling;
|
|
95
96
|
const t5 = t4.firstChild;
|
|
96
97
|
const t6 = t4.nextSibling.nextSibling.firstChild;
|
|
97
|
-
const R = { n: element, v0: undefined,
|
|
98
|
+
const R = { n: element, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t2, e1: t2.nextSibling, b1: undefined, f1: undefined, a3: t3, e2: t3.nextSibling, b2: undefined, f2: undefined, a4: t5, e3: t5.nextSibling, b3: undefined, f3: undefined, a5: t6, e4: t6.nextSibling, b4: undefined, f4: undefined };
|
|
98
99
|
const I = { B };
|
|
99
100
|
const J = project(I, children, slots);
|
|
101
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
100
102
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
101
103
|
manageProps(I);
|
|
102
104
|
return element;
|
package/vanilla/UiGrid.d.ts
CHANGED
package/vanilla/UiGrid.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, binaryValue, buildTemplate, clearRegion, readMember, toAttribute, toText, trackContainer, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, RangedIndexedList, checkBoolean, checkFormat, checkInteger, checkList, 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, checkedReferenceValue, equalValue, binaryValue, buildTemplate, clearRegion, NONCONFORMING, readMember, toAttribute, toText, trackContainer, truthy, truthyValue, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, RangedIndexedList, checkBoolean, checkFormat, checkInteger, checkList, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-grid.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],2,1,4];
|
|
@@ -7,18 +7,16 @@ const T1 = ["",[],1];
|
|
|
7
7
|
const T2 = ["span",["class","column-shade","aria-hidden","true"]];
|
|
8
8
|
const T3 = ["span",["class","selection-band","aria-hidden","true"]];
|
|
9
9
|
const T4 = ["",[]];
|
|
10
|
+
const RC0 = ["i", "integer"];
|
|
10
11
|
let P0, P1, P2, P3, P4;
|
|
11
12
|
const emptyDirty = new Map();
|
|
12
13
|
const S = { n: [], t: [], f: import.meta.url, g: "ui-grid", b: generatedInputs };
|
|
13
14
|
const D = { g: "ui-grid", props: { "columns": { "required":false, c: checkInteger, t: "integer", j: 0, m: "i" }, "fixed": { "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)] }, "min": { "required":false,"values":["sm","md","lg"], c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "selectionEnd": { "required":false, c: checkInteger, t: "integer", j: 0, m: "i" }, "selectionStart": { "required":false, c: checkInteger, t: "integer", j: 0, m: "i" }, "shadeTone": { "required":false,"values":["neutral","accent"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "shadedColumns": { "required":false,"default":[], c: checkList(checkInteger), j: 1, m: ["l","i"] } } };
|
|
14
15
|
|
|
15
16
|
export function createUiGrid(options = {}, html) {
|
|
16
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
17
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
18
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["columns","fixed","gap","min","selection-end","selection-start","shade-tone","shaded-columns"].includes(name)));
|
|
17
19
|
const element = document.createElement("div");
|
|
18
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
19
|
-
if (value === null || value === undefined || value === false) continue;
|
|
20
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
21
|
-
}
|
|
22
20
|
element.setAttribute("component", "ui-grid");
|
|
23
21
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
24
22
|
const v = [null, null, null, null, null, null, null, null];
|
|
@@ -35,9 +33,11 @@ export function createUiGrid(options = {}, html) {
|
|
|
35
33
|
};
|
|
36
34
|
const p1 = (r, c, d) => {
|
|
37
35
|
const o = r.i;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
let t0;
|
|
37
|
+
if (c & 1073741827 && (t0 = truthyValue(((q) => q === NONCONFORMING ? q : q ? truthyValue(binaryValue("<=", checkedReferenceValue(S, o, RC0, "expression:$fixed and $columns != null and $column > 0 and $column <= $columns:column", "column"), v[0])) : false)(truthyValue(((q) => q === NONCONFORMING ? q : q ? truthyValue(binaryValue(">", checkedReferenceValue(S, o, RC0, "expression:$fixed and $columns != null and $column > 0 and $column <= $columns:column", "column"), 0)) : false)((truthy(v[1]) && truthy(equalValue(v[0], null, true)))))))) !== NONCONFORMING && !t0 !== !r.b0) {
|
|
38
|
+
r.b0 = undefined;
|
|
39
|
+
clearRegion(r.a0, r.e0);
|
|
40
|
+
if (t0) { r.b0 = m2(d, undefined, r); r.e0.before(r.b0.n); }
|
|
41
41
|
} else if (r.b0 !== undefined) p2(r.b0, c, d);
|
|
42
42
|
};
|
|
43
43
|
const m2 = (d, o, u) => {
|
|
@@ -49,9 +49,11 @@ export function createUiGrid(options = {}, html) {
|
|
|
49
49
|
const p2 = (r, c, d) => {
|
|
50
50
|
if (c & 1073741824) {
|
|
51
51
|
r.w = 0;
|
|
52
|
-
const x0 = trackContainer(r, r.u.i);
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
const x0 = trackContainer(r, checkedReferenceValue(S, r.u.i, RC0, "expression:$column:column", "column"));
|
|
53
|
+
if (x0 !== NONCONFORMING) {
|
|
54
|
+
const s0 = toText(x0);
|
|
55
|
+
if (s0 !== r.v0) r.n.style.setProperty("--_grid-shaded-column", r.v0 = s0);
|
|
56
|
+
}
|
|
55
57
|
}
|
|
56
58
|
};
|
|
57
59
|
const m3 = (d) => {
|
|
@@ -81,20 +83,20 @@ export function createUiGrid(options = {}, html) {
|
|
|
81
83
|
const p4 = (r, c, d) => {
|
|
82
84
|
};
|
|
83
85
|
const p0 = (r, c, d) => {
|
|
84
|
-
if (c &
|
|
86
|
+
if (c & 1073741987) {
|
|
87
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
88
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
85
89
|
const x0 = v[0];
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
if (c & 1073741986) {
|
|
90
|
+
const s1 = toText(x0);
|
|
91
|
+
r.n.style.setProperty("--_grid-column-cap", r.v1 = s1);
|
|
90
92
|
const x1 = (truthy(v[1]) && (truthy(binaryValue(">", readMember(v[7], "length"), 0)) || truthy(binaryValue(">", v[5], 0))));
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
+
const s2 = toAttribute(x1, "data-shaded");
|
|
94
|
+
writeAttribute(r.n, "data-shaded", r.v2 = s2);
|
|
93
95
|
}
|
|
94
96
|
if (c & 78) {
|
|
95
97
|
const x2 = hostState(["gap","fixed","shadeTone","min"], [v[2], v[1], v[6], v[3]]);
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
+
const s3 = x2;
|
|
99
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-ui-grid-state", (r.v3 = s3) === "" ? null : s3);
|
|
98
100
|
}
|
|
99
101
|
if (c & 1073741952) r.L0.update(v[7], d, c);
|
|
100
102
|
if (c !== -1 && c & 3) r.L0.each(c, d);
|
|
@@ -109,9 +111,10 @@ export function createUiGrid(options = {}, html) {
|
|
|
109
111
|
const t0 = element.firstChild;
|
|
110
112
|
const t1 = t0.nextSibling.nextSibling;
|
|
111
113
|
const t2 = t1.nextSibling.nextSibling;
|
|
112
|
-
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, L0: new RangedIndexedList(t0, t0.nextSibling, m1, p1, undefined, "column"), a2: t1, e1: t1.nextSibling, b1: undefined, a3: t2, e2: t2.nextSibling, b2: undefined, f2: undefined };
|
|
114
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, v3: undefined, L0: new RangedIndexedList(t0, t0.nextSibling, m1, p1, undefined, "column"), a2: t1, e1: t1.nextSibling, b1: undefined, a3: t2, e2: t2.nextSibling, b2: undefined, f2: undefined };
|
|
113
115
|
const I = { B };
|
|
114
116
|
const J = project(I, children, slots);
|
|
117
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
115
118
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
116
119
|
manageProps(I);
|
|
117
120
|
return element;
|