@threadlabs/looma 0.37.4 → 0.37.6

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.
Files changed (132) hide show
  1. package/components/shared/active-item-reveal.js +74 -0
  2. package/components/shared/menu-navigation.js +3 -1
  3. package/components/ui-button/ui-button.html +13 -0
  4. package/components/ui-combobox/ui-combobox.js +3 -1
  5. package/components/ui-context-menu/ui-context-menu.js +4 -1
  6. package/components/ui-editor-link-form/ui-editor-link-form.js +3 -1
  7. package/components/ui-editor-mention-menu/ui-editor-mention-menu.js +12 -5
  8. package/components/ui-editor-slash-menu/ui-editor-slash-menu.js +12 -5
  9. package/components/ui-listbox/ui-listbox.js +3 -1
  10. package/components/ui-menu/ui-menu.js +5 -1
  11. package/components/ui-pagination/ui-pagination.html +74 -0
  12. package/components/ui-pagination/ui-pagination.js +19 -0
  13. package/components/ui-search-shell/ui-search-shell.js +7 -4
  14. package/components/ui-skeleton/ui-skeleton.html +91 -0
  15. package/dist/index.js +20 -19
  16. package/docs/catalog.json +491 -1
  17. package/docs/examples/ui-pagination/examples/01-numbered.behavior.js +11 -0
  18. package/package.json +1 -1
  19. package/styles/ui-button.css +12 -0
  20. package/styles/ui-pagination.css +1 -0
  21. package/styles/ui-skeleton.css +91 -0
  22. package/vanilla/UiButton.d.ts +1 -0
  23. package/vanilla/UiButton.js +31 -31
  24. package/vanilla/UiPagination.d.ts +35 -0
  25. package/vanilla/UiPagination.js +202 -0
  26. package/vanilla/UiSkeleton.d.ts +26 -0
  27. package/vanilla/UiSkeleton.js +42 -0
  28. package/vanilla/index.js +2 -0
  29. package/vue/UiButton.d.ts +6 -0
  30. package/vue/UiButton.vue +34 -0
  31. package/vue/UiPagination.d.ts +115 -0
  32. package/vue/UiPagination.js +2 -0
  33. package/vue/UiPagination.vue +598 -0
  34. package/vue/UiSkeleton.d.ts +37 -0
  35. package/vue/UiSkeleton.js +2 -0
  36. package/vue/UiSkeleton.vue +235 -0
  37. package/vue/chunks/UiActionBar.js +1 -1
  38. package/vue/chunks/UiAffordanceScope.js +1 -1
  39. package/vue/chunks/UiAvatar.js +1 -1
  40. package/vue/chunks/UiAvatarGroup.js +1 -1
  41. package/vue/chunks/UiBadge.js +1 -1
  42. package/vue/chunks/UiBreadcrumbItem.js +1 -1
  43. package/vue/chunks/UiBreadcrumbs.js +1 -1
  44. package/vue/chunks/UiButton.js +30 -2
  45. package/vue/chunks/UiCallout.js +1 -1
  46. package/vue/chunks/UiCard.js +1 -1
  47. package/vue/chunks/UiCheckbox.js +1 -1
  48. package/vue/chunks/UiCluster.js +1 -1
  49. package/vue/chunks/UiColorPicker.js +1 -1
  50. package/vue/chunks/UiCombobox.js +1 -1
  51. package/vue/chunks/UiContainer.js +1 -1
  52. package/vue/chunks/UiContextMenu.js +1 -1
  53. package/vue/chunks/UiCover.js +1 -1
  54. package/vue/chunks/UiCurveEditor.js +1 -1
  55. package/vue/chunks/UiCycleButton.js +1 -1
  56. package/vue/chunks/UiDescriptionItem.js +1 -1
  57. package/vue/chunks/UiDescriptionList.js +1 -1
  58. package/vue/chunks/UiDialog.js +1 -1
  59. package/vue/chunks/UiDisclosure.js +1 -1
  60. package/vue/chunks/UiEditable.js +1 -1
  61. package/vue/chunks/UiEditorBlockActions.js +1 -1
  62. package/vue/chunks/UiEditorChipEditor.js +1 -1
  63. package/vue/chunks/UiEditorCodeLanguage.js +1 -1
  64. package/vue/chunks/UiEditorFootnoteEditor.js +1 -1
  65. package/vue/chunks/UiEditorImageToolbar.js +1 -1
  66. package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
  67. package/vue/chunks/UiEditorLinkCard.js +1 -1
  68. package/vue/chunks/UiEditorLinkForm.js +1 -1
  69. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  70. package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
  71. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  72. package/vue/chunks/UiEditorSlashMenuGroup.js +1 -1
  73. package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
  74. package/vue/chunks/UiEditorSurface.js +1 -1
  75. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  76. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  77. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  78. package/vue/chunks/UiEditorToolbar.js +1 -1
  79. package/vue/chunks/UiFloatingActionButton.js +1 -1
  80. package/vue/chunks/UiFormField.js +1 -1
  81. package/vue/chunks/UiGrid.js +1 -1
  82. package/vue/chunks/UiIcon.js +1 -1
  83. package/vue/chunks/UiIconButton.js +1 -1
  84. package/vue/chunks/UiImage.js +1 -1
  85. package/vue/chunks/UiInput.js +1 -1
  86. package/vue/chunks/UiInputGroup.js +1 -1
  87. package/vue/chunks/UiLightEditor.js +1 -1
  88. package/vue/chunks/UiList.js +1 -1
  89. package/vue/chunks/UiListItem.js +1 -1
  90. package/vue/chunks/UiListbox.js +1 -1
  91. package/vue/chunks/UiMenu.js +1 -1
  92. package/vue/chunks/UiMenuGroup.js +1 -1
  93. package/vue/chunks/UiMenuItem.js +1 -1
  94. package/vue/chunks/UiMeter.js +1 -1
  95. package/vue/chunks/UiNavItem.js +1 -1
  96. package/vue/chunks/UiNumberInput.js +1 -1
  97. package/vue/chunks/UiPageHeader.js +1 -1
  98. package/vue/chunks/UiPagination.js +551 -0
  99. package/vue/chunks/UiPopover.js +1 -1
  100. package/vue/chunks/UiRadio.js +1 -1
  101. package/vue/chunks/UiRadioGroup.js +1 -1
  102. package/vue/chunks/UiReel.js +1 -1
  103. package/vue/chunks/UiScrollArea.js +1 -1
  104. package/vue/chunks/UiSearchResultRow.js +1 -1
  105. package/vue/chunks/UiSearchShell.js +1 -1
  106. package/vue/chunks/UiSection.js +1 -1
  107. package/vue/chunks/UiSelect.js +1 -1
  108. package/vue/chunks/UiSeparator.js +1 -1
  109. package/vue/chunks/UiSidebar.js +1 -1
  110. package/vue/chunks/UiSkeleton.js +151 -0
  111. package/vue/chunks/UiSlider.js +1 -1
  112. package/vue/chunks/UiSpinner.js +1 -1
  113. package/vue/chunks/UiStack.js +1 -1
  114. package/vue/chunks/UiStatusMessage.js +1 -1
  115. package/vue/chunks/UiSwatch.js +1 -1
  116. package/vue/chunks/UiSwitch.js +1 -1
  117. package/vue/chunks/UiSwitcher.js +1 -1
  118. package/vue/chunks/UiTable.js +1 -1
  119. package/vue/chunks/UiTabs.js +1 -1
  120. package/vue/chunks/UiText.js +1 -1
  121. package/vue/chunks/UiTextarea.js +1 -1
  122. package/vue/chunks/UiToast.js +1 -1
  123. package/vue/chunks/UiToastRegion.js +1 -1
  124. package/vue/chunks/UiTooltip.js +1 -1
  125. package/vue/chunks/UiTopBar.js +1 -1
  126. package/vue/chunks/UiTree.js +1 -1
  127. package/vue/chunks/UiTreeItem.js +1 -1
  128. package/vue/chunks/_plugin-vue_export-helper.js +27 -2
  129. package/vue/components.css +93 -0
  130. package/vue/editor/index.js +139 -35
  131. package/vue/index.d.ts +2 -0
  132. package/vue/index.js +3 -1
@@ -0,0 +1,91 @@
1
+ /* Generated by HTML Next 1.0.0-alpha.69. Do not edit. */
2
+ @supports (-moz-appearance: none) {
3
+ :where([data-component], [data-slotted]) { --html-next-scope-owner: boundary; }
4
+ :where([data-slotted]:not([data-component])) { --html-next-scope-owner: projected !important; }
5
+ }
6
+ @supports (-moz-appearance: none) {
7
+ [data-component~="ui-skeleton"] { --html-next-scope-owner: "ui-skeleton" !important; }
8
+ }
9
+ @scope ([data-component~="ui-skeleton"]) to ([data-component], [data-slotted]) {
10
+ /* Dimensions belong to this placeholder, never a nested or neighbouring one. */
11
+ @property --ui-skeleton-width {
12
+ syntax: "*";
13
+ inherits: false;
14
+ }
15
+ @property --ui-skeleton-height {
16
+ syntax: "*";
17
+ inherits: false;
18
+ }
19
+
20
+ :scope:where([data-component~="ui-skeleton"]) {
21
+ display: block !important;
22
+ position: relative;
23
+ box-sizing: border-box !important;
24
+ flex: none;
25
+ min-inline-size: 0;
26
+ max-inline-size: 100%;
27
+ inline-size: var(--ui-skeleton-width, 100%);
28
+ block-size: var(--ui-skeleton-height, 1lh);
29
+ margin: 0 !important;
30
+ font: inherit;
31
+ }
32
+
33
+ :scope:where([data-component~="ui-skeleton"])::before {
34
+ content: "";
35
+ position: absolute;
36
+ inset: 0;
37
+ border-radius: var(--ui-radius-sm);
38
+ background: color-mix(in srgb, var(--ui-text-primary) 16%, transparent);
39
+ }
40
+
41
+ :scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="shape=text"]::before {
42
+ inset-block: 22%;
43
+ }
44
+
45
+ :scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="shape=circle"] {
46
+ inline-size: var(--ui-skeleton-width, calc(2.5rem + 2 * var(--ui-border-width)));
47
+ block-size: var(--ui-skeleton-height, auto);
48
+ aspect-ratio: 1;
49
+ }
50
+ :scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="shape=circle"]::before {
51
+ border-radius: var(--ui-radius-round);
52
+ }
53
+
54
+ :scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="shape=rectangle"] {
55
+ block-size: var(--ui-skeleton-height, 8rem);
56
+ }
57
+ :scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="shape=rectangle"]::before {
58
+ border-radius: var(--ui-radius-md);
59
+ }
60
+
61
+ :scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="animated"]::before {
62
+ animation: ui-skeleton-pulse 1.6s ease-in-out infinite;
63
+ }
64
+ @keyframes ui-skeleton-pulse {
65
+ 50% {
66
+ opacity: 0.45;
67
+ }
68
+ }
69
+ @media (prefers-reduced-motion: reduce) {
70
+ :scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="animated"]::before {
71
+ animation: none;
72
+ }
73
+ }
74
+ @media (forced-colors: active) {
75
+ :scope:where([data-component~="ui-skeleton"])::before {
76
+ background: CanvasText;
77
+ opacity: 0.2;
78
+ animation: none;
79
+ }
80
+ }
81
+ :scope:where([data-component~="ui-skeleton"])[hidden] {
82
+ display: none !important;
83
+ }
84
+ }
85
+ @scope ([data-component~="ui-skeleton"]) to ([data-component]) {
86
+ /* Dimensions belong to this placeholder, never a nested or neighbouring one. */
87
+ @media (prefers-reduced-motion: reduce) {
88
+ }
89
+ @media (forced-colors: active) {
90
+ }
91
+ }
@@ -20,6 +20,7 @@ export interface UiButtonProps {
20
20
  rel?: string | null;
21
21
  shape?: "rounded" | "pill" | null;
22
22
  size?: "xs" | "sm" | "md" | "lg" | null;
23
+ square?: boolean | null;
23
24
  stretch?: boolean | null;
24
25
  target?: string | null;
25
26
  tone?: "accent" | "neutral" | "danger" | "success" | "warning" | "info" | null;
@@ -25,20 +25,20 @@ const T18 = ["",[]];
25
25
  const T19 = ["",[]];
26
26
  let P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19;
27
27
  const S = { n: ["appearance","colorTone"], t: ["?","?"], f: import.meta.url, g: "ui-button", k: 0, r: readonlyView, a: (host, I) => C(host, I), b: generatedInputs };
28
- const A = [["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","type","disabled","aria-disabled","aria-busy"]],["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","type","disabled","aria-disabled","aria-busy"]]];
28
+ const A = [["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","type","disabled","aria-disabled","aria-busy"]],["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-as","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","type","disabled","aria-disabled","aria-busy"]]];
29
29
  const Q = [[],[],[],[]];
30
- const D = { g: "ui-button", props: { "align": { "required":false,"values":["center","start"],"default":"center", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "as": { "required":false,"values":["button","a"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "href": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "loading": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "pending": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "preset": { "required":false,"values":["none","primary","standard","quiet","destructive"],"default":"none", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "rel": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "shape": { "required":false,"values":["rounded","pill"],"default":"rounded", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "stretch": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "target": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "tone": { "required":false,"values":["accent","neutral","danger","success","warning","info"],"default":"accent", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "type": { "required":false,"values":["button","submit","reset"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outline","solid","danger","ghost","link","card","field"],"default":"outline", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
30
+ const D = { g: "ui-button", props: { "align": { "required":false,"values":["center","start"],"default":"center", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "as": { "required":false,"values":["button","a"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "href": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "loading": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "pending": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "preset": { "required":false,"values":["none","primary","standard","quiet","destructive"],"default":"none", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "rel": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "shape": { "required":false,"values":["rounded","pill"],"default":"rounded", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "square": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "stretch": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "target": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "tone": { "required":false,"values":["accent","neutral","danger","success","warning","info"],"default":"accent", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "type": { "required":false,"values":["button","submit","reset"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outline","solid","danger","ghost","link","card","field"],"default":"outline", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
31
31
  const C = (host) => activateModule(controller, host);
32
32
 
33
33
  export function createUiButton(options = {}, html) {
34
34
  const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
35
- const v = [undefined, undefined, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
35
+ const v = [undefined, undefined, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
36
36
  let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
37
37
  const CS = [];
38
- const inputStatus = (j) => { if (j >= 0 && j < 2) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 2) return awaitInput(B, "align", true); if (j === 3) return awaitInput(B, "as", true); if (j === 4) return awaitInput(B, "disabled", true); if (j === 5) return awaitInput(B, "href", true); if (j === 6) return awaitInput(B, "loading", true); if (j === 7) return awaitInput(B, "pending", true); if (j === 8) return awaitInput(B, "preset", true); if (j === 9) return awaitInput(B, "rel", true); if (j === 10) return awaitInput(B, "shape", true); if (j === 11) return awaitInput(B, "size", true); if (j === 12) return awaitInput(B, "stretch", true); if (j === 13) return awaitInput(B, "target", true); if (j === 14) return awaitInput(B, "tone", true); if (j === 15) return awaitInput(B, "type", true); if (j === 16) return awaitInput(B, "variant", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
38
+ const inputStatus = (j) => { if (j >= 0 && j < 2) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 2) return awaitInput(B, "align", true); if (j === 3) return awaitInput(B, "as", true); if (j === 4) return awaitInput(B, "disabled", true); if (j === 5) return awaitInput(B, "href", true); if (j === 6) return awaitInput(B, "loading", true); if (j === 7) return awaitInput(B, "pending", true); if (j === 8) return awaitInput(B, "preset", true); if (j === 9) return awaitInput(B, "rel", true); if (j === 10) return awaitInput(B, "shape", true); if (j === 11) return awaitInput(B, "size", true); if (j === 12) return awaitInput(B, "square", true); if (j === 13) return awaitInput(B, "stretch", true); if (j === 14) return awaitInput(B, "target", true); if (j === 15) return awaitInput(B, "tone", true); if (j === 16) return awaitInput(B, "type", true); if (j === 17) return awaitInput(B, "variant", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
39
39
  const X = { e: 0, g: (j) => g(j), w: new Set(), a: CS, i: inputStatus };
40
40
  const ke = [];
41
- const K = [() => readIndex({ "none": inputRead(v[16], inputStatus(16)), "primary": "solid", "standard": "solid", "quiet": "ghost", "destructive": "solid" }, inputRead(v[8], inputStatus(8))), () => readIndex(recordValue(["none","primary","standard","quiet","destructive"], [readIndex({ "true": "danger", "false": inputRead(v[14], inputStatus(14)) }, textCall("concat", [(inputRead(v[16], inputStatus(16)) === "danger")])), "accent", "neutral", "neutral", "danger"]), inputRead(v[8], inputStatus(8)))];
41
+ const K = [() => readIndex({ "none": inputRead(v[17], inputStatus(17)), "primary": "solid", "standard": "solid", "quiet": "ghost", "destructive": "solid" }, inputRead(v[8], inputStatus(8))), () => readIndex(recordValue(["none","primary","standard","quiet","destructive"], [readIndex({ "true": "danger", "false": inputRead(v[15], inputStatus(15)) }, textCall("concat", [(inputRead(v[17], inputStatus(17)) === "danger")])), "accent", "neutral", "neutral", "danger"]), inputRead(v[8], inputStatus(8)))];
42
42
  const g = (j) => {
43
43
  const i = j - 0;
44
44
  if (ke[i] === X.e) return v[j];
@@ -233,12 +233,12 @@ export function createUiButton(options = {}, html) {
233
233
  return r;
234
234
  };
235
235
  const p0 = (r, c, d) => {
236
- if (c & 1073807616) {
236
+ if (c & 1073873152) {
237
237
  const x0 = g(0);
238
238
  const s0 = toAttribute(x0, "data-appearance");
239
239
  if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
240
240
  }
241
- if (c & 1073824000) {
241
+ if (c & 1073905920) {
242
242
  const x1 = g(1);
243
243
  if (x1 !== NONCONFORMING) {
244
244
  const s1 = toAttribute(x1, "data-tone");
@@ -252,8 +252,8 @@ export function createUiButton(options = {}, html) {
252
252
  if (s2 !== r.v2) writeUrlAttribute(r.n, "href", r.v2 = s2);
253
253
  }
254
254
  }
255
- if (c & 8192) {
256
- const x3 = v[13];
255
+ if (c & 16384) {
256
+ const x3 = v[14];
257
257
  const s3 = toAttribute(x3, "target");
258
258
  if (s3 !== r.v3) writeAttribute(r.n, "target", r.v3 = s3);
259
259
  }
@@ -281,8 +281,8 @@ export function createUiButton(options = {}, html) {
281
281
  if (s7 !== r.v7) writeAttribute(r.n, "tabindex", r.v7 = s7);
282
282
  }
283
283
  }
284
- if (c & 7364) {
285
- const x8 = hostState(["align","stretch","size","shape","loading","pending"], [v[2], v[12], v[11], v[10], v[6], v[7]]);
284
+ if (c & 15556) {
285
+ const x8 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[13], v[11], v[10], v[12], v[6], v[7]]);
286
286
  const s8 = x8;
287
287
  if (s8 !== r.v8) writeAttribute(r.n, "data-ui-button-state", (r.v8 = s8) === "" ? null : s8);
288
288
  }
@@ -315,20 +315,20 @@ export function createUiButton(options = {}, html) {
315
315
  return r;
316
316
  };
317
317
  const p6 = (r, c, d) => {
318
- if (c & 1073807616) {
318
+ if (c & 1073873152) {
319
319
  const x0 = g(0);
320
320
  const s0 = toAttribute(x0, "data-appearance");
321
321
  if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
322
322
  }
323
- if (c & 1073824000) {
323
+ if (c & 1073905920) {
324
324
  const x1 = g(1);
325
325
  if (x1 !== NONCONFORMING) {
326
326
  const s1 = toAttribute(x1, "data-tone");
327
327
  if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
328
328
  }
329
329
  }
330
- if (c & 1073774592) {
331
- const x2 = v[15];
330
+ if (c & 1073807360) {
331
+ const x2 = v[16];
332
332
  const s2 = toAttribute(x2, "type");
333
333
  if (s2 !== r.v2) writeAttribute(r.n, "type", r.v2 = s2);
334
334
  }
@@ -349,8 +349,8 @@ export function createUiButton(options = {}, html) {
349
349
  const s5 = toAttribute(x5, "aria-busy");
350
350
  if (s5 !== r.v5) writeAttribute(r.n, "aria-busy", r.v5 = s5);
351
351
  }
352
- if (c & 7364) {
353
- const x6 = hostState(["align","stretch","size","shape","loading","pending"], [v[2], v[12], v[11], v[10], v[6], v[7]]);
352
+ if (c & 15556) {
353
+ const x6 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[13], v[11], v[10], v[12], v[6], v[7]]);
354
354
  const s6 = x6;
355
355
  if (s6 !== r.v6) writeAttribute(r.n, "data-ui-button-state", (r.v6 = s6) === "" ? null : s6);
356
356
  }
@@ -379,12 +379,12 @@ export function createUiButton(options = {}, html) {
379
379
  return r;
380
380
  };
381
381
  const p12 = (r, c, d) => {
382
- if (c & 1073807616) {
382
+ if (c & 1073873152) {
383
383
  const x0 = g(0);
384
384
  const s0 = toAttribute(x0, "data-appearance");
385
385
  if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
386
386
  }
387
- if (c & 1073824000) {
387
+ if (c & 1073905920) {
388
388
  const x1 = g(1);
389
389
  if (x1 !== NONCONFORMING) {
390
390
  const s1 = toAttribute(x1, "data-tone");
@@ -398,8 +398,8 @@ export function createUiButton(options = {}, html) {
398
398
  if (s2 !== r.v2) writeUrlAttribute(r.n, "href", r.v2 = s2);
399
399
  }
400
400
  }
401
- if (c & 8192) {
402
- const x3 = v[13];
401
+ if (c & 16384) {
402
+ const x3 = v[14];
403
403
  const s3 = toAttribute(x3, "target");
404
404
  if (s3 !== r.v3) writeAttribute(r.n, "target", r.v3 = s3);
405
405
  }
@@ -427,8 +427,8 @@ export function createUiButton(options = {}, html) {
427
427
  if (s7 !== r.v7) writeAttribute(r.n, "tabindex", r.v7 = s7);
428
428
  }
429
429
  }
430
- if (c & 7364) {
431
- const x8 = hostState(["align","stretch","size","shape","loading","pending"], [v[2], v[12], v[11], v[10], v[6], v[7]]);
430
+ if (c & 15556) {
431
+ const x8 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[13], v[11], v[10], v[12], v[6], v[7]]);
432
432
  const s8 = x8;
433
433
  if (s8 !== r.v8) writeAttribute(r.n, "data-ui-button-state", (r.v8 = s8) === "" ? null : s8);
434
434
  }
@@ -453,20 +453,20 @@ export function createUiButton(options = {}, html) {
453
453
  return r;
454
454
  };
455
455
  const p16 = (r, c, d) => {
456
- if (c & 1073807616) {
456
+ if (c & 1073873152) {
457
457
  const x0 = g(0);
458
458
  const s0 = toAttribute(x0, "data-appearance");
459
459
  if (s0 !== r.v0) writeAttribute(r.n, "data-appearance", r.v0 = s0);
460
460
  }
461
- if (c & 1073824000) {
461
+ if (c & 1073905920) {
462
462
  const x1 = g(1);
463
463
  if (x1 !== NONCONFORMING) {
464
464
  const s1 = toAttribute(x1, "data-tone");
465
465
  if (s1 !== r.v1) writeAttribute(r.n, "data-tone", r.v1 = s1);
466
466
  }
467
467
  }
468
- if (c & 1073774592) {
469
- const x2 = v[15];
468
+ if (c & 1073807360) {
469
+ const x2 = v[16];
470
470
  const s2 = toAttribute(x2, "type");
471
471
  if (s2 !== r.v2) writeAttribute(r.n, "type", r.v2 = s2);
472
472
  }
@@ -487,8 +487,8 @@ export function createUiButton(options = {}, html) {
487
487
  const s5 = toAttribute(x5, "aria-busy");
488
488
  if (s5 !== r.v5) writeAttribute(r.n, "aria-busy", r.v5 = s5);
489
489
  }
490
- if (c & 7364) {
491
- const x6 = hostState(["align","stretch","size","shape","loading","pending"], [v[2], v[12], v[11], v[10], v[6], v[7]]);
490
+ if (c & 15556) {
491
+ const x6 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[2], v[13], v[11], v[10], v[12], v[6], v[7]]);
492
492
  const s6 = x6;
493
493
  if (s6 !== r.v6) writeAttribute(r.n, "data-ui-button-state", (r.v6 = s6) === "" ? null : s6);
494
494
  }
@@ -508,7 +508,7 @@ export function createUiButton(options = {}, html) {
508
508
  const p = (c, d) => {
509
509
  if (R === null) return;
510
510
  if (R === undefined) { R = M[a](element, d); return; }
511
- if (c & 1073807624) {
511
+ if (c & 1073873160) {
512
512
  const t = (((g(0) === "card") && (v[3] === "a")) ? 0 : (g(0) === "card") ? 1 : (v[3] === "a") ? 2 : 3);
513
513
  if (t !== a) {
514
514
  dispose(R);
@@ -530,4 +530,4 @@ export function createUiButton(options = {}, html) {
530
530
  manageProps(I);
531
531
  return element;
532
532
  }
533
- defineComponent("ui-button", createUiButton, ["align","as","disabled","href","loading","pending","preset","rel","shape","size","stretch","target","tone","type","variant"]);
533
+ defineComponent("ui-button", createUiButton, ["align","as","disabled","href","loading","pending","preset","rel","shape","size","square","stretch","target","tone","type","variant"]);
@@ -0,0 +1,35 @@
1
+ // Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
2
+ export interface UiPaginationEventMap {
3
+ navigate: CustomEvent<{ readonly page: number; readonly previousPage: number; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
4
+ }
5
+ export interface UiPaginationElement extends HTMLElement {
6
+ addEventListener<K extends keyof UiPaginationEventMap>(type: K, listener: (this: UiPaginationElement, event: UiPaginationEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
7
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiPaginationElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
8
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
9
+ removeEventListener<K extends keyof UiPaginationEventMap>(type: K, listener: (this: UiPaginationElement, event: UiPaginationEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
10
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiPaginationElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
11
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
12
+ }
13
+ export interface UiPaginationProps {
14
+ disabled?: boolean | null;
15
+ hasNext?: boolean | null;
16
+ hasPrevious?: boolean | null;
17
+ label?: string | null;
18
+ nextHref?: string | null;
19
+ nextLabel?: string | null;
20
+ page?: number | null;
21
+ pageLabel?: string | null;
22
+ pages?: readonly ({ readonly value: number; readonly href?: string | null })[] | null;
23
+ previousHref?: string | null;
24
+ previousLabel?: string | null;
25
+ size?: "sm" | "md" | "lg" | null;
26
+ attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
27
+ children?: readonly (string | Node)[];
28
+ slots?: Readonly<Record<string, readonly (string | Node)[]>>;
29
+ }
30
+ export declare function createUiPagination(props?: UiPaginationProps): UiPaginationElement;
31
+ declare global {
32
+ interface ComponentTagMap {
33
+ "ui-pagination": { element: UiPaginationElement; props: Omit<UiPaginationProps, "attributes" | "children" | "slots"> };
34
+ }
35
+ }
@@ -0,0 +1,202 @@
1
+ // Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, binaryValue, buildTemplate, clearRegion, defaultValue, formatCall, NONCONFORMING, readIndex, readMember, textCall, toAttribute, toText, trackContainer, truthy, writeAttribute, writeUrlAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, project, fillSlot, RangedPositionalList, checkBoolean, checkConstrained, checkFormat, checkList, checkNumber, checkObject, checkString, defineComponent, activateModule, add, subtract } from "@nextwebwg/html-next/generated-runtime";
3
+ import * as controller from "../components/ui-pagination/ui-pagination.js";
4
+ import "../styles/ui-pagination.css";
5
+
6
+ const T0 = ["",[],"\n ",["ui-cluster",["gap","xs"],["ui-button",["square","","variant","ghost","tone","neutral"],["ui-icon",["name","chevron-left"]]],"\n ",2,"\n ",["ui-button",["square","","variant","ghost","tone","neutral"],["ui-icon",["name","chevron-right"]]],"\n ",4],"\n "];
7
+ const T1 = ["",[],"\n ",1,"\n ",["ui-button",["square",""],0],"\n "];
8
+ const T2 = ["span",["aria-hidden","true"],"…"];
9
+ const T3 = ["",[]];
10
+ let P0, P1, P2, P3;
11
+ const E = new Map();
12
+ const S = { n: [], t: [], f: import.meta.url, g: "ui-pagination", d: { "navigate": [detailCheck(checkObject([["page", checkNumber, false], ["previousPage", checkNumber, false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["keyboard","pointer","programmatic"]}), false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs };
13
+ const D = { g: "ui-pagination", props: { "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "hasNext": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "hasPrevious": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "label": { "required":false,"default":"Results pages", c: checkString, t: "string", j: 0, m: "s" }, "nextHref": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "nextLabel": { "required":false,"default":"Next", c: checkString, t: "string", j: 0, m: "s" }, "page": { "required":false,"default":1, c: checkNumber, t: "number", j: 0, m: "n" }, "pageLabel": { "required":false,"default":"Page", c: checkString, t: "string", j: 0, m: "s" }, "pages": { "required":false,"default":[], c: checkList(checkObject([["value", checkNumber, false], ["href", checkString, true]], false)), j: 1, m: ["l",["o",["value","n","href","s"]]] }, "previousHref": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "previousLabel": { "required":false,"default":"Previous", c: checkString, t: "string", j: 0, m: "s" }, "size": { "required":false,"values":["sm","md","lg"],"default":"sm", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
14
+ const C = (host) => activateModule(controller, host);
15
+
16
+ export function createUiPagination(options = {}, html) {
17
+ const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
18
+ const element = document.createElement("nav");
19
+ for (const [name, value] of Object.entries(attributes)) {
20
+ if (value === null || value === undefined || value === false) continue;
21
+ element.setAttribute(name, value === true ? "" : String(value));
22
+ }
23
+ element.setAttribute("data-component", "ui-pagination");
24
+ element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
25
+ const v = [null, null, null, null, null, null, null, null, null, null, null, null];
26
+ const B = acceptProps(element, D, S.n, v, componentProps, [], html);
27
+ const m1 = (o, j, l) => {
28
+ const n = (P1 ??= buildTemplate(T1)).cloneNode(true);
29
+ const t0 = n.firstChild.nextSibling;
30
+ const t1 = t0.nextSibling.nextSibling.nextSibling;
31
+ const t2 = t1.firstChild;
32
+ const s = document.createComment("html-next:item-start"), t = document.createComment("html-next:item-end");
33
+ n.prepend(s);
34
+ n.append(t);
35
+ const r = { k: undefined, i: o, n: s, t, x: 0, y: 0, j, l, a1: t1, a2: t2, w: 0, v0: null, v1: null, v2: null, v3: null, v4: null, v5: null, v6: null, v7: null, v8: null, v9: "", a0: t0, e0: t0.nextSibling, b0: undefined };
36
+ p1(r, -1, E);
37
+ return r;
38
+ };
39
+ const p1 = (r, c, d) => {
40
+ const o = r.i;
41
+ if (c & 1073741824) r.w = 0;
42
+ if (c & 1073741888) {
43
+ const x0 = trackContainer(r, readIndex({ "true": "solid", "false": "ghost" }, textCall("concat", [(readMember(o, "value") === v[6])])));
44
+ if (x0 !== NONCONFORMING) {
45
+ const s0 = toAttribute(x0, "variant");
46
+ if (s0 !== r.v0) writeAttribute(r.a1, "variant", r.v0 = s0);
47
+ }
48
+ const x1 = trackContainer(r, readIndex({ "true": "accent", "false": "neutral" }, textCall("concat", [(readMember(o, "value") === v[6])])));
49
+ if (x1 !== NONCONFORMING) {
50
+ const s1 = toAttribute(x1, "tone");
51
+ if (s1 !== r.v1) writeAttribute(r.a1, "tone", r.v1 = s1);
52
+ }
53
+ }
54
+ if (c & 1073743872) {
55
+ const x2 = v[11];
56
+ const s2 = toAttribute(x2, "size");
57
+ if (s2 !== r.v2) writeAttribute(r.a1, "size", r.v2 = s2);
58
+ }
59
+ if (c & 1) {
60
+ const x3 = v[0];
61
+ const s3 = toAttribute(x3, "disabled");
62
+ if (s3 !== r.v3) writeAttribute(r.a1, "disabled", r.v3 = s3);
63
+ }
64
+ if (c & 1073741824) {
65
+ const x4 = trackContainer(r, readIndex({ "true": "a", "false": "button" }, textCall("concat", [(defaultValue(readMember(o, "href"), "") !== "")])));
66
+ if (x4 !== NONCONFORMING) {
67
+ const s4 = toAttribute(x4, "as");
68
+ if (s4 !== r.v4) writeAttribute(r.a1, "as", r.v4 = s4);
69
+ }
70
+ const x5 = trackContainer(r, readMember(o, "href"));
71
+ const s5 = toAttribute(x5, "href");
72
+ if (s5 !== r.v5) writeUrlAttribute(r.a1, "href", r.v5 = s5);
73
+ const x6 = trackContainer(r, readMember(o, "value"));
74
+ const s6 = toAttribute(x6, "data-pagination-page");
75
+ if (s6 !== r.v6) writeAttribute(r.a1, "data-pagination-page", r.v6 = s6);
76
+ const x7 = formatCall("format", [trackContainer(r, readMember(o, "value")), "number"], "number");
77
+ if (x7 !== NONCONFORMING) {
78
+ const s9 = toText(x7);
79
+ if (s9 !== r.v9) r.a2.data = r.v9 = s9;
80
+ }
81
+ }
82
+ if (c & 1073741952) {
83
+ const x8 = textCall("concat", [v[7], " ", formatCall("format", [trackContainer(r, readMember(o, "value")), "number"], "number")]);
84
+ if (x8 !== NONCONFORMING) {
85
+ const s7 = toAttribute(x8, "aria-label");
86
+ if (s7 !== r.v7) writeAttribute(r.a1, "aria-label", r.v7 = s7);
87
+ }
88
+ }
89
+ if (c & 1073741888) {
90
+ const x9 = trackContainer(r, readIndex({ "true": "page", "false": null }, textCall("concat", [(readMember(o, "value") === v[6])])));
91
+ if (x9 !== NONCONFORMING) {
92
+ const s8 = toAttribute(x9, "aria-current");
93
+ if (s8 !== r.v8) writeAttribute(r.a1, "aria-current", r.v8 = s8);
94
+ }
95
+ }
96
+ if (c & -1073741568 && !((truthy(binaryValue(">", r.j, 0)) && truthy(binaryValue(">", readMember(o, "value"), binaryValue("+", readMember(readIndex(v[8], binaryValue("-", r.j, 1, undefined, undefined, subtract)), "value"), 1, undefined, undefined, add))))) !== !r.b0) {
97
+ if (r.b0) { r.b0 = undefined; clearRegion(r.a0, r.e0); }
98
+ else { r.b0 = m2(d); r.e0.before(r.b0.n); }
99
+ } else if (r.b0 !== undefined) p2(r.b0, c, d);
100
+ };
101
+ const m2 = (d) => {
102
+ const n = (P2 ??= buildTemplate(T2)).cloneNode(true);
103
+ const r = { n };
104
+ p2(r, -1, d);
105
+ return r;
106
+ };
107
+ const p2 = (r, c, d) => {
108
+ };
109
+ const m3 = (d) => {
110
+ const n = (P3 ??= buildTemplate(T3)).cloneNode(true);
111
+ const r = { n };
112
+ p3(r, -1, d);
113
+ return r;
114
+ };
115
+ const p3 = (r, c, d) => {
116
+ };
117
+ const p0 = (r, c, d) => {
118
+ if (c & 8) {
119
+ const x0 = v[3];
120
+ const s0 = toAttribute(x0, "aria-label");
121
+ if (s0 !== r.v0) writeAttribute(r.n, "aria-label", r.v0 = s0);
122
+ }
123
+ if (c & 1073743872) {
124
+ const x1 = v[11];
125
+ const s1 = toAttribute(x1, "size");
126
+ if (s1 !== r.v1) writeAttribute(r.a1, "size", r.v1 = s1);
127
+ const s7 = toAttribute(x1, "size");
128
+ if (s7 !== r.v7) writeAttribute(r.a3, "size", r.v7 = s7);
129
+ }
130
+ if (c & 69) {
131
+ const x2 = ((truthy(v[0]) || !truthy(v[2])) || truthy(binaryValue("<=", v[6], 1)));
132
+ const s2 = toAttribute(x2, "disabled");
133
+ if (s2 !== r.v2) writeAttribute(r.a1, "disabled", r.v2 = s2);
134
+ }
135
+ if (c & 1073742336) {
136
+ const x3 = readIndex({ "true": "a", "false": "button" }, textCall("concat", [(v[9] !== "")]));
137
+ if (x3 !== NONCONFORMING) {
138
+ const s3 = toAttribute(x3, "as");
139
+ if (s3 !== r.v3) writeAttribute(r.a1, "as", r.v3 = s3);
140
+ }
141
+ }
142
+ if (c & 512) {
143
+ const x4 = v[9];
144
+ const s4 = toAttribute(x4, "href");
145
+ if (s4 !== r.v4) writeUrlAttribute(r.a1, "href", r.v4 = s4);
146
+ }
147
+ if (c & 1024) {
148
+ const x5 = v[10];
149
+ const s5 = toAttribute(x5, "aria-label");
150
+ if (s5 !== r.v5) writeAttribute(r.a1, "aria-label", r.v5 = s5);
151
+ }
152
+ if (c & 64) {
153
+ const x6 = binaryValue("-", v[6], 1, undefined, undefined, subtract);
154
+ const s6 = toAttribute(x6, "data-pagination-page");
155
+ if (s6 !== r.v6) writeAttribute(r.a1, "data-pagination-page", r.v6 = s6);
156
+ }
157
+ if (c & 3) {
158
+ const x7 = (truthy(v[0]) || !truthy(v[1]));
159
+ const s8 = toAttribute(x7, "disabled");
160
+ if (s8 !== r.v8) writeAttribute(r.a3, "disabled", r.v8 = s8);
161
+ }
162
+ if (c & 1073741840) {
163
+ const x8 = readIndex({ "true": "a", "false": "button" }, textCall("concat", [(v[4] !== "")]));
164
+ if (x8 !== NONCONFORMING) {
165
+ const s9 = toAttribute(x8, "as");
166
+ if (s9 !== r.v9) writeAttribute(r.a3, "as", r.v9 = s9);
167
+ }
168
+ }
169
+ if (c & 16) {
170
+ const x9 = v[4];
171
+ const s10 = toAttribute(x9, "href");
172
+ if (s10 !== r.v10) writeUrlAttribute(r.a3, "href", r.v10 = s10);
173
+ }
174
+ if (c & 32) {
175
+ const x10 = v[5];
176
+ const s11 = toAttribute(x10, "aria-label");
177
+ if (s11 !== r.v11) writeAttribute(r.a3, "aria-label", r.v11 = s11);
178
+ }
179
+ if (c & 64) {
180
+ const x11 = binaryValue("+", v[6], 1, undefined, undefined, add);
181
+ const s12 = toAttribute(x11, "data-pagination-page");
182
+ if (s12 !== r.v12) writeAttribute(r.a3, "data-pagination-page", r.v12 = s12);
183
+ }
184
+ if (c & 1073742080) r.L0.update(v[8], d, c);
185
+ if (c !== -1 && c & 1073744321) r.L0.each(c, d);
186
+ if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a4, r.e1, "", J, false, undefined, d);
187
+ if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m3(d); at.before(r.b1.n); } }
188
+ else if (r.b1 !== undefined) p3(r.b1, c, d);
189
+ };
190
+ const t0 = element.firstChild.nextSibling;
191
+ const t1 = t0.firstChild;
192
+ const t2 = t1.nextSibling.nextSibling;
193
+ const t3 = t2.nextSibling.nextSibling.nextSibling;
194
+ const t4 = t3.nextSibling.nextSibling;
195
+ const R = { n: element, a1: t1, a3: t3, 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, L0: new RangedPositionalList(t2, t2.nextSibling, m1, p1, (o) => readMember(o, "value"), "item"), a4: t4, e1: t4.nextSibling, b1: undefined, f1: undefined };
196
+ const I = { B };
197
+ const J = project(I, children, slots);
198
+ attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
199
+ manageProps(I);
200
+ return element;
201
+ }
202
+ defineComponent("ui-pagination", createUiPagination, ["disabled","hasNext","hasPrevious","label","nextHref","nextLabel","page","pageLabel","pages","previousHref","previousLabel","size"]);
@@ -0,0 +1,26 @@
1
+ // Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
2
+ export interface UiSkeletonEventMap {
3
+ }
4
+ export interface UiSkeletonElement extends HTMLSpanElement {
5
+ addEventListener<K extends keyof UiSkeletonEventMap>(type: K, listener: (this: UiSkeletonElement, event: UiSkeletonEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
6
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiSkeletonElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
7
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
8
+ removeEventListener<K extends keyof UiSkeletonEventMap>(type: K, listener: (this: UiSkeletonElement, event: UiSkeletonEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
9
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiSkeletonElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
10
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
11
+ }
12
+ export interface UiSkeletonProps {
13
+ animated?: boolean | null;
14
+ height?: string | null;
15
+ shape?: "text" | "circle" | "rectangle" | null;
16
+ width?: string | null;
17
+ attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
18
+ children?: readonly (string | Node)[];
19
+ slots?: Readonly<Record<string, readonly (string | Node)[]>>;
20
+ }
21
+ export declare function createUiSkeleton(props?: UiSkeletonProps): UiSkeletonElement;
22
+ declare global {
23
+ interface ComponentTagMap {
24
+ "ui-skeleton": { element: UiSkeletonElement; props: Omit<UiSkeletonProps, "attributes" | "children" | "slots"> };
25
+ }
26
+ }
@@ -0,0 +1,42 @@
1
+ // Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, toText, writeAttribute, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, checkBoolean, checkFormat, checkString, defineComponent } from "@nextwebwg/html-next/generated-runtime";
3
+ import "../styles/ui-skeleton.css";
4
+
5
+ const S = { n: [], t: [], f: import.meta.url, g: "ui-skeleton", b: generatedInputs };
6
+ const D = { g: "ui-skeleton", props: { "animated": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "height": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "shape": { "required":false,"values":["text","circle","rectangle"],"default":"text", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "width": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" } } };
7
+
8
+ export function createUiSkeleton(options = {}, html) {
9
+ const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
10
+ const element = document.createElement("span");
11
+ for (const [name, value] of Object.entries(attributes)) {
12
+ if (value === null || value === undefined || value === false) continue;
13
+ element.setAttribute(name, value === true ? "" : String(value));
14
+ }
15
+ if (!element.hasAttribute("aria-hidden")) element.setAttribute("aria-hidden", "true");
16
+ element.setAttribute("data-component", "ui-skeleton");
17
+ const v = [null, null, null, null];
18
+ const B = acceptProps(element, D, S.n, v, componentProps, [], html);
19
+ const p0 = (r, c, d) => {
20
+ if (c & 8) {
21
+ const x0 = v[3];
22
+ const s0 = toText(x0);
23
+ if (s0 !== r.v0) r.n.style.setProperty("--ui-skeleton-width", r.v0 = s0);
24
+ }
25
+ if (c & 2) {
26
+ const x1 = v[1];
27
+ const s1 = toText(x1);
28
+ if (s1 !== r.v1) r.n.style.setProperty("--ui-skeleton-height", r.v1 = s1);
29
+ }
30
+ if (c & 5) {
31
+ const x2 = hostState(["shape","animated"], [v[2], v[0]]);
32
+ const s2 = x2;
33
+ if (s2 !== r.v2) writeAttribute(r.n, "data-ui-skeleton-state", (r.v2 = s2) === "" ? null : s2);
34
+ }
35
+ };
36
+ const R = { n: element, v0: undefined, v1: undefined, v2: undefined };
37
+ const I = { B };
38
+ attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
39
+ manageProps(I);
40
+ return element;
41
+ }
42
+ defineComponent("ui-skeleton", createUiSkeleton, ["animated","height","shape","width"]);
package/vanilla/index.js CHANGED
@@ -59,6 +59,7 @@ export * from "./UiMeter.js";
59
59
  export * from "./UiNavItem.js";
60
60
  export * from "./UiNumberInput.js";
61
61
  export * from "./UiPageHeader.js";
62
+ export * from "./UiPagination.js";
62
63
  export * from "./UiPopover.js";
63
64
  export * from "./UiRadio.js";
64
65
  export * from "./UiRadioGroup.js";
@@ -70,6 +71,7 @@ export * from "./UiSection.js";
70
71
  export * from "./UiSelect.js";
71
72
  export * from "./UiSeparator.js";
72
73
  export * from "./UiSidebar.js";
74
+ export * from "./UiSkeleton.js";
73
75
  export * from "./UiSlider.js";
74
76
  export * from "./UiSpinner.js";
75
77
  export * from "./UiStack.js";