@pactor-app/ui 1.29.0 → 1.31.0

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.
@@ -142,18 +142,6 @@ import {
142
142
  navigationMenuTriggerStyle,
143
143
  toast
144
144
  } from "./chunk-JWZHJEUS.js";
145
- import {
146
- Dialog,
147
- DialogContent,
148
- DialogDescription,
149
- DialogHeader,
150
- DialogTitle,
151
- DialogTrigger,
152
- Drawer,
153
- DrawerContent,
154
- DrawerHeader,
155
- DrawerTitle
156
- } from "./chunk-HAOAXDTW.js";
157
145
  import {
158
146
  Accordion,
159
147
  AccordionContent,
@@ -177,6 +165,18 @@ import {
177
165
  TooltipContent,
178
166
  TooltipTrigger
179
167
  } from "./chunk-RB7RCKAX.js";
168
+ import {
169
+ Dialog,
170
+ DialogContent,
171
+ DialogDescription,
172
+ DialogHeader,
173
+ DialogTitle,
174
+ DialogTrigger,
175
+ Drawer,
176
+ DrawerContent,
177
+ DrawerHeader,
178
+ DrawerTitle
179
+ } from "./chunk-HAOAXDTW.js";
180
180
  import {
181
181
  Button,
182
182
  cn
@@ -595,11 +595,11 @@ function useFormContext() {
595
595
  function formItemClass(layout) {
596
596
  switch (layout) {
597
597
  case "horizontal":
598
- return "mb-4 flex items-baseline gap-2";
598
+ return "mb-4 flex min-h-9 items-center gap-2";
599
599
  case "inline":
600
- return "flex items-center gap-2";
600
+ return "flex min-h-9 items-center gap-2";
601
601
  default:
602
- return "mb-4 flex flex-col gap-1.5";
602
+ return "mb-4 flex min-h-9 flex-col justify-center gap-1.5";
603
603
  }
604
604
  }
605
605
 
@@ -2672,7 +2672,7 @@ function Field2({
2672
2672
  errorStyle
2673
2673
  }) {
2674
2674
  return /* @__PURE__ */ jsxs30(Field, { className, style, children: [
2675
- label || labelHint ? /* @__PURE__ */ jsxs30("div", { className: "flex w-full items-center justify-between gap-2", children: [
2675
+ label || labelHint ? /* @__PURE__ */ jsxs30("div", { className: "flex min-h-3.5 w-full items-center justify-between gap-2", children: [
2676
2676
  label ? /* @__PURE__ */ jsxs30(FieldLabel, { className: labelClassName, style: labelStyle, children: [
2677
2677
  required ? /* @__PURE__ */ jsxs30("span", { "aria-hidden": true, className: "text-destructive", children: [
2678
2678
  "*",
@@ -4782,25 +4782,30 @@ function RadioGroup2({
4782
4782
  ),
4783
4783
  style: inForm ? void 0 : style,
4784
4784
  children: options.map((option, index) => {
4785
- const optionId = `${controlId}-${index}`;
4786
- const optionDisabled = disabled || option.disabled;
4785
+ const textId = `${controlId}-${index}`;
4786
+ const optionDisabled = disabled === true || option.disabled === true;
4787
4787
  return /* @__PURE__ */ jsxs52("span", { className: "inline-flex items-center gap-2", children: [
4788
4788
  /* @__PURE__ */ jsx74(
4789
4789
  RadioGroupItem,
4790
4790
  {
4791
- id: optionId,
4792
4791
  value: option.value,
4793
- disabled: option.disabled
4792
+ disabled: option.disabled,
4793
+ "aria-labelledby": textId
4794
4794
  }
4795
4795
  ),
4796
4796
  /* @__PURE__ */ jsx74(
4797
- "label",
4797
+ "span",
4798
4798
  {
4799
- htmlFor: optionId,
4799
+ id: textId,
4800
4800
  className: cn(
4801
4801
  "text-sm leading-none font-medium",
4802
4802
  optionDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
4803
4803
  ),
4804
+ onClick: () => {
4805
+ if (!optionDisabled) {
4806
+ handleChange(option.value);
4807
+ }
4808
+ },
4804
4809
  children: option.label
4805
4810
  }
4806
4811
  )
@@ -1478,11 +1478,11 @@ function useFormContext() {
1478
1478
  function formItemClass(layout) {
1479
1479
  switch (layout) {
1480
1480
  case "horizontal":
1481
- return "mb-4 flex items-baseline gap-2";
1481
+ return "mb-4 flex min-h-9 items-center gap-2";
1482
1482
  case "inline":
1483
- return "flex items-center gap-2";
1483
+ return "flex min-h-9 items-center gap-2";
1484
1484
  default:
1485
- return "mb-4 flex flex-col gap-1.5";
1485
+ return "mb-4 flex min-h-9 flex-col justify-center gap-1.5";
1486
1486
  }
1487
1487
  }
1488
1488
 
@@ -4617,7 +4617,7 @@ function Field2({
4617
4617
  errorStyle
4618
4618
  }) {
4619
4619
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Field, { className, style, children: [
4620
- label || labelHint ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [
4620
+ label || labelHint ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex min-h-3.5 w-full items-center justify-between gap-2", children: [
4621
4621
  label ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(FieldLabel, { className: labelClassName, style: labelStyle, children: [
4622
4622
  required ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { "aria-hidden": true, className: "text-destructive", children: [
4623
4623
  "*",
@@ -8411,25 +8411,30 @@ function RadioGroup2({
8411
8411
  ),
8412
8412
  style: inForm ? void 0 : style,
8413
8413
  children: options.map((option, index) => {
8414
- const optionId = `${controlId}-${index}`;
8415
- const optionDisabled = disabled || option.disabled;
8414
+ const textId = `${controlId}-${index}`;
8415
+ const optionDisabled = disabled === true || option.disabled === true;
8416
8416
  return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
8417
8417
  /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
8418
8418
  RadioGroupItem,
8419
8419
  {
8420
- id: optionId,
8421
8420
  value: option.value,
8422
- disabled: option.disabled
8421
+ disabled: option.disabled,
8422
+ "aria-labelledby": textId
8423
8423
  }
8424
8424
  ),
8425
8425
  /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
8426
- "label",
8426
+ "span",
8427
8427
  {
8428
- htmlFor: optionId,
8428
+ id: textId,
8429
8429
  className: cn(
8430
8430
  "text-sm leading-none font-medium",
8431
8431
  optionDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
8432
8432
  ),
8433
+ onClick: () => {
8434
+ if (!optionDisabled) {
8435
+ handleChange(option.value);
8436
+ }
8437
+ },
8433
8438
  children: option.label
8434
8439
  }
8435
8440
  )
@@ -154,7 +154,7 @@ import {
154
154
  inferKind,
155
155
  registerBuiltinComponents,
156
156
  useFormContext
157
- } from "../chunk-NDMVVXQE.js";
157
+ } from "../chunk-F4YSZZHL.js";
158
158
  import {
159
159
  ICONS,
160
160
  Icon,
@@ -165,8 +165,8 @@ import {
165
165
  useSidebarDrawer
166
166
  } from "../chunk-44DAGWXZ.js";
167
167
  import "../chunk-JWZHJEUS.js";
168
- import "../chunk-HAOAXDTW.js";
169
168
  import "../chunk-RB7RCKAX.js";
169
+ import "../chunk-HAOAXDTW.js";
170
170
  import "../chunk-WKJUCGV4.js";
171
171
  export {
172
172
  Accordion,
package/dist/index.cjs CHANGED
@@ -1494,11 +1494,11 @@ function useFormContext() {
1494
1494
  function formItemClass(layout) {
1495
1495
  switch (layout) {
1496
1496
  case "horizontal":
1497
- return "mb-4 flex items-baseline gap-2";
1497
+ return "mb-4 flex min-h-9 items-center gap-2";
1498
1498
  case "inline":
1499
- return "flex items-center gap-2";
1499
+ return "flex min-h-9 items-center gap-2";
1500
1500
  default:
1501
- return "mb-4 flex flex-col gap-1.5";
1501
+ return "mb-4 flex min-h-9 flex-col justify-center gap-1.5";
1502
1502
  }
1503
1503
  }
1504
1504
 
@@ -4656,7 +4656,7 @@ function Field2({
4656
4656
  errorStyle
4657
4657
  }) {
4658
4658
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Field, { className, style, children: [
4659
- label || labelHint ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [
4659
+ label || labelHint ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex min-h-3.5 w-full items-center justify-between gap-2", children: [
4660
4660
  label ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(FieldLabel, { className: labelClassName, style: labelStyle, children: [
4661
4661
  required ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { "aria-hidden": true, className: "text-destructive", children: [
4662
4662
  "*",
@@ -8450,25 +8450,30 @@ function RadioGroup2({
8450
8450
  ),
8451
8451
  style: inForm ? void 0 : style,
8452
8452
  children: options.map((option, index) => {
8453
- const optionId = `${controlId}-${index}`;
8454
- const optionDisabled = disabled || option.disabled;
8453
+ const textId = `${controlId}-${index}`;
8454
+ const optionDisabled = disabled === true || option.disabled === true;
8455
8455
  return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
8456
8456
  /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
8457
8457
  RadioGroupItem,
8458
8458
  {
8459
- id: optionId,
8460
8459
  value: option.value,
8461
- disabled: option.disabled
8460
+ disabled: option.disabled,
8461
+ "aria-labelledby": textId
8462
8462
  }
8463
8463
  ),
8464
8464
  /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
8465
- "label",
8465
+ "span",
8466
8466
  {
8467
- htmlFor: optionId,
8467
+ id: textId,
8468
8468
  className: cn(
8469
8469
  "text-sm leading-none font-medium",
8470
8470
  optionDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
8471
8471
  ),
8472
+ onClick: () => {
8473
+ if (!optionDisabled) {
8474
+ handleChange(option.value);
8475
+ }
8476
+ },
8472
8477
  children: option.label
8473
8478
  }
8474
8479
  )
package/dist/index.js CHANGED
@@ -154,15 +154,7 @@ import {
154
154
  inferKind,
155
155
  registerBuiltinComponents,
156
156
  useFormContext
157
- } from "./chunk-NDMVVXQE.js";
158
- import {
159
- InteractionProvider,
160
- OVERLAY_CANCEL_PAYLOAD,
161
- OverlayHost,
162
- OverlayManager,
163
- createUiBridge,
164
- registerInteractionActions
165
- } from "./chunk-U5EFJR5Z.js";
157
+ } from "./chunk-F4YSZZHL.js";
166
158
  import {
167
159
  AdminLayout,
168
160
  BlankLayout,
@@ -184,9 +176,17 @@ import {
184
176
  normalizeIconName,
185
177
  useSidebarDrawer
186
178
  } from "./chunk-44DAGWXZ.js";
179
+ import {
180
+ InteractionProvider,
181
+ OVERLAY_CANCEL_PAYLOAD,
182
+ OverlayHost,
183
+ OverlayManager,
184
+ createUiBridge,
185
+ registerInteractionActions
186
+ } from "./chunk-U5EFJR5Z.js";
187
187
  import "./chunk-JWZHJEUS.js";
188
- import "./chunk-HAOAXDTW.js";
189
188
  import "./chunk-RB7RCKAX.js";
189
+ import "./chunk-HAOAXDTW.js";
190
190
  import "./chunk-WKJUCGV4.js";
191
191
  export {
192
192
  Accordion,
package/dist/ui/index.js CHANGED
@@ -162,28 +162,6 @@ import {
162
162
  typographyVariants,
163
163
  useCarousel
164
164
  } from "../chunk-JWZHJEUS.js";
165
- import {
166
- Dialog,
167
- DialogClose,
168
- DialogContent,
169
- DialogDescription,
170
- DialogFooter,
171
- DialogHeader,
172
- DialogOverlay,
173
- DialogPortal,
174
- DialogTitle,
175
- DialogTrigger,
176
- Drawer,
177
- DrawerClose,
178
- DrawerContent,
179
- DrawerDescription,
180
- DrawerFooter,
181
- DrawerHeader,
182
- DrawerOverlay,
183
- DrawerPortal,
184
- DrawerTitle,
185
- DrawerTrigger
186
- } from "../chunk-HAOAXDTW.js";
187
165
  import {
188
166
  Accordion,
189
167
  AccordionContent,
@@ -241,6 +219,28 @@ import {
241
219
  TooltipTrigger,
242
220
  useSidebar
243
221
  } from "../chunk-RB7RCKAX.js";
222
+ import {
223
+ Dialog,
224
+ DialogClose,
225
+ DialogContent,
226
+ DialogDescription,
227
+ DialogFooter,
228
+ DialogHeader,
229
+ DialogOverlay,
230
+ DialogPortal,
231
+ DialogTitle,
232
+ DialogTrigger,
233
+ Drawer,
234
+ DrawerClose,
235
+ DrawerContent,
236
+ DrawerDescription,
237
+ DrawerFooter,
238
+ DrawerHeader,
239
+ DrawerOverlay,
240
+ DrawerPortal,
241
+ DrawerTitle,
242
+ DrawerTrigger
243
+ } from "../chunk-HAOAXDTW.js";
244
244
  import {
245
245
  Button,
246
246
  buttonVariants,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pactor-app/ui",
3
- "version": "1.29.0",
3
+ "version": "1.31.0",
4
4
  "description": "Pactor UI kit (shadcn): the single built-in UI kit — vendored shadcn/ui components (Base UI primitives + cva + tailwind-merge + lucide-react), props contracts, interaction core (OverlayManager / UiBridge) and layouts, with build-time Tailwind v4 prebuilt styles.css (zero consumer-side Tailwind config)",
5
5
  "keywords": [
6
6
  "pactor",
@@ -107,11 +107,11 @@
107
107
  "react-resizable-panels": "^4.12.3",
108
108
  "tailwind-merge": "^3.6.0",
109
109
  "vaul": "^1.1.2",
110
- "@pactor-app/core": "1.29.0",
111
- "@pactor-app/permission": "1.29.0",
112
- "@pactor-app/markdown": "1.29.0",
113
- "@pactor-app/router": "1.29.0",
114
- "@pactor-app/runtime": "1.29.0"
110
+ "@pactor-app/core": "1.31.0",
111
+ "@pactor-app/router": "1.31.0",
112
+ "@pactor-app/markdown": "1.31.0",
113
+ "@pactor-app/permission": "1.31.0",
114
+ "@pactor-app/runtime": "1.31.0"
115
115
  },
116
116
  "peerDependencies": {
117
117
  "react": ">=18",
package/styles.css CHANGED
@@ -832,9 +832,15 @@
832
832
  .min-h-0 {
833
833
  min-height: 0px;
834
834
  }
835
+ .min-h-3\.5 {
836
+ min-height: calc(var(--spacing) * 3.5);
837
+ }
835
838
  .min-h-4 {
836
839
  min-height: calc(var(--spacing) * 4);
837
840
  }
841
+ .min-h-9 {
842
+ min-height: calc(var(--spacing) * 9);
843
+ }
838
844
  .min-h-16 {
839
845
  min-height: calc(var(--spacing) * 16);
840
846
  }