@alfadocs/ui-kit 0.7.3 → 0.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "0.7.3",
3
+ "version": "0.8.1",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -502,8 +502,8 @@
502
502
  "@fullcalendar/resource-timeline": "^6.1.20",
503
503
  "@fullcalendar/timegrid": "^6.1.20",
504
504
  "@fullcalendar/timeline": "^6.1.20",
505
- "@stripe/react-stripe-js": "^6.2.0",
506
- "@stripe/stripe-js": "^9.2.0",
505
+ "@stripe/react-stripe-js": "^1.16.0 || ^2 || ^3 || ^6",
506
+ "@stripe/stripe-js": "^1.41.0 || ^2 || ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9",
507
507
  "@tiptap/extension-image": "^3.22.3",
508
508
  "@tiptap/extension-link": "^3.22.3",
509
509
  "@tiptap/extension-table": "^3.22.3",
@@ -1,301 +0,0 @@
1
- import { jsxs as p, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as $, useRef as q, useState as L, useCallback as r, useMemo as B } from "react";
3
- import { c as y } from "./index-D2ZczOXr.js";
4
- import { useTranslation as G } from "react-i18next";
5
- import { T as J } from "./text-input-DZwt9L8H.js";
6
- import { u as Q } from "./form-field-context-B3APVHKx.js";
7
- import { c as X } from "./compose-refs-C0k0tdqF.js";
8
- import { u as Y } from "./registry-C9nwlNyL.js";
9
- import { E as Z } from "./eye-off-xEXDAh5z.js";
10
- import { c as D } from "./createLucideIcon-CrFbzy84.js";
11
- import { T as U } from "./triangle-alert-CBPUIzQo.js";
12
- /**
13
- * @license lucide-react v1.8.0 - ISC
14
- *
15
- * This source code is licensed under the ISC license.
16
- * See the LICENSE file in the root directory of this source tree.
17
- */
18
- const ss = [
19
- [
20
- "path",
21
- {
22
- d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
23
- key: "1nclc0"
24
- }
25
- ],
26
- ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
27
- ], es = D("eye", ss), ts = {
28
- id: "password-input",
29
- capabilities: ["edit_inline"],
30
- state: {
31
- value: {
32
- type: "string",
33
- descriptionKey: "ui.agent.passwordInput.state.value",
34
- description: "Current password value. Never log or persist this off-device.",
35
- read: (e) => e.getValue()
36
- },
37
- isEmpty: {
38
- type: "boolean",
39
- descriptionKey: "ui.agent.passwordInput.state.isEmpty",
40
- description: "Whether the input has no value.",
41
- read: (e) => e.getValue() === ""
42
- },
43
- isRevealed: {
44
- type: "boolean",
45
- descriptionKey: "ui.agent.passwordInput.state.isRevealed",
46
- description: "Whether the password is currently shown in plain text.",
47
- read: (e) => e.isRevealed()
48
- }
49
- },
50
- actions: {
51
- set_value: {
52
- safety: "write",
53
- argsType: "{ value: string }",
54
- descriptionKey: "ui.agent.passwordInput.actions.setValue",
55
- description: "Replace the password value.",
56
- invoke: (e, f) => {
57
- e.setValue(f.value);
58
- }
59
- },
60
- clear: {
61
- safety: "destructive",
62
- descriptionKey: "ui.agent.passwordInput.actions.clear",
63
- description: "Empty the input. Loses any typed value.",
64
- invoke: (e) => {
65
- e.clear();
66
- }
67
- },
68
- focus: {
69
- safety: "read",
70
- descriptionKey: "ui.agent.passwordInput.actions.focus",
71
- description: "Move keyboard focus to the input.",
72
- invoke: (e) => {
73
- e.focus();
74
- }
75
- },
76
- toggle_visibility: {
77
- safety: "read",
78
- descriptionKey: "ui.agent.passwordInput.actions.toggleVisibility",
79
- description: "Toggle between masked and plain-text display.",
80
- invoke: (e) => {
81
- e.toggleVisibility();
82
- }
83
- }
84
- },
85
- domHooks: {
86
- root: {
87
- attr: "data-component",
88
- value: "password-input",
89
- description: "Marks the PasswordInput wrapper."
90
- },
91
- instanceId: {
92
- attr: "data-component-id",
93
- sourceProp: "id",
94
- description: "Sourced from the id prop."
95
- }
96
- }
97
- }, as = {
98
- sm: "ds:size-4",
99
- md: "ds:size-[18px]",
100
- lg: "ds:size-5"
101
- }, is = y(
102
- [
103
- "ds:absolute ds:inset-y-0 ds:end-0 ds:ps-2 ds:pe-3",
104
- "ds:inline-flex ds:items-center ds:justify-center",
105
- "ds:text-muted-foreground ds:hover:text-foreground",
106
- "ds:bg-transparent ds:border-0 ds:cursor-pointer",
107
- "ds:rounded-[var(--radius-sm)]",
108
- "ds:min-w-[var(--min-target-size)]",
109
- "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
110
- "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
111
- "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
112
- "ds:forced-colors:focus-visible:outline-[CanvasText]",
113
- "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
114
- ].join(" ")
115
- ), rs = y(
116
- "ds:h-1 ds:w-full ds:overflow-hidden ds:rounded-[var(--radius-full)] ds:bg-muted"
117
- ), os = y(
118
- [
119
- "ds:h-full ds:rounded-[var(--radius-full)]",
120
- "ds:transition-all ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
121
- ].join(" "),
122
- {
123
- variants: {
124
- level: {
125
- 0: "ds:w-1/4 ds:bg-destructive",
126
- 1: "ds:w-1/2 ds:bg-warning",
127
- 2: "ds:w-3/4 ds:bg-success",
128
- 3: "ds:w-full ds:bg-success"
129
- }
130
- },
131
- defaultVariants: { level: 0 }
132
- }
133
- ), ds = {
134
- 0: "weak",
135
- 1: "fair",
136
- 2: "good",
137
- 3: "strong"
138
- }, ns = $(
139
- ({
140
- onRevealChange: e,
141
- showStrength: f = !1,
142
- strength: m = 0,
143
- autoComplete: z,
144
- size: h = "md",
145
- disabled: E,
146
- name: S,
147
- id: g,
148
- onKeyDown: o,
149
- onKeyUp: d,
150
- onBlur: n,
151
- className: P,
152
- ...j
153
- }, M) => {
154
- const { t: c } = G(), x = Q().disabled || E, l = q(null), A = X(M, l), [i, k] = L(!1), [O, I] = L(!1), v = r((s) => {
155
- var T;
156
- const t = l.current;
157
- if (!t) return;
158
- const R = Object.getPrototypeOf(t), b = (T = Object.getOwnPropertyDescriptor(R, "value")) == null ? void 0 : T.set;
159
- b == null || b.call(t, s), t.dispatchEvent(new Event("input", { bubbles: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0 }));
160
- }, []), _ = r(() => {
161
- k((s) => {
162
- const t = !s;
163
- return e == null || e(t), t;
164
- });
165
- }, [e]), u = r((s) => {
166
- typeof s.getModifierState == "function" && I(s.getModifierState("CapsLock"));
167
- }, []), C = r(
168
- (s) => {
169
- u(s), o == null || o(s);
170
- },
171
- [u, o]
172
- ), H = r(
173
- (s) => {
174
- u(s), d == null || d(s);
175
- },
176
- [u, d]
177
- ), F = r(
178
- (s) => {
179
- I(!1), n == null || n(s);
180
- },
181
- [n]
182
- ), K = B(
183
- () => ({
184
- getValue: () => {
185
- var s;
186
- return ((s = l.current) == null ? void 0 : s.value) ?? "";
187
- },
188
- setValue: (s) => v(s),
189
- clear: () => v(""),
190
- focus: () => {
191
- var s;
192
- return (s = l.current) == null ? void 0 : s.focus();
193
- },
194
- isRevealed: () => i,
195
- toggleVisibility: () => {
196
- k((s) => {
197
- const t = !s;
198
- return e == null || e(t), t;
199
- });
200
- }
201
- }),
202
- [e, i, v]
203
- );
204
- Y(ts, K, g);
205
- const N = as[h], W = c(
206
- i ? "ui.inputs.password.toggleHide" : "ui.inputs.password.toggleShow",
207
- i ? "Hide password" : "Show password"
208
- ), w = ds[m], V = c(
209
- `ui.inputs.password.strength.${w}`,
210
- w.charAt(0).toUpperCase() + w.slice(1)
211
- );
212
- return /* @__PURE__ */ p(
213
- "div",
214
- {
215
- "data-component": "password-input",
216
- "data-component-id": g,
217
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
218
- children: [
219
- /* @__PURE__ */ p("div", { className: "ds:relative", children: [
220
- /* @__PURE__ */ a(
221
- J,
222
- {
223
- ref: A,
224
- id: g,
225
- type: i ? "text" : "password",
226
- autoComplete: z ?? "current-password",
227
- name: S ?? "password",
228
- spellCheck: !1,
229
- autoCapitalize: "none",
230
- autoCorrect: "off",
231
- size: h,
232
- disabled: x,
233
- onKeyDown: C,
234
- onKeyUp: H,
235
- onBlur: F,
236
- endAdornment: /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "ds:block ds:size-4" }),
237
- className: P,
238
- ...j
239
- }
240
- ),
241
- /* @__PURE__ */ a(
242
- "button",
243
- {
244
- type: "button",
245
- "aria-pressed": i,
246
- "aria-label": W,
247
- disabled: x,
248
- onClick: _,
249
- className: is(),
250
- children: i ? /* @__PURE__ */ a(Z, { "aria-hidden": "true", className: N }) : /* @__PURE__ */ a(es, { "aria-hidden": "true", className: N })
251
- }
252
- )
253
- ] }),
254
- O ? /* @__PURE__ */ p(
255
- "span",
256
- {
257
- role: "status",
258
- "aria-live": "polite",
259
- className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-meta ds:text-warning",
260
- children: [
261
- /* @__PURE__ */ a(U, { "aria-hidden": "true", className: "ds:size-3.5" }),
262
- c("ui.inputs.password.capsLock", "Caps Lock is on")
263
- ]
264
- }
265
- ) : null,
266
- f ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
267
- /* @__PURE__ */ a(
268
- "div",
269
- {
270
- role: "progressbar",
271
- "aria-valuenow": m,
272
- "aria-valuemin": 0,
273
- "aria-valuemax": 3,
274
- "aria-label": c(
275
- "ui.inputs.password.strengthLabel",
276
- "Password strength"
277
- ),
278
- "aria-valuetext": V,
279
- className: rs(),
280
- children: /* @__PURE__ */ a("div", { className: os({ level: m }) })
281
- }
282
- ),
283
- /* @__PURE__ */ a(
284
- "span",
285
- {
286
- "aria-hidden": "true",
287
- className: "type-meta ds:text-muted-foreground",
288
- children: V
289
- }
290
- )
291
- ] }) : null
292
- ]
293
- }
294
- );
295
- }
296
- );
297
- ns.displayName = "PasswordInput";
298
- export {
299
- ns as P
300
- };
301
- //# sourceMappingURL=password-input-C4LmjIH1.js.map