@companix/uikit 0.0.63 → 0.0.64
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/Select/OptionsPopover.d.ts +6 -4
- package/dist/Select/index.d.ts +7 -10
- package/dist/SelectTags/index.d.ts +4 -7
- package/dist/bundle.es.js +31 -31
- package/dist/bundle.es13.js +120 -41
- package/dist/bundle.es14.js +37 -32
- package/dist/bundle.es15.js +32 -52
- package/dist/bundle.es16.js +54 -19
- package/dist/bundle.es17.js +21 -33
- package/dist/bundle.es18.js +31 -23
- package/dist/bundle.es19.js +24 -44
- package/dist/bundle.es20.js +41 -19
- package/dist/bundle.es21.js +23 -29
- package/dist/bundle.es22.js +28 -37
- package/dist/bundle.es23.js +38 -16
- package/dist/bundle.es24.js +15 -18
- package/dist/bundle.es25.js +18 -20
- package/dist/bundle.es26.js +20 -41
- package/dist/bundle.es27.js +35 -113
- package/dist/bundle.es28.js +1 -1
- package/dist/bundle.es32.js +1 -1
- package/dist/bundle.es43.js +1 -1
- package/dist/bundle.es50.js +7 -7
- package/dist/bundle.es62.js +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -22,7 +22,12 @@ export interface SelectAddOption {
|
|
|
22
22
|
closeOnClick?: boolean;
|
|
23
23
|
onClick: () => void;
|
|
24
24
|
}
|
|
25
|
-
interface
|
|
25
|
+
export interface SelectOptionsPopoverParams {
|
|
26
|
+
minimalOptions?: boolean;
|
|
27
|
+
addOption?: SelectAddOption;
|
|
28
|
+
emptyText?: string;
|
|
29
|
+
}
|
|
30
|
+
interface InternalListProps<T> extends SelectOptionsPopoverParams {
|
|
26
31
|
options: Option<T>[];
|
|
27
32
|
scrollboxRef?: React.RefObject<HTMLDivElement>;
|
|
28
33
|
optionsWrapperRef?: React.RefObject<HTMLDivElement>;
|
|
@@ -31,9 +36,6 @@ interface InternalListProps<T> {
|
|
|
31
36
|
onOpened?: (activeIndex: number) => void;
|
|
32
37
|
filterOptions?: (option: Option<T>) => boolean;
|
|
33
38
|
disableFiltering?: boolean;
|
|
34
|
-
minimalOptions?: boolean;
|
|
35
|
-
addOption?: SelectAddOption;
|
|
36
|
-
emptyText?: string;
|
|
37
39
|
}
|
|
38
40
|
export type OptionsPopoverProps<T> = OptionsSourceControl<T> & Omit<InternalListProps<T>, 'options'>;
|
|
39
41
|
export declare const OptionsPopover: <T>(props: OptionsPopoverProps<T>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/Select/index.d.ts
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
import { SelectFormProps } from './SelectInput';
|
|
2
|
-
import { OptionsSource,
|
|
2
|
+
import { OptionsSource, SelectOptionsPopoverParams } from './OptionsPopover';
|
|
3
3
|
interface Cleanable<T> {
|
|
4
4
|
clearButton: true;
|
|
5
|
-
onChange: (
|
|
5
|
+
onChange: (value: T | null) => void;
|
|
6
6
|
}
|
|
7
7
|
interface UnCleanable<T> {
|
|
8
8
|
clearButton?: false;
|
|
9
|
-
onChange: (
|
|
9
|
+
onChange: (value: T) => void;
|
|
10
10
|
}
|
|
11
|
-
type
|
|
12
|
-
export interface SelectParams {
|
|
11
|
+
type OnChangeValueType<T> = Cleanable<T> | UnCleanable<T>;
|
|
12
|
+
export interface SelectParams extends SelectOptionsPopoverParams {
|
|
13
13
|
matchTarget?: 'width' | 'min-width';
|
|
14
14
|
popoverRef?: React.Ref<HTMLDivElement>;
|
|
15
15
|
scrollRef?: React.Ref<{
|
|
16
16
|
scrollTo: (index: number) => void;
|
|
17
17
|
}>;
|
|
18
|
-
emptyText?: string;
|
|
19
|
-
minimalOptions?: boolean;
|
|
20
|
-
addOption?: SelectAddOption;
|
|
21
18
|
}
|
|
22
|
-
export type SelectProps<T> = Omit<SelectFormProps, 'value' | 'onChange' | 'closeButton'> &
|
|
19
|
+
export type SelectProps<T> = OptionsSource<T> & Omit<SelectFormProps, 'value' | 'onChange' | 'closeButton'> & SelectParams & OnChangeValueType<T> & {
|
|
23
20
|
value: T | null;
|
|
24
21
|
children?: React.ReactNode;
|
|
25
22
|
};
|
|
26
|
-
export declare const Select: <T
|
|
23
|
+
export declare const Select: <T>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
27
24
|
export {};
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { OptionsSource,
|
|
2
|
-
export interface
|
|
1
|
+
import { OptionsSource, SelectOptionsPopoverParams } from '../Select/OptionsPopover';
|
|
2
|
+
export interface SelectTagsParams<T> extends SelectOptionsPopoverParams {
|
|
3
3
|
closeAfterSelect?: boolean;
|
|
4
4
|
onInputChange?: (text: string) => void;
|
|
5
5
|
onChange: (event: T[]) => void;
|
|
6
|
-
placeholder?: string;
|
|
7
6
|
value: T[];
|
|
7
|
+
placeholder?: string;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
readOnly?: boolean;
|
|
10
10
|
size?: 'sm' | 'md' | 'lg';
|
|
11
11
|
fill?: boolean;
|
|
12
12
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
13
13
|
required?: boolean;
|
|
14
|
-
minimalOptions?: boolean;
|
|
15
|
-
addOption?: SelectAddOption;
|
|
16
|
-
emptyText?: string;
|
|
17
14
|
}
|
|
18
|
-
export type SelectTagsProps<T> = OptionsSource<T> &
|
|
15
|
+
export type SelectTagsProps<T> = OptionsSource<T> & SelectTagsParams<T>;
|
|
19
16
|
export declare const SelectTags: <T extends string | number>(props: SelectTagsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/bundle.es.js
CHANGED
|
@@ -9,21 +9,21 @@ 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
11
|
import { Select as P } from "./bundle.es12.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
12
|
+
import { SelectTags as A } from "./bundle.es13.js";
|
|
13
|
+
import { Input as b } from "./bundle.es14.js";
|
|
14
|
+
import { OptionItem as R } from "./bundle.es15.js";
|
|
15
|
+
import { NumberInput as y } from "./bundle.es16.js";
|
|
16
|
+
import { OptionsList as G } from "./bundle.es17.js";
|
|
17
|
+
import { Checkbox as O } from "./bundle.es18.js";
|
|
18
|
+
import { Switch as z } from "./bundle.es19.js";
|
|
19
|
+
import { Radio as j, RadioGroup as q } from "./bundle.es20.js";
|
|
20
|
+
import { Drawer as H } from "./bundle.es21.js";
|
|
21
|
+
import { Dialog as K } from "./bundle.es22.js";
|
|
22
|
+
import { AlertDialog as Q } from "./bundle.es23.js";
|
|
23
|
+
import { LoadingButton as V } from "./bundle.es24.js";
|
|
24
|
+
import { Tabs as X } from "./bundle.es25.js";
|
|
25
|
+
import { Countdown as Z } from "./bundle.es26.js";
|
|
26
|
+
import { TextArea as $ } from "./bundle.es27.js";
|
|
27
27
|
import { DatePicker as ro } from "./bundle.es28.js";
|
|
28
28
|
import { DateInput as to } from "./bundle.es29.js";
|
|
29
29
|
import { FileOverlay as mo } from "./bundle.es30.js";
|
|
@@ -42,40 +42,40 @@ import { Toast as Go } from "./bundle.es42.js";
|
|
|
42
42
|
import { DialogShell as Oo, createDialogsRegistry as Fo } from "./bundle.es43.js";
|
|
43
43
|
import { createPopoversRegistry as No } from "./bundle.es44.js";
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
Q as AlertDialog,
|
|
46
46
|
e as Avatar,
|
|
47
47
|
x as Button,
|
|
48
48
|
a as ButtonGroup,
|
|
49
|
-
|
|
49
|
+
O as Checkbox,
|
|
50
50
|
vo as ColorSchemeScript,
|
|
51
|
-
|
|
51
|
+
Z as Countdown,
|
|
52
52
|
to as DateInput,
|
|
53
53
|
ro as DatePicker,
|
|
54
|
-
|
|
54
|
+
K as Dialog,
|
|
55
55
|
Oo as DialogShell,
|
|
56
|
-
|
|
56
|
+
H as Drawer,
|
|
57
57
|
mo as FileOverlay,
|
|
58
58
|
fo as FormGroup,
|
|
59
59
|
co as Icon,
|
|
60
60
|
S as ImitateScroll,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
b as Input,
|
|
62
|
+
V as LoadingButton,
|
|
63
|
+
y as NumberInput,
|
|
64
|
+
R as OptionItem,
|
|
65
|
+
G as OptionsList,
|
|
66
66
|
h as Popover,
|
|
67
67
|
so as ProgressBar,
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
j as Radio,
|
|
69
|
+
q as RadioGroup,
|
|
70
70
|
n as Scrollable,
|
|
71
71
|
g as Segments,
|
|
72
72
|
P as Select,
|
|
73
|
-
|
|
73
|
+
A as SelectTags,
|
|
74
74
|
uo as Skeleton,
|
|
75
75
|
l as Spinner,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
z as Switch,
|
|
77
|
+
X as Tabs,
|
|
78
|
+
$ as TextArea,
|
|
79
79
|
To as ThemeProvider,
|
|
80
80
|
io as TimePicker,
|
|
81
81
|
Go as Toast,
|
package/dist/bundle.es13.js
CHANGED
|
@@ -1,43 +1,122 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
placeholder:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
1
|
+
import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useFroozeClosing as M } from "./bundle.es47.js";
|
|
3
|
+
import { Popover as j } from "./bundle.es10.js";
|
|
4
|
+
import { useState as q, useRef as h, useMemo as V } from "react";
|
|
5
|
+
import { Icon as g } from "./bundle.es33.js";
|
|
6
|
+
import { attr as i, getActiveElementByAnotherElement as $, contains as B } from "@companix/utils-browser";
|
|
7
|
+
import { mergeRefs as L } from "react-merge-refs";
|
|
8
|
+
import { faXmark as X, faChevronDown as G } from "@companix/icons-solid";
|
|
9
|
+
import { OptionsPopover as H } from "./bundle.es50.js";
|
|
10
|
+
import { matchPattern as J } from "@companix/utils-js";
|
|
11
|
+
const ne = (a) => {
|
|
12
|
+
const {
|
|
13
|
+
closeAfterSelect: v,
|
|
14
|
+
placeholder: C,
|
|
15
|
+
onChange: l,
|
|
16
|
+
onInputChange: x,
|
|
17
|
+
readOnly: c,
|
|
18
|
+
size: N = "md",
|
|
19
|
+
fill: O,
|
|
20
|
+
value: n,
|
|
21
|
+
inputRef: R,
|
|
22
|
+
disabled: u,
|
|
23
|
+
required: A,
|
|
24
|
+
// options popover
|
|
25
|
+
...P
|
|
26
|
+
} = a, [f, b] = q(""), s = h(null), z = h(null), { popoverRef: d, froozePopoverPosition: D, handleAnimationEnd: E } = M(), S = (e) => n.includes(e) ? [...n] : [...n, e], k = (e) => n.filter((t) => e !== t), I = (e, t) => {
|
|
27
|
+
v ? (D(), l(e), t()) : l(e);
|
|
28
|
+
}, w = (e) => {
|
|
29
|
+
if (u) return;
|
|
30
|
+
d.current && d.current.getAttribute("data-state") === "open" && e.preventDefault();
|
|
31
|
+
const t = $(e.currentTarget);
|
|
32
|
+
e.defaultPrevented || B(e.currentTarget, t) || s.current && s.current.focus();
|
|
33
|
+
}, y = (e) => {
|
|
34
|
+
e.target !== s.current && e.preventDefault();
|
|
35
|
+
}, F = (e, t) => {
|
|
36
|
+
e.stopPropagation(), l(k(t));
|
|
37
|
+
}, T = ({ target: e }) => {
|
|
38
|
+
b(e.value), x?.(e.value);
|
|
39
|
+
}, m = V(() => {
|
|
40
|
+
const e = {};
|
|
41
|
+
return (a.options ?? a.defaultOptions ?? []).forEach((r) => {
|
|
42
|
+
e[r.value] = r;
|
|
43
|
+
}), e;
|
|
44
|
+
}, [a.options, a.defaultOptions]);
|
|
45
|
+
return /* @__PURE__ */ o(
|
|
46
|
+
j,
|
|
47
|
+
{
|
|
48
|
+
minimal: !0,
|
|
49
|
+
ref: d,
|
|
50
|
+
sideOffset: 0,
|
|
51
|
+
matchTarget: "width",
|
|
52
|
+
onAnimationEnd: E,
|
|
53
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
54
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
55
|
+
content: ({ close: e }) => /* @__PURE__ */ o(
|
|
56
|
+
H,
|
|
57
|
+
{
|
|
58
|
+
...P,
|
|
59
|
+
isActive: (t) => n.includes(t),
|
|
60
|
+
onSelect: (t) => I(S(t), e),
|
|
61
|
+
disableFiltering: !f.trim(),
|
|
62
|
+
filterOptions: ({ title: t }) => J(t, f),
|
|
63
|
+
onOptionsLoaded: (t) => {
|
|
64
|
+
t.forEach((r) => {
|
|
65
|
+
m[r.value] = r;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
children: /* @__PURE__ */ o(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
className: "form",
|
|
74
|
+
onClick: w,
|
|
75
|
+
onMouseDown: y,
|
|
76
|
+
"data-size": N ?? "md",
|
|
77
|
+
"data-fill": i(O),
|
|
78
|
+
"data-required": i(A),
|
|
79
|
+
"data-disabled": i(u),
|
|
80
|
+
children: /* @__PURE__ */ p("div", { className: "select-tags-container", children: [
|
|
81
|
+
/* @__PURE__ */ p("div", { className: "select-tags", children: [
|
|
82
|
+
n.length > 0 && /* @__PURE__ */ o(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
className: "tag-container",
|
|
86
|
+
ref: z,
|
|
87
|
+
role: "listbox",
|
|
88
|
+
"data-readonly": i(c),
|
|
89
|
+
children: n.map((e, t) => m[e] ? /* @__PURE__ */ p("div", { className: "tag", children: [
|
|
90
|
+
/* @__PURE__ */ o("span", { className: "tag-name", children: m[e].title }),
|
|
91
|
+
/* @__PURE__ */ o("button", { className: "tag-close-button", onClick: (r) => F(r, e), children: /* @__PURE__ */ o(g, { className: "tag-close-icon", icon: X, size: "xxxs" }) })
|
|
92
|
+
] }, `tag-option-${e}-${t}`) : null)
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
(!c || n.length === 0) && /* @__PURE__ */ o(
|
|
96
|
+
"input",
|
|
97
|
+
{
|
|
98
|
+
ref: L([R, s]),
|
|
99
|
+
type: "text",
|
|
100
|
+
autoCapitalize: "none",
|
|
101
|
+
autoComplete: "off",
|
|
102
|
+
autoCorrect: "off",
|
|
103
|
+
className: "form-input",
|
|
104
|
+
spellCheck: !1,
|
|
105
|
+
value: f,
|
|
106
|
+
disabled: u,
|
|
107
|
+
readOnly: c,
|
|
108
|
+
placeholder: C,
|
|
109
|
+
onChange: T
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ o(g, { className: "expand-icon", icon: G, size: "xxxs" })
|
|
114
|
+
] })
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
};
|
|
41
120
|
export {
|
|
42
|
-
|
|
121
|
+
ne as SelectTags
|
|
43
122
|
};
|
package/dist/bundle.es14.js
CHANGED
|
@@ -1,38 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b, useRef as R } from "react";
|
|
3
|
+
import { mergeRefs as c } from "react-merge-refs";
|
|
4
|
+
import { InputElement as x } from "./bundle.es51.js";
|
|
5
|
+
import { InputContainer as I } from "./bundle.es52.js";
|
|
6
|
+
import g from "classnames";
|
|
7
|
+
const N = b(
|
|
8
|
+
({
|
|
9
|
+
onChange: m,
|
|
10
|
+
onValueChange: f,
|
|
11
|
+
readOnly: i,
|
|
12
|
+
inputClassName: o,
|
|
13
|
+
value: p,
|
|
14
|
+
placeholder: n,
|
|
15
|
+
mask: d,
|
|
16
|
+
inputType: s = "text",
|
|
17
|
+
maskChar: u,
|
|
18
|
+
inputRef: a,
|
|
19
|
+
...e
|
|
20
|
+
}, l) => {
|
|
21
|
+
const r = R(null);
|
|
22
|
+
return /* @__PURE__ */ t(I, { ref: l, inputRef: r, ...e, children: /* @__PURE__ */ t(
|
|
23
|
+
x,
|
|
14
24
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
className:
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
e && /* @__PURE__ */ o("div", { className: "option-label", children: e })
|
|
28
|
-
] })
|
|
29
|
-
] }),
|
|
30
|
-
c && !a && /* @__PURE__ */ o("div", { className: "option-check", children: /* @__PURE__ */ o(v, { icon: x }) })
|
|
31
|
-
]
|
|
25
|
+
type: s,
|
|
26
|
+
ref: c([r, a]),
|
|
27
|
+
className: g("form-input form-input-base", o),
|
|
28
|
+
"aria-disabled": e.disabled,
|
|
29
|
+
onChange: m,
|
|
30
|
+
onValueChange: f,
|
|
31
|
+
value: p,
|
|
32
|
+
placeholder: n,
|
|
33
|
+
disabled: e.disabled,
|
|
34
|
+
readOnly: i,
|
|
35
|
+
maskChar: u,
|
|
36
|
+
mask: d
|
|
32
37
|
}
|
|
33
|
-
);
|
|
38
|
+
) });
|
|
34
39
|
}
|
|
35
40
|
);
|
|
36
41
|
export {
|
|
37
|
-
|
|
42
|
+
N as Input
|
|
38
43
|
};
|
package/dist/bundle.es15.js
CHANGED
|
@@ -1,58 +1,38 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
placeholder: u,
|
|
15
|
-
thousandSeparator: a,
|
|
16
|
-
decimalSeparator: p,
|
|
17
|
-
allowedDecimalSeparators: l,
|
|
18
|
-
thousandsGroupStyle: s,
|
|
19
|
-
decimalScale: d,
|
|
20
|
-
fixedDecimalScale: b,
|
|
21
|
-
allowNegative: R = !1,
|
|
22
|
-
allowLeadingZeros: c,
|
|
23
|
-
suffix: g,
|
|
24
|
-
prefix: x,
|
|
25
|
-
inputRef: I,
|
|
26
|
-
...e
|
|
27
|
-
}, N) => {
|
|
28
|
-
const r = w(null);
|
|
29
|
-
return /* @__PURE__ */ t(F, { ref: N, inputRef: r, ...e, children: /* @__PURE__ */ t(
|
|
30
|
-
V,
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import N from "classnames";
|
|
3
|
+
import { Icon as v } from "./bundle.es33.js";
|
|
4
|
+
import { attr as t } from "@companix/utils-browser";
|
|
5
|
+
import { forwardRef as k } from "react";
|
|
6
|
+
import { faCheck as x } from "@companix/icons-solid";
|
|
7
|
+
const O = k(
|
|
8
|
+
({ title: d, icon: n, active: c, label: e, disabled: r, minimal: a, onClick: l, className: m, ...s }, p) => {
|
|
9
|
+
const f = (h) => {
|
|
10
|
+
r || l?.(h);
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ i(
|
|
13
|
+
"div",
|
|
31
14
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className:
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
allowLeadingZeros: c,
|
|
50
|
-
suffix: g,
|
|
51
|
-
prefix: x
|
|
15
|
+
ref: p,
|
|
16
|
+
...s,
|
|
17
|
+
className: N("option", m),
|
|
18
|
+
"data-selected": t(c),
|
|
19
|
+
"data-disabled": t(r),
|
|
20
|
+
"data-minimal": t(a),
|
|
21
|
+
onClick: f,
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ i("div", { className: "option-content", children: [
|
|
24
|
+
n && /* @__PURE__ */ o("div", { className: "option-icon", children: n }),
|
|
25
|
+
/* @__PURE__ */ i("div", { className: "option-content-layout", children: [
|
|
26
|
+
/* @__PURE__ */ o("div", { className: "option-title", children: d }),
|
|
27
|
+
e && /* @__PURE__ */ o("div", { className: "option-label", children: e })
|
|
28
|
+
] })
|
|
29
|
+
] }),
|
|
30
|
+
c && !a && /* @__PURE__ */ o("div", { className: "option-check", children: /* @__PURE__ */ o(v, { icon: x }) })
|
|
31
|
+
]
|
|
52
32
|
}
|
|
53
|
-
)
|
|
33
|
+
);
|
|
54
34
|
}
|
|
55
35
|
);
|
|
56
36
|
export {
|
|
57
|
-
|
|
37
|
+
O as OptionItem
|
|
58
38
|
};
|
package/dist/bundle.es16.js
CHANGED
|
@@ -1,23 +1,58 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import C from "classnames";
|
|
3
|
+
import { forwardRef as j, useRef as w } from "react";
|
|
4
|
+
import { mergeRefs as y } from "react-merge-refs";
|
|
5
|
+
import { InputContainer as F } from "./bundle.es52.js";
|
|
6
|
+
import { NumericFormat as V } from "react-number-format";
|
|
7
|
+
const D = j(
|
|
8
|
+
({
|
|
9
|
+
onChange: m,
|
|
10
|
+
onValueChange: o,
|
|
11
|
+
readOnly: f,
|
|
12
|
+
inputClassName: i,
|
|
13
|
+
value: n,
|
|
14
|
+
placeholder: u,
|
|
15
|
+
thousandSeparator: a,
|
|
16
|
+
decimalSeparator: p,
|
|
17
|
+
allowedDecimalSeparators: l,
|
|
18
|
+
thousandsGroupStyle: s,
|
|
19
|
+
decimalScale: d,
|
|
20
|
+
fixedDecimalScale: b,
|
|
21
|
+
allowNegative: R = !1,
|
|
22
|
+
allowLeadingZeros: c,
|
|
23
|
+
suffix: g,
|
|
24
|
+
prefix: x,
|
|
25
|
+
inputRef: I,
|
|
26
|
+
...e
|
|
27
|
+
}, N) => {
|
|
28
|
+
const r = w(null);
|
|
29
|
+
return /* @__PURE__ */ t(F, { ref: N, inputRef: r, ...e, children: /* @__PURE__ */ t(
|
|
30
|
+
V,
|
|
31
|
+
{
|
|
32
|
+
type: "text",
|
|
33
|
+
getInputRef: y([r, I]),
|
|
34
|
+
className: C("form-input form-input-base", i),
|
|
35
|
+
"aria-disabled": e.disabled,
|
|
36
|
+
onChange: m,
|
|
37
|
+
onValueChange: ({ floatValue: h }) => o?.(h ?? null),
|
|
38
|
+
value: n,
|
|
39
|
+
placeholder: u,
|
|
40
|
+
disabled: e.disabled,
|
|
41
|
+
readOnly: f,
|
|
42
|
+
thousandSeparator: a,
|
|
43
|
+
decimalSeparator: p,
|
|
44
|
+
allowedDecimalSeparators: l,
|
|
45
|
+
thousandsGroupStyle: s,
|
|
46
|
+
decimalScale: d,
|
|
47
|
+
fixedDecimalScale: b,
|
|
48
|
+
allowNegative: R,
|
|
49
|
+
allowLeadingZeros: c,
|
|
50
|
+
suffix: g,
|
|
51
|
+
prefix: x
|
|
52
|
+
}
|
|
53
|
+
) });
|
|
19
54
|
}
|
|
20
55
|
);
|
|
21
56
|
export {
|
|
22
|
-
|
|
57
|
+
D as NumberInput
|
|
23
58
|
};
|
package/dist/bundle.es17.js
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
checked: e,
|
|
22
|
-
onCheckedChange: s,
|
|
23
|
-
disabled: r,
|
|
24
|
-
id: i,
|
|
25
|
-
children: /* @__PURE__ */ o(t.Indicator, { className: "checkbox-icon", children: /* @__PURE__ */ o(h, { icon: l, size: "xxxs" }) })
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
a && /* @__PURE__ */ o("label", { className: "checkbox-label", htmlFor: i, "data-disabled": c(r), children: a })
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
};
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Scrollable as n } from "./bundle.es7.js";
|
|
3
|
+
const s = ({
|
|
4
|
+
children: o,
|
|
5
|
+
maxHeight: t,
|
|
6
|
+
scrollboxRef: i,
|
|
7
|
+
optionsWrapperRef: e
|
|
8
|
+
}) => /* @__PURE__ */ r(
|
|
9
|
+
n,
|
|
10
|
+
{
|
|
11
|
+
ref: i,
|
|
12
|
+
implementation: "inner",
|
|
13
|
+
padding: 10,
|
|
14
|
+
thumbPadding: 3,
|
|
15
|
+
thumbColor: "#0000002b",
|
|
16
|
+
maxHeight: t,
|
|
17
|
+
scrollY: !0,
|
|
18
|
+
children: /* @__PURE__ */ r("div", { className: "option-list", ref: e, children: o })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
33
21
|
export {
|
|
34
|
-
|
|
22
|
+
s as OptionsList
|
|
35
23
|
};
|