@cfx-dev/ui-components 4.2.23 → 4.3.0
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/Combination-CSgOhzm-.js +2198 -0
- package/dist/Combination-N-vN9BB-.js +823 -0
- package/dist/Table.module-DHI1mXN2.js +17 -0
- package/dist/assets/all_css.css +1 -0
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/DataTable.css +1 -0
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-B9nzO6TW.js +98 -0
- package/dist/components/Accordion/Accordion.js +25 -26
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.js +21 -20
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +29 -29
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +83 -81
- package/dist/components/Button/ButtonShowcase.js +2 -2
- package/dist/components/Button/LinkButton.d.ts +1 -1
- package/dist/components/Button/LinkButton.js +18 -17
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +7 -7
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js +154 -242
- package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
- package/dist/components/ControlBox/ControlBox.d.ts +3 -2
- package/dist/components/ControlBox/ControlBox.js +13 -10
- package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
- package/dist/components/CountryFlag/CountryFlag.js +14 -11
- package/dist/components/DataTable/DataTable.d.ts +40 -0
- package/dist/components/DataTable/DataTable.js +163 -0
- package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
- package/dist/components/DataTable/DataTableShowcase.js +60 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +6 -0
- package/dist/components/Decorate/Decorate.d.ts +3 -2
- package/dist/components/Decorate/Decorate.js +19 -15
- package/dist/components/Dot/Dot.d.ts +2 -1
- package/dist/components/Dot/Dot.js +15 -13
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -1
- package/dist/components/Flyout/Flyout.js +22 -20
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/Icon/Icon.js +19 -17
- package/dist/components/IconBig/IconBig.d.ts +2 -1
- package/dist/components/IconBig/IconBig.js +16 -14
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Radio.js +36 -0
- package/dist/components/Icons/cfx-icons/Square.js +15 -9
- package/dist/components/Icons/cfxIcons.d.ts +1 -0
- package/dist/components/Icons/cfxIcons.js +62 -60
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +9 -10
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.d.ts +4 -1
- package/dist/components/Input/Input.js +101 -88
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +37 -34
- package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1723 -625
- package/dist/components/Interactive/Interactive.d.ts +2 -1
- package/dist/components/Interactive/Interactive.js +14 -12
- package/dist/components/Island/Island.d.ts +2 -1
- package/dist/components/Island/Island.js +24 -24
- package/dist/components/Layout/Box/Box.d.ts +8 -2
- package/dist/components/Layout/Box/Box.js +53 -51
- package/dist/components/Layout/Box/Box.types.d.ts +22 -0
- package/dist/components/Layout/Box/Box.types.js +4 -0
- package/dist/components/Layout/Box/index.d.ts +1 -1
- package/dist/components/Layout/Box/index.js +3 -3
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.js +19 -18
- package/dist/components/Layout/Flex/Flex.d.ts +6 -10
- package/dist/components/Layout/Flex/Flex.js +53 -64
- package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
- package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
- package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
- package/dist/components/Layout/Flex/index.d.ts +2 -2
- package/dist/components/Layout/Flex/index.js +8 -8
- package/dist/components/Layout/Page/Page.js +11 -12
- package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Loaf/Loaf.d.ts +2 -1
- package/dist/components/Loaf/Loaf.js +17 -16
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/Modal.js +16 -17
- package/dist/components/Modal/ModalShowcase.js +14 -11
- package/dist/components/NavList/NavList.d.ts +2 -1
- package/dist/components/NavList/NavList.js +19 -18
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.d.ts +4 -2
- package/dist/components/Overlay/Overlay.js +31 -23
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.js +31 -30
- package/dist/components/Popover/PopoverShowcase.js +4 -4
- package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
- package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +666 -1617
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Shroud/Shroud.d.ts +2 -1
- package/dist/components/Shroud/Shroud.js +16 -14
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -27
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/Slider/Slider.js +326 -377
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +109 -155
- package/dist/components/Table/TableBody.d.ts +8 -0
- package/dist/components/Table/TableBody.js +14 -0
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.js +54 -0
- package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
- package/dist/components/Table/TableCellCheckbox.js +20 -0
- package/dist/components/Table/TableHeader.d.ts +9 -0
- package/dist/components/Table/TableHeader.js +24 -0
- package/dist/components/Table/TableIconButton.d.ts +6 -0
- package/dist/components/Table/TableIconButton.js +16 -0
- package/dist/components/Table/TableRoot.d.ts +8 -0
- package/dist/components/Table/TableRoot.js +23 -0
- package/dist/components/Table/TableRow.d.ts +13 -0
- package/dist/components/Table/TableRow.js +46 -0
- package/dist/components/Table/TableShowcase.js +56 -57
- package/dist/components/Table/index.d.ts +20 -2
- package/dist/components/Table/index.js +17 -5
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/Text.d.ts +6 -3
- package/dist/components/Text/Text.js +67 -63
- package/dist/components/Text/TextShowcase.js +40 -33
- package/dist/components/Title/Title.d.ts +3 -1
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-BHuChyf5.js +238 -0
- package/dist/index-Cl_RnsqN.js +386 -0
- package/dist/index-DZEAOJqB.js +53 -0
- package/dist/index-HDl8nGsm.js +70 -0
- package/dist/main.d.ts +7 -5
- package/dist/main.js +181 -179
- package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
- package/dist/styles-scss/global.scss +1 -0
- package/dist/tslib.es6-CtHwNPxX.js +72 -0
- package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/hooks/usePopoverController.d.ts +1 -1
- package/dist/utils/links.js +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +1 -1
- package/dist/utils/ui/ui.d.ts +1 -0
- package/dist/utils/ui/ui.js +45 -36
- package/dist/utils/ui/ui.types.d.ts +4 -0
- package/package.json +6 -5
- package/dist/Combination-Cbiw1XRb.js +0 -792
- package/dist/cfxIcons-BNd1WgpX.js +0 -96
- package/dist/components/Table/Table.d.ts +0 -42
- package/dist/components/Table/Table.js +0 -170
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-AweK2ufS.js +0 -171
- package/dist/index-BlbvKsmN.js +0 -82
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-Bz27DCHt.js +0 -1342
- package/dist/index-Cf5Yu9oD.js +0 -67
- package/dist/tslib.es6-CBKHJX9H.js +0 -151
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Icon as
|
|
4
|
-
import
|
|
5
|
-
import { Indicator as
|
|
6
|
-
import { clsx as
|
|
7
|
-
import { getValue as
|
|
8
|
-
import { ui as
|
|
9
|
-
const
|
|
10
|
-
root:
|
|
1
|
+
import { jsxs as X, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import i from "react";
|
|
3
|
+
import { Icon as $ } from "../Icon/Icon.js";
|
|
4
|
+
import q from "../IconButton/IconButton.js";
|
|
5
|
+
import { Indicator as H } from "../Indicator/Indicator.js";
|
|
6
|
+
import { clsx as C } from "../../utils/clsx.js";
|
|
7
|
+
import { getValue as J } from "../../utils/getValue.js";
|
|
8
|
+
import { ui as L } from "../../utils/ui/ui.js";
|
|
9
|
+
const O = "cfxui__Input__root__6392b", P = "cfxui__Input__input__07830", Q = "cfxui__Input__empty__3b36a", U = "cfxui__Input__placeholderIcon__4d079", Y = "cfxui__Input__decorator__3b81f", Z = "cfxui__Input__small__c1513", ee = "cfxui__Input__large__92d72", le = "cfxui__Input__onlight__7d0b7", l = {
|
|
10
|
+
root: O,
|
|
11
11
|
"full-width": "cfxui__Input__full-width__587b3",
|
|
12
|
-
input:
|
|
13
|
-
empty:
|
|
14
|
-
placeholderIcon:
|
|
15
|
-
decorator:
|
|
16
|
-
small:
|
|
17
|
-
large:
|
|
18
|
-
onlight:
|
|
12
|
+
input: P,
|
|
13
|
+
empty: Q,
|
|
14
|
+
placeholderIcon: U,
|
|
15
|
+
decorator: Y,
|
|
16
|
+
small: Z,
|
|
17
|
+
large: ee,
|
|
18
|
+
onlight: le,
|
|
19
19
|
"backdrop-blur": "cfxui__Input__backdrop-blur__6922f",
|
|
20
20
|
"input-size-initial-large": "cfxui__Input__input-size-initial-large__41d16",
|
|
21
21
|
"input-size-initial-small": "cfxui__Input__input-size-initial-small__5c106",
|
|
@@ -32,100 +32,113 @@ const J = "cfxui__Input__root__6392b", L = "cfxui__Input__input__07830", O = "cf
|
|
|
32
32
|
"input-size-xlarge-large": "cfxui__Input__input-size-xlarge-large__38b57",
|
|
33
33
|
"input-size-xlarge-small": "cfxui__Input__input-size-xlarge-small__00b5b"
|
|
34
34
|
};
|
|
35
|
-
function
|
|
35
|
+
function te(n) {
|
|
36
36
|
const {
|
|
37
|
-
decorator:
|
|
38
|
-
loading:
|
|
39
|
-
type:
|
|
40
|
-
hasValue:
|
|
41
|
-
onCleare:
|
|
42
|
-
} =
|
|
43
|
-
return
|
|
37
|
+
decorator: o,
|
|
38
|
+
loading: p,
|
|
39
|
+
type: a,
|
|
40
|
+
hasValue: _,
|
|
41
|
+
onCleare: u
|
|
42
|
+
} = n;
|
|
43
|
+
return p ? /* @__PURE__ */ t("div", { className: l.decorator, children: /* @__PURE__ */ t(H, {}) }) : o ? /* @__PURE__ */ t("div", { className: l.decorator, children: J(o) }) : a === "search" && _ ? /* @__PURE__ */ t("div", { className: l.decorator, children: /* @__PURE__ */ t(q, { size: "xsmall", areaSize: "large", name: "Close", onClick: u }) }) : null;
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
function ce(n) {
|
|
46
46
|
const {
|
|
47
47
|
id: o,
|
|
48
|
-
fullWidth:
|
|
48
|
+
fullWidth: p = !1,
|
|
49
49
|
value: a,
|
|
50
|
-
onChange:
|
|
51
|
-
onSubmit:
|
|
50
|
+
onChange: _,
|
|
51
|
+
onSubmit: u,
|
|
52
52
|
onKeyDown: d,
|
|
53
53
|
pattern: f,
|
|
54
|
-
tabIndex:
|
|
55
|
-
loading:
|
|
56
|
-
spellCheck:
|
|
57
|
-
autofocus:
|
|
58
|
-
disabled:
|
|
59
|
-
className: v
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, [
|
|
70
|
-
|
|
54
|
+
tabIndex: N,
|
|
55
|
+
loading: y = !1,
|
|
56
|
+
spellCheck: k = !0,
|
|
57
|
+
autofocus: w = !1,
|
|
58
|
+
disabled: R = !1,
|
|
59
|
+
className: v,
|
|
60
|
+
containerClassName: E,
|
|
61
|
+
placeholder: c = "",
|
|
62
|
+
placeholderIcon: m,
|
|
63
|
+
type: x = "text",
|
|
64
|
+
size: V = "normal",
|
|
65
|
+
theme: S = "default",
|
|
66
|
+
decorator: D,
|
|
67
|
+
backdropBlur: F = !1,
|
|
68
|
+
ref: A
|
|
69
|
+
} = n, [g, K] = i.useState(a), I = typeof g < "u" && g !== "" && g !== null || typeof a < "u" && a !== "" && a !== null;
|
|
70
|
+
let z, h, b;
|
|
71
|
+
if (n.type === "number") {
|
|
72
|
+
const {
|
|
73
|
+
min: e,
|
|
74
|
+
max: r,
|
|
75
|
+
step: W
|
|
76
|
+
} = n;
|
|
77
|
+
b = W ?? 1, z = e ?? Number.MIN_SAFE_INTEGER, h = r ?? Number.MAX_SAFE_INTEGER;
|
|
78
|
+
}
|
|
79
|
+
const s = i.useCallback((e) => {
|
|
80
|
+
K(e), _ && _(e);
|
|
81
|
+
}, [_]), M = i.useCallback(
|
|
82
|
+
(e) => {
|
|
71
83
|
const {
|
|
72
|
-
value:
|
|
73
|
-
} =
|
|
84
|
+
value: r
|
|
85
|
+
} = e.target;
|
|
74
86
|
if (f) {
|
|
75
|
-
f.test(
|
|
87
|
+
f.test(r) && s(r);
|
|
76
88
|
return;
|
|
77
89
|
}
|
|
78
|
-
|
|
90
|
+
s(r);
|
|
79
91
|
},
|
|
80
|
-
[
|
|
81
|
-
),
|
|
82
|
-
d && d(
|
|
83
|
-
}, [d,
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
[s, f]
|
|
93
|
+
), j = i.useCallback((e) => {
|
|
94
|
+
d && d(e), u && e.key === "Enter" && u();
|
|
95
|
+
}, [d, u]), B = i.useCallback(() => {
|
|
96
|
+
s("");
|
|
97
|
+
}, [s]), G = C(
|
|
98
|
+
l.root,
|
|
99
|
+
l[S],
|
|
100
|
+
E,
|
|
101
|
+
L.getResponsiveFlatClassnames("input-size", V).map((e) => l[e]),
|
|
90
102
|
{
|
|
91
|
-
[
|
|
92
|
-
[
|
|
93
|
-
[
|
|
103
|
+
[l["full-width"]]: p,
|
|
104
|
+
[l["backdrop-blur"]]: F,
|
|
105
|
+
[l.empty]: !I
|
|
94
106
|
}
|
|
95
|
-
),
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
107
|
+
), T = i.useMemo(() => c ? m ? ` ${c.trim()}` : c.trim() : "", [c, m]);
|
|
108
|
+
return /* @__PURE__ */ X("div", { className: G, children: [
|
|
109
|
+
/* @__PURE__ */ t(
|
|
98
110
|
"input",
|
|
99
111
|
{
|
|
100
112
|
id: o,
|
|
101
|
-
ref:
|
|
102
|
-
type:
|
|
103
|
-
tabIndex:
|
|
104
|
-
autoFocus:
|
|
105
|
-
className:
|
|
113
|
+
ref: A,
|
|
114
|
+
type: x,
|
|
115
|
+
tabIndex: N,
|
|
116
|
+
autoFocus: w,
|
|
117
|
+
className: C(l.input, v),
|
|
106
118
|
value: a,
|
|
107
|
-
placeholder:
|
|
108
|
-
disabled:
|
|
109
|
-
onChange:
|
|
110
|
-
onKeyDown:
|
|
111
|
-
spellCheck:
|
|
112
|
-
min:
|
|
113
|
-
max:
|
|
119
|
+
placeholder: T,
|
|
120
|
+
disabled: R,
|
|
121
|
+
onChange: M,
|
|
122
|
+
onKeyDown: j,
|
|
123
|
+
spellCheck: k,
|
|
124
|
+
min: z,
|
|
125
|
+
max: h,
|
|
126
|
+
step: b
|
|
114
127
|
}
|
|
115
128
|
),
|
|
116
|
-
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
129
|
+
m && /* @__PURE__ */ t($, { name: m, className: l.placeholderIcon }),
|
|
130
|
+
/* @__PURE__ */ t(
|
|
131
|
+
te,
|
|
119
132
|
{
|
|
120
|
-
decorator:
|
|
121
|
-
loading:
|
|
122
|
-
type:
|
|
123
|
-
hasValue:
|
|
124
|
-
onCleare:
|
|
133
|
+
decorator: D,
|
|
134
|
+
loading: y,
|
|
135
|
+
type: x,
|
|
136
|
+
hasValue: I,
|
|
137
|
+
onCleare: B
|
|
125
138
|
}
|
|
126
139
|
)
|
|
127
140
|
] });
|
|
128
|
-
}
|
|
141
|
+
}
|
|
129
142
|
export {
|
|
130
|
-
|
|
143
|
+
ce as default
|
|
131
144
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
|
-
import
|
|
3
|
+
import r from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as a } from "../Text/Text.js";
|
|
5
5
|
import "../../utils/ui/ui.js";
|
|
6
6
|
import c from "./Input.js";
|
|
@@ -12,9 +12,10 @@ export interface RichInputProps {
|
|
|
12
12
|
onKeyDown?(event: React.KeyboardEvent<HTMLInputElement>): void;
|
|
13
13
|
rendered: React.ReactNode;
|
|
14
14
|
className?: string;
|
|
15
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
15
16
|
placeholder?: string;
|
|
16
17
|
autoFocus?: boolean;
|
|
17
18
|
withClearButton?: boolean;
|
|
18
19
|
}
|
|
19
|
-
declare
|
|
20
|
+
declare function RichInput(props: RichInputProps): import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export default RichInput;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as B, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
|
-
import
|
|
4
|
-
import { clsx as
|
|
3
|
+
import D from "../Button/Button.js";
|
|
4
|
+
import { clsx as F } from "../../utils/clsx.js";
|
|
5
|
+
import "../../utils/links.js";
|
|
5
6
|
import { useDynamicRef as _ } from "../../utils/hooks/useDynamicRef.js";
|
|
6
7
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
7
8
|
import "../../utils/hooks/useKeyboardClose.js";
|
|
8
|
-
import "../../index-
|
|
9
|
-
import { ui as
|
|
10
|
-
const
|
|
11
|
-
root:
|
|
12
|
-
renderer:
|
|
13
|
-
clear:
|
|
9
|
+
import "../../index-Cl_RnsqN.js";
|
|
10
|
+
import { ui as L } from "../../utils/ui/ui.js";
|
|
11
|
+
const T = "cfxui__RichInput__root__57e6e", j = "cfxui__RichInput__renderer__8b298", w = "cfxui__RichInput__clear__5538b", c = {
|
|
12
|
+
root: T,
|
|
13
|
+
renderer: j,
|
|
14
|
+
clear: w,
|
|
14
15
|
"richinput-size-initial-large": "cfxui__RichInput__richinput-size-initial-large__cdc8c",
|
|
15
16
|
"richinput-size-initial-small": "cfxui__RichInput__richinput-size-initial-small__c3ec0",
|
|
16
17
|
"richinput-size-small-large": "cfxui__RichInput__richinput-size-small-large__1e06d",
|
|
@@ -25,21 +26,23 @@ const L = "cfxui__RichInput__root__57e6e", T = "cfxui__RichInput__renderer__8b29
|
|
|
25
26
|
"richinput-size-large-small": "cfxui__RichInput__richinput-size-large-small__bd0d0",
|
|
26
27
|
"richinput-size-xlarge-large": "cfxui__RichInput__richinput-size-xlarge-large__ae9e6",
|
|
27
28
|
"richinput-size-xlarge-small": "cfxui__RichInput__richinput-size-xlarge-small__41461"
|
|
28
|
-
}
|
|
29
|
+
};
|
|
30
|
+
function P(o) {
|
|
29
31
|
const {
|
|
30
|
-
size:
|
|
32
|
+
size: m = "normal",
|
|
31
33
|
value: n,
|
|
32
|
-
onChange:
|
|
33
|
-
onFocus:
|
|
34
|
-
onBlur:
|
|
35
|
-
onSelect:
|
|
36
|
-
onKeyDown:
|
|
37
|
-
className:
|
|
38
|
-
rendered:
|
|
39
|
-
placeholder:
|
|
40
|
-
autoFocus:
|
|
41
|
-
withClearButton:
|
|
42
|
-
|
|
34
|
+
onChange: p,
|
|
35
|
+
onFocus: h,
|
|
36
|
+
onBlur: f,
|
|
37
|
+
onSelect: d,
|
|
38
|
+
onKeyDown: g,
|
|
39
|
+
className: z,
|
|
40
|
+
rendered: R,
|
|
41
|
+
placeholder: x,
|
|
42
|
+
autoFocus: I,
|
|
43
|
+
withClearButton: C = !1,
|
|
44
|
+
ref: b
|
|
45
|
+
} = o, u = i.useRef(null), r = i.useRef(null), a = _(p), s = _(d), S = i.useCallback((e) => {
|
|
43
46
|
a.current(e.target.value);
|
|
44
47
|
}, []), k = i.useCallback(() => {
|
|
45
48
|
var e;
|
|
@@ -51,32 +54,32 @@ const L = "cfxui__RichInput__root__57e6e", T = "cfxui__RichInput__renderer__8b29
|
|
|
51
54
|
s.current(t.selectionStart, t.selectionEnd, t.selectionDirection);
|
|
52
55
|
}, []), v = i.useCallback((e) => {
|
|
53
56
|
r.current && (r.current.scrollTop = e.target.scrollTop, r.current.scrollLeft = e.target.scrollLeft);
|
|
54
|
-
}, []),
|
|
57
|
+
}, []), y = F(
|
|
55
58
|
c.root,
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
z,
|
|
60
|
+
L.getResponsiveFlatClassnames("richinput-size", m).map((e) => c[e])
|
|
58
61
|
);
|
|
59
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ B("div", { ref: b, className: y, children: [
|
|
60
63
|
/* @__PURE__ */ l(
|
|
61
64
|
"input",
|
|
62
65
|
{
|
|
63
66
|
ref: u,
|
|
64
|
-
autoFocus:
|
|
67
|
+
autoFocus: I,
|
|
65
68
|
type: "text",
|
|
66
69
|
value: n,
|
|
67
70
|
onChange: S,
|
|
68
|
-
placeholder:
|
|
69
|
-
onBlur:
|
|
70
|
-
onFocus:
|
|
71
|
+
placeholder: x,
|
|
72
|
+
onBlur: f,
|
|
73
|
+
onFocus: h,
|
|
71
74
|
onScroll: v,
|
|
72
75
|
onSelect: N,
|
|
73
|
-
onKeyDown:
|
|
76
|
+
onKeyDown: g
|
|
74
77
|
}
|
|
75
78
|
),
|
|
76
|
-
/* @__PURE__ */ l("div", { ref: r, className: c.renderer, children:
|
|
77
|
-
|
|
79
|
+
/* @__PURE__ */ l("div", { ref: r, className: c.renderer, children: R }),
|
|
80
|
+
C && n && /* @__PURE__ */ l("div", { className: c.clear, children: /* @__PURE__ */ l(D, { icon: "Close", onClick: k }) })
|
|
78
81
|
] });
|
|
79
|
-
}
|
|
82
|
+
}
|
|
80
83
|
export {
|
|
81
84
|
P as default
|
|
82
85
|
};
|
|
@@ -6,7 +6,7 @@ export type FileError = DropzoneFileError;
|
|
|
6
6
|
export type ErrorCode = DropzoneErrorCode;
|
|
7
7
|
export interface FileRejection {
|
|
8
8
|
file: FileWithPath;
|
|
9
|
-
errors: FileError[];
|
|
9
|
+
errors: readonly FileError[];
|
|
10
10
|
}
|
|
11
11
|
export interface InputDropzoneProps extends DropzoneOptions {
|
|
12
12
|
value?: FileWithPath[];
|