@djangocfg/ui-core 2.1.530 → 2.1.531

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ui-core",
3
- "version": "2.1.530",
3
+ "version": "2.1.531",
4
4
  "description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -128,7 +128,7 @@
128
128
  "check:contrast": "node scripts/check-preset-contrast.mjs"
129
129
  },
130
130
  "peerDependencies": {
131
- "@djangocfg/i18n": "^2.1.530",
131
+ "@djangocfg/i18n": "^2.1.531",
132
132
  "consola": "^3.4.2",
133
133
  "lucide-react": "^0.545.0",
134
134
  "moment": "^2.30.1",
@@ -206,8 +206,8 @@
206
206
  "@chenglou/pretext": "^0.0.8"
207
207
  },
208
208
  "devDependencies": {
209
- "@djangocfg/i18n": "^2.1.530",
210
- "@djangocfg/typescript-config": "^2.1.530",
209
+ "@djangocfg/i18n": "^2.1.531",
210
+ "@djangocfg/typescript-config": "^2.1.531",
211
211
  "@types/node": "^24.13.3",
212
212
  "@types/react": "19.2.15",
213
213
  "@types/react-dom": "19.2.3",
@@ -80,7 +80,11 @@ const DialogContent = React.forwardRef<
80
80
  ? "left-0 top-0 grid grid-rows-[minmax(0,1fr)] h-[100dvh] w-screen max-w-none gap-0 border-0 p-0 shadow-none data-[state=closed]:zoom-out-[0.98] data-[state=open]:zoom-in-[0.98]"
81
81
  // Rounded on ALL sizes — the radius used to be `sm:`-gated, which left
82
82
  // phone dialogs with hard square corners. Centered, soft-cornered card.
83
- : "left-1/2 top-1/2 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-[var(--radius-dialog)] border p-6 shadow-lg data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
83
+ // Width by MEASUREMENT, not breakpoint: `min()` keeps the card off
84
+ // both edges at any viewport. A `sm:` gate reads the window, so a
85
+ // narrow desktop pane lost its margins and rendered as a sheet with
86
+ // its rounding cropped.
87
+ : "left-1/2 top-1/2 grid w-[min(32rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-[var(--radius-dialog)] border p-6 shadow-lg data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
84
88
  className
85
89
  )}
86
90
  {...props}
@@ -105,7 +109,9 @@ const DialogHeader = ({
105
109
  }: React.HTMLAttributes<HTMLDivElement>) => (
106
110
  <div
107
111
  className={cn(
108
- "flex flex-col space-y-1.5 text-center sm:text-left",
112
+ // Start-aligned at every width: the `sm:` gate centred the title in a
113
+ // narrow pane only, so one dialog read as two different components.
114
+ "flex flex-col space-y-1.5 text-start",
109
115
  className
110
116
  )}
111
117
  {...props}
@@ -119,7 +125,10 @@ const DialogFooter = ({
119
125
  }: React.HTMLAttributes<HTMLDivElement>) => (
120
126
  <div
121
127
  className={cn(
122
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
128
+ // One row, buttons sized to their labels. The `sm:`-gated stack read the
129
+ // window, so a narrow pane got two full-bleed buttons — Cancel as loud as
130
+ // Confirm. `flex-wrap` handles a long label by measurement instead.
131
+ "flex flex-wrap items-center justify-end gap-2",
123
132
  className
124
133
  )}
125
134
  {...props}