@eldrajs/ui 0.1.1 → 0.1.2

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.
package/CHANGELOG.md CHANGED
@@ -81,6 +81,7 @@ Release-please writes the generated notes from commit messages and does not repl
81
81
 
82
82
  ### Fixed
83
83
 
84
+ - **`Lightbox`** — the image sits centred with equal space above and below. Without a thumbnail strip the stage now has bottom padding matching the bar's height (4rem, 4.25rem below 48rem), where the image used to run to the bottom edge of the viewport.
84
85
  - **`Drawer`** — the open dialog stretches between its pinned top and bottom edges instead of taking `100%` of the layout viewport, so a foot pinned to the panel's bottom edge (the filter drawer's **Clear all** / **Show N products**, the cart's **Check out**) sits at the bottom of the visible area on a phone — not under the browser's toolbar, and not above a strip of page.
85
86
  - **`Tabs` no longer clips a focused pill's focus ring at the scrolling list's edge.** The tab list is `overflow-x-auto`, which forces `overflow-y` to compute `auto` as well, so it clips anything a tab paints outside its own border box — on every side, not just the two it scrolls on. The design spec's answer is padding on the list with a matching negative margin, and that was written as the literal `0.25rem` the two ring tokens add up to by default, leaving the ring flush against the clip edge with no slack: raise `--eldra-focus-offset` or `--eldra-focus-width` — a restyle, or simply a `Tabs` inside a `Carousel` slide, since the track sets `--eldra-focus-offset: 4px` and custom properties inherit — and the ring was cut off flat by the difference on three edges at once. The reservation is now `calc(var(--eldra-focus-offset) + var(--eldra-focus-width))`, per axis, with `scroll-padding` to match so the inline half cannot be scrolled out of the visible box; the list's rendered footprint is unchanged. The underline variant is untouched and reserves nothing, its tabs carrying the spec's own inset ring. Measured in a real browser with real `Tab` presses, in pixels (`tabsRing.browser.spec.ts`) — it needs Chromium, like the kit's other browser specs.
86
87
 
package/dist/index.js CHANGED
@@ -8161,16 +8161,6 @@ var _hoisted_7 = [
8161
8161
  "onClick"
8162
8162
  ];
8163
8163
  var barClass = "flex shrink-0 items-center justify-between gap-4 px-4 py-3 text-body-sm text-background";
8164
- var stageClass = "relative min-h-0 flex-1";
8165
- /**
8166
- * No padding here, deliberately — see `slideClass` below for where the 4rem inset actually lives
8167
- * and why. One slide is always the full track width (`carouselPerViewStyle({ base: 1 })` +
8168
- * `eldra-carousel-track`, shared with `Carousel` — see `eldra-carousel-slide`'s own comment in
8169
- * `tailwind.css`), which needs the track's own content box to be exactly the track's own visible
8170
- * width, no more and no less. The three per-view numbers reach the CSS as an inline style rather
8171
- * than as classes for the reason `carouselPerViewStyle`'s own comment gives; constant here, so the
8172
- * object is hoisted out of the render rather than recomputed per patch.
8173
- */
8174
8164
  var imageRootClass = "flex h-full w-full flex-col items-center";
8175
8165
  var imageFrameClass = "w-auto max-w-full flex-1 min-h-0 rounded-md";
8176
8166
  /** Spec "Sizes": "Caption: 0.875rem, centred, padding 0.75rem 1rem 1rem" — overriding `Image`'s own
@@ -8235,6 +8225,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
8235
8225
  * there, but there is nothing to pick between with one photo, so it is hidden too — a consumer
8236
8226
  * who still passes `thumbnails` with one image gets the same result the spec's own rule implies. */
8237
8227
  const single = computed(() => props.images.length <= 1);
8228
+ const showThumbnails = computed(() => props.thumbnails && !single.value);
8238
8229
  const { index: carouselIndex, count, canPrev, canNext, goTo, next, prev } = useCarousel({
8239
8230
  rootRef,
8240
8231
  trackRef,
@@ -8352,6 +8343,16 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
8352
8343
  /** A plain layout wrapper, not a named part (the spec's own anatomy numbers the track/arrows
8353
8344
  * together as one "stage"; see `Lightbox.vue`'s own file comment). `min-h-0` is what lets `track`
8354
8345
  * actually scroll within the flex column rather than growing the whole panel. */
8346
+ const stageClass = computed(() => cx("relative min-h-0 flex-1", !showThumbnails.value && "pb-16 max-md:pb-17"));
8347
+ /**
8348
+ * No padding here, deliberately — see `slideClass` below for where the 4rem inset actually lives
8349
+ * and why. One slide is always the full track width (`carouselPerViewStyle({ base: 1 })` +
8350
+ * `eldra-carousel-track`, shared with `Carousel` — see `eldra-carousel-slide`'s own comment in
8351
+ * `tailwind.css`), which needs the track's own content box to be exactly the track's own visible
8352
+ * width, no more and no less. The three per-view numbers reach the CSS as an inline style rather
8353
+ * than as classes for the reason `carouselPerViewStyle`'s own comment gives; constant here, so the
8354
+ * object is hoisted out of the render rather than recomputed per patch.
8355
+ */
8355
8356
  const TRACK_STYLE = carouselPerViewStyle({ base: 1 });
8356
8357
  /**
8357
8358
  * `touch-pan-x touch-pan-y`, `cursor-grab`/`-grabbing` and
@@ -8444,7 +8445,7 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
8444
8445
  "aria-hidden": "true",
8445
8446
  focusable: "false"
8446
8447
  }, [createElementVNode("path", { d: "M18 6l-12 12" }), createElementVNode("path", { d: "M6 6l12 12" })], -1)])], 10, _hoisted_3$3)]),
8447
- createElementVNode("div", { class: normalizeClass(stageClass) }, [
8448
+ createElementVNode("div", { class: normalizeClass(stageClass.value) }, [
8448
8449
  !single.value ? (openBlock(), createElementBlock("button", {
8449
8450
  key: 0,
8450
8451
  ref_key: "prevButtonRef",
@@ -8526,8 +8527,8 @@ var Lightbox_default = /* @__PURE__ */ defineComponent({
8526
8527
  "aria-hidden": "true",
8527
8528
  focusable: "false"
8528
8529
  }, [createElementVNode("path", { d: "M9 6l6 6l-6 6" })], -1)])], 10, _hoisted_6)) : createCommentVNode("", true)
8529
- ]),
8530
- __props.thumbnails && !single.value && unref(model) ? (openBlock(), createElementBlock("div", {
8530
+ ], 2),
8531
+ showThumbnails.value && unref(model) ? (openBlock(), createElementBlock("div", {
8531
8532
  key: 0,
8532
8533
  "data-part": "thumbnails",
8533
8534
  class: normalizeClass(thumbnailsClass.value)
package/dist/style.css CHANGED
@@ -2903,6 +2903,10 @@
2903
2903
  padding-bottom: var(--spacing-6);
2904
2904
  }
2905
2905
 
2906
+ .pb-16 {
2907
+ padding-bottom: var(--spacing-16);
2908
+ }
2909
+
2906
2910
  .pb-80 {
2907
2911
  padding-bottom: calc(var(--spacing) * 80);
2908
2912
  }
@@ -4471,6 +4475,10 @@
4471
4475
  padding-inline-end: calc(var(--spacing) * 30);
4472
4476
  }
4473
4477
 
4478
+ .max-md\:pb-17 {
4479
+ padding-bottom: calc(var(--spacing) * 17);
4480
+ }
4481
+
4474
4482
  .max-md\:shadow-none {
4475
4483
  --tw-shadow: 0 0 #0000;
4476
4484
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eldrajs/ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Accessible Vue 3 core components for Eldra storefronts: buttons, forms, selects, cards, overlays and navigation, themed through CSS design tokens.",
5
5
  "keywords": [
6
6
  "accessible",