@threadlabs/looma 0.52.12 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/shared/overlay.js +7 -0
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +2 -2
- package/components/ui-meter/ui-meter.html +1 -1
- package/dist/index.js +1 -1
- package/docs/catalog.json +1 -1
- package/editor/components.css +19 -19
- package/editor/index.js +1125 -853
- package/package.json +3 -3
- package/styles/ui-action-bar.css +1 -1
- package/styles/ui-affordance-scope.css +1 -1
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +1 -1
- package/styles/ui-badge.css +1 -1
- package/styles/ui-breadcrumb-item.css +1 -1
- package/styles/ui-breadcrumbs.css +1 -1
- package/styles/ui-button.css +1 -1
- package/styles/ui-calendar.css +1 -1
- package/styles/ui-callout.css +1 -1
- package/styles/ui-card-group.css +1 -1
- package/styles/ui-card.css +1 -1
- package/styles/ui-checkbox.css +1 -1
- package/styles/ui-cluster.css +1 -1
- package/styles/ui-color-picker.css +1 -1
- package/styles/ui-column.css +1 -1
- package/styles/ui-combobox.css +1 -1
- package/styles/ui-compact-content.css +1 -1
- package/styles/ui-compact-editor.css +1 -1
- package/styles/ui-compact-mark.css +1 -1
- package/styles/ui-compact-node.css +1 -1
- package/styles/ui-container.css +1 -1
- package/styles/ui-context-menu.css +1 -1
- package/styles/ui-cover.css +1 -1
- package/styles/ui-curve-editor.css +1 -1
- package/styles/ui-cycle-button.css +1 -1
- package/styles/ui-data-table.css +1 -1
- package/styles/ui-date-field.css +1 -1
- package/styles/ui-date-picker.css +1 -1
- package/styles/ui-date-range-picker.css +1 -1
- package/styles/ui-description-item.css +1 -1
- package/styles/ui-description-list.css +1 -1
- package/styles/ui-dialog.css +1 -1
- package/styles/ui-disclosure.css +1 -1
- package/styles/ui-editable.css +1 -1
- package/styles/ui-editor-block-actions.css +1 -1
- package/styles/ui-editor-chip-editor.css +1 -1
- package/styles/ui-editor-code-language.css +1 -1
- package/styles/ui-editor-footnote-editor.css +1 -1
- package/styles/ui-editor-formatting-tools.css +1 -1
- package/styles/ui-editor-image-toolbar.css +1 -1
- package/styles/ui-editor-insert-table-grid.css +1 -1
- package/styles/ui-editor-link-card.css +1 -1
- package/styles/ui-editor-link-form.css +1 -1
- package/styles/ui-editor-mention-menu-item.css +1 -1
- package/styles/ui-editor-mention-menu.css +1 -1
- package/styles/ui-editor-slash-menu-group.css +1 -1
- package/styles/ui-editor-slash-menu-item.css +1 -1
- package/styles/ui-editor-slash-menu.css +1 -1
- package/styles/ui-editor-surface.css +1 -1
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-editor-table-overlay.css +1 -1
- package/styles/ui-editor-table-toolbar.css +1 -1
- package/styles/ui-editor-toolbar.css +1 -1
- package/styles/ui-editor.css +1 -1
- package/styles/ui-file-input.css +1 -1
- package/styles/ui-floating-action-button.css +1 -1
- package/styles/ui-form-field.css +1 -1
- package/styles/ui-grid.css +1 -1
- package/styles/ui-icon-button.css +1 -1
- package/styles/ui-icon.css +1 -1
- package/styles/ui-image.css +1 -1
- package/styles/ui-input-group.css +1 -1
- package/styles/ui-input.css +1 -1
- package/styles/ui-light-editor.css +1 -1
- package/styles/ui-list-item.css +1 -1
- package/styles/ui-list.css +1 -1
- package/styles/ui-listbox.css +1 -1
- package/styles/ui-menu-group.css +1 -1
- package/styles/ui-menu-item.css +1 -1
- package/styles/ui-menu.css +1 -1
- package/styles/ui-meter.css +1 -1
- package/styles/ui-nav-item.css +1 -1
- package/styles/ui-notice-stripe.css +1 -1
- package/styles/ui-number-input.css +1 -1
- package/styles/ui-page-header.css +1 -1
- package/styles/ui-pagination.css +1 -1
- package/styles/ui-popover.css +1 -1
- package/styles/ui-radio-group.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-reel.css +1 -1
- package/styles/ui-scroll-area.css +1 -1
- package/styles/ui-search-result-row.css +1 -1
- package/styles/ui-search-shell.css +1 -1
- package/styles/ui-section.css +1 -1
- package/styles/ui-segmented-control.css +1 -1
- package/styles/ui-select.css +1 -1
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +1 -1
- package/styles/ui-site-header.css +1 -1
- package/styles/ui-skeleton.css +1 -1
- package/styles/ui-slider.css +1 -1
- package/styles/ui-spinner.css +1 -1
- package/styles/ui-stack.css +1 -1
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-swatch.css +1 -1
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +1 -1
- package/styles/ui-table.css +1 -1
- package/styles/ui-tabs.css +1 -1
- package/styles/ui-text.css +1 -1
- package/styles/ui-textarea.css +1 -1
- package/styles/ui-time-field.css +1 -1
- package/styles/ui-time-picker.css +1 -1
- package/styles/ui-toast-region.css +1 -1
- package/styles/ui-toast.css +1 -1
- package/styles/ui-tooltip.css +1 -1
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +1 -1
- package/styles/ui-tree.css +1 -1
- package/styles/ui-wizard.css +1 -1
- package/vanilla/UiActionBar.d.ts +1 -1
- package/vanilla/UiActionBar.js +14 -12
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +13 -11
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +27 -25
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +26 -23
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +14 -12
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +14 -13
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +10 -10
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +187 -244
- package/vanilla/UiCalendar.d.ts +1 -1
- package/vanilla/UiCalendar.js +272 -193
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +32 -27
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +72 -69
- package/vanilla/UiCardGroup.d.ts +1 -1
- package/vanilla/UiCardGroup.js +17 -15
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +32 -30
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +20 -18
- package/vanilla/UiColorPicker.d.ts +1 -1
- package/vanilla/UiColorPicker.js +22 -20
- package/vanilla/UiColumn.d.ts +2 -2
- package/vanilla/UiColumn.js +18 -15
- package/vanilla/UiCombobox.d.ts +3 -3
- package/vanilla/UiCombobox.js +237 -174
- package/vanilla/UiCompactContent.d.ts +1 -1
- package/vanilla/UiCompactContent.js +13 -8
- package/vanilla/UiCompactEditor.d.ts +1 -1
- package/vanilla/UiCompactEditor.js +17 -12
- package/vanilla/UiCompactMark.d.ts +1 -1
- package/vanilla/UiCompactMark.js +47 -45
- package/vanilla/UiCompactNode.d.ts +2 -2
- package/vanilla/UiCompactNode.js +37 -33
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +13 -11
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +11 -9
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +13 -11
- package/vanilla/UiCurveEditor.d.ts +1 -1
- package/vanilla/UiCurveEditor.js +40 -38
- package/vanilla/UiCycleButton.d.ts +2 -2
- package/vanilla/UiCycleButton.js +31 -26
- package/vanilla/UiDataTable.d.ts +1 -1
- package/vanilla/UiDataTable.js +26 -20
- package/vanilla/UiDateField.d.ts +1 -1
- package/vanilla/UiDateField.js +78 -75
- package/vanilla/UiDatePicker.d.ts +1 -1
- package/vanilla/UiDatePicker.js +155 -149
- package/vanilla/UiDateRangePicker.d.ts +1 -1
- package/vanilla/UiDateRangePicker.js +136 -128
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +13 -11
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +13 -11
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +14 -14
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +28 -26
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +29 -27
- package/vanilla/UiEditor.d.ts +1 -1
- package/vanilla/UiEditor.js +62 -58
- package/vanilla/UiEditorBlockActions.d.ts +1 -1
- package/vanilla/UiEditorBlockActions.js +14 -12
- package/vanilla/UiEditorChipEditor.d.ts +1 -1
- package/vanilla/UiEditorChipEditor.js +22 -14
- package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
- package/vanilla/UiEditorCodeLanguage.js +23 -16
- package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
- package/vanilla/UiEditorFootnoteEditor.js +17 -9
- package/vanilla/UiEditorFormattingTools.d.ts +1 -1
- package/vanilla/UiEditorFormattingTools.js +108 -71
- package/vanilla/UiEditorImageToolbar.d.ts +1 -1
- package/vanilla/UiEditorImageToolbar.js +68 -66
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +50 -35
- package/vanilla/UiEditorLinkCard.d.ts +1 -1
- package/vanilla/UiEditorLinkCard.js +27 -25
- package/vanilla/UiEditorLinkForm.d.ts +1 -1
- package/vanilla/UiEditorLinkForm.js +79 -57
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +63 -44
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +22 -16
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +52 -33
- package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuGroup.js +19 -14
- package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuItem.js +27 -25
- package/vanilla/UiEditorSurface.d.ts +1 -1
- package/vanilla/UiEditorSurface.js +13 -11
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +81 -52
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +107 -68
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +121 -70
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +20 -12
- package/vanilla/UiFileInput.d.ts +1 -1
- package/vanilla/UiFileInput.js +94 -80
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +21 -20
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +21 -19
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +26 -23
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +20 -15
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +35 -43
- package/vanilla/UiImage.d.ts +1 -1
- package/vanilla/UiImage.js +16 -14
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +29 -35
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.js +16 -14
- package/vanilla/UiLightEditor.d.ts +1 -1
- package/vanilla/UiLightEditor.js +29 -27
- package/vanilla/UiList.d.ts +1 -1
- package/vanilla/UiList.js +33 -27
- package/vanilla/UiListItem.d.ts +1 -1
- package/vanilla/UiListItem.js +12 -12
- package/vanilla/UiListbox.d.ts +1 -1
- package/vanilla/UiListbox.js +90 -80
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +20 -12
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +14 -11
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +74 -75
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +67 -62
- package/vanilla/UiNavItem.d.ts +1 -1
- package/vanilla/UiNavItem.js +63 -65
- package/vanilla/UiNoticeStripe.d.ts +1 -1
- package/vanilla/UiNoticeStripe.js +16 -16
- package/vanilla/UiNumberInput.d.ts +1 -1
- package/vanilla/UiNumberInput.js +41 -38
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +17 -15
- package/vanilla/UiPagination.d.ts +1 -1
- package/vanilla/UiPagination.js +53 -44
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +13 -11
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +25 -23
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +33 -36
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +20 -12
- package/vanilla/UiScrollArea.d.ts +1 -1
- package/vanilla/UiScrollArea.js +13 -11
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +21 -20
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +16 -14
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +48 -45
- package/vanilla/UiSegmentedControl.d.ts +2 -2
- package/vanilla/UiSegmentedControl.js +52 -47
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +17 -21
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +12 -12
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +17 -15
- package/vanilla/UiSiteHeader.d.ts +1 -1
- package/vanilla/UiSiteHeader.js +25 -23
- package/vanilla/UiSkeleton.d.ts +1 -1
- package/vanilla/UiSkeleton.js +21 -20
- package/vanilla/UiSlider.d.ts +1 -1
- package/vanilla/UiSlider.js +50 -47
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +34 -27
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +12 -12
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +22 -21
- package/vanilla/UiSwatch.d.ts +1 -1
- package/vanilla/UiSwatch.js +20 -17
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +25 -23
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +13 -11
- package/vanilla/UiTable.d.ts +1 -1
- package/vanilla/UiTable.js +13 -11
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +39 -28
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +128 -125
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +27 -39
- package/vanilla/UiTimeField.d.ts +1 -1
- package/vanilla/UiTimeField.js +42 -40
- package/vanilla/UiTimePicker.d.ts +1 -1
- package/vanilla/UiTimePicker.js +105 -102
- package/vanilla/UiToast.d.ts +1 -1
- package/vanilla/UiToast.js +14 -14
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +61 -31
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +17 -14
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +24 -22
- package/vanilla/UiTree.d.ts +1 -1
- package/vanilla/UiTree.js +17 -12
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +73 -79
- package/vanilla/UiWizard.d.ts +1 -1
- package/vanilla/UiWizard.js +61 -40
package/vanilla/UiNavItem.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, NONCONFORMING, readIndex, textCall, toAttribute, writeAttribute, writeUrlAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project,
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, equalValue, buildTemplate, NONCONFORMING, readIndex, textCall, toAttribute, truthy, writeAttribute, writeUrlAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, armElement, replaceRoot, checkFormat, checkString, initializeSlot, sharePlainSlots, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-nav-item.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",["span",["class","indicator","aria-hidden","true"]],"\n ",["span",["class","leading"],4],"\n ",["span",["class","content"],"\n ",["span",["class","label"],4],"\n ",["span",["class","description"],4],"\n "],"\n ",["span",["class","trailing"],4],"\n "];
|
|
@@ -19,25 +19,18 @@ const Q = [[],[]];
|
|
|
19
19
|
const D = { g: "ui-nav-item", props: { "as": { "required":false,"values":["button","a"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "current": { "required":false,"values":["true","false","page","step","location"],"default":"false", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "density": { "required":false,"values":["comfortable","compact"],"default":"comfortable", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "href": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "rel": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "target": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "variant": { "required":false,"values":["surface","line"],"default":"surface", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
20
20
|
|
|
21
21
|
export function createUiNavItem(options = {}, html) {
|
|
22
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
22
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
23
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["as","current","density","href","rel","target","variant"].includes(name)));
|
|
23
24
|
const v = [null, null, null, null, null, null, null];
|
|
24
25
|
let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
|
|
25
|
-
let a = ((v[0]
|
|
26
|
+
let a = (truthy(equalValue(v[0], "a")) ? 0 : 1);
|
|
26
27
|
let element;
|
|
27
28
|
if (a === 0) {
|
|
28
29
|
element = document.createElement("a");
|
|
29
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
30
|
-
if (value === null || value === undefined || value === false) continue;
|
|
31
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
32
|
-
}
|
|
33
30
|
element.setAttribute("component", "ui-nav-item");
|
|
34
31
|
} else {
|
|
35
32
|
element = document.createElement("button");
|
|
36
|
-
|
|
37
|
-
if (value === null || value === undefined || value === false) continue;
|
|
38
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
39
|
-
}
|
|
40
|
-
if (!element.hasAttribute("type")) element.setAttribute("type", "button");
|
|
33
|
+
element.setAttribute("type", "button");
|
|
41
34
|
element.setAttribute("component", "ui-nav-item");
|
|
42
35
|
}
|
|
43
36
|
B = acceptProps(element, D, S.n, v, componentProps, Q[a], html);
|
|
@@ -114,50 +107,47 @@ export function createUiNavItem(options = {}, html) {
|
|
|
114
107
|
const t4 = t3.firstChild;
|
|
115
108
|
const t5 = t3.nextSibling.nextSibling.firstChild;
|
|
116
109
|
const t6 = t2.nextSibling.nextSibling.firstChild;
|
|
117
|
-
const r = { n, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a3: t5, e2: t5.nextSibling, b2: undefined, f2: undefined, a4: t6, e3: t6.nextSibling, b3: undefined, f3: undefined };
|
|
110
|
+
const r = { n, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, g4: NONCONFORMING, v5: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a3: t5, e2: t5.nextSibling, b2: undefined, f2: undefined, a4: t6, e3: t6.nextSibling, b3: undefined, f3: undefined };
|
|
118
111
|
p0(r, -1, d);
|
|
119
112
|
return r;
|
|
120
113
|
};
|
|
121
114
|
const p0 = (r, c, d) => {
|
|
122
|
-
if (c &
|
|
115
|
+
if (c & 1073741882) {
|
|
116
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
117
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
123
118
|
const x0 = v[3];
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
if (c & 32) {
|
|
119
|
+
const s1 = toAttribute(x0, "href");
|
|
120
|
+
writeUrlAttribute(r.n, "href", r.v1 = s1);
|
|
128
121
|
const x1 = v[5];
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
if (c & 16) {
|
|
122
|
+
const s2 = toAttribute(x1, "target");
|
|
123
|
+
writeAttribute(r.n, "target", r.v2 = s2);
|
|
133
124
|
const x2 = v[4];
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
if (c & 1073741826) {
|
|
125
|
+
const s3 = toAttribute(x2, "rel");
|
|
126
|
+
writeAttribute(r.n, "rel", r.v3 = s3);
|
|
138
127
|
const x3 = readIndex({ "true": "page", "false": null, "page": "page", "step": "step", "location": "location" }, textCall("concat", [v[1]]));
|
|
139
|
-
if (x3 !== NONCONFORMING)
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
if (x3 !== NONCONFORMING) r.g4 = x3;
|
|
129
|
+
if (r.g4 !== NONCONFORMING) {
|
|
130
|
+
const s4 = toAttribute(r.g4, "aria-current");
|
|
131
|
+
writeAttribute(r.n, "aria-current", r.v4 = s4);
|
|
142
132
|
}
|
|
143
133
|
}
|
|
144
134
|
if (c & 68) {
|
|
145
135
|
const x4 = hostState(["variant","density"], [v[6], v[2]]);
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
136
|
+
const s5 = x4;
|
|
137
|
+
if (s5 !== r.v5) writeAttribute(r.n, "data-ui-nav-item-state", (r.v5 = s5) === "" ? null : s5);
|
|
148
138
|
}
|
|
149
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
150
|
-
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); } }
|
|
151
|
-
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
152
|
-
if (r.f1 === undefined) { r.f1 = 1; const at =
|
|
153
|
-
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); } }
|
|
154
|
-
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
155
|
-
if (r.f2 === undefined) { r.f2 = 1; const at =
|
|
156
|
-
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); } }
|
|
157
|
-
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
158
|
-
if (r.f3 === undefined) { r.f3 = 1; const at =
|
|
159
|
-
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); } }
|
|
160
|
-
else if (r.b3 !== undefined) p4(r.b3, c, d);
|
|
139
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "leading", J, false, undefined, d);
|
|
140
|
+
if (typeof at === "function") r.f0 = at(r, (d, at) => m1(d, undefined, r), p1); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
|
|
141
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
142
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
|
|
143
|
+
if (typeof at === "function") r.f1 = at(r, (d, at) => m2(d, undefined, r), p2); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
|
|
144
|
+
else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
145
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "description", J, false, undefined, d);
|
|
146
|
+
if (typeof at === "function") r.f2 = at(r, (d, at) => m3(d, undefined, r), p3); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m3(d); at.before(r.b2.n); } }
|
|
147
|
+
else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
148
|
+
if (r.f3 === undefined) { r.f3 = 1; const at = initializeSlot(r.a4, r.e3, "trailing", J, false, undefined, d);
|
|
149
|
+
if (typeof at === "function") r.f3 = at(r, (d, at) => m4(d, undefined, r), p4); else 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); } }
|
|
150
|
+
else if (typeof r.f3 === "function") r.f3(c, d); else if (r.b3 !== undefined) p4(r.b3, c, d);
|
|
161
151
|
};
|
|
162
152
|
const m5 = (n, d) => {
|
|
163
153
|
n.append((P5 ??= buildTemplate(T5)).cloneNode(true));
|
|
@@ -168,35 +158,41 @@ export function createUiNavItem(options = {}, html) {
|
|
|
168
158
|
const t4 = t3.firstChild;
|
|
169
159
|
const t5 = t3.nextSibling.nextSibling.firstChild;
|
|
170
160
|
const t6 = t2.nextSibling.nextSibling.firstChild;
|
|
171
|
-
const r = { n, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a3: t5, e2: t5.nextSibling, b2: undefined, f2: undefined, a4: t6, e3: t6.nextSibling, b3: undefined, f3: undefined };
|
|
161
|
+
const r = { n, v0: undefined, v1: undefined, v2: undefined, g2: NONCONFORMING, v3: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a3: t5, e2: t5.nextSibling, b2: undefined, f2: undefined, a4: t6, e3: t6.nextSibling, b3: undefined, f3: undefined };
|
|
172
162
|
p5(r, -1, d);
|
|
173
163
|
return r;
|
|
174
164
|
};
|
|
175
165
|
const p5 = (r, c, d) => {
|
|
176
166
|
if (c & 1073741826) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
167
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
168
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
169
|
+
const x0 = "button";
|
|
170
|
+
const s1 = toAttribute(x0, "type");
|
|
171
|
+
writeAttribute(r.n, "type", r.v1 = s1);
|
|
172
|
+
const x1 = readIndex({ "true": "page", "false": null, "page": "page", "step": "step", "location": "location" }, textCall("concat", [v[1]]));
|
|
173
|
+
if (x1 !== NONCONFORMING) r.g2 = x1;
|
|
174
|
+
if (r.g2 !== NONCONFORMING) {
|
|
175
|
+
const s2 = toAttribute(r.g2, "aria-current");
|
|
176
|
+
writeAttribute(r.n, "aria-current", r.v2 = s2);
|
|
181
177
|
}
|
|
182
178
|
}
|
|
183
179
|
if (c & 68) {
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
180
|
+
const x2 = hostState(["variant","density"], [v[6], v[2]]);
|
|
181
|
+
const s3 = x2;
|
|
182
|
+
if (s3 !== r.v3) writeAttribute(r.n, "data-ui-nav-item-state", (r.v3 = s3) === "" ? null : s3);
|
|
187
183
|
}
|
|
188
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
189
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m6(d); at.before(r.b0.n); } }
|
|
190
|
-
else if (r.b0 !== undefined) p6(r.b0, c, d);
|
|
191
|
-
if (r.f1 === undefined) { r.f1 = 1; const at =
|
|
192
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m7(d); at.before(r.b1.n); } }
|
|
193
|
-
else if (r.b1 !== undefined) p7(r.b1, c, d);
|
|
194
|
-
if (r.f2 === undefined) { r.f2 = 1; const at =
|
|
195
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m8(d); at.before(r.b2.n); } }
|
|
196
|
-
else if (r.b2 !== undefined) p8(r.b2, c, d);
|
|
197
|
-
if (r.f3 === undefined) { r.f3 = 1; const at =
|
|
198
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b3 = m9(d); at.before(r.b3.n); } }
|
|
199
|
-
else if (r.b3 !== undefined) p9(r.b3, c, d);
|
|
184
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "leading", J, false, undefined, d);
|
|
185
|
+
if (typeof at === "function") r.f0 = at(r, (d, at) => m6(d, undefined, r), p6); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m6(d); at.before(r.b0.n); } }
|
|
186
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p6(r.b0, c, d);
|
|
187
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
|
|
188
|
+
if (typeof at === "function") r.f1 = at(r, (d, at) => m7(d, undefined, r), p7); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m7(d); at.before(r.b1.n); } }
|
|
189
|
+
else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p7(r.b1, c, d);
|
|
190
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "description", J, false, undefined, d);
|
|
191
|
+
if (typeof at === "function") r.f2 = at(r, (d, at) => m8(d, undefined, r), p8); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m8(d); at.before(r.b2.n); } }
|
|
192
|
+
else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p8(r.b2, c, d);
|
|
193
|
+
if (r.f3 === undefined) { r.f3 = 1; const at = initializeSlot(r.a4, r.e3, "trailing", J, false, undefined, d);
|
|
194
|
+
if (typeof at === "function") r.f3 = at(r, (d, at) => m9(d, undefined, r), p9); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b3 = m9(d); at.before(r.b3.n); } }
|
|
195
|
+
else if (typeof r.f3 === "function") r.f3(c, d); else if (r.b3 !== undefined) p9(r.b3, c, d);
|
|
200
196
|
};
|
|
201
197
|
const M = [m0, m5], N = [p0, p5];
|
|
202
198
|
let R;
|
|
@@ -204,7 +200,7 @@ export function createUiNavItem(options = {}, html) {
|
|
|
204
200
|
if (R === null) return;
|
|
205
201
|
if (R === undefined) { R = M[a](element, d); return; }
|
|
206
202
|
if (c & 1) {
|
|
207
|
-
const t = ((v[0]
|
|
203
|
+
const t = (truthy(equalValue(v[0], "a")) ? 0 : 1);
|
|
208
204
|
if (t !== a) {
|
|
209
205
|
dispose(R);
|
|
210
206
|
for (const key in I.r) delete I.r[key];
|
|
@@ -221,6 +217,8 @@ export function createUiNavItem(options = {}, html) {
|
|
|
221
217
|
};
|
|
222
218
|
const I = { B };
|
|
223
219
|
const J = project(I, children, slots);
|
|
220
|
+
sharePlainSlots(I, J, ["leading","","description","trailing"]);
|
|
221
|
+
I.F = { values: attributes, draw: () => p(-1) };
|
|
224
222
|
attachGeneratedController(element, S, v, p, undefined, undefined, I);
|
|
225
223
|
manageProps(I);
|
|
226
224
|
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 UiNoticeStripeEventMap {
|
|
3
3
|
dismiss: CustomEvent<{ readonly reason: "action"; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, clearRegion, readIndex, toAttribute, truthy, 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, clearRegion, readIndex, toAttribute, truthy, 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-notice-stripe/ui-notice-stripe.js";
|
|
4
4
|
import "../styles/ui-notice-stripe.css";
|
|
5
5
|
|
|
@@ -13,12 +13,9 @@ const D = { g: "ui-notice-stripe", props: { "dismissLabel": { "required":false,"
|
|
|
13
13
|
const C = (host) => activateModule(controller, host);
|
|
14
14
|
|
|
15
15
|
export function createUiNoticeStripe(options = {}, html) {
|
|
16
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
16
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
17
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["dismiss-label","dismissible","tone"].includes(name)));
|
|
17
18
|
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
19
|
element.setAttribute("component", "ui-notice-stripe");
|
|
23
20
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
24
21
|
const v = [null, null, null];
|
|
@@ -54,34 +51,37 @@ export function createUiNoticeStripe(options = {}, html) {
|
|
|
54
51
|
};
|
|
55
52
|
const p0 = (r, c, d) => {
|
|
56
53
|
if (c & 1073741828) {
|
|
54
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
55
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
57
56
|
const x0 = readIndex({ "neutral": "status", "info": "status", "success": "status", "warning": "status", "danger": "alert" }, v[2]);
|
|
58
|
-
const
|
|
59
|
-
|
|
57
|
+
const s1 = toAttribute(x0, "role");
|
|
58
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
60
59
|
}
|
|
61
60
|
if (c & 4) {
|
|
62
61
|
const x1 = hostState(["tone"], [v[2]]);
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
62
|
+
const s2 = x1;
|
|
63
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-ui-notice-stripe-state", (r.v2 = s2) === "" ? null : s2);
|
|
65
64
|
}
|
|
66
|
-
if (c & 2 && !(truthy(v[1])) !== !r.b2) {
|
|
67
|
-
if (r.b2) { r.b2 = undefined; clearRegion(r.a3, r.e2); }
|
|
68
|
-
else { r.b2 = m3(d); r.e2.before(r.b2.n); }
|
|
69
|
-
} else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
70
65
|
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
|
|
71
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); } }
|
|
72
67
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
73
68
|
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a2, r.e1, "actions", J, false, undefined, d);
|
|
74
69
|
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); } }
|
|
75
70
|
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
71
|
+
if (c & 2 && !(truthy(v[1])) !== !r.b2) {
|
|
72
|
+
if (r.b2) { r.b2 = undefined; clearRegion(r.a3, r.e2); }
|
|
73
|
+
else { r.b2 = m3(d); r.e2.before(r.b2.n); }
|
|
74
|
+
} else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
76
75
|
};
|
|
77
76
|
const t0 = element.firstChild.nextSibling;
|
|
78
77
|
const t1 = t0.firstChild.nextSibling;
|
|
79
78
|
const t2 = t1.firstChild;
|
|
80
79
|
const t3 = t1.nextSibling.nextSibling.firstChild;
|
|
81
80
|
const t4 = t0.nextSibling.nextSibling;
|
|
82
|
-
const R = { n: element, v0: undefined, v1: undefined, a1: t2, e0: t2.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined };
|
|
81
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, a1: t2, e0: t2.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined };
|
|
83
82
|
const I = { B };
|
|
84
83
|
const J = project(I, children, slots);
|
|
84
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
85
85
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
86
86
|
manageProps(I);
|
|
87
87
|
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 UiNumberInputEventMap {
|
|
3
3
|
input: CustomEvent<{ readonly value: string }>;
|
|
4
4
|
change: CustomEvent<{ readonly value: string }>;
|
package/vanilla/UiNumberInput.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, stateInitializers, buildTemplate,
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, checkedReferenceValue, stateInitializers, buildTemplate, NONCONFORMING, textCall, toAttribute, writeAttribute, dispatchDeclared, detailCheck, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, awaitInput, inputRead, READY_INPUT, UNRESOLVED_INPUT, checkBoolean, checkFormat, checkNumber, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-number-input/ui-number-input.js";
|
|
4
4
|
import "../styles/ui-number-input.css";
|
|
5
5
|
|
|
6
6
|
const T0 = ["",[],"\n ",["ui-icon-button",["data-number-step","decrease","match-button","","type","button"],["ui-icon",["name","minus"]]],"\n ",["ui-input",["data-ui-field-control","","inputmode","decimal","spellcheck","false","aria-description","Enter calculates arithmetic. Arrow keys step; Shift changes ten steps."]],"\n ",["ui-icon-button",["data-number-step","increase","match-button","","type","button"],["ui-icon",["name","plus"]]],"\n "];
|
|
7
|
+
const RC0 = ["s", "string"];
|
|
7
8
|
let P0;
|
|
8
9
|
const S = { n: ["display"], t: ["s"], f: import.meta.url, g: "ui-number-input", d: { "input": [detailCheck(checkObject([["value", checkString, false]], false)), true, true, false], "change": [detailCheck(checkObject([["value", checkString, false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs };
|
|
9
10
|
const D = { g: "ui-number-input", props: { "compact": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "label": { "required":false,"default":"Value", c: checkString, t: "string", j: 0, m: "s" }, "max": { "required":false,"default":1000000, c: checkNumber, t: "number", j: 0, m: "n" }, "min": { "required":false,"default":-1000000, c: checkNumber, t: "number", j: 0, m: "n" }, "name": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "size": { "required":false,"values":["sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "step": { "required":false,"default":1, c: checkNumber, t: "number", j: 0, m: "n" }, "unit": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "value": { "required":false,"default":"0", c: checkString, t: "string", j: 0, m: "s" } } };
|
|
10
11
|
const C = (host) => activateModule(controller, host);
|
|
11
12
|
|
|
12
13
|
export function createUiNumberInput(options = {}, html) {
|
|
13
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
14
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
15
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["compact","disabled","label","max","min","name","size","step","unit","value"].includes(name)));
|
|
14
16
|
const element = document.createElement("span");
|
|
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
17
|
element.setAttribute("component", "ui-number-input");
|
|
20
18
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
21
19
|
const v = [null, null, null, null, null, null, null, null, null, null, null];
|
|
@@ -23,72 +21,77 @@ export function createUiNumberInput(options = {}, html) {
|
|
|
23
21
|
const CS = [];
|
|
24
22
|
const inputStatus = (j) => { if (j === 0) return E.status(j); if (j === 1) return awaitInput(B, "compact", true); if (j === 2) return awaitInput(B, "disabled", true); if (j === 3) return awaitInput(B, "label", true); if (j === 4) return awaitInput(B, "max", true); if (j === 5) return awaitInput(B, "min", true); if (j === 6) return awaitInput(B, "name", true); if (j === 7) return awaitInput(B, "size", true); if (j === 8) return awaitInput(B, "step", true); if (j === 9) return awaitInput(B, "unit", true); if (j === 10) return awaitInput(B, "value", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
|
|
25
23
|
const X = { e: 0, g: (j) => v[j], w: new Set(), a: CS, i: inputStatus };
|
|
26
|
-
const E = stateInitializers(S, v, X, { 0: () => inputRead(v[10], inputStatus(10)) });
|
|
24
|
+
const E = stateInitializers(S, v, X, { 0: () => (inputRead(v[10], inputStatus(10))) });
|
|
27
25
|
const p0 = (r, c, d) => {
|
|
26
|
+
if (c === -1) {
|
|
27
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
28
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
29
|
+
}
|
|
28
30
|
if (c & 2) {
|
|
29
31
|
const x0 = v[1];
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
32
|
+
const s1 = toAttribute(x0, "hidden");
|
|
33
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "hidden", r.v1 = s1);
|
|
34
|
+
const s10 = toAttribute(x0, "hidden");
|
|
35
|
+
if (s10 !== r.v10) writeAttribute(r.a3, "hidden", r.v10 = s10);
|
|
34
36
|
const x1 = hostState(["compact"], [v[1]]);
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
+
const s14 = x1;
|
|
38
|
+
if (s14 !== r.v14) writeAttribute(r.n, "data-ui-number-input-state", (r.v14 = s14) === "" ? null : s14);
|
|
37
39
|
}
|
|
38
40
|
if (c & 1073741952) {
|
|
39
41
|
const x2 = v[7];
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
42
|
+
const s2 = toAttribute(x2, "size");
|
|
43
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "size", r.v2 = s2);
|
|
44
|
+
const s5 = toAttribute(x2, "size");
|
|
45
|
+
if (s5 !== r.v5) writeAttribute(r.a2, "size", r.v5 = s5);
|
|
46
|
+
const s11 = toAttribute(x2, "size");
|
|
47
|
+
if (s11 !== r.v11) writeAttribute(r.a3, "size", r.v11 = s11);
|
|
46
48
|
}
|
|
47
49
|
if (c & 4) {
|
|
48
50
|
const x3 = v[2];
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
51
|
+
const s3 = toAttribute(x3, "disabled");
|
|
52
|
+
if (s3 !== r.v3) writeAttribute(r.a1, "disabled", r.v3 = s3);
|
|
53
|
+
const s6 = toAttribute(x3, "disabled");
|
|
54
|
+
if (s6 !== r.v6) writeAttribute(r.a2, "disabled", r.v6 = s6);
|
|
55
|
+
const s12 = toAttribute(x3, "disabled");
|
|
56
|
+
if (s12 !== r.v12) writeAttribute(r.a3, "disabled", r.v12 = s12);
|
|
55
57
|
}
|
|
56
58
|
if (c & 8) {
|
|
57
59
|
const x4 = textCall("concat", ["Decrease ", v[3]]);
|
|
58
60
|
if (x4 !== NONCONFORMING) {
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
+
const s4 = toAttribute(x4, "label");
|
|
62
|
+
if (s4 !== r.v4) writeAttribute(r.a1, "label", r.v4 = s4);
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
if (c & 1) {
|
|
64
|
-
const x5 = (
|
|
66
|
+
const x5 = checkedReferenceValue(S, E.read(0), RC0, "expression:$display:display", "display");
|
|
65
67
|
if (x5 !== NONCONFORMING) {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
+
const s7 = toAttribute(x5, "value");
|
|
69
|
+
if (s7 !== r.v7) writeAttribute(r.a2, "value", r.v7 = s7);
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
if (c & 8) {
|
|
71
73
|
const x6 = v[3];
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
74
|
+
const s8 = toAttribute(x6, "aria-label");
|
|
75
|
+
if (s8 !== r.v8) writeAttribute(r.a2, "aria-label", r.v8 = s8);
|
|
74
76
|
const x7 = textCall("concat", ["Increase ", v[3]]);
|
|
75
77
|
if (x7 !== NONCONFORMING) {
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
+
const s13 = toAttribute(x7, "label");
|
|
79
|
+
if (s13 !== r.v13) writeAttribute(r.a3, "label", r.v13 = s13);
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
if (c & 64) {
|
|
81
83
|
const x8 = v[6];
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
+
const s9 = toAttribute(x8, "name");
|
|
85
|
+
if (s9 !== r.v9) writeAttribute(r.a2, "name", r.v9 = s9);
|
|
84
86
|
}
|
|
85
87
|
};
|
|
86
88
|
const t0 = element.firstChild.nextSibling;
|
|
87
89
|
const t1 = t0.nextSibling.nextSibling;
|
|
88
90
|
const t2 = t1.nextSibling.nextSibling;
|
|
89
|
-
const R = { n: element,
|
|
91
|
+
const R = { n: element, a1: t0, a2: t1, a3: t2, v0: undefined, v1: null, v2: null, v3: null, v4: null, v5: null, v6: null, v7: null, v8: null, v9: null, v10: null, v11: null, v12: null, v13: null, v14: undefined };
|
|
90
92
|
const I = { B, U: E };
|
|
91
93
|
I.R = new Set();
|
|
94
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
92
95
|
attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, undefined, X, I);
|
|
93
96
|
manageProps(I);
|
|
94
97
|
return element;
|
package/vanilla/UiPageHeader.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, 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, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-page-header.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",["span",["class","leading"],4],"\n ",["span",["class","copy"],"\n ",["span",["class","eyebrow"],4],"\n ",["h1",["class","title"],4],"\n ",["span",["class","description"],4],"\n "],"\n ",["span",["class","actions"],4],"\n "];
|
|
@@ -13,12 +13,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-page-header", b: generatedI
|
|
|
13
13
|
const D = { g: "ui-page-header", props: { "align": { "required":false,"values":["start","center"],"default":"start", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
14
14
|
|
|
15
15
|
export function createUiPageHeader(options = {}, html) {
|
|
16
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
16
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
17
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["align"].includes(name)));
|
|
17
18
|
const element = document.createElement("header");
|
|
18
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
19
|
-
if (value === null || value === undefined || value === false) continue;
|
|
20
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
21
|
-
}
|
|
22
19
|
element.setAttribute("component", "ui-page-header");
|
|
23
20
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
24
21
|
const v = [null];
|
|
@@ -64,24 +61,28 @@ export function createUiPageHeader(options = {}, html) {
|
|
|
64
61
|
const p5 = (r, c, d) => {
|
|
65
62
|
};
|
|
66
63
|
const p0 = (r, c, d) => {
|
|
64
|
+
if (c === -1) {
|
|
65
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
66
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
67
|
+
}
|
|
67
68
|
if (c & 1) {
|
|
68
69
|
const x0 = hostState(["align"], [v[0]]);
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
70
|
+
const s1 = x0;
|
|
71
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-page-header-state", (r.v1 = s1) === "" ? null : s1);
|
|
71
72
|
}
|
|
72
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
73
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "leading", J, false, undefined, d);
|
|
73
74
|
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); } }
|
|
74
75
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
75
|
-
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.
|
|
76
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a2, r.e1, "eyebrow", 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.b1 = m2(d); at.before(r.b1.n); } }
|
|
77
78
|
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
78
|
-
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.
|
|
79
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a3, r.e2, "", 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.b2 = m3(d); at.before(r.b2.n); } }
|
|
80
81
|
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
81
|
-
if (r.f3 === undefined) { r.f3 = 1; const at = fillSlot(r.
|
|
82
|
+
if (r.f3 === undefined) { r.f3 = 1; const at = fillSlot(r.a4, r.e3, "description", J, false, undefined, d);
|
|
82
83
|
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); } }
|
|
83
84
|
else if (r.b3 !== undefined) p4(r.b3, c, d);
|
|
84
|
-
if (r.f4 === undefined) { r.f4 = 1; const at = fillSlot(r.
|
|
85
|
+
if (r.f4 === undefined) { r.f4 = 1; const at = fillSlot(r.a5, r.e4, "actions", J, false, undefined, d);
|
|
85
86
|
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); } }
|
|
86
87
|
else if (r.b4 !== undefined) p5(r.b4, c, d);
|
|
87
88
|
};
|
|
@@ -94,9 +95,10 @@ export function createUiPageHeader(options = {}, html) {
|
|
|
94
95
|
const t6 = t5.firstChild;
|
|
95
96
|
const t7 = t5.nextSibling.nextSibling.firstChild;
|
|
96
97
|
const t8 = t2.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: t4, e1: t4.nextSibling, b1: undefined, f1: undefined, a3: t6, e2: t6.nextSibling, b2: undefined, f2: undefined, a4: t7, e3: t7.nextSibling, b3: undefined, f3: undefined, a5: t8, e4: t8.nextSibling, b4: undefined, f4: undefined };
|
|
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;
|
|
@@ -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 UiPaginationEventMap {
|
|
3
3
|
navigate: CustomEvent<{ readonly page: number; readonly previousPage: number; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
}
|