@abpjs/ui 0.2.0-next.32 → 0.2.0-next.34

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/dist/index.d.ts CHANGED
@@ -2069,10 +2069,12 @@ interface PreviewCardProps {
2069
2069
  title: ReactNode;
2070
2070
  /** A line under the name: a username or a key, which may be a `RecordKey`. */
2071
2071
  subtitle?: ReactNode;
2072
- /** Its values, label then value; an empty value shows as the empty mark. */
2072
+ /** Its values, label then value; an empty value shows as the empty mark. `wrap` lets a long one (a description) run
2073
+ * to three lines instead of one. */
2073
2074
  items?: {
2074
2075
  label: ReactNode;
2075
2076
  value?: ReactNode;
2077
+ wrap?: boolean;
2076
2078
  }[];
2077
2079
  }
2078
2080
  /** What a form makes, in a `FormDialog`'s preview: a head (media, name, sub-line) and its values in a list. */
package/dist/index.js CHANGED
@@ -1603,7 +1603,7 @@ function useTokenVar() {
1603
1603
  }
1604
1604
 
1605
1605
  // src/version.ts
1606
- var ABP_UI_VERSION = true ? "0.2.0-next.32" : "0.0.0-dev";
1606
+ var ABP_UI_VERSION = true ? "0.2.0-next.34" : "0.0.0-dev";
1607
1607
 
1608
1608
  // src/provider/time-zone.tsx
1609
1609
  import { createContext, useContext } from "react";
@@ -5188,7 +5188,8 @@ function PageIllustration({ of, searching, scale = 1 }) {
5188
5188
  "aria-hidden": true,
5189
5189
  dir: "ltr",
5190
5190
  position: "relative",
5191
- flexShrink: 0,
5191
+ flexShrink: 1,
5192
+ minW: "0",
5192
5193
  align: "center",
5193
5194
  justify: "center",
5194
5195
  gap: "14px",
@@ -5366,8 +5367,8 @@ function EmptyState({
5366
5367
  justifyContent: "center",
5367
5368
  role,
5368
5369
  "aria-live": live ? "polite" : void 0,
5369
- children: /* @__PURE__ */ jsxs23(ChakraEmptyState.Content, { gap: drawn ? "5" : "4", "data-empty-kind": kind, "data-empty-variant": variant, children: [
5370
- /* @__PURE__ */ jsx31(ChakraEmptyState.Indicator, { children: art ? /* @__PURE__ */ jsx31(EmptyArtDrawing, { art, width: size === "md" ? "200px" : "150px", height: size === "md" ? "160px" : "120px" }) : drawn ? /* @__PURE__ */ jsx31(PageIllustration, { of: illustration ?? "records", searching: live, scale: size === "md" ? 1 : 0.8 }) : /* @__PURE__ */ jsx31(Drawing, { size, tone, children: icon ?? /* @__PURE__ */ jsx31(Inbox, {}) }) }),
5370
+ children: /* @__PURE__ */ jsxs23(ChakraEmptyState.Content, { gap: drawn ? "5" : "4", maxW: "full", minW: "0", "data-empty-kind": kind, "data-empty-variant": variant, children: [
5371
+ /* @__PURE__ */ jsx31(ChakraEmptyState.Indicator, { maxW: "full", minW: "0", children: art ? /* @__PURE__ */ jsx31(EmptyArtDrawing, { art, width: size === "md" ? "200px" : "150px", height: size === "md" ? "160px" : "120px" }) : drawn ? /* @__PURE__ */ jsx31(PageIllustration, { of: illustration ?? "records", searching: live, scale: size === "md" ? 1 : 0.8 }) : /* @__PURE__ */ jsx31(Drawing, { size, tone, children: icon ?? /* @__PURE__ */ jsx31(Inbox, {}) }) }),
5371
5372
  /* @__PURE__ */ jsxs23(VStack, { gap: "1.5", textAlign: "center", maxW: "md", children: [
5372
5373
  /* @__PURE__ */ jsx31(ChakraEmptyState.Title, { textStyle: size === "md" ? "lg" : "md", fontWeight: "semibold", color: "fg", children: title }),
5373
5374
  description != null && /* @__PURE__ */ jsx31(ChakraEmptyState.Description, { textStyle: "sm", color: "fg.muted", children: description })
@@ -7039,6 +7040,12 @@ function FormDialog({
7039
7040
  mark(e.target, wrong);
7040
7041
  if (problems.length > 0) setProblems(invalidControls(e.currentTarget).map(describe2));
7041
7042
  }
7043
+ function changed(e) {
7044
+ const el = e.target;
7045
+ if (!isControl(el) || !el.willValidate || !el.checkValidity()) return;
7046
+ mark(el, false);
7047
+ if (problems.length > 0) setProblems(invalidControls(e.currentTarget).map(describe2));
7048
+ }
7042
7049
  return /* @__PURE__ */ jsx44(Dialog4.Root, { open, onOpenChange: (e) => onOpenChange(e.open), size: shape === "wide" ? "xl" : shape, placement: "center", scrollBehavior: "inside", children: /* @__PURE__ */ jsxs32(Portal12, { children: [
7043
7050
  /* @__PURE__ */ jsx44(Dialog4.Backdrop, {}),
7044
7051
  /* @__PURE__ */ jsx44(Dialog4.Positioner, { children: /* @__PURE__ */ jsx44(Dialog4.Content, { asChild: true, ...shape === "wide" ? { maxW: "min(57.5rem, calc(100vw - 2rem))", w: "full" } : {}, children: /* @__PURE__ */ jsxs32(
@@ -7046,6 +7053,7 @@ function FormDialog({
7046
7053
  {
7047
7054
  onSubmit: hideSubmit ? (e) => e.preventDefault() : submit,
7048
7055
  onBlur: hideSubmit ? void 0 : left,
7056
+ onChange: hideSubmit ? void 0 : changed,
7049
7057
  onInput: (e) => typed.current.add(e.target),
7050
7058
  noValidate: true,
7051
7059
  children: [
@@ -7123,7 +7131,7 @@ function PreviewCard({ media, title, subtitle, items = [] }) {
7123
7131
  ] }),
7124
7132
  items.length > 0 && /* @__PURE__ */ jsx44(chakra26.dl, { display: "grid", gridTemplateColumns: "auto minmax(0, 1fr)", columnGap: "4", rowGap: "2", textStyle: "body.sm", m: "0", children: items.map((item, i) => /* @__PURE__ */ jsxs32(Fragment15, { children: [
7125
7133
  /* @__PURE__ */ jsx44(chakra26.dt, { color: "fg.muted", children: item.label }),
7126
- /* @__PURE__ */ jsx44(chakra26.dd, { m: "0", minW: "0", truncate: true, children: item.value ?? EMPTY_VALUE })
7134
+ /* @__PURE__ */ jsx44(chakra26.dd, { m: "0", minW: "0", ...item.wrap ? { lineClamp: 3 } : { truncate: true }, children: item.value ?? EMPTY_VALUE })
7127
7135
  ] }, i)) })
7128
7136
  ] });
7129
7137
  }