@companix/uikit 0.0.89 → 0.0.91

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.
@@ -6,13 +6,13 @@ export interface WriteBarProps extends Pick<React.TextareaHTMLAttributes<HTMLTex
6
6
  inlineAfter?: React.ReactNode;
7
7
  after?: React.ReactNode;
8
8
  onHeightChange?: VoidFunction;
9
- contnetClassName?: string;
9
+ contentClassName?: string;
10
10
  shadow?: boolean;
11
11
  attachbar?: React.ReactNode;
12
12
  children?: never;
13
13
  }
14
14
  export declare const WriteBar: {
15
- ({ before, inlineAfter, after, onHeightChange, shadow, containerRef, attachbar, contnetClassName, textareaRef, autoComplete, cols, dirName, disabled, maxLength, minLength, name, placeholder, readOnly, required, value, wrap, rows, onChange, onFocus, onBlur, id, inputMode, defaultValue, autoFocus, tabIndex, spellCheck, className, ...restProps }: WriteBarProps): import("react/jsx-runtime").JSX.Element;
15
+ ({ before, inlineAfter, after, onHeightChange, shadow, containerRef, attachbar, contentClassName, textareaRef, autoComplete, cols, dirName, disabled, maxLength, minLength, name, placeholder, readOnly, required, value, wrap, rows, onChange, onFocus, onBlur, id, inputMode, defaultValue, autoFocus, tabIndex, spellCheck, className, ...restProps }: WriteBarProps): import("react/jsx-runtime").JSX.Element;
16
16
  IconButton({ Component, icon, mode, onClick, isLoading, isHidden }: WriteBarIconProps): import("react/jsx-runtime").JSX.Element;
17
17
  };
18
18
  interface WriteBarIconProps {
@@ -1,23 +1,23 @@
1
1
  import { CalendarProps } from '../Calendar/Calendar';
2
- export declare function isSameDate(d1: Date, d2: Date): boolean;
2
+ export declare const isSameDate: (d1: Date, d2: Date) => boolean;
3
3
  export declare const MONDAY = 1;
4
- export declare function startOfWeek(date: Date, { weekStartsOn }: {
4
+ export declare const startOfWeek: (date: Date, { weekStartsOn }: {
5
5
  weekStartsOn?: number | undefined;
6
- }): Date;
7
- export declare function endOfWeek(date: Date, { weekStartsOn }: {
6
+ }) => Date;
7
+ export declare const endOfWeek: (date: Date, { weekStartsOn }: {
8
8
  weekStartsOn?: number | undefined;
9
- }): Date;
10
- export declare function startOfDay(date: Date): Date;
11
- export declare function endOfDay(date: Date): Date;
9
+ }) => Date;
10
+ export declare const startOfDay: (date: Date) => Date;
11
+ export declare const endOfDay: (date: Date) => Date;
12
12
  export declare function isDayMinMaxRestricted(day: Date, options?: {
13
13
  min?: Date;
14
14
  max?: Date;
15
15
  withTime?: boolean;
16
16
  }): boolean;
17
- export declare function addMonths(date: Date, amount: number): Date;
18
- export declare function subMonths(date: Date, amount: number): Date;
19
- export declare function setYear(date: Date, year: number): Date;
20
- export declare function setMonth(date: Date, month: number): Date;
17
+ export declare const addMonths: (date: Date, amount: number) => Date;
18
+ export declare const subMonths: (date: Date, amount: number) => Date;
19
+ export declare const setYear: (date: Date, year: number) => Date;
20
+ export declare const setMonth: (date: Date, month: number) => Date;
21
21
  interface DisableOptions extends Pick<CalendarProps, 'disableFuture' | 'disablePast' | 'maxDateTime' | 'minDateTime' | 'shouldDisableDate'> {
22
22
  }
23
23
  export declare const createDayDisableChecker: (options: DisableOptions) => (day: Date, withTime?: boolean) => boolean;
package/dist/bundle.es.js CHANGED
@@ -1,108 +1,122 @@
1
- import { Avatar as e } from "./bundle.es2.js";
1
+ import { Avatar as o } from "./bundle.es2.js";
2
2
  import { avatarSizes as p } from "./bundle.es3.js";
3
- import { Button as x } from "./bundle.es4.js";
4
- import { ButtonGroup as a } from "./bundle.es5.js";
5
- import { Spinner as l } from "./bundle.es6.js";
6
- import { Scrollable as n } from "./bundle.es7.js";
3
+ import { Button as a } from "./bundle.es4.js";
4
+ import { ButtonGroup as x } from "./bundle.es5.js";
5
+ import { Spinner as s } from "./bundle.es6.js";
6
+ import { Scrollable as c } from "./bundle.es7.js";
7
7
  import { ImitateScroll as S } from "./bundle.es8.js";
8
- import { Segments as g } from "./bundle.es9.js";
8
+ import { Segments as D } from "./bundle.es9.js";
9
9
  import { Popover as h } from "./bundle.es10.js";
10
- import { Tooltip as v } from "./bundle.es11.js";
11
- import { Select as D } from "./bundle.es12.js";
12
- import { SelectTags as d } from "./bundle.es13.js";
13
- import { Input as k } from "./bundle.es14.js";
14
- import { OptionItem as L } from "./bundle.es15.js";
15
- import { NumberInput as w } from "./bundle.es16.js";
10
+ import { Tooltip as T } from "./bundle.es11.js";
11
+ import { Select as y } from "./bundle.es12.js";
12
+ import { SelectTags as P } from "./bundle.es13.js";
13
+ import { Input as b } from "./bundle.es14.js";
14
+ import { OptionItem as B } from "./bundle.es15.js";
15
+ import { NumberInput as I } from "./bundle.es16.js";
16
16
  import { OptionsList as C } from "./bundle.es17.js";
17
- import { Checkbox as O } from "./bundle.es18.js";
18
- import { Switch as F } from "./bundle.es19.js";
19
- import { Radio as W, RadioGroup as j } from "./bundle.es20.js";
20
- import { Drawer as E } from "./bundle.es21.js";
21
- import { Dialog as J } from "./bundle.es22.js";
22
- import { AlertDialog as M } from "./bundle.es23.js";
23
- import { LoadingButton as U } from "./bundle.es24.js";
24
- import { Tabs as X } from "./bundle.es25.js";
17
+ import { Checkbox as w } from "./bundle.es18.js";
18
+ import { Switch as W } from "./bundle.es19.js";
19
+ import { Radio as F, RadioGroup as N } from "./bundle.es20.js";
20
+ import { Drawer as j } from "./bundle.es21.js";
21
+ import { Dialog as E } from "./bundle.es22.js";
22
+ import { AlertDialog as J } from "./bundle.es23.js";
23
+ import { LoadingButton as Q } from "./bundle.es24.js";
24
+ import { Tabs as V } from "./bundle.es25.js";
25
25
  import { Countdown as Z } from "./bundle.es26.js";
26
26
  import { TextArea as $ } from "./bundle.es27.js";
27
- import { DatePicker as or } from "./bundle.es28.js";
27
+ import { DatePicker as er } from "./bundle.es28.js";
28
28
  import { DateInput as tr } from "./bundle.es29.js";
29
29
  import { FileOverlay as mr } from "./bundle.es30.js";
30
30
  import { FormGroup as fr } from "./bundle.es31.js";
31
31
  import { TimePicker as ir } from "./bundle.es32.js";
32
- import { Icon as cr } from "./bundle.es33.js";
33
- import { ProgressBar as sr } from "./bundle.es34.js";
32
+ import { Icon as nr } from "./bundle.es33.js";
33
+ import { ProgressBar as lr } from "./bundle.es34.js";
34
34
  import { Skeleton as ur } from "./bundle.es35.js";
35
- import { Blank as Tr } from "./bundle.es36.js";
36
- import { ProgressRing as Pr } from "./bundle.es37.js";
37
- import { WriteBar as Br } from "./bundle.es38.js";
38
- import { ThemeProvider as Rr, useTheme as dr } from "./bundle.es39.js";
39
- import { ColorSchemeScript as kr, colorSchemeScript as Ar } from "./bundle.es40.js";
40
- import { useLocalStorage as br } from "./bundle.es41.js";
41
- import { useBooleanState as yr } from "./bundle.es42.js";
42
- import { useResizeTextarea as Gr } from "./bundle.es43.js";
43
- import { useLoading as zr } from "./bundle.es44.js";
44
- import { createAlertAgent as Nr } from "./bundle.es45.js";
45
- import { createToaster as jr } from "./bundle.es46.js";
46
- import { Toast as Er } from "./bundle.es47.js";
47
- import { DialogShell as Jr, DrawerShell as Kr, createPopupRegistry as Mr } from "./bundle.es48.js";
48
- import { createPopoversRegistry as Ur } from "./bundle.es49.js";
49
- import { createScope as Xr, createStaticScope as Yr } from "./bundle.es50.js";
35
+ import { Blank as gr } from "./bundle.es36.js";
36
+ import { ProgressRing as dr } from "./bundle.es37.js";
37
+ import { WriteBar as kr } from "./bundle.es38.js";
38
+ import { ThemeProvider as Or, useTheme as Pr } from "./bundle.es39.js";
39
+ import { ColorSchemeScript as br, colorSchemeScript as vr } from "./bundle.es40.js";
40
+ import { useLocalStorage as Ar } from "./bundle.es41.js";
41
+ import { useBooleanState as Mr } from "./bundle.es42.js";
42
+ import { useResizeTextarea as Lr } from "./bundle.es43.js";
43
+ import { useLoading as Gr } from "./bundle.es44.js";
44
+ import { createAlertAgent as zr } from "./bundle.es45.js";
45
+ import { createToaster as Nr } from "./bundle.es46.js";
46
+ import { Toast as jr } from "./bundle.es47.js";
47
+ import { DialogShell as Er, DrawerShell as Hr, createPopupRegistry as Jr } from "./bundle.es48.js";
48
+ import { createPopoversRegistry as Qr } from "./bundle.es49.js";
49
+ import { createScope as Vr, createStaticScope as Xr } from "./bundle.es50.js";
50
50
  import { RemoveListener as _r } from "./bundle.es51.js";
51
+ import { MONDAY as re, addMonths as ee, createDayDisableChecker as oe, endOfDay as te, endOfWeek as pe, isDayMinMaxRestricted as me, isSameDate as ae, setMonth as fe, setYear as xe, startOfDay as ie, startOfWeek as se, subMonths as ne, useDayDisableCheker as ce } from "./bundle.es52.js";
51
52
  export {
52
- M as AlertDialog,
53
- e as Avatar,
54
- Tr as Blank,
55
- x as Button,
56
- a as ButtonGroup,
57
- O as Checkbox,
58
- kr as ColorSchemeScript,
53
+ J as AlertDialog,
54
+ o as Avatar,
55
+ gr as Blank,
56
+ a as Button,
57
+ x as ButtonGroup,
58
+ w as Checkbox,
59
+ br as ColorSchemeScript,
59
60
  Z as Countdown,
60
61
  tr as DateInput,
61
- or as DatePicker,
62
- J as Dialog,
63
- Jr as DialogShell,
64
- E as Drawer,
65
- Kr as DrawerShell,
62
+ er as DatePicker,
63
+ E as Dialog,
64
+ Er as DialogShell,
65
+ j as Drawer,
66
+ Hr as DrawerShell,
66
67
  mr as FileOverlay,
67
68
  fr as FormGroup,
68
- cr as Icon,
69
+ nr as Icon,
69
70
  S as ImitateScroll,
70
- k as Input,
71
- U as LoadingButton,
72
- w as NumberInput,
73
- L as OptionItem,
71
+ b as Input,
72
+ Q as LoadingButton,
73
+ re as MONDAY,
74
+ I as NumberInput,
75
+ B as OptionItem,
74
76
  C as OptionsList,
75
77
  h as Popover,
76
- sr as ProgressBar,
77
- Pr as ProgressRing,
78
- W as Radio,
79
- j as RadioGroup,
78
+ lr as ProgressBar,
79
+ dr as ProgressRing,
80
+ F as Radio,
81
+ N as RadioGroup,
80
82
  _r as RemoveListener,
81
- n as Scrollable,
82
- g as Segments,
83
- D as Select,
84
- d as SelectTags,
83
+ c as Scrollable,
84
+ D as Segments,
85
+ y as Select,
86
+ P as SelectTags,
85
87
  ur as Skeleton,
86
- l as Spinner,
87
- F as Switch,
88
- X as Tabs,
88
+ s as Spinner,
89
+ W as Switch,
90
+ V as Tabs,
89
91
  $ as TextArea,
90
- Rr as ThemeProvider,
92
+ Or as ThemeProvider,
91
93
  ir as TimePicker,
92
- Er as Toast,
93
- v as Tooltip,
94
- Br as WriteBar,
94
+ jr as Toast,
95
+ T as Tooltip,
96
+ kr as WriteBar,
97
+ ee as addMonths,
95
98
  p as avatarSizes,
96
- Ar as colorSchemeScript,
97
- Nr as createAlertAgent,
98
- Ur as createPopoversRegistry,
99
- Mr as createPopupRegistry,
100
- Xr as createScope,
101
- Yr as createStaticScope,
102
- jr as createToaster,
103
- yr as useBooleanState,
104
- zr as useLoading,
105
- br as useLocalStorage,
106
- Gr as useResizeTextarea,
107
- dr as useTheme
99
+ vr as colorSchemeScript,
100
+ zr as createAlertAgent,
101
+ oe as createDayDisableChecker,
102
+ Qr as createPopoversRegistry,
103
+ Jr as createPopupRegistry,
104
+ Vr as createScope,
105
+ Xr as createStaticScope,
106
+ Nr as createToaster,
107
+ te as endOfDay,
108
+ pe as endOfWeek,
109
+ me as isDayMinMaxRestricted,
110
+ ae as isSameDate,
111
+ fe as setMonth,
112
+ xe as setYear,
113
+ ie as startOfDay,
114
+ se as startOfWeek,
115
+ ne as subMonths,
116
+ Mr as useBooleanState,
117
+ ce as useDayDisableCheker,
118
+ Gr as useLoading,
119
+ Ar as useLocalStorage,
120
+ Lr as useResizeTextarea,
121
+ Pr as useTheme
108
122
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { useRef as L, useMemo as j, useImperativeHandle as k } from "react";
3
3
  import { Popover as q } from "./bundle.es10.js";
4
- import { useFroozeClosing as w } from "./bundle.es54.js";
5
- import { SelectInput as H } from "./bundle.es55.js";
6
- import { useScrollListController as M } from "./bundle.es56.js";
7
- import { OptionsPopover as N } from "./bundle.es57.js";
4
+ import { useFroozeClosing as w } from "./bundle.es55.js";
5
+ import { SelectInput as H } from "./bundle.es56.js";
6
+ import { useScrollListController as M } from "./bundle.es57.js";
7
+ import { OptionsPopover as N } from "./bundle.es58.js";
8
8
  import { mergeRefs as W } from "react-merge-refs";
9
9
  const Z = (t) => {
10
10
  const {
@@ -3,12 +3,12 @@ import { mergeRefs as T } from "react-merge-refs";
3
3
  import { useState as M, useRef as h, useMemo as j } from "react";
4
4
  import { matchPattern as q } from "@companix/utils-js";
5
5
  import { faXmark as V, faChevronDown as $ } from "@companix/icons-solid";
6
- import { useFroozeClosing as B } from "./bundle.es54.js";
6
+ import { useFroozeClosing as B } from "./bundle.es55.js";
7
7
  import { Popover as L } from "./bundle.es10.js";
8
8
  import { Icon as g } from "./bundle.es33.js";
9
9
  import { attr as l, getActiveElementByAnotherElement as X, contains as G } from "@companix/utils-browser";
10
- import { OptionsPopover as H } from "./bundle.es57.js";
11
- import { arrays as v } from "./bundle.es58.js";
10
+ import { OptionsPopover as H } from "./bundle.es58.js";
11
+ import { arrays as v } from "./bundle.es59.js";
12
12
  const ne = (r) => {
13
13
  const {
14
14
  closeAfterSelect: C,
@@ -1,8 +1,8 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as b, useRef as R } from "react";
3
3
  import { mergeRefs as c } from "react-merge-refs";
4
- import { InputElement as x } from "./bundle.es59.js";
5
- import { InputContainer as I } from "./bundle.es60.js";
4
+ import { InputElement as x } from "./bundle.es60.js";
5
+ import { InputContainer as I } from "./bundle.es61.js";
6
6
  import g from "classnames";
7
7
  const N = b(
8
8
  ({
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import C from "classnames";
3
3
  import { forwardRef as j, useRef as w } from "react";
4
4
  import { mergeRefs as y } from "react-merge-refs";
5
- import { InputContainer as F } from "./bundle.es60.js";
5
+ import { InputContainer as F } from "./bundle.es61.js";
6
6
  import { NumericFormat as V } from "react-number-format";
7
7
  const D = j(
8
8
  ({
@@ -1,6 +1,6 @@
1
1
  import { jsxs as I, jsx as a } from "react/jsx-runtime";
2
2
  import { box as g } from "@companix/utils-browser";
3
- import { getInitialsFontSize as h } from "./bundle.es52.js";
3
+ import { getInitialsFontSize as h } from "./bundle.es53.js";
4
4
  const k = 24, y = ({
5
5
  alt: n,
6
6
  crossOrigin: i,
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
- import { useTabSlider as b, makeTabId as l } from "./bundle.es53.js";
2
+ import { useTabSlider as b, makeTabId as l } from "./bundle.es54.js";
3
3
  import * as n from "@radix-ui/react-tabs";
4
4
  import { useRef as m, useId as f, createContext as T, useContext as c } from "react";
5
5
  const o = T({ baseId: "", containerRef: {} }), u = ({ children: s, value: e, onChange: r }) => {
@@ -2,10 +2,10 @@ import { jsx as u } from "react/jsx-runtime";
2
2
  import { Popover as T } from "./bundle.es10.js";
3
3
  import { Input as w } from "./bundle.es14.js";
4
4
  import { useState as A, useRef as j } from "react";
5
- import { Calendar as E } from "./bundle.es61.js";
6
- import { useDayDisableCheker as N } from "./bundle.es62.js";
5
+ import { Calendar as E } from "./bundle.es62.js";
6
+ import { useDayDisableCheker as N } from "./bundle.es52.js";
7
7
  import { getNum as h, formatTime as v } from "@companix/utils-js";
8
- import { removeDigits as O } from "./bundle.es58.js";
8
+ import { removeDigits as O } from "./bundle.es59.js";
9
9
  import { SelectRightElements as Y } from "./bundle.es63.js";
10
10
  const i = {
11
11
  char: "-",
@@ -1,7 +1,7 @@
1
1
  import { jsxs as D, jsx as h } from "react/jsx-runtime";
2
2
  import { useMemo as M, useEffect as C } from "react";
3
3
  import { Select as c } from "./bundle.es12.js";
4
- import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es58.js";
4
+ import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es59.js";
5
5
  import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es64.js";
6
6
  const B = ({
7
7
  min: o = j,
@@ -1,7 +1,7 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { useRef as b, useMemo as I, useState as E, useCallback as A } from "react";
3
3
  import { getNum as S } from "@companix/utils-js";
4
- import { getTimesOptions as W, getTimeValue as q, removeDigits as w, convertTimeToOption as y } from "./bundle.es58.js";
4
+ import { getTimesOptions as W, getTimeValue as q, removeDigits as w, convertTimeToOption as y } from "./bundle.es59.js";
5
5
  import { SelectRightElements as z } from "./bundle.es63.js";
6
6
  import { Select as F } from "./bundle.es12.js";
7
7
  import { Input as G } from "./bundle.es14.js";
@@ -1,5 +1,5 @@
1
1
  import { jsxs as e, jsx as s } from "react/jsx-runtime";
2
- import { getInitialsFontSize as l } from "./bundle.es52.js";
2
+ import { getInitialsFontSize as l } from "./bundle.es53.js";
3
3
  import { clamp as i, customCSS as m, px as n } from "@companix/utils-browser";
4
4
  const u = ({
5
5
  appearance: o = "primary",
@@ -14,7 +14,7 @@ const L = ({
14
14
  shadow: s = !1,
15
15
  containerRef: a,
16
16
  attachbar: c,
17
- contnetClassName: d,
17
+ contentClassName: d,
18
18
  // textarea props
19
19
  textareaRef: l,
20
20
  autoComplete: f,
@@ -1,27 +1,68 @@
1
- const _ = (e) => {
2
- if (e <= 16)
3
- return 5;
4
- if (e <= 24)
5
- return 8;
6
- if (e <= 32)
7
- return 10;
8
- if (e <= 36)
9
- return 13;
10
- if (e <= 44)
11
- return 14;
12
- if (e <= 48)
13
- return 17;
14
- if (e < 56)
15
- return 18;
16
- if (e <= 64)
17
- return 21;
18
- if (e <= 88)
19
- return 26;
20
- if (e <= 96)
21
- return 30;
22
- const n = Math.ceil(e * 0.3125), E = n % 2;
23
- return n + E;
1
+ import { useMemo as i, useCallback as f } from "react";
2
+ const D = (e, t) => e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear(), l = 1, y = (e, { weekStartsOn: t = l }) => {
3
+ const n = new Date(e), s = n.getDay(), r = (s < t ? 7 : 0) + s - t;
4
+ return n.setDate(n.getDate() - r), n.setHours(0, 0, 0, 0), n;
5
+ }, F = (e, { weekStartsOn: t = l }) => {
6
+ const n = new Date(e), s = n.getDay(), r = (s < t ? -7 : 0) + 6 - (s - t);
7
+ return n.setDate(n.getDate() + r), n.setHours(23, 59, 59, 999), n;
8
+ }, h = (e) => {
9
+ const t = new Date(e);
10
+ return t.setHours(0, 0, 0, 0), t;
11
+ }, M = (e) => {
12
+ const t = new Date(e);
13
+ return t.setHours(23, 59, 59, 999), t;
14
+ };
15
+ function g(e, t = {}) {
16
+ const { min: n, max: s, withTime: r = !1 } = t;
17
+ return !r && (n && D(e, n) || s && D(e, s)) ? !1 : !!(n && e < n || s && e > s);
18
+ }
19
+ const m = (e, t) => {
20
+ const n = new Date(e);
21
+ if (!t)
22
+ return n;
23
+ const s = n.getDate(), r = new Date(e);
24
+ r.setMonth(n.getMonth() + t + 1, 0);
25
+ const a = r.getDate();
26
+ return s >= a ? r : (n.setFullYear(r.getFullYear(), r.getMonth(), s), n);
27
+ }, Y = (e, t) => m(e, -t), w = (e) => {
28
+ const t = new Date(e), n = new Date(t);
29
+ return n.setFullYear(t.getFullYear(), t.getMonth() + 1, 0), n.setHours(0, 0, 0, 0), n.getDate();
30
+ }, x = (e, t) => {
31
+ const n = new Date(e);
32
+ return n.setFullYear(t), n;
33
+ }, H = (e, t) => {
34
+ const n = new Date(e), s = n.getFullYear(), r = n.getDate(), a = new Date(e);
35
+ a.setFullYear(s, t, 15), a.setHours(0, 0, 0, 0);
36
+ const o = w(a);
37
+ return n.setMonth(t, Math.min(r, o)), n;
38
+ }, b = (e) => {
39
+ const { disableFuture: t, disablePast: n, maxDateTime: s, minDateTime: r, shouldDisableDate: a } = e;
40
+ return (o, c) => {
41
+ const u = /* @__PURE__ */ new Date();
42
+ return a ? a(o) : t ? h(o) > u : n ? M(o) < u : r || s ? g(o, { min: r, max: s, withTime: c }) : !1;
43
+ };
44
+ }, O = (e) => {
45
+ const t = i(() => b(e), [
46
+ e.disableFuture,
47
+ e.disablePast,
48
+ e.shouldDisableDate,
49
+ e.minDateTime,
50
+ e.maxDateTime
51
+ ]);
52
+ return f(t, [t]);
24
53
  };
25
54
  export {
26
- _ as getInitialsFontSize
55
+ l as MONDAY,
56
+ m as addMonths,
57
+ b as createDayDisableChecker,
58
+ M as endOfDay,
59
+ F as endOfWeek,
60
+ g as isDayMinMaxRestricted,
61
+ D as isSameDate,
62
+ H as setMonth,
63
+ x as setYear,
64
+ h as startOfDay,
65
+ y as startOfWeek,
66
+ Y as subMonths,
67
+ O as useDayDisableCheker
27
68
  };
@@ -1,25 +1,27 @@
1
- import { useState as u, useEffect as d } from "react";
2
- const v = ({ baseId: r, value: e, containerRef: o }) => {
3
- const [l, n] = u({});
4
- return d(() => {
5
- const t = { observer: null };
6
- if (o.current) {
7
- const c = `#${h(r, e)}`, s = o.current.querySelector(c);
8
- s != null ? (t.observer = new ResizeObserver(() => {
9
- const { clientHeight: i, clientWidth: a, offsetLeft: f, offsetTop: b } = s;
10
- n({
11
- width: a,
12
- height: i,
13
- transform: `translateX(${Math.floor(f)}px) translateY(${Math.floor(b)}px)`
14
- });
15
- }), t.observer.observe(s)) : n({ display: "none" });
16
- }
17
- return () => {
18
- t.observer && t.observer.disconnect();
19
- };
20
- }, [e]), l;
21
- }, h = (r, e) => `uikit-tab-${r}-trigger-${e}`;
1
+ const _ = (e) => {
2
+ if (e <= 16)
3
+ return 5;
4
+ if (e <= 24)
5
+ return 8;
6
+ if (e <= 32)
7
+ return 10;
8
+ if (e <= 36)
9
+ return 13;
10
+ if (e <= 44)
11
+ return 14;
12
+ if (e <= 48)
13
+ return 17;
14
+ if (e < 56)
15
+ return 18;
16
+ if (e <= 64)
17
+ return 21;
18
+ if (e <= 88)
19
+ return 26;
20
+ if (e <= 96)
21
+ return 30;
22
+ const n = Math.ceil(e * 0.3125), E = n % 2;
23
+ return n + E;
24
+ };
22
25
  export {
23
- h as makeTabId,
24
- v as useTabSlider
26
+ _ as getInitialsFontSize
25
27
  };
@@ -1,26 +1,25 @@
1
- import { useRef as s, useCallback as c } from "react";
2
- const p = () => {
3
- const t = s(null), r = s({ cb: null }), i = c(() => {
4
- if (t.current && t.current.parentElement) {
5
- const e = t.current.parentElement, u = e.style.getPropertyValue("--radix-popper-anchor-width"), n = e.style.getPropertyValue("transform"), o = new MutationObserver(() => {
6
- e.style.transform !== n && e.style.setProperty("transform", n);
7
- });
8
- o.observe(e, {
9
- attributes: !0,
10
- attributeFilter: ["style"]
11
- }), r.current.cb = () => {
12
- o.disconnect();
13
- }, t.current.style.setProperty("--radix-popover-trigger-width", u);
1
+ import { useState as u, useEffect as d } from "react";
2
+ const v = ({ baseId: r, value: e, containerRef: o }) => {
3
+ const [l, n] = u({});
4
+ return d(() => {
5
+ const t = { observer: null };
6
+ if (o.current) {
7
+ const c = `#${h(r, e)}`, s = o.current.querySelector(c);
8
+ s != null ? (t.observer = new ResizeObserver(() => {
9
+ const { clientHeight: i, clientWidth: a, offsetLeft: f, offsetTop: b } = s;
10
+ n({
11
+ width: a,
12
+ height: i,
13
+ transform: `translateX(${Math.floor(f)}px) translateY(${Math.floor(b)}px)`
14
+ });
15
+ }), t.observer.observe(s)) : n({ display: "none" });
14
16
  }
15
- }, []), l = c(() => {
16
- r.current.cb && (r.current.cb(), r.current.cb = null);
17
- }, []);
18
- return {
19
- popoverRef: t,
20
- handleAnimationEnd: l,
21
- froozePopoverPosition: i
22
- };
23
- };
17
+ return () => {
18
+ t.observer && t.observer.disconnect();
19
+ };
20
+ }, [e]), l;
21
+ }, h = (r, e) => `uikit-tab-${r}-trigger-${e}`;
24
22
  export {
25
- p as useFroozeClosing
23
+ h as makeTabId,
24
+ v as useTabSlider
26
25
  };