@companix/uikit 0.0.84 → 0.0.85
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/TextArea/index.d.ts +1 -1
- package/dist/bundle.es.js +43 -39
- package/dist/bundle.es12.js +4 -4
- package/dist/bundle.es13.js +3 -3
- package/dist/bundle.es14.js +2 -2
- package/dist/bundle.es16.js +1 -1
- package/dist/bundle.es2.js +1 -1
- package/dist/bundle.es21.js +1 -1
- package/dist/bundle.es22.js +1 -1
- package/dist/bundle.es23.js +1 -1
- package/dist/bundle.es24.js +1 -1
- package/dist/bundle.es25.js +1 -1
- package/dist/bundle.es27.js +23 -21
- package/dist/bundle.es28.js +1 -1
- package/dist/bundle.es29.js +1 -1
- package/dist/bundle.es32.js +1 -1
- package/dist/bundle.es37.js +1 -1
- package/dist/bundle.es42.js +12 -25
- package/dist/bundle.es43.js +13 -38
- package/dist/bundle.es44.js +24 -48
- package/dist/bundle.es45.js +36 -45
- package/dist/bundle.es46.js +50 -8
- package/dist/bundle.es47.js +47 -26
- package/dist/bundle.es48.js +9 -5
- package/dist/bundle.es49.js +26 -24
- package/dist/bundle.es50.js +5 -23
- package/dist/bundle.es51.js +24 -23
- package/dist/bundle.es52.js +22 -87
- package/dist/bundle.es53.js +23 -17
- package/dist/bundle.es54.js +87 -92
- package/dist/bundle.es55.js +17 -73
- package/dist/bundle.es56.js +92 -23
- package/dist/bundle.es57.js +73 -38
- package/dist/bundle.es58.js +24 -14
- package/dist/bundle.es59.js +39 -14
- package/dist/bundle.es60.js +1 -1
- package/dist/bundle.es63.js +1 -1
- package/dist/bundle.es66.js +1 -1
- package/dist/bundle.es67.js +1 -1
- package/dist/bundle.es68.js +1 -1
- package/dist/bundle.es9.js +1 -1
- package/dist/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/TextArea/index.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextArea
|
|
|
4
4
|
fill?: boolean;
|
|
5
5
|
textAreaRef?: React.Ref<HTMLTextAreaElement>;
|
|
6
6
|
}
|
|
7
|
-
export declare const TextArea: ({ onResize, grow, value, onChange, disabled, required, rows, fill, textAreaRef, ...textAreaProps }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const TextArea: ({ onResize, grow, value, onChange, disabled, required, rows, fill, textAreaRef, className, ...textAreaProps }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/bundle.es.js
CHANGED
|
@@ -4,18 +4,18 @@ import { Button as x } from "./bundle.es4.js";
|
|
|
4
4
|
import { ButtonGroup as a } from "./bundle.es5.js";
|
|
5
5
|
import { Spinner as l } from "./bundle.es6.js";
|
|
6
6
|
import { Scrollable as n } from "./bundle.es7.js";
|
|
7
|
-
import { ImitateScroll as
|
|
7
|
+
import { ImitateScroll as S } from "./bundle.es8.js";
|
|
8
8
|
import { Segments as g } from "./bundle.es9.js";
|
|
9
9
|
import { Popover as h } from "./bundle.es10.js";
|
|
10
10
|
import { Tooltip as v } from "./bundle.es11.js";
|
|
11
|
-
import { Select as
|
|
12
|
-
import { SelectTags as
|
|
11
|
+
import { Select as R } from "./bundle.es12.js";
|
|
12
|
+
import { SelectTags as B } from "./bundle.es13.js";
|
|
13
13
|
import { Input as k } from "./bundle.es14.js";
|
|
14
|
-
import { OptionItem as
|
|
15
|
-
import { NumberInput as
|
|
14
|
+
import { OptionItem as L } from "./bundle.es15.js";
|
|
15
|
+
import { NumberInput as w } from "./bundle.es16.js";
|
|
16
16
|
import { OptionsList as C } from "./bundle.es17.js";
|
|
17
17
|
import { Checkbox as O } from "./bundle.es18.js";
|
|
18
|
-
import { Switch as
|
|
18
|
+
import { Switch as F } from "./bundle.es19.js";
|
|
19
19
|
import { Radio as j, RadioGroup as q } from "./bundle.es20.js";
|
|
20
20
|
import { Drawer as H } from "./bundle.es21.js";
|
|
21
21
|
import { Dialog as K } from "./bundle.es22.js";
|
|
@@ -30,21 +30,23 @@ import { FileOverlay as mo } from "./bundle.es30.js";
|
|
|
30
30
|
import { FormGroup as fo } from "./bundle.es31.js";
|
|
31
31
|
import { TimePicker as io } from "./bundle.es32.js";
|
|
32
32
|
import { Icon as co } from "./bundle.es33.js";
|
|
33
|
-
import { ProgressBar as
|
|
33
|
+
import { ProgressBar as so } from "./bundle.es34.js";
|
|
34
34
|
import { Skeleton as uo } from "./bundle.es35.js";
|
|
35
35
|
import { Blank as To } from "./bundle.es36.js";
|
|
36
36
|
import { ProgressRing as Po } from "./bundle.es37.js";
|
|
37
|
-
import { ThemeProvider as Do, useTheme as
|
|
38
|
-
import { ColorSchemeScript as
|
|
39
|
-
import { useLocalStorage as
|
|
40
|
-
import { useBooleanState as
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
37
|
+
import { ThemeProvider as Do, useTheme as Ro } from "./bundle.es38.js";
|
|
38
|
+
import { ColorSchemeScript as Io, colorSchemeScript as ko } from "./bundle.es39.js";
|
|
39
|
+
import { useLocalStorage as Lo } from "./bundle.es40.js";
|
|
40
|
+
import { useBooleanState as wo } from "./bundle.es41.js";
|
|
41
|
+
import { useResizeTextarea as Co } from "./bundle.es42.js";
|
|
42
|
+
import { useLoading as Oo } from "./bundle.es43.js";
|
|
43
|
+
import { createAlertAgent as Fo } from "./bundle.es44.js";
|
|
44
|
+
import { createToaster as jo } from "./bundle.es45.js";
|
|
45
|
+
import { Toast as Eo } from "./bundle.es46.js";
|
|
46
|
+
import { DialogShell as Jo, DrawerShell as Ko, createPopupRegistry as Mo } from "./bundle.es47.js";
|
|
47
|
+
import { createPopoversRegistry as Uo } from "./bundle.es48.js";
|
|
48
|
+
import { createScope as Wo, createStaticScope as Xo } from "./bundle.es49.js";
|
|
49
|
+
import { RemoveListener as Zo } from "./bundle.es50.js";
|
|
48
50
|
export {
|
|
49
51
|
Q as AlertDialog,
|
|
50
52
|
e as Avatar,
|
|
@@ -52,51 +54,53 @@ export {
|
|
|
52
54
|
x as Button,
|
|
53
55
|
a as ButtonGroup,
|
|
54
56
|
O as Checkbox,
|
|
55
|
-
|
|
57
|
+
Io as ColorSchemeScript,
|
|
56
58
|
Z as Countdown,
|
|
57
59
|
to as DateInput,
|
|
58
60
|
ro as DatePicker,
|
|
59
61
|
K as Dialog,
|
|
60
|
-
|
|
62
|
+
Jo as DialogShell,
|
|
61
63
|
H as Drawer,
|
|
62
|
-
|
|
64
|
+
Ko as DrawerShell,
|
|
63
65
|
mo as FileOverlay,
|
|
64
66
|
fo as FormGroup,
|
|
65
67
|
co as Icon,
|
|
66
|
-
|
|
68
|
+
S as ImitateScroll,
|
|
67
69
|
k as Input,
|
|
68
70
|
V as LoadingButton,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
w as NumberInput,
|
|
72
|
+
L as OptionItem,
|
|
71
73
|
C as OptionsList,
|
|
72
74
|
h as Popover,
|
|
73
|
-
|
|
75
|
+
so as ProgressBar,
|
|
74
76
|
Po as ProgressRing,
|
|
75
77
|
j as Radio,
|
|
76
78
|
q as RadioGroup,
|
|
77
|
-
|
|
79
|
+
Zo as RemoveListener,
|
|
78
80
|
n as Scrollable,
|
|
79
81
|
g as Segments,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
R as Select,
|
|
83
|
+
B as SelectTags,
|
|
82
84
|
uo as Skeleton,
|
|
83
85
|
l as Spinner,
|
|
84
|
-
|
|
86
|
+
F as Switch,
|
|
85
87
|
X as Tabs,
|
|
86
88
|
$ as TextArea,
|
|
87
89
|
Do as ThemeProvider,
|
|
88
90
|
io as TimePicker,
|
|
89
|
-
|
|
91
|
+
Eo as Toast,
|
|
90
92
|
v as Tooltip,
|
|
91
93
|
p as avatarSizes,
|
|
92
94
|
ko as colorSchemeScript,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
Fo as createAlertAgent,
|
|
96
|
+
Uo as createPopoversRegistry,
|
|
97
|
+
Mo as createPopupRegistry,
|
|
98
|
+
Wo as createScope,
|
|
99
|
+
Xo as createStaticScope,
|
|
100
|
+
jo as createToaster,
|
|
101
|
+
wo as useBooleanState,
|
|
102
|
+
Oo as useLoading,
|
|
103
|
+
Lo as useLocalStorage,
|
|
104
|
+
Co as useResizeTextarea,
|
|
105
|
+
Ro as useTheme
|
|
102
106
|
};
|
package/dist/bundle.es12.js
CHANGED
|
@@ -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.
|
|
5
|
-
import { SelectInput as H } from "./bundle.
|
|
6
|
-
import { useScrollListController as M } from "./bundle.
|
|
7
|
-
import { OptionsPopover as N } from "./bundle.
|
|
4
|
+
import { useFroozeClosing as w } from "./bundle.es53.js";
|
|
5
|
+
import { SelectInput as H } from "./bundle.es54.js";
|
|
6
|
+
import { useScrollListController as M } from "./bundle.es55.js";
|
|
7
|
+
import { OptionsPopover as N } from "./bundle.es56.js";
|
|
8
8
|
import { mergeRefs as W } from "react-merge-refs";
|
|
9
9
|
const Z = (t) => {
|
|
10
10
|
const {
|
package/dist/bundle.es13.js
CHANGED
|
@@ -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.
|
|
6
|
+
import { useFroozeClosing as B } from "./bundle.es53.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.
|
|
11
|
-
import { arrays as v } from "./bundle.
|
|
10
|
+
import { OptionsPopover as H } from "./bundle.es56.js";
|
|
11
|
+
import { arrays as v } from "./bundle.es57.js";
|
|
12
12
|
const ne = (r) => {
|
|
13
13
|
const {
|
|
14
14
|
closeAfterSelect: C,
|
package/dist/bundle.es14.js
CHANGED
|
@@ -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.
|
|
5
|
-
import { InputContainer as I } from "./bundle.
|
|
4
|
+
import { InputElement as x } from "./bundle.es58.js";
|
|
5
|
+
import { InputContainer as I } from "./bundle.es59.js";
|
|
6
6
|
import g from "classnames";
|
|
7
7
|
const N = b(
|
|
8
8
|
({
|
package/dist/bundle.es16.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.es59.js";
|
|
6
6
|
import { NumericFormat as V } from "react-number-format";
|
|
7
7
|
const D = j(
|
|
8
8
|
({
|
package/dist/bundle.es2.js
CHANGED
|
@@ -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.
|
|
3
|
+
import { getInitialsFontSize as h } from "./bundle.es51.js";
|
|
4
4
|
const k = 24, y = ({
|
|
5
5
|
alt: n,
|
|
6
6
|
crossOrigin: i,
|
package/dist/bundle.es21.js
CHANGED
|
@@ -3,7 +3,7 @@ import d from "classnames";
|
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
4
|
import { VisuallyHidden as i } from "@radix-ui/react-visually-hidden";
|
|
5
5
|
import { customCSS as p } from "@companix/utils-browser";
|
|
6
|
-
import { RemoveListener as f } from "./bundle.
|
|
6
|
+
import { RemoveListener as f } from "./bundle.es50.js";
|
|
7
7
|
const h = ({
|
|
8
8
|
open: t,
|
|
9
9
|
onClosed: l,
|
package/dist/bundle.es22.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
|
2
2
|
import f from "classnames";
|
|
3
3
|
import * as o from "@radix-ui/react-dialog";
|
|
4
4
|
import { VisuallyHidden as a } from "@radix-ui/react-visually-hidden";
|
|
5
|
-
import { RemoveListener as v } from "./bundle.
|
|
5
|
+
import { RemoveListener as v } from "./bundle.es50.js";
|
|
6
6
|
const g = (l) => {
|
|
7
7
|
const { size: n = "s", open: r, onOpenChange: s, children: c, onClosed: t, disableEsc: p, className: d } = l, m = (h) => {
|
|
8
8
|
p && h.preventDefault();
|
package/dist/bundle.es23.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.es4.js";
|
|
4
|
-
import { RemoveListener as N } from "./bundle.
|
|
4
|
+
import { RemoveListener as N } from "./bundle.es50.js";
|
|
5
5
|
import { VisuallyHidden as u } from "@radix-ui/react-visually-hidden";
|
|
6
6
|
const C = ({
|
|
7
7
|
open: d,
|
package/dist/bundle.es24.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Button as m } from "./bundle.es4.js";
|
|
3
|
-
import { useLoading as p } from "./bundle.
|
|
3
|
+
import { useLoading as p } from "./bundle.es43.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.es25.js
CHANGED
|
@@ -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.
|
|
2
|
+
import { useTabSlider as b, makeTabId as l } from "./bundle.es52.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 }) => {
|
package/dist/bundle.es27.js
CHANGED
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import u from "classnames";
|
|
3
|
+
import { useResizeTextarea as z } from "./bundle.es42.js";
|
|
4
|
+
import { attr as e, callMultiple as R } from "@companix/utils-browser";
|
|
5
|
+
import { useEffect as T } from "react";
|
|
6
|
+
import { mergeRefs as g } from "react-merge-refs";
|
|
7
|
+
const E = ({
|
|
8
|
+
onResize: f,
|
|
9
|
+
grow: t = !1,
|
|
10
|
+
value: a,
|
|
11
|
+
onChange: i,
|
|
11
12
|
disabled: o,
|
|
12
|
-
required:
|
|
13
|
+
required: s,
|
|
13
14
|
rows: l = 2,
|
|
14
15
|
fill: p = !1,
|
|
15
16
|
textAreaRef: c,
|
|
17
|
+
className: n,
|
|
16
18
|
...d
|
|
17
19
|
}) => {
|
|
18
|
-
const [
|
|
19
|
-
return
|
|
20
|
+
const [x, r] = z(f, t);
|
|
21
|
+
return T(r, [r, a]), /* @__PURE__ */ m(
|
|
20
22
|
"div",
|
|
21
23
|
{
|
|
22
24
|
className: "form form-textarea",
|
|
23
|
-
"data-required": e(
|
|
25
|
+
"data-required": e(s),
|
|
24
26
|
"data-disabled": e(o),
|
|
25
27
|
"data-fill": e(p),
|
|
26
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ m(
|
|
27
29
|
"textarea",
|
|
28
30
|
{
|
|
29
|
-
className: "form-input",
|
|
30
|
-
"data-grow": e(
|
|
31
|
-
value:
|
|
32
|
-
ref:
|
|
31
|
+
className: u("form-input", n),
|
|
32
|
+
"data-grow": e(t),
|
|
33
|
+
value: a,
|
|
34
|
+
ref: g([c, x]),
|
|
33
35
|
rows: l,
|
|
34
36
|
disabled: o,
|
|
35
|
-
onChange:
|
|
37
|
+
onChange: R(i, r),
|
|
36
38
|
...d
|
|
37
39
|
}
|
|
38
40
|
)
|
|
@@ -40,5 +42,5 @@ const q = ({
|
|
|
40
42
|
);
|
|
41
43
|
};
|
|
42
44
|
export {
|
|
43
|
-
|
|
45
|
+
E as TextArea
|
|
44
46
|
};
|
package/dist/bundle.es28.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useState as A, useRef as j } from "react";
|
|
|
5
5
|
import { Calendar as E } from "./bundle.es60.js";
|
|
6
6
|
import { useDayDisableCheker as N } from "./bundle.es61.js";
|
|
7
7
|
import { getNum as h, formatTime as v } from "@companix/utils-js";
|
|
8
|
-
import { removeDigits as O } from "./bundle.
|
|
8
|
+
import { removeDigits as O } from "./bundle.es57.js";
|
|
9
9
|
import { SelectRightElements as Y } from "./bundle.es62.js";
|
|
10
10
|
const i = {
|
|
11
11
|
char: "-",
|
package/dist/bundle.es29.js
CHANGED
|
@@ -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.
|
|
4
|
+
import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es57.js";
|
|
5
5
|
import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es63.js";
|
|
6
6
|
const B = ({
|
|
7
7
|
min: o = j,
|
package/dist/bundle.es32.js
CHANGED
|
@@ -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.
|
|
4
|
+
import { getTimesOptions as W, getTimeValue as q, removeDigits as w, convertTimeToOption as y } from "./bundle.es57.js";
|
|
5
5
|
import { SelectRightElements as z } from "./bundle.es62.js";
|
|
6
6
|
import { Select as F } from "./bundle.es12.js";
|
|
7
7
|
import { Input as G } from "./bundle.es14.js";
|
package/dist/bundle.es37.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as e, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { getInitialsFontSize as l } from "./bundle.
|
|
2
|
+
import { getInitialsFontSize as l } from "./bundle.es51.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",
|
package/dist/bundle.es42.js
CHANGED
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const e = {
|
|
7
|
-
emit: (r) => {
|
|
8
|
-
console.error("uninitialized", r);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
return {
|
|
12
|
-
api: {
|
|
13
|
-
show: (r) => {
|
|
14
|
-
e.emit({ ...r, id: m() });
|
|
15
|
-
}
|
|
1
|
+
import { useRef as i, useCallback as o } from "react";
|
|
2
|
+
const f = (e, s) => {
|
|
3
|
+
const r = i(null), c = i(void 0), n = o(
|
|
4
|
+
(t) => {
|
|
5
|
+
s && t.offsetParent && (t.style.height = "", t.style.height = `${t.scrollHeight}px`, t.scrollHeight !== c.current && e && (e(t), c.current = t.scrollHeight));
|
|
16
6
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, []), /* @__PURE__ */ i(p, { ref: r, ...t });
|
|
24
|
-
}
|
|
25
|
-
};
|
|
7
|
+
[s, e]
|
|
8
|
+
), l = o(() => {
|
|
9
|
+
const t = r.current;
|
|
10
|
+
t && n(t);
|
|
11
|
+
}, [r, n]);
|
|
12
|
+
return [r, l];
|
|
26
13
|
};
|
|
27
14
|
export {
|
|
28
|
-
|
|
15
|
+
f as useResizeTextarea
|
|
29
16
|
};
|
package/dist/bundle.es43.js
CHANGED
|
@@ -1,41 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
1
|
+
import { useState as e } from "react";
|
|
2
|
+
const d = ({ onClick: t }) => {
|
|
3
|
+
const [a, s] = e({ isLoading: !1, isError: !1 });
|
|
4
|
+
return { ...a, handleClick: (r) => {
|
|
5
|
+
a.isLoading || t(() => {
|
|
6
|
+
s({ isLoading: !0, isError: !1 });
|
|
7
|
+
}, r).then(() => {
|
|
8
|
+
s({ isLoading: !1, isError: !1 });
|
|
9
|
+
}).catch(() => {
|
|
10
|
+
s({ isLoading: !1, isError: !0 });
|
|
11
|
+
});
|
|
12
|
+
} };
|
|
38
13
|
};
|
|
39
14
|
export {
|
|
40
|
-
|
|
15
|
+
d as useLoading
|
|
41
16
|
};
|
package/dist/bundle.es44.js
CHANGED
|
@@ -1,53 +1,29 @@
|
|
|
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 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 p } from "./bundle.es65.js";
|
|
5
|
+
const a = (t = {}) => {
|
|
6
|
+
const e = {
|
|
7
|
+
emit: (r) => {
|
|
8
|
+
console.error("uninitialized", r);
|
|
9
|
+
}
|
|
26
10
|
};
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
a && /* @__PURE__ */ e("div", { className: "toaster-icon", children: a }),
|
|
41
|
-
/* @__PURE__ */ l("div", { className: "toaster-content", children: [
|
|
42
|
-
n && /* @__PURE__ */ e(t.Title, { className: "toaster-title", children: n }),
|
|
43
|
-
c && /* @__PURE__ */ e(t.Description, { className: "toaster-description", children: c })
|
|
44
|
-
] }),
|
|
45
|
-
x && /* @__PURE__ */ e(m.Close, { className: "toaster-close toaster-close-placement", closeIcon: h })
|
|
46
|
-
]
|
|
11
|
+
return {
|
|
12
|
+
api: {
|
|
13
|
+
show: (r) => {
|
|
14
|
+
e.emit({ ...r, id: m() });
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
Viewport: () => {
|
|
18
|
+
const r = n(null);
|
|
19
|
+
return s(() => {
|
|
20
|
+
e.emit = (o) => {
|
|
21
|
+
r.current && r.current.showAlert(o);
|
|
22
|
+
};
|
|
23
|
+
}, []), /* @__PURE__ */ i(p, { ref: r, ...t });
|
|
47
24
|
}
|
|
48
|
-
|
|
25
|
+
};
|
|
49
26
|
};
|
|
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
27
|
export {
|
|
52
|
-
|
|
28
|
+
a as createAlertAgent
|
|
53
29
|
};
|
package/dist/bundle.es45.js
CHANGED
|
@@ -1,50 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, p.push(() => /* @__PURE__ */ r(S, { Open: t, Close: e, name: n, Content: o[n] }));
|
|
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.es66.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
|
+
}
|
|
10
|
+
};
|
|
12
11
|
return {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
+
);
|
|
36
|
+
}
|
|
16
37
|
};
|
|
17
|
-
}, S = ({ name: o, Open: t, Close: e, Content: p }) => {
|
|
18
|
-
const [{ data: c, open: n }, s] = P({ data: null, open: !1 });
|
|
19
|
-
g(() => {
|
|
20
|
-
t[o] = (a) => {
|
|
21
|
-
s({ data: a, open: !0 });
|
|
22
|
-
}, e[o] = () => {
|
|
23
|
-
n && l();
|
|
24
|
-
};
|
|
25
|
-
}, []);
|
|
26
|
-
const l = u(() => {
|
|
27
|
-
s(({ data: a }) => ({ data: a, open: !1 }));
|
|
28
|
-
}, []), d = u(() => {
|
|
29
|
-
s({ data: null, open: !1 });
|
|
30
|
-
}, []), m = u((a) => {
|
|
31
|
-
a || l();
|
|
32
|
-
}, []);
|
|
33
|
-
return c ? /* @__PURE__ */ r(i.Provider, { value: { open: n, onOpenChange: m, onClosed: d }, children: /* @__PURE__ */ r(p, { data: c, close: l }) }) : null;
|
|
34
|
-
}, i = x(null), f = () => {
|
|
35
|
-
const o = C(i);
|
|
36
|
-
if (!o)
|
|
37
|
-
throw new Error("Popup context not provided");
|
|
38
|
-
return o;
|
|
39
|
-
}, k = ({ children: o, ...t }) => {
|
|
40
|
-
const e = f();
|
|
41
|
-
return /* @__PURE__ */ r(w, { ...e, ...t, children: o });
|
|
42
|
-
}, F = ({ children: o, ...t }) => {
|
|
43
|
-
const e = f();
|
|
44
|
-
return /* @__PURE__ */ r(D, { ...e, ...t, children: o });
|
|
45
38
|
};
|
|
46
39
|
export {
|
|
47
|
-
|
|
48
|
-
F as DrawerShell,
|
|
49
|
-
j as createPopupRegistry
|
|
40
|
+
m as createToaster
|
|
50
41
|
};
|