inconel 0.1.0 → 0.1.2

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 (175) hide show
  1. package/README.md +31 -0
  2. package/dist/components/Button/Button.d.ts +8 -0
  3. package/dist/components/Button/Button.d.ts.map +1 -0
  4. package/dist/components/Button/index.d.ts +3 -0
  5. package/dist/components/Button/index.d.ts.map +1 -0
  6. package/dist/components/Checkbox/Checkbox.d.ts +7 -0
  7. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
  8. package/dist/components/Checkbox/index.d.ts +3 -0
  9. package/dist/components/Checkbox/index.d.ts.map +1 -0
  10. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +15 -0
  11. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
  12. package/dist/components/CheckboxGroup/index.d.ts +3 -0
  13. package/dist/components/CheckboxGroup/index.d.ts.map +1 -0
  14. package/dist/components/CheckboxGroup/utils.d.ts +2 -0
  15. package/dist/components/CheckboxGroup/utils.d.ts.map +1 -0
  16. package/dist/components/CurrencyInput/CurrencyInput.d.ts +6 -0
  17. package/dist/components/CurrencyInput/CurrencyInput.d.ts.map +1 -0
  18. package/dist/components/CurrencyInput/index.d.ts +3 -0
  19. package/dist/components/CurrencyInput/index.d.ts.map +1 -0
  20. package/dist/components/CustomizableSwitch/CustomizableSwitch.d.ts +4 -0
  21. package/dist/components/CustomizableSwitch/CustomizableSwitch.d.ts.map +1 -0
  22. package/dist/components/CustomizableSwitch/index.d.ts +3 -0
  23. package/dist/components/CustomizableSwitch/index.d.ts.map +1 -0
  24. package/dist/components/DataGrid/DataGrid.d.ts +4 -0
  25. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -0
  26. package/dist/components/DataGrid/index.d.ts +3 -0
  27. package/dist/components/DataGrid/index.d.ts.map +1 -0
  28. package/dist/components/DatePicker/DatePicker.d.ts +8 -0
  29. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
  30. package/dist/components/DatePicker/index.d.ts +3 -0
  31. package/dist/components/DatePicker/index.d.ts.map +1 -0
  32. package/dist/components/DatePicker/utils.d.ts +2 -0
  33. package/dist/components/DatePicker/utils.d.ts.map +1 -0
  34. package/dist/components/DndFileUpload/DndFileUpload.d.ts +4 -0
  35. package/dist/components/DndFileUpload/DndFileUpload.d.ts.map +1 -0
  36. package/dist/components/DndFileUpload/index.d.ts +3 -0
  37. package/dist/components/DndFileUpload/index.d.ts.map +1 -0
  38. package/dist/components/DotLoader/DotLoader.d.ts +6 -0
  39. package/dist/components/DotLoader/DotLoader.d.ts.map +1 -0
  40. package/dist/components/DotLoader/constants.d.ts +2 -0
  41. package/dist/components/DotLoader/constants.d.ts.map +1 -0
  42. package/dist/components/DotLoader/index.d.ts +3 -0
  43. package/dist/components/DotLoader/index.d.ts.map +1 -0
  44. package/dist/components/DragDropUpload/DragDropUpload.d.ts +8 -0
  45. package/dist/components/DragDropUpload/DragDropUpload.d.ts.map +1 -0
  46. package/dist/components/DragDropUpload/constants.d.ts +2 -0
  47. package/dist/components/DragDropUpload/constants.d.ts.map +1 -0
  48. package/dist/components/DragDropUpload/index.d.ts +3 -0
  49. package/dist/components/DragDropUpload/index.d.ts.map +1 -0
  50. package/dist/components/ExcelTable/ExcelTable.d.ts +4 -0
  51. package/dist/components/ExcelTable/ExcelTable.d.ts.map +1 -0
  52. package/dist/components/ExcelTable/index.d.ts +3 -0
  53. package/dist/components/ExcelTable/index.d.ts.map +1 -0
  54. package/dist/components/FieldFeedback/FieldFeedback.d.ts.map +1 -1
  55. package/dist/components/FileUpload/FileUpload.d.ts +8 -0
  56. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -0
  57. package/dist/components/FileUpload/constants.d.ts +2 -0
  58. package/dist/components/FileUpload/constants.d.ts.map +1 -0
  59. package/dist/components/FileUpload/index.d.ts +3 -0
  60. package/dist/components/FileUpload/index.d.ts.map +1 -0
  61. package/dist/components/FileUploadText/FileUploadText.d.ts +4 -0
  62. package/dist/components/FileUploadText/FileUploadText.d.ts.map +1 -0
  63. package/dist/components/FileUploadText/index.d.ts +3 -0
  64. package/dist/components/FileUploadText/index.d.ts.map +1 -0
  65. package/dist/components/Filter/Filter.d.ts +7 -0
  66. package/dist/components/Filter/Filter.d.ts.map +1 -0
  67. package/dist/components/Filter/index.d.ts +3 -0
  68. package/dist/components/Filter/index.d.ts.map +1 -0
  69. package/dist/components/HTMLTable/HTMLTable.d.ts +4 -0
  70. package/dist/components/HTMLTable/HTMLTable.d.ts.map +1 -0
  71. package/dist/components/HTMLTable/index.d.ts +3 -0
  72. package/dist/components/HTMLTable/index.d.ts.map +1 -0
  73. package/dist/components/HtmlEditor/HtmlEditor.d.ts +9 -0
  74. package/dist/components/HtmlEditor/HtmlEditor.d.ts.map +1 -0
  75. package/dist/components/HtmlEditor/index.d.ts +3 -0
  76. package/dist/components/HtmlEditor/index.d.ts.map +1 -0
  77. package/dist/components/Input/Input.d.ts.map +1 -1
  78. package/dist/components/InputText/InputText.d.ts +4 -0
  79. package/dist/components/InputText/InputText.d.ts.map +1 -0
  80. package/dist/components/InputText/index.d.ts +3 -0
  81. package/dist/components/InputText/index.d.ts.map +1 -0
  82. package/dist/components/Loader/Loader.d.ts +7 -0
  83. package/dist/components/Loader/Loader.d.ts.map +1 -0
  84. package/dist/components/Loader/constants.d.ts +2 -0
  85. package/dist/components/Loader/constants.d.ts.map +1 -0
  86. package/dist/components/Loader/index.d.ts +3 -0
  87. package/dist/components/Loader/index.d.ts.map +1 -0
  88. package/dist/components/LoaderMini/LoaderMini.d.ts +4 -0
  89. package/dist/components/LoaderMini/LoaderMini.d.ts.map +1 -0
  90. package/dist/components/LoaderMini/index.d.ts +3 -0
  91. package/dist/components/LoaderMini/index.d.ts.map +1 -0
  92. package/dist/components/Modal/Modal.d.ts +13 -0
  93. package/dist/components/Modal/Modal.d.ts.map +1 -0
  94. package/dist/components/Modal/constants.d.ts +2 -0
  95. package/dist/components/Modal/constants.d.ts.map +1 -0
  96. package/dist/components/Modal/index.d.ts +3 -0
  97. package/dist/components/Modal/index.d.ts.map +1 -0
  98. package/dist/components/MultiSelect/MultiSelect.d.ts +15 -0
  99. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -0
  100. package/dist/components/MultiSelect/index.d.ts +3 -0
  101. package/dist/components/MultiSelect/index.d.ts.map +1 -0
  102. package/dist/components/MultiSelectWithCheckbox/MultiSelectWithCheckbox.d.ts +4 -0
  103. package/dist/components/MultiSelectWithCheckbox/MultiSelectWithCheckbox.d.ts.map +1 -0
  104. package/dist/components/MultiSelectWithCheckbox/index.d.ts +3 -0
  105. package/dist/components/MultiSelectWithCheckbox/index.d.ts.map +1 -0
  106. package/dist/components/Option/Option.d.ts +8 -0
  107. package/dist/components/Option/Option.d.ts.map +1 -0
  108. package/dist/components/Option/index.d.ts +3 -0
  109. package/dist/components/Option/index.d.ts.map +1 -0
  110. package/dist/components/OptionWithIcon/OptionWithIcon.d.ts +4 -0
  111. package/dist/components/OptionWithIcon/OptionWithIcon.d.ts.map +1 -0
  112. package/dist/components/OptionWithIcon/index.d.ts +3 -0
  113. package/dist/components/OptionWithIcon/index.d.ts.map +1 -0
  114. package/dist/components/RadioGroup/RadioGroup.d.ts +15 -0
  115. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
  116. package/dist/components/RadioGroup/index.d.ts +3 -0
  117. package/dist/components/RadioGroup/index.d.ts.map +1 -0
  118. package/dist/components/ReadOnly/ReadOnly.d.ts +8 -0
  119. package/dist/components/ReadOnly/ReadOnly.d.ts.map +1 -0
  120. package/dist/components/ReadOnly/constants.d.ts +2 -0
  121. package/dist/components/ReadOnly/constants.d.ts.map +1 -0
  122. package/dist/components/ReadOnly/index.d.ts +3 -0
  123. package/dist/components/ReadOnly/index.d.ts.map +1 -0
  124. package/dist/components/Select/Select.d.ts.map +1 -1
  125. package/dist/components/SlideTabs/SlideTabs.d.ts +4 -0
  126. package/dist/components/SlideTabs/SlideTabs.d.ts.map +1 -0
  127. package/dist/components/SlideTabs/index.d.ts +3 -0
  128. package/dist/components/SlideTabs/index.d.ts.map +1 -0
  129. package/dist/components/SocketStatus/SocketStatus.d.ts +8 -0
  130. package/dist/components/SocketStatus/SocketStatus.d.ts.map +1 -0
  131. package/dist/components/SocketStatus/index.d.ts +3 -0
  132. package/dist/components/SocketStatus/index.d.ts.map +1 -0
  133. package/dist/components/Svg/Svg.d.ts +10 -0
  134. package/dist/components/Svg/Svg.d.ts.map +1 -0
  135. package/dist/components/Svg/index.d.ts +3 -0
  136. package/dist/components/Svg/index.d.ts.map +1 -0
  137. package/dist/components/Switch/Switch.d.ts +9 -0
  138. package/dist/components/Switch/Switch.d.ts.map +1 -0
  139. package/dist/components/Switch/index.d.ts +3 -0
  140. package/dist/components/Switch/index.d.ts.map +1 -0
  141. package/dist/components/Table/Table.d.ts +16 -0
  142. package/dist/components/Table/Table.d.ts.map +1 -0
  143. package/dist/components/Table/constants.d.ts +2 -0
  144. package/dist/components/Table/constants.d.ts.map +1 -0
  145. package/dist/components/Table/index.d.ts +3 -0
  146. package/dist/components/Table/index.d.ts.map +1 -0
  147. package/dist/components/Table/utils.d.ts +2 -0
  148. package/dist/components/Table/utils.d.ts.map +1 -0
  149. package/dist/components/Tabs/Tabs.d.ts +16 -0
  150. package/dist/components/Tabs/Tabs.d.ts.map +1 -0
  151. package/dist/components/Tabs/index.d.ts +3 -0
  152. package/dist/components/Tabs/index.d.ts.map +1 -0
  153. package/dist/components/TextEditor/TextEditor.d.ts +4 -0
  154. package/dist/components/TextEditor/TextEditor.d.ts.map +1 -0
  155. package/dist/components/TextEditor/index.d.ts +3 -0
  156. package/dist/components/TextEditor/index.d.ts.map +1 -0
  157. package/dist/components/TextInput/TextInput.d.ts +4 -0
  158. package/dist/components/TextInput/TextInput.d.ts.map +1 -0
  159. package/dist/components/TextInput/index.d.ts +3 -0
  160. package/dist/components/TextInput/index.d.ts.map +1 -0
  161. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  162. package/dist/components/Tooltip/Tooltip.d.ts +9 -0
  163. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
  164. package/dist/components/Tooltip/index.d.ts +3 -0
  165. package/dist/components/Tooltip/index.d.ts.map +1 -0
  166. package/dist/components/index.d.ts +35 -0
  167. package/dist/components/index.d.ts.map +1 -1
  168. package/dist/components/shared/classNames.d.ts +2 -0
  169. package/dist/components/shared/classNames.d.ts.map +1 -0
  170. package/dist/index.cjs +1 -1
  171. package/dist/index.cjs.map +1 -1
  172. package/dist/index.js +1047 -499
  173. package/dist/index.js.map +1 -1
  174. package/dist/styles.css +1 -1
  175. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -1,652 +1,1065 @@
1
- import { jsx as s, jsxs as k } from "react/jsx-runtime";
2
- import { forwardRef as ze, useId as Me, useState as F, useRef as xe, useMemo as Ae, useEffect as G, useCallback as ae, useImperativeHandle as Qe } from "react";
3
- import { useFloating as Re, autoUpdate as Ze, offset as en, flip as nn, shift as tn, size as rn } from "@floating-ui/react";
4
- import { useVirtualizer as ln } from "@tanstack/react-virtual";
5
- import { createPortal as on } from "react-dom";
6
- function Ce({
7
- hint: t,
8
- errorMessage: c,
9
- hintId: l,
10
- errorId: i,
1
+ import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as ue, useEffect as H, forwardRef as Me, useId as Ue, useState as w, useMemo as je, useCallback as se, useImperativeHandle as en } from "react";
3
+ import { useFloating as nn, autoUpdate as tn, offset as rn, flip as ln, shift as on, size as an } from "@floating-ui/react";
4
+ import { useVirtualizer as cn } from "@tanstack/react-virtual";
5
+ import { createPortal as sn } from "react-dom";
6
+ import { ReactSVG as un } from "react-svg";
7
+ function f(...e) {
8
+ return e.filter(Boolean).join(" ");
9
+ }
10
+ function dn({
11
+ loading: e = !1,
12
+ fullWidth: n = !1,
13
+ variant: t = "primary",
14
+ disabled: l,
15
+ className: o,
16
+ children: c,
17
+ ...s
18
+ }) {
19
+ return /* @__PURE__ */ p(
20
+ "button",
21
+ {
22
+ ...s,
23
+ disabled: l || e,
24
+ className: f(
25
+ "inconel-button",
26
+ `inconel-button--${t}`,
27
+ n && "inconel-button--full-width",
28
+ e && "inconel-is-loading",
29
+ o
30
+ ),
31
+ children: [
32
+ e && /* @__PURE__ */ r("span", { className: "inconel-button__spinner", "aria-hidden": "true" }),
33
+ c
34
+ ]
35
+ }
36
+ );
37
+ }
38
+ function fn({
39
+ label: e,
40
+ indeterminate: n = !1,
41
+ className: t,
42
+ ...l
43
+ }) {
44
+ const o = ue(null);
45
+ return H(() => {
46
+ o.current && (o.current.indeterminate = n);
47
+ }, [n]), /* @__PURE__ */ p("label", { className: f("inconel-checkbox", t), children: [
48
+ /* @__PURE__ */ r("input", { ...l, ref: o, type: "checkbox" }),
49
+ /* @__PURE__ */ r("span", { className: "inconel-checkbox__control", "aria-hidden": "true" }),
50
+ e && /* @__PURE__ */ r("span", { className: "inconel-checkbox__label", children: e })
51
+ ] });
52
+ }
53
+ function pn(e, n) {
54
+ return e.includes(n) ? e.filter((t) => t !== n) : [...e, n];
55
+ }
56
+ function hn({
57
+ options: e,
58
+ value: n = [],
59
+ onChange: t,
60
+ name: l,
61
+ className: o
62
+ }) {
63
+ const c = (s) => t?.(pn(n, s));
64
+ return /* @__PURE__ */ r("div", { className: f("inconel-checkbox-group", o), children: e.map((s) => /* @__PURE__ */ r(
65
+ fn,
66
+ {
67
+ name: l,
68
+ label: s.label,
69
+ value: s.value,
70
+ checked: n.includes(s.value),
71
+ disabled: s.disabled,
72
+ onChange: () => c(s.value)
73
+ },
74
+ s.value
75
+ )) });
76
+ }
77
+ function Oe({
78
+ hint: e,
79
+ errorMessage: n,
80
+ hintId: t,
81
+ errorId: l,
11
82
  className: o
12
83
  }) {
13
- return c ? /* @__PURE__ */ s(
84
+ return n ? /* @__PURE__ */ r(
14
85
  "p",
15
86
  {
16
- id: i,
17
- className: ["inconel-field-feedback", "is-error", o ?? ""].join(
18
- " "
19
- ),
87
+ id: l,
88
+ className: [
89
+ "inconel-field-feedback",
90
+ "inconel-is-error",
91
+ o ?? ""
92
+ ].join(" "),
20
93
  role: "alert",
21
- children: c
94
+ children: n
22
95
  }
23
- ) : t ? /* @__PURE__ */ s(
96
+ ) : e ? /* @__PURE__ */ r(
24
97
  "p",
25
98
  {
26
- id: l,
27
- className: ["inconel-field-feedback", "is-hint", o ?? ""].join(
28
- " "
29
- ),
30
- children: t
99
+ id: t,
100
+ className: [
101
+ "inconel-field-feedback",
102
+ "inconel-is-hint",
103
+ o ?? ""
104
+ ].join(" "),
105
+ children: e
31
106
  }
32
107
  ) : null;
33
108
  }
34
- const cn = [
109
+ const mn = [
35
110
  "number",
36
111
  "currency",
37
112
  "percent"
38
- ], sn = [
113
+ ], bn = [
39
114
  "text",
40
115
  "email",
41
116
  "password"
42
117
  ];
43
- function ie(t) {
44
- return cn.some((c) => c === t);
118
+ function le(e) {
119
+ return mn.some((n) => n === e);
45
120
  }
46
- function Ke(t) {
47
- return sn.some((c) => c === t);
121
+ function Ge(e) {
122
+ return bn.some((n) => n === e);
48
123
  }
49
- function Xe(t) {
50
- const c = new Intl.NumberFormat(t).formatToParts(1000.1);
124
+ function We(e) {
125
+ const n = new Intl.NumberFormat(e).formatToParts(1000.1);
51
126
  return {
52
- group: c.find((l) => l.type === "group")?.value ?? ".",
53
- decimal: c.find((l) => l.type === "decimal")?.value ?? ","
127
+ group: n.find((t) => t.type === "group")?.value ?? ".",
128
+ decimal: n.find((t) => t.type === "decimal")?.value ?? ","
54
129
  };
55
130
  }
56
- function an(t, c) {
57
- if (!t || t === "-") return null;
58
- const { group: l, decimal: i } = Xe(c), o = t.split(l).join("").replace(i, "."), u = Number(o);
59
- return Number.isNaN(u) ? null : u;
60
- }
61
- function un(t, c, l) {
62
- const i = 10 ** c;
63
- return l === "ceil" ? Math.ceil(t * i) / i : l === "round" ? Math.round(t * i) / i : t >= 0 ? Math.floor(t * i) / i : Math.ceil(t * i) / i;
64
- }
65
- function _e(t, c) {
66
- const l = String(t ?? "").replace(/\D/g, "");
67
- let i = 0, o = "";
68
- for (const u of c)
69
- if (u === "X") {
70
- if (i >= l.length) break;
71
- o += l[i++];
72
- } else i < l.length && (o += u);
131
+ function gn(e, n) {
132
+ if (!e || e === "-") return null;
133
+ const { group: t, decimal: l } = We(n), o = e.split(t).join("").replace(l, "."), c = Number(o);
134
+ return Number.isNaN(c) ? null : c;
135
+ }
136
+ function Nn(e, n, t) {
137
+ const l = 10 ** n;
138
+ return t === "ceil" ? Math.ceil(e * l) / l : t === "round" ? Math.round(e * l) / l : e >= 0 ? Math.floor(e * l) / l : Math.ceil(e * l) / l;
139
+ }
140
+ function Ce(e, n) {
141
+ const t = String(e ?? "").replace(/\D/g, "");
142
+ let l = 0, o = "";
143
+ for (const c of n)
144
+ if (c === "X") {
145
+ if (l >= t.length) break;
146
+ o += t[l++];
147
+ } else l < t.length && (o += c);
73
148
  return o;
74
149
  }
75
- function Ye(t, c, l, i, o, u) {
76
- return t == null || t === "" ? "" : c === "phone" && u ? _e(t, u) : !ie(c) || typeof t != "number" || Number.isNaN(t) ? String(t) : new Intl.NumberFormat(l, {
77
- style: c === "currency" ? "currency" : c === "percent" ? "percent" : "decimal",
78
- currency: c === "currency" ? o : void 0,
79
- minimumFractionDigits: i,
80
- maximumFractionDigits: i
81
- }).format(t);
82
- }
83
- function dn(t, {
84
- required: c,
85
- type: l,
86
- min: i,
150
+ function Re(e, n, t, l, o, c) {
151
+ return e == null || e === "" ? "" : n === "phone" && c ? Ce(e, c) : !le(n) || typeof e != "number" || Number.isNaN(e) ? String(e) : new Intl.NumberFormat(t, {
152
+ style: n === "currency" ? "currency" : n === "percent" ? "percent" : "decimal",
153
+ currency: n === "currency" ? o : void 0,
154
+ minimumFractionDigits: l,
155
+ maximumFractionDigits: l
156
+ }).format(e);
157
+ }
158
+ function _n(e, {
159
+ required: n,
160
+ type: t,
161
+ min: l,
87
162
  max: o,
88
- mask: u,
89
- messages: m
163
+ mask: c,
164
+ messages: s
90
165
  }) {
91
- if (c && (t == null || t === ""))
92
- return m.required ?? null;
93
- if (t == null || t === "")
166
+ if (n && (e == null || e === ""))
167
+ return s.required ?? null;
168
+ if (e == null || e === "")
94
169
  return null;
95
- if (l === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t)))
96
- return m.invalidEmail ?? null;
97
- if (l === "phone") {
98
- const I = String(t).replace(/\D/g, ""), T = u ? (u.match(/X/g) ?? []).length : I.startsWith("0") ? 11 : 10;
99
- if (I.length !== T) return m.invalidPhone ?? null;
170
+ if (t === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(e)))
171
+ return s.invalidEmail ?? null;
172
+ if (t === "phone") {
173
+ const d = String(e).replace(/\D/g, ""), m = c ? (c.match(/X/g) ?? []).length : d.startsWith("0") ? 11 : 10;
174
+ if (d.length !== m) return s.invalidPhone ?? null;
100
175
  }
101
- if (Ke(l)) {
102
- if (typeof i == "number" && String(t).length < i)
103
- return m.minLength?.replace("{min}", String(i)) ?? null;
104
- if (typeof o == "number" && String(t).length > o)
105
- return m.maxLength?.replace("{max}", String(o)) ?? null;
176
+ if (Ge(t)) {
177
+ if (typeof l == "number" && String(e).length < l)
178
+ return s.minLength?.replace("{min}", String(l)) ?? null;
179
+ if (typeof o == "number" && String(e).length > o)
180
+ return s.maxLength?.replace("{max}", String(o)) ?? null;
106
181
  }
107
- if (ie(l)) {
108
- if (typeof t != "number" || Number.isNaN(t))
109
- return m.invalidNumber ?? null;
110
- if (typeof i == "number" && t < i)
111
- return m.minNumber?.replace("{min}", String(i)) ?? null;
112
- if (typeof o == "number" && t > o)
113
- return m.maxNumber?.replace("{max}", String(o)) ?? null;
182
+ if (le(t)) {
183
+ if (typeof e != "number" || Number.isNaN(e))
184
+ return s.invalidNumber ?? null;
185
+ if (typeof l == "number" && e < l)
186
+ return s.minNumber?.replace("{min}", String(l)) ?? null;
187
+ if (typeof o == "number" && e > o)
188
+ return s.maxNumber?.replace("{max}", String(o)) ?? null;
114
189
  }
115
190
  return null;
116
191
  }
117
- const yn = ze(function({
118
- id: c,
119
- label: l,
120
- hint: i,
192
+ const ze = Me(function({
193
+ id: n,
194
+ label: t,
195
+ hint: l,
121
196
  errorMessage: o,
122
- startAdornment: u,
123
- endAdornment: m,
124
- fullWidth: I = !1,
125
- inputClassName: T,
126
- labelClassName: D,
127
- className: O,
128
- required: M,
129
- disabled: h,
130
- value: V,
131
- defaultValue: C = "",
132
- onChange: $,
197
+ startAdornment: c,
198
+ endAdornment: s,
199
+ fullWidth: d = !1,
200
+ inputClassName: m,
201
+ labelClassName: h,
202
+ className: K,
203
+ required: U,
204
+ disabled: y,
205
+ value: x,
206
+ defaultValue: O = "",
207
+ onChange: F,
133
208
  onBlur: S,
134
209
  onFocus: Y,
135
- onKeyDown: W,
136
- onMouseEnter: J,
137
- onMouseLeave: ke,
138
- type: p = "text",
139
- locale: K = "tr-TR",
140
- currency: Q = "TRY",
141
- decimalScale: R = 0,
142
- roundMode: Te = "floor",
143
- roundOnBlur: le = !1,
144
- min: H,
210
+ onKeyDown: X,
211
+ onMouseEnter: q,
212
+ onMouseLeave: De,
213
+ type: _ = "text",
214
+ locale: R = "tr-TR",
215
+ currency: J = "TRY",
216
+ decimalScale: Q = 0,
217
+ roundMode: Le = "floor",
218
+ roundOnBlur: ie = !1,
219
+ min: z,
145
220
  max: oe,
146
- allowNegative: ue = !1,
147
- debounceMs: de = 0,
148
- validateOnSubmit: fe = !1,
149
- validationMessages: y,
150
- mask: a,
151
- limit: j,
152
- isClearable: Ve = !1,
153
- readOnly: pe = !1,
221
+ allowNegative: de = !1,
222
+ debounceMs: fe = 0,
223
+ validateOnSubmit: pe = !1,
224
+ validationMessages: k,
225
+ mask: b,
226
+ limit: V,
227
+ isClearable: we = !1,
228
+ readOnly: he = !1,
154
229
  clearButtonLabel: me,
155
- readOnlyEmptyValue: $e = null,
230
+ readOnlyEmptyValue: Se = null,
156
231
  autoComplete: B = "off",
157
- "aria-describedby": he,
232
+ "aria-describedby": be,
158
233
  ...ge
159
- }, be) {
160
- const ye = Me(), X = c ?? `inconel-input-${ye.replace(/:/g, "")}`, P = `${X}-hint`, Z = `${X}-error`, d = V !== void 0, [Ie, L] = F(C), g = d ? V : Ie, [b, w] = F(""), [je, we] = F(!1), [Be, ee] = F(null), A = xe(null), Ne = y ?? {}, N = o ?? Be, U = (n) => dn(n, {
161
- required: !!M,
162
- type: p,
163
- min: H,
234
+ }, Ne) {
235
+ const _e = Ue(), G = n ?? `inconel-input-${_e.replace(/:/g, "")}`, $ = `${G}-hint`, Z = `${G}-error`, g = x !== void 0, [ye, j] = w(O), v = g ? x : ye, [E, T] = w(""), [Ae, ve] = w(!1), [xe, ee] = w(null), C = ue(null), Ee = k ?? {}, I = o ?? xe, P = (a) => _n(a, {
236
+ required: !!U,
237
+ type: _,
238
+ min: z,
164
239
  max: oe,
165
- mask: a,
166
- messages: Ne
167
- }), q = Ae(
168
- () => Ye(
169
- g,
170
- p,
171
- K,
240
+ mask: b,
241
+ messages: Ee
242
+ }), W = je(
243
+ () => Re(
244
+ v,
245
+ _,
172
246
  R,
173
247
  Q,
174
- a
248
+ J,
249
+ b
175
250
  ),
176
- [g, Q, R, K, a, p]
177
- ), x = (n, f, v = null) => ({
178
- rawValue: n,
179
- formattedValue: Ye(
180
- n,
181
- p,
182
- K,
251
+ [v, J, Q, R, b, _]
252
+ ), A = (a, N, D = null) => ({
253
+ rawValue: a,
254
+ formattedValue: Re(
255
+ a,
256
+ _,
183
257
  R,
184
258
  Q,
185
- a
259
+ J,
260
+ b
186
261
  ),
187
- error: !!U(n),
188
- char: v,
189
- eventType: f
190
- }), _ = (n, f = !1) => {
191
- d || L(n.rawValue), A.current && clearTimeout(A.current), $ && (f || de <= 0 ? $(n) : A.current = setTimeout(() => $(n), de));
262
+ error: !!P(a),
263
+ char: D,
264
+ eventType: N
265
+ }), M = (a, N = !1) => {
266
+ g || j(a.rawValue), C.current && clearTimeout(C.current), F && (N || fe <= 0 ? F(a) : C.current = setTimeout(() => F(a), fe));
192
267
  };
193
- G(() => () => {
194
- A.current && clearTimeout(A.current);
195
- }, []), G(() => {
196
- fe && ee(U(g));
197
- }, [fe]);
198
- const ne = (n) => {
199
- if (p === "phone" && a) return n.replace(/\D/g, "");
200
- if (ie(p)) {
201
- const f = an(n, K);
202
- return f === null ? n === "" ? null : n : ue ? f : Math.abs(f);
268
+ H(() => () => {
269
+ C.current && clearTimeout(C.current);
270
+ }, []), H(() => {
271
+ pe && ee(P(v));
272
+ }, [pe]);
273
+ const ne = (a) => {
274
+ if (_ === "phone" && b) return a.replace(/\D/g, "");
275
+ if (le(_)) {
276
+ const N = gn(a, R);
277
+ return N === null ? a === "" ? null : a : de ? N : Math.abs(N);
203
278
  }
204
- return n;
205
- }, ce = (n) => {
206
- const f = n.replace(/\D/g, "");
207
- if (j && (ie(p) || p === "phone") && f.length > j || j && Ke(p) && n.length > j) return;
208
- const v = ne(n);
209
- typeof v == "number" && (typeof H == "number" && v < H || typeof oe == "number" && v > oe) || (w(
210
- p === "phone" && a ? _e(v, a) : n
211
- ), _(x(v, "change", n.slice(-1) || null)));
279
+ return a;
280
+ }, ae = (a) => {
281
+ const N = a.replace(/\D/g, "");
282
+ if (V && (le(_) || _ === "phone") && N.length > V || V && Ge(_) && a.length > V) return;
283
+ const D = ne(a);
284
+ typeof D == "number" && (typeof z == "number" && D < z || typeof oe == "number" && D > oe) || (T(
285
+ _ === "phone" && b ? Ce(D, b) : a
286
+ ), M(A(D, "change", a.slice(-1) || null)));
212
287
  }, Fe = [
213
- he,
214
- i && !N ? P : void 0,
215
- N ? Z : void 0
288
+ be,
289
+ l && !I ? $ : void 0,
290
+ I ? Z : void 0
216
291
  ].filter(Boolean).join(" ") || void 0;
217
- return pe ? /* @__PURE__ */ k("div", { className: ["inconel-field", I ? "inconel-field--full-width" : "", O ?? ""].join(" "), children: [
218
- l && /* @__PURE__ */ s("span", { className: ["inconel-field__label", D ?? ""].join(" "), children: l }),
219
- /* @__PURE__ */ s("div", { className: "inconel-input-readonly", "aria-label": l, children: q || $e })
220
- ] }) : /* @__PURE__ */ k("div", { className: ["inconel-field", I ? "inconel-field--full-width" : "", O ?? ""].join(" "), children: [
221
- l && /* @__PURE__ */ k("label", { className: ["inconel-field__label", D ?? ""].join(" "), htmlFor: X, children: [
222
- l,
223
- M && /* @__PURE__ */ s("span", { className: "inconel-field__required", "aria-hidden": "true", children: " *" })
292
+ return he ? /* @__PURE__ */ p("div", { className: ["inconel-field", d ? "inconel-field--full-width" : "", K ?? ""].join(" "), children: [
293
+ t && /* @__PURE__ */ r("span", { className: ["inconel-field__label", h ?? ""].join(" "), children: t }),
294
+ /* @__PURE__ */ r("div", { className: "inconel-input-readonly", "aria-label": t, children: W || Se })
295
+ ] }) : /* @__PURE__ */ p("div", { className: ["inconel-field", d ? "inconel-field--full-width" : "", K ?? ""].join(" "), children: [
296
+ t && /* @__PURE__ */ p("label", { className: ["inconel-field__label", h ?? ""].join(" "), htmlFor: G, children: [
297
+ t,
298
+ U && /* @__PURE__ */ r("span", { className: "inconel-field__required", "aria-hidden": "true", children: " *" })
224
299
  ] }),
225
- /* @__PURE__ */ k("div", { className: ["inconel-input-control", N ? "is-invalid" : "", h ? "is-disabled" : ""].join(" "), children: [
226
- u && /* @__PURE__ */ s("span", { className: "inconel-input-adornment", "aria-hidden": "true", children: u }),
227
- /* @__PURE__ */ s(
300
+ /* @__PURE__ */ p("div", { className: ["inconel-input-control", I ? "inconel-is-invalid" : "", y ? "inconel-is-disabled" : ""].join(" "), children: [
301
+ c && /* @__PURE__ */ r("span", { className: "inconel-input-adornment", "aria-hidden": "true", children: c }),
302
+ /* @__PURE__ */ r(
228
303
  "input",
229
304
  {
230
305
  ...ge,
231
- ref: be,
232
- id: X,
233
- type: p === "password" || p === "email" ? p : "text",
234
- inputMode: ie(p) ? "decimal" : p === "phone" ? "tel" : void 0,
235
- value: je ? b : q,
236
- required: M,
237
- disabled: h,
306
+ ref: Ne,
307
+ id: G,
308
+ type: _ === "password" || _ === "email" ? _ : "text",
309
+ inputMode: le(_) ? "decimal" : _ === "phone" ? "tel" : void 0,
310
+ value: Ae ? E : W,
311
+ required: U,
312
+ disabled: y,
238
313
  autoComplete: B,
239
- "aria-invalid": !!N,
314
+ "aria-invalid": !!I,
240
315
  "aria-describedby": Fe,
241
- className: ["inconel-input", T ?? ""].join(" "),
242
- onChange: (n) => ce(n.target.value),
243
- onFocus: (n) => {
244
- if (h) return;
245
- we(!0);
246
- const f = p === "phone" && a ? _e(g, a) : ie(p) ? String(g ?? "").replace(".", Xe(K).decimal) : String(g ?? "");
247
- w(f), Y?.(x(g, "focus"), n);
316
+ className: ["inconel-input", m ?? ""].join(" "),
317
+ onChange: (a) => ae(a.target.value),
318
+ onFocus: (a) => {
319
+ if (y) return;
320
+ ve(!0);
321
+ const N = _ === "phone" && b ? Ce(v, b) : le(_) ? String(v ?? "").replace(".", We(R).decimal) : String(v ?? "");
322
+ T(N), Y?.(A(v, "focus"), a);
248
323
  },
249
- onBlur: (n) => {
250
- we(!1), A.current && clearTimeout(A.current);
251
- let f = ne(b);
252
- typeof f == "number" && (f = un(f, R, le ? Te : "floor")), ee(U(f));
253
- const v = x(f, "blur");
254
- _(v, !0), S?.(v, n);
324
+ onBlur: (a) => {
325
+ ve(!1), C.current && clearTimeout(C.current);
326
+ let N = ne(E);
327
+ typeof N == "number" && (N = Nn(N, Q, ie ? Le : "floor")), ee(P(N));
328
+ const D = A(N, "blur");
329
+ M(D, !0), S?.(D, a);
255
330
  },
256
- onKeyDown: (n) => {
257
- !ue && (n.key === "-" || n.key === "Subtract") && n.preventDefault(), W?.(x(g, "keydown", n.key), n);
331
+ onKeyDown: (a) => {
332
+ !de && (a.key === "-" || a.key === "Subtract") && a.preventDefault(), X?.(A(v, "keydown", a.key), a);
258
333
  },
259
- onMouseEnter: (n) => J?.(x(g, "mouseenter"), n),
260
- onMouseLeave: (n) => ke?.(x(g, "mouseleave"), n)
334
+ onMouseEnter: (a) => q?.(A(v, "mouseenter"), a),
335
+ onMouseLeave: (a) => De?.(A(v, "mouseleave"), a)
261
336
  }
262
337
  ),
263
- Ve && !h && q && me && /* @__PURE__ */ s(
338
+ we && !y && W && me && /* @__PURE__ */ r(
264
339
  "button",
265
340
  {
266
341
  type: "button",
267
342
  className: "inconel-input-clear",
268
343
  "aria-label": me,
269
344
  onClick: () => {
270
- w(""), ee(U(null)), _(x(null, "clear"), !0);
345
+ T(""), ee(P(null)), M(A(null, "clear"), !0);
271
346
  },
272
347
  children: "×"
273
348
  }
274
349
  ),
275
- m && /* @__PURE__ */ s("span", { className: "inconel-input-adornment", "aria-hidden": "true", children: m })
350
+ s && /* @__PURE__ */ r("span", { className: "inconel-input-adornment", "aria-hidden": "true", children: s })
276
351
  ] }),
277
- /* @__PURE__ */ s(
278
- Ce,
352
+ /* @__PURE__ */ r(
353
+ Oe,
279
354
  {
280
- hint: i,
281
- errorMessage: N,
282
- hintId: P,
355
+ hint: l,
356
+ errorMessage: I,
357
+ hintId: $,
283
358
  errorId: Z
284
359
  }
285
360
  )
286
361
  ] });
287
362
  });
288
- function z(...t) {
289
- return t.filter(Boolean).join(" ");
363
+ function Hn(e) {
364
+ return /* @__PURE__ */ r(ze, { ...e, type: "currency" });
290
365
  }
291
- function fn({
292
- id: t,
293
- name: c,
366
+ function yn({
367
+ label: e,
368
+ onLabel: n,
369
+ offLabel: t,
370
+ checked: l,
371
+ defaultChecked: o,
372
+ onChange: c,
373
+ className: s,
374
+ ...d
375
+ }) {
376
+ return /* @__PURE__ */ p("label", { className: f("inconel-switch", s), children: [
377
+ e && /* @__PURE__ */ r("span", { className: "inconel-switch__label", children: e }),
378
+ /* @__PURE__ */ r(
379
+ "input",
380
+ {
381
+ ...d,
382
+ type: "checkbox",
383
+ checked: l,
384
+ defaultChecked: o,
385
+ onChange: (m) => c?.(m.target.checked, m)
386
+ }
387
+ ),
388
+ /* @__PURE__ */ r("span", { className: "inconel-switch__track", children: /* @__PURE__ */ r("span", { className: "inconel-switch__thumb" }) }),
389
+ (n || t) && /* @__PURE__ */ r("span", { className: "inconel-switch__state", children: l ? n : t })
390
+ ] });
391
+ }
392
+ const Yn = yn, vn = "Kayıt bulunamadı.";
393
+ function En(e, n, t) {
394
+ return typeof t == "function" ? t(e, n) : t ? String(e[t]) : n;
395
+ }
396
+ function $e({
397
+ columns: e,
398
+ data: n,
399
+ rowKey: t,
400
+ emptyMessage: l = vn,
401
+ onRowClick: o,
402
+ className: c,
403
+ ...s
404
+ }) {
405
+ return /* @__PURE__ */ r("div", { className: "inconel-table-wrapper", children: /* @__PURE__ */ p("table", { ...s, className: f("inconel-table", c), children: [
406
+ /* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: e.map((d) => /* @__PURE__ */ r("th", { className: d.className, children: d.header }, String(d.key))) }) }),
407
+ /* @__PURE__ */ p("tbody", { children: [
408
+ n.map((d, m) => /* @__PURE__ */ r(
409
+ "tr",
410
+ {
411
+ onClick: () => o?.(d, m),
412
+ children: e.map((h) => /* @__PURE__ */ r("td", { className: h.className, children: h.render ? h.render(d, m) : String(d[h.key] ?? "") }, String(h.key)))
413
+ },
414
+ En(d, m, t)
415
+ )),
416
+ n.length === 0 && /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r("td", { className: "inconel-table__empty", colSpan: e.length, children: l }) })
417
+ ] })
418
+ ] }) });
419
+ }
420
+ const Rn = $e;
421
+ function kn(e) {
422
+ return e instanceof Date ? e.toISOString().slice(0, 10) : e ?? "";
423
+ }
424
+ function Gn({
425
+ value: e,
426
+ onChange: n,
427
+ label: t,
428
+ className: l,
429
+ ...o
430
+ }) {
431
+ const c = kn(e);
432
+ return /* @__PURE__ */ p("label", { className: f("inconel-date-picker", l), children: [
433
+ t && /* @__PURE__ */ r("span", { className: "inconel-field__label", children: t }),
434
+ /* @__PURE__ */ r(
435
+ "input",
436
+ {
437
+ ...o,
438
+ type: "date",
439
+ value: c,
440
+ onChange: (s) => n?.(s.target.value, s)
441
+ }
442
+ )
443
+ ] });
444
+ }
445
+ const Tn = "Dosya seç";
446
+ function Ke({
447
+ label: e = Tn,
448
+ files: n,
449
+ multiple: t,
450
+ onFilesChange: l,
451
+ className: o,
452
+ ...c
453
+ }) {
454
+ return /* @__PURE__ */ p("label", { className: f("inconel-file-upload", o), children: [
455
+ /* @__PURE__ */ r("span", { className: "inconel-file-upload__button", children: e }),
456
+ /* @__PURE__ */ r(
457
+ "input",
458
+ {
459
+ ...c,
460
+ type: "file",
461
+ multiple: t,
462
+ onChange: (s) => l?.(Array.from(s.target.files ?? []))
463
+ }
464
+ ),
465
+ n && n.length > 0 && /* @__PURE__ */ r("span", { className: "inconel-file-upload__text", children: n.map((s) => s.name).join(", ") })
466
+ ] });
467
+ }
468
+ const In = "Dosyaları buraya bırakın";
469
+ function Dn({
470
+ onDropFiles: e,
471
+ dropLabel: n = In,
472
+ className: t,
473
+ ...l
474
+ }) {
475
+ const [o, c] = w(!1), s = (d) => {
476
+ d.preventDefault(), c(!1), e?.(Array.from(d.dataTransfer.files));
477
+ };
478
+ return /* @__PURE__ */ p(
479
+ "div",
480
+ {
481
+ className: f(
482
+ "inconel-drag-drop-upload",
483
+ o && "inconel-is-dragging",
484
+ t
485
+ ),
486
+ onDragEnter: () => c(!0),
487
+ onDragLeave: () => c(!1),
488
+ onDragOver: (d) => d.preventDefault(),
489
+ onDrop: s,
490
+ children: [
491
+ /* @__PURE__ */ r("span", { children: n }),
492
+ /* @__PURE__ */ r(Ke, { ...l })
493
+ ]
494
+ }
495
+ );
496
+ }
497
+ const Wn = Dn, Ln = "Yükleniyor...";
498
+ function Kn({
499
+ label: e = Ln,
500
+ className: n,
501
+ ...t
502
+ }) {
503
+ return /* @__PURE__ */ p(
504
+ "span",
505
+ {
506
+ ...t,
507
+ className: f("inconel-dot-loader", n),
508
+ role: "status",
509
+ "aria-label": e,
510
+ children: [
511
+ /* @__PURE__ */ r("i", {}),
512
+ /* @__PURE__ */ r("i", {}),
513
+ /* @__PURE__ */ r("i", {})
514
+ ]
515
+ }
516
+ );
517
+ }
518
+ const Xn = $e, qn = Ke;
519
+ function Jn({
520
+ children: e,
521
+ onClear: n,
522
+ clearLabel: t = "Temizle",
523
+ className: l,
524
+ ...o
525
+ }) {
526
+ return /* @__PURE__ */ p("div", { ...o, className: f("inconel-filter", l), children: [
527
+ /* @__PURE__ */ r("div", { className: "inconel-filter__content", children: e }),
528
+ n && /* @__PURE__ */ r(dn, { type: "button", variant: "ghost", onClick: n, children: t })
529
+ ] });
530
+ }
531
+ const Qn = $e;
532
+ function wn({
533
+ value: e,
534
+ onChange: n,
535
+ placeholder: t,
536
+ readOnly: l = !1,
537
+ className: o,
538
+ ...c
539
+ }) {
540
+ return /* @__PURE__ */ r(
541
+ "div",
542
+ {
543
+ ...c,
544
+ className: f("inconel-editor", o),
545
+ contentEditable: !l,
546
+ suppressContentEditableWarning: !0,
547
+ "data-placeholder": t,
548
+ dangerouslySetInnerHTML: { __html: e ?? "" },
549
+ onInput: (s) => n?.(s.currentTarget.innerHTML)
550
+ }
551
+ );
552
+ }
553
+ const Zn = ze, Sn = "Yükleniyor...";
554
+ function An({
555
+ label: e = Sn,
556
+ fullscreen: n = !1,
557
+ className: t,
558
+ ...l
559
+ }) {
560
+ return /* @__PURE__ */ r(
561
+ "div",
562
+ {
563
+ ...l,
564
+ className: f(
565
+ "inconel-loader",
566
+ n && "inconel-loader--fullscreen",
567
+ t
568
+ ),
569
+ role: "status",
570
+ "aria-label": e,
571
+ children: /* @__PURE__ */ r("span", { className: "inconel-loader__spinner", "aria-hidden": "true" })
572
+ }
573
+ );
574
+ }
575
+ function et(e) {
576
+ return /* @__PURE__ */ r(An, { ...e, className: f("inconel-loader--mini", e.className) });
577
+ }
578
+ const xn = "Kapat";
579
+ function nt({
580
+ open: e,
581
+ title: n,
582
+ children: t,
583
+ footer: l,
584
+ closeLabel: o = xn,
585
+ closeOnBackdrop: c = !0,
586
+ onClose: s,
587
+ className: d
588
+ }) {
589
+ return e ? /* @__PURE__ */ r(
590
+ "div",
591
+ {
592
+ className: "inconel-modal-backdrop",
593
+ role: "presentation",
594
+ onMouseDown: (m) => {
595
+ c && m.target === m.currentTarget && s?.();
596
+ },
597
+ children: /* @__PURE__ */ p(
598
+ "section",
599
+ {
600
+ className: f("inconel-modal", d),
601
+ role: "dialog",
602
+ "aria-modal": "true",
603
+ "aria-label": typeof n == "string" ? n : void 0,
604
+ children: [
605
+ /* @__PURE__ */ p("header", { className: "inconel-modal__header", children: [
606
+ /* @__PURE__ */ r("div", { className: "inconel-modal__title", children: n }),
607
+ /* @__PURE__ */ r(
608
+ "button",
609
+ {
610
+ type: "button",
611
+ className: "inconel-modal__close",
612
+ "aria-label": o,
613
+ onClick: s,
614
+ children: "×"
615
+ }
616
+ )
617
+ ] }),
618
+ /* @__PURE__ */ r("div", { className: "inconel-modal__content", children: t }),
619
+ l && /* @__PURE__ */ r("footer", { className: "inconel-modal__footer", children: l })
620
+ ]
621
+ }
622
+ )
623
+ }
624
+ ) : null;
625
+ }
626
+ function Fn({
627
+ options: e,
628
+ value: n = [],
629
+ onChange: t,
294
630
  label: l,
295
- options: i,
631
+ className: o
632
+ }) {
633
+ return /* @__PURE__ */ p("fieldset", { className: f("inconel-multi-select", o), children: [
634
+ l && /* @__PURE__ */ r("legend", { children: l }),
635
+ /* @__PURE__ */ r(hn, { options: e, value: n, onChange: t })
636
+ ] });
637
+ }
638
+ const tt = Fn;
639
+ function Vn({
640
+ selected: e,
641
+ disabled: n,
642
+ icon: t,
643
+ children: l,
644
+ className: o,
645
+ ...c
646
+ }) {
647
+ return /* @__PURE__ */ p(
648
+ "div",
649
+ {
650
+ ...c,
651
+ role: "option",
652
+ "aria-selected": e,
653
+ "aria-disabled": n,
654
+ className: f(
655
+ "inconel-option",
656
+ e && "inconel-is-selected",
657
+ n && "inconel-is-disabled",
658
+ o
659
+ ),
660
+ children: [
661
+ t && /* @__PURE__ */ r("span", { className: "inconel-option__icon", children: t }),
662
+ l
663
+ ]
664
+ }
665
+ );
666
+ }
667
+ const rt = Vn;
668
+ function lt({
669
+ options: e,
670
+ value: n,
671
+ onChange: t,
672
+ name: l,
673
+ className: o
674
+ }) {
675
+ return /* @__PURE__ */ r("div", { className: f("inconel-radio-group", o), children: e.map((c) => /* @__PURE__ */ p("label", { className: "inconel-radio", children: [
676
+ /* @__PURE__ */ r(
677
+ "input",
678
+ {
679
+ type: "radio",
680
+ name: l,
681
+ value: c.value,
682
+ checked: c.value === n,
683
+ disabled: c.disabled,
684
+ onChange: () => t?.(c.value)
685
+ }
686
+ ),
687
+ /* @__PURE__ */ r("span", { className: "inconel-radio__control", "aria-hidden": "true" }),
688
+ /* @__PURE__ */ r("span", { children: c.label })
689
+ ] }, c.value)) });
690
+ }
691
+ const Bn = "—";
692
+ function it({
693
+ label: e,
694
+ value: n,
695
+ emptyValue: t = Bn,
696
+ className: l,
697
+ ...o
698
+ }) {
699
+ return /* @__PURE__ */ p("div", { ...o, className: f("inconel-read-only", l), children: [
700
+ e && /* @__PURE__ */ r("span", { className: "inconel-read-only__label", children: e }),
701
+ /* @__PURE__ */ r("span", { className: "inconel-read-only__value", children: n == null || n === "" ? t : n })
702
+ ] });
703
+ }
704
+ function jn({
705
+ id: e,
706
+ name: n,
707
+ label: t,
708
+ options: l,
296
709
  value: o,
297
- onChange: u,
298
- optionLabel: m,
299
- optionValue: I,
300
- getOptionSearchText: T,
301
- isOptionDisabled: D = () => !1,
302
- placeholder: O,
303
- isClearable: M = !1,
304
- isDisabled: h = !1,
305
- isReadOnly: V = !1,
306
- isRequired: C = !1,
307
- isLoading: $ = !1,
710
+ onChange: c,
711
+ optionLabel: s,
712
+ optionValue: d,
713
+ getOptionSearchText: m,
714
+ isOptionDisabled: h = () => !1,
715
+ placeholder: K,
716
+ isClearable: U = !1,
717
+ isDisabled: y = !1,
718
+ isReadOnly: x = !1,
719
+ isRequired: O = !1,
720
+ isLoading: F = !1,
308
721
  loadOptions: S,
309
722
  loadOptionsDebounceMs: Y = 250,
310
- hint: W,
311
- errorMessage: J,
312
- asyncErrorMessage: ke,
313
- loadingMessage: p,
314
- noOptionsMessage: K,
315
- clearButtonLabel: Q,
316
- openMenuButtonLabel: R,
317
- closeMenuButtonLabel: Te,
318
- searchLocale: le,
319
- menuPortalTarget: H,
723
+ hint: X,
724
+ errorMessage: q,
725
+ asyncErrorMessage: De,
726
+ loadingMessage: _,
727
+ noOptionsMessage: R,
728
+ clearButtonLabel: J,
729
+ openMenuButtonLabel: Q,
730
+ closeMenuButtonLabel: Le,
731
+ searchLocale: ie,
732
+ menuPortalTarget: z,
320
733
  virtualize: oe = !1,
321
- virtualizationThreshold: ue = 100,
322
- optionHeight: de = 44,
323
- className: fe,
324
- classNames: y = {},
325
- styles: a = {},
326
- onInputChange: j,
327
- onMenuOpen: Ve,
328
- onMenuClose: pe
734
+ virtualizationThreshold: de = 100,
735
+ optionHeight: fe = 44,
736
+ className: pe,
737
+ classNames: k = {},
738
+ styles: b = {},
739
+ onInputChange: V,
740
+ onMenuOpen: we,
741
+ onMenuClose: he
329
742
  }, me) {
330
- const $e = Me(), B = t ?? `inconel-select-${$e.replace(/:/g, "")}`, he = `${B}-label`, ge = `${B}-listbox`, be = `${B}-message`, ye = `${B}-hint`, X = xe(null), P = xe(null), Z = xe(null), [d, Ie] = F(!1), [L, g] = F(""), [b, w] = F(0), [je, we] = F(null), [Be, ee] = F(!1), [A, Ne] = F(!1);
331
- G(() => {
743
+ const Se = Ue(), B = e ?? `inconel-select-${Se.replace(/:/g, "")}`, be = `${B}-label`, ge = `${B}-listbox`, Ne = `${B}-message`, _e = `${B}-hint`, G = ue(null), $ = ue(null), Z = ue(null), [g, ye] = w(!1), [j, v] = w(""), [E, T] = w(0), [Ae, ve] = w(null), [xe, ee] = w(!1), [C, Ee] = w(!1);
744
+ H(() => {
332
745
  if (!S) return;
333
- const e = new AbortController(), r = window.setTimeout(async () => {
334
- ee(!0), Ne(!1);
746
+ const i = new AbortController(), u = window.setTimeout(async () => {
747
+ ee(!0), Ee(!1);
335
748
  try {
336
- const E = await S(
337
- L,
338
- e.signal
749
+ const L = await S(
750
+ j,
751
+ i.signal
339
752
  );
340
- e.signal.aborted || we(E);
753
+ i.signal.aborted || ve(L);
341
754
  } catch {
342
- e.signal.aborted || Ne(!0);
755
+ i.signal.aborted || Ee(!0);
343
756
  } finally {
344
- e.signal.aborted || ee(!1);
757
+ i.signal.aborted || ee(!1);
345
758
  }
346
759
  }, Y);
347
760
  return () => {
348
- window.clearTimeout(r), e.abort();
761
+ window.clearTimeout(u), i.abort();
349
762
  };
350
- }, [L, S, Y]);
351
- const N = S ? je ?? i : i, U = $ || Be, q = ae(
352
- (e) => typeof m == "function" ? m(e) : String(e[m]),
353
- [m]
354
- ), x = ae(
355
- (e) => {
356
- if (T) return T(e);
357
- const r = q(e);
358
- return typeof r == "string" || typeof r == "number" ? String(r) : "";
763
+ }, [j, S, Y]);
764
+ const I = S ? Ae ?? l : l, P = F || xe, W = se(
765
+ (i) => typeof s == "function" ? s(i) : String(i[s]),
766
+ [s]
767
+ ), A = se(
768
+ (i) => {
769
+ if (m) return m(i);
770
+ const u = W(i);
771
+ return typeof u == "string" || typeof u == "number" ? String(u) : "";
359
772
  },
360
- [q, T]
361
- ), _ = ae(
362
- (e) => {
363
- const r = typeof I == "function" ? I(e) : e[I];
364
- if (typeof r != "string" && typeof r != "number")
773
+ [W, m]
774
+ ), M = se(
775
+ (i) => {
776
+ const u = typeof d == "function" ? d(i) : i[d];
777
+ if (typeof u != "string" && typeof u != "number")
365
778
  throw new TypeError("optionValue must resolve to a string or number.");
366
- return r;
779
+ return u;
367
780
  },
368
- [I]
369
- ), ne = Ae(() => {
370
- const e = /* @__PURE__ */ new Set();
371
- return N.map(_).filter((r) => e.has(r) ? !0 : (e.add(r), !1));
372
- }, [N, _]);
373
- G(() => {
781
+ [d]
782
+ ), ne = je(() => {
783
+ const i = /* @__PURE__ */ new Set();
784
+ return I.map(M).filter((u) => i.has(u) ? !0 : (i.add(u), !1));
785
+ }, [I, M]);
786
+ H(() => {
374
787
  ne.length && console.warn(
375
- `Duplicate optionValue found in Select "${l}":`,
788
+ `Duplicate optionValue found in Select "${t}":`,
376
789
  ne
377
790
  );
378
- }, [ne, l]);
379
- const ce = [...i, ...N].find(
380
- (e) => _(e) === o
381
- ), Fe = ce ? x(ce) : "", n = Ae(() => {
382
- const e = L.trim().toLocaleLowerCase(le);
383
- return !e || S ? N : N.filter(
384
- (r) => x(r).toLocaleLowerCase(le).includes(e)
791
+ }, [ne, t]);
792
+ const ae = [...l, ...I].find(
793
+ (i) => M(i) === o
794
+ ), Fe = ae ? A(ae) : "", a = je(() => {
795
+ const i = j.trim().toLocaleLowerCase(ie);
796
+ return !i || S ? I : I.filter(
797
+ (u) => A(u).toLocaleLowerCase(ie).includes(i)
385
798
  );
386
- }, [N, x, L, S, le]), { refs: f, floatingStyles: v } = Re({
387
- open: d,
799
+ }, [I, A, j, S, ie]), { refs: N, floatingStyles: D } = nn({
800
+ open: g,
388
801
  placement: "bottom-start",
389
- strategy: H ? "fixed" : "absolute",
390
- whileElementsMounted: Ze,
802
+ strategy: z ? "fixed" : "absolute",
803
+ whileElementsMounted: tn,
391
804
  middleware: [
392
- en(8),
393
- nn({ padding: 12 }),
394
- tn({ padding: 12 }),
395
- rn({
805
+ rn(8),
806
+ ln({ padding: 12 }),
807
+ on({ padding: 12 }),
808
+ an({
396
809
  padding: 12,
397
- apply({ availableHeight: e, rects: r, elements: E }) {
398
- Object.assign(E.floating.style, {
399
- maxHeight: `${Math.min(230, e)}px`,
400
- width: `${r.reference.width}px`
810
+ apply({ availableHeight: i, rects: u, elements: L }) {
811
+ Object.assign(L.floating.style, {
812
+ maxHeight: `${Math.min(230, i)}px`,
813
+ width: `${u.reference.width}px`
401
814
  });
402
815
  }
403
816
  })
404
817
  ]
405
- }), ve = oe || n.length >= ue, Ee = ln({
406
- count: n.length,
818
+ }), ke = oe || a.length >= de, Te = cn({
819
+ count: a.length,
407
820
  getScrollElement: () => Z.current,
408
- estimateSize: () => de,
821
+ estimateSize: () => fe,
409
822
  overscan: 5,
410
- enabled: ve && d
411
- }), te = ae(() => {
412
- Ie(!1), g(""), j?.(""), pe?.();
413
- }, [j, pe]), se = () => {
414
- h || V || (d || Ve?.(), Ie(!0));
415
- }, Se = ae(() => {
416
- h || V || (u(null, null), g(""), w(0), j?.(""), P.current?.focus());
417
- }, [h, V, u, j]);
418
- Qe(
823
+ enabled: ke && g
824
+ }), te = se(() => {
825
+ ye(!1), v(""), V?.(""), he?.();
826
+ }, [V, he]), ce = () => {
827
+ y || x || (g || we?.(), ye(!0));
828
+ }, Ie = se(() => {
829
+ y || x || (c(null, null), v(""), T(0), V?.(""), $.current?.focus());
830
+ }, [y, x, c, V]);
831
+ en(
419
832
  me,
420
833
  () => ({
421
- focus: () => P.current?.focus(),
422
- blur: () => P.current?.blur(),
423
- clear: Se
834
+ focus: () => $.current?.focus(),
835
+ blur: () => $.current?.blur(),
836
+ clear: Ie
424
837
  }),
425
- [Se]
426
- ), G(() => {
427
- const e = (r) => {
428
- const E = r.target;
429
- !X.current?.contains(E) && !Z.current?.contains(E) && te();
838
+ [Ie]
839
+ ), H(() => {
840
+ const i = (u) => {
841
+ const L = u.target;
842
+ !G.current?.contains(L) && !Z.current?.contains(L) && te();
430
843
  };
431
- return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
432
- }, [te]), G(() => {
433
- b >= n.length && w(0);
434
- }, [b, n.length]), G(() => {
435
- ve && d && n[b] && Ee.scrollToIndex(b, { align: "auto" });
844
+ return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
845
+ }, [te]), H(() => {
846
+ E >= a.length && T(0);
847
+ }, [E, a.length]), H(() => {
848
+ ke && g && a[E] && Te.scrollToIndex(E, { align: "auto" });
436
849
  }, [
437
- b,
438
- n,
439
- d,
440
- ve,
441
- Ee
850
+ E,
851
+ a,
852
+ g,
853
+ ke,
854
+ Te
442
855
  ]);
443
- const He = (e) => {
444
- D(e) || (u(_(e), e), te(), P.current?.focus());
445
- }, qe = (e) => {
446
- if (!n.length) return;
447
- let r = b;
856
+ const Pe = (i) => {
857
+ h(i) || (c(M(i), i), te(), $.current?.focus());
858
+ }, Xe = (i) => {
859
+ if (!a.length) return;
860
+ let u = E;
448
861
  do
449
- r = (r + e + n.length) % n.length;
450
- while (D(n[r]) && r !== b);
451
- w(r);
452
- }, De = (e = !1) => {
453
- const r = n.map((E, re) => ({ option: E, index: re }));
454
- return e && r.reverse(), r.find(({ option: E }) => !D(E))?.index ?? 0;
455
- }, Ge = (e) => {
456
- if (e.key === "Backspace" && !L && o !== null && M) {
457
- e.preventDefault(), Se();
862
+ u = (u + i + a.length) % a.length;
863
+ while (h(a[u]) && u !== E);
864
+ T(u);
865
+ }, Ve = (i = !1) => {
866
+ const u = a.map((L, re) => ({ option: L, index: re }));
867
+ return i && u.reverse(), u.find(({ option: L }) => !h(L))?.index ?? 0;
868
+ }, qe = (i) => {
869
+ if (i.key === "Backspace" && !j && o !== null && U) {
870
+ i.preventDefault(), Ie();
458
871
  return;
459
872
  }
460
- if (e.key === "ArrowDown" || e.key === "ArrowUp")
461
- e.preventDefault(), d ? qe(e.key === "ArrowDown" ? 1 : -1) : (se(), w(De(e.key === "ArrowUp")));
462
- else if (e.key === "Home" && d)
463
- e.preventDefault(), w(De());
464
- else if (e.key === "End" && d)
465
- e.preventDefault(), w(De(!0));
466
- else if (e.key === "Enter" && d) {
467
- e.preventDefault();
468
- const r = n[b];
469
- r && He(r);
470
- } else e.key === "Escape" && d ? (e.preventDefault(), te()) : e.key === "Tab" && te();
471
- }, Pe = (e, r, E) => {
472
- const re = _(e), Ue = D(e);
473
- return /* @__PURE__ */ k(
873
+ if (i.key === "ArrowDown" || i.key === "ArrowUp")
874
+ i.preventDefault(), g ? Xe(i.key === "ArrowDown" ? 1 : -1) : (ce(), T(Ve(i.key === "ArrowUp")));
875
+ else if (i.key === "Home" && g)
876
+ i.preventDefault(), T(Ve());
877
+ else if (i.key === "End" && g)
878
+ i.preventDefault(), T(Ve(!0));
879
+ else if (i.key === "Enter" && g) {
880
+ i.preventDefault();
881
+ const u = a[E];
882
+ u && Pe(u);
883
+ } else i.key === "Escape" && g ? (i.preventDefault(), te()) : i.key === "Tab" && te();
884
+ }, He = (i, u, L) => {
885
+ const re = M(i), Ye = h(i);
886
+ return /* @__PURE__ */ p(
474
887
  "div",
475
888
  {
476
- id: `${B}-option-${r}`,
889
+ id: `${B}-option-${u}`,
477
890
  role: "option",
478
891
  "aria-selected": re === o,
479
- "aria-disabled": Ue,
480
- "aria-posinset": r + 1,
481
- "aria-setsize": n.length,
482
- className: z(
892
+ "aria-disabled": Ye,
893
+ "aria-posinset": u + 1,
894
+ "aria-setsize": a.length,
895
+ className: f(
483
896
  "inconel-select-option",
484
- r === b && "is-active",
485
- re === o && "is-selected",
486
- Ue && "is-disabled",
487
- y.option
897
+ u === E && "inconel-is-active",
898
+ re === o && "inconel-is-selected",
899
+ Ye && "inconel-is-disabled",
900
+ k.option
488
901
  ),
489
- style: { ...E, ...a.option },
490
- onMouseEnter: () => w(r),
491
- onMouseDown: (Je) => Je.preventDefault(),
492
- onClick: () => He(e),
902
+ style: { ...L, ...b.option },
903
+ onMouseEnter: () => T(u),
904
+ onMouseDown: (Ze) => Ze.preventDefault(),
905
+ onClick: () => Pe(i),
493
906
  children: [
494
- /* @__PURE__ */ s("span", { children: q(e) }),
495
- re === o && /* @__PURE__ */ s("span", { "aria-hidden": "true", children: "✓" })
907
+ /* @__PURE__ */ r("span", { children: W(i) }),
908
+ re === o && /* @__PURE__ */ r("span", { "aria-hidden": "true", children: "✓" })
496
909
  ]
497
910
  },
498
911
  re
499
912
  );
500
- }, Oe = U ? /* @__PURE__ */ k(
913
+ }, Je = P ? /* @__PURE__ */ p(
501
914
  "div",
502
915
  {
503
916
  role: "status",
504
- className: z("inconel-select-message", y.message),
505
- style: a.message,
917
+ className: f("inconel-select-message", k.message),
918
+ style: b.message,
506
919
  children: [
507
- /* @__PURE__ */ s("span", { className: "inconel-select-spinner", "aria-hidden": "true" }),
508
- p
920
+ /* @__PURE__ */ r("span", { className: "inconel-select-spinner", "aria-hidden": "true" }),
921
+ _
509
922
  ]
510
923
  }
511
- ) : A ? /* @__PURE__ */ s(
924
+ ) : C ? /* @__PURE__ */ r(
512
925
  "div",
513
926
  {
514
927
  role: "alert",
515
- className: z("inconel-select-message inconel-select-message-error", y.message),
516
- style: a.message,
517
- children: ke
928
+ className: f("inconel-select-message inconel-select-message-error", k.message),
929
+ style: b.message,
930
+ children: De
518
931
  }
519
- ) : n.length === 0 ? /* @__PURE__ */ s(
932
+ ) : a.length === 0 ? /* @__PURE__ */ r(
520
933
  "div",
521
934
  {
522
- className: z("inconel-select-message", y.message),
523
- style: a.message,
524
- children: K
935
+ className: f("inconel-select-message", k.message),
936
+ style: b.message,
937
+ children: R
525
938
  }
526
- ) : ve ? /* @__PURE__ */ s(
939
+ ) : ke ? /* @__PURE__ */ r(
527
940
  "div",
528
941
  {
529
942
  role: "presentation",
530
943
  className: "inconel-select-virtual-content",
531
- style: { height: Ee.getTotalSize() },
532
- children: Ee.getVirtualItems().map(
533
- (e) => Pe(n[e.index], e.index, {
944
+ style: { height: Te.getTotalSize() },
945
+ children: Te.getVirtualItems().map(
946
+ (i) => He(a[i.index], i.index, {
534
947
  position: "absolute",
535
948
  top: 0,
536
949
  left: 0,
537
950
  width: "100%",
538
- height: e.size,
539
- transform: `translateY(${e.start}px)`
951
+ height: i.size,
952
+ transform: `translateY(${i.start}px)`
540
953
  })
541
954
  )
542
955
  }
543
- ) : n.map((e, r) => Pe(e, r)), Le = d ? /* @__PURE__ */ s(
956
+ ) : a.map((i, u) => He(i, u)), Be = g ? /* @__PURE__ */ r(
544
957
  "div",
545
958
  {
546
- ref: (e) => {
547
- Z.current = e, f.setFloating(e);
959
+ ref: (i) => {
960
+ Z.current = i, N.setFloating(i);
548
961
  },
549
962
  id: ge,
550
963
  role: "listbox",
551
- "aria-labelledby": he,
552
- className: z(
964
+ "aria-labelledby": be,
965
+ className: f(
553
966
  "inconel-select-menu",
554
- H && "inconel-select-menu-portal",
555
- y.menu
967
+ z && "inconel-select-menu-portal",
968
+ k.menu
556
969
  ),
557
- style: { ...v, ...a.menu },
558
- children: Oe
970
+ style: { ...D, ...b.menu },
971
+ children: Je
559
972
  }
560
- ) : null, We = J ? be : W ? ye : void 0;
561
- return /* @__PURE__ */ k(
973
+ ) : null, Qe = q ? Ne : X ? _e : void 0;
974
+ return /* @__PURE__ */ p(
562
975
  "div",
563
976
  {
564
- ref: X,
565
- className: z("inconel-select-field", fe, y.root),
566
- style: a.root,
977
+ ref: G,
978
+ className: f("inconel-select-field", pe, k.root),
979
+ style: b.root,
567
980
  children: [
568
- /* @__PURE__ */ k(
981
+ /* @__PURE__ */ p(
569
982
  "label",
570
983
  {
571
- id: he,
984
+ id: be,
572
985
  htmlFor: B,
573
- className: y.label,
574
- style: a.label,
986
+ className: k.label,
987
+ style: b.label,
575
988
  children: [
576
- l,
577
- C && /* @__PURE__ */ s("span", { "aria-hidden": "true", children: " *" })
989
+ t,
990
+ O && /* @__PURE__ */ r("span", { "aria-hidden": "true", children: " *" })
578
991
  ]
579
992
  }
580
993
  ),
581
- /* @__PURE__ */ k(
994
+ /* @__PURE__ */ p(
582
995
  "div",
583
996
  {
584
- ref: f.setReference,
585
- className: z(
997
+ ref: N.setReference,
998
+ className: f(
586
999
  "inconel-select-control",
587
- d && "is-open",
588
- h && "is-disabled",
589
- !!J && "has-error",
590
- y.control
1000
+ g && "inconel-is-open",
1001
+ y && "inconel-is-disabled",
1002
+ !!q && "inconel-has-error",
1003
+ k.control
591
1004
  ),
592
- style: a.control,
1005
+ style: b.control,
593
1006
  children: [
594
- /* @__PURE__ */ s(
1007
+ /* @__PURE__ */ r(
595
1008
  "input",
596
1009
  {
597
- ref: P,
1010
+ ref: $,
598
1011
  id: B,
599
1012
  role: "combobox",
600
- "aria-expanded": d,
1013
+ "aria-expanded": g,
601
1014
  "aria-controls": ge,
602
1015
  "aria-autocomplete": "list",
603
- "aria-activedescendant": d && n[b] ? `${B}-option-${b}` : void 0,
604
- "aria-describedby": We,
605
- "aria-invalid": !!J,
606
- "aria-required": C,
607
- "aria-busy": U,
608
- required: C,
609
- disabled: h,
610
- readOnly: V,
1016
+ "aria-activedescendant": g && a[E] ? `${B}-option-${E}` : void 0,
1017
+ "aria-describedby": Qe,
1018
+ "aria-invalid": !!q,
1019
+ "aria-required": O,
1020
+ "aria-busy": P,
1021
+ required: O,
1022
+ disabled: y,
1023
+ readOnly: x,
611
1024
  autoComplete: "off",
612
- placeholder: O,
613
- value: L || Fe,
614
- className: y.input,
615
- style: a.input,
616
- onChange: (e) => {
617
- g(e.target.value), w(0), j?.(e.target.value), se();
1025
+ placeholder: K,
1026
+ value: j || Fe,
1027
+ className: k.input,
1028
+ style: b.input,
1029
+ onChange: (i) => {
1030
+ v(i.target.value), T(0), V?.(i.target.value), ce();
618
1031
  },
619
- onClick: se,
620
- onFocus: (e) => {
621
- se(), ce && !L && e.currentTarget.select();
1032
+ onClick: ce,
1033
+ onFocus: (i) => {
1034
+ ce(), ae && !j && i.currentTarget.select();
622
1035
  },
623
- onKeyDown: Ge
1036
+ onKeyDown: qe
624
1037
  }
625
1038
  ),
626
- U && /* @__PURE__ */ s("span", { className: "inconel-select-spinner", "aria-hidden": "true" }),
627
- M && o !== null && !h && !V && Q && /* @__PURE__ */ s(
1039
+ P && /* @__PURE__ */ r("span", { className: "inconel-select-spinner", "aria-hidden": "true" }),
1040
+ U && o !== null && !y && !x && J && /* @__PURE__ */ r(
628
1041
  "button",
629
1042
  {
630
1043
  type: "button",
631
- className: z("inconel-select-clear", y.clearButton),
632
- style: a.clearButton,
633
- "aria-label": Q,
634
- onClick: Se,
1044
+ className: f("inconel-select-clear", k.clearButton),
1045
+ style: b.clearButton,
1046
+ "aria-label": J,
1047
+ onClick: Ie,
635
1048
  children: "×"
636
1049
  }
637
1050
  ),
638
- /* @__PURE__ */ s(
1051
+ /* @__PURE__ */ r(
639
1052
  "button",
640
1053
  {
641
1054
  type: "button",
642
- className: z("inconel-select-toggle", y.toggleButton),
643
- style: a.toggleButton,
644
- "aria-label": d ? Te : R,
645
- "aria-expanded": d,
646
- disabled: h,
1055
+ className: f("inconel-select-toggle", k.toggleButton),
1056
+ style: b.toggleButton,
1057
+ "aria-label": g ? Le : Q,
1058
+ "aria-expanded": g,
1059
+ disabled: y,
647
1060
  tabIndex: -1,
648
- onClick: () => d ? te() : se(),
649
- children: /* @__PURE__ */ s(
1061
+ onClick: () => g ? te() : ce(),
1062
+ children: /* @__PURE__ */ r(
650
1063
  "svg",
651
1064
  {
652
1065
  "aria-hidden": "true",
@@ -654,7 +1067,7 @@ function fn({
654
1067
  width: "20",
655
1068
  height: "20",
656
1069
  fill: "none",
657
- children: /* @__PURE__ */ s(
1070
+ children: /* @__PURE__ */ r(
658
1071
  "path",
659
1072
  {
660
1073
  d: "m5 7.5 5 5 5-5",
@@ -671,83 +1084,162 @@ function fn({
671
1084
  ]
672
1085
  }
673
1086
  ),
674
- c && /* @__PURE__ */ s(
1087
+ n && /* @__PURE__ */ r(
675
1088
  "input",
676
1089
  {
677
1090
  type: "hidden",
678
- name: c,
1091
+ name: n,
679
1092
  value: o ?? "",
680
- required: C
1093
+ required: O
681
1094
  }
682
1095
  ),
683
- /* @__PURE__ */ s(
684
- Ce,
1096
+ /* @__PURE__ */ r(
1097
+ Oe,
685
1098
  {
686
- hint: W,
687
- errorMessage: J,
688
- hintId: ye,
689
- errorId: be
1099
+ hint: X,
1100
+ errorMessage: q,
1101
+ hintId: _e,
1102
+ errorId: Ne
690
1103
  }
691
1104
  ),
692
- H && Le ? on(Le, H) : Le
1105
+ z && Be ? sn(Be, z) : Be
693
1106
  ]
694
1107
  }
695
1108
  );
696
1109
  }
697
- const In = ze(fn), wn = ze(
1110
+ const ot = Me(jn);
1111
+ function Cn({
1112
+ items: e,
1113
+ value: n,
1114
+ defaultValue: t,
1115
+ onChange: l,
1116
+ className: o
1117
+ }) {
1118
+ const [c, s] = w(
1119
+ t ?? e[0]?.id
1120
+ ), d = n ?? c, m = e.find((h) => h.id === d);
1121
+ return /* @__PURE__ */ p("div", { className: f("inconel-tabs", o), children: [
1122
+ /* @__PURE__ */ r("div", { className: "inconel-tabs__list", role: "tablist", children: e.map((h) => /* @__PURE__ */ r(
1123
+ "button",
1124
+ {
1125
+ type: "button",
1126
+ role: "tab",
1127
+ disabled: h.disabled,
1128
+ "aria-selected": h.id === d,
1129
+ className: f(
1130
+ "inconel-tabs__tab",
1131
+ h.id === d && "inconel-is-active"
1132
+ ),
1133
+ onClick: () => {
1134
+ s(h.id), l?.(h.id);
1135
+ },
1136
+ children: h.label
1137
+ },
1138
+ h.id
1139
+ )) }),
1140
+ m?.content !== void 0 && /* @__PURE__ */ r("div", { className: "inconel-tabs__panel", role: "tabpanel", children: m.content })
1141
+ ] });
1142
+ }
1143
+ const at = Cn;
1144
+ function ct({
1145
+ connected: e,
1146
+ connectedLabel: n = "Bağlı",
1147
+ disconnectedLabel: t = "Bağlantı yok",
1148
+ className: l,
1149
+ ...o
1150
+ }) {
1151
+ return /* @__PURE__ */ p(
1152
+ "span",
1153
+ {
1154
+ ...o,
1155
+ className: f(
1156
+ "inconel-socket-status",
1157
+ e ? "inconel-is-connected" : "inconel-is-disconnected",
1158
+ l
1159
+ ),
1160
+ role: "status",
1161
+ children: [
1162
+ /* @__PURE__ */ r("i", { "aria-hidden": "true" }),
1163
+ e ? n : t
1164
+ ]
1165
+ }
1166
+ );
1167
+ }
1168
+ function st({
1169
+ className: e,
1170
+ src: n,
1171
+ title: t,
1172
+ render: l = !0,
1173
+ ...o
1174
+ }) {
1175
+ if (!l || !n)
1176
+ return null;
1177
+ const c = ["inconel-svg", e].filter(Boolean).join(" ");
1178
+ return /* @__PURE__ */ r(
1179
+ un,
1180
+ {
1181
+ ...o,
1182
+ className: c,
1183
+ src: n,
1184
+ title: t ?? void 0,
1185
+ wrapper: "span"
1186
+ }
1187
+ );
1188
+ }
1189
+ const ut = wn, dt = ze, ft = Me(
698
1190
  function({
699
- id: c,
700
- label: l,
701
- hint: i,
1191
+ id: n,
1192
+ label: t,
1193
+ hint: l,
702
1194
  errorMessage: o,
703
- fullWidth: u = !1,
704
- resize: m = "vertical",
705
- className: I,
706
- required: T,
707
- disabled: D,
708
- "aria-describedby": O,
709
- style: M,
710
- ...h
711
- }, V) {
712
- const C = Me(), $ = c ?? `inconel-textarea-${C.replace(/:/g, "")}`, S = `${$}-hint`, Y = `${$}-error`, W = [
713
- O,
714
- i && !o ? S : void 0,
1195
+ fullWidth: c = !1,
1196
+ resize: s = "vertical",
1197
+ className: d,
1198
+ required: m,
1199
+ disabled: h,
1200
+ "aria-describedby": K,
1201
+ style: U,
1202
+ ...y
1203
+ }, x) {
1204
+ const O = Ue(), F = n ?? `inconel-textarea-${O.replace(/:/g, "")}`, S = `${F}-hint`, Y = `${F}-error`, X = [
1205
+ K,
1206
+ l && !o ? S : void 0,
715
1207
  o ? Y : void 0
716
1208
  ].filter(Boolean).join(" ") || void 0;
717
- return /* @__PURE__ */ k(
1209
+ return /* @__PURE__ */ p(
718
1210
  "div",
719
1211
  {
720
1212
  className: [
721
1213
  "inconel-field",
722
- u ? "inconel-field--full-width" : "",
723
- I ?? ""
1214
+ c ? "inconel-field--full-width" : "",
1215
+ d ?? ""
724
1216
  ].join(" "),
725
1217
  children: [
726
- l && /* @__PURE__ */ k("label", { className: "inconel-field__label", htmlFor: $, children: [
727
- l,
728
- T && /* @__PURE__ */ s("span", { "aria-hidden": "true", children: " *" })
1218
+ t && /* @__PURE__ */ p("label", { className: "inconel-field__label", htmlFor: F, children: [
1219
+ t,
1220
+ m && /* @__PURE__ */ r("span", { "aria-hidden": "true", children: " *" })
729
1221
  ] }),
730
- /* @__PURE__ */ s(
1222
+ /* @__PURE__ */ r(
731
1223
  "textarea",
732
1224
  {
733
- ...h,
734
- ref: V,
735
- id: $,
736
- required: T,
737
- disabled: D,
1225
+ ...y,
1226
+ ref: x,
1227
+ id: F,
1228
+ required: m,
1229
+ disabled: h,
738
1230
  "aria-invalid": !!o,
739
- "aria-describedby": W,
1231
+ "aria-describedby": X,
740
1232
  className: [
741
1233
  "inconel-textarea",
742
- o ? "is-invalid" : ""
1234
+ o ? "inconel-is-invalid" : ""
743
1235
  ].join(" "),
744
- style: { ...M, resize: m }
1236
+ style: { ...U, resize: s }
745
1237
  }
746
1238
  ),
747
- /* @__PURE__ */ s(
748
- Ce,
1239
+ /* @__PURE__ */ r(
1240
+ Oe,
749
1241
  {
750
- hint: i,
1242
+ hint: l,
751
1243
  errorMessage: o,
752
1244
  hintId: S,
753
1245
  errorId: Y
@@ -758,10 +1250,66 @@ const In = ze(fn), wn = ze(
758
1250
  );
759
1251
  }
760
1252
  );
1253
+ function pt({
1254
+ content: e,
1255
+ children: n,
1256
+ placement: t = "top",
1257
+ className: l
1258
+ }) {
1259
+ return /* @__PURE__ */ p(
1260
+ "span",
1261
+ {
1262
+ className: f(
1263
+ "inconel-tooltip",
1264
+ `inconel-tooltip--${t}`,
1265
+ l
1266
+ ),
1267
+ children: [
1268
+ n,
1269
+ /* @__PURE__ */ r("span", { className: "inconel-tooltip__content", role: "tooltip", children: e })
1270
+ ]
1271
+ }
1272
+ );
1273
+ }
761
1274
  export {
762
- Ce as FieldFeedback,
763
- yn as Input,
764
- In as Select,
765
- wn as Textarea
1275
+ dn as Button,
1276
+ fn as Checkbox,
1277
+ hn as CheckboxGroup,
1278
+ Hn as CurrencyInput,
1279
+ Yn as CustomizableSwitch,
1280
+ Rn as DataGrid,
1281
+ Gn as DatePicker,
1282
+ Wn as DndFileUpload,
1283
+ Kn as DotLoader,
1284
+ Dn as DragDropUpload,
1285
+ Xn as ExcelTable,
1286
+ Oe as FieldFeedback,
1287
+ Ke as FileUpload,
1288
+ qn as FileUploadText,
1289
+ Jn as Filter,
1290
+ Qn as HTMLTable,
1291
+ wn as HtmlEditor,
1292
+ ze as Input,
1293
+ Zn as InputText,
1294
+ An as Loader,
1295
+ et as LoaderMini,
1296
+ nt as Modal,
1297
+ Fn as MultiSelect,
1298
+ tt as MultiSelectWithCheckbox,
1299
+ Vn as Option,
1300
+ rt as OptionWithIcon,
1301
+ lt as RadioGroup,
1302
+ it as ReadOnly,
1303
+ ot as Select,
1304
+ at as SlideTabs,
1305
+ ct as SocketStatus,
1306
+ st as Svg,
1307
+ yn as Switch,
1308
+ $e as Table,
1309
+ Cn as Tabs,
1310
+ ut as TextEditor,
1311
+ dt as TextInput,
1312
+ ft as Textarea,
1313
+ pt as Tooltip
766
1314
  };
767
1315
  //# sourceMappingURL=index.js.map