@threadlabs/looma 0.52.11 → 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/UiCallout.d.ts
CHANGED
package/vanilla/UiCallout.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, clearRegion, toText, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkString, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, equalValue, buildTemplate, clearRegion, toAttribute, toText, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkString, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-callout.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",["span",["class","icon","aria-hidden","true"],"\n ",1,"\n ",1,"\n ",1,"\n ",1,"\n ",1,"\n ",1,"\n ",1,"\n "],"\n ",["div",["class","content"],"\n ",1,"\n ",4,"\n "],"\n "];
|
|
@@ -17,12 +17,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-callout", b: generatedInput
|
|
|
17
17
|
const D = { g: "ui-callout", props: { "heading": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "tone": { "required":false,"values":["info","neutral","note","tip","important","warning","caution","success","danger"],"default":"info", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
18
18
|
|
|
19
19
|
export function createUiCallout(options = {}, html) {
|
|
20
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
20
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
21
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["heading","tone"].includes(name)));
|
|
21
22
|
const element = document.createElement("div");
|
|
22
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
23
|
-
if (value === null || value === undefined || value === false) continue;
|
|
24
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
25
|
-
}
|
|
26
23
|
if (!element.hasAttribute("role")) element.setAttribute("role", "note");
|
|
27
24
|
element.setAttribute("component", "ui-callout");
|
|
28
25
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -107,44 +104,51 @@ export function createUiCallout(options = {}, html) {
|
|
|
107
104
|
const p9 = (r, c, d) => {
|
|
108
105
|
};
|
|
109
106
|
const p0 = (r, c, d) => {
|
|
107
|
+
if (c === -1) {
|
|
108
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
109
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
110
|
+
const x0 = "note";
|
|
111
|
+
const s1 = toAttribute(x0, "role");
|
|
112
|
+
writeAttribute(r.n, "role", r.v1 = s1);
|
|
113
|
+
}
|
|
110
114
|
if (c & 2) {
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
115
|
+
const x1 = hostState(["tone"], [v[1]]);
|
|
116
|
+
const s2 = x1;
|
|
117
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-ui-callout-state", (r.v2 = s2) === "" ? null : s2);
|
|
114
118
|
}
|
|
115
|
-
if (c & 2 && !((v[1]
|
|
116
|
-
if (r.b0) { r.b0 = undefined; clearRegion(r.
|
|
119
|
+
if (c & 2 && !(truthy(equalValue(v[1], "info"))) !== !r.b0) {
|
|
120
|
+
if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
|
|
117
121
|
else { r.b0 = m1(d); r.e0.before(r.b0.n); }
|
|
118
122
|
} else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
119
|
-
if (c & 2 && !(((v[1]
|
|
120
|
-
if (r.b1) { r.b1 = undefined; clearRegion(r.
|
|
123
|
+
if (c & 2 && !((truthy(equalValue(v[1], "neutral")) || truthy(equalValue(v[1], "note")))) !== !r.b1) {
|
|
124
|
+
if (r.b1) { r.b1 = undefined; clearRegion(r.a2, r.e1); }
|
|
121
125
|
else { r.b1 = m2(d); r.e1.before(r.b1.n); }
|
|
122
126
|
} else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
123
|
-
if (c & 2 && !((v[1]
|
|
124
|
-
if (r.b2) { r.b2 = undefined; clearRegion(r.
|
|
127
|
+
if (c & 2 && !(truthy(equalValue(v[1], "tip"))) !== !r.b2) {
|
|
128
|
+
if (r.b2) { r.b2 = undefined; clearRegion(r.a3, r.e2); }
|
|
125
129
|
else { r.b2 = m3(d); r.e2.before(r.b2.n); }
|
|
126
130
|
} else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
127
|
-
if (c & 2 && !((v[1]
|
|
128
|
-
if (r.b3) { r.b3 = undefined; clearRegion(r.
|
|
131
|
+
if (c & 2 && !(truthy(equalValue(v[1], "important"))) !== !r.b3) {
|
|
132
|
+
if (r.b3) { r.b3 = undefined; clearRegion(r.a4, r.e3); }
|
|
129
133
|
else { r.b3 = m4(d); r.e3.before(r.b3.n); }
|
|
130
134
|
} else if (r.b3 !== undefined) p4(r.b3, c, d);
|
|
131
|
-
if (c & 2 && !((v[1]
|
|
132
|
-
if (r.b4) { r.b4 = undefined; clearRegion(r.
|
|
135
|
+
if (c & 2 && !(truthy(equalValue(v[1], "warning"))) !== !r.b4) {
|
|
136
|
+
if (r.b4) { r.b4 = undefined; clearRegion(r.a5, r.e4); }
|
|
133
137
|
else { r.b4 = m5(d); r.e4.before(r.b4.n); }
|
|
134
138
|
} else if (r.b4 !== undefined) p5(r.b4, c, d);
|
|
135
|
-
if (c & 2 && !((v[1]
|
|
136
|
-
if (r.b5) { r.b5 = undefined; clearRegion(r.
|
|
139
|
+
if (c & 2 && !(truthy(equalValue(v[1], "success"))) !== !r.b5) {
|
|
140
|
+
if (r.b5) { r.b5 = undefined; clearRegion(r.a6, r.e5); }
|
|
137
141
|
else { r.b5 = m6(d); r.e5.before(r.b5.n); }
|
|
138
142
|
} else if (r.b5 !== undefined) p6(r.b5, c, d);
|
|
139
|
-
if (c & 2 && !(((v[1]
|
|
140
|
-
if (r.b6) { r.b6 = undefined; clearRegion(r.
|
|
143
|
+
if (c & 2 && !((truthy(equalValue(v[1], "danger")) || truthy(equalValue(v[1], "caution")))) !== !r.b6) {
|
|
144
|
+
if (r.b6) { r.b6 = undefined; clearRegion(r.a7, r.e6); }
|
|
141
145
|
else { r.b6 = m7(d); r.e6.before(r.b6.n); }
|
|
142
146
|
} else if (r.b6 !== undefined) p7(r.b6, c, d);
|
|
143
147
|
if (c & 1 && !(truthy(v[0])) !== !r.b7) {
|
|
144
|
-
if (r.b7) { r.b7 = undefined; clearRegion(r.
|
|
148
|
+
if (r.b7) { r.b7 = undefined; clearRegion(r.a8, r.e7); }
|
|
145
149
|
else { r.b7 = m8(d); r.e7.before(r.b7.n); }
|
|
146
150
|
} else if (r.b7 !== undefined) p8(r.b7, c, d);
|
|
147
|
-
if (r.f8 === undefined) { r.f8 = 1; const at = fillSlot(r.
|
|
151
|
+
if (r.f8 === undefined) { r.f8 = 1; const at = fillSlot(r.a9, r.e8, "", J, false, undefined, d);
|
|
148
152
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b8 = m9(d); at.before(r.b8.n); } }
|
|
149
153
|
else if (r.b8 !== undefined) p9(r.b8, c, d);
|
|
150
154
|
};
|
|
@@ -159,9 +163,10 @@ export function createUiCallout(options = {}, html) {
|
|
|
159
163
|
const t8 = t0.nextSibling.nextSibling;
|
|
160
164
|
const t9 = t8.firstChild.nextSibling;
|
|
161
165
|
const t10 = t9.nextSibling.nextSibling.nextSibling;
|
|
162
|
-
const R = { n: element, v0: undefined,
|
|
166
|
+
const R = { n: element, v0: undefined, v1: undefined, v2: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, a2: t2, e1: t2.nextSibling, b1: undefined, a3: t3, e2: t3.nextSibling, b2: undefined, a4: t4, e3: t4.nextSibling, b3: undefined, a5: t5, e4: t5.nextSibling, b4: undefined, a6: t6, e5: t6.nextSibling, b5: undefined, a7: t7, e6: t7.nextSibling, b6: undefined, a8: t9, e7: t9.nextSibling, b7: undefined, a9: t10, e8: t10.nextSibling, b8: undefined, f8: undefined };
|
|
163
167
|
const I = { B };
|
|
164
168
|
const J = project(I, children, slots);
|
|
169
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
165
170
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
166
171
|
manageProps(I);
|
|
167
172
|
return element;
|
package/vanilla/UiCard.d.ts
CHANGED
package/vanilla/UiCard.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project,
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, equalValue, buildTemplate, truthy, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, armElement, replaceRoot, checkBoolean, checkFormat, initializeSlot, sharePlainSlots, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-card.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",["div",["class","header"],4],"\n ",["div",["class","content"],4],"\n ",["div",["class","actions"],4],"\n "];
|
|
@@ -25,38 +25,23 @@ const Q = [[],[],[],[]];
|
|
|
25
25
|
const D = { g: "ui-card", props: { "as": { "required":false,"values":["div","section","article","aside"],"default":"div", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "fill": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "padding": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["content","sm","md","lg"],"default":"content", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "tone": { "required":false,"values":["neutral","accent","accent-secondary","accent-tertiary","info","success","warning","danger"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "treatment": { "required":false,"values":["standard","expressive"],"default":"standard", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outlined","subtle","elevated","placeholder"],"default":"outlined", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
26
26
|
|
|
27
27
|
export function createUiCard(options = {}, html) {
|
|
28
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
28
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
29
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["as","fill","padding","size","tone","treatment","variant"].includes(name)));
|
|
29
30
|
const v = [null, null, null, null, null, null, null];
|
|
30
31
|
let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
|
|
31
|
-
let a = ((v[0]
|
|
32
|
+
let a = (truthy(equalValue(v[0], "section")) ? 0 : truthy(equalValue(v[0], "article")) ? 1 : truthy(equalValue(v[0], "aside")) ? 2 : 3);
|
|
32
33
|
let element;
|
|
33
34
|
if (a === 0) {
|
|
34
35
|
element = document.createElement("section");
|
|
35
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
36
|
-
if (value === null || value === undefined || value === false) continue;
|
|
37
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
38
|
-
}
|
|
39
36
|
element.setAttribute("component", "ui-card");
|
|
40
37
|
} else if (a === 1) {
|
|
41
38
|
element = document.createElement("article");
|
|
42
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
43
|
-
if (value === null || value === undefined || value === false) continue;
|
|
44
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
45
|
-
}
|
|
46
39
|
element.setAttribute("component", "ui-card");
|
|
47
40
|
} else if (a === 2) {
|
|
48
41
|
element = document.createElement("aside");
|
|
49
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
50
|
-
if (value === null || value === undefined || value === false) continue;
|
|
51
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
52
|
-
}
|
|
53
42
|
element.setAttribute("component", "ui-card");
|
|
54
43
|
} else {
|
|
55
44
|
element = document.createElement("div");
|
|
56
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
57
|
-
if (value === null || value === undefined || value === false) continue;
|
|
58
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
59
|
-
}
|
|
60
45
|
element.setAttribute("component", "ui-card");
|
|
61
46
|
}
|
|
62
47
|
B = acceptProps(element, D, S.n, v, componentProps, Q[a], html);
|
|
@@ -163,25 +148,29 @@ export function createUiCard(options = {}, html) {
|
|
|
163
148
|
const t2 = t0.nextSibling.nextSibling;
|
|
164
149
|
const t3 = t2.firstChild;
|
|
165
150
|
const t4 = t2.nextSibling.nextSibling.firstChild;
|
|
166
|
-
const r = { n, v0: undefined,
|
|
151
|
+
const r = { n, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
|
|
167
152
|
p0(r, -1, d);
|
|
168
153
|
return r;
|
|
169
154
|
};
|
|
170
155
|
const p0 = (r, c, d) => {
|
|
156
|
+
if (c === -1) {
|
|
157
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
158
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
159
|
+
}
|
|
171
160
|
if (c & 126) {
|
|
172
161
|
const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
162
|
+
const s1 = x0;
|
|
163
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-card-state", (r.v1 = s1) === "" ? null : s1);
|
|
175
164
|
}
|
|
176
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
177
|
-
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); } }
|
|
178
|
-
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
179
|
-
if (r.f1 === undefined) { r.f1 = 1; const at =
|
|
180
|
-
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); } }
|
|
181
|
-
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
182
|
-
if (r.f2 === undefined) { r.f2 = 1; const at =
|
|
183
|
-
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); } }
|
|
184
|
-
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
165
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "header", J, false, undefined, d);
|
|
166
|
+
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); } }
|
|
167
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
168
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
|
|
169
|
+
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); } }
|
|
170
|
+
else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
171
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "actions", J, false, undefined, d);
|
|
172
|
+
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); } }
|
|
173
|
+
else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
185
174
|
};
|
|
186
175
|
const m4 = (n, d) => {
|
|
187
176
|
n.append((P4 ??= buildTemplate(T4)).cloneNode(true));
|
|
@@ -190,25 +179,29 @@ export function createUiCard(options = {}, html) {
|
|
|
190
179
|
const t2 = t0.nextSibling.nextSibling;
|
|
191
180
|
const t3 = t2.firstChild;
|
|
192
181
|
const t4 = t2.nextSibling.nextSibling.firstChild;
|
|
193
|
-
const r = { n, v0: undefined,
|
|
182
|
+
const r = { n, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
|
|
194
183
|
p4(r, -1, d);
|
|
195
184
|
return r;
|
|
196
185
|
};
|
|
197
186
|
const p4 = (r, c, d) => {
|
|
187
|
+
if (c === -1) {
|
|
188
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
189
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
190
|
+
}
|
|
198
191
|
if (c & 126) {
|
|
199
192
|
const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
193
|
+
const s1 = x0;
|
|
194
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-card-state", (r.v1 = s1) === "" ? null : s1);
|
|
202
195
|
}
|
|
203
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
204
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m5(d); at.before(r.b0.n); } }
|
|
205
|
-
else if (r.b0 !== undefined) p5(r.b0, c, d);
|
|
206
|
-
if (r.f1 === undefined) { r.f1 = 1; const at =
|
|
207
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m6(d); at.before(r.b1.n); } }
|
|
208
|
-
else if (r.b1 !== undefined) p6(r.b1, c, d);
|
|
209
|
-
if (r.f2 === undefined) { r.f2 = 1; const at =
|
|
210
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m7(d); at.before(r.b2.n); } }
|
|
211
|
-
else if (r.b2 !== undefined) p7(r.b2, c, d);
|
|
196
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "header", J, false, undefined, d);
|
|
197
|
+
if (typeof at === "function") r.f0 = at(r, (d, at) => m5(d, undefined, r), p5); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m5(d); at.before(r.b0.n); } }
|
|
198
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p5(r.b0, c, d);
|
|
199
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
|
|
200
|
+
if (typeof at === "function") r.f1 = at(r, (d, at) => m6(d, undefined, r), p6); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m6(d); at.before(r.b1.n); } }
|
|
201
|
+
else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p6(r.b1, c, d);
|
|
202
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "actions", J, false, undefined, d);
|
|
203
|
+
if (typeof at === "function") r.f2 = at(r, (d, at) => m7(d, undefined, r), p7); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m7(d); at.before(r.b2.n); } }
|
|
204
|
+
else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p7(r.b2, c, d);
|
|
212
205
|
};
|
|
213
206
|
const m8 = (n, d) => {
|
|
214
207
|
n.append((P8 ??= buildTemplate(T8)).cloneNode(true));
|
|
@@ -217,25 +210,29 @@ export function createUiCard(options = {}, html) {
|
|
|
217
210
|
const t2 = t0.nextSibling.nextSibling;
|
|
218
211
|
const t3 = t2.firstChild;
|
|
219
212
|
const t4 = t2.nextSibling.nextSibling.firstChild;
|
|
220
|
-
const r = { n, v0: undefined,
|
|
213
|
+
const r = { n, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
|
|
221
214
|
p8(r, -1, d);
|
|
222
215
|
return r;
|
|
223
216
|
};
|
|
224
217
|
const p8 = (r, c, d) => {
|
|
218
|
+
if (c === -1) {
|
|
219
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
220
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
221
|
+
}
|
|
225
222
|
if (c & 126) {
|
|
226
223
|
const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
|
|
227
|
-
const
|
|
228
|
-
if (
|
|
224
|
+
const s1 = x0;
|
|
225
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-card-state", (r.v1 = s1) === "" ? null : s1);
|
|
229
226
|
}
|
|
230
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
231
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m9(d); at.before(r.b0.n); } }
|
|
232
|
-
else if (r.b0 !== undefined) p9(r.b0, c, d);
|
|
233
|
-
if (r.f1 === undefined) { r.f1 = 1; const at =
|
|
234
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m10(d); at.before(r.b1.n); } }
|
|
235
|
-
else if (r.b1 !== undefined) p10(r.b1, c, d);
|
|
236
|
-
if (r.f2 === undefined) { r.f2 = 1; const at =
|
|
237
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m11(d); at.before(r.b2.n); } }
|
|
238
|
-
else if (r.b2 !== undefined) p11(r.b2, c, d);
|
|
227
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "header", J, false, undefined, d);
|
|
228
|
+
if (typeof at === "function") r.f0 = 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.b0 = m9(d); at.before(r.b0.n); } }
|
|
229
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p9(r.b0, c, d);
|
|
230
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
|
|
231
|
+
if (typeof at === "function") r.f1 = at(r, (d, at) => m10(d, undefined, r), p10); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m10(d); at.before(r.b1.n); } }
|
|
232
|
+
else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p10(r.b1, c, d);
|
|
233
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "actions", J, false, undefined, d);
|
|
234
|
+
if (typeof at === "function") r.f2 = at(r, (d, at) => m11(d, undefined, r), p11); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m11(d); at.before(r.b2.n); } }
|
|
235
|
+
else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p11(r.b2, c, d);
|
|
239
236
|
};
|
|
240
237
|
const m12 = (n, d) => {
|
|
241
238
|
n.append((P12 ??= buildTemplate(T12)).cloneNode(true));
|
|
@@ -244,25 +241,29 @@ export function createUiCard(options = {}, html) {
|
|
|
244
241
|
const t2 = t0.nextSibling.nextSibling;
|
|
245
242
|
const t3 = t2.firstChild;
|
|
246
243
|
const t4 = t2.nextSibling.nextSibling.firstChild;
|
|
247
|
-
const r = { n, v0: undefined,
|
|
244
|
+
const r = { n, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, a3: t4, e2: t4.nextSibling, b2: undefined, f2: undefined };
|
|
248
245
|
p12(r, -1, d);
|
|
249
246
|
return r;
|
|
250
247
|
};
|
|
251
248
|
const p12 = (r, c, d) => {
|
|
249
|
+
if (c === -1) {
|
|
250
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
251
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
252
|
+
}
|
|
252
253
|
if (c & 126) {
|
|
253
254
|
const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
255
|
+
const s1 = x0;
|
|
256
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-card-state", (r.v1 = s1) === "" ? null : s1);
|
|
256
257
|
}
|
|
257
|
-
if (r.f0 === undefined) { r.f0 = 1; const at =
|
|
258
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m13(d); at.before(r.b0.n); } }
|
|
259
|
-
else if (r.b0 !== undefined) p13(r.b0, c, d);
|
|
260
|
-
if (r.f1 === undefined) { r.f1 = 1; const at =
|
|
261
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m14(d); at.before(r.b1.n); } }
|
|
262
|
-
else if (r.b1 !== undefined) p14(r.b1, c, d);
|
|
263
|
-
if (r.f2 === undefined) { r.f2 = 1; const at =
|
|
264
|
-
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m15(d); at.before(r.b2.n); } }
|
|
265
|
-
else if (r.b2 !== undefined) p15(r.b2, c, d);
|
|
258
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a1, r.e0, "header", J, false, undefined, d);
|
|
259
|
+
if (typeof at === "function") r.f0 = at(r, (d, at) => m13(d, undefined, r), p13); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m13(d); at.before(r.b0.n); } }
|
|
260
|
+
else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p13(r.b0, c, d);
|
|
261
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a2, r.e1, "", J, false, undefined, d);
|
|
262
|
+
if (typeof at === "function") r.f1 = at(r, (d, at) => m14(d, undefined, r), p14); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m14(d); at.before(r.b1.n); } }
|
|
263
|
+
else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p14(r.b1, c, d);
|
|
264
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = initializeSlot(r.a3, r.e2, "actions", J, false, undefined, d);
|
|
265
|
+
if (typeof at === "function") r.f2 = at(r, (d, at) => m15(d, undefined, r), p15); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m15(d); at.before(r.b2.n); } }
|
|
266
|
+
else if (typeof r.f2 === "function") r.f2(c, d); else if (r.b2 !== undefined) p15(r.b2, c, d);
|
|
266
267
|
};
|
|
267
268
|
const M = [m0, m4, m8, m12], N = [p0, p4, p8, p12];
|
|
268
269
|
let R;
|
|
@@ -270,7 +271,7 @@ export function createUiCard(options = {}, html) {
|
|
|
270
271
|
if (R === null) return;
|
|
271
272
|
if (R === undefined) { R = M[a](element, d); return; }
|
|
272
273
|
if (c & 1) {
|
|
273
|
-
const t = ((v[0]
|
|
274
|
+
const t = (truthy(equalValue(v[0], "section")) ? 0 : truthy(equalValue(v[0], "article")) ? 1 : truthy(equalValue(v[0], "aside")) ? 2 : 3);
|
|
274
275
|
if (t !== a) {
|
|
275
276
|
dispose(R);
|
|
276
277
|
for (const key in I.r) delete I.r[key];
|
|
@@ -287,6 +288,8 @@ export function createUiCard(options = {}, html) {
|
|
|
287
288
|
};
|
|
288
289
|
const I = { B };
|
|
289
290
|
const J = project(I, children, slots);
|
|
291
|
+
sharePlainSlots(I, J, ["header","","actions"]);
|
|
292
|
+
I.F = { values: attributes, draw: () => p(-1) };
|
|
290
293
|
attachGeneratedController(element, S, v, p, undefined, undefined, I);
|
|
291
294
|
manageProps(I);
|
|
292
295
|
return element;
|
package/vanilla/UiCardGroup.d.ts
CHANGED
package/vanilla/UiCardGroup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispose, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkInteger, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispose, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, checkInteger, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-card-group.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],"\n ",["ui-grid",[],4],"\n "];
|
|
@@ -9,12 +9,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-card-group", b: generatedIn
|
|
|
9
9
|
const D = { g: "ui-card-group", props: { "columns": { "required":false, c: checkInteger, t: "integer", j: 0, m: "i" }, "gap": { "required":false,"values":["xs","s","m","l","xl"],"default":"l", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "min": { "required":false,"values":["sm","md","lg"],"default":"lg", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
10
10
|
|
|
11
11
|
export function createUiCardGroup(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]) => !["columns","gap","min"].includes(name)));
|
|
13
14
|
const element = document.createElement("div");
|
|
14
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
15
|
-
if (value === null || value === undefined || value === false) continue;
|
|
16
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
17
|
-
}
|
|
18
15
|
element.setAttribute("component", "ui-card-group");
|
|
19
16
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
20
17
|
const v = [null, null, null];
|
|
@@ -28,30 +25,35 @@ export function createUiCardGroup(options = {}, html) {
|
|
|
28
25
|
const p1 = (r, c, d) => {
|
|
29
26
|
};
|
|
30
27
|
const p0 = (r, c, d) => {
|
|
28
|
+
if (c === -1) {
|
|
29
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
30
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
31
|
+
}
|
|
31
32
|
if (c & 1073741826) {
|
|
32
33
|
const x0 = v[1];
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
34
|
+
const s1 = toAttribute(x0, "gap");
|
|
35
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "gap", r.v1 = s1);
|
|
35
36
|
}
|
|
36
37
|
if (c & 1073741828) {
|
|
37
38
|
const x1 = v[2];
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
39
|
+
const s2 = toAttribute(x1, "min");
|
|
40
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "min", r.v2 = s2);
|
|
40
41
|
}
|
|
41
42
|
if (c & 1) {
|
|
42
43
|
const x2 = v[0];
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
44
|
+
const s3 = toAttribute(x2, "columns");
|
|
45
|
+
if (s3 !== r.v3) writeAttribute(r.a1, "columns", r.v3 = s3);
|
|
45
46
|
}
|
|
46
|
-
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);
|
|
47
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); } }
|
|
48
49
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
49
50
|
};
|
|
50
51
|
const t0 = element.firstChild.nextSibling;
|
|
51
52
|
const t1 = t0.firstChild;
|
|
52
|
-
const R = {
|
|
53
|
+
const R = { n: element, a1: t0, v0: undefined, v1: null, v2: null, v3: null, a2: t1, e0: t1.nextSibling, b0: undefined, f0: undefined };
|
|
53
54
|
const I = { B };
|
|
54
55
|
const J = project(I, children, slots);
|
|
56
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
55
57
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
56
58
|
manageProps(I);
|
|
57
59
|
return element;
|
package/vanilla/UiCheckbox.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 UiCheckboxEventMap {
|
|
3
3
|
change: CustomEvent<{ readonly checked: boolean; readonly value: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
}
|
package/vanilla/UiCheckbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, readsChanged, rec, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, buildTemplate, readsChanged, rec, toAttribute, writeAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-checkbox/ui-checkbox.js";
|
|
4
4
|
import "../styles/ui-checkbox.css";
|
|
5
5
|
|
|
@@ -12,12 +12,9 @@ const D = { g: "ui-checkbox", props: { "checked": { "required":false,"default":f
|
|
|
12
12
|
const C = (host) => activateModule(controller, host);
|
|
13
13
|
|
|
14
14
|
export function createUiCheckbox(options = {}, html) {
|
|
15
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
15
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
16
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["checked","disabled","indeterminate","invalid","label","name","required","size","value"].includes(name)));
|
|
16
17
|
const element = document.createElement("label");
|
|
17
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
18
|
-
if (value === null || value === undefined || value === false) continue;
|
|
19
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
20
|
-
}
|
|
21
18
|
element.setAttribute("component", "ui-checkbox");
|
|
22
19
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
23
20
|
const v = [false, null, null, null, null, null, null, null, null, null];
|
|
@@ -39,61 +36,65 @@ export function createUiCheckbox(options = {}, html) {
|
|
|
39
36
|
const p2 = (r, c, d) => {
|
|
40
37
|
};
|
|
41
38
|
const p0 = (r, c, d) => {
|
|
39
|
+
if (c === -1) {
|
|
40
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
41
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
42
|
+
}
|
|
42
43
|
if (c & 32) {
|
|
43
44
|
const x0 = v[5];
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
45
|
+
const s1 = toAttribute(x0, "aria-label");
|
|
46
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "aria-label", r.v1 = s1);
|
|
46
47
|
}
|
|
47
48
|
if (c & 1) {
|
|
48
49
|
const f0 = [];
|
|
49
50
|
const x1 = rec(f0, v[0]);
|
|
50
|
-
if (c === -1 || c & 1 || readsChanged(r.
|
|
51
|
-
r.
|
|
52
|
-
r.
|
|
51
|
+
if (c === -1 || c & 1 || readsChanged(r.v2, f0)) {
|
|
52
|
+
r.v2 = f0;
|
|
53
|
+
r.a1["checked"] = x1;
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
if (c & 8) {
|
|
56
57
|
const f1 = [];
|
|
57
58
|
const x2 = rec(f1, v[3]);
|
|
58
|
-
if (c === -1 || c & 8 || readsChanged(r.
|
|
59
|
-
r.
|
|
60
|
-
r.
|
|
59
|
+
if (c === -1 || c & 8 || readsChanged(r.v3, f1)) {
|
|
60
|
+
r.v3 = f1;
|
|
61
|
+
r.a1["indeterminate"] = x2;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
if (c & 4) {
|
|
64
65
|
const x3 = v[2];
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
66
|
+
const s4 = toAttribute(x3, "disabled");
|
|
67
|
+
if (s4 !== r.v4) writeAttribute(r.a1, "disabled", r.v4 = s4);
|
|
67
68
|
}
|
|
68
69
|
if (c & 16) {
|
|
69
70
|
const x4 = v[4];
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
71
|
+
const s5 = toAttribute(x4, "aria-invalid");
|
|
72
|
+
if (s5 !== r.v5) writeAttribute(r.a1, "aria-invalid", r.v5 = s5);
|
|
72
73
|
}
|
|
73
74
|
if (c & 128) {
|
|
74
75
|
const x5 = v[7];
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
76
|
+
const s6 = toAttribute(x5, "required");
|
|
77
|
+
if (s6 !== r.v6) writeAttribute(r.a1, "required", r.v6 = s6);
|
|
77
78
|
}
|
|
78
79
|
if (c & 64) {
|
|
79
80
|
const x6 = v[6];
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
81
|
+
const s7 = toAttribute(x6, "name");
|
|
82
|
+
if (s7 !== r.v7) writeAttribute(r.a1, "name", r.v7 = s7);
|
|
82
83
|
}
|
|
83
84
|
if (c & 512) {
|
|
84
85
|
const x7 = v[9];
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
86
|
+
const s8 = toAttribute(x7, "value");
|
|
87
|
+
if (s8 !== r.v8) writeAttribute(r.a1, "value", r.v8 = s8);
|
|
87
88
|
}
|
|
88
89
|
if (c & 276) {
|
|
89
90
|
const x8 = hostState(["invalid","disabled","size"], [v[4], v[2], v[8]]);
|
|
90
|
-
const
|
|
91
|
-
if (
|
|
91
|
+
const s9 = x8;
|
|
92
|
+
if (s9 !== r.v9) writeAttribute(r.n, "data-ui-checkbox-state", (r.v9 = s9) === "" ? null : s9);
|
|
92
93
|
}
|
|
93
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
94
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "", J, false, undefined, d);
|
|
94
95
|
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); } }
|
|
95
96
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
96
|
-
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.
|
|
97
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a4, r.e1, "description", J, false, undefined, d);
|
|
97
98
|
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); } }
|
|
98
99
|
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
99
100
|
};
|
|
@@ -103,10 +104,11 @@ export function createUiCheckbox(options = {}, html) {
|
|
|
103
104
|
const t3 = t2.firstChild;
|
|
104
105
|
const t4 = t2.nextSibling.nextSibling;
|
|
105
106
|
const t5 = t4.firstChild;
|
|
106
|
-
const R = { n: element,
|
|
107
|
+
const R = { n: element, a1: t0, v0: undefined, v1: null, v2: undefined, v3: undefined, v4: null, v5: null, v6: null, v7: null, v8: null, v9: undefined, a2: t3, e0: t3.nextSibling, b0: undefined, f0: undefined, a4: t5, e1: t5.nextSibling, b1: undefined, f1: undefined };
|
|
107
108
|
const I = { B };
|
|
108
109
|
const J = project(I, children, slots);
|
|
109
110
|
I.R = new Set();
|
|
111
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
110
112
|
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);
|
|
111
113
|
manageProps(I);
|
|
112
114
|
I.r["input"] = t0;
|
package/vanilla/UiCluster.d.ts
CHANGED