@sudobility/entity-components 1.0.4 → 1.0.6
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/components/EntitySelector.d.ts.map +1 -1
- package/dist/components/InvitationForm.d.ts.map +1 -1
- package/dist/components/InvitationList.d.ts.map +1 -1
- package/dist/components/MemberRoleSelector.d.ts.map +1 -1
- package/dist/index.esm.js +54 -54
- package/dist/index.umd.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntitySelector.d.ts","sourceRoot":"","sources":["../../src/components/EntitySelector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"EntitySelector.d.ts","sourceRoot":"","sources":["../../src/components/EntitySelector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,yBAAyB;IACzB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,gCAAgC;IAChC,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,wBAAwB;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACrD,8BAA8B;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,WAAW,EACX,SAAiB,EACjB,SAAS,EACT,OAAO,EACP,aAAa,EACb,aAAgC,GACjC,EAAE,mBAAmB,2CAiIrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationForm.d.ts","sourceRoot":"","sources":["../../src/components/InvitationForm.tsx"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"InvitationForm.d.ts","sourceRoot":"","sources":["../../src/components/InvitationForm.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,UAAU,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIzE,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,QAAQ,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,QAAQ,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,wCAAwC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uCAAuC;IACvC,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACrD,8BAA8B;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,YAAoB,EACpB,WAA+B,EAC/B,SAAS,EACT,OAAO,EACP,aAAa,EACb,aAAgC,GACjC,EAAE,mBAAmB,2CAoFrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationList.d.ts","sourceRoot":"","sources":["../../src/components/InvitationList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"InvitationList.d.ts","sourceRoot":"","sources":["../../src/components/InvitationList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,KAAK,EAAE,gBAAgB,EAAc,MAAM,mBAAmB,CAAC;AAGtE,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,iFAAiF;IACjF,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACrD,8BAA8B;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAYD;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAiB,EACjB,YAAuC,EACvC,SAAS,EACT,OAAO,EACP,aAAa,EACb,aAAgC,GACjC,EAAE,mBAAmB,2CAwDrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberRoleSelector.d.ts","sourceRoot":"","sources":["../../src/components/MemberRoleSelector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"MemberRoleSelector.d.ts","sourceRoot":"","sources":["../../src/components/MemberRoleSelector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,mDAAmD;AACnD,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC,yBAAyB;IACzB,KAAK,EAAE,UAAU,CAAC;IAClB,qBAAqB;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,8BAA8B,KAAK,IAAI,CAAC;IACzD,8BAA8B;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAkCD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,QAAgB,EAChB,SAAS,EACT,OAAO,EACP,aAAa,EACb,aAAoC,GACrC,EAAE,uBAAuB,2CA0FzB"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as w, Fragment as re } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { UserIcon as se, BuildingOffice2Icon as ue, ChevronDownIcon as Re, PlusIcon as $e, CheckIcon as pe, ShieldCheckIcon as Xe, BriefcaseIcon as Ye, EyeIcon as qe, TrashIcon as Je, EnvelopeIcon as Me, ArrowPathIcon as He, PaperAirplaneIcon as Ke, ClockIcon as Qe, XCircleIcon as Ze, XMarkIcon as er } from "@heroicons/react/24/outline";
|
|
3
3
|
import { useState as X } from "react";
|
|
4
4
|
import { EntityRole as te } from "@sudobility/types";
|
|
5
5
|
function Ee(e) {
|
|
@@ -253,9 +253,9 @@ const tr = (e, o) => {
|
|
|
253
253
|
if (n.indexOf(F) > -1)
|
|
254
254
|
continue;
|
|
255
255
|
n.push(F);
|
|
256
|
-
const
|
|
257
|
-
for (let O = 0; O <
|
|
258
|
-
const U =
|
|
256
|
+
const B = s(T, A);
|
|
257
|
+
for (let O = 0; O < B.length; ++O) {
|
|
258
|
+
const U = B[O];
|
|
259
259
|
n.push(W + U);
|
|
260
260
|
}
|
|
261
261
|
i = f + (i.length > 0 ? " " + i : i);
|
|
@@ -289,18 +289,18 @@ const tr = (e, o) => {
|
|
|
289
289
|
}, Nr = [], C = (e) => {
|
|
290
290
|
const o = (r) => r[e] || Nr;
|
|
291
291
|
return o.isThemeGetter = !0, o;
|
|
292
|
-
}, je = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Fe = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Cr = /^\d+\/\d+$/, zr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,
|
|
292
|
+
}, je = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Fe = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Cr = /^\d+\/\d+$/, zr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ir = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ar = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Sr = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Rr = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, V = (e) => Cr.test(e), b = (e) => !!e && !Number.isNaN(Number(e)), P = (e) => !!e && Number.isInteger(Number(e)), ie = (e) => e.endsWith("%") && b(e.slice(0, -1)), E = (e) => zr.test(e), Mr = () => !0, Er = (e) => (
|
|
293
293
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
294
294
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
295
295
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
296
|
-
|
|
297
|
-
),
|
|
296
|
+
Ir.test(e) && !Ar.test(e)
|
|
297
|
+
), Be = () => !1, Pr = (e) => Sr.test(e), Tr = (e) => Rr.test(e), Or = (e) => !d(e) && !m(e), Gr = (e) => _(e, _e, Be), d = (e) => je.test(e), j = (e) => _(e, De, Er), ce = (e) => _(e, Vr, b), Ie = (e) => _(e, Le, Be), jr = (e) => _(e, Ve, Tr), Z = (e) => _(e, We, Pr), m = (e) => Fe.test(e), $ = (e) => D(e, De), Fr = (e) => D(e, _r), Ae = (e) => D(e, Le), Br = (e) => D(e, _e), Lr = (e) => D(e, Ve), ee = (e) => D(e, We, !0), _ = (e, o, r) => {
|
|
298
298
|
const t = je.exec(e);
|
|
299
299
|
return t ? t[1] ? o(t[1]) : r(t[2]) : !1;
|
|
300
300
|
}, D = (e, o, r = !1) => {
|
|
301
301
|
const t = Fe.exec(e);
|
|
302
302
|
return t ? t[1] ? o(t[1]) : r : !1;
|
|
303
|
-
},
|
|
303
|
+
}, Le = (e) => e === "position" || e === "percentage", Ve = (e) => e === "image" || e === "url", _e = (e) => e === "length" || e === "size" || e === "bg-size", De = (e) => e === "length", Vr = (e) => e === "number", _r = (e) => e === "family-name", We = (e) => e === "shadow", Dr = () => {
|
|
304
304
|
const e = C("color"), o = C("font"), r = C("text"), t = C("font-weight"), s = C("tracking"), c = C("leading"), n = C("breakpoint"), l = C("container"), i = C("spacing"), u = C("radius"), f = C("shadow"), k = C("inset-shadow"), x = C("text-shadow"), N = C("drop-shadow"), y = C("blur"), v = C("perspective"), A = C("aspect"), T = C("ease"), Y = C("animate"), W = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], F = () => [
|
|
305
305
|
"center",
|
|
306
306
|
"top",
|
|
@@ -319,15 +319,15 @@ const tr = (e, o) => {
|
|
|
319
319
|
"bottom-left",
|
|
320
320
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
321
321
|
"left-bottom"
|
|
322
|
-
],
|
|
322
|
+
], B = () => [...F(), m, d], O = () => ["auto", "hidden", "clip", "visible", "scroll"], U = () => ["auto", "contain", "none"], g = () => [m, d, i], R = () => [V, "full", "auto", ...g()], ge = () => [P, "none", "subgrid", m, d], be = () => ["auto", {
|
|
323
323
|
span: ["full", P, m, d]
|
|
324
|
-
}, P, m, d], q = () => [P, "auto", m, d], he = () => ["auto", "min", "max", "fr", m, d], ne = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"],
|
|
324
|
+
}, P, m, d], q = () => [P, "auto", m, d], he = () => ["auto", "min", "max", "fr", m, d], ne = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], L = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], M = () => ["auto", ...g()], G = () => [V, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...g()], p = () => [e, m, d], xe = () => [...F(), Ae, Ie, {
|
|
325
325
|
position: [m, d]
|
|
326
326
|
}], ye = () => ["no-repeat", {
|
|
327
327
|
repeat: ["", "x", "y", "space", "round"]
|
|
328
|
-
}], we = () => ["auto", "cover", "contain",
|
|
328
|
+
}], we = () => ["auto", "cover", "contain", Br, Gr, {
|
|
329
329
|
size: [m, d]
|
|
330
|
-
}], ae = () => [ie, $, j],
|
|
330
|
+
}], ae = () => [ie, $, j], I = () => [
|
|
331
331
|
// Deprecated since Tailwind CSS v4.0.0
|
|
332
332
|
"",
|
|
333
333
|
"none",
|
|
@@ -335,7 +335,7 @@ const tr = (e, o) => {
|
|
|
335
335
|
u,
|
|
336
336
|
m,
|
|
337
337
|
d
|
|
338
|
-
],
|
|
338
|
+
], S = () => ["", b, $, j], J = () => ["solid", "dashed", "dotted", "double"], ve = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], z = () => [b, ie, Ae, Ie], ke = () => [
|
|
339
339
|
// Deprecated since Tailwind CSS v4.0.0
|
|
340
340
|
"",
|
|
341
341
|
"none",
|
|
@@ -466,7 +466,7 @@ const tr = (e, o) => {
|
|
|
466
466
|
* @see https://tailwindcss.com/docs/object-position
|
|
467
467
|
*/
|
|
468
468
|
"object-position": [{
|
|
469
|
-
object:
|
|
469
|
+
object: B()
|
|
470
470
|
}],
|
|
471
471
|
/**
|
|
472
472
|
* Overflow
|
|
@@ -752,14 +752,14 @@ const tr = (e, o) => {
|
|
|
752
752
|
* @see https://tailwindcss.com/docs/justify-items
|
|
753
753
|
*/
|
|
754
754
|
"justify-items": [{
|
|
755
|
-
"justify-items": [...
|
|
755
|
+
"justify-items": [...L(), "normal"]
|
|
756
756
|
}],
|
|
757
757
|
/**
|
|
758
758
|
* Justify Self
|
|
759
759
|
* @see https://tailwindcss.com/docs/justify-self
|
|
760
760
|
*/
|
|
761
761
|
"justify-self": [{
|
|
762
|
-
"justify-self": ["auto", ...
|
|
762
|
+
"justify-self": ["auto", ...L()]
|
|
763
763
|
}],
|
|
764
764
|
/**
|
|
765
765
|
* Align Content
|
|
@@ -773,7 +773,7 @@ const tr = (e, o) => {
|
|
|
773
773
|
* @see https://tailwindcss.com/docs/align-items
|
|
774
774
|
*/
|
|
775
775
|
"align-items": [{
|
|
776
|
-
items: [...
|
|
776
|
+
items: [...L(), {
|
|
777
777
|
baseline: ["", "last"]
|
|
778
778
|
}]
|
|
779
779
|
}],
|
|
@@ -782,7 +782,7 @@ const tr = (e, o) => {
|
|
|
782
782
|
* @see https://tailwindcss.com/docs/align-self
|
|
783
783
|
*/
|
|
784
784
|
"align-self": [{
|
|
785
|
-
self: ["auto", ...
|
|
785
|
+
self: ["auto", ...L(), {
|
|
786
786
|
baseline: ["", "last"]
|
|
787
787
|
}]
|
|
788
788
|
}],
|
|
@@ -798,14 +798,14 @@ const tr = (e, o) => {
|
|
|
798
798
|
* @see https://tailwindcss.com/docs/place-items
|
|
799
799
|
*/
|
|
800
800
|
"place-items": [{
|
|
801
|
-
"place-items": [...
|
|
801
|
+
"place-items": [...L(), "baseline"]
|
|
802
802
|
}],
|
|
803
803
|
/**
|
|
804
804
|
* Place Self
|
|
805
805
|
* @see https://tailwindcss.com/docs/place-self
|
|
806
806
|
*/
|
|
807
807
|
"place-self": [{
|
|
808
|
-
"place-self": ["auto", ...
|
|
808
|
+
"place-self": ["auto", ...L()]
|
|
809
809
|
}],
|
|
810
810
|
// Spacing
|
|
811
811
|
/**
|
|
@@ -1321,7 +1321,7 @@ const tr = (e, o) => {
|
|
|
1321
1321
|
}, P, m, d],
|
|
1322
1322
|
radial: ["", m, d],
|
|
1323
1323
|
conic: [P, m, d]
|
|
1324
|
-
},
|
|
1324
|
+
}, Lr, jr]
|
|
1325
1325
|
}],
|
|
1326
1326
|
/**
|
|
1327
1327
|
* Background Color
|
|
@@ -1380,175 +1380,175 @@ const tr = (e, o) => {
|
|
|
1380
1380
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1381
1381
|
*/
|
|
1382
1382
|
rounded: [{
|
|
1383
|
-
rounded:
|
|
1383
|
+
rounded: I()
|
|
1384
1384
|
}],
|
|
1385
1385
|
/**
|
|
1386
1386
|
* Border Radius Start
|
|
1387
1387
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1388
1388
|
*/
|
|
1389
1389
|
"rounded-s": [{
|
|
1390
|
-
"rounded-s":
|
|
1390
|
+
"rounded-s": I()
|
|
1391
1391
|
}],
|
|
1392
1392
|
/**
|
|
1393
1393
|
* Border Radius End
|
|
1394
1394
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1395
1395
|
*/
|
|
1396
1396
|
"rounded-e": [{
|
|
1397
|
-
"rounded-e":
|
|
1397
|
+
"rounded-e": I()
|
|
1398
1398
|
}],
|
|
1399
1399
|
/**
|
|
1400
1400
|
* Border Radius Top
|
|
1401
1401
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1402
1402
|
*/
|
|
1403
1403
|
"rounded-t": [{
|
|
1404
|
-
"rounded-t":
|
|
1404
|
+
"rounded-t": I()
|
|
1405
1405
|
}],
|
|
1406
1406
|
/**
|
|
1407
1407
|
* Border Radius Right
|
|
1408
1408
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1409
1409
|
*/
|
|
1410
1410
|
"rounded-r": [{
|
|
1411
|
-
"rounded-r":
|
|
1411
|
+
"rounded-r": I()
|
|
1412
1412
|
}],
|
|
1413
1413
|
/**
|
|
1414
1414
|
* Border Radius Bottom
|
|
1415
1415
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1416
1416
|
*/
|
|
1417
1417
|
"rounded-b": [{
|
|
1418
|
-
"rounded-b":
|
|
1418
|
+
"rounded-b": I()
|
|
1419
1419
|
}],
|
|
1420
1420
|
/**
|
|
1421
1421
|
* Border Radius Left
|
|
1422
1422
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1423
1423
|
*/
|
|
1424
1424
|
"rounded-l": [{
|
|
1425
|
-
"rounded-l":
|
|
1425
|
+
"rounded-l": I()
|
|
1426
1426
|
}],
|
|
1427
1427
|
/**
|
|
1428
1428
|
* Border Radius Start Start
|
|
1429
1429
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1430
1430
|
*/
|
|
1431
1431
|
"rounded-ss": [{
|
|
1432
|
-
"rounded-ss":
|
|
1432
|
+
"rounded-ss": I()
|
|
1433
1433
|
}],
|
|
1434
1434
|
/**
|
|
1435
1435
|
* Border Radius Start End
|
|
1436
1436
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1437
1437
|
*/
|
|
1438
1438
|
"rounded-se": [{
|
|
1439
|
-
"rounded-se":
|
|
1439
|
+
"rounded-se": I()
|
|
1440
1440
|
}],
|
|
1441
1441
|
/**
|
|
1442
1442
|
* Border Radius End End
|
|
1443
1443
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1444
1444
|
*/
|
|
1445
1445
|
"rounded-ee": [{
|
|
1446
|
-
"rounded-ee":
|
|
1446
|
+
"rounded-ee": I()
|
|
1447
1447
|
}],
|
|
1448
1448
|
/**
|
|
1449
1449
|
* Border Radius End Start
|
|
1450
1450
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1451
1451
|
*/
|
|
1452
1452
|
"rounded-es": [{
|
|
1453
|
-
"rounded-es":
|
|
1453
|
+
"rounded-es": I()
|
|
1454
1454
|
}],
|
|
1455
1455
|
/**
|
|
1456
1456
|
* Border Radius Top Left
|
|
1457
1457
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1458
1458
|
*/
|
|
1459
1459
|
"rounded-tl": [{
|
|
1460
|
-
"rounded-tl":
|
|
1460
|
+
"rounded-tl": I()
|
|
1461
1461
|
}],
|
|
1462
1462
|
/**
|
|
1463
1463
|
* Border Radius Top Right
|
|
1464
1464
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1465
1465
|
*/
|
|
1466
1466
|
"rounded-tr": [{
|
|
1467
|
-
"rounded-tr":
|
|
1467
|
+
"rounded-tr": I()
|
|
1468
1468
|
}],
|
|
1469
1469
|
/**
|
|
1470
1470
|
* Border Radius Bottom Right
|
|
1471
1471
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1472
1472
|
*/
|
|
1473
1473
|
"rounded-br": [{
|
|
1474
|
-
"rounded-br":
|
|
1474
|
+
"rounded-br": I()
|
|
1475
1475
|
}],
|
|
1476
1476
|
/**
|
|
1477
1477
|
* Border Radius Bottom Left
|
|
1478
1478
|
* @see https://tailwindcss.com/docs/border-radius
|
|
1479
1479
|
*/
|
|
1480
1480
|
"rounded-bl": [{
|
|
1481
|
-
"rounded-bl":
|
|
1481
|
+
"rounded-bl": I()
|
|
1482
1482
|
}],
|
|
1483
1483
|
/**
|
|
1484
1484
|
* Border Width
|
|
1485
1485
|
* @see https://tailwindcss.com/docs/border-width
|
|
1486
1486
|
*/
|
|
1487
1487
|
"border-w": [{
|
|
1488
|
-
border:
|
|
1488
|
+
border: S()
|
|
1489
1489
|
}],
|
|
1490
1490
|
/**
|
|
1491
1491
|
* Border Width X
|
|
1492
1492
|
* @see https://tailwindcss.com/docs/border-width
|
|
1493
1493
|
*/
|
|
1494
1494
|
"border-w-x": [{
|
|
1495
|
-
"border-x":
|
|
1495
|
+
"border-x": S()
|
|
1496
1496
|
}],
|
|
1497
1497
|
/**
|
|
1498
1498
|
* Border Width Y
|
|
1499
1499
|
* @see https://tailwindcss.com/docs/border-width
|
|
1500
1500
|
*/
|
|
1501
1501
|
"border-w-y": [{
|
|
1502
|
-
"border-y":
|
|
1502
|
+
"border-y": S()
|
|
1503
1503
|
}],
|
|
1504
1504
|
/**
|
|
1505
1505
|
* Border Width Start
|
|
1506
1506
|
* @see https://tailwindcss.com/docs/border-width
|
|
1507
1507
|
*/
|
|
1508
1508
|
"border-w-s": [{
|
|
1509
|
-
"border-s":
|
|
1509
|
+
"border-s": S()
|
|
1510
1510
|
}],
|
|
1511
1511
|
/**
|
|
1512
1512
|
* Border Width End
|
|
1513
1513
|
* @see https://tailwindcss.com/docs/border-width
|
|
1514
1514
|
*/
|
|
1515
1515
|
"border-w-e": [{
|
|
1516
|
-
"border-e":
|
|
1516
|
+
"border-e": S()
|
|
1517
1517
|
}],
|
|
1518
1518
|
/**
|
|
1519
1519
|
* Border Width Top
|
|
1520
1520
|
* @see https://tailwindcss.com/docs/border-width
|
|
1521
1521
|
*/
|
|
1522
1522
|
"border-w-t": [{
|
|
1523
|
-
"border-t":
|
|
1523
|
+
"border-t": S()
|
|
1524
1524
|
}],
|
|
1525
1525
|
/**
|
|
1526
1526
|
* Border Width Right
|
|
1527
1527
|
* @see https://tailwindcss.com/docs/border-width
|
|
1528
1528
|
*/
|
|
1529
1529
|
"border-w-r": [{
|
|
1530
|
-
"border-r":
|
|
1530
|
+
"border-r": S()
|
|
1531
1531
|
}],
|
|
1532
1532
|
/**
|
|
1533
1533
|
* Border Width Bottom
|
|
1534
1534
|
* @see https://tailwindcss.com/docs/border-width
|
|
1535
1535
|
*/
|
|
1536
1536
|
"border-w-b": [{
|
|
1537
|
-
"border-b":
|
|
1537
|
+
"border-b": S()
|
|
1538
1538
|
}],
|
|
1539
1539
|
/**
|
|
1540
1540
|
* Border Width Left
|
|
1541
1541
|
* @see https://tailwindcss.com/docs/border-width
|
|
1542
1542
|
*/
|
|
1543
1543
|
"border-w-l": [{
|
|
1544
|
-
"border-l":
|
|
1544
|
+
"border-l": S()
|
|
1545
1545
|
}],
|
|
1546
1546
|
/**
|
|
1547
1547
|
* Divide Width X
|
|
1548
1548
|
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1549
1549
|
*/
|
|
1550
1550
|
"divide-x": [{
|
|
1551
|
-
"divide-x":
|
|
1551
|
+
"divide-x": S()
|
|
1552
1552
|
}],
|
|
1553
1553
|
/**
|
|
1554
1554
|
* Divide Width X Reverse
|
|
@@ -1560,7 +1560,7 @@ const tr = (e, o) => {
|
|
|
1560
1560
|
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1561
1561
|
*/
|
|
1562
1562
|
"divide-y": [{
|
|
1563
|
-
"divide-y":
|
|
1563
|
+
"divide-y": S()
|
|
1564
1564
|
}],
|
|
1565
1565
|
/**
|
|
1566
1566
|
* Divide Width Y Reverse
|
|
@@ -1722,7 +1722,7 @@ const tr = (e, o) => {
|
|
|
1722
1722
|
* @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
|
|
1723
1723
|
*/
|
|
1724
1724
|
"ring-w": [{
|
|
1725
|
-
ring:
|
|
1725
|
+
ring: S()
|
|
1726
1726
|
}],
|
|
1727
1727
|
/**
|
|
1728
1728
|
* Ring Width Inset
|
|
@@ -1761,7 +1761,7 @@ const tr = (e, o) => {
|
|
|
1761
1761
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
|
|
1762
1762
|
*/
|
|
1763
1763
|
"inset-ring-w": [{
|
|
1764
|
-
"inset-ring":
|
|
1764
|
+
"inset-ring": S()
|
|
1765
1765
|
}],
|
|
1766
1766
|
/**
|
|
1767
1767
|
* Inset Ring Color
|
|
@@ -2282,7 +2282,7 @@ const tr = (e, o) => {
|
|
|
2282
2282
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
2283
2283
|
*/
|
|
2284
2284
|
"perspective-origin": [{
|
|
2285
|
-
"perspective-origin":
|
|
2285
|
+
"perspective-origin": B()
|
|
2286
2286
|
}],
|
|
2287
2287
|
/**
|
|
2288
2288
|
* Rotate
|
|
@@ -2378,7 +2378,7 @@ const tr = (e, o) => {
|
|
|
2378
2378
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
2379
2379
|
*/
|
|
2380
2380
|
"transform-origin": [{
|
|
2381
|
-
origin:
|
|
2381
|
+
origin: B()
|
|
2382
2382
|
}],
|
|
2383
2383
|
/**
|
|
2384
2384
|
* Transform Style
|
|
@@ -2951,7 +2951,7 @@ function tt({
|
|
|
2951
2951
|
),
|
|
2952
2952
|
children: /* @__PURE__ */ w("div", { className: "p-1", children: [
|
|
2953
2953
|
e.filter((y) => y.entityType === "personal").map((y) => /* @__PURE__ */ a(
|
|
2954
|
-
|
|
2954
|
+
Se,
|
|
2955
2955
|
{
|
|
2956
2956
|
entity: y,
|
|
2957
2957
|
isSelected: y.id === o?.id,
|
|
@@ -2961,7 +2961,7 @@ function tt({
|
|
|
2961
2961
|
)),
|
|
2962
2962
|
e.some((y) => y.entityType === "personal") && e.some((y) => y.entityType === "organization") && /* @__PURE__ */ a("div", { className: "my-1 h-px bg-border" }),
|
|
2963
2963
|
e.filter((y) => y.entityType === "organization").map((y) => /* @__PURE__ */ a(
|
|
2964
|
-
|
|
2964
|
+
Se,
|
|
2965
2965
|
{
|
|
2966
2966
|
entity: y,
|
|
2967
2967
|
isSelected: y.id === o?.id,
|
|
@@ -2993,7 +2993,7 @@ function tt({
|
|
|
2993
2993
|
] })
|
|
2994
2994
|
] });
|
|
2995
2995
|
}
|
|
2996
|
-
function
|
|
2996
|
+
function Se({ entity: e, isSelected: o, onClick: r }) {
|
|
2997
2997
|
const t = e.entityType === "personal", s = t ? se : ue;
|
|
2998
2998
|
return /* @__PURE__ */ w(
|
|
2999
2999
|
"button",
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(S,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("lucide-react"),require("react"),require("@sudobility/types")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","lucide-react","react","@sudobility/types"],r):(S=typeof globalThis<"u"?globalThis:S||self,r(S.EntityComponents={},S.ReactJSXRuntime,S.LucideReact,S.React,S.SudobilityTypes))})(this,(function(S,r,v,$,J){"use strict";function ue(e){var s,o,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(s=0;s<n;s++)e[s]&&(o=ue(e[s]))&&(t&&(t+=" "),t+=o)}else for(o in e)e[o]&&(t&&(t+=" "),t+=o);return t}function Ue(){for(var e,s,o=0,t="",n=arguments.length;o<n;o++)(e=arguments[o])&&(s=ue(e))&&(t&&(t+=" "),t+=s);return t}const _e=(e,s)=>{const o=new Array(e.length+s.length);for(let t=0;t<e.length;t++)o[t]=e[t];for(let t=0;t<s.length;t++)o[e.length+t]=s[t];return o},We=(e,s)=>({classGroupId:e,validator:s}),fe=(e=new Map,s=null,o)=>({nextPart:e,validators:s,classGroupId:o}),H="-",ge=[],$e="arbitrary..",qe=e=>{const s=Ye(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Xe(a);const l=a.split(H),i=l[0]===""&&l.length>1?1:0;return be(l,i,s)},getConflictingClassGroupIds:(a,l)=>{if(l){const i=t[a],m=o[a];return i?m?_e(m,i):i:m||ge}return o[a]||ge}}},be=(e,s,o)=>{if(e.length-s===0)return o.classGroupId;const n=e[s],c=o.nextPart.get(n);if(c){const m=be(e,s+1,c);if(m)return m}const a=o.validators;if(a===null)return;const l=s===0?e.join(H):e.slice(s).join(H),i=a.length;for(let m=0;m<i;m++){const f=a[m];if(f.validator(l))return f.classGroupId}},Xe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const s=e.slice(1,-1),o=s.indexOf(":"),t=s.slice(0,o);return t?$e+t:void 0})(),Ye=e=>{const{theme:s,classGroups:o}=e;return Je(o,s)},Je=(e,s)=>{const o=fe();for(const t in e){const n=e[t];se(n,o,t,s)}return o},se=(e,s,o,t)=>{const n=e.length;for(let c=0;c<n;c++){const a=e[c];He(a,s,o,t)}},He=(e,s,o,t)=>{if(typeof e=="string"){Ke(e,s,o);return}if(typeof e=="function"){Qe(e,s,o,t);return}Ze(e,s,o,t)},Ke=(e,s,o)=>{const t=e===""?s:he(s,e);t.classGroupId=o},Qe=(e,s,o,t)=>{if(Re(e)){se(e(t),s,o,t);return}s.validators===null&&(s.validators=[]),s.validators.push(We(o,e))},Ze=(e,s,o,t)=>{const n=Object.entries(e),c=n.length;for(let a=0;a<c;a++){const[l,i]=n[a];se(i,he(s,l),o,t)}},he=(e,s)=>{let o=e;const t=s.split(H),n=t.length;for(let c=0;c<n;c++){const a=t[c];let l=o.nextPart.get(a);l||(l=fe(),o.nextPart.set(a,l)),o=l}return o},Re=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,er=e=>{if(e<1)return{get:()=>{},set:()=>{}};let s=0,o=Object.create(null),t=Object.create(null);const n=(c,a)=>{o[c]=a,s++,s>e&&(s=0,t=o,o=Object.create(null))};return{get(c){let a=o[c];if(a!==void 0)return a;if((a=t[c])!==void 0)return n(c,a),a},set(c,a){c in o?o[c]=a:n(c,a)}}},ne="!",xe=":",rr=[],ye=(e,s,o,t,n)=>({modifiers:e,hasImportantModifier:s,baseClassName:o,maybePostfixModifierPosition:t,isExternal:n}),or=e=>{const{prefix:s,experimentalParseClassName:o}=e;let t=n=>{const c=[];let a=0,l=0,i=0,m;const f=n.length;for(let w=0;w<f;w++){const I=n[w];if(a===0&&l===0){if(I===xe){c.push(n.slice(i,w)),i=w+1;continue}if(I==="/"){m=w;continue}}I==="["?a++:I==="]"?a--:I==="("?l++:I===")"&&l--}const k=c.length===0?n:n.slice(i);let x=k,N=!1;k.endsWith(ne)?(x=k.slice(0,-1),N=!0):k.startsWith(ne)&&(x=k.slice(1),N=!0);const y=m&&m>i?m-i:void 0;return ye(c,N,x,y)};if(s){const n=s+xe,c=t;t=a=>a.startsWith(n)?c(a.slice(n.length)):ye(rr,!1,a,void 0,!0)}if(o){const n=t;t=c=>o({className:c,parseClassName:n})}return t},tr=e=>{const s=new Map;return e.orderSensitiveModifiers.forEach((o,t)=>{s.set(o,1e6+t)}),o=>{const t=[];let n=[];for(let c=0;c<o.length;c++){const a=o[c],l=a[0]==="[",i=s.has(a);l||i?(n.length>0&&(n.sort(),t.push(...n),n=[]),t.push(a)):n.push(a)}return n.length>0&&(n.sort(),t.push(...n)),t}},sr=e=>({cache:er(e.cacheSize),parseClassName:or(e),sortModifiers:tr(e),...qe(e)}),nr=/\s+/,ar=(e,s)=>{const{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:n,sortModifiers:c}=s,a=[],l=e.trim().split(nr);let i="";for(let m=l.length-1;m>=0;m-=1){const f=l[m],{isExternal:k,modifiers:x,hasImportantModifier:N,baseClassName:y,maybePostfixModifierPosition:w}=o(f);if(k){i=f+(i.length>0?" "+i:i);continue}let I=!!w,j=t(I?y.substring(0,w):y);if(!j){if(!I){i=f+(i.length>0?" "+i:i);continue}if(j=t(y),!j){i=f+(i.length>0?" "+i:i);continue}I=!1}const Z=x.length===0?"":x.length===1?x[0]:c(x).join(":"),X=N?Z+ne:Z,U=X+j;if(a.indexOf(U)>-1)continue;a.push(U);const _=n(j,I);for(let F=0;F<_.length;++F){const Y=_[F];a.push(X+Y)}i=f+(i.length>0?" "+i:i)}return i},lr=(...e)=>{let s=0,o,t,n="";for(;s<e.length;)(o=e[s++])&&(t=we(o))&&(n&&(n+=" "),n+=t);return n},we=e=>{if(typeof e=="string")return e;let s,o="";for(let t=0;t<e.length;t++)e[t]&&(s=we(e[t]))&&(o&&(o+=" "),o+=s);return o},ir=(e,...s)=>{let o,t,n,c;const a=i=>{const m=s.reduce((f,k)=>k(f),e());return o=sr(m),t=o.cache.get,n=o.cache.set,c=l,l(i)},l=i=>{const m=t(i);if(m)return m;const f=ar(i,o);return n(i,f),f};return c=a,(...i)=>c(lr(...i))},cr=[],C=e=>{const s=o=>o[e]||cr;return s.isThemeGetter=!0,s},ve=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ke=/^\((?:(\w[\w-]*):)?(.+)\)$/i,dr=/^\d+\/\d+$/,pr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ur=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>dr.test(e),b=e=>!!e&&!Number.isNaN(Number(e)),O=e=>!!e&&Number.isInteger(Number(e)),ae=e=>e.endsWith("%")&&b(e.slice(0,-1)),E=e=>pr.test(e),br=()=>!0,hr=e=>mr.test(e)&&!ur.test(e),Ne=()=>!1,xr=e=>fr.test(e),yr=e=>gr.test(e),wr=e=>!d(e)&&!p(e),vr=e=>V(e,Ie,Ne),d=e=>ve.test(e),G=e=>V(e,Me,hr),le=e=>V(e,Sr,b),Ce=e=>V(e,Se,Ne),kr=e=>V(e,Ae,yr),K=e=>V(e,Ee,xr),p=e=>ke.test(e),q=e=>D(e,Me),Nr=e=>D(e,Ar),ze=e=>D(e,Se),Cr=e=>D(e,Ie),zr=e=>D(e,Ae),Q=e=>D(e,Ee,!0),V=(e,s,o)=>{const t=ve.exec(e);return t?t[1]?s(t[1]):o(t[2]):!1},D=(e,s,o=!1)=>{const t=ke.exec(e);return t?t[1]?s(t[1]):o:!1},Se=e=>e==="position"||e==="percentage",Ae=e=>e==="image"||e==="url",Ie=e=>e==="length"||e==="size"||e==="bg-size",Me=e=>e==="length",Sr=e=>e==="number",Ar=e=>e==="family-name",Ee=e=>e==="shadow",Ir=ir(()=>{const e=C("color"),s=C("font"),o=C("text"),t=C("font-weight"),n=C("tracking"),c=C("leading"),a=C("breakpoint"),l=C("container"),i=C("spacing"),m=C("radius"),f=C("shadow"),k=C("inset-shadow"),x=C("text-shadow"),N=C("drop-shadow"),y=C("blur"),w=C("perspective"),I=C("aspect"),j=C("ease"),Z=C("animate"),X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...U(),p,d],F=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],g=()=>[p,d,i],P=()=>[B,"full","auto",...g()],Oe=()=>[O,"none","subgrid",p,d],Ge=()=>["auto",{span:["full",O,p,d]},O,p,d],R=()=>[O,"auto",p,d],je=()=>["auto","min","max","fr",p,d],de=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...g()],L=()=>[B,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],u=()=>[e,p,d],Fe=()=>[...U(),ze,Ce,{position:[p,d]}],Le=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Be=()=>["auto","cover","contain",Cr,vr,{size:[p,d]}],pe=()=>[ae,q,G],A=()=>["","none","full",m,p,d],M=()=>["",b,q,G],ee=()=>["solid","dashed","dotted","double"],Ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[b,ae,ze,Ce],De=()=>["","none",y,p,d],re=()=>["none",b,p,d],oe=()=>["none",b,p,d],me=()=>[b,p,d],te=()=>[B,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[E],breakpoint:[E],color:[br],container:[E],"drop-shadow":[E],ease:["in","out","in-out"],font:[wr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[E],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[E],shadow:[E],spacing:["px",b],text:[E],"text-shadow":[E],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",B,d,p,I]}],container:["container"],columns:[{columns:[b,d,p,l]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[O,"auto",p,d]}],basis:[{basis:[B,"full","auto",l,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[b,B,"auto","initial","none",d]}],grow:[{grow:["",b,p,d]}],shrink:[{shrink:["",b,p,d]}],order:[{order:[O,"first","last","none",p,d]}],"grid-cols":[{"grid-cols":Oe()}],"col-start-end":[{col:Ge()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":Oe()}],"row-start-end":[{row:Ge()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":je()}],"auto-rows":[{"auto-rows":je()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...de(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...de()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":de()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[l,"screen",...L()]}],"min-w":[{"min-w":[l,"screen","none",...L()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",o,q,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,p,le]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ae,d]}],"font-family":[{font:[Nr,d,s]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,p,d]}],"line-clamp":[{"line-clamp":[b,"none",p,le]}],leading:[{leading:[c,...g()]}],"list-image":[{"list-image":["none",p,d]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",p,d]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:u()}],"text-color":[{text:u()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[b,"from-font","auto",p,G]}],"text-decoration-color":[{decoration:u()}],"underline-offset":[{"underline-offset":[b,"auto",p,d]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p,d]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",p,d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Fe()}],"bg-repeat":[{bg:Le()}],"bg-size":[{bg:Be()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},O,p,d],radial:["",p,d],conic:[O,p,d]},zr,kr]}],"bg-color":[{bg:u()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:u()}],"gradient-via":[{via:u()}],"gradient-to":[{to:u()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:u()}],"border-color-x":[{"border-x":u()}],"border-color-y":[{"border-y":u()}],"border-color-s":[{"border-s":u()}],"border-color-e":[{"border-e":u()}],"border-color-t":[{"border-t":u()}],"border-color-r":[{"border-r":u()}],"border-color-b":[{"border-b":u()}],"border-color-l":[{"border-l":u()}],"divide-color":[{divide:u()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[b,p,d]}],"outline-w":[{outline:["",b,q,G]}],"outline-color":[{outline:u()}],shadow:[{shadow:["","none",f,Q,K]}],"shadow-color":[{shadow:u()}],"inset-shadow":[{"inset-shadow":["none",k,Q,K]}],"inset-shadow-color":[{"inset-shadow":u()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:u()}],"ring-offset-w":[{"ring-offset":[b,G]}],"ring-offset-color":[{"ring-offset":u()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":u()}],"text-shadow":[{"text-shadow":["none",x,Q,K]}],"text-shadow-color":[{"text-shadow":u()}],opacity:[{opacity:[b,p,d]}],"mix-blend":[{"mix-blend":[...Ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[b]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":u()}],"mask-image-linear-to-color":[{"mask-linear-to":u()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":u()}],"mask-image-t-to-color":[{"mask-t-to":u()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":u()}],"mask-image-r-to-color":[{"mask-r-to":u()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":u()}],"mask-image-b-to-color":[{"mask-b-to":u()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":u()}],"mask-image-l-to-color":[{"mask-l-to":u()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":u()}],"mask-image-x-to-color":[{"mask-x-to":u()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":u()}],"mask-image-y-to-color":[{"mask-y-to":u()}],"mask-image-radial":[{"mask-radial":[p,d]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":u()}],"mask-image-radial-to-color":[{"mask-radial-to":u()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":U()}],"mask-image-conic-pos":[{"mask-conic":[b]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":u()}],"mask-image-conic-to-color":[{"mask-conic-to":u()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Fe()}],"mask-repeat":[{mask:Le()}],"mask-size":[{mask:Be()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",p,d]}],filter:[{filter:["","none",p,d]}],blur:[{blur:De()}],brightness:[{brightness:[b,p,d]}],contrast:[{contrast:[b,p,d]}],"drop-shadow":[{"drop-shadow":["","none",N,Q,K]}],"drop-shadow-color":[{"drop-shadow":u()}],grayscale:[{grayscale:["",b,p,d]}],"hue-rotate":[{"hue-rotate":[b,p,d]}],invert:[{invert:["",b,p,d]}],saturate:[{saturate:[b,p,d]}],sepia:[{sepia:["",b,p,d]}],"backdrop-filter":[{"backdrop-filter":["","none",p,d]}],"backdrop-blur":[{"backdrop-blur":De()}],"backdrop-brightness":[{"backdrop-brightness":[b,p,d]}],"backdrop-contrast":[{"backdrop-contrast":[b,p,d]}],"backdrop-grayscale":[{"backdrop-grayscale":["",b,p,d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b,p,d]}],"backdrop-invert":[{"backdrop-invert":["",b,p,d]}],"backdrop-opacity":[{"backdrop-opacity":[b,p,d]}],"backdrop-saturate":[{"backdrop-saturate":[b,p,d]}],"backdrop-sepia":[{"backdrop-sepia":["",b,p,d]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",p,d]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[b,"initial",p,d]}],ease:[{ease:["linear","initial",j,p,d]}],delay:[{delay:[b,p,d]}],animate:[{animate:["none",Z,p,d]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,p,d]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[p,d,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:u()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:u()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p,d]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",p,d]}],fill:[{fill:["none",...u()]}],"stroke-w":[{stroke:[b,q,G,le]}],stroke:[{stroke:["none",...u()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function h(...e){return Ir(Ue(e))}const Mr={owner:"bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300",admin:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300",member:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"};function Pe({entity:e,isSelected:s=!1,onClick:o,className:t,onTrack:n,trackingLabel:c,componentName:a="EntityCard"}){const l=e.entityType==="personal",i=l?v.User:v.Building2,m=()=>{n?.({action:"click",trackingLabel:c,componentName:a}),o?.()};return r.jsx("div",{onClick:o?m:void 0,className:h("rounded-lg border p-4 transition-all",o&&"cursor-pointer hover:border-primary",s&&"border-primary bg-primary/5",!s&&"border-border bg-card",t),children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("div",{className:h("flex h-10 w-10 items-center justify-center rounded-full",l?"bg-blue-100 dark:bg-blue-900":"bg-purple-100 dark:bg-purple-900"),children:e.avatarUrl?r.jsx("img",{src:e.avatarUrl,alt:e.displayName,className:"h-10 w-10 rounded-full object-cover"}):r.jsx(i,{className:h("h-5 w-5",l?"text-blue-600 dark:text-blue-400":"text-purple-600 dark:text-purple-400")})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("h3",{className:"font-medium text-foreground truncate",children:e.displayName}),r.jsx("span",{className:h("text-xs px-2 py-0.5 rounded-full font-medium",Mr[e.userRole]),children:e.userRole})]}),r.jsx("p",{className:"text-sm text-muted-foreground",children:l?"Personal workspace":"Organization"}),e.description&&r.jsx("p",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function Er({entities:e,selectedSlug:s,onSelect:o,isLoading:t=!1,emptyMessage:n="No workspaces found",className:c,onTrack:a,trackingLabel:l,componentName:i="EntityList"}){if(t)return r.jsx("div",{className:h("space-y-3",c),children:[1,2,3].map(f=>r.jsx("div",{className:"h-24 rounded-lg border border-border bg-muted animate-pulse"},f))});if(e.length===0)return r.jsx("div",{className:h("text-center py-8 text-muted-foreground",c),children:n});const m=f=>{a?.({action:"select",trackingLabel:l,componentName:i}),o?.(f)};return r.jsx("div",{className:h("space-y-3",c),children:e.map(f=>r.jsx(Pe,{entity:f,isSelected:f.entitySlug===s,onClick:o?()=>m(f):void 0,onTrack:a,trackingLabel:l},f.id))})}function Pr({entities:e,currentEntity:s,onSelect:o,onCreateNew:t,isLoading:n=!1,className:c,onTrack:a,trackingLabel:l,componentName:i="EntitySelector"}){const[m,f]=$.useState(!1),k=()=>{a?.({action:"toggle",trackingLabel:l,componentName:i}),f(!m)},x=y=>{a?.({action:"select",trackingLabel:l,componentName:i}),o(y),f(!1)},N=()=>{a?.({action:"create_new",trackingLabel:l,componentName:i}),t?.(),f(!1)};return r.jsxs("div",{className:h("relative",c),children:[r.jsxs("button",{type:"button",onClick:k,disabled:n,className:h("flex items-center gap-2 px-3 py-2 rounded-lg border","bg-background hover:bg-muted transition-colors","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",n&&"opacity-50 cursor-not-allowed"),children:[s?r.jsxs(r.Fragment,{children:[s.entityType==="personal"?r.jsx(v.User,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"}):r.jsx(v.Building2,{className:"h-4 w-4 text-purple-600 dark:text-purple-400"}),r.jsx("span",{className:"font-medium text-sm truncate max-w-[150px]",children:s.displayName})]}):r.jsx("span",{className:"text-sm text-muted-foreground",children:"Select workspace"}),r.jsx(v.ChevronDown,{className:h("h-4 w-4 text-muted-foreground transition-transform",m&&"rotate-180")})]}),m&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>f(!1)}),r.jsx("div",{className:h("absolute top-full left-0 mt-1 z-50","min-w-[220px] rounded-lg border bg-popover shadow-lg","animate-in fade-in-0 zoom-in-95"),children:r.jsxs("div",{className:"p-1",children:[e.filter(y=>y.entityType==="personal").map(y=>r.jsx(Te,{entity:y,isSelected:y.id===s?.id,onClick:()=>x(y)},y.id)),e.some(y=>y.entityType==="personal")&&e.some(y=>y.entityType==="organization")&&r.jsx("div",{className:"my-1 h-px bg-border"}),e.filter(y=>y.entityType==="organization").map(y=>r.jsx(Te,{entity:y,isSelected:y.id===s?.id,onClick:()=>x(y)},y.id)),t&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"my-1 h-px bg-border"}),r.jsxs("button",{type:"button",onClick:N,className:h("flex items-center gap-2 w-full px-2 py-1.5 rounded","text-sm text-primary hover:bg-muted transition-colors"),children:[r.jsx(v.Plus,{className:"h-4 w-4"}),r.jsx("span",{children:"Create organization"})]})]})]})})]})]})}function Te({entity:e,isSelected:s,onClick:o}){const t=e.entityType==="personal",n=t?v.User:v.Building2;return r.jsxs("button",{type:"button",onClick:o,className:h("flex items-center gap-2 w-full px-2 py-1.5 rounded","text-sm transition-colors",s?"bg-primary/10 text-primary":"hover:bg-muted text-foreground"),children:[r.jsx(n,{className:h("h-4 w-4",t?"text-blue-600 dark:text-blue-400":"text-purple-600 dark:text-purple-400")}),r.jsx("span",{className:"flex-1 text-left truncate",children:e.displayName}),s&&r.jsx(v.Check,{className:"h-4 w-4"})]})}const ie=[{value:J.EntityRole.OWNER,label:"Owner",description:"Full access to all settings and members",icon:v.Shield,color:"text-purple-600 dark:text-purple-400"},{value:J.EntityRole.ADMIN,label:"Admin",description:"Can manage projects and API keys",icon:v.Briefcase,color:"text-blue-600 dark:text-blue-400"},{value:J.EntityRole.MEMBER,label:"Member",description:"Read-only access",icon:v.Eye,color:"text-gray-600 dark:text-gray-400"}];function ce({value:e,onChange:s,disabled:o=!1,className:t,onTrack:n,trackingLabel:c,componentName:a="MemberRoleSelector"}){const[l,i]=$.useState(!1),m=ie.find(x=>x.value===e)||ie[2],f=()=>{o||(n?.({action:"toggle",trackingLabel:c,componentName:a}),i(!l))},k=x=>{n?.({action:"select",trackingLabel:c,componentName:a}),s(x),i(!1)};return r.jsxs("div",{className:h("relative",t),children:[r.jsxs("button",{type:"button",onClick:f,disabled:o,className:h("flex items-center gap-1.5 px-2 py-1 rounded border text-sm","bg-background transition-colors",o?"opacity-50 cursor-not-allowed":"hover:bg-muted cursor-pointer"),children:[r.jsx(m.icon,{className:h("h-3.5 w-3.5",m.color)}),r.jsx("span",{children:m.label}),r.jsx(v.ChevronDown,{className:h("h-3.5 w-3.5 text-muted-foreground transition-transform",l&&"rotate-180")})]}),l&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),r.jsx("div",{className:h("absolute top-full right-0 mt-1 z-50","min-w-[200px] rounded-lg border bg-popover shadow-lg p-1","animate-in fade-in-0 zoom-in-95"),children:ie.map(x=>r.jsxs("button",{type:"button",onClick:()=>k(x.value),className:h("flex items-start gap-2 w-full px-2 py-2 rounded text-left","transition-colors",x.value===e?"bg-primary/10":"hover:bg-muted"),children:[r.jsx(x.icon,{className:h("h-4 w-4 mt-0.5",x.color)}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"font-medium text-sm",children:x.label}),x.value===e&&r.jsx(v.Check,{className:"h-3.5 w-3.5 text-primary"})]}),r.jsx("p",{className:"text-xs text-muted-foreground",children:x.description})]})]},x.value))})]})]})}const Tr={owner:"bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300",admin:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300",member:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"};function Or({members:e,currentUserId:s,canManage:o=!1,onRoleChange:t,onRemove:n,isLoading:c=!1,emptyMessage:a="No members found",className:l,onTrack:i,trackingLabel:m,componentName:f="MemberList"}){if(c)return r.jsx("div",{className:h("space-y-2",l),children:[1,2,3].map(N=>r.jsx("div",{className:"h-16 rounded-lg border border-border bg-muted animate-pulse"},N))});if(e.length===0)return r.jsx("div",{className:h("text-center py-8 text-muted-foreground",l),children:a});const k=(N,y)=>{i?.({action:"role_change",trackingLabel:m,componentName:f}),t?.(N,y)},x=N=>{i?.({action:"remove",trackingLabel:m,componentName:f}),n?.(N)};return r.jsx("div",{className:h("divide-y divide-border rounded-lg border",l),children:e.map(N=>r.jsx(Gr,{member:N,isSelf:N.userId===s,canManage:o,onRoleChange:t?k:void 0,onRemove:n?x:void 0},N.id))})}function Gr({member:e,isSelf:s,canManage:o,onRoleChange:t,onRemove:n}){const c=e.user?.displayName||e.user?.email||"Unknown user",a=e.user?.email;return r.jsxs("div",{className:"flex items-center gap-3 p-3",children:[r.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-muted",children:r.jsx(v.User,{className:"h-5 w-5 text-muted-foreground"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("p",{className:"font-medium text-foreground truncate",children:c}),s&&r.jsx("span",{className:"text-xs text-muted-foreground",children:"(you)"})]}),a&&r.jsx("p",{className:"text-sm text-muted-foreground truncate",children:a})]}),o&&t&&!s?r.jsx(ce,{value:e.role,onChange:l=>t(e.userId,l)}):r.jsx("span",{className:h("text-xs px-2 py-1 rounded-full font-medium",Tr[e.role]),children:e.role}),o&&n&&!s&&r.jsx("button",{type:"button",onClick:()=>n(e.userId),className:h("p-1.5 rounded hover:bg-destructive/10 text-muted-foreground","hover:text-destructive transition-colors"),title:"Remove member",children:r.jsx(v.Trash2,{className:"h-4 w-4"})})]})}function jr({onSubmit:e,isSubmitting:s=!1,defaultRole:o=J.EntityRole.MEMBER,className:t,onTrack:n,trackingLabel:c,componentName:a="InvitationForm"}){const[l,i]=$.useState(""),[m,f]=$.useState(o),[k,x]=$.useState(null),N=async y=>{if(y.preventDefault(),x(null),!l.trim()){x("Email is required");return}if(!Fr(l)){x("Please enter a valid email address");return}n?.({action:"submit",trackingLabel:c,componentName:a});try{await e({email:l.trim(),role:m}),i(""),f(o)}catch(w){x(w.message||"Failed to send invitation")}};return r.jsxs("form",{onSubmit:N,className:h("space-y-4",t),children:[r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(v.Mail,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),r.jsx("input",{type:"email",value:l,onChange:y=>i(y.target.value),placeholder:"Enter email address",disabled:s,className:h("w-full pl-10 pr-3 py-2 rounded-lg border bg-background","text-sm placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",k&&"border-destructive focus:ring-destructive",s&&"opacity-50 cursor-not-allowed")})]}),r.jsx(ce,{value:m,onChange:f,disabled:s}),r.jsxs("button",{type:"submit",disabled:s||!l.trim(),className:h("flex items-center gap-2 px-4 py-2 rounded-lg","bg-primary text-primary-foreground font-medium text-sm","hover:bg-primary/90 transition-colors","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",(s||!l.trim())&&"opacity-50 cursor-not-allowed"),children:[s?r.jsx(v.Loader2,{className:"h-4 w-4 animate-spin"}):r.jsx(v.Send,{className:"h-4 w-4"}),r.jsx("span",{className:"hidden sm:inline",children:"Invite"})]})]}),k&&r.jsx("p",{className:"text-sm text-destructive",children:k})]})}function Fr(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}const Lr={owner:"bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300",admin:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300",member:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"};function Br({invitations:e,mode:s,onCancel:o,onAccept:t,onDecline:n,isLoading:c=!1,emptyMessage:a="No pending invitations",className:l,onTrack:i,trackingLabel:m,componentName:f="InvitationList"}){const k=e.filter(w=>w.status==="pending");if(c)return r.jsx("div",{className:h("space-y-2",l),children:[1,2].map(w=>r.jsx("div",{className:"h-16 rounded-lg border border-border bg-muted animate-pulse"},w))});if(k.length===0)return r.jsx("div",{className:h("text-center py-8 text-muted-foreground",l),children:a});const x=w=>{i?.({action:"cancel",trackingLabel:m,componentName:f}),o?.(w)},N=w=>{i?.({action:"accept",trackingLabel:m,componentName:f}),t?.(w)},y=w=>{i?.({action:"decline",trackingLabel:m,componentName:f}),n?.(w)};return r.jsx("div",{className:h("divide-y divide-border rounded-lg border",l),children:k.map(w=>r.jsx(Vr,{invitation:w,mode:s,onCancel:o?x:void 0,onAccept:t?N:void 0,onDecline:n?y:void 0},w.id))})}function Vr({invitation:e,mode:s,onCancel:o,onAccept:t,onDecline:n}){const c=new Date(e.expiresAt),a=c<new Date,l=Math.ceil((c.getTime()-Date.now())/(1e3*60*60*24));return r.jsxs("div",{className:"flex items-center gap-3 p-3",children:[r.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-muted",children:r.jsx(v.Mail,{className:"h-5 w-5 text-muted-foreground"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[s==="user"&&e.entity?r.jsx("p",{className:"font-medium text-foreground truncate",children:e.entity.displayName}):r.jsx("p",{className:"font-medium text-foreground truncate",children:e.email}),r.jsx("span",{className:h("text-xs px-2 py-0.5 rounded-full font-medium",Lr[e.role]),children:e.role})]}),r.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[r.jsx(v.Clock,{className:"h-3.5 w-3.5"}),a?r.jsx("span",{className:"text-destructive",children:"Expired"}):r.jsxs("span",{children:["Expires in ",l," days"]})]})]}),s==="admin"&&o&&r.jsx("button",{type:"button",onClick:()=>o(e.id),className:h("p-1.5 rounded hover:bg-destructive/10 text-muted-foreground","hover:text-destructive transition-colors"),title:"Cancel invitation",children:r.jsx(v.XCircle,{className:"h-4 w-4"})}),s==="user"&&r.jsxs("div",{className:"flex items-center gap-2",children:[n&&r.jsxs("button",{type:"button",onClick:()=>n(e.token),className:h("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm","border hover:bg-muted transition-colors"),children:[r.jsx(v.X,{className:"h-4 w-4"}),r.jsx("span",{children:"Decline"})]}),t&&r.jsxs("button",{type:"button",onClick:()=>t(e.token),disabled:a,className:h("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm","bg-primary text-primary-foreground","hover:bg-primary/90 transition-colors",a&&"opacity-50 cursor-not-allowed"),children:[r.jsx(v.Check,{className:"h-4 w-4"}),r.jsx("span",{children:"Accept"})]})]})]})}S.EntityCard=Pe,S.EntityList=Er,S.EntitySelector=Pr,S.InvitationForm=jr,S.InvitationList=Br,S.MemberList=Or,S.MemberRoleSelector=ce,S.cn=h,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(z,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("@heroicons/react/24/outline"),require("react"),require("@sudobility/types")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@heroicons/react/24/outline","react","@sudobility/types"],r):(z=typeof globalThis<"u"?globalThis:z||self,r(z.EntityComponents={},z.ReactJSXRuntime,z.HeroiconsOutline,z.React,z.SudobilityTypes))})(this,(function(z,r,v,$,J){"use strict";function ue(e){var s,o,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(s=0;s<a;s++)e[s]&&(o=ue(e[s]))&&(t&&(t+=" "),t+=o)}else for(o in e)e[o]&&(t&&(t+=" "),t+=o);return t}function Ue(){for(var e,s,o=0,t="",a=arguments.length;o<a;o++)(e=arguments[o])&&(s=ue(e))&&(t&&(t+=" "),t+=s);return t}const _e=(e,s)=>{const o=new Array(e.length+s.length);for(let t=0;t<e.length;t++)o[t]=e[t];for(let t=0;t<s.length;t++)o[e.length+t]=s[t];return o},We=(e,s)=>({classGroupId:e,validator:s}),fe=(e=new Map,s=null,o)=>({nextPart:e,validators:s,classGroupId:o}),H="-",ge=[],$e="arbitrary..",qe=e=>{const s=Ye(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:n=>{if(n.startsWith("[")&&n.endsWith("]"))return Xe(n);const l=n.split(H),i=l[0]===""&&l.length>1?1:0;return be(l,i,s)},getConflictingClassGroupIds:(n,l)=>{if(l){const i=t[n],m=o[n];return i?m?_e(m,i):i:m||ge}return o[n]||ge}}},be=(e,s,o)=>{if(e.length-s===0)return o.classGroupId;const a=e[s],c=o.nextPart.get(a);if(c){const m=be(e,s+1,c);if(m)return m}const n=o.validators;if(n===null)return;const l=s===0?e.join(H):e.slice(s).join(H),i=n.length;for(let m=0;m<i;m++){const f=n[m];if(f.validator(l))return f.classGroupId}},Xe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const s=e.slice(1,-1),o=s.indexOf(":"),t=s.slice(0,o);return t?$e+t:void 0})(),Ye=e=>{const{theme:s,classGroups:o}=e;return Je(o,s)},Je=(e,s)=>{const o=fe();for(const t in e){const a=e[t];se(a,o,t,s)}return o},se=(e,s,o,t)=>{const a=e.length;for(let c=0;c<a;c++){const n=e[c];He(n,s,o,t)}},He=(e,s,o,t)=>{if(typeof e=="string"){Ke(e,s,o);return}if(typeof e=="function"){Qe(e,s,o,t);return}Ze(e,s,o,t)},Ke=(e,s,o)=>{const t=e===""?s:he(s,e);t.classGroupId=o},Qe=(e,s,o,t)=>{if(Re(e)){se(e(t),s,o,t);return}s.validators===null&&(s.validators=[]),s.validators.push(We(o,e))},Ze=(e,s,o,t)=>{const a=Object.entries(e),c=a.length;for(let n=0;n<c;n++){const[l,i]=a[n];se(i,he(s,l),o,t)}},he=(e,s)=>{let o=e;const t=s.split(H),a=t.length;for(let c=0;c<a;c++){const n=t[c];let l=o.nextPart.get(n);l||(l=fe(),o.nextPart.set(n,l)),o=l}return o},Re=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,er=e=>{if(e<1)return{get:()=>{},set:()=>{}};let s=0,o=Object.create(null),t=Object.create(null);const a=(c,n)=>{o[c]=n,s++,s>e&&(s=0,t=o,o=Object.create(null))};return{get(c){let n=o[c];if(n!==void 0)return n;if((n=t[c])!==void 0)return a(c,n),n},set(c,n){c in o?o[c]=n:a(c,n)}}},ae="!",xe=":",rr=[],ye=(e,s,o,t,a)=>({modifiers:e,hasImportantModifier:s,baseClassName:o,maybePostfixModifierPosition:t,isExternal:a}),or=e=>{const{prefix:s,experimentalParseClassName:o}=e;let t=a=>{const c=[];let n=0,l=0,i=0,m;const f=a.length;for(let w=0;w<f;w++){const A=a[w];if(n===0&&l===0){if(A===xe){c.push(a.slice(i,w)),i=w+1;continue}if(A==="/"){m=w;continue}}A==="["?n++:A==="]"?n--:A==="("?l++:A===")"&&l--}const k=c.length===0?a:a.slice(i);let x=k,N=!1;k.endsWith(ae)?(x=k.slice(0,-1),N=!0):k.startsWith(ae)&&(x=k.slice(1),N=!0);const y=m&&m>i?m-i:void 0;return ye(c,N,x,y)};if(s){const a=s+xe,c=t;t=n=>n.startsWith(a)?c(n.slice(a.length)):ye(rr,!1,n,void 0,!0)}if(o){const a=t;t=c=>o({className:c,parseClassName:a})}return t},tr=e=>{const s=new Map;return e.orderSensitiveModifiers.forEach((o,t)=>{s.set(o,1e6+t)}),o=>{const t=[];let a=[];for(let c=0;c<o.length;c++){const n=o[c],l=n[0]==="[",i=s.has(n);l||i?(a.length>0&&(a.sort(),t.push(...a),a=[]),t.push(n)):a.push(n)}return a.length>0&&(a.sort(),t.push(...a)),t}},sr=e=>({cache:er(e.cacheSize),parseClassName:or(e),sortModifiers:tr(e),...qe(e)}),ar=/\s+/,nr=(e,s)=>{const{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:a,sortModifiers:c}=s,n=[],l=e.trim().split(ar);let i="";for(let m=l.length-1;m>=0;m-=1){const f=l[m],{isExternal:k,modifiers:x,hasImportantModifier:N,baseClassName:y,maybePostfixModifierPosition:w}=o(f);if(k){i=f+(i.length>0?" "+i:i);continue}let A=!!w,j=t(A?y.substring(0,w):y);if(!j){if(!A){i=f+(i.length>0?" "+i:i);continue}if(j=t(y),!j){i=f+(i.length>0?" "+i:i);continue}A=!1}const Z=x.length===0?"":x.length===1?x[0]:c(x).join(":"),X=N?Z+ae:Z,U=X+j;if(n.indexOf(U)>-1)continue;n.push(U);const _=a(j,A);for(let F=0;F<_.length;++F){const Y=_[F];n.push(X+Y)}i=f+(i.length>0?" "+i:i)}return i},lr=(...e)=>{let s=0,o,t,a="";for(;s<e.length;)(o=e[s++])&&(t=we(o))&&(a&&(a+=" "),a+=t);return a},we=e=>{if(typeof e=="string")return e;let s,o="";for(let t=0;t<e.length;t++)e[t]&&(s=we(e[t]))&&(o&&(o+=" "),o+=s);return o},ir=(e,...s)=>{let o,t,a,c;const n=i=>{const m=s.reduce((f,k)=>k(f),e());return o=sr(m),t=o.cache.get,a=o.cache.set,c=l,l(i)},l=i=>{const m=t(i);if(m)return m;const f=nr(i,o);return a(i,f),f};return c=n,(...i)=>c(lr(...i))},cr=[],C=e=>{const s=o=>o[e]||cr;return s.isThemeGetter=!0,s},ve=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ke=/^\((?:(\w[\w-]*):)?(.+)\)$/i,dr=/^\d+\/\d+$/,pr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ur=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=e=>dr.test(e),b=e=>!!e&&!Number.isNaN(Number(e)),O=e=>!!e&&Number.isInteger(Number(e)),ne=e=>e.endsWith("%")&&b(e.slice(0,-1)),E=e=>pr.test(e),br=()=>!0,hr=e=>mr.test(e)&&!ur.test(e),Ne=()=>!1,xr=e=>fr.test(e),yr=e=>gr.test(e),wr=e=>!d(e)&&!p(e),vr=e=>V(e,Ae,Ne),d=e=>ve.test(e),G=e=>V(e,Me,hr),le=e=>V(e,zr,b),Ce=e=>V(e,ze,Ne),kr=e=>V(e,Se,yr),K=e=>V(e,Ee,xr),p=e=>ke.test(e),q=e=>D(e,Me),Nr=e=>D(e,Sr),Ie=e=>D(e,ze),Cr=e=>D(e,Ae),Ir=e=>D(e,Se),Q=e=>D(e,Ee,!0),V=(e,s,o)=>{const t=ve.exec(e);return t?t[1]?s(t[1]):o(t[2]):!1},D=(e,s,o=!1)=>{const t=ke.exec(e);return t?t[1]?s(t[1]):o:!1},ze=e=>e==="position"||e==="percentage",Se=e=>e==="image"||e==="url",Ae=e=>e==="length"||e==="size"||e==="bg-size",Me=e=>e==="length",zr=e=>e==="number",Sr=e=>e==="family-name",Ee=e=>e==="shadow",Ar=ir(()=>{const e=C("color"),s=C("font"),o=C("text"),t=C("font-weight"),a=C("tracking"),c=C("leading"),n=C("breakpoint"),l=C("container"),i=C("spacing"),m=C("radius"),f=C("shadow"),k=C("inset-shadow"),x=C("text-shadow"),N=C("drop-shadow"),y=C("blur"),w=C("perspective"),A=C("aspect"),j=C("ease"),Z=C("animate"),X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...U(),p,d],F=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],g=()=>[p,d,i],P=()=>[B,"full","auto",...g()],Oe=()=>[O,"none","subgrid",p,d],Ge=()=>["auto",{span:["full",O,p,d]},O,p,d],R=()=>[O,"auto",p,d],je=()=>["auto","min","max","fr",p,d],de=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...g()],L=()=>[B,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],u=()=>[e,p,d],Fe=()=>[...U(),Ie,Ce,{position:[p,d]}],Le=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Be=()=>["auto","cover","contain",Cr,vr,{size:[p,d]}],pe=()=>[ne,q,G],S=()=>["","none","full",m,p,d],M=()=>["",b,q,G],ee=()=>["solid","dashed","dotted","double"],Ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[b,ne,Ie,Ce],De=()=>["","none",y,p,d],re=()=>["none",b,p,d],oe=()=>["none",b,p,d],me=()=>[b,p,d],te=()=>[B,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[E],breakpoint:[E],color:[br],container:[E],"drop-shadow":[E],ease:["in","out","in-out"],font:[wr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[E],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[E],shadow:[E],spacing:["px",b],text:[E],"text-shadow":[E],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",B,d,p,A]}],container:["container"],columns:[{columns:[b,d,p,l]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[O,"auto",p,d]}],basis:[{basis:[B,"full","auto",l,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[b,B,"auto","initial","none",d]}],grow:[{grow:["",b,p,d]}],shrink:[{shrink:["",b,p,d]}],order:[{order:[O,"first","last","none",p,d]}],"grid-cols":[{"grid-cols":Oe()}],"col-start-end":[{col:Ge()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":Oe()}],"row-start-end":[{row:Ge()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":je()}],"auto-rows":[{"auto-rows":je()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...de(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...de()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":de()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[l,"screen",...L()]}],"min-w":[{"min-w":[l,"screen","none",...L()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[n]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",o,q,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,p,le]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ne,d]}],"font-family":[{font:[Nr,d,s]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,p,d]}],"line-clamp":[{"line-clamp":[b,"none",p,le]}],leading:[{leading:[c,...g()]}],"list-image":[{"list-image":["none",p,d]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",p,d]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:u()}],"text-color":[{text:u()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[b,"from-font","auto",p,G]}],"text-decoration-color":[{decoration:u()}],"underline-offset":[{"underline-offset":[b,"auto",p,d]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p,d]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",p,d]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Fe()}],"bg-repeat":[{bg:Le()}],"bg-size":[{bg:Be()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},O,p,d],radial:["",p,d],conic:[O,p,d]},Ir,kr]}],"bg-color":[{bg:u()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:u()}],"gradient-via":[{via:u()}],"gradient-to":[{to:u()}],rounded:[{rounded:S()}],"rounded-s":[{"rounded-s":S()}],"rounded-e":[{"rounded-e":S()}],"rounded-t":[{"rounded-t":S()}],"rounded-r":[{"rounded-r":S()}],"rounded-b":[{"rounded-b":S()}],"rounded-l":[{"rounded-l":S()}],"rounded-ss":[{"rounded-ss":S()}],"rounded-se":[{"rounded-se":S()}],"rounded-ee":[{"rounded-ee":S()}],"rounded-es":[{"rounded-es":S()}],"rounded-tl":[{"rounded-tl":S()}],"rounded-tr":[{"rounded-tr":S()}],"rounded-br":[{"rounded-br":S()}],"rounded-bl":[{"rounded-bl":S()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:u()}],"border-color-x":[{"border-x":u()}],"border-color-y":[{"border-y":u()}],"border-color-s":[{"border-s":u()}],"border-color-e":[{"border-e":u()}],"border-color-t":[{"border-t":u()}],"border-color-r":[{"border-r":u()}],"border-color-b":[{"border-b":u()}],"border-color-l":[{"border-l":u()}],"divide-color":[{divide:u()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[b,p,d]}],"outline-w":[{outline:["",b,q,G]}],"outline-color":[{outline:u()}],shadow:[{shadow:["","none",f,Q,K]}],"shadow-color":[{shadow:u()}],"inset-shadow":[{"inset-shadow":["none",k,Q,K]}],"inset-shadow-color":[{"inset-shadow":u()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:u()}],"ring-offset-w":[{"ring-offset":[b,G]}],"ring-offset-color":[{"ring-offset":u()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":u()}],"text-shadow":[{"text-shadow":["none",x,Q,K]}],"text-shadow-color":[{"text-shadow":u()}],opacity:[{opacity:[b,p,d]}],"mix-blend":[{"mix-blend":[...Ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[b]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":u()}],"mask-image-linear-to-color":[{"mask-linear-to":u()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":u()}],"mask-image-t-to-color":[{"mask-t-to":u()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":u()}],"mask-image-r-to-color":[{"mask-r-to":u()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":u()}],"mask-image-b-to-color":[{"mask-b-to":u()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":u()}],"mask-image-l-to-color":[{"mask-l-to":u()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":u()}],"mask-image-x-to-color":[{"mask-x-to":u()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":u()}],"mask-image-y-to-color":[{"mask-y-to":u()}],"mask-image-radial":[{"mask-radial":[p,d]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":u()}],"mask-image-radial-to-color":[{"mask-radial-to":u()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":U()}],"mask-image-conic-pos":[{"mask-conic":[b]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":u()}],"mask-image-conic-to-color":[{"mask-conic-to":u()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Fe()}],"mask-repeat":[{mask:Le()}],"mask-size":[{mask:Be()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",p,d]}],filter:[{filter:["","none",p,d]}],blur:[{blur:De()}],brightness:[{brightness:[b,p,d]}],contrast:[{contrast:[b,p,d]}],"drop-shadow":[{"drop-shadow":["","none",N,Q,K]}],"drop-shadow-color":[{"drop-shadow":u()}],grayscale:[{grayscale:["",b,p,d]}],"hue-rotate":[{"hue-rotate":[b,p,d]}],invert:[{invert:["",b,p,d]}],saturate:[{saturate:[b,p,d]}],sepia:[{sepia:["",b,p,d]}],"backdrop-filter":[{"backdrop-filter":["","none",p,d]}],"backdrop-blur":[{"backdrop-blur":De()}],"backdrop-brightness":[{"backdrop-brightness":[b,p,d]}],"backdrop-contrast":[{"backdrop-contrast":[b,p,d]}],"backdrop-grayscale":[{"backdrop-grayscale":["",b,p,d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b,p,d]}],"backdrop-invert":[{"backdrop-invert":["",b,p,d]}],"backdrop-opacity":[{"backdrop-opacity":[b,p,d]}],"backdrop-saturate":[{"backdrop-saturate":[b,p,d]}],"backdrop-sepia":[{"backdrop-sepia":["",b,p,d]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",p,d]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[b,"initial",p,d]}],ease:[{ease:["linear","initial",j,p,d]}],delay:[{delay:[b,p,d]}],animate:[{animate:["none",Z,p,d]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,p,d]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[p,d,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:u()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:u()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p,d]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",p,d]}],fill:[{fill:["none",...u()]}],"stroke-w":[{stroke:[b,q,G,le]}],stroke:[{stroke:["none",...u()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function h(...e){return Ar(Ue(e))}const Mr={owner:"bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300",admin:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300",member:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"};function Pe({entity:e,isSelected:s=!1,onClick:o,className:t,onTrack:a,trackingLabel:c,componentName:n="EntityCard"}){const l=e.entityType==="personal",i=l?v.UserIcon:v.BuildingOffice2Icon,m=()=>{a?.({action:"click",trackingLabel:c,componentName:n}),o?.()};return r.jsx("div",{onClick:o?m:void 0,className:h("rounded-lg border p-4 transition-all",o&&"cursor-pointer hover:border-primary",s&&"border-primary bg-primary/5",!s&&"border-border bg-card",t),children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("div",{className:h("flex h-10 w-10 items-center justify-center rounded-full",l?"bg-blue-100 dark:bg-blue-900":"bg-purple-100 dark:bg-purple-900"),children:e.avatarUrl?r.jsx("img",{src:e.avatarUrl,alt:e.displayName,className:"h-10 w-10 rounded-full object-cover"}):r.jsx(i,{className:h("h-5 w-5",l?"text-blue-600 dark:text-blue-400":"text-purple-600 dark:text-purple-400")})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("h3",{className:"font-medium text-foreground truncate",children:e.displayName}),r.jsx("span",{className:h("text-xs px-2 py-0.5 rounded-full font-medium",Mr[e.userRole]),children:e.userRole})]}),r.jsx("p",{className:"text-sm text-muted-foreground",children:l?"Personal workspace":"Organization"}),e.description&&r.jsx("p",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function Er({entities:e,selectedSlug:s,onSelect:o,isLoading:t=!1,emptyMessage:a="No workspaces found",className:c,onTrack:n,trackingLabel:l,componentName:i="EntityList"}){if(t)return r.jsx("div",{className:h("space-y-3",c),children:[1,2,3].map(f=>r.jsx("div",{className:"h-24 rounded-lg border border-border bg-muted animate-pulse"},f))});if(e.length===0)return r.jsx("div",{className:h("text-center py-8 text-muted-foreground",c),children:a});const m=f=>{n?.({action:"select",trackingLabel:l,componentName:i}),o?.(f)};return r.jsx("div",{className:h("space-y-3",c),children:e.map(f=>r.jsx(Pe,{entity:f,isSelected:f.entitySlug===s,onClick:o?()=>m(f):void 0,onTrack:n,trackingLabel:l},f.id))})}function Pr({entities:e,currentEntity:s,onSelect:o,onCreateNew:t,isLoading:a=!1,className:c,onTrack:n,trackingLabel:l,componentName:i="EntitySelector"}){const[m,f]=$.useState(!1),k=()=>{n?.({action:"toggle",trackingLabel:l,componentName:i}),f(!m)},x=y=>{n?.({action:"select",trackingLabel:l,componentName:i}),o(y),f(!1)},N=()=>{n?.({action:"create_new",trackingLabel:l,componentName:i}),t?.(),f(!1)};return r.jsxs("div",{className:h("relative",c),children:[r.jsxs("button",{type:"button",onClick:k,disabled:a,className:h("flex items-center gap-2 px-3 py-2 rounded-lg border","bg-background hover:bg-muted transition-colors","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",a&&"opacity-50 cursor-not-allowed"),children:[s?r.jsxs(r.Fragment,{children:[s.entityType==="personal"?r.jsx(v.UserIcon,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"}):r.jsx(v.BuildingOffice2Icon,{className:"h-4 w-4 text-purple-600 dark:text-purple-400"}),r.jsx("span",{className:"font-medium text-sm truncate max-w-[150px]",children:s.displayName})]}):r.jsx("span",{className:"text-sm text-muted-foreground",children:"Select workspace"}),r.jsx(v.ChevronDownIcon,{className:h("h-4 w-4 text-muted-foreground transition-transform",m&&"rotate-180")})]}),m&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>f(!1)}),r.jsx("div",{className:h("absolute top-full left-0 mt-1 z-50","min-w-[220px] rounded-lg border bg-popover shadow-lg","animate-in fade-in-0 zoom-in-95"),children:r.jsxs("div",{className:"p-1",children:[e.filter(y=>y.entityType==="personal").map(y=>r.jsx(Te,{entity:y,isSelected:y.id===s?.id,onClick:()=>x(y)},y.id)),e.some(y=>y.entityType==="personal")&&e.some(y=>y.entityType==="organization")&&r.jsx("div",{className:"my-1 h-px bg-border"}),e.filter(y=>y.entityType==="organization").map(y=>r.jsx(Te,{entity:y,isSelected:y.id===s?.id,onClick:()=>x(y)},y.id)),t&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"my-1 h-px bg-border"}),r.jsxs("button",{type:"button",onClick:N,className:h("flex items-center gap-2 w-full px-2 py-1.5 rounded","text-sm text-primary hover:bg-muted transition-colors"),children:[r.jsx(v.PlusIcon,{className:"h-4 w-4"}),r.jsx("span",{children:"Create organization"})]})]})]})})]})]})}function Te({entity:e,isSelected:s,onClick:o}){const t=e.entityType==="personal",a=t?v.UserIcon:v.BuildingOffice2Icon;return r.jsxs("button",{type:"button",onClick:o,className:h("flex items-center gap-2 w-full px-2 py-1.5 rounded","text-sm transition-colors",s?"bg-primary/10 text-primary":"hover:bg-muted text-foreground"),children:[r.jsx(a,{className:h("h-4 w-4",t?"text-blue-600 dark:text-blue-400":"text-purple-600 dark:text-purple-400")}),r.jsx("span",{className:"flex-1 text-left truncate",children:e.displayName}),s&&r.jsx(v.CheckIcon,{className:"h-4 w-4"})]})}const ie=[{value:J.EntityRole.OWNER,label:"Owner",description:"Full access to all settings and members",icon:v.ShieldCheckIcon,color:"text-purple-600 dark:text-purple-400"},{value:J.EntityRole.ADMIN,label:"Admin",description:"Can manage projects and API keys",icon:v.BriefcaseIcon,color:"text-blue-600 dark:text-blue-400"},{value:J.EntityRole.MEMBER,label:"Member",description:"Read-only access",icon:v.EyeIcon,color:"text-gray-600 dark:text-gray-400"}];function ce({value:e,onChange:s,disabled:o=!1,className:t,onTrack:a,trackingLabel:c,componentName:n="MemberRoleSelector"}){const[l,i]=$.useState(!1),m=ie.find(x=>x.value===e)||ie[2],f=()=>{o||(a?.({action:"toggle",trackingLabel:c,componentName:n}),i(!l))},k=x=>{a?.({action:"select",trackingLabel:c,componentName:n}),s(x),i(!1)};return r.jsxs("div",{className:h("relative",t),children:[r.jsxs("button",{type:"button",onClick:f,disabled:o,className:h("flex items-center gap-1.5 px-2 py-1 rounded border text-sm","bg-background transition-colors",o?"opacity-50 cursor-not-allowed":"hover:bg-muted cursor-pointer"),children:[r.jsx(m.icon,{className:h("h-3.5 w-3.5",m.color)}),r.jsx("span",{children:m.label}),r.jsx(v.ChevronDownIcon,{className:h("h-3.5 w-3.5 text-muted-foreground transition-transform",l&&"rotate-180")})]}),l&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),r.jsx("div",{className:h("absolute top-full right-0 mt-1 z-50","min-w-[200px] rounded-lg border bg-popover shadow-lg p-1","animate-in fade-in-0 zoom-in-95"),children:ie.map(x=>r.jsxs("button",{type:"button",onClick:()=>k(x.value),className:h("flex items-start gap-2 w-full px-2 py-2 rounded text-left","transition-colors",x.value===e?"bg-primary/10":"hover:bg-muted"),children:[r.jsx(x.icon,{className:h("h-4 w-4 mt-0.5",x.color)}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"font-medium text-sm",children:x.label}),x.value===e&&r.jsx(v.CheckIcon,{className:"h-3.5 w-3.5 text-primary"})]}),r.jsx("p",{className:"text-xs text-muted-foreground",children:x.description})]})]},x.value))})]})]})}const Tr={owner:"bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300",admin:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300",member:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"};function Or({members:e,currentUserId:s,canManage:o=!1,onRoleChange:t,onRemove:a,isLoading:c=!1,emptyMessage:n="No members found",className:l,onTrack:i,trackingLabel:m,componentName:f="MemberList"}){if(c)return r.jsx("div",{className:h("space-y-2",l),children:[1,2,3].map(N=>r.jsx("div",{className:"h-16 rounded-lg border border-border bg-muted animate-pulse"},N))});if(e.length===0)return r.jsx("div",{className:h("text-center py-8 text-muted-foreground",l),children:n});const k=(N,y)=>{i?.({action:"role_change",trackingLabel:m,componentName:f}),t?.(N,y)},x=N=>{i?.({action:"remove",trackingLabel:m,componentName:f}),a?.(N)};return r.jsx("div",{className:h("divide-y divide-border rounded-lg border",l),children:e.map(N=>r.jsx(Gr,{member:N,isSelf:N.userId===s,canManage:o,onRoleChange:t?k:void 0,onRemove:a?x:void 0},N.id))})}function Gr({member:e,isSelf:s,canManage:o,onRoleChange:t,onRemove:a}){const c=e.user?.displayName||e.user?.email||"Unknown user",n=e.user?.email;return r.jsxs("div",{className:"flex items-center gap-3 p-3",children:[r.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-muted",children:r.jsx(v.UserIcon,{className:"h-5 w-5 text-muted-foreground"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("p",{className:"font-medium text-foreground truncate",children:c}),s&&r.jsx("span",{className:"text-xs text-muted-foreground",children:"(you)"})]}),n&&r.jsx("p",{className:"text-sm text-muted-foreground truncate",children:n})]}),o&&t&&!s?r.jsx(ce,{value:e.role,onChange:l=>t(e.userId,l)}):r.jsx("span",{className:h("text-xs px-2 py-1 rounded-full font-medium",Tr[e.role]),children:e.role}),o&&a&&!s&&r.jsx("button",{type:"button",onClick:()=>a(e.userId),className:h("p-1.5 rounded hover:bg-destructive/10 text-muted-foreground","hover:text-destructive transition-colors"),title:"Remove member",children:r.jsx(v.TrashIcon,{className:"h-4 w-4"})})]})}function jr({onSubmit:e,isSubmitting:s=!1,defaultRole:o=J.EntityRole.MEMBER,className:t,onTrack:a,trackingLabel:c,componentName:n="InvitationForm"}){const[l,i]=$.useState(""),[m,f]=$.useState(o),[k,x]=$.useState(null),N=async y=>{if(y.preventDefault(),x(null),!l.trim()){x("Email is required");return}if(!Fr(l)){x("Please enter a valid email address");return}a?.({action:"submit",trackingLabel:c,componentName:n});try{await e({email:l.trim(),role:m}),i(""),f(o)}catch(w){x(w.message||"Failed to send invitation")}};return r.jsxs("form",{onSubmit:N,className:h("space-y-4",t),children:[r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(v.EnvelopeIcon,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),r.jsx("input",{type:"email",value:l,onChange:y=>i(y.target.value),placeholder:"Enter email address",disabled:s,className:h("w-full pl-10 pr-3 py-2 rounded-lg border bg-background","text-sm placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",k&&"border-destructive focus:ring-destructive",s&&"opacity-50 cursor-not-allowed")})]}),r.jsx(ce,{value:m,onChange:f,disabled:s}),r.jsxs("button",{type:"submit",disabled:s||!l.trim(),className:h("flex items-center gap-2 px-4 py-2 rounded-lg","bg-primary text-primary-foreground font-medium text-sm","hover:bg-primary/90 transition-colors","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",(s||!l.trim())&&"opacity-50 cursor-not-allowed"),children:[s?r.jsx(v.ArrowPathIcon,{className:"h-4 w-4 animate-spin"}):r.jsx(v.PaperAirplaneIcon,{className:"h-4 w-4"}),r.jsx("span",{className:"hidden sm:inline",children:"Invite"})]})]}),k&&r.jsx("p",{className:"text-sm text-destructive",children:k})]})}function Fr(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}const Lr={owner:"bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300",admin:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300",member:"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"};function Br({invitations:e,mode:s,onCancel:o,onAccept:t,onDecline:a,isLoading:c=!1,emptyMessage:n="No pending invitations",className:l,onTrack:i,trackingLabel:m,componentName:f="InvitationList"}){const k=e.filter(w=>w.status==="pending");if(c)return r.jsx("div",{className:h("space-y-2",l),children:[1,2].map(w=>r.jsx("div",{className:"h-16 rounded-lg border border-border bg-muted animate-pulse"},w))});if(k.length===0)return r.jsx("div",{className:h("text-center py-8 text-muted-foreground",l),children:n});const x=w=>{i?.({action:"cancel",trackingLabel:m,componentName:f}),o?.(w)},N=w=>{i?.({action:"accept",trackingLabel:m,componentName:f}),t?.(w)},y=w=>{i?.({action:"decline",trackingLabel:m,componentName:f}),a?.(w)};return r.jsx("div",{className:h("divide-y divide-border rounded-lg border",l),children:k.map(w=>r.jsx(Vr,{invitation:w,mode:s,onCancel:o?x:void 0,onAccept:t?N:void 0,onDecline:a?y:void 0},w.id))})}function Vr({invitation:e,mode:s,onCancel:o,onAccept:t,onDecline:a}){const c=new Date(e.expiresAt),n=c<new Date,l=Math.ceil((c.getTime()-Date.now())/(1e3*60*60*24));return r.jsxs("div",{className:"flex items-center gap-3 p-3",children:[r.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-muted",children:r.jsx(v.EnvelopeIcon,{className:"h-5 w-5 text-muted-foreground"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[s==="user"&&e.entity?r.jsx("p",{className:"font-medium text-foreground truncate",children:e.entity.displayName}):r.jsx("p",{className:"font-medium text-foreground truncate",children:e.email}),r.jsx("span",{className:h("text-xs px-2 py-0.5 rounded-full font-medium",Lr[e.role]),children:e.role})]}),r.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[r.jsx(v.ClockIcon,{className:"h-3.5 w-3.5"}),n?r.jsx("span",{className:"text-destructive",children:"Expired"}):r.jsxs("span",{children:["Expires in ",l," days"]})]})]}),s==="admin"&&o&&r.jsx("button",{type:"button",onClick:()=>o(e.id),className:h("p-1.5 rounded hover:bg-destructive/10 text-muted-foreground","hover:text-destructive transition-colors"),title:"Cancel invitation",children:r.jsx(v.XCircleIcon,{className:"h-4 w-4"})}),s==="user"&&r.jsxs("div",{className:"flex items-center gap-2",children:[a&&r.jsxs("button",{type:"button",onClick:()=>a(e.token),className:h("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm","border hover:bg-muted transition-colors"),children:[r.jsx(v.XMarkIcon,{className:"h-4 w-4"}),r.jsx("span",{children:"Decline"})]}),t&&r.jsxs("button",{type:"button",onClick:()=>t(e.token),disabled:n,className:h("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm","bg-primary text-primary-foreground","hover:bg-primary/90 transition-colors",n&&"opacity-50 cursor-not-allowed"),children:[r.jsx(v.CheckIcon,{className:"h-4 w-4"}),r.jsx("span",{children:"Accept"})]})]})]})}z.EntityCard=Pe,z.EntityList=Er,z.EntitySelector=Pr,z.InvitationForm=jr,z.InvitationList=Br,z.MemberList=Or,z.MemberRoleSelector=ce,z.cn=h,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/entity-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Entity/Organization UI components for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"author": "John Q Huang",
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@sudobility/components": "
|
|
42
|
-
"@sudobility/design": "^1.1.
|
|
43
|
-
"@sudobility/types": "^1.9.
|
|
41
|
+
"@sudobility/components": "^4.0.156",
|
|
42
|
+
"@sudobility/design": "^1.1.18",
|
|
43
|
+
"@sudobility/types": "^1.9.44",
|
|
44
44
|
"react": "^18.0.0 || ^19.0.0",
|
|
45
45
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@eslint/js": "^9.38.0",
|
|
49
49
|
"ajv": "^8.17.1",
|
|
50
|
-
"@sudobility/components": "
|
|
51
|
-
"@sudobility/design": "^1.1.
|
|
52
|
-
"@sudobility/types": "^1.9.
|
|
50
|
+
"@sudobility/components": "^4.0.156",
|
|
51
|
+
"@sudobility/design": "^1.1.18",
|
|
52
|
+
"@sudobility/types": "^1.9.44",
|
|
53
53
|
"@testing-library/dom": "^10.4.0",
|
|
54
54
|
"@testing-library/jest-dom": "^6.4.2",
|
|
55
55
|
"@testing-library/react": "^16.0.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"eslint-plugin-react-hooks": "^7.0.0",
|
|
68
68
|
"eslint-plugin-react-refresh": "^0.4.0",
|
|
69
69
|
"jsdom": "^24.0.0",
|
|
70
|
-
"
|
|
70
|
+
"@heroicons/react": "^2.2.0",
|
|
71
71
|
"prettier": "^3.6.2",
|
|
72
72
|
"react": "^19.2.0",
|
|
73
73
|
"react-dom": "^19.2.0",
|