@dgshahr/ui-kit 0.0.26 → 0.0.28
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/Form/Input/index.cjs +1 -1
- package/dist/Form/Input/index.js +1 -1
- package/dist/Form/OtpInput/index.cjs +1 -1
- package/dist/Form/OtpInput/index.d.ts +1 -1
- package/dist/Form/OtpInput/index.d.ts.map +1 -1
- package/dist/Form/OtpInput/index.js +47 -44
- package/dist/Form/Textarea/index.cjs +1 -1
- package/dist/Form/Textarea/index.js +1 -1
- package/dist/Form/Wrappers/TextFieldWrapper/FieldLabel.d.ts +2 -1
- package/dist/Form/Wrappers/TextFieldWrapper/FieldLabel.d.ts.map +1 -1
- package/dist/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.d.ts +3 -1
- package/dist/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.d.ts.map +1 -1
- package/dist/{Slide-DV9RZ3-5.js → Slide-CdflnA1A.js} +1 -1
- package/dist/{Slide-Cr0SfMFS.cjs → Slide-DlUl47v_.cjs} +1 -1
- package/dist/Slider/index.cjs +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/TextFieldWrapper-BC0mP63G.cjs +1 -0
- package/dist/{TextFieldWrapper-BNiYlOSW.js → TextFieldWrapper-Dva9vxfn.js} +76 -70
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/TextFieldWrapper-51P2QftA.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),u=require("../../clsx-C11secjj.cjs"),x=require("react"),C=require("../../TextFieldWrapper-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),u=require("../../clsx-C11secjj.cjs"),x=require("react"),C=require("../../TextFieldWrapper-BC0mP63G.cjs"),v=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...t,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"})]}),y=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...t,children:[e.jsx("path",{fill:"currentColor",d:"M12.247 20.812c-4.033 0-7.654-2.828-9.686-7.558a.75.75 0 0 1 0-.592c2.034-4.732 5.655-7.557 9.687-7.557s7.657 2.825 9.69 7.557a.75.75 0 0 1 0 .592c-2.032 4.73-5.653 7.554-9.685 7.557zm-8.182-7.853c1.806 3.983 4.846 6.352 8.18 6.352 3.334.002 6.373-2.369 8.18-6.352-1.808-3.986-4.848-6.354-8.182-6.354s-6.37 2.368-8.176 6.354z"}),e.jsx("path",{fill:"currentColor",d:"M12.247 16.789a3.825 3.825 0 1 1 0-7.651 3.825 3.825 0 0 1 0 7.65m0-6.152a2.326 2.326 0 1 0 0 4.651 2.326 2.326 0 0 0 0-4.651"})]}),R=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...t,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=x.forwardRef(function(i,h){const{dir:l="rtl",placeholderDir:g=l,containerClassName:p,leftIcon:n,prefix:o,postfix:a,isClearOption:f,onClear:c,...s}=i,[d,m]=x.useState(s.type);return e.jsx(C.TextFieldWrapper,{...i,containerClassName:u.clsx("dgs-ui-kit-items-center",p),children:({handleChangeField:w,value:r,setValue:j})=>e.jsxs(e.Fragment,{children:[o&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:o}),e.jsx("input",{...s,ref:h,className:u.clsx("dgs-ui-kit-bg-transparent focus:dgs-ui-kit-outline-none dgs-ui-kit-flex-1",l==="rtl"?"dgs-ui-kit-text-right":"!dgs-ui-kit-text-left",g==="rtl"?"placeholder:dgs-ui-kit-text-right":"placeholder:dgs-ui-kit-text-left",{ss02:s.type!="password"},i.className),...l==="ltr"?{style:{direction:"ltr"}}:{},value:r,onChange:w,type:d}),f&&r&&r.length>0&&e.jsx("button",{onClick:()=>{j(""),typeof c=="function"&&c()},children:e.jsx(v,{className:"dgs-ui-kit-text-gray-600",width:20,height:20})}),a&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:a}),n&&e.jsx("div",{className:"dgs-ui-kit-text-gray-600",children:n}),s.type==="password"&&e.jsx("button",{onClick:()=>m(k=>k==="text"?"password":"text"),className:"dgs-ui-kit-text-gray-600",children:d==="password"?e.jsx(y,{width:20,height:20}):e.jsx(R,{width:20,height:20})})]})})});module.exports=N;
|
package/dist/Form/Input/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e, Fragment as v } from "react/jsx-runtime";
|
|
2
2
|
import { c as g } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { forwardRef as y, useState as N } from "react";
|
|
4
|
-
import { T as R } from "../../TextFieldWrapper-
|
|
4
|
+
import { T as R } from "../../TextFieldWrapper-Dva9vxfn.js";
|
|
5
5
|
const I = (t) => /* @__PURE__ */ n(
|
|
6
6
|
"svg",
|
|
7
7
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";require('../../assets/styles.css');const
|
|
1
|
+
"use client";"use strict";require('../../assets/styles.css');const l=require("react/jsx-runtime"),k=require("../../clsx-C11secjj.cjs"),y=require("react"),E=require("../Input/index.cjs"),m=require("../../TextFieldWrapper-BC0mP63G.cjs");;/* empty css */const F=j=>{const{inputsNumber:c=4,onChange:o,onEnd:r,className:C,inputsContainerClassName:I,labelContent:d,hintMessage:h,errorMessage:f,isError:v,value:n}=j,[a,p]=y.useState([]);function u(i){const e=document.getElementById(`dgs-ui-kit-otp-input-${i}`);e?.focus(),e?.select()}function w(i,e){const t=[i.code,i.key];if(t.includes("Backspace")||t.includes("Delete")){const s=[...a];s[e]="",e!==0&&(s[e-1]="",u(e-1)),p(s)}else t.includes("ArrowLeft")?u(e+1):t.includes("ArrowRight")&&u(e-1);t.includes(a[e])&&u(e)}function N(i,e){const t=i.currentTarget.value,s=[...a];t.length>1?t.split("").forEach((g,q)=>s[q]=g):s[e]=t,e+1!==c&&t?u(e+1):typeof r=="function"&&s.every(g=>!!g)&&((typeof o=="function"&&!n||typeof o!="function"&&n||typeof o!="function"&&!n||n!==s.join(""))&&r(s.join("")),u(c-1)),p(s),typeof o=="function"&&o(s.join(""))}return y.useEffect(()=>{if(n){const i=n.split("");p(i);const e=c===n.length;u(n.length),e&&typeof r=="function"&&r(n)}},[n]),l.jsxs("div",{className:k.clsx("dgs-ui-kit-space-y-2",C),children:[d?l.jsx(m.FieldLabel,{labelContent:d}):null,l.jsx("div",{className:k.clsx("dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-2",I),children:Array.from(Array(c).keys()).map((i,e)=>l.jsx(E,{containerClassName:"dgs-ui-kit-w-12 dgs-ui-kit-h-12 dgs-ui-kit-p-0",className:"dgs-ui-kit-w-full dgs-ui-kit-h-full !dgs-ui-kit-text-center placeholder:!dgs-ui-kit-text-center",placeholder:"-",type:"tel",autoFocus:e===0,onChange:t=>N(t,e),onKeyUp:t=>w(t,e),id:`dgs-ui-kit-otp-input-${e}`,value:a[e],showMaxLength:!1,isError:!!f||v,autoComplete:"off"},i))}),f||h?l.jsx(m.FieldBottomInfo,{errorMessage:f,hintMessage:h}):null]})};module.exports=F;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { TextFieldBaseProps } from '../Wrappers/TextFieldWrapper/TextFieldWrapper';
|
|
3
|
-
interface OtpInputProps extends Pick<TextFieldBaseProps, 'labelContent' | 'errorMessage' | 'isError' | 'hintMessage'> {
|
|
3
|
+
export interface OtpInputProps extends Pick<TextFieldBaseProps, 'labelContent' | 'errorMessage' | 'isError' | 'hintMessage'> {
|
|
4
4
|
inputsNumber?: number;
|
|
5
5
|
onChange?: (value: string) => void;
|
|
6
6
|
onEnd?: (value: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/OtpInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAyC,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;AAI3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,kBAAkB,CAAC;AAE1B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/OtpInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAyC,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;AAI3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,cAAc,GAAG,cAAc,GAAG,SAAS,GAAG,aAAa,CAAC;IAC7F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA6G/B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,77 +1,80 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useState as V, useEffect as
|
|
5
|
-
import
|
|
6
|
-
import { F
|
|
2
|
+
import { jsxs as E, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { c as h } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { useState as V, useEffect as j } from "react";
|
|
5
|
+
import B from "../Input/index.js";
|
|
6
|
+
import { F, a as A } from "../../TextFieldWrapper-Dva9vxfn.js";
|
|
7
7
|
import '../../assets/styles.css';/* empty css */
|
|
8
8
|
const U = (k) => {
|
|
9
9
|
const {
|
|
10
|
-
inputsNumber:
|
|
11
|
-
onChange:
|
|
12
|
-
onEnd:
|
|
13
|
-
className:
|
|
14
|
-
inputsContainerClassName:
|
|
10
|
+
inputsNumber: u = 4,
|
|
11
|
+
onChange: l,
|
|
12
|
+
onEnd: a,
|
|
13
|
+
className: y,
|
|
14
|
+
inputsContainerClassName: C,
|
|
15
15
|
labelContent: m,
|
|
16
|
-
hintMessage:
|
|
17
|
-
errorMessage:
|
|
18
|
-
isError:
|
|
19
|
-
value:
|
|
20
|
-
} = k, [
|
|
21
|
-
function n(
|
|
22
|
-
const e = document.getElementById(`dgs-ui-kit-otp-input-${
|
|
16
|
+
hintMessage: d,
|
|
17
|
+
errorMessage: f,
|
|
18
|
+
isError: I,
|
|
19
|
+
value: o
|
|
20
|
+
} = k, [c, p] = V([]);
|
|
21
|
+
function n(i) {
|
|
22
|
+
const e = document.getElementById(`dgs-ui-kit-otp-input-${i}`);
|
|
23
23
|
e?.focus(), e?.select();
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
const t = [
|
|
25
|
+
function v(i, e) {
|
|
26
|
+
const t = [i.code, i.key];
|
|
27
27
|
if (t.includes("Backspace") || t.includes("Delete")) {
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const s = [...c];
|
|
29
|
+
s[e] = "", e !== 0 && (s[e - 1] = "", n(e - 1)), p(s);
|
|
30
30
|
} else t.includes("ArrowLeft") ? n(e + 1) : t.includes("ArrowRight") && n(e - 1);
|
|
31
|
+
t.includes(c[e]) && n(e);
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
-
const t =
|
|
34
|
-
|
|
33
|
+
function w(i, e) {
|
|
34
|
+
const t = i.currentTarget.value, s = [...c];
|
|
35
|
+
t.length > 1 ? t.split("").forEach((g, N) => s[N] = g) : s[e] = t, e + 1 !== u && t ? n(e + 1) : typeof a == "function" && s.every((g) => !!g) && ((typeof l == "function" && !o || typeof l != "function" && o || typeof l != "function" && !o || o !== s.join("")) && a(s.join("")), n(u - 1)), p(s), typeof l == "function" && l(s.join(""));
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
|
|
37
|
+
return j(() => {
|
|
38
|
+
if (o) {
|
|
39
|
+
const i = o.split("");
|
|
40
|
+
p(i);
|
|
41
|
+
const e = u === o.length;
|
|
42
|
+
n(o.length), e && typeof a == "function" && a(o);
|
|
40
43
|
}
|
|
41
|
-
}, [
|
|
42
|
-
m ? /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
+
}, [o]), /* @__PURE__ */ E("div", { className: h("dgs-ui-kit-space-y-2", y), children: [
|
|
45
|
+
m ? /* @__PURE__ */ r(F, { labelContent: m }) : null,
|
|
46
|
+
/* @__PURE__ */ r(
|
|
44
47
|
"div",
|
|
45
48
|
{
|
|
46
|
-
className:
|
|
49
|
+
className: h(
|
|
47
50
|
"dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-2",
|
|
48
|
-
|
|
51
|
+
C
|
|
49
52
|
),
|
|
50
|
-
children: Array.from(Array(
|
|
51
|
-
|
|
53
|
+
children: Array.from(Array(u).keys()).map((i, e) => /* @__PURE__ */ r(
|
|
54
|
+
B,
|
|
52
55
|
{
|
|
53
56
|
containerClassName: "dgs-ui-kit-w-12 dgs-ui-kit-h-12 dgs-ui-kit-p-0",
|
|
54
57
|
className: "dgs-ui-kit-w-full dgs-ui-kit-h-full !dgs-ui-kit-text-center placeholder:!dgs-ui-kit-text-center",
|
|
55
58
|
placeholder: "-",
|
|
56
59
|
type: "tel",
|
|
57
60
|
autoFocus: e === 0,
|
|
58
|
-
onChange: (t) =>
|
|
59
|
-
onKeyUp: (t) =>
|
|
61
|
+
onChange: (t) => w(t, e),
|
|
62
|
+
onKeyUp: (t) => v(t, e),
|
|
60
63
|
id: `dgs-ui-kit-otp-input-${e}`,
|
|
61
|
-
|
|
62
|
-
value: l[e],
|
|
64
|
+
value: c[e],
|
|
63
65
|
showMaxLength: !1,
|
|
64
|
-
isError: !!
|
|
66
|
+
isError: !!f || I,
|
|
67
|
+
autoComplete: "off"
|
|
65
68
|
},
|
|
66
|
-
|
|
69
|
+
i
|
|
67
70
|
))
|
|
68
71
|
}
|
|
69
72
|
),
|
|
70
|
-
|
|
73
|
+
f || d ? /* @__PURE__ */ r(
|
|
71
74
|
A,
|
|
72
75
|
{
|
|
73
|
-
errorMessage:
|
|
74
|
-
hintMessage:
|
|
76
|
+
errorMessage: f,
|
|
77
|
+
hintMessage: d
|
|
75
78
|
}
|
|
76
79
|
) : null
|
|
77
80
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),n=require("../../clsx-C11secjj.cjs"),o=require("react"),c=require("../../TextFieldWrapper-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),n=require("../../clsx-C11secjj.cjs"),o=require("react"),c=require("../../TextFieldWrapper-BC0mP63G.cjs"),d=o.forwardRef(function(e,s){const{dir:t="rtl",placeholderDir:l=t,className:u,...r}=e;return i.jsx(c.TextFieldWrapper,{...e,children:({handleChangeField:a})=>i.jsx("textarea",{...r,ref:s,className:n.clsx("dgs-ui-kit-bg-transparent dgs-ui-kit-w-full dgs-ui-kit-h-full focus:dgs-ui-kit-outline-none ss02 dgs-ui-kit-flex-1 dgs-ui-kit-resize-none",t==="rtl"?"dgs-ui-kit-text-right":"!dgs-ui-kit-text-left",l==="rtl"?"placeholder:dgs-ui-kit-text-right":"placeholder:dgs-ui-kit-text-left",u),onChange:a,rows:r.rows??5})})});module.exports=d;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { c as d } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { forwardRef as u } from "react";
|
|
4
|
-
import { T as n } from "../../TextFieldWrapper-
|
|
4
|
+
import { T as n } from "../../TextFieldWrapper-Dva9vxfn.js";
|
|
5
5
|
const m = u(function(t, s) {
|
|
6
6
|
const { dir: e = "rtl", placeholderDir: l = e, className: o, ...r } = t;
|
|
7
7
|
return /* @__PURE__ */ i(n, { ...t, children: ({ handleChangeField: a }) => /* @__PURE__ */ i(
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
1
2
|
import { TextFieldBaseProps } from './TextFieldWrapper';
|
|
2
3
|
interface FieldLabelProps extends Pick<TextFieldBaseProps, 'link' | 'labelContent'> {
|
|
3
4
|
required?: boolean;
|
|
4
5
|
disabled?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare const FieldLabel:
|
|
7
|
+
declare const FieldLabel: FC<PropsWithChildren<FieldLabelProps>>;
|
|
7
8
|
export default FieldLabel;
|
|
8
9
|
//# sourceMappingURL=FieldLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Wrappers/TextFieldWrapper/FieldLabel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,UAAU,eAAgB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,cAAc,CAAC;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"FieldLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Wrappers/TextFieldWrapper/FieldLabel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,UAAU,eAAgB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,cAAc,CAAC;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAgCtD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ChangeEvent, ChangeEventHandler, Dispatch, ReactNode, SetStateAction } from 'react';
|
|
1
|
+
import { default as React, ChangeEvent, ChangeEventHandler, Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
2
|
export interface TextFieldBaseProps {
|
|
3
3
|
labelContent?: string;
|
|
4
|
+
labelAddon?: React.ReactNode;
|
|
4
5
|
link?: {
|
|
5
6
|
cnotent: string;
|
|
6
7
|
href: string;
|
|
@@ -24,6 +25,7 @@ interface TextFieldWrapperProps<T> extends TextFieldBaseProps {
|
|
|
24
25
|
required?: boolean;
|
|
25
26
|
disabled?: boolean;
|
|
26
27
|
maxLength?: number;
|
|
28
|
+
labelAddon?: React.ReactNode;
|
|
27
29
|
value?: string | number | readonly string[];
|
|
28
30
|
onChange?: ChangeEventHandler<T>;
|
|
29
31
|
children: (argumants: TextFieldFunctionArgumants<T>) => ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.tsx"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"TextFieldWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAGZ,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAIf,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,IAAI,CAAC,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACxB,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,0BAA0B,CAAC,CAAC;IACpC,iBAAiB,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC/C,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;CAC5C;AAED,UAAU,qBAAqB,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACjC,QAAQ,EAAE,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;CACnE;AAED,QAAA,MAAM,gBAAgB,GAAI,CAAC,SAAS,mBAAmB,GAAG,gBAAgB,SACjE,qBAAqB,CAAC,CAAC,CAAC,4CAyFhC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -167,7 +167,7 @@ const $ = (e) => {
|
|
|
167
167
|
Object.entries(n).filter(([o]) => o !== "children")
|
|
168
168
|
), h = j(null), m = Math.ceil(L / Math.floor(s)), B = (f || c && c !== "hide" || k) && m > 1;
|
|
169
169
|
function D(o) {
|
|
170
|
-
if (Math.ceil(Math.abs(o.currentTarget.scrollLeft)) + o.currentTarget.clientWidth === o.currentTarget.scrollWidth) {
|
|
170
|
+
if (Math.ceil(Math.abs(o.currentTarget.scrollLeft)) + o.currentTarget.clientWidth + 1 === o.currentTarget.scrollWidth) {
|
|
171
171
|
b(m - 1);
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const e=require("react/jsx-runtime"),x=require("./clsx-C11secjj.cjs"),r=require("react"),W=require("./ArrowLeft2-B76dkC-C.cjs"),B=require("./ArrowRight2-CYowPzS8.cjs"),T=require("./Button/index.cjs"),P=r.createContext({slidesPerView:1,spaceBetween:0,navigationVariant:"outside",showNavigationDots:!0,showPaginationText:!1}),b=()=>r.useContext(P);function D({active:i,autoplay:s,variant:n="outside"}){return[{inside:"dgs-ui-kit-bg-gray-500/50 hover:dgs-ui-kit-bg-gray-500/80",outside:"dgs-ui-kit-bg-gray-200 hover:dgs-ui-kit-bg-gray-300"}[n],i?"dgs-ui-kit-w-[22px]":"dgs-ui-kit-w-[6px]",s?"dgs-ui-kit-p-[1px]":""]}const q=i=>{const{active:s,onClick:n,onNavigateToNext:a}=i,{autoplay:t,navigationVariant:l="outside"}=b(),[k,o]=r.useState(0);return r.useEffect(()=>{if(!s||!t)return;const g=typeof t=="boolean"?7e3:t?.delay??7e3;let u=Date.now();const v=setInterval(()=>{const f=Date.now()-u,c=f/g*100;o(Math.min(c,100)),f>=g&&typeof a=="function"&&a()},100);return function(){return o(0),u=Date.now(),clearInterval(v)}},[s,t,a]),e.jsx("button",{className:x.clsx("dgs-ui-kit-rounded-full dgs-ui-kit-overflow-hidden dgs-ui-kit-transition-all dgs-ui-kit-h-[6px]",D({active:s,autoplay:t,variant:l})),onClick:n,children:s&&e.jsx("div",{className:x.clsx("dgs-ui-kit-h-full dgs-ui-kit-rounded-full",{"dgs-ui-kit-bg-white":l==="inside","dgs-ui-kit-bg-gray-700":l==="outside"}),style:{width:t?`${k}%`:"100%"}})})},O=i=>{const{onNavigate:s,slideIndex:n,slidesCount:a}=i,{navigationButtonsShowType:t="hide",dotsClassName:l,navigationContainerClassName:k,navigationVariant:o="outside",showNavigationDots:g=!0,showPaginationText:u}=b(),v=e.jsxs("div",{className:x.clsx("dgs-ui-kit-flex dgs-ui-kit-gap-2",{"dgs-ui-kit-absolute dgs-ui-kit-bottom-0 dgs-ui-kit-left-[5.5%]":o==="inside"&&t!=="onSides","dgs-ui-kit-absolute dgs-ui-kit-justify-between dgs-ui-kit-top-1/2 -dgs-ui-kit-translate-y-1/2 dgs-ui-kit-w-full dgs-ui-kit-px-[5.5%]":t==="onSides","dgs-ui-kit-opacity-0 group-hover:dgs-ui-kit-opacity-100 dgs-ui-kit-transition":t==="hover"||t==="onSides"}),children:[e.jsx(T,{type:"button",variant:"secondary",onClick:()=>s(n-1),rightIcon:e.jsx(B.ArrowRight2Icon,{})}),e.jsx(T,{type:"button",variant:"secondary",onClick:()=>s(n+1),rightIcon:e.jsx(W.ArrowLeft2Icon,{})})]});return e.jsxs(e.Fragment,{children:[t&&t!=="hide"&&t==="onSides"&&v,e.jsxs("div",{className:x.clsx("dgs-ui-kit-flex",{"dgs-ui-kit-items-center dgs-ui-kit-mt-2":o==="outside","dgs-ui-kit-absolute dgs-ui-kit-bottom-4 dgs-ui-kit-w-full dgs-ui-kit-justify-center":o==="inside","dgs-ui-kit-justify-between":o==="outside"&&t!=="hide"&&t!=="onSides","dgs-ui-kit-justify-center":o==="outside"&&(t==="hide"||t==="onSides")},k),children:[t&&t!=="hide"&&t!=="onSides"&&v,(g||u)&&e.jsxs("div",{className:"dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-3",children:[u&&e.jsxs("div",{className:"dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-1 dgs-ui-kit-font-caption-regular dgs-ui-kit-text-gray-400 ss02",children:[e.jsx("span",{className:x.clsx("dgs-ui-kit-font-bold",{"dgs-ui-kit-text-gray-600":o==="outside","dgs-ui-kit-text-white":o==="inside"}),children:n+1}),e.jsx("span",{children:"از"}),e.jsx("span",{children:a})]}),g&&e.jsx("div",{className:x.clsx("dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-justify-center dgs-ui-kit-gap-2",l),children:Array.from(Array(a).keys()).map((f,c)=>e.jsx(q,{active:n===c,onClick:()=>s(c),onNavigateToNext:()=>s(n+1)},f+a))})]})]})]})},I=r.forwardRef((i,s)=>{const[n,a]=r.useState(i),{className:t="",containerClassName:l="",showNavigationDots:k=!0,slidesPerView:o=1,navigationButtonsShowType:g="hide",spaceBetween:u=0,showPaginationText:v,onSlideIndexChange:f,initialSlide:c}=n,[w,N]=r.useState(0),[R,A]=r.useState(0),L=Object.fromEntries(Object.entries(n).filter(([d])=>d!=="children")),h=r.useRef(null),m=Math.ceil(R/Math.floor(o)),M=(k||g&&g!=="hide"||v)&&m>1;function E(d){if(Math.ceil(Math.abs(d.currentTarget.scrollLeft))+d.currentTarget.clientWidth===d.currentTarget.scrollWidth){N(m-1);return}const p=d.currentTarget.scrollWidth/m,y=(d.currentTarget.scrollWidth-d.currentTarget.scrollLeft)/p;if(y<=m){N(0);return}N(Math.round(y%m))}function j(d){if(!h.current)return;const p=h.current.offsetWidth,S=(w-d)*p;d<0?h.current.scrollTo({behavior:"smooth",left:-(p*m)}):d>=m?h.current.scrollTo({behavior:"smooth",left:0}):h.current.scrollBy({behavior:"smooth",left:S})}function C(){const p=Object.keys(i.responsive).sort().findLast(S=>Number(S)<=window.innerWidth),y=p?i.responsive[Number(p)]:null;a(y?{...n,...y}:i)}return r.useImperativeHandle(s,()=>({element:h.current,navigate:d=>j(Math.max(0,d-1))})),r.useEffect(()=>{h.current&&A(h.current.childNodes.length)},[i.children]),r.useEffect(()=>{if(!(!i.responsive||Object.keys(i.responsive).length<=0))return C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[i.responsive]),r.useEffect(()=>{f&&typeof f=="function"&&f(w)},[w]),r.useEffect(()=>{typeof c=="number"&&h.current&&j(Math.max(0,c-1))},[c,h.current]),e.jsx(P.Provider,{value:L,children:e.jsxs("div",{className:x.clsx("dgs-ui-kit-overflow-hidden dgs-ui-kit-relative dgs-ui-kit-group",t),style:{direction:"rtl"},children:[e.jsx("div",{className:x.clsx("dgs-ui-kit-flex dgs-ui-kit-snap-x dgs-ui-kit-snap-mandatory dgs-ui-kit-overflow-x-auto no-scrollbar",l),style:{marginLeft:-u},onScroll:E,ref:h,children:i.children}),M&&e.jsx(O,{onNavigate:j,slideIndex:w,slidesCount:m})]})})});I.displayName="Slider";function V({slidesPerView:i,childIndex:s,centerMode:n,childrenCount:a}){const t=s%Math.floor(i)===0,l=i%1!==0,k=s===0,o=s===a-1;return t?n&&l?k?"start":o?"end":"center":"start":"none"}const F=i=>{const{children:s,className:n,style:a,...t}=i,{slidesPerView:l=1,spaceBetween:k=0,centerMode:o=!1,containerXPadding:g=0}=b(),u=r.useRef(null),[v,f]=r.useState(0),c=u.current?.parentNode?.children.length;return r.useEffect(()=>{u.current&&f(Array.prototype.indexOf.call(u.current.parentNode?.children,u.current))},[u]),e.jsx("div",{...t,ref:u,className:x.clsx("dgs-ui-kit-shrink-0 dgs-ui-kit-snap-normal",n),style:{width:100/(l??1)+"%",paddingLeft:c&&v===c-1?g+k:k,paddingRight:v===0?g:0,scrollSnapAlign:V({slidesPerView:l,childIndex:v,centerMode:o,childrenCount:c||0}),...a},children:s})};exports.Slide=F;exports.Slider=I;
|
|
1
|
+
"use client";"use strict";const e=require("react/jsx-runtime"),x=require("./clsx-C11secjj.cjs"),r=require("react"),W=require("./ArrowLeft2-B76dkC-C.cjs"),B=require("./ArrowRight2-CYowPzS8.cjs"),T=require("./Button/index.cjs"),P=r.createContext({slidesPerView:1,spaceBetween:0,navigationVariant:"outside",showNavigationDots:!0,showPaginationText:!1}),b=()=>r.useContext(P);function D({active:i,autoplay:s,variant:n="outside"}){return[{inside:"dgs-ui-kit-bg-gray-500/50 hover:dgs-ui-kit-bg-gray-500/80",outside:"dgs-ui-kit-bg-gray-200 hover:dgs-ui-kit-bg-gray-300"}[n],i?"dgs-ui-kit-w-[22px]":"dgs-ui-kit-w-[6px]",s?"dgs-ui-kit-p-[1px]":""]}const q=i=>{const{active:s,onClick:n,onNavigateToNext:a}=i,{autoplay:t,navigationVariant:l="outside"}=b(),[k,o]=r.useState(0);return r.useEffect(()=>{if(!s||!t)return;const g=typeof t=="boolean"?7e3:t?.delay??7e3;let u=Date.now();const v=setInterval(()=>{const f=Date.now()-u,c=f/g*100;o(Math.min(c,100)),f>=g&&typeof a=="function"&&a()},100);return function(){return o(0),u=Date.now(),clearInterval(v)}},[s,t,a]),e.jsx("button",{className:x.clsx("dgs-ui-kit-rounded-full dgs-ui-kit-overflow-hidden dgs-ui-kit-transition-all dgs-ui-kit-h-[6px]",D({active:s,autoplay:t,variant:l})),onClick:n,children:s&&e.jsx("div",{className:x.clsx("dgs-ui-kit-h-full dgs-ui-kit-rounded-full",{"dgs-ui-kit-bg-white":l==="inside","dgs-ui-kit-bg-gray-700":l==="outside"}),style:{width:t?`${k}%`:"100%"}})})},O=i=>{const{onNavigate:s,slideIndex:n,slidesCount:a}=i,{navigationButtonsShowType:t="hide",dotsClassName:l,navigationContainerClassName:k,navigationVariant:o="outside",showNavigationDots:g=!0,showPaginationText:u}=b(),v=e.jsxs("div",{className:x.clsx("dgs-ui-kit-flex dgs-ui-kit-gap-2",{"dgs-ui-kit-absolute dgs-ui-kit-bottom-0 dgs-ui-kit-left-[5.5%]":o==="inside"&&t!=="onSides","dgs-ui-kit-absolute dgs-ui-kit-justify-between dgs-ui-kit-top-1/2 -dgs-ui-kit-translate-y-1/2 dgs-ui-kit-w-full dgs-ui-kit-px-[5.5%]":t==="onSides","dgs-ui-kit-opacity-0 group-hover:dgs-ui-kit-opacity-100 dgs-ui-kit-transition":t==="hover"||t==="onSides"}),children:[e.jsx(T,{type:"button",variant:"secondary",onClick:()=>s(n-1),rightIcon:e.jsx(B.ArrowRight2Icon,{})}),e.jsx(T,{type:"button",variant:"secondary",onClick:()=>s(n+1),rightIcon:e.jsx(W.ArrowLeft2Icon,{})})]});return e.jsxs(e.Fragment,{children:[t&&t!=="hide"&&t==="onSides"&&v,e.jsxs("div",{className:x.clsx("dgs-ui-kit-flex",{"dgs-ui-kit-items-center dgs-ui-kit-mt-2":o==="outside","dgs-ui-kit-absolute dgs-ui-kit-bottom-4 dgs-ui-kit-w-full dgs-ui-kit-justify-center":o==="inside","dgs-ui-kit-justify-between":o==="outside"&&t!=="hide"&&t!=="onSides","dgs-ui-kit-justify-center":o==="outside"&&(t==="hide"||t==="onSides")},k),children:[t&&t!=="hide"&&t!=="onSides"&&v,(g||u)&&e.jsxs("div",{className:"dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-3",children:[u&&e.jsxs("div",{className:"dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-1 dgs-ui-kit-font-caption-regular dgs-ui-kit-text-gray-400 ss02",children:[e.jsx("span",{className:x.clsx("dgs-ui-kit-font-bold",{"dgs-ui-kit-text-gray-600":o==="outside","dgs-ui-kit-text-white":o==="inside"}),children:n+1}),e.jsx("span",{children:"از"}),e.jsx("span",{children:a})]}),g&&e.jsx("div",{className:x.clsx("dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-justify-center dgs-ui-kit-gap-2",l),children:Array.from(Array(a).keys()).map((f,c)=>e.jsx(q,{active:n===c,onClick:()=>s(c),onNavigateToNext:()=>s(n+1)},f+a))})]})]})]})},I=r.forwardRef((i,s)=>{const[n,a]=r.useState(i),{className:t="",containerClassName:l="",showNavigationDots:k=!0,slidesPerView:o=1,navigationButtonsShowType:g="hide",spaceBetween:u=0,showPaginationText:v,onSlideIndexChange:f,initialSlide:c}=n,[w,N]=r.useState(0),[R,A]=r.useState(0),L=Object.fromEntries(Object.entries(n).filter(([d])=>d!=="children")),h=r.useRef(null),m=Math.ceil(R/Math.floor(o)),M=(k||g&&g!=="hide"||v)&&m>1;function E(d){if(Math.ceil(Math.abs(d.currentTarget.scrollLeft))+d.currentTarget.clientWidth+1===d.currentTarget.scrollWidth){N(m-1);return}const p=d.currentTarget.scrollWidth/m,y=(d.currentTarget.scrollWidth-d.currentTarget.scrollLeft)/p;if(y<=m){N(0);return}N(Math.round(y%m))}function j(d){if(!h.current)return;const p=h.current.offsetWidth,S=(w-d)*p;d<0?h.current.scrollTo({behavior:"smooth",left:-(p*m)}):d>=m?h.current.scrollTo({behavior:"smooth",left:0}):h.current.scrollBy({behavior:"smooth",left:S})}function C(){const p=Object.keys(i.responsive).sort().findLast(S=>Number(S)<=window.innerWidth),y=p?i.responsive[Number(p)]:null;a(y?{...n,...y}:i)}return r.useImperativeHandle(s,()=>({element:h.current,navigate:d=>j(Math.max(0,d-1))})),r.useEffect(()=>{h.current&&A(h.current.childNodes.length)},[i.children]),r.useEffect(()=>{if(!(!i.responsive||Object.keys(i.responsive).length<=0))return C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[i.responsive]),r.useEffect(()=>{f&&typeof f=="function"&&f(w)},[w]),r.useEffect(()=>{typeof c=="number"&&h.current&&j(Math.max(0,c-1))},[c,h.current]),e.jsx(P.Provider,{value:L,children:e.jsxs("div",{className:x.clsx("dgs-ui-kit-overflow-hidden dgs-ui-kit-relative dgs-ui-kit-group",t),style:{direction:"rtl"},children:[e.jsx("div",{className:x.clsx("dgs-ui-kit-flex dgs-ui-kit-snap-x dgs-ui-kit-snap-mandatory dgs-ui-kit-overflow-x-auto no-scrollbar",l),style:{marginLeft:-u},onScroll:E,ref:h,children:i.children}),M&&e.jsx(O,{onNavigate:j,slideIndex:w,slidesCount:m})]})})});I.displayName="Slider";function V({slidesPerView:i,childIndex:s,centerMode:n,childrenCount:a}){const t=s%Math.floor(i)===0,l=i%1!==0,k=s===0,o=s===a-1;return t?n&&l?k?"start":o?"end":"center":"start":"none"}const F=i=>{const{children:s,className:n,style:a,...t}=i,{slidesPerView:l=1,spaceBetween:k=0,centerMode:o=!1,containerXPadding:g=0}=b(),u=r.useRef(null),[v,f]=r.useState(0),c=u.current?.parentNode?.children.length;return r.useEffect(()=>{u.current&&f(Array.prototype.indexOf.call(u.current.parentNode?.children,u.current))},[u]),e.jsx("div",{...t,ref:u,className:x.clsx("dgs-ui-kit-shrink-0 dgs-ui-kit-snap-normal",n),style:{width:100/(l??1)+"%",paddingLeft:c&&v===c-1?g+k:k,paddingRight:v===0?g:0,scrollSnapAlign:V({slidesPerView:l,childIndex:v,centerMode:o,childrenCount:c||0}),...a},children:s})};exports.Slide=F;exports.Slider=I;
|
package/dist/Slider/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../assets/styles.css');;/* empty css */const e=require("../Slide-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../assets/styles.css');;/* empty css */const e=require("../Slide-DlUl47v_.cjs");exports.Slide=e.Slide;exports.Slider=e.Slider;
|
package/dist/Slider/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";require('./assets/styles.css');const e=require("react/jsx-runtime"),u=require("./clsx-C11secjj.cjs"),h=require("react");;/* empty css */const E=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...r,children:[e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.25 3.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5M2.5 12a9.75 9.75 0 0 1 9.75-9.75A9.75 9.75 0 0 1 22 12c0 5.384-4.365 9.75-9.75 9.75S2.5 17.384 2.5 12",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.25 7.541a.75.75 0 0 1 .75.75v.063a.75.75 0 0 1-1.5 0v-.063a.75.75 0 0 1 .75-.75m.006 3.103a.75.75 0 0 1 .75.75v4.3a.75.75 0 0 1-1.5 0v-4.3a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})]}),N=r=>{const{errorMessage:i,hintMessage:t,maxLength:s,value:d,disabled:n}=r;return e.jsxs("div",{className:u.clsx("dgs-ui-kit-flex dgs-ui-kit-font-p3-regular",{"dgs-ui-kit-justify-between":(i||t)&&s,"dgs-ui-kit-justify-start":(i||t)&&!s,"dgs-ui-kit-justify-end":!(i||t)&&s,"dgs-ui-kit-text-gray-400":n},i?"dgs-ui-kit-text-error-500":"dgs-ui-kit-text-gray-500"),children:[(i||t)&&e.jsxs("div",{className:u.clsx("dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-2 dgs-ui-kit-font-light",{"dgs-ui-kit-text-gray-400":n}),children:[e.jsx(E,{width:16,height:16}),e.jsx("span",{children:i||t})]}),s&&e.jsxs("span",{className:"ss02",children:[d?.length??0,"/",s]})]})},C=r=>{const{link:i,labelContent:t,required:s,disabled:d,children:n}=r;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:u.clsx("dgs-ui-kit-flex",{"dgs-ui-kit-justify-between":t&&i?.href,"dgs-ui-kit-mb-2":!n,"dgs-ui-kit-justify-start":t&&!i?.href,"dgs-ui-kit-justify-end":!t&&i?.href,"dgs-ui-kit-text-gray-400":d}),children:[t&&e.jsxs("label",{className:"dgs-ui-kit-px-0 dgs-ui-kit-font-p2-medium md:dgs-ui-kit-mx-0",children:[t,s&&e.jsx("span",{className:"dgs-ui-kit-ms-2 dgs-ui-kit-text-error-500",children:"*"})]}),i?.href&&e.jsx("a",{href:i.href,className:"dgs-ui-kit-font-button-small dgs-ui-kit-text-primary-400",children:i.cnotent})]}),n]})},R=r=>{const{labelContent:i,link:t,containerClassName:s,rightIcon:d,isError:n,errorMessage:g,hintMessage:k,required:F,labelAddon:M,maxLength:x,disabled:o,value:l,wrapperClassName:f,showMaxLength:m,onChange:p,children:q}=r,[v,c]=h.useState(l?.toString()??"");h.useEffect(()=>{typeof l<"u"&&l!==null&&c(l?.toString())},[l]);const I=a=>{c(a.currentTarget.value),p&&p(a)},j=!!(g||k||x&&m),b=!!(i||t?.href),y=j||b?"div":h.Fragment,L=a=>{const w=a.currentTarget.querySelector("textarea, input");w&&w.focus()};return e.jsxs(y,{...y==="div"&&f?{className:f}:{},children:[b&&e.jsx(C,{disabled:o,labelContent:i,link:t,required:F,children:M}),e.jsxs("div",{onClick:L,className:u.clsx("dgs-ui-kit-relative dgs-ui-kit-cursor-text dgs-ui-kit-border dgs-ui-kit-border-solid dgs-ui-kit-rounded-lg dgs-ui-kit-ring-4 dgs-ui-kit-flex dgs-ui-kit-justify-between dgs-ui-kit-gap-x-3 dgs-ui-kit-p-3 dgs-ui-kit-bg-gray-100 dgs-ui-kit-transition-all dgs-ui-kit-ring-transparent hover:dgs-ui-kit-ring-gray-50 has-[:focus]:dgs-ui-kit-bg-white ",n||g?"dgs-ui-kit-border-error-500 has-[:focus]:dgs-ui-kit-ring-error-50":"dgs-ui-kit-border-transparent hover:dgs-ui-kit-border-gray-300 has-[:focus]:dgs-ui-kit-border-primary-500 has-[:focus]:dgs-ui-kit-ring-primary-50",s,{"dgs-ui-kit-text-gray-400":o}),children:[d&&e.jsx("div",{className:"dgs-ui-kit-text-gray-600",children:d}),q({handleChangeField:I,setValue:c,value:v})]}),j&&e.jsx(N,{disabled:o,errorMessage:g,hintMessage:k,maxLength:m?x:void 0,value:v})]})};exports.FieldBottomInfo=N;exports.FieldLabel=C;exports.TextFieldWrapper=R;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as s, jsx as r, Fragment as I } from "react/jsx-runtime";
|
|
3
3
|
import { c as g } from "./clsx-OuTLNxxd.js";
|
|
4
|
-
import
|
|
4
|
+
import E, { useState as L, useEffect as R } from "react";
|
|
5
5
|
import './assets/styles.css';/* empty css */
|
|
6
|
-
const
|
|
6
|
+
const S = (n) => /* @__PURE__ */ s(
|
|
7
7
|
"svg",
|
|
8
8
|
{
|
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13,7 +13,7 @@ const L = (n) => /* @__PURE__ */ r(
|
|
|
13
13
|
viewBox: "0 0 24 24",
|
|
14
14
|
...n,
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ r(
|
|
17
17
|
"path",
|
|
18
18
|
{
|
|
19
19
|
fill: "currentColor",
|
|
@@ -22,7 +22,7 @@ const L = (n) => /* @__PURE__ */ r(
|
|
|
22
22
|
clipRule: "evenodd"
|
|
23
23
|
}
|
|
24
24
|
),
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ r(
|
|
26
26
|
"path",
|
|
27
27
|
{
|
|
28
28
|
fill: "currentColor",
|
|
@@ -33,9 +33,9 @@ const L = (n) => /* @__PURE__ */ r(
|
|
|
33
33
|
)
|
|
34
34
|
]
|
|
35
35
|
}
|
|
36
|
-
),
|
|
37
|
-
const { errorMessage: i, hintMessage: e, maxLength: t, value:
|
|
38
|
-
return /* @__PURE__ */
|
|
36
|
+
), B = (n) => {
|
|
37
|
+
const { errorMessage: i, hintMessage: e, maxLength: t, value: a, disabled: d } = n;
|
|
38
|
+
return /* @__PURE__ */ s(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
41
|
className: g(
|
|
@@ -44,106 +44,112 @@ const L = (n) => /* @__PURE__ */ r(
|
|
|
44
44
|
"dgs-ui-kit-justify-between": (i || e) && t,
|
|
45
45
|
"dgs-ui-kit-justify-start": (i || e) && !t,
|
|
46
46
|
"dgs-ui-kit-justify-end": !(i || e) && t,
|
|
47
|
-
"dgs-ui-kit-text-gray-400":
|
|
47
|
+
"dgs-ui-kit-text-gray-400": d
|
|
48
48
|
},
|
|
49
49
|
i ? "dgs-ui-kit-text-error-500" : "dgs-ui-kit-text-gray-500"
|
|
50
50
|
),
|
|
51
51
|
children: [
|
|
52
|
-
(i || e) && /* @__PURE__ */
|
|
52
|
+
(i || e) && /* @__PURE__ */ s(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
55
|
className: g(
|
|
56
56
|
"dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-2 dgs-ui-kit-font-light",
|
|
57
57
|
{
|
|
58
|
-
"dgs-ui-kit-text-gray-400":
|
|
58
|
+
"dgs-ui-kit-text-gray-400": d
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
|
|
62
|
+
/* @__PURE__ */ r(
|
|
63
|
+
S,
|
|
64
64
|
{
|
|
65
65
|
width: 16,
|
|
66
66
|
height: 16
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ r("span", { children: i || e })
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
|
-
t && /* @__PURE__ */
|
|
74
|
-
|
|
73
|
+
t && /* @__PURE__ */ s("span", { className: "ss02", children: [
|
|
74
|
+
a?.length ?? 0,
|
|
75
75
|
"/",
|
|
76
76
|
t
|
|
77
77
|
] })
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
|
-
},
|
|
82
|
-
const { link: i, labelContent: e, required: t, disabled: d } = n;
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"dgs-ui-kit-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
81
|
+
}, T = (n) => {
|
|
82
|
+
const { link: i, labelContent: e, required: t, disabled: a, children: d } = n;
|
|
83
|
+
return /* @__PURE__ */ s(I, { children: [
|
|
84
|
+
/* @__PURE__ */ s(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: g("dgs-ui-kit-flex", {
|
|
88
|
+
"dgs-ui-kit-justify-between": e && i?.href,
|
|
89
|
+
"dgs-ui-kit-mb-2": !d,
|
|
90
|
+
"dgs-ui-kit-justify-start": e && !i?.href,
|
|
91
|
+
"dgs-ui-kit-justify-end": !e && i?.href,
|
|
92
|
+
"dgs-ui-kit-text-gray-400": a
|
|
93
|
+
}),
|
|
94
|
+
children: [
|
|
95
|
+
e && /* @__PURE__ */ s("label", { className: "dgs-ui-kit-px-0 dgs-ui-kit-font-p2-medium md:dgs-ui-kit-mx-0", children: [
|
|
96
|
+
e,
|
|
97
|
+
t && /* @__PURE__ */ r("span", { className: "dgs-ui-kit-ms-2 dgs-ui-kit-text-error-500", children: "*" })
|
|
98
|
+
] }),
|
|
99
|
+
i?.href && /* @__PURE__ */ r(
|
|
100
|
+
"a",
|
|
101
|
+
{
|
|
102
|
+
href: i.href,
|
|
103
|
+
className: "dgs-ui-kit-font-button-small dgs-ui-kit-text-primary-400",
|
|
104
|
+
children: i.cnotent
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
d
|
|
111
|
+
] });
|
|
112
|
+
}, D = (n) => {
|
|
109
113
|
const {
|
|
110
114
|
labelContent: i,
|
|
111
115
|
link: e,
|
|
112
116
|
containerClassName: t,
|
|
113
|
-
rightIcon:
|
|
114
|
-
isError:
|
|
117
|
+
rightIcon: a,
|
|
118
|
+
isError: d,
|
|
115
119
|
errorMessage: o,
|
|
116
|
-
hintMessage:
|
|
120
|
+
hintMessage: k,
|
|
117
121
|
required: N,
|
|
122
|
+
labelAddon: j,
|
|
118
123
|
maxLength: f,
|
|
119
124
|
disabled: c,
|
|
120
|
-
value:
|
|
125
|
+
value: l,
|
|
121
126
|
wrapperClassName: m,
|
|
122
127
|
showMaxLength: p,
|
|
123
128
|
onChange: x,
|
|
124
|
-
children:
|
|
125
|
-
} = n, [v,
|
|
126
|
-
|
|
127
|
-
typeof
|
|
128
|
-
}, [
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
}, b = !!(o ||
|
|
132
|
-
return /* @__PURE__ */
|
|
129
|
+
children: F
|
|
130
|
+
} = n, [v, h] = L(l?.toString() ?? "");
|
|
131
|
+
R(() => {
|
|
132
|
+
typeof l < "u" && l !== null && h(l?.toString());
|
|
133
|
+
}, [l]);
|
|
134
|
+
const M = (u) => {
|
|
135
|
+
h(u.currentTarget.value), x && x(u);
|
|
136
|
+
}, b = !!(o || k || f && p), y = !!(i || e?.href), w = b || y ? "div" : E.Fragment;
|
|
137
|
+
return /* @__PURE__ */ s(
|
|
133
138
|
w,
|
|
134
139
|
{
|
|
135
140
|
...w === "div" && m ? { className: m } : {},
|
|
136
141
|
children: [
|
|
137
|
-
y && /* @__PURE__ */
|
|
138
|
-
|
|
142
|
+
y && /* @__PURE__ */ r(
|
|
143
|
+
T,
|
|
139
144
|
{
|
|
140
145
|
disabled: c,
|
|
141
146
|
labelContent: i,
|
|
142
147
|
link: e,
|
|
143
|
-
required: N
|
|
148
|
+
required: N,
|
|
149
|
+
children: j
|
|
144
150
|
}
|
|
145
151
|
),
|
|
146
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ s(
|
|
147
153
|
"div",
|
|
148
154
|
{
|
|
149
155
|
onClick: (u) => {
|
|
@@ -152,24 +158,24 @@ const L = (n) => /* @__PURE__ */ r(
|
|
|
152
158
|
},
|
|
153
159
|
className: g(
|
|
154
160
|
"dgs-ui-kit-relative dgs-ui-kit-cursor-text dgs-ui-kit-border dgs-ui-kit-border-solid dgs-ui-kit-rounded-lg dgs-ui-kit-ring-4 dgs-ui-kit-flex dgs-ui-kit-justify-between dgs-ui-kit-gap-x-3 dgs-ui-kit-p-3 dgs-ui-kit-bg-gray-100 dgs-ui-kit-transition-all dgs-ui-kit-ring-transparent hover:dgs-ui-kit-ring-gray-50 has-[:focus]:dgs-ui-kit-bg-white ",
|
|
155
|
-
|
|
161
|
+
d || o ? "dgs-ui-kit-border-error-500 has-[:focus]:dgs-ui-kit-ring-error-50" : "dgs-ui-kit-border-transparent hover:dgs-ui-kit-border-gray-300 has-[:focus]:dgs-ui-kit-border-primary-500 has-[:focus]:dgs-ui-kit-ring-primary-50",
|
|
156
162
|
t,
|
|
157
163
|
{
|
|
158
164
|
"dgs-ui-kit-text-gray-400": c
|
|
159
165
|
}
|
|
160
166
|
),
|
|
161
167
|
children: [
|
|
162
|
-
|
|
163
|
-
|
|
168
|
+
a && /* @__PURE__ */ r("div", { className: "dgs-ui-kit-text-gray-600", children: a }),
|
|
169
|
+
F({ handleChangeField: M, setValue: h, value: v })
|
|
164
170
|
]
|
|
165
171
|
}
|
|
166
172
|
),
|
|
167
|
-
b && /* @__PURE__ */
|
|
168
|
-
|
|
173
|
+
b && /* @__PURE__ */ r(
|
|
174
|
+
B,
|
|
169
175
|
{
|
|
170
176
|
disabled: c,
|
|
171
177
|
errorMessage: o,
|
|
172
|
-
hintMessage:
|
|
178
|
+
hintMessage: k,
|
|
173
179
|
maxLength: p ? f : void 0,
|
|
174
180
|
value: v
|
|
175
181
|
}
|
|
@@ -179,7 +185,7 @@ const L = (n) => /* @__PURE__ */ r(
|
|
|
179
185
|
);
|
|
180
186
|
};
|
|
181
187
|
export {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
188
|
+
T as F,
|
|
189
|
+
D as T,
|
|
190
|
+
B as a
|
|
185
191
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/styles.css');;/* empty css */const r=require("./AccordionItem-AwBSlD0h.cjs"),o=require("./Alert/index.cjs"),t=require("./Badge/index.cjs"),i=require("./Breadcrumb/index.cjs"),n=require("./Button/index.cjs"),c=require("./Divider/index.cjs"),u=require("./Drawer/index.cjs"),s=require("./Form/Checkbox/index.cjs"),a=require("./Form/Input/index.cjs"),d=require("./Form/OtpInput/index.cjs"),q=require("./Form/RadioButton/index.cjs"),m=require("./Form/Textarea/index.cjs"),l=require("./Pagination/index.cjs"),B=require("./Progress/Bar/index.cjs"),e=require("./Slide-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/styles.css');;/* empty css */const r=require("./AccordionItem-AwBSlD0h.cjs"),o=require("./Alert/index.cjs"),t=require("./Badge/index.cjs"),i=require("./Breadcrumb/index.cjs"),n=require("./Button/index.cjs"),c=require("./Divider/index.cjs"),u=require("./Drawer/index.cjs"),s=require("./Form/Checkbox/index.cjs"),a=require("./Form/Input/index.cjs"),d=require("./Form/OtpInput/index.cjs"),q=require("./Form/RadioButton/index.cjs"),m=require("./Form/Textarea/index.cjs"),l=require("./Pagination/index.cjs"),B=require("./Progress/Bar/index.cjs"),e=require("./Slide-DlUl47v_.cjs"),p=require("./Tabs/index.cjs");exports.AccordionGroup=r.AccordionGroup;exports.AccordionItem=r.AccordionItem;exports.Alert=o;exports.Badge=t;exports.Breadcrumb=i;exports.Button=n;exports.Divider=c;exports.Drawer=u;exports.Checkbox=s;exports.Input=a;exports.OtpInput=d;exports.RadioButton=q;exports.Textarea=m;exports.Pagination=l;exports.ProgressBar=B;exports.Slide=e.Slide;exports.Slider=e.Slider;exports.Tabs=p;
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { default as T } from "./Form/RadioButton/index.js";
|
|
|
13
13
|
import { default as k } from "./Form/Textarea/index.js";
|
|
14
14
|
import { default as w } from "./Pagination/index.js";
|
|
15
15
|
import { default as G } from "./Progress/Bar/index.js";
|
|
16
|
-
import { a as R, S as j } from "./Slide-
|
|
16
|
+
import { a as R, S as j } from "./Slide-CdflnA1A.js";
|
|
17
17
|
import { default as y } from "./Tabs/index.js";
|
|
18
18
|
export {
|
|
19
19
|
e as AccordionGroup,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";require('./assets/styles.css');const e=require("react/jsx-runtime"),u=require("./clsx-C11secjj.cjs"),k=require("react");;/* empty css */const L=r=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...r,children:[e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.25 3.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5M2.5 12a9.75 9.75 0 0 1 9.75-9.75A9.75 9.75 0 0 1 22 12c0 5.384-4.365 9.75-9.75 9.75S2.5 17.384 2.5 12",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.25 7.541a.75.75 0 0 1 .75.75v.063a.75.75 0 0 1-1.5 0v-.063a.75.75 0 0 1 .75-.75m.006 3.103a.75.75 0 0 1 .75.75v4.3a.75.75 0 0 1-1.5 0v-4.3a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})]}),N=r=>{const{errorMessage:i,hintMessage:t,maxLength:s,value:n,disabled:a}=r;return e.jsxs("div",{className:u.clsx("dgs-ui-kit-flex dgs-ui-kit-font-p3-regular",{"dgs-ui-kit-justify-between":(i||t)&&s,"dgs-ui-kit-justify-start":(i||t)&&!s,"dgs-ui-kit-justify-end":!(i||t)&&s,"dgs-ui-kit-text-gray-400":a},i?"dgs-ui-kit-text-error-500":"dgs-ui-kit-text-gray-500"),children:[(i||t)&&e.jsxs("div",{className:u.clsx("dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-2 dgs-ui-kit-font-light",{"dgs-ui-kit-text-gray-400":a}),children:[e.jsx(L,{width:16,height:16}),e.jsx("span",{children:i||t})]}),s&&e.jsxs("span",{className:"ss02",children:[n?.length??0,"/",s]})]})},C=r=>{const{link:i,labelContent:t,required:s,disabled:n}=r;return e.jsxs("div",{className:u.clsx("dgs-ui-kit-flex dgs-ui-kit-mb-2",{"dgs-ui-kit-justify-between":t&&i?.href,"dgs-ui-kit-justify-start":t&&!i?.href,"dgs-ui-kit-justify-end":!t&&i?.href,"dgs-ui-kit-text-gray-400":n}),children:[t&&e.jsxs("label",{className:"dgs-ui-kit-px-0 dgs-ui-kit-font-p2-medium md:dgs-ui-kit-mx-0",children:[t,s&&e.jsx("span",{className:"dgs-ui-kit-ms-2 dgs-ui-kit-text-error-500",children:"*"})]}),i?.href&&e.jsx("a",{href:i.href,className:"dgs-ui-kit-font-button-small dgs-ui-kit-text-primary-400",children:i.cnotent})]})},E=r=>{const{labelContent:i,link:t,containerClassName:s,rightIcon:n,isError:a,errorMessage:g,hintMessage:h,required:F,maxLength:x,disabled:o,value:d,wrapperClassName:f,showMaxLength:m,onChange:p,children:M}=r,[v,c]=k.useState(d?.toString()??"");k.useEffect(()=>{typeof d<"u"&&d!==null&&c(d?.toString())},[d]);const q=l=>{c(l.currentTarget.value),p&&p(l)},j=!!(g||h||x&&m),b=!!(i||t?.href),y=j||b?"div":k.Fragment,I=l=>{const w=l.currentTarget.querySelector("textarea, input");w&&w.focus()};return e.jsxs(y,{...y==="div"&&f?{className:f}:{},children:[b&&e.jsx(C,{disabled:o,labelContent:i,link:t,required:F}),e.jsxs("div",{onClick:I,className:u.clsx("dgs-ui-kit-relative dgs-ui-kit-cursor-text dgs-ui-kit-border dgs-ui-kit-border-solid dgs-ui-kit-rounded-lg dgs-ui-kit-ring-4 dgs-ui-kit-flex dgs-ui-kit-justify-between dgs-ui-kit-gap-x-3 dgs-ui-kit-p-3 dgs-ui-kit-bg-gray-100 dgs-ui-kit-transition-all dgs-ui-kit-ring-transparent hover:dgs-ui-kit-ring-gray-50 has-[:focus]:dgs-ui-kit-bg-white ",a||g?"dgs-ui-kit-border-error-500 has-[:focus]:dgs-ui-kit-ring-error-50":"dgs-ui-kit-border-transparent hover:dgs-ui-kit-border-gray-300 has-[:focus]:dgs-ui-kit-border-primary-500 has-[:focus]:dgs-ui-kit-ring-primary-50",s,{"dgs-ui-kit-text-gray-400":o}),children:[n&&e.jsx("div",{className:"dgs-ui-kit-text-gray-600",children:n}),M({handleChangeField:q,setValue:c,value:v})]}),j&&e.jsx(N,{disabled:o,errorMessage:g,hintMessage:h,maxLength:m?x:void 0,value:v})]})};exports.FieldBottomInfo=N;exports.FieldLabel=C;exports.TextFieldWrapper=E;
|