@lanaco/lnc-react-ui 4.0.3 → 4.0.5

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 (61) hide show
  1. package/dist/Avatar.cjs +1 -1
  2. package/dist/Avatar.js +5 -6
  3. package/dist/Button.cjs +2 -2
  4. package/dist/Button.js +0 -1
  5. package/dist/CheckBoxInput.js +2 -2
  6. package/dist/ColorInput.js +18 -18
  7. package/dist/ConfirmationForm.cjs +5 -5
  8. package/dist/ConfirmationForm.js +16 -16
  9. package/dist/DataView.cjs +1 -1
  10. package/dist/DataView.js +35 -35
  11. package/dist/DecimalInput.js +41 -41
  12. package/dist/DoubleRangeSlider.js +30 -30
  13. package/dist/DragAndDropFile.js +162 -162
  14. package/dist/DragDropFiles.js +29 -29
  15. package/dist/Drawer.js +46 -46
  16. package/dist/Dropdown.js +36 -36
  17. package/dist/DropdownItem.js +19 -19
  18. package/dist/DropdownLookup.js +34 -34
  19. package/dist/DropdownMenu.js +43 -43
  20. package/dist/FileInput.js +21 -21
  21. package/dist/FlexGridItem.js +13 -13
  22. package/dist/Grid.cjs +1 -2
  23. package/dist/Grid.js +36 -8
  24. package/dist/GridItem.cjs +1 -1
  25. package/dist/GridItem.js +27 -7
  26. package/dist/Icon.cjs +2 -2
  27. package/dist/Icon.js +5 -6
  28. package/dist/IconButton.cjs +5 -5
  29. package/dist/IconButton.js +24 -25
  30. package/dist/Kanban.js +446 -446
  31. package/dist/MenuItem.js +33 -33
  32. package/dist/Modal.js +38 -38
  33. package/dist/MultiSelectDropdown.js +2 -2
  34. package/dist/MultiSelectDropdownLookup.js +2 -2
  35. package/dist/NestedDropdownItem.js +43 -43
  36. package/dist/NestedMenuItem.js +44 -44
  37. package/dist/NumberInput.js +12 -12
  38. package/dist/PageLayout.cjs +2 -2
  39. package/dist/PageLayout.js +18 -18
  40. package/dist/PasswordInput.js +40 -40
  41. package/dist/RadioGroup.js +11 -11
  42. package/dist/RadioInput.js +6 -6
  43. package/dist/RangeSlider.js +25 -25
  44. package/dist/SearchBar.js +73 -73
  45. package/dist/Sidebar.js +11 -11
  46. package/dist/SwipeableDrawer.js +16 -16
  47. package/dist/TabItem.js +25 -25
  48. package/dist/Tabs.js +32 -26
  49. package/dist/TextAreaInput.js +30 -30
  50. package/dist/TextInput.js +22 -22
  51. package/dist/ThemeProvider.js +83 -83
  52. package/dist/TimeInput.js +4 -4
  53. package/dist/Toggle.cjs +1 -1
  54. package/dist/Toggle.js +0 -1
  55. package/dist/TreeMenu.js +56 -56
  56. package/dist/style.css +1 -5
  57. package/package.json +1 -1
  58. package/bundle-visualization.html +0 -4842
  59. package/custom-addons/ThemeSelector.js +0 -111
  60. package/custom-addons/register.js +0 -16
  61. package/custom-addons/theme-selector.css +0 -17
@@ -1,6 +1,6 @@
1
1
  import { jsxs as A, jsx as g } from "react/jsx-runtime";
2
2
  import { P as n } from "./index-BYnWp42a.js";
3
- import P, { useState as C, useEffect as W, useCallback as G } from "react";
3
+ import { forwardRef as P, useState as C, useEffect as W, useCallback as G } from "react";
4
4
  import { d as M } from "./index-CNBqQrtK.js";
5
5
  import { n as i } from "./emotion-styled.browser.esm-BiK8DcgW.js";
6
6
  import { d, a, b as U, e as D, h as S, g as X } from "./utils-C52T57HO.js";
@@ -79,7 +79,7 @@ const H = i.div`
79
79
  ${(e) => S(e.theme)}
80
80
  background: none;
81
81
  }
82
- `, L = P.forwardRef((e, T) => {
82
+ `, L = P((e, T) => {
83
83
  const {
84
84
  disabled: y,
85
85
  readOnly: p,
@@ -97,16 +97,16 @@ const H = i.div`
97
97
  onBlur: c,
98
98
  onFocus: f,
99
99
  //----------------
100
- className: R = "",
101
- style: _ = {},
100
+ className: k = "",
101
+ style: R = {},
102
102
  size: x = "small",
103
103
  color: o = "primary",
104
- ...k
105
- } = e, u = q(), [w, $] = C(r || F || ""), [h, I] = C(!1);
104
+ ...w
105
+ } = e, u = q(), [B, $] = C(r || F || ""), [h, I] = C(!1);
106
106
  W(() => {
107
107
  r != null && $(r);
108
108
  }, [r]);
109
- const B = G(
109
+ const _ = G(
110
110
  M((t, b) => j(t, b), O),
111
111
  [l]
112
112
  ), j = (t, b) => {
@@ -115,8 +115,8 @@ const H = i.div`
115
115
  return /* @__PURE__ */ A(
116
116
  H,
117
117
  {
118
- style: _,
119
- className: R,
118
+ style: R,
119
+ className: k,
120
120
  theme: u,
121
121
  color: o,
122
122
  size: x,
@@ -150,7 +150,7 @@ const H = i.div`
150
150
  step: V,
151
151
  min: z,
152
152
  max: v,
153
- value: w,
153
+ value: B,
154
154
  onFocus: (t) => {
155
155
  I(!0), f == null || f(t);
156
156
  },
@@ -158,9 +158,9 @@ const H = i.div`
158
158
  I(!1), c == null || c(t);
159
159
  },
160
160
  onChange: (t) => {
161
- $(t.target.value), B(t, t.target.value);
161
+ $(t.target.value), _(t, t.target.value);
162
162
  },
163
- ...k
163
+ ...w
164
164
  }
165
165
  ),
166
166
  m && /* @__PURE__ */ g(
@@ -1,4 +1,4 @@
1
- "use strict";const x=require("react/jsx-runtime"),a=require("react"),E=require("./index-BIlhCoy2.cjs"),c=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),S=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),T=c.newStyled.section`
1
+ "use strict";const x=require("react/jsx-runtime"),a=require("react"),E=require("./index-BIlhCoy2.cjs"),S=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),c=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),T=S.newStyled.section`
2
2
  display: flex;
3
3
  flex: auto;
4
4
  flex-direction: ${s=>s.hasSidebar?"row":"column"};
@@ -23,4 +23,4 @@
23
23
  flex: 0 0 15rem;
24
24
  height: 100%;
25
25
  }
26
- `,u=a.forwardRef((s,f)=>{const{children:o,isChild:h,__TYPE__:C="PageLayout",...p}=s,P=S.useTheme(),g=a.Children.toArray(o).some(e=>{var t;return e.props.__TYPE__||((t=e==null?void 0:e.type)==null?void 0:t.displayName)=="Sidebar"}),m=e=>{let t,i,l;if(a.Children.forEach(e,(r,d)=>{var _,n,y;if(r.props.__TYPE__=="Sidebar"||((_=r==null?void 0:r.type)==null?void 0:_.displayName)==="Sidebar"){if(i)throw"Found multiple ocurrences of Sidebar component on the same level in the component tree.";i=d+1}else if(r.props.__TYPE__=="PageLayout"||((n=r==null?void 0:r.type)==null?void 0:n.displayName)==="PageLayout"){if(t)throw"Found multiple ocurrences of PageLayout component on the same level in the component tree.";t=d+1}else if(r.props.__TYPE__=="Content"||((y=r==null?void 0:r.type)==null?void 0:y.displayName)==="Content"){if(l)throw"Found multiple ocurrences of Content component on the same level in the component tree.";l=d+1}}),t&&i)return i<t?"left":"right";if(l&&i)return i<l?"left":"right"},b=a.Children.map(o,e=>{var t,i;if(a.isValidElement(e)){if(e.props.__TYPE__=="Sidebar"||((t=e.type)==null?void 0:t.displayName)==="Sidebar")return a.cloneElement(e,{placement:m(o)});if(e.props.__TYPE__=="PageLayout"||((i=e.type)==null?void 0:i.displayName)==="PageLayout")return React.cloneElement(e,{isChild:!0})}return e});return x.jsx(T,{isChild:h,hasSidebar:g,theme:P,ref:f,...p,children:b})});u.propTypes={__TYPE__:E.PropTypes.string};u.displayName="PageLayout";module.exports=u;
26
+ `,u=a.forwardRef((s,f)=>{const{children:o,isChild:h,__TYPE__:C="PageLayout",...p}=s,P=c.useTheme(),g=a.Children.toArray(o).some(e=>{var t;return e.props.__TYPE__||((t=e==null?void 0:e.type)==null?void 0:t.displayName)=="Sidebar"}),m=e=>{let t,i,l;if(a.Children.forEach(e,(r,d)=>{var _,n,y;if(r.props.__TYPE__=="Sidebar"||((_=r==null?void 0:r.type)==null?void 0:_.displayName)==="Sidebar"){if(i)throw"Found multiple ocurrences of Sidebar component on the same level in the component tree.";i=d+1}else if(r.props.__TYPE__=="PageLayout"||((n=r==null?void 0:r.type)==null?void 0:n.displayName)==="PageLayout"){if(t)throw"Found multiple ocurrences of PageLayout component on the same level in the component tree.";t=d+1}else if(r.props.__TYPE__=="Content"||((y=r==null?void 0:r.type)==null?void 0:y.displayName)==="Content"){if(l)throw"Found multiple ocurrences of Content component on the same level in the component tree.";l=d+1}}),t&&i)return i<t?"left":"right";if(l&&i)return i<l?"left":"right"},b=a.Children.map(o,e=>{var t,i;if(a.isValidElement(e)){if(e.props.__TYPE__=="Sidebar"||((t=e.type)==null?void 0:t.displayName)==="Sidebar")return a.cloneElement(e,{placement:m(o)});if(e.props.__TYPE__=="PageLayout"||((i=e.type)==null?void 0:i.displayName)==="PageLayout")return a.cloneElement(e,{isChild:!0})}return e});return x.jsx(T,{isChild:h,hasSidebar:g,theme:P,ref:f,...p,children:b})});u.propTypes={__TYPE__:E.PropTypes.string};u.displayName="PageLayout";module.exports=u;
@@ -1,5 +1,5 @@
1
1
  import { jsx as E } from "react/jsx-runtime";
2
- import { forwardRef as x, Children as d, isValidElement as S, cloneElement as T } from "react";
2
+ import { forwardRef as S, Children as d, isValidElement as T, cloneElement as y } from "react";
3
3
  import { P as L } from "./index-BYnWp42a.js";
4
4
  import { n as C } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
5
  import { u as Y } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
@@ -28,13 +28,13 @@ const w = C.section`
28
28
  flex: 0 0 15rem;
29
29
  height: 100%;
30
30
  }
31
- `, y = x((i, p) => {
32
- const { children: l, isChild: h, __TYPE__: N = "PageLayout", ...n } = i, m = Y(), P = d.toArray(l).some(
31
+ `, p = S((i, h) => {
32
+ const { children: l, isChild: n, __TYPE__: N = "PageLayout", ...m } = i, P = Y(), g = d.toArray(l).some(
33
33
  (e) => {
34
34
  var t;
35
35
  return e.props.__TYPE__ || ((t = e == null ? void 0 : e.type) == null ? void 0 : t.displayName) == "Sidebar";
36
36
  }
37
- ), g = (e) => {
37
+ ), b = (e) => {
38
38
  let t, a, s;
39
39
  if (d.forEach(e, (r, o) => {
40
40
  var f, u, _;
@@ -55,38 +55,38 @@ const w = C.section`
55
55
  return a < t ? "left" : "right";
56
56
  if (s && a)
57
57
  return a < s ? "left" : "right";
58
- }, b = d.map(l, (e) => {
58
+ }, x = d.map(l, (e) => {
59
59
  var t, a;
60
- if (S(e)) {
60
+ if (T(e)) {
61
61
  if (e.props.__TYPE__ == "Sidebar" || ((t = e.type) == null ? void 0 : t.displayName) === "Sidebar")
62
- return T(e, {
63
- placement: g(l)
62
+ return y(e, {
63
+ placement: b(l)
64
64
  });
65
65
  if (e.props.__TYPE__ == "PageLayout" || ((a = e.type) == null ? void 0 : a.displayName) === "PageLayout")
66
- return React.cloneElement(e, { isChild: !0 });
66
+ return y(e, { isChild: !0 });
67
67
  }
68
68
  return e;
69
69
  });
70
70
  return /* @__PURE__ */ E(
71
71
  w,
72
72
  {
73
- isChild: h,
74
- hasSidebar: P,
75
- theme: m,
76
- ref: p,
77
- ...n,
78
- children: b
73
+ isChild: n,
74
+ hasSidebar: g,
75
+ theme: P,
76
+ ref: h,
77
+ ...m,
78
+ children: x
79
79
  }
80
80
  );
81
81
  });
82
- y.propTypes = {
82
+ p.propTypes = {
83
83
  /**
84
84
  * Do not override this property.
85
85
  * Should only be used as indicator for type if you are passing custom component.
86
86
  */
87
87
  __TYPE__: L.string
88
88
  };
89
- y.displayName = "PageLayout";
89
+ p.displayName = "PageLayout";
90
90
  export {
91
- y as default
91
+ p as default
92
92
  };
@@ -1,12 +1,12 @@
1
- import { jsxs as D, jsx as u } from "react/jsx-runtime";
2
- import q, { useRef as A, useState as $, useEffect as I, useCallback as G } from "react";
1
+ import { jsxs as q, jsx as u } from "react/jsx-runtime";
2
+ import { forwardRef as A, useRef as G, useState as $, useEffect as I, useCallback as H } from "react";
3
3
  import { P as n } from "./index-BYnWp42a.js";
4
- import { d as H } from "./index-CNBqQrtK.js";
5
- import J from "./Icon.js";
4
+ import { d as J } from "./index-CNBqQrtK.js";
5
+ import K from "./Icon.js";
6
6
  import { n as m } from "./emotion-styled.browser.esm-BiK8DcgW.js";
7
- import { d as g, a, b as K, e as M, h as O, g as Q } from "./utils-C52T57HO.js";
8
- import { u as X } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
9
- const Y = m.div`
7
+ import { d as g, a, b as M, e as Q, h as O, g as X } from "./utils-C52T57HO.js";
8
+ import { u as Y } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
9
+ const Z = m.div`
10
10
  display: flex;
11
11
  align-items: center;
12
12
 
@@ -27,9 +27,9 @@ const Y = m.div`
27
27
  e.disabled === !0 ? "disabled" : "enabled",
28
28
  "border"
29
29
  )};
30
- border-radius: ${(e) => K(e.theme, "regular")};
30
+ border-radius: ${(e) => M(e.theme, "regular")};
31
31
 
32
- ${(e) => e.focused && e.readOnly !== !0 ? M(e.theme) : ""}
32
+ ${(e) => e.focused && e.readOnly !== !0 ? Q(e.theme) : ""}
33
33
  ${(e) => e.disabled === !0 ? O(e.theme) : ""}
34
34
  `, C = m.span`
35
35
  padding: 0 12px;
@@ -40,7 +40,7 @@ const Y = m.div`
40
40
  "enabled",
41
41
  "prefix"
42
42
  )};
43
- `, Z = m(C)``, ee = m(C)`
43
+ `, _ = m(C)``, ee = m(C)`
44
44
  cursor: pointer;
45
45
  `, te = m.input`
46
46
  background: none;
@@ -50,7 +50,7 @@ const Y = m.div`
50
50
  padding-bottom: 0.625rem;
51
51
  width: 100%;
52
52
 
53
- ${(e) => Q(e.theme, "Input", e.size, "enabled")}
53
+ ${(e) => X(e.theme, "Input", e.size, "enabled")}
54
54
  min-height: ${(e) => g(e.theme, e.size)};
55
55
  max-height: ${(e) => g(e.theme, e.size)};
56
56
  color: ${(e) => a(
@@ -82,28 +82,28 @@ const Y = m.div`
82
82
  ${(e) => O(e.theme)}
83
83
  background: none;
84
84
  }
85
- `, ne = q.forwardRef((e, h) => {
85
+ `, ne = A((e, h) => {
86
86
  const {
87
87
  wrapperRef: T,
88
88
  disabled: S,
89
89
  readOnly: k,
90
- debounceTime: R = 180,
91
- placeholder: V,
90
+ debounceTime: V = 180,
91
+ placeholder: B,
92
92
  prefix: b,
93
93
  suffix: y,
94
94
  value: l,
95
- defaultValue: B,
95
+ defaultValue: F,
96
96
  //----------------
97
- onChange: d,
97
+ onChange: s,
98
98
  onBlur: p,
99
99
  onFocus: x,
100
100
  //----------------
101
- className: F = "",
102
- style: N = {},
101
+ className: N = "",
102
+ style: P = {},
103
103
  size: v = "small",
104
- color: s = "primary",
105
- ...P
106
- } = e, r = A(), c = X(), [j, z] = $(l || B || "");
104
+ color: d = "primary",
105
+ ...R
106
+ } = e, r = G(), c = Y(), [j, z] = $(l || F || "");
107
107
  I(() => {
108
108
  l != null && z(l);
109
109
  }, [l]);
@@ -115,24 +115,24 @@ const Y = m.div`
115
115
  }, [f]), I(() => {
116
116
  h != null && (h.current = r.current);
117
117
  }, [h, r]);
118
- const W = G(
119
- H((t, o) => E(t, o), R),
120
- [d]
118
+ const W = H(
119
+ J((t, o) => E(t, o), V),
120
+ [s]
121
121
  ), E = (t, o) => {
122
- d && (d == null || d(t, o));
122
+ s && (s == null || s(t, o));
123
123
  }, U = (t) => {
124
124
  z(t.target.value), W(t, t.target.value);
125
- }, _ = () => {
125
+ }, D = () => {
126
126
  L(!f), r.current.focus();
127
127
  };
128
- return /* @__PURE__ */ D(
129
- Y,
128
+ return /* @__PURE__ */ q(
129
+ Z,
130
130
  {
131
131
  ref: T,
132
- style: N,
133
- className: F,
132
+ style: P,
133
+ className: N,
134
134
  theme: c,
135
- color: s,
135
+ color: d,
136
136
  size: v,
137
137
  focused: i,
138
138
  disabled: S,
@@ -142,7 +142,7 @@ const Y = m.div`
142
142
  C,
143
143
  {
144
144
  theme: c,
145
- color: s,
145
+ color: d,
146
146
  focused: i,
147
147
  className: "lnc-input-prefix",
148
148
  children: b
@@ -154,9 +154,9 @@ const Y = m.div`
154
154
  ref: r,
155
155
  type: f ? "password" : "text",
156
156
  theme: c,
157
- color: s,
157
+ color: d,
158
158
  size: v,
159
- placeholder: V,
159
+ placeholder: B,
160
160
  prefix: b,
161
161
  suffix: y,
162
162
  disabled: S,
@@ -170,24 +170,24 @@ const Y = m.div`
170
170
  },
171
171
  onChange: U,
172
172
  value: j,
173
- ...P
173
+ ...R
174
174
  }
175
175
  ),
176
176
  /* @__PURE__ */ u(
177
177
  ee,
178
178
  {
179
179
  theme: c,
180
- color: s,
180
+ color: d,
181
181
  focused: i,
182
- onClick: _,
183
- children: /* @__PURE__ */ u(J, { icon: f ? "eye-slash" : "eye" })
182
+ onClick: D,
183
+ children: /* @__PURE__ */ u(K, { icon: f ? "eye-slash" : "eye" })
184
184
  }
185
185
  ),
186
186
  y && /* @__PURE__ */ u(
187
- Z,
187
+ _,
188
188
  {
189
189
  theme: c,
190
- color: s,
190
+ color: d,
191
191
  focused: i,
192
192
  className: "lnc-input-suffix",
193
193
  children: y
@@ -1,25 +1,25 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import P, { useState as R, useEffect as j } from "react";
3
- import { n as z } from "./emotion-styled.browser.esm-BiK8DcgW.js";
2
+ import { forwardRef as P, useState as j, useEffect as z } from "react";
3
+ import { n as R } from "./emotion-styled.browser.esm-BiK8DcgW.js";
4
4
  import { P as e } from "./index-BYnWp42a.js";
5
5
  import T from "./RadioInput.js";
6
6
  import { u as k } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
7
- const N = z.div`
7
+ const N = R.div`
8
8
  display: inline-flex;
9
9
  flex-direction: ${(r) => r.inline === !0 ? "row" : "column"};
10
10
  gap: 1.5rem;
11
11
  width: fit-content;
12
12
  box-sizing: border-box;
13
- `, S = P.forwardRef((r, s) => {
13
+ `, S = P((r, s) => {
14
14
  const {
15
15
  id: t = "",
16
- name: d,
16
+ name: m,
17
17
  value: o = null,
18
- disabled: m = !1,
18
+ disabled: d = !1,
19
19
  readOnly: p = !1,
20
20
  items: u = [],
21
21
  mapId: V = "id",
22
- mapValue: _ = "value",
22
+ mapValue: E = "value",
23
23
  radioProps: c,
24
24
  inline: f = !0,
25
25
  //----------------
@@ -33,15 +33,15 @@ const N = z.div`
33
33
  ...v
34
34
  } = r;
35
35
  var x = k();
36
- const [C, w] = R(null);
37
- j(() => {
36
+ const [C, w] = j(null);
37
+ z(() => {
38
38
  o !== C && w(o);
39
39
  }, [o]);
40
40
  var I = {
41
41
  color: h,
42
42
  theme: x,
43
43
  size: b,
44
- disabled: m,
44
+ disabled: d,
45
45
  readOnly: p
46
46
  };
47
47
  const O = (a, i) => {
@@ -64,7 +64,7 @@ const N = z.div`
64
64
  value: a.value,
65
65
  ...c,
66
66
  onChange: O,
67
- name: d
67
+ name: m
68
68
  },
69
69
  i
70
70
  ))
@@ -1,5 +1,5 @@
1
1
  import { jsxs as b, jsx as n } from "react/jsx-runtime";
2
- import P, { useState as j } from "react";
2
+ import { forwardRef as P, useState as j } from "react";
3
3
  import { n as g } from "./emotion-styled.browser.esm-BiK8DcgW.js";
4
4
  import { P as i } from "./index-BYnWp42a.js";
5
5
  import { d as f, g as N, e as T, a as t } from "./utils-C52T57HO.js";
@@ -208,11 +208,11 @@ const I = (e) => e == "left" ? "row-reverse" : "row", D = g.label`
208
208
  overflow: hidden;
209
209
  text-overflow: ellipsis;
210
210
  color: ${(e) => t(e.theme, "Radio", e.color, "enabled", "text")};
211
- `, K = P.forwardRef((e, y) => {
211
+ `, K = P((e, y) => {
212
212
  const {
213
213
  wrapperRef: w,
214
- className: R = "",
215
- style: k = {},
214
+ className: k = "",
215
+ style: R = {},
216
216
  color: $ = "primary",
217
217
  innerColor: v = "white",
218
218
  size: x = "small",
@@ -241,8 +241,8 @@ const I = (e) => e == "left" ? "row-reverse" : "row", D = g.label`
241
241
  {
242
242
  ...u,
243
243
  ref: w,
244
- className: R,
245
- style: k,
244
+ className: k,
245
+ style: R,
246
246
  tabIndex: -1,
247
247
  readOnly: s,
248
248
  focused: B,
@@ -1,12 +1,12 @@
1
1
  import { jsxs as O, jsx as t, Fragment as W } from "react/jsx-runtime";
2
2
  import { n as x } from "./emotion-styled.browser.esm-BiK8DcgW.js";
3
3
  import { P as n } from "./index-BYnWp42a.js";
4
- import _, { useRef as X, useState as v, useCallback as q, useEffect as M } from "react";
5
- import { b as A, a as o, g as D, d as G } from "./utils-C52T57HO.js";
6
- import { u as H } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
7
- import { u as J } from "./useUpdateEffect-CuYWz7EA.js";
8
- const K = ({ theme: e, size: i }) => {
9
- var u = G(e, i);
4
+ import { forwardRef as X, useRef as q, useState as v, useCallback as A, useEffect as M } from "react";
5
+ import { b as D, a as o, g as G, d as H } from "./utils-C52T57HO.js";
6
+ import { u as J } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
7
+ import { u as K } from "./useUpdateEffect-CuYWz7EA.js";
8
+ const Q = ({ theme: e, size: i }) => {
9
+ var u = H(e, i);
10
10
  return `
11
11
  min-height: ${u};
12
12
  max-height: ${u};
@@ -15,9 +15,9 @@ const K = ({ theme: e, size: i }) => {
15
15
  small: "0.875rem",
16
16
  medium: "1.125rem",
17
17
  large: "1.375rem"
18
- }, Q = x.div`
18
+ }, Y = x.div`
19
19
  position: relative;
20
- ${(e) => K(e)};
20
+ ${(e) => Q(e)};
21
21
  display: inline-flex;
22
22
  align-items: center;
23
23
  `, T = x.input`
@@ -31,7 +31,7 @@ const K = ({ theme: e, size: i }) => {
31
31
  background: ${(e) => e.rangeBackground};
32
32
  transition: background 450ms ease-in;
33
33
  -webkit-appearance: none;
34
- border-radius: ${(e) => A(e.theme, "regular")};
34
+ border-radius: ${(e) => D(e.theme, "regular")};
35
35
  &::-webkit-slider-thumb {
36
36
  -webkit-appearance: none; /* Override default look */
37
37
  appearance: none;
@@ -62,12 +62,12 @@ const K = ({ theme: e, size: i }) => {
62
62
  cursor: pointer; /* Cursor on hover */
63
63
  border: none;
64
64
  }
65
- `, Y = x.div`
65
+ `, Z = x.div`
66
66
  display: flex;
67
67
  flex-direction: column;
68
68
  align-items: center;
69
69
  position: absolute;
70
- ${(e) => D(e.theme, "Range", e.size, "enabled")};
70
+ ${(e) => G(e.theme, "Range", e.size, "enabled")};
71
71
  left: ${(e) => `calc(${e.inputValue + "%"} + (${8 - e.inputValue * 0.15}px))`};
72
72
  top: ${(e) => "calc(-" + g[e.size] + ")"};
73
73
  transform: translateX(-50%);
@@ -107,7 +107,7 @@ const K = ({ theme: e, size: i }) => {
107
107
  }
108
108
  }
109
109
  }
110
- `, Z = _.forwardRef((e, i) => {
110
+ `, _ = X((e, i) => {
111
111
  const {
112
112
  defaultValue: u,
113
113
  value: d = null,
@@ -123,8 +123,8 @@ const K = ({ theme: e, size: i }) => {
123
123
  size: B = "small",
124
124
  className: E = "",
125
125
  style: j = {},
126
- ...R
127
- } = e, y = X(), m = H(), b = { theme: m, size: B, color: s, className: E, style: j }, C = o(
126
+ ...y
127
+ } = e, C = q(), m = J(), b = { theme: m, size: B, color: s, className: E, style: j }, R = o(
128
128
  m,
129
129
  "Range",
130
130
  s,
@@ -138,11 +138,11 @@ const K = ({ theme: e, size: i }) => {
138
138
  l ? "disabled" : "enabled",
139
139
  "background"
140
140
  )
141
- ), [z, U] = v(), [L, p] = v(), f = q(
141
+ ), [z, U] = v(), [L, p] = v(), f = A(
142
142
  (a) => Math.round((a - c) / (h - c) * 100),
143
143
  [c, h]
144
144
  ), [r, I] = v(d || u);
145
- J(() => {
145
+ K(() => {
146
146
  I(d);
147
147
  }, [d]), M(() => {
148
148
  P(r || 0);
@@ -163,20 +163,20 @@ const K = ({ theme: e, size: i }) => {
163
163
  U(
164
164
  `linear-gradient(to right, ${S} 0%, ${S} ${f(
165
165
  a
166
- )}%, ${C} ${f(a)}%, ${C} 100%)`
166
+ )}%, ${R} ${f(a)}%, ${R} 100%)`
167
167
  );
168
168
  }, N = (a) => {
169
169
  I(a.target.value), k && k(a);
170
170
  };
171
- return /* @__PURE__ */ O(Q, { ...b, children: [
172
- L && r && /* @__PURE__ */ t(W, { children: /* @__PURE__ */ O(Y, { ...b, inputValue: f(r), children: [
171
+ return /* @__PURE__ */ O(Y, { ...b, children: [
172
+ L && r && /* @__PURE__ */ t(W, { children: /* @__PURE__ */ O(Z, { ...b, inputValue: f(r), children: [
173
173
  /* @__PURE__ */ t("div", { className: "text-content", children: r }),
174
174
  /* @__PURE__ */ t("div", { className: "arrow", children: /* @__PURE__ */ t("div", { className: "outer", children: /* @__PURE__ */ t("div", { className: "inner" }) }) })
175
175
  ] }) }),
176
176
  d == null || d == "undefined" ? /* @__PURE__ */ t(
177
177
  T,
178
178
  {
179
- ref: i || y,
179
+ ref: i || C,
180
180
  id: "fader",
181
181
  type: "range",
182
182
  min: c,
@@ -194,12 +194,12 @@ const K = ({ theme: e, size: i }) => {
194
194
  onInput: V,
195
195
  onChange: N,
196
196
  ...b,
197
- ...R
197
+ ...y
198
198
  }
199
199
  ) : /* @__PURE__ */ t(
200
200
  T,
201
201
  {
202
- ref: i || y,
202
+ ref: i || C,
203
203
  id: "fader",
204
204
  type: "range",
205
205
  min: c,
@@ -217,12 +217,12 @@ const K = ({ theme: e, size: i }) => {
217
217
  onInput: V,
218
218
  onChange: N,
219
219
  ...b,
220
- ...R
220
+ ...y
221
221
  }
222
222
  )
223
223
  ] });
224
224
  });
225
- Z.propTypes = {
225
+ _.propTypes = {
226
226
  value: n.number,
227
227
  defaultValue: n.number,
228
228
  min: n.number,
@@ -249,5 +249,5 @@ Z.propTypes = {
249
249
  ])
250
250
  };
251
251
  export {
252
- Z as default
252
+ _ as default
253
253
  };