@wippy-fe/theme 0.0.60 → 0.0.61

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 ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ ## 0.0.61 (2026-10-05)
4
+
5
+ ### Fixed
6
+
7
+ - Anchored PrimeVue dropdowns inside web components can open above their field when there is insufficient space below.
8
+ - Dropdowns can flip horizontally and shrink to the available viewport width, keeping long options and search fields visible on narrow screens.
9
+ - Filtering preserves the placement and width rules when PrimeVue updates the dropdown's inline styles.
10
+
11
+ ### Compatibility
12
+
13
+ - CSS anchor placement is enabled only when the browser supports the required placement, flip and sizing features. Other browsers keep the existing placement path.
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "packageVersion": "0.0.60",
3
+ "packageVersion": "0.0.61",
4
4
  "implementationRelease": "1.0.60",
5
5
  "compatibility": {
6
- "themePackageVersion": "0.0.60",
6
+ "themePackageVersion": "0.0.61",
7
7
  "manifestSchemaVersion": "1.0.0",
8
8
  "implementationRelease": "1.0.60",
9
9
  "tailwindVersion": "3.4.19",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wippy-fe/theme",
3
- "version": "0.0.60",
3
+ "version": "0.0.61",
4
4
  "description": "Theme variables, shared Tailwind config, and PrimeVue styling for Wippy web components.",
5
5
  "type": "module",
6
6
  "main": "theme-config.css",
@@ -24,6 +24,7 @@
24
24
  "primevue-plugin.ts",
25
25
  "primevue/",
26
26
  "THEMING.md",
27
+ "CHANGELOG.md",
27
28
  "README.md"
28
29
  ],
29
30
  "dependencies": {
@@ -47,9 +47,10 @@ function supportsTopLayer(): boolean {
47
47
  * SELF-ANCHORED overlay families whose PrimeVue panel aligns to the component root,
48
48
  * which is the Portal placeholder's DOM parent (`Select`, `MultiSelect`, `TreeSelect`,
49
49
  * `CascadeSelect` — live-verified on `Select`; the others share the same align-to-root
50
- * shape. `AutoComplete` is excluded — see {@link SELF_ANCHORED_OVERLAY}). Chrome/Edge
51
- * 125+, Firefox 147+, Safari 26+. Anything else (older engine, or menus / popovers that
52
- * align to an arbitrary caller-supplied target) keeps S1's pinned-layer positioning. S2 runs
50
+ * shape. `AutoComplete` is excluded — see {@link SELF_ANCHORED_OVERLAY}). S2 requires
51
+ * the anchor, placement, fallback and sizing features checked below. Engines that lack
52
+ * a required feature, and menus / popovers that align to an arbitrary caller-supplied
53
+ * target, keep S1's pinned-layer positioning. S2 runs
53
54
  * only behind this feature gate, and `applyAnchor` restores PrimeVue's own inline positioning
54
55
  * verbatim (S1) if a promoted overlay can't enter the top layer — so the stacking fix always
55
56
  * holds and positioning never regresses.
@@ -62,7 +63,10 @@ function supportsAnchor(): boolean {
62
63
  && typeof CSS !== 'undefined'
63
64
  && typeof CSS.supports === 'function'
64
65
  && CSS.supports('anchor-name: --a')
65
- && CSS.supports('top', 'anchor(--a bottom)')
66
+ && CSS.supports('position-area', 'bottom span-right')
67
+ && CSS.supports('position-try-fallbacks', 'flip-block')
68
+ && CSS.supports('min-width', 'min(anchor-size(width), 100vw)')
69
+ && CSS.supports('max-width', 'stretch')
66
70
  )
67
71
  }
68
72
 
@@ -92,9 +96,12 @@ function setAnchorStyles(overlay: HTMLElement, anchorName: string): void {
92
96
  s.setProperty('inset', 'auto', 'important')
93
97
  s.setProperty('margin', '0', 'important')
94
98
  s.setProperty('position-anchor', anchorName)
95
- s.setProperty('top', `anchor(${anchorName} bottom)`, 'important')
96
- s.setProperty('left', `anchor(${anchorName} left)`, 'important')
97
- s.setProperty('position-try-fallbacks', 'flip-block')
99
+ // Flip the placement area rather than important inset declarations. Important
100
+ // anchor() offsets override the fallback's offsets and leave the panel offscreen.
101
+ s.setProperty('position-area', 'bottom span-right')
102
+ s.setProperty('position-try-fallbacks', 'flip-block, flip-inline, flip-block flip-inline')
103
+ s.setProperty('min-width', 'min(anchor-size(width), 100vw)', 'important')
104
+ s.setProperty('max-width', 'stretch', 'important')
98
105
  }
99
106
 
100
107
  /**
@@ -106,8 +113,8 @@ function setAnchorStyles(overlay: HTMLElement, anchorName: string): void {
106
113
  * inline `style`. Since an inline style has ONE slot per property, that plain write
107
114
  * REPLACES our `!important` value+priority — so a one-shot write is not durable. We
108
115
  * therefore also watch the overlay's own `style` and re-apply whenever PrimeVue clobbers
109
- * it; the guard (`top` is no longer `!important`) makes the re-apply idempotent (never a
110
- * loop). The observer is released when the overlay leaves its layer ({@link releaseAnchor}).
116
+ * it; checking the expected neutral offsets and margin makes the re-apply idempotent.
117
+ * The observer is released when the overlay leaves its layer ({@link releaseAnchor}).
111
118
  */
112
119
  function applyAnchor(overlay: HTMLElement, anchorName: string): void {
113
120
  if (!SELF_ANCHORED_OVERLAY.test(overlay.className))
@@ -132,8 +139,16 @@ function applyAnchor(overlay: HTMLElement, anchorName: string): void {
132
139
  }
133
140
  if (!anchorStyleObservers.has(overlay)) {
134
141
  const obs = new MutationObserver(() => {
135
- if (overlay.style.getPropertyPriority('top') !== 'important')
142
+ const s = overlay.style
143
+ if (s.top !== 'auto' || s.left !== 'auto' || s.margin !== '0px'
144
+ || s.getPropertyPriority('top') !== 'important'
145
+ || s.getPropertyPriority('left') !== 'important'
146
+ || s.getPropertyPriority('margin') !== 'important'
147
+ || s.getPropertyPriority('min-width') !== 'important'
148
+ || s.maxWidth !== 'stretch'
149
+ || s.getPropertyPriority('max-width') !== 'important') {
136
150
  setAnchorStyles(overlay, anchorName)
151
+ }
137
152
  })
138
153
  obs.observe(overlay, { attributes: true, attributeFilter: ['style'] })
139
154
  anchorStyleObservers.set(overlay, obs)
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "packageVersion": "0.0.60",
3
+ "packageVersion": "0.0.61",
4
4
  "compatibility": {
5
- "themePackageVersion": "0.0.60",
5
+ "themePackageVersion": "0.0.61",
6
6
  "manifestSchemaVersion": "1.0.0",
7
7
  "implementationRelease": "1.0.60",
8
8
  "tailwindVersion": "3.4.19",
package/tokens.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "packageVersion": "0.0.60",
3
+ "packageVersion": "0.0.61",
4
4
  "implementationRelease": "1.0.60",
5
5
  "generatedFrom": [
6
6
  "theme-config.css",
7
7
  "contracts/theme-contract.json"
8
8
  ],
9
9
  "compatibility": {
10
- "themePackageVersion": "0.0.60",
10
+ "themePackageVersion": "0.0.61",
11
11
  "manifestSchemaVersion": "1.0.0",
12
12
  "implementationRelease": "1.0.60",
13
13
  "tailwindVersion": "3.4.19",