@functionalui/functionalui 0.2.6 → 0.2.8
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/Admonition-BVd4bXl_.cjs +1 -0
- package/dist/Admonition-CReUUZzJ.js +88 -0
- package/dist/{Avatar-CQA0mEVW.js → Avatar-CkxjB_cU.js} +4 -4
- package/dist/AvatarGroup-CbohU2rq.cjs +1 -0
- package/dist/AvatarGroup-FpaQP2H4.js +52 -0
- package/dist/{Button-CpTXDsI7.js → Button-DLwud-g7.js} +8 -8
- package/dist/{Checkbox-C29jP71p.js → Checkbox-CNpy1wvA.js} +3 -3
- package/dist/Checkboxes-CQVptWR8.cjs +1 -0
- package/dist/Checkboxes-Cj740f5X.js +80 -0
- package/dist/Chip-DgSZZTgy.js +132 -0
- package/dist/Chip-HOh--tbB.cjs +1 -0
- package/dist/ColorPicker-DUz0qcHd.js +234 -0
- package/dist/ColorPicker-rxR_V4EW.cjs +1 -0
- package/dist/DivMeasure-C398kYvk.js +26 -0
- package/dist/DivMeasure-oi_fzKlp.cjs +1 -0
- package/dist/GalleryModal-DjCnCkbg.js +464 -0
- package/dist/GalleryModal-wFC9x3Em.cjs +1 -0
- package/dist/InputImage-CInJWoGb.cjs +1 -0
- package/dist/InputImage-ZST0lvcI.js +106 -0
- package/dist/InputText-Bjhoe-Tm.cjs +1 -0
- package/dist/InputText-DnR7KYJS.js +246 -0
- package/dist/InsetGroup-BHxpHwpd.js +105 -0
- package/dist/InsetGroup-CGACEEbB.cjs +1 -0
- package/dist/{LabelText-D7QIWtWj.js → LabelText-WYEq5keJ.js} +3 -3
- package/dist/LoadingSpinner-BC0eMoVW.js +101 -0
- package/dist/LoadingSpinner-DykDI5-W.cjs +1 -0
- package/dist/{Modal-DXLyt-j4.js → Modal-Di5ye0Cr.js} +4 -4
- package/dist/NotificationSystem-B5NXsG0a.js +158 -0
- package/dist/NotificationSystem-D4ydo2Lk.cjs +1 -0
- package/dist/Radio-Dd5W2Lpf.js +121 -0
- package/dist/Radio-QbaBzLpf.cjs +1 -0
- package/dist/SelectSpring-BOfRXdag.js +471 -0
- package/dist/SelectSpring-DFKWTbF1.cjs +1 -0
- package/dist/SpringEnter-CPw1YgNg.cjs +1 -0
- package/dist/SpringEnter-CoVZpW-c.js +44 -0
- package/dist/{SpringEnterOffsetBy-DMSIQgV3.js → SpringEnterOffsetBy-BKglENgZ.js} +2 -2
- package/dist/SpringMenuTransition-B_PoFoqO.cjs +1 -0
- package/dist/SpringMenuTransition-CzSfyvDZ.js +42 -0
- package/dist/SpringOpenCloseHeight-COvFkc30.js +18 -0
- package/dist/SpringOpenCloseHeight-CyxsSgRD.cjs +1 -0
- package/dist/TableGrid-BYBVHJt9.cjs +1 -0
- package/dist/TableGrid-QlKM9Sdp.js +49 -0
- package/dist/{TableHeader-Da0XxILB.js → TableHeader-D3V5Z3JL.js} +4 -4
- package/dist/{TableRow-BlJSvake.js → TableRow-DKC9qdjQ.js} +3 -3
- package/dist/Tabs-BkUyxceG.js +134 -0
- package/dist/Tabs-C8VAb1g0.cjs +1 -0
- package/dist/{TagColor-BYKxfOU6.js → TagColor-Bd3n3RCF.js} +3 -3
- package/dist/TextArea-Bsm5M8lo.cjs +1 -0
- package/dist/TextArea-Cd3q9BMN.js +160 -0
- package/dist/ToggleSwitch-BNAk1Wp6.js +100 -0
- package/dist/ToggleSwitch-D6ltRmPy.cjs +1 -0
- package/dist/{UIcon-BHzbeYWw.js → UIcon-Cc5PX9WJ.js} +3 -3
- package/dist/UiContexts-36wfLVYv.cjs +1 -0
- package/dist/UiContexts-BMJZJR8C.js +35 -0
- package/dist/admonition/index.cjs +1 -1
- package/dist/admonition/index.mjs +2 -86
- package/dist/avatar/index.mjs +1 -1
- package/dist/avatar-group/index.cjs +1 -1
- package/dist/avatar-group/index.mjs +2 -50
- package/dist/button/index.mjs +1 -1
- package/dist/checkbox/index.mjs +1 -1
- package/dist/checkboxes/index.cjs +1 -1
- package/dist/checkboxes/index.mjs +2 -78
- package/dist/chip/index.cjs +1 -1
- package/dist/chip/index.mjs +2 -130
- package/dist/color-picker/index.cjs +1 -1
- package/dist/color-picker/index.mjs +2 -232
- package/dist/{component-CW2JPBAq.js → component-89pO-V2r.js} +1 -1
- package/dist/{component-BvHdlcdE.js → component-BbiEBU5H.js} +1 -1
- package/dist/component-BvmPGrYv.cjs +1 -0
- package/dist/{component-C1Gs4nVu.js → component-CGEZuC_0.js} +1 -1
- package/dist/{component-DRXQXr2G.js → component-CLzFHaNK.js} +1 -1
- package/dist/{component-D0wwK4KY.js → component-D-bBH8nL.js} +1 -1
- package/dist/{component-DCHO9d6d.js → component-DBDhHeDP.js} +1 -1
- package/dist/{component-D5nxKQnT.js → component-DP7cQasn.js} +1 -1
- package/dist/{component-CBIQe7z5.js → component-JelkpADf.js} +1 -1
- package/dist/{component-DdQu0mLI.js → component-SecZNuYG.js} +1 -1
- package/dist/component-cHg1BfVy.js +28 -0
- package/dist/container/index.mjs +1 -1
- package/dist/contexts/ui/index.cjs +1 -1
- package/dist/contexts/ui/index.mjs +3 -32
- package/dist/{createTextElement-Cgrvdwvh.js → createTextElement-d3-b9Lvn.js} +1 -1
- package/dist/css/index.css +1 -1
- package/dist/div-measure/index.cjs +1 -1
- package/dist/div-measure/index.mjs +2 -23
- package/dist/gallery-modal/index.cjs +1 -1
- package/dist/gallery-modal/index.mjs +2 -461
- package/dist/icons/index.mjs +1 -1
- package/dist/input-image/index.cjs +1 -1
- package/dist/input-image/index.mjs +2 -103
- package/dist/input-text/index.cjs +1 -1
- package/dist/input-text/index.mjs +2 -243
- package/dist/inset-group/index.cjs +1 -1
- package/dist/inset-group/index.mjs +2 -102
- package/dist/label-text/index.mjs +1 -1
- package/dist/layout/index.mjs +1 -1
- package/dist/lib/styles/types/types.d.ts +12 -12
- package/dist/loading-spinner/index.cjs +1 -1
- package/dist/loading-spinner/index.mjs +3 -98
- package/dist/main.cjs +1 -0
- package/dist/main.mjs +95 -0
- package/dist/modal/index.mjs +1 -1
- package/dist/notification-system/index.cjs +1 -1
- package/dist/notification-system/index.mjs +2 -155
- package/dist/radio/index.cjs +1 -1
- package/dist/radio/index.mjs +2 -118
- package/dist/{react-spring_web.modern-DgQDaJ06.js → react-spring_web.modern-DUf5COpz.js} +3 -3
- package/dist/select-spring/index.cjs +1 -1
- package/dist/select-spring/index.mjs +2 -468
- package/dist/spring-enter/index.cjs +1 -1
- package/dist/spring-enter/index.mjs +2 -42
- package/dist/spring-enter-offset-by/index.mjs +1 -1
- package/dist/spring-menu-transition/index.cjs +1 -1
- package/dist/spring-menu-transition/index.mjs +2 -40
- package/dist/spring-open-close-height/index.cjs +1 -1
- package/dist/spring-open-close-height/index.mjs +2 -16
- package/dist/styled/button/index.mjs +1 -1
- package/dist/styled/inputs/text/index.mjs +1 -1
- package/dist/styled/inputs/text-area/index.mjs +1 -1
- package/dist/styled/li/index.mjs +1 -1
- package/dist/styled/ul/index.mjs +1 -1
- package/dist/table-grid/index.cjs +1 -1
- package/dist/table-grid/index.mjs +2 -46
- package/dist/table-header/index.mjs +1 -1
- package/dist/table-row/index.mjs +1 -1
- package/dist/tabs/index.cjs +1 -1
- package/dist/tabs/index.mjs +2 -132
- package/dist/tag-color/index.mjs +1 -1
- package/dist/text-area/index.cjs +1 -1
- package/dist/text-area/index.mjs +2 -157
- package/dist/texts/header/index.cjs +1 -1
- package/dist/texts/header/index.mjs +2 -26
- package/dist/texts/p/index.mjs +1 -1
- package/dist/texts/span/index.mjs +1 -1
- package/dist/toggle-switch/index.cjs +1 -1
- package/dist/toggle-switch/index.mjs +2 -98
- package/dist/{types-BNUi2DUD.js → types-xFemYgmc.js} +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.mjs +33 -33
- package/package.json +9 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { u as a } from "./react-spring_web.modern-DUf5COpz.js";
|
|
3
|
+
import { C as h } from "./component-CGEZuC_0.js";
|
|
4
|
+
import { c as m } from "./generics-C-WSPclF.js";
|
|
5
|
+
import { u as d } from "./web-B_p0FWHf.js";
|
|
6
|
+
const f = ({ isOpen: o, children: r }) => {
|
|
7
|
+
const [e, t] = d(), [n, s] = a(() => ({
|
|
8
|
+
opacity: 0,
|
|
9
|
+
height: 0,
|
|
10
|
+
width: 0
|
|
11
|
+
}));
|
|
12
|
+
return s.start({
|
|
13
|
+
opacity: o ? 1 : 0,
|
|
14
|
+
height: o ? t.height : 0,
|
|
15
|
+
width: o ? t.width : 0
|
|
16
|
+
}), /* @__PURE__ */ i(
|
|
17
|
+
h,
|
|
18
|
+
{
|
|
19
|
+
style: {
|
|
20
|
+
position: "absolute",
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
...n
|
|
23
|
+
},
|
|
24
|
+
boxSizing: m.BorderBox,
|
|
25
|
+
children: /* @__PURE__ */ i(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
ref: e,
|
|
29
|
+
style: {
|
|
30
|
+
width: "max-content",
|
|
31
|
+
height: "max-content",
|
|
32
|
+
boxSizing: "border-box"
|
|
33
|
+
},
|
|
34
|
+
children: r
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
f as S
|
|
42
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { C as e } from "./component-CGEZuC_0.js";
|
|
3
|
+
import { u as a } from "./web-B_p0FWHf.js";
|
|
4
|
+
const c = ({
|
|
5
|
+
isOpen: t,
|
|
6
|
+
children: r
|
|
7
|
+
}) => {
|
|
8
|
+
const [i, n] = a(), h = {
|
|
9
|
+
height: t ? n.height : 0,
|
|
10
|
+
width: "auto",
|
|
11
|
+
overflow: "hidden",
|
|
12
|
+
opacity: t ? 1 : 0
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ o(e, { style: h, children: /* @__PURE__ */ o("div", { ref: i, children: /* @__PURE__ */ o(e, { style: { height: "max-content" }, children: r }) }) });
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
c as S
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),n=require("./component-D-EEi7NI.cjs"),h=require("./web-yC_cLoAC.cjs"),c=({isOpen:e,children:o})=>{const[i,r]=h.useMeasure(),s={height:e?r.height:0,width:"auto",overflow:"hidden",opacity:e?1:0};return t.jsx(n.Container,{style:s,children:t.jsx("div",{ref:i,children:t.jsx(n.Container,{style:{height:"max-content"},children:o})})})};exports.SpringOpenCloseHeight=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const e=require("react/jsx-runtime"),d=require("react"),x=require("./component-D-EEi7NI.cjs"),w=require("./component-B1mkowwk.cjs"),o=require("./classes-HsjFV5aN.cjs"),b=require("./TableHeader-BAdYoCbb.cjs"),j=require("./TableRow-Bq58CTbU.cjs"),q=({headers:l=[],rows:i=[],templateColumns:t,emptyPlaceholder:r,hover:c=!0})=>{const[n,a]=d.useState(i);return e.jsxs(x.Container,{style:{flex:1,width:"100%",maxWidth:"100%"},children:[e.jsx(b.TableHeader,{headers:l,templateColumns:t,setTableRows:a}),n.length!==0?e.jsx(e.Fragment,{children:n.map((s,u)=>e.jsx(j.TableRow,{rowId:s.rowId,templateColumns:t,cells:s.cells,hover:c,onClickRow:s.onClickRow},s.rowId||u))}):r?e.jsx(w.Layout,{display:o.Displays.Flex,flexJustifyContent:o.FlexJustifyContents.Center,style:{width:"100%"},children:r}):e.jsx(e.Fragment,{})]})};exports.TableGrid=q;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as m, jsx as o, Fragment as l } from "react/jsx-runtime";
|
|
3
|
+
import { useState as w } from "react";
|
|
4
|
+
import { C as c } from "./component-CGEZuC_0.js";
|
|
5
|
+
import { L as p } from "./component-CLzFHaNK.js";
|
|
6
|
+
import { j as x, b as T } from "./classes-CVxy1f4M.js";
|
|
7
|
+
import { T as b } from "./TableHeader-D3V5Z3JL.js";
|
|
8
|
+
import { T as h } from "./TableRow-DKC9qdjQ.js";
|
|
9
|
+
const g = ({
|
|
10
|
+
headers: a = [],
|
|
11
|
+
rows: i = [],
|
|
12
|
+
templateColumns: t,
|
|
13
|
+
emptyPlaceholder: s,
|
|
14
|
+
hover: n = !0
|
|
15
|
+
}) => {
|
|
16
|
+
const [e, d] = w(i);
|
|
17
|
+
return /* @__PURE__ */ m(c, { style: { flex: 1, width: "100%", maxWidth: "100%" }, children: [
|
|
18
|
+
/* @__PURE__ */ o(
|
|
19
|
+
b,
|
|
20
|
+
{
|
|
21
|
+
headers: a,
|
|
22
|
+
templateColumns: t,
|
|
23
|
+
setTableRows: d
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
e.length !== 0 ? /* @__PURE__ */ o(l, { children: e.map((r, f) => /* @__PURE__ */ o(
|
|
27
|
+
h,
|
|
28
|
+
{
|
|
29
|
+
rowId: r.rowId,
|
|
30
|
+
templateColumns: t,
|
|
31
|
+
cells: r.cells,
|
|
32
|
+
hover: n,
|
|
33
|
+
onClickRow: r.onClickRow
|
|
34
|
+
},
|
|
35
|
+
r.rowId || f
|
|
36
|
+
)) }) : s ? /* @__PURE__ */ o(
|
|
37
|
+
p,
|
|
38
|
+
{
|
|
39
|
+
display: T.Flex,
|
|
40
|
+
flexJustifyContent: x.Center,
|
|
41
|
+
style: { width: "100%" },
|
|
42
|
+
children: s
|
|
43
|
+
}
|
|
44
|
+
) : /* @__PURE__ */ o(l, {})
|
|
45
|
+
] });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
g as T
|
|
49
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as l, jsxs as z } from "react/jsx-runtime";
|
|
2
|
-
import { C as g } from "./component-
|
|
3
|
-
import { L as h } from "./component-
|
|
2
|
+
import { C as g } from "./component-CGEZuC_0.js";
|
|
3
|
+
import { L as h } from "./component-CLzFHaNK.js";
|
|
4
4
|
import { S as u } from "./generics-C-WSPclF.js";
|
|
5
5
|
import { h as I, b as C } from "./classes-CVxy1f4M.js";
|
|
6
|
-
import { u as T } from "./react-spring_web.modern-
|
|
7
|
-
import { U as j } from "./UIcon-
|
|
6
|
+
import { u as T } from "./react-spring_web.modern-DUf5COpz.js";
|
|
7
|
+
import { U as j } from "./UIcon-Cc5PX9WJ.js";
|
|
8
8
|
import { S as k } from "./generics-BrMr2-Gs.js";
|
|
9
9
|
import { useCallback as S } from "react";
|
|
10
10
|
const A = ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { L as u } from "./component-
|
|
2
|
+
import { L as u } from "./component-CLzFHaNK.js";
|
|
3
3
|
import { b as C } from "./classes-CVxy1f4M.js";
|
|
4
4
|
import { useState as p } from "react";
|
|
5
|
-
import { u as f } from "./react-spring_web.modern-
|
|
6
|
-
import { C as t } from "./component-
|
|
5
|
+
import { u as f } from "./react-spring_web.modern-DUf5COpz.js";
|
|
6
|
+
import { C as t } from "./component-CGEZuC_0.js";
|
|
7
7
|
import { S as m } from "./generics-C-WSPclF.js";
|
|
8
8
|
const y = ({ hover: n, onHover: r, isClicked: o, children: i }) => {
|
|
9
9
|
const s = f({
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx as e, Fragment as z, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { C as d } from "./component-CGEZuC_0.js";
|
|
3
|
+
import { L as c } from "./component-CLzFHaNK.js";
|
|
4
|
+
import { C as u } from "./generics-D33J7ILI.js";
|
|
5
|
+
import { S as a, c as b, b as I, R as h } from "./generics-C-WSPclF.js";
|
|
6
|
+
import { h as x, j as g, b as f } from "./classes-CVxy1f4M.js";
|
|
7
|
+
import { useState as w, useEffect as T } from "react";
|
|
8
|
+
import { u as R } from "./web-B_p0FWHf.js";
|
|
9
|
+
import { T as v } from "./component-BbiEBU5H.js";
|
|
10
|
+
import { u as A } from "./react-spring_web.modern-DUf5COpz.js";
|
|
11
|
+
const B = ({ menu: t, setActiveItem: i, idx: r, menuWrapper: o, route: n }) => {
|
|
12
|
+
const l = () => {
|
|
13
|
+
i(r);
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ e(F, { Wrapper: o, route: n, children: /* @__PURE__ */ e(
|
|
16
|
+
d,
|
|
17
|
+
{
|
|
18
|
+
onClick: () => l(),
|
|
19
|
+
paddingLeft: a.Size3,
|
|
20
|
+
paddingRight: a.Size3,
|
|
21
|
+
paddingTop: a.Size2,
|
|
22
|
+
paddingBottom: a.Size2,
|
|
23
|
+
style: { zIndex: 11, cursor: "pointer", userSelect: "none" },
|
|
24
|
+
children: /* @__PURE__ */ e(
|
|
25
|
+
c,
|
|
26
|
+
{
|
|
27
|
+
display: f.Flex,
|
|
28
|
+
flexJustifyContent: g.Center,
|
|
29
|
+
flexAlignItem: x.Center,
|
|
30
|
+
children: /* @__PURE__ */ e(v, { style: { zIndex: 12 }, children: t.name })
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
) });
|
|
35
|
+
};
|
|
36
|
+
function F({ Wrapper: t, route: i, children: r }) {
|
|
37
|
+
if (typeof t < "u")
|
|
38
|
+
return /* @__PURE__ */ e(t, { href: i, children: r });
|
|
39
|
+
}
|
|
40
|
+
const j = ({ height: t, tabRoomWidth: i, activeItem: r }) => {
|
|
41
|
+
const [o, n] = A(() => ({
|
|
42
|
+
from: { x: 0 }
|
|
43
|
+
}));
|
|
44
|
+
return n.start({ x: i * r }), /* @__PURE__ */ e(
|
|
45
|
+
d,
|
|
46
|
+
{
|
|
47
|
+
borderRadius: h.Size5,
|
|
48
|
+
boxShadow: I.Size1,
|
|
49
|
+
padding: a.Size1,
|
|
50
|
+
boxSizing: b.BorderBox,
|
|
51
|
+
style: {
|
|
52
|
+
position: "absolute",
|
|
53
|
+
height: t,
|
|
54
|
+
width: i,
|
|
55
|
+
zIndex: 10,
|
|
56
|
+
...o
|
|
57
|
+
},
|
|
58
|
+
children: /* @__PURE__ */ e(
|
|
59
|
+
d,
|
|
60
|
+
{
|
|
61
|
+
borderRadius: h.Size4,
|
|
62
|
+
bgColor: u.Grey2,
|
|
63
|
+
style: { width: "100%", height: "100%" },
|
|
64
|
+
children: /* @__PURE__ */ e(z, {})
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}, $ = ({ tabMenu: t, tab: i, setTab: r }) => {
|
|
70
|
+
const [o, n] = w(i || 0);
|
|
71
|
+
T(() => {
|
|
72
|
+
n(i);
|
|
73
|
+
}, [i]);
|
|
74
|
+
const l = (s) => {
|
|
75
|
+
r && r(s), n(s);
|
|
76
|
+
}, [S, p] = R(), y = p.width / t.length;
|
|
77
|
+
return /* @__PURE__ */ e(
|
|
78
|
+
c,
|
|
79
|
+
{
|
|
80
|
+
display: f.Flex,
|
|
81
|
+
flexJustifyContent: g.Center,
|
|
82
|
+
flexAlignItem: x.Center,
|
|
83
|
+
children: /* @__PURE__ */ e("div", { ref: S, style: { boxSizing: "border-box" }, children: /* @__PURE__ */ e(
|
|
84
|
+
d,
|
|
85
|
+
{
|
|
86
|
+
borderRadius: h.Size5,
|
|
87
|
+
bgColor: u.Grey1,
|
|
88
|
+
style: {
|
|
89
|
+
width: "max-content",
|
|
90
|
+
height: "max-content",
|
|
91
|
+
position: "relative",
|
|
92
|
+
zIndex: 9
|
|
93
|
+
},
|
|
94
|
+
children: /* @__PURE__ */ C(
|
|
95
|
+
c,
|
|
96
|
+
{
|
|
97
|
+
display: f.Grid,
|
|
98
|
+
style: {
|
|
99
|
+
gridTemplateColumns: `repeat(${t.length}, 1fr)`,
|
|
100
|
+
position: "relative"
|
|
101
|
+
},
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ e(
|
|
104
|
+
j,
|
|
105
|
+
{
|
|
106
|
+
height: p.height,
|
|
107
|
+
width: p.width,
|
|
108
|
+
activeItem: o,
|
|
109
|
+
tabRoomWidth: y
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
t.map((s, m) => /* @__PURE__ */ e(
|
|
113
|
+
B,
|
|
114
|
+
{
|
|
115
|
+
idx: m,
|
|
116
|
+
menu: s,
|
|
117
|
+
active: o === m,
|
|
118
|
+
setActiveItem: l,
|
|
119
|
+
menuWrapper: s.menuWrapper,
|
|
120
|
+
route: s.route
|
|
121
|
+
},
|
|
122
|
+
m
|
|
123
|
+
))
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
) })
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
export {
|
|
133
|
+
$ as T
|
|
134
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("./component-D-EEi7NI.cjs"),p=require("./component-B1mkowwk.cjs"),h=require("./generics-DE1oV0MV.cjs"),i=require("./generics-9F1CmKPb.cjs"),r=require("./classes-HsjFV5aN.cjs"),g=require("react"),m=require("./web-yC_cLoAC.cjs"),f=require("./component-Bh3EPTN0.cjs"),C=require("./react-spring_web.modern-W3Nkoq_6.cjs"),z=({menu:t,setActiveItem:n,idx:s,menuWrapper:o,route:l})=>{const d=()=>{n(s)};return e.jsx(j,{Wrapper:o,route:l,children:e.jsx(c.Container,{onClick:()=>d(),paddingLeft:i.Spacings.Size3,paddingRight:i.Spacings.Size3,paddingTop:i.Spacings.Size2,paddingBottom:i.Spacings.Size2,style:{zIndex:11,cursor:"pointer",userSelect:"none"},children:e.jsx(p.Layout,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:e.jsx(f.Text_Span,{style:{zIndex:12},children:t.name})})})})};function j({Wrapper:t,route:n,children:s}){if(typeof t<"u")return e.jsx(t,{href:n,children:s})}const b=({height:t,tabRoomWidth:n,activeItem:s})=>{const[o,l]=C.useSpring(()=>({from:{x:0}}));return l.start({x:n*s}),e.jsx(c.Container,{borderRadius:i.Radiuses.Size5,boxShadow:i.BoxShadows.Size1,padding:i.Spacings.Size1,boxSizing:i.BoxSizings.BorderBox,style:{position:"absolute",height:t,width:n,zIndex:10,...o},children:e.jsx(c.Container,{borderRadius:i.Radiuses.Size4,bgColor:h.ColorPalettes.Grey2,style:{width:"100%",height:"100%"},children:e.jsx(e.Fragment,{})})})},I=({tabMenu:t,tab:n,setTab:s})=>{const[o,l]=g.useState(n||0);g.useEffect(()=>{l(n)},[n]);const d=a=>{s&&s(a),l(a)},[S,u]=m.useMeasure(),y=u.width/t.length;return e.jsx(p.Layout,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:e.jsx("div",{ref:S,style:{boxSizing:"border-box"},children:e.jsx(c.Container,{borderRadius:i.Radiuses.Size5,bgColor:h.ColorPalettes.Grey1,style:{width:"max-content",height:"max-content",position:"relative",zIndex:9},children:e.jsxs(p.Layout,{display:r.Displays.Grid,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`,position:"relative"},children:[e.jsx(b,{height:u.height,width:u.width,activeItem:o,tabRoomWidth:y}),t.map((a,x)=>e.jsx(z,{idx:x,menu:a,active:o===x,setActiveItem:d,menuWrapper:a.menuWrapper,route:a.route},x))]})})})})};exports.Tabs=I;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as x } from "react/jsx-runtime";
|
|
2
2
|
import { g as B } from "./_commonjsHelpers-C6fGbg64.js";
|
|
3
|
-
import { C as G } from "./component-
|
|
4
|
-
import { L as V } from "./component-
|
|
5
|
-
import { T as _ } from "./component-
|
|
3
|
+
import { C as G } from "./component-CGEZuC_0.js";
|
|
4
|
+
import { L as V } from "./component-CLzFHaNK.js";
|
|
5
|
+
import { T as _ } from "./component-BbiEBU5H.js";
|
|
6
6
|
import { C as R } from "./generics-D33J7ILI.js";
|
|
7
7
|
import { a as E } from "./values-CSE3dLnv.js";
|
|
8
8
|
import { T as w } from "./types-BXyuQRbv.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const a=require("react/jsx-runtime"),x=require("./component-D-EEi7NI.cjs"),L=require("./component-D92LT0Mq.cjs"),b=require("./generics-DE1oV0MV.cjs"),_=require("./generics-9F1CmKPb.cjs"),e=require("./types-CyVpnRmY.cjs"),f=require("react"),D=require("./useCombinedRef-DZxHQ7PL.cjs"),O=require("./component-Bh3EPTN0.cjs");function W(t,n){f.useEffect(()=>{if(t.current){t.current.style.height="0px";const r=t.current.scrollHeight;t.current.style.height=r+"px"}},[n])}const H=({id:t,label:n,size:r,textAreaColor:o,labelTextColor:s})=>a.jsx(x.Container,{paddingLeft:e.TEXT_AREA_SIZE[r].paddings.left,paddingBottom:e.TEXT_AREA_SIZE[r].paddings.bottom,children:a.jsx("label",{htmlFor:t,children:a.jsx(O.Text_Span,{fontWeight:_.FontWeights.Size3,paletteColor:s&&typeof s=="boolean"?e.TEXT_AREA_COLOR[o].labelColor:b.ColorPalettes.Grey10,fontSize:e.TEXT_AREA_SIZE[r].font.size,children:n})})}),P="_textareaBare_1yf3j_1",Y={textareaBare:P},w=({id:t,name:n,value:r,modes:o=e.TextAreaModes.Default,label:s,required:d=!1,rows:c=1,width:l,fullWidth:T,placeholder:E="Insert text",onChange:X,handleBlur:g,handleFocus:p,handleCheck:S,size:i=e.TextAreaSizes.Default,textAreaStyle:u=e.TextAreaStyles.Default,textAreaColor:h=b.ColorSets.Primarys,labelTextColor:B,noLabel:C,ref:I,...j})=>{const A=f.useRef(null),q=D.useCombinedRef(A,I);W(A,r);const Z=f.useCallback(async m=>{m.preventDefault();const y=m.target.value.trim();if(!(!y||y!=="")){g&&g(),S&&await S();return}},[g,S]),R=f.useCallback(()=>{if(o!==e.TextAreaModes.Disabled)return A.current&&A.current.focus(),p&&p(),!0},[p,o]);return a.jsxs(x.Container,{style:{width:T?"100%":l||350},children:[!C&&a.jsx(H,{id:t,label:s,textAreaColor:h,size:i,labelTextColor:B}),a.jsx(x.Container,{boxSizing:_.BoxSizings.BorderBox,paddingLeft:e.TEXT_AREA_SIZE[i].paddings.left,paddingRight:e.TEXT_AREA_SIZE[i].paddings.right,paddingTop:e.TEXT_AREA_SIZE[i].paddings.top,paddingBottom:e.TEXT_AREA_SIZE[i].paddings.bottom,borderColor:b.ColorPalettes.Primary5,...z(u),style:{paddingTop:u!==e.TextAreaStyles.Outlined&&u!==e.TextAreaStyles.Default?1:"",paddingBottom:u!==e.TextAreaStyles.Outlined&&u!==e.TextAreaStyles.Default?1:"",cursor:"text"},onClick:()=>R(),children:a.jsx(L.F__TextArea,{ref:q,id:t,name:n,value:r,required:d,textOutlineStyle:_.OutlineStyles.None,resize:_.ElementResizes.None,onChange:X,onFocus:R,onBlur:Z,placeholder:E,rows:c,fontSize:e.TEXT_AREA_SIZE[i].font.size,fontWeight:e.TEXT_AREA_SIZE[i].font.weight,className:Y.textareaBare,...j})})]})},z=t=>{var n,r,o,s,d,c,l,T,E;return{borderBottomStyle:(o=(r=(n=e.TEXT_AREA_STYLE[t])==null?void 0:n.borders)==null?void 0:r.bottom)==null?void 0:o.style,borderWidth:(d=(s=e.TEXT_AREA_STYLE[t])==null?void 0:s.borders)==null?void 0:d.width,borderRadius:(l=(c=e.TEXT_AREA_STYLE[t])==null?void 0:c.borders)==null?void 0:l.radius,borderStyle:(E=(T=e.TEXT_AREA_STYLE[t])==null?void 0:T.borders)==null?void 0:E.style}};exports.TextArea=w;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i, jsxs as w } from "react/jsx-runtime";
|
|
3
|
+
import { C as y } from "./component-CGEZuC_0.js";
|
|
4
|
+
import { F as z } from "./component-SecZNuYG.js";
|
|
5
|
+
import { C as R, a as N } from "./generics-D33J7ILI.js";
|
|
6
|
+
import { f as P, c as X, E as v, O as I } from "./generics-C-WSPclF.js";
|
|
7
|
+
import { a as r, T as G, c as E, d as M, e as f, b } from "./types-DNLw5jE2.js";
|
|
8
|
+
import { useEffect as V, useRef as Y, useCallback as C } from "react";
|
|
9
|
+
import { u as Z } from "./useCombinedRef-COuiqHjO.js";
|
|
10
|
+
import { T as k } from "./component-BbiEBU5H.js";
|
|
11
|
+
function q(t, o) {
|
|
12
|
+
V(() => {
|
|
13
|
+
if (t.current) {
|
|
14
|
+
t.current.style.height = "0px";
|
|
15
|
+
const e = t.current.scrollHeight;
|
|
16
|
+
t.current.style.height = e + "px";
|
|
17
|
+
}
|
|
18
|
+
}, [o]);
|
|
19
|
+
}
|
|
20
|
+
const J = ({
|
|
21
|
+
id: t,
|
|
22
|
+
label: o,
|
|
23
|
+
size: e,
|
|
24
|
+
textAreaColor: n,
|
|
25
|
+
labelTextColor: s
|
|
26
|
+
}) => /* @__PURE__ */ i(
|
|
27
|
+
y,
|
|
28
|
+
{
|
|
29
|
+
paddingLeft: r[e].paddings.left,
|
|
30
|
+
paddingBottom: r[e].paddings.bottom,
|
|
31
|
+
children: /* @__PURE__ */ i("label", { htmlFor: t, children: /* @__PURE__ */ i(
|
|
32
|
+
k,
|
|
33
|
+
{
|
|
34
|
+
fontWeight: P.Size3,
|
|
35
|
+
paletteColor: s && typeof s == "boolean" ? G[n].labelColor : R.Grey10,
|
|
36
|
+
fontSize: r[e].font.size,
|
|
37
|
+
children: o
|
|
38
|
+
}
|
|
39
|
+
) })
|
|
40
|
+
}
|
|
41
|
+
), K = "_textareaBare_1yf3j_1", Q = {
|
|
42
|
+
textareaBare: K
|
|
43
|
+
}, dt = ({
|
|
44
|
+
// required
|
|
45
|
+
id: t,
|
|
46
|
+
name: o,
|
|
47
|
+
value: e,
|
|
48
|
+
modes: n = E.Default,
|
|
49
|
+
label: s,
|
|
50
|
+
// optional properties
|
|
51
|
+
required: u = !1,
|
|
52
|
+
rows: c = 1,
|
|
53
|
+
width: d,
|
|
54
|
+
fullWidth: p,
|
|
55
|
+
placeholder: m = "Insert text",
|
|
56
|
+
// helperText,
|
|
57
|
+
// methods
|
|
58
|
+
onChange: A,
|
|
59
|
+
handleBlur: T,
|
|
60
|
+
handleFocus: x,
|
|
61
|
+
handleCheck: h,
|
|
62
|
+
// text area styles -- style, sizings
|
|
63
|
+
size: a = M.Default,
|
|
64
|
+
textAreaStyle: l = f.Default,
|
|
65
|
+
textAreaColor: D = N.Primarys,
|
|
66
|
+
// customization
|
|
67
|
+
labelTextColor: O,
|
|
68
|
+
noLabel: L,
|
|
69
|
+
ref: W,
|
|
70
|
+
...F
|
|
71
|
+
}) => {
|
|
72
|
+
const g = Y(null), H = Z(g, W);
|
|
73
|
+
q(g, e);
|
|
74
|
+
const j = C(
|
|
75
|
+
async (S) => {
|
|
76
|
+
S.preventDefault();
|
|
77
|
+
const _ = S.target.value.trim();
|
|
78
|
+
if (!(!_ || _ !== "")) {
|
|
79
|
+
T && T(), h && await h();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
[T, h]
|
|
84
|
+
), B = C(() => {
|
|
85
|
+
if (n !== E.Disabled)
|
|
86
|
+
return g.current && g.current.focus(), x && x(), !0;
|
|
87
|
+
}, [x, n]);
|
|
88
|
+
return /* @__PURE__ */ w(
|
|
89
|
+
y,
|
|
90
|
+
{
|
|
91
|
+
style: {
|
|
92
|
+
width: p ? "100%" : d || 350
|
|
93
|
+
// position: "relative", // to label
|
|
94
|
+
},
|
|
95
|
+
children: [
|
|
96
|
+
!L && /* @__PURE__ */ i(
|
|
97
|
+
J,
|
|
98
|
+
{
|
|
99
|
+
id: t,
|
|
100
|
+
label: s,
|
|
101
|
+
textAreaColor: D,
|
|
102
|
+
size: a,
|
|
103
|
+
labelTextColor: O
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ i(
|
|
107
|
+
y,
|
|
108
|
+
{
|
|
109
|
+
boxSizing: X.BorderBox,
|
|
110
|
+
paddingLeft: r[a].paddings.left,
|
|
111
|
+
paddingRight: r[a].paddings.right,
|
|
112
|
+
paddingTop: r[a].paddings.top,
|
|
113
|
+
paddingBottom: r[a].paddings.bottom,
|
|
114
|
+
borderColor: R.Primary5,
|
|
115
|
+
...U(l),
|
|
116
|
+
style: {
|
|
117
|
+
paddingTop: l !== f.Outlined && l !== f.Default ? 1 : "",
|
|
118
|
+
paddingBottom: l !== f.Outlined && l !== f.Default ? 1 : "",
|
|
119
|
+
cursor: "text"
|
|
120
|
+
},
|
|
121
|
+
onClick: () => B(),
|
|
122
|
+
children: /* @__PURE__ */ i(
|
|
123
|
+
z,
|
|
124
|
+
{
|
|
125
|
+
ref: H,
|
|
126
|
+
id: t,
|
|
127
|
+
name: o,
|
|
128
|
+
value: e,
|
|
129
|
+
required: u,
|
|
130
|
+
textOutlineStyle: I.None,
|
|
131
|
+
resize: v.None,
|
|
132
|
+
onChange: A,
|
|
133
|
+
onFocus: B,
|
|
134
|
+
onBlur: j,
|
|
135
|
+
placeholder: m,
|
|
136
|
+
rows: c,
|
|
137
|
+
fontSize: r[a].font.size,
|
|
138
|
+
fontWeight: r[a].font.weight,
|
|
139
|
+
className: Q.textareaBare,
|
|
140
|
+
...F
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
}, U = (t) => {
|
|
149
|
+
var o, e, n, s, u, c, d, p, m;
|
|
150
|
+
return {
|
|
151
|
+
// define the top, left, bottom, right first
|
|
152
|
+
borderBottomStyle: (n = (e = (o = b[t]) == null ? void 0 : o.borders) == null ? void 0 : e.bottom) == null ? void 0 : n.style,
|
|
153
|
+
borderWidth: (u = (s = b[t]) == null ? void 0 : s.borders) == null ? void 0 : u.width,
|
|
154
|
+
borderRadius: (d = (c = b[t]) == null ? void 0 : c.borders) == null ? void 0 : d.radius,
|
|
155
|
+
borderStyle: (m = (p = b[t]) == null ? void 0 : p.borders) == null ? void 0 : m.style
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
export {
|
|
159
|
+
dt as T
|
|
160
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { u as p } from "./react-spring_web.modern-DUf5COpz.js";
|
|
3
|
+
import { C as n } from "./component-CGEZuC_0.js";
|
|
4
|
+
import { U as y } from "./UIcon-Cc5PX9WJ.js";
|
|
5
|
+
import { L as v } from "./LabelText-WYEq5keJ.js";
|
|
6
|
+
import { T as t, b as I, a as S, c as b } from "./types-B6XaG3V2.js";
|
|
7
|
+
import { useState as B } from "react";
|
|
8
|
+
import { u as E } from "./web-B_p0FWHf.js";
|
|
9
|
+
const L = "_toggleContainer_15eps_1", N = "_toggleBg_15eps_15", G = "_toggleThumb_15eps_33", s = {
|
|
10
|
+
toggleContainer: L,
|
|
11
|
+
toggleBg: N,
|
|
12
|
+
toggleThumb: G
|
|
13
|
+
}, X = ({
|
|
14
|
+
isTrue: r,
|
|
15
|
+
setIsTrue: f,
|
|
16
|
+
size: o = I.Medium,
|
|
17
|
+
icon: a = "",
|
|
18
|
+
toggleState: g = b.Icon,
|
|
19
|
+
description: i = ""
|
|
20
|
+
}) => {
|
|
21
|
+
var h, m;
|
|
22
|
+
const T = p({
|
|
23
|
+
backgroundColor: r ? "#4BD763" : "#cccccc"
|
|
24
|
+
// position: "relative",
|
|
25
|
+
// config: {
|
|
26
|
+
// duration: 150,
|
|
27
|
+
// }
|
|
28
|
+
}), [d, _] = p(() => ({
|
|
29
|
+
x: 0
|
|
30
|
+
// config: {
|
|
31
|
+
// duration: 50,
|
|
32
|
+
// }
|
|
33
|
+
}));
|
|
34
|
+
_.start({
|
|
35
|
+
x: r ? 26 : 0
|
|
36
|
+
// config: {
|
|
37
|
+
// duration: 50,
|
|
38
|
+
// }
|
|
39
|
+
});
|
|
40
|
+
const [w, l] = B(!1), [C, c] = E();
|
|
41
|
+
return /* @__PURE__ */ u(
|
|
42
|
+
n,
|
|
43
|
+
{
|
|
44
|
+
className: s.toggleContainer,
|
|
45
|
+
tabIndex: 1,
|
|
46
|
+
onMouseEnter: () => l(!0),
|
|
47
|
+
onMouseLeave: () => l(!1),
|
|
48
|
+
onClick: () => f((x) => !x),
|
|
49
|
+
style: {
|
|
50
|
+
width: t[o].container.w,
|
|
51
|
+
height: t[o].container.h
|
|
52
|
+
},
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ e(n, { style: { ...T, position: "relative" }, children: /* @__PURE__ */ e(
|
|
55
|
+
n,
|
|
56
|
+
{
|
|
57
|
+
className: s.toggleBg,
|
|
58
|
+
style: {
|
|
59
|
+
width: t[o].bg.w,
|
|
60
|
+
height: t[o].bg.h
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
) }),
|
|
64
|
+
/* @__PURE__ */ e(n, { style: { position: "relative", ...d }, children: /* @__PURE__ */ u(
|
|
65
|
+
n,
|
|
66
|
+
{
|
|
67
|
+
className: s.toggleThumb,
|
|
68
|
+
ref: C,
|
|
69
|
+
style: {
|
|
70
|
+
width: t[o].thumb.w,
|
|
71
|
+
height: t[o].thumb.h
|
|
72
|
+
},
|
|
73
|
+
children: [
|
|
74
|
+
i !== "" && /* @__PURE__ */ e(
|
|
75
|
+
v,
|
|
76
|
+
{
|
|
77
|
+
labelName: i,
|
|
78
|
+
hover: w,
|
|
79
|
+
offsetX: c.width / 2,
|
|
80
|
+
y: c.height + 5
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
a !== "" && /* @__PURE__ */ e(
|
|
84
|
+
y,
|
|
85
|
+
{
|
|
86
|
+
name: g === b.Icon ? a : S[g],
|
|
87
|
+
width: (h = t[o].icon) == null ? void 0 : h.w,
|
|
88
|
+
height: (m = t[o].icon) == null ? void 0 : m.h
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
) })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
X as T
|
|
100
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),T=require("./react-spring_web.modern-W3Nkoq_6.cjs"),n=require("./component-D-EEi7NI.cjs"),d=require("./UIcon-B5rpDmHC.cjs"),w=require("./LabelText-BUslE9cx.cjs"),e=require("./types-BzOxElrp.cjs"),x=require("react"),C=require("./web-yC_cLoAC.cjs"),L="_toggleContainer_15eps_1",O="_toggleBg_15eps_15",p="_toggleThumb_15eps_33",s={toggleContainer:L,toggleBg:O,toggleThumb:p},j=({isTrue:r,setIsTrue:_,size:t=e.ToggleSizes.Medium,icon:c="",toggleState:g=e.ToggleStates.Icon,description:i=""})=>{var h,u;const E=T.useSpring({backgroundColor:r?"#4BD763":"#cccccc"}),[G,m]=T.useSpring(()=>({x:0}));m.start({x:r?26:0});const[S,l]=x.useState(!1),[b,a]=C.useMeasure();return o.jsxs(n.Container,{className:s.toggleContainer,tabIndex:1,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onClick:()=>_(I=>!I),style:{width:e.TOGGLE_SIZE[t].container.w,height:e.TOGGLE_SIZE[t].container.h},children:[o.jsx(n.Container,{style:{...E,position:"relative"},children:o.jsx(n.Container,{className:s.toggleBg,style:{width:e.TOGGLE_SIZE[t].bg.w,height:e.TOGGLE_SIZE[t].bg.h}})}),o.jsx(n.Container,{style:{position:"relative",...G},children:o.jsxs(n.Container,{className:s.toggleThumb,ref:b,style:{width:e.TOGGLE_SIZE[t].thumb.w,height:e.TOGGLE_SIZE[t].thumb.h},children:[i!==""&&o.jsx(w.LabelText,{labelName:i,hover:S,offsetX:a.width/2,y:a.height+5}),c!==""&&o.jsx(d.UIcon,{name:g===e.ToggleStates.Icon?c:e.TOGGLE_STATE_ICON[g],width:(h=e.TOGGLE_SIZE[t].icon)==null?void 0:h.w,height:(u=e.TOGGLE_SIZE[t].icon)==null?void 0:u.h})]})})]})};exports.ToggleSwitch=j;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i, jsxs as j } from "react/jsx-runtime";
|
|
3
|
-
import { u as v } from "./react-spring_web.modern-
|
|
4
|
-
import { C as U } from "./component-
|
|
5
|
-
import { L as w } from "./component-
|
|
3
|
+
import { u as v } from "./react-spring_web.modern-DUf5COpz.js";
|
|
4
|
+
import { C as U } from "./component-CGEZuC_0.js";
|
|
5
|
+
import { L as w } from "./component-CLzFHaNK.js";
|
|
6
6
|
import { C as d } from "./generics-D33J7ILI.js";
|
|
7
7
|
import { a as r } from "./values-CSE3dLnv.js";
|
|
8
8
|
import { S as t, C as N, R as b } from "./generics-C-WSPclF.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const z=require("react/jsx-runtime"),t=require("./generics-9F1CmKPb.cjs"),r=require("./types-BciByhvn.cjs"),n=require("react"),u=n.createContext({theme:r.Themes.Default,baseFontSize:t.FontSizes.Size2||2,handleSetTheme:()=>{},onSetBaseFontSize:()=>{}});function F({children:s}){const o=x();return z.jsx(u.Provider,{value:o,children:s})}const h=()=>n.useContext(u);function x(){const[s,o]=n.useState(r.Themes.Default),S=e=>{o(e)},[c,a]=n.useState(t.FontSizes.Size2);return{theme:s,baseFontSize:c,handleSetTheme:S,onSetBaseFontSize:e=>{a(i=>i+e>8?t.FontSizes.Size8:i+e<1?t.FontSizes.Size1:i+e)}}}exports.ProvideUiContext=F;exports.useUiContext=h;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import { d as t } from "./generics-C-WSPclF.js";
|
|
4
|
+
import { a as r } from "./types-BuixDDod.js";
|
|
5
|
+
import { useContext as z, useState as i, createContext as f } from "react";
|
|
6
|
+
const a = f({
|
|
7
|
+
theme: r.Default,
|
|
8
|
+
baseFontSize: t.Size2 || 2,
|
|
9
|
+
handleSetTheme: () => {
|
|
10
|
+
},
|
|
11
|
+
onSetBaseFontSize: () => {
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
function B({ children: n }) {
|
|
15
|
+
const o = h();
|
|
16
|
+
return /* @__PURE__ */ c(a.Provider, { value: o, children: n });
|
|
17
|
+
}
|
|
18
|
+
const T = () => z(a);
|
|
19
|
+
function h() {
|
|
20
|
+
const [n, o] = i(r.Default), S = (e) => {
|
|
21
|
+
o(e);
|
|
22
|
+
}, [u, m] = i(t.Size2);
|
|
23
|
+
return {
|
|
24
|
+
theme: n,
|
|
25
|
+
baseFontSize: u,
|
|
26
|
+
handleSetTheme: S,
|
|
27
|
+
onSetBaseFontSize: (e) => {
|
|
28
|
+
m((s) => s + e > 8 ? t.Size8 : s + e < 1 ? t.Size1 : s + e);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
B as P,
|
|
34
|
+
T as u
|
|
35
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../Admonition-BVd4bXl_.cjs");exports.Admonition=o.Admonition;
|