@threadlabs/looma 0.34.0 → 0.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/components/ui-badge/ui-badge.html +11 -3
  2. package/components/ui-button/ui-button.html +29 -4
  3. package/components/ui-card/ui-card.html +15 -13
  4. package/components/ui-checkbox/ui-checkbox.html +4 -2
  5. package/components/ui-dialog/ui-dialog.html +2 -0
  6. package/components/ui-icon-button/ui-icon-button.html +22 -8
  7. package/components/ui-input/ui-input.html +2 -1
  8. package/components/ui-input-group/ui-input-group.html +4 -1
  9. package/components/ui-light-editor/ui-light-editor.html +45 -0
  10. package/components/ui-light-editor/ui-light-editor.js +53 -0
  11. package/components/ui-menu/ui-menu.html +2 -0
  12. package/components/ui-number-input/ui-number-input.html +2 -1
  13. package/components/ui-number-input/ui-number-input.js +6 -3
  14. package/components/ui-popover/ui-popover.html +2 -0
  15. package/components/ui-reel/ui-reel.html +2 -1
  16. package/components/ui-select/ui-select.html +9 -7
  17. package/components/ui-switch/ui-switch.html +3 -0
  18. package/components/ui-tabs/ui-tabs.html +2 -3
  19. package/components/ui-tabs/ui-tabs.js +0 -9
  20. package/components/ui-textarea/ui-textarea.html +2 -1
  21. package/components/ui-tooltip/ui-tooltip.html +2 -1
  22. package/dist/index.js +24 -23
  23. package/docs/README.md +29 -3
  24. package/docs/card.html +7 -6
  25. package/docs/catalog-view.mjs +2 -1
  26. package/docs/catalog.json +575 -53
  27. package/docs/customizer-render.mjs +31 -16
  28. package/docs/customizer.js +72 -19
  29. package/docs/index.d.ts +4 -1
  30. package/docs/index.mjs +1 -1
  31. package/docs/render.mjs +1 -1
  32. package/docs/site.mjs +33 -22
  33. package/docs/theme-session.mjs +4 -2
  34. package/docs/theme.mjs +61 -7
  35. package/package.json +2 -2
  36. package/styles/ui-badge.css +11 -6
  37. package/styles/ui-button.css +29 -4
  38. package/styles/ui-card.css +9 -9
  39. package/styles/ui-checkbox.css +4 -2
  40. package/styles/ui-dialog.css +4 -0
  41. package/styles/ui-icon-button.css +22 -8
  42. package/styles/ui-input-group.css +4 -1
  43. package/styles/ui-input.css +2 -1
  44. package/styles/ui-light-editor.css +28 -0
  45. package/styles/ui-menu.css +2 -0
  46. package/styles/ui-popover.css +2 -0
  47. package/styles/ui-select.css +9 -7
  48. package/styles/ui-switch.css +3 -0
  49. package/styles/ui-tabs.css +2 -3
  50. package/styles/ui-textarea.css +2 -1
  51. package/styles/ui-tooltip.css +2 -1
  52. package/theme-light.css +1 -0
  53. package/theme-system.css +43 -7
  54. package/tokens.css +5 -1
  55. package/vanilla/UiCard.d.ts +2 -1
  56. package/vanilla/UiCard.js +12 -12
  57. package/vanilla/UiLightEditor.d.ts +29 -0
  58. package/vanilla/UiLightEditor.js +102 -0
  59. package/vanilla/UiNumberInput.js +27 -20
  60. package/vanilla/index.js +1 -0
  61. package/vue/UiBadge.vue +29 -4
  62. package/vue/UiButton.vue +33 -4
  63. package/vue/UiCard.d.ts +8 -2
  64. package/vue/UiCard.vue +41 -17
  65. package/vue/UiCheckbox.vue +4 -2
  66. package/vue/UiDialog.vue +4 -0
  67. package/vue/UiIconButton.vue +26 -11
  68. package/vue/UiInput.vue +2 -1
  69. package/vue/UiInputGroup.vue +4 -1
  70. package/vue/UiLightEditor.d.ts +75 -0
  71. package/vue/UiLightEditor.js +2 -0
  72. package/vue/UiLightEditor.vue +402 -0
  73. package/vue/UiMenu.vue +2 -0
  74. package/vue/UiNumberInput.vue +32 -3
  75. package/vue/UiPopover.vue +2 -0
  76. package/vue/UiReel.vue +1 -1
  77. package/vue/UiSelect.vue +16 -10
  78. package/vue/UiSwitch.vue +3 -0
  79. package/vue/UiTabs.vue +2 -3
  80. package/vue/UiTextarea.vue +2 -1
  81. package/vue/UiTooltip.vue +2 -1
  82. package/vue/chunks/UiBadge.js +1 -1
  83. package/vue/chunks/UiButton.js +1 -1
  84. package/vue/chunks/UiCard.js +33 -5
  85. package/vue/chunks/UiCheckbox.js +1 -1
  86. package/vue/chunks/UiDialog.js +1 -1
  87. package/vue/chunks/UiIconButton.js +1 -1
  88. package/vue/chunks/UiInput.js +1 -1
  89. package/vue/chunks/UiInputGroup.js +1 -1
  90. package/vue/chunks/UiLightEditor.js +347 -0
  91. package/vue/chunks/UiMenu.js +1 -1
  92. package/vue/chunks/UiNumberInput.js +21 -8
  93. package/vue/chunks/UiPopover.js +1 -1
  94. package/vue/chunks/UiReel.js +2 -2
  95. package/vue/chunks/UiSelect.js +1 -1
  96. package/vue/chunks/UiSwitch.js +1 -1
  97. package/vue/chunks/UiTabs.js +1 -1
  98. package/vue/chunks/UiTextarea.js +1 -1
  99. package/vue/chunks/UiTooltip.js +1 -1
  100. package/vue/components.css +312 -71
  101. package/vue/index.d.ts +1 -0
  102. package/vue/index.js +2 -1
@@ -114,6 +114,7 @@
114
114
  border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-strong));
115
115
  border-radius: var(--ui-radius-round);
116
116
  background-color: var(--ui-control-surface, var(--ui-surface-default));
117
+ background-image: var(--ui-surface-highlight, none);
117
118
  box-shadow: var(--ui-control-inset);
118
119
  cursor: pointer;
119
120
  transition: background-color var(--ui-motion-base) var(--ui-motion-ease), border-color var(--ui-motion-base) var(--ui-motion-ease);
@@ -135,6 +136,7 @@
135
136
 
136
137
  input:checked {
137
138
  background-color: var(--ui-accent-solid);
139
+ background-image: var(--ui-accent-highlight, none);
138
140
  border-color: var(--ui-accent-solid);
139
141
  }
140
142
 
@@ -158,6 +160,7 @@
158
160
  :host([disabled]) input {
159
161
  border-color: var(--ui-disabled-border);
160
162
  background-color: var(--ui-disabled-surface);
163
+ background-image: none;
161
164
  box-shadow: none;
162
165
  cursor: not-allowed;
163
166
  }
@@ -98,10 +98,9 @@
98
98
  max-inline-size: 100%;
99
99
  /* Tabs that do not fit scroll sideways rather than wrapping or squeezing. */
100
100
  overflow-x: auto;
101
- /* overflow-x: auto would make the block axis scrollable too; a sideways swipe must not scroll the
102
- strip or the page vertically. */
101
+ /* Contain sideways overscroll without trapping vertical page scrolling. */
103
102
  overflow-y: hidden;
104
- overscroll-behavior: contain;
103
+ overscroll-behavior-inline: contain;
105
104
  scrollbar-width: thin;
106
105
  border-block-end: var(--ui-border-width) solid var(--ui-border-divider);
107
106
  }
@@ -122,17 +122,9 @@ export function connect(host) {
122
122
  if (list.contains(event.relatedTarget)) return;
123
123
  for (const button of tabButtons()) button.tabIndex = button.value === host.state.internalValue ? 0 : -1;
124
124
  };
125
- // A vertical mouse wheel over an overflowing strip scrolls it sideways instead of the page.
126
- // Trackpad gestures already carry a horizontal delta and are left to the browser.
127
- const onWheel = (event) => {
128
- if (list.scrollWidth <= list.clientWidth || event.deltaX !== 0 || event.ctrlKey) return;
129
- event.preventDefault();
130
- list.scrollLeft += event.deltaY;
131
- };
132
125
  list.addEventListener("click", onClick);
133
126
  list.addEventListener("keydown", onKeydown);
134
127
  list.addEventListener("focusout", onFocusout);
135
- list.addEventListener("wheel", onWheel, { passive: false });
136
128
  const observer = new MutationObserver(readPanels);
137
129
  observer.observe(container, { childList: true });
138
130
  const tabObserver = new MutationObserver(syncButtons);
@@ -153,6 +145,5 @@ export function connect(host) {
153
145
  list.removeEventListener("click", onClick);
154
146
  list.removeEventListener("keydown", onKeydown);
155
147
  list.removeEventListener("focusout", onFocusout);
156
- list.removeEventListener("wheel", onWheel);
157
148
  };
158
149
  }
@@ -93,7 +93,8 @@
93
93
  border: var(--ui-textarea-border-width, var(--_ui-default-textarea-border-width, var(--ui-border-width))) solid
94
94
  var(--ui-textarea-border, var(--_ui-default-textarea-border, var(--ui-control-border, var(--ui-border-strong))));
95
95
  border-radius: var(--ui-textarea-radius, var(--_ui-default-textarea-radius, var(--ui-field-radius, var(--ui-radius-md))));
96
- background: var(--ui-textarea-surface, var(--_ui-default-textarea-surface, var(--ui-control-surface, var(--ui-surface-elevated))));
96
+ background-color: var(--ui-textarea-surface, var(--_ui-default-textarea-surface, var(--ui-control-surface, var(--ui-surface-elevated))));
97
+ background-image: var(--_ui-default-textarea-highlight, var(--ui-surface-highlight, none));
97
98
  color: var(--ui-text-primary);
98
99
  font: inherit;
99
100
  line-height: var(--ui-line-height-md);
@@ -238,7 +238,8 @@
238
238
  border-inline-end-width: var(--ui-border-width);
239
239
  border-block-end-width: var(--ui-border-width);
240
240
  border-end-end-radius: var(--ui-border-width);
241
- transform: rotate(45deg) scaleX(1.25) scaleY(0.85);
241
+ /* Stretch in screen axes after rotation so both arrow shoulders stay level. */
242
+ transform: scale(1.25, 0.85) rotate(45deg);
242
243
  }
243
244
 
244
245
  :host[data-ui-actual-placement="bottom"] .surface::after {