stargazer-ui 1.0.3 → 1.0.4
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/BaseTypes.d.ts +4 -0
- package/dist/Button/index.d.ts +1 -1
- package/dist/Dropdown/index.d.ts +20 -4
- package/dist/Dropdown/index.js +31 -30
- package/dist/FloatingLabel/index.d.ts +11 -0
- package/dist/FloatingLabel/index.js +9 -9
- package/dist/Form/index.d.ts +4 -0
- package/dist/Form/index.js +1 -0
- package/dist/Grid/Col.js +19 -0
- package/dist/Grid/Container.js +9 -0
- package/dist/Grid/Row.js +17 -0
- package/dist/InputGroup/index.d.ts +14 -0
- package/dist/InputGroup/index.js +6 -5
- package/dist/Modal/index.d.ts +70 -0
- package/dist/Modal/index.js +78 -64
- package/dist/Nav/index.d.ts +46 -0
- package/dist/Nav/index.js +11 -12
- package/dist/NavBar/index.d.ts +46 -0
- package/dist/NavBar/index.js +15 -14
- package/dist/NavDropdown/index.d.ts +39 -0
- package/dist/NavDropdown/index.js +226 -218
- package/dist/OffCanvas/OffCanvas.js +2266 -0
- package/dist/Popout/index.d.ts +56 -0
- package/dist/Popout/index.js +55 -68
- package/dist/Spinner/index.d.ts +10 -0
- package/dist/Spinner/index.js +9 -0
- package/dist/Table/index.d.ts +9 -0
- package/dist/Table/index.js +9 -0
- package/dist/Tabs/index.d.ts +42 -0
- package/dist/Tabs/index.js +60 -52
- package/dist/stylesheets/stargazerui.css +1160 -17
- package/dist/stylesheets/stargazerui.css.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseDialogType, BaseDivType, BaseHeadingType, BaseParagraphType, BaseSpanType } from "../BaseTypes";
|
|
3
|
+
export type PopoutType = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
initialPosition?: {
|
|
6
|
+
top?: number;
|
|
7
|
+
bottom?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
left?: number;
|
|
10
|
+
};
|
|
11
|
+
id?: string;
|
|
12
|
+
resize?: boolean;
|
|
13
|
+
move?: boolean;
|
|
14
|
+
} & BaseDialogType;
|
|
15
|
+
export type PopoutHeaderType = {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
as?: React.ElementType;
|
|
19
|
+
} & (BaseDivType | BaseHeadingType | BaseSpanType);
|
|
20
|
+
export type PopoutTitleType = {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
as?: React.ElementType;
|
|
24
|
+
} & BaseHeadingType;
|
|
25
|
+
export type PopoutBodyType = {
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
} & BaseDivType;
|
|
29
|
+
export type PopoutTextType = {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
} & BaseParagraphType;
|
|
33
|
+
export type PopoutFooterType = {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
className?: string;
|
|
36
|
+
} & BaseDivType;
|
|
37
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<PopoutType, "ref"> & React.RefAttributes<HTMLDialogElement>> & {
|
|
38
|
+
Header: React.ForwardRefExoticComponent<(Omit<{
|
|
39
|
+
children: React.ReactNode;
|
|
40
|
+
className?: string | undefined;
|
|
41
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
42
|
+
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> | Omit<{
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
className?: string | undefined;
|
|
45
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
46
|
+
} & React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "ref"> | Omit<{
|
|
47
|
+
children: React.ReactNode;
|
|
48
|
+
className?: string | undefined;
|
|
49
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
50
|
+
} & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement>, "ref">) & React.RefAttributes<HTMLDivElement | HTMLHeadingElement | HTMLSpanElement>>;
|
|
51
|
+
Title: React.ForwardRefExoticComponent<Omit<PopoutTitleType, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
52
|
+
Body: React.ForwardRefExoticComponent<Omit<PopoutBodyType, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
Text: React.ForwardRefExoticComponent<Omit<PopoutTextType, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
54
|
+
Footer: React.ForwardRefExoticComponent<Omit<PopoutFooterType, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
};
|
|
56
|
+
export default _default;
|
package/dist/Popout/index.js
CHANGED
|
@@ -1,85 +1,72 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { createPortal as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return t.addEventListener(e, o, s), function() {
|
|
9
|
-
t.removeEventListener(e, o, s);
|
|
10
|
-
};
|
|
11
|
-
}, [o, t]);
|
|
12
|
-
}, a = p(({ children: e, initialPosition: o, id: s, resize: r = !1, move: t = !1, ...i }, u) => {
|
|
13
|
-
const [n, C] = L({ offSetTop: 0, offSetLeft: 0, ...o });
|
|
14
|
-
console.log(n);
|
|
15
|
-
const b = r ? "true" : "false", M = t ? "true" : "false", l = T(u || null), [h, S] = L(!1), y = T(h);
|
|
16
|
-
N(() => {
|
|
17
|
-
y.current = h;
|
|
2
|
+
import { createPortal as A } from "react-dom";
|
|
3
|
+
import { forwardRef as u, useState as M, useRef as y, useEffect as R } from "react";
|
|
4
|
+
const W = u(({ children: e, initialPosition: n = { top: 0, left: 0 }, id: o, resize: s = !1, move: f = !1, className: a, style: l, ...p }, N) => {
|
|
5
|
+
const [r, C] = M({ offSetTop: 0, offSetLeft: 0, ...n }), P = s ? "true" : "false", $ = f ? "true" : "false", x = y(N), i = y(null), [h, T] = M(!1), b = y(h);
|
|
6
|
+
R(() => {
|
|
7
|
+
b.current = h;
|
|
18
8
|
}, [h]);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
const D = (t) => {
|
|
10
|
+
const d = t.target;
|
|
11
|
+
if (f && d.className.includes("sg-popout-title") || d.className.includes("sg-popout-header")) {
|
|
12
|
+
const { top: m, left: g } = i.current.getBoundingClientRect();
|
|
13
|
+
C((w) => ({
|
|
14
|
+
...w,
|
|
15
|
+
offSetTop: t.clientY - m,
|
|
16
|
+
offSetLeft: t.clientX - g
|
|
17
|
+
})), i.current.style.setProperty("user-select", "none"), i.current.setPointerCapture(t.pointerId), T(!0);
|
|
27
18
|
}
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
if (
|
|
32
|
-
const d =
|
|
33
|
-
let v = d ? 0 :
|
|
34
|
-
v =
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
...
|
|
19
|
+
}, L = () => {
|
|
20
|
+
f && (i.current.style.removeProperty("user-select"), T(!1));
|
|
21
|
+
}, H = (t) => {
|
|
22
|
+
if (f && b.current && i.current) {
|
|
23
|
+
const d = t.clientY - r.offSetTop < 0, m = window.innerHeight - (t.clientY - r.offSetTop + i.current.offsetHeight) < 0, g = t.clientX - r.offSetLeft < 0, w = window.innerWidth - (t.clientX - r.offSetLeft + i.current.offsetWidth) < 0;
|
|
24
|
+
let v = d ? 0 : t.clientY - r.offSetTop;
|
|
25
|
+
v = m ? window.innerHeight - i.current.offsetHeight : v;
|
|
26
|
+
let S = g ? 0 : t.clientX - r.offSetLeft;
|
|
27
|
+
S = w ? window.innerWidth - i.current.offsetWidth : S, C((O) => ({
|
|
28
|
+
...O,
|
|
38
29
|
top: v,
|
|
39
|
-
left:
|
|
30
|
+
left: S
|
|
40
31
|
}));
|
|
41
32
|
}
|
|
42
33
|
};
|
|
43
|
-
return
|
|
34
|
+
return R(() => (document.body.addEventListener("pointerup", () => L(), !0), function() {
|
|
35
|
+
document.body.removeEventListener("pointerup", () => L(), !0);
|
|
36
|
+
}), []), A(
|
|
44
37
|
/* @__PURE__ */ c(
|
|
45
38
|
"dialog",
|
|
46
39
|
{
|
|
47
|
-
"data-resize":
|
|
48
|
-
"data-move":
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
"data-resize": P,
|
|
41
|
+
"data-move": $,
|
|
42
|
+
"data-passedRef": x,
|
|
43
|
+
ref: i,
|
|
44
|
+
id: o,
|
|
45
|
+
className: `sg-moveable-popout${a ? " " + a : ""}`,
|
|
46
|
+
style: { ...l, top: r.top, left: r.left, bottom: r.bottom, right: r.right },
|
|
47
|
+
onPointerDown: D,
|
|
48
|
+
onPointerMove: (t) => H(t),
|
|
49
|
+
...p,
|
|
55
50
|
children: e
|
|
56
51
|
}
|
|
57
52
|
),
|
|
58
53
|
document.body
|
|
59
54
|
);
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return /* @__PURE__ */ c(u, { ref: t, className: `sg-popout-title ${o}`, ...r, children: s });
|
|
76
|
-
};
|
|
77
|
-
a.Title = p(X);
|
|
78
|
-
const Y = ({ children: e, className: o, ...s }, r) => /* @__PURE__ */ c("p", { ref: r, className: `sg-popout-text ${o}`, ...s, children: e });
|
|
79
|
-
a.Text = p(Y);
|
|
80
|
-
const O = ({ children: e, className: o, ...s }, r) => /* @__PURE__ */ c("div", { ref: r, className: `sg-popout-footer ${o}`, ...s, children: e });
|
|
81
|
-
a.Footer = p(O);
|
|
55
|
+
}), X = u(
|
|
56
|
+
({ children: e, className: n, as: o = "div", ...s }, f) => {
|
|
57
|
+
let l = ["div", "span", "h1", "h2", "h3", "h4", "h5", "h6"].find((p) => p === o) ? o : "div";
|
|
58
|
+
return /* @__PURE__ */ c(l, { ref: f, className: `sg-popout-header ${n}`, ...s, children: e });
|
|
59
|
+
}
|
|
60
|
+
), Y = u(({ as: e = "h4", className: n, children: o, ...s }, f) => {
|
|
61
|
+
let l = ["h1", "h2", "h3", "h4", "h5", "h6"].find((p) => p === e) ? e : "h5";
|
|
62
|
+
return /* @__PURE__ */ c(l, { ref: f, className: `sg-popout-title ${n}`, ...s, children: o });
|
|
63
|
+
}), B = u(({ children: e, className: n, ...o }, s) => /* @__PURE__ */ c("div", { ref: s, className: `sg-popout-body ${n}`, ...o, children: e })), E = u(({ children: e, className: n, ...o }, s) => /* @__PURE__ */ c("p", { ref: s, className: `sg-popout-text ${n}`, ...o, children: e })), j = u(({ children: e, className: n, ...o }, s) => /* @__PURE__ */ c("div", { ref: s, className: `sg-popout-footer ${n}`, ...o, children: e })), U = Object.assign(W, {
|
|
64
|
+
Header: X,
|
|
65
|
+
Title: Y,
|
|
66
|
+
Body: B,
|
|
67
|
+
Text: E,
|
|
68
|
+
Footer: j
|
|
69
|
+
});
|
|
82
70
|
export {
|
|
83
|
-
|
|
84
|
-
B as useEventListener
|
|
71
|
+
U as default
|
|
85
72
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type SpinnerType = {
|
|
3
|
+
label: string;
|
|
4
|
+
size?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
controlId?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerType & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default Spinner;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsxs as n, Fragment as o, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h } from "react";
|
|
3
|
+
const p = h(({ size: e = "1em", color: s = "white", label: a, className: r, controlId: i, ...t }, d) => /* @__PURE__ */ n(o, { children: [
|
|
4
|
+
/* @__PURE__ */ l("div", { "aria-labelledby": i, role: "status", ref: d, className: `sg-spinner${r ? " " + r : ""}`, style: { width: e, height: e, borderColor: s }, ...t }),
|
|
5
|
+
/* @__PURE__ */ l("label", { id: i, className: "sg-visually-hidden", children: a })
|
|
6
|
+
] }));
|
|
7
|
+
export {
|
|
8
|
+
p as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseTableType } from "../BaseTypes";
|
|
3
|
+
export type TableType = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
size?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
} & BaseTableType;
|
|
8
|
+
declare const Table: React.ForwardRefExoticComponent<Omit<TableType, "ref"> & React.RefAttributes<HTMLTableElement>>;
|
|
9
|
+
export default Table;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
const p = m(({ children: t, size: s = "lg", className: e, ...r }, a) => {
|
|
4
|
+
let l = `sg-table${e ? " " + e : ""}${s === "sm" ? " sg-table-sm" : ""}`;
|
|
5
|
+
return /* @__PURE__ */ o("table", { ref: a, className: l, ...r, children: t });
|
|
6
|
+
});
|
|
7
|
+
export {
|
|
8
|
+
p as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseButtonType, BaseDivType } from "../BaseTypes";
|
|
3
|
+
export type TabsContextType = {
|
|
4
|
+
activeTab: string;
|
|
5
|
+
setActiveTab: React.Dispatch<React.SetStateAction<string>>;
|
|
6
|
+
controlId: string;
|
|
7
|
+
activeClass: string;
|
|
8
|
+
};
|
|
9
|
+
export type TabsContext = {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
controlId: string;
|
|
13
|
+
activeClassName?: string;
|
|
14
|
+
defaultActive: string;
|
|
15
|
+
} & BaseDivType;
|
|
16
|
+
export type TabsControlsType = {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
} & BaseDivType;
|
|
20
|
+
export type TabsButtonType = {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
onClick?: Function;
|
|
24
|
+
tabId: string;
|
|
25
|
+
id?: string;
|
|
26
|
+
} & BaseButtonType;
|
|
27
|
+
export type TabsContentType = {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
} & BaseDivType;
|
|
31
|
+
export type TabsPageType = {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
className?: string;
|
|
34
|
+
tabId: string;
|
|
35
|
+
} & BaseDivType;
|
|
36
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<TabsContext, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
37
|
+
Controls: import("react").ForwardRefExoticComponent<Omit<TabsControlsType, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
38
|
+
Button: import("react").ForwardRefExoticComponent<Omit<TabsButtonType, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
39
|
+
Content: import("react").ForwardRefExoticComponent<Omit<TabsContentType, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
40
|
+
Page: import("react").ForwardRefExoticComponent<Omit<TabsPageType, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
package/dist/Tabs/index.js
CHANGED
|
@@ -1,69 +1,77 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as m, forwardRef as C, useState as p, useMemo as T, useContext as w } from "react";
|
|
3
|
+
const h = m(null), y = ({ children: e, value: t }) => /* @__PURE__ */ d(h.Provider, { value: t, children: e }), f = () => {
|
|
4
|
+
const e = w(h);
|
|
5
|
+
if (!e)
|
|
6
|
+
throw new Error(
|
|
7
|
+
"useTabContext has to be used within a TabContextProvider!"
|
|
8
|
+
);
|
|
9
|
+
return e;
|
|
10
|
+
}, A = C(({ children: e, className: t, controlId: n, activeClassName: o, defaultActive: r, ...i }, l) => {
|
|
11
|
+
const [s, c] = p(r), v = o || "sg-active", a = T(() => ({
|
|
12
|
+
activeTab: s,
|
|
6
13
|
setActiveTab: c,
|
|
7
|
-
controlId:
|
|
8
|
-
activeClass:
|
|
9
|
-
}), [
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
}),
|
|
12
|
-
const { controlId:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
controlId: n,
|
|
15
|
+
activeClass: v
|
|
16
|
+
}), [s, c, n]);
|
|
17
|
+
return /* @__PURE__ */ d(y, { value: a, children: /* @__PURE__ */ d("div", { ref: l, id: n + "-tab-wrapper", className: `sg-tabs${t ? " " + t : ""}`, ...i, children: e }) });
|
|
18
|
+
}), k = C(({ children: e, className: t, ...n }, o) => {
|
|
19
|
+
const { controlId: r, activeClass: i } = f(), l = (s) => {
|
|
20
|
+
const c = s.key, v = document.getElementById(r + "-tab-controls");
|
|
21
|
+
if (v) {
|
|
22
|
+
const a = Array.from(v.children);
|
|
23
|
+
if (c === "ArrowRight" || c === "ArrowLeft") {
|
|
24
|
+
s.preventDefault();
|
|
25
|
+
const u = document.querySelector(".sg-tabs-button." + i), g = a.indexOf(u), b = c === "ArrowRight" ? 1 : -1, x = g + b < 0 ? a.length - 1 : g + b >= a.length ? 0 : g + b;
|
|
26
|
+
a[x].focus(), a[x].click();
|
|
27
|
+
} else if (c === "Home" || c === "End") {
|
|
28
|
+
s.preventDefault();
|
|
29
|
+
const u = c === "Home" ? 0 : a.length - 1;
|
|
30
|
+
a[u].focus(), a[u].click();
|
|
31
|
+
}
|
|
23
32
|
}
|
|
24
|
-
}, role: "tablist", id: l + "-tab-controls", ref: n, className: `sg-tabs-controls${t ? " " + t : ""}`, ...e, children: s });
|
|
25
|
-
};
|
|
26
|
-
p.Controls = v(y);
|
|
27
|
-
const A = ({ children: s, className: t, onClick: e, tabId: n, id: l, ...i }, b) => {
|
|
28
|
-
const { activeTab: a, setActiveTab: c, activeClass: o } = m(C), r = "sg-tabs-button" + (t ? " " + t : "") + (a === n ? " " + o : ""), d = a === n, g = (f) => {
|
|
29
|
-
c(n), e && e(f);
|
|
30
33
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ d("div", { onKeyDown: (s) => l(s), role: "tablist", id: r + "-tab-controls", ref: o, className: `sg-tabs-controls${t ? " " + t : ""}`, ...n, children: e });
|
|
35
|
+
}), D = C(({ children: e, className: t, onClick: n, tabId: o, id: r, ...i }, l) => {
|
|
36
|
+
const { activeTab: s, setActiveTab: c, activeClass: v } = f(), a = "sg-tabs-button" + (t ? " " + t : "") + (s === o ? " " + v : ""), u = s === o, g = (b) => {
|
|
37
|
+
c(o), n && n(b);
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ d(
|
|
32
40
|
"button",
|
|
33
41
|
{
|
|
34
42
|
role: "tab",
|
|
35
43
|
type: "button",
|
|
36
|
-
id:
|
|
37
|
-
ref:
|
|
38
|
-
onClick: g,
|
|
39
|
-
className:
|
|
44
|
+
id: o + "-button",
|
|
45
|
+
ref: l,
|
|
46
|
+
onClick: (b) => g(b),
|
|
47
|
+
className: a,
|
|
40
48
|
...i,
|
|
41
|
-
tabIndex:
|
|
42
|
-
"aria-selected":
|
|
43
|
-
"aria-controls":
|
|
44
|
-
children:
|
|
49
|
+
tabIndex: u ? 0 : -1,
|
|
50
|
+
"aria-selected": u ? "true" : "false",
|
|
51
|
+
"aria-controls": o + "-page",
|
|
52
|
+
children: e
|
|
45
53
|
}
|
|
46
54
|
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
p.Content = v(k);
|
|
51
|
-
const D = ({ children: s, className: t, tabId: e, ...n }, l) => {
|
|
52
|
-
const { activeTab: i, activeClass: b } = m(C), a = "sg-tabs-page" + (t ? " " + t : "") + (i === e ? " " + b : "");
|
|
53
|
-
return /* @__PURE__ */ u(
|
|
55
|
+
}), P = C(({ children: e, className: t, ...n }, o) => /* @__PURE__ */ d("div", { role: "none", ref: o, className: `sg-tabs-content${t ? " " + t : ""}`, ...n, children: e })), E = C(({ children: e, className: t, tabId: n, ...o }, r) => {
|
|
56
|
+
const { activeTab: i, activeClass: l } = f(), s = "sg-tabs-page" + (t ? " " + t : "") + (i === n ? " " + l : "");
|
|
57
|
+
return /* @__PURE__ */ d(
|
|
54
58
|
"div",
|
|
55
59
|
{
|
|
56
60
|
role: "tabpanel",
|
|
57
|
-
id:
|
|
58
|
-
"aria-labelledby":
|
|
59
|
-
ref:
|
|
60
|
-
className:
|
|
61
|
-
...
|
|
62
|
-
children:
|
|
61
|
+
id: n + "-page",
|
|
62
|
+
"aria-labelledby": n + "-button",
|
|
63
|
+
ref: r,
|
|
64
|
+
className: s,
|
|
65
|
+
...o,
|
|
66
|
+
children: e
|
|
63
67
|
}
|
|
64
68
|
);
|
|
65
|
-
}
|
|
66
|
-
|
|
69
|
+
}), j = Object.assign(A, {
|
|
70
|
+
Controls: k,
|
|
71
|
+
Button: D,
|
|
72
|
+
Content: P,
|
|
73
|
+
Page: E
|
|
74
|
+
});
|
|
67
75
|
export {
|
|
68
|
-
|
|
76
|
+
j as default
|
|
69
77
|
};
|