@alfadocs/ui-kit 0.24.0 → 0.25.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,8 +1,8 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as o, useId as B, useState as _, useCallback as v, useContext as k, createContext as I } from "react";
2
+ import { forwardRef as t, useId as B, useState as k, useCallback as v, useContext as I, createContext as _ } from "react";
3
3
  import { Slot as F } from "@radix-ui/react-slot";
4
4
  import { c as M } from "./index-D2ZczOXr.js";
5
- const u = I({
5
+ const u = _({
6
6
  headerId: "",
7
7
  interactive: !1,
8
8
  registerHeader: () => {
@@ -45,7 +45,7 @@ const u = I({
45
45
  stretch: !1
46
46
  }
47
47
  }
48
- ), m = o(
48
+ ), m = t(
49
49
  ({
50
50
  variant: r = "default",
51
51
  interactive: e = !1,
@@ -57,10 +57,10 @@ const u = I({
57
57
  onKeyDown: c,
58
58
  ...C
59
59
  }, x) => {
60
- const f = B(), [w, y] = _(!1), N = v(() => y(!0), []), j = e ? {
60
+ const f = B(), [w, y] = k(!1), N = v(() => y(!0), []), j = e ? {
61
61
  ...i ? {} : { role: "button", tabIndex: 0 },
62
- onKeyDown: (t) => {
63
- e && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.currentTarget.click()), c == null || c(t);
62
+ onKeyDown: (o) => {
63
+ e && (o.key === "Enter" || o.key === " ") && (o.preventDefault(), o.currentTarget.click()), c == null || c(o);
64
64
  },
65
65
  onClick: s
66
66
  } : { onClick: s }, H = i ? F : e ? "div" : "article";
@@ -90,9 +90,9 @@ const u = I({
90
90
  }
91
91
  );
92
92
  m.displayName = "Card";
93
- const p = o(
93
+ const p = t(
94
94
  ({ className: r, ...e }, a) => {
95
- const { headerId: i, registerHeader: l } = k(u), n = v(
95
+ const { headerId: i, registerHeader: l } = I(u), n = v(
96
96
  (s) => {
97
97
  s && l(), typeof a == "function" ? a(s) : a && (a.current = s);
98
98
  },
@@ -105,7 +105,15 @@ const p = o(
105
105
  id: i,
106
106
  className: [
107
107
  "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:p-[var(--spacing-md)] ds:pb-0",
108
- "ds:[&_*]:break-normal ds:[&_*]:[overflow-wrap:anywhere]",
108
+ // Wrap policy for header text content. Scoped to DIRECT children
109
+ // (h1–h6 / p / div) and using `break-word` instead of `anywhere`
110
+ // so natural-language titles wrap at word boundaries first; only
111
+ // genuinely unbreakable strings (URLs, hashes) break mid-word
112
+ // when they'd otherwise overflow. The previous `[&_*]:` cascade
113
+ // applied `overflow-wrap: anywhere` to every descendant, which
114
+ // chopped natural-language labels mid-character inside narrow
115
+ // contexts (DescriptionList rows in a Carousel slide).
116
+ "ds:[&>*]:break-normal ds:[&>*]:[overflow-wrap:break-word]",
109
117
  r
110
118
  ].filter(Boolean).join(" "),
111
119
  ...e
@@ -114,7 +122,7 @@ const p = o(
114
122
  }
115
123
  );
116
124
  p.displayName = "Card.Header";
117
- const g = o(
125
+ const g = t(
118
126
  ({ className: r, ...e }, a) => /* @__PURE__ */ d(
119
127
  "div",
120
128
  {
@@ -128,7 +136,7 @@ const g = o(
128
136
  )
129
137
  );
130
138
  g.displayName = "Card.Media";
131
- const h = o(
139
+ const h = t(
132
140
  ({ className: r, ...e }, a) => /* @__PURE__ */ d(
133
141
  "div",
134
142
  {
@@ -139,7 +147,7 @@ const h = o(
139
147
  )
140
148
  );
141
149
  h.displayName = "Card.Body";
142
- const b = o(
150
+ const b = t(
143
151
  ({ className: r, ...e }, a) => /* @__PURE__ */ d(
144
152
  "div",
145
153
  {
@@ -162,4 +170,4 @@ const O = Object.assign(m, {
162
170
  export {
163
171
  O as C
164
172
  };
165
- //# sourceMappingURL=card-CWzuTLYE.js.map
173
+ //# sourceMappingURL=card-C353dU-H.js.map