@companix/uikit 0.0.79 → 0.0.80
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/bundle.es.js +23 -21
- 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.es25.js +1 -1
- 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.es44.js +1 -1
- package/dist/bundle.es48.js +5 -25
- package/dist/bundle.es49.js +25 -23
- package/dist/bundle.es50.js +22 -23
- package/dist/bundle.es51.js +24 -88
- package/dist/bundle.es52.js +88 -18
- package/dist/bundle.es53.js +17 -92
- package/dist/bundle.es54.js +92 -73
- package/dist/bundle.es55.js +73 -23
- package/dist/bundle.es56.js +20 -35
- package/dist/bundle.es57.js +39 -5
- package/dist/bundle.es60.js +3 -3
- package/dist/bundle.es63.js +1 -1
- package/dist/bundle.es67.js +74 -13
- package/dist/bundle.es68.js +45 -71
- package/dist/bundle.es69.js +13 -48
- package/dist/bundle.es9.js +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/bundle.es.js
CHANGED
|
@@ -7,13 +7,13 @@ import { Scrollable as n } from "./bundle.es7.js";
|
|
|
7
7
|
import { ImitateScroll as S } from "./bundle.es8.js";
|
|
8
8
|
import { Segments as u } from "./bundle.es9.js";
|
|
9
9
|
import { Popover as h } from "./bundle.es10.js";
|
|
10
|
-
import { Tooltip as
|
|
10
|
+
import { Tooltip as D } from "./bundle.es11.js";
|
|
11
11
|
import { Select as B } from "./bundle.es12.js";
|
|
12
|
-
import { SelectTags as
|
|
13
|
-
import { Input as
|
|
12
|
+
import { SelectTags as R } from "./bundle.es13.js";
|
|
13
|
+
import { Input as k } from "./bundle.es14.js";
|
|
14
14
|
import { OptionItem as b } from "./bundle.es15.js";
|
|
15
|
-
import { NumberInput as
|
|
16
|
-
import { OptionsList as
|
|
15
|
+
import { NumberInput as w } from "./bundle.es16.js";
|
|
16
|
+
import { OptionsList as C } from "./bundle.es17.js";
|
|
17
17
|
import { Checkbox as O } from "./bundle.es18.js";
|
|
18
18
|
import { Switch as z } from "./bundle.es19.js";
|
|
19
19
|
import { Radio as j, RadioGroup as q } from "./bundle.es20.js";
|
|
@@ -33,17 +33,18 @@ import { Icon as lo } from "./bundle.es33.js";
|
|
|
33
33
|
import { ProgressBar as so } from "./bundle.es34.js";
|
|
34
34
|
import { Skeleton as go } from "./bundle.es35.js";
|
|
35
35
|
import { Blank as To } from "./bundle.es36.js";
|
|
36
|
-
import { ProgressRing as
|
|
37
|
-
import { ThemeProvider as
|
|
38
|
-
import { ColorSchemeScript as
|
|
36
|
+
import { ProgressRing as vo } from "./bundle.es37.js";
|
|
37
|
+
import { ThemeProvider as Po, useTheme as Bo } from "./bundle.es38.js";
|
|
38
|
+
import { ColorSchemeScript as Ro, colorSchemeScript as ko } from "./bundle.es39.js";
|
|
39
39
|
import { useLocalStorage as bo } from "./bundle.es40.js";
|
|
40
|
-
import { useBooleanState as
|
|
41
|
-
import { createAlertAgent as
|
|
40
|
+
import { useBooleanState as wo } from "./bundle.es41.js";
|
|
41
|
+
import { createAlertAgent as Co } from "./bundle.es42.js";
|
|
42
42
|
import { createToaster as Oo } from "./bundle.es43.js";
|
|
43
43
|
import { Toast as zo } from "./bundle.es44.js";
|
|
44
44
|
import { DialogShell as jo, createDialogsRegistry as qo } from "./bundle.es45.js";
|
|
45
45
|
import { createPopoversRegistry as Ho } from "./bundle.es46.js";
|
|
46
46
|
import { createScope as Ko, createStaticScope as Mo } from "./bundle.es47.js";
|
|
47
|
+
import { RemoveListener as Uo } from "./bundle.es48.js";
|
|
47
48
|
export {
|
|
48
49
|
Q as AlertDialog,
|
|
49
50
|
e as Avatar,
|
|
@@ -51,7 +52,7 @@ export {
|
|
|
51
52
|
x as Button,
|
|
52
53
|
a as ButtonGroup,
|
|
53
54
|
O as Checkbox,
|
|
54
|
-
|
|
55
|
+
Ro as ColorSchemeScript,
|
|
55
56
|
Z as Countdown,
|
|
56
57
|
to as DateInput,
|
|
57
58
|
ro as DatePicker,
|
|
@@ -62,38 +63,39 @@ export {
|
|
|
62
63
|
fo as FormGroup,
|
|
63
64
|
lo as Icon,
|
|
64
65
|
S as ImitateScroll,
|
|
65
|
-
|
|
66
|
+
k as Input,
|
|
66
67
|
V as LoadingButton,
|
|
67
|
-
|
|
68
|
+
w as NumberInput,
|
|
68
69
|
b as OptionItem,
|
|
69
|
-
|
|
70
|
+
C as OptionsList,
|
|
70
71
|
h as Popover,
|
|
71
72
|
so as ProgressBar,
|
|
72
|
-
|
|
73
|
+
vo as ProgressRing,
|
|
73
74
|
j as Radio,
|
|
74
75
|
q as RadioGroup,
|
|
76
|
+
Uo as RemoveListener,
|
|
75
77
|
n as Scrollable,
|
|
76
78
|
u as Segments,
|
|
77
79
|
B as Select,
|
|
78
|
-
|
|
80
|
+
R as SelectTags,
|
|
79
81
|
go as Skeleton,
|
|
80
82
|
c as Spinner,
|
|
81
83
|
z as Switch,
|
|
82
84
|
X as Tabs,
|
|
83
85
|
$ as TextArea,
|
|
84
|
-
|
|
86
|
+
Po as ThemeProvider,
|
|
85
87
|
io as TimePicker,
|
|
86
88
|
zo as Toast,
|
|
87
|
-
|
|
89
|
+
D as Tooltip,
|
|
88
90
|
p as avatarSizes,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
ko as colorSchemeScript,
|
|
92
|
+
Co as createAlertAgent,
|
|
91
93
|
qo as createDialogsRegistry,
|
|
92
94
|
Ho as createPopoversRegistry,
|
|
93
95
|
Ko as createScope,
|
|
94
96
|
Mo as createStaticScope,
|
|
95
97
|
Oo as createToaster,
|
|
96
|
-
|
|
98
|
+
wo as useBooleanState,
|
|
97
99
|
bo as useLocalStorage,
|
|
98
100
|
Bo as useTheme
|
|
99
101
|
};
|
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.es51.js";
|
|
5
|
+
import { SelectInput as H } from "./bundle.es52.js";
|
|
6
|
+
import { useScrollListController as M } from "./bundle.es53.js";
|
|
7
|
+
import { OptionsPopover as N } from "./bundle.es54.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.es51.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.es54.js";
|
|
11
|
+
import { arrays as v } from "./bundle.es55.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.es56.js";
|
|
5
|
+
import { InputContainer as I } from "./bundle.es57.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.es57.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.es49.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.es48.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.es48.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.es48.js";
|
|
5
5
|
import { VisuallyHidden as u } from "@radix-ui/react-visually-hidden";
|
|
6
6
|
const C = ({
|
|
7
7
|
open: d,
|
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.es50.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.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.es55.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.es55.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.es55.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.es49.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.es44.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import * as t from "@radix-ui/react-toast";
|
|
3
3
|
import { attr as T } from "@companix/utils-browser";
|
|
4
4
|
import { useState as d, useRef as b, useEffect as j, useLayoutEffect as E } from "react";
|
|
5
|
-
import { RemoveListener as I } from "./bundle.
|
|
5
|
+
import { RemoveListener as I } from "./bundle.es48.js";
|
|
6
6
|
const m = (o) => {
|
|
7
7
|
const [r, u] = d(!0), [p, f] = d(!1), s = b(null), {
|
|
8
8
|
appearance: C = "neutral",
|
package/dist/bundle.es48.js
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
};
|
|
1
|
+
import { useEffect as r } from "react";
|
|
2
|
+
const n = ({ callback: e }) => (r(() => () => {
|
|
3
|
+
e?.();
|
|
4
|
+
}, []), null);
|
|
25
5
|
export {
|
|
26
|
-
|
|
6
|
+
n as RemoveListener
|
|
27
7
|
};
|
package/dist/bundle.es49.js
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
24
|
-
v as useTabSlider
|
|
26
|
+
_ as getInitialsFontSize
|
|
25
27
|
};
|
package/dist/bundle.es50.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
23
|
+
h as makeTabId,
|
|
24
|
+
v as useTabSlider
|
|
26
25
|
};
|
package/dist/bundle.es51.js
CHANGED
|
@@ -1,90 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, k) => {
|
|
25
|
-
const e = D(null), v = S(
|
|
26
|
-
(t) => {
|
|
27
|
-
if (!e.current || !document)
|
|
28
|
-
return;
|
|
29
|
-
t.target !== e.current && (e.current.click(), document.activeElement !== e.current && e.current.focus());
|
|
30
|
-
},
|
|
31
|
-
[e]
|
|
32
|
-
), F = (t) => {
|
|
33
|
-
document && document.activeElement === e.current && t.preventDefault();
|
|
34
|
-
}, g = (t) => {
|
|
35
|
-
r || v(t);
|
|
36
|
-
}, R = (t) => {
|
|
37
|
-
F(t);
|
|
38
|
-
}, x = (t) => {
|
|
39
|
-
e.current && e.current.focus(), h?.(t);
|
|
40
|
-
};
|
|
41
|
-
return /* @__PURE__ */ o(
|
|
42
|
-
"div",
|
|
43
|
-
{
|
|
44
|
-
ref: k,
|
|
45
|
-
className: w("form select", d),
|
|
46
|
-
"data-size": i ?? "md",
|
|
47
|
-
"data-fill": s(u),
|
|
48
|
-
"data-required": s(a),
|
|
49
|
-
"data-disabled": s(r),
|
|
50
|
-
onMouseDown: R,
|
|
51
|
-
onClick: g,
|
|
52
|
-
...N,
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ o("div", { className: "select-layout form-input", children: [
|
|
55
|
-
l && /* @__PURE__ */ n("div", { className: "select-element", children: l }),
|
|
56
|
-
/* @__PURE__ */ n("div", { className: "select-content", children: /* @__PURE__ */ o("div", { className: "select-content-text", "aria-disabled": r, children: [
|
|
57
|
-
!c && /* @__PURE__ */ n("span", { className: "select-placeholder", children: p }),
|
|
58
|
-
c
|
|
59
|
-
] }) }),
|
|
60
|
-
/* @__PURE__ */ n("div", { className: "select-element", children: /* @__PURE__ */ n(
|
|
61
|
-
z,
|
|
62
|
-
{
|
|
63
|
-
clearButton: m,
|
|
64
|
-
value: !!c,
|
|
65
|
-
clearButtonIcon: f,
|
|
66
|
-
onClear: x
|
|
67
|
-
}
|
|
68
|
-
) })
|
|
69
|
-
] }),
|
|
70
|
-
/* @__PURE__ */ n(T, { asChild: !0, children: /* @__PURE__ */ n(
|
|
71
|
-
"input",
|
|
72
|
-
{
|
|
73
|
-
ref: j([C, e]),
|
|
74
|
-
autoComplete: "off",
|
|
75
|
-
autoCapitalize: "none",
|
|
76
|
-
autoCorrect: "off",
|
|
77
|
-
spellCheck: "false",
|
|
78
|
-
"aria-autocomplete": "none",
|
|
79
|
-
onClick: I,
|
|
80
|
-
readOnly: !0
|
|
81
|
-
}
|
|
82
|
-
) })
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
);
|
|
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);
|
|
14
|
+
}
|
|
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
|
+
};
|
|
88
24
|
export {
|
|
89
|
-
|
|
25
|
+
p as useFroozeClosing
|
|
90
26
|
};
|
package/dist/bundle.es52.js
CHANGED
|
@@ -1,20 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import w from "classnames";
|
|
3
|
+
import { attr as s } from "@companix/utils-browser";
|
|
4
|
+
import { forwardRef as y, useRef as D, useCallback as S } from "react";
|
|
5
|
+
import { VisuallyHidden as T } from "@radix-ui/react-visually-hidden";
|
|
6
|
+
import { mergeRefs as j } from "react-merge-refs";
|
|
7
|
+
import { SelectRightElements as z } from "./bundle.es62.js";
|
|
8
|
+
const W = y(
|
|
9
|
+
({
|
|
10
|
+
required: a,
|
|
11
|
+
size: i,
|
|
12
|
+
fill: u,
|
|
13
|
+
leftElement: l,
|
|
14
|
+
className: d,
|
|
15
|
+
value: c,
|
|
16
|
+
clearButton: m,
|
|
17
|
+
placeholder: p,
|
|
18
|
+
clearButtonIcon: f,
|
|
19
|
+
disabled: r,
|
|
20
|
+
onClear: h,
|
|
21
|
+
inputRef: C,
|
|
22
|
+
onClick: I,
|
|
23
|
+
...N
|
|
24
|
+
}, k) => {
|
|
25
|
+
const e = D(null), v = S(
|
|
26
|
+
(t) => {
|
|
27
|
+
if (!e.current || !document)
|
|
28
|
+
return;
|
|
29
|
+
t.target !== e.current && (e.current.click(), document.activeElement !== e.current && e.current.focus());
|
|
30
|
+
},
|
|
31
|
+
[e]
|
|
32
|
+
), F = (t) => {
|
|
33
|
+
document && document.activeElement === e.current && t.preventDefault();
|
|
34
|
+
}, g = (t) => {
|
|
35
|
+
r || v(t);
|
|
36
|
+
}, R = (t) => {
|
|
37
|
+
F(t);
|
|
38
|
+
}, x = (t) => {
|
|
39
|
+
e.current && e.current.focus(), h?.(t);
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ o(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
ref: k,
|
|
45
|
+
className: w("form select", d),
|
|
46
|
+
"data-size": i ?? "md",
|
|
47
|
+
"data-fill": s(u),
|
|
48
|
+
"data-required": s(a),
|
|
49
|
+
"data-disabled": s(r),
|
|
50
|
+
onMouseDown: R,
|
|
51
|
+
onClick: g,
|
|
52
|
+
...N,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ o("div", { className: "select-layout form-input", children: [
|
|
55
|
+
l && /* @__PURE__ */ n("div", { className: "select-element", children: l }),
|
|
56
|
+
/* @__PURE__ */ n("div", { className: "select-content", children: /* @__PURE__ */ o("div", { className: "select-content-text", "aria-disabled": r, children: [
|
|
57
|
+
!c && /* @__PURE__ */ n("span", { className: "select-placeholder", children: p }),
|
|
58
|
+
c
|
|
59
|
+
] }) }),
|
|
60
|
+
/* @__PURE__ */ n("div", { className: "select-element", children: /* @__PURE__ */ n(
|
|
61
|
+
z,
|
|
62
|
+
{
|
|
63
|
+
clearButton: m,
|
|
64
|
+
value: !!c,
|
|
65
|
+
clearButtonIcon: f,
|
|
66
|
+
onClear: x
|
|
67
|
+
}
|
|
68
|
+
) })
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ n(T, { asChild: !0, children: /* @__PURE__ */ n(
|
|
71
|
+
"input",
|
|
72
|
+
{
|
|
73
|
+
ref: j([C, e]),
|
|
74
|
+
autoComplete: "off",
|
|
75
|
+
autoCapitalize: "none",
|
|
76
|
+
autoCorrect: "off",
|
|
77
|
+
spellCheck: "false",
|
|
78
|
+
"aria-autocomplete": "none",
|
|
79
|
+
onClick: I,
|
|
80
|
+
readOnly: !0
|
|
81
|
+
}
|
|
82
|
+
) })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
);
|
|
18
88
|
export {
|
|
19
|
-
|
|
89
|
+
W as SelectInput
|
|
20
90
|
};
|