@scbt-ecom/ui 0.47.1 → 0.49.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/{index-jk9y4fVq.js → index-BiAdttkO.js} +45 -32
- package/dist/{index-jk9y4fVq.js.map → index-BiAdttkO.js.map} +1 -1
- package/dist/scrollToElement-BjUPRtGF.js +19 -0
- package/dist/scrollToElement-BjUPRtGF.js.map +1 -0
- package/dist/shared/ui/formElements/uncontrolled/uploader/UploaderBase.d.ts +8 -0
- package/dist/shared/ui/formElements/uncontrolled/uploader/model/hooks/useUploader.d.ts +3 -1
- package/dist/shared/ui/formElements/uncontrolled/uploader/ui/UploaderInput.d.ts +2 -0
- package/dist/shared/utils/createPhoneNumber.d.ts +1 -0
- package/dist/shared/utils/index.d.ts +1 -0
- package/dist/ui.js +2 -2
- package/dist/utils.js +10 -9
- package/dist/widget.js +189 -189
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/dist/scrollToElement-B-reg4jF.js +0 -12
- package/dist/scrollToElement-B-reg4jF.js.map +0 -1
- package/dist/widgets/footer/model/helpers.d.ts +0 -1
|
@@ -24234,19 +24234,19 @@ function o3(t, e) {
|
|
|
24234
24234
|
}
|
|
24235
24235
|
function Qy() {
|
|
24236
24236
|
}
|
|
24237
|
-
const s3 = ({ dropzoneOptions: t, controlledFiles: e = [], onChange: n }) => {
|
|
24238
|
-
const [
|
|
24239
|
-
const
|
|
24240
|
-
n && n(
|
|
24241
|
-
},
|
|
24242
|
-
onDrop: (
|
|
24243
|
-
var
|
|
24244
|
-
switch (
|
|
24245
|
-
const
|
|
24246
|
-
|
|
24247
|
-
|
|
24248
|
-
},
|
|
24249
|
-
}), (
|
|
24237
|
+
const s3 = ({ dropzoneOptions: t, controlledFiles: e = [], onChange: n, externalHandlers: r }) => {
|
|
24238
|
+
const [i, o] = Le({}), s = (c) => {
|
|
24239
|
+
const u = e == null ? void 0 : e.filter((d, f) => f !== c);
|
|
24240
|
+
n && n(u);
|
|
24241
|
+
}, l = rE({
|
|
24242
|
+
onDrop: (c, u) => {
|
|
24243
|
+
var f, p;
|
|
24244
|
+
switch (c.forEach((h) => {
|
|
24245
|
+
const m = new FileReader();
|
|
24246
|
+
o((g) => ({ ...g, [h.name]: "loading" })), m.onload = () => {
|
|
24247
|
+
o((g) => ({ ...g, [h.name]: "success" }));
|
|
24248
|
+
}, m.readAsArrayBuffer(h);
|
|
24249
|
+
}), (p = (f = u[0]) == null ? void 0 : f.errors[0]) == null ? void 0 : p.code) {
|
|
24250
24250
|
case gd.FileInvalidType:
|
|
24251
24251
|
sd({
|
|
24252
24252
|
intent: "error",
|
|
@@ -24266,12 +24266,12 @@ const s3 = ({ dropzoneOptions: t, controlledFiles: e = [], onChange: n }) => {
|
|
|
24266
24266
|
});
|
|
24267
24267
|
break;
|
|
24268
24268
|
}
|
|
24269
|
-
const
|
|
24270
|
-
n && n(
|
|
24269
|
+
const d = [...e, ...c];
|
|
24270
|
+
n && n(d), r != null && r.onChange && (r == null || r.onChange(d));
|
|
24271
24271
|
},
|
|
24272
24272
|
...t
|
|
24273
24273
|
});
|
|
24274
|
-
return { filesStatus:
|
|
24274
|
+
return { filesStatus: i, removeFile: s, dropzoneState: l };
|
|
24275
24275
|
}, a3 = (t) => {
|
|
24276
24276
|
const [e, n] = Le(!1), r = Ae(() => {
|
|
24277
24277
|
const { current: i } = t, o = !!i && i.scrollWidth > i.clientWidth;
|
|
@@ -24310,8 +24310,8 @@ const s3 = ({ dropzoneOptions: t, controlledFiles: e = [], onChange: n }) => {
|
|
|
24310
24310
|
l
|
|
24311
24311
|
)) });
|
|
24312
24312
|
}, d3 = lt(
|
|
24313
|
-
({ dropzoneState: t, classes: e, disabled: n, invalid: r, name: i,
|
|
24314
|
-
const
|
|
24313
|
+
({ dropzoneState: t, classes: e, disabled: n, invalid: r, name: i, externalHandlers: o, ...s }, a) => {
|
|
24314
|
+
const l = t.getRootProps();
|
|
24315
24315
|
return /* @__PURE__ */ P.jsxs(
|
|
24316
24316
|
"div",
|
|
24317
24317
|
{
|
|
@@ -24325,8 +24325,8 @@ const s3 = ({ dropzoneOptions: t, controlledFiles: e = [], onChange: n }) => {
|
|
|
24325
24325
|
{ "bg-color-primary-light-default opacity-50": n },
|
|
24326
24326
|
{ "border-negative": r }
|
|
24327
24327
|
),
|
|
24328
|
-
ref:
|
|
24329
|
-
...
|
|
24328
|
+
ref: a,
|
|
24329
|
+
...l,
|
|
24330
24330
|
children: [
|
|
24331
24331
|
/* @__PURE__ */ P.jsxs("div", { className: te("flex h-full w-full items-center justify-center gap-2", e == null ? void 0 : e.textContainer), children: [
|
|
24332
24332
|
/* @__PURE__ */ P.jsx(Ve, { name: "files/upload", className: te("text-icon-primary-default", e == null ? void 0 : e.icon) }),
|
|
@@ -24338,8 +24338,9 @@ const s3 = ({ dropzoneOptions: t, controlledFiles: e = [], onChange: n }) => {
|
|
|
24338
24338
|
/* @__PURE__ */ P.jsx(
|
|
24339
24339
|
"input",
|
|
24340
24340
|
{
|
|
24341
|
-
...
|
|
24341
|
+
...s,
|
|
24342
24342
|
...t.getInputProps(),
|
|
24343
|
+
onClick: o == null ? void 0 : o.onClick,
|
|
24343
24344
|
name: i,
|
|
24344
24345
|
ref: t.inputRef,
|
|
24345
24346
|
disabled: n,
|
|
@@ -24352,26 +24353,38 @@ const s3 = ({ dropzoneOptions: t, controlledFiles: e = [], onChange: n }) => {
|
|
|
24352
24353
|
);
|
|
24353
24354
|
}
|
|
24354
24355
|
), f3 = lt(
|
|
24355
|
-
({
|
|
24356
|
-
|
|
24356
|
+
({
|
|
24357
|
+
classes: t,
|
|
24358
|
+
dropzoneOptions: e = rz,
|
|
24359
|
+
name: n,
|
|
24360
|
+
value: r,
|
|
24361
|
+
disabled: i,
|
|
24362
|
+
invalid: o,
|
|
24363
|
+
onChange: s,
|
|
24364
|
+
externalHandlers: a,
|
|
24365
|
+
...l
|
|
24366
|
+
}, c) => {
|
|
24367
|
+
const { filesStatus: u, removeFile: d, dropzoneState: f } = s3({
|
|
24357
24368
|
controlledFiles: r,
|
|
24358
24369
|
dropzoneOptions: e,
|
|
24359
|
-
onChange: s
|
|
24360
|
-
|
|
24370
|
+
onChange: s,
|
|
24371
|
+
externalHandlers: a
|
|
24372
|
+
}), { root: p, input: h, files: m } = t || {};
|
|
24361
24373
|
return /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
|
|
24362
|
-
/* @__PURE__ */ P.jsx("div", { className: te("relative mb-3 w-[476px]",
|
|
24374
|
+
/* @__PURE__ */ P.jsx("div", { className: te("relative mb-3 w-[476px]", p), children: /* @__PURE__ */ P.jsx(
|
|
24363
24375
|
d3,
|
|
24364
24376
|
{
|
|
24365
|
-
...
|
|
24366
|
-
ref:
|
|
24377
|
+
...l,
|
|
24378
|
+
ref: c,
|
|
24367
24379
|
name: n,
|
|
24368
|
-
classes:
|
|
24380
|
+
classes: h,
|
|
24369
24381
|
disabled: i,
|
|
24370
24382
|
invalid: o,
|
|
24371
|
-
dropzoneState:
|
|
24383
|
+
dropzoneState: f,
|
|
24384
|
+
externalHandlers: a
|
|
24372
24385
|
}
|
|
24373
24386
|
) }),
|
|
24374
|
-
/* @__PURE__ */ P.jsx(u3, { files: r, removeFile:
|
|
24387
|
+
/* @__PURE__ */ P.jsx(u3, { files: r, removeFile: d, classes: m, filesStatus: u })
|
|
24375
24388
|
] });
|
|
24376
24389
|
}
|
|
24377
24390
|
);
|
|
@@ -41804,4 +41817,4 @@ export {
|
|
|
41804
41817
|
m1 as t,
|
|
41805
41818
|
Kh as u
|
|
41806
41819
|
};
|
|
41807
|
-
//# sourceMappingURL=index-
|
|
41820
|
+
//# sourceMappingURL=index-BiAdttkO.js.map
|