@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.
Files changed (140) 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/lib/styles/types/types.d.ts +12 -12
  98. package/dist/loading-spinner/index.cjs +1 -1
  99. package/dist/loading-spinner/index.mjs +3 -98
  100. package/dist/main.cjs +1 -0
  101. package/dist/main.mjs +95 -0
  102. package/dist/modal/index.mjs +1 -1
  103. package/dist/notification-system/index.cjs +1 -1
  104. package/dist/notification-system/index.mjs +2 -155
  105. package/dist/radio/index.cjs +1 -1
  106. package/dist/radio/index.mjs +2 -118
  107. package/dist/{react-spring_web.modern-DgQDaJ06.js → react-spring_web.modern-DUf5COpz.js} +3 -3
  108. package/dist/select-spring/index.cjs +1 -1
  109. package/dist/select-spring/index.mjs +2 -468
  110. package/dist/spring-enter/index.cjs +1 -1
  111. package/dist/spring-enter/index.mjs +2 -42
  112. package/dist/spring-enter-offset-by/index.mjs +1 -1
  113. package/dist/spring-menu-transition/index.cjs +1 -1
  114. package/dist/spring-menu-transition/index.mjs +2 -40
  115. package/dist/spring-open-close-height/index.cjs +1 -1
  116. package/dist/spring-open-close-height/index.mjs +2 -16
  117. package/dist/styled/button/index.mjs +1 -1
  118. package/dist/styled/inputs/text/index.mjs +1 -1
  119. package/dist/styled/inputs/text-area/index.mjs +1 -1
  120. package/dist/styled/li/index.mjs +1 -1
  121. package/dist/styled/ul/index.mjs +1 -1
  122. package/dist/table-grid/index.cjs +1 -1
  123. package/dist/table-grid/index.mjs +2 -46
  124. package/dist/table-header/index.mjs +1 -1
  125. package/dist/table-row/index.mjs +1 -1
  126. package/dist/tabs/index.cjs +1 -1
  127. package/dist/tabs/index.mjs +2 -132
  128. package/dist/tag-color/index.mjs +1 -1
  129. package/dist/text-area/index.cjs +1 -1
  130. package/dist/text-area/index.mjs +2 -157
  131. package/dist/texts/header/index.cjs +1 -1
  132. package/dist/texts/header/index.mjs +2 -26
  133. package/dist/texts/p/index.mjs +1 -1
  134. package/dist/texts/span/index.mjs +1 -1
  135. package/dist/toggle-switch/index.cjs +1 -1
  136. package/dist/toggle-switch/index.mjs +2 -98
  137. package/dist/{types-BNUi2DUD.js → types-xFemYgmc.js} +1 -1
  138. package/dist/types.cjs +1 -1
  139. package/dist/types.mjs +33 -33
  140. package/package.json +9 -1
@@ -1,88 +1,4 @@
1
- import { jsx as i, jsxs as e } from "react/jsx-runtime";
2
- import { C as d } from "../component-C1Gs4nVu.js";
3
- import { L as p } from "../component-DRXQXr2G.js";
4
- import { T as l } from "../component-D0wwK4KY.js";
5
- import { T as m } from "../component-BvHdlcdE.js";
6
- import { U as f } from "../UIcon-BHzbeYWw.js";
7
- import { a as c, R as s } from "../generics-C-WSPclF.js";
8
- import { h, j as x, b as C } from "../classes-CVxy1f4M.js";
9
- import { a, A as o, b as S, d as L, e as R } from "../types-34thzuQ5.js";
10
- const j = ({
11
- level: n,
12
- size: t = L.Medium,
13
- descriptionText: g,
14
- children: r
15
- }) => /* @__PURE__ */ i(
16
- d,
17
- {
18
- borderRadius: s.Size4,
19
- borderColor: a[n].borderColor,
20
- borderWidth: c.Size2,
21
- bgColor: a[n].bgColor,
22
- style: { width: "max-content" },
23
- children: /* @__PURE__ */ e(p, { children: [
24
- /* @__PURE__ */ i(
25
- d,
26
- {
27
- padding: o[t].title.padding,
28
- paddingBottom: o[t].title.paddingBottom,
29
- paddingLeft: o[t].title.paddingLeft,
30
- paddingRight: o[t].title.paddingRight,
31
- children: /* @__PURE__ */ e(
32
- p,
33
- {
34
- display: C.Flex,
35
- flexJustifyContent: x.FlexStart,
36
- flexAlignItem: h.Center,
37
- children: [
38
- /* @__PURE__ */ i(
39
- f,
40
- {
41
- name: S[n].titleIcon,
42
- colorLight: a[n].iconColor,
43
- colorDark: a[n].iconColor,
44
- size: o[t].title.iconSize,
45
- withMargin: !1,
46
- borderRadius: void 0,
47
- overflow: ""
48
- }
49
- ),
50
- /* @__PURE__ */ i(d, { marginLeft: o[t].title.iconMargin, children: /* @__PURE__ */ i(
51
- m,
52
- {
53
- fontSize: o[t].title.fontSize,
54
- fontWeight: o[t].title.fontWeight,
55
- children: R[n]
56
- }
57
- ) })
58
- ]
59
- }
60
- )
61
- }
62
- ),
63
- /* @__PURE__ */ i(
64
- d,
65
- {
66
- padding: o[t].content.padding,
67
- paddingTop: o[t].content.paddingTop,
68
- paddingLeft: o[t].content.paddingLeft,
69
- paddingRight: o[t].title.paddingRight,
70
- children: /* @__PURE__ */ i(l, { fontSize: o[t].content.fontSize, children: g })
71
- }
72
- ),
73
- r && /* @__PURE__ */ i(
74
- d,
75
- {
76
- padding: o[t].content.padding,
77
- paddingTop: o[t].content.paddingTop,
78
- paddingLeft: o[t].content.paddingLeft,
79
- paddingRight: o[t].title.paddingRight,
80
- children: r
81
- }
82
- )
83
- ] })
84
- }
85
- );
1
+ import { A as m } from "../Admonition-CReUUZzJ.js";
86
2
  export {
87
- j as Admonition
3
+ m as Admonition
88
4
  };
@@ -1,4 +1,4 @@
1
- import { A as o } from "../Avatar-CQA0mEVW.js";
1
+ import { A as o } from "../Avatar-CkxjB_cU.js";
2
2
  export {
3
3
  o as Avatar
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("../react-spring_web.modern-W3Nkoq_6.cjs"),p=require("../Avatar-BK9MFMsZ.cjs"),y=require("../component-B1mkowwk.cjs"),m=require("../classes-HsjFV5aN.cjs"),g=({avatars:r,border:c,borderColor:u,withHover:a,size:l})=>{const[d,s]=i.useSprings(r.length,n=>({y:0,x:n===0?0:n*-10}),[]);return o.jsx(y.Layout,{display:m.Displays.Flex,children:d.map((n,e)=>o.jsx(i.animated.div,{style:n,onMouseEnter:()=>s.start(t=>{if(t===e)return{y:-5}}),onMouseLeave:()=>s.start(t=>{if(t===e)return{y:0}}),children:o.jsx(p.Avatar,{avatarName:r[e].name,border:c,borderColor:u,onClick:r[e].onClick,isLoading:r[e].isLoading,withHover:a,size:l,children:r[e].children})},e))})};exports.AvatarGroup=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../AvatarGroup-CbohU2rq.cjs");exports.AvatarGroup=r.AvatarGroup;
@@ -1,52 +1,4 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { b as d, a as c } from "../react-spring_web.modern-DgQDaJ06.js";
3
- import { A as u } from "../Avatar-CQA0mEVW.js";
4
- import { L as f } from "../component-DRXQXr2G.js";
5
- import { b as y } from "../classes-CVxy1f4M.js";
6
- const b = ({
7
- avatars: o,
8
- border: i,
9
- borderColor: a,
10
- withHover: m,
11
- size: p
12
- }) => {
13
- const [l, s] = d(
14
- o.length,
15
- (e) => ({
16
- y: 0,
17
- x: e === 0 ? 0 : e * -10
18
- }),
19
- []
20
- );
21
- return /* @__PURE__ */ t(f, { display: y.Flex, children: l.map((e, r) => /* @__PURE__ */ t(
22
- c.div,
23
- {
24
- style: e,
25
- onMouseEnter: () => s.start((n) => {
26
- if (n === r)
27
- return { y: -5 };
28
- }),
29
- onMouseLeave: () => s.start((n) => {
30
- if (n === r)
31
- return { y: 0 };
32
- }),
33
- children: /* @__PURE__ */ t(
34
- u,
35
- {
36
- avatarName: o[r].name,
37
- border: i,
38
- borderColor: a,
39
- onClick: o[r].onClick,
40
- isLoading: o[r].isLoading,
41
- withHover: m,
42
- size: p,
43
- children: o[r].children
44
- }
45
- )
46
- },
47
- r
48
- )) });
49
- };
1
+ import { A as o } from "../AvatarGroup-FpaQP2H4.js";
50
2
  export {
51
- b as AvatarGroup
3
+ o as AvatarGroup
52
4
  };
@@ -1,4 +1,4 @@
1
- import { B as r } from "../Button-CpTXDsI7.js";
1
+ import { B as r } from "../Button-DLwud-g7.js";
2
2
  export {
3
3
  r as Button
4
4
  };
@@ -1,4 +1,4 @@
1
- import { C as r } from "../Checkbox-C29jP71p.js";
1
+ import { C as r } from "../Checkbox-CNpy1wvA.js";
2
2
  export {
3
3
  r as Checkbox
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("../component-D-EEi7NI.cjs"),C=require("../component-B1mkowwk.cjs"),f=require("../component-Bh3EPTN0.cjs"),h=require("../generics-9F1CmKPb.cjs"),l=require("../classes-HsjFV5aN.cjs"),y=require("../types-Cj8dOa0j.cjs"),b=require("react"),j=require("../Checkbox-BHpT6PHl.cjs"),q=({options:n,multiselect:t=!1,checkboxColor:c=y.CheckboxColors.Primary5,size:x,handleClick:r})=>{const i=b.useCallback(e=>{if(t)r(e);else{let o=n.findIndex(u=>u.isChecked===!0),d=n.findIndex(u=>u.id===e);o!==-1&&(d===o||r(n[o].id)),r(e)}},[r,t,n]);return s.jsx(C.Layout,{children:n.map((e,o)=>s.jsx(k,{checkboxColor:c,id:e.id,name:e.name,isChecked:e.isChecked,size:x,value:e==null?void 0:e.value,handleClickBox:i},o))})},k=({id:n,name:t,value:c,isChecked:x,checkboxColor:r,size:i,handleClickBox:e})=>s.jsx(a.Container,{onClick:()=>e(n,c),style:{cursor:"pointer"},children:s.jsxs(C.Layout,{display:l.Displays.Flex,flexJustifyContent:l.FlexJustifyContents.Center,flexAlignItem:l.FlexAlignItems.Center,children:[s.jsx(j.Checkbox,{isChecked:x,checkboxColor:r,size:i}),s.jsx(a.Container,{marginLeft:h.Spacings.Size2,children:s.jsx(f.Text_Span,{children:t})})]})});exports.Checkboxes=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Checkboxes-CQVptWR8.cjs");exports.Checkboxes=e.Checkboxes;
@@ -1,80 +1,4 @@
1
- import { jsx as s, jsxs as C } from "react/jsx-runtime";
2
- import { C as m } from "../component-C1Gs4nVu.js";
3
- import { L as l } from "../component-DRXQXr2G.js";
4
- import { T as d } from "../component-BvHdlcdE.js";
5
- import { S as p } from "../generics-C-WSPclF.js";
6
- import { h, j as u, b } from "../classes-CVxy1f4M.js";
7
- import { b as y } from "../types-BWsKfOhf.js";
8
- import { useCallback as I } from "react";
9
- import { C as k } from "../Checkbox-C29jP71p.js";
10
- const z = ({
11
- options: o,
12
- multiselect: t = !1,
13
- checkboxColor: a = y.Primary5,
14
- size: f,
15
- //= CheckboxSizes.Size1,
16
- handleClick: r
17
- }) => {
18
- const x = I(
19
- (e) => {
20
- if (t)
21
- r(e);
22
- else {
23
- let n = o.findIndex(
24
- (i) => i.isChecked === !0
25
- ), c = o.findIndex((i) => i.id === e);
26
- n !== -1 && (c === n || r(o[n].id)), r(e);
27
- }
28
- },
29
- [r, t, o]
30
- );
31
- return /* @__PURE__ */ s(l, { children: o.map((e, n) => /* @__PURE__ */ s(
32
- g,
33
- {
34
- checkboxColor: a,
35
- id: e.id,
36
- name: e.name,
37
- isChecked: e.isChecked,
38
- size: f,
39
- value: e == null ? void 0 : e.value,
40
- handleClickBox: x
41
- },
42
- n
43
- )) });
44
- }, g = ({
45
- id: o,
46
- name: t,
47
- value: a,
48
- isChecked: f,
49
- checkboxColor: r,
50
- size: x,
51
- handleClickBox: e
52
- }) => /* @__PURE__ */ s(
53
- m,
54
- {
55
- onClick: () => e(o, a),
56
- style: { cursor: "pointer" },
57
- children: /* @__PURE__ */ C(
58
- l,
59
- {
60
- display: b.Flex,
61
- flexJustifyContent: u.Center,
62
- flexAlignItem: h.Center,
63
- children: [
64
- /* @__PURE__ */ s(
65
- k,
66
- {
67
- isChecked: f,
68
- checkboxColor: r,
69
- size: x
70
- }
71
- ),
72
- /* @__PURE__ */ s(m, { marginLeft: p.Size2, children: /* @__PURE__ */ s(d, { children: t }) })
73
- ]
74
- }
75
- )
76
- }
77
- );
1
+ import { C as r } from "../Checkboxes-Cj740f5X.js";
78
2
  export {
79
- z as Checkboxes
3
+ r as Checkboxes
80
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),q=require("../component-D-EEi7NI.cjs"),x=require("../component-B1mkowwk.cjs"),O=require("../component-Bh3EPTN0.cjs"),a=require("../generics-DE1oV0MV.cjs"),t=require("../values-C40_Fyfk.cjs"),o=require("../generics-9F1CmKPb.cjs"),h=require("../classes-HsjFV5aN.cjs");var z=(i=>(i[i.Tiny=1]="Tiny",i[i.Small=2]="Small",i[i.Medium=3]="Medium",i[i.Big=4]="Big",i))(z||{});const d={1:{fontSize:o.FontSizes.Size1,paddingTop:o.Spacings.Size0,paddingBottom:o.Spacings.Size0,paddingLeft:o.Spacings.Size1,paddingRight:o.Spacings.Size1,borderRadius:o.Radiuses.Size7},2:{fontSize:o.FontSizes.Size2,paddingTop:o.Spacings.Size1,paddingBottom:o.Spacings.Size1,paddingLeft:o.Spacings.Size2,paddingRight:o.Spacings.Size2,borderRadius:o.Radiuses.Size7},3:{fontSize:o.FontSizes.Size3,paddingTop:o.Spacings.Size2,paddingBottom:o.Spacings.Size2,paddingLeft:o.Spacings.Size3,paddingRight:o.Spacings.Size3,borderRadius:o.Radiuses.Size7},4:{fontSize:o.FontSizes.Size4,paddingTop:o.Spacings.Size3,paddingBottom:o.Spacings.Size3,paddingLeft:o.Spacings.Size4,paddingRight:o.Spacings.Size4,borderRadius:o.Radiuses.Size7}};var L=(i=>(i[i.Filled=1]="Filled",i[i.Outlined=2]="Outlined",i))(L||{});const r={1:{bgColor:a.ColorPalettes.Primary5,font:{fontColor:a.ColorPalettes.Grey9}},2:{border:{borderColor:a.ColorPalettes.Primary5,borderStyle:o.BorderStyles.Solid,borderWidth:o.BorderWidths.Size2},font:{}}},W=({children:i,chipColor:e=a.ColorSets.Primarys,paddings:T="all",margin:B,marginTop:C,marginBottom:y,marginLeft:P,marginRight:F,fontSize:p,chipStyle:n=L.Filled,size:g=z.Medium})=>{var S,l,c,u,b,f,R,m;return s.jsx(x.Layout,{display:h.Displays.Flex,children:s.jsx(q.Container,{...j(T,g),margin:B,marginTop:C,marginBottom:y,marginLeft:P,marginRight:F,borderRadius:d[g].borderRadius,borderColor:(S=r[n].border)==null?void 0:S.borderColor,borderStyle:(l=r[n].border)==null?void 0:l.borderStyle,borderWidth:(c=r[n].border)==null?void 0:c.borderWidth,style:{backgroundColor:(u=r[n])!=null&&u.bgColor?t.COLOR_VALUES[t.ColorRanges[e][0]+2]:void 0,color:(f=(b=r[n])==null?void 0:b.font)!=null&&f.fontColor?(m=(R=r[n])==null?void 0:R.font)==null?void 0:m.fontColor:t.COLOR_VALUES[t.ColorRanges[e][0]+4]},children:s.jsx(O.Text_Span,{style:{display:"inline-block",transform:"translateY(-1px)",color:"inherit"},fontSize:p||d[g].fontSize,fontWeight:o.FontWeights.Size3,children:i})})})},j=(i,e)=>{switch(i){case"all":return{paddingTop:d[e].paddingTop,paddingBottom:d[e].paddingBottom,paddingLeft:d[e].paddingLeft,paddingRight:d[e].paddingRight};case"left right":return{paddingLeft:d[e].paddingLeft,paddingRight:d[e].paddingRight};default:return{paddingTop:d[e].paddingTop,paddingBottom:d[e].paddingBottom}}};exports.Chip=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Chip-HOh--tbB.cjs");exports.Chip=e.Chip;
@@ -1,132 +1,4 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { C as O } from "../component-C1Gs4nVu.js";
3
- import { L as _ } from "../component-DRXQXr2G.js";
4
- import { T as v } from "../component-BvHdlcdE.js";
5
- import { C as l, a as E } from "../generics-D33J7ILI.js";
6
- import { a as L, c as T } from "../values-CSE3dLnv.js";
7
- import { a as I, B as M, R as e, S as o, d as n, f as k } from "../generics-C-WSPclF.js";
8
- import { b as H } from "../classes-CVxy1f4M.js";
9
- var c = /* @__PURE__ */ ((d) => (d[d.Tiny = 1] = "Tiny", d[d.Small = 2] = "Small", d[d.Medium = 3] = "Medium", d[d.Big = 4] = "Big", d))(c || {});
10
- const i = {
11
- 1: {
12
- fontSize: n.Size1,
13
- paddingTop: o.Size0,
14
- paddingBottom: o.Size0,
15
- paddingLeft: o.Size1,
16
- paddingRight: o.Size1,
17
- borderRadius: e.Size7
18
- },
19
- 2: {
20
- fontSize: n.Size2,
21
- paddingTop: o.Size1,
22
- paddingBottom: o.Size1,
23
- paddingLeft: o.Size2,
24
- paddingRight: o.Size2,
25
- borderRadius: e.Size7
26
- },
27
- 3: {
28
- fontSize: n.Size3,
29
- paddingTop: o.Size2,
30
- paddingBottom: o.Size2,
31
- paddingLeft: o.Size3,
32
- paddingRight: o.Size3,
33
- borderRadius: e.Size7
34
- },
35
- 4: {
36
- fontSize: n.Size4,
37
- paddingTop: o.Size3,
38
- paddingBottom: o.Size3,
39
- paddingLeft: o.Size4,
40
- paddingRight: o.Size4,
41
- borderRadius: e.Size7
42
- }
43
- };
44
- var y = /* @__PURE__ */ ((d) => (d[d.Filled = 1] = "Filled", d[d.Outlined = 2] = "Outlined", d))(y || {});
45
- const a = {
46
- 1: {
47
- bgColor: l.Primary5,
48
- font: {
49
- fontColor: l.Grey9
50
- }
51
- },
52
- 2: {
53
- border: {
54
- borderColor: l.Primary5,
55
- borderStyle: M.Solid,
56
- borderWidth: I.Size2
57
- },
58
- font: {
59
- // fontColor: ColorPalettes.Primary5,
60
- }
61
- }
62
- }, q = ({
63
- children: d,
64
- chipColor: r = E.Primarys,
65
- paddings: C = "all",
66
- margin: P,
67
- marginTop: F,
68
- marginBottom: W,
69
- marginLeft: h,
70
- marginRight: x,
71
- fontSize: f,
72
- // style,
73
- chipStyle: t = y.Filled,
74
- size: g = c.Medium
75
- }) => {
76
- var m, S, s, b, u, R, z, B;
77
- return /* @__PURE__ */ p(_, { display: H.Flex, children: /* @__PURE__ */ p(
78
- O,
79
- {
80
- ...Y(C, g),
81
- margin: P,
82
- marginTop: F,
83
- marginBottom: W,
84
- marginLeft: h,
85
- marginRight: x,
86
- borderRadius: i[g].borderRadius,
87
- borderColor: (m = a[t].border) == null ? void 0 : m.borderColor,
88
- borderStyle: (S = a[t].border) == null ? void 0 : S.borderStyle,
89
- borderWidth: (s = a[t].border) == null ? void 0 : s.borderWidth,
90
- style: {
91
- backgroundColor: (b = a[t]) != null && b.bgColor ? L[T[r][0] + 2] : void 0,
92
- color: (R = (u = a[t]) == null ? void 0 : u.font) != null && R.fontColor ? (B = (z = a[t]) == null ? void 0 : z.font) == null ? void 0 : B.fontColor : L[T[r][0] + 4]
93
- },
94
- children: /* @__PURE__ */ p(
95
- v,
96
- {
97
- style: {
98
- display: "inline-block",
99
- transform: "translateY(-1px)",
100
- color: "inherit"
101
- },
102
- fontSize: f || i[g].fontSize,
103
- fontWeight: k.Size3,
104
- children: d
105
- }
106
- )
107
- }
108
- ) });
109
- }, Y = (d, r) => {
110
- switch (d) {
111
- case "all":
112
- return {
113
- paddingTop: i[r].paddingTop,
114
- paddingBottom: i[r].paddingBottom,
115
- paddingLeft: i[r].paddingLeft,
116
- paddingRight: i[r].paddingRight
117
- };
118
- case "left right":
119
- return {
120
- paddingLeft: i[r].paddingLeft,
121
- paddingRight: i[r].paddingRight
122
- };
123
- default:
124
- return {
125
- paddingTop: i[r].paddingTop,
126
- paddingBottom: i[r].paddingBottom
127
- };
128
- }
129
- };
1
+ import { C as r } from "../Chip-DgSZZTgy.js";
130
2
  export {
131
- q as Chip
3
+ r as Chip
132
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),F=require("../TagColor-QGINp77p.cjs"),X=require("../types-DDcRx4Wz.cjs"),c=require("react"),N=require("../component-D-EEi7NI.cjs"),Y=require("../component-B1mkowwk.cjs"),q=require("../classes-HsjFV5aN.cjs"),A=require("../useClickOutsideDOM-Dd6ewH8B.cjs"),J=(e,r)=>{const[n,t]=c.useState(e);return c.useEffect(()=>{const o=setTimeout(()=>{t(e)},r);return()=>{clearTimeout(o)}},[e,r]),n};function w(){return(w=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}function z(e,r){if(e==null)return{};var n,t,o={},a=Object.keys(e);for(t=0;t<a.length;t++)r.indexOf(n=a[t])>=0||(o[n]=e[n]);return o}function E(e){var r=c.useRef(e),n=c.useRef(function(t){r.current&&r.current(t)});return r.current=e,n.current}var b=function(e,r,n){return r===void 0&&(r=0),n===void 0&&(n=1),e>n?n:e<r?r:e},_=function(e){return"touches"in e},M=function(e){return e&&e.ownerDocument.defaultView||self},S=function(e,r,n){var t=e.getBoundingClientRect(),o=_(r)?(function(a,l){for(var u=0;u<a.length;u++)if(a[u].identifier===l)return a[u];return a[0]})(r.touches,n):r;return{left:b((o.pageX-(t.left+M(e).pageXOffset))/t.width),top:b((o.pageY-(t.top+M(e).pageYOffset))/t.height)}},H=function(e){!_(e)&&e.preventDefault()},L=c.memo(function(e){var r=e.onMove,n=e.onKey,t=z(e,["onMove","onKey"]),o=c.useRef(null),a=E(r),l=E(n),u=c.useRef(null),d=c.useRef(!1),i=c.useMemo(function(){var K=function(h){H(h),(_(h)?h.touches.length>0:h.buttons>0)&&o.current?a(S(o.current,h,u.current)):x(!1)},P=function(){return x(!1)};function x(h){var f=d.current,g=M(o.current),m=h?g.addEventListener:g.removeEventListener;m(f?"touchmove":"mousemove",K),m(f?"touchend":"mouseup",P)}return[function(h){var f=h.nativeEvent,g=o.current;if(g&&(H(f),!(function(V,B){return B&&!_(V)})(f,d.current)&&g)){if(_(f)){d.current=!0;var m=f.changedTouches||[];m.length&&(u.current=m[0].identifier)}g.focus(),a(S(g,f,u.current)),x(!0)}},function(h){var f=h.which||h.keyCode;f<37||f>40||(h.preventDefault(),l({left:f===39?.05:f===37?-.05:0,top:f===40?.05:f===38?-.05:0}))},x]},[l,a]),v=i[0],y=i[1],O=i[2];return c.useEffect(function(){return O},[O]),c.createElement("div",w({},t,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:o,onKeyDown:y,tabIndex:0,role:"slider"}))}),D=function(e){return e.filter(Boolean).join(" ")},R=function(e){var r=e.color,n=e.left,t=e.top,o=t===void 0?.5:t,a=D(["react-colorful__pointer",e.className]);return c.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},c.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:r}}))},s=function(e,r,n){return r===void 0&&(r=0),n===void 0&&(n=Math.pow(10,r)),Math.round(n*e)/n},Q=function(e){return $(k(e))},k=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?s(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?s(parseInt(e.substring(6,8),16)/255,2):1}},U=function(e){return G(Z(e))},W=function(e){var r=e.s,n=e.v,t=e.a,o=(200-r)*n/100;return{h:s(e.h),s:s(o>0&&o<200?r*n/100/(o<=100?o:200-o)*100:0),l:s(o/2),a:s(t,2)}},j=function(e){var r=W(e);return"hsl("+r.h+", "+r.s+"%, "+r.l+"%)"},Z=function(e){var r=e.h,n=e.s,t=e.v,o=e.a;r=r/360*6,n/=100,t/=100;var a=Math.floor(r),l=t*(1-n),u=t*(1-(r-a)*n),d=t*(1-(1-r+a)*n),i=a%6;return{r:s(255*[t,u,l,l,d,t][i]),g:s(255*[d,t,t,u,l,l][i]),b:s(255*[l,l,d,t,t,u][i]),a:s(o,2)}},C=function(e){var r=e.toString(16);return r.length<2?"0"+r:r},G=function(e){var r=e.r,n=e.g,t=e.b,o=e.a,a=o<1?C(s(255*o)):"";return"#"+C(r)+C(n)+C(t)+a},$=function(e){var r=e.r,n=e.g,t=e.b,o=e.a,a=Math.max(r,n,t),l=a-Math.min(r,n,t),u=l?a===r?(n-t)/l:a===n?2+(t-r)/l:4+(r-n)/l:0;return{h:s(60*(u<0?u+6:u)),s:s(a?l/a*100:0),v:s(a/255*100),a:o}},ee=c.memo(function(e){var r=e.hue,n=e.onChange,t=D(["react-colorful__hue",e.className]);return c.createElement("div",{className:t},c.createElement(L,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:b(r+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":s(r),"aria-valuemax":"360","aria-valuemin":"0"},c.createElement(R,{className:"react-colorful__hue-pointer",left:r/360,color:j({h:r,s:100,v:100,a:1})})))}),re=c.memo(function(e){var r=e.hsva,n=e.onChange,t={backgroundColor:j({h:r.h,s:100,v:100,a:1})};return c.createElement("div",{className:"react-colorful__saturation",style:t},c.createElement(L,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:b(r.s+100*o.left,0,100),v:b(r.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+s(r.s)+"%, Brightness "+s(r.v)+"%"},c.createElement(R,{className:"react-colorful__saturation-pointer",top:1-r.v/100,left:r.s/100,color:j(r)})))}),I=function(e,r){if(e===r)return!0;for(var n in e)if(e[n]!==r[n])return!1;return!0},ne=function(e,r){return e.toLowerCase()===r.toLowerCase()||I(k(e),k(r))};function te(e,r,n){var t=E(n),o=c.useState(function(){return e.toHsva(r)}),a=o[0],l=o[1],u=c.useRef({color:r,hsva:a});c.useEffect(function(){if(!e.equal(r,u.current.color)){var i=e.toHsva(r);u.current={hsva:i,color:r},l(i)}},[r,e]),c.useEffect(function(){var i;I(a,u.current.hsva)||e.equal(i=e.fromHsva(a),u.current.color)||(u.current={hsva:a,color:i},t(i))},[a,e,t]);var d=c.useCallback(function(i){l(function(v){return Object.assign({},v,i)})},[]);return[a,d]}var oe=typeof window<"u"?c.useLayoutEffect:c.useEffect,ae=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},T=new Map,ce=function(e){oe(function(){var r=e.current?e.current.ownerDocument:document;if(r!==void 0&&!T.has(r)){var n=r.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,T.set(r,n);var t=ae();t&&n.setAttribute("nonce",t),r.head.appendChild(n)}},[])},ue=function(e){var r=e.className,n=e.colorModel,t=e.color,o=t===void 0?n.defaultColor:t,a=e.onChange,l=z(e,["className","colorModel","color","onChange"]),u=c.useRef(null);ce(u);var d=te(n,o,a),i=d[0],v=d[1],y=D(["react-colorful",r]);return c.createElement("div",w({},l,{ref:u,className:y}),c.createElement(re,{hsva:i,onChange:v}),c.createElement(ee,{hue:i.h,onChange:v,className:"react-colorful__last-control"}))},le={defaultColor:"000",toHsva:Q,fromHsva:function(e){return U({h:e.h,s:e.s,v:e.v,a:1})},equal:ne},ie=function(e){return c.createElement(ue,w({},e,{colorModel:le}))};const se="_colorfulcontainer_1kkrb_1",fe={colorfulcontainer:se},de=({position:e,selectColor:r,closePicker:n,handleColorChange:t})=>{const o=A.useClickOutsideDOM(()=>{n&&n(!1)});return p.jsx("div",{ref:o,style:{position:e},children:p.jsx(Y.Layout,{display:q.Displays.Flex,flexDirection:q.FlexDirections.Column,children:p.jsx(N.Container,{children:p.jsx(N.Container,{className:fe.colorfulcontainer,children:p.jsx(ie,{color:r,onChange:t})})})})})},he=({defaultColor:e="#eeeeee",setInput:r,setColor:n,inputName:t=void 0,closePicker:o=void 0,position:a="absolute"})=>{const[l,u]=c.useState(e||"#eee");c.useEffect(()=>{u(e||"#eee")},[e]);const d=v=>{u(v)},i=J(l,250);return c.useEffect(()=>{n&&n(i),r&&r(v=>({...v,[`${t||"edit_color"}`]:i}))},[i,t,r,n]),p.jsxs("div",{children:[p.jsxs("div",{className:"title",children:[p.jsx("span",{children:"Choose color: "}),p.jsx(F.TagColor,{color:l,size:X.TagColorSizes.Large})]}),p.jsx(de,{selectColor:l,handleColorChange:d,position:a,closePicker:o})]})};exports.ColorPicker=he;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ColorPicker-rxR_V4EW.cjs");exports.ColorPicker=e.ColorPicker;
@@ -1,234 +1,4 @@
1
- import { jsx as p, jsxs as T } from "react/jsx-runtime";
2
- import { T as $ } from "../TagColor-BYKxfOU6.js";
3
- import { a as A } from "../types-BXyuQRbv.js";
4
- import s, { useState as H, useEffect as _, useRef as g, useCallback as J, useLayoutEffect as Q, useMemo as U } from "react";
5
- import { C as I } from "../component-C1Gs4nVu.js";
6
- import { L as W } from "../component-DRXQXr2G.js";
7
- import { i as Z, b as G } from "../classes-CVxy1f4M.js";
8
- import { u as rr } from "../useClickOutsideDOM-CBmttEFU.js";
9
- const er = (r, e) => {
10
- const [n, t] = H(r);
11
- return _(() => {
12
- const o = setTimeout(() => {
13
- t(r);
14
- }, e);
15
- return () => {
16
- clearTimeout(o);
17
- };
18
- }, [r, e]), n;
19
- };
20
- function E() {
21
- return (E = Object.assign || function(r) {
22
- for (var e = 1; e < arguments.length; e++) {
23
- var n = arguments[e];
24
- for (var t in n) Object.prototype.hasOwnProperty.call(n, t) && (r[t] = n[t]);
25
- }
26
- return r;
27
- }).apply(this, arguments);
28
- }
29
- function q(r, e) {
30
- if (r == null) return {};
31
- var n, t, o = {}, a = Object.keys(r);
32
- for (t = 0; t < a.length; t++) e.indexOf(n = a[t]) >= 0 || (o[n] = r[n]);
33
- return o;
34
- }
35
- function k(r) {
36
- var e = g(r), n = g(function(t) {
37
- e.current && e.current(t);
38
- });
39
- return e.current = r, n.current;
40
- }
41
- var w = function(r, e, n) {
42
- return e === void 0 && (e = 0), n === void 0 && (n = 1), r > n ? n : r < e ? e : r;
43
- }, x = function(r) {
44
- return "touches" in r;
45
- }, D = function(r) {
46
- return r && r.ownerDocument.defaultView || self;
47
- }, j = function(r, e, n) {
48
- var t = r.getBoundingClientRect(), o = x(e) ? (function(a, l) {
49
- for (var c = 0; c < a.length; c++) if (a[c].identifier === l) return a[c];
50
- return a[0];
51
- })(e.touches, n) : e;
52
- return { left: w((o.pageX - (t.left + D(r).pageXOffset)) / t.width), top: w((o.pageY - (t.top + D(r).pageYOffset)) / t.height) };
53
- }, S = function(r) {
54
- !x(r) && r.preventDefault();
55
- }, V = s.memo(function(r) {
56
- var e = r.onMove, n = r.onKey, t = q(r, ["onMove", "onKey"]), o = g(null), a = k(e), l = k(n), c = g(null), d = g(!1), u = U(function() {
57
- var X = function(h) {
58
- S(h), (x(h) ? h.touches.length > 0 : h.buttons > 0) && o.current ? a(j(o.current, h, c.current)) : C(!1);
59
- }, Y = function() {
60
- return C(!1);
61
- };
62
- function C(h) {
63
- var f = d.current, m = D(o.current), b = h ? m.addEventListener : m.removeEventListener;
64
- b(f ? "touchmove" : "mousemove", X), b(f ? "touchend" : "mouseup", Y);
65
- }
66
- return [function(h) {
67
- var f = h.nativeEvent, m = o.current;
68
- if (m && (S(f), !(function(P, R) {
69
- return R && !x(P);
70
- })(f, d.current) && m)) {
71
- if (x(f)) {
72
- d.current = !0;
73
- var b = f.changedTouches || [];
74
- b.length && (c.current = b[0].identifier);
75
- }
76
- m.focus(), a(j(m, f, c.current)), C(!0);
77
- }
78
- }, function(h) {
79
- var f = h.which || h.keyCode;
80
- f < 37 || f > 40 || (h.preventDefault(), l({ left: f === 39 ? 0.05 : f === 37 ? -0.05 : 0, top: f === 40 ? 0.05 : f === 38 ? -0.05 : 0 }));
81
- }, C];
82
- }, [l, a]), v = u[0], M = u[1], z = u[2];
83
- return _(function() {
84
- return z;
85
- }, [z]), s.createElement("div", E({}, t, { onTouchStart: v, onMouseDown: v, className: "react-colorful__interactive", ref: o, onKeyDown: M, tabIndex: 0, role: "slider" }));
86
- }), L = function(r) {
87
- return r.filter(Boolean).join(" ");
88
- }, B = function(r) {
89
- var e = r.color, n = r.left, t = r.top, o = t === void 0 ? 0.5 : t, a = L(["react-colorful__pointer", r.className]);
90
- return s.createElement("div", { className: a, style: { top: 100 * o + "%", left: 100 * n + "%" } }, s.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: e } }));
91
- }, i = function(r, e, n) {
92
- return e === void 0 && (e = 0), n === void 0 && (n = Math.pow(10, e)), Math.round(n * r) / n;
93
- }, nr = function(r) {
94
- return lr(N(r));
95
- }, N = function(r) {
96
- return r[0] === "#" && (r = r.substring(1)), r.length < 6 ? { r: parseInt(r[0] + r[0], 16), g: parseInt(r[1] + r[1], 16), b: parseInt(r[2] + r[2], 16), a: r.length === 4 ? i(parseInt(r[3] + r[3], 16) / 255, 2) : 1 } : { r: parseInt(r.substring(0, 2), 16), g: parseInt(r.substring(2, 4), 16), b: parseInt(r.substring(4, 6), 16), a: r.length === 8 ? i(parseInt(r.substring(6, 8), 16) / 255, 2) : 1 };
97
- }, tr = function(r) {
98
- return cr(ar(r));
99
- }, or = function(r) {
100
- var e = r.s, n = r.v, t = r.a, o = (200 - e) * n / 100;
101
- return { h: i(r.h), s: i(o > 0 && o < 200 ? e * n / 100 / (o <= 100 ? o : 200 - o) * 100 : 0), l: i(o / 2), a: i(t, 2) };
102
- }, O = function(r) {
103
- var e = or(r);
104
- return "hsl(" + e.h + ", " + e.s + "%, " + e.l + "%)";
105
- }, ar = function(r) {
106
- var e = r.h, n = r.s, t = r.v, o = r.a;
107
- e = e / 360 * 6, n /= 100, t /= 100;
108
- var a = Math.floor(e), l = t * (1 - n), c = t * (1 - (e - a) * n), d = t * (1 - (1 - e + a) * n), u = a % 6;
109
- return { r: i(255 * [t, c, l, l, d, t][u]), g: i(255 * [d, t, t, c, l, l][u]), b: i(255 * [l, l, d, t, t, c][u]), a: i(o, 2) };
110
- }, y = function(r) {
111
- var e = r.toString(16);
112
- return e.length < 2 ? "0" + e : e;
113
- }, cr = function(r) {
114
- var e = r.r, n = r.g, t = r.b, o = r.a, a = o < 1 ? y(i(255 * o)) : "";
115
- return "#" + y(e) + y(n) + y(t) + a;
116
- }, lr = function(r) {
117
- var e = r.r, n = r.g, t = r.b, o = r.a, a = Math.max(e, n, t), l = a - Math.min(e, n, t), c = l ? a === e ? (n - t) / l : a === n ? 2 + (t - e) / l : 4 + (e - n) / l : 0;
118
- return { h: i(60 * (c < 0 ? c + 6 : c)), s: i(a ? l / a * 100 : 0), v: i(a / 255 * 100), a: o };
119
- }, ur = s.memo(function(r) {
120
- var e = r.hue, n = r.onChange, t = L(["react-colorful__hue", r.className]);
121
- return s.createElement("div", { className: t }, s.createElement(V, { onMove: function(o) {
122
- n({ h: 360 * o.left });
123
- }, onKey: function(o) {
124
- n({ h: w(e + 360 * o.left, 0, 360) });
125
- }, "aria-label": "Hue", "aria-valuenow": i(e), "aria-valuemax": "360", "aria-valuemin": "0" }, s.createElement(B, { className: "react-colorful__hue-pointer", left: e / 360, color: O({ h: e, s: 100, v: 100, a: 1 }) })));
126
- }), ir = s.memo(function(r) {
127
- var e = r.hsva, n = r.onChange, t = { backgroundColor: O({ h: e.h, s: 100, v: 100, a: 1 }) };
128
- return s.createElement("div", { className: "react-colorful__saturation", style: t }, s.createElement(V, { onMove: function(o) {
129
- n({ s: 100 * o.left, v: 100 - 100 * o.top });
130
- }, onKey: function(o) {
131
- n({ s: w(e.s + 100 * o.left, 0, 100), v: w(e.v - 100 * o.top, 0, 100) });
132
- }, "aria-label": "Color", "aria-valuetext": "Saturation " + i(e.s) + "%, Brightness " + i(e.v) + "%" }, s.createElement(B, { className: "react-colorful__saturation-pointer", top: 1 - e.v / 100, left: e.s / 100, color: O(e) })));
133
- }), F = function(r, e) {
134
- if (r === e) return !0;
135
- for (var n in r) if (r[n] !== e[n]) return !1;
136
- return !0;
137
- }, sr = function(r, e) {
138
- return r.toLowerCase() === e.toLowerCase() || F(N(r), N(e));
139
- };
140
- function fr(r, e, n) {
141
- var t = k(n), o = H(function() {
142
- return r.toHsva(e);
143
- }), a = o[0], l = o[1], c = g({ color: e, hsva: a });
144
- _(function() {
145
- if (!r.equal(e, c.current.color)) {
146
- var u = r.toHsva(e);
147
- c.current = { hsva: u, color: e }, l(u);
148
- }
149
- }, [e, r]), _(function() {
150
- var u;
151
- F(a, c.current.hsva) || r.equal(u = r.fromHsva(a), c.current.color) || (c.current = { hsva: a, color: u }, t(u));
152
- }, [a, r, t]);
153
- var d = J(function(u) {
154
- l(function(v) {
155
- return Object.assign({}, v, u);
156
- });
157
- }, []);
158
- return [a, d];
159
- }
160
- var dr = typeof window < "u" ? Q : _, hr = function() {
161
- return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
162
- }, K = /* @__PURE__ */ new Map(), vr = function(r) {
163
- dr(function() {
164
- var e = r.current ? r.current.ownerDocument : document;
165
- if (e !== void 0 && !K.has(e)) {
166
- var n = e.createElement("style");
167
- n.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, K.set(e, n);
168
- var t = hr();
169
- t && n.setAttribute("nonce", t), e.head.appendChild(n);
170
- }
171
- }, []);
172
- }, pr = function(r) {
173
- var e = r.className, n = r.colorModel, t = r.color, o = t === void 0 ? n.defaultColor : t, a = r.onChange, l = q(r, ["className", "colorModel", "color", "onChange"]), c = g(null);
174
- vr(c);
175
- var d = fr(n, o, a), u = d[0], v = d[1], M = L(["react-colorful", e]);
176
- return s.createElement("div", E({}, l, { ref: c, className: M }), s.createElement(ir, { hsva: u, onChange: v }), s.createElement(ur, { hue: u.h, onChange: v, className: "react-colorful__last-control" }));
177
- }, mr = { defaultColor: "000", toHsva: nr, fromHsva: function(r) {
178
- return tr({ h: r.h, s: r.s, v: r.v, a: 1 });
179
- }, equal: sr }, gr = function(r) {
180
- return s.createElement(pr, E({}, r, { colorModel: mr }));
181
- };
182
- const _r = "_colorfulcontainer_1kkrb_1", br = {
183
- colorfulcontainer: _r
184
- }, xr = ({
185
- position: r,
186
- selectColor: e,
187
- closePicker: n,
188
- handleColorChange: t
189
- }) => {
190
- const o = rr(() => {
191
- n && n(!1);
192
- });
193
- return /* @__PURE__ */ p("div", { ref: o, style: { position: r }, children: /* @__PURE__ */ p(W, { display: G.Flex, flexDirection: Z.Column, children: /* @__PURE__ */ p(I, { children: /* @__PURE__ */ p(I, { className: br.colorfulcontainer, children: /* @__PURE__ */ p(gr, { color: e, onChange: t }) }) }) }) });
194
- }, Or = ({
195
- defaultColor: r = "#eeeeee",
196
- setInput: e,
197
- setColor: n,
198
- inputName: t = void 0,
199
- closePicker: o = void 0,
200
- position: a = "absolute"
201
- }) => {
202
- const [l, c] = H(
203
- r || "#eee"
204
- );
205
- _(() => {
206
- c(r || "#eee");
207
- }, [r]);
208
- const d = (v) => {
209
- c(v);
210
- }, u = er(l, 250);
211
- return _(() => {
212
- n && n(u), e && e((v) => ({
213
- ...v,
214
- [`${t || "edit_color"}`]: u
215
- }));
216
- }, [u, t, e, n]), /* @__PURE__ */ T("div", { children: [
217
- /* @__PURE__ */ T("div", { className: "title", children: [
218
- /* @__PURE__ */ p("span", { children: "Choose color: " }),
219
- /* @__PURE__ */ p($, { color: l, size: A.Large })
220
- ] }),
221
- /* @__PURE__ */ p(
222
- xr,
223
- {
224
- selectColor: l,
225
- handleColorChange: d,
226
- position: a,
227
- closePicker: o
228
- }
229
- )
230
- ] });
231
- };
1
+ import { C as e } from "../ColorPicker-DUz0qcHd.js";
232
2
  export {
233
- Or as ColorPicker
3
+ e as ColorPicker
234
4
  };