@functionalui/functionalui 0.1.8 → 0.2.3
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/Avatar-BK9MFMsZ.cjs +1 -0
- package/dist/Avatar-CQA0mEVW.js +118 -0
- package/dist/Button-CpTXDsI7.js +215 -0
- package/dist/Button-rg5gSHcQ.cjs +1 -0
- package/dist/Checkbox-BHpT6PHl.cjs +1 -0
- package/dist/Checkbox-C29jP71p.js +96 -0
- package/dist/GlobalEventContext-D9ug9s1O.cjs +1 -0
- package/dist/GlobalEventContext-DUmT3Vay.js +49 -0
- package/dist/GlobalEventPortal-BIdCGd-m.cjs +1 -0
- package/dist/GlobalEventPortal-GjfUDr2B.js +17 -0
- package/dist/LabelText-BUslE9cx.cjs +1 -0
- package/dist/LabelText-D7QIWtWj.js +35 -0
- package/dist/Modal-BRIYhcOg.cjs +3 -0
- package/dist/Modal-DXLyt-j4.js +1290 -0
- package/dist/SpringEnterOffsetBy-BVN6rm57.cjs +1 -0
- package/dist/SpringEnterOffsetBy-DMSIQgV3.js +56 -0
- package/dist/TableHeader-BAdYoCbb.cjs +1 -0
- package/dist/TableHeader-Da0XxILB.js +103 -0
- package/dist/TableRow-BlJSvake.js +90 -0
- package/dist/TableRow-Bq58CTbU.cjs +1 -0
- package/dist/TagColor-BYKxfOU6.js +957 -0
- package/dist/TagColor-QGINp77p.cjs +1 -0
- package/dist/UIcon-B5rpDmHC.cjs +1 -0
- package/dist/UIcon-BHzbeYWw.js +245 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/admonition/index.cjs +1 -0
- package/dist/admonition/index.d.ts +27 -0
- package/dist/admonition/index.mjs +88 -0
- package/dist/avatar/index.cjs +1 -0
- package/dist/avatar/index.d.ts +115 -0
- package/dist/avatar/index.mjs +4 -0
- package/dist/avatar-group/index.cjs +1 -0
- package/dist/avatar-group/index.d.ts +120 -0
- package/dist/avatar-group/index.mjs +52 -0
- package/dist/button/index.cjs +1 -0
- package/dist/button/index.d.ts +249 -0
- package/dist/button/index.mjs +4 -0
- package/dist/checkbox/index.cjs +1 -0
- package/dist/checkbox/index.d.ts +32 -0
- package/dist/checkbox/index.mjs +4 -0
- package/dist/checkboxes/index.cjs +1 -0
- package/dist/checkboxes/index.d.ts +38 -0
- package/dist/checkboxes/index.mjs +80 -0
- package/dist/chip/index.cjs +1 -0
- package/dist/chip/index.d.ts +159 -0
- package/dist/chip/index.mjs +132 -0
- package/dist/classes-CBD1K4L1.js +779 -0
- package/dist/classes-CVxy1f4M.js +137 -0
- package/dist/classes-CtwIjJdw.cjs +1 -0
- package/dist/classes-HsjFV5aN.cjs +1 -0
- package/dist/color-picker/index.cjs +1 -0
- package/dist/color-picker/index.d.ts +14 -0
- package/dist/color-picker/index.mjs +234 -0
- package/dist/component-B1mkowwk.cjs +1 -0
- package/dist/component-B6F6g6i4.cjs +1 -0
- package/dist/component-BbvCmqLI.cjs +1 -0
- package/dist/component-Bh3EPTN0.cjs +1 -0
- package/dist/component-BvHdlcdE.js +9 -0
- package/dist/component-C1Gs4nVu.js +55 -0
- package/dist/component-CBIQe7z5.js +29 -0
- package/dist/component-CW2JPBAq.js +59 -0
- package/dist/component-D-EEi7NI.cjs +1 -0
- package/dist/component-D0wwK4KY.js +9 -0
- package/dist/component-D5nxKQnT.js +55 -0
- package/dist/component-D92LT0Mq.cjs +1 -0
- package/dist/component-DCHO9d6d.js +55 -0
- package/dist/component-DRXQXr2G.js +36 -0
- package/dist/component-D_igOAz3.cjs +1 -0
- package/dist/component-DdQu0mLI.js +31 -0
- package/dist/component-FS_2VwVz.cjs +1 -0
- package/dist/component-JigdcRMd.cjs +1 -0
- package/dist/container/index.cjs +1 -0
- package/dist/container/index.d.ts +238 -0
- package/dist/container/index.mjs +4 -0
- package/dist/contexts/notifications/index.cjs +1 -0
- package/dist/contexts/notifications/index.d.ts +2 -0
- package/dist/contexts/notifications/index.mjs +6 -0
- package/dist/contexts/ui/index.cjs +1 -0
- package/dist/contexts/ui/index.d.ts +2 -0
- package/dist/contexts/ui/index.mjs +35 -0
- package/dist/createTextElement-Cgrvdwvh.js +32 -0
- package/dist/createTextElement-DITFvK9p.cjs +1 -0
- package/dist/css/index.cjs +1 -0
- package/dist/css/index.css +1 -0
- package/dist/css/index.d.ts +1 -0
- package/dist/css/index.mjs +1 -0
- package/dist/div-measure/index.cjs +1 -0
- package/dist/div-measure/index.d.ts +13 -0
- package/dist/div-measure/index.mjs +26 -0
- package/dist/feather-sprite.svg +1 -0
- package/dist/gallery-modal/index.cjs +1 -0
- package/dist/gallery-modal/index.d.ts +11 -0
- package/dist/gallery-modal/index.mjs +464 -0
- package/dist/generics-9F1CmKPb.cjs +1 -0
- package/dist/generics-BrMr2-Gs.js +5 -0
- package/dist/generics-C-WSPclF.js +19 -0
- package/dist/generics-D33J7ILI.js +5 -0
- package/dist/generics-DE1oV0MV.cjs +1 -0
- package/dist/generics-nyvJhwQE.cjs +1 -0
- package/dist/global-event-portal/index.cjs +1 -0
- package/dist/global-event-portal/index.d.ts +8 -0
- package/dist/global-event-portal/index.mjs +4 -0
- package/dist/icons/index.cjs +1 -0
- package/dist/icons/index.d.ts +457 -0
- package/dist/icons/index.mjs +5 -0
- package/dist/icons-B8R1UT86.js +147 -0
- package/dist/icons-DSpaHhtT.cjs +1 -0
- package/dist/input-image/index.cjs +1 -0
- package/dist/input-image/index.d.ts +18 -0
- package/dist/input-image/index.mjs +106 -0
- package/dist/input-text/index.cjs +1 -0
- package/dist/input-text/index.d.ts +199 -0
- package/dist/input-text/index.mjs +246 -0
- package/dist/inset-group/index.cjs +1 -0
- package/dist/inset-group/index.d.ts +33 -0
- package/dist/inset-group/index.mjs +105 -0
- package/dist/label-text/index.cjs +1 -0
- package/dist/label-text/index.d.ts +11 -0
- package/dist/label-text/index.mjs +4 -0
- package/dist/layout/index.cjs +1 -0
- package/dist/layout/index.d.ts +163 -0
- package/dist/layout/index.mjs +4 -0
- package/dist/loading-spinner/index.cjs +1 -0
- package/dist/loading-spinner/index.d.ts +33 -0
- package/dist/loading-spinner/index.mjs +101 -0
- package/dist/modal/index.cjs +1 -0
- package/dist/modal/index.d.ts +105 -0
- package/dist/modal/index.mjs +4 -0
- package/dist/notification-system/index.cjs +1 -0
- package/dist/notification-system/index.d.ts +5 -0
- package/dist/notification-system/index.mjs +158 -0
- package/dist/portals/index.cjs +1 -0
- package/dist/portals/index.d.ts +10 -0
- package/dist/portals/index.mjs +4 -0
- package/dist/radio/index.cjs +1 -0
- package/dist/radio/index.d.ts +36 -0
- package/dist/radio/index.mjs +121 -0
- package/dist/react-spring_web.modern-DgQDaJ06.js +2304 -0
- package/dist/react-spring_web.modern-W3Nkoq_6.cjs +1 -0
- package/dist/select-spring/index.cjs +1 -0
- package/dist/select-spring/index.d.ts +70 -0
- package/dist/select-spring/index.mjs +471 -0
- package/dist/spring-enter/index.cjs +1 -0
- package/dist/spring-enter/index.d.ts +16 -0
- package/dist/spring-enter/index.mjs +45 -0
- package/dist/spring-enter-offset-by/index.cjs +1 -0
- package/dist/spring-enter-offset-by/index.d.ts +17 -0
- package/dist/spring-enter-offset-by/index.mjs +5 -0
- package/dist/spring-menu-transition/index.cjs +1 -0
- package/dist/spring-menu-transition/index.d.ts +15 -0
- package/dist/spring-menu-transition/index.mjs +43 -0
- package/dist/spring-open-close-height/index.cjs +1 -0
- package/dist/spring-open-close-height/index.d.ts +9 -0
- package/dist/spring-open-close-height/index.mjs +19 -0
- package/dist/styled/button/index.cjs +1 -0
- package/dist/styled/button/index.d.ts +2 -0
- package/dist/styled/button/index.mjs +4 -0
- package/dist/styled/inputs/text/index.cjs +1 -0
- package/dist/styled/inputs/text/index.d.ts +2 -0
- package/dist/styled/inputs/text/index.mjs +4 -0
- package/dist/styled/inputs/text-area/index.cjs +1 -0
- package/dist/styled/inputs/text-area/index.d.ts +2 -0
- package/dist/styled/inputs/text-area/index.mjs +4 -0
- package/dist/styled/li/index.cjs +1 -0
- package/dist/styled/li/index.d.ts +2 -0
- package/dist/styled/li/index.mjs +4 -0
- package/dist/styled/ul/index.cjs +1 -0
- package/dist/styled/ul/index.d.ts +2 -0
- package/dist/styled/ul/index.mjs +4 -0
- package/dist/table-grid/index.cjs +1 -0
- package/dist/table-grid/index.d.ts +70 -0
- package/dist/table-grid/index.mjs +49 -0
- package/dist/table-header/index.cjs +1 -0
- package/dist/table-header/index.d.ts +53 -0
- package/dist/table-header/index.mjs +4 -0
- package/dist/table-row/index.cjs +1 -0
- package/dist/table-row/index.d.ts +54 -0
- package/dist/table-row/index.mjs +4 -0
- package/dist/tabs/index.cjs +1 -0
- package/dist/tabs/index.d.ts +21 -0
- package/dist/tabs/index.mjs +134 -0
- package/dist/tag-color/index.cjs +1 -0
- package/dist/tag-color/index.d.ts +104 -0
- package/dist/tag-color/index.mjs +4 -0
- package/dist/text-area/index.cjs +1 -0
- package/dist/text-area/index.d.ts +212 -0
- package/dist/text-area/index.mjs +160 -0
- package/dist/texts/header/index.cjs +1 -0
- package/dist/texts/header/index.d.ts +2 -0
- package/dist/texts/header/index.mjs +28 -0
- package/dist/texts/p/index.cjs +1 -0
- package/dist/texts/p/index.d.ts +2 -0
- package/dist/texts/p/index.mjs +4 -0
- package/dist/texts/span/index.cjs +1 -0
- package/dist/texts/span/index.d.ts +2 -0
- package/dist/texts/span/index.mjs +4 -0
- package/dist/toggle-switch/index.cjs +1 -0
- package/dist/toggle-switch/index.d.ts +35 -0
- package/dist/toggle-switch/index.mjs +100 -0
- package/dist/types-34thzuQ5.js +134 -0
- package/dist/types-B3Ew5Ber.cjs +1 -0
- package/dist/types-B6XaG3V2.js +65 -0
- package/dist/types-BL1gBa8J.cjs +1 -0
- package/dist/types-BNUi2DUD.js +234 -0
- package/dist/types-BWsKfOhf.js +76 -0
- package/dist/types-BXyuQRbv.js +52 -0
- package/dist/types-BciByhvn.cjs +1 -0
- package/dist/types-BhBb436R.cjs +1 -0
- package/dist/types-Bh_j-nXM.js +168 -0
- package/dist/types-BnEsY_pc.cjs +1 -0
- package/dist/types-BuixDDod.js +12 -0
- package/dist/types-BzOxElrp.cjs +1 -0
- package/dist/types-CQP0_A_u.cjs +1 -0
- package/dist/types-Cev70RJC.cjs +1 -0
- package/dist/types-Cj8dOa0j.cjs +1 -0
- package/dist/types-CyVpnRmY.cjs +1 -0
- package/dist/types-DDcRx4Wz.cjs +1 -0
- package/dist/types-DNLw5jE2.js +151 -0
- package/dist/types-DZ_qlO_d.cjs +1 -0
- package/dist/types-DamZRbFt.js +4 -0
- package/dist/types-DevrYOgX.cjs +1 -0
- package/dist/types-DgSz2H9f.js +14 -0
- package/dist/types-DmnAtXuW.js +17 -0
- package/dist/types-Dyu7oUOO.js +4 -0
- package/dist/types-OOX58qQg.js +17 -0
- package/dist/types.cjs +1 -0
- package/dist/types.d.ts +2062 -0
- package/dist/types.mjs +177 -0
- package/dist/useClickOutsideDOM-CBmttEFU.js +16 -0
- package/dist/useClickOutsideDOM-Dd6ewH8B.cjs +1 -0
- package/dist/useCombinedRef-COuiqHjO.js +14 -0
- package/dist/useCombinedRef-DZxHQ7PL.cjs +1 -0
- package/dist/values-B5r2bYNJ.js +75 -0
- package/dist/values-C40_Fyfk.cjs +1 -0
- package/dist/values-CSE3dLnv.js +200 -0
- package/dist/values-D-Y_dNaF.cjs +1 -0
- package/dist/web-B_p0FWHf.js +132 -0
- package/dist/web-yC_cLoAC.cjs +1 -0
- package/package.json +372 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../TagColor-QGINp77p.cjs");exports.TagColor=o.TagColor;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
declare enum ColorPalettes {
|
|
4
|
+
Transparent = 1,// (0, 1)
|
|
5
|
+
Grey1 = 2,
|
|
6
|
+
Grey2 = 3,
|
|
7
|
+
Grey3 = 4,
|
|
8
|
+
Grey4 = 5,
|
|
9
|
+
Grey5 = 6,
|
|
10
|
+
Grey6 = 7,
|
|
11
|
+
Grey7 = 8,
|
|
12
|
+
Grey8 = 9,
|
|
13
|
+
Grey9 = 10,
|
|
14
|
+
Grey10 = 11,// (2, 11)
|
|
15
|
+
Primary1 = 12,
|
|
16
|
+
Primary2 = 13,
|
|
17
|
+
Primary3 = 14,
|
|
18
|
+
Primary4 = 15,
|
|
19
|
+
Primary5 = 16,
|
|
20
|
+
Primary6 = 17,
|
|
21
|
+
Primary7 = 18,
|
|
22
|
+
Primary8 = 19,
|
|
23
|
+
Primary9 = 20,// (12, 20)
|
|
24
|
+
Secondary1 = 21,
|
|
25
|
+
Secondary2 = 22,
|
|
26
|
+
Secondary3 = 23,
|
|
27
|
+
Secondary4 = 24,
|
|
28
|
+
Secondary5 = 25,
|
|
29
|
+
Secondary6 = 26,
|
|
30
|
+
Secondary7 = 27,
|
|
31
|
+
Secondary8 = 28,
|
|
32
|
+
Secondary9 = 29,// (21, 29)
|
|
33
|
+
Red1 = 30,
|
|
34
|
+
Red2 = 31,
|
|
35
|
+
Red3 = 32,
|
|
36
|
+
Red4 = 33,
|
|
37
|
+
Red5 = 34,
|
|
38
|
+
Red6 = 35,
|
|
39
|
+
Red7 = 36,
|
|
40
|
+
Red8 = 37,
|
|
41
|
+
Red9 = 38,// (30, 38)
|
|
42
|
+
Green1 = 39,
|
|
43
|
+
Green2 = 40,
|
|
44
|
+
Green3 = 41,
|
|
45
|
+
Green4 = 42,
|
|
46
|
+
Green5 = 43,
|
|
47
|
+
Green6 = 44,
|
|
48
|
+
Green7 = 45,
|
|
49
|
+
Green8 = 46,
|
|
50
|
+
Green9 = 47,// (39, 47)
|
|
51
|
+
Blue1 = 48,
|
|
52
|
+
Blue2 = 49,
|
|
53
|
+
Blue3 = 50,
|
|
54
|
+
Blue4 = 51,
|
|
55
|
+
Blue5 = 52,
|
|
56
|
+
Blue6 = 53,
|
|
57
|
+
Blue7 = 54,
|
|
58
|
+
Blue8 = 55,
|
|
59
|
+
Blue9 = 56,// (48, 56)
|
|
60
|
+
Yellow1 = 57,
|
|
61
|
+
Yellow2 = 58,
|
|
62
|
+
Yellow3 = 59,
|
|
63
|
+
Yellow4 = 60,
|
|
64
|
+
Yellow5 = 61,
|
|
65
|
+
Yellow6 = 62,
|
|
66
|
+
Yellow7 = 63,
|
|
67
|
+
Yellow8 = 64,
|
|
68
|
+
Yellow9 = 65,// (57, 65)
|
|
69
|
+
Accent1_1 = 66,
|
|
70
|
+
Accent1_2 = 67,
|
|
71
|
+
Accent1_3 = 68,
|
|
72
|
+
Accent1_4 = 69,
|
|
73
|
+
Accent1_5 = 70,
|
|
74
|
+
Accent1_6 = 71,
|
|
75
|
+
Accent1_7 = 72,
|
|
76
|
+
Accent1_8 = 73,
|
|
77
|
+
Accent1_9 = 74,// (57, 65)
|
|
78
|
+
Accent2_1 = 75,
|
|
79
|
+
Accent2_2 = 76,
|
|
80
|
+
Accent2_3 = 77,
|
|
81
|
+
Accent2_4 = 78,
|
|
82
|
+
Accent2_5 = 79,
|
|
83
|
+
Accent2_6 = 80,
|
|
84
|
+
Accent2_7 = 81,
|
|
85
|
+
Accent2_8 = 82,
|
|
86
|
+
Accent2_9 = 83
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare interface P {
|
|
90
|
+
size: TagColorSizes;
|
|
91
|
+
color?: ColorPalettes | string;
|
|
92
|
+
text?: string | number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare const TagColor: FC<P>;
|
|
96
|
+
|
|
97
|
+
declare enum TagColorSizes {
|
|
98
|
+
Small = 1,
|
|
99
|
+
Medium = 2,
|
|
100
|
+
Big = 3,
|
|
101
|
+
Large = 4
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { }
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { AnimatedProps } from '@react-spring/web';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { Ref } from 'react';
|
|
6
|
+
|
|
7
|
+
declare enum ColorPalettes {
|
|
8
|
+
Transparent = 1,// (0, 1)
|
|
9
|
+
Grey1 = 2,
|
|
10
|
+
Grey2 = 3,
|
|
11
|
+
Grey3 = 4,
|
|
12
|
+
Grey4 = 5,
|
|
13
|
+
Grey5 = 6,
|
|
14
|
+
Grey6 = 7,
|
|
15
|
+
Grey7 = 8,
|
|
16
|
+
Grey8 = 9,
|
|
17
|
+
Grey9 = 10,
|
|
18
|
+
Grey10 = 11,// (2, 11)
|
|
19
|
+
Primary1 = 12,
|
|
20
|
+
Primary2 = 13,
|
|
21
|
+
Primary3 = 14,
|
|
22
|
+
Primary4 = 15,
|
|
23
|
+
Primary5 = 16,
|
|
24
|
+
Primary6 = 17,
|
|
25
|
+
Primary7 = 18,
|
|
26
|
+
Primary8 = 19,
|
|
27
|
+
Primary9 = 20,// (12, 20)
|
|
28
|
+
Secondary1 = 21,
|
|
29
|
+
Secondary2 = 22,
|
|
30
|
+
Secondary3 = 23,
|
|
31
|
+
Secondary4 = 24,
|
|
32
|
+
Secondary5 = 25,
|
|
33
|
+
Secondary6 = 26,
|
|
34
|
+
Secondary7 = 27,
|
|
35
|
+
Secondary8 = 28,
|
|
36
|
+
Secondary9 = 29,// (21, 29)
|
|
37
|
+
Red1 = 30,
|
|
38
|
+
Red2 = 31,
|
|
39
|
+
Red3 = 32,
|
|
40
|
+
Red4 = 33,
|
|
41
|
+
Red5 = 34,
|
|
42
|
+
Red6 = 35,
|
|
43
|
+
Red7 = 36,
|
|
44
|
+
Red8 = 37,
|
|
45
|
+
Red9 = 38,// (30, 38)
|
|
46
|
+
Green1 = 39,
|
|
47
|
+
Green2 = 40,
|
|
48
|
+
Green3 = 41,
|
|
49
|
+
Green4 = 42,
|
|
50
|
+
Green5 = 43,
|
|
51
|
+
Green6 = 44,
|
|
52
|
+
Green7 = 45,
|
|
53
|
+
Green8 = 46,
|
|
54
|
+
Green9 = 47,// (39, 47)
|
|
55
|
+
Blue1 = 48,
|
|
56
|
+
Blue2 = 49,
|
|
57
|
+
Blue3 = 50,
|
|
58
|
+
Blue4 = 51,
|
|
59
|
+
Blue5 = 52,
|
|
60
|
+
Blue6 = 53,
|
|
61
|
+
Blue7 = 54,
|
|
62
|
+
Blue8 = 55,
|
|
63
|
+
Blue9 = 56,// (48, 56)
|
|
64
|
+
Yellow1 = 57,
|
|
65
|
+
Yellow2 = 58,
|
|
66
|
+
Yellow3 = 59,
|
|
67
|
+
Yellow4 = 60,
|
|
68
|
+
Yellow5 = 61,
|
|
69
|
+
Yellow6 = 62,
|
|
70
|
+
Yellow7 = 63,
|
|
71
|
+
Yellow8 = 64,
|
|
72
|
+
Yellow9 = 65,// (57, 65)
|
|
73
|
+
Accent1_1 = 66,
|
|
74
|
+
Accent1_2 = 67,
|
|
75
|
+
Accent1_3 = 68,
|
|
76
|
+
Accent1_4 = 69,
|
|
77
|
+
Accent1_5 = 70,
|
|
78
|
+
Accent1_6 = 71,
|
|
79
|
+
Accent1_7 = 72,
|
|
80
|
+
Accent1_8 = 73,
|
|
81
|
+
Accent1_9 = 74,// (57, 65)
|
|
82
|
+
Accent2_1 = 75,
|
|
83
|
+
Accent2_2 = 76,
|
|
84
|
+
Accent2_3 = 77,
|
|
85
|
+
Accent2_4 = 78,
|
|
86
|
+
Accent2_5 = 79,
|
|
87
|
+
Accent2_6 = 80,
|
|
88
|
+
Accent2_7 = 81,
|
|
89
|
+
Accent2_8 = 82,
|
|
90
|
+
Accent2_9 = 83
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare enum Cursors {
|
|
94
|
+
Auto = 1,
|
|
95
|
+
Default = 2,
|
|
96
|
+
Pointer = 3,
|
|
97
|
+
ContextMenu = 4,
|
|
98
|
+
Help = 5,
|
|
99
|
+
Progress = 6,
|
|
100
|
+
Wait = 7,
|
|
101
|
+
Cell = 8,
|
|
102
|
+
Crosshair = 9,
|
|
103
|
+
Text = 10,
|
|
104
|
+
VerticalText = 11,
|
|
105
|
+
Alias = 12,
|
|
106
|
+
Copy = 13,
|
|
107
|
+
Move = 14,
|
|
108
|
+
NoDrop = 15,
|
|
109
|
+
NotAllowed = 16,
|
|
110
|
+
Grab = 17,
|
|
111
|
+
Grabbing = 18,
|
|
112
|
+
ZoomIn = 19,
|
|
113
|
+
ZoomOut = 20
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare enum ElementResizes {
|
|
117
|
+
None = 1,
|
|
118
|
+
Both = 2,
|
|
119
|
+
Horizontal = 3,
|
|
120
|
+
Vertical = 4
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export declare const F__TextArea: FC<TextAreaProps>;
|
|
124
|
+
|
|
125
|
+
declare enum FontFamilies {
|
|
126
|
+
Default = 1
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare enum FontSizes {
|
|
130
|
+
Size1 = 1,
|
|
131
|
+
Size2 = 2,
|
|
132
|
+
Size3 = 3,
|
|
133
|
+
Size4 = 4,
|
|
134
|
+
Size5 = 5,
|
|
135
|
+
Size6 = 6,
|
|
136
|
+
Size7 = 7,
|
|
137
|
+
Size8 = 8,
|
|
138
|
+
Size9 = 9,
|
|
139
|
+
Size10 = 10
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
declare enum FontStyles {
|
|
143
|
+
Normal = 1,
|
|
144
|
+
Italic = 2
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare enum FontWeights {
|
|
148
|
+
Size1 = 1,
|
|
149
|
+
Size2 = 2,
|
|
150
|
+
Size3 = 3,
|
|
151
|
+
Size4 = 4,
|
|
152
|
+
Size5 = 5,
|
|
153
|
+
Size6 = 6
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare enum OutlineStyles {
|
|
157
|
+
None = 1,
|
|
158
|
+
Solid = 2,
|
|
159
|
+
Inset = 3,
|
|
160
|
+
Outset = 4,
|
|
161
|
+
Dotted = 5,
|
|
162
|
+
Dashed = 6,
|
|
163
|
+
Double = 7,
|
|
164
|
+
Auto = 8
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare enum TextAligns {
|
|
168
|
+
Start = 1,
|
|
169
|
+
End = 2,
|
|
170
|
+
Center = 3,
|
|
171
|
+
Justify = 4
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
declare interface TextAreaProp {
|
|
175
|
+
type?: string;
|
|
176
|
+
required?: boolean | undefined;
|
|
177
|
+
disabled?: boolean | undefined;
|
|
178
|
+
placeholder?: string | undefined;
|
|
179
|
+
name?: string;
|
|
180
|
+
value?: any | undefined;
|
|
181
|
+
min?: number | undefined;
|
|
182
|
+
step?: number | undefined;
|
|
183
|
+
rows?: number | undefined;
|
|
184
|
+
resize?: ElementResizes;
|
|
185
|
+
textOutlineStyle?: OutlineStyles;
|
|
186
|
+
textAreaStyle?: TextAreaStyles;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare interface TextAreaProps extends AnimatedProps<HTMLAttributes<HTMLTextAreaElement>>, TextStyleProps, TextAreaProp {
|
|
190
|
+
children?: ReactNode;
|
|
191
|
+
ref?: Ref<HTMLTextAreaElement> | undefined;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
declare enum TextAreaStyles {
|
|
195
|
+
Default = 1,// outline
|
|
196
|
+
Outlined = 2,// outline overall
|
|
197
|
+
Filled = 3,// border bottom & bg color
|
|
198
|
+
BorderBottom = 4,
|
|
199
|
+
Transparent = 5
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare interface TextStyleProps {
|
|
203
|
+
paletteColor?: ColorPalettes;
|
|
204
|
+
fontSize?: FontSizes;
|
|
205
|
+
fontFamily?: FontFamilies;
|
|
206
|
+
fontWeight?: FontWeights;
|
|
207
|
+
fontStyle?: FontStyles;
|
|
208
|
+
textAlign?: TextAligns;
|
|
209
|
+
cursor?: Cursors;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export { }
|
|
@@ -0,0 +1,160 @@
|
|
|
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
|
+
};
|
|
158
|
+
export {
|
|
159
|
+
dt as TextArea
|
|
160
|
+
};
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +1,28 @@
|
|
|
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();
|
|
26
|
+
export {
|
|
27
|
+
H as Text_Header
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../component-JigdcRMd.cjs");exports.Text_P=e.Text_P;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../component-Bh3EPTN0.cjs");exports.Text_Span=e.Text_Span;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* colors bg
|
|
5
|
+
* icons -- loading
|
|
6
|
+
*/
|
|
7
|
+
declare type Props = {
|
|
8
|
+
isTrue: boolean;
|
|
9
|
+
setIsTrue: (a: any) => void;
|
|
10
|
+
size?: ToggleSizes;
|
|
11
|
+
icon?: string;
|
|
12
|
+
toggleState?: ToggleStates;
|
|
13
|
+
description?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare enum ToggleSizes {
|
|
17
|
+
Tiny = 1,
|
|
18
|
+
Smaller = 2,
|
|
19
|
+
Small = 3,
|
|
20
|
+
Medium = 4,
|
|
21
|
+
Big = 5,
|
|
22
|
+
Large = 6
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare enum ToggleStates {
|
|
26
|
+
Icon = 1,
|
|
27
|
+
Loading = 2,
|
|
28
|
+
Success = 3,
|
|
29
|
+
Error = 4,
|
|
30
|
+
Disabled = 5
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export declare const ToggleSwitch: ({ isTrue, setIsTrue, size, icon, toggleState, description, }: Props) => JSX.Element;
|
|
34
|
+
|
|
35
|
+
export { }
|
|
@@ -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-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
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
X as ToggleSwitch
|
|
100
|
+
};
|