@clicktap/ui 2.3.0 → 2.3.1

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
- "use client";import{jsx as e}from"react/jsx-runtime";import{forwardRef as m}from"react";import{Dialog as f}from"react-aria-components";import{motion as d}from"framer-motion";import{cn as u}from"../../utils/cn.js";const s=m(({style:o,animationVariants:i,...t},n)=>{const r=typeof o=="function"?o(t):o;return e(f,{...t,ref:n,style:r})});let a=null;function c(){return typeof window>"u"?null:(a||(a=d.create(s)),a)}const l=c();function D({className:o,children:i,animationVariants:t,...n}){const r={className:u("p-8 outline-0 max-w-max w-screen absolute top-2/4 left-2/4","-translate-x-1/2 -translate-y-1/2","shadow-[0_8px_24px_rgba(0,0,0,0.1)] rounded-lg bg-white border border-solid border-border-emphasis",o),...n};return l?e(l,{...r,variants:t||{hidden:{opacity:0},visible:{opacity:1}},children:i}):e(s,{...r,children:i})}export{D as Dialog,D as default};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{forwardRef as s}from"react";import{Dialog as f}from"react-aria-components";import{motion as d}from"framer-motion";import{cn as u}from"../../utils/cn.js";const m=s(({style:o,animationVariants:a,...t},i)=>{const r=typeof o=="function"?o(t):o;return e(f,{...t,ref:i,style:r})});let n=null;function c(){return typeof window>"u"?null:(n||(n=d.create(m)),n)}const l=c();function y({className:o,children:a,animationVariants:t,...i}){const r={className:u("p-8 outline-0 max-w-max w-screen absolute top-2/4 left-2/4","-translate-x-1/2 -translate-y-1/2","max-h-[calc(100dvh-2rem)] overflow-y-auto","shadow-[0_8px_24px_rgba(0,0,0,0.1)] rounded-lg bg-white border border-solid border-border-emphasis",o),...i};return l?e(l,{...r,variants:t||{hidden:{opacity:0},visible:{opacity:1}},children:a}):e(m,{...r,children:a})}export{y as Dialog,y as default};
@@ -0,0 +1,32 @@
1
+ # BUGFIX: a `Dialog` taller than the viewport scrolls inside itself
2
+
3
+ **Date:** 2026-09-19
4
+ **Package:** `@clicktap/ui`
5
+ **Affects:** `src/components/Dialog/Dialog.tsx` — every `<Dialog>` rendered inside `<Modal>`.
6
+ **Classification:** BUGFIX
7
+ **Breaking:** No API change. **Visual:** a dialog whose content is taller than the viewport is now capped at the viewport height minus 2rem and scrolls its own content; shorter dialogs render exactly as before.
8
+ **Ticket:** CTAP-1791 (epic CTAP-1785)
9
+
10
+ ## Problem
11
+
12
+ `Dialog` is centered with `absolute top-2/4 left-2/4 -translate-x-1/2 -translate-y-1/2` and had
13
+ no height limit. A dialog taller than the viewport therefore grew past both edges: its top half
14
+ sat above the screen and its footer, the Cancel and Update buttons, below it, with no way to
15
+ scroll to them because the overlay itself does not scroll.
16
+
17
+ CTAP-1791 put the billing address fields into the saved-card edit form, so "Update payment
18
+ method" now carries cardholder name, expiry, postal code, ten address fields and the default
19
+ control. On a laptop viewport the buttons were off screen.
20
+
21
+ ## What changed
22
+
23
+ The dialog gets `max-h-[calc(100dvh-2rem)] overflow-y-auto`. The centering is untouched, so a
24
+ capped dialog still sits in the middle with 1rem clear of each edge and its content scrolls
25
+ inside the rounded, bordered box. `dvh` follows the mobile browser chrome as it shows and hides.
26
+
27
+ ## Consumer action
28
+
29
+ None. A consumer that already wrapped its dialog content in its own scroll container keeps
30
+ working; the outer cap only engages when the content is taller than the viewport. A consumer that
31
+ passes `className` with its own `max-h-*` or `overflow-*` still wins, since `className` merges
32
+ last.
@@ -1,4 +1,14 @@
1
1
  [
2
+ {
3
+ "path": "2026/09/ui-2026-09-19-dialog-scrolls-within-viewport.md",
4
+ "module": "libs/frontend-modules/ui",
5
+ "package": "@clicktap/ui",
6
+ "date": "2026-09-19",
7
+ "title": "BUGFIX: a `Dialog` taller than the viewport scrolls inside itself",
8
+ "classification": "BUGFIX",
9
+ "breaking": "No API change. **Visual:** a dialog whose content is taller than the viewport is now capped at the viewport height minus 2rem and scrolls its own content; shorter dialogs render exactly as before.",
10
+ "affects": "`src/components/Dialog/Dialog.tsx` — every `<Dialog>` rendered inside `<Modal>`."
11
+ },
2
12
  {
3
13
  "path": "2026/09/ui-2026-09-18-pin-input-autofill-and-controlled-value.md",
4
14
  "module": "libs/frontend-modules/ui",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clicktap/ui",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "private": false,
5
5
  "author": "Clicktap",
6
6
  "description": "A library of React UI components and low-level hooks.",