@arkyn/components 3.0.1-beta.155 → 3.0.1-beta.156

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 (178) hide show
  1. package/dist/components/calendar/_viewService.d.ts +1 -1
  2. package/dist/components/fullCalendar/_viewService.d.ts +2 -2
  3. package/dist/hooks/useScopedParams.d.ts +1 -1
  4. package/dist/index.js +4683 -4347
  5. package/dist/modules/components/alert/alertContainer/index.js +20 -25
  6. package/dist/modules/components/alert/alertContent/index.js +8 -11
  7. package/dist/modules/components/alert/alertDescription/index.js +8 -11
  8. package/dist/modules/components/alert/alertIcon/index.js +19 -27
  9. package/dist/modules/components/alert/alertTitle/index.js +8 -11
  10. package/dist/modules/components/audioPlayer/index.js +75 -74
  11. package/dist/modules/components/audioUpload/hasFileContent/index.js +62 -54
  12. package/dist/modules/components/audioUpload/index.js +79 -71
  13. package/dist/modules/components/audioUpload/noFileContent/index.js +45 -35
  14. package/dist/modules/components/badge/index.js +22 -26
  15. package/dist/modules/components/button/index.js +32 -39
  16. package/dist/modules/components/calendar/_calendarProvider.js +63 -38
  17. package/dist/modules/components/calendar/_viewService.js +140 -132
  18. package/dist/modules/components/calendar/calendarContainer/index.js +7 -10
  19. package/dist/modules/components/calendar/calendarHeader/index.js +72 -51
  20. package/dist/modules/components/calendar/calendarTableBody/index.js +10 -12
  21. package/dist/modules/components/calendar/calendarTableContainer/index.js +7 -10
  22. package/dist/modules/components/calendar/calendarTableHeader/index.js +10 -13
  23. package/dist/modules/components/calendar/calendarTableTd/index.js +23 -20
  24. package/dist/modules/components/calendar/index.js +49 -31
  25. package/dist/modules/components/cardTab/cardTabButton/index.js +29 -19
  26. package/dist/modules/components/cardTab/cardTabContainer/index.js +28 -22
  27. package/dist/modules/components/cardTab/cardTabContext.js +11 -13
  28. package/dist/modules/components/checkbox/index.js +64 -37
  29. package/dist/modules/components/clientOnly.js +8 -8
  30. package/dist/modules/components/currencyInput/index.js +138 -110
  31. package/dist/modules/components/divider/index.js +11 -10
  32. package/dist/modules/components/drawer/drawerContainer/index.js +43 -40
  33. package/dist/modules/components/drawer/drawerContext.js +11 -13
  34. package/dist/modules/components/drawer/drawerHeader/index.js +27 -20
  35. package/dist/modules/components/facebookPixel/facebookPixel.client.js +18 -8
  36. package/dist/modules/components/facebookPixel/index.js +8 -8
  37. package/dist/modules/components/facebookPixel/pixel.js +52 -47
  38. package/dist/modules/components/fieldError/index.js +8 -12
  39. package/dist/modules/components/fieldLabel/index.js +12 -11
  40. package/dist/modules/components/fieldWrapper/index.js +13 -12
  41. package/dist/modules/components/fileUpload/hasFileContent/index.js +67 -59
  42. package/dist/modules/components/fileUpload/index.js +72 -65
  43. package/dist/modules/components/fileUpload/noFileContent/index.js +45 -35
  44. package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +46 -33
  45. package/dist/modules/components/fullCalendar/_viewService.js +105 -100
  46. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +7 -10
  47. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +78 -70
  48. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +33 -28
  49. package/dist/modules/components/fullCalendar/dayCalendar/index.js +9 -12
  50. package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +7 -10
  51. package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +70 -67
  52. package/dist/modules/components/fullCalendar/index.js +30 -30
  53. package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +12 -9
  54. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +36 -28
  55. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +9 -11
  56. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +9 -10
  57. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +10 -13
  58. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +36 -35
  59. package/dist/modules/components/fullCalendar/weekCalendar/index.js +11 -8
  60. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +78 -70
  61. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +20 -17
  62. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +8 -9
  63. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +19 -16
  64. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +39 -34
  65. package/dist/modules/components/googleAnalytics/googleAnalytics.client.js +7 -7
  66. package/dist/modules/components/googleAnalytics/googleAnalytics.js +17 -17
  67. package/dist/modules/components/googleAnalytics/index.js +9 -9
  68. package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +12 -10
  69. package/dist/modules/components/googleTagManager/googleTagManager.client.js +6 -6
  70. package/dist/modules/components/googleTagManager/googleTagManager.js +48 -44
  71. package/dist/modules/components/googleTagManager/index.js +27 -16
  72. package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +8 -8
  73. package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +20 -19
  74. package/dist/modules/components/iconButton/index.js +29 -31
  75. package/dist/modules/components/imageUpload/hasFileContent/index.js +63 -46
  76. package/dist/modules/components/imageUpload/index.js +82 -65
  77. package/dist/modules/components/imageUpload/noFileContent/index.js +45 -35
  78. package/dist/modules/components/input/index.js +120 -92
  79. package/dist/modules/components/mapView/index.js +31 -27
  80. package/dist/modules/components/mapView/mapView.client.js +51 -49
  81. package/dist/modules/components/maskedInput/index.js +112 -101
  82. package/dist/modules/components/modal/modalContainer/index.js +42 -49
  83. package/dist/modules/components/modal/modalContext.js +11 -13
  84. package/dist/modules/components/modal/modalFooter/index.js +7 -10
  85. package/dist/modules/components/modal/modalHeader/index.js +27 -20
  86. package/dist/modules/components/multiSelect/index.js +154 -115
  87. package/dist/modules/components/multiSelect/multiSelectChevron/index.js +21 -18
  88. package/dist/modules/components/multiSelect/multiSelectContainer/index.js +29 -13
  89. package/dist/modules/components/multiSelect/multiSelectContent/index.js +8 -11
  90. package/dist/modules/components/multiSelect/multiSelectMark/index.js +22 -19
  91. package/dist/modules/components/multiSelect/multiSelectOption/index.js +13 -17
  92. package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +45 -35
  93. package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +8 -11
  94. package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +16 -13
  95. package/dist/modules/components/pagination/chevronButton/index.js +17 -17
  96. package/dist/modules/components/pagination/currentButton/index.js +7 -11
  97. package/dist/modules/components/pagination/index.js +83 -51
  98. package/dist/modules/components/pagination/pageButton/index.js +8 -12
  99. package/dist/modules/components/pagination/paginationService.js +48 -33
  100. package/dist/modules/components/pagination/spread/index.js +7 -10
  101. package/dist/modules/components/phoneInput/index.js +151 -103
  102. package/dist/modules/components/phoneInput/phoneInputContainer/index.js +19 -12
  103. package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +8 -11
  104. package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +15 -23
  105. package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +43 -33
  106. package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +21 -25
  107. package/dist/modules/components/phoneInput/phoneInputMask/index.js +62 -46
  108. package/dist/modules/components/popover/index.js +36 -37
  109. package/dist/modules/components/radio/radioBox/index.js +42 -24
  110. package/dist/modules/components/radio/radioContext.js +18 -20
  111. package/dist/modules/components/radio/radioGroup/index.js +64 -41
  112. package/dist/modules/components/richText/blockButton/index.js +23 -20
  113. package/dist/modules/components/richText/element/index.js +58 -72
  114. package/dist/modules/components/richText/index.js +135 -143
  115. package/dist/modules/components/richText/insertImage/index.js +105 -94
  116. package/dist/modules/components/richText/insertVideo/index.js +97 -85
  117. package/dist/modules/components/richText/leaf/index.js +6 -9
  118. package/dist/modules/components/richText/markButton/index.js +22 -19
  119. package/dist/modules/components/richText/toolbar/index.js +7 -10
  120. package/dist/modules/components/searchPlaces.js +66 -57
  121. package/dist/modules/components/select/index.js +144 -112
  122. package/dist/modules/components/select/selectChevron/index.js +21 -18
  123. package/dist/modules/components/select/selectContainer/index.js +29 -13
  124. package/dist/modules/components/select/selectContent/index.js +8 -11
  125. package/dist/modules/components/select/selectOption/index.js +13 -17
  126. package/dist/modules/components/select/selectOptionsContainer/index.js +45 -35
  127. package/dist/modules/components/select/selectOverlay/index.js +8 -11
  128. package/dist/modules/components/select/selectSpinner/index.js +9 -13
  129. package/dist/modules/components/slider/index.js +41 -34
  130. package/dist/modules/components/switch/index.js +62 -35
  131. package/dist/modules/components/tab/tabButton/index.js +29 -19
  132. package/dist/modules/components/tab/tabContainer/index.js +28 -22
  133. package/dist/modules/components/tab/tabContext.js +10 -12
  134. package/dist/modules/components/table/tableBody/index.js +14 -19
  135. package/dist/modules/components/table/tableCaption/index.js +8 -15
  136. package/dist/modules/components/table/tableContainer/index.js +8 -12
  137. package/dist/modules/components/table/tableFooter/index.js +11 -18
  138. package/dist/modules/components/table/tableHeader/index.js +11 -12
  139. package/dist/modules/components/textarea/index.js +69 -51
  140. package/dist/modules/components/tooltip/index.js +45 -34
  141. package/dist/modules/hooks/useAutomation.js +27 -35
  142. package/dist/modules/hooks/useDrawer.js +19 -17
  143. package/dist/modules/hooks/useForm.js +6 -6
  144. package/dist/modules/hooks/useHydrated.js +12 -7
  145. package/dist/modules/hooks/useModal.js +19 -17
  146. package/dist/modules/hooks/useScopedParams.js +17 -17
  147. package/dist/modules/hooks/useScrollLock.js +19 -19
  148. package/dist/modules/hooks/useSearchAutomation.js +14 -31
  149. package/dist/modules/hooks/useSlider.js +13 -13
  150. package/dist/modules/hooks/useToast.js +9 -8
  151. package/dist/modules/index.js +144 -72
  152. package/dist/modules/providers/drawerProvider.js +30 -35
  153. package/dist/modules/providers/formProvider.js +16 -11
  154. package/dist/modules/providers/modalProvider.js +33 -39
  155. package/dist/modules/providers/placesProvider.js +16 -16
  156. package/dist/modules/providers/toastProvider.js +51 -45
  157. package/dist/modules/services/extractTextFromNode.js +6 -6
  158. package/dist/modules/services/fieldTemplate.js +23 -22
  159. package/dist/modules/services/iconRenderer.js +7 -14
  160. package/dist/modules/services/isBlockActive.js +14 -12
  161. package/dist/modules/services/isMarkActive.js +6 -6
  162. package/dist/modules/services/maskCurrencyValues.js +12 -11
  163. package/dist/modules/services/toHtml.js +6 -6
  164. package/dist/modules/services/toRichTextValue.js +7 -7
  165. package/dist/modules/services/toggleBlock.js +19 -20
  166. package/dist/modules/services/toggleMark.js +7 -7
  167. package/dist/modules/style.css +1 -0
  168. package/dist/modules/templates/badResponses.js +13 -13
  169. package/dist/modules/templates/richTextTemplates.js +14 -17
  170. package/dist/modules/templates/successResponses.js +4 -9
  171. package/dist/modules/utils/phoneInputUtilities.js +28 -18
  172. package/dist/modules/utils/richTextUtilities.js +75 -88
  173. package/dist/services/fieldTemplate.d.ts +1 -1
  174. package/dist/services/fieldTemplate.d.ts.map +1 -1
  175. package/dist/style.css +1 -0
  176. package/package.json +65 -65
  177. package/dist/components.css +0 -2
  178. package/dist/modules/components.css +0 -2
@@ -1,116 +1,155 @@
1
- import { useForm as e } from "../../hooks/useForm.js";
2
- import { IconRenderer as t } from "../../services/iconRenderer.js";
3
- import { FieldTemplate as n } from "../../services/fieldTemplate.js";
4
- import { MultiSelectChevron as r } from "./multiSelectChevron/index.js";
5
- import { MultiSelectContainer as i } from "./multiSelectContainer/index.js";
6
- import { MultiSelectContent as ee } from "./multiSelectContent/index.js";
7
- import { MultiSelectMark as te } from "./multiSelectMark/index.js";
8
- import { MultiSelectOption as a } from "./multiSelectOption/index.js";
9
- import { MultiSelectOptionsContainer as o } from "./multiSelectOptionsContainer/index.js";
10
- import { MultiSelectOverlay as s } from "./multiSelectOverlay/index.js";
11
- import { MultiSelectSpinner as c } from "./multiSelectSpinner/index.js";
12
- import { useId as l, useRef as u, useState as d } from "react";
13
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
14
- //#region src/components/multiSelect/index.tsx
15
- function m(m) {
16
- let { name: h, options: g, className: _ = "", placeholder: v = "Selecione...", closeOnSelect: y = !1, defaultValue: b = [], errorMessage: ne, isLoading: x = !1, readOnly: S = !1, isSearchable: re = !1, id: ie, label: ae, optionMaxHeight: oe, showAsterisk: se, leftIcon: C, onSearch: w, onChange: T, onBlur: E, notFoundText: D = "Sem opções disponíveis", onFocus: O, disabled: k = !1, prefix: A, size: j = "md", value: M, variant: N = "solid", unShowFieldTemplate: P = !1, orientation: F = "vertical" } = m, { fieldErrors: I } = e(), L = u(null), R = ie || l(), z = ne || I?.[h], B = !!z, V = k || x || S, H = {
17
- md: 20,
18
- lg: 20
19
- }[j], [U, W] = d(""), [G, K] = d(!1), [q, J] = d(b), Y = M || q;
20
- function X(e) {
21
- return Y.includes(e);
22
- }
23
- function ce(e) {
24
- return g.find((t) => t.value === e)?.label || "";
25
- }
26
- function le() {
27
- V || !L?.current || G || (K(!0), L.current.focus(), O && O());
28
- }
29
- function Z() {
30
- K(!1), E && L.current && L.current.blur();
31
- }
32
- function ue(e) {
33
- W(e), w && w(e);
34
- }
35
- function Q(e) {
36
- X(e) ? (J(q.filter((t) => t !== e)), T && T(q.filter((t) => t !== e))) : (J([...q, e]), T && T([...q, e])), y && Z();
37
- }
38
- let $ = g.filter((e) => !!(m.onSearch || !m.isSearchable || e.label.toLowerCase().includes(U.toLowerCase())));
39
- return /* @__PURE__ */ f(n, {
40
- name: h,
41
- label: ae,
42
- showAsterisk: se,
43
- className: _,
44
- errorMessage: z,
45
- unShowFieldTemplate: P,
46
- orientation: F,
47
- children: /* @__PURE__ */ p(i, {
48
- handleContainerFocus: le,
49
- disabled: V,
50
- isError: B,
51
- isFocused: G,
52
- isLoading: x,
53
- readOnly: S,
54
- size: j,
55
- variant: N,
56
- prefixExists: !!A,
57
- id: R,
58
- children: [
59
- /* @__PURE__ */ f("input", {
60
- ref: L,
61
- name: h,
62
- value: JSON.stringify(Y),
63
- type: "hidden"
64
- }),
65
- /* @__PURE__ */ f(t, {
66
- iconSize: H,
67
- icon: A,
68
- className: "prefix"
69
- }),
70
- C && /* @__PURE__ */ f(C, {
71
- size: H,
72
- strokeWidth: 2.5
73
- }),
74
- /* @__PURE__ */ p(ee, {
75
- size: j,
76
- children: [Y.map((e) => /* @__PURE__ */ f(te, {
77
- label: ce(e),
78
- value: e,
79
- handleChangeValue: Q,
80
- disabled: V
81
- }, e)), Y.length <= 0 && /* @__PURE__ */ f("p", { children: v })]
82
- }),
83
- /* @__PURE__ */ p(o, {
84
- isFocused: G,
85
- isSearchable: re,
86
- search: U,
87
- onSearch: ue,
88
- children: [$.map(({ label: e, value: t }) => /* @__PURE__ */ f(a, {
89
- label: e,
90
- value: t,
91
- size: j,
92
- handleChangeValue: Q,
93
- optionHasSelected: X
94
- }, t)), $.length <= 0 && /* @__PURE__ */ f("p", { children: D })]
95
- }),
96
- /* @__PURE__ */ f(r, {
97
- disabled: V,
98
- isFocused: G,
99
- readOnly: S,
100
- iconSize: H,
101
- isLoading: x
102
- }),
103
- /* @__PURE__ */ f(c, {
104
- iconSize: H,
105
- isLoading: x
106
- }),
107
- /* @__PURE__ */ f(s, {
108
- handleBlur: Z,
109
- isFocused: G
110
- })
111
- ]
112
- })
113
- });
1
+ import { jsx as t, jsxs as S } from "react/jsx-runtime";
2
+ import { useRef as ee, useId as te, useState as b } from "react";
3
+ import { useForm as re } from "../../hooks/useForm.js";
4
+ import { FieldTemplate as ne } from "../../services/fieldTemplate.js";
5
+ import { IconRenderer as ie } from "../../services/iconRenderer.js";
6
+ import { MultiSelectChevron as oe } from "./multiSelectChevron/index.js";
7
+ import { MultiSelectContainer as le } from "./multiSelectContainer/index.js";
8
+ import { MultiSelectContent as se } from "./multiSelectContent/index.js";
9
+ import { MultiSelectMark as ce } from "./multiSelectMark/index.js";
10
+ import { MultiSelectOption as ae } from "./multiSelectOption/index.js";
11
+ import { MultiSelectOptionsContainer as fe } from "./multiSelectOptionsContainer/index.js";
12
+ import { MultiSelectOverlay as ue } from "./multiSelectOverlay/index.js";
13
+ import { MultiSelectSpinner as de } from "./multiSelectSpinner/index.js";
14
+ function Ne(d) {
15
+ const {
16
+ name: m,
17
+ options: M,
18
+ className: v = "",
19
+ placeholder: T = "Selecione...",
20
+ closeOnSelect: j = !1,
21
+ defaultValue: B = [],
22
+ errorMessage: E,
23
+ isLoading: l = !1,
24
+ readOnly: p = !1,
25
+ isSearchable: H = !1,
26
+ id: V,
27
+ label: A,
28
+ optionMaxHeight: me,
29
+ showAsterisk: D,
30
+ leftIcon: g,
31
+ onSearch: O,
32
+ onChange: s,
33
+ onBlur: J,
34
+ notFoundText: R = "Sem opções disponíveis",
35
+ onFocus: C,
36
+ disabled: W = !1,
37
+ prefix: x,
38
+ size: c = "md",
39
+ value: q,
40
+ variant: G = "solid",
41
+ unShowFieldTemplate: K = !1,
42
+ orientation: P = "vertical"
43
+ } = d, { fieldErrors: h } = re(), n = ee(null), Q = V || te(), F = E || (h == null ? void 0 : h[m]), U = !!F, a = W || l || p, f = { md: 20, lg: 20 }[c], [I, X] = b(""), [i, w] = b(!1), [o, z] = b(B), u = q || o;
44
+ function L(e) {
45
+ return u.includes(e);
46
+ }
47
+ function Y(e) {
48
+ const r = M.find(($) => $.value === e);
49
+ return (r == null ? void 0 : r.label) || "";
50
+ }
51
+ function Z() {
52
+ a || !(n != null && n.current) || i || (w(!0), n.current.focus(), C && C());
53
+ }
54
+ function N() {
55
+ w(!1), J && n.current && n.current.blur();
56
+ }
57
+ function _(e) {
58
+ X(e), O && O(e);
59
+ }
60
+ function y(e) {
61
+ L(e) ? (z(o.filter((r) => r !== e)), s && s(o.filter((r) => r !== e))) : (z([...o, e]), s && s([...o, e])), j && N();
62
+ }
63
+ const k = M.filter((e) => !!(d.onSearch || !d.isSearchable || e.label.toLowerCase().includes(I.toLowerCase())));
64
+ return /* @__PURE__ */ t(
65
+ ne,
66
+ {
67
+ name: m,
68
+ label: A,
69
+ showAsterisk: D,
70
+ className: v,
71
+ errorMessage: F,
72
+ unShowFieldTemplate: K,
73
+ orientation: P,
74
+ children: /* @__PURE__ */ S(
75
+ le,
76
+ {
77
+ handleContainerFocus: Z,
78
+ disabled: a,
79
+ isError: U,
80
+ isFocused: i,
81
+ isLoading: l,
82
+ readOnly: p,
83
+ size: c,
84
+ variant: G,
85
+ prefixExists: !!x,
86
+ id: Q,
87
+ children: [
88
+ /* @__PURE__ */ t(
89
+ "input",
90
+ {
91
+ ref: n,
92
+ name: m,
93
+ value: JSON.stringify(u),
94
+ type: "hidden"
95
+ }
96
+ ),
97
+ /* @__PURE__ */ t(ie, { iconSize: f, icon: x, className: "prefix" }),
98
+ g && /* @__PURE__ */ t(g, { size: f, strokeWidth: 2.5 }),
99
+ /* @__PURE__ */ S(se, { size: c, children: [
100
+ u.map((e) => /* @__PURE__ */ t(
101
+ ce,
102
+ {
103
+ label: Y(e),
104
+ value: e,
105
+ handleChangeValue: y,
106
+ disabled: a
107
+ },
108
+ e
109
+ )),
110
+ u.length <= 0 && /* @__PURE__ */ t("p", { children: T })
111
+ ] }),
112
+ /* @__PURE__ */ S(
113
+ fe,
114
+ {
115
+ isFocused: i,
116
+ isSearchable: H,
117
+ search: I,
118
+ onSearch: _,
119
+ children: [
120
+ k.map(({ label: e, value: r }) => /* @__PURE__ */ t(
121
+ ae,
122
+ {
123
+ label: e,
124
+ value: r,
125
+ size: c,
126
+ handleChangeValue: y,
127
+ optionHasSelected: L
128
+ },
129
+ r
130
+ )),
131
+ k.length <= 0 && /* @__PURE__ */ t("p", { children: R })
132
+ ]
133
+ }
134
+ ),
135
+ /* @__PURE__ */ t(
136
+ oe,
137
+ {
138
+ disabled: a,
139
+ isFocused: i,
140
+ readOnly: p,
141
+ iconSize: f,
142
+ isLoading: l
143
+ }
144
+ ),
145
+ /* @__PURE__ */ t(de, { iconSize: f, isLoading: l }),
146
+ /* @__PURE__ */ t(ue, { handleBlur: N, isFocused: i })
147
+ ]
148
+ }
149
+ )
150
+ }
151
+ );
114
152
  }
115
- //#endregion
116
- export { m as MultiSelect };
153
+ export {
154
+ Ne as MultiSelect
155
+ };
@@ -1,19 +1,22 @@
1
- /* empty css */
2
- import { Fragment as e, jsx as t } from "react/jsx-runtime";
3
- import { ChevronDown as n } from "lucide-react";
4
- //#region src/components/multiSelect/multiSelectChevron/index.tsx
5
- function r(r) {
6
- let { iconSize: i, isLoading: a, disabled: o, readOnly: s, isFocused: c } = r;
7
- return a ? /* @__PURE__ */ t(e, {}) : /* @__PURE__ */ t(n, {
8
- className: `arkynMultiSelectChevron ${o || s ? "notAnimate" : ""} ${c ? "focused" : ""}`,
9
- strokeWidth: 2.5,
10
- style: {
11
- minWidth: i,
12
- minHeight: i,
13
- maxWidth: i,
14
- maxHeight: i
15
- }
16
- });
1
+ import { jsx as e, Fragment as c } from "react/jsx-runtime";
2
+ import { ChevronDown as a } from "lucide-react";
3
+ /* empty css */
4
+ function g(n) {
5
+ const { iconSize: t, isLoading: o, disabled: i, readOnly: r, isFocused: s } = n, m = `arkynMultiSelectChevron ${i || r ? "notAnimate" : ""} ${s ? "focused" : ""}`;
6
+ return o ? /* @__PURE__ */ e(c, {}) : /* @__PURE__ */ e(
7
+ a,
8
+ {
9
+ className: m,
10
+ strokeWidth: 2.5,
11
+ style: {
12
+ minWidth: t,
13
+ minHeight: t,
14
+ maxWidth: t,
15
+ maxHeight: t
16
+ }
17
+ }
18
+ );
17
19
  }
18
- //#endregion
19
- export { r as MultiSelectChevron };
20
+ export {
21
+ g as MultiSelectChevron
22
+ };
@@ -1,14 +1,30 @@
1
- /* empty css */
2
- import { jsx as e } from "react/jsx-runtime";
3
- //#region src/components/multiSelect/multiSelectContainer/index.tsx
4
- function t(t) {
5
- let { children: n, handleContainerFocus: r, disabled: i, isError: a, isLoading: o, isFocused: s, className: c, readOnly: l, variant: u, size: d, id: f, prefixExists: p } = t;
6
- return /* @__PURE__ */ e("section", {
7
- id: f,
8
- className: `arkynMultiSelectContainer ${p ? "hasPrefix" : ""} ${u} ${d} ${i || l || o ? "opacity" : ""} ${a ? "errored" : ""} ${s ? "focused" : ""} ${c}`,
9
- onClick: r,
10
- children: n
11
- });
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ /* empty css */
3
+ function P(e) {
4
+ const {
5
+ children: r,
6
+ handleContainerFocus: o,
7
+ disabled: i,
8
+ isError: s,
9
+ isLoading: t,
10
+ isFocused: n,
11
+ className: c,
12
+ readOnly: a,
13
+ variant: d,
14
+ size: l,
15
+ id: f,
16
+ prefixExists: u
17
+ } = e;
18
+ return /* @__PURE__ */ p(
19
+ "section",
20
+ {
21
+ id: f,
22
+ className: `arkynMultiSelectContainer ${u ? "hasPrefix" : ""} ${d} ${l} ${i || a || t ? "opacity" : ""} ${s ? "errored" : ""} ${n ? "focused" : ""} ${c}`,
23
+ onClick: o,
24
+ children: r
25
+ }
26
+ );
12
27
  }
13
- //#endregion
14
- export { t as MultiSelectContainer };
28
+ export {
29
+ P as MultiSelectContainer
30
+ };
@@ -1,12 +1,9 @@
1
- /* empty css */
2
- import { jsx as e } from "react/jsx-runtime";
3
- //#region src/components/multiSelect/multiSelectContent/index.tsx
4
- function t(t) {
5
- let { children: n, size: r } = t;
6
- return /* @__PURE__ */ e("div", {
7
- className: `arkynMultiSelectContent ${r}`,
8
- children: n
9
- });
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ /* empty css */
3
+ function l(t) {
4
+ const { children: e, size: n } = t, o = `arkynMultiSelectContent ${n}`;
5
+ return /* @__PURE__ */ i("div", { className: o, children: e });
10
6
  }
11
- //#endregion
12
- export { t as MultiSelectContent };
7
+ export {
8
+ l as MultiSelectContent
9
+ };
@@ -1,20 +1,23 @@
1
- /* empty css */
2
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
- import { X as n } from "lucide-react";
4
- //#region src/components/multiSelect/multiSelectMark/index.tsx
5
- function r(r) {
6
- let { label: i, value: a, disabled: o, handleChangeValue: s } = r;
7
- return /* @__PURE__ */ t("div", {
8
- className: "arkynMultiSelectMark",
9
- children: [i, /* @__PURE__ */ e("button", {
10
- disabled: o,
11
- type: "button",
12
- onClick: (e) => {
13
- e.stopPropagation(), s(a);
14
- },
15
- children: /* @__PURE__ */ e(n, {})
16
- })]
17
- });
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { X as c } from "lucide-react";
3
+ /* empty css */
4
+ function d(e) {
5
+ const { label: l, value: o, disabled: r, handleChangeValue: a } = e;
6
+ return /* @__PURE__ */ i("div", { className: "arkynMultiSelectMark", children: [
7
+ l,
8
+ /* @__PURE__ */ t(
9
+ "button",
10
+ {
11
+ disabled: r,
12
+ type: "button",
13
+ onClick: (n) => {
14
+ n.stopPropagation(), a(o);
15
+ },
16
+ children: /* @__PURE__ */ t(c, {})
17
+ }
18
+ )
19
+ ] });
18
20
  }
19
- //#endregion
20
- export { r as MultiSelectMark };
21
+ export {
22
+ d as MultiSelectMark
23
+ };
@@ -1,18 +1,14 @@
1
- /* empty css */
2
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
- import { Check as n } from "lucide-react";
4
- //#region src/components/multiSelect/multiSelectOption/index.tsx
5
- function r(r) {
6
- let { label: i, optionHasSelected: a, handleChangeValue: o, value: s, size: c } = r;
7
- return /* @__PURE__ */ t("div", {
8
- onClick: () => o(s),
9
- className: `arkynMultiSelectOption ${c} ${a(s) ? "active" : ""}`,
10
- children: [
11
- i,
12
- " ",
13
- /* @__PURE__ */ e(n, {})
14
- ]
15
- });
1
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
+ import { Check as p } from "lucide-react";
3
+ /* empty css */
4
+ function d(t) {
5
+ const { label: i, optionHasSelected: o, handleChangeValue: n, value: e, size: c } = t, l = o(e) ? "active" : "", a = `arkynMultiSelectOption ${c} ${l}`;
6
+ return /* @__PURE__ */ s("div", { onClick: () => n(e), className: a, children: [
7
+ i,
8
+ " ",
9
+ /* @__PURE__ */ r(p, {})
10
+ ] });
16
11
  }
17
- //#endregion
18
- export { r as MultiSelectOption };
12
+ export {
13
+ d as MultiSelectOption
14
+ };
@@ -1,36 +1,46 @@
1
- import { useScrollLock as e } from "../../../hooks/useScrollLock.js";
2
- import { Input as t } from "../../input/index.js";
3
- /* empty css */
4
- import { useEffect as n, useRef as r, useState as i } from "react";
5
- import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
6
- import { Search as c } from "lucide-react";
7
- //#region src/components/multiSelect/multiSelectOptionsContainer/index.tsx
8
- function l(l) {
9
- let { children: u, isFocused: d, isSearchable: f, search: p, onSearch: m } = l, h = r(null), [g, _] = i("bottom");
10
- e(d), n(() => {
11
- d && (() => {
12
- if (!h.current) return;
13
- let e = h.current.parentElement;
14
- if (!e) return;
15
- let t = e.getBoundingClientRect();
16
- window.innerHeight - t.bottom < 300 && t.top > 300 ? _("top") : _("bottom");
17
- })();
18
- }, [d]);
19
- function v(e) {
20
- f && m(e.target.value);
21
- }
22
- return d ? /* @__PURE__ */ s("div", {
23
- ref: h,
24
- className: `arkynMultiSelectOptionsContainer ${g}`,
25
- children: [f && /* @__PURE__ */ o(t, {
26
- type: "search",
27
- name: "search-select",
28
- variant: "underline",
29
- leftIcon: c,
30
- value: p,
31
- onChange: v
32
- }), u]
33
- }) : /* @__PURE__ */ o(a, {});
1
+ import { jsx as a, Fragment as g, jsxs as S } from "react/jsx-runtime";
2
+ import { Search as C } from "lucide-react";
3
+ import { useRef as v, useState as w, useEffect as b } from "react";
4
+ import { useScrollLock as k } from "../../../hooks/useScrollLock.js";
5
+ import { Input as R } from "../../input/index.js";
6
+ /* empty css */
7
+ function F(l) {
8
+ const { children: u, isFocused: e, isSearchable: n, search: m, onSearch: p } = l, t = v(null), [f, o] = w("bottom");
9
+ k(e), b(() => {
10
+ if (!e) return;
11
+ (() => {
12
+ if (!t.current) return;
13
+ const i = t.current.parentElement;
14
+ if (!i) return;
15
+ const c = i.getBoundingClientRect(), d = window.innerHeight, s = 300;
16
+ d - c.bottom < s && c.top > s ? o("top") : o("bottom");
17
+ })();
18
+ }, [e]);
19
+ function h(r) {
20
+ n && p(r.target.value);
21
+ }
22
+ return e ? /* @__PURE__ */ S(
23
+ "div",
24
+ {
25
+ ref: t,
26
+ className: `arkynMultiSelectOptionsContainer ${f}`,
27
+ children: [
28
+ n && /* @__PURE__ */ a(
29
+ R,
30
+ {
31
+ type: "search",
32
+ name: "search-select",
33
+ variant: "underline",
34
+ leftIcon: C,
35
+ value: m,
36
+ onChange: h
37
+ }
38
+ ),
39
+ u
40
+ ]
41
+ }
42
+ ) : /* @__PURE__ */ a(g, {});
34
43
  }
35
- //#endregion
36
- export { l as MultiSelectOptionsContainer };
44
+ export {
45
+ F as MultiSelectOptionsContainer
46
+ };
@@ -1,12 +1,9 @@
1
- /* empty css */
2
- import { Fragment as e, jsx as t } from "react/jsx-runtime";
3
- //#region src/components/multiSelect/multiSelectOverlay/index.tsx
4
- function n(n) {
5
- let { isFocused: r, handleBlur: i } = n;
6
- return r ? /* @__PURE__ */ t("aside", {
7
- className: "arkynMultiSelectOverlay",
8
- onClick: i
9
- }) : /* @__PURE__ */ t(e, {});
1
+ import { jsx as e, Fragment as i } from "react/jsx-runtime";
2
+ /* empty css */
3
+ function o(r) {
4
+ const { isFocused: t, handleBlur: l } = r;
5
+ return t ? /* @__PURE__ */ e("aside", { className: "arkynMultiSelectOverlay", onClick: l }) : /* @__PURE__ */ e(i, {});
10
6
  }
11
- //#endregion
12
- export { n as MultiSelectOverlay };
7
+ export {
8
+ o as MultiSelectOverlay
9
+ };
@@ -1,14 +1,17 @@
1
- /* empty css */
2
- import { Fragment as e, jsx as t } from "react/jsx-runtime";
3
- import { Loader2 as n } from "lucide-react";
4
- //#region src/components/multiSelect/multiSelectSpinner/index.tsx
5
- function r(r) {
6
- let { iconSize: i, isLoading: a } = r;
7
- return a ? /* @__PURE__ */ t(n, {
8
- className: "arkynMultiSelectSpinner",
9
- size: i,
10
- strokeWidth: 2.5
11
- }) : /* @__PURE__ */ t(e, {});
1
+ import { jsx as r, Fragment as n } from "react/jsx-runtime";
2
+ import { Loader2 as o } from "lucide-react";
3
+ /* empty css */
4
+ function c(e) {
5
+ const { iconSize: i, isLoading: t } = e;
6
+ return t ? /* @__PURE__ */ r(
7
+ o,
8
+ {
9
+ className: "arkynMultiSelectSpinner",
10
+ size: i,
11
+ strokeWidth: 2.5
12
+ }
13
+ ) : /* @__PURE__ */ r(n, {});
12
14
  }
13
- //#endregion
14
- export { r as MultiSelectSpinner };
15
+ export {
16
+ c as MultiSelectSpinner
17
+ };
@@ -1,18 +1,18 @@
1
- /* empty css */
2
- import { jsx as e } from "react/jsx-runtime";
3
- import { ChevronLeft as t, ChevronRight as n } from "lucide-react";
4
- //#region src/components/pagination/chevronButton/index.tsx
5
- function r(r) {
6
- let { orientation: i, handlePageChange: a, disabled: o } = r;
7
- return /* @__PURE__ */ e("button", {
8
- className: "arkynChevronPageButton",
9
- disabled: o,
10
- onClick: a,
11
- children: {
12
- left: /* @__PURE__ */ e(t, {}),
13
- right: /* @__PURE__ */ e(n, {})
14
- }[i]
15
- });
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { ChevronRight as i, ChevronLeft as a } from "lucide-react";
3
+ /* empty css */
4
+ function s(o) {
5
+ const { orientation: t, handlePageChange: e, disabled: r } = o;
6
+ return /* @__PURE__ */ n(
7
+ "button",
8
+ {
9
+ className: "arkynChevronPageButton",
10
+ disabled: r,
11
+ onClick: e,
12
+ children: { left: /* @__PURE__ */ n(a, {}), right: /* @__PURE__ */ n(i, {}) }[t]
13
+ }
14
+ );
16
15
  }
17
- //#endregion
18
- export { r as ChevronButton };
16
+ export {
17
+ s as ChevronButton
18
+ };