@konstructio/ui 0.1.2-alpha.3 → 0.1.2-alpha.31
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/DatePicker.css +1 -1
- package/dist/Modal-5xSxFoaD.js +99 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/chevron-down-DgT-uSF9.js +5 -0
- package/dist/chevron-right-DYvXLeql.js +7 -0
- package/dist/chevron-up-DrQr2Fwd.js +5 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +30 -33
- package/dist/components/Badge/Badge.variants.js +8 -6
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.variants.js +1 -1
- package/dist/components/Card/Card.variants.js +5 -9
- package/dist/components/Checkbox/Checkbox.js +6 -6
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1209 -1147
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +46 -28
- package/dist/components/Dropdown/Dropdown.variants.js +32 -9
- package/dist/components/Dropdown/components/List/List.js +133 -54
- package/dist/components/Dropdown/components/List/List.variants.js +9 -7
- package/dist/components/Dropdown/components/ListItem/ListItem.js +74 -24
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +9 -7
- package/dist/components/Dropdown/components/Wrapper.js +144 -109
- package/dist/components/Dropdown/constants/index.js +4 -0
- package/dist/components/Dropdown/constants/pagination.js +4 -0
- package/dist/components/Dropdown/contexts/dropdown.context.js +26 -8
- package/dist/components/Dropdown/contexts/dropdown.provider.js +48 -19
- package/dist/components/Dropdown/hooks/useDropdown.js +83 -39
- package/dist/components/Dropdown/hooks/useNavigationList.js +28 -36
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.variants.js +2 -2
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.js +1 -1
- package/dist/components/Loading/Loading.js +1 -7
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +45 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +27 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +629 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +36 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +625 -0
- package/dist/components/PhoneNumberInput/components/index.js +6 -0
- package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6139 -0
- package/dist/components/PhoneNumberInput/utils/index.js +11 -0
- package/dist/components/PieChart/PieChart.js +647 -664
- package/dist/components/RadioCard/RadioCard.variants.js +1 -6
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Sidebar/Sidebar.variants.js +2 -2
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +8 -8
- package/dist/components/Switch/Switch.variants.js +4 -4
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +45 -24
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +9 -8
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +98 -49
- package/dist/components/TimePicker/TimePicker.variants.js +2 -2
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Toast/Toast.js +206 -181
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Typography/Typography.variants.js +18 -23
- package/dist/components/VirtualizedTable/VirtualizedTable.js +119 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
- package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
- package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
- package/dist/components/VirtualizedTable/assets/index.js +6 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +72 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +51 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +88 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
- package/dist/components/VirtualizedTable/components/Header/Header.js +84 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +53 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +67 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +34 -0
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
- package/dist/components/VirtualizedTable/components/index.js +16 -0
- package/dist/components/VirtualizedTable/constants/index.js +5 -0
- package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
- package/dist/components/VirtualizedTable/contexts/index.js +8 -0
- package/dist/components/VirtualizedTable/contexts/table.context.js +32 -0
- package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +85 -0
- package/dist/components/index.js +79 -73
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/debounce-BFejQm9P.js +200 -0
- package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
- package/dist/{index-h-Ul0anl.js → index--V_ZsiQe.js} +1 -22
- package/dist/index-2hB40Iuc.js +1873 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
- package/dist/index-BtQfgaSF.js +60 -0
- package/dist/index-C3tHPg8y.js +662 -0
- package/dist/index-CIAmiWcw.js +200 -0
- package/dist/index-CSFe9uC5.js +14 -0
- package/dist/index-CSWGJT-v.js +1722 -0
- package/dist/index-CigKKiZS.js +91 -0
- package/dist/index-DDByhzds.js +137 -0
- package/dist/{index-BAraV3ai.js → index-DH2Fnov1.js} +11 -12
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/index-Dbt2vBmS.js +136 -0
- package/dist/{index-DB2XhXHn.js → index-DpW9ExsS.js} +7 -7
- package/dist/index-DrWQH0QF.js +55 -0
- package/dist/{index-D3xzCzcO.js → index-X4k_cU8k.js} +4 -4
- package/dist/index-kyuBfLcN.js +479 -0
- package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
- package/dist/index-ohdbKsws.js +27 -0
- package/dist/index.d.ts +184 -18
- package/dist/index.js +106 -98
- package/dist/libphonenumber-_7ZyKWA7.js +11549 -0
- package/dist/package.json +46 -32
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +191 -167
- package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
- package/dist/utils/index.js +534 -501
- package/dist/{x-BPcqkRZd.js → x-DPU9OdYH.js} +1 -1
- package/package.json +46 -32
- package/dist/Modal-V67Uz78z.js +0 -98
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/chevron-down-BLZPftpV.js +0 -11
- package/dist/chevron-up-RLP4nX7V.js +0 -54
- package/dist/index-BXuxPoz7.js +0 -435
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-C9T9HQaa.js +0 -423
- package/dist/index-CZnD2QxM.js +0 -32
- package/dist/index-CrBonFvu.js +0 -144
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-Oq5GlCHP.js +0 -131
- package/dist/index-iXyXtdgP.js +0 -31
|
@@ -1,58 +1,50 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { useDropdownContext as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
wrapperInputRef:
|
|
1
|
+
import { useRef as g, useEffect as a } from "react";
|
|
2
|
+
import { useDropdownContext as k } from "../contexts/dropdown.hook.js";
|
|
3
|
+
const A = ({
|
|
4
|
+
searchable: o,
|
|
5
|
+
ulRef: n,
|
|
6
|
+
wrapperInputRef: e,
|
|
7
|
+
filteredOptions: f
|
|
7
8
|
}) => {
|
|
8
|
-
const r =
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
r.current
|
|
9
|
+
const r = g(0), { isOpen: s } = k();
|
|
10
|
+
a(() => {
|
|
11
|
+
const m = n.current?.querySelectorAll("li") ?? [], t = Array.from(m).filter(
|
|
12
|
+
(c) => c.getAttribute("data-action") !== "true"
|
|
13
|
+
), u = new AbortController(), i = () => {
|
|
14
|
+
r.current < t.length - 1 ? (r.current = r.current + 1, t[r.current].focus()) : (r.current = 0, t[0].focus());
|
|
15
|
+
}, l = () => {
|
|
16
|
+
r.current > 0 ? (r.current = r.current - 1, t[r.current].focus()) : (r.current = 0, e?.current && o ? e.current.querySelector("input")?.focus() : e.current?.focus());
|
|
14
17
|
};
|
|
15
|
-
return
|
|
18
|
+
return n.current?.addEventListener(
|
|
16
19
|
"keydown",
|
|
17
|
-
(
|
|
18
|
-
switch (
|
|
20
|
+
(c) => {
|
|
21
|
+
switch (c.preventDefault(), c.key) {
|
|
19
22
|
case "ArrowDown": {
|
|
20
|
-
|
|
23
|
+
i();
|
|
21
24
|
break;
|
|
22
25
|
}
|
|
23
26
|
case "Tab": {
|
|
24
|
-
|
|
27
|
+
c.shiftKey ? l() : i();
|
|
25
28
|
break;
|
|
26
29
|
}
|
|
27
30
|
case "ArrowUp": {
|
|
28
|
-
r.current === 0 ?
|
|
31
|
+
r.current === 0 ? e.current?.focus() : l();
|
|
29
32
|
break;
|
|
30
33
|
}
|
|
31
34
|
case "Enter": {
|
|
32
|
-
|
|
35
|
+
t[r.current]?.click();
|
|
33
36
|
break;
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
},
|
|
37
|
-
{ signal:
|
|
40
|
+
{ signal: u.signal }
|
|
38
41
|
), () => {
|
|
39
|
-
|
|
42
|
+
u.abort();
|
|
40
43
|
};
|
|
41
|
-
}, [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"mouseenter",
|
|
45
|
-
() => {
|
|
46
|
-
(t.current?.querySelectorAll("li") ?? []).forEach((n) => n.blur());
|
|
47
|
-
},
|
|
48
|
-
{ signal: e.signal }
|
|
49
|
-
), () => {
|
|
50
|
-
e.abort();
|
|
51
|
-
};
|
|
52
|
-
}, [t, i]), u(() => {
|
|
53
|
-
l || (r.current = 0);
|
|
54
|
-
}, [l]);
|
|
44
|
+
}, [n, r, e, o, f.length]), a(() => {
|
|
45
|
+
s || (r.current = 0);
|
|
46
|
+
}, [s]);
|
|
55
47
|
};
|
|
56
48
|
export {
|
|
57
|
-
|
|
49
|
+
A as useNavigationUlList
|
|
58
50
|
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as h, jsx as p } from "react/jsx-runtime";
|
|
|
2
2
|
import v, { forwardRef as x, useState as C, useRef as w, useCallback as b, useEffect as E } from "react";
|
|
3
3
|
import { cn as l } from "../../utils/index.js";
|
|
4
4
|
import { Button as P } from "../Button/Button.js";
|
|
5
|
-
import { P as c } from "../../index
|
|
5
|
+
import { P as c } from "../../index--V_ZsiQe.js";
|
|
6
6
|
function m() {
|
|
7
7
|
return m = Object.assign || function(e) {
|
|
8
8
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5,7 +5,7 @@ import { Checkbox as C } from "../../../Checkbox/Checkbox.js";
|
|
|
5
5
|
import { cn as n } from "../../../../utils/index.js";
|
|
6
6
|
import { filterButtonIconVariants as y, filterButtonVariants as N } from "../../Filter.variants.js";
|
|
7
7
|
import { useBadgeMultiSelect as B } from "./BadgeMultiSelect.hook.js";
|
|
8
|
-
import { C as O } from "../../../../chevron-down-
|
|
8
|
+
import { C as O } from "../../../../chevron-down-DgT-uSF9.js";
|
|
9
9
|
const $ = ({
|
|
10
10
|
options: i,
|
|
11
11
|
label: p,
|
|
@@ -5,7 +5,7 @@ import { DatePicker as w } from "../../../Datepicker/DatePicker.js";
|
|
|
5
5
|
import { cn as o } from "../../../../utils/index.js";
|
|
6
6
|
import { filterButtonIconVariants as x, filterButtonVariants as y } from "../../Filter.variants.js";
|
|
7
7
|
import { useDateFilterDropdown as D } from "./DateFilterDropdown.hook.js";
|
|
8
|
-
import { C as N } from "../../../../chevron-down-
|
|
8
|
+
import { C as N } from "../../../../chevron-down-DgT-uSF9.js";
|
|
9
9
|
const R = ({
|
|
10
10
|
label: s,
|
|
11
11
|
position: l = "left",
|
|
@@ -4,7 +4,7 @@ import { cn as u } from "../../utils/index.js";
|
|
|
4
4
|
import { inputVariants as $ } from "./Input.variants.js";
|
|
5
5
|
import { SearchIcon as L } from "../../assets/icons/components/Search.js";
|
|
6
6
|
import { Warning as T } from "../../assets/icons/components/Warning.js";
|
|
7
|
-
import { P as i } from "../../index
|
|
7
|
+
import { P as i } from "../../index--V_ZsiQe.js";
|
|
8
8
|
function h() {
|
|
9
9
|
return h = Object.assign || function(t) {
|
|
10
10
|
for (var n = 1; n < arguments.length; n++) {
|
|
@@ -39,7 +39,7 @@ const a = r(
|
|
|
39
39
|
variants: {
|
|
40
40
|
variant: {
|
|
41
41
|
default: "",
|
|
42
|
-
error: "border-red-600 kubefirst-dark:border-red-500 dark:border-red-500
|
|
42
|
+
error: "border-red-600 kubefirst-dark:border-red-500 dark:border-red-500 pr-8 focus-visible:ring-transparent"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
defaultVariants: {
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cn as c } from "../../utils/index.js";
|
|
3
3
|
import { loadingVariants as i } from "./Loading.variants.js";
|
|
4
|
-
import { c as t } from "../../createLucideIcon-
|
|
5
|
-
/**
|
|
6
|
-
* @license lucide-react v0.544.0 - ISC
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the ISC license.
|
|
9
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/
|
|
4
|
+
import { c as t } from "../../createLucideIcon-D4r5Phnh.js";
|
|
11
5
|
const d = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], m = t("loader-circle", d), n = ({ className: o, theme: a, ...r }) => /* @__PURE__ */ e(
|
|
12
6
|
m,
|
|
13
7
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "
|
|
4
|
-
import { M as d } from "../../Modal-
|
|
3
|
+
import "react-dom";
|
|
4
|
+
import { M as d } from "../../Modal-5xSxFoaD.js";
|
|
5
5
|
import "./components/Header/Header.js";
|
|
6
6
|
import "./components/Body/Body.js";
|
|
7
7
|
import "./components/Footer/Footer.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { S as n } from "../../../../index-
|
|
2
|
+
import { S as n } from "../../../../index-BtQfgaSF.js";
|
|
3
3
|
import { cn as e } from "../../../../utils/index.js";
|
|
4
4
|
const i = ({ children: o, asChild: t, className: m }) => /* @__PURE__ */ r(t ? n : "div", { className: e("flex-1", m), children: o });
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { S as n } from "../../../../index-
|
|
2
|
+
import { S as n } from "../../../../index-BtQfgaSF.js";
|
|
3
3
|
import { cn as e } from "../../../../utils/index.js";
|
|
4
4
|
const a = ({ children: o, asChild: r, className: t }) => /* @__PURE__ */ m(r ? n : "div", { className: e("border-zinc-200", t), children: o });
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { S as n } from "../../../../index-
|
|
2
|
+
import { S as n } from "../../../../index-BtQfgaSF.js";
|
|
3
3
|
import { cn as e } from "../../../../utils/index.js";
|
|
4
4
|
const a = ({ children: o, asChild: r, className: t }) => /* @__PURE__ */ m(r ? n : "div", { className: e("border-zinc-200", t), children: o });
|
|
5
5
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../../../../index-
|
|
2
|
+
import "../../../../index-DrWQH0QF.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../../../Combination-VYaRRJBZ.js";
|
|
5
|
-
import { W as f } from "../../../../Modal-
|
|
5
|
+
import { W as f } from "../../../../Modal-5xSxFoaD.js";
|
|
6
6
|
import "../../../../utils/index.js";
|
|
7
7
|
import "./Wrapper.variants.js";
|
|
8
|
-
import "../../../../x-
|
|
8
|
+
import "../../../../x-DPU9OdYH.js";
|
|
9
9
|
export {
|
|
10
10
|
f as Wrapper
|
|
11
11
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Body as e } from "./Body/Body.js";
|
|
2
2
|
import { Footer as t } from "./Footer/Footer.js";
|
|
3
3
|
import { Header as m } from "./Header/Header.js";
|
|
4
|
-
import { W as a } from "../../../Modal-
|
|
4
|
+
import { W as a } from "../../../Modal-5xSxFoaD.js";
|
|
5
5
|
export {
|
|
6
6
|
e as Body,
|
|
7
7
|
t as Footer,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as m, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { R as O } from "../../index-
|
|
2
|
+
import { R as O } from "../../index-DrWQH0QF.js";
|
|
3
3
|
import f, { forwardRef as b, useId as N, useCallback as w } from "react";
|
|
4
4
|
import { cn as y } from "../../utils/index.js";
|
|
5
5
|
import { labelVariants as z, buttonVariants as j, numberInputVariants as _ } from "./NumberInput.variants.js";
|
|
6
|
-
import { P as l } from "../../index
|
|
6
|
+
import { P as l } from "../../index--V_ZsiQe.js";
|
|
7
7
|
function h() {
|
|
8
8
|
return h = Object.assign || function(e) {
|
|
9
9
|
for (var o = 1; o < arguments.length; o++) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { PhoneNumberProvider as t } from "./contexts/phone-number.provider.js";
|
|
4
|
+
import { Wrapper as f } from "./components/Wrapper.js";
|
|
5
|
+
const u = p(({ defaultCountryCode: o = "US", ...m }, e) => /* @__PURE__ */ r(t, { defaultCountryCode: o, children: /* @__PURE__ */ r(f, { ref: e, ...m }) }));
|
|
6
|
+
export {
|
|
7
|
+
u as PhoneNumberInput
|
|
8
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { c as r } from "../../index-D29mdTf5.js";
|
|
2
|
+
const e = r(
|
|
3
|
+
[
|
|
4
|
+
"relative",
|
|
5
|
+
"border",
|
|
6
|
+
"border-gray-300",
|
|
7
|
+
"rounded",
|
|
8
|
+
"data-[state=open]:border-aurora-500",
|
|
9
|
+
"focus-within:border-aurora-500",
|
|
10
|
+
"transition-colors",
|
|
11
|
+
"duration-150",
|
|
12
|
+
"dark:border-slate-500",
|
|
13
|
+
"dark:bg-slate-800",
|
|
14
|
+
"dark:data-[state=open]:border-slate-500",
|
|
15
|
+
"dark:focus-within:border-slate-500"
|
|
16
|
+
],
|
|
17
|
+
{
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
default: [],
|
|
21
|
+
error: [
|
|
22
|
+
"border-red-600",
|
|
23
|
+
"dark:border-red-500",
|
|
24
|
+
"data-[state=open]:border-red-500",
|
|
25
|
+
"focus-within:border-red-500",
|
|
26
|
+
"pr-8",
|
|
27
|
+
"focus-visible:ring-transparent"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
), t = r([
|
|
36
|
+
"cursor-pointer",
|
|
37
|
+
"text-sm",
|
|
38
|
+
"leading-5",
|
|
39
|
+
"tracking-[0.1px]",
|
|
40
|
+
"dark:text-slate-50"
|
|
41
|
+
]);
|
|
42
|
+
export {
|
|
43
|
+
t as labelVariants,
|
|
44
|
+
e as phoneNumberInputVariants
|
|
45
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { C as s } from "../../../../chevron-up-DrQr2Fwd.js";
|
|
3
|
+
import { usePhoneNumberContext as l } from "../../contexts/phone-number.hook.js";
|
|
4
|
+
const m = () => {
|
|
5
|
+
const { selectedCountry: o, isOpenSelector: t, handleOpenSelector: a } = l(), { flag: n } = o;
|
|
6
|
+
return /* @__PURE__ */ r(
|
|
7
|
+
"button",
|
|
8
|
+
{
|
|
9
|
+
type: "button",
|
|
10
|
+
className: "flex items-center gap-2 cursor-pointer",
|
|
11
|
+
onClick: () => a(!t),
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ e(n, {}),
|
|
14
|
+
/* @__PURE__ */ e(
|
|
15
|
+
s,
|
|
16
|
+
{
|
|
17
|
+
className: "transition-all duration-100 data-[state=open]:rotate-0 data-[state=closed]:rotate-180 w-5 h-5 text-slate-400",
|
|
18
|
+
"data-state": t ? "open" : "closed"
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
m as FlagContent
|
|
27
|
+
};
|