fina-react-ds 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +4 -0
- package/dist/components/alert-dialog.d.ts +16 -0
- package/dist/components/alert.d.ts +8 -0
- package/dist/components/alert.js +70 -0
- package/dist/components/avatar.d.ts +5 -0
- package/dist/components/avatar.js +58 -0
- package/dist/components/badge.d.ts +8 -0
- package/dist/components/badge.js +43 -0
- package/dist/components/button.d.ts +10 -0
- package/dist/components/button.js +152 -0
- package/dist/components/card.d.ts +8 -0
- package/dist/components/card.js +99 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.js +34 -0
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.js +148 -0
- package/dist/components/dropdown-menu.d.ts +25 -0
- package/dist/components/dropdown-menu.js +248 -0
- package/dist/components/input.d.ts +3 -0
- package/dist/components/input.js +24 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.js +32 -0
- package/dist/components/pagination.d.ts +13 -0
- package/dist/components/pagination.js +128 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.js +50 -0
- package/dist/components/select.d.ts +11 -0
- package/dist/components/select.js +48 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/simple-pagination.d.ts +6 -0
- package/dist/components/simple-pagination.js +34 -0
- package/dist/components/tabs.d.ts +7 -0
- package/dist/components/tabs.js +73 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/index.js +80 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +11 -0
- package/dist/lib.d.ts +16 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +534 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +430 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +215 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +159 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +149 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +80 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +258 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +51 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +34 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +76 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +265 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +133 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +230 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +21 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +149 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.js +22 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +663 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +247 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +224 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +77 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +39 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +189 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +60 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +168 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +59 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +19 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +30 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +54 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +9 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +116 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +33 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +18 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +70 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +73 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +27 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +13 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +17 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +35 -0
- package/dist/node_modules/tslib/tslib.es6.js +31 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +9 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +29 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +28 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +21 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +72 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +73 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +62 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +13 -0
- package/dist/themes/base.css +1982 -0
- package/dist/themes/pro.css +188 -0
- package/dist/themes/puulse-colors.css +388 -0
- package/package.json +114 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
|
+
var n = (t, e) => E(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
function l() {
|
|
4
|
+
return typeof window < "u";
|
|
5
|
+
}
|
|
6
|
+
n(l, "hasWindow");
|
|
7
|
+
function a(t) {
|
|
8
|
+
return m(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
9
|
+
}
|
|
10
|
+
n(a, "getNodeName");
|
|
11
|
+
function c(t) {
|
|
12
|
+
var e;
|
|
13
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
14
|
+
}
|
|
15
|
+
n(c, "getWindow");
|
|
16
|
+
function T(t) {
|
|
17
|
+
var e;
|
|
18
|
+
return (e = (m(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
19
|
+
}
|
|
20
|
+
n(T, "getDocumentElement");
|
|
21
|
+
function m(t) {
|
|
22
|
+
return l() ? t instanceof Node || t instanceof c(t).Node : !1;
|
|
23
|
+
}
|
|
24
|
+
n(m, "isNode");
|
|
25
|
+
function w(t) {
|
|
26
|
+
return l() ? t instanceof Element || t instanceof c(t).Element : !1;
|
|
27
|
+
}
|
|
28
|
+
n(w, "isElement");
|
|
29
|
+
function y(t) {
|
|
30
|
+
return l() ? t instanceof HTMLElement || t instanceof c(t).HTMLElement : !1;
|
|
31
|
+
}
|
|
32
|
+
n(y, "isHTMLElement");
|
|
33
|
+
function d(t) {
|
|
34
|
+
return !l() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof c(t).ShadowRoot;
|
|
35
|
+
}
|
|
36
|
+
n(d, "isShadowRoot");
|
|
37
|
+
const v = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
38
|
+
function h(t) {
|
|
39
|
+
const {
|
|
40
|
+
overflow: e,
|
|
41
|
+
overflowX: o,
|
|
42
|
+
overflowY: r,
|
|
43
|
+
display: i
|
|
44
|
+
} = b(t);
|
|
45
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + r + o) && !v.has(i);
|
|
46
|
+
}
|
|
47
|
+
n(h, "isOverflowElement");
|
|
48
|
+
const L = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
49
|
+
function H(t) {
|
|
50
|
+
return L.has(a(t));
|
|
51
|
+
}
|
|
52
|
+
n(H, "isTableElement");
|
|
53
|
+
const D = [":popover-open", ":modal"];
|
|
54
|
+
function C(t) {
|
|
55
|
+
return D.some((e) => {
|
|
56
|
+
try {
|
|
57
|
+
return t.matches(e);
|
|
58
|
+
} catch {
|
|
59
|
+
return !1;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
n(C, "isTopLayer");
|
|
64
|
+
const k = ["transform", "translate", "scale", "rotate", "perspective"], V = ["transform", "translate", "scale", "rotate", "perspective", "filter"], O = ["paint", "layout", "strict", "content"];
|
|
65
|
+
function R(t) {
|
|
66
|
+
const e = _(), o = w(t) ? b(t) : t;
|
|
67
|
+
return k.some((r) => o[r] ? o[r] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || V.some((r) => (o.willChange || "").includes(r)) || O.some((r) => (o.contain || "").includes(r));
|
|
68
|
+
}
|
|
69
|
+
n(R, "isContainingBlock");
|
|
70
|
+
function M(t) {
|
|
71
|
+
let e = u(t);
|
|
72
|
+
for (; y(e) && !S(e); ) {
|
|
73
|
+
if (R(e))
|
|
74
|
+
return e;
|
|
75
|
+
if (C(e))
|
|
76
|
+
return null;
|
|
77
|
+
e = u(e);
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
n(M, "getContainingBlock");
|
|
82
|
+
function _() {
|
|
83
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
84
|
+
}
|
|
85
|
+
n(_, "isWebKit");
|
|
86
|
+
const A = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
87
|
+
function S(t) {
|
|
88
|
+
return A.has(a(t));
|
|
89
|
+
}
|
|
90
|
+
n(S, "isLastTraversableNode");
|
|
91
|
+
function b(t) {
|
|
92
|
+
return c(t).getComputedStyle(t);
|
|
93
|
+
}
|
|
94
|
+
n(b, "getComputedStyle");
|
|
95
|
+
function P(t) {
|
|
96
|
+
return w(t) ? {
|
|
97
|
+
scrollLeft: t.scrollLeft,
|
|
98
|
+
scrollTop: t.scrollTop
|
|
99
|
+
} : {
|
|
100
|
+
scrollLeft: t.scrollX,
|
|
101
|
+
scrollTop: t.scrollY
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
n(P, "getNodeScroll");
|
|
105
|
+
function u(t) {
|
|
106
|
+
if (a(t) === "html")
|
|
107
|
+
return t;
|
|
108
|
+
const e = (
|
|
109
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
110
|
+
t.assignedSlot || // DOM Element detected.
|
|
111
|
+
t.parentNode || // ShadowRoot detected.
|
|
112
|
+
d(t) && t.host || // Fallback.
|
|
113
|
+
T(t)
|
|
114
|
+
);
|
|
115
|
+
return d(e) ? e.host : e;
|
|
116
|
+
}
|
|
117
|
+
n(u, "getParentNode");
|
|
118
|
+
function g(t) {
|
|
119
|
+
const e = u(t);
|
|
120
|
+
return S(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : y(e) && h(e) ? e : g(e);
|
|
121
|
+
}
|
|
122
|
+
n(g, "getNearestOverflowAncestor");
|
|
123
|
+
function p(t, e, o) {
|
|
124
|
+
var r;
|
|
125
|
+
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
126
|
+
const i = g(t), N = i === ((r = t.ownerDocument) == null ? void 0 : r.body), s = c(i);
|
|
127
|
+
if (N) {
|
|
128
|
+
const f = B(s);
|
|
129
|
+
return e.concat(s, s.visualViewport || [], h(i) ? i : [], f && o ? p(f) : []);
|
|
130
|
+
}
|
|
131
|
+
return e.concat(i, p(i, [], o));
|
|
132
|
+
}
|
|
133
|
+
n(p, "getOverflowAncestors");
|
|
134
|
+
function B(t) {
|
|
135
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
136
|
+
}
|
|
137
|
+
n(B, "getFrameElement");
|
|
138
|
+
export {
|
|
139
|
+
b as getComputedStyle,
|
|
140
|
+
M as getContainingBlock,
|
|
141
|
+
T as getDocumentElement,
|
|
142
|
+
B as getFrameElement,
|
|
143
|
+
g as getNearestOverflowAncestor,
|
|
144
|
+
a as getNodeName,
|
|
145
|
+
P as getNodeScroll,
|
|
146
|
+
p as getOverflowAncestors,
|
|
147
|
+
u as getParentNode,
|
|
148
|
+
c as getWindow,
|
|
149
|
+
R as isContainingBlock,
|
|
150
|
+
w as isElement,
|
|
151
|
+
y as isHTMLElement,
|
|
152
|
+
S as isLastTraversableNode,
|
|
153
|
+
m as isNode,
|
|
154
|
+
h as isOverflowElement,
|
|
155
|
+
d as isShadowRoot,
|
|
156
|
+
H as isTableElement,
|
|
157
|
+
C as isTopLayer,
|
|
158
|
+
_ as isWebKit
|
|
159
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var n = (t, e) => p(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
const E = ["top", "right", "bottom", "left"], h = Math.min, x = Math.max, R = Math.round, T = Math.floor, k = /* @__PURE__ */ n((t) => ({
|
|
4
|
+
x: t,
|
|
5
|
+
y: t
|
|
6
|
+
}), "createCoords"), b = {
|
|
7
|
+
left: "right",
|
|
8
|
+
right: "left",
|
|
9
|
+
bottom: "top",
|
|
10
|
+
top: "bottom"
|
|
11
|
+
}, d = {
|
|
12
|
+
start: "end",
|
|
13
|
+
end: "start"
|
|
14
|
+
};
|
|
15
|
+
function q(t, e, o) {
|
|
16
|
+
return x(t, h(e, o));
|
|
17
|
+
}
|
|
18
|
+
n(q, "clamp");
|
|
19
|
+
function z(t, e) {
|
|
20
|
+
return typeof t == "function" ? t(e) : t;
|
|
21
|
+
}
|
|
22
|
+
n(z, "evaluate");
|
|
23
|
+
function a(t) {
|
|
24
|
+
return t.split("-")[0];
|
|
25
|
+
}
|
|
26
|
+
n(a, "getSide");
|
|
27
|
+
function m(t) {
|
|
28
|
+
return t.split("-")[1];
|
|
29
|
+
}
|
|
30
|
+
n(m, "getAlignment");
|
|
31
|
+
function A(t) {
|
|
32
|
+
return t === "x" ? "y" : "x";
|
|
33
|
+
}
|
|
34
|
+
n(A, "getOppositeAxis");
|
|
35
|
+
function P(t) {
|
|
36
|
+
return t === "y" ? "height" : "width";
|
|
37
|
+
}
|
|
38
|
+
n(P, "getAxisLength");
|
|
39
|
+
const y = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
40
|
+
function M(t) {
|
|
41
|
+
return y.has(a(t)) ? "y" : "x";
|
|
42
|
+
}
|
|
43
|
+
n(M, "getSideAxis");
|
|
44
|
+
function O(t) {
|
|
45
|
+
return A(M(t));
|
|
46
|
+
}
|
|
47
|
+
n(O, "getAlignmentAxis");
|
|
48
|
+
function B(t, e, o) {
|
|
49
|
+
o === void 0 && (o = !1);
|
|
50
|
+
const c = m(t), r = O(t), i = P(r);
|
|
51
|
+
let s = r === "x" ? c === (o ? "end" : "start") ? "right" : "left" : c === "start" ? "bottom" : "top";
|
|
52
|
+
return e.reference[i] > e.floating[i] && (s = u(s)), [s, u(s)];
|
|
53
|
+
}
|
|
54
|
+
n(B, "getAlignmentSides");
|
|
55
|
+
function D(t) {
|
|
56
|
+
const e = u(t);
|
|
57
|
+
return [f(t), e, f(e)];
|
|
58
|
+
}
|
|
59
|
+
n(D, "getExpandedPlacements");
|
|
60
|
+
function f(t) {
|
|
61
|
+
return t.replace(/start|end/g, (e) => d[e]);
|
|
62
|
+
}
|
|
63
|
+
n(f, "getOppositeAlignmentPlacement");
|
|
64
|
+
const l = ["left", "right"], g = ["right", "left"], S = ["top", "bottom"], w = ["bottom", "top"];
|
|
65
|
+
function j(t, e, o) {
|
|
66
|
+
switch (t) {
|
|
67
|
+
case "top":
|
|
68
|
+
case "bottom":
|
|
69
|
+
return o ? e ? g : l : e ? l : g;
|
|
70
|
+
case "left":
|
|
71
|
+
case "right":
|
|
72
|
+
return e ? S : w;
|
|
73
|
+
default:
|
|
74
|
+
return [];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
n(j, "getSideList");
|
|
78
|
+
function F(t, e, o, c) {
|
|
79
|
+
const r = m(t);
|
|
80
|
+
let i = j(a(t), o === "start", c);
|
|
81
|
+
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(f)))), i;
|
|
82
|
+
}
|
|
83
|
+
n(F, "getOppositeAxisPlacements");
|
|
84
|
+
function u(t) {
|
|
85
|
+
return t.replace(/left|right|bottom|top/g, (e) => b[e]);
|
|
86
|
+
}
|
|
87
|
+
n(u, "getOppositePlacement");
|
|
88
|
+
function C(t) {
|
|
89
|
+
return {
|
|
90
|
+
top: 0,
|
|
91
|
+
right: 0,
|
|
92
|
+
bottom: 0,
|
|
93
|
+
left: 0,
|
|
94
|
+
...t
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
n(C, "expandPaddingObject");
|
|
98
|
+
function G(t) {
|
|
99
|
+
return typeof t != "number" ? C(t) : {
|
|
100
|
+
top: t,
|
|
101
|
+
right: t,
|
|
102
|
+
bottom: t,
|
|
103
|
+
left: t
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
n(G, "getPaddingObject");
|
|
107
|
+
function H(t) {
|
|
108
|
+
const {
|
|
109
|
+
x: e,
|
|
110
|
+
y: o,
|
|
111
|
+
width: c,
|
|
112
|
+
height: r
|
|
113
|
+
} = t;
|
|
114
|
+
return {
|
|
115
|
+
width: c,
|
|
116
|
+
height: r,
|
|
117
|
+
top: o,
|
|
118
|
+
left: e,
|
|
119
|
+
right: e + c,
|
|
120
|
+
bottom: o + r,
|
|
121
|
+
x: e,
|
|
122
|
+
y: o
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
n(H, "rectToClientRect");
|
|
126
|
+
export {
|
|
127
|
+
q as clamp,
|
|
128
|
+
k as createCoords,
|
|
129
|
+
z as evaluate,
|
|
130
|
+
C as expandPaddingObject,
|
|
131
|
+
T as floor,
|
|
132
|
+
m as getAlignment,
|
|
133
|
+
O as getAlignmentAxis,
|
|
134
|
+
B as getAlignmentSides,
|
|
135
|
+
P as getAxisLength,
|
|
136
|
+
D as getExpandedPlacements,
|
|
137
|
+
f as getOppositeAlignmentPlacement,
|
|
138
|
+
A as getOppositeAxis,
|
|
139
|
+
F as getOppositeAxisPlacements,
|
|
140
|
+
u as getOppositePlacement,
|
|
141
|
+
G as getPaddingObject,
|
|
142
|
+
a as getSide,
|
|
143
|
+
M as getSideAxis,
|
|
144
|
+
x as max,
|
|
145
|
+
h as min,
|
|
146
|
+
H as rectToClientRect,
|
|
147
|
+
R as round,
|
|
148
|
+
E as sides
|
|
149
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var h = Object.defineProperty;
|
|
2
|
+
var p = (f, c) => h(f, "name", { value: c, configurable: !0 });
|
|
3
|
+
function P(f, c, { checkForDefaultPrevented: u = !0 } = {}) {
|
|
4
|
+
return /* @__PURE__ */ p(function(s) {
|
|
5
|
+
if (f == null || f(s), u === !1 || !s.defaultPrevented)
|
|
6
|
+
return c == null ? void 0 : c(s);
|
|
7
|
+
}, "handleEvent");
|
|
8
|
+
}
|
|
9
|
+
p(P, "composeEventHandlers");
|
|
10
|
+
export {
|
|
11
|
+
P as composeEventHandlers
|
|
12
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { Primitive as p } from "../../react-primitive/dist/index.js";
|
|
3
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
+
var v = "Arrow", e = n.forwardRef((r, i) => {
|
|
5
|
+
const { children: t, width: a = 10, height: s = 5, ...m } = r;
|
|
6
|
+
return /* @__PURE__ */ o(
|
|
7
|
+
p.svg,
|
|
8
|
+
{
|
|
9
|
+
...m,
|
|
10
|
+
ref: i,
|
|
11
|
+
width: a,
|
|
12
|
+
height: s,
|
|
13
|
+
viewBox: "0 0 30 10",
|
|
14
|
+
preserveAspectRatio: "none",
|
|
15
|
+
children: r.asChild ? t : /* @__PURE__ */ o("polygon", { points: "0,0 30,0 15,10" })
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
e.displayName = v;
|
|
20
|
+
var h = e;
|
|
21
|
+
export {
|
|
22
|
+
e as Arrow,
|
|
23
|
+
h as Root
|
|
24
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var h = Object.defineProperty;
|
|
2
|
+
var l = (t, e) => h(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import { createContextScope as _ } from "../../react-context/dist/index.js";
|
|
5
|
+
import { useCallbackRef as y } from "../../react-use-callback-ref/dist/index.js";
|
|
6
|
+
import { useLayoutEffect as v } from "../../react-use-layout-effect/dist/index.js";
|
|
7
|
+
import { Primitive as m } from "../../react-primitive/dist/index.js";
|
|
8
|
+
import { useIsHydrated as x } from "../../react-use-is-hydrated/dist/index.js";
|
|
9
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
10
|
+
var g = "Avatar", [N, G] = _(g), [b, L] = N(g), S = i.forwardRef(
|
|
11
|
+
(t, e) => {
|
|
12
|
+
const { __scopeAvatar: o, ...r } = t, [n, a] = i.useState("idle");
|
|
13
|
+
return /* @__PURE__ */ f(
|
|
14
|
+
b,
|
|
15
|
+
{
|
|
16
|
+
scope: o,
|
|
17
|
+
imageLoadingStatus: n,
|
|
18
|
+
onImageLoadingStatusChange: a,
|
|
19
|
+
children: /* @__PURE__ */ f(m.span, { ...r, ref: e })
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
S.displayName = g;
|
|
25
|
+
var E = "AvatarImage", I = i.forwardRef(
|
|
26
|
+
(t, e) => {
|
|
27
|
+
const { __scopeAvatar: o, src: r, onLoadingStatusChange: n = /* @__PURE__ */ l(() => {
|
|
28
|
+
}, "onLoadingStatusChange"), ...a } = t, u = L(E, o), s = k(r, a), d = y((c) => {
|
|
29
|
+
n(c), u.onImageLoadingStatusChange(c);
|
|
30
|
+
});
|
|
31
|
+
return v(() => {
|
|
32
|
+
s !== "idle" && d(s);
|
|
33
|
+
}, [s, d]), s === "loaded" ? /* @__PURE__ */ f(m.img, { ...a, ref: e, src: r }) : null;
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
I.displayName = E;
|
|
37
|
+
var R = "AvatarFallback", w = i.forwardRef(
|
|
38
|
+
(t, e) => {
|
|
39
|
+
const { __scopeAvatar: o, delayMs: r, ...n } = t, a = L(R, o), [u, s] = i.useState(r === void 0);
|
|
40
|
+
return i.useEffect(() => {
|
|
41
|
+
if (r !== void 0) {
|
|
42
|
+
const d = window.setTimeout(() => s(!0), r);
|
|
43
|
+
return () => window.clearTimeout(d);
|
|
44
|
+
}
|
|
45
|
+
}, [r]), u && a.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ f(m.span, { ...n, ref: e }) : null;
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
w.displayName = R;
|
|
49
|
+
function A(t, e) {
|
|
50
|
+
return t ? e ? (t.src !== e && (t.src = e), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
51
|
+
}
|
|
52
|
+
l(A, "resolveLoadingStatus");
|
|
53
|
+
function k(t, { referrerPolicy: e, crossOrigin: o }) {
|
|
54
|
+
const r = x(), n = i.useRef(null), a = r ? (n.current || (n.current = new window.Image()), n.current) : null, [u, s] = i.useState(
|
|
55
|
+
() => A(a, t)
|
|
56
|
+
);
|
|
57
|
+
return v(() => {
|
|
58
|
+
s(A(a, t));
|
|
59
|
+
}, [a, t]), v(() => {
|
|
60
|
+
const d = /* @__PURE__ */ l((C) => () => {
|
|
61
|
+
s(C);
|
|
62
|
+
}, "updateStatus");
|
|
63
|
+
if (!a) return;
|
|
64
|
+
const c = d("loaded"), p = d("error");
|
|
65
|
+
return a.addEventListener("load", c), a.addEventListener("error", p), e && (a.referrerPolicy = e), typeof o == "string" && (a.crossOrigin = o), () => {
|
|
66
|
+
a.removeEventListener("load", c), a.removeEventListener("error", p);
|
|
67
|
+
};
|
|
68
|
+
}, [a, o, e]), u;
|
|
69
|
+
}
|
|
70
|
+
l(k, "useImageLoadingStatus");
|
|
71
|
+
var K = S, V = I, W = w;
|
|
72
|
+
export {
|
|
73
|
+
S as Avatar,
|
|
74
|
+
w as AvatarFallback,
|
|
75
|
+
I as AvatarImage,
|
|
76
|
+
W as Fallback,
|
|
77
|
+
V as Image,
|
|
78
|
+
K as Root,
|
|
79
|
+
G as createAvatarScope
|
|
80
|
+
};
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
var O = Object.defineProperty;
|
|
2
|
+
var x = (t, r) => O(t, "name", { value: r, configurable: !0 });
|
|
3
|
+
import * as a from "react";
|
|
4
|
+
import { useComposedRefs as N } from "../../react-compose-refs/dist/index.js";
|
|
5
|
+
import { createContextScope as j } from "../../react-context/dist/index.js";
|
|
6
|
+
import { composeEventHandlers as B } from "../../primitive/dist/index.js";
|
|
7
|
+
import { useControllableState as H } from "../../react-use-controllable-state/dist/index.js";
|
|
8
|
+
import { usePrevious as z } from "../../react-use-previous/dist/index.js";
|
|
9
|
+
import { useSize as G } from "../../react-use-size/dist/index.js";
|
|
10
|
+
import { Presence as K } from "../../react-presence/dist/index.js";
|
|
11
|
+
import { Primitive as E } from "../../react-primitive/dist/index.js";
|
|
12
|
+
import { jsx as b, jsxs as U, Fragment as X } from "react/jsx-runtime";
|
|
13
|
+
var I = "Checkbox", [J, de] = j(I), [Q, y] = J(I);
|
|
14
|
+
function V(t) {
|
|
15
|
+
const {
|
|
16
|
+
__scopeCheckbox: r,
|
|
17
|
+
checked: s,
|
|
18
|
+
children: u,
|
|
19
|
+
defaultChecked: n,
|
|
20
|
+
disabled: e,
|
|
21
|
+
form: p,
|
|
22
|
+
name: f,
|
|
23
|
+
onCheckedChange: i,
|
|
24
|
+
required: m,
|
|
25
|
+
value: C = "on",
|
|
26
|
+
// @ts-expect-error
|
|
27
|
+
internal_do_not_use_render: d
|
|
28
|
+
} = t, [l, _] = H({
|
|
29
|
+
prop: s,
|
|
30
|
+
defaultProp: n ?? !1,
|
|
31
|
+
onChange: i,
|
|
32
|
+
caller: I
|
|
33
|
+
}), [k, v] = a.useState(null), [g, o] = a.useState(null), c = a.useRef(!1), R = k ? !!p || !!k.closest("form") : (
|
|
34
|
+
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
35
|
+
!0
|
|
36
|
+
), P = {
|
|
37
|
+
checked: l,
|
|
38
|
+
disabled: e,
|
|
39
|
+
setChecked: _,
|
|
40
|
+
control: k,
|
|
41
|
+
setControl: v,
|
|
42
|
+
name: f,
|
|
43
|
+
form: p,
|
|
44
|
+
value: C,
|
|
45
|
+
hasConsumerStoppedPropagationRef: c,
|
|
46
|
+
required: m,
|
|
47
|
+
defaultChecked: h(n) ? !1 : n,
|
|
48
|
+
isFormControl: R,
|
|
49
|
+
bubbleInput: g,
|
|
50
|
+
setBubbleInput: o
|
|
51
|
+
};
|
|
52
|
+
return /* @__PURE__ */ b(
|
|
53
|
+
Q,
|
|
54
|
+
{
|
|
55
|
+
scope: r,
|
|
56
|
+
...P,
|
|
57
|
+
children: Z(d) ? d(P) : u
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
x(V, "CheckboxProvider");
|
|
62
|
+
var w = "CheckboxTrigger", T = a.forwardRef(
|
|
63
|
+
({ __scopeCheckbox: t, onKeyDown: r, onClick: s, ...u }, n) => {
|
|
64
|
+
const {
|
|
65
|
+
control: e,
|
|
66
|
+
value: p,
|
|
67
|
+
disabled: f,
|
|
68
|
+
checked: i,
|
|
69
|
+
required: m,
|
|
70
|
+
setControl: C,
|
|
71
|
+
setChecked: d,
|
|
72
|
+
hasConsumerStoppedPropagationRef: l,
|
|
73
|
+
isFormControl: _,
|
|
74
|
+
bubbleInput: k
|
|
75
|
+
} = y(w, t), v = N(n, C), g = a.useRef(i);
|
|
76
|
+
return a.useEffect(() => {
|
|
77
|
+
const o = e == null ? void 0 : e.form;
|
|
78
|
+
if (o) {
|
|
79
|
+
const c = /* @__PURE__ */ x(() => d(g.current), "reset");
|
|
80
|
+
return o.addEventListener("reset", c), () => o.removeEventListener("reset", c);
|
|
81
|
+
}
|
|
82
|
+
}, [e, d]), /* @__PURE__ */ b(
|
|
83
|
+
E.button,
|
|
84
|
+
{
|
|
85
|
+
type: "button",
|
|
86
|
+
role: "checkbox",
|
|
87
|
+
"aria-checked": h(i) ? "mixed" : i,
|
|
88
|
+
"aria-required": m,
|
|
89
|
+
"data-state": D(i),
|
|
90
|
+
"data-disabled": f ? "" : void 0,
|
|
91
|
+
disabled: f,
|
|
92
|
+
value: p,
|
|
93
|
+
...u,
|
|
94
|
+
ref: v,
|
|
95
|
+
onKeyDown: B(r, (o) => {
|
|
96
|
+
o.key === "Enter" && o.preventDefault();
|
|
97
|
+
}),
|
|
98
|
+
onClick: B(s, (o) => {
|
|
99
|
+
d((c) => h(c) ? !0 : !c), k && _ && (l.current = o.isPropagationStopped(), l.current || o.stopPropagation());
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
T.displayName = w;
|
|
106
|
+
var W = a.forwardRef(
|
|
107
|
+
(t, r) => {
|
|
108
|
+
const {
|
|
109
|
+
__scopeCheckbox: s,
|
|
110
|
+
name: u,
|
|
111
|
+
checked: n,
|
|
112
|
+
defaultChecked: e,
|
|
113
|
+
required: p,
|
|
114
|
+
disabled: f,
|
|
115
|
+
value: i,
|
|
116
|
+
onCheckedChange: m,
|
|
117
|
+
form: C,
|
|
118
|
+
...d
|
|
119
|
+
} = t;
|
|
120
|
+
return /* @__PURE__ */ b(
|
|
121
|
+
V,
|
|
122
|
+
{
|
|
123
|
+
__scopeCheckbox: s,
|
|
124
|
+
checked: n,
|
|
125
|
+
defaultChecked: e,
|
|
126
|
+
disabled: f,
|
|
127
|
+
required: p,
|
|
128
|
+
onCheckedChange: m,
|
|
129
|
+
name: u,
|
|
130
|
+
form: C,
|
|
131
|
+
value: i,
|
|
132
|
+
internal_do_not_use_render: /* @__PURE__ */ x(({ isFormControl: l }) => /* @__PURE__ */ U(X, { children: [
|
|
133
|
+
/* @__PURE__ */ b(
|
|
134
|
+
T,
|
|
135
|
+
{
|
|
136
|
+
...d,
|
|
137
|
+
ref: r,
|
|
138
|
+
__scopeCheckbox: s
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
l && /* @__PURE__ */ b(
|
|
142
|
+
A,
|
|
143
|
+
{
|
|
144
|
+
__scopeCheckbox: s
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] }), "internal_do_not_use_render")
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
W.displayName = I;
|
|
153
|
+
var M = "CheckboxIndicator", Y = a.forwardRef(
|
|
154
|
+
(t, r) => {
|
|
155
|
+
const { __scopeCheckbox: s, forceMount: u, ...n } = t, e = y(M, s);
|
|
156
|
+
return /* @__PURE__ */ b(
|
|
157
|
+
K,
|
|
158
|
+
{
|
|
159
|
+
present: u || h(e.checked) || e.checked === !0,
|
|
160
|
+
children: /* @__PURE__ */ b(
|
|
161
|
+
E.span,
|
|
162
|
+
{
|
|
163
|
+
"data-state": D(e.checked),
|
|
164
|
+
"data-disabled": e.disabled ? "" : void 0,
|
|
165
|
+
...n,
|
|
166
|
+
ref: r,
|
|
167
|
+
style: { pointerEvents: "none", ...t.style }
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
Y.displayName = M;
|
|
175
|
+
var q = "CheckboxBubbleInput", A = a.forwardRef(
|
|
176
|
+
({ __scopeCheckbox: t, ...r }, s) => {
|
|
177
|
+
const {
|
|
178
|
+
control: u,
|
|
179
|
+
hasConsumerStoppedPropagationRef: n,
|
|
180
|
+
checked: e,
|
|
181
|
+
defaultChecked: p,
|
|
182
|
+
required: f,
|
|
183
|
+
disabled: i,
|
|
184
|
+
name: m,
|
|
185
|
+
value: C,
|
|
186
|
+
form: d,
|
|
187
|
+
bubbleInput: l,
|
|
188
|
+
setBubbleInput: _
|
|
189
|
+
} = y(q, t), k = N(s, _), v = z(e), g = G(u);
|
|
190
|
+
a.useEffect(() => {
|
|
191
|
+
const c = l;
|
|
192
|
+
if (!c) return;
|
|
193
|
+
const R = window.HTMLInputElement.prototype, S = Object.getOwnPropertyDescriptor(
|
|
194
|
+
R,
|
|
195
|
+
"checked"
|
|
196
|
+
).set, F = !n.current;
|
|
197
|
+
if (v !== e && S) {
|
|
198
|
+
const L = new Event("click", { bubbles: F });
|
|
199
|
+
c.indeterminate = h(e), S.call(c, h(e) ? !1 : e), c.dispatchEvent(L);
|
|
200
|
+
}
|
|
201
|
+
}, [l, v, e, n]);
|
|
202
|
+
const o = a.useRef(h(e) ? !1 : e);
|
|
203
|
+
return /* @__PURE__ */ b(
|
|
204
|
+
E.input,
|
|
205
|
+
{
|
|
206
|
+
type: "checkbox",
|
|
207
|
+
"aria-hidden": !0,
|
|
208
|
+
defaultChecked: p ?? o.current,
|
|
209
|
+
required: f,
|
|
210
|
+
disabled: i,
|
|
211
|
+
name: m,
|
|
212
|
+
value: C,
|
|
213
|
+
form: d,
|
|
214
|
+
...r,
|
|
215
|
+
tabIndex: -1,
|
|
216
|
+
ref: k,
|
|
217
|
+
style: {
|
|
218
|
+
...r.style,
|
|
219
|
+
...g,
|
|
220
|
+
position: "absolute",
|
|
221
|
+
pointerEvents: "none",
|
|
222
|
+
opacity: 0,
|
|
223
|
+
margin: 0,
|
|
224
|
+
// We transform because the input is absolutely positioned but we have
|
|
225
|
+
// rendered it **after** the button. This pulls it back to sit on top
|
|
226
|
+
// of the button.
|
|
227
|
+
transform: "translateX(-100%)"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
A.displayName = q;
|
|
234
|
+
function Z(t) {
|
|
235
|
+
return typeof t == "function";
|
|
236
|
+
}
|
|
237
|
+
x(Z, "isFunction");
|
|
238
|
+
function h(t) {
|
|
239
|
+
return t === "indeterminate";
|
|
240
|
+
}
|
|
241
|
+
x(h, "isIndeterminate");
|
|
242
|
+
function D(t) {
|
|
243
|
+
return h(t) ? "indeterminate" : t ? "checked" : "unchecked";
|
|
244
|
+
}
|
|
245
|
+
x(D, "getState");
|
|
246
|
+
export {
|
|
247
|
+
W as Checkbox,
|
|
248
|
+
Y as CheckboxIndicator,
|
|
249
|
+
Y as Indicator,
|
|
250
|
+
W as Root,
|
|
251
|
+
de as createCheckboxScope,
|
|
252
|
+
A as unstable_BubbleInput,
|
|
253
|
+
A as unstable_CheckboxBubbleInput,
|
|
254
|
+
V as unstable_CheckboxProvider,
|
|
255
|
+
T as unstable_CheckboxTrigger,
|
|
256
|
+
V as unstable_Provider,
|
|
257
|
+
T as unstable_Trigger
|
|
258
|
+
};
|