@threadlabs/looma 0.41.1 → 0.42.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.
Files changed (101) hide show
  1. package/components/ui-button/ui-button.html +33 -12
  2. package/components/ui-button/ui-button.js +2 -2
  3. package/components/ui-callout/ui-callout.html +1 -1
  4. package/components/ui-card/ui-card.html +7 -7
  5. package/components/ui-checkbox/ui-checkbox.html +1 -1
  6. package/components/ui-dialog/ui-dialog.html +8 -10
  7. package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +1 -1
  8. package/components/ui-editor-mention-menu-item/ui-editor-mention-menu-item.html +1 -1
  9. package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +1 -1
  10. package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +2 -2
  11. package/components/ui-icon-button/ui-icon-button.html +45 -10
  12. package/components/ui-light-editor/ui-light-editor.html +1 -1
  13. package/components/ui-menu/ui-menu.html +8 -10
  14. package/components/ui-menu-item/ui-menu-item.html +1 -1
  15. package/components/ui-popover/ui-popover.html +9 -11
  16. package/components/ui-radio/ui-radio.html +53 -1
  17. package/components/ui-section/ui-section.html +1 -1
  18. package/components/ui-site-header/ui-site-header.html +6 -2
  19. package/components/ui-status-message/ui-status-message.html +1 -1
  20. package/components/ui-switch/ui-switch.html +5 -2
  21. package/components/ui-tabs/ui-tabs.html +3 -3
  22. package/components/ui-text/ui-text.html +2 -2
  23. package/components/ui-tooltip/ui-tooltip.html +8 -10
  24. package/dist/index.js +1 -1
  25. package/docs/README.md +5 -1
  26. package/docs/catalog.json +410 -35
  27. package/docs/customizer-render.mjs +9 -5
  28. package/docs/customizer.js +2 -0
  29. package/docs/fonts.mjs +1 -1
  30. package/docs/theme.mjs +136 -35
  31. package/package.json +1 -1
  32. package/styles/ui-button.css +33 -12
  33. package/styles/ui-callout.css +1 -1
  34. package/styles/ui-card.css +6 -6
  35. package/styles/ui-checkbox.css +1 -1
  36. package/styles/ui-dialog.css +17 -21
  37. package/styles/ui-editor-mention-menu-item.css +1 -1
  38. package/styles/ui-editor-mention-menu.css +1 -1
  39. package/styles/ui-editor-table-context-menu.css +1 -1
  40. package/styles/ui-editor-table-toolbar.css +2 -2
  41. package/styles/ui-icon-button.css +45 -10
  42. package/styles/ui-light-editor.css +2 -2
  43. package/styles/ui-menu-item.css +1 -1
  44. package/styles/ui-menu.css +9 -11
  45. package/styles/ui-popover.css +10 -12
  46. package/styles/ui-radio.css +62 -1
  47. package/styles/ui-section.css +1 -1
  48. package/styles/ui-site-header.css +6 -2
  49. package/styles/ui-status-message.css +1 -1
  50. package/styles/ui-switch.css +5 -2
  51. package/styles/ui-tabs.css +3 -3
  52. package/styles/ui-text.css +2 -2
  53. package/styles/ui-tooltip.css +9 -11
  54. package/theme-system.css +10 -8
  55. package/tokens.css +23 -0
  56. package/vue/UiButton.vue +45 -12
  57. package/vue/UiCallout.vue +1 -1
  58. package/vue/UiCard.vue +7 -13
  59. package/vue/UiCheckbox.vue +1 -1
  60. package/vue/UiDialog.vue +21 -45
  61. package/vue/UiEditorMentionMenu.vue +1 -1
  62. package/vue/UiEditorMentionMenuItem.vue +1 -1
  63. package/vue/UiEditorTableContextMenu.vue +1 -1
  64. package/vue/UiEditorTableToolbar.vue +2 -2
  65. package/vue/UiIconButton.vue +45 -10
  66. package/vue/UiLightEditor.vue +2 -2
  67. package/vue/UiMenu.vue +11 -21
  68. package/vue/UiMenuItem.vue +1 -1
  69. package/vue/UiPopover.vue +12 -22
  70. package/vue/UiRadio.vue +57 -1
  71. package/vue/UiSection.vue +1 -1
  72. package/vue/UiSiteHeader.vue +6 -2
  73. package/vue/UiStatusMessage.vue +1 -1
  74. package/vue/UiSwitch.vue +5 -2
  75. package/vue/UiTabs.vue +3 -3
  76. package/vue/UiText.vue +2 -2
  77. package/vue/UiTooltip.vue +11 -21
  78. package/vue/chunks/UiButton.js +1 -1
  79. package/vue/chunks/UiCallout.js +1 -1
  80. package/vue/chunks/UiCard.js +2 -2
  81. package/vue/chunks/UiCheckbox.js +1 -1
  82. package/vue/chunks/UiDialog.js +1 -1
  83. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  84. package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
  85. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  86. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  87. package/vue/chunks/UiIconButton.js +1 -1
  88. package/vue/chunks/UiLightEditor.js +1 -1
  89. package/vue/chunks/UiMenu.js +1 -1
  90. package/vue/chunks/UiMenuItem.js +1 -1
  91. package/vue/chunks/UiPopover.js +1 -1
  92. package/vue/chunks/UiRadio.js +1 -1
  93. package/vue/chunks/UiSection.js +1 -1
  94. package/vue/chunks/UiSiteHeader.js +1 -1
  95. package/vue/chunks/UiStatusMessage.js +1 -1
  96. package/vue/chunks/UiSwitch.js +1 -1
  97. package/vue/chunks/UiTabs.js +1 -1
  98. package/vue/chunks/UiText.js +1 -1
  99. package/vue/chunks/UiTooltip.js +1 -1
  100. package/vue/components.css +348 -235
  101. package/vue/editor/index.js +1 -1
@@ -94,10 +94,40 @@
94
94
  inline-size: var(--_ui-radio-size, 1.125rem);
95
95
  block-size: var(--_ui-radio-size, 1.125rem);
96
96
  margin: max(0px, calc((1lh - var(--_ui-radio-size, 1.125rem)) / 2)) 0 0 !important;
97
- accent-color: var(--ui-accent-solid);
97
+ -webkit-appearance: none;
98
+ appearance: none;
99
+ position: relative;
100
+ border: var(--ui-border-width) solid var(--ui-control-border, var(--ui-border-strong));
101
+ border-radius: var(--ui-radius-round);
102
+ background-color: var(--ui-control-surface, var(--ui-surface-default));
103
+ background-image: var(--ui-surface-highlight, none);
104
+ box-shadow: var(--ui-control-inset);
98
105
  cursor: pointer;
99
106
  }
100
107
 
108
+ /* The native radio retains grouping, validation and keyboard behavior.
109
+ Its empty well recedes; the filled selection and its dot stay crisp. */
110
+ input::after {
111
+ content: "";
112
+ position: absolute;
113
+ inset: 28%;
114
+ border-radius: var(--ui-radius-round);
115
+ background-color: var(--ui-text-on-accent);
116
+ opacity: 0;
117
+ transition: opacity var(--ui-motion-fast) var(--ui-motion-ease);
118
+ }
119
+
120
+ input:checked {
121
+ background-color: var(--ui-accent-solid);
122
+ background-image: var(--ui-accent-highlight, none);
123
+ border-color: var(--ui-accent-solid);
124
+ box-shadow: none;
125
+ }
126
+
127
+ input:checked::after {
128
+ opacity: 1;
129
+ }
130
+
101
131
  input:focus-visible {
102
132
  outline: var(--ui-focus-width) solid var(--ui-focus-ring, var(--ui-accent-solid));
103
133
  outline-offset: var(--ui-focus-width);
@@ -111,9 +141,31 @@
111
141
  color: var(--ui-disabled-text);
112
142
  }
113
143
  :host([disabled]) input {
144
+ border-color: var(--ui-disabled-border);
145
+ background-color: var(--ui-disabled-surface);
146
+ background-image: none;
147
+ box-shadow: none;
114
148
  cursor: not-allowed;
115
149
  }
116
150
 
151
+ :host([disabled]) input::after {
152
+ background-color: var(--ui-disabled-text);
153
+ }
154
+
155
+ @media (prefers-reduced-motion: reduce) {
156
+ input::after { transition: none; }
157
+ }
158
+
159
+ @media (forced-colors: active) {
160
+ input {
161
+ -webkit-appearance: auto;
162
+ appearance: auto;
163
+ background: none;
164
+ box-shadow: none;
165
+ }
166
+ input::after { display: none !important; }
167
+ }
168
+
117
169
  /* A sized choice keeps its box and aligns instead: the label takes that size's field type size,
118
170
  and the first line centres in that control height, so the label shares a row's baseline.
119
171
  Multi-line labels and descriptions still grow downward from that first line. */
@@ -87,7 +87,7 @@
87
87
  }
88
88
 
89
89
  :host([tone="danger"]) .heading {
90
- color: var(--ui-danger);
90
+ color: var(--ui-danger-subtle-text);
91
91
  }
92
92
 
93
93
  .description {
@@ -47,6 +47,7 @@
47
47
  align-items: center !important;
48
48
  align-content: center !important;
49
49
  gap: var(--ui-space-2) !important;
50
+ inline-size: 100%;
50
51
  min-inline-size: 0;
51
52
  min-block-size: var(--ui-site-header-compact-height, 3.75rem);
52
53
  padding: var(--ui-space-2) var(--ui-site-header-padding-inline, var(--ui-space-4)) !important;
@@ -68,13 +69,16 @@
68
69
  max-inline-size: 100%;
69
70
  }
70
71
  .actions {
71
- flex-wrap: wrap !important;
72
+ display: grid !important;
73
+ grid-auto-flow: column !important;
74
+ grid-auto-columns: minmax(max-content, var(--ui-control-min-block-size)) !important;
75
+ justify-items: center !important;
72
76
  margin-inline-start: auto !important;
73
77
  }
74
78
  /* Text shares a baseline inside one group; the group is centred beside any control height. */
75
79
  .identity {
76
80
  display: flex !important;
77
- flex: 1 1 auto;
81
+ flex: 1 1 0;
78
82
  flex-wrap: wrap !important;
79
83
  align-items: baseline !important;
80
84
  gap: var(--ui-space-2) var(--ui-space-6) !important;
@@ -31,7 +31,7 @@
31
31
  }
32
32
 
33
33
  :host([kind="error"]) {
34
- color: var(--ui-danger);
34
+ color: var(--ui-danger-subtle-text);
35
35
  }
36
36
 
37
37
  :host([layout="panel"]) {
@@ -129,7 +129,8 @@
129
129
  width: var(--_thumb);
130
130
  height: var(--_thumb);
131
131
  border-radius: var(--ui-radius-round);
132
- background: var(--ui-text-secondary);
132
+ background-color: var(--ui-text-secondary);
133
+ background-image: var(--ui-knob-highlight, none);
133
134
  box-shadow: var(--ui-shadow-xs);
134
135
  transition: transform var(--ui-motion-base) var(--ui-motion-ease), background-color var(--ui-motion-base) var(--ui-motion-ease);
135
136
  }
@@ -142,7 +143,8 @@
142
143
 
143
144
  input:checked::after {
144
145
  transform: translateX(calc(var(--_ui-switch-track-width) - var(--_ui-switch-track-height)));
145
- background: var(--ui-text-on-accent);
146
+ background-color: var(--ui-text-on-accent);
147
+ background-image: var(--ui-knob-on-accent-highlight, none);
146
148
  }
147
149
 
148
150
  input:focus-visible {
@@ -167,6 +169,7 @@
167
169
 
168
170
  :host([disabled]) input::after {
169
171
  background-color: var(--ui-disabled-text);
172
+ background-image: none;
170
173
  box-shadow: none;
171
174
  }
172
175
 
@@ -154,8 +154,8 @@
154
154
  }
155
155
  .list button[aria-selected="true"],
156
156
  .list > :slotted(button[slot="tab"][aria-selected="true"]) {
157
- color: var(--ui-accent-solid);
158
- border-block-end-color: var(--ui-accent-solid);
157
+ color: var(--ui-accent-subtle-text);
158
+ border-block-end-color: var(--ui-accent-subtle-text);
159
159
  }
160
160
  .list button:focus-visible,
161
161
  .list > :slotted(button[slot="tab"]:focus-visible) {
@@ -194,7 +194,7 @@
194
194
 
195
195
  :host([orientation="vertical"]) .list button[aria-selected="true"],
196
196
  :host([orientation="vertical"]) .list > :slotted(button[slot="tab"][aria-selected="true"]) {
197
- border-inline-end-color: var(--ui-accent-solid);
197
+ border-inline-end-color: var(--ui-accent-subtle-text);
198
198
  }
199
199
 
200
200
  @media (prefers-reduced-motion: reduce) {
@@ -95,7 +95,7 @@
95
95
  color: var(--ui-text-muted);
96
96
  }
97
97
  :host([tone="accent"]) {
98
- color: var(--ui-accent-active);
98
+ color: var(--ui-accent-subtle-text);
99
99
  }
100
100
  /* Every status tone uses the text-safe token a subtle badge sets its words in, so text and badges
101
101
  in one tone match, and each holds 4.5:1 on sunken surfaces where some base colours fall short. */
@@ -157,7 +157,7 @@
157
157
  /* A link in running text is underlined, so it stands apart from the words around it by more than
158
158
  colour. */
159
159
  :host :slotted(a) {
160
- color: var(--ui-accent-active);
160
+ color: var(--ui-accent-subtle-text);
161
161
  text-decoration: underline;
162
162
  text-decoration-thickness: 0.06em;
163
163
  text-underline-offset: 0.18em;
@@ -135,12 +135,12 @@
135
135
  }
136
136
 
137
137
  /* Purpose and measured size shape one shared separation lever. The content plane stays opaque;
138
- transparency, saturation and edge light belong to the surrounding decorative material. */
138
+ transparency, frosting and edge light belong to the surrounding decorative material. */
139
139
  .surface {
140
- --_ui-material-glassiness: calc(clamp(0, var(--ui-glassiness, 0), 1) + 2 * pow(clamp(0, var(--ui-glassiness, 0), 1), 4));
140
+ --_ui-material-glassiness: clamp(0, var(--ui-glassiness, 0), 1);
141
141
  --_ui-material-separation: clamp(0, var(--ui-surface-separation, 0), 1);
142
- --_ui-material-active: clamp(0, calc((var(--_ui-material-glassiness) + var(--_ui-material-separation)) * 100000), 1);
143
- --_ui-material-rim: calc((var(--_ui-material-separation) + var(--_ui-material-glassiness) * 0.25) * var(--_ui-material-scale, 0.08) * 8px);
142
+ --_ui-material-active: clamp(0, calc(var(--_ui-material-separation) * 100000), 1);
143
+ --_ui-material-rim: calc(var(--_ui-material-separation) * var(--_ui-material-scale, 0.08) * 8px);
144
144
  --_ui-material-content-color: var(--_ui-tooltip-surface, var(--ui-material-content, var(--ui-overlay-surface, var(--ui-surface-elevated))));
145
145
  --_ui-material-rim-color: color-mix(in srgb, var(--ui-material-glass, var(--ui-surface-elevated)) calc(var(--_ui-material-active) * 100%), transparent);
146
146
  background:
@@ -163,10 +163,8 @@
163
163
  var(--ui-elevation-tooltip, var(--ui-shadow-md))
164
164
  )
165
165
  );
166
- backdrop-filter: blur(calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 18px))
167
- saturate(calc(1 + var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 0.18));
168
- -webkit-backdrop-filter: blur(calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 18px))
169
- saturate(calc(1 + var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 0.18));
166
+ -webkit-backdrop-filter: blur(calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 32px));
167
+ backdrop-filter: blur(calc(var(--_ui-material-glassiness) * var(--_ui-material-scale, 0.08) * 32px));
170
168
  }
171
169
 
172
170
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
@@ -178,8 +176,8 @@
178
176
  @media (prefers-reduced-transparency: reduce) {
179
177
  .surface {
180
178
  background: var(--_ui-material-content-color);
181
- backdrop-filter: none;
182
179
  -webkit-backdrop-filter: none;
180
+ backdrop-filter: none;
183
181
  }
184
182
  }
185
183
 
@@ -188,8 +186,8 @@
188
186
  background: Canvas;
189
187
  border-color: CanvasText;
190
188
  box-shadow: none;
191
- backdrop-filter: none;
192
189
  -webkit-backdrop-filter: none;
190
+ backdrop-filter: none;
193
191
  }
194
192
  }
195
193