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