ics-ui-kit 0.1.0-alpha.12 → 0.1.0-alpha.13
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/Button-DQtBfU9y.js +57 -0
- package/dist/Button-DQtBfU9y.js.map +1 -0
- package/dist/{Button-DhfE69q0.js → ButtonBase-BEM8SNmT.js} +27 -56
- package/dist/ButtonBase-BEM8SNmT.js.map +1 -0
- package/dist/CarouselItem-pSHe0ufN.js +1500 -0
- package/dist/CarouselItem-pSHe0ufN.js.map +1 -0
- package/dist/CheckboxField-i_-dPpFM.js +370 -0
- package/dist/CheckboxField-i_-dPpFM.js.map +1 -0
- package/dist/Divider-C0Ss5GJT.js +47 -0
- package/dist/{Divider-D3NvaU8c.js.map → Divider-C0Ss5GJT.js.map} +1 -1
- package/dist/Field-3XJNFTql.js +78 -0
- package/dist/Field-3XJNFTql.js.map +1 -0
- package/dist/FieldLabel-CAbVan3E.js +97 -0
- package/dist/FieldLabel-CAbVan3E.js.map +1 -0
- package/dist/FormBody-4HptEjhb.js +103 -0
- package/dist/FormBody-4HptEjhb.js.map +1 -0
- package/dist/{IconButton-BUPs2kEo.js → IconButton-BkBsOIf5.js} +15 -15
- package/dist/{IconButton-BUPs2kEo.js.map → IconButton-BkBsOIf5.js.map} +1 -1
- package/dist/ImagePlaceholder-CNAKQWTh.js +45 -0
- package/dist/ImagePlaceholder-CNAKQWTh.js.map +1 -0
- package/dist/ImagePreview-DHi7A8md.js +156 -0
- package/dist/ImagePreview-DHi7A8md.js.map +1 -0
- package/dist/ImageUploader-46sxdmt5.js +123 -0
- package/dist/ImageUploader-46sxdmt5.js.map +1 -0
- package/dist/IsolatedStylesWrapper-WgaoHh7y.js +179 -0
- package/dist/IsolatedStylesWrapper-WgaoHh7y.js.map +1 -0
- package/dist/Modal-D33MSQot.js +125 -0
- package/dist/Modal-D33MSQot.js.map +1 -0
- package/dist/ScrollShadowContainer-ByNH68Kg.js +636 -0
- package/dist/ScrollShadowContainer-ByNH68Kg.js.map +1 -0
- package/dist/Toggle-7AlEmn8A.js +104 -0
- package/dist/Toggle-7AlEmn8A.js.map +1 -0
- package/dist/ToggleGroup-CT453MNp.js +200 -0
- package/dist/ToggleGroup-CT453MNp.js.map +1 -0
- package/dist/Tooltip-C4BbGF2_.js +372 -0
- package/dist/Tooltip-C4BbGF2_.js.map +1 -0
- package/dist/{bundle-mjs-D6wdQkGI.js → bundle-mjs-LhQum_e3.js} +676 -425
- package/dist/bundle-mjs-LhQum_e3.js.map +1 -0
- package/dist/check-C-TqZgvb.js.map +1 -1
- package/dist/chevron-right-CobOebzi.js.map +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/button/icon-button/IconButton.stories.d.ts +330 -2
- package/dist/components/button/loading-button/LoadingButton.d.ts +249 -0
- package/dist/components/button/loading-button/LoadingButton.stories.d.ts +219 -0
- package/dist/components/button.js +6 -5
- package/dist/components/button.js.map +1 -1
- package/dist/components/carousel.js +65 -1532
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/divider/content-divider/ContentDivider.d.ts +14 -0
- package/dist/components/divider/content-divider/ContentDivider.stories.d.ts +7 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/divider.js +45 -2
- package/dist/components/divider.js.map +1 -1
- package/dist/components/drawer/templates/drawer-footer-template/DrawerFooterTemplate.d.ts +3 -0
- package/dist/components/drawer.js +450 -447
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown.js +37 -33
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +2 -2
- package/dist/components/empty-state.js +1 -1
- package/dist/components/empty-state.js.map +1 -1
- package/dist/components/field/Field.d.ts +35 -0
- package/dist/components/field.js +1 -1
- package/dist/components/form/components/form-header/FormHeader.d.ts +2 -2
- package/dist/components/form.js +289 -288
- package/dist/components/form.js.map +1 -1
- package/dist/components/gallery/Gallery.d.ts +21 -0
- package/dist/components/gallery/Gallery.stories.d.ts +26 -0
- package/dist/components/gallery/index.d.ts +1 -0
- package/dist/components/gallery.d.ts +2 -0
- package/dist/components/gallery.js +130 -0
- package/dist/components/gallery.js.map +1 -0
- package/dist/components/icon-tooltip/IconTooltip.d.ts +2 -1
- package/dist/components/image-placeholder.js +2 -42
- package/dist/components/image-placeholder.js.map +1 -1
- package/dist/components/image-preview/ImagePreview.d.ts +6 -6
- package/dist/components/image-preview.js +2 -136
- package/dist/components/image-preview.js.map +1 -1
- package/dist/components/image-uploader.js +2 -118
- package/dist/components/image-uploader.js.map +1 -1
- package/dist/components/input/file-input/FileInput.d.ts +3 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.js +176 -195
- package/dist/components/input.js.map +1 -1
- package/dist/components/isolated-styles-wrapper/IsolatedStylesWrapper.d.ts +1 -1
- package/dist/components/label/Label.stories.d.ts +0 -2
- package/dist/components/label/field-label/FieldLabel.d.ts +11 -0
- package/dist/components/label/field-label/FieldLabel.stories.d.ts +1 -0
- package/dist/components/label/field-label/components/RequiredIcon.d.ts +5 -0
- package/dist/components/label.js +1 -1
- package/dist/components/loading/Loading.d.ts +4 -4
- package/dist/components/loading.js +2 -2
- package/dist/components/loading.js.map +1 -1
- package/dist/components/modal.js +12 -122
- package/dist/components/modal.js.map +1 -1
- package/dist/components/option-group.js +1 -1
- package/dist/components/popover.js +34 -31
- package/dist/components/popover.js.map +1 -1
- package/dist/components/scheduler.js +11 -11
- package/dist/components/scheduler.js.map +1 -1
- package/dist/components/scroll-shadow-container/ScrollShadowContainer.d.ts +1 -0
- package/dist/components/scroll-shadow-container.js +1 -1
- package/dist/components/select.js +487 -519
- package/dist/components/select.js.map +1 -1
- package/dist/components/shortcut/Shortcut.d.ts +14 -14
- package/dist/components/shortcut/Shortcut.stories.d.ts +7 -7
- package/dist/components/shortcut.js +16 -16
- package/dist/components/shortcut.js.map +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +1 -0
- package/dist/components/skeleton/Skeleton.stories.d.ts +7 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +33 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/switch.js +147 -126
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.js +9 -8
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tag.js +3 -3
- package/dist/components/toast.js +4 -4
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip/Tooltip.stories.d.ts +7 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +8 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/createLucideIcon-DgrNxRV5.js.map +1 -1
- package/dist/design-tokens.source.json +1 -1
- package/dist/download-CVOGyQ0e.js.map +1 -1
- package/dist/downloadFile-yZV-aaO2.js +15 -0
- package/dist/downloadFile-yZV-aaO2.js.map +1 -0
- package/dist/index-B6K06mzp.js +67 -0
- package/dist/index-B6K06mzp.js.map +1 -0
- package/dist/index-BCZIl2rL.js +68 -0
- package/dist/index-BCZIl2rL.js.map +1 -0
- package/dist/index-BZPx6jYI.js.map +1 -1
- package/dist/index-Bj6ZBhqh.js +105 -0
- package/dist/index-Bj6ZBhqh.js.map +1 -0
- package/dist/index-ByaXH_ih.js.map +1 -1
- package/dist/index-CACw01gt.js +702 -0
- package/dist/index-CACw01gt.js.map +1 -0
- package/dist/index-COBL2CQB.js +14 -0
- package/dist/index-COBL2CQB.js.map +1 -0
- package/dist/index-CR-odn5-.js.map +1 -1
- package/dist/{index-BjbwEU_d.js → index-ClwWa5fz.js} +20 -20
- package/dist/index-ClwWa5fz.js.map +1 -0
- package/dist/{index-DwbC6luJ.js → index-Cx4x7Bv2.js} +52 -50
- package/dist/index-Cx4x7Bv2.js.map +1 -0
- package/dist/index-CzNelU6n.js +55 -0
- package/dist/index-CzNelU6n.js.map +1 -0
- package/dist/index-DBsc8nMF.js +43 -0
- package/dist/index-DBsc8nMF.js.map +1 -0
- package/dist/index-Mbnk_gHS.js +102 -0
- package/dist/index-Mbnk_gHS.js.map +1 -0
- package/dist/index-bhXb51Q1.js +215 -0
- package/dist/index-bhXb51Q1.js.map +1 -0
- package/dist/index-n71RB2rx.js +1592 -0
- package/dist/index-n71RB2rx.js.map +1 -0
- package/dist/index-rKs9bXHr.js +7 -0
- package/dist/index-rKs9bXHr.js.map +1 -0
- package/dist/lib/utils/file/downloadFile.d.ts +2 -0
- package/dist/lib/utils/image/imageConverter.d.ts +23 -0
- package/dist/styles-scoped.css +72 -18
- package/dist/styles.css +72 -18
- package/dist/{utils-DGzAmwok.js → utils-BK4mPzkB.js} +2 -2
- package/dist/utils-BK4mPzkB.js.map +1 -0
- package/dist/x-JgjNP5oH.js.map +1 -1
- package/package.json +1 -1
- package/dist/Button-DhfE69q0.js.map +0 -1
- package/dist/CheckboxField-CL1Tc7P4.js +0 -257
- package/dist/CheckboxField-CL1Tc7P4.js.map +0 -1
- package/dist/Divider-D3NvaU8c.js +0 -46
- package/dist/Field-COOo8o9f.js +0 -80
- package/dist/Field-COOo8o9f.js.map +0 -1
- package/dist/FieldLabel-BGxT_RaE.js +0 -64
- package/dist/FieldLabel-BGxT_RaE.js.map +0 -1
- package/dist/FormBody-DM52shm4.js +0 -101
- package/dist/FormBody-DM52shm4.js.map +0 -1
- package/dist/IsolatedStylesWrapper-B_Qu75eR.js +0 -555
- package/dist/IsolatedStylesWrapper-B_Qu75eR.js.map +0 -1
- package/dist/ScrollShadowContainer-DSKr3_fV.js +0 -690
- package/dist/ScrollShadowContainer-DSKr3_fV.js.map +0 -1
- package/dist/Toggle-BuYtICWv.js +0 -129
- package/dist/Toggle-BuYtICWv.js.map +0 -1
- package/dist/ToggleGroup-CMyUAz04.js +0 -467
- package/dist/ToggleGroup-CMyUAz04.js.map +0 -1
- package/dist/bundle-mjs-D6wdQkGI.js.map +0 -1
- package/dist/floating-ui.react-dom-CWfR7VfF.js +0 -1346
- package/dist/floating-ui.react-dom-CWfR7VfF.js.map +0 -1
- package/dist/index-0WznJ1QS.js +0 -276
- package/dist/index-0WznJ1QS.js.map +0 -1
- package/dist/index-BjbwEU_d.js.map +0 -1
- package/dist/index-BqriTm0o.js +0 -47
- package/dist/index-BqriTm0o.js.map +0 -1
- package/dist/index-C6bvrqL8.js +0 -563
- package/dist/index-C6bvrqL8.js.map +0 -1
- package/dist/index-C6t9z3on.js +0 -97
- package/dist/index-C6t9z3on.js.map +0 -1
- package/dist/index-CaQG3DzJ.js +0 -64
- package/dist/index-CaQG3DzJ.js.map +0 -1
- package/dist/index-ChTGHCkY.js +0 -255
- package/dist/index-ChTGHCkY.js.map +0 -1
- package/dist/index-D808y1pT.js +0 -178
- package/dist/index-D808y1pT.js.map +0 -1
- package/dist/index-DE3fiSzl.js +0 -28
- package/dist/index-DE3fiSzl.js.map +0 -1
- package/dist/index-DPws5oAn.js +0 -90
- package/dist/index-DPws5oAn.js.map +0 -1
- package/dist/index-DeUgDpdG.js +0 -80
- package/dist/index-DeUgDpdG.js.map +0 -1
- package/dist/index-DvquTpxI.js +0 -140
- package/dist/index-DvquTpxI.js.map +0 -1
- package/dist/index-DwbC6luJ.js.map +0 -1
- package/dist/index-Ncxt32Wo.js +0 -174
- package/dist/index-Ncxt32Wo.js.map +0 -1
- package/dist/index-U7y6nBZR.js +0 -179
- package/dist/index-U7y6nBZR.js.map +0 -1
- package/dist/index-pysSAa5G.js +0 -57
- package/dist/index-pysSAa5G.js.map +0 -1
- package/dist/tooltip-DI3_ZKNk.js +0 -365
- package/dist/tooltip-DI3_ZKNk.js.map +0 -1
- package/dist/utils-DGzAmwok.js.map +0 -1
- /package/dist/components/{ui/tooltip.d.ts → tooltip/Tooltip.d.ts} +0 -0
package/dist/components/input.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
var ct = Object.defineProperty, ut = Object.defineProperties;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
2
|
+
var pt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var E = Object.getOwnPropertySymbols;
|
|
4
|
+
var P = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var q = (t, e, n) => e in t ? ct(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, f = (t, e) => {
|
|
6
6
|
for (var n in e || (e = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var n of
|
|
10
|
-
|
|
7
|
+
P.call(e, n) && q(t, n, e[n]);
|
|
8
|
+
if (E)
|
|
9
|
+
for (var n of E(e))
|
|
10
|
+
U.call(e, n) && q(t, n, e[n]);
|
|
11
11
|
return t;
|
|
12
|
-
}, W = (t, e) => ut(t,
|
|
13
|
-
var
|
|
12
|
+
}, W = (t, e) => ut(t, pt(e));
|
|
13
|
+
var y = (t, e) => {
|
|
14
14
|
var n = {};
|
|
15
15
|
for (var o in t)
|
|
16
|
-
|
|
17
|
-
if (t != null &&
|
|
18
|
-
for (var o of
|
|
19
|
-
e.indexOf(o) < 0 &&
|
|
16
|
+
P.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]);
|
|
17
|
+
if (t != null && E)
|
|
18
|
+
for (var o of E(t))
|
|
19
|
+
e.indexOf(o) < 0 && U.call(t, o) && (n[o] = t[o]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
import { jsx as a, jsxs as
|
|
23
|
-
import I, { useRef as
|
|
24
|
-
import { u as
|
|
22
|
+
import { jsx as a, jsxs as F } from "react/jsx-runtime";
|
|
23
|
+
import I, { useRef as z, useState as T, useEffect as A, useCallback as m, useMemo as J } from "react";
|
|
24
|
+
import { u as B, a as K, i as lt, b as dt } from "../inputBaseStyles-COdOJhF5.js";
|
|
25
25
|
import { c as x } from "../index-CR-odn5-.js";
|
|
26
|
-
import { I as
|
|
27
|
-
import { c as
|
|
28
|
-
import { C as
|
|
29
|
-
import { t as ht } from "../bundle-mjs-
|
|
30
|
-
import {
|
|
26
|
+
import { I as M } from "../IconButton-BkBsOIf5.js";
|
|
27
|
+
import { c as V } from "../createLucideIcon-DgrNxRV5.js";
|
|
28
|
+
import { C as Q } from "../check-C-TqZgvb.js";
|
|
29
|
+
import { t as ht } from "../bundle-mjs-LhQum_e3.js";
|
|
30
|
+
import { d as ft } from "../downloadFile-yZV-aaO2.js";
|
|
31
31
|
import { D as yt } from "../download-CVOGyQ0e.js";
|
|
32
32
|
/**
|
|
33
33
|
* @license lucide-react v0.460.0 - ISC
|
|
@@ -35,7 +35,7 @@ import { D as yt } from "../download-CVOGyQ0e.js";
|
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
37
|
*/
|
|
38
|
-
const
|
|
38
|
+
const D = V("CircleX", [
|
|
39
39
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
40
40
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
41
41
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
@@ -46,7 +46,7 @@ const j = L("CircleX", [
|
|
|
46
46
|
* This source code is licensed under the ISC license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
48
|
*/
|
|
49
|
-
const
|
|
49
|
+
const Y = V("Copy", [
|
|
50
50
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
51
51
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
52
52
|
]);
|
|
@@ -56,7 +56,7 @@ const P = L("Copy", [
|
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
58
|
*/
|
|
59
|
-
const mt =
|
|
59
|
+
const mt = V("EyeOff", [
|
|
60
60
|
[
|
|
61
61
|
"path",
|
|
62
62
|
{
|
|
@@ -80,7 +80,7 @@ const mt = L("EyeOff", [
|
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
82
|
*/
|
|
83
|
-
const bt =
|
|
83
|
+
const bt = V("Eye", [
|
|
84
84
|
[
|
|
85
85
|
"path",
|
|
86
86
|
{
|
|
@@ -90,15 +90,15 @@ const bt = L("Eye", [
|
|
|
90
90
|
],
|
|
91
91
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
92
92
|
]), gt = x({
|
|
93
|
-
extend:
|
|
93
|
+
extend: lt,
|
|
94
94
|
base: "h-10 lg:h-9"
|
|
95
|
-
}),
|
|
95
|
+
}), Z = I.forwardRef(
|
|
96
96
|
(r, s) => {
|
|
97
|
-
var c = r, { type: t = "text", className: e, error: n } = c, o =
|
|
98
|
-
const i =
|
|
99
|
-
return
|
|
97
|
+
var c = r, { type: t = "text", className: e, error: n } = c, o = y(c, ["type", "className", "error"]);
|
|
98
|
+
const i = z(null), u = B(i, s);
|
|
99
|
+
return K(i, n), /* @__PURE__ */ a(
|
|
100
100
|
"input",
|
|
101
|
-
|
|
101
|
+
f({
|
|
102
102
|
type: t,
|
|
103
103
|
className: gt({ className: e }),
|
|
104
104
|
ref: u,
|
|
@@ -107,7 +107,7 @@ const bt = L("Eye", [
|
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
|
-
|
|
110
|
+
Z.displayName = "Input";
|
|
111
111
|
const wt = x({
|
|
112
112
|
extend: dt,
|
|
113
113
|
base: [
|
|
@@ -135,24 +135,24 @@ const wt = x({
|
|
|
135
135
|
"has-[input[aria-invalid=true]]:has-[input:focus]:border-status-error-secondary-border",
|
|
136
136
|
"has-[input[aria-invalid=true]]:has-[input:focus]:shadow-focus-error"
|
|
137
137
|
]
|
|
138
|
-
}),
|
|
139
|
-
var r = s, { className: t, children: e } = r, n =
|
|
138
|
+
}), j = I.forwardRef((s, o) => {
|
|
139
|
+
var r = s, { className: t, children: e } = r, n = y(r, ["className", "children"]);
|
|
140
140
|
const c = wt({ className: t });
|
|
141
|
-
return /* @__PURE__ */ a("div", W(
|
|
141
|
+
return /* @__PURE__ */ a("div", W(f({ ref: o, className: c }, n), { children: e }));
|
|
142
142
|
});
|
|
143
|
-
|
|
143
|
+
j.displayName = "InputGroup";
|
|
144
144
|
const vt = x({
|
|
145
145
|
base: [
|
|
146
146
|
"min-w-5 flex-1 bg-transparent px-3 py-2.5 lg:py-2",
|
|
147
147
|
"outline-none placeholder:text-muted focus:outline-none"
|
|
148
148
|
]
|
|
149
|
-
}),
|
|
149
|
+
}), $ = I.forwardRef(
|
|
150
150
|
(s, o) => {
|
|
151
|
-
var r = s, { className: t, error: e } = r, n =
|
|
152
|
-
const c = vt({ className: t }), i =
|
|
153
|
-
return
|
|
151
|
+
var r = s, { className: t, error: e } = r, n = y(r, ["className", "error"]);
|
|
152
|
+
const c = vt({ className: t }), i = z(null), u = B(i, o);
|
|
153
|
+
return K(i, e), /* @__PURE__ */ a(
|
|
154
154
|
"input",
|
|
155
|
-
|
|
155
|
+
f({
|
|
156
156
|
ref: u,
|
|
157
157
|
className: c,
|
|
158
158
|
"aria-invalid": !!e,
|
|
@@ -161,28 +161,28 @@ const vt = x({
|
|
|
161
161
|
);
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
|
-
|
|
164
|
+
$.displayName = "InputGroup.Input";
|
|
165
165
|
const xt = x({
|
|
166
166
|
base: [
|
|
167
167
|
"flex h-full items-center border-l border-secondary-border px-3 text-secondary-fg first:border-l-0",
|
|
168
168
|
// Правая граница, если следующий элемент НЕ InputGroupText
|
|
169
169
|
"[&[data-input-group-element='text']:has(+_:not([data-input-group-element='text']))]:border-r"
|
|
170
170
|
]
|
|
171
|
-
}),
|
|
172
|
-
var s = o, { className: t } = s, e =
|
|
171
|
+
}), L = I.forwardRef((o, n) => {
|
|
172
|
+
var s = o, { className: t } = s, e = y(s, ["className"]);
|
|
173
173
|
const r = xt({ className: t });
|
|
174
|
-
return /* @__PURE__ */ a("div",
|
|
174
|
+
return /* @__PURE__ */ a("div", f({ ref: n, className: r, "data-input-group-element": "text" }, e));
|
|
175
175
|
});
|
|
176
|
-
|
|
177
|
-
const
|
|
176
|
+
L.displayName = "InputGroup.Text";
|
|
177
|
+
const It = x({
|
|
178
178
|
base: ["aspect-auto h-full px-1.5 py-2.5 first:pl-2.5 last:pr-2.5 lg:py-2"]
|
|
179
|
-
}),
|
|
179
|
+
}), k = I.forwardRef(
|
|
180
180
|
(s, o) => {
|
|
181
|
-
var r = s, { icon: t, className: e } = r, n =
|
|
182
|
-
const c =
|
|
181
|
+
var r = s, { icon: t, className: e } = r, n = y(r, ["icon", "className"]);
|
|
182
|
+
const c = It({ className: e });
|
|
183
183
|
return /* @__PURE__ */ a(
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
M,
|
|
185
|
+
f({
|
|
186
186
|
ref: o,
|
|
187
187
|
icon: t,
|
|
188
188
|
className: c,
|
|
@@ -193,21 +193,21 @@ const Ct = x({
|
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
195
|
);
|
|
196
|
-
|
|
197
|
-
function
|
|
196
|
+
k.displayName = "InputGroup.Button";
|
|
197
|
+
function Ct(t, e, n) {
|
|
198
198
|
const [o, s] = T(
|
|
199
199
|
typeof e == "string" ? e : String(e != null ? e : "")
|
|
200
|
-
), r =
|
|
201
|
-
|
|
200
|
+
), r = z(null);
|
|
201
|
+
A(() => {
|
|
202
202
|
if (t !== void 0) return;
|
|
203
203
|
const u = r.current;
|
|
204
204
|
if (!u) return;
|
|
205
|
-
const
|
|
205
|
+
const d = () => {
|
|
206
206
|
s(u.value);
|
|
207
207
|
};
|
|
208
|
-
return u.addEventListener("input",
|
|
208
|
+
return u.addEventListener("input", d), () => u.removeEventListener("input", d);
|
|
209
209
|
}, [t, r]);
|
|
210
|
-
const c =
|
|
210
|
+
const c = m(() => t !== void 0 ? String(t) : o, [t, o]), i = m(
|
|
211
211
|
(u) => {
|
|
212
212
|
n == null || n(u.target.value);
|
|
213
213
|
},
|
|
@@ -222,14 +222,14 @@ function It(t, e, n) {
|
|
|
222
222
|
}
|
|
223
223
|
function Nt() {
|
|
224
224
|
const [t, e] = T(!1);
|
|
225
|
-
|
|
225
|
+
A(() => {
|
|
226
226
|
if (!t) return;
|
|
227
227
|
const o = setTimeout(() => {
|
|
228
228
|
e(!1);
|
|
229
229
|
}, 2e3);
|
|
230
230
|
return () => clearTimeout(o);
|
|
231
231
|
}, [t]);
|
|
232
|
-
const n =
|
|
232
|
+
const n = m((o) => {
|
|
233
233
|
o && (navigator.clipboard.writeText(o), e(!0));
|
|
234
234
|
}, []);
|
|
235
235
|
return {
|
|
@@ -237,7 +237,7 @@ function Nt() {
|
|
|
237
237
|
handleCopy: n
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function O({
|
|
241
241
|
value: t,
|
|
242
242
|
defaultValue: e,
|
|
243
243
|
onChange: n,
|
|
@@ -246,44 +246,44 @@ function $({
|
|
|
246
246
|
showClearIcon: r = !1,
|
|
247
247
|
showCopyIcon: c = !1
|
|
248
248
|
}) {
|
|
249
|
-
const i =
|
|
249
|
+
const i = Ct(t, e, n), u = Nt(), d = J(() => !o && !s, [o, s]), C = m(() => {
|
|
250
250
|
t !== void 0 ? n == null || n("") : i.inputRef.current && (i.inputRef.current.value = "", i.inputRef.current.dispatchEvent(new Event("input", { bubbles: !0 })));
|
|
251
|
-
}, [n, t, i.inputRef]),
|
|
251
|
+
}, [n, t, i.inputRef]), N = m(() => {
|
|
252
252
|
u.handleCopy(String(i.currentValue));
|
|
253
|
-
}, [u.handleCopy, i.currentValue]), G = r &&
|
|
253
|
+
}, [u.handleCopy, i.currentValue]), G = r && d && i.currentValue, b = c && i.currentValue;
|
|
254
254
|
return {
|
|
255
255
|
// Значения и состояние
|
|
256
256
|
currentValue: i.currentValue,
|
|
257
257
|
inputRef: i.inputRef,
|
|
258
|
-
isEditable:
|
|
258
|
+
isEditable: d,
|
|
259
259
|
// Обработчики
|
|
260
260
|
handleChange: i.handleChange,
|
|
261
|
-
handleClear:
|
|
262
|
-
handleCopy:
|
|
261
|
+
handleClear: C,
|
|
262
|
+
handleCopy: N,
|
|
263
263
|
// Состояние копирования
|
|
264
264
|
hasCopied: u.hasCopied,
|
|
265
265
|
// Флаги видимости кнопок
|
|
266
266
|
shouldShowClearIcon: G,
|
|
267
|
-
shouldShowCopyIcon:
|
|
267
|
+
shouldShowCopyIcon: b
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
const tt = ({ onClear: t, className: e }) => /* @__PURE__ */ a(
|
|
270
|
+
const tt = ({ onClear: t, className: e }) => /* @__PURE__ */ a(M, { icon: D, variant: "text", size: "md", onClick: t, className: e });
|
|
271
271
|
tt.displayName = "ClearButton";
|
|
272
272
|
const St = ({ value: t, className: e }) => {
|
|
273
273
|
const [n, o] = T(!1);
|
|
274
|
-
|
|
274
|
+
A(() => {
|
|
275
275
|
const r = setTimeout(() => {
|
|
276
276
|
o(!1);
|
|
277
277
|
}, 2e3);
|
|
278
278
|
return () => clearTimeout(r);
|
|
279
279
|
}, [n]);
|
|
280
|
-
const s =
|
|
280
|
+
const s = m(() => {
|
|
281
281
|
t && navigator.clipboard.writeText(String(t)), o(!0);
|
|
282
282
|
}, [t]);
|
|
283
283
|
return /* @__PURE__ */ a(
|
|
284
|
-
|
|
284
|
+
M,
|
|
285
285
|
{
|
|
286
|
-
icon: n ?
|
|
286
|
+
icon: n ? Q : Y,
|
|
287
287
|
className: e,
|
|
288
288
|
variant: "text",
|
|
289
289
|
size: "md",
|
|
@@ -309,8 +309,8 @@ const St = ({ value: t, className: e }) => {
|
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
}), et = I.forwardRef(
|
|
312
|
-
(G,
|
|
313
|
-
var
|
|
312
|
+
(G, N) => {
|
|
313
|
+
var b = G, {
|
|
314
314
|
startIcon: t,
|
|
315
315
|
showClearIcon: e,
|
|
316
316
|
showCopyIcon: n,
|
|
@@ -320,8 +320,8 @@ const St = ({ value: t, className: e }) => {
|
|
|
320
320
|
defaultValue: c,
|
|
321
321
|
onChange: i,
|
|
322
322
|
readOnly: u,
|
|
323
|
-
disabled:
|
|
324
|
-
} =
|
|
323
|
+
disabled: d
|
|
324
|
+
} = b, C = y(b, [
|
|
325
325
|
"startIcon",
|
|
326
326
|
"showClearIcon",
|
|
327
327
|
"showCopyIcon",
|
|
@@ -333,36 +333,36 @@ const St = ({ value: t, className: e }) => {
|
|
|
333
333
|
"readOnly",
|
|
334
334
|
"disabled"
|
|
335
335
|
]);
|
|
336
|
-
const
|
|
336
|
+
const p = O({
|
|
337
337
|
value: r,
|
|
338
338
|
defaultValue: c,
|
|
339
339
|
onChange: i,
|
|
340
340
|
readOnly: u,
|
|
341
|
-
disabled:
|
|
341
|
+
disabled: d,
|
|
342
342
|
showClearIcon: e,
|
|
343
343
|
showCopyIcon: n
|
|
344
|
-
}),
|
|
345
|
-
const
|
|
346
|
-
return
|
|
347
|
-
}, [
|
|
348
|
-
return /* @__PURE__ */
|
|
349
|
-
t && /* @__PURE__ */ a("span", { className: ht(
|
|
344
|
+
}), l = B(N, p.inputRef), R = !!t, S = J(() => {
|
|
345
|
+
const w = [p.shouldShowClearIcon, p.shouldShowCopyIcon, o].filter(Boolean);
|
|
346
|
+
return w.length === 0 ? void 0 : w.length;
|
|
347
|
+
}, [p.shouldShowClearIcon, p.shouldShowCopyIcon, o]), g = Rt({ hasStartIcon: R, endIconsCount: S });
|
|
348
|
+
return /* @__PURE__ */ F("div", { className: g.base(), children: [
|
|
349
|
+
t && /* @__PURE__ */ a("span", { className: ht(g.startIconWrapper(), g.icon()), children: t }),
|
|
350
350
|
/* @__PURE__ */ a(
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
ref:
|
|
351
|
+
Z,
|
|
352
|
+
f({
|
|
353
|
+
ref: l,
|
|
354
354
|
value: r,
|
|
355
355
|
defaultValue: c,
|
|
356
|
-
className:
|
|
357
|
-
onChange:
|
|
356
|
+
className: g.input({ className: s }),
|
|
357
|
+
onChange: p.handleChange,
|
|
358
358
|
readOnly: u,
|
|
359
|
-
disabled:
|
|
360
|
-
},
|
|
359
|
+
disabled: d
|
|
360
|
+
}, C)
|
|
361
361
|
),
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
o && /* @__PURE__ */ a("div", { className:
|
|
362
|
+
S && /* @__PURE__ */ F("div", { className: g.endIconsWrapper(), children: [
|
|
363
|
+
p.shouldShowClearIcon && /* @__PURE__ */ a(tt, { onClear: p.handleClear, className: g.endAction() }),
|
|
364
|
+
p.shouldShowCopyIcon && /* @__PURE__ */ a(St, { value: String(p.currentValue), className: g.endAction() }),
|
|
365
|
+
o && /* @__PURE__ */ a("div", { className: g.icon(), children: o })
|
|
366
366
|
] })
|
|
367
367
|
] });
|
|
368
368
|
}
|
|
@@ -373,9 +373,9 @@ const kt = x({
|
|
|
373
373
|
slots: {
|
|
374
374
|
action: "opacity-0 group-focus-within:opacity-100 group-hover:opacity-100"
|
|
375
375
|
}
|
|
376
|
-
}),
|
|
377
|
-
(G,
|
|
378
|
-
var
|
|
376
|
+
}), Tt = I.forwardRef(
|
|
377
|
+
(G, N) => {
|
|
378
|
+
var b = G, {
|
|
379
379
|
startContent: t = "https://",
|
|
380
380
|
showClearIcon: e = !0,
|
|
381
381
|
showCopyIcon: n = !0,
|
|
@@ -385,8 +385,8 @@ const kt = x({
|
|
|
385
385
|
readOnly: c,
|
|
386
386
|
disabled: i,
|
|
387
387
|
error: u,
|
|
388
|
-
className:
|
|
389
|
-
} =
|
|
388
|
+
className: d
|
|
389
|
+
} = b, C = y(b, [
|
|
390
390
|
"startContent",
|
|
391
391
|
"showClearIcon",
|
|
392
392
|
"showCopyIcon",
|
|
@@ -398,7 +398,7 @@ const kt = x({
|
|
|
398
398
|
"error",
|
|
399
399
|
"className"
|
|
400
400
|
]);
|
|
401
|
-
const
|
|
401
|
+
const p = kt(), l = O({
|
|
402
402
|
value: o,
|
|
403
403
|
defaultValue: s,
|
|
404
404
|
onChange: r,
|
|
@@ -406,54 +406,53 @@ const kt = x({
|
|
|
406
406
|
disabled: i,
|
|
407
407
|
showClearIcon: e,
|
|
408
408
|
showCopyIcon: n
|
|
409
|
-
}),
|
|
410
|
-
return /* @__PURE__ */
|
|
411
|
-
t != null && /* @__PURE__ */ a(
|
|
409
|
+
}), R = B(N, l.inputRef);
|
|
410
|
+
return /* @__PURE__ */ F(j, { className: p.base({ className: d }), children: [
|
|
411
|
+
t != null && /* @__PURE__ */ a(L, { children: t }),
|
|
412
412
|
/* @__PURE__ */ a(
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
ref:
|
|
413
|
+
$,
|
|
414
|
+
f({
|
|
415
|
+
ref: R,
|
|
416
416
|
value: o,
|
|
417
417
|
defaultValue: s,
|
|
418
|
-
onChange:
|
|
418
|
+
onChange: l.handleChange,
|
|
419
419
|
readOnly: c,
|
|
420
420
|
disabled: i,
|
|
421
421
|
error: u
|
|
422
|
-
},
|
|
422
|
+
}, C)
|
|
423
423
|
),
|
|
424
|
-
|
|
425
|
-
|
|
424
|
+
l.shouldShowClearIcon && /* @__PURE__ */ a(
|
|
425
|
+
k,
|
|
426
426
|
{
|
|
427
|
-
icon:
|
|
428
|
-
onClick:
|
|
427
|
+
icon: D,
|
|
428
|
+
onClick: l.handleClear,
|
|
429
429
|
type: "button",
|
|
430
|
-
className:
|
|
430
|
+
className: p.action()
|
|
431
431
|
}
|
|
432
432
|
),
|
|
433
|
-
|
|
434
|
-
|
|
433
|
+
l.shouldShowCopyIcon && /* @__PURE__ */ a(
|
|
434
|
+
k,
|
|
435
435
|
{
|
|
436
|
-
icon:
|
|
437
|
-
onClick:
|
|
436
|
+
icon: l.hasCopied ? Q : Y,
|
|
437
|
+
onClick: l.handleCopy,
|
|
438
438
|
type: "button",
|
|
439
|
-
className:
|
|
439
|
+
className: p.action()
|
|
440
440
|
}
|
|
441
441
|
)
|
|
442
442
|
] });
|
|
443
443
|
}
|
|
444
444
|
);
|
|
445
|
-
|
|
446
|
-
const
|
|
447
|
-
base: "group",
|
|
445
|
+
Tt.displayName = "WebInput";
|
|
446
|
+
const Bt = x({
|
|
447
|
+
base: "group cursor-pointer",
|
|
448
448
|
slots: {
|
|
449
|
-
fileButton: "h-full rounded-r-none border-0 border-r",
|
|
450
449
|
action: "opacity-0 group-focus-within:opacity-100 group-hover:opacity-100",
|
|
451
450
|
fileDisplay: "min-w-0 flex-1 truncate bg-transparent px-3 py-2.5 italic text-primary-fg lg:py-2",
|
|
452
451
|
placeholder: "text-muted"
|
|
453
452
|
}
|
|
454
|
-
}),
|
|
455
|
-
(G,
|
|
456
|
-
var
|
|
453
|
+
}), Gt = I.forwardRef(
|
|
454
|
+
(G, N) => {
|
|
455
|
+
var b = G, {
|
|
457
456
|
value: t,
|
|
458
457
|
defaultValue: e,
|
|
459
458
|
showClearIcon: n = !0,
|
|
@@ -463,8 +462,8 @@ const Tt = x({
|
|
|
463
462
|
className: c,
|
|
464
463
|
placeholder: i = "File not selected",
|
|
465
464
|
chooseButtonText: u = "Choose file",
|
|
466
|
-
accept:
|
|
467
|
-
} =
|
|
465
|
+
accept: d
|
|
466
|
+
} = b, C = y(b, [
|
|
468
467
|
"value",
|
|
469
468
|
"defaultValue",
|
|
470
469
|
"showClearIcon",
|
|
@@ -476,95 +475,77 @@ const Tt = x({
|
|
|
476
475
|
"chooseButtonText",
|
|
477
476
|
"accept"
|
|
478
477
|
]);
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
!
|
|
482
|
-
}, [e,
|
|
483
|
-
const nt =
|
|
484
|
-
(
|
|
485
|
-
var
|
|
486
|
-
const
|
|
487
|
-
|
|
478
|
+
const p = Bt(), l = z(null), [R, S] = T(e || null), g = B(N, l), w = t !== void 0, v = w ? t : R;
|
|
479
|
+
A(() => {
|
|
480
|
+
!w && e !== void 0 && S(e);
|
|
481
|
+
}, [e, w]);
|
|
482
|
+
const nt = m(
|
|
483
|
+
(h) => {
|
|
484
|
+
var X;
|
|
485
|
+
const H = ((X = h.target.files) == null ? void 0 : X[0]) || null;
|
|
486
|
+
w || S(H), o == null || o(H);
|
|
488
487
|
},
|
|
489
|
-
[o,
|
|
490
|
-
), ot =
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
}, [h]), at = n && h && !s, it = h && (h instanceof File || !(h instanceof File) && h.url), U = ((p) => p ? (p instanceof File, p.name) : null)(h);
|
|
506
|
-
return /* @__PURE__ */ z(D, { className: l.base({ className: c }), children: [
|
|
507
|
-
/* @__PURE__ */ a(
|
|
508
|
-
ft,
|
|
509
|
-
{
|
|
510
|
-
variant: "outline",
|
|
511
|
-
size: "md",
|
|
512
|
-
onClick: rt,
|
|
513
|
-
disabled: s,
|
|
514
|
-
type: "button",
|
|
515
|
-
className: l.fileButton(),
|
|
516
|
-
children: u
|
|
517
|
-
}
|
|
518
|
-
),
|
|
519
|
-
/* @__PURE__ */ a("div", { className: l.fileDisplay(), children: U ? /* @__PURE__ */ a("span", { children: U }) : /* @__PURE__ */ a("span", { className: l.placeholder(), children: i }) }),
|
|
520
|
-
at && /* @__PURE__ */ a(B, { icon: j, onClick: ot, type: "button", className: l.action() }),
|
|
488
|
+
[o, w]
|
|
489
|
+
), ot = m(
|
|
490
|
+
(h) => {
|
|
491
|
+
h.stopPropagation(), l.current && (l.current.value = ""), w || S(null), o == null || o(null);
|
|
492
|
+
},
|
|
493
|
+
[o, w]
|
|
494
|
+
), rt = m(() => {
|
|
495
|
+
var h;
|
|
496
|
+
v || (h = l.current) == null || h.click();
|
|
497
|
+
}, [v]), st = m(() => ft(v), [v]), at = n && v && !s, it = v && (v instanceof File || !(v instanceof File) && v.url), _ = ((h) => h ? (h instanceof File, h.name) : null)(v);
|
|
498
|
+
return /* @__PURE__ */ F(j, { className: p.base({ className: c }), onClick: rt, children: [
|
|
499
|
+
/* @__PURE__ */ a(L, { children: u }),
|
|
500
|
+
/* @__PURE__ */ a("div", { className: p.fileDisplay(), children: _ ? /* @__PURE__ */ a("span", { children: _ }) : /* @__PURE__ */ a("span", { className: p.placeholder(), children: i }) }),
|
|
501
|
+
at && /* @__PURE__ */ a(k, { icon: D, onClick: ot, type: "button", className: p.action() }),
|
|
521
502
|
it && /* @__PURE__ */ a(
|
|
522
|
-
|
|
503
|
+
k,
|
|
523
504
|
{
|
|
524
505
|
icon: yt,
|
|
525
506
|
onClick: st,
|
|
526
507
|
type: "button",
|
|
527
|
-
className:
|
|
508
|
+
className: p.action()
|
|
528
509
|
}
|
|
529
510
|
),
|
|
530
511
|
/* @__PURE__ */ a(
|
|
531
512
|
"input",
|
|
532
|
-
|
|
533
|
-
ref:
|
|
513
|
+
f({
|
|
514
|
+
ref: g,
|
|
534
515
|
type: "file",
|
|
535
516
|
onChange: nt,
|
|
536
517
|
disabled: s,
|
|
537
|
-
accept:
|
|
518
|
+
accept: d,
|
|
538
519
|
className: "sr-only",
|
|
539
520
|
"aria-invalid": !!r
|
|
540
|
-
},
|
|
521
|
+
}, C)
|
|
541
522
|
)
|
|
542
523
|
] });
|
|
543
524
|
}
|
|
544
525
|
);
|
|
545
|
-
|
|
546
|
-
const
|
|
526
|
+
Gt.displayName = "FileInput";
|
|
527
|
+
const Et = x({
|
|
547
528
|
base: "aspect-auto px-1.5"
|
|
548
529
|
}), Ft = (o) => {
|
|
549
|
-
var s = o, { icon: t, className: e } = s, n =
|
|
550
|
-
const r =
|
|
551
|
-
return /* @__PURE__ */ a(
|
|
552
|
-
}, zt = ({ type: t, onClick: e }) => /* @__PURE__ */ a(Ft, { icon: t === "password" ? bt : mt, onClick: e }),
|
|
553
|
-
var t =
|
|
554
|
-
const [n, o] = T("password"), s =
|
|
530
|
+
var s = o, { icon: t, className: e } = s, n = y(s, ["icon", "className"]);
|
|
531
|
+
const r = Et({ className: e });
|
|
532
|
+
return /* @__PURE__ */ a(M, f({ icon: t, className: r, variant: "text", size: "md" }, n));
|
|
533
|
+
}, zt = ({ type: t, onClick: e }) => /* @__PURE__ */ a(Ft, { icon: t === "password" ? bt : mt, onClick: e }), Ut = (e) => {
|
|
534
|
+
var t = y(e, []);
|
|
535
|
+
const [n, o] = T("password"), s = m(() => {
|
|
555
536
|
o((c) => c === "password" ? "text" : "password");
|
|
556
537
|
}, []), r = /* @__PURE__ */ a(zt, { type: n, onClick: s });
|
|
557
|
-
return /* @__PURE__ */ a(et, W(
|
|
538
|
+
return /* @__PURE__ */ a(et, W(f({}, t), { type: n, endIcon: r }));
|
|
558
539
|
};
|
|
559
540
|
export {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
541
|
+
Gt as FileInput,
|
|
542
|
+
Z as Input,
|
|
543
|
+
j as InputGroup,
|
|
544
|
+
k as InputGroupButton,
|
|
545
|
+
$ as InputGroupInput,
|
|
546
|
+
L as InputGroupText,
|
|
547
|
+
Ut as SecretInput,
|
|
567
548
|
et as TextInput,
|
|
568
|
-
|
|
549
|
+
Tt as WebInput
|
|
569
550
|
};
|
|
570
551
|
//# sourceMappingURL=input.js.map
|