@functionalui/functionalui 0.2.6 → 0.2.7

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.
Files changed (138) hide show
  1. package/dist/Admonition-BVd4bXl_.cjs +1 -0
  2. package/dist/Admonition-CReUUZzJ.js +88 -0
  3. package/dist/{Avatar-CQA0mEVW.js → Avatar-CkxjB_cU.js} +4 -4
  4. package/dist/AvatarGroup-CbohU2rq.cjs +1 -0
  5. package/dist/AvatarGroup-FpaQP2H4.js +52 -0
  6. package/dist/{Button-CpTXDsI7.js → Button-DLwud-g7.js} +8 -8
  7. package/dist/{Checkbox-C29jP71p.js → Checkbox-CNpy1wvA.js} +3 -3
  8. package/dist/Checkboxes-CQVptWR8.cjs +1 -0
  9. package/dist/Checkboxes-Cj740f5X.js +80 -0
  10. package/dist/Chip-DgSZZTgy.js +132 -0
  11. package/dist/Chip-HOh--tbB.cjs +1 -0
  12. package/dist/ColorPicker-DUz0qcHd.js +234 -0
  13. package/dist/ColorPicker-rxR_V4EW.cjs +1 -0
  14. package/dist/DivMeasure-C398kYvk.js +26 -0
  15. package/dist/DivMeasure-oi_fzKlp.cjs +1 -0
  16. package/dist/GalleryModal-DjCnCkbg.js +464 -0
  17. package/dist/GalleryModal-wFC9x3Em.cjs +1 -0
  18. package/dist/InputImage-CInJWoGb.cjs +1 -0
  19. package/dist/InputImage-ZST0lvcI.js +106 -0
  20. package/dist/InputText-Bjhoe-Tm.cjs +1 -0
  21. package/dist/InputText-DnR7KYJS.js +246 -0
  22. package/dist/InsetGroup-BHxpHwpd.js +105 -0
  23. package/dist/InsetGroup-CGACEEbB.cjs +1 -0
  24. package/dist/{LabelText-D7QIWtWj.js → LabelText-WYEq5keJ.js} +3 -3
  25. package/dist/LoadingSpinner-BC0eMoVW.js +101 -0
  26. package/dist/LoadingSpinner-DykDI5-W.cjs +1 -0
  27. package/dist/{Modal-DXLyt-j4.js → Modal-Di5ye0Cr.js} +4 -4
  28. package/dist/NotificationSystem-B5NXsG0a.js +158 -0
  29. package/dist/NotificationSystem-D4ydo2Lk.cjs +1 -0
  30. package/dist/Radio-Dd5W2Lpf.js +121 -0
  31. package/dist/Radio-QbaBzLpf.cjs +1 -0
  32. package/dist/SelectSpring-BOfRXdag.js +471 -0
  33. package/dist/SelectSpring-DFKWTbF1.cjs +1 -0
  34. package/dist/SpringEnter-CPw1YgNg.cjs +1 -0
  35. package/dist/SpringEnter-CoVZpW-c.js +44 -0
  36. package/dist/{SpringEnterOffsetBy-DMSIQgV3.js → SpringEnterOffsetBy-BKglENgZ.js} +2 -2
  37. package/dist/SpringMenuTransition-B_PoFoqO.cjs +1 -0
  38. package/dist/SpringMenuTransition-CzSfyvDZ.js +42 -0
  39. package/dist/SpringOpenCloseHeight-COvFkc30.js +18 -0
  40. package/dist/SpringOpenCloseHeight-CyxsSgRD.cjs +1 -0
  41. package/dist/TableGrid-BYBVHJt9.cjs +1 -0
  42. package/dist/TableGrid-QlKM9Sdp.js +49 -0
  43. package/dist/{TableHeader-Da0XxILB.js → TableHeader-D3V5Z3JL.js} +4 -4
  44. package/dist/{TableRow-BlJSvake.js → TableRow-DKC9qdjQ.js} +3 -3
  45. package/dist/Tabs-BkUyxceG.js +134 -0
  46. package/dist/Tabs-C8VAb1g0.cjs +1 -0
  47. package/dist/{TagColor-BYKxfOU6.js → TagColor-Bd3n3RCF.js} +3 -3
  48. package/dist/TextArea-Bsm5M8lo.cjs +1 -0
  49. package/dist/TextArea-Cd3q9BMN.js +160 -0
  50. package/dist/ToggleSwitch-BNAk1Wp6.js +100 -0
  51. package/dist/ToggleSwitch-D6ltRmPy.cjs +1 -0
  52. package/dist/{UIcon-BHzbeYWw.js → UIcon-Cc5PX9WJ.js} +3 -3
  53. package/dist/UiContexts-36wfLVYv.cjs +1 -0
  54. package/dist/UiContexts-BMJZJR8C.js +35 -0
  55. package/dist/admonition/index.cjs +1 -1
  56. package/dist/admonition/index.mjs +2 -86
  57. package/dist/avatar/index.mjs +1 -1
  58. package/dist/avatar-group/index.cjs +1 -1
  59. package/dist/avatar-group/index.mjs +2 -50
  60. package/dist/button/index.mjs +1 -1
  61. package/dist/checkbox/index.mjs +1 -1
  62. package/dist/checkboxes/index.cjs +1 -1
  63. package/dist/checkboxes/index.mjs +2 -78
  64. package/dist/chip/index.cjs +1 -1
  65. package/dist/chip/index.mjs +2 -130
  66. package/dist/color-picker/index.cjs +1 -1
  67. package/dist/color-picker/index.mjs +2 -232
  68. package/dist/{component-CW2JPBAq.js → component-89pO-V2r.js} +1 -1
  69. package/dist/{component-BvHdlcdE.js → component-BbiEBU5H.js} +1 -1
  70. package/dist/component-BvmPGrYv.cjs +1 -0
  71. package/dist/{component-C1Gs4nVu.js → component-CGEZuC_0.js} +1 -1
  72. package/dist/{component-DRXQXr2G.js → component-CLzFHaNK.js} +1 -1
  73. package/dist/{component-D0wwK4KY.js → component-D-bBH8nL.js} +1 -1
  74. package/dist/{component-DCHO9d6d.js → component-DBDhHeDP.js} +1 -1
  75. package/dist/{component-D5nxKQnT.js → component-DP7cQasn.js} +1 -1
  76. package/dist/{component-CBIQe7z5.js → component-JelkpADf.js} +1 -1
  77. package/dist/{component-DdQu0mLI.js → component-SecZNuYG.js} +1 -1
  78. package/dist/component-cHg1BfVy.js +28 -0
  79. package/dist/container/index.mjs +1 -1
  80. package/dist/contexts/ui/index.cjs +1 -1
  81. package/dist/contexts/ui/index.mjs +3 -32
  82. package/dist/{createTextElement-Cgrvdwvh.js → createTextElement-d3-b9Lvn.js} +1 -1
  83. package/dist/css/index.css +1 -1
  84. package/dist/div-measure/index.cjs +1 -1
  85. package/dist/div-measure/index.mjs +2 -23
  86. package/dist/gallery-modal/index.cjs +1 -1
  87. package/dist/gallery-modal/index.mjs +2 -461
  88. package/dist/icons/index.mjs +1 -1
  89. package/dist/input-image/index.cjs +1 -1
  90. package/dist/input-image/index.mjs +2 -103
  91. package/dist/input-text/index.cjs +1 -1
  92. package/dist/input-text/index.mjs +2 -243
  93. package/dist/inset-group/index.cjs +1 -1
  94. package/dist/inset-group/index.mjs +2 -102
  95. package/dist/label-text/index.mjs +1 -1
  96. package/dist/layout/index.mjs +1 -1
  97. package/dist/loading-spinner/index.cjs +1 -1
  98. package/dist/loading-spinner/index.mjs +3 -98
  99. package/dist/main.cjs +1 -0
  100. package/dist/main.mjs +95 -0
  101. package/dist/modal/index.mjs +1 -1
  102. package/dist/notification-system/index.cjs +1 -1
  103. package/dist/notification-system/index.mjs +2 -155
  104. package/dist/radio/index.cjs +1 -1
  105. package/dist/radio/index.mjs +2 -118
  106. package/dist/{react-spring_web.modern-DgQDaJ06.js → react-spring_web.modern-DUf5COpz.js} +3 -3
  107. package/dist/select-spring/index.cjs +1 -1
  108. package/dist/select-spring/index.mjs +2 -468
  109. package/dist/spring-enter/index.cjs +1 -1
  110. package/dist/spring-enter/index.mjs +2 -42
  111. package/dist/spring-enter-offset-by/index.mjs +1 -1
  112. package/dist/spring-menu-transition/index.cjs +1 -1
  113. package/dist/spring-menu-transition/index.mjs +2 -40
  114. package/dist/spring-open-close-height/index.cjs +1 -1
  115. package/dist/spring-open-close-height/index.mjs +2 -16
  116. package/dist/styled/button/index.mjs +1 -1
  117. package/dist/styled/inputs/text/index.mjs +1 -1
  118. package/dist/styled/inputs/text-area/index.mjs +1 -1
  119. package/dist/styled/li/index.mjs +1 -1
  120. package/dist/styled/ul/index.mjs +1 -1
  121. package/dist/table-grid/index.cjs +1 -1
  122. package/dist/table-grid/index.mjs +2 -46
  123. package/dist/table-header/index.mjs +1 -1
  124. package/dist/table-row/index.mjs +1 -1
  125. package/dist/tabs/index.cjs +1 -1
  126. package/dist/tabs/index.mjs +2 -132
  127. package/dist/tag-color/index.mjs +1 -1
  128. package/dist/text-area/index.cjs +1 -1
  129. package/dist/text-area/index.mjs +2 -157
  130. package/dist/texts/header/index.cjs +1 -1
  131. package/dist/texts/header/index.mjs +2 -26
  132. package/dist/texts/p/index.mjs +1 -1
  133. package/dist/texts/span/index.mjs +1 -1
  134. package/dist/toggle-switch/index.cjs +1 -1
  135. package/dist/toggle-switch/index.mjs +2 -98
  136. package/dist/{types-BNUi2DUD.js → types-xFemYgmc.js} +1 -1
  137. package/dist/types.mjs +1 -1
  138. package/package.json +9 -1
@@ -1,49 +1,5 @@
1
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-C1Gs4nVu.js";
5
- import { L as p } from "../component-DRXQXr2G.js";
6
- import { j as x, b } from "../classes-CVxy1f4M.js";
7
- import { T as h } from "../TableHeader-Da0XxILB.js";
8
- import { T as u } from "../TableRow-BlJSvake.js";
9
- const g = ({
10
- headers: i = [],
11
- rows: a = [],
12
- templateColumns: t,
13
- emptyPlaceholder: e,
14
- hover: n = !0
15
- }) => {
16
- const [s, d] = w(a);
17
- return /* @__PURE__ */ m(c, { style: { flex: 1, width: "100%", maxWidth: "100%" }, children: [
18
- /* @__PURE__ */ o(
19
- h,
20
- {
21
- headers: i,
22
- templateColumns: t,
23
- setTableRows: d
24
- }
25
- ),
26
- s.length !== 0 ? /* @__PURE__ */ o(l, { children: s.map((r, f) => /* @__PURE__ */ o(
27
- u,
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
- )) }) : e ? /* @__PURE__ */ o(
37
- p,
38
- {
39
- display: b.Flex,
40
- flexJustifyContent: x.Center,
41
- style: { width: "100%" },
42
- children: e
43
- }
44
- ) : /* @__PURE__ */ o(l, {})
45
- ] });
46
- };
2
+ import { T as a } from "../TableGrid-QlKM9Sdp.js";
47
3
  export {
48
- g as TableGrid
4
+ a as TableGrid
49
5
  };
@@ -1,4 +1,4 @@
1
- import { T as r } from "../TableHeader-Da0XxILB.js";
1
+ import { T as r } from "../TableHeader-D3V5Z3JL.js";
2
2
  export {
3
3
  r as TableHeader
4
4
  };
@@ -1,4 +1,4 @@
1
- import { T as e } from "../TableRow-BlJSvake.js";
1
+ import { T as e } from "../TableRow-DKC9qdjQ.js";
2
2
  export {
3
3
  e as TableRow
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});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"),b=({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 z=({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(z,{height:u.height,width:u.width,activeItem:o,tabRoomWidth:y}),t.map((a,x)=>e.jsx(b,{idx:x,menu:a,active:o===x,setActiveItem:d,menuWrapper:a.menuWrapper,route:a.route},x))]})})})})};exports.Tabs=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Tabs-C8VAb1g0.cjs");exports.Tabs=e.Tabs;
@@ -1,134 +1,4 @@
1
- import { jsx as e, Fragment as z, jsxs as C } from "react/jsx-runtime";
2
- import { C as d } from "../component-C1Gs4nVu.js";
3
- import { L as c } from "../component-DRXQXr2G.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 R } from "react";
8
- import { u as T } from "../web-B_p0FWHf.js";
9
- import { T as v } from "../component-BvHdlcdE.js";
10
- import { u as A } from "../react-spring_web.modern-DgQDaJ06.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
- R(() => {
72
- n(i);
73
- }, [i]);
74
- const l = (s) => {
75
- r && r(s), n(s);
76
- }, [S, p] = T(), 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
- };
1
+ import { T as r } from "../Tabs-BkUyxceG.js";
132
2
  export {
133
- $ as Tabs
3
+ r as Tabs
134
4
  };
@@ -1,4 +1,4 @@
1
- import { T as a } from "../TagColor-BYKxfOU6.js";
1
+ import { T as a } from "../TagColor-Bd3n3RCF.js";
2
2
  export {
3
3
  a as TagColor
4
4
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),x=require("../component-D-EEi7NI.cjs"),L=require("../component-D92LT0Mq.cjs"),b=require("../generics-DE1oV0MV.cjs"),f=require("../generics-9F1CmKPb.cjs"),e=require("../types-CyVpnRmY.cjs"),_=require("react"),D=require("../useCombinedRef-DZxHQ7PL.cjs"),O=require("../component-Bh3EPTN0.cjs");function P(t,o){_.useEffect(()=>{if(t.current){t.current.style.height="0px";const r=t.current.scrollHeight;t.current.style.height=r+"px"}},[o])}const W=({id:t,label:o,size:r,textAreaColor:n,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:f.FontWeights.Size3,paletteColor:s&&typeof s=="boolean"?e.TEXT_AREA_COLOR[n].labelColor:b.ColorPalettes.Grey10,fontSize:e.TEXT_AREA_SIZE[r].font.size,children:o})})}),H="_textareaBare_1yf3j_1",Y={textareaBare:H},v=({id:t,name:o,value:r,modes:n=e.TextAreaModes.Default,label:s,required:d=!1,rows:c=1,width:l,fullWidth:T,placeholder:E="Insert text",onChange:X,handleBlur:g,handleFocus:S,handleCheck:p,size:i=e.TextAreaSizes.Default,textAreaStyle:u=e.TextAreaStyles.Default,textAreaColor:h=b.ColorSets.Primarys,labelTextColor:B,noLabel:C,ref:j,...I})=>{const A=_.useRef(null),q=D.useCombinedRef(A,j);P(A,r);const Z=_.useCallback(async m=>{m.preventDefault();const y=m.target.value.trim();if(!(!y||y!=="")){g&&g(),p&&await p();return}},[g,p]),R=_.useCallback(()=>{if(n!==e.TextAreaModes.Disabled)return A.current&&A.current.focus(),S&&S(),!0},[S,n]);return a.jsxs(x.Container,{style:{width:T?"100%":l||350},children:[!C&&a.jsx(W,{id:t,label:s,textAreaColor:h,size:i,labelTextColor:B}),a.jsx(x.Container,{boxSizing:f.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,...w(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:o,value:r,required:d,textOutlineStyle:f.OutlineStyles.None,resize:f.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,...I})})]})},w=t=>{var o,r,n,s,d,c,l,T,E;return{borderBottomStyle:(n=(r=(o=e.TEXT_AREA_STYLE[t])==null?void 0:o.borders)==null?void 0:r.bottom)==null?void 0:n.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=v;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../TextArea-Bsm5M8lo.cjs");exports.TextArea=e.TextArea;
@@ -1,160 +1,5 @@
1
1
  "use client";
2
- import { jsx as a, jsxs as w } from "react/jsx-runtime";
3
- import { C as y } from "../component-C1Gs4nVu.js";
4
- import { F as z } from "../component-DdQu0mLI.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-BvHdlcdE.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__ */ a(
27
- y,
28
- {
29
- paddingLeft: r[e].paddings.left,
30
- paddingBottom: r[e].paddings.bottom,
31
- children: /* @__PURE__ */ a("label", { htmlFor: t, children: /* @__PURE__ */ a(
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: i = 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__ */ a(
97
- J,
98
- {
99
- id: t,
100
- label: s,
101
- textAreaColor: D,
102
- size: i,
103
- labelTextColor: O
104
- }
105
- ),
106
- /* @__PURE__ */ a(
107
- y,
108
- {
109
- boxSizing: X.BorderBox,
110
- paddingLeft: r[i].paddings.left,
111
- paddingRight: r[i].paddings.right,
112
- paddingTop: r[i].paddings.top,
113
- paddingBottom: r[i].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__ */ a(
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[i].font.size,
138
- fontWeight: r[i].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
- };
2
+ import { T as t } from "../TextArea-Cd3q9BMN.js";
158
3
  export {
159
- dt as TextArea
4
+ t as TextArea
160
5
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../../react-spring_web.modern-W3Nkoq_6.cjs"),t=require("../../classes-CtwIjJdw.cjs"),p=require("react");function C(c){function r(u,_){const{paletteColor:s,fontSize:o,fontFamily:a,fontWeight:S,fontStyle:i,textAlign:l,header:d,children:f,...E}=u,n={...E},e=[];s&&e.push(t.FONT_COLOR_CLASSES[s]),o&&e.push(t.FONT_SIZE_CLASSES[o]),a&&e.push(t.FONT_FAMILY_CLASSES[a]),S&&e.push(t.FONT_WEIGHT_CLASSES[S]),i&&e.push(t.FONT_STYLE_CLASSES[i]),l&&e.push(t.TEXT_ALIGN_CLASSES[l]),n.className=[...e,n.className].filter(Boolean).join(" ");const T=d;return p.createElement(m.animated[`${T}`],{ref:_,...n},f)}return r.displayName=`createElement(${String(c)})`,r}const L=C();exports.Text_Header=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../component-BvmPGrYv.cjs");exports.Text_Header=e.Text_Header;
@@ -1,28 +1,4 @@
1
- import { a as T } from "../../react-spring_web.modern-DgQDaJ06.js";
2
- import { q as _, p as d, s as u, r as C, T as L, F as h } from "../../classes-CBD1K4L1.js";
3
- import { createElement as A } from "react";
4
- function N(l) {
5
- function a(f, c) {
6
- const {
7
- paletteColor: s,
8
- fontSize: o,
9
- fontFamily: n,
10
- fontWeight: r,
11
- fontStyle: S,
12
- textAlign: i,
13
- header: m,
14
- children: p,
15
- ...E
16
- } = f, t = { ...E }, e = [];
17
- return s && e.push(h[s]), o && e.push(_[o]), n && e.push(d[n]), r && e.push(u[r]), S && e.push(C[S]), i && e.push(L[i]), t.className = [...e, t.className].filter(Boolean).join(" "), A(
18
- T[`${m}`],
19
- { ref: c, ...t },
20
- p
21
- );
22
- }
23
- return a.displayName = `createElement(${String(l)})`, a;
24
- }
25
- const H = N();
1
+ import { T as a } from "../../component-cHg1BfVy.js";
26
2
  export {
27
- H as Text_Header
3
+ a as Text_Header
28
4
  };
@@ -1,4 +1,4 @@
1
- import { T as r } from "../../component-D0wwK4KY.js";
1
+ import { T as r } from "../../component-D-bBH8nL.js";
2
2
  export {
3
3
  r as Text_P
4
4
  };
@@ -1,4 +1,4 @@
1
- import { T as o } from "../../component-BvHdlcdE.js";
1
+ import { T as o } from "../../component-BbiEBU5H.js";
2
2
  export {
3
3
  o as Text_Span
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),T=require("../react-spring_web.modern-W3Nkoq_6.cjs"),n=require("../component-D-EEi7NI.cjs"),I=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",r={toggleContainer:L,toggleBg:O,toggleThumb:p},y=({isTrue:s,setIsTrue:_,size:t=e.ToggleSizes.Medium,icon:g="",toggleState:i=e.ToggleStates.Icon,description:c=""})=>{var h,u;const E=T.useSpring({backgroundColor:s?"#4BD763":"#cccccc"}),[S,b]=T.useSpring(()=>({x:0}));b.start({x:s?26:0});const[m,l]=x.useState(!1),[G,a]=C.useMeasure();return o.jsxs(n.Container,{className:r.toggleContainer,tabIndex:1,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onClick:()=>_(d=>!d),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:r.toggleBg,style:{width:e.TOGGLE_SIZE[t].bg.w,height:e.TOGGLE_SIZE[t].bg.h}})}),o.jsx(n.Container,{style:{position:"relative",...S},children:o.jsxs(n.Container,{className:r.toggleThumb,ref:G,style:{width:e.TOGGLE_SIZE[t].thumb.w,height:e.TOGGLE_SIZE[t].thumb.h},children:[c!==""&&o.jsx(w.LabelText,{labelName:c,hover:m,offsetX:a.width/2,y:a.height+5}),g!==""&&o.jsx(I.UIcon,{name:i===e.ToggleStates.Icon?g:e.TOGGLE_STATE_ICON[i],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=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ToggleSwitch-D6ltRmPy.cjs");exports.ToggleSwitch=e.ToggleSwitch;
@@ -1,100 +1,4 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
- import { u as p } from "../react-spring_web.modern-DgQDaJ06.js";
3
- import { C as n } from "../component-C1Gs4nVu.js";
4
- import { U as y } from "../UIcon-BHzbeYWw.js";
5
- import { L as v } from "../LabelText-D7QIWtWj.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", r = {
10
- toggleContainer: L,
11
- toggleBg: N,
12
- toggleThumb: G
13
- }, X = ({
14
- isTrue: s,
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 d = p({
23
- backgroundColor: s ? "#4BD763" : "#cccccc"
24
- // position: "relative",
25
- // config: {
26
- // duration: 150,
27
- // }
28
- }), [T, _] = p(() => ({
29
- x: 0
30
- // config: {
31
- // duration: 50,
32
- // }
33
- }));
34
- _.start({
35
- x: s ? 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: r.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: { ...d, position: "relative" }, children: /* @__PURE__ */ e(
55
- n,
56
- {
57
- className: r.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", ...T }, children: /* @__PURE__ */ u(
65
- n,
66
- {
67
- className: r.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
- };
1
+ import { T as g } from "../ToggleSwitch-BNAk1Wp6.js";
98
2
  export {
99
- X as ToggleSwitch
3
+ g as ToggleSwitch
100
4
  };
@@ -1,5 +1,5 @@
1
1
  import { C as r } from "./generics-D33J7ILI.js";
2
- import { R as c, d as n, S as i, b as d, C as a, B as S, a as g } from "./generics-C-WSPclF.js";
2
+ import { R as c, d as n, S as i, C as a, B as S, a as g, b as d } from "./generics-C-WSPclF.js";
3
3
  import { S as o } from "./generics-BrMr2-Gs.js";
4
4
  var z = /* @__PURE__ */ ((e) => (e[e.Left = 1] = "Left", e[e.Right = 2] = "Right", e))(z || {}), l = /* @__PURE__ */ ((e) => (e.Button = "button", e.Submit = "submit", e.Reset = "reset", e))(l || {}), b = /* @__PURE__ */ ((e) => (e[e.Size1 = 1] = "Size1", e[e.Size2 = 2] = "Size2", e[e.Size3 = 3] = "Size3", e[e.Size4 = 4] = "Size4", e[e.Size5 = 5] = "Size5", e))(b || {});
5
5
  const O = {
package/dist/types.mjs CHANGED
@@ -9,7 +9,7 @@ import { B as QS, T as $S, a as Ss } from "./types-BuixDDod.js";
9
9
  import { T as as, a as _s } from "./types-DmnAtXuW.js";
10
10
  import { A as Ts, a as As, b as es, c as os, d as ts, e as Ls } from "./types-34thzuQ5.js";
11
11
  import { A as Os, a as Is } from "./types-OOX58qQg.js";
12
- import { B as rs, a as is, b as ns, e as Ds, f as Bs, g as ls, h as Gs, i as Ns, j as ps, k as xs, l as Fs } from "./types-BNUi2DUD.js";
12
+ import { B as rs, a as is, b as ns, e as Ds, f as Bs, g as ls, h as Gs, i as Ns, j as ps, k as xs, l as Fs } from "./types-xFemYgmc.js";
13
13
  import { C as Ps, a as ds, b as fs, c as Ms } from "./types-BWsKfOhf.js";
14
14
  import { T as us, a as cs } from "./types-BXyuQRbv.js";
15
15
  import { M as zs } from "./types-Dyu7oUOO.js";
package/package.json CHANGED
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "name": "@functionalui/functionalui",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
+ "main": "./dist/main.cjs",
9
+ "module": "./dist/main.mjs",
10
+ "types": "./dist/lib/main.d.ts",
8
11
  "exports": {
12
+ ".": {
13
+ "types": "./dist/lib/main.d.ts",
14
+ "import": "./dist/main.mjs",
15
+ "require": "./dist/main.cjs"
16
+ },
9
17
  "./admonition": {
10
18
  "types": "./dist/lib/entries/admonition/index.d.ts",
11
19
  "import": "./dist/admonition/index.mjs",