@dgshahr/ui-kit 0.0.81 → 0.0.83
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/Accordion/{index.js → index.mjs} +1 -1
- package/dist/{AccordionItem-DhYhZ3vW.js → AccordionItem-DgUiBBfR.js} +1 -1
- package/dist/Alert/{index.js → index.mjs} +1 -1
- package/dist/Chip/{index.js → index.mjs} +1 -1
- package/dist/FieldBottomInfo-7YeZbp0-.cjs +1 -0
- package/dist/FieldBottomInfo-B1n-gK3T.js +78 -0
- package/dist/Form/Datepicker/Footer.d.ts.map +1 -1
- package/dist/Form/Datepicker/index.cjs +1 -1
- package/dist/Form/Datepicker/{index.js → index.mjs} +4 -2
- package/dist/Form/FileUploader/index.cjs +1 -0
- package/dist/Form/FileUploader/index.d.ts +3 -1
- package/dist/Form/FileUploader/index.d.ts.map +1 -1
- package/dist/{index.js → Form/FileUploader/index.mjs} +147 -192
- package/dist/Form/Input/index.cjs +1 -1
- package/dist/{index-CXKbrGQV.js → Form/Input/index.mjs} +38 -64
- package/dist/Form/OtpInput/index.cjs +1 -1
- package/dist/Form/OtpInput/{index.js → index.mjs} +23 -22
- package/dist/Form/Select/index.cjs +1 -1
- package/dist/Form/Select/{index.js → index.mjs} +4 -4
- package/dist/Form/Textarea/index.cjs +1 -1
- package/dist/Form/Textarea/{index.js → index.mjs} +1 -1
- package/dist/IconEye-DATABBb3.js +31 -0
- package/dist/IconEye-sBk4Mro2.cjs +1 -0
- package/dist/Pagination/{index.js → index.mjs} +1 -1
- package/dist/PickerWrapper-CoDy6coa.cjs +1 -0
- package/dist/{PickerWrapper-ChkVx96j.js → PickerWrapper-DlnSW_YD.js} +2 -2
- package/dist/{Slide-CFSk8Dlg.js → Slide-CqKDMR53.js} +1 -1
- package/dist/Slider/{index.js → index.mjs} +1 -1
- package/dist/Tabs/index.cjs +1 -1
- package/dist/Tabs/index.d.ts.map +1 -1
- package/dist/Tabs/{index.js → index.mjs} +2 -1
- package/dist/TextFieldWrapper-44165bs_.js +106 -0
- package/dist/TextFieldWrapper-K0g1kAl1.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +54 -0
- package/package.json +94 -202
- package/dist/Form/FileUploader/FileUploader.d.ts +0 -5
- package/dist/Form/FileUploader/FileUploader.d.ts.map +0 -1
- package/dist/Form/Input/index.js +0 -9
- package/dist/PickerWrapper-CWSAzbwY.cjs +0 -1
- package/dist/TextFieldWrapper-BJEouM80.js +0 -178
- package/dist/TextFieldWrapper-BrWmggFz.cjs +0 -1
- package/dist/index-BctRb68z.cjs +0 -1
- /package/dist/Badge/{index.js → index.mjs} +0 -0
- /package/dist/Breadcrumb/{index.js → index.mjs} +0 -0
- /package/dist/Button/{index.js → index.mjs} +0 -0
- /package/dist/Divider/{index.js → index.mjs} +0 -0
- /package/dist/Drawer/{index.js → index.mjs} +0 -0
- /package/dist/Form/Checkbox/{index.js → index.mjs} +0 -0
- /package/dist/Form/RadioButton/{index.js → index.mjs} +0 -0
- /package/dist/Form/Switch/{index.js → index.mjs} +0 -0
- /package/dist/Progress/Bar/{index.js → index.mjs} +0 -0
- /package/dist/Progress/Doughnut/{index.js → index.mjs} +0 -0
- /package/dist/Stepper/Horizontal/{index.js → index.mjs} +0 -0
- /package/dist/Tooltip/{index.js → index.mjs} +0 -0
|
@@ -1,33 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import { default as N0 } from "./Form/Checkbox/index.js";
|
|
12
|
-
import { default as F0 } from "./Form/Datepicker/index.js";
|
|
13
|
-
import { jsx as e, jsxs as l, Fragment as A } from "react/jsx-runtime";
|
|
14
|
-
import { c as d } from "./clsx-OuTLNxxd.js";
|
|
15
|
-
import { useState as R, Fragment as D } from "react";
|
|
16
|
-
import { a as w } from "./TextFieldWrapper-BJEouM80.js";
|
|
17
|
-
import H from "./Progress/Doughnut/index.js";
|
|
18
|
-
import { a as E } from "./index-CXKbrGQV.js";
|
|
19
|
-
import { I as B0 } from "./index-CXKbrGQV.js";
|
|
20
|
-
import { default as S0 } from "./Form/OtpInput/index.js";
|
|
21
|
-
import { default as A0 } from "./Form/RadioButton/index.js";
|
|
22
|
-
import { default as D0 } from "./Form/Select/index.js";
|
|
23
|
-
import { default as E0 } from "./Form/Textarea/index.js";
|
|
24
|
-
import { default as P0 } from "./Pagination/index.js";
|
|
25
|
-
import { default as j0 } from "./Progress/Bar/index.js";
|
|
26
|
-
import { a as U0, S as O0 } from "./Slide-CFSk8Dlg.js";
|
|
27
|
-
import { a as W0, H as Z0 } from "./Step-pWxkk9vq.js";
|
|
28
|
-
import { default as K0 } from "./Tabs/index.js";
|
|
29
|
-
import { default as q0 } from "./Tooltip/index.js";
|
|
30
|
-
const z = (t) => /* @__PURE__ */ e(
|
|
2
|
+
import { jsx as e, jsxs as n, Fragment as R } from "react/jsx-runtime";
|
|
3
|
+
import { c as d } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { useState as A, Fragment as D } from "react";
|
|
5
|
+
import C from "../../Button/index.mjs";
|
|
6
|
+
import { F as x } from "../../FieldBottomInfo-B1n-gK3T.js";
|
|
7
|
+
import E from "../../Progress/Doughnut/index.mjs";
|
|
8
|
+
import { I as H } from "../../IconEye-DATABBb3.js";
|
|
9
|
+
import '../../assets/styles.css';/* empty css */
|
|
10
|
+
const j = (t) => /* @__PURE__ */ e(
|
|
31
11
|
"svg",
|
|
32
12
|
{
|
|
33
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -44,7 +24,7 @@ const z = (t) => /* @__PURE__ */ e(
|
|
|
44
24
|
}
|
|
45
25
|
)
|
|
46
26
|
}
|
|
47
|
-
),
|
|
27
|
+
), z = () => /* @__PURE__ */ n(
|
|
48
28
|
"svg",
|
|
49
29
|
{
|
|
50
30
|
className: "!dgs-ui-kit-mt-0 dgs-ui-kit-absolute dgs-ui-kit-bottom-0 dgs-ui-kit-left-1/2 -dgs-ui-kit-translate-x-1/2",
|
|
@@ -141,19 +121,19 @@ const z = (t) => /* @__PURE__ */ e(
|
|
|
141
121
|
)
|
|
142
122
|
]
|
|
143
123
|
}
|
|
144
|
-
), b = "dgs-ui-kit-h-[190px] dgs-ui-kit-w-[330px]",
|
|
124
|
+
), b = "dgs-ui-kit-h-[190px] dgs-ui-kit-w-[330px]", M = "dgs-ui-kit-size-[120px]", L = "!dgs-ui-kit-absolute dgs-ui-kit-top-1/2 dgs-ui-kit-left-1/2 -dgs-ui-kit-translate-y-1/2 -dgs-ui-kit-translate-x-1/2", P = "dgs-ui-kit-ring-offset-1 dgs-ui-kit-ring-offset-transparent has-[:focus]:dgs-ui-kit-ring-offset-white dgs-ui-kit-ring-[3px] dgs-ui-kit-ring-transparent has-[:focus]:dgs-ui-kit-ring-primary-300", T = "!dgs-ui-kit-border-error-500 dgs-ui-kit-ring-4 !dgs-ui-kit-ring-error-50", _ = "!dgs-ui-kit-border-primary-500 dgs-ui-kit-ring-4 !dgs-ui-kit-ring-gray-100 !dgs-ui-kit-bg-gray-50", U = "has-[:disabled]:dgs-ui-kit-opacity-50", w = {
|
|
145
125
|
default: "dgs-ui-kit-bg-primary-50 dgs-ui-kit-text-primary-500",
|
|
146
126
|
loading: "dgs-ui-kit-bg-gray-500 dgs-ui-kit-text-white",
|
|
147
127
|
error: "dgs-ui-kit-bg-error-50 dgs-ui-kit-text-error-500",
|
|
148
128
|
warning: "dgs-ui-kit-bg-warning-50 dgs-ui-kit-text-warning-700"
|
|
149
129
|
};
|
|
150
|
-
function
|
|
130
|
+
function V(t) {
|
|
151
131
|
const i = "dgs-ui-kit-relative dgs-ui-kit-z-10";
|
|
152
132
|
return typeof t == "boolean" ? /* @__PURE__ */ e(
|
|
153
133
|
C,
|
|
154
134
|
{
|
|
155
135
|
className: i,
|
|
156
|
-
rightIcon: /* @__PURE__ */ e(
|
|
136
|
+
rightIcon: /* @__PURE__ */ e(j, {}),
|
|
157
137
|
size: "small"
|
|
158
138
|
}
|
|
159
139
|
) : /* @__PURE__ */ e(
|
|
@@ -165,24 +145,24 @@ function O(t) {
|
|
|
165
145
|
}
|
|
166
146
|
);
|
|
167
147
|
}
|
|
168
|
-
const
|
|
148
|
+
const O = (t) => {
|
|
169
149
|
const {
|
|
170
150
|
title: i,
|
|
171
|
-
description:
|
|
172
|
-
button:
|
|
173
|
-
hideIcon:
|
|
174
|
-
isError:
|
|
175
|
-
className:
|
|
151
|
+
description: r,
|
|
152
|
+
button: l = !0,
|
|
153
|
+
hideIcon: s,
|
|
154
|
+
isError: o,
|
|
155
|
+
className: g,
|
|
176
156
|
onChange: a,
|
|
177
|
-
helperProps:
|
|
178
|
-
previewtype:
|
|
179
|
-
...
|
|
180
|
-
} = t, [
|
|
181
|
-
function
|
|
182
|
-
v.preventDefault(),
|
|
157
|
+
helperProps: u,
|
|
158
|
+
previewtype: k,
|
|
159
|
+
...m
|
|
160
|
+
} = t, [c, p] = A(!1), f = k === "grid";
|
|
161
|
+
function S(v) {
|
|
162
|
+
v.preventDefault(), p(!1), a(v.dataTransfer.files?.[0]);
|
|
183
163
|
}
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ n("div", { className: "dgs-ui-kit-space-y-2", children: [
|
|
165
|
+
/* @__PURE__ */ n(
|
|
186
166
|
"div",
|
|
187
167
|
{
|
|
188
168
|
className: d(
|
|
@@ -191,36 +171,36 @@ const V = (t) => {
|
|
|
191
171
|
"dgs-ui-kit-flex dgs-ui-kit-flex-col dgs-ui-kit-justify-center dgs-ui-kit-items-center",
|
|
192
172
|
"dgs-ui-kit-border dgs-ui-kit-border-gray-300 dgs-ui-kit-border-dashed dgs-ui-kit-rounded-lg",
|
|
193
173
|
"hover:dgs-ui-kit-ring-4 hover:dgs-ui-kit-ring-gray-100",
|
|
194
|
-
|
|
174
|
+
P,
|
|
195
175
|
U,
|
|
196
|
-
(
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
176
|
+
(o || u?.errorMessage) && T,
|
|
177
|
+
c && _,
|
|
178
|
+
f ? M : b,
|
|
179
|
+
g
|
|
200
180
|
),
|
|
201
181
|
children: [
|
|
202
182
|
i ? /* @__PURE__ */ e("p", { className: "dgs-ui-kit-font-p1-medium dgs-ui-kit-text-primary-500 [font-feature-settings:inherit]", children: i }) : null,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
!
|
|
183
|
+
r ? /* @__PURE__ */ e("pre", { className: "dgs-ui-kit-font-caption-demibold dgs-ui-kit-text-primary-200 [font-feature-settings:inherit]", children: r }) : null,
|
|
184
|
+
l ? V(l) : null,
|
|
185
|
+
!s && /* @__PURE__ */ e(z, {}),
|
|
206
186
|
/* @__PURE__ */ e(
|
|
207
187
|
"input",
|
|
208
188
|
{
|
|
209
189
|
className: "!dgs-ui-kit-mt-0 dgs-ui-kit-absolute dgs-ui-kit-inset-0 dgs-ui-kit-size-full dgs-ui-kit-opacity-0 dgs-ui-kit-cursor-pointer disabled:dgs-ui-kit-cursor-not-allowed dgs-ui-kit-z-10",
|
|
210
190
|
type: "file",
|
|
211
|
-
onDragEnter: () =>
|
|
212
|
-
onDragLeave: () =>
|
|
213
|
-
onDrop:
|
|
191
|
+
onDragEnter: () => p(!0),
|
|
192
|
+
onDragLeave: () => p(!1),
|
|
193
|
+
onDrop: S,
|
|
214
194
|
onChange: (v) => a(v.currentTarget.files?.[0]),
|
|
215
|
-
...
|
|
195
|
+
...m
|
|
216
196
|
}
|
|
217
197
|
)
|
|
218
198
|
]
|
|
219
199
|
}
|
|
220
200
|
),
|
|
221
|
-
!
|
|
201
|
+
!f && Object.keys(u ?? {}).length > 0 && /* @__PURE__ */ e(x, { ...u })
|
|
222
202
|
] });
|
|
223
|
-
},
|
|
203
|
+
}, B = (t) => /* @__PURE__ */ n(
|
|
224
204
|
"svg",
|
|
225
205
|
{
|
|
226
206
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -250,7 +230,7 @@ const V = (t) => {
|
|
|
250
230
|
)
|
|
251
231
|
]
|
|
252
232
|
}
|
|
253
|
-
),
|
|
233
|
+
), I = (t) => /* @__PURE__ */ e(
|
|
254
234
|
"svg",
|
|
255
235
|
{
|
|
256
236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -270,30 +250,30 @@ const V = (t) => {
|
|
|
270
250
|
)
|
|
271
251
|
}
|
|
272
252
|
), W = "data:image/svg+xml,%3csvg%20viewBox='0%200%2096%2096'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20rx='8'%20fill='%23F1F5F9'/%3e%3cpath%20d='M45.9176%2066.4015C45.2%2066.4011%2044.4904%2066.2499%2043.8352%2065.9575C43.18%2065.6655%2042.5932%2065.2387%2042.1136%2064.7055L38.7415%2060.9495L34.5496%2065.3495C33.9972%2065.9051%2033.2495%2066.2227%2032.4661%2066.2343C31.6827%2066.2455%2030.9259%2065.9503%2030.3574%2065.4111C29.789%2064.8719%2029.4539%2064.1319%2029.4241%2063.3487C29.3942%2062.5659%2029.6718%2061.8023%2030.1975%2061.2215L35.0457%2056.1095C36.066%2055.1195%2037.4205%2054.5487%2038.8415%2054.5095C39.5477%2054.5215%2040.2436%2054.6795%2040.886%2054.9735C41.5284%2055.2675%2042.1028%2055.6907%2042.5736%2056.2175L45.9056%2059.9215L53.5576%2050.8895C54.0196%2050.3439%2054.5908%2049.9011%2055.234%2049.5899C55.8776%2049.2783%2056.5788%2049.1051%2057.2936%2049.0815C58.0104%2049.0551%2058.7244%2049.1819%2059.3888%2049.4527C60.0528%2049.7239%2060.6516%2050.1331%2061.1456%2050.6535L67.7736%2057.5135C68.326%2058.0863%2068.6288%2058.8551%2068.6144%2059.6511C68.6004%2060.4471%2068.2704%2061.2047%2067.6976%2061.7575C67.1248%2062.3103%2066.3556%2062.6127%2065.5596%2062.5983C64.764%2062.5843%2064.0064%2062.2543%2063.4536%2061.6815L57.5016%2055.5135L49.8296%2064.5695C49.3552%2065.1291%2048.766%2065.5807%2048.1024%2065.8931C47.4384%2066.2059%2046.7152%2066.3723%2045.9816%2066.3815L45.9176%2066.4015Z'%20fill='%23748297'/%3e%3cpath%20d='M65.0008%2087H33.1767C30.8059%2086.9584%2028.4666%2086.4488%2026.2933%2085.5004C24.1201%2084.5524%2022.1557%2083.184%2020.5128%2081.4744C18.87%2079.7644%2017.5809%2077.7468%2016.7201%2075.5376C15.8593%2073.3284%2015.4437%2070.9704%2015.4967%2068.6V26.628C15.6171%2021.9306%2017.5604%2017.4643%2020.9154%2014.1742C24.2704%2010.8842%2028.7737%209.0286%2033.4725%209H56.1448C57.6536%209.00228%2059.1468%209.3084%2060.5352%209.90008C61.9232%2010.4918%2063.178%2011.357%2064.2248%2012.444L79.3848%2028.24C81.3932%2030.3232%2082.512%2033.1063%2082.5044%2036V68.652C82.5536%2073.3884%2080.7516%2077.9568%2077.482%2081.384C74.2124%2084.8108%2069.734%2086.826%2065.0008%2087ZM33.4845%2015C30.3566%2015.0102%2027.3555%2016.2368%2025.1159%2018.4204C22.8763%2020.6041%2021.5738%2023.5733%2021.4845%2026.7V68.652C21.4387%2070.2356%2021.7073%2071.8124%2022.2741%2073.292C22.8409%2074.7712%2023.6948%2076.124%2024.787%2077.2712C25.8792%2078.4188%2027.1878%2079.3388%2028.6373%2079.9784C30.0869%2080.6176%2031.6487%2080.9632%2033.2325%2080.996H64.8684C68.0276%2080.8528%2071.0072%2079.4864%2073.1768%2077.1856C75.346%2074.8848%2076.5352%2071.83%2076.4924%2068.668V36C76.4924%2034.6581%2075.9736%2033.3682%2075.0444%2032.4L59.8804%2016.6C59.3956%2016.0947%2058.814%2015.6925%2058.1696%2015.4176C57.5256%2015.1426%2056.8328%2015.0006%2056.1328%2015H33.4725H33.4845Z'%20fill='%23748297'/%3e%3cpath%20d='M79.2498%2037.062H68.2938C64.7902%2037.0461%2061.4354%2035.6443%2058.9622%2033.1628C56.4886%2030.6812%2055.0981%2027.3216%2055.0938%2023.818V12.25C55.0938%2011.4544%2055.4101%2010.6913%2055.9725%2010.1287C56.5353%209.56604%2057.2982%209.25%2058.0938%209.25C58.8893%209.25%2059.6525%209.56604%2060.2153%2010.1287C60.7777%2010.6913%2061.0938%2011.4544%2061.0938%2012.25V23.818C61.0938%2025.7316%2061.8509%2027.5675%2063.2001%2028.9248C64.5489%2030.282%2066.3802%2031.0504%2068.2938%2031.062H79.2417C80.0373%2031.062%2080.8005%2031.3781%2081.3633%2031.9407C81.9257%2032.5033%2082.2417%2033.2663%2082.2417%2034.062C82.2417%2034.8576%2081.9257%2035.6207%2081.3633%2036.1833C80.8005%2036.7459%2080.0373%2037.062%2079.2417%2037.062H79.2498Z'%20fill='%23748297'/%3e%3cpath%20d='M37.9659%2048.8068C40.1992%2048.8068%2042.01%2046.9959%2042.01%2044.7627C42.01%2042.5291%2040.1992%2040.7188%2037.9659%2040.7188C35.7324%2040.7188%2033.9219%2042.5291%2033.9219%2044.7627C33.9219%2046.9959%2035.7324%2048.8068%2037.9659%2048.8068Z'%20fill='%23748297'/%3e%3c/svg%3e", y = (t) => {
|
|
273
|
-
const { file: i, children:
|
|
274
|
-
function
|
|
275
|
-
const a =
|
|
253
|
+
const { file: i, children: r, className: l } = t, s = i.file ? URL.createObjectURL(i.file) : i.src ?? "";
|
|
254
|
+
function o(g) {
|
|
255
|
+
const a = g.currentTarget;
|
|
276
256
|
a.src = W, a.classList.add("dgs-ui-kit-bg-gray-100");
|
|
277
257
|
}
|
|
278
|
-
return /* @__PURE__ */
|
|
258
|
+
return /* @__PURE__ */ n(
|
|
279
259
|
"div",
|
|
280
260
|
{
|
|
281
261
|
className: d(
|
|
282
262
|
"dgs-ui-kit-relative dgs-ui-kit-rounded-lg dgs-ui-kit-overflow-hidden",
|
|
283
263
|
b,
|
|
284
|
-
|
|
264
|
+
l
|
|
285
265
|
),
|
|
286
266
|
children: [
|
|
287
267
|
/* @__PURE__ */ e(
|
|
288
268
|
"img",
|
|
289
269
|
{
|
|
290
270
|
className: "dgs-ui-kit-w-full dgs-ui-kit-h-full",
|
|
291
|
-
src:
|
|
271
|
+
src: s,
|
|
292
272
|
alt: "image-preview",
|
|
293
|
-
onError:
|
|
273
|
+
onError: o
|
|
294
274
|
}
|
|
295
275
|
),
|
|
296
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ n(
|
|
297
277
|
"div",
|
|
298
278
|
{
|
|
299
279
|
className: d(
|
|
@@ -302,7 +282,7 @@ const V = (t) => {
|
|
|
302
282
|
),
|
|
303
283
|
children: [
|
|
304
284
|
typeof i.loading == "boolean" && i.loading && /* @__PURE__ */ e("div", { className: d("dot-flashing", L) }),
|
|
305
|
-
typeof i.loading == "number" && /* @__PURE__ */
|
|
285
|
+
typeof i.loading == "number" && /* @__PURE__ */ n(
|
|
306
286
|
"div",
|
|
307
287
|
{
|
|
308
288
|
className: d(
|
|
@@ -311,7 +291,7 @@ const V = (t) => {
|
|
|
311
291
|
),
|
|
312
292
|
children: [
|
|
313
293
|
/* @__PURE__ */ e(
|
|
314
|
-
|
|
294
|
+
E,
|
|
315
295
|
{
|
|
316
296
|
current: i.loading,
|
|
317
297
|
total: 100,
|
|
@@ -320,14 +300,14 @@ const V = (t) => {
|
|
|
320
300
|
strokeSize: 4
|
|
321
301
|
}
|
|
322
302
|
),
|
|
323
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ n("div", { className: "dgs-ui-kit-font-oveline-regular dgs-ui-kit-text-gray-50 ss02 dgs-ui-kit-mt-1", children: [
|
|
324
304
|
i.loading,
|
|
325
305
|
" %"
|
|
326
306
|
] })
|
|
327
307
|
]
|
|
328
308
|
}
|
|
329
309
|
),
|
|
330
|
-
!i.loading &&
|
|
310
|
+
!i.loading && r
|
|
331
311
|
]
|
|
332
312
|
}
|
|
333
313
|
)
|
|
@@ -335,22 +315,22 @@ const V = (t) => {
|
|
|
335
315
|
}
|
|
336
316
|
);
|
|
337
317
|
};
|
|
338
|
-
function h(t, i,
|
|
318
|
+
function h(t, i, r) {
|
|
339
319
|
return t ? /* @__PURE__ */ e(
|
|
340
320
|
C,
|
|
341
321
|
{
|
|
342
322
|
className: d(
|
|
343
323
|
"dgs-ui-kit-opacity-50 dgs-ui-kit-z-10",
|
|
344
|
-
|
|
324
|
+
r?.className,
|
|
345
325
|
t?.className
|
|
346
326
|
),
|
|
347
327
|
type: "button",
|
|
348
|
-
rightIcon:
|
|
328
|
+
rightIcon: r?.icon,
|
|
349
329
|
size: "small",
|
|
350
|
-
...
|
|
330
|
+
...r,
|
|
351
331
|
...typeof t == "boolean" ? {} : t,
|
|
352
|
-
onClick: (
|
|
353
|
-
typeof t != "boolean" && typeof t.onClick == "function" && t.onClick(i,
|
|
332
|
+
onClick: (l) => {
|
|
333
|
+
typeof t != "boolean" && typeof t.onClick == "function" && t.onClick(i, l);
|
|
354
334
|
},
|
|
355
335
|
children: t?.children
|
|
356
336
|
}
|
|
@@ -369,33 +349,33 @@ function N(t, i) {
|
|
|
369
349
|
const Z = (t) => {
|
|
370
350
|
const {
|
|
371
351
|
files: i,
|
|
372
|
-
previewClassName:
|
|
373
|
-
leftButton:
|
|
374
|
-
rightButton:
|
|
375
|
-
wrapperClassName:
|
|
352
|
+
previewClassName: r,
|
|
353
|
+
leftButton: l = !0,
|
|
354
|
+
rightButton: s = !0,
|
|
355
|
+
wrapperClassName: o
|
|
376
356
|
} = t;
|
|
377
357
|
return /* @__PURE__ */ e(
|
|
378
358
|
"div",
|
|
379
359
|
{
|
|
380
360
|
className: d(
|
|
381
361
|
N(i.loading, i.errorMessage ? "error" : i.status),
|
|
382
|
-
|
|
383
|
-
|
|
362
|
+
M,
|
|
363
|
+
o
|
|
384
364
|
),
|
|
385
|
-
children: /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ n(
|
|
386
366
|
y,
|
|
387
367
|
{
|
|
388
368
|
file: i,
|
|
389
|
-
className: d("!dgs-ui-kit-size-full",
|
|
369
|
+
className: d("!dgs-ui-kit-size-full", r),
|
|
390
370
|
children: [
|
|
391
|
-
h(
|
|
371
|
+
h(l, i, {
|
|
392
372
|
color: "error",
|
|
393
|
-
icon: /* @__PURE__ */ e(
|
|
373
|
+
icon: /* @__PURE__ */ e(B, {}),
|
|
394
374
|
className: "!dgs-ui-kit-absolute dgs-ui-kit-left-2 dgs-ui-kit-top-2"
|
|
395
375
|
}),
|
|
396
|
-
h(
|
|
376
|
+
h(s, i, {
|
|
397
377
|
color: "gray",
|
|
398
|
-
icon: /* @__PURE__ */ e(
|
|
378
|
+
icon: /* @__PURE__ */ e(I, {}),
|
|
399
379
|
className: "!dgs-ui-kit-absolute dgs-ui-kit-right-2 dgs-ui-kit-bottom-2"
|
|
400
380
|
})
|
|
401
381
|
]
|
|
@@ -403,7 +383,7 @@ const Z = (t) => {
|
|
|
403
383
|
)
|
|
404
384
|
}
|
|
405
385
|
);
|
|
406
|
-
}, G = (t) => /* @__PURE__ */
|
|
386
|
+
}, G = (t) => /* @__PURE__ */ n(
|
|
407
387
|
"svg",
|
|
408
388
|
{
|
|
409
389
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -436,19 +416,19 @@ const Z = (t) => {
|
|
|
436
416
|
), K = (t) => {
|
|
437
417
|
const {
|
|
438
418
|
files: i,
|
|
439
|
-
previewClassName:
|
|
440
|
-
leftButton:
|
|
441
|
-
rightButton:
|
|
442
|
-
exteraButton:
|
|
443
|
-
} = t, { status:
|
|
444
|
-
return /* @__PURE__ */
|
|
419
|
+
previewClassName: r,
|
|
420
|
+
leftButton: l = !0,
|
|
421
|
+
rightButton: s = !0,
|
|
422
|
+
exteraButton: o
|
|
423
|
+
} = t, { status: g, errorMessage: a, hintMessage: u, loading: k, title: m } = i, c = m ?? i.file?.name, p = !!(a ?? u);
|
|
424
|
+
return /* @__PURE__ */ n(
|
|
445
425
|
"div",
|
|
446
426
|
{
|
|
447
427
|
className: d(
|
|
448
428
|
"dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-space-x-2 dgs-ui-kit-space-x-reverse dgs-ui-kit-w-0 dgs-ui-kit-min-w-full",
|
|
449
|
-
N(
|
|
450
|
-
(!
|
|
451
|
-
|
|
429
|
+
N(k, a ? "error" : g),
|
|
430
|
+
(!g || g === "default") && !a && "dgs-ui-kit-p-1 !dgs-ui-kit-border-gray-200",
|
|
431
|
+
r
|
|
452
432
|
),
|
|
453
433
|
children: [
|
|
454
434
|
/* @__PURE__ */ e(
|
|
@@ -458,34 +438,34 @@ const Z = (t) => {
|
|
|
458
438
|
className: "!dgs-ui-kit-size-[72px] dgs-ui-kit-shrink-0"
|
|
459
439
|
}
|
|
460
440
|
),
|
|
461
|
-
!!(
|
|
462
|
-
!!
|
|
463
|
-
|
|
464
|
-
|
|
441
|
+
!!(c ?? p) && /* @__PURE__ */ n("div", { className: "dgs-ui-kit-space-y-1 dgs-ui-kit-overflow-hidden dgs-ui-kit-w-full", children: [
|
|
442
|
+
!!c && /* @__PURE__ */ e("span", { className: "dgs-ui-kit-font-p2-medium dgs-ui-kit-text-gray-700 dgs-ui-kit-break-words dgs-ui-kit-line-clamp-1", children: c }),
|
|
443
|
+
p && /* @__PURE__ */ e(
|
|
444
|
+
x,
|
|
465
445
|
{
|
|
466
|
-
hintMessage:
|
|
446
|
+
hintMessage: u,
|
|
467
447
|
errorMessage: a
|
|
468
448
|
}
|
|
469
449
|
)
|
|
470
450
|
] }),
|
|
471
|
-
(
|
|
472
|
-
|
|
451
|
+
(l || s || o) && /* @__PURE__ */ n("div", { className: "dgs-ui-kit-flex dgs-ui-kit-space-x-1 dgs-ui-kit-space-x-reverse dgs-ui-kit-shrink-0", children: [
|
|
452
|
+
o && /* @__PURE__ */ e(
|
|
473
453
|
C,
|
|
474
454
|
{
|
|
475
|
-
...
|
|
476
|
-
onClick: (
|
|
477
|
-
typeof
|
|
455
|
+
...o,
|
|
456
|
+
onClick: (f) => {
|
|
457
|
+
typeof o.onClick == "function" && o.onClick(i, f);
|
|
478
458
|
},
|
|
479
|
-
children:
|
|
459
|
+
children: o.children
|
|
480
460
|
}
|
|
481
461
|
),
|
|
482
|
-
h(
|
|
462
|
+
h(s, i, {
|
|
483
463
|
color: "gray",
|
|
484
|
-
icon: /* @__PURE__ */ e(
|
|
464
|
+
icon: /* @__PURE__ */ e(H, {}),
|
|
485
465
|
variant: "text",
|
|
486
466
|
className: "!dgs-ui-kit-opacity-100"
|
|
487
467
|
}),
|
|
488
|
-
h(
|
|
468
|
+
h(l, i, {
|
|
489
469
|
color: "error",
|
|
490
470
|
icon: /* @__PURE__ */ e(G, {}),
|
|
491
471
|
variant: "text",
|
|
@@ -500,154 +480,129 @@ function F(t) {
|
|
|
500
480
|
return t.file ? URL.createObjectURL(t.file) : t.src ?? "";
|
|
501
481
|
}
|
|
502
482
|
const $ = (t) => {
|
|
503
|
-
const { files: i, type:
|
|
504
|
-
return
|
|
483
|
+
const { files: i, type: r = "list", wrapperClassName: l } = t;
|
|
484
|
+
return r === "grid" ? i.map((s) => /* @__PURE__ */ e(
|
|
505
485
|
Z,
|
|
506
486
|
{
|
|
507
487
|
...t,
|
|
508
|
-
files:
|
|
488
|
+
files: s
|
|
509
489
|
},
|
|
510
|
-
F(
|
|
511
|
-
)) : /* @__PURE__ */ e("div", { className: d("dgs-ui-kit-mt-4 dgs-ui-kit-space-y-2",
|
|
490
|
+
F(s)
|
|
491
|
+
)) : /* @__PURE__ */ e("div", { className: d("dgs-ui-kit-mt-4 dgs-ui-kit-space-y-2", l), children: i.map((s) => /* @__PURE__ */ e(
|
|
512
492
|
K,
|
|
513
493
|
{
|
|
514
494
|
...t,
|
|
515
|
-
files:
|
|
495
|
+
files: s
|
|
516
496
|
},
|
|
517
|
-
F(
|
|
497
|
+
F(s)
|
|
518
498
|
)) });
|
|
519
499
|
};
|
|
520
|
-
function q(t, i,
|
|
521
|
-
return t ?
|
|
500
|
+
function q(t, i, r = "default") {
|
|
501
|
+
return t ? w.loading : i ? w.error : w[r];
|
|
522
502
|
}
|
|
523
503
|
const J = (t) => {
|
|
524
504
|
const {
|
|
525
505
|
files: i,
|
|
526
|
-
leftButton:
|
|
527
|
-
rightButton:
|
|
528
|
-
exteraButton:
|
|
529
|
-
wrapperClassName:
|
|
530
|
-
previewClassName:
|
|
531
|
-
} = t, { errorMessage: a, file:
|
|
532
|
-
return /* @__PURE__ */
|
|
533
|
-
/* @__PURE__ */
|
|
506
|
+
leftButton: r = !0,
|
|
507
|
+
rightButton: l = !0,
|
|
508
|
+
exteraButton: s,
|
|
509
|
+
wrapperClassName: o,
|
|
510
|
+
previewClassName: g
|
|
511
|
+
} = t, { errorMessage: a, file: u, hintMessage: k, loading: m, status: c, title: p } = i;
|
|
512
|
+
return /* @__PURE__ */ n("div", { className: "dgs-ui-kit-space-y-2", children: [
|
|
513
|
+
/* @__PURE__ */ n(
|
|
534
514
|
"div",
|
|
535
515
|
{
|
|
536
516
|
className: d(
|
|
537
|
-
N(
|
|
538
|
-
|
|
517
|
+
N(m, a ? "error" : c),
|
|
518
|
+
o
|
|
539
519
|
),
|
|
540
520
|
children: [
|
|
541
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ n(
|
|
542
522
|
y,
|
|
543
523
|
{
|
|
544
524
|
file: i,
|
|
545
|
-
className:
|
|
525
|
+
className: g,
|
|
546
526
|
children: [
|
|
547
|
-
h(
|
|
527
|
+
h(r, i, {
|
|
548
528
|
color: "error",
|
|
549
|
-
icon: /* @__PURE__ */ e(
|
|
529
|
+
icon: /* @__PURE__ */ e(B, {}),
|
|
550
530
|
className: "!dgs-ui-kit-absolute dgs-ui-kit-left-2 dgs-ui-kit-top-2"
|
|
551
531
|
}),
|
|
552
|
-
h(
|
|
532
|
+
h(l, i, {
|
|
553
533
|
color: "gray",
|
|
554
|
-
icon: /* @__PURE__ */ e(
|
|
534
|
+
icon: /* @__PURE__ */ e(I, {}),
|
|
555
535
|
className: "!dgs-ui-kit-absolute dgs-ui-kit-right-2 dgs-ui-kit-bottom-2"
|
|
556
536
|
}),
|
|
557
|
-
|
|
537
|
+
s ? /* @__PURE__ */ e(
|
|
558
538
|
C,
|
|
559
539
|
{
|
|
560
540
|
className: d(
|
|
561
|
-
|
|
541
|
+
s.className,
|
|
562
542
|
"!dgs-ui-kit-absolute dgs-ui-kit-top-1/2 dgs-ui-kit-left-1/2 -dgs-ui-kit-translate-y-1/2 -dgs-ui-kit-translate-x-1/2"
|
|
563
543
|
),
|
|
564
|
-
...
|
|
565
|
-
onClick: (
|
|
566
|
-
typeof
|
|
544
|
+
...s,
|
|
545
|
+
onClick: (f) => {
|
|
546
|
+
typeof s.onClick == "function" && s.onClick(i, f);
|
|
567
547
|
},
|
|
568
|
-
children:
|
|
548
|
+
children: s.children
|
|
569
549
|
}
|
|
570
550
|
) : null
|
|
571
551
|
]
|
|
572
552
|
}
|
|
573
553
|
),
|
|
574
|
-
!!(
|
|
554
|
+
!!(p ?? u?.name) && /* @__PURE__ */ e(
|
|
575
555
|
"div",
|
|
576
556
|
{
|
|
577
557
|
className: d(
|
|
578
|
-
q(
|
|
558
|
+
q(m, a, c),
|
|
579
559
|
"dgs-ui-kit-px-3 dgs-ui-kit-py-1.5 dgs-ui-kit-rounded-lg dgs-ui-kit-font-p2-medium dgs-ui-kit-text-center dgs-ui-kit-line-clamp-1 dgs-ui-kit-mt-1 dgs-ui-kit-w-0 dgs-ui-kit-min-w-full"
|
|
580
560
|
),
|
|
581
|
-
children:
|
|
561
|
+
children: p ?? u?.name
|
|
582
562
|
}
|
|
583
563
|
)
|
|
584
564
|
]
|
|
585
565
|
}
|
|
586
566
|
),
|
|
587
|
-
|
|
588
|
-
|
|
567
|
+
k ?? a ? /* @__PURE__ */ e(
|
|
568
|
+
x,
|
|
589
569
|
{
|
|
590
570
|
errorMessage: a,
|
|
591
|
-
hintMessage:
|
|
571
|
+
hintMessage: k
|
|
592
572
|
}
|
|
593
573
|
) : null
|
|
594
574
|
] });
|
|
595
575
|
}, a0 = (t) => {
|
|
596
|
-
const { mode: i, fileInputProps:
|
|
576
|
+
const { mode: i, fileInputProps: r, isError: l, disabled: s, onChange: o, files: g, previewProps: a, className: u } = t, k = Array.isArray(g) ? g.length > 0 : !!g, c = d(
|
|
597
577
|
i === "multiple" && a?.type === "grid" && "dgs-ui-kit-flex dgs-ui-kit-space-x-2 dgs-ui-kit-space-x-reverse",
|
|
598
|
-
|
|
599
|
-
);
|
|
600
|
-
return /* @__PURE__ */
|
|
601
|
-
(!
|
|
602
|
-
|
|
578
|
+
u
|
|
579
|
+
) ? "div" : D;
|
|
580
|
+
return /* @__PURE__ */ n(c, { ...c === "div" ? { className: u } : {}, children: [
|
|
581
|
+
(!k && i === "single" || i !== "single") && /* @__PURE__ */ e(
|
|
582
|
+
O,
|
|
603
583
|
{
|
|
604
|
-
...
|
|
584
|
+
...r,
|
|
605
585
|
previewtype: a?.type,
|
|
606
|
-
disabled:
|
|
607
|
-
isError:
|
|
608
|
-
onChange:
|
|
586
|
+
disabled: s,
|
|
587
|
+
isError: l,
|
|
588
|
+
onChange: o
|
|
609
589
|
}
|
|
610
590
|
),
|
|
611
|
-
|
|
591
|
+
k && /* @__PURE__ */ e(R, { children: i === "single" ? /* @__PURE__ */ e(
|
|
612
592
|
J,
|
|
613
593
|
{
|
|
614
594
|
...a,
|
|
615
|
-
files:
|
|
595
|
+
files: g
|
|
616
596
|
}
|
|
617
597
|
) : /* @__PURE__ */ e(
|
|
618
598
|
$,
|
|
619
599
|
{
|
|
620
600
|
...a,
|
|
621
|
-
files:
|
|
601
|
+
files: g
|
|
622
602
|
}
|
|
623
603
|
) })
|
|
624
604
|
] });
|
|
625
605
|
};
|
|
626
606
|
export {
|
|
627
|
-
|
|
628
|
-
d0 as AccordionItem,
|
|
629
|
-
g0 as Alert,
|
|
630
|
-
k0 as Badge,
|
|
631
|
-
f0 as Breadcrumb,
|
|
632
|
-
C as Button,
|
|
633
|
-
N0 as Checkbox,
|
|
634
|
-
h0 as Chip,
|
|
635
|
-
F0 as Datepicker,
|
|
636
|
-
v0 as Divider,
|
|
637
|
-
w0 as Drawer,
|
|
638
|
-
a0 as FileUploader,
|
|
639
|
-
W0 as HorizontalStep,
|
|
640
|
-
Z0 as HorizontalStepper,
|
|
641
|
-
B0 as Input,
|
|
642
|
-
S0 as OtpInput,
|
|
643
|
-
P0 as Pagination,
|
|
644
|
-
j0 as ProgressBar,
|
|
645
|
-
H as ProgressDoughnut,
|
|
646
|
-
A0 as RadioButton,
|
|
647
|
-
D0 as Select,
|
|
648
|
-
U0 as Slide,
|
|
649
|
-
O0 as Slider,
|
|
650
|
-
K0 as Tabs,
|
|
651
|
-
E0 as Textarea,
|
|
652
|
-
q0 as Tooltip
|
|
607
|
+
a0 as default
|
|
653
608
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("react/jsx-runtime")
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),g=require("../../clsx-C11secjj.cjs"),h=require("react"),k=require("../../IconEye-sBk4Mro2.cjs"),y=require("../../omitObjects-CtiYo0hv.cjs"),C=require("../../TextFieldWrapper-K0g1kAl1.cjs"),I=n=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...n,children:[e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m15.456 9.595-5.852 5.852-1.061-1.06 5.853-5.853z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m9.6 8.532 5.856 5.858-1.06 1.06-5.857-5.857z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12m10-8.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17",clipRule:"evenodd"})]}),R=n=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...n,children:e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.417 3.22a.75.75 0 0 1 0 1.06L4.643 20.055a.744.744 0 0 1-1.06 0 .75.75 0 0 1 0-1.06l1.972-1.971c-1.413-1.293-2.613-3.036-3.493-5.089a.75.75 0 0 1 0-.593C3.082 8.977 4.52 7.02 6.22 5.683c3.292-2.606 7.621-2.744 11.048-.375l2.088-2.088a.75.75 0 0 1 1.06 0m-.37 4.82c.724.962 1.36 2.073 1.891 3.299a.74.74 0 0 1 0 .595C19.842 16.79 16.128 19.69 12 19.69a8.8 8.8 0 0 1-2.769-.451.75.75 0 0 1 .474-1.424A7.3 7.3 0 0 0 12 18.19c3.428 0 6.561-2.442 8.43-6.553a14.5 14.5 0 0 0-1.58-2.694.75.75 0 0 1 1.197-.902M7.15 6.862c-1.437 1.13-2.67 2.776-3.58 4.778.794 1.752 1.836 3.23 3.047 4.322l2.138-2.138a3.87 3.87 0 0 1-.67-2.184A3.92 3.92 0 0 1 12 7.722a3.9 3.9 0 0 1 2.187.669l2.001-2.002c-2.853-1.844-6.325-1.676-9.038.472m8.088 4.6a.75.75 0 0 1 .606.872 3.92 3.92 0 0 1-3.141 3.147.75.75 0 0 1-.268-1.476 2.41 2.41 0 0 0 1.932-1.937.754.754 0 0 1 .87-.606M12 9.221a2.418 2.418 0 0 0-2.152 3.509l3.245-3.246A2.4 2.4 0 0 0 12 9.222",clipRule:"evenodd"})}),N=h.forwardRef(function(a,f){const{dir:i="rtl",placeholderDir:m=i,containerClassName:w,leftIcon:u,prefix:d,postfix:p,onClear:l,value:r,...t}=a,j=y.omitObject(t,["labelAddon","labelContent","link","rightIcon","isError","errorMessage","hintMessage","wrapperClassName","showMaxLength"]),[c,v]=h.useState(t.type);function x(){return e.jsx("button",{onClick:()=>{typeof l=="function"&&l()},children:e.jsx(I,{className:"dgs-ui-kit-text-gray-600",width:20,height:20})})}return e.jsxs(C.TextFieldWrapper,{...a,containerClassName:g.clsx("dgs-ui-kit-items-center",w),value:r,children:[d&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:d}),typeof l=="function"&&r&&i==="ltr"&&x(),e.jsx("input",{...j,ref:f,className:g.clsx("dgs-ui-kit-bg-transparent focus:dgs-ui-kit-outline-none dgs-ui-kit-flex-1",i==="rtl"?"dgs-ui-kit-text-right":"!dgs-ui-kit-text-left",m==="rtl"?"placeholder:dgs-ui-kit-text-right":"placeholder:dgs-ui-kit-text-left",{ss02:t.type!="password"},a.className),...i==="ltr"?{style:{direction:"ltr"}}:{},value:r,type:c,onInput:o=>{if(typeof t.onInput=="function"&&t.onInput(o)||c!=="number")return;const s=o.currentTarget;s.value.length>s.maxLength&&(s.value=s.value.slice(0,s.maxLength))}}),typeof l=="function"&&r&&i==="rtl"&&x(),p&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:p}),u&&e.jsx("div",{className:"dgs-ui-kit-text-gray-600",children:u}),t.type==="password"&&e.jsx("button",{type:"button",onClick:()=>v(o=>o==="text"?"password":"text"),className:"dgs-ui-kit-text-gray-600",children:c==="password"?e.jsx(k.IconEye,{width:20,height:20}):e.jsx(R,{width:20,height:20})})]})});module.exports=N;
|