@konstructio/ui 0.1.0-alpha.8 → 0.1.1-alpha.1

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 (167) hide show
  1. package/dist/DatePicker.css +1 -1
  2. package/dist/{Modal-CrG0m703.js → Modal-0oht63vU.js} +32 -32
  3. package/dist/assets/icons/components/Search.js +26 -0
  4. package/dist/assets/icons/components/Warning.js +22 -0
  5. package/dist/assets/icons/components/index.js +6 -0
  6. package/dist/{chevron-down-UW8ts6wI.js → chevron-down-CVce9Mvh.js} +2 -2
  7. package/dist/components/Alert/Alert.js +23 -25
  8. package/dist/components/Alert/Alert.variants.js +1 -1
  9. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  10. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  11. package/dist/components/AlertDialog/components/index.js +1 -1
  12. package/dist/components/AlertDialog/hooks/useAlertDialog.js +7 -7
  13. package/dist/components/Autocomplete/Autocomplete.variants.js +3 -4
  14. package/dist/components/Autocomplete/components/List/List.variants.js +3 -7
  15. package/dist/components/Autocomplete/hooks/useAutocomplete.js +38 -43
  16. package/dist/components/Autocomplete/hooks/useNavigationList.js +29 -37
  17. package/dist/components/Badge/Badge.js +40 -42
  18. package/dist/components/Badge/Badge.variants.js +1 -1
  19. package/dist/components/Breadcrumb/Breadcrumb.variants.js +1 -1
  20. package/dist/components/Breadcrumb/components/Item/Item.js +22 -21
  21. package/dist/components/Breadcrumb/components/Item/Item.variants.js +1 -1
  22. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  23. package/dist/components/Button/Button.js +15 -15
  24. package/dist/components/Button/Button.variants.js +10 -77
  25. package/dist/components/Card/Card.variants.js +3 -5
  26. package/dist/components/Checkbox/Checkbox.js +48 -47
  27. package/dist/components/Checkbox/Checkbox.variants.js +3 -4
  28. package/dist/components/Command/Command.js +2 -2
  29. package/dist/components/Command/Command.variants.js +1 -1
  30. package/dist/components/Command/components/Command.js +1 -1
  31. package/dist/components/Command/components/CommandEmpty.js +1 -1
  32. package/dist/components/Command/components/CommandGroup.js +1 -1
  33. package/dist/components/Command/components/CommandInput.js +1 -1
  34. package/dist/components/Command/components/CommandItem.js +13 -13
  35. package/dist/components/Command/components/CommandList.js +1 -1
  36. package/dist/components/Command/components/CommandSeparator.js +1 -1
  37. package/dist/components/Command/components/DialogContent.js +1 -1
  38. package/dist/components/Command/components/DialogOverlay.js +1 -1
  39. package/dist/components/Datepicker/DatePicker.js +1496 -1577
  40. package/dist/components/Datepicker/DatePicker.variants.js +1 -1
  41. package/dist/components/Divider/Divider.variants.js +1 -1
  42. package/dist/components/Dropdown/Dropdown.js +28 -6
  43. package/dist/components/Dropdown/Dropdown.variants.js +43 -26
  44. package/dist/components/Dropdown/components/List/List.variants.js +1 -1
  45. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +5 -5
  46. package/dist/components/Dropdown/components/Wrapper.js +96 -86
  47. package/dist/components/Dropdown/contexts/dropdown.provider.js +12 -12
  48. package/dist/components/Dropdown/hooks/useDropdown.js +26 -30
  49. package/dist/components/Dropdown/hooks/useNavigationList.js +25 -31
  50. package/dist/components/DropdownButton/DropdownButton.js +135 -0
  51. package/dist/components/Filter/Filter.variants.js +1 -1
  52. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +47 -49
  53. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +70 -57
  54. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +41 -42
  55. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +68 -55
  56. package/dist/components/Filter/components/ResetButton/ResetButton.js +22 -16
  57. package/dist/components/Input/Input.js +116 -109
  58. package/dist/components/Input/Input.variants.js +18 -5
  59. package/dist/components/Loading/Loading.js +2 -2
  60. package/dist/components/Loading/Loading.variants.js +1 -2
  61. package/dist/components/Modal/Modal.js +2 -2
  62. package/dist/components/Modal/components/Body/Body.js +1 -1
  63. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  64. package/dist/components/Modal/components/Header/Header.js +1 -1
  65. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
  66. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +7 -9
  67. package/dist/components/Modal/components/index.js +1 -1
  68. package/dist/components/Modal/hooks/useModal.js +16 -17
  69. package/dist/components/NumberInput/NumberInput.js +91 -91
  70. package/dist/components/NumberInput/NumberInput.variants.js +1 -1
  71. package/dist/components/PieChart/PieChart.js +5138 -0
  72. package/dist/components/ProgressBar/ProgressBar.js +58 -26
  73. package/dist/components/ProgressBar/ProgressBar.variants.js +1 -1
  74. package/dist/components/Radio/Radio.js +64 -48
  75. package/dist/components/Radio/Radio.variants.js +3 -3
  76. package/dist/components/RadioCard/RadioCard.js +26 -23
  77. package/dist/components/RadioCard/RadioCard.variants.js +1 -1
  78. package/dist/components/RadioCardGroup/RadioCardGroup.js +28 -28
  79. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +1 -1
  80. package/dist/components/RadioGroup/RadioGroup.js +37 -37
  81. package/dist/components/RadioGroup/RadioGroup.variants.js +1 -1
  82. package/dist/components/Range/Range.js +1 -1
  83. package/dist/components/Range/Range.variants.js +2 -3
  84. package/dist/components/Sidebar/Sidebar.js +4 -3
  85. package/dist/components/Sidebar/Sidebar.variants.js +1 -1
  86. package/dist/components/Sidebar/components/Footer/Footer.js +5 -4
  87. package/dist/components/Sidebar/components/Footer/Footer.variants.js +1 -1
  88. package/dist/components/Sidebar/components/Logo/Logo.js +6 -5
  89. package/dist/components/Sidebar/components/Logo/Logo.variants.js +1 -1
  90. package/dist/components/Sidebar/components/Navigation/Navigation.js +5 -4
  91. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +1 -1
  92. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +14 -13
  93. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +1 -1
  94. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +13 -12
  95. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +1 -1
  96. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +5 -6
  97. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +1 -1
  98. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +9 -8
  99. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +1 -1
  100. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +15 -14
  101. package/dist/components/Slider/Slider.js +1 -1
  102. package/dist/components/Slider/Slider.variants.js +2 -8
  103. package/dist/components/Switch/Switch.js +54 -54
  104. package/dist/components/Switch/Switch.variants.js +2 -3
  105. package/dist/components/Table/Table.variants.js +1 -1
  106. package/dist/components/Tabs/Tabs.js +20 -16
  107. package/dist/components/Tabs/Tabs.variants.js +3 -5
  108. package/dist/components/Tabs/components/Content.js +10 -13
  109. package/dist/components/Tabs/components/List.js +9 -8
  110. package/dist/components/Tabs/components/Trigger.js +12 -16
  111. package/dist/components/Tabs/components/index.js +8 -0
  112. package/dist/components/Tag/Tag.js +1 -1
  113. package/dist/components/Tag/Tag.variants.js +1 -1
  114. package/dist/components/TagSelect/TagSelect.variants.js +1 -1
  115. package/dist/components/TagSelect/components/Item/Item.variants.js +1 -1
  116. package/dist/components/TagSelect/components/List/List.variants.js +1 -1
  117. package/dist/components/TagSelect/hooks/useTagSelect.js +14 -16
  118. package/dist/components/TextArea/TextArea.variants.js +4 -5
  119. package/dist/components/TimePicker/TimePicker.variants.js +6 -7
  120. package/dist/components/TimePicker/components/HoursList/HoursList.js +21 -26
  121. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +19 -20
  122. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +24 -25
  123. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +33 -34
  124. package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +1 -1
  125. package/dist/components/Toast/Toast.js +223 -232
  126. package/dist/components/Toast/Toast.variants.js +8 -11
  127. package/dist/components/Tooltip/Tooltip.js +1 -1
  128. package/dist/components/Tooltip/Tooltip.variants.js +7 -14
  129. package/dist/components/Tooltip/hooks/useTooltip.js +8 -9
  130. package/dist/components/Typography/Typography.js +26 -31
  131. package/dist/components/Typography/Typography.variants.js +1 -1
  132. package/dist/components/index.js +78 -66
  133. package/dist/contexts/theme.provider.js +28 -29
  134. package/dist/{createLucideIcon-ByJ0JZvK.js → createLucideIcon-BpsAkT97.js} +4 -4
  135. package/dist/index-0ioNhtNM.js +10 -0
  136. package/dist/{index-CvfCCTEO.js → index-BAraV3ai.js} +7 -7
  137. package/dist/index-BXuxPoz7.js +435 -0
  138. package/dist/index-BfXxHr_2.js +125 -0
  139. package/dist/index-C1g_chDT.js +70 -0
  140. package/dist/{index-BCGvACM9.js → index-C9T9HQaa.js} +1 -1
  141. package/dist/{index-Bc1LNrRD.js → index-CZnD2QxM.js} +1 -1
  142. package/dist/index-CrBonFvu.js +144 -0
  143. package/dist/{index-rUBNhTeF.js → index-Cvx4lqTq.js} +2 -2
  144. package/dist/{index-BNmRGtA6.js → index-D29mdTf5.js} +3 -3
  145. package/dist/{index-Dkt8F6CZ.js → index-D3xzCzcO.js} +12 -12
  146. package/dist/index-DB2XhXHn.js +431 -0
  147. package/dist/{index-B5MIi2tR.js → index-DQH6odE9.js} +2 -3
  148. package/dist/index-Oq5GlCHP.js +131 -0
  149. package/dist/{index-Cs8Lv8Wj.js → index-bwWKd82e.js} +1 -1
  150. package/dist/{index--EmNlyHx.js → index-iXyXtdgP.js} +1 -1
  151. package/dist/index.d.ts +159 -9
  152. package/dist/index.js +88 -76
  153. package/dist/package.json +41 -37
  154. package/dist/styles.css +1 -1
  155. package/dist/ui/civo-theme.css +261 -241
  156. package/dist/ui/kubefirst-theme.css +4 -4
  157. package/dist/ui/theme.css +0 -2
  158. package/dist/{useBreadcrumb-DMERrNkJ.js → useBreadcrumb-B8DnuqkR.js} +254 -261
  159. package/dist/utils/index.js +25 -26
  160. package/package.json +41 -37
  161. package/dist/index-BNU3RH-3.js +0 -133
  162. package/dist/index-BvCZBMfr.js +0 -432
  163. package/dist/index-Cq1I1cG9.js +0 -129
  164. package/dist/index-DLYwlPRZ.js +0 -440
  165. package/dist/index-DNRcvRTB.js +0 -145
  166. package/dist/index-Dm-ooN_M.js +0 -71
  167. package/dist/index-DwYXX2sM.js +0 -13
@@ -0,0 +1,8 @@
1
+ import { Content as t } from "./Content.js";
2
+ import { List as f } from "./List.js";
3
+ import { Trigger as p } from "./Trigger.js";
4
+ export {
5
+ t as Content,
6
+ f as List,
7
+ p as Trigger
8
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
- import { S as r } from "../../index-B5MIi2tR.js";
2
+ import { S as r } from "../../index-DQH6odE9.js";
3
3
  import { cn as o } from "../../utils/index.js";
4
4
  import { tagVariants as c } from "./Tag.variants.js";
5
5
  const u = ({
@@ -1,4 +1,4 @@
1
- import { c as e } from "../../index-BNmRGtA6.js";
1
+ import { c as e } from "../../index-D29mdTf5.js";
2
2
  const f = e(
3
3
  [
4
4
  "px-2",
@@ -1,4 +1,4 @@
1
- import { c as e } from "../../index-BNmRGtA6.js";
1
+ import { c as e } from "../../index-D29mdTf5.js";
2
2
  const t = e([
3
3
  "flex",
4
4
  "flex-col",
@@ -1,4 +1,4 @@
1
- import { c as e } from "../../../../index-BNmRGtA6.js";
1
+ import { c as e } from "../../../../index-D29mdTf5.js";
2
2
  const t = e(
3
3
  [
4
4
  "cursor-pointer",
@@ -1,4 +1,4 @@
1
- import { c as o } from "../../../../index-BNmRGtA6.js";
1
+ import { c as o } from "../../../../index-D29mdTf5.js";
2
2
  const a = o([
3
3
  "absolute",
4
4
  "bg-white",
@@ -1,32 +1,30 @@
1
- import { useRef as c, useEffect as u, useCallback as i } from "react";
2
- import { useTagSelect as d } from "../contexts/TagSelect.hook.js";
1
+ import { useRef as l, useEffect as c, useCallback as u } from "react";
2
+ import { useTagSelect as i } from "../contexts/TagSelect.hook.js";
3
3
  const g = () => {
4
- const a = c(null), { onOpen: e } = d();
5
- u(() => {
6
- const t = new AbortController(), n = (s) => {
7
- s.key === "Escape" && e(!1);
8
- }, o = (s) => {
9
- var r;
10
- (r = a.current) != null && r.contains(s.target) || e(!1);
4
+ const n = l(null), { onOpen: e } = i();
5
+ c(() => {
6
+ const t = new AbortController(), s = (a) => {
7
+ a.key === "Escape" && e(!1);
8
+ }, o = (a) => {
9
+ n.current?.contains(a.target) || e(!1);
11
10
  };
12
- return document.addEventListener("keydown", n, {
11
+ return document.addEventListener("keydown", s, {
13
12
  signal: t.signal
14
13
  }), document.addEventListener("mousedown", o, {
15
14
  signal: t.signal
16
15
  }), () => {
17
16
  t.abort();
18
17
  };
19
- }, [e, a]);
20
- const l = i(
18
+ }, [e, n]);
19
+ const r = u(
21
20
  (t) => {
22
- const n = t.target;
23
- (n == null ? void 0 : n.closest("[data-value]")) || e(!0);
21
+ t.target?.closest("[data-value]") || e(!0);
24
22
  },
25
23
  [e]
26
24
  );
27
25
  return {
28
- wrapperRef: a,
29
- handleOpen: l
26
+ wrapperRef: n,
27
+ handleOpen: r
30
28
  };
31
29
  };
32
30
  export {
@@ -1,5 +1,5 @@
1
- import { c as r } from "../../index-BNmRGtA6.js";
2
- const e = r([
1
+ import { c as r } from "../../index-D29mdTf5.js";
2
+ const o = r([
3
3
  "border",
4
4
  "border-gray-200",
5
5
  "disabled:cursor-not-allowed",
@@ -13,9 +13,8 @@ const e = r([
13
13
  "rounded-md",
14
14
  "shadow-xs",
15
15
  "w-full",
16
- "focus:ring-kubefirst-primary",
17
- "colony:focus:ring-red-700"
16
+ "focus:ring-kubefirst-primary"
18
17
  ]);
19
18
  export {
20
- e as textAreaVariants
19
+ o as textAreaVariants
21
20
  };
@@ -1,4 +1,4 @@
1
- import { c as r } from "../../index-BNmRGtA6.js";
1
+ import { c as r } from "../../index-D29mdTf5.js";
2
2
  const t = r([
3
3
  "border",
4
4
  "rounded",
@@ -11,8 +11,7 @@ const t = r([
11
11
  "cursor-pointer",
12
12
  "transition-all",
13
13
  "transition-duration-100",
14
- "data-[open=true]:border-blue-primary",
15
- "data-[open=true]:border-civo-primary",
14
+ "data-[open=true]:border-aurora-500",
16
15
  "text-sm"
17
16
  ]), o = r([
18
17
  "snap-y",
@@ -21,7 +20,7 @@ const t = r([
21
20
  "scrollbar-none",
22
21
  "flex",
23
22
  "flex-col"
24
- ]), a = r([
23
+ ]), n = r([
25
24
  "w-[60px]",
26
25
  "h-[40px]",
27
26
  "snap-start",
@@ -41,7 +40,7 @@ const t = r([
41
40
  "data-[active=true]:font-medium",
42
41
  "focus-visible:border-blue-200",
43
42
  "focus-within:border-blue-200"
44
- ]), n = r([
43
+ ]), a = r([
45
44
  "flex",
46
45
  "items-center",
47
46
  "justify-center",
@@ -55,8 +54,8 @@ const t = r([
55
54
  "text-sm"
56
55
  ]);
57
56
  export {
58
- n as buttonVariants,
59
- a as liVariants,
57
+ a as buttonVariants,
58
+ n as liVariants,
60
59
  t as timePickerVariants,
61
60
  o as ulVariants
62
61
  };
@@ -5,25 +5,20 @@ import { buttonVariants as b, liVariants as d, ulVariants as h } from "../../Tim
5
5
  import { useTimePickerContext as k } from "../../contexts/time-picker.hook.js";
6
6
  const H = ({ hours: l, scrollBehavior: i }) => {
7
7
  const n = p(null), u = p(!0), { format: c, onSelectHour: m } = k(), s = c === "12" && l >= 12 ? l - 12 : l, f = v(
8
- (r, e) => {
9
- var t;
10
- (t = r.currentTarget) == null || t.blur(), m(e);
8
+ (r, t) => {
9
+ r.currentTarget?.blur(), m(t);
11
10
  },
12
11
  [m]
13
12
  );
14
13
  if (y(() => {
15
14
  if (u.current) {
16
- const r = n.current, e = s === 0 && c === "12" ? 12 : s;
17
- if (r) {
18
- const t = r.querySelector(
19
- `[data-value="${`0${e}`.slice(-2)}"]`
20
- );
21
- t == null || t.scrollIntoView({
22
- behavior: i,
23
- block: "center"
24
- });
25
- }
26
- u.current = !1;
15
+ const r = n.current, t = s === 0 && c === "12" ? 12 : s;
16
+ r && r.querySelector(
17
+ `[data-value="${`0${t}`.slice(-2)}"]`
18
+ )?.scrollIntoView({
19
+ behavior: i,
20
+ block: "center"
21
+ }), u.current = !1;
27
22
  }
28
23
  }, [c, s, i]), c === "12") {
29
24
  const r = s === 0 ? 12 : s;
@@ -34,12 +29,12 @@ const H = ({ hours: l, scrollBehavior: i }) => {
34
29
  className: o(h()),
35
30
  "aria-label": "hours",
36
31
  role: "listbox",
37
- children: Array.from({ length: 12 }, (e, t) => /* @__PURE__ */ a(
32
+ children: Array.from({ length: 12 }, (t, e) => /* @__PURE__ */ a(
38
33
  "li",
39
34
  {
40
35
  className: o(d()),
41
- "data-value": `0${t + 1}`.slice(-2),
42
- "data-active": r - 1 === t,
36
+ "data-value": `0${e + 1}`.slice(-2),
37
+ "data-active": r - 1 === e,
43
38
  role: "presentation",
44
39
  children: /* @__PURE__ */ a(
45
40
  "button",
@@ -47,12 +42,12 @@ const H = ({ hours: l, scrollBehavior: i }) => {
47
42
  type: "button",
48
43
  role: "option",
49
44
  className: o(b()),
50
- onClick: (N) => f(N, t + 1),
51
- children: t + 1
45
+ onClick: (N) => f(N, e + 1),
46
+ children: e + 1
52
47
  }
53
48
  )
54
49
  },
55
- t
50
+ e
56
51
  ))
57
52
  }
58
53
  );
@@ -64,12 +59,12 @@ const H = ({ hours: l, scrollBehavior: i }) => {
64
59
  className: o(h()),
65
60
  "aria-label": "hours",
66
61
  role: "listbox",
67
- children: Array.from({ length: 24 }, (r, e) => /* @__PURE__ */ a(
62
+ children: Array.from({ length: 24 }, (r, t) => /* @__PURE__ */ a(
68
63
  "li",
69
64
  {
70
65
  className: o(d()),
71
- "data-value": `0${e}`.slice(-2),
72
- "data-active": l === e,
66
+ "data-value": `0${t}`.slice(-2),
67
+ "data-active": l === t,
73
68
  role: "presentation",
74
69
  children: /* @__PURE__ */ a(
75
70
  "button",
@@ -77,12 +72,12 @@ const H = ({ hours: l, scrollBehavior: i }) => {
77
72
  type: "button",
78
73
  role: "option",
79
74
  className: o(b()),
80
- onClick: (t) => f(t, e),
81
- children: e
75
+ onClick: (e) => f(e, t),
76
+ children: t
82
77
  }
83
78
  )
84
79
  },
85
- e
80
+ t
86
81
  ))
87
82
  }
88
83
  );
@@ -1,31 +1,30 @@
1
- import { jsxs as b, jsx as r } from "react/jsx-runtime";
2
- import { useCallback as N } from "react";
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
+ import { useCallback as b } from "react";
3
3
  import { cn as t } from "../../../../utils/index.js";
4
- import { buttonVariants as c, liVariants as s } from "../../TimePicker.variants.js";
5
- import { useTimePickerContext as x } from "../../contexts/time-picker.hook.js";
6
- const M = ({
7
- listClassName: m,
4
+ import { buttonVariants as n, liVariants as c } from "../../TimePicker.variants.js";
5
+ import { useTimePickerContext as N } from "../../contexts/time-picker.hook.js";
6
+ const x = ({
7
+ listClassName: s,
8
8
  listItemClassName: a,
9
9
  listItemButtonClassName: i
10
10
  }) => {
11
- const { format: p, isAM: l, onSelectAM: u, onSelectPM: d } = x(), o = N(
12
- (e, f) => {
13
- var n;
14
- (n = e.currentTarget) == null || n.blur(), f();
11
+ const { format: m, isAM: l, onSelectAM: p, onSelectPM: u } = N(), o = b(
12
+ (e, d) => {
13
+ e.currentTarget?.blur(), d();
15
14
  },
16
15
  []
17
16
  );
18
- return p === "24" ? null : /* @__PURE__ */ b(
17
+ return m === "24" ? null : /* @__PURE__ */ f(
19
18
  "ul",
20
19
  {
21
- className: t("flex items-center justify-center flex-col", m),
20
+ className: t("flex items-center justify-center flex-col", s),
22
21
  "aria-label": "meridian",
23
22
  role: "listbox",
24
23
  children: [
25
24
  /* @__PURE__ */ r(
26
25
  "li",
27
26
  {
28
- className: t(s({ className: a })),
27
+ className: t(c({ className: a })),
29
28
  "data-active": l,
30
29
  role: "presentation",
31
30
  children: /* @__PURE__ */ r(
@@ -33,8 +32,8 @@ const M = ({
33
32
  {
34
33
  type: "button",
35
34
  role: "option",
36
- className: t(c({ className: i })),
37
- onClick: (e) => o(e, u),
35
+ className: t(n({ className: i })),
36
+ onClick: (e) => o(e, p),
38
37
  children: "AM"
39
38
  }
40
39
  )
@@ -43,7 +42,7 @@ const M = ({
43
42
  /* @__PURE__ */ r(
44
43
  "li",
45
44
  {
46
- className: t(s({ className: a })),
45
+ className: t(c({ className: a })),
47
46
  "data-active": !l,
48
47
  role: "presentation",
49
48
  children: /* @__PURE__ */ r(
@@ -51,8 +50,8 @@ const M = ({
51
50
  {
52
51
  type: "button",
53
52
  role: "option",
54
- className: t(c({ className: i })),
55
- onClick: (e) => o(e, d),
53
+ className: t(n({ className: i })),
54
+ onClick: (e) => o(e, u),
56
55
  children: "PM"
57
56
  }
58
57
  )
@@ -62,7 +61,7 @@ const M = ({
62
61
  }
63
62
  );
64
63
  };
65
- M.displayName = "MeridianList";
64
+ x.displayName = "MeridianList";
66
65
  export {
67
- M as MeridianList
66
+ x as MeridianList
68
67
  };
@@ -1,50 +1,49 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useRef as i, useEffect as p, useCallback as f } from "react";
3
- import { cn as n } from "../../../../utils/index.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useRef as c, useEffect as p, useCallback as f } from "react";
3
+ import { cn as o } from "../../../../utils/index.js";
4
4
  import { buttonVariants as b, liVariants as h, ulVariants as d } from "../../TimePicker.variants.js";
5
5
  import { useTimePickerContext as k } from "../../contexts/time-picker.hook.js";
6
- const y = ({ minutes: a, scrollBehavior: l }) => {
7
- const s = i(null), u = i(a), { onSelectMinute: c } = k();
6
+ const y = ({ minutes: n, scrollBehavior: a }) => {
7
+ const l = c(null), u = c(n), { onSelectMinute: s } = k();
8
8
  p(() => {
9
- const r = s.current;
10
- if (r) {
11
- const e = `0${u.current}`.slice(-2), t = r.querySelector(
9
+ const t = l.current;
10
+ if (t) {
11
+ const e = `0${u.current}`.slice(-2);
12
+ t.querySelector(
12
13
  `[data-value="${e}"]`
13
- );
14
- t == null || t.scrollIntoView({
15
- behavior: l,
14
+ )?.scrollIntoView({
15
+ behavior: a,
16
16
  block: "center"
17
17
  });
18
18
  }
19
- }, [l]);
19
+ }, [a]);
20
20
  const m = f(
21
- (r, e) => {
22
- var t;
23
- c(r), (t = e.currentTarget) == null || t.blur();
21
+ (t, e) => {
22
+ s(t), e.currentTarget?.blur();
24
23
  },
25
- [c]
24
+ [s]
26
25
  );
27
- return /* @__PURE__ */ o(
26
+ return /* @__PURE__ */ r(
28
27
  "ul",
29
28
  {
30
- ref: s,
31
- className: n(d()),
29
+ ref: l,
30
+ className: o(d()),
32
31
  "aria-label": "minutes",
33
32
  role: "listbox",
34
- children: Array.from({ length: 60 }, (r, e) => /* @__PURE__ */ o(
33
+ children: Array.from({ length: 60 }, (t, e) => /* @__PURE__ */ r(
35
34
  "li",
36
35
  {
37
- className: n(h()),
36
+ className: o(h()),
38
37
  "data-value": `0${e}`.slice(-2),
39
- "data-active": a === e,
38
+ "data-active": n === e,
40
39
  role: "presentation",
41
- children: /* @__PURE__ */ o(
40
+ children: /* @__PURE__ */ r(
42
41
  "button",
43
42
  {
44
43
  type: "button",
45
44
  role: "option",
46
- className: n(b()),
47
- onClick: (t) => m(e, t),
45
+ className: o(b()),
46
+ onClick: (i) => m(e, i),
48
47
  children: `0${e}`.slice(-2)
49
48
  }
50
49
  )
@@ -1,31 +1,30 @@
1
1
  import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
- import { useId as y, useState as E, useRef as O, useCallback as I, useEffect as L } from "react";
3
- import { cn as d } from "../../../../utils/index.js";
4
- import { timePickerVariants as j } from "../../TimePicker.variants.js";
5
- import { WrapperList as P } from "../WrapperList/WrapperList.js";
6
- import { C as R } from "../../../../chevron-down-UW8ts6wI.js";
7
- import { useTimePickerContext as T } from "../../contexts/time-picker.hook.js";
8
- const $ = ({
9
- name: p,
2
+ import { useId as N, useState as y, useRef as E, useCallback as O, useEffect as I } from "react";
3
+ import { cn as m } from "../../../../utils/index.js";
4
+ import { timePickerVariants as L } from "../../TimePicker.variants.js";
5
+ import { WrapperList as j } from "../WrapperList/WrapperList.js";
6
+ import { C as P } from "../../../../chevron-down-CVce9Mvh.js";
7
+ import { useTimePickerContext as R } from "../../contexts/time-picker.hook.js";
8
+ const V = ({
9
+ name: d,
10
10
  label: i,
11
- required: f,
12
- scrollBehavior: u,
13
- className: x,
14
- listClassName: h,
15
- listItemClassName: w,
16
- listItemButtonClassName: b
11
+ required: p,
12
+ scrollBehavior: f,
13
+ className: u,
14
+ listClassName: x,
15
+ listItemClassName: h,
16
+ listItemButtonClassName: w
17
17
  }) => {
18
- const g = y(), [n, r] = E(!1), l = O(null), { format: k, formattedTime: c } = T(), s = p ?? `time-${g}`, v = I(() => r((e) => !e), []);
19
- return L(() => {
20
- const e = new AbortController(), C = (o) => {
18
+ const b = N(), [n, r] = y(!1), l = E(null), { format: g, formattedTime: c } = R(), s = d ?? `time-${b}`, k = O(() => r((e) => !e), []);
19
+ return I(() => {
20
+ const e = new AbortController(), v = (o) => {
21
21
  o.key === "Escape" && r(!1);
22
- }, N = (o) => {
23
- var m;
24
- (m = l.current) != null && m.contains(o.target) || r(!1);
22
+ }, C = (o) => {
23
+ l.current?.contains(o.target) || r(!1);
25
24
  };
26
- return document.addEventListener("mousedown", N, {
25
+ return document.addEventListener("mousedown", C, {
27
26
  signal: e.signal
28
- }), document.addEventListener("keydown", C, {
27
+ }), document.addEventListener("keydown", v, {
29
28
  signal: e.signal
30
29
  }), () => {
31
30
  e.abort();
@@ -34,15 +33,15 @@ const $ = ({
34
33
  "div",
35
34
  {
36
35
  ref: l,
37
- className: d(
36
+ className: m(
38
37
  "w-max text-slate-800 text-sm flex flex-col gap-2",
39
- k === "12" ? "w-[208px]" : "w-[140px]"
38
+ g === "12" ? "w-[208px]" : "w-[140px]"
40
39
  ),
41
40
  children: [
42
41
  i ? /* @__PURE__ */ t("label", { htmlFor: s, className: "text-slate-500 font-medium", children: [
43
42
  i,
44
43
  " ",
45
- f && /* @__PURE__ */ a("span", { className: "text-red-600", children: "*" })
44
+ p && /* @__PURE__ */ a("span", { className: "text-red-600", children: "*" })
46
45
  ] }) : null,
47
46
  /* @__PURE__ */ t("div", { className: "relative", children: [
48
47
  /* @__PURE__ */ t(
@@ -52,13 +51,13 @@ const $ = ({
52
51
  "aria-haspopup": "listbox",
53
52
  "aria-expanded": "true",
54
53
  "aria-controls": "time-options",
55
- className: d(j({ className: x })),
54
+ className: m(L({ className: u })),
56
55
  "data-open": n,
57
- onClick: v,
56
+ onClick: k,
58
57
  children: [
59
58
  c,
60
59
  /* @__PURE__ */ a(
61
- R,
60
+ P,
62
61
  {
63
62
  className: "w-4 h-4 transition-all text-gray-400 data-[open=true]:rotate-180",
64
63
  "data-open": n
@@ -68,13 +67,13 @@ const $ = ({
68
67
  }
69
68
  ),
70
69
  /* @__PURE__ */ a(
71
- P,
70
+ j,
72
71
  {
73
72
  isOpen: n,
74
- scrollBehavior: u,
75
- listClassName: h,
76
- listItemClassName: w,
77
- listItemButtonClassName: b
73
+ scrollBehavior: f,
74
+ listClassName: x,
75
+ listItemClassName: h,
76
+ listItemButtonClassName: w
78
77
  }
79
78
  )
80
79
  ] }),
@@ -92,5 +91,5 @@ const $ = ({
92
91
  );
93
92
  };
94
93
  export {
95
- $ as Wrapper
94
+ V as Wrapper
96
95
  };
@@ -1,4 +1,4 @@
1
- import { c as a } from "../../../../index-BNmRGtA6.js";
1
+ import { c as a } from "../../../../index-D29mdTf5.js";
2
2
  const p = a([
3
3
  "flex",
4
4
  "gap-1.5",