@brightspot/ui 6.0.7-pr.248 → 6.0.7-pr.257

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.
@@ -1 +1 @@
1
- {"generatedAt":1786134497683,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"knownPackages":{"testPackages":{"@storybook/addon-vitest":"10.2.12","@vitest/browser-playwright":"4.0.18","playwright":"1.58.2","vitest":"4.0.18"},"stylingPackages":{"tailwindcss":"^3.4.13","autoprefixer":"10.4.21"}},"hasRouterPackage":false,"packageManager":{"type":"yarn","agent":"yarn","nodeLinker":"undefined"},"preview":{"usesGlobals":true},"framework":{"name":"@storybook/web-components-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/web-components","portableStoriesFileCount":0,"applicationFileCount":6,"storybookVersion":"10.2.12","storybookVersionSpecifier":"10.2.12","language":"typescript","storybookPackages":{"@storybook/addon-themes":{"version":"10.2.12"},"@storybook/web-components-vite":{"version":"10.2.12"},"@wc-toolkit/storybook-helpers":{"version":"10.0.0"},"eslint-plugin-storybook":{"version":"10.0.7"},"storybook":{}},"addons":{"@storybook/addon-docs":{"version":"10.2.12"},"@storybook/addon-vitest":{"version":"10.2.12"}},"packageJsonType":"module"}
1
+ {"generatedAt":1786549621414,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"knownPackages":{"testPackages":{"@storybook/addon-vitest":"10.2.12","@vitest/browser-playwright":"4.0.18","playwright":"1.58.2","vitest":"4.0.18"},"stylingPackages":{"tailwindcss":"^3.4.13","autoprefixer":"10.4.21"}},"hasRouterPackage":false,"packageManager":{"type":"yarn","agent":"yarn","nodeLinker":"undefined"},"preview":{"usesGlobals":true},"framework":{"name":"@storybook/web-components-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/web-components","portableStoriesFileCount":0,"applicationFileCount":6,"storybookVersion":"10.2.12","storybookVersionSpecifier":"10.2.12","language":"typescript","storybookPackages":{"@storybook/addon-themes":{"version":"10.2.12"},"@storybook/web-components-vite":{"version":"10.2.12"},"@wc-toolkit/storybook-helpers":{"version":"10.0.0"},"eslint-plugin-storybook":{"version":"10.0.7"},"storybook":{}},"addons":{"@storybook/addon-docs":{"version":"10.2.12"},"@storybook/addon-vitest":{"version":"10.2.12"}},"packageJsonType":"module"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspot/ui",
3
- "version": "6.0.7-pr.248",
3
+ "version": "6.0.7-pr.257",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "description": "A UI library for building Brightspot CMS components.",
@@ -1,10 +1,11 @@
1
1
  :root {
2
2
  --edit-banner-h: minmax(48px, auto);
3
3
  --right-toolbar-w: calc(theme(iconSize.md) + theme(padding.12));
4
- --contentForm-w-min: 360px;
4
+ --contentForm-w-min: 320px;
5
5
  --contentForm-w-max: calc(100cqw - var(--right-toolbar-w));
6
6
  --contentPreview-w-min: 320px;
7
7
  --contentWidget-w-min: 320px;
8
+ --contentWidget-w: 360px;
8
9
  --contentForm-resized-safe-w: clamp(
9
10
  var(--contentForm-w-min),
10
11
  var(--contentForm-resized-w),
@@ -366,8 +367,9 @@
366
367
  @apply !blokk;
367
368
  }
368
369
 
370
+ /* Hug the device width (plus borders) when it fits so the iframe renders unscaled. */
369
371
  & .PreviewFrame-typeDisplay {
370
- @apply [grid-area:preview] [grid-column:container-start/container-end];
372
+ @apply w-[min(100%,calc(var(--ContentEdit-previewWidth,100%)_+_2px))] justify-self-center [grid-area:preview] [grid-column:container-start/container-end];
371
373
  }
372
374
 
373
375
  & .PreviewFrame-typeControls .ComboInput:not(:has(~ .ComboInput)) {
@@ -13,14 +13,40 @@
13
13
  }
14
14
  }
15
15
 
16
- /* Shelf responsive width adjustments */
16
+ /* Shelf width tracks the content form's right edge so the open shelf never
17
+ overlaps the preview/widget. Below 900 the form is minmax(--contentForm-w-min,
18
+ 1fr), sharing the row 50/50 with the one visible panel; minmax() is invalid as
19
+ a width, so reproduce it: half the content area, floored at the form min. */
17
20
  .Page-content.is-previewing,
18
21
  .Page-content.has-widget-panel-open,
19
22
  .Popup-content.is-previewing,
20
23
  .Popup-content.has-widget-panel-open {
21
- /* When any panel is visible (preview OR widgets), use constrained width */
22
24
  .ContentEditDrawer.is-open {
23
- @apply md:w-[var(--contentForm-resized-safe-w,var(--contentForm-w))];
25
+ @apply md:w-[max(var(--contentForm-w-min),calc((100cqw_-_var(--right-toolbar-w))_/_2))];
26
+ }
27
+ }
28
+
29
+ /* >=900 the form column resolves to a definite length; track it. Overrides omit
30
+ `md:` on purpose: container >=900 already implies desktop, and the
31
+ `@container > @media` order that `md:` emits is silently merged away by the
32
+ build's cssnano 4, dropping the gate. */
33
+ @container (min-width: 900px) {
34
+ .Page-content.is-previewing,
35
+ .Page-content.has-widget-panel-open,
36
+ .Popup-content.is-previewing,
37
+ .Popup-content.has-widget-panel-open {
38
+ .ContentEditDrawer.is-open {
39
+ @apply w-[var(--contentForm-resized-safe-w,var(--contentForm-w))];
40
+ }
41
+ }
42
+
43
+ /* Widget only: form fills up to the fixed rail, so anchor to the rail's
44
+ leading edge rather than the unused resized form width. */
45
+ .Page-content:not(.is-previewing).has-widget-panel-open,
46
+ .Popup-content:not(.is-previewing).has-widget-panel-open {
47
+ .ContentEditDrawer.is-open {
48
+ @apply w-auto right-[calc(var(--right-toolbar-w)_+_var(--contentWidget-w)_+_var(--offset))];
49
+ }
24
50
  }
25
51
  }
26
52
 
@@ -147,6 +147,15 @@
147
147
  }
148
148
  }
149
149
 
150
+ /* Fields marked with @NotePosition(ABOVE) (defaulted for embedded/clustered fields) */
151
+ .CIG-row > .CIG-note.is-note-above {
152
+ @apply order-[-1] mb-1.5 mt-0 w-full basis-full;
153
+ }
154
+
155
+ .CIG-row > .CIG-note.is-note-above > .CIG-noteItem {
156
+ @apply mt-0;
157
+ }
158
+
150
159
  /* Equalize the ComboInput widths so that they look aligned. */
151
160
  .CIG .ComboInput {
152
161
  @apply w-auto min-w-[25cqw] max-w-[100cqw];
@@ -563,18 +563,21 @@
563
563
  &.is-previewing.has-widget-panel-open {
564
564
  --contentForm-w: calc(
565
565
  var(--contentForm-w-base) - var(--contentPreview-w-min) -
566
- var(--contentWidget-w-min)
566
+ var(--contentWidget-w)
567
567
  );
568
- /* Safe widths' maximum is the form max, minus the min width of the visible columns (preview & widget) */
568
+ /* Safe widths' maximum is the form max, minus the fixed widget width and the min preview width, so the preview never drops below its minimum. */
569
569
  --contentForm-resized-safe-w: clamp(
570
570
  var(--contentForm-w-min),
571
571
  var(--contentForm-resized-w),
572
572
  calc(
573
573
  var(--contentForm-w-max) - var(--contentPreview-w-min) -
574
- var(--contentWidget-w-min)
574
+ var(--contentWidget-w)
575
575
  )
576
576
  );
577
- @apply md:grid-cols-[var(--contentForm-resized-safe-w,_var(--contentForm-w))_1fr_1fr_var(--right-toolbar-w)];
577
+ /* Preview floors at its min; the rail flexes down to its min to yield
578
+ space so the preview never collapses. The JS DUAL_PANEL_MIN_WIDTH gate
579
+ closes a panel before both hit their mins, so this never overflows. */
580
+ @apply md:grid-cols-[var(--contentForm-resized-safe-w,_var(--contentForm-w))_minmax(var(--contentPreview-w-min),_1fr)_minmax(var(--contentWidget-w-min),_var(--contentWidget-w))_var(--right-toolbar-w)];
578
581
  }
579
582
 
580
583
  /* Preview only */
@@ -588,15 +591,17 @@
588
591
  @apply md:grid-cols-[var(--contentForm-resized-safe-w,_var(--contentForm-w))_1fr_0px_var(--right-toolbar-w)];
589
592
  }
590
593
 
591
- /* Widget only */
594
+ /* Widget only — preview is closed, so the content form reclaims the freed
595
+ space (1fr) while the rail stays a fixed-width sidebar. Resizing is
596
+ disabled here since there is no preview to size the form against. */
592
597
  &:not(.is-previewing).has-widget-panel-open {
593
- /* Safe widths' maximum is the form max, minus the min width of the visible column (widget) */
594
- --contentForm-resized-safe-w: clamp(
595
- var(--contentForm-w-min),
596
- var(--contentForm-resized-w),
597
- calc(var(--contentForm-w-max) - var(--contentWidget-w-min))
598
- );
599
- @apply md:grid-cols-[var(--contentForm-resized-safe-w,_var(--contentForm-w))_0px_1fr_var(--right-toolbar-w)];
598
+ .ContentEdit-resizeWrapper {
599
+ @apply pointer-events-none;
600
+ }
601
+ /* Deliberately no --contentForm-resized-w reset: this state's form track
602
+ doesn't consume it, and leaving it set lets the resized width persist
603
+ for when the preview reopens. */
604
+ @apply md:grid-cols-[minmax(var(--contentForm-w-min),_1fr)_0px_var(--contentWidget-w)_var(--right-toolbar-w)];
600
605
  }
601
606
  }
602
607
  }