@companix/uikit 0.0.26 → 0.0.28
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/Dialog/index.d.ts +6 -2
- package/dist/Popover/index.d.ts +3 -3
- package/dist/ThemeProvider/helpers.d.ts +4 -0
- package/dist/ThemeProvider/index.d.ts +12 -0
- package/dist/ThemeProvider/script.d.ts +7 -0
- package/dist/ThemeProvider/types.d.ts +2 -0
- package/dist/__helpers/createDialogRegistry.d.ts +26 -0
- package/dist/__helpers/createPopoversRegistry.d.ts +19 -0
- package/dist/bundle.es.js +39 -31
- package/dist/bundle.es10.js +1 -1
- package/dist/bundle.es11.js +1 -1
- package/dist/bundle.es14.js +1 -1
- package/dist/bundle.es18.js +28 -12
- package/dist/bundle.es19.js +1 -1
- package/dist/bundle.es20.js +1 -1
- package/dist/bundle.es23.js +1 -1
- package/dist/bundle.es24.js +3 -3
- package/dist/bundle.es25.js +4 -4
- package/dist/bundle.es26.js +2 -2
- package/dist/bundle.es29.js +2 -2
- package/dist/bundle.es32.js +37 -9
- package/dist/bundle.es33.js +10 -24
- package/dist/bundle.es34.js +17 -31
- package/dist/bundle.es35.js +36 -48
- package/dist/bundle.es36.js +48 -21
- package/dist/bundle.es37.js +42 -86
- package/dist/bundle.es38.js +8 -17
- package/dist/bundle.es39.js +23 -19
- package/dist/bundle.es40.js +81 -18
- package/dist/bundle.es41.js +18 -39
- package/dist/bundle.es42.js +20 -3
- package/dist/bundle.es43.js +24 -5
- package/dist/bundle.es44.js +39 -14
- package/dist/bundle.es45.js +3 -14
- package/dist/bundle.es46.js +5 -3
- package/dist/bundle.es47.js +14 -3
- package/dist/bundle.es48.js +13 -69
- package/dist/bundle.es49.js +3 -68
- package/dist/bundle.es50.js +3 -70
- package/dist/bundle.es51.js +68 -10
- package/dist/bundle.es52.js +66 -41
- package/dist/bundle.es53.js +69 -31
- package/dist/bundle.es54.js +12 -70
- package/dist/bundle.es55.js +42 -75
- package/dist/bundle.es56.js +14 -48
- package/dist/bundle.es57.js +24 -20
- package/dist/bundle.es58.js +32 -2
- package/dist/bundle.es59.js +69 -13
- package/dist/bundle.es60.js +14 -20
- package/dist/bundle.es61.js +76 -2
- package/dist/bundle.es62.js +49 -21
- package/dist/bundle.es63.js +20 -2
- package/dist/bundle.es64.js +2 -20
- package/dist/bundle.es65.js +20 -2
- package/dist/bundle.es66.js +2 -3
- package/dist/bundle.es67.js +21 -3
- package/dist/bundle.es68.js +2 -14
- package/dist/bundle.es69.js +13 -13
- package/dist/bundle.es70.js +2 -2
- package/dist/bundle.es71.js +14 -20
- package/dist/bundle.es72.js +3 -2
- package/dist/bundle.es73.js +5 -0
- package/dist/bundle.es74.js +22 -0
- package/dist/bundle.es75.js +4 -0
- package/dist/bundle.es76.js +22 -0
- package/dist/bundle.es77.js +4 -0
- package/dist/bundle.es8.js +4 -4
- package/dist/bundle.es9.js +2 -2
- package/dist/index.d.ts +5 -0
- package/package.json +1 -1
- /package/dist/{Toaster → __utils}/RemoveListener.d.ts +0 -0
package/dist/Dialog/index.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
export type DialogSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'full';
|
|
2
3
|
export interface DialogProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
onOpenChange: (value: boolean) => void;
|
|
6
|
+
defaultOpen?: boolean;
|
|
5
7
|
children: React.ReactNode;
|
|
6
|
-
size?:
|
|
8
|
+
size?: DialogSize;
|
|
7
9
|
className?: string;
|
|
10
|
+
disableEsc?: boolean;
|
|
11
|
+
onClosed?: () => void;
|
|
8
12
|
}
|
|
9
13
|
export declare const Dialog: {
|
|
10
|
-
(
|
|
14
|
+
(props: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
11
15
|
Close: import('react').ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
12
16
|
};
|
package/dist/Popover/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ export type Align = 'start' | 'center' | 'end';
|
|
|
2
2
|
export type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
3
3
|
export interface PopoverProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
+
content: ({ close }: {
|
|
6
|
+
close: () => void;
|
|
7
|
+
}) => React.ReactNode;
|
|
5
8
|
open?: boolean;
|
|
6
9
|
triggerRef?: React.Ref<HTMLButtonElement>;
|
|
7
10
|
triggerProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
8
11
|
onOpenChange?: (open: boolean) => void;
|
|
9
|
-
content: ({ close }: {
|
|
10
|
-
close: () => void;
|
|
11
|
-
}) => React.ReactNode;
|
|
12
12
|
onAnimationEnd?: () => void;
|
|
13
13
|
onAnimationStart?: () => void;
|
|
14
14
|
onOpenAutoFocus?: (event: Event) => void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ColorSchemeExtendedType } from './types';
|
|
2
|
+
export declare const getColorScheme: (key: string, defaultColorScheme: ColorSchemeExtendedType) => ColorSchemeExtendedType;
|
|
3
|
+
export declare const getSystemColorScheme: (e?: MediaQueryList | MediaQueryListEvent) => "dark" | "light";
|
|
4
|
+
export declare const updateDOM: (colorScheme: ColorSchemeExtendedType) => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ColorSchemeExtendedType, ColorSchemeType } from './types';
|
|
2
|
+
export interface UseColorSchemeProps {
|
|
3
|
+
setColorScheme: (scheme: ColorSchemeExtendedType) => void;
|
|
4
|
+
colorScheme?: ColorSchemeExtendedType;
|
|
5
|
+
resolvedColorScheme?: ColorSchemeType;
|
|
6
|
+
}
|
|
7
|
+
export declare const useTheme: () => UseColorSchemeProps;
|
|
8
|
+
export interface ThemeProviderProps extends React.PropsWithChildren {
|
|
9
|
+
storageKey?: string;
|
|
10
|
+
defaultColorScheme?: ColorSchemeExtendedType;
|
|
11
|
+
}
|
|
12
|
+
export declare const ThemeProvider: (props: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ColorSchemeExtendedType } from './types';
|
|
2
|
+
interface ColorSchemeScriptProps {
|
|
3
|
+
storageKey: string;
|
|
4
|
+
defaultColorScheme: ColorSchemeExtendedType;
|
|
5
|
+
}
|
|
6
|
+
export declare const ColorSchemeScript: import('react').MemoExoticComponent<({ storageKey, defaultColorScheme }: ColorSchemeScriptProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DialogProps } from '../Dialog';
|
|
2
|
+
export interface PopupProps<T> {
|
|
3
|
+
data: T;
|
|
4
|
+
close: () => void;
|
|
5
|
+
}
|
|
6
|
+
type PopupSignature = (options: PopupProps<any>) => JSX.Element;
|
|
7
|
+
type Store = {
|
|
8
|
+
[name: string]: PopupSignature;
|
|
9
|
+
};
|
|
10
|
+
type UnwrapProps<T extends PopupSignature> = Parameters<T>[0] extends PopupProps<infer Q> ? Q : never;
|
|
11
|
+
type OpenAgent<T extends Store> = {
|
|
12
|
+
[P in keyof T]: (data: UnwrapProps<T[P]>) => void;
|
|
13
|
+
};
|
|
14
|
+
type CloseAgent<T extends Store> = {
|
|
15
|
+
[key in keyof T]: () => void;
|
|
16
|
+
};
|
|
17
|
+
type PopupsRegistry<T extends Store> = {
|
|
18
|
+
Overlay: () => JSX.Element;
|
|
19
|
+
Close: CloseAgent<T>;
|
|
20
|
+
Open: OpenAgent<T>;
|
|
21
|
+
};
|
|
22
|
+
export declare const createDialogsRegistry: <T extends Store>(mapping: T) => PopupsRegistry<T>;
|
|
23
|
+
interface PopupLayer extends Omit<DialogProps, 'open' | 'onOpenChange' | 'onClosed'> {
|
|
24
|
+
}
|
|
25
|
+
export declare const DialogShell: ({ children, ...props }: PopupLayer) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PopoverProps } from '../Popover';
|
|
2
|
+
export type PopoverContentProps<T> = {
|
|
3
|
+
data: T;
|
|
4
|
+
close: () => void;
|
|
5
|
+
};
|
|
6
|
+
type PopoverSignature = (options: PopoverContentProps<any>) => JSX.Element;
|
|
7
|
+
type Store = {
|
|
8
|
+
[name: string]: PopoverSignature;
|
|
9
|
+
};
|
|
10
|
+
type UnwrapProps<T extends PopoverSignature> = Parameters<T>[0] extends PopoverContentProps<infer Q> ? Q : never;
|
|
11
|
+
type PopoversStore<T extends Store> = {
|
|
12
|
+
[P in keyof T]: (props: Omit<PopoverProps, 'content'> & (UnwrapProps<T[P]> extends never ? {
|
|
13
|
+
data?: unknown;
|
|
14
|
+
} : {
|
|
15
|
+
data: UnwrapProps<T[P]>;
|
|
16
|
+
})) => JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export declare const createPopoversRegistry: <T extends Store>(mapping: T) => PopoversStore<T>;
|
|
19
|
+
export {};
|
package/dist/bundle.es.js
CHANGED
|
@@ -3,18 +3,18 @@ import { Spinner as p } from "./bundle.es3.js";
|
|
|
3
3
|
import { Scrollable as x } from "./bundle.es4.js";
|
|
4
4
|
import { ImitateScroll as a } from "./bundle.es5.js";
|
|
5
5
|
import { Popover as l } from "./bundle.es6.js";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { Select as
|
|
6
|
+
import { Tooltip as n } from "./bundle.es7.js";
|
|
7
|
+
import { Select as u } from "./bundle.es8.js";
|
|
8
8
|
import { Input as T } from "./bundle.es9.js";
|
|
9
|
-
import { OptionItem as
|
|
10
|
-
import { NumberInput as
|
|
11
|
-
import { OptionsList as
|
|
12
|
-
import { ButtonGroup as
|
|
13
|
-
import { Checkbox as
|
|
14
|
-
import { Switch as
|
|
15
|
-
import { Radio as
|
|
16
|
-
import { Drawer as
|
|
17
|
-
import { Dialog as
|
|
9
|
+
import { OptionItem as D } from "./bundle.es10.js";
|
|
10
|
+
import { NumberInput as P } from "./bundle.es11.js";
|
|
11
|
+
import { OptionsList as h } from "./bundle.es12.js";
|
|
12
|
+
import { ButtonGroup as v } from "./bundle.es13.js";
|
|
13
|
+
import { Checkbox as B } from "./bundle.es14.js";
|
|
14
|
+
import { Switch as k } from "./bundle.es15.js";
|
|
15
|
+
import { Radio as y, RadioGroup as G } from "./bundle.es16.js";
|
|
16
|
+
import { Drawer as O } from "./bundle.es17.js";
|
|
17
|
+
import { Dialog as F } from "./bundle.es18.js";
|
|
18
18
|
import { AlertDialog as j } from "./bundle.es19.js";
|
|
19
19
|
import { LoadButton as z } from "./bundle.es20.js";
|
|
20
20
|
import { Tabs as H } from "./bundle.es21.js";
|
|
@@ -28,44 +28,52 @@ import { FormGroup as ro } from "./bundle.es28.js";
|
|
|
28
28
|
import { TimePicker as to } from "./bundle.es29.js";
|
|
29
29
|
import { Icon as mo } from "./bundle.es30.js";
|
|
30
30
|
import { ProgressBar as fo } from "./bundle.es31.js";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
31
|
+
import { ThemeProvider as io, useTheme as lo } from "./bundle.es32.js";
|
|
32
|
+
import { useLocalStorage as no } from "./bundle.es33.js";
|
|
33
|
+
import { createAlertAgent as uo } from "./bundle.es34.js";
|
|
34
|
+
import { createToaster as To } from "./bundle.es35.js";
|
|
35
|
+
import { Toast as Do } from "./bundle.es36.js";
|
|
36
|
+
import { DialogShell as Po, createDialogsRegistry as ho } from "./bundle.es37.js";
|
|
37
|
+
import { createPopoversRegistry as vo } from "./bundle.es38.js";
|
|
35
38
|
export {
|
|
36
39
|
j as AlertDialog,
|
|
37
40
|
e as Button,
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
v as ButtonGroup,
|
|
42
|
+
B as Checkbox,
|
|
40
43
|
K as Countdown,
|
|
41
44
|
Z as DateInput,
|
|
42
45
|
X as DatePicker,
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
F as Dialog,
|
|
47
|
+
Po as DialogShell,
|
|
48
|
+
O as Drawer,
|
|
45
49
|
$ as FileOverlay,
|
|
46
50
|
ro as FormGroup,
|
|
47
51
|
mo as Icon,
|
|
48
52
|
a as ImitateScroll,
|
|
49
53
|
T as Input,
|
|
50
54
|
z as LoadButton,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
P as NumberInput,
|
|
56
|
+
D as OptionItem,
|
|
57
|
+
h as OptionsList,
|
|
54
58
|
l as Popover,
|
|
55
59
|
fo as ProgressBar,
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
y as Radio,
|
|
61
|
+
G as RadioGroup,
|
|
58
62
|
x as Scrollable,
|
|
59
|
-
|
|
63
|
+
u as Select,
|
|
60
64
|
V as SelectTags,
|
|
61
65
|
p as Spinner,
|
|
62
|
-
|
|
66
|
+
k as Switch,
|
|
63
67
|
H as Tabs,
|
|
64
68
|
Q as TextArea,
|
|
69
|
+
io as ThemeProvider,
|
|
65
70
|
to as TimePicker,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
Do as Toast,
|
|
72
|
+
n as Tooltip,
|
|
73
|
+
uo as createAlertAgent,
|
|
74
|
+
ho as createDialogsRegistry,
|
|
75
|
+
vo as createPopoversRegistry,
|
|
76
|
+
To as createToaster,
|
|
77
|
+
no as useLocalStorage,
|
|
78
|
+
lo as useTheme
|
|
71
79
|
};
|
package/dist/bundle.es10.js
CHANGED
|
@@ -3,7 +3,7 @@ import N from "classnames";
|
|
|
3
3
|
import { Icon as v } from "./bundle.es30.js";
|
|
4
4
|
import { attr as t } from "@companix/utils-browser";
|
|
5
5
|
import { forwardRef as k } from "react";
|
|
6
|
-
import { f as x } from "./bundle.
|
|
6
|
+
import { f as x } from "./bundle.es45.js";
|
|
7
7
|
const E = k(
|
|
8
8
|
({ title: s, icon: c, active: e, label: n, disabled: a, minimal: r, onClick: d, className: l, ...m }, p) => {
|
|
9
9
|
const f = (h) => {
|
package/dist/bundle.es11.js
CHANGED
|
@@ -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.
|
|
5
|
+
import { InputContainer as F } from "./bundle.es44.js";
|
|
6
6
|
import { NumericFormat as V } from "react-number-format";
|
|
7
7
|
const D = j(
|
|
8
8
|
({
|
package/dist/bundle.es14.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "@radix-ui/react-checkbox";
|
|
3
3
|
import { Icon as h } from "./bundle.es30.js";
|
|
4
|
-
import { f as l } from "./bundle.
|
|
4
|
+
import { f as l } from "./bundle.es45.js";
|
|
5
5
|
import { useId as n } from "react";
|
|
6
6
|
import { attr as c } from "@companix/utils-browser";
|
|
7
7
|
const N = ({ checked: a, required: s, disabled: r, onCheckedChange: m, size: x, label: e }) => {
|
package/dist/bundle.es18.js
CHANGED
|
@@ -1,15 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import f from "classnames";
|
|
3
3
|
import * as o from "@radix-ui/react-dialog";
|
|
4
|
-
import { VisuallyHidden as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
import { VisuallyHidden as a } from "@radix-ui/react-visually-hidden";
|
|
5
|
+
import { RemoveListener as v } from "./bundle.es46.js";
|
|
6
|
+
const g = (l) => {
|
|
7
|
+
const { size: n = "s", open: r, onOpenChange: s, children: c, onClosed: t, disableEsc: p, className: d } = l, m = (h) => {
|
|
8
|
+
p && h.preventDefault();
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ e(o.Root, { open: r, onOpenChange: s, children: /* @__PURE__ */ i(o.Portal, { children: [
|
|
11
|
+
/* @__PURE__ */ e(o.Overlay, { className: "popup-overlay dialog-overlay" }),
|
|
12
|
+
/* @__PURE__ */ e(
|
|
13
|
+
o.Content,
|
|
14
|
+
{
|
|
15
|
+
className: "popup-container dialog-container",
|
|
16
|
+
"data-size": n,
|
|
17
|
+
onEscapeKeyDown: m,
|
|
18
|
+
children: /* @__PURE__ */ i("div", { className: f("popup dialog", d), children: [
|
|
19
|
+
/* @__PURE__ */ e(v, { callback: t }),
|
|
20
|
+
/* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(o.Title, {}) }),
|
|
21
|
+
/* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(o.Description, {}) }),
|
|
22
|
+
c
|
|
23
|
+
] })
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
] }) });
|
|
27
|
+
};
|
|
28
|
+
g.Close = o.Close;
|
|
13
29
|
export {
|
|
14
|
-
|
|
30
|
+
g as Dialog
|
|
15
31
|
};
|
package/dist/bundle.es19.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "@radix-ui/react-alert-dialog";
|
|
3
3
|
import { Button as c } from "./bundle.es2.js";
|
|
4
|
-
import { RemoveListener as N } from "./bundle.
|
|
4
|
+
import { RemoveListener as N } from "./bundle.es46.js";
|
|
5
5
|
import { VisuallyHidden as u } from "@radix-ui/react-visually-hidden";
|
|
6
6
|
const C = ({
|
|
7
7
|
open: d,
|
package/dist/bundle.es20.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Button as m } from "./bundle.es2.js";
|
|
3
|
-
import { useLoading as p } from "./bundle.
|
|
3
|
+
import { useLoading as p } from "./bundle.es47.js";
|
|
4
4
|
const g = ({ onClick: o, appearance: r = "primary", ...i }) => {
|
|
5
5
|
const { isLoading: n, isError: t, handleClick: a } = p({ onClick: o });
|
|
6
6
|
return /* @__PURE__ */ e(
|
package/dist/bundle.es23.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { useResizeTextarea as x } from "./bundle.
|
|
2
|
+
import { useResizeTextarea as x } from "./bundle.es48.js";
|
|
3
3
|
import { attr as e, callMultiple as u } from "@companix/utils-browser";
|
|
4
4
|
import { useEffect as z } from "react";
|
|
5
5
|
import { mergeRefs as R } from "react-merge-refs";
|
package/dist/bundle.es24.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { useFroozeClosing as M } from "./bundle.
|
|
2
|
+
import { useFroozeClosing as M } from "./bundle.es39.js";
|
|
3
3
|
import { Popover as j } from "./bundle.es6.js";
|
|
4
4
|
import { OptionItem as q } from "./bundle.es10.js";
|
|
5
5
|
import { OptionsList as V } from "./bundle.es12.js";
|
|
6
6
|
import { Icon as d } from "./bundle.es30.js";
|
|
7
7
|
import { useState as B, useRef as h, useMemo as g } from "react";
|
|
8
|
-
import { f as H } from "./bundle.
|
|
9
|
-
import { f as Q } from "./bundle.
|
|
8
|
+
import { f as H } from "./bundle.es49.js";
|
|
9
|
+
import { f as Q } from "./bundle.es50.js";
|
|
10
10
|
import { attr as x, getActiveElementByAnotherElement as G, contains as J } from "@companix/utils-browser";
|
|
11
11
|
import { mergeRefs as K } from "react-merge-refs";
|
|
12
12
|
const se = (C) => {
|
package/dist/bundle.es25.js
CHANGED
|
@@ -2,11 +2,11 @@ import { jsx as u } from "react/jsx-runtime";
|
|
|
2
2
|
import { Popover as x } from "./bundle.es6.js";
|
|
3
3
|
import { Input as A } from "./bundle.es9.js";
|
|
4
4
|
import { useState as M, useRef as j } from "react";
|
|
5
|
-
import { Calendar as E } from "./bundle.
|
|
6
|
-
import { useDayDisableCheker as N } from "./bundle.
|
|
5
|
+
import { Calendar as E } from "./bundle.es51.js";
|
|
6
|
+
import { useDayDisableCheker as N } from "./bundle.es52.js";
|
|
7
7
|
import { getNum as f, formatTime as v } from "@companix/utils-js";
|
|
8
|
-
import { removeDigits as O } from "./bundle.
|
|
9
|
-
import { SelectRightElements as Y } from "./bundle.
|
|
8
|
+
import { removeDigits as O } from "./bundle.es53.js";
|
|
9
|
+
import { SelectRightElements as Y } from "./bundle.es54.js";
|
|
10
10
|
const i = {
|
|
11
11
|
char: "-",
|
|
12
12
|
toString: (e) => {
|
package/dist/bundle.es26.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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.es8.js";
|
|
4
|
-
import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.
|
|
5
|
-
import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.
|
|
4
|
+
import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es53.js";
|
|
5
|
+
import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es55.js";
|
|
6
6
|
const B = ({
|
|
7
7
|
min: o = j,
|
|
8
8
|
max: e = N,
|
package/dist/bundle.es29.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as g } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as _, useMemo as b, useState as P, useEffect as j } from "react";
|
|
3
3
|
import { getNum as v } from "@companix/utils-js";
|
|
4
|
-
import { getTimesOptions as D, getTimeValue as A, removeDigits as W, convertTimeToOption as q } from "./bundle.
|
|
5
|
-
import { SelectRightElements as w } from "./bundle.
|
|
4
|
+
import { getTimesOptions as D, getTimeValue as A, removeDigits as W, convertTimeToOption as q } from "./bundle.es53.js";
|
|
5
|
+
import { SelectRightElements as w } from "./bundle.es54.js";
|
|
6
6
|
import { Select as y } from "./bundle.es8.js";
|
|
7
7
|
import { Input as z } from "./bundle.es9.js";
|
|
8
8
|
const r = {
|
package/dist/bundle.es32.js
CHANGED
|
@@ -1,13 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsxs as h, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useEffect as c, createContext as S, useContext as w } from "react";
|
|
3
|
+
import { getColorScheme as v, updateDOM as i } from "./bundle.es56.js";
|
|
4
|
+
import { ColorSchemeScript as C } from "./bundle.es57.js";
|
|
5
|
+
const a = S({
|
|
6
|
+
setColorScheme: () => {
|
|
7
|
+
}
|
|
8
|
+
}), E = () => w(a), L = (d) => {
|
|
9
|
+
const { defaultColorScheme: o = "system", storageKey: n = "theme", children: l } = d, [r, m] = f(() => v(n, o)), s = (e) => {
|
|
10
|
+
m(e), localStorage.setItem(n, e);
|
|
11
|
+
};
|
|
7
12
|
return c(() => {
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
const e = window ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
|
|
14
|
+
if (!e)
|
|
15
|
+
return;
|
|
16
|
+
const t = () => {
|
|
17
|
+
r === "system" && i("system");
|
|
18
|
+
};
|
|
19
|
+
return e.addEventListener?.("change", t), t(), () => {
|
|
20
|
+
e.removeEventListener?.("change", t);
|
|
21
|
+
};
|
|
22
|
+
}, [r]), c(() => {
|
|
23
|
+
if (!window)
|
|
24
|
+
return;
|
|
25
|
+
const e = (t) => {
|
|
26
|
+
t.key === n && (t.newValue ? m(t.newValue) : s(o));
|
|
27
|
+
};
|
|
28
|
+
return window.addEventListener("storage", e), () => {
|
|
29
|
+
window.removeEventListener("storage", e);
|
|
30
|
+
};
|
|
31
|
+
}, [s, o]), c(() => {
|
|
32
|
+
i(r);
|
|
33
|
+
}, [r]), /* @__PURE__ */ h(a.Provider, { value: { colorScheme: r, setColorScheme: s }, children: [
|
|
34
|
+
/* @__PURE__ */ u(C, { storageKey: n, defaultColorScheme: o }),
|
|
35
|
+
l
|
|
36
|
+
] });
|
|
10
37
|
};
|
|
11
38
|
export {
|
|
12
|
-
|
|
39
|
+
L as ThemeProvider,
|
|
40
|
+
E as useTheme
|
|
13
41
|
};
|
package/dist/bundle.es33.js
CHANGED
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
return {
|
|
12
|
-
show: (r) => {
|
|
13
|
-
e.emit({ ...r, id: m() });
|
|
14
|
-
},
|
|
15
|
-
Viewport: () => {
|
|
16
|
-
const r = n(null);
|
|
17
|
-
return s(() => {
|
|
18
|
-
e.emit = (o) => {
|
|
19
|
-
r.current && r.current.showAlert(o);
|
|
20
|
-
};
|
|
21
|
-
}, []), /* @__PURE__ */ i(u, { ref: r, ...t });
|
|
22
|
-
}
|
|
23
|
-
};
|
|
1
|
+
import { useState as s, useEffect as c } from "react";
|
|
2
|
+
const l = (e, a) => {
|
|
3
|
+
const [t, o] = s(() => {
|
|
4
|
+
const r = localStorage.getItem(e);
|
|
5
|
+
return r ? JSON.parse(r) : a;
|
|
6
|
+
});
|
|
7
|
+
return c(() => {
|
|
8
|
+
localStorage.setItem(e, JSON.stringify(t));
|
|
9
|
+
}, [t]), [t, o];
|
|
24
10
|
};
|
|
25
11
|
export {
|
|
26
|
-
|
|
12
|
+
l as useLocalStorage
|
|
27
13
|
};
|
package/dist/bundle.es34.js
CHANGED
|
@@ -1,41 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { hash as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
console.error("uninitialized",
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { hash as m } from "@companix/utils-js";
|
|
3
|
+
import { useRef as n, useMemo as s } from "react";
|
|
4
|
+
import { Viewport as u } from "./bundle.es58.js";
|
|
5
|
+
const h = (t = {}) => {
|
|
6
|
+
const e = {
|
|
7
|
+
emit: (r) => {
|
|
8
|
+
console.error("uninitialized", r);
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
11
|
return {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const n = e.id ?? r();
|
|
15
|
-
return o.showToast({ ...e, id: n }), n;
|
|
16
|
-
}
|
|
12
|
+
show: (r) => {
|
|
13
|
+
e.emit({ ...r, id: m() });
|
|
17
14
|
},
|
|
18
|
-
Viewport: (
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
Viewport: () => {
|
|
16
|
+
const r = n(null);
|
|
17
|
+
return s(() => {
|
|
18
|
+
e.emit = (o) => {
|
|
19
|
+
r.current && r.current.showAlert(o);
|
|
23
20
|
};
|
|
24
|
-
}, []), /* @__PURE__ */ t
|
|
25
|
-
a,
|
|
26
|
-
{
|
|
27
|
-
ref: n,
|
|
28
|
-
align: e.align ?? i.align,
|
|
29
|
-
closeIcon: e.closeIcon ?? i.closeIcon,
|
|
30
|
-
duration: e.duration ?? i.duration,
|
|
31
|
-
gap: e.gap ?? i.gap,
|
|
32
|
-
side: e.side ?? i.side,
|
|
33
|
-
swipeThreshold: e.swipeThreshold ?? i.swipeThreshold
|
|
34
|
-
}
|
|
35
|
-
);
|
|
21
|
+
}, []), /* @__PURE__ */ i(u, { ref: r, ...t });
|
|
36
22
|
}
|
|
37
23
|
};
|
|
38
24
|
};
|
|
39
25
|
export {
|
|
40
|
-
|
|
26
|
+
h as createAlertAgent
|
|
41
27
|
};
|
package/dist/bundle.es35.js
CHANGED
|
@@ -1,53 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
title: n,
|
|
11
|
-
description: c,
|
|
12
|
-
duration: L,
|
|
13
|
-
closeIcon: h,
|
|
14
|
-
onClosing: v,
|
|
15
|
-
onClosed: N,
|
|
16
|
-
closable: x = !0,
|
|
17
|
-
onInitialized: g
|
|
18
|
-
} = o;
|
|
19
|
-
j(() => {
|
|
20
|
-
f(!0);
|
|
21
|
-
}, []), E(() => {
|
|
22
|
-
s.current && g(s.current);
|
|
23
|
-
}, []);
|
|
24
|
-
const R = (i) => {
|
|
25
|
-
i || v(), u(i);
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { hash as r } from "@companix/utils-js";
|
|
3
|
+
import { Viewport as a } from "./bundle.es59.js";
|
|
4
|
+
import { useRef as c, useMemo as h } from "react";
|
|
5
|
+
const m = (i = {}) => {
|
|
6
|
+
const o = {
|
|
7
|
+
showToast: (e) => {
|
|
8
|
+
console.error("uninitialized", e);
|
|
9
|
+
}
|
|
26
10
|
};
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
11
|
+
return {
|
|
12
|
+
api: {
|
|
13
|
+
show: (e) => {
|
|
14
|
+
const n = e.id ?? r();
|
|
15
|
+
return o.showToast({ ...e, id: n }), n;
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
Viewport: (e = {}) => {
|
|
19
|
+
const n = c(null);
|
|
20
|
+
return h(() => {
|
|
21
|
+
o.showToast = (s) => {
|
|
22
|
+
n.current && n.current.showToast(s);
|
|
23
|
+
};
|
|
24
|
+
}, []), /* @__PURE__ */ t(
|
|
25
|
+
a,
|
|
26
|
+
{
|
|
27
|
+
ref: n,
|
|
28
|
+
align: e.align ?? i.align,
|
|
29
|
+
closeIcon: e.closeIcon ?? i.closeIcon,
|
|
30
|
+
duration: e.duration ?? i.duration,
|
|
31
|
+
gap: e.gap ?? i.gap,
|
|
32
|
+
side: e.side ?? i.side,
|
|
33
|
+
swipeThreshold: e.swipeThreshold ?? i.swipeThreshold
|
|
34
|
+
}
|
|
35
|
+
);
|
|
47
36
|
}
|
|
48
|
-
|
|
37
|
+
};
|
|
49
38
|
};
|
|
50
|
-
m.Close = ({ closeIcon: o, className: r } = {}) => /* @__PURE__ */ e(t.Close, { className: r, children: o ?? /* @__PURE__ */ e("svg", { viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M2.96967 2.96967C3.26256 2.67678 3.73744 2.67678 4.03033 2.96967L8 6.939L11.9697 2.96967C12.2626 2.67678 12.7374 2.67678 13.0303 2.96967C13.3232 3.26256 13.3232 3.73744 13.0303 4.03033L9.061 8L13.0303 11.9697C13.2966 12.2359 13.3208 12.6526 13.1029 12.9462L13.0303 13.0303C12.7374 13.3232 12.2626 13.3232 11.9697 13.0303L8 9.061L4.03033 13.0303C3.73744 13.3232 3.26256 13.3232 2.96967 13.0303C2.67678 12.7374 2.67678 12.2626 2.96967 11.9697L6.939 8L2.96967 4.03033C2.7034 3.76406 2.6792 3.3474 2.89705 3.05379L2.96967 2.96967Z" }) }) });
|
|
51
39
|
export {
|
|
52
|
-
m as
|
|
40
|
+
m as createToaster
|
|
53
41
|
};
|