@alfadocs/ui-kit 1.42.0 → 1.44.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.
Files changed (126) hide show
  1. package/dist/_chunks/{calendar-ChJQzRw-.js → calendar-U6N0F99w.js} +383 -359
  2. package/dist/_chunks/calendar-workspace-DBYAtdyd.js +12161 -0
  3. package/dist/_chunks/control-room-rail-Cv7GpMqX.js +354 -0
  4. package/dist/_chunks/{face-scheme-Dg6ZyLKb.js → face-scheme-Bm6pe7R8.js} +265 -275
  5. package/dist/_chunks/help-me-write-templates-GUeEn3Ff.js +741 -0
  6. package/dist/_chunks/{marketplace-app-shell-D_g9BaDI.js → marketplace-app-shell-DdwPj03y.js} +3 -3
  7. package/dist/_chunks/{notes-panel-CRAovkjx.js → notes-panel-CY4KmDo-.js} +159 -152
  8. package/dist/_chunks/{panel-subview-PMBRPFOa.js → panel-subview-CYnuX-KR.js} +61 -40
  9. package/dist/_chunks/rich-text-editor-BYE6kK4u.js +3839 -0
  10. package/dist/_chunks/{sidebar-ClTY9lLI.js → sidebar-DbZXLl8h.js} +2 -2
  11. package/dist/_chunks/tab-bar-Cw9UK18Z.js +228 -0
  12. package/dist/_chunks/{tool-rail-D89USYE6.js → tool-rail-CCFqDfAn.js} +282 -276
  13. package/dist/_chunks/undo-2-CYNAzclj.js +26 -0
  14. package/dist/_chunks/use-edge-resize-BHesP0kg.js +149 -0
  15. package/dist/_chunks/use-scroll-overflow-UbLrUfBo.js +72 -0
  16. package/dist/_chunks/variables-menu-vXUaSBj4.js +401 -0
  17. package/dist/agent-catalog.json +84 -3
  18. package/dist/agent-i18n/en.json +14 -3
  19. package/dist/components/calendar/calendar.d.ts +6 -0
  20. package/dist/components/calendar/index.js +1 -1
  21. package/dist/components/control-room-rail/control-room-rail.d.ts +9 -0
  22. package/dist/components/control-room-rail/index.js +1 -1
  23. package/dist/components/face-scheme/index.js +1 -1
  24. package/dist/components/index.d.ts +1 -0
  25. package/dist/components/notes-panel/index.js +1 -1
  26. package/dist/components/notes-panel/notes-panel.d.ts +4 -0
  27. package/dist/components/panel-subview/index.js +1 -1
  28. package/dist/components/panel-subview/panel-subview.d.ts +6 -0
  29. package/dist/components/rich-text-editor/editor-toolbar.d.ts +35 -3
  30. package/dist/components/rich-text-editor/index.d.ts +1 -1
  31. package/dist/components/rich-text-editor/index.js +1 -1
  32. package/dist/components/rich-text-editor/rich-text-editor.d.ts +98 -15
  33. package/dist/components/sidebar/index.js +1 -1
  34. package/dist/components/tab-bar/index.js +1 -1
  35. package/dist/components/tool-rail/index.js +1 -1
  36. package/dist/components/tool-rail/tool-rail.d.ts +16 -0
  37. package/dist/components/variables-menu/index.d.ts +4 -0
  38. package/dist/components/variables-menu/index.js +6 -0
  39. package/dist/components/variables-menu/variables-menu.agent.d.ts +10 -0
  40. package/dist/components/variables-menu/variables-menu.d.ts +53 -0
  41. package/dist/hooks/index.d.ts +2 -0
  42. package/dist/hooks/index.js +35 -32
  43. package/dist/hooks/use-edge-resize.d.ts +13 -1
  44. package/dist/host-compat.css +5 -5
  45. package/dist/i18n/locales/ar.d.ts +77 -6
  46. package/dist/i18n/locales/ar.js +78 -7
  47. package/dist/i18n/locales/de.d.ts +77 -6
  48. package/dist/i18n/locales/de.js +78 -7
  49. package/dist/i18n/locales/el.d.ts +77 -6
  50. package/dist/i18n/locales/el.js +78 -7
  51. package/dist/i18n/locales/en.d.ts +77 -6
  52. package/dist/i18n/locales/en.js +85 -7
  53. package/dist/i18n/locales/es.d.ts +77 -6
  54. package/dist/i18n/locales/es.js +78 -7
  55. package/dist/i18n/locales/fr.d.ts +77 -6
  56. package/dist/i18n/locales/fr.js +78 -7
  57. package/dist/i18n/locales/hi.d.ts +77 -6
  58. package/dist/i18n/locales/hi.js +78 -7
  59. package/dist/i18n/locales/it.d.ts +77 -6
  60. package/dist/i18n/locales/it.js +78 -7
  61. package/dist/i18n/locales/ja.d.ts +77 -6
  62. package/dist/i18n/locales/ja.js +78 -7
  63. package/dist/i18n/locales/nl.d.ts +77 -6
  64. package/dist/i18n/locales/nl.js +78 -7
  65. package/dist/i18n/locales/pl.d.ts +77 -6
  66. package/dist/i18n/locales/pl.js +78 -7
  67. package/dist/i18n/locales/pt.d.ts +77 -6
  68. package/dist/i18n/locales/pt.js +78 -7
  69. package/dist/i18n/locales/ro.d.ts +77 -6
  70. package/dist/i18n/locales/ro.js +78 -7
  71. package/dist/i18n/locales/ru.d.ts +77 -6
  72. package/dist/i18n/locales/ru.js +78 -7
  73. package/dist/i18n/locales/sq.d.ts +77 -6
  74. package/dist/i18n/locales/sq.js +78 -7
  75. package/dist/i18n/locales/sv.d.ts +77 -6
  76. package/dist/i18n/locales/sv.js +78 -7
  77. package/dist/i18n/locales/tr.d.ts +77 -6
  78. package/dist/i18n/locales/tr.js +78 -7
  79. package/dist/i18n/locales/zh.d.ts +77 -6
  80. package/dist/i18n/locales/zh.js +78 -7
  81. package/dist/index.js +916 -913
  82. package/dist/locales/ar.json +78 -7
  83. package/dist/locales/de.json +78 -7
  84. package/dist/locales/el.json +78 -7
  85. package/dist/locales/en.json +78 -7
  86. package/dist/locales/es.json +78 -7
  87. package/dist/locales/fr.json +78 -7
  88. package/dist/locales/hi.json +78 -7
  89. package/dist/locales/it.json +78 -7
  90. package/dist/locales/ja.json +78 -7
  91. package/dist/locales/nl.json +78 -7
  92. package/dist/locales/pl.json +78 -7
  93. package/dist/locales/pt.json +78 -7
  94. package/dist/locales/ro.json +78 -7
  95. package/dist/locales/ru.json +78 -7
  96. package/dist/locales/sq.json +78 -7
  97. package/dist/locales/sv.json +78 -7
  98. package/dist/locales/tr.json +78 -7
  99. package/dist/locales/zh.json +78 -7
  100. package/dist/patterns/calendar/calendar-bookings-panel.d.ts +8 -3
  101. package/dist/patterns/calendar/calendar-care-rules.d.ts +49 -0
  102. package/dist/patterns/calendar/calendar-task-editor.d.ts +31 -0
  103. package/dist/patterns/calendar/calendar-workspace.d.ts +8 -1
  104. package/dist/patterns/calendar/calendar-workspace.model.d.ts +39 -12
  105. package/dist/patterns/calendar/calendar.data.d.ts +9 -0
  106. package/dist/patterns/calendar/calendar.journey.d.ts +35 -3
  107. package/dist/patterns/calendar/calendar.model.d.ts +23 -1
  108. package/dist/patterns/calendar/calendar.sheets.d.ts +21 -3
  109. package/dist/patterns/calendar/calendar.surface.d.ts +6 -1
  110. package/dist/patterns/calendar/calendar.types.d.ts +32 -1
  111. package/dist/patterns/calendar/index.js +1 -1
  112. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +58 -26
  113. package/dist/patterns/help-me-write-templates/index.d.ts +1 -1
  114. package/dist/patterns/help-me-write-templates/index.js +1 -1
  115. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  116. package/dist/tokens.css +6 -6
  117. package/package.json +5 -1
  118. package/dist/_chunks/calendar-workspace-qlxrxCqm.js +0 -11392
  119. package/dist/_chunks/control-room-rail-CnNZusR5.js +0 -337
  120. package/dist/_chunks/help-me-write-templates-B-m7zgJa.js +0 -775
  121. package/dist/_chunks/highlighter-DSkckT2Q.js +0 -15
  122. package/dist/_chunks/rich-text-editor-DUMeifwc.js +0 -3176
  123. package/dist/_chunks/tab-bar-rDkLiaA6.js +0 -268
  124. package/dist/_chunks/use-edge-resize-ZnGG7gyO.js +0 -139
  125. package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +0 -32
  126. package/dist/_chunks/wand-sparkles-DAjKyhz7.js +0 -27
@@ -10,7 +10,7 @@ import { Slot as ls } from "@radix-ui/react-slot";
10
10
  import { c as T } from "./index-D2ZczOXr.js";
11
11
  import { useTranslation as A } from "react-i18next";
12
12
  import { u as cs } from "./registry-DvAUVLHh.js";
13
- import { u as us } from "./use-edge-resize-ZnGG7gyO.js";
13
+ import { u as us } from "./use-edge-resize-BHesP0kg.js";
14
14
  import { c as ms } from "./compose-refs-C0k0tdqF.js";
15
15
  import { a as vs, b as ps, d as fs } from "./input-surface-xyERuLU_.js";
16
16
  import { X as gs } from "./x-B5YnXwCz.js";
@@ -1347,4 +1347,4 @@ export {
1347
1347
  Ss as s,
1348
1348
  N as u
1349
1349
  };
1350
- //# sourceMappingURL=sidebar-ClTY9lLI.js.map
1350
+ //# sourceMappingURL=sidebar-DbZXLl8h.js.map
@@ -0,0 +1,228 @@
1
+ import { jsx as a, jsxs as d, Fragment as D } from "react/jsx-runtime";
2
+ import { forwardRef as F, Fragment as O } from "react";
3
+ import { c } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as E } from "react-i18next";
5
+ import { B as M } from "./badge-BudgzTe_.js";
6
+ import { D as o } from "./dropdown-menu-DU-Hrf33.js";
7
+ import { u as P } from "./use-media-query-CcAx5SMM.js";
8
+ import { u as Q, a as q } from "./use-scroll-overflow-UbLrUfBo.js";
9
+ import { C as G } from "./chevron-down-DWE7GSq9.js";
10
+ import { C as H } from "./check-DrFSN__t.js";
11
+ import { C as I } from "./chevron-left-B8cOyH-V.js";
12
+ import { C as J } from "./chevron-right-I9AeSxH2.js";
13
+ function K(r) {
14
+ return r > 99 ? "99+" : String(r);
15
+ }
16
+ const U = c("ds:shrink-0", {
17
+ variants: {
18
+ position: {
19
+ top: "ds:pt-[var(--spacing-md)]",
20
+ bottom: "ds:pb-[var(--spacing-md)]"
21
+ },
22
+ fill: {
23
+ false: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
24
+ true: ""
25
+ }
26
+ },
27
+ defaultVariants: { position: "top", fill: !1 }
28
+ }), W = "ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--card-border)] ds:bg-[var(--card)]/80 ds:backdrop-blur-md ds:shadow-[var(--shadow-md)]", X = [
29
+ "ds:flex ds:[justify-content:safe_center] ds:overflow-x-auto ds:py-[var(--spacing-xs)]",
30
+ "ds:[--tabbar-mask-start:black] ds:[--tabbar-mask-end:black]",
31
+ "ds:ltr:data-[fade-start=true]:[--tabbar-mask-start:transparent]",
32
+ "ds:ltr:data-[fade-end=true]:[--tabbar-mask-end:transparent]",
33
+ "ds:rtl:data-[fade-start=true]:[--tabbar-mask-end:transparent]",
34
+ "ds:rtl:data-[fade-end=true]:[--tabbar-mask-start:transparent]",
35
+ "ds:[mask-image:linear-gradient(to_right,var(--tabbar-mask-start)_0,black_var(--tabbar-fade-distance,var(--spacing-lg)),black_calc(100%-var(--tabbar-fade-distance,var(--spacing-lg))),var(--tabbar-mask-end)_100%)]",
36
+ "ds:motion-reduce:[mask-image:none]",
37
+ "ds:[.theme-accessible_&]:[mask-image:none]",
38
+ "ds:forced-colors:[mask-image:none]"
39
+ ].join(" "), Y = c(
40
+ "ds:flex ds:items-stretch ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
41
+ {
42
+ variants: {
43
+ fill: { false: "ds:shrink-0", true: "ds:w-full" }
44
+ },
45
+ defaultVariants: { fill: !1 }
46
+ }
47
+ ), w = c(
48
+ "ds:group ds:flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:whitespace-nowrap ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:no-underline ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]",
49
+ {
50
+ variants: {
51
+ fill: {
52
+ // Responsive: label under the icon below `sm`, beside it at `sm`+.
53
+ false: "ds:flex-col ds:sm:flex-row ds:sm:gap-[var(--spacing-sm)]",
54
+ // Fill the bar, always icon-over-label. No `min-w-0`, so a tab never
55
+ // shrinks below its label (labels never overlap); if the full set can't
56
+ // fit, the pill scrolls instead.
57
+ true: "ds:flex-1 ds:basis-0 ds:flex-col"
58
+ }
59
+ },
60
+ defaultVariants: { fill: !1 }
61
+ }
62
+ ), N = "ds:inline-flex ds:items-center ds:text-[color:var(--accent)] ds:[&>svg]:size-4", Z = "ds:group-aria-[current=page]:underline ds:group-aria-[current=page]:decoration-2 ds:group-aria-[current=page]:decoration-[color:var(--accent)] ds:group-aria-[current=page]:underline-offset-[var(--spacing-xs)]", L = "ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)] ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-regular)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]/20 ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]", y = "ds:absolute ds:top-px ds:bottom-px ds:z-10 ds:flex ds:min-w-[var(--min-target-size)] ds:items-center ds:cursor-pointer ds:appearance-none ds:border-0 ds:bg-transparent ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]", S = "ds:start-px ds:justify-start ds:ps-[var(--spacing-xs)]", ss = "ds:end-px ds:justify-end ds:pe-[var(--spacing-xs)]", z = "ds:size-4 ds:shrink-0 ds:text-[color:var(--accent)] ds:rtl:-scale-x-100", as = F(
63
+ ({
64
+ items: r,
65
+ id: B,
66
+ ariaLabel: f,
67
+ onSelect: n,
68
+ renderLink: u,
69
+ fill: t = !1,
70
+ position: T = "top",
71
+ collapseToMenu: p = !1,
72
+ className: v
73
+ }, $) => {
74
+ const { t: g } = E(), j = P("(max-width: 640px)"), { containerRef: A, contentRef: _, isOverflowing: R } = Q(p), b = p && (j || R), {
75
+ ref: V,
76
+ canScrollStart: m,
77
+ canScrollEnd: h,
78
+ scrollByPage: x
79
+ } = q(!b), e = r.find((s) => s.isActive) ?? r[0];
80
+ return /* @__PURE__ */ a(
81
+ "div",
82
+ {
83
+ ref: $,
84
+ "data-component": "tab-bar",
85
+ "data-component-id": B,
86
+ className: `${U({ position: T, fill: t })}${v ? ` ${v}` : ""}`,
87
+ children: /* @__PURE__ */ d("div", { className: "ds:relative", children: [
88
+ /* @__PURE__ */ a("div", { ref: A, className: W, children: b ? /* @__PURE__ */ a("nav", { "aria-label": f, className: "ds:w-full", children: /* @__PURE__ */ d(o.Root, { children: [
89
+ /* @__PURE__ */ d(o.Trigger, { className: L, children: [
90
+ e != null && e.icon ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: N, children: e.icon }) : null,
91
+ /* @__PURE__ */ a("span", { className: "ds:flex-1 ds:truncate ds:text-start", children: e == null ? void 0 : e.label }),
92
+ /* @__PURE__ */ a(
93
+ G,
94
+ {
95
+ "aria-hidden": "true",
96
+ className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
97
+ }
98
+ )
99
+ ] }),
100
+ /* @__PURE__ */ a(
101
+ o.Content,
102
+ {
103
+ align: "start",
104
+ className: "ds:min-w-[12rem]",
105
+ children: r.map((s) => /* @__PURE__ */ a(
106
+ o.Item,
107
+ {
108
+ "data-tab-id": s.id,
109
+ startIcon: s.icon,
110
+ endIcon: s.isActive ? /* @__PURE__ */ a(
111
+ H,
112
+ {
113
+ "aria-hidden": "true",
114
+ className: "ds:text-[color:var(--accent)]"
115
+ }
116
+ ) : void 0,
117
+ "aria-current": s.isActive ? "page" : void 0,
118
+ onSelect: () => {
119
+ s.href ? window.location.assign(s.href) : n == null || n(s.id);
120
+ },
121
+ children: s.label
122
+ },
123
+ s.id
124
+ ))
125
+ }
126
+ )
127
+ ] }) }) : /* @__PURE__ */ a(
128
+ "div",
129
+ {
130
+ ref: V,
131
+ "data-fade-start": m ? "true" : void 0,
132
+ "data-fade-end": h ? "true" : void 0,
133
+ className: X,
134
+ children: /* @__PURE__ */ a(
135
+ "nav",
136
+ {
137
+ ref: _,
138
+ "aria-label": f,
139
+ className: Y({ fill: t }),
140
+ children: r.map((s) => {
141
+ const C = typeof s.badgeCount == "number" && s.badgeCount > 0 ? s.badgeCount : void 0, i = s.isActive ? "page" : void 0, l = /* @__PURE__ */ d(D, { children: [
142
+ s.icon ? /* @__PURE__ */ a("span", { "aria-hidden": "true", className: N, children: s.icon }) : null,
143
+ /* @__PURE__ */ d("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
144
+ /* @__PURE__ */ a("span", { className: Z, children: s.label }),
145
+ C !== void 0 ? /* @__PURE__ */ a(M, { variant: "neutral", children: K(C) }) : null
146
+ ] })
147
+ ] });
148
+ if (s.href !== void 0) {
149
+ const k = w({ fill: t });
150
+ return u ? /* @__PURE__ */ a(O, { children: u({
151
+ href: s.href,
152
+ className: k,
153
+ children: l,
154
+ "aria-current": i,
155
+ "data-tab-id": s.id,
156
+ onClick: s.onClick
157
+ }) }, s.id) : /* @__PURE__ */ a(
158
+ "a",
159
+ {
160
+ href: s.href,
161
+ "data-tab-id": s.id,
162
+ "aria-current": i,
163
+ className: k,
164
+ ...s.onClick ? { onClick: s.onClick } : {},
165
+ children: l
166
+ },
167
+ s.id
168
+ );
169
+ }
170
+ return /* @__PURE__ */ a(
171
+ "button",
172
+ {
173
+ type: "button",
174
+ "data-tab-id": s.id,
175
+ "aria-current": i,
176
+ className: w({ fill: t }),
177
+ onClick: () => n == null ? void 0 : n(s.id),
178
+ children: l
179
+ },
180
+ s.id
181
+ );
182
+ })
183
+ }
184
+ )
185
+ }
186
+ ) }),
187
+ m ? /* @__PURE__ */ a(
188
+ "button",
189
+ {
190
+ type: "button",
191
+ "aria-label": g("navigation.tabBar.scrollBack"),
192
+ onClick: () => x(-1),
193
+ className: `${y} ${S}`,
194
+ children: /* @__PURE__ */ a(
195
+ I,
196
+ {
197
+ "aria-hidden": "true",
198
+ className: z
199
+ }
200
+ )
201
+ }
202
+ ) : null,
203
+ h ? /* @__PURE__ */ a(
204
+ "button",
205
+ {
206
+ type: "button",
207
+ "aria-label": g("navigation.tabBar.scrollForward"),
208
+ onClick: () => x(1),
209
+ className: `${y} ${ss}`,
210
+ children: /* @__PURE__ */ a(
211
+ J,
212
+ {
213
+ "aria-hidden": "true",
214
+ className: z
215
+ }
216
+ )
217
+ }
218
+ ) : null
219
+ ] })
220
+ }
221
+ );
222
+ }
223
+ );
224
+ as.displayName = "TabBar";
225
+ export {
226
+ as as T
227
+ };
228
+ //# sourceMappingURL=tab-bar-Cw9UK18Z.js.map