@cognite/aura 0.3.0 → 0.3.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 (47) hide show
  1. package/DESIGN.md +869 -870
  2. package/README.md +112 -11
  3. package/dist/components/index.d.ts +3 -2
  4. package/dist/components/index.js +165 -160
  5. package/dist/components/ui/core/action-toolbar/action-toolbar.js +4 -4
  6. package/dist/components/ui/core/alert/alert.js +3 -3
  7. package/dist/components/ui/core/banner/banner.js +6 -6
  8. package/dist/components/ui/core/button/button.js +4 -4
  9. package/dist/components/ui/core/checkbox/checkbox.js +8 -8
  10. package/dist/components/ui/core/code-block/code-block.js +6 -6
  11. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +15 -0
  12. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +84 -0
  13. package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -0
  14. package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +18 -0
  15. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +3 -0
  16. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +63 -0
  17. package/dist/components/ui/core/date-time-pickers/index.d.ts +2 -0
  18. package/dist/components/ui/core/date-time-pickers/index.js +8 -0
  19. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +23 -0
  20. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +32 -0
  21. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +3 -3
  22. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +1 -1
  23. package/dist/components/ui/core/hover-card/hover-card.js +3 -3
  24. package/dist/components/ui/core/input/input.js +1 -1
  25. package/dist/components/ui/core/message/message.js +387 -101
  26. package/dist/components/ui/core/pagination/pagination.js +9 -7
  27. package/dist/components/ui/core/prompt-input/prompt-input.js +16 -16
  28. package/dist/components/ui/core/radio-group/radio-group.js +7 -7
  29. package/dist/components/ui/core/reasoning/reasoning.js +1 -1
  30. package/dist/components/ui/core/segmented-control/segmented-control.js +3 -3
  31. package/dist/components/ui/core/select/select.d.ts +2 -1
  32. package/dist/components/ui/core/select/select.js +134 -110
  33. package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -1
  34. package/dist/components/ui/core/shimmer/shimmer.js +89 -49
  35. package/dist/components/ui/core/tabs/tabs.js +3 -3
  36. package/dist/components/ui/core/textarea/textarea.js +1 -1
  37. package/dist/components/ui/core/toggle/toggle.d.ts +15 -0
  38. package/dist/components/ui/core/toggle/toggle.js +74 -0
  39. package/dist/components/ui/core/tool/tool.js +3 -3
  40. package/dist/index.d.ts +1 -1
  41. package/dist/lib/portal-container-context.js +3 -3
  42. package/dist/lib/utils.d.ts +1 -1
  43. package/dist/lib/utils.js +7 -7
  44. package/dist/styles.css +1 -1
  45. package/dist/styles.source.css +3 -0
  46. package/package.json +200 -18
  47. package/dist/index.js +0 -308
@@ -1,11 +1,11 @@
1
1
  import { jsx as a, jsxs as N } from "react/jsx-runtime";
2
- import { forwardRef as l, useMemo as k, useContext as g, createContext as C } from "react";
2
+ import { createContext as k, forwardRef as l, useMemo as C, useContext as g } from "react";
3
3
  import { IconX as S, IconInfoCircleFilled as I, IconAlertCircleFilled as V, IconAlertTriangleFilled as z } from "@tabler/icons-react";
4
4
  import { cva as v } from "class-variance-authority";
5
5
  import { useControllableState as _ } from "../../../../lib/use-controllable-state.js";
6
6
  import { cn as s } from "../../../../lib/utils.js";
7
7
  import { Button as b } from "../button/button.js";
8
- const i = C({
8
+ const i = k({
9
9
  show: !0,
10
10
  setShow: () => {
11
11
  },
@@ -65,7 +65,7 @@ const j = l(
65
65
  defaultProp: n,
66
66
  prop: o,
67
67
  onChange: d
68
- }), u = t === "secondary" ? "info" : t ?? "default", A = k(() => ({ show: p, setShow: x, variant: u, alertStyle: e }), [p, x, u, e]);
68
+ }), u = t === "secondary" ? "info" : t ?? "default", A = C(() => ({ show: p, setShow: x, variant: u, alertStyle: e }), [p, x, u, e]);
69
69
  if (!p)
70
70
  return null;
71
71
  const h = c !== void 0 ? c : T(u);
@@ -1,11 +1,11 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as l, useMemo as k, useContext as b, useState as w, useRef as B, useEffect as N, useCallback as y, createContext as C } from "react";
2
+ import { createContext as k, forwardRef as l, useMemo as w, useContext as b, useState as B, useRef as N, useEffect as y, useCallback as C } from "react";
3
3
  import { cva as V } from "class-variance-authority";
4
4
  import { cn as u } from "../../../../lib/utils.js";
5
5
  import { Badge as S } from "../badge/badge.js";
6
6
  import { Button as A } from "../button/button.js";
7
7
  const R = (e) => {
8
- }, m = C({
8
+ }, m = k({
9
9
  show: !0,
10
10
  setShow: R,
11
11
  variant: "default"
@@ -18,11 +18,11 @@ function j({
18
18
  defaultVisible: t,
19
19
  onClose: n
20
20
  }) {
21
- const [r, a] = w(t), i = e !== void 0, g = i ? e : r, d = B(n);
22
- N(() => {
21
+ const [r, a] = B(t), i = e !== void 0, g = i ? e : r, d = N(n);
22
+ y(() => {
23
23
  d.current = n;
24
24
  }, [n]);
25
- const x = y(
25
+ const x = C(
26
26
  (o) => {
27
27
  if (i) {
28
28
  (p(o) ? o(e) : o) || d.current?.();
@@ -72,7 +72,7 @@ const I = V(
72
72
  defaultVisible: n,
73
73
  visible: t,
74
74
  onClose: r
75
- }), h = k(
75
+ }), h = w(
76
76
  () => ({ show: c ?? !0, setShow: f, variant: o }),
77
77
  [c, f, o]
78
78
  );
@@ -2,9 +2,9 @@ import { jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as g } from "react";
3
3
  import { Button as b } from "@base-ui/react/button";
4
4
  import { cva as c } from "class-variance-authority";
5
- import { cn as u, focusRing as f, focusRingDestructive as l } from "../../../../lib/utils.js";
5
+ import { focusRing as u, focusRingDestructive as f, cn as l } from "../../../../lib/utils.js";
6
6
  const v = c(
7
- `inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm leading-4.5 tracking-normal font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 ${f} aria-invalid:focus-visible:shadow-focus-ring-destructive`,
7
+ `inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm leading-4.5 tracking-normal font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 ${u} aria-invalid:focus-visible:shadow-focus-ring-destructive`,
8
8
  {
9
9
  variants: {
10
10
  variant: {
@@ -15,7 +15,7 @@ const v = c(
15
15
  outline: "border border-border-emphasized bg-background text-foreground hover:bg-accent-background disabled:border-transparent disabled:bg-disabled-background",
16
16
  ghost: "hover:bg-accent-background",
17
17
  ghostOnDark: "text-foreground-fixed-light hover:bg-secondary-background-fixed-dark disabled:opacity-100 disabled:text-disabled-foreground-fixed-dark",
18
- destructive: `bg-destructive-background text-destructive-foreground-on-critical hover:bg-destructive-background-hover ${l}`
18
+ destructive: `bg-destructive-background text-destructive-foreground-on-critical hover:bg-destructive-background-hover ${f}`
19
19
  },
20
20
  size: {
21
21
  default: "h-9 px-3 has-[>svg]:px-3",
@@ -39,7 +39,7 @@ const v = c(
39
39
  "data-slot": "button",
40
40
  render: e,
41
41
  nativeButton: t ?? (e ? !1 : void 0),
42
- className: u(v({ variant: d, size: a, className: r })),
42
+ className: l(v({ variant: d, size: a, className: r })),
43
43
  ...i,
44
44
  children: o
45
45
  }
@@ -3,7 +3,7 @@ import { forwardRef as r } from "react";
3
3
  import { Checkbox as i } from "@base-ui/react/checkbox";
4
4
  import { IconCheck as l, IconMinus as b } from "@tabler/icons-react";
5
5
  import { cva as m } from "class-variance-authority";
6
- import { cn as d, invalidState as h, focusState as k, selectionItemDescription as u, selectionItemLabel as x, selectionItemBase as p, selectionItemCard as g, selectionItemDefault as f } from "../../../../lib/utils.js";
6
+ import { cn as d, selectionItemBase as h, selectionItemCard as k, selectionItemDefault as u, invalidState as x, focusState as p, selectionItemLabel as g, selectionItemDescription as f } from "../../../../lib/utils.js";
7
7
  const I = r(
8
8
  ({ className: a, orientation: e = "vertical", role: t = "group", ...c }, n) => /* @__PURE__ */ o(
9
9
  "div",
@@ -21,11 +21,11 @@ const I = r(
21
21
  )
22
22
  );
23
23
  I.displayName = "CheckboxGroup";
24
- const C = m(d("group/checkbox-item", p), {
24
+ const C = m(d("group/checkbox-item", h), {
25
25
  variants: {
26
26
  variant: {
27
- default: f,
28
- card: g
27
+ default: u,
28
+ card: k
29
29
  }
30
30
  },
31
31
  defaultVariants: {
@@ -55,8 +55,8 @@ const N = r(({ className: a, ...e }, t) => /* @__PURE__ */ o(
55
55
  "data-unchecked:not-data-disabled:hover:border-secondary-foreground group-hover/checkbox-item:data-unchecked:not-data-disabled:border-secondary-foreground",
56
56
  "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:border-transparent data-disabled:bg-disabled-background data-disabled:text-disabled-foreground data-disabled:data-unchecked:border-border",
57
57
  "[&[data-checked]_[data-slot=checkbox-check]]:block [&[data-indeterminate]_[data-slot=checkbox-dash]]:block",
58
- k,
59
- h,
58
+ p,
59
+ x,
60
60
  a
61
61
  ),
62
62
  ...e,
@@ -97,7 +97,7 @@ const y = r(
97
97
  ref: t,
98
98
  "data-slot": "checkbox-item-label",
99
99
  className: d(
100
- x,
100
+ g,
101
101
  "group-has-[[data-checked]]/checkbox-item:text-foreground",
102
102
  "group-has-[[data-indeterminate]]/checkbox-item:text-foreground",
103
103
  "group-has-[[data-disabled]]/checkbox-item:text-disabled-foreground",
@@ -115,7 +115,7 @@ const z = r(
115
115
  ref: t,
116
116
  "data-slot": "checkbox-item-description",
117
117
  className: d(
118
- u,
118
+ f,
119
119
  "group-has-[[data-disabled]]/checkbox-item:text-disabled-foreground",
120
120
  a
121
121
  ),
@@ -1,9 +1,9 @@
1
1
  import { jsxs as L, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as w, useState as x, useMemo as D, useEffect as F, useContext as H, createContext as O } from "react";
3
- import { IconSelector as K, IconCheck as V, IconCopy as $, IconDownload as q } from "@tabler/icons-react";
2
+ import { createContext as F, forwardRef as w, useState as x, useMemo as D, useEffect as O, useContext as H } from "react";
3
+ import { IconCheck as K, IconCopy as V, IconSelector as $, IconDownload as q } from "@tabler/icons-react";
4
4
  import { isStorybookTestEnv as v, highlightCode as M, cn as f } from "../../../../lib/utils.js";
5
5
  import { Button as S } from "../button/button.js";
6
- const I = O({
6
+ const I = F({
7
7
  code: "",
8
8
  copyText: "",
9
9
  isCollapsed: !1,
@@ -48,7 +48,7 @@ const ee = "min(60vh, 32rem)", oe = "dark:hidden [&>pre]:m-0 [&>pre]:min-h-10 [&
48
48
  () => v ? `<pre><code>${P(s)}</code></pre>` : "",
49
49
  [s]
50
50
  );
51
- F(() => {
51
+ O(() => {
52
52
  if (v) return;
53
53
  let g = !1;
54
54
  const B = (u) => {
@@ -183,7 +183,7 @@ const re = w(
183
183
  c instanceof Error ? c : new Error("Clipboard write failed")
184
184
  );
185
185
  }
186
- }, p = C ? V : $;
186
+ }, p = C ? K : V;
187
187
  return /* @__PURE__ */ r(
188
188
  S,
189
189
  {
@@ -213,7 +213,7 @@ const le = w(
213
213
  size: "icon-sm",
214
214
  variant: "secondary",
215
215
  ...n,
216
- children: e ?? /* @__PURE__ */ r(K, { size: 14 })
216
+ children: e ?? /* @__PURE__ */ r($, { size: 14 })
217
217
  }
218
218
  );
219
219
  }
@@ -0,0 +1,15 @@
1
+ import { FC } from 'react';
2
+ import { Dayjs } from 'dayjs';
3
+ import { ShortcutItem } from '../shared/shortcuts-panel/shortcuts-panel';
4
+ export type { ShortcutItem };
5
+ export interface DatePickerProps {
6
+ value: Dayjs | null;
7
+ onChange: (date: Dayjs | null) => void;
8
+ format?: string;
9
+ placeholder?: string;
10
+ displayWeekNumber?: boolean;
11
+ shortcuts?: ShortcutItem[];
12
+ defaultDate?: Dayjs;
13
+ className?: string;
14
+ }
15
+ export declare const DatePicker: FC<DatePickerProps>;
@@ -0,0 +1,84 @@
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import { cn as x } from "../../../../../lib/utils.js";
3
+ import { Popover as M, PopoverTrigger as N, PopoverContent as w } from "../../popover/popover.js";
4
+ import { Calendar as R } from "../shared/calendar/calendar.js";
5
+ import { DateTimeInput as S } from "../shared/date-time-input/date-time-input.js";
6
+ import { ShortcutsPanel as Y } from "../shared/shortcuts-panel/shortcuts-panel.js";
7
+ import { useDatePicker as y } from "./use-date-picker.js";
8
+ const T = (o) => o ? [o, o] : [null, null], z = ({
9
+ value: o,
10
+ onChange: r,
11
+ format: i = "DD/MM/YYYY",
12
+ placeholder: c,
13
+ displayWeekNumber: d = !1,
14
+ shortcuts: n,
15
+ defaultDate: p,
16
+ className: s
17
+ }) => {
18
+ const {
19
+ isOpen: l,
20
+ displayedMonth: m,
21
+ tempDate: t,
22
+ handleTogglePopover: h,
23
+ handleCancel: f,
24
+ handleDateClick: u,
25
+ handleMonthChange: v,
26
+ handleApplyShortcut: g,
27
+ inputRef: C,
28
+ popoverRef: D
29
+ } = y({ value: o, onChange: r, defaultDate: p }), k = l ? t : o;
30
+ return /* @__PURE__ */ e("div", { "data-slot": "date-picker", className: x("relative w-full", s), children: /* @__PURE__ */ a(
31
+ M,
32
+ {
33
+ open: l,
34
+ onOpenChange: (P) => {
35
+ P || f();
36
+ },
37
+ children: [
38
+ /* @__PURE__ */ e(N, { render: /* @__PURE__ */ e("div", { ref: C, className: "w-full" }), children: /* @__PURE__ */ e(
39
+ S,
40
+ {
41
+ value: k,
42
+ format: i,
43
+ placeholder: c,
44
+ onClick: h,
45
+ isOpen: l,
46
+ variant: "date"
47
+ }
48
+ ) }),
49
+ /* @__PURE__ */ e(
50
+ w,
51
+ {
52
+ ref: D,
53
+ className: "rounded-xl w-auto p-0",
54
+ side: "bottom",
55
+ align: "start",
56
+ children: /* @__PURE__ */ a("div", { "data-slot": "date-picker-content", className: "flex flex-row", children: [
57
+ n && n.length > 0 && /* @__PURE__ */ e(
58
+ Y,
59
+ {
60
+ shortcuts: n,
61
+ onShortcutClick: g
62
+ }
63
+ ),
64
+ /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e(
65
+ R,
66
+ {
67
+ displayedMonth: m,
68
+ selectedRange: T(t),
69
+ hoverDate: null,
70
+ displayWeekNumber: d,
71
+ onDateClick: u,
72
+ onMonthChange: v
73
+ }
74
+ ) })
75
+ ] })
76
+ }
77
+ )
78
+ ]
79
+ }
80
+ ) });
81
+ };
82
+ export {
83
+ z as DatePicker
84
+ };
@@ -0,0 +1,3 @@
1
+ export { DatePicker } from './date-picker';
2
+ export type { DatePickerProps, ShortcutItem } from './date-picker';
3
+ export type { UseDatePickerProps, UseDatePickerReturn } from './types';
@@ -0,0 +1,18 @@
1
+ import { Dayjs } from 'dayjs';
2
+ export interface UseDatePickerProps {
3
+ value: Dayjs | null;
4
+ onChange: (date: Dayjs | null) => void;
5
+ defaultDate?: Dayjs;
6
+ }
7
+ export interface UseDatePickerReturn {
8
+ isOpen: boolean;
9
+ displayedMonth: Dayjs;
10
+ tempDate: Dayjs | null;
11
+ handleTogglePopover: () => void;
12
+ handleCancel: () => void;
13
+ handleDateClick: (date: Dayjs) => void;
14
+ handleMonthChange: (month: Dayjs) => void;
15
+ handleApplyShortcut: (shortcutValue: Dayjs | [Dayjs, Dayjs] | [Dayjs | null, Dayjs | null]) => void;
16
+ inputRef: React.RefObject<HTMLDivElement>;
17
+ popoverRef: React.RefObject<HTMLDivElement>;
18
+ }
@@ -0,0 +1,3 @@
1
+ import { UseDatePickerProps, UseDatePickerReturn } from './types';
2
+ export type { UseDatePickerProps, UseDatePickerReturn };
3
+ export declare const useDatePicker: ({ value, onChange, defaultDate, }: UseDatePickerProps) => UseDatePickerReturn;
@@ -0,0 +1,63 @@
1
+ import { useRef as c, useCallback as p, useEffect as A } from "react";
2
+ import C from "dayjs";
3
+ import { usePopoverState as R } from "../shared/hooks/use-popover-state.js";
4
+ import { useSingleDateState as B } from "../shared/hooks/use-single-date-state.js";
5
+ const I = ({
6
+ value: a,
7
+ onChange: t,
8
+ defaultDate: d = C()
9
+ }) => {
10
+ const r = c(() => {
11
+ }), s = c(() => {
12
+ }), {
13
+ isOpen: l,
14
+ setIsOpen: o,
15
+ popoverRef: f,
16
+ inputRef: i,
17
+ handleTogglePopover: h
18
+ } = R({
19
+ onClose: p(() => r.current(), []),
20
+ onBackspace: p(() => s.current(), [])
21
+ }), u = B({
22
+ value: a,
23
+ defaultDate: d,
24
+ onDateSelected: (e) => {
25
+ t(e), o(!1);
26
+ }
27
+ }), {
28
+ tempDate: m,
29
+ displayedMonth: g,
30
+ handleDateClick: D,
31
+ handleMonthChange: S,
32
+ clearDate: k,
33
+ resetDate: y
34
+ } = u, n = () => {
35
+ y(a);
36
+ }, P = () => {
37
+ k() && t(null);
38
+ };
39
+ return A(() => {
40
+ r.current = n, s.current = P;
41
+ }), {
42
+ isOpen: l,
43
+ displayedMonth: g,
44
+ tempDate: m,
45
+ handleTogglePopover: () => {
46
+ l || n(), h();
47
+ },
48
+ handleCancel: () => {
49
+ n(), o(!1);
50
+ },
51
+ handleDateClick: D,
52
+ handleMonthChange: S,
53
+ handleApplyShortcut: (e) => {
54
+ const v = Array.isArray(e) ? e[0] : e;
55
+ t(v), o(!1);
56
+ },
57
+ inputRef: i,
58
+ popoverRef: f
59
+ };
60
+ };
61
+ export {
62
+ I as useDatePicker
63
+ };
@@ -1,3 +1,5 @@
1
+ export { DatePicker } from './date-picker';
2
+ export type { DatePickerProps } from './date-picker';
1
3
  export { DateRangePicker } from './date-range-picker';
2
4
  export type { DateRangePickerProps } from './date-range-picker';
3
5
  export { DateTimeRangePicker } from './date-time-range-picker';
@@ -0,0 +1,8 @@
1
+ import { DatePicker as o } from "./date-picker/date-picker.js";
2
+ import { DateRangePicker as a } from "./date-range-picker/date-range-picker.js";
3
+ import { DateTimeRangePicker as m } from "./date-time-range-picker/date-time-range-picker.js";
4
+ export {
5
+ o as DatePicker,
6
+ a as DateRangePicker,
7
+ m as DateTimeRangePicker
8
+ };
@@ -0,0 +1,23 @@
1
+ import { Dayjs } from 'dayjs';
2
+ export interface UseSingleDateStateOptions {
3
+ value: Dayjs | null;
4
+ defaultDate: Dayjs;
5
+ /** Transforms a clicked date before storing; pass time-of-day defaults for datetime variants. */
6
+ mapDate?: (date: Dayjs) => Dayjs;
7
+ /** Called when a date is selected; used for auto-apply in date-only variants. */
8
+ onDateSelected?: (date: Dayjs) => void;
9
+ }
10
+ export interface UseSingleDateStateReturn {
11
+ tempDate: Dayjs | null;
12
+ displayedMonth: Dayjs;
13
+ /** Synchronous ref — use inside callbacks to avoid stale closures. */
14
+ stateRef: React.MutableRefObject<{
15
+ tempDate: Dayjs | null;
16
+ }>;
17
+ handleDateClick: (date: Dayjs) => void;
18
+ handleMonthChange: (month: Dayjs) => void;
19
+ /** Returns true when a date was cleared, false when already empty. */
20
+ clearDate: () => boolean;
21
+ resetDate: (value: Dayjs | null) => void;
22
+ }
23
+ export declare const useSingleDateState: ({ value, defaultDate, mapDate, onDateSelected, }: UseSingleDateStateOptions) => UseSingleDateStateReturn;
@@ -0,0 +1,32 @@
1
+ import { useState as l, useRef as i } from "react";
2
+ const g = ({
3
+ value: e,
4
+ defaultDate: a,
5
+ mapDate: r,
6
+ onDateSelected: D
7
+ }) => {
8
+ const [p, h] = l(e), [u, o] = l(
9
+ () => e ?? a
10
+ ), n = i({ tempDate: e }), s = (t) => {
11
+ n.current.tempDate = t, h(t);
12
+ };
13
+ return {
14
+ tempDate: p,
15
+ displayedMonth: u,
16
+ stateRef: n,
17
+ handleDateClick: (t) => {
18
+ const c = r ? r(t) : t;
19
+ s(c), D?.(c);
20
+ },
21
+ handleMonthChange: (t) => {
22
+ o(t);
23
+ },
24
+ clearDate: () => n.current.tempDate === null ? !1 : (s(null), !0),
25
+ resetDate: (t) => {
26
+ s(t), o(t ?? a);
27
+ }
28
+ };
29
+ };
30
+ export {
31
+ g as useSingleDateState
32
+ };
@@ -1,7 +1,7 @@
1
1
  import r from "dayjs";
2
- import c from "dayjs/plugin/isBetween";
3
- import d from "dayjs/plugin/isSameOrBefore";
4
- import m from "dayjs/plugin/weekOfYear";
2
+ import c from "dayjs/plugin/isBetween.js";
3
+ import d from "dayjs/plugin/isSameOrBefore.js";
4
+ import m from "dayjs/plugin/weekOfYear.js";
5
5
  import { DAYS_IN_WEEK as u } from "../shared/constants.js";
6
6
  r.extend(c);
7
7
  r.extend(d);
@@ -1,5 +1,5 @@
1
1
  import m from "dayjs";
2
- import u from "dayjs/plugin/customParseFormat";
2
+ import u from "dayjs/plugin/customParseFormat.js";
3
3
  import { HOURS_IN_12H as t, HOURS_IN_DAY as f, MINUTES_IN_HOUR as s, MINUTE_INCREMENT as o } from "../shared/constants.js";
4
4
  m.extend(u);
5
5
  const c = (r = "24h") => r === "12h" ? Array.from({ length: t }, (e, n) => n + 1) : Array.from({ length: f }, (e, n) => n), M = () => Array.from(
@@ -1,15 +1,15 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { useMemo as p, forwardRef as l, useContext as f, createContext as u } from "react";
2
+ import { createContext as p, forwardRef as l, useContext as f, useMemo as u } from "react";
3
3
  import { PreviewCard as d } from "@base-ui/react/preview-card";
4
4
  import { usePortalContainer as g } from "../../../../lib/portal-container-context.js";
5
5
  import { cn as v } from "../../../../lib/utils.js";
6
- const m = u(null);
6
+ const m = p(null);
7
7
  function w({
8
8
  openDelay: o,
9
9
  closeDelay: e,
10
10
  ...a
11
11
  }) {
12
- const r = p(
12
+ const r = u(
13
13
  () => ({ openDelay: o, closeDelay: e }),
14
14
  [o, e]
15
15
  );
@@ -8,7 +8,7 @@ const u = o(
8
8
  ref: a,
9
9
  "data-slot": "input",
10
10
  className: l(
11
- "w-full",
11
+ "w-full h-9",
12
12
  d,
13
13
  s,
14
14
  p,