lutra 0.1.47 → 0.1.49

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.
@@ -62,6 +62,7 @@
62
62
  margin: auto;
63
63
  padding: 0;
64
64
  border: var(--modal-border-size) var(--modal-border-style) var(--modal-border-color);
65
+ width: var(--modal-width, fit-content);
65
66
  border-radius: var(--modal-border-radius, var(--surface-border-radius));
66
67
  background: var(--modal-background, var(--surface-background));
67
68
  color: var(--text-color-p);
@@ -177,7 +177,9 @@
177
177
  onclose={handleDialogClose}
178
178
  oncancel={handleDialogCancel}
179
179
  onclick={handleBackdropClick}
180
- style="--modal-width: {width}; --modal-max-width: {maxWidth}; --modal-max-height: {maxHeight};"
180
+ style:--modal-width={width}
181
+ style:--modal-max-width={maxWidth}
182
+ style:--modal-max-height={maxHeight}
181
183
  >
182
184
  <div class="ModalContent">
183
185
  {#if title}
@@ -254,16 +256,6 @@
254
256
  overflow: visible;
255
257
  }
256
258
 
257
- dialog.Modal::backdrop {
258
- background: var(--scrim-background);
259
- backdrop-filter: var(--scrim-backdrop-filter);
260
- }
261
-
262
- dialog.Modal.noScrim::backdrop {
263
- background: transparent;
264
- backdrop-filter: none;
265
- }
266
-
267
259
  .ModalContent {
268
260
  overflow: auto;
269
261
  scrollbar-gutter: stable;
@@ -196,21 +196,14 @@
196
196
 
197
197
  <style>
198
198
  .Popover {
199
- /* Anchor positioning requires position: fixed or absolute */
200
199
  position: fixed;
201
-
202
- /* Reset UA popover centering styles */
203
200
  inset: auto;
204
201
  margin: 0;
205
202
  padding: 0;
206
-
207
- /* Default surface styling */
208
- background: var(--popover-background, var(--surface-background, var(--background-body)));
209
- border: var(--popover-border, var(--surface-border, var(--border-size-thin) var(--border-style) var(--border-color)));
210
- border-radius: var(--popover-border-radius, var(--surface-border-radius, var(--border-radius-base)));
211
- box-shadow: var(--popover-shadow, var(--surface-shadow, 0 0.5rem 1rem var(--shadow-color)));
212
-
213
- /* Sizing */
203
+ background: var(--popover-background, var(--surface-background));
204
+ border: var(--popover-border, var(--surface-border));
205
+ border-radius: var(--popover-border-radius, var(--surface-border-radius));
206
+ box-shadow: var(--popover-shadow, var(--surface-shadow));
214
207
  width: var(--popover-width, max-content);
215
208
  max-width: var(--popover-max-width, calc(100vw - 2rem));
216
209
  max-height: var(--popover-max-height, calc(100vh - 2rem));
@@ -224,7 +217,6 @@
224
217
  box-shadow: none;
225
218
  }
226
219
 
227
- /* Animation */
228
220
  .Popover:popover-open {
229
221
  animation: popover-show 0.15s ease-out;
230
222
  }
@@ -54,18 +54,15 @@
54
54
  }
55
55
 
56
56
  .TooltipContent {
57
- /* Anchor positioning */
58
57
  position: fixed;
59
58
  position-area: block-start center;
60
59
  position-try-fallbacks: flip-block;
61
60
  margin-block-end: 0.5rem;
62
-
63
- /* Styling */
64
61
  background: var(--tooltip-background, var(--surface-background));
65
- padding: 0.35rem 0.5rem;
66
- border-radius: var(--tooltip-border-radius, var(--surface-border-radius));
67
62
  border: var(--tooltip-border, var(--surface-border));
68
- box-shadow: var(--tooltip-shadow, 0 0.25rem 0.5rem var(--shadow-color));
63
+ border-radius: var(--tooltip-border-radius, var(--surface-border-radius));
64
+ box-shadow: var(--tooltip-shadow, var(--surface-shadow));
65
+ padding: 0.35rem 0.5rem;
69
66
  font-size: max(0.75rem, 11px);
70
67
  line-height: 1.35;
71
68
  font-weight: 500;
@@ -73,8 +70,6 @@
73
70
  max-width: 25ch;
74
71
  width: max-content;
75
72
  text-align: center;
76
-
77
- /* Hidden by default */
78
73
  opacity: 0;
79
74
  pointer-events: none;
80
75
  transition: opacity 0.15s ease-out;
@@ -94,19 +89,16 @@
94
89
  align-items: center;
95
90
  }
96
91
 
97
- /* Show on hover with delay */
98
92
  .Tooltip:has(.TooltipTrigger:hover):not(.open) .TooltipContent {
99
93
  opacity: 1;
100
94
  transition-delay: var(--delay, 0.5s);
101
95
  }
102
96
 
103
- /* Show on focus immediately */
104
97
  .Tooltip:has(.TooltipTrigger:focus-within) .TooltipContent {
105
98
  opacity: 1;
106
99
  transition-delay: 0s;
107
100
  }
108
101
 
109
- /* Force open */
110
102
  .Tooltip.open .TooltipContent {
111
103
  opacity: 1;
112
104
  }
@@ -51,7 +51,7 @@ export function openModal(opts) {
51
51
  dialog.classList.add('contained');
52
52
  if (opts.unstyled)
53
53
  dialog.classList.add('unstyled');
54
- if (!opts.showScrim)
54
+ if (opts.showScrim === false)
55
55
  dialog.classList.add('noScrim');
56
56
  // Apply custom styles
57
57
  if (opts.width)
@@ -482,9 +482,9 @@
482
482
 
483
483
  @property --modal-padding-inline { syntax: "<length>"; inherits: true; initial-value: 24px; }
484
484
  @property --modal-padding-block { syntax: "<length>"; inherits: true; initial-value: 24px; }
485
- @property --modal-width { syntax: "<length>"; inherits: true; initial-value: fit-content; }
486
- @property --modal-max-width { syntax: "<length>"; inherits: true; initial-value: 40rem; }
487
- @property --modal-max-height { syntax: "<length>"; inherits: true; initial-value: 80svh; }
485
+ @property --modal-width { syntax: "*"; inherits: true; initial-value: fit-content; }
486
+ @property --modal-max-width { syntax: "*"; inherits: true; initial-value: 40rem; }
487
+ @property --modal-max-height { syntax: "*"; inherits: true; initial-value: 80svh; }
488
488
  @property --modal-gap { syntax: "<length>"; inherits: true; initial-value: 0px; }
489
489
 
490
490
  @property --modal-actions-background { syntax: "<color>"; inherits: true; initial-value: #f8fafc; }
@@ -111,7 +111,7 @@
111
111
  --tooltip-color: var(--text-color-p);
112
112
  --tooltip-border: var(--surface-border);
113
113
  --tooltip-border-radius: var(--surface-border-radius);
114
- --tooltip-shadow: 0 0.25rem 0.5rem var(--shadow-color);
114
+ --tooltip-shadow: var(--surface-shadow);
115
115
 
116
116
  /* Table compound variables */
117
117
  --table-border: var(--table-border-size) var(--table-border-style) var(--table-border-color);
@@ -358,9 +358,23 @@ input:disabled, textarea:disabled, select:disabled {
358
358
  order: var(--button-icon-order);
359
359
  }
360
360
 
361
+ /**
362
+ * Dialog Backdrop (shared by Modal and ProgrammaticModal)
363
+ */
364
+ dialog.Modal::backdrop,
365
+ dialog.ProgrammaticModal::backdrop {
366
+ background: var(--scrim-background);
367
+ backdrop-filter: var(--scrim-backdrop-filter);
368
+ }
369
+
370
+ dialog.Modal.noScrim::backdrop,
371
+ dialog.ProgrammaticModal.noScrim::backdrop {
372
+ background: transparent;
373
+ backdrop-filter: none;
374
+ }
375
+
361
376
  /**
362
377
  * Programmatic Modal (openModal API)
363
- * Uses native <dialog> element
364
378
  */
365
379
  dialog.ProgrammaticModal {
366
380
  margin: auto;
@@ -372,16 +386,6 @@ dialog.ProgrammaticModal {
372
386
  overflow: visible;
373
387
  }
374
388
 
375
- dialog.ProgrammaticModal::backdrop {
376
- background: var(--scrim-background);
377
- backdrop-filter: var(--scrim-backdrop-filter);
378
- }
379
-
380
- dialog.ProgrammaticModal.noScrim::backdrop {
381
- background: transparent;
382
- backdrop-filter: none;
383
- }
384
-
385
389
  dialog.ProgrammaticModal .ModalContentWrapper {
386
390
  display: contents;
387
391
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lutra",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "bump-and-publish:patch": "pnpm version:patch && pnpm build && npm publish",