@threadlabs/looma 0.1.2 → 0.1.4

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 (107) hide show
  1. package/dist/{chunk-YK4MTZGJ.js → chunk-3PASQ7DE.js} +26 -26
  2. package/dist/cjs/ui-button.cjs.entry.js +3 -4
  3. package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
  4. package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
  5. package/dist/cjs/ui-menu.cjs.entry.js +1 -1
  6. package/dist/cjs/ui-popover.cjs.entry.js +1 -1
  7. package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
  8. package/dist/cjs/ui-tabs.cjs.entry.js +1 -1
  9. package/dist/cjs/ui-toast-region.cjs.entry.js +1 -1
  10. package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
  11. package/dist/collection/components/ui-button/ui-button.css +22 -12
  12. package/dist/collection/components/ui-button/ui-button.js +7 -7
  13. package/dist/collection/components/ui-dialog/ui-dialog.css +10 -4
  14. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +4 -1
  15. package/dist/collection/components/ui-menu/ui-menu.css +4 -1
  16. package/dist/collection/components/ui-popover/ui-popover.css +7 -1
  17. package/dist/collection/components/ui-search-shell/ui-search-shell.css +3 -1
  18. package/dist/collection/components/ui-tabs/ui-tabs.css +3 -0
  19. package/dist/collection/components/ui-toast-region/ui-toast-region.css +3 -2
  20. package/dist/collection/components/ui-top-bar/ui-top-bar.css +10 -2
  21. package/dist/components/p-gHC_Ei92.js +1 -0
  22. package/dist/components/ui-button.js +1 -1
  23. package/dist/components/ui-context-menu.js +1 -1
  24. package/dist/components/ui-dialog.js +1 -1
  25. package/dist/components/ui-floating-action-button.js +1 -1
  26. package/dist/components/ui-menu.js +1 -1
  27. package/dist/components/ui-popover.js +1 -1
  28. package/dist/components/ui-search-shell.js +1 -1
  29. package/dist/components/ui-tabs.js +1 -1
  30. package/dist/components/ui-toast-region.js +1 -1
  31. package/dist/components/ui-top-bar.js +1 -1
  32. package/dist/esm/ui-button.entry.js +3 -4
  33. package/dist/esm/ui-dialog.entry.js +1 -1
  34. package/dist/esm/ui-floating-action-button.entry.js +1 -1
  35. package/dist/esm/ui-menu.entry.js +1 -1
  36. package/dist/esm/ui-popover.entry.js +1 -1
  37. package/dist/esm/ui-search-shell.entry.js +1 -1
  38. package/dist/esm/ui-tabs.entry.js +1 -1
  39. package/dist/esm/ui-toast-region.entry.js +1 -1
  40. package/dist/esm/ui-top-bar.entry.js +1 -1
  41. package/dist/index.cjs +11 -12
  42. package/dist/index.js +1 -1
  43. package/dist/looma/looma.esm.js +1 -1
  44. package/dist/looma/p-01425a37.entry.js +1 -0
  45. package/dist/looma/p-07167650.entry.js +1 -0
  46. package/dist/looma/{p-341ba64a.entry.js → p-3ecd7120.entry.js} +1 -1
  47. package/dist/looma/p-5717a4c4.entry.js +1 -0
  48. package/dist/looma/p-940a931a.entry.js +1 -0
  49. package/dist/looma/p-941221ad.entry.js +1 -0
  50. package/dist/looma/p-a7be33fd.entry.js +1 -0
  51. package/dist/looma/{p-4742e6b4.entry.js → p-cb15e8e3.entry.js} +1 -1
  52. package/dist/looma/p-d39905f9.entry.js +1 -0
  53. package/dist/types/components/ui-button/ui-button.d.ts +1 -1
  54. package/dist/types/components.d.ts +9 -3
  55. package/dist/{ui-avatar-group.entry-BZGXBOSE.js → ui-avatar-group.entry-DBVLQ4KB.js} +1 -1
  56. package/dist/{ui-avatar.entry-S2O2W5SA.js → ui-avatar.entry-2WTBM2EC.js} +1 -1
  57. package/dist/{ui-badge.entry-CVJDISCR.js → ui-badge.entry-XKIGBK5V.js} +1 -1
  58. package/dist/ui-button.entry-PWT56MPD.js +71 -0
  59. package/dist/{ui-checkbox.entry-5RA2CB43.js → ui-checkbox.entry-QT5S7EEL.js} +1 -1
  60. package/dist/{ui-context-menu.entry-UUOCT75F.js → ui-context-menu.entry-NGWR3LOZ.js} +1 -1
  61. package/dist/{ui-dialog.entry-OEPJTEES.js → ui-dialog.entry-PEDDIALQ.js} +2 -2
  62. package/dist/{ui-disclosure.entry-LRRISGUD.js → ui-disclosure.entry-UKO7MAZM.js} +1 -1
  63. package/dist/ui-floating-action-button.entry-SSGHRMCO.js +23 -0
  64. package/dist/{ui-form-field.entry-73YOVICF.js → ui-form-field.entry-6TZCWPYL.js} +1 -1
  65. package/dist/{ui-icon-button.entry-MNXGPG36.js → ui-icon-button.entry-WMCYMK2H.js} +1 -1
  66. package/dist/{ui-input.entry-UWRVAOSW.js → ui-input.entry-AZ5BGQNA.js} +1 -1
  67. package/dist/{ui-menu-item.entry-5AOJO5MP.js → ui-menu-item.entry-L4NJDBKF.js} +1 -1
  68. package/dist/{ui-menu.entry-YDS6UMB5.js → ui-menu.entry-DGUYAE3Q.js} +2 -2
  69. package/dist/{ui-popover.entry-PGWDCQIX.js → ui-popover.entry-A54EKVZG.js} +2 -2
  70. package/dist/{ui-radio-group.entry-RHP5GNWU.js → ui-radio-group.entry-6YP4LY4N.js} +1 -1
  71. package/dist/{ui-radio.entry-5WRWPSTK.js → ui-radio.entry-CGYNK7PN.js} +1 -1
  72. package/dist/{ui-search-result-row.entry-IKJB2SJJ.js → ui-search-result-row.entry-DGKSI2QM.js} +1 -1
  73. package/dist/{ui-search-shell.entry-ZIWF4ZHH.js → ui-search-shell.entry-3F5ASGTW.js} +2 -2
  74. package/dist/{ui-select.entry-N5TIKHR7.js → ui-select.entry-SXSZPVXA.js} +1 -1
  75. package/dist/{ui-switch.entry-WUSZTXIR.js → ui-switch.entry-AD4EVUWM.js} +1 -1
  76. package/dist/{ui-tabs.entry-UFAVAQIF.js → ui-tabs.entry-WLKO5G5N.js} +2 -2
  77. package/dist/{ui-textarea.entry-BYT47RAQ.js → ui-textarea.entry-IHPC7Q4R.js} +1 -1
  78. package/dist/{ui-toast-region.entry-6UYR3ZU2.js → ui-toast-region.entry-GCW2LJAC.js} +2 -2
  79. package/dist/{ui-tooltip.entry-YS7UX4FS.js → ui-tooltip.entry-EU2G6BH5.js} +1 -1
  80. package/dist/{ui-top-bar.entry-V27H6NFO.js → ui-top-bar.entry-NMAFXVET.js} +2 -2
  81. package/editor/{chunk-PQAV4KXC.js → chunk-CWCXYQMT.js} +4 -4
  82. package/editor/index.js +1 -1
  83. package/editor/ui.js +1 -1
  84. package/editor.css +68 -24
  85. package/layout/index.cjs +82 -0
  86. package/layout/index.css +165 -8
  87. package/layout/index.js +82 -0
  88. package/layout.css +113 -9
  89. package/package.json +1 -1
  90. package/styles.css +23 -17
  91. package/theme-dark.css +6 -6
  92. package/theme-light.css +3 -3
  93. package/tokens.css +16 -16
  94. package/vue/{chunk-J4UBEIIL.js → chunk-P72L3GWE.js} +1 -0
  95. package/vue/editor/index.js +1 -1
  96. package/vue/index.d.ts +13 -1
  97. package/vue/index.js +10 -1
  98. package/dist/components/p-WvL4iAhX.js +0 -1
  99. package/dist/looma/p-52c537fa.entry.js +0 -1
  100. package/dist/looma/p-649dad92.entry.js +0 -1
  101. package/dist/looma/p-ab4151d5.entry.js +0 -1
  102. package/dist/looma/p-dff144bd.entry.js +0 -1
  103. package/dist/looma/p-ebb74106.entry.js +0 -1
  104. package/dist/looma/p-ecb5739b.entry.js +0 -1
  105. package/dist/looma/p-fa4659c4.entry.js +0 -1
  106. package/dist/ui-button.entry-LNJBEJFE.js +0 -72
  107. package/dist/ui-floating-action-button.entry-7TSAZRXP.js +0 -23
package/layout.css CHANGED
@@ -1,13 +1,14 @@
1
- /* Unlayered: isolation contract (hard guarantees). */
2
- :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-separator),
3
- :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-separator) *,
4
- :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-separator) *::before,
5
- :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-separator) *::after {
1
+ /* Unlayered: box-model guarantees that remain safe for host composition. */
2
+ :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-switcher, ui-sidebar, ui-reel, ui-separator),
3
+ :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-switcher, ui-sidebar, ui-reel, ui-separator) *,
4
+ :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-switcher, ui-sidebar, ui-reel, ui-separator) *::before,
5
+ :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-switcher, ui-sidebar, ui-reel, ui-separator) *::after {
6
6
  box-sizing: border-box;
7
7
  }
8
8
 
9
- :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-separator) {
10
- all: revert;
9
+ :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-switcher, ui-sidebar, ui-reel, ui-separator) {
10
+ /* Reveal Looma's component layer instead of reverting past it. */
11
+ all: revert-layer;
11
12
  box-sizing: border-box;
12
13
  margin: 0;
13
14
  font-family: var(--ui-font-family-sans);
@@ -16,7 +17,7 @@
16
17
  color: var(--ui-text-primary);
17
18
  }
18
19
 
19
- :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-separator)[data-ui-inherit-typography] {
20
+ :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-switcher, ui-sidebar, ui-reel, ui-separator)[data-ui-inherit-typography] {
20
21
  font-family: inherit;
21
22
  font-size: inherit;
22
23
  line-height: inherit;
@@ -31,6 +32,11 @@
31
32
  }
32
33
 
33
34
  @layer components {
35
+ :where(ui-stack, ui-inline, ui-cluster, ui-grid, ui-center, ui-switcher, ui-sidebar, ui-reel, ui-separator) {
36
+ min-inline-size: 0;
37
+ max-inline-size: 100%;
38
+ }
39
+
34
40
  ui-stack {
35
41
  --ui-layout-gap: var(--ui-space-4, 1rem);
36
42
  --ui-layout-align: stretch;
@@ -79,7 +85,7 @@
79
85
  --ui-grid-min: 16rem;
80
86
  display: grid;
81
87
  gap: var(--ui-grid-gap);
82
- grid-template-columns: repeat(auto-fit, minmax(var(--ui-grid-min), 1fr));
88
+ grid-template-columns: repeat(auto-fit, minmax(min(var(--ui-grid-min), 100%), 1fr));
83
89
  }
84
90
 
85
91
  ui-grid[gap="xs"] { --ui-grid-gap: var(--ui-space-2, 0.5rem); }
@@ -94,6 +100,7 @@
94
100
  --ui-center-measure: 65ch;
95
101
  --ui-center-gutters: var(--ui-space-4, 1rem);
96
102
  display: block;
103
+ inline-size: 100%;
97
104
  max-inline-size: var(--ui-center-measure);
98
105
  margin-inline: auto;
99
106
  padding-inline: var(--ui-center-gutters);
@@ -105,6 +112,103 @@
105
112
  ui-center[gutters="m"] { --ui-center-gutters: var(--ui-space-4, 1rem); }
106
113
  ui-center[gutters="l"] { --ui-center-gutters: var(--ui-space-5, 1.5rem); }
107
114
 
115
+ ui-switcher {
116
+ --ui-switcher-gap: var(--ui-space-4, 1rem);
117
+ --ui-switcher-threshold: 30rem;
118
+ --ui-switcher-align: stretch;
119
+ display: flex;
120
+ flex-wrap: wrap;
121
+ gap: var(--ui-switcher-gap);
122
+ align-items: var(--ui-switcher-align);
123
+ }
124
+
125
+ ui-switcher > * {
126
+ min-inline-size: 0;
127
+ flex-grow: 1;
128
+ flex-basis: calc((var(--ui-switcher-threshold) - 100%) * 999);
129
+ }
130
+
131
+ ui-switcher[gap="xs"] { --ui-switcher-gap: var(--ui-space-2, 0.5rem); }
132
+ ui-switcher[gap="s"] { --ui-switcher-gap: var(--ui-space-3, 0.75rem); }
133
+ ui-switcher[gap="m"] { --ui-switcher-gap: var(--ui-space-4, 1rem); }
134
+ ui-switcher[gap="l"] { --ui-switcher-gap: var(--ui-space-5, 1.5rem); }
135
+ ui-switcher[threshold="xs"] { --ui-switcher-threshold: 20rem; }
136
+ ui-switcher[threshold="sm"] { --ui-switcher-threshold: 30rem; }
137
+ ui-switcher[threshold="md"] { --ui-switcher-threshold: 45rem; }
138
+ ui-switcher[threshold="lg"] { --ui-switcher-threshold: 60rem; }
139
+ ui-switcher[align="start"] { --ui-switcher-align: flex-start; }
140
+ ui-switcher[align="center"] { --ui-switcher-align: center; }
141
+ ui-switcher[align="end"] { --ui-switcher-align: flex-end; }
142
+
143
+ ui-sidebar {
144
+ --ui-sidebar-gap: var(--ui-space-4, 1rem);
145
+ --ui-sidebar-width: 18rem;
146
+ --ui-sidebar-content-min: 50%;
147
+ --ui-sidebar-align: stretch;
148
+ display: flex;
149
+ flex-wrap: wrap;
150
+ gap: var(--ui-sidebar-gap);
151
+ align-items: var(--ui-sidebar-align);
152
+ }
153
+
154
+ ui-sidebar > * { min-inline-size: 0; }
155
+ ui-sidebar > :first-child {
156
+ flex-basis: var(--ui-sidebar-width);
157
+ flex-grow: 1;
158
+ }
159
+ ui-sidebar > :last-child {
160
+ flex-basis: 0;
161
+ flex-grow: 999;
162
+ min-inline-size: min(var(--ui-sidebar-content-min), 100%);
163
+ }
164
+ ui-sidebar[side="end"] > :first-child {
165
+ flex-basis: 0;
166
+ flex-grow: 999;
167
+ min-inline-size: min(var(--ui-sidebar-content-min), 100%);
168
+ }
169
+ ui-sidebar[side="end"] > :last-child {
170
+ flex-basis: var(--ui-sidebar-width);
171
+ flex-grow: 1;
172
+ min-inline-size: 0;
173
+ }
174
+ ui-sidebar[gap="xs"] { --ui-sidebar-gap: var(--ui-space-2, 0.5rem); }
175
+ ui-sidebar[gap="s"] { --ui-sidebar-gap: var(--ui-space-3, 0.75rem); }
176
+ ui-sidebar[gap="m"] { --ui-sidebar-gap: var(--ui-space-4, 1rem); }
177
+ ui-sidebar[gap="l"] { --ui-sidebar-gap: var(--ui-space-5, 1.5rem); }
178
+ ui-sidebar[width="narrow"] { --ui-sidebar-width: 14rem; }
179
+ ui-sidebar[width="wide"] { --ui-sidebar-width: 24rem; }
180
+ ui-sidebar[align="start"] { --ui-sidebar-align: flex-start; }
181
+ ui-sidebar[align="center"] { --ui-sidebar-align: center; }
182
+ ui-sidebar[align="end"] { --ui-sidebar-align: flex-end; }
183
+
184
+ ui-reel {
185
+ --ui-reel-gap: var(--ui-space-4, 1rem);
186
+ --ui-reel-item-width: auto;
187
+ display: flex;
188
+ inline-size: 100%;
189
+ gap: var(--ui-reel-gap);
190
+ overflow-x: auto;
191
+ overflow-y: hidden;
192
+ overscroll-behavior-inline: contain;
193
+ -webkit-overflow-scrolling: touch;
194
+ }
195
+
196
+ ui-reel > * {
197
+ min-inline-size: 0;
198
+ flex: 0 0 var(--ui-reel-item-width);
199
+ }
200
+ ui-reel[gap="xs"] { --ui-reel-gap: var(--ui-space-2, 0.5rem); }
201
+ ui-reel[gap="s"] { --ui-reel-gap: var(--ui-space-3, 0.75rem); }
202
+ ui-reel[gap="m"] { --ui-reel-gap: var(--ui-space-4, 1rem); }
203
+ ui-reel[gap="l"] { --ui-reel-gap: var(--ui-space-5, 1.5rem); }
204
+ ui-reel[item-width="sm"] { --ui-reel-item-width: 12rem; }
205
+ ui-reel[item-width="md"] { --ui-reel-item-width: 16rem; }
206
+ ui-reel[item-width="lg"] { --ui-reel-item-width: 20rem; }
207
+ ui-reel[snap="start"],
208
+ ui-reel[snap="center"] { scroll-snap-type: inline mandatory; }
209
+ ui-reel[snap="start"] > * { scroll-snap-align: start; }
210
+ ui-reel[snap="center"] > * { scroll-snap-align: center; }
211
+
108
212
  ui-separator {
109
213
  --ui-separator-color: var(--ui-border-default, #d0d5dd);
110
214
  --ui-separator-space: var(--ui-space-4, 1rem);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Looma web components, layout primitives, editor UI, and supported Vue adapters.",
6
6
  "license": "MIT",
package/styles.css CHANGED
@@ -1,4 +1,4 @@
1
- /* Unlayered: isolation contract (hard guarantees). Layered rules lose to unlayered page CSS. */
1
+ /* Unlayered: box-model guarantees. Later page CSS can still compose component hosts. */
2
2
  :where(
3
3
  ui-button,
4
4
  ui-input,
@@ -107,7 +107,8 @@
107
107
  ui-avatar,
108
108
  ui-avatar-group
109
109
  ) {
110
- all: revert;
110
+ /* Reveal Looma's component layer instead of reverting past it. */
111
+ all: revert-layer;
111
112
  box-sizing: border-box;
112
113
  margin: 0;
113
114
  font-family: var(--ui-font-family-sans);
@@ -187,7 +188,7 @@
187
188
  ui-button > button {
188
189
  appearance: none;
189
190
  border: 1px solid var(--ui-border-default);
190
- border-radius: var(--ui-radius-2);
191
+ border-radius: var(--ui-button-radius, var(--ui-radius-2));
191
192
  background: var(--ui-surface-default);
192
193
  color: inherit;
193
194
  font: inherit;
@@ -199,7 +200,8 @@
199
200
  background-color var(--ui-motion-fast) var(--ui-motion-ease),
200
201
  border-color var(--ui-motion-fast) var(--ui-motion-ease),
201
202
  color var(--ui-motion-fast) var(--ui-motion-ease),
202
- box-shadow var(--ui-motion-fast) var(--ui-motion-ease);
203
+ box-shadow var(--ui-motion-fast) var(--ui-motion-ease),
204
+ transform var(--ui-motion-fast) var(--ui-motion-ease);
203
205
  margin: 0;
204
206
  }
205
207
 
@@ -222,55 +224,59 @@
222
224
  background: var(--ui-surface-subtle);
223
225
  }
224
226
 
225
- ui-button[data-variant="solid"] > button {
227
+ ui-button[variant="solid"] > button {
226
228
  border-color: var(--ui-accent-solid);
227
229
  background: var(--ui-accent-solid);
228
230
  color: var(--ui-text-on-accent);
229
- box-shadow: var(--ui-shadow-xs);
231
+ box-shadow: var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs));
230
232
  }
231
233
 
232
- ui-button[data-variant="solid"] > button:hover:enabled {
234
+ ui-button[variant="solid"] > button:hover:enabled {
233
235
  background: var(--ui-accent-hover);
234
236
  border-color: var(--ui-accent-hover);
235
237
  box-shadow: var(--ui-shadow-sm);
238
+ transform: translateY(-1px);
236
239
  }
237
240
 
238
- ui-button[data-variant="solid"] > button:active:enabled {
241
+ ui-button[variant="solid"] > button:active:enabled {
239
242
  background: var(--ui-accent-active);
240
243
  border-color: var(--ui-accent-active);
241
244
  box-shadow: none;
245
+ transform: translateY(0);
242
246
  }
243
247
 
244
- ui-button[data-variant="destructive"] > button {
248
+ ui-button[variant="destructive"] > button {
245
249
  border-color: var(--ui-danger-solid);
246
250
  background: var(--ui-danger-solid);
247
251
  color: var(--ui-text-on-accent);
248
- box-shadow: var(--ui-shadow-xs);
252
+ box-shadow: var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs));
249
253
  }
250
254
 
251
- ui-button[data-variant="destructive"] > button:hover:enabled {
255
+ ui-button[variant="destructive"] > button:hover:enabled {
252
256
  background: var(--ui-danger-hover);
253
257
  border-color: var(--ui-danger-hover);
254
258
  box-shadow: var(--ui-shadow-sm);
259
+ transform: translateY(-1px);
255
260
  }
256
261
 
257
- ui-button[data-variant="destructive"] > button:active:enabled {
262
+ ui-button[variant="destructive"] > button:active:enabled {
258
263
  background: var(--ui-danger-hover);
259
264
  border-color: var(--ui-danger-hover);
260
265
  box-shadow: none;
266
+ transform: translateY(0);
261
267
  }
262
268
 
263
- ui-button[data-variant="ghost"] > button {
269
+ ui-button[variant="ghost"] > button {
264
270
  border-color: transparent;
265
271
  background: transparent;
266
272
  }
267
273
 
268
- ui-button[data-variant="ghost"] > button:hover:enabled {
274
+ ui-button[variant="ghost"] > button:hover:enabled {
269
275
  background: var(--ui-surface-muted);
270
276
  border-color: transparent;
271
277
  }
272
278
 
273
- ui-button[data-variant="ghost"] > button:active:enabled {
279
+ ui-button[variant="ghost"] > button:active:enabled {
274
280
  background: var(--ui-surface-subtle);
275
281
  border-color: transparent;
276
282
  }
@@ -508,11 +514,11 @@
508
514
  }
509
515
 
510
516
  /* Dialog: hidden when closed so multiple instances don’t stack in layout */
511
- ui-dialog:not([open]) {
517
+ ui-dialog:not([data-open]) {
512
518
  display: none;
513
519
  }
514
520
 
515
- ui-dialog[open] {
521
+ ui-dialog[data-open] {
516
522
  display: block;
517
523
  }
518
524
 
package/theme-dark.css CHANGED
@@ -17,9 +17,9 @@
17
17
  --ui-border-default: #333330;
18
18
  --ui-border-strong: #4a4a46;
19
19
 
20
- --ui-danger-solid: #ff6644;
21
- --ui-danger-hover: #ff7755;
22
- --ui-danger-soft: #2d1a16;
20
+ --ui-danger-solid: #ef6f86;
21
+ --ui-danger-hover: #f58a9d;
22
+ --ui-danger-soft: #321b22;
23
23
  --ui-success-solid: #33cc66;
24
24
  --ui-success-soft: #162a1f;
25
25
  --ui-warning-solid: #ffaa22;
@@ -46,9 +46,9 @@
46
46
  --ui-border-default: #333330;
47
47
  --ui-border-strong: #4a4a46;
48
48
 
49
- --ui-danger-solid: #ff6644;
50
- --ui-danger-hover: #ff7755;
51
- --ui-danger-soft: #2d1a16;
49
+ --ui-danger-solid: #ef6f86;
50
+ --ui-danger-hover: #f58a9d;
51
+ --ui-danger-soft: #321b22;
52
52
  --ui-success-solid: #33cc66;
53
53
  --ui-success-soft: #162a1f;
54
54
  --ui-warning-solid: #ffaa22;
package/theme-light.css CHANGED
@@ -17,9 +17,9 @@
17
17
  --ui-border-default: #e4e4e0;
18
18
  --ui-border-strong: #c8c8c4;
19
19
 
20
- --ui-danger-solid: #cc3300;
21
- --ui-danger-hover: #a32900;
22
- --ui-danger-soft: #fdf0ed;
20
+ --ui-danger-solid: #b4233f;
21
+ --ui-danger-hover: #941d35;
22
+ --ui-danger-soft: #fceef1;
23
23
  --ui-success-solid: #007a33;
24
24
  --ui-success-soft: #edf7f1;
25
25
  --ui-warning-solid: #cc8800;
package/tokens.css CHANGED
@@ -86,16 +86,16 @@
86
86
  --ui-border-subtle: #ecece8;
87
87
  --ui-border-default: #e4e4e0;
88
88
  --ui-border-strong: #c8c8c4;
89
- --ui-focus-ring: #0066cc;
89
+ --ui-focus-ring: #5b55d6;
90
90
 
91
- --ui-accent-solid: #0066cc;
92
- --ui-accent-hover: #0052a3;
93
- --ui-accent-active: #003d7a;
94
- --ui-accent-soft: #e8f0fb;
91
+ --ui-accent-solid: #5b55d6;
92
+ --ui-accent-hover: #4b45bd;
93
+ --ui-accent-active: #3e399e;
94
+ --ui-accent-soft: #efeffc;
95
95
 
96
- --ui-danger-solid: #cc3300;
97
- --ui-danger-hover: #a32900;
98
- --ui-danger-soft: #fdf0ed;
96
+ --ui-danger-solid: #b4233f;
97
+ --ui-danger-hover: #941d35;
98
+ --ui-danger-soft: #fceef1;
99
99
  --ui-success-solid: #007a33;
100
100
  --ui-success-soft: #edf7f1;
101
101
  --ui-warning-solid: #cc8800;
@@ -120,16 +120,16 @@
120
120
  --ui-border-subtle: oklch(0.9 0.01 250);
121
121
  --ui-border-default: oklch(0.84 0.01 250);
122
122
  --ui-border-strong: oklch(0.7 0.02 250);
123
- --ui-focus-ring: oklch(0.62 0.18 250);
123
+ --ui-focus-ring: oklch(0.57 0.17 285);
124
124
 
125
- --ui-accent-solid: oklch(0.62 0.18 250);
126
- --ui-accent-hover: oklch(0.57 0.2 250);
127
- --ui-accent-active: oklch(0.52 0.2 250);
128
- --ui-accent-soft: oklch(0.95 0.03 250);
125
+ --ui-accent-solid: oklch(0.57 0.17 285);
126
+ --ui-accent-hover: oklch(0.52 0.18 285);
127
+ --ui-accent-active: oklch(0.46 0.16 285);
128
+ --ui-accent-soft: oklch(0.96 0.025 285);
129
129
 
130
- --ui-danger-solid: oklch(0.55 0.2 25);
131
- --ui-danger-hover: oklch(0.5 0.2 25);
132
- --ui-danger-soft: oklch(0.97 0.02 25);
130
+ --ui-danger-solid: oklch(0.5 0.17 18);
131
+ --ui-danger-hover: oklch(0.44 0.16 18);
132
+ --ui-danger-soft: oklch(0.97 0.025 18);
133
133
  --ui-success-solid: oklch(0.5 0.15 145);
134
134
  --ui-success-soft: oklch(0.96 0.03 145);
135
135
  --ui-warning-solid: oklch(0.7 0.15 85);
@@ -65,6 +65,7 @@ function createAdapterComponent(tagName, displayName, additionalEventBindings =
65
65
  return h(
66
66
  tagName,
67
67
  {
68
+ "data-allow-mismatch": forwardedAttrs["data-allow-mismatch"] ?? "class",
68
69
  ...forwardedAttrs,
69
70
  ref: (value) => {
70
71
  elementRef.value = toHTMLElement(value);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAdapterComponent,
3
3
  toHTMLElement
4
- } from "../chunk-J4UBEIIL.js";
4
+ } from "../chunk-P72L3GWE.js";
5
5
 
6
6
  // src/editor/index.ts
7
7
  import "@threadlabs/looma/editor";
package/vue/index.d.ts CHANGED
@@ -47,6 +47,15 @@ declare const Grid: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vu
47
47
  declare const Center: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
48
48
  [key: string]: any;
49
49
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
50
+ declare const Switcher: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
51
+ [key: string]: any;
52
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
53
+ declare const Sidebar: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
54
+ [key: string]: any;
55
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
56
+ declare const Reel: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
57
+ [key: string]: any;
58
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
50
59
  declare const Separator: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
51
60
  [key: string]: any;
52
61
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
@@ -134,6 +143,9 @@ declare const ADAPTER_COMPONENT_TAG_MAP: {
134
143
  readonly Cluster: "ui-cluster";
135
144
  readonly Grid: "ui-grid";
136
145
  readonly Center: "ui-center";
146
+ readonly Switcher: "ui-switcher";
147
+ readonly Sidebar: "ui-sidebar";
148
+ readonly Reel: "ui-reel";
137
149
  readonly Separator: "ui-separator";
138
150
  readonly Disclosure: "ui-disclosure";
139
151
  readonly Tabs: "ui-tabs";
@@ -164,4 +176,4 @@ declare const ADAPTER_COMPONENT_TAG_MAP: {
164
176
  };
165
177
  declare const VUE_ADAPTER_NOTE = "Thin adapter only: attrs and slots pass through to custom elements and DOM events map to typed callbacks.";
166
178
 
167
- export { ADAPTER_COMPONENT_TAG_MAP, Avatar, AvatarGroup, Badge, Button, Center, Checkbox, Cluster, ContextMenu, Dialog, Disclosure, FloatingActionButton, FormField, Grid, IconButton, Inline, Input, Menu, MenuItem, Popover, Radio, RadioGroup, SearchResultRow, SearchShell, Select, Separator, Stack, Switch, Tabs, Textarea, ToastRegion, Tooltip, TopBar, VUE_ADAPTER_NOTE, type VueAdapterEventMap };
179
+ export { ADAPTER_COMPONENT_TAG_MAP, Avatar, AvatarGroup, Badge, Button, Center, Checkbox, Cluster, ContextMenu, Dialog, Disclosure, FloatingActionButton, FormField, Grid, IconButton, Inline, Input, Menu, MenuItem, Popover, Radio, RadioGroup, Reel, SearchResultRow, SearchShell, Select, Separator, Sidebar, Stack, Switch, Switcher, Tabs, Textarea, ToastRegion, Tooltip, TopBar, VUE_ADAPTER_NOTE, type VueAdapterEventMap };
package/vue/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createAdapterComponent
3
- } from "./chunk-J4UBEIIL.js";
3
+ } from "./chunk-P72L3GWE.js";
4
4
 
5
5
  // src/index.ts
6
6
  import "@threadlabs/looma/layout";
@@ -10,6 +10,9 @@ var Inline = createAdapterComponent("ui-inline", "Inline");
10
10
  var Cluster = createAdapterComponent("ui-cluster", "Cluster");
11
11
  var Grid = createAdapterComponent("ui-grid", "Grid");
12
12
  var Center = createAdapterComponent("ui-center", "Center");
13
+ var Switcher = createAdapterComponent("ui-switcher", "Switcher");
14
+ var Sidebar = createAdapterComponent("ui-sidebar", "Sidebar");
15
+ var Reel = createAdapterComponent("ui-reel", "Reel");
13
16
  var Separator = createAdapterComponent("ui-separator", "Separator");
14
17
  var Disclosure = createAdapterComponent("ui-disclosure", "Disclosure");
15
18
  var Tabs = createAdapterComponent("ui-tabs", "Tabs");
@@ -46,6 +49,9 @@ var ADAPTER_COMPONENT_TAG_MAP = {
46
49
  Cluster: "ui-cluster",
47
50
  Grid: "ui-grid",
48
51
  Center: "ui-center",
52
+ Switcher: "ui-switcher",
53
+ Sidebar: "ui-sidebar",
54
+ Reel: "ui-reel",
49
55
  Separator: "ui-separator",
50
56
  Disclosure: "ui-disclosure",
51
57
  Tabs: "ui-tabs",
@@ -98,12 +104,15 @@ export {
98
104
  Popover,
99
105
  Radio,
100
106
  RadioGroup,
107
+ Reel,
101
108
  SearchResultRow,
102
109
  SearchShell,
103
110
  Select,
104
111
  Separator,
112
+ Sidebar,
105
113
  Stack,
106
114
  Switch,
115
+ Switcher,
107
116
  Tabs,
108
117
  Textarea,
109
118
  ToastRegion,
@@ -1 +0,0 @@
1
- import{p as e,H as t,h as i,c as r,t as o}from"./p-CIA4RyEp.js";import{d as s,e as a}from"./p-JwSoedEO.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;internalOpen=!1;syncFromProp(){this.internalOpen=this.open}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown)}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const t=e.target.closest?.("ui-menu-item");if(!t||t.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(t))return;const i=t.getAttribute("value")??t.getAttribute("data-value")??"";s(this.host,"select",{value:i,trigger:a(e)}),s(this.host,"close",{open:!1,reason:"action",trigger:a(e)}),this.internalOpen=!1};onKeydown=e=>{const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const r=e.target.closest?.("ui-menu-item"),o=r&&r instanceof t?i.indexOf(r):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?o<0?0:Math.min(o+1,i.length-1):o<=0?i.length-1:o-1].focus());else if(e.preventDefault(),r&&o>=0){const e=r.getAttribute("value")??r.getAttribute("data-value")??"";s(this.host,"select",{value:e,trigger:"keyboard"}),s(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.internalOpen=!1}};render(){return i(r,{key:"f06ad0f8c09060495757ced2da095817409720b7",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},i("slot",{key:"d504fd3c33894d0e464b957ce67c75fe8a24899c"}))}static get watchers(){return{open:[{syncFromProp:0}]}}static get style(){return":host{display:flex;flex-direction:column;min-width:12rem;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}"}},[769,"ui-menu",{open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},void 0,{open:[{syncFromProp:0}]}]);function u(){"undefined"!=typeof customElements&&["ui-menu"].forEach((e=>{"ui-menu"===e&&(customElements.get(o(e))||customElements.define(o(e),n))}))}export{n as U,u as d}
@@ -1 +0,0 @@
1
- import{r as e,g as a,h as i,H as t}from"./p-CEeiinfk.js";function s(e){return!!e&&e.assignedNodes({flatten:!0}).some((e=>e.nodeType!==Node.TEXT_NODE||Boolean(e.textContent?.trim())))}const r=class{constructor(a){e(this,a)}get host(){return a(this)}hasLeading=!1;hasSearch=!1;hasActions=!1;leadingSlot;searchSlot;actionsSlot;componentDidLoad(){this.syncSlots()}syncSlots=()=>{this.hasLeading=s(this.leadingSlot),this.hasSearch=s(this.searchSlot),this.hasActions=s(this.actionsSlot)};render(){return i(t,{key:"23cbff2fdb06a40f0380dbf217d064cb1b9f7a9c"},i("header",{key:"9472960f4445f8ed7d0800d71db3cbac020fca3f",class:"top-bar",part:"base"},i("div",{key:"d408be025d90fdcf1416213b9e76f3b780f47d97",class:"top-bar__leading",hidden:!this.hasLeading},i("slot",{key:"3dc4db316a040ff10a8b8b218b42799d3e1a7b97",name:"leading",ref:e=>this.leadingSlot=e,onSlotchange:this.syncSlots})),i("div",{key:"1b362f19f9a738600afb266e9641c0ee5c8870c9",class:"top-bar__title"},i("slot",{key:"bb93d34a3dea15c697dcd19dc0ecc3488ee390c8"})),i("div",{key:"3d61d781b654ee1d91a6ce5ba64db9732ee1f8ee",class:"top-bar__search",hidden:!this.hasSearch},i("slot",{key:"5731817be644f10ed745fdc0868b85b66a9c06d4",name:"search",ref:e=>this.searchSlot=e,onSlotchange:this.syncSlots})),i("div",{key:"2ee868b93f5195832830900382545b2131e78bb8",class:"top-bar__actions",hidden:!this.hasActions},i("slot",{key:"1d410fa60f112904cfb866cff5a3f2fb18021c93",name:"actions",ref:e=>this.actionsSlot=e,onSlotchange:this.syncSlots}))))}};r.style=":host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:var(--ui-top-bar-height, 56px);display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-inline:var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem));background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}";export{r as ui_top_bar}
@@ -1 +0,0 @@
1
- import{r as e,g as s,h as t,H as o}from"./p-CEeiinfk.js";import{o as r,c as i,r as a}from"./p-CR7f2MQC.js";import{d as n}from"./p-JwSoedEO.js";const h=class{constructor(s){e(this,s)}get host(){return s(this)}open=!1;defaultOpen=!1;internalOpen=!1;overlayId=`ui-popover-${Math.random().toString(36).slice(2,11)}`;syncFromProp(){this.internalOpen=this.open}onOpenChange(){this.syncOverlay(),this.internalOpen?n(this.host,"open",{open:!0,reason:"programmatic",trigger:"programmatic"}):n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"})}syncOverlay(){this.internalOpen?r({id:this.overlayId,modal:!1,element:this.host,dismissible:!0,requestClose:(e,s)=>this.handleRequestClose(e,s)}):i(this.overlayId)}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("keydown",this.onKeydown),this.syncOverlay()}disconnectedCallback(){this.host.removeEventListener("keydown",this.onKeydown),i(this.overlayId)}componentDidUpdate(){this.syncOverlay()}handleRequestClose(e,s){this.internalOpen=!1,n(this.host,"close",{open:!1,reason:e,trigger:s})}onKeydown=e=>{"Escape"===e.key&&a("escape","keyboard")};render(){return t(o,{key:"121482cf2fe9ba972ae6b902568389790b9accaa","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},t("slot",{key:"095ce0c147ed8c8411114563c9efcb5fe775fcae"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}]}}};h.style=":host{padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-width:min(20rem, 90vw)}";export{h as ui_popover}
@@ -1 +0,0 @@
1
- import{r as e,g as t,h as i,H as r}from"./p-CEeiinfk.js";import{d as o,e as a}from"./p-JwSoedEO.js";const s=class{constructor(t){e(this,t)}get host(){return t(this)}open=!1;defaultOpen=!1;internalOpen=!1;syncFromProp(){this.internalOpen=this.open}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown)}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const t=e.target.closest?.("ui-menu-item");if(!t||t.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(t))return;const i=t.getAttribute("value")??t.getAttribute("data-value")??"";o(this.host,"select",{value:i,trigger:a(e)}),o(this.host,"close",{open:!1,reason:"action",trigger:a(e)}),this.internalOpen=!1};onKeydown=e=>{const t=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===t.length)return;const i=e.target.closest?.("ui-menu-item"),r=i&&i instanceof HTMLElement?t.indexOf(i):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),t["ArrowDown"===e.key?r<0?0:Math.min(r+1,t.length-1):r<=0?t.length-1:r-1].focus());else if(e.preventDefault(),i&&r>=0){const e=i.getAttribute("value")??i.getAttribute("data-value")??"";o(this.host,"select",{value:e,trigger:"keyboard"}),o(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.internalOpen=!1}};render(){return i(r,{key:"f06ad0f8c09060495757ced2da095817409720b7",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},i("slot",{key:"d504fd3c33894d0e464b957ce67c75fe8a24899c"}))}static get watchers(){return{open:[{syncFromProp:0}]}}};s.style=":host{display:flex;flex-direction:column;min-width:12rem;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}";export{s as ui_menu}
@@ -1 +0,0 @@
1
- import{r as i,h as o,H as t}from"./p-CEeiinfk.js";const n=class{constructor(o){i(this,o)}disabled=!1;mobileOnly=!1;label="";render(){return o(t,{key:"4b5b5eb530e4ab424e1189cff83d697f28432d84","data-disabled":this.disabled?"":void 0},o("button",{key:"f8a4b8ac90bf306434b2b905030b46c1fcbcb000",type:"button","aria-label":this.label||void 0,disabled:this.disabled},o("slot",{key:"500d0606ea7166669f104e42813591395fc81c3f"})))}};n.style=":host{position:fixed;inset-block-end:calc( var(--ui-floating-action-button-bottom, var(--ui-space-6, 1.5rem)) + env(safe-area-inset-bottom) );inset-inline-end:var(--ui-floating-action-button-inline-end, var(--ui-space-5, 1.25rem));inline-size:var(--ui-floating-action-button-size, 56px);block-size:var(--ui-floating-action-button-size, 56px);display:inline-flex;z-index:var(--ui-floating-action-button-z-index, 100)}button{appearance:none;inline-size:100%;block-size:100%;border:none;border-radius:999px;margin:0;padding:0;display:inline-flex;align-items:center;justify-content:center;background:var(--ui-floating-action-button-bg, var(--ui-accent-solid));color:var(--ui-floating-action-button-color, var(--ui-text-on-accent));box-shadow:var( --ui-floating-action-button-shadow, 0 4px 12px color-mix(in srgb, var(--ui-accent-solid) 40%, transparent) );cursor:pointer;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), transform var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), box-shadow var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}button:hover:enabled{background:var(--ui-floating-action-button-hover-bg, var(--ui-accent-hover));box-shadow:var( --ui-floating-action-button-hover-shadow, 0 6px 16px color-mix(in srgb, var(--ui-accent-solid) 50%, transparent) )}button:active:enabled{transform:scale(var(--ui-floating-action-button-active-scale, 0.94))}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:2px}button:disabled,:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(svg){inline-size:var(--ui-floating-action-button-icon-size, 24px);block-size:var(--ui-floating-action-button-icon-size, 24px);flex-shrink:0}@media (min-width: 768px){:host([mobile-only]){display:none}}";export{n as ui_floating_action_button}
@@ -1 +0,0 @@
1
- import{r as t,g as a,h as r,H as i}from"./p-CEeiinfk.js";import{d as s,e}from"./p-JwSoedEO.js";const o=class{constructor(a){t(this,a)}get host(){return a(this)}open=!0;internalOpen=!0;syncFromProp(){this.internalOpen=this.open}componentDidLoad(){this.syncFromProp(),this.host.addEventListener("click",this.onClick)}disconnectedCallback(){this.host.removeEventListener("click",this.onClick)}getToasts(){return Array.from(this.host.querySelectorAll("[data-ui-toast]"))}updateOpenState(){const t=this.getToasts();this.internalOpen=t.length>0}onClick=t=>{const a=t.target.closest?.("[data-ui-toast-dismiss]");if(!a)return;const r=a.closest?.("[data-ui-toast]");if(!r)return;const i=r.id??"";r.setAttribute("aria-hidden","true"),r.remove(),s(this.host,"dismiss",{id:i,reason:"action",trigger:e(t)}),this.updateOpenState(),0===this.getToasts().length&&s(this.host,"close",{open:!1,reason:"action",trigger:e(t)})};render(){return r(i,{key:"8e99577d8770984b8d6d29e442931570c1f1bc4d",role:"region","aria-label":"Notifications","data-open":this.internalOpen?"":void 0},r("slot",{key:"06f2c6cf39c4795afc0937669aa2104821aef3d6"}))}static get watchers(){return{open:[{syncFromProp:0}]}}};o.style=":host{position:fixed;top:var(--ui-space-4);left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);max-width:min(24rem, 90vw);pointer-events:none}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}";export{o as ui_toast_region}
@@ -1 +0,0 @@
1
- import{r as i,g as o,h as a,H as e}from"./p-CEeiinfk.js";import{o as t,c as r,r as s}from"./p-CR7f2MQC.js";import{d as n}from"./p-JwSoedEO.js";const d=class{constructor(o){i(this,o)}get host(){return o(this)}open=!1;defaultOpen=!1;modal=!0;dismissible=!0;internalOpen=!1;overlayId=`ui-dialog-${Math.random().toString(36).slice(2,11)}`;dialogRef;syncFromProp(){this.internalOpen=this.open}syncOpen(){this.dialogRef&&(this.internalOpen?(this.dialogRef.showModal(),t({id:this.overlayId,modal:this.modal,element:this.host,dismissible:this.dismissible,requestClose:(i,o)=>this.handleRequestClose(i,o)})):(this.dialogRef.close(),r(this.overlayId)))}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.dialogRef?.addEventListener("close",this.onDialogClose),this.syncOpen()}disconnectedCallback(){this.dialogRef?.removeEventListener("close",this.onDialogClose),r(this.overlayId)}componentDidUpdate(){this.syncOpen()}handleRequestClose(i,o){this.internalOpen=!1,n(this.host,"close",{open:!1,reason:i,trigger:o})}onDialogClose=()=>{this.internalOpen&&(this.internalOpen=!1,r(this.overlayId),n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"}))};onKeydown=i=>{"Escape"===i.key&&s("escape","keyboard")};render(){return a(e,{key:"2a2fcdfa1e3fac5eb3c0e3d6748cebdf388c216d","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},a("dialog",{key:"c3eef2bb3bec77fa518269fce38c19c2ededda49",ref:i=>this.dialogRef=i,open:this.internalOpen},a("slot",{key:"9ae5c30d57096184ec287fd9dd134ff566b9fd39"})))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncOpen:0}]}}};d.style=":host{display:block}:host:not([open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);position:fixed;inset:var(--ui-space-4);width:min(100%, 440px);max-width:min(100%, 440px);margin:auto;padding:var(--ui-space-4);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}";export{d as ui_dialog}
@@ -1 +0,0 @@
1
- import{r as t,g as o,h as a,H as r}from"./p-CEeiinfk.js";import{i as e}from"./p-JwSoedEO.js";const i=class{constructor(o){t(this,o)}get host(){return o(this)}variant;size;disabled=!1;slotRef;syncToButton(){const t=this.getButton();t&&(this.host.dataset.variant=this.variant||"",this.host.dataset.size=this.size||"",this.host.dataset.disabled=this.disabled?"true":"",t.disabled=this.disabled)}componentDidLoad(){this.slotRef?.addEventListener("slotchange",(()=>this.syncToButton())),this.syncToButton()}componentDidUpdate(){this.syncToButton()}getButton(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>"BUTTON"===t.tagName))??null}onKeydown=t=>{this.getButton()||this.disabled||!e(t)||(t.preventDefault(),this.host.click())};render(){return a(r,{key:"01011aa13228b9e8d10ed11b99c95ef1df91326d","data-variant":this.variant||void 0,"data-size":this.size||void 0,"data-disabled":this.disabled?"":void 0,onKeyDown:this.onKeydown},a("slot",{key:"2bf0274d2732ea46fdf016a46d85bbe6e0d96bba",ref:t=>this.slotRef=t}))}static get watchers(){return{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}}};i.style=":host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([data-variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none}:host([data-variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([data-variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([data-variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}";export{i as ui_button}
@@ -1,72 +0,0 @@
1
- import {
2
- isActivationKey
3
- } from "./chunk-UL7UIUJZ.js";
4
- import {
5
- Host,
6
- getElement,
7
- h,
8
- registerInstance
9
- } from "./chunk-YK4MTZGJ.js";
10
-
11
- // dist/esm/ui-button.entry.js
12
- var uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([data-variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none}:host([data-variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([data-variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([data-variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}`;
13
- var UIButton = class {
14
- constructor(hostRef) {
15
- registerInstance(this, hostRef);
16
- }
17
- get host() {
18
- return getElement(this);
19
- }
20
- variant;
21
- size;
22
- disabled = false;
23
- slotRef;
24
- syncToButton() {
25
- const btn = this.getButton();
26
- if (!btn)
27
- return;
28
- this.host.dataset.variant = this.variant || "";
29
- this.host.dataset.size = this.size || "";
30
- this.host.dataset.disabled = this.disabled ? "true" : "";
31
- btn.disabled = this.disabled;
32
- }
33
- componentDidLoad() {
34
- this.slotRef?.addEventListener("slotchange", () => this.syncToButton());
35
- this.syncToButton();
36
- }
37
- componentDidUpdate() {
38
- this.syncToButton();
39
- }
40
- getButton() {
41
- const slot = this.host.shadowRoot?.querySelector("slot");
42
- const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
43
- return nodes.find((el) => el.tagName === "BUTTON") ?? null;
44
- }
45
- onKeydown = (e) => {
46
- const btn = this.getButton();
47
- if (btn || this.disabled || !isActivationKey(e))
48
- return;
49
- e.preventDefault();
50
- this.host.click();
51
- };
52
- render() {
53
- return h(Host, { key: "01011aa13228b9e8d10ed11b99c95ef1df91326d", "data-variant": this.variant || void 0, "data-size": this.size || void 0, "data-disabled": this.disabled ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "2bf0274d2732ea46fdf016a46d85bbe6e0d96bba", ref: (el) => this.slotRef = el }));
54
- }
55
- static get watchers() {
56
- return {
57
- "variant": [{
58
- "syncToButton": 0
59
- }],
60
- "size": [{
61
- "syncToButton": 0
62
- }],
63
- "disabled": [{
64
- "syncToButton": 0
65
- }]
66
- };
67
- }
68
- };
69
- UIButton.style = uiButtonCss();
70
- export {
71
- UIButton as ui_button
72
- };